buildgrid-ui 1.11.0 → 1.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(N,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],P):(N=typeof globalThis<"u"?globalThis:N||self,P(N.BuildgridUI={},N.React,N.ReactDOM))})(this,function(N,P,Yn){"use strict";function Ws(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=Ws(P),Kn=Ws(Yn);var qn={exports:{}},gn={};/**
1
+ (function(N,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],P):(N=typeof globalThis<"u"?globalThis:N||self,P(N.BuildgridUI={},N.React,N.ReactDOM))})(this,function(N,P,Kn){"use strict";function Vs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=Vs(P),qn=Vs(Kn);var Xn={exports:{}},vn={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.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 zs;function Ch(){if(zs)return gn;zs=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,a){var s=null;if(a!==void 0&&(s=""+a),o.key!==void 0&&(s=""+o.key),"key"in o){a={};for(var i in o)i!=="key"&&(a[i]=o[i])}else a=o;return o=a.ref,{$$typeof:e,type:r,key:s,ref:o!==void 0?o:null,props:a}}return gn.Fragment=t,gn.jsx=n,gn.jsxs=n,gn}var vn={};/**
9
+ */var Hs;function Sh(){if(Hs)return vn;Hs=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,a){var s=null;if(a!==void 0&&(s=""+a),o.key!==void 0&&(s=""+o.key),"key"in o){a={};for(var i in o)i!=="key"&&(a[i]=o[i])}else a=o;return o=a.ref,{$$typeof:e,type:r,key:s,ref:o!==void 0?o:null,props:a}}return vn.Fragment=t,vn.jsx=n,vn.jsxs=n,vn}var bn={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,9 +14,9 @@
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 Vs;function Nh(){return Vs||(Vs=1,process.env.NODE_ENV!=="production"&&function(){function e(C){if(C==null)return null;if(typeof C=="function")return C.$$typeof===G?null:C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case M:return"Fragment";case S:return"Portal";case j:return"Profiler";case T:return"StrictMode";case I:return"Suspense";case K:return"SuspenseList"}if(typeof C=="object")switch(typeof C.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),C.$$typeof){case z:return(C.displayName||"Context")+".Provider";case D:return(C._context.displayName||"Context")+".Consumer";case Y:var U=C.render;return C=C.displayName,C||(C=U.displayName||U.name||"",C=C!==""?"ForwardRef("+C+")":"ForwardRef"),C;case H:return U=C.displayName||null,U!==null?U:e(C.type)||"Memo";case J:U=C._payload,C=C._init;try{return e(C(U))}catch{}}return null}function t(C){return""+C}function n(C){try{t(C);var U=!1}catch{U=!0}if(U){U=console;var W=U.error,le=typeof Symbol=="function"&&Symbol.toStringTag&&C[Symbol.toStringTag]||C.constructor.name||"Object";return W.call(U,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",le),t(C)}}function r(){}function o(){if(F===0){B=console.log,X=console.info,_=console.warn,Z=console.error,te=console.group,ne=console.groupCollapsed,ie=console.groupEnd;var C={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}F++}function a(){if(F--,F===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ee({},C,{value:B}),info:ee({},C,{value:X}),warn:ee({},C,{value:_}),error:ee({},C,{value:Z}),group:ee({},C,{value:te}),groupCollapsed:ee({},C,{value:ne}),groupEnd:ee({},C,{value:ie})})}0>F&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function s(C){if(ce===void 0)try{throw Error()}catch(W){var U=W.stack.trim().match(/\n( *(at )?)/);ce=U&&U[1]||"",Se=-1<W.stack.indexOf(`
17
+ */var Gs;function Eh(){return Gs||(Gs=1,process.env.NODE_ENV!=="production"&&function(){function e(C){if(C==null)return null;if(typeof C=="function")return C.$$typeof===G?null:C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case M:return"Fragment";case S:return"Portal";case j:return"Profiler";case T:return"StrictMode";case I:return"Suspense";case K:return"SuspenseList"}if(typeof C=="object")switch(typeof C.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),C.$$typeof){case z:return(C.displayName||"Context")+".Provider";case D:return(C._context.displayName||"Context")+".Consumer";case Y:var U=C.render;return C=C.displayName,C||(C=U.displayName||U.name||"",C=C!==""?"ForwardRef("+C+")":"ForwardRef"),C;case H:return U=C.displayName||null,U!==null?U:e(C.type)||"Memo";case J:U=C._payload,C=C._init;try{return e(C(U))}catch{}}return null}function t(C){return""+C}function n(C){try{t(C);var U=!1}catch{U=!0}if(U){U=console;var W=U.error,le=typeof Symbol=="function"&&Symbol.toStringTag&&C[Symbol.toStringTag]||C.constructor.name||"Object";return W.call(U,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",le),t(C)}}function r(){}function o(){if(F===0){B=console.log,X=console.info,_=console.warn,Z=console.error,te=console.group,ne=console.groupCollapsed,ie=console.groupEnd;var C={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}F++}function a(){if(F--,F===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ee({},C,{value:B}),info:ee({},C,{value:X}),warn:ee({},C,{value:_}),error:ee({},C,{value:Z}),group:ee({},C,{value:te}),groupCollapsed:ee({},C,{value:ne}),groupEnd:ee({},C,{value:ie})})}0>F&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function s(C){if(ce===void 0)try{throw Error()}catch(W){var U=W.stack.trim().match(/\n( *(at )?)/);ce=U&&U[1]||"",Ee=-1<W.stack.indexOf(`
18
18
  at`)?" (<anonymous>)":-1<W.stack.indexOf("@")?"@unknown:0:0":""}return`
19
- `+ce+C+Se}function i(C,U){if(!C||ve)return"";var W=Ae.get(C);if(W!==void 0)return W;ve=!0,W=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var le=null;le=k.H,k.H=null,o();try{var Me={DetermineComponentFrameRoot:function(){try{if(U){var qe=function(){throw Error()};if(Object.defineProperty(qe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(qe,[])}catch(ze){var hn=ze}Reflect.construct(C,[],qe)}else{try{qe.call()}catch(ze){hn=ze}C.call(qe.prototype)}}else{try{throw Error()}catch(ze){hn=ze}(qe=C())&&typeof qe.catch=="function"&&qe.catch(function(){})}}catch(ze){if(ze&&hn&&typeof ze.stack=="string")return[ze.stack,hn.stack]}return[null,null]}};Me.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var pe=Object.getOwnPropertyDescriptor(Me.DetermineComponentFrameRoot,"name");pe&&pe.configurable&&Object.defineProperty(Me.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var re=Me.DetermineComponentFrameRoot(),Ke=re[0],rt=re[1];if(Ke&&rt){var be=Ke.split(`
19
+ `+ce+C+Ee}function i(C,U){if(!C||ve)return"";var W=Ae.get(C);if(W!==void 0)return W;ve=!0,W=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var le=null;le=k.H,k.H=null,o();try{var Me={DetermineComponentFrameRoot:function(){try{if(U){var qe=function(){throw Error()};if(Object.defineProperty(qe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(qe,[])}catch(ze){var gn=ze}Reflect.construct(C,[],qe)}else{try{qe.call()}catch(ze){gn=ze}C.call(qe.prototype)}}else{try{throw Error()}catch(ze){gn=ze}(qe=C())&&typeof qe.catch=="function"&&qe.catch(function(){})}}catch(ze){if(ze&&gn&&typeof ze.stack=="string")return[ze.stack,gn.stack]}return[null,null]}};Me.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var pe=Object.getOwnPropertyDescriptor(Me.DetermineComponentFrameRoot,"name");pe&&pe.configurable&&Object.defineProperty(Me.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var re=Me.DetermineComponentFrameRoot(),Ke=re[0],rt=re[1];if(Ke&&rt){var be=Ke.split(`
20
20
  `),ot=rt.split(`
21
21
  `);for(re=pe=0;pe<be.length&&!be[pe].includes("DetermineComponentFrameRoot");)pe++;for(;re<ot.length&&!ot[re].includes("DetermineComponentFrameRoot");)re++;if(pe===be.length||re===ot.length)for(pe=be.length-1,re=ot.length-1;1<=pe&&0<=re&&be[pe]!==ot[re];)re--;for(;1<=pe&&0<=re;pe--,re--)if(be[pe]!==ot[re]){if(pe!==1||re!==1)do if(pe--,re--,0>re||be[pe]!==ot[re]){var at=`
22
22
  `+be[pe].replace(" at new "," at ");return C.displayName&&at.includes("<anonymous>")&&(at=at.replace("<anonymous>",C.displayName)),typeof C=="function"&&Ae.set(C,at),at}while(1<=pe&&0<=re);break}}}finally{ve=!1,k.H=le,a(),Error.prepareStackTrace=W}return be=(be=C?C.displayName||C.name:"")?s(be):"",typeof C=="function"&&Ae.set(C,be),be}function u(C){if(C==null)return"";if(typeof C=="function"){var U=C.prototype;return i(C,!(!U||!U.isReactComponent))}if(typeof C=="string")return s(C);switch(C){case I:return s("Suspense");case K:return s("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case Y:return C=i(C.render,!1),C;case H:return u(C.type);case J:U=C._payload,C=C._init;try{return u(C(U))}catch{}}return""}function d(){var C=k.A;return C===null?null:C.getOwner()}function f(C){if(Q.call(C,"key")){var U=Object.getOwnPropertyDescriptor(C,"key").get;if(U&&U.isReactWarning)return!1}return C.key!==void 0}function p(C,U){function W(){Pe||(Pe=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",U))}W.isReactWarning=!0,Object.defineProperty(C,"key",{get:W,configurable:!0})}function v(){var C=e(this.type);return $e[C]||($e[C]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),C=this.props.ref,C!==void 0?C:null}function m(C,U,W,le,Me,pe){return W=pe.ref,C={$$typeof:E,type:C,key:U,props:pe,_owner:Me},(W!==void 0?W:null)!==null?Object.defineProperty(C,"ref",{enumerable:!1,get:v}):Object.defineProperty(C,"ref",{enumerable:!1,value:null}),C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(C,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C}function h(C,U,W,le,Me,pe){if(typeof C=="string"||typeof C=="function"||C===M||C===j||C===T||C===I||C===K||C===V||typeof C=="object"&&C!==null&&(C.$$typeof===J||C.$$typeof===H||C.$$typeof===z||C.$$typeof===D||C.$$typeof===Y||C.$$typeof===A||C.getModuleId!==void 0)){var re=U.children;if(re!==void 0)if(le)if(L(re)){for(le=0;le<re.length;le++)g(re[le],C);Object.freeze&&Object.freeze(re)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(re,C)}else re="",(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(re+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),C===null?le="null":L(C)?le="array":C!==void 0&&C.$$typeof===E?(le="<"+(e(C.type)||"Unknown")+" />",re=" Did you accidentally export a JSX literal instead of a component?"):le=typeof C,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",le,re);if(Q.call(U,"key")){re=e(C);var Ke=Object.keys(U).filter(function(be){return be!=="key"});le=0<Ke.length?"{key: someKey, "+Ke.join(": ..., ")+": ...}":"{key: someKey}",Re[re+le]||(Ke=0<Ke.length?"{"+Ke.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
@@ -24,176 +24,176 @@
24
24
  <%s {...props} />
25
25
  React keys must be passed directly to JSX without using spread:
26
26
  let props = %s;
27
- <%s key={someKey} {...props} />`,le,re,Ke,re),Re[re+le]=!0)}if(re=null,W!==void 0&&(n(W),re=""+W),f(U)&&(n(U.key),re=""+U.key),"key"in U){W={};for(var rt in U)rt!=="key"&&(W[rt]=U[rt])}else W=U;return re&&p(W,typeof C=="function"?C.displayName||C.name||"Unknown":C),m(C,re,pe,Me,d(),W)}function g(C,U){if(typeof C=="object"&&C&&C.$$typeof!==We){if(L(C))for(var W=0;W<C.length;W++){var le=C[W];b(le)&&y(le,U)}else if(b(C))C._store&&(C._store.validated=1);else if(C===null||typeof C!="object"?W=null:(W=q&&C[q]||C["@@iterator"],W=typeof W=="function"?W:null),typeof W=="function"&&W!==C.entries&&(W=W.call(C),W!==C))for(;!(C=W.next()).done;)b(C.value)&&y(C.value,U)}}function b(C){return typeof C=="object"&&C!==null&&C.$$typeof===E}function y(C,U){if(C._store&&!C._store.validated&&C.key==null&&(C._store.validated=1,U=w(U),!pt[U])){pt[U]=!0;var W="";C&&C._owner!=null&&C._owner!==d()&&(W=null,typeof C._owner.tag=="number"?W=e(C._owner.type):typeof C._owner.name=="string"&&(W=C._owner.name),W=" It was passed a child from "+W+".");var le=k.getCurrentStack;k.getCurrentStack=function(){var Me=u(C.type);return le&&(Me+=le()||""),Me},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',U,W),k.getCurrentStack=le}}function w(C){var U="",W=d();return W&&(W=e(W.type))&&(U=`
27
+ <%s key={someKey} {...props} />`,le,re,Ke,re),Re[re+le]=!0)}if(re=null,W!==void 0&&(n(W),re=""+W),f(U)&&(n(U.key),re=""+U.key),"key"in U){W={};for(var rt in U)rt!=="key"&&(W[rt]=U[rt])}else W=U;return re&&p(W,typeof C=="function"?C.displayName||C.name||"Unknown":C),m(C,re,pe,Me,d(),W)}function g(C,U){if(typeof C=="object"&&C&&C.$$typeof!==We){if(L(C))for(var W=0;W<C.length;W++){var le=C[W];b(le)&&y(le,U)}else if(b(C))C._store&&(C._store.validated=1);else if(C===null||typeof C!="object"?W=null:(W=q&&C[q]||C["@@iterator"],W=typeof W=="function"?W:null),typeof W=="function"&&W!==C.entries&&(W=W.call(C),W!==C))for(;!(C=W.next()).done;)b(C.value)&&y(C.value,U)}}function b(C){return typeof C=="object"&&C!==null&&C.$$typeof===E}function y(C,U){if(C._store&&!C._store.validated&&C.key==null&&(C._store.validated=1,U=w(U),!ht[U])){ht[U]=!0;var W="";C&&C._owner!=null&&C._owner!==d()&&(W=null,typeof C._owner.tag=="number"?W=e(C._owner.type):typeof C._owner.name=="string"&&(W=C._owner.name),W=" It was passed a child from "+W+".");var le=k.getCurrentStack;k.getCurrentStack=function(){var Me=u(C.type);return le&&(Me+=le()||""),Me},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',U,W),k.getCurrentStack=le}}function w(C){var U="",W=d();return W&&(W=e(W.type))&&(U=`
28
28
 
29
29
  Check the render method of \``+W+"`."),U||(C=e(C))&&(U=`
30
30
 
31
- Check the top-level render call using <`+C+">."),U}var x=P,E=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),z=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),q=Symbol.iterator,G=Symbol.for("react.client.reference"),k=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=Object.prototype.hasOwnProperty,ee=Object.assign,A=Symbol.for("react.client.reference"),L=Array.isArray,F=0,B,X,_,Z,te,ne,ie;r.__reactDisabledLog=!0;var ce,Se,ve=!1,Ae=new(typeof WeakMap=="function"?WeakMap:Map),We=Symbol.for("react.client.reference"),Pe,$e={},Re={},pt={};vn.Fragment=M,vn.jsx=function(C,U,W,le,Me){return h(C,U,W,!1,le,Me)},vn.jsxs=function(C,U,W,le,Me){return h(C,U,W,!0,le,Me)}}()),vn}var Hs;function Sh(){return Hs||(Hs=1,process.env.NODE_ENV==="production"?qn.exports=Ch():qn.exports=Nh()),qn.exports}var l=Sh();function Gs(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Gs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function uo(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Gs(e))&&(r&&(r+=" "),r+=t);return r}const fo="-",Eh=e=>{const t=Mh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(fo);return i[0]===""&&i.length!==1&&i.shift(),Us(i,t)||Ph(s)},getConflictingClassGroupIds:(s,i)=>{const u=n[s]||[];return i&&r[s]?[...u,...r[s]]:u}}},Us=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Us(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(fo);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},Ys=/^\[(.+)\]$/,Ph=e=>{if(Ys.test(e)){const t=Ys.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Mh=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Ah(Object.entries(e.classGroups),n).forEach(([a,s])=>{mo(s,r,a,t)}),r},mo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Ks(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(Th(o)){mo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{mo(s,Ks(t,a),n,r)})})},Ks=(e,t)=>{let n=e;return t.split(fo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Th=e=>e.isThemeGetter,Ah=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[n,o]}):e,Rh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},qs="!",kh=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,s=i=>{const u=[];let d=0,f=0,p;for(let b=0;b<i.length;b++){let y=i[b];if(d===0){if(y===o&&(r||i.slice(b,b+a)===t)){u.push(i.slice(f,b)),f=b+a;continue}if(y==="/"){p=b;continue}}y==="["?d++:y==="]"&&d--}const v=u.length===0?i:i.substring(f),m=v.startsWith(qs),h=m?v.substring(1):v,g=p&&p>f?p-f:void 0;return{modifiers:u,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:g}};return n?i=>n({className:i,parseClassName:s}):s},jh=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Dh=e=>({cache:Rh(e.cacheSize),parseClassName:kh(e),...Eh(e)}),Ih=/\s+/,_h=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(Ih);let i="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{modifiers:f,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:m}=n(d);let h=!!m,g=r(h?v.substring(0,m):v);if(!g){if(!h){i=d+(i.length>0?" "+i:i);continue}if(g=r(v),!g){i=d+(i.length>0?" "+i:i);continue}h=!1}const b=jh(f).join(":"),y=p?b+qs:b,w=y+g;if(a.includes(w))continue;a.push(w);const x=o(g,h);for(let E=0;E<x.length;++E){const S=x[E];a.push(y+S)}i=d+(i.length>0?" "+i:i)}return i};function Oh(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Xs(t))&&(r&&(r+=" "),r+=n);return r}const Xs=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Xs(e[r]))&&(n&&(n+=" "),n+=t);return n};function Lh(e,...t){let n,r,o,a=s;function s(u){const d=t.reduce((f,p)=>p(f),e());return n=Dh(d),r=n.cache.get,o=n.cache.set,a=i,i(u)}function i(u){const d=r(u);if(d)return d;const f=_h(u,n);return o(u,f),f}return function(){return a(Oh.apply(null,arguments))}}const me=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Qs=/^\[(?:([a-z-]+):)?(.+)\]$/i,$h=/^\d+\/\d+$/,Fh=new Set(["px","full","screen"]),Bh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wh=/\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$/,zh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Vh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,it=e=>Ht(e)||Fh.has(e)||$h.test(e),ht=e=>Gt(e,"length",Zh),Ht=e=>!!e&&!Number.isNaN(Number(e)),po=e=>Gt(e,"number",Ht),bn=e=>!!e&&Number.isInteger(Number(e)),Gh=e=>e.endsWith("%")&&Ht(e.slice(0,-1)),se=e=>Qs.test(e),gt=e=>Bh.test(e),Uh=new Set(["length","size","percentage"]),Yh=e=>Gt(e,Uh,Zs),Kh=e=>Gt(e,"position",Zs),qh=new Set(["image","url"]),Xh=e=>Gt(e,qh,eg),Qh=e=>Gt(e,"",Jh),yn=()=>!0,Gt=(e,t,n)=>{const r=Qs.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Zh=e=>Wh.test(e)&&!zh.test(e),Zs=()=>!1,Jh=e=>Vh.test(e),eg=e=>Hh.test(e),tg=Lh(()=>{const e=me("colors"),t=me("spacing"),n=me("blur"),r=me("brightness"),o=me("borderColor"),a=me("borderRadius"),s=me("borderSpacing"),i=me("borderWidth"),u=me("contrast"),d=me("grayscale"),f=me("hueRotate"),p=me("invert"),v=me("gap"),m=me("gradientColorStops"),h=me("gradientColorStopPositions"),g=me("inset"),b=me("margin"),y=me("opacity"),w=me("padding"),x=me("saturate"),E=me("scale"),S=me("sepia"),M=me("skew"),T=me("space"),j=me("translate"),D=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",se,t],I=()=>[se,t],K=()=>["",it,ht],H=()=>["auto",Ht,se],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],k=()=>["","0",se],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ee=()=>[Ht,se];return{cacheSize:500,separator:":",theme:{colors:[yn],spacing:[it,ht],blur:["none","",gt,se],brightness:ee(),borderColor:[e],borderRadius:["none","","full",gt,se],borderSpacing:I(),borderWidth:K(),contrast:ee(),grayscale:k(),hueRotate:ee(),invert:k(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[Gh,ht],inset:Y(),margin:Y(),opacity:ee(),padding:I(),saturate:ee(),scale:ee(),sepia:k(),skew:ee(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",se]}],container:["container"],columns:[{columns:[gt]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...J(),se]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",bn,se]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",se]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",bn,se]}],"grid-cols":[{"grid-cols":[yn]}],"col-start-end":[{col:["auto",{span:["full",bn,se]},se]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[yn]}],"row-start-end":[{row:["auto",{span:[bn,se]},se]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",se]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",se,t]}],"min-w":[{"min-w":[se,t,"min","max","fit"]}],"max-w":[{"max-w":[se,t,"none","full","min","max","fit","prose",{screen:[gt]},gt]}],h:[{h:[se,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[se,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[se,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[se,t,"auto","min","max","fit"]}],"font-size":[{text:["base",gt,ht]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",po]}],"font-family":[{font:[yn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",se]}],"line-clamp":[{"line-clamp":["none",Ht,po]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",it,se]}],"list-image":[{"list-image":["none",se]}],"list-style-type":[{list:["none","disc","decimal",se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",it,ht]}],"underline-offset":[{"underline-offset":["auto",it,se]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),Kh]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Yh]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Xh]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:V()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[it,se]}],"outline-w":[{outline:[it,ht]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[it,ht]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",gt,Qh]}],"shadow-color":[{shadow:[yn]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",gt,se]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[p]}],saturate:[{saturate:[x]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",se]}],duration:[{duration:ee()}],ease:[{ease:["linear","in","out","in-out",se]}],delay:[{delay:ee()}],animate:[{animate:["none","spin","ping","pulse","bounce",se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[bn,se]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",se]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",se]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[it,ht,po]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function R(...e){return tg(uo(e))}const ng={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rg=(e,t,n)=>{let r;const o=ng[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Ut(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const og={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ag={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},sg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ig={date:Ut({formats:og,defaultWidth:"full"}),time:Ut({formats:ag,defaultWidth:"full"}),dateTime:Ut({formats:sg,defaultWidth:"full"})},lg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},cg=(e,t,n,r)=>lg[e];function Qe(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const ug={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},dg={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},fg={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},mg={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},pg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},hg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},gg={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Qe({values:ug,defaultWidth:"wide"}),quarter:Qe({values:dg,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qe({values:fg,defaultWidth:"wide"}),day:Qe({values:mg,defaultWidth:"wide"}),dayPeriod:Qe({values:pg,defaultWidth:"wide",formattingValues:hg,defaultFormattingWidth:"wide"})};function Ze(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(i)?bg(i,p=>p.test(s)):vg(i,p=>p.test(s));let d;d=e.valueCallback?e.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const f=t.slice(s.length);return{value:d,rest:f}}}function vg(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function bg(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Js(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(o.length);return{value:s,rest:i}}}const yg=/^(\d+)(th|st|nd|rd)?/i,wg=/\d+/i,xg={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Cg={any:[/^b/i,/^(a|c)/i]},Ng={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Sg={any:[/1/i,/2/i,/3/i,/4/i]},Eg={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Pg={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Mg={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Tg={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Ag={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Rg={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},kg={ordinalNumber:Js({matchPattern:yg,parsePattern:wg,valueCallback:e=>parseInt(e,10)}),era:Ze({matchPatterns:xg,defaultMatchWidth:"wide",parsePatterns:Cg,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:Ng,defaultMatchWidth:"wide",parsePatterns:Sg,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ze({matchPatterns:Eg,defaultMatchWidth:"wide",parsePatterns:Pg,defaultParseWidth:"any"}),day:Ze({matchPatterns:Mg,defaultMatchWidth:"wide",parsePatterns:Tg,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:Ag,defaultMatchWidth:"any",parsePatterns:Rg,defaultParseWidth:"any"})},ho={code:"en-US",formatDistance:rg,formatLong:ig,formatRelative:cg,localize:gg,match:kg,options:{weekStartsOn:0,firstWeekContainsDate:1}};let jg={};function Xn(){return jg}const ei=6048e5,Dg=864e5,ti=Symbol.for("constructDateFrom");function Ve(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ti in e?e[ti](t):e instanceof Date?new e.constructor(t):new Date(t)}function je(e,t){return Ve(t||e,e)}function ni(e){const t=je(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ig(e,...t){const n=Ve.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ri(e,t){const n=je(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function _g(e,t,n){const[r,o]=Ig(n==null?void 0:n.in,e,t),a=ri(r),s=ri(o),i=+a-ni(a),u=+s-ni(s);return Math.round((i-u)/Dg)}function Og(e,t){const n=je(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Lg(e,t){const n=je(e,t==null?void 0:t.in);return _g(n,Og(n))+1}function wn(e,t){var i,u,d,f;const n=Xn(),r=(t==null?void 0:t.weekStartsOn)??((u=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,o=je(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Qn(e,t){return wn(e,{...t,weekStartsOn:1})}function oi(e,t){const n=je(e,t==null?void 0:t.in),r=n.getFullYear(),o=Ve(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Qn(o),s=Ve(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=Qn(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function $g(e,t){const n=oi(e,t),r=Ve(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Qn(r)}function Fg(e,t){const n=je(e,t==null?void 0:t.in),r=+Qn(n)-+$g(n);return Math.round(r/ei)+1}function ai(e,t){var f,p,v,m;const n=je(e,t==null?void 0:t.in),r=n.getFullYear(),o=Xn(),a=(t==null?void 0:t.firstWeekContainsDate)??((p=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??o.firstWeekContainsDate??((m=(v=o.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??1,s=Ve((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=wn(s,t),u=Ve((t==null?void 0:t.in)||e,0);u.setFullYear(r,0,a),u.setHours(0,0,0,0);const d=wn(u,t);return+n>=+i?r+1:+n>=+d?r:r-1}function Bg(e,t){var i,u,d,f;const n=Xn(),r=(t==null?void 0:t.firstWeekContainsDate)??((u=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,o=ai(e,t),a=Ve((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),wn(a,t)}function Wg(e,t){const n=je(e,t==null?void 0:t.in),r=+wn(n,t)-+Bg(n,t);return Math.round(r/ei)+1}function ue(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const vt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ue(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ue(n+1,2)},d(e,t){return ue(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ue(e.getHours()%12||12,t.length)},H(e,t){return ue(e.getHours(),t.length)},m(e,t){return ue(e.getMinutes(),t.length)},s(e,t){return ue(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ue(o,t.length)}},Yt={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},si={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return vt.y(e,t)},Y:function(e,t,n,r){const o=ai(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return ue(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):ue(a,t.length)},R:function(e,t){const n=oi(e);return ue(n,t.length)},u:function(e,t){const n=e.getFullYear();return ue(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ue(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ue(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return vt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ue(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Wg(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ue(o,t.length)},I:function(e,t,n){const r=Fg(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ue(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):vt.d(e,t)},D:function(e,t,n){const r=Lg(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ue(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ue(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ue(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ue(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Yt.noon:r===0?o=Yt.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Yt.evening:r>=12?o=Yt.afternoon:r>=4?o=Yt.morning:o=Yt.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return vt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):vt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ue(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ue(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):vt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):vt.s(e,t)},S:function(e,t){return vt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return li(r);case"XXXX":case"XX":return jt(r);case"XXXXX":case"XXX":default:return jt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return li(r);case"xxxx":case"xx":return jt(r);case"xxxxx":case"xxx":default:return jt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ii(r,":");case"OOOO":default:return"GMT"+jt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ii(r,":");case"zzzz":default:return"GMT"+jt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ue(r,t.length)},T:function(e,t,n){return ue(+e,t.length)}};function ii(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+ue(a,2)}function li(e,t){return e%60===0?(e>0?"-":"+")+ue(Math.abs(e)/60,2):jt(e,t)}function jt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ue(Math.trunc(r/60),2),a=ue(r%60,2);return n+o+t+a}const ci=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ui=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},zg={p:ui,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ci(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",ci(r,t)).replace("{{time}}",ui(o,t))}},Vg=/^D+$/,Hg=/^Y+$/,Gg=["D","DD","YY","YYYY"];function Ug(e){return Vg.test(e)}function Yg(e){return Hg.test(e)}function Kg(e,t,n){const r=qg(e,t,n);if(console.warn(r),Gg.includes(e))throw new RangeError(r)}function qg(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Xg(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Qg(e){return!(!Xg(e)&&typeof e!="number"||isNaN(+je(e)))}const Zg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ev=/^'([^]*?)'?$/,tv=/''/g,nv=/[a-zA-Z]/;function go(e,t,n){var f,p,v,m,h,g,b,y;const r=Xn(),o=(n==null?void 0:n.locale)??r.locale??ho,a=(n==null?void 0:n.firstWeekContainsDate)??((p=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(v=r.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((g=(h=n==null?void 0:n.locale)==null?void 0:h.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((y=(b=r.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??0,i=je(e,n==null?void 0:n.in);if(!Qg(i))throw new RangeError("Invalid time value");let u=t.match(Jg).map(w=>{const x=w[0];if(x==="p"||x==="P"){const E=zg[x];return E(w,o.formatLong)}return w}).join("").match(Zg).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const x=w[0];if(x==="'")return{isToken:!1,value:rv(w)};if(si[x])return{isToken:!0,value:w};if(x.match(nv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(u=o.localize.preprocessor(i,u));const d={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return u.map(w=>{if(!w.isToken)return w.value;const x=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Yg(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Ug(x))&&Kg(x,t,String(e));const E=si[x[0]];return E(i,x,o.localize,d)}).join("")}function rv(e){const t=e.match(ev);return t?t[1].replace(tv,"'"):e}function di(e,t,n){const r=je(e,n==null?void 0:n.in);if(isNaN(t))return Ve(e,NaN);if(!t)return r;const o=r.getDate(),a=Ve(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}function ov(e,t){const n=je(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function av(e,t){const n=je(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Ve(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function sv(e,t,n){return di(e,-t,n)}function iv(e,t){const n=fv(t);return"formatToParts"in n?cv(n,e):uv(n,e)}const lv={year:0,month:1,day:2,hour:3,minute:4,second:5};function cv(e,t){try{const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const a=lv[n[o].type];a!==void 0&&(r[a]=parseInt(n[o].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function uv(e,t){const n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const vo={},fi=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),dv=fi==="06/25/2014, 00:00:00"||fi==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function fv(e){return vo[e]||(vo[e]=dv?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),vo[e]}function mi(e,t,n,r,o,a,s){const i=new Date(0);return i.setUTCFullYear(e,t,n),i.setUTCHours(r,o,a,s),i}const pi=36e5,mv=6e4,bo={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function hi(e,t,n){if(!e)return 0;let r=bo.timezoneZ.exec(e);if(r)return 0;let o,a;if(r=bo.timezoneHH.exec(e),r)return o=parseInt(r[1],10),gi(o)?-(o*pi):NaN;if(r=bo.timezoneHHMM.exec(e),r){o=parseInt(r[2],10);const s=parseInt(r[3],10);return gi(o,s)?(a=Math.abs(o)*pi+s*mv,r[1]==="+"?-a:a):NaN}if(gv(e)){t=new Date(t||Date.now());const s=n?t:pv(t),i=yo(s,e);return-(n?i:hv(t,i,e))}return NaN}function pv(e){return mi(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function yo(e,t){const n=iv(e,t),r=mi(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let o=e.getTime();const a=o%1e3;return o-=a>=0?a:1e3+a,r-o}function hv(e,t,n){let o=e.getTime()-t;const a=yo(new Date(o),n);if(t===a)return t;o-=a-t;const s=yo(new Date(o),n);return a===s?a:Math.max(a,s)}function gi(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const vi={};function gv(e){if(vi[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),vi[e]=!0,!0}catch{return!1}}function bi(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const vv=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,wo=36e5,yi=6e4,bv=2,ke={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:vv};function yv(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const n=t.additionalDigits==null?bv:Number(t.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const r=wv(e),{year:o,restDateString:a}=xv(r.date,n),s=Cv(a,o);if(s===null||isNaN(s.getTime()))return new Date(NaN);if(s){const i=s.getTime();let u=0,d;if(r.time&&(u=Nv(r.time),u===null||isNaN(u)))return new Date(NaN);if(r.timeZone||t.timeZone){if(d=hi(r.timeZone||t.timeZone,new Date(i+u)),isNaN(d))return new Date(NaN)}else d=bi(new Date(i+u)),d=bi(new Date(i+u+d));return new Date(i+u+d)}else return new Date(NaN)}function wv(e){const t={};let n=ke.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=ke.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){const o=ke.timeZone.exec(r);o?(t.time=r.replace(o[1],""),t.timeZone=o[1].trim()):t.time=r}return t}function xv(e,t){if(e){const n=ke.YYY[t],r=ke.YYYYY[t];let o=ke.YYYY.exec(e)||r.exec(e);if(o){const a=o[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(o=ke.YY.exec(e)||n.exec(e),o){const a=o[1];return{year:parseInt(a,10)*100,restDateString:e.slice(a.length)}}}return{year:null}}function Cv(e,t){if(t===null)return null;let n,r,o;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let a=ke.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,Ci(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=ke.DDD.exec(e),a){n=new Date(0);const s=parseInt(a[1],10);return Pv(t,s)?(n.setUTCFullYear(t,0,s),n):new Date(NaN)}if(a=ke.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;const s=parseInt(a[2],10);return Ci(t,r,s)?(n.setUTCFullYear(t,r,s),n):new Date(NaN)}if(a=ke.Www.exec(e),a)return o=parseInt(a[1],10)-1,Ni(o)?wi(t,o):new Date(NaN);if(a=ke.WwwD.exec(e),a){o=parseInt(a[1],10)-1;const s=parseInt(a[2],10)-1;return Ni(o,s)?wi(t,o,s):new Date(NaN)}return null}function Nv(e){let t,n,r=ke.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),xo(t)?t%24*wo:NaN;if(r=ke.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),xo(t,n)?t%24*wo+n*yi:NaN;if(r=ke.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const o=parseFloat(r[3].replace(",","."));return xo(t,n,o)?t%24*wo+n*yi+o*1e3:NaN}return null}function wi(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const o=r.getUTCDay()||7,a=t*7+n+1-o;return r.setUTCDate(r.getUTCDate()+a),r}const Sv=[31,28,31,30,31,30,31,31,30,31,30,31],Ev=[31,29,31,30,31,30,31,31,30,31,30,31];function xi(e){return e%400===0||e%4===0&&e%100!==0}function Ci(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;const r=xi(e);if(r&&n>Ev[t]||!r&&n>Sv[t])return!1}return!0}function Pv(e,t){if(t<1)return!1;const n=xi(e);return!(n&&t>366||!n&&t>365)}function Ni(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function xo(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function Mv(e,t,n){e=yv(e,n);const r=hi(t,e,!0),o=new Date(e.getTime()-r),a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}const Tv=(e,t="pt-BR",n="BRL")=>new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:2}).format(e),Co=(e,t=2)=>{for(e=e.toString();e.length<t;)e="0"+e;return e},Av=e=>{if(!e)return"";const t=Mv(new Date(e.seconds?e.seconds*1e3:e),"America/Sao_Paulo");return[Co(t.getUTCDate(),2),Co(t.getUTCMonth()+1,2),t.getUTCFullYear()].join("/")},Rv=e=>new Intl.DateTimeFormat("pt-BR",{year:"2-digit",month:"short"}).format(e),kv=e=>new Intl.DateTimeFormat("pt-BR",{day:"2-digit",month:"2-digit"}).format(e),jv=e=>new Intl.DateTimeFormat("pt-BR",{year:"2-digit",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(e)),Dv=e=>new Intl.DateTimeFormat("pt-BR",{month:"long"}).format(e),Iv=e=>new Intl.DateTimeFormat("pt-BR",{dateStyle:"long"}).format(e),_v=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long"}).format(new Date(e)),Ov=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long",year:"numeric"}).format(new Date(e)),Lv=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long"}).format(new Date(e)),$v=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"long"}).format(typeof e=="string"?new Date(e):e),Fv=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"short"}).format(e),Bv=e=>e.slice(0,7),Wv=(e,t="pt-BR")=>e.toLocaleDateString(t,{weekday:"short",day:"2-digit",month:"2-digit"});function No(e,t){const n={...t};for(const r in e)e.hasOwnProperty(r)&&(typeof e[r]=="object"&&e[r]!==null&&!Array.isArray(e[r])&&typeof t[r]=="object"&&t[r]!==null&&!Array.isArray(t[r])?n[r]=No(e[r],t[r]):n[r]=e[r]);return n}const Ie=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase():"",zv=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replaceAll(" ","").toLowerCase():"",Vv=(e,t)=>Ie(e)<Ie(t)?-1:Ie(e)>Ie(t)?1:0,Hv=(e,t)=>Ie(e.name)<Ie(t.name)?-1:Ie(e.name)>Ie(t.name)?1:0,Gv=(e,t,n)=>e[n]<t[n]?-1:e[n]>t[n]?1:0,Uv=(e,t,n)=>e[n]>t[n]?-1:e[n]<t[n]?1:0,Yv=(e,t,n,r)=>Ie(e[n][r])<Ie(t[n][r])?-1:Ie(e[n][r])>Ie(t[n][r])?1:0,Kv=e=>e.charAt(0).toUpperCase()+e.slice(1),qv=({children:e,className:t,...n})=>l.jsx("div",{className:R("grid w-full auto-rows-[22rem] grid-cols-3 gap-4",t),...n,children:e}),Xv=({children:e,className:t,...n})=>l.jsx("div",{className:R("group relative col-span-3 flex flex-col justify-between overflow-hidden rounded-xl","bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)]","transform-gpu dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]",t),...n,children:e});/**
31
+ Check the top-level render call using <`+C+">."),U}var x=P,E=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),z=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),q=Symbol.iterator,G=Symbol.for("react.client.reference"),k=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=Object.prototype.hasOwnProperty,ee=Object.assign,A=Symbol.for("react.client.reference"),L=Array.isArray,F=0,B,X,_,Z,te,ne,ie;r.__reactDisabledLog=!0;var ce,Ee,ve=!1,Ae=new(typeof WeakMap=="function"?WeakMap:Map),We=Symbol.for("react.client.reference"),Pe,$e={},Re={},ht={};bn.Fragment=M,bn.jsx=function(C,U,W,le,Me){return h(C,U,W,!1,le,Me)},bn.jsxs=function(C,U,W,le,Me){return h(C,U,W,!0,le,Me)}}()),bn}var Us;function Ph(){return Us||(Us=1,process.env.NODE_ENV==="production"?Xn.exports=Sh():Xn.exports=Eh()),Xn.exports}var l=Ph();function Ys(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ys(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function po(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ys(e))&&(r&&(r+=" "),r+=t);return r}const ho="-",Mh=e=>{const t=Ah(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(ho);return i[0]===""&&i.length!==1&&i.shift(),Ks(i,t)||Th(s)},getConflictingClassGroupIds:(s,i)=>{const u=n[s]||[];return i&&r[s]?[...u,...r[s]]:u}}},Ks=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ks(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(ho);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},qs=/^\[(.+)\]$/,Th=e=>{if(qs.test(e)){const t=qs.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Ah=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return kh(Object.entries(e.classGroups),n).forEach(([a,s])=>{go(s,r,a,t)}),r},go=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Xs(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(Rh(o)){go(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{go(s,Xs(t,a),n,r)})})},Xs=(e,t)=>{let n=e;return t.split(ho).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Rh=e=>e.isThemeGetter,kh=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[n,o]}):e,jh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},Qs="!",Dh=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,s=i=>{const u=[];let d=0,f=0,p;for(let b=0;b<i.length;b++){let y=i[b];if(d===0){if(y===o&&(r||i.slice(b,b+a)===t)){u.push(i.slice(f,b)),f=b+a;continue}if(y==="/"){p=b;continue}}y==="["?d++:y==="]"&&d--}const v=u.length===0?i:i.substring(f),m=v.startsWith(Qs),h=m?v.substring(1):v,g=p&&p>f?p-f:void 0;return{modifiers:u,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:g}};return n?i=>n({className:i,parseClassName:s}):s},Ih=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},_h=e=>({cache:jh(e.cacheSize),parseClassName:Dh(e),...Mh(e)}),Oh=/\s+/,Lh=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(Oh);let i="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{modifiers:f,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:m}=n(d);let h=!!m,g=r(h?v.substring(0,m):v);if(!g){if(!h){i=d+(i.length>0?" "+i:i);continue}if(g=r(v),!g){i=d+(i.length>0?" "+i:i);continue}h=!1}const b=Ih(f).join(":"),y=p?b+Qs:b,w=y+g;if(a.includes(w))continue;a.push(w);const x=o(g,h);for(let E=0;E<x.length;++E){const S=x[E];a.push(y+S)}i=d+(i.length>0?" "+i:i)}return i};function $h(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Zs(t))&&(r&&(r+=" "),r+=n);return r}const Zs=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Zs(e[r]))&&(n&&(n+=" "),n+=t);return n};function Fh(e,...t){let n,r,o,a=s;function s(u){const d=t.reduce((f,p)=>p(f),e());return n=_h(d),r=n.cache.get,o=n.cache.set,a=i,i(u)}function i(u){const d=r(u);if(d)return d;const f=Lh(u,n);return o(u,f),f}return function(){return a($h.apply(null,arguments))}}const me=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Js=/^\[(?:([a-z-]+):)?(.+)\]$/i,Bh=/^\d+\/\d+$/,Wh=new Set(["px","full","screen"]),zh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vh=/\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$/,Hh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Gh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Uh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,it=e=>Gt(e)||Wh.has(e)||Bh.test(e),gt=e=>Ut(e,"length",eg),Gt=e=>!!e&&!Number.isNaN(Number(e)),vo=e=>Ut(e,"number",Gt),yn=e=>!!e&&Number.isInteger(Number(e)),Yh=e=>e.endsWith("%")&&Gt(e.slice(0,-1)),se=e=>Js.test(e),vt=e=>zh.test(e),Kh=new Set(["length","size","percentage"]),qh=e=>Ut(e,Kh,ei),Xh=e=>Ut(e,"position",ei),Qh=new Set(["image","url"]),Zh=e=>Ut(e,Qh,ng),Jh=e=>Ut(e,"",tg),wn=()=>!0,Ut=(e,t,n)=>{const r=Js.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},eg=e=>Vh.test(e)&&!Hh.test(e),ei=()=>!1,tg=e=>Gh.test(e),ng=e=>Uh.test(e),rg=Fh(()=>{const e=me("colors"),t=me("spacing"),n=me("blur"),r=me("brightness"),o=me("borderColor"),a=me("borderRadius"),s=me("borderSpacing"),i=me("borderWidth"),u=me("contrast"),d=me("grayscale"),f=me("hueRotate"),p=me("invert"),v=me("gap"),m=me("gradientColorStops"),h=me("gradientColorStopPositions"),g=me("inset"),b=me("margin"),y=me("opacity"),w=me("padding"),x=me("saturate"),E=me("scale"),S=me("sepia"),M=me("skew"),T=me("space"),j=me("translate"),D=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",se,t],I=()=>[se,t],K=()=>["",it,gt],H=()=>["auto",Gt,se],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],k=()=>["","0",se],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ee=()=>[Gt,se];return{cacheSize:500,separator:":",theme:{colors:[wn],spacing:[it,gt],blur:["none","",vt,se],brightness:ee(),borderColor:[e],borderRadius:["none","","full",vt,se],borderSpacing:I(),borderWidth:K(),contrast:ee(),grayscale:k(),hueRotate:ee(),invert:k(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[Yh,gt],inset:Y(),margin:Y(),opacity:ee(),padding:I(),saturate:ee(),scale:ee(),sepia:k(),skew:ee(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",se]}],container:["container"],columns:[{columns:[vt]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...J(),se]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yn,se]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",se]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",yn,se]}],"grid-cols":[{"grid-cols":[wn]}],"col-start-end":[{col:["auto",{span:["full",yn,se]},se]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[wn]}],"row-start-end":[{row:["auto",{span:[yn,se]},se]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",se]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",se,t]}],"min-w":[{"min-w":[se,t,"min","max","fit"]}],"max-w":[{"max-w":[se,t,"none","full","min","max","fit","prose",{screen:[vt]},vt]}],h:[{h:[se,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[se,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[se,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[se,t,"auto","min","max","fit"]}],"font-size":[{text:["base",vt,gt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",vo]}],"font-family":[{font:[wn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",se]}],"line-clamp":[{"line-clamp":["none",Gt,vo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",it,se]}],"list-image":[{"list-image":["none",se]}],"list-style-type":[{list:["none","disc","decimal",se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",it,gt]}],"underline-offset":[{"underline-offset":["auto",it,se]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),Xh]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qh]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Zh]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:V()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[it,se]}],"outline-w":[{outline:[it,gt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[it,gt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",vt,Jh]}],"shadow-color":[{shadow:[wn]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",vt,se]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[p]}],saturate:[{saturate:[x]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",se]}],duration:[{duration:ee()}],ease:[{ease:["linear","in","out","in-out",se]}],delay:[{delay:ee()}],animate:[{animate:["none","spin","ping","pulse","bounce",se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[yn,se]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",se]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",se]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[it,gt,vo]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function R(...e){return rg(po(e))}const og={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ag=(e,t,n)=>{let r;const o=og[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Yt(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const sg={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ig={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},lg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},cg={date:Yt({formats:sg,defaultWidth:"full"}),time:Yt({formats:ig,defaultWidth:"full"}),dateTime:Yt({formats:lg,defaultWidth:"full"})},ug={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dg=(e,t,n,r)=>ug[e];function Qe(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const fg={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mg={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},pg={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},hg={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},gg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},vg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},bg={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Qe({values:fg,defaultWidth:"wide"}),quarter:Qe({values:mg,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qe({values:pg,defaultWidth:"wide"}),day:Qe({values:hg,defaultWidth:"wide"}),dayPeriod:Qe({values:gg,defaultWidth:"wide",formattingValues:vg,defaultFormattingWidth:"wide"})};function Ze(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(i)?wg(i,p=>p.test(s)):yg(i,p=>p.test(s));let d;d=e.valueCallback?e.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const f=t.slice(s.length);return{value:d,rest:f}}}function yg(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function wg(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function ti(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(o.length);return{value:s,rest:i}}}const xg=/^(\d+)(th|st|nd|rd)?/i,Cg=/\d+/i,Ng={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Sg={any:[/^b/i,/^(a|c)/i]},Eg={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Pg={any:[/1/i,/2/i,/3/i,/4/i]},Mg={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Tg={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ag={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Rg={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},kg={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},jg={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Dg={ordinalNumber:ti({matchPattern:xg,parsePattern:Cg,valueCallback:e=>parseInt(e,10)}),era:Ze({matchPatterns:Ng,defaultMatchWidth:"wide",parsePatterns:Sg,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:Eg,defaultMatchWidth:"wide",parsePatterns:Pg,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ze({matchPatterns:Mg,defaultMatchWidth:"wide",parsePatterns:Tg,defaultParseWidth:"any"}),day:Ze({matchPatterns:Ag,defaultMatchWidth:"wide",parsePatterns:Rg,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:kg,defaultMatchWidth:"any",parsePatterns:jg,defaultParseWidth:"any"})},bo={code:"en-US",formatDistance:ag,formatLong:cg,formatRelative:dg,localize:bg,match:Dg,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Ig={};function Qn(){return Ig}const ni=6048e5,_g=864e5,ri=Symbol.for("constructDateFrom");function Ve(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ri in e?e[ri](t):e instanceof Date?new e.constructor(t):new Date(t)}function je(e,t){return Ve(t||e,e)}function oi(e){const t=je(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Og(e,...t){const n=Ve.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ai(e,t){const n=je(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Lg(e,t,n){const[r,o]=Og(n==null?void 0:n.in,e,t),a=ai(r),s=ai(o),i=+a-oi(a),u=+s-oi(s);return Math.round((i-u)/_g)}function $g(e,t){const n=je(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Fg(e,t){const n=je(e,t==null?void 0:t.in);return Lg(n,$g(n))+1}function xn(e,t){var i,u,d,f;const n=Qn(),r=(t==null?void 0:t.weekStartsOn)??((u=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,o=je(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Zn(e,t){return xn(e,{...t,weekStartsOn:1})}function si(e,t){const n=je(e,t==null?void 0:t.in),r=n.getFullYear(),o=Ve(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Zn(o),s=Ve(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=Zn(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function Bg(e,t){const n=si(e,t),r=Ve(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Zn(r)}function Wg(e,t){const n=je(e,t==null?void 0:t.in),r=+Zn(n)-+Bg(n);return Math.round(r/ni)+1}function ii(e,t){var f,p,v,m;const n=je(e,t==null?void 0:t.in),r=n.getFullYear(),o=Qn(),a=(t==null?void 0:t.firstWeekContainsDate)??((p=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??o.firstWeekContainsDate??((m=(v=o.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??1,s=Ve((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=xn(s,t),u=Ve((t==null?void 0:t.in)||e,0);u.setFullYear(r,0,a),u.setHours(0,0,0,0);const d=xn(u,t);return+n>=+i?r+1:+n>=+d?r:r-1}function zg(e,t){var i,u,d,f;const n=Qn(),r=(t==null?void 0:t.firstWeekContainsDate)??((u=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,o=ii(e,t),a=Ve((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),xn(a,t)}function Vg(e,t){const n=je(e,t==null?void 0:t.in),r=+xn(n,t)-+zg(n,t);return Math.round(r/ni)+1}function ue(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const bt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ue(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ue(n+1,2)},d(e,t){return ue(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ue(e.getHours()%12||12,t.length)},H(e,t){return ue(e.getHours(),t.length)},m(e,t){return ue(e.getMinutes(),t.length)},s(e,t){return ue(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ue(o,t.length)}},Kt={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},li={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return bt.y(e,t)},Y:function(e,t,n,r){const o=ii(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return ue(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):ue(a,t.length)},R:function(e,t){const n=si(e);return ue(n,t.length)},u:function(e,t){const n=e.getFullYear();return ue(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ue(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ue(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return bt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ue(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Vg(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ue(o,t.length)},I:function(e,t,n){const r=Wg(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ue(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):bt.d(e,t)},D:function(e,t,n){const r=Fg(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ue(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ue(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ue(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ue(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Kt.noon:r===0?o=Kt.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Kt.evening:r>=12?o=Kt.afternoon:r>=4?o=Kt.morning:o=Kt.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return bt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):bt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ue(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ue(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):bt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):bt.s(e,t)},S:function(e,t){return bt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ui(r);case"XXXX":case"XX":return Dt(r);case"XXXXX":case"XXX":default:return Dt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ui(r);case"xxxx":case"xx":return Dt(r);case"xxxxx":case"xxx":default:return Dt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ci(r,":");case"OOOO":default:return"GMT"+Dt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ci(r,":");case"zzzz":default:return"GMT"+Dt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ue(r,t.length)},T:function(e,t,n){return ue(+e,t.length)}};function ci(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+ue(a,2)}function ui(e,t){return e%60===0?(e>0?"-":"+")+ue(Math.abs(e)/60,2):Dt(e,t)}function Dt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ue(Math.trunc(r/60),2),a=ue(r%60,2);return n+o+t+a}const di=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},fi=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Hg={p:fi,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return di(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",di(r,t)).replace("{{time}}",fi(o,t))}},Gg=/^D+$/,Ug=/^Y+$/,Yg=["D","DD","YY","YYYY"];function Kg(e){return Gg.test(e)}function qg(e){return Ug.test(e)}function Xg(e,t,n){const r=Qg(e,t,n);if(console.warn(r),Yg.includes(e))throw new RangeError(r)}function Qg(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Zg(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Jg(e){return!(!Zg(e)&&typeof e!="number"||isNaN(+je(e)))}const ev=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nv=/^'([^]*?)'?$/,rv=/''/g,ov=/[a-zA-Z]/;function yo(e,t,n){var f,p,v,m,h,g,b,y;const r=Qn(),o=(n==null?void 0:n.locale)??r.locale??bo,a=(n==null?void 0:n.firstWeekContainsDate)??((p=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(v=r.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((g=(h=n==null?void 0:n.locale)==null?void 0:h.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((y=(b=r.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??0,i=je(e,n==null?void 0:n.in);if(!Jg(i))throw new RangeError("Invalid time value");let u=t.match(tv).map(w=>{const x=w[0];if(x==="p"||x==="P"){const E=Hg[x];return E(w,o.formatLong)}return w}).join("").match(ev).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const x=w[0];if(x==="'")return{isToken:!1,value:av(w)};if(li[x])return{isToken:!0,value:w};if(x.match(ov))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(u=o.localize.preprocessor(i,u));const d={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return u.map(w=>{if(!w.isToken)return w.value;const x=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&qg(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Kg(x))&&Xg(x,t,String(e));const E=li[x[0]];return E(i,x,o.localize,d)}).join("")}function av(e){const t=e.match(nv);return t?t[1].replace(rv,"'"):e}function mi(e,t,n){const r=je(e,n==null?void 0:n.in);if(isNaN(t))return Ve(e,NaN);if(!t)return r;const o=r.getDate(),a=Ve(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}function sv(e,t){const n=je(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function iv(e,t){const n=je(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Ve(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function lv(e,t,n){return mi(e,-t,n)}function cv(e,t){const n=pv(t);return"formatToParts"in n?dv(n,e):fv(n,e)}const uv={year:0,month:1,day:2,hour:3,minute:4,second:5};function dv(e,t){try{const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const a=uv[n[o].type];a!==void 0&&(r[a]=parseInt(n[o].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function fv(e,t){const n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const wo={},pi=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),mv=pi==="06/25/2014, 00:00:00"||pi==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function pv(e){return wo[e]||(wo[e]=mv?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),wo[e]}function hi(e,t,n,r,o,a,s){const i=new Date(0);return i.setUTCFullYear(e,t,n),i.setUTCHours(r,o,a,s),i}const gi=36e5,hv=6e4,xo={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function vi(e,t,n){if(!e)return 0;let r=xo.timezoneZ.exec(e);if(r)return 0;let o,a;if(r=xo.timezoneHH.exec(e),r)return o=parseInt(r[1],10),bi(o)?-(o*gi):NaN;if(r=xo.timezoneHHMM.exec(e),r){o=parseInt(r[2],10);const s=parseInt(r[3],10);return bi(o,s)?(a=Math.abs(o)*gi+s*hv,r[1]==="+"?-a:a):NaN}if(bv(e)){t=new Date(t||Date.now());const s=n?t:gv(t),i=Co(s,e);return-(n?i:vv(t,i,e))}return NaN}function gv(e){return hi(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Co(e,t){const n=cv(e,t),r=hi(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let o=e.getTime();const a=o%1e3;return o-=a>=0?a:1e3+a,r-o}function vv(e,t,n){let o=e.getTime()-t;const a=Co(new Date(o),n);if(t===a)return t;o-=a-t;const s=Co(new Date(o),n);return a===s?a:Math.max(a,s)}function bi(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const yi={};function bv(e){if(yi[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),yi[e]=!0,!0}catch{return!1}}function wi(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const yv=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,No=36e5,xi=6e4,wv=2,ke={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:yv};function xv(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const n=t.additionalDigits==null?wv:Number(t.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const r=Cv(e),{year:o,restDateString:a}=Nv(r.date,n),s=Sv(a,o);if(s===null||isNaN(s.getTime()))return new Date(NaN);if(s){const i=s.getTime();let u=0,d;if(r.time&&(u=Ev(r.time),u===null||isNaN(u)))return new Date(NaN);if(r.timeZone||t.timeZone){if(d=vi(r.timeZone||t.timeZone,new Date(i+u)),isNaN(d))return new Date(NaN)}else d=wi(new Date(i+u)),d=wi(new Date(i+u+d));return new Date(i+u+d)}else return new Date(NaN)}function Cv(e){const t={};let n=ke.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=ke.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){const o=ke.timeZone.exec(r);o?(t.time=r.replace(o[1],""),t.timeZone=o[1].trim()):t.time=r}return t}function Nv(e,t){if(e){const n=ke.YYY[t],r=ke.YYYYY[t];let o=ke.YYYY.exec(e)||r.exec(e);if(o){const a=o[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(o=ke.YY.exec(e)||n.exec(e),o){const a=o[1];return{year:parseInt(a,10)*100,restDateString:e.slice(a.length)}}}return{year:null}}function Sv(e,t){if(t===null)return null;let n,r,o;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let a=ke.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,Si(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=ke.DDD.exec(e),a){n=new Date(0);const s=parseInt(a[1],10);return Tv(t,s)?(n.setUTCFullYear(t,0,s),n):new Date(NaN)}if(a=ke.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;const s=parseInt(a[2],10);return Si(t,r,s)?(n.setUTCFullYear(t,r,s),n):new Date(NaN)}if(a=ke.Www.exec(e),a)return o=parseInt(a[1],10)-1,Ei(o)?Ci(t,o):new Date(NaN);if(a=ke.WwwD.exec(e),a){o=parseInt(a[1],10)-1;const s=parseInt(a[2],10)-1;return Ei(o,s)?Ci(t,o,s):new Date(NaN)}return null}function Ev(e){let t,n,r=ke.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),So(t)?t%24*No:NaN;if(r=ke.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),So(t,n)?t%24*No+n*xi:NaN;if(r=ke.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const o=parseFloat(r[3].replace(",","."));return So(t,n,o)?t%24*No+n*xi+o*1e3:NaN}return null}function Ci(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const o=r.getUTCDay()||7,a=t*7+n+1-o;return r.setUTCDate(r.getUTCDate()+a),r}const Pv=[31,28,31,30,31,30,31,31,30,31,30,31],Mv=[31,29,31,30,31,30,31,31,30,31,30,31];function Ni(e){return e%400===0||e%4===0&&e%100!==0}function Si(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;const r=Ni(e);if(r&&n>Mv[t]||!r&&n>Pv[t])return!1}return!0}function Tv(e,t){if(t<1)return!1;const n=Ni(e);return!(n&&t>366||!n&&t>365)}function Ei(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function So(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function Av(e,t,n){e=xv(e,n);const r=vi(t,e,!0),o=new Date(e.getTime()-r),a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}const Rv=(e,t="pt-BR",n="BRL")=>new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:2}).format(e),Eo=(e,t=2)=>{for(e=e.toString();e.length<t;)e="0"+e;return e},kv=e=>{if(!e)return"";const t=Av(new Date(e.seconds?e.seconds*1e3:e),"America/Sao_Paulo");return[Eo(t.getUTCDate(),2),Eo(t.getUTCMonth()+1,2),t.getUTCFullYear()].join("/")},jv=e=>new Intl.DateTimeFormat("pt-BR",{year:"2-digit",month:"short"}).format(e),Dv=e=>new Intl.DateTimeFormat("pt-BR",{day:"2-digit",month:"2-digit"}).format(e),Iv=e=>new Intl.DateTimeFormat("pt-BR",{year:"2-digit",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(e)),_v=e=>new Intl.DateTimeFormat("pt-BR",{month:"long"}).format(e),Ov=e=>new Intl.DateTimeFormat("pt-BR",{dateStyle:"long"}).format(e),Lv=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long"}).format(new Date(e)),$v=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long",year:"numeric"}).format(new Date(e)),Fv=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long"}).format(new Date(e)),Bv=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"long"}).format(typeof e=="string"?new Date(e):e),Wv=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"short"}).format(e),zv=e=>e.slice(0,7),Vv=(e,t="pt-BR")=>e.toLocaleDateString(t,{weekday:"short",day:"2-digit",month:"2-digit"});function Po(e,t){const n={...t};for(const r in e)e.hasOwnProperty(r)&&(typeof e[r]=="object"&&e[r]!==null&&!Array.isArray(e[r])&&typeof t[r]=="object"&&t[r]!==null&&!Array.isArray(t[r])?n[r]=Po(e[r],t[r]):n[r]=e[r]);return n}const Ie=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase():"",Hv=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replaceAll(" ","").toLowerCase():"",Gv=(e,t)=>Ie(e)<Ie(t)?-1:Ie(e)>Ie(t)?1:0,Uv=(e,t)=>Ie(e.name)<Ie(t.name)?-1:Ie(e.name)>Ie(t.name)?1:0,Yv=(e,t,n)=>e[n]<t[n]?-1:e[n]>t[n]?1:0,Kv=(e,t,n)=>e[n]>t[n]?-1:e[n]<t[n]?1:0,qv=(e,t,n,r)=>Ie(e[n][r])<Ie(t[n][r])?-1:Ie(e[n][r])>Ie(t[n][r])?1:0,Xv=e=>e.charAt(0).toUpperCase()+e.slice(1),Qv=({children:e,className:t,...n})=>l.jsx("div",{className:R("grid w-full auto-rows-[22rem] grid-cols-3 gap-4",t),...n,children:e}),Zv=({children:e,className:t,...n})=>l.jsx("div",{className:R("group relative col-span-3 flex flex-col justify-between overflow-hidden rounded-xl","bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)]","transform-gpu dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]",t),...n,children:e});/**
32
32
  * @license lucide-react v0.469.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const Qv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Si=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
36
+ */const Jv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Pi=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
37
37
  * @license lucide-react v0.469.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */var Zv={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"};/**
41
+ */var eb={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"};/**
42
42
  * @license lucide-react v0.469.0 - ISC
43
43
  *
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
- */const Jv=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},u)=>P.createElement("svg",{ref:u,...Zv,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Si("lucide",o),...i},[...s.map(([d,f])=>P.createElement(d,f)),...Array.isArray(a)?a:[a]]));/**
46
+ */const tb=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},u)=>P.createElement("svg",{ref:u,...eb,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Pi("lucide",o),...i},[...s.map(([d,f])=>P.createElement(d,f)),...Array.isArray(a)?a:[a]]));/**
47
47
  * @license lucide-react v0.469.0 - ISC
48
48
  *
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
- */const de=(e,t)=>{const n=P.forwardRef(({className:r,...o},a)=>P.createElement(Jv,{ref:a,iconNode:t,className:Si(`lucide-${Qv(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
51
+ */const de=(e,t)=>{const n=P.forwardRef(({className:r,...o},a)=>P.createElement(tb,{ref:a,iconNode:t,className:Pi(`lucide-${Jv(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
52
52
  * @license lucide-react v0.469.0 - ISC
53
53
  *
54
54
  * This source code is licensed under the ISC license.
55
55
  * See the LICENSE file in the root directory of this source tree.
56
- */const eb=de("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
56
+ */const nb=de("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
57
57
  * @license lucide-react v0.469.0 - ISC
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const tb=de("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
61
+ */const rb=de("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
62
62
  * @license lucide-react v0.469.0 - ISC
63
63
  *
64
64
  * This source code is licensed under the ISC license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
- */const nb=de("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
66
+ */const ob=de("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
67
67
  * @license lucide-react v0.469.0 - ISC
68
68
  *
69
69
  * This source code is licensed under the ISC license.
70
70
  * See the LICENSE file in the root directory of this source tree.
71
- */const xn=de("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
71
+ */const Cn=de("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
72
72
  * @license lucide-react v0.469.0 - ISC
73
73
  *
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
- */const Kt=de("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
76
+ */const qt=de("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
77
77
  * @license lucide-react v0.469.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
- */const So=de("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
81
+ */const Mo=de("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
82
82
  * @license lucide-react v0.469.0 - ISC
83
83
  *
84
84
  * This source code is licensed under the ISC license.
85
85
  * See the LICENSE file in the root directory of this source tree.
86
- */const Zn=de("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
86
+ */const Jn=de("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
87
87
  * @license lucide-react v0.469.0 - ISC
88
88
  *
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const rb=de("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
91
+ */const ab=de("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
92
92
  * @license lucide-react v0.469.0 - ISC
93
93
  *
94
94
  * This source code is licensed under the ISC license.
95
95
  * See the LICENSE file in the root directory of this source tree.
96
- */const ob=de("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
96
+ */const sb=de("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
97
97
  * @license lucide-react v0.469.0 - ISC
98
98
  *
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
- */const ab=de("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
101
+ */const ib=de("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
102
102
  * @license lucide-react v0.469.0 - ISC
103
103
  *
104
104
  * This source code is licensed under the ISC license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
- */const Ei=de("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
106
+ */const Mi=de("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
107
107
  * @license lucide-react v0.469.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
- */const sb=de("CircleOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.35 2.69A10 10 0 0 1 21.3 15.65",key:"1pfsoa"}],["path",{d:"M19.08 19.08A10 10 0 1 1 4.92 4.92",key:"1ablyi"}]]);/**
111
+ */const lb=de("CircleOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.35 2.69A10 10 0 0 1 21.3 15.65",key:"1pfsoa"}],["path",{d:"M19.08 19.08A10 10 0 1 1 4.92 4.92",key:"1ablyi"}]]);/**
112
112
  * @license lucide-react v0.469.0 - ISC
113
113
  *
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
- */const Eo=de("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
116
+ */const To=de("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
117
117
  * @license lucide-react v0.469.0 - ISC
118
118
  *
119
119
  * This source code is licensed under the ISC license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
- */const Pi=de("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
121
+ */const Ti=de("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
122
122
  * @license lucide-react v0.469.0 - ISC
123
123
  *
124
124
  * This source code is licensed under the ISC license.
125
125
  * See the LICENSE file in the root directory of this source tree.
126
- */const ib=de("Ellipsis",[["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"}]]);/**
126
+ */const cb=de("Ellipsis",[["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"}]]);/**
127
127
  * @license lucide-react v0.469.0 - ISC
128
128
  *
129
129
  * This source code is licensed under the ISC license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
- */const lb=de("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
131
+ */const ub=de("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
132
132
  * @license lucide-react v0.469.0 - ISC
133
133
  *
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
- */const cb=de("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
136
+ */const db=de("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
137
137
  * @license lucide-react v0.469.0 - ISC
138
138
  *
139
139
  * This source code is licensed under the ISC license.
140
140
  * See the LICENSE file in the root directory of this source tree.
141
- */const ub=de("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
141
+ */const fb=de("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
142
142
  * @license lucide-react v0.469.0 - ISC
143
143
  *
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
- */const db=de("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
146
+ */const mb=de("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
147
147
  * @license lucide-react v0.469.0 - ISC
148
148
  *
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
- */const fb=de("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
151
+ */const pb=de("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
152
152
  * @license lucide-react v0.469.0 - ISC
153
153
  *
154
154
  * This source code is licensed under the ISC license.
155
155
  * See the LICENSE file in the root directory of this source tree.
156
- */const mb=de("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
156
+ */const hb=de("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
157
157
  * @license lucide-react v0.469.0 - ISC
158
158
  *
159
159
  * This source code is licensed under the ISC license.
160
160
  * See the LICENSE file in the root directory of this source tree.
161
- */const pb=de("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
161
+ */const gb=de("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
162
162
  * @license lucide-react v0.469.0 - ISC
163
163
  *
164
164
  * This source code is licensed under the ISC license.
165
165
  * See the LICENSE file in the root directory of this source tree.
166
- */const hb=de("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
166
+ */const vb=de("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
167
167
  * @license lucide-react v0.469.0 - ISC
168
168
  *
169
169
  * This source code is licensed under the ISC license.
170
170
  * See the LICENSE file in the root directory of this source tree.
171
- */const gb=de("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
171
+ */const bb=de("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
172
172
  * @license lucide-react v0.469.0 - ISC
173
173
  *
174
174
  * This source code is licensed under the ISC license.
175
175
  * See the LICENSE file in the root directory of this source tree.
176
- */const vb=de("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
176
+ */const yb=de("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
177
177
  * @license lucide-react v0.469.0 - ISC
178
178
  *
179
179
  * This source code is licensed under the ISC license.
180
180
  * See the LICENSE file in the root directory of this source tree.
181
- */const Mi=de("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
181
+ */const Ai=de("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
182
182
  * @license lucide-react v0.469.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
185
185
  * See the LICENSE file in the root directory of this source tree.
186
- */const bb=de("Underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);/**
186
+ */const wb=de("Underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);/**
187
187
  * @license lucide-react v0.469.0 - ISC
188
188
  *
189
189
  * This source code is licensed under the ISC license.
190
190
  * See the LICENSE file in the root directory of this source tree.
191
- */const Po=de("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ti=e=>{const{notFoundText:t,notFoundAction:n,icon:r,className:o}=e;return l.jsxs("div",{className:R("flex flex-col gap-4 items-center bg-gray-200 rounded-lg p-6 justify-center",o),children:[r||l.jsx(sb,{size:45}),l.jsxs("div",{className:"text-lg font-medium m-0",children:[t,n||null]})]})};function yb(e,t){const n=c.createContext(t),r=a=>{const{children:s,...i}=a,u=c.useMemo(()=>i,Object.values(i));return l.jsx(n.Provider,{value:u,children:s})};r.displayName=e+"Provider";function o(a){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function ye(e,t=[]){let n=[];function r(a,s){const i=c.createContext(s),u=n.length;n=[...n,s];const d=p=>{var y;const{scope:v,children:m,...h}=p,g=((y=v==null?void 0:v[e])==null?void 0:y[u])||i,b=c.useMemo(()=>h,Object.values(h));return l.jsx(g.Provider,{value:b,children:m})};d.displayName=a+"Provider";function f(p,v){var g;const m=((g=v==null?void 0:v[e])==null?void 0:g[u])||i,h=c.useContext(m);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=n.map(s=>c.createContext(s));return function(i){const u=(i==null?void 0:i[e])||a;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return o.scopeName=e,[r,wb(o,...t)]}function wb(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:u,scopeName:d})=>{const p=u(a)[`__scope${d}`];return{...i,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Ai(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Cn(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Ai(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Ai(e[o],null)}}}}function oe(...e){return c.useCallback(Cn(...e),e)}var lt=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),a=o.find(xb);if(a){const s=a.props.children,i=o.map(u=>u===a?c.Children.count(s)>1?c.Children.only(null):c.isValidElement(s)?s.props.children:null:u);return l.jsx(Mo,{...r,ref:t,children:c.isValidElement(s)?c.cloneElement(s,void 0,i):null})}return l.jsx(Mo,{...r,ref:t,children:n})});lt.displayName="Slot";var Mo=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const o=Nb(n);return c.cloneElement(n,{...Cb(r,n.props),ref:t?Cn(t,o):o})}return c.Children.count(n)>1?c.Children.only(null):null});Mo.displayName="SlotClone";var To=({children:e})=>l.jsx(l.Fragment,{children:e});function xb(e){return c.isValidElement(e)&&e.type===To}function Cb(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{a(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Nb(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function qt(e){const t=e+"CollectionProvider",[n,r]=ye(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:h,children:g}=m,b=P.useRef(null),y=P.useRef(new Map).current;return l.jsx(o,{scope:h,itemMap:y,collectionRef:b,children:g})};s.displayName=t;const i=e+"CollectionSlot",u=P.forwardRef((m,h)=>{const{scope:g,children:b}=m,y=a(i,g),w=oe(h,y.collectionRef);return l.jsx(lt,{ref:w,children:b})});u.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=P.forwardRef((m,h)=>{const{scope:g,children:b,...y}=m,w=P.useRef(null),x=oe(h,w),E=a(d,g);return P.useEffect(()=>(E.itemMap.set(w,{ref:w,...y}),()=>void E.itemMap.delete(w))),l.jsx(lt,{[f]:"",ref:x,children:b})});p.displayName=d;function v(m){const h=a(e+"CollectionConsumer",m);return P.useCallback(()=>{const b=h.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((E,S)=>y.indexOf(E.ref.current)-y.indexOf(S.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},v,r]}function O(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function we(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ce({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Sb({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=we(n),u=c.useCallback(d=>{if(a){const p=typeof d=="function"?d(e):d;p!==e&&i(p)}else o(d)},[a,e,o,i]);return[s,u]}function Sb({defaultProp:e,onChange:t}){const n=c.useState(e),[r]=n,o=c.useRef(r),a=we(t);return c.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}var Eb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$=Eb.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:a,...s}=r,i=a?lt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(i,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Jn(e,t){e&&Kn.flushSync(()=>e.dispatchEvent(t))}var xe=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{};function Pb(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Ne=e=>{const{present:t,children:n}=e,r=Mb(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),a=oe(r.ref,Tb(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:a}):null};Ne.displayName="Presence";function Mb(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),a=c.useRef("none"),s=e?"mounted":"unmounted",[i,u]=Pb(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const d=er(r.current);a.current=i==="mounted"?d:"none"},[i]),xe(()=>{const d=r.current,f=o.current;if(f!==e){const v=a.current,m=er(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&v!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),xe(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=m=>{const g=er(r.current).includes(m.animationName);if(m.target===t&&g&&(u("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},v=m=>{m.target===t&&(a.current=er(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(d=>{d&&(r.current=getComputedStyle(d)),n(d)},[])}}function er(e){return(e==null?void 0:e.animationName)||"none"}function Tb(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ab=c.useId||(()=>{}),Rb=0;function he(e){const[t,n]=c.useState(Ab());return xe(()=>{n(r=>r??String(Rb++))},[e]),t?`radix-${t}`:""}var Ao="Collapsible",[kb,Ri]=ye(Ao),[jb,Ro]=kb(Ao),ki=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[u=!1,d]=Ce({prop:r,defaultProp:o,onChange:s});return l.jsx(jb,{scope:n,disabled:a,contentId:he(),open:u,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),children:l.jsx($.div,{"data-state":jo(u),"data-disabled":a?"":void 0,...i,ref:t})})});ki.displayName=Ao;var ji="CollapsibleTrigger",Di=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Ro(ji,n);return l.jsx($.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":jo(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:O(e.onClick,o.onOpenToggle)})});Di.displayName=ji;var ko="CollapsibleContent",Ii=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ro(ko,e.__scopeCollapsible);return l.jsx(Ne,{present:n||o.open,children:({present:a})=>l.jsx(Db,{...r,ref:t,present:a})})});Ii.displayName=ko;var Db=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=Ro(ko,n),[i,u]=c.useState(r),d=c.useRef(null),f=oe(t,d),p=c.useRef(0),v=p.current,m=c.useRef(0),h=m.current,g=s.open||i,b=c.useRef(g),y=c.useRef(void 0);return c.useEffect(()=>{const w=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(w)},[]),xe(()=>{const w=d.current;if(w){y.current=y.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const x=w.getBoundingClientRect();p.current=x.height,m.current=x.width,b.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),u(r)}},[s.open,r]),l.jsx($.div,{"data-state":jo(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...a,ref:f,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:g&&o})});function jo(e){return e?"open":"closed"}var Ib=ki,_b=Di,Ob=Ii,Lb=c.createContext(void 0);function bt(e){const t=c.useContext(Lb);return e||t||"ltr"}var ct="Accordion",$b=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Do,Fb,Bb]=qt(ct),[tr,XE]=ye(ct,[Bb,Ri]),Io=Ri(),_i=P.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return l.jsx(Do.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?l.jsx(Hb,{...a,ref:t}):l.jsx(Vb,{...o,ref:t})})});_i.displayName=ct;var[Oi,Wb]=tr(ct),[Li,zb]=tr(ct,{collapsible:!1}),Vb=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[i,u]=Ce({prop:n,defaultProp:r,onChange:o});return l.jsx(Oi,{scope:e.__scopeAccordion,value:i?[i]:[],onItemOpen:u,onItemClose:P.useCallback(()=>a&&u(""),[a,u]),children:l.jsx(Li,{scope:e.__scopeAccordion,collapsible:a,children:l.jsx($i,{...s,ref:t})})})}),Hb=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s=[],i]=Ce({prop:n,defaultProp:r,onChange:o}),u=P.useCallback(f=>i((p=[])=>[...p,f]),[i]),d=P.useCallback(f=>i((p=[])=>p.filter(v=>v!==f)),[i]);return l.jsx(Oi,{scope:e.__scopeAccordion,value:s,onItemOpen:u,onItemClose:d,children:l.jsx(Li,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx($i,{...a,ref:t})})})}),[Gb,nr]=tr(ct),$i=P.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,i=P.useRef(null),u=oe(i,t),d=Fb(n),p=bt(o)==="ltr",v=O(e.onKeyDown,m=>{var j;if(!$b.includes(m.key))return;const h=m.target,g=d().filter(D=>{var z;return!((z=D.ref.current)!=null&&z.disabled)}),b=g.findIndex(D=>D.ref.current===h),y=g.length;if(b===-1)return;m.preventDefault();let w=b;const x=0,E=y-1,S=()=>{w=b+1,w>E&&(w=x)},M=()=>{w=b-1,w<x&&(w=E)};switch(m.key){case"Home":w=x;break;case"End":w=E;break;case"ArrowRight":a==="horizontal"&&(p?S():M());break;case"ArrowDown":a==="vertical"&&S();break;case"ArrowLeft":a==="horizontal"&&(p?M():S());break;case"ArrowUp":a==="vertical"&&M();break}const T=w%y;(j=g[T].ref.current)==null||j.focus()});return l.jsx(Gb,{scope:n,disabled:r,direction:o,orientation:a,children:l.jsx(Do.Slot,{scope:n,children:l.jsx($.div,{...s,"data-orientation":a,ref:u,onKeyDown:r?void 0:v})})})}),rr="AccordionItem",[Ub,_o]=tr(rr),Fi=P.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=nr(rr,n),s=Wb(rr,n),i=Io(n),u=he(),d=r&&s.value.includes(r)||!1,f=a.disabled||e.disabled;return l.jsx(Ub,{scope:n,open:d,disabled:f,triggerId:u,children:l.jsx(Ib,{"data-orientation":a.orientation,"data-state":Gi(d),...i,...o,ref:t,disabled:f,open:d,onOpenChange:p=>{p?s.onItemOpen(r):s.onItemClose(r)}})})});Fi.displayName=rr;var Bi="AccordionHeader",Wi=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=nr(ct,n),a=_o(Bi,n);return l.jsx($.h3,{"data-orientation":o.orientation,"data-state":Gi(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});Wi.displayName=Bi;var Oo="AccordionTrigger",zi=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=nr(ct,n),a=_o(Oo,n),s=zb(Oo,n),i=Io(n);return l.jsx(Do.ItemSlot,{scope:n,children:l.jsx(_b,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...r,ref:t})})});zi.displayName=Oo;var Vi="AccordionContent",Hi=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=nr(ct,n),a=_o(Vi,n),s=Io(n);return l.jsx(Ob,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Hi.displayName=Vi;function Gi(e){return e?"open":"closed"}var Yb=_i,Kb=Fi,qb=Wi,Ui=zi,Yi=Hi;const Xb=Yb,Ki=c.forwardRef(({className:e,...t},n)=>l.jsx(Kb,{ref:n,className:R("border-b",e),...t}));Ki.displayName="AccordionItem";const qi=c.forwardRef(({className:e,children:t,...n},r)=>l.jsx(qb,{className:"flex",children:l.jsxs(Ui,{ref:r,className:R("text-base flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,l.jsx(Kt,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));qi.displayName=Ui.displayName;const Xi=c.forwardRef(({className:e,children:t,...n},r)=>l.jsx(Yi,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:l.jsx("div",{className:R("pb-4 pt-0",e),children:t})}));Xi.displayName=Yi.displayName;const Qi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Zi=uo,Dt=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Zi(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=n==null?void 0:n[d],p=a==null?void 0:a[d];if(f===null)return null;const v=Qi(f)||Qi(p);return o[d][v]}),i=n&&Object.entries(n).reduce((d,f)=>{let[p,v]=f;return v===void 0||(d[p]=v),d},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:p,className:v,...m}=f;return Object.entries(m).every(h=>{let[g,b]=h;return Array.isArray(b)?b.includes({...a,...i}[g]):{...a,...i}[g]===b})?[...d,p,v]:d},[]);return Zi(e,s,u,n==null?void 0:n.class,n==null?void 0:n.className)},Qb=Dt("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{sizing:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4",xl:"h-14 text-lg px-5","2xl":"h-16 text-xl px-6"}},defaultVariants:{sizing:"md"}}),or=c.forwardRef(({className:e,sizing:t,type:n,...r},o)=>l.jsx("input",{type:n,className:R(Qb({sizing:t,className:e})),ref:o,...r}));or.displayName="Input";const Zb=(e,t)=>{const n=e.replace(/\D/g,"");let r="",o=0,a=0;for(;o<t.length&&a<n.length;)t[o]==="0"?(r+=n[a],a++):r+=t[o],o++;return r},ar=c.forwardRef(({className:e,leftIcon:t,rightIcon:n,mask:r,onChange:o,...a},s)=>{const i=u=>{const d=u.target;if(r){const f=Zb(d.value,r);d.value=f}o==null||o(u)};return l.jsxs("div",{className:"relative w-full",children:[t&&l.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:t}),l.jsx(or,{className:R(t&&"pl-8",n&&"pr-8",e),ref:s,onInput:i,...a}),n&&l.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:n})]})});ar.displayName="AdaptiveInput";function Jb(e,t=globalThis==null?void 0:globalThis.document){const n=we(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ey="DismissableLayer",Lo="dismissableLayer.update",ty="dismissableLayer.pointerDownOutside",ny="dismissableLayer.focusOutside",Ji,el=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),It=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...u}=e,d=c.useContext(el),[f,p]=c.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),h=oe(t,T=>p(T)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),w=f?g.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,E=w>=y,S=ay(T=>{const j=T.target,D=[...d.branches].some(z=>z.contains(j));!E||D||(o==null||o(T),s==null||s(T),T.defaultPrevented||i==null||i())},v),M=sy(T=>{const j=T.target;[...d.branches].some(z=>z.contains(j))||(a==null||a(T),s==null||s(T),T.defaultPrevented||i==null||i())},v);return Jb(T=>{w===d.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&i&&(T.preventDefault(),i()))},v),c.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Ji=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),tl(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Ji)}},[f,v,n,d]),c.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),tl())},[f,d]),c.useEffect(()=>{const T=()=>m({});return document.addEventListener(Lo,T),()=>document.removeEventListener(Lo,T)},[]),l.jsx($.div,{...u,ref:h,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,M.onFocusCapture),onBlurCapture:O(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,S.onPointerDownCapture)})});It.displayName=ey;var ry="DismissableLayerBranch",oy=c.forwardRef((e,t)=>{const n=c.useContext(el),r=c.useRef(null),o=oe(t,r);return c.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx($.div,{...e,ref:o})});oy.displayName=ry;function ay(e,t=globalThis==null?void 0:globalThis.document){const n=we(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let u=function(){nl(ty,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function sy(e,t=globalThis==null?void 0:globalThis.document){const n=we(e),r=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!r.current&&nl(ny,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function tl(){const e=new CustomEvent(Lo);document.dispatchEvent(e)}function nl(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Jn(o,a):o.dispatchEvent(a)}var $o="focusScope.autoFocusOnMount",Fo="focusScope.autoFocusOnUnmount",rl={bubbles:!1,cancelable:!0},iy="FocusScope",Nn=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,u]=c.useState(null),d=we(o),f=we(a),p=c.useRef(null),v=oe(t,g=>u(g)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let g=function(x){if(m.paused||!i)return;const E=x.target;i.contains(E)?p.current=E:yt(p.current,{select:!0})},b=function(x){if(m.paused||!i)return;const E=x.relatedTarget;E!==null&&(i.contains(E)||yt(p.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&yt(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const w=new MutationObserver(y);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),w.disconnect()}}},[r,i,m.paused]),c.useEffect(()=>{if(i){sl.add(m);const g=document.activeElement;if(!i.contains(g)){const y=new CustomEvent($o,rl);i.addEventListener($o,d),i.dispatchEvent(y),y.defaultPrevented||(ly(my(ol(i)),{select:!0}),document.activeElement===g&&yt(i))}return()=>{i.removeEventListener($o,d),setTimeout(()=>{const y=new CustomEvent(Fo,rl);i.addEventListener(Fo,f),i.dispatchEvent(y),y.defaultPrevented||yt(g??document.body,{select:!0}),i.removeEventListener(Fo,f),sl.remove(m)},0)}}},[i,d,f,m]);const h=c.useCallback(g=>{if(!n&&!r||m.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(b&&y){const w=g.currentTarget,[x,E]=cy(w);x&&E?!g.shiftKey&&y===E?(g.preventDefault(),n&&yt(x,{select:!0})):g.shiftKey&&y===x&&(g.preventDefault(),n&&yt(E,{select:!0})):y===w&&g.preventDefault()}},[n,r,m.paused]);return l.jsx($.div,{tabIndex:-1,...s,ref:v,onKeyDown:h})});Nn.displayName=iy;function ly(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(yt(r,{select:t}),document.activeElement!==n)return}function cy(e){const t=ol(e),n=al(t,e),r=al(t.reverse(),e);return[n,r]}function ol(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function al(e,t){for(const n of e)if(!uy(n,{upTo:t}))return n}function uy(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 dy(e){return e instanceof HTMLInputElement&&"select"in e}function yt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&dy(e)&&t&&e.select()}}var sl=fy();function fy(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=il(e,t),e.unshift(t)},remove(t){var n;e=il(e,t),(n=e[0])==null||n.resume()}}}function il(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function my(e){return e.filter(t=>t.tagName!=="A")}var py="Portal",Sn=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=c.useState(!1);xe(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Yn.createPortal(l.jsx($.div,{...r,ref:t}),s):null});Sn.displayName=py;var Bo=0;function sr(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ll()),document.body.insertAdjacentElement("beforeend",e[1]??ll()),Bo++,()=>{Bo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Bo--}},[])}function ll(){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 Je=function(){return Je=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Je.apply(this,arguments)};function cl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function hy(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var ir="right-scroll-bar-position",lr="width-before-scroll-bar",gy="with-scroll-bars-hidden",vy="--removed-body-scroll-bar-size";function Wo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function by(e,t){var n=P.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var yy=typeof window<"u"?c.useLayoutEffect:c.useEffect,ul=new WeakMap;function wy(e,t){var n=by(null,function(r){return e.forEach(function(o){return Wo(o,r)})});return yy(function(){var r=ul.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Wo(i,null)}),a.forEach(function(i){o.has(i)||Wo(i,s)})}ul.set(n,e)},[e]),n}function xy(e){return e}function Cy(e,t){t===void 0&&(t=xy);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var u=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),n}}}};return o}function Ny(e){e===void 0&&(e={});var t=Cy(null);return t.options=Je({async:!0,ssr:!1},e),t}var dl=function(e){var t=e.sideCar,n=cl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,Je({},n))};dl.isSideCarExport=!0;function Sy(e,t){return e.useMedium(t),dl}var fl=Ny(),zo=function(){},cr=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:zo,onWheelCapture:zo,onTouchMoveCapture:zo}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,v=e.sideCar,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,w=e.gapMode,x=cl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,S=wy([n,t]),M=Je(Je({},x),o);return c.createElement(c.Fragment,null,f&&c.createElement(E,{sideCar:fl,removeScrollBar:d,shards:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:w}),s?c.cloneElement(c.Children.only(i),Je(Je({},M),{ref:S})):c.createElement(y,Je({},M,{className:u,ref:S}),i))});cr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},cr.classNames={fullWidth:lr,zeroRight:ir};var Ey=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Py(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ey();return t&&e.setAttribute("nonce",t),e}function My(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ty(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ay=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Py())&&(My(t,n),Ty(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ry=function(){var e=Ay();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ml=function(){var e=Ry(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ky={left:0,top:0,right:0,gap:0},Vo=function(e){return parseInt(e||"",10)||0},jy=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Vo(n),Vo(r),Vo(o)]},Dy=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ky;var t=jy(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Iy=ml(),Xt="data-scroll-locked",_y=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
192
- .`.concat(gy,` {
191
+ */const er=de("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ri=e=>{const{notFoundText:t,notFoundAction:n,icon:r,className:o}=e;return l.jsxs("div",{className:R("flex flex-col gap-4 items-center bg-gray-200 rounded-lg p-6 justify-center",o),children:[r||l.jsx(lb,{size:45}),l.jsxs("div",{className:"text-lg font-medium m-0",children:[t,n||null]})]})};function xb(e,t){const n=c.createContext(t),r=a=>{const{children:s,...i}=a,u=c.useMemo(()=>i,Object.values(i));return l.jsx(n.Provider,{value:u,children:s})};r.displayName=e+"Provider";function o(a){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function ye(e,t=[]){let n=[];function r(a,s){const i=c.createContext(s),u=n.length;n=[...n,s];const d=p=>{var y;const{scope:v,children:m,...h}=p,g=((y=v==null?void 0:v[e])==null?void 0:y[u])||i,b=c.useMemo(()=>h,Object.values(h));return l.jsx(g.Provider,{value:b,children:m})};d.displayName=a+"Provider";function f(p,v){var g;const m=((g=v==null?void 0:v[e])==null?void 0:g[u])||i,h=c.useContext(m);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=n.map(s=>c.createContext(s));return function(i){const u=(i==null?void 0:i[e])||a;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return o.scopeName=e,[r,Cb(o,...t)]}function Cb(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:u,scopeName:d})=>{const p=u(a)[`__scope${d}`];return{...i,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function ki(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nn(...e){return t=>{let n=!1;const r=e.map(o=>{const a=ki(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():ki(e[o],null)}}}}function oe(...e){return c.useCallback(Nn(...e),e)}var lt=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),a=o.find(Nb);if(a){const s=a.props.children,i=o.map(u=>u===a?c.Children.count(s)>1?c.Children.only(null):c.isValidElement(s)?s.props.children:null:u);return l.jsx(Ao,{...r,ref:t,children:c.isValidElement(s)?c.cloneElement(s,void 0,i):null})}return l.jsx(Ao,{...r,ref:t,children:n})});lt.displayName="Slot";var Ao=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const o=Eb(n);return c.cloneElement(n,{...Sb(r,n.props),ref:t?Nn(t,o):o})}return c.Children.count(n)>1?c.Children.only(null):null});Ao.displayName="SlotClone";var Ro=({children:e})=>l.jsx(l.Fragment,{children:e});function Nb(e){return c.isValidElement(e)&&e.type===Ro}function Sb(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{a(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Eb(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Xt(e){const t=e+"CollectionProvider",[n,r]=ye(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:h,children:g}=m,b=P.useRef(null),y=P.useRef(new Map).current;return l.jsx(o,{scope:h,itemMap:y,collectionRef:b,children:g})};s.displayName=t;const i=e+"CollectionSlot",u=P.forwardRef((m,h)=>{const{scope:g,children:b}=m,y=a(i,g),w=oe(h,y.collectionRef);return l.jsx(lt,{ref:w,children:b})});u.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=P.forwardRef((m,h)=>{const{scope:g,children:b,...y}=m,w=P.useRef(null),x=oe(h,w),E=a(d,g);return P.useEffect(()=>(E.itemMap.set(w,{ref:w,...y}),()=>void E.itemMap.delete(w))),l.jsx(lt,{[f]:"",ref:x,children:b})});p.displayName=d;function v(m){const h=a(e+"CollectionConsumer",m);return P.useCallback(()=>{const b=h.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((E,S)=>y.indexOf(E.ref.current)-y.indexOf(S.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},v,r]}function O(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function we(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ce({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Pb({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=we(n),u=c.useCallback(d=>{if(a){const p=typeof d=="function"?d(e):d;p!==e&&i(p)}else o(d)},[a,e,o,i]);return[s,u]}function Pb({defaultProp:e,onChange:t}){const n=c.useState(e),[r]=n,o=c.useRef(r),a=we(t);return c.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}var Mb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$=Mb.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:a,...s}=r,i=a?lt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(i,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function tr(e,t){e&&qn.flushSync(()=>e.dispatchEvent(t))}var xe=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{};function Tb(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Ne=e=>{const{present:t,children:n}=e,r=Ab(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),a=oe(r.ref,Rb(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:a}):null};Ne.displayName="Presence";function Ab(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),a=c.useRef("none"),s=e?"mounted":"unmounted",[i,u]=Tb(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const d=nr(r.current);a.current=i==="mounted"?d:"none"},[i]),xe(()=>{const d=r.current,f=o.current;if(f!==e){const v=a.current,m=nr(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&v!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),xe(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=m=>{const g=nr(r.current).includes(m.animationName);if(m.target===t&&g&&(u("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},v=m=>{m.target===t&&(a.current=nr(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(d=>{d&&(r.current=getComputedStyle(d)),n(d)},[])}}function nr(e){return(e==null?void 0:e.animationName)||"none"}function Rb(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var kb=c.useId||(()=>{}),jb=0;function he(e){const[t,n]=c.useState(kb());return xe(()=>{n(r=>r??String(jb++))},[e]),t?`radix-${t}`:""}var ko="Collapsible",[Db,ji]=ye(ko),[Ib,jo]=Db(ko),Di=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[u=!1,d]=Ce({prop:r,defaultProp:o,onChange:s});return l.jsx(Ib,{scope:n,disabled:a,contentId:he(),open:u,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),children:l.jsx($.div,{"data-state":Io(u),"data-disabled":a?"":void 0,...i,ref:t})})});Di.displayName=ko;var Ii="CollapsibleTrigger",_i=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=jo(Ii,n);return l.jsx($.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Io(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:O(e.onClick,o.onOpenToggle)})});_i.displayName=Ii;var Do="CollapsibleContent",Oi=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=jo(Do,e.__scopeCollapsible);return l.jsx(Ne,{present:n||o.open,children:({present:a})=>l.jsx(_b,{...r,ref:t,present:a})})});Oi.displayName=Do;var _b=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=jo(Do,n),[i,u]=c.useState(r),d=c.useRef(null),f=oe(t,d),p=c.useRef(0),v=p.current,m=c.useRef(0),h=m.current,g=s.open||i,b=c.useRef(g),y=c.useRef(void 0);return c.useEffect(()=>{const w=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(w)},[]),xe(()=>{const w=d.current;if(w){y.current=y.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const x=w.getBoundingClientRect();p.current=x.height,m.current=x.width,b.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),u(r)}},[s.open,r]),l.jsx($.div,{"data-state":Io(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...a,ref:f,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:g&&o})});function Io(e){return e?"open":"closed"}var Ob=Di,Lb=_i,$b=Oi,Fb=c.createContext(void 0);function yt(e){const t=c.useContext(Fb);return e||t||"ltr"}var ct="Accordion",Bb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[_o,Wb,zb]=Xt(ct),[rr,ZE]=ye(ct,[zb,ji]),Oo=ji(),Li=P.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return l.jsx(_o.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?l.jsx(Ub,{...a,ref:t}):l.jsx(Gb,{...o,ref:t})})});Li.displayName=ct;var[$i,Vb]=rr(ct),[Fi,Hb]=rr(ct,{collapsible:!1}),Gb=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[i,u]=Ce({prop:n,defaultProp:r,onChange:o});return l.jsx($i,{scope:e.__scopeAccordion,value:i?[i]:[],onItemOpen:u,onItemClose:P.useCallback(()=>a&&u(""),[a,u]),children:l.jsx(Fi,{scope:e.__scopeAccordion,collapsible:a,children:l.jsx(Bi,{...s,ref:t})})})}),Ub=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s=[],i]=Ce({prop:n,defaultProp:r,onChange:o}),u=P.useCallback(f=>i((p=[])=>[...p,f]),[i]),d=P.useCallback(f=>i((p=[])=>p.filter(v=>v!==f)),[i]);return l.jsx($i,{scope:e.__scopeAccordion,value:s,onItemOpen:u,onItemClose:d,children:l.jsx(Fi,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(Bi,{...a,ref:t})})})}),[Yb,or]=rr(ct),Bi=P.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,i=P.useRef(null),u=oe(i,t),d=Wb(n),p=yt(o)==="ltr",v=O(e.onKeyDown,m=>{var j;if(!Bb.includes(m.key))return;const h=m.target,g=d().filter(D=>{var z;return!((z=D.ref.current)!=null&&z.disabled)}),b=g.findIndex(D=>D.ref.current===h),y=g.length;if(b===-1)return;m.preventDefault();let w=b;const x=0,E=y-1,S=()=>{w=b+1,w>E&&(w=x)},M=()=>{w=b-1,w<x&&(w=E)};switch(m.key){case"Home":w=x;break;case"End":w=E;break;case"ArrowRight":a==="horizontal"&&(p?S():M());break;case"ArrowDown":a==="vertical"&&S();break;case"ArrowLeft":a==="horizontal"&&(p?M():S());break;case"ArrowUp":a==="vertical"&&M();break}const T=w%y;(j=g[T].ref.current)==null||j.focus()});return l.jsx(Yb,{scope:n,disabled:r,direction:o,orientation:a,children:l.jsx(_o.Slot,{scope:n,children:l.jsx($.div,{...s,"data-orientation":a,ref:u,onKeyDown:r?void 0:v})})})}),ar="AccordionItem",[Kb,Lo]=rr(ar),Wi=P.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=or(ar,n),s=Vb(ar,n),i=Oo(n),u=he(),d=r&&s.value.includes(r)||!1,f=a.disabled||e.disabled;return l.jsx(Kb,{scope:n,open:d,disabled:f,triggerId:u,children:l.jsx(Ob,{"data-orientation":a.orientation,"data-state":Yi(d),...i,...o,ref:t,disabled:f,open:d,onOpenChange:p=>{p?s.onItemOpen(r):s.onItemClose(r)}})})});Wi.displayName=ar;var zi="AccordionHeader",Vi=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=or(ct,n),a=Lo(zi,n);return l.jsx($.h3,{"data-orientation":o.orientation,"data-state":Yi(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});Vi.displayName=zi;var $o="AccordionTrigger",Hi=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=or(ct,n),a=Lo($o,n),s=Hb($o,n),i=Oo(n);return l.jsx(_o.ItemSlot,{scope:n,children:l.jsx(Lb,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...r,ref:t})})});Hi.displayName=$o;var Gi="AccordionContent",Ui=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=or(ct,n),a=Lo(Gi,n),s=Oo(n);return l.jsx($b,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Ui.displayName=Gi;function Yi(e){return e?"open":"closed"}var qb=Li,Xb=Wi,Qb=Vi,Ki=Hi,qi=Ui;const Zb=qb,Xi=c.forwardRef(({className:e,...t},n)=>l.jsx(Xb,{ref:n,className:R("border-b",e),...t}));Xi.displayName="AccordionItem";const Qi=c.forwardRef(({className:e,children:t,...n},r)=>l.jsx(Qb,{className:"flex",children:l.jsxs(Ki,{ref:r,className:R("text-base flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,l.jsx(qt,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Qi.displayName=Ki.displayName;const Zi=c.forwardRef(({className:e,children:t,...n},r)=>l.jsx(qi,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:l.jsx("div",{className:R("pb-4 pt-0",e),children:t})}));Zi.displayName=qi.displayName;const Ji=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,el=po,It=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return el(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=n==null?void 0:n[d],p=a==null?void 0:a[d];if(f===null)return null;const v=Ji(f)||Ji(p);return o[d][v]}),i=n&&Object.entries(n).reduce((d,f)=>{let[p,v]=f;return v===void 0||(d[p]=v),d},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:p,className:v,...m}=f;return Object.entries(m).every(h=>{let[g,b]=h;return Array.isArray(b)?b.includes({...a,...i}[g]):{...a,...i}[g]===b})?[...d,p,v]:d},[]);return el(e,s,u,n==null?void 0:n.class,n==null?void 0:n.className)},Jb=It("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{sizing:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4",xl:"h-14 text-lg px-5","2xl":"h-16 text-xl px-6"}},defaultVariants:{sizing:"md"}}),sr=c.forwardRef(({className:e,sizing:t,type:n,...r},o)=>l.jsx("input",{type:n,className:R(Jb({sizing:t,className:e})),ref:o,...r}));sr.displayName="Input";const ey=(e,t)=>{const n=e.replace(/\D/g,"");let r="",o=0,a=0;for(;o<t.length&&a<n.length;)t[o]==="0"?(r+=n[a],a++):r+=t[o],o++;return r},ir=c.forwardRef(({className:e,leftIcon:t,rightIcon:n,mask:r,onChange:o,...a},s)=>{const i=u=>{const d=u.target;if(r){const f=ey(d.value,r);d.value=f}o==null||o(u)};return l.jsxs("div",{className:"relative w-full",children:[t&&l.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:t}),l.jsx(sr,{className:R(t&&"pl-8",n&&"pr-8",e),ref:s,onInput:i,...a}),n&&l.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:n})]})});ir.displayName="AdaptiveInput";function ty(e,t=globalThis==null?void 0:globalThis.document){const n=we(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ny="DismissableLayer",Fo="dismissableLayer.update",ry="dismissableLayer.pointerDownOutside",oy="dismissableLayer.focusOutside",tl,nl=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_t=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...u}=e,d=c.useContext(nl),[f,p]=c.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),h=oe(t,T=>p(T)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),w=f?g.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,E=w>=y,S=iy(T=>{const j=T.target,D=[...d.branches].some(z=>z.contains(j));!E||D||(o==null||o(T),s==null||s(T),T.defaultPrevented||i==null||i())},v),M=ly(T=>{const j=T.target;[...d.branches].some(z=>z.contains(j))||(a==null||a(T),s==null||s(T),T.defaultPrevented||i==null||i())},v);return ty(T=>{w===d.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&i&&(T.preventDefault(),i()))},v),c.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(tl=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),rl(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=tl)}},[f,v,n,d]),c.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),rl())},[f,d]),c.useEffect(()=>{const T=()=>m({});return document.addEventListener(Fo,T),()=>document.removeEventListener(Fo,T)},[]),l.jsx($.div,{...u,ref:h,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,M.onFocusCapture),onBlurCapture:O(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,S.onPointerDownCapture)})});_t.displayName=ny;var ay="DismissableLayerBranch",sy=c.forwardRef((e,t)=>{const n=c.useContext(nl),r=c.useRef(null),o=oe(t,r);return c.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx($.div,{...e,ref:o})});sy.displayName=ay;function iy(e,t=globalThis==null?void 0:globalThis.document){const n=we(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let u=function(){ol(ry,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ly(e,t=globalThis==null?void 0:globalThis.document){const n=we(e),r=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!r.current&&ol(oy,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function rl(){const e=new CustomEvent(Fo);document.dispatchEvent(e)}function ol(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?tr(o,a):o.dispatchEvent(a)}var Bo="focusScope.autoFocusOnMount",Wo="focusScope.autoFocusOnUnmount",al={bubbles:!1,cancelable:!0},cy="FocusScope",Sn=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,u]=c.useState(null),d=we(o),f=we(a),p=c.useRef(null),v=oe(t,g=>u(g)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let g=function(x){if(m.paused||!i)return;const E=x.target;i.contains(E)?p.current=E:wt(p.current,{select:!0})},b=function(x){if(m.paused||!i)return;const E=x.relatedTarget;E!==null&&(i.contains(E)||wt(p.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&wt(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const w=new MutationObserver(y);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),w.disconnect()}}},[r,i,m.paused]),c.useEffect(()=>{if(i){ll.add(m);const g=document.activeElement;if(!i.contains(g)){const y=new CustomEvent(Bo,al);i.addEventListener(Bo,d),i.dispatchEvent(y),y.defaultPrevented||(uy(hy(sl(i)),{select:!0}),document.activeElement===g&&wt(i))}return()=>{i.removeEventListener(Bo,d),setTimeout(()=>{const y=new CustomEvent(Wo,al);i.addEventListener(Wo,f),i.dispatchEvent(y),y.defaultPrevented||wt(g??document.body,{select:!0}),i.removeEventListener(Wo,f),ll.remove(m)},0)}}},[i,d,f,m]);const h=c.useCallback(g=>{if(!n&&!r||m.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(b&&y){const w=g.currentTarget,[x,E]=dy(w);x&&E?!g.shiftKey&&y===E?(g.preventDefault(),n&&wt(x,{select:!0})):g.shiftKey&&y===x&&(g.preventDefault(),n&&wt(E,{select:!0})):y===w&&g.preventDefault()}},[n,r,m.paused]);return l.jsx($.div,{tabIndex:-1,...s,ref:v,onKeyDown:h})});Sn.displayName=cy;function uy(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wt(r,{select:t}),document.activeElement!==n)return}function dy(e){const t=sl(e),n=il(t,e),r=il(t.reverse(),e);return[n,r]}function sl(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function il(e,t){for(const n of e)if(!fy(n,{upTo:t}))return n}function fy(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 my(e){return e instanceof HTMLInputElement&&"select"in e}function wt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&my(e)&&t&&e.select()}}var ll=py();function py(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=cl(e,t),e.unshift(t)},remove(t){var n;e=cl(e,t),(n=e[0])==null||n.resume()}}}function cl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function hy(e){return e.filter(t=>t.tagName!=="A")}var gy="Portal",En=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=c.useState(!1);xe(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Kn.createPortal(l.jsx($.div,{...r,ref:t}),s):null});En.displayName=gy;var zo=0;function lr(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ul()),document.body.insertAdjacentElement("beforeend",e[1]??ul()),zo++,()=>{zo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),zo--}},[])}function ul(){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 Je=function(){return Je=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Je.apply(this,arguments)};function dl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function vy(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var cr="right-scroll-bar-position",ur="width-before-scroll-bar",by="with-scroll-bars-hidden",yy="--removed-body-scroll-bar-size";function Vo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function wy(e,t){var n=P.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var xy=typeof window<"u"?c.useLayoutEffect:c.useEffect,fl=new WeakMap;function Cy(e,t){var n=wy(null,function(r){return e.forEach(function(o){return Vo(o,r)})});return xy(function(){var r=fl.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Vo(i,null)}),a.forEach(function(i){o.has(i)||Vo(i,s)})}fl.set(n,e)},[e]),n}function Ny(e){return e}function Sy(e,t){t===void 0&&(t=Ny);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var u=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),n}}}};return o}function Ey(e){e===void 0&&(e={});var t=Sy(null);return t.options=Je({async:!0,ssr:!1},e),t}var ml=function(e){var t=e.sideCar,n=dl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,Je({},n))};ml.isSideCarExport=!0;function Py(e,t){return e.useMedium(t),ml}var pl=Ey(),Ho=function(){},dr=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Ho,onWheelCapture:Ho,onTouchMoveCapture:Ho}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,v=e.sideCar,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,w=e.gapMode,x=dl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,S=Cy([n,t]),M=Je(Je({},x),o);return c.createElement(c.Fragment,null,f&&c.createElement(E,{sideCar:pl,removeScrollBar:d,shards:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:w}),s?c.cloneElement(c.Children.only(i),Je(Je({},M),{ref:S})):c.createElement(y,Je({},M,{className:u,ref:S}),i))});dr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},dr.classNames={fullWidth:ur,zeroRight:cr};var My=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ty(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=My();return t&&e.setAttribute("nonce",t),e}function Ay(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ry(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ky=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ty())&&(Ay(t,n),Ry(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jy=function(){var e=ky();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},hl=function(){var e=jy(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Dy={left:0,top:0,right:0,gap:0},Go=function(e){return parseInt(e||"",10)||0},Iy=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Go(n),Go(r),Go(o)]},_y=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Dy;var t=Iy(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Oy=hl(),Qt="data-scroll-locked",Ly=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
192
+ .`.concat(by,` {
193
193
  overflow: hidden `).concat(r,`;
194
194
  padding-right: `).concat(i,"px ").concat(r,`;
195
195
  }
196
- body[`).concat(Xt,`] {
196
+ body[`).concat(Qt,`] {
197
197
  overflow: hidden `).concat(r,`;
198
198
  overscroll-behavior: contain;
199
199
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -206,39 +206,39 @@ Check the top-level render call using <`+C+">."),U}var x=P,E=Symbol.for("react.t
206
206
  `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
207
207
  }
208
208
 
209
- .`).concat(ir,` {
209
+ .`).concat(cr,` {
210
210
  right: `).concat(i,"px ").concat(r,`;
211
211
  }
212
212
 
213
- .`).concat(lr,` {
213
+ .`).concat(ur,` {
214
214
  margin-right: `).concat(i,"px ").concat(r,`;
215
215
  }
216
216
 
217
- .`).concat(ir," .").concat(ir,` {
217
+ .`).concat(cr," .").concat(cr,` {
218
218
  right: 0 `).concat(r,`;
219
219
  }
220
220
 
221
- .`).concat(lr," .").concat(lr,` {
221
+ .`).concat(ur," .").concat(ur,` {
222
222
  margin-right: 0 `).concat(r,`;
223
223
  }
224
224
 
225
- body[`).concat(Xt,`] {
226
- `).concat(vy,": ").concat(i,`px;
225
+ body[`).concat(Qt,`] {
226
+ `).concat(yy,": ").concat(i,`px;
227
227
  }
228
- `)},pl=function(){var e=parseInt(document.body.getAttribute(Xt)||"0",10);return isFinite(e)?e:0},Oy=function(){c.useEffect(function(){return document.body.setAttribute(Xt,(pl()+1).toString()),function(){var e=pl()-1;e<=0?document.body.removeAttribute(Xt):document.body.setAttribute(Xt,e.toString())}},[])},Ly=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Oy();var a=c.useMemo(function(){return Dy(o)},[o]);return c.createElement(Iy,{styles:_y(a,!t,o,n?"":"!important")})},Ho=!1;if(typeof window<"u")try{var ur=Object.defineProperty({},"passive",{get:function(){return Ho=!0,!0}});window.addEventListener("test",ur,ur),window.removeEventListener("test",ur,ur)}catch{Ho=!1}var Qt=Ho?{passive:!1}:!1,$y=function(e){return e.tagName==="TEXTAREA"},hl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!$y(e)&&n[t]==="visible")},Fy=function(e){return hl(e,"overflowY")},By=function(e){return hl(e,"overflowX")},gl=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=vl(e,r);if(o){var a=bl(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Wy=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},zy=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},vl=function(e,t){return e==="v"?Fy(t):By(t)},bl=function(e,t){return e==="v"?Wy(t):zy(t)},Vy=function(e,t){return e==="h"&&t==="rtl"?-1:1},Hy=function(e,t,n,r,o){var a=Vy(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,u=t.contains(i),d=!1,f=s>0,p=0,v=0;do{var m=bl(e,i),h=m[0],g=m[1],b=m[2],y=g-b-a*h;(h||y)&&vl(e,i)&&(p+=y,v+=h),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(f&&(Math.abs(p)<1||!o)||!f&&(Math.abs(v)<1||!o))&&(d=!0),d},dr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yl=function(e){return[e.deltaX,e.deltaY]},wl=function(e){return e&&"current"in e?e.current:e},Gy=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Uy=function(e){return`
228
+ `)},gl=function(){var e=parseInt(document.body.getAttribute(Qt)||"0",10);return isFinite(e)?e:0},$y=function(){c.useEffect(function(){return document.body.setAttribute(Qt,(gl()+1).toString()),function(){var e=gl()-1;e<=0?document.body.removeAttribute(Qt):document.body.setAttribute(Qt,e.toString())}},[])},Fy=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;$y();var a=c.useMemo(function(){return _y(o)},[o]);return c.createElement(Oy,{styles:Ly(a,!t,o,n?"":"!important")})},Uo=!1;if(typeof window<"u")try{var fr=Object.defineProperty({},"passive",{get:function(){return Uo=!0,!0}});window.addEventListener("test",fr,fr),window.removeEventListener("test",fr,fr)}catch{Uo=!1}var Zt=Uo?{passive:!1}:!1,By=function(e){return e.tagName==="TEXTAREA"},vl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!By(e)&&n[t]==="visible")},Wy=function(e){return vl(e,"overflowY")},zy=function(e){return vl(e,"overflowX")},bl=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=yl(e,r);if(o){var a=wl(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Vy=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Hy=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},yl=function(e,t){return e==="v"?Wy(t):zy(t)},wl=function(e,t){return e==="v"?Vy(t):Hy(t)},Gy=function(e,t){return e==="h"&&t==="rtl"?-1:1},Uy=function(e,t,n,r,o){var a=Gy(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,u=t.contains(i),d=!1,f=s>0,p=0,v=0;do{var m=wl(e,i),h=m[0],g=m[1],b=m[2],y=g-b-a*h;(h||y)&&yl(e,i)&&(p+=y,v+=h),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(f&&(Math.abs(p)<1||!o)||!f&&(Math.abs(v)<1||!o))&&(d=!0),d},mr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xl=function(e){return[e.deltaX,e.deltaY]},Cl=function(e){return e&&"current"in e?e.current:e},Yy=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ky=function(e){return`
229
229
  .block-interactivity-`.concat(e,` {pointer-events: none;}
230
230
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
231
- `)},Yy=0,Zt=[];function Ky(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(Yy++)[0],a=c.useState(ml)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=hy([e.lockRef.current],(e.shards||[]).map(wl),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var y=dr(g),w=n.current,x="deltaX"in g?g.deltaX:w[0]-y[0],E="deltaY"in g?g.deltaY:w[1]-y[1],S,M=g.target,T=Math.abs(x)>Math.abs(E)?"h":"v";if("touches"in g&&T==="h"&&M.type==="range")return!1;var j=gl(T,M);if(!j)return!0;if(j?S=T:(S=T==="v"?"h":"v",j=gl(T,M)),!j)return!1;if(!r.current&&"changedTouches"in g&&(x||E)&&(r.current=S),!S)return!0;var D=r.current||S;return Hy(D,b,g,D==="h"?x:E,!0)},[]),u=c.useCallback(function(g){var b=g;if(!(!Zt.length||Zt[Zt.length-1]!==a)){var y="deltaY"in b?yl(b):dr(b),w=t.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&Gy(S.delta,y)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(wl).filter(Boolean).filter(function(S){return S.contains(b.target)}),E=x.length>0?i(b,x[0]):!s.current.noIsolation;E&&b.cancelable&&b.preventDefault()}}},[]),d=c.useCallback(function(g,b,y,w){var x={name:g,delta:b,target:y,should:w,shadowParent:qy(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(E){return E!==x})},1)},[]),f=c.useCallback(function(g){n.current=dr(g),r.current=void 0},[]),p=c.useCallback(function(g){d(g.type,yl(g),g.target,i(g,e.lockRef.current))},[]),v=c.useCallback(function(g){d(g.type,dr(g),g.target,i(g,e.lockRef.current))},[]);c.useEffect(function(){return Zt.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Qt),document.addEventListener("touchmove",u,Qt),document.addEventListener("touchstart",f,Qt),function(){Zt=Zt.filter(function(g){return g!==a}),document.removeEventListener("wheel",u,Qt),document.removeEventListener("touchmove",u,Qt),document.removeEventListener("touchstart",f,Qt)}},[]);var m=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(a,{styles:Uy(o)}):null,m?c.createElement(Ly,{gapMode:e.gapMode}):null)}function qy(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Xy=Sy(fl,Ky);var En=c.forwardRef(function(e,t){return c.createElement(cr,Je({},e,{ref:t,sideCar:Xy}))});En.classNames=cr.classNames;var Qy=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Jt=new WeakMap,fr=new WeakMap,mr={},Go=0,xl=function(e){return e&&(e.host||xl(e.parentNode))},Zy=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=xl(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Jy=function(e,t,n,r){var o=Zy(t,Array.isArray(e)?e:[e]);mr[n]||(mr[n]=new WeakMap);var a=mr[n],s=[],i=new Set,u=new Set(o),d=function(p){!p||i.has(p)||(i.add(p),d(p.parentNode))};o.forEach(d);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(v){if(i.has(v))f(v);else try{var m=v.getAttribute(r),h=m!==null&&m!=="false",g=(Jt.get(v)||0)+1,b=(a.get(v)||0)+1;Jt.set(v,g),a.set(v,b),s.push(v),g===1&&h&&fr.set(v,!0),b===1&&v.setAttribute(n,"true"),h||v.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",v,y)}})};return f(t),i.clear(),Go++,function(){s.forEach(function(p){var v=Jt.get(p)-1,m=a.get(p)-1;Jt.set(p,v),a.set(p,m),v||(fr.has(p)||p.removeAttribute(r),fr.delete(p)),m||p.removeAttribute(n)}),Go--,Go||(Jt=new WeakMap,Jt=new WeakMap,fr=new WeakMap,mr={})}},pr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Qy(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Jy(r,o,n,"aria-hidden")):function(){return null}},Uo="Dialog",[Cl,Nl]=ye(Uo),[ew,He]=Cl(Uo),Sl=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=c.useRef(null),u=c.useRef(null),[d=!1,f]=Ce({prop:r,defaultProp:o,onChange:a});return l.jsx(ew,{scope:t,triggerRef:i,contentRef:u,contentId:he(),titleId:he(),descriptionId:he(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:s,children:n})};Sl.displayName=Uo;var El="DialogTrigger",Pl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(El,n),a=oe(t,o.triggerRef);return l.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":qo(o.open),...r,ref:a,onClick:O(e.onClick,o.onOpenToggle)})});Pl.displayName=El;var Yo="DialogPortal",[tw,Ml]=Cl(Yo,{forceMount:void 0}),Tl=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=He(Yo,t);return l.jsx(tw,{scope:t,forceMount:n,children:c.Children.map(r,s=>l.jsx(Ne,{present:n||a.open,children:l.jsx(Sn,{asChild:!0,container:o,children:s})}))})};Tl.displayName=Yo;var hr="DialogOverlay",Al=c.forwardRef((e,t)=>{const n=Ml(hr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=He(hr,e.__scopeDialog);return a.modal?l.jsx(Ne,{present:r||a.open,children:l.jsx(nw,{...o,ref:t})}):null});Al.displayName=hr;var nw=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(hr,n);return l.jsx(En,{as:lt,allowPinchZoom:!0,shards:[o.contentRef],children:l.jsx($.div,{"data-state":qo(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),_t="DialogContent",Rl=c.forwardRef((e,t)=>{const n=Ml(_t,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=He(_t,e.__scopeDialog);return l.jsx(Ne,{present:r||a.open,children:a.modal?l.jsx(rw,{...o,ref:t}):l.jsx(ow,{...o,ref:t})})});Rl.displayName=_t;var rw=c.forwardRef((e,t)=>{const n=He(_t,e.__scopeDialog),r=c.useRef(null),o=oe(t,n.contentRef,r);return c.useEffect(()=>{const a=r.current;if(a)return pr(a)},[]),l.jsx(kl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:O(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:O(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:O(e.onFocusOutside,a=>a.preventDefault())})}),ow=c.forwardRef((e,t)=>{const n=He(_t,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return l.jsx(kl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),kl=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=He(_t,n),u=c.useRef(null),d=oe(t,u);return sr(),l.jsxs(l.Fragment,{children:[l.jsx(Nn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(It,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":qo(i.open),...s,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(sw,{titleId:i.titleId}),l.jsx(lw,{contentRef:u,descriptionId:i.descriptionId})]})]})}),Ko="DialogTitle",jl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Ko,n);return l.jsx($.h2,{id:o.titleId,...r,ref:t})});jl.displayName=Ko;var Dl="DialogDescription",Il=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Dl,n);return l.jsx($.p,{id:o.descriptionId,...r,ref:t})});Il.displayName=Dl;var _l="DialogClose",Ol=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(_l,n);return l.jsx($.button,{type:"button",...r,ref:t,onClick:O(e.onClick,()=>o.onOpenChange(!1))})});Ol.displayName=_l;function qo(e){return e?"open":"closed"}var Ll="DialogTitleWarning",[aw,$l]=yb(Ll,{contentName:_t,titleName:Ko,docsSlug:"dialog"}),sw=({titleId:e})=>{const t=$l(Ll),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
231
+ `)},qy=0,Jt=[];function Xy(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(qy++)[0],a=c.useState(hl)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=vy([e.lockRef.current],(e.shards||[]).map(Cl),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var y=mr(g),w=n.current,x="deltaX"in g?g.deltaX:w[0]-y[0],E="deltaY"in g?g.deltaY:w[1]-y[1],S,M=g.target,T=Math.abs(x)>Math.abs(E)?"h":"v";if("touches"in g&&T==="h"&&M.type==="range")return!1;var j=bl(T,M);if(!j)return!0;if(j?S=T:(S=T==="v"?"h":"v",j=bl(T,M)),!j)return!1;if(!r.current&&"changedTouches"in g&&(x||E)&&(r.current=S),!S)return!0;var D=r.current||S;return Uy(D,b,g,D==="h"?x:E,!0)},[]),u=c.useCallback(function(g){var b=g;if(!(!Jt.length||Jt[Jt.length-1]!==a)){var y="deltaY"in b?xl(b):mr(b),w=t.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&Yy(S.delta,y)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(Cl).filter(Boolean).filter(function(S){return S.contains(b.target)}),E=x.length>0?i(b,x[0]):!s.current.noIsolation;E&&b.cancelable&&b.preventDefault()}}},[]),d=c.useCallback(function(g,b,y,w){var x={name:g,delta:b,target:y,should:w,shadowParent:Qy(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(E){return E!==x})},1)},[]),f=c.useCallback(function(g){n.current=mr(g),r.current=void 0},[]),p=c.useCallback(function(g){d(g.type,xl(g),g.target,i(g,e.lockRef.current))},[]),v=c.useCallback(function(g){d(g.type,mr(g),g.target,i(g,e.lockRef.current))},[]);c.useEffect(function(){return Jt.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Zt),document.addEventListener("touchmove",u,Zt),document.addEventListener("touchstart",f,Zt),function(){Jt=Jt.filter(function(g){return g!==a}),document.removeEventListener("wheel",u,Zt),document.removeEventListener("touchmove",u,Zt),document.removeEventListener("touchstart",f,Zt)}},[]);var m=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(a,{styles:Ky(o)}):null,m?c.createElement(Fy,{gapMode:e.gapMode}):null)}function Qy(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Zy=Py(pl,Xy);var Pn=c.forwardRef(function(e,t){return c.createElement(dr,Je({},e,{ref:t,sideCar:Zy}))});Pn.classNames=dr.classNames;var Jy=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},en=new WeakMap,pr=new WeakMap,hr={},Yo=0,Nl=function(e){return e&&(e.host||Nl(e.parentNode))},ew=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Nl(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},tw=function(e,t,n,r){var o=ew(t,Array.isArray(e)?e:[e]);hr[n]||(hr[n]=new WeakMap);var a=hr[n],s=[],i=new Set,u=new Set(o),d=function(p){!p||i.has(p)||(i.add(p),d(p.parentNode))};o.forEach(d);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(v){if(i.has(v))f(v);else try{var m=v.getAttribute(r),h=m!==null&&m!=="false",g=(en.get(v)||0)+1,b=(a.get(v)||0)+1;en.set(v,g),a.set(v,b),s.push(v),g===1&&h&&pr.set(v,!0),b===1&&v.setAttribute(n,"true"),h||v.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",v,y)}})};return f(t),i.clear(),Yo++,function(){s.forEach(function(p){var v=en.get(p)-1,m=a.get(p)-1;en.set(p,v),a.set(p,m),v||(pr.has(p)||p.removeAttribute(r),pr.delete(p)),m||p.removeAttribute(n)}),Yo--,Yo||(en=new WeakMap,en=new WeakMap,pr=new WeakMap,hr={})}},gr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Jy(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),tw(r,o,n,"aria-hidden")):function(){return null}},Ko="Dialog",[Sl,El]=ye(Ko),[nw,He]=Sl(Ko),Pl=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=c.useRef(null),u=c.useRef(null),[d=!1,f]=Ce({prop:r,defaultProp:o,onChange:a});return l.jsx(nw,{scope:t,triggerRef:i,contentRef:u,contentId:he(),titleId:he(),descriptionId:he(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:s,children:n})};Pl.displayName=Ko;var Ml="DialogTrigger",Tl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Ml,n),a=oe(t,o.triggerRef);return l.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Qo(o.open),...r,ref:a,onClick:O(e.onClick,o.onOpenToggle)})});Tl.displayName=Ml;var qo="DialogPortal",[rw,Al]=Sl(qo,{forceMount:void 0}),Rl=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=He(qo,t);return l.jsx(rw,{scope:t,forceMount:n,children:c.Children.map(r,s=>l.jsx(Ne,{present:n||a.open,children:l.jsx(En,{asChild:!0,container:o,children:s})}))})};Rl.displayName=qo;var vr="DialogOverlay",kl=c.forwardRef((e,t)=>{const n=Al(vr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=He(vr,e.__scopeDialog);return a.modal?l.jsx(Ne,{present:r||a.open,children:l.jsx(ow,{...o,ref:t})}):null});kl.displayName=vr;var ow=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(vr,n);return l.jsx(Pn,{as:lt,allowPinchZoom:!0,shards:[o.contentRef],children:l.jsx($.div,{"data-state":Qo(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ot="DialogContent",jl=c.forwardRef((e,t)=>{const n=Al(Ot,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=He(Ot,e.__scopeDialog);return l.jsx(Ne,{present:r||a.open,children:a.modal?l.jsx(aw,{...o,ref:t}):l.jsx(sw,{...o,ref:t})})});jl.displayName=Ot;var aw=c.forwardRef((e,t)=>{const n=He(Ot,e.__scopeDialog),r=c.useRef(null),o=oe(t,n.contentRef,r);return c.useEffect(()=>{const a=r.current;if(a)return gr(a)},[]),l.jsx(Dl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:O(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:O(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:O(e.onFocusOutside,a=>a.preventDefault())})}),sw=c.forwardRef((e,t)=>{const n=He(Ot,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return l.jsx(Dl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Dl=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=He(Ot,n),u=c.useRef(null),d=oe(t,u);return lr(),l.jsxs(l.Fragment,{children:[l.jsx(Sn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(_t,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Qo(i.open),...s,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(lw,{titleId:i.titleId}),l.jsx(uw,{contentRef:u,descriptionId:i.descriptionId})]})]})}),Xo="DialogTitle",Il=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Xo,n);return l.jsx($.h2,{id:o.titleId,...r,ref:t})});Il.displayName=Xo;var _l="DialogDescription",Ol=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(_l,n);return l.jsx($.p,{id:o.descriptionId,...r,ref:t})});Ol.displayName=_l;var Ll="DialogClose",$l=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Ll,n);return l.jsx($.button,{type:"button",...r,ref:t,onClick:O(e.onClick,()=>o.onOpenChange(!1))})});$l.displayName=Ll;function Qo(e){return e?"open":"closed"}var Fl="DialogTitleWarning",[iw,Bl]=xb(Fl,{contentName:Ot,titleName:Xo,docsSlug:"dialog"}),lw=({titleId:e})=>{const t=Bl(Fl),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
232
232
 
233
233
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
234
234
 
235
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},iw="DialogDescriptionWarning",lw=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$l(iw).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(r))},[r,e,t]),null},Xo=Sl,Fl=Pl,Qo=Tl,gr=Al,vr=Rl,Zo=jl,Jo=Il,br=Ol,Bl="AlertDialog",[cw,QE]=ye(Bl,[Nl]),ut=Nl(),Wl=e=>{const{__scopeAlertDialog:t,...n}=e,r=ut(t);return l.jsx(Xo,{...r,...n,modal:!0})};Wl.displayName=Bl;var uw="AlertDialogTrigger",zl=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ut(n);return l.jsx(Fl,{...o,...r,ref:t})});zl.displayName=uw;var dw="AlertDialogPortal",Vl=e=>{const{__scopeAlertDialog:t,...n}=e,r=ut(t);return l.jsx(Qo,{...r,...n})};Vl.displayName=dw;var fw="AlertDialogOverlay",Hl=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ut(n);return l.jsx(gr,{...o,...r,ref:t})});Hl.displayName=fw;var en="AlertDialogContent",[mw,pw]=cw(en),Gl=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,a=ut(n),s=c.useRef(null),i=oe(t,s),u=c.useRef(null);return l.jsx(aw,{contentName:en,titleName:Ul,docsSlug:"alert-dialog",children:l.jsx(mw,{scope:n,cancelRef:u,children:l.jsxs(vr,{role:"alertdialog",...a,...o,ref:i,onOpenAutoFocus:O(o.onOpenAutoFocus,d=>{var f;d.preventDefault(),(f=u.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[l.jsx(To,{children:r}),l.jsx(gw,{contentRef:s})]})})})});Gl.displayName=en;var Ul="AlertDialogTitle",Yl=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ut(n);return l.jsx(Zo,{...o,...r,ref:t})});Yl.displayName=Ul;var Kl="AlertDialogDescription",ql=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ut(n);return l.jsx(Jo,{...o,...r,ref:t})});ql.displayName=Kl;var hw="AlertDialogAction",Xl=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ut(n);return l.jsx(br,{...o,...r,ref:t})});Xl.displayName=hw;var Ql="AlertDialogCancel",Zl=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=pw(Ql,n),a=ut(n),s=oe(t,o);return l.jsx(br,{...a,...r,ref:s})});Zl.displayName=Ql;var gw=({contentRef:e})=>{const t=`\`${en}\` requires a description for the component to be accessible for screen reader users.
235
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},cw="DialogDescriptionWarning",uw=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Bl(cw).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(r))},[r,e,t]),null},Zo=Pl,Wl=Tl,Jo=Rl,br=kl,yr=jl,ea=Il,ta=Ol,wr=$l,zl="AlertDialog",[dw,JE]=ye(zl,[El]),ut=El(),Vl=e=>{const{__scopeAlertDialog:t,...n}=e,r=ut(t);return l.jsx(Zo,{...r,...n,modal:!0})};Vl.displayName=zl;var fw="AlertDialogTrigger",Hl=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ut(n);return l.jsx(Wl,{...o,...r,ref:t})});Hl.displayName=fw;var mw="AlertDialogPortal",Gl=e=>{const{__scopeAlertDialog:t,...n}=e,r=ut(t);return l.jsx(Jo,{...r,...n})};Gl.displayName=mw;var pw="AlertDialogOverlay",Ul=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ut(n);return l.jsx(br,{...o,...r,ref:t})});Ul.displayName=pw;var tn="AlertDialogContent",[hw,gw]=dw(tn),Yl=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,a=ut(n),s=c.useRef(null),i=oe(t,s),u=c.useRef(null);return l.jsx(iw,{contentName:tn,titleName:Kl,docsSlug:"alert-dialog",children:l.jsx(hw,{scope:n,cancelRef:u,children:l.jsxs(yr,{role:"alertdialog",...a,...o,ref:i,onOpenAutoFocus:O(o.onOpenAutoFocus,d=>{var f;d.preventDefault(),(f=u.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[l.jsx(Ro,{children:r}),l.jsx(bw,{contentRef:s})]})})})});Yl.displayName=tn;var Kl="AlertDialogTitle",ql=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ut(n);return l.jsx(ea,{...o,...r,ref:t})});ql.displayName=Kl;var Xl="AlertDialogDescription",Ql=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ut(n);return l.jsx(ta,{...o,...r,ref:t})});Ql.displayName=Xl;var vw="AlertDialogAction",Zl=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ut(n);return l.jsx(wr,{...o,...r,ref:t})});Zl.displayName=vw;var Jl="AlertDialogCancel",ec=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=gw(Jl,n),a=ut(n),s=oe(t,o);return l.jsx(wr,{...a,...r,ref:s})});ec.displayName=Jl;var bw=({contentRef:e})=>{const t=`\`${tn}\` requires a description for the component to be accessible for screen reader users.
236
236
 
237
- You can add a description to the \`${en}\` by passing a \`${Kl}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
237
+ You can add a description to the \`${tn}\` by passing a \`${Xl}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
238
238
 
239
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${en}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
239
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${tn}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
240
240
 
241
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return c.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},vw=Wl,bw=zl,yw=Vl,Jl=Hl,ec=Gl,tc=Xl,nc=Zl,rc=Yl,oc=ql;const ac=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ww=e=>{if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);return Number.isNaN(t)?e:t},xw=e=>{const t=function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return uo(a)};return{compose:function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return Object.assign(u=>{const d=Object.fromEntries(Object.entries(u||{}).filter(f=>{let[p]=f;return!["class","className"].includes(p)}));return t(a.map(f=>f(d)),u==null?void 0:u.class,u==null?void 0:u.className)},{variants:a.reduce((u,d)=>{let{variants:f}=d;for(const p in f)u[p]=[...new Set([...u[p]??[],...f[p]??[]])];return u},{})})},cva:o=>{const{variants:a,defaultVariants:s}=o??{};return Object.assign(u=>{var d;if(a==null)return t(o==null?void 0:o.base,u==null?void 0:u.class,u==null?void 0:u.className);const f=Object.keys(a).map(m=>{const h=u==null?void 0:u[m],g=s==null?void 0:s[m],b=ac(h)||ac(g);return a[m][b]}),p={...s,...u&&Object.entries(u).reduce((m,h)=>{let[g,b]=h;return b!==void 0&&Object.assign(m,{[g]:b}),m},{})},v=o==null||(d=o.compoundVariants)===null||d===void 0?void 0:d.reduce((m,h)=>{let{class:g,className:b,...y}=h;return Object.entries(y).every(w=>{let[x,E]=w;const S=p[x];return Array.isArray(E)?E.includes(S):S===E})?[...m,g,b]:m},[]);return t(o==null?void 0:o.base,f,v,u==null?void 0:u.class,u==null?void 0:u.className)},{variants:a?Object.fromEntries(Object.entries(a).filter(u=>{let[d]=u;return!d.startsWith("$")}).map(u=>{let[d,f]=u;return[d,Object.keys(f).map(p=>ww(p))]})):{}})},cx:t}},{compose:ZE,cva:sc,cx:JE}=xw(),ea={base:["inline-flex items-center justify-center gap-2 whitespace-nowrap hover:cursor-pointer","rounded-md text-sm font-medium transition-colors focus-visible:outline-none","focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none","disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"],variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{sm:"h-8 px-3 text-xs",md:"h-9 px-4 py-2",lg:"h-10 px-8",xl:"h-12 px-10 text-xl",icon:"h-9 w-9"},rounded:{true:"rounded-full"}},defaultVariants:{variant:"default",size:"md",rounded:!1}},yr=sc(ea),Ee=c.forwardRef(({className:e,variant:t="default",size:n="md",rounded:r=!1,isLoading:o=!1,asChild:a=!1,theme:s=ea,...i},u)=>{const d=a?lt:"button",f=No(s,ea),p=sc(f);return l.jsxs(d,{className:R(p({variant:t,size:n,rounded:r,className:e})),ref:u,...i,disabled:o||i.disabled,children:[o&&l.jsxs("svg",{className:"animate-spin -ml-1 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","data-testid":"loader-svg",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),i.children]})});Ee.displayName="Button";const Cw=vw,Nw=bw,ic=yw,ta=c.forwardRef(({className:e,...t},n)=>l.jsx(Jl,{className:R("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));ta.displayName=Jl.displayName;const lc=c.forwardRef(({className:e,...t},n)=>l.jsxs(ic,{children:[l.jsx(ta,{}),l.jsx(ec,{ref:n,className:R("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));lc.displayName=ec.displayName;const cc=({className:e,...t})=>l.jsx("div",{className:R("flex flex-col space-y-2 text-center sm:text-left",e),...t});cc.displayName="AlertDialogHeader";const uc=({className:e,...t})=>l.jsx("div",{className:R("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});uc.displayName="AlertDialogFooter";const dc=c.forwardRef(({className:e,...t},n)=>l.jsx(rc,{ref:n,className:R("text-lg font-semibold",e),...t}));dc.displayName=rc.displayName;const fc=c.forwardRef(({className:e,...t},n)=>l.jsx(oc,{ref:n,className:R("text-sm text-muted-foreground",e),...t}));fc.displayName=oc.displayName;const mc=c.forwardRef(({className:e,...t},n)=>l.jsx(tc,{ref:n,className:R(yr(),e),...t}));mc.displayName=tc.displayName;const pc=c.forwardRef(({className:e,...t},n)=>l.jsx(nc,{ref:n,className:R(yr({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));pc.displayName=nc.displayName;function Sw({options:e,placeholder:t="Type to search...",onSelect:n,defaultSelectedOption:r}){const[o,a]=P.useState((r==null?void 0:r.label)||""),[s,i]=P.useState([]),[u,d]=P.useState(!1),[f,p]=P.useState(-1),[v,m]=P.useState("down"),[h,g]=P.useState(r||null),b=P.useRef(null),y=P.useRef(null),w=P.useRef(null);P.useEffect(()=>{const M=T=>{b.current&&!b.current.contains(T.target)&&d(!1)};return document.addEventListener("click",M),()=>{document.removeEventListener("click",M)}},[]),P.useEffect(()=>{const M=e.filter(T=>T.label.toLowerCase().includes(o.toLowerCase()));i(M),p(-1)},[o,e]),P.useEffect(()=>{if(u&&y.current){const M=y.current.getBoundingClientRect(),T=window.innerHeight-M.bottom,j=M.top,D=Math.min(s.length*40,240);m(T>=D||T>j?"down":"up")}},[u,s]);const x=M=>{a(M.target.value),g(null),d(!0)},E=M=>{a(M.label),g(M),d(!1),n(M)},S=M=>{if(!u&&(M.key==="ArrowDown"||M.key==="ArrowUp")){d(!0);return}switch(M.key){case"ArrowDown":p(T=>T<s.length-1?T+1:T);break;case"ArrowUp":p(T=>T>0?T-1:T);break;case"Enter":f>=0&&f<s.length&&E(s[f]);break;case"Escape":d(!1);break}};return P.useEffect(()=>{u&&w.current&&f>=0&&w.current.children[f].scrollIntoView({block:"nearest"})},[f,u]),l.jsxs("div",{ref:b,className:"relative w-full",children:[l.jsx(ar,{ref:y,type:"text",value:o,onChange:x,onFocus:()=>d(!0),onKeyDown:S,placeholder:t,className:"w-full","aria-expanded":u,"aria-autocomplete":"list","aria-controls":"autocomplete-list",role:"combobox",leftIcon:l.jsx(Mi,{className:"w-4 h-4"}),rightIcon:h?l.jsx("button",{className:"mt-[5px]",onClick:()=>{g(null),a(""),n(null)},children:l.jsx(Po,{className:"w-5 h-5"})}):null}),u&&s.length>0&&l.jsx("ul",{id:"autocomplete-list",ref:w,className:`absolute z-10 w-full bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-auto ${v==="up"?"bottom-full mb-1":"top-full mt-1"}`,role:"listbox",children:s.map((M,T)=>l.jsx("li",{onClick:()=>E(M),className:`px-4 py-2 cursor-pointer ${T===f?"bg-blue-100":"hover:bg-gray-100"} ${(h==null?void 0:h.value)===M.value?"bg-blue-200":""}`,role:"option","aria-selected":T===f,id:`option-${T}`,children:M.label},M.value))})]})}var na="Avatar",[Ew,eP]=ye(na),[Pw,hc]=Ew(na),gc=c.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=c.useState("idle");return l.jsx(Pw,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:l.jsx($.span,{...r,ref:t})})});gc.displayName=na;var vc="AvatarImage",bc=c.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=hc(vc,n),i=Mw(r,a.referrerPolicy),u=we(d=>{o(d),s.onImageLoadingStatusChange(d)});return xe(()=>{i!=="idle"&&u(i)},[i,u]),i==="loaded"?l.jsx($.img,{...a,ref:t,src:r}):null});bc.displayName=vc;var yc="AvatarFallback",wc=c.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=hc(yc,n),[s,i]=c.useState(r===void 0);return c.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(u)}},[r]),s&&a.imageLoadingStatus!=="loaded"?l.jsx($.span,{...o,ref:t}):null});wc.displayName=yc;function Mw(e,t){const[n,r]=c.useState("idle");return xe(()=>{if(!e){r("error");return}let o=!0;const a=new window.Image,s=i=>()=>{o&&r(i)};return r("loading"),a.onload=s("loaded"),a.onerror=s("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{o=!1}},[e,t]),n}var xc=gc,Cc=bc,Nc=wc;const Sc=c.forwardRef(({className:e,...t},n)=>l.jsx(xc,{ref:n,className:R("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Sc.displayName=xc.displayName;const Ec=c.forwardRef(({className:e,...t},n)=>l.jsx(Cc,{ref:n,className:R("aspect-square h-full w-full",e),...t}));Ec.displayName=Cc.displayName;const Pc=c.forwardRef(({className:e,...t},n)=>l.jsx(Nc,{ref:n,className:R("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Pc.displayName=Nc.displayName;const Mc=Dt("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ra({className:e,variant:t,...n}){return l.jsx("div",{className:R(Mc({variant:t}),e),...n})}const Tw={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},Aw=(e,t,n)=>{let r;const o=Tw[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"em "+r:"há "+r:r},Rw={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},kw={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},jw={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Dw={date:Ut({formats:Rw,defaultWidth:"full"}),time:Ut({formats:kw,defaultWidth:"full"}),dateTime:Ut({formats:jw,defaultWidth:"full"})},Iw={lastWeek:e=>{const t=e.getDay();return"'"+(t===0||t===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},_w=(e,t,n,r)=>{const o=Iw[e];return typeof o=="function"?o(t):o},Ow={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},Lw={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},$w={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},Fw={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},Bw={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},Ww={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},zw={ordinalNumber:(e,t)=>{const n=Number(e);return(t==null?void 0:t.unit)==="week"?n+"ª":n+"º"},era:Qe({values:Ow,defaultWidth:"wide"}),quarter:Qe({values:Lw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qe({values:$w,defaultWidth:"wide"}),day:Qe({values:Fw,defaultWidth:"wide"}),dayPeriod:Qe({values:Bw,defaultWidth:"wide",formattingValues:Ww,defaultFormattingWidth:"wide"})},Vw=/^(\d+)[ºªo]?/i,Hw=/\d+/i,Gw={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},Uw={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},Yw={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Kw={any:[/1/i,/2/i,/3/i,/4/i]},qw={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},Xw={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},Qw={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},Zw={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},Jw={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},ex={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},tx={ordinalNumber:Js({matchPattern:Vw,parsePattern:Hw,valueCallback:e=>parseInt(e,10)}),era:Ze({matchPatterns:Gw,defaultMatchWidth:"wide",parsePatterns:Uw,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:Yw,defaultMatchWidth:"wide",parsePatterns:Kw,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ze({matchPatterns:qw,defaultMatchWidth:"wide",parsePatterns:Xw,defaultParseWidth:"any"}),day:Ze({matchPatterns:Qw,defaultMatchWidth:"wide",parsePatterns:Zw,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:Jw,defaultMatchWidth:"any",parsePatterns:ex,defaultParseWidth:"any"})},nx={code:"pt-BR",formatDistance:Aw,formatLong:Dw,formatRelative:_w,localize:zw,match:tx,options:{weekStartsOn:0,firstWeekContainsDate:1}},rx=({selectedDate:e,onChange:t,language:n="enUS"})=>{const[r,o]=P.useState(e||new Date),s={ptBR:nx,enUS:ho}[n],i=()=>{o(m=>sv(m,1))},u=()=>{o(m=>di(m,1))},d=m=>{t&&t(m)},f=Array.from({length:av(r)}).map((m,h)=>new Date(r.getFullYear(),r.getMonth(),h+1)),p=ov(r).getDay(),v=Array.from({length:7}).map((m,h)=>go(new Date(2021,0,h+3),"EEEEEE",{locale:s}));return l.jsxs("div",{className:"max-w-sm mx-auto p-4 border rounded shadow",role:"application","aria-label":"Calendar",children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("button",{className:"px-2 py-1 bg-gray-200 rounded hover:bg-gray-300",onClick:i,"aria-label":"Previous Month",children:l.jsx(So,{})}),l.jsx("h2",{className:"text-lg font-bold","aria-live":"polite",children:go(r,"MMMM yyyy",{locale:s})}),l.jsx("button",{className:"px-2 py-1 bg-gray-200 rounded hover:bg-gray-300",onClick:u,"aria-label":"Next Month",children:l.jsx(Zn,{})})]}),l.jsxs("div",{className:"grid grid-cols-7 gap-2",children:[v.map((m,h)=>l.jsx("div",{className:"text-center font-medium","aria-hidden":"true",children:m},h)),Array.from({length:p}).map((m,h)=>l.jsx("div",{className:"","aria-hidden":"true"},`empty-${h}`)),f.map(m=>l.jsx("button",{className:`p-2 rounded hover:bg-blue-100 ${e&&m.toDateString()===e.toDateString()&&"bg-blue-200"}`,onClick:()=>d(m),"aria-label":go(m,"MMMM do yyyy",{locale:s}),"aria-pressed":e&&m.toDateString()===e.toDateString()?"true":"false",children:m.getDate()},m.toISOString()))]})]})},Tc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Tc.displayName="Card";const Ac=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("flex flex-col space-y-1.5 p-6",e),...t}));Ac.displayName="CardHeader";const Rc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("font-semibold leading-none tracking-tight pb-4",e),...t}));Rc.displayName="CardTitle";const kc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("text-sm text-muted-foreground",e),...t}));kc.displayName="CardDescription";const jc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("p-6 py-0",e),...t}));jc.displayName="CardContent";const Dc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("flex items-center p-6 pt-6",e),...t}));Dc.displayName="CardFooter";function Pn(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])}function wr(e){const[t,n]=c.useState(void 0);return xe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;s=d.inlineSize,i=d.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var oa="Checkbox",[ox,nP]=ye(oa),[ax,sx]=ox(oa),Ic=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:u="on",onCheckedChange:d,form:f,...p}=e,[v,m]=c.useState(null),h=oe(t,E=>m(E)),g=c.useRef(!1),b=v?f||!!v.closest("form"):!0,[y=!1,w]=Ce({prop:o,defaultProp:a,onChange:d}),x=c.useRef(y);return c.useEffect(()=>{const E=v==null?void 0:v.form;if(E){const S=()=>w(x.current);return E.addEventListener("reset",S),()=>E.removeEventListener("reset",S)}},[v,w]),l.jsxs(ax,{scope:n,state:y,disabled:i,children:[l.jsx($.button,{type:"button",role:"checkbox","aria-checked":wt(y)?"mixed":y,"aria-required":s,"data-state":Lc(y),"data-disabled":i?"":void 0,disabled:i,value:u,...p,ref:h,onKeyDown:O(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:O(e.onClick,E=>{w(S=>wt(S)?!0:!S),b&&(g.current=E.isPropagationStopped(),g.current||E.stopPropagation())})}),b&&l.jsx(ix,{control:v,bubbles:!g.current,name:r,value:u,checked:y,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"},defaultChecked:wt(a)?!1:a})]})});Ic.displayName=oa;var _c="CheckboxIndicator",Oc=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=sx(_c,n);return l.jsx(Ne,{present:r||wt(a.state)||a.state===!0,children:l.jsx($.span,{"data-state":Lc(a.state),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Oc.displayName=_c;var ix=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...a}=e,s=c.useRef(null),i=Pn(n),u=wr(t);c.useEffect(()=>{const f=s.current,p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(i!==n&&m){const h=new Event("click",{bubbles:r});f.indeterminate=wt(n),m.call(f,wt(n)?!1:n),f.dispatchEvent(h)}},[i,n,r]);const d=c.useRef(wt(n)?!1:n);return l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??d.current,...a,tabIndex:-1,ref:s,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function wt(e){return e==="indeterminate"}function Lc(e){return wt(e)?"indeterminate":e?"checked":"unchecked"}var $c=Ic,lx=Oc;const Fc=c.forwardRef(({className:e,...t},n)=>l.jsx($c,{ref:n,className:R("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:l.jsx(lx,{className:R("flex items-center justify-center text-current"),children:l.jsx(xn,{className:"h-4 w-4"})})}));Fc.displayName=$c.displayName;var Bc=1,cx=.9,ux=.8,dx=.17,aa=.1,sa=.999,fx=.9999,mx=.99,px=/[\\\/_+.#"@\[\(\{&]/,hx=/[\\\/_+.#"@\[\(\{&]/g,gx=/[\s-]/,Wc=/[\s-]/g;function ia(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?Bc:mx;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var u=r.charAt(a),d=n.indexOf(u,o),f=0,p,v,m,h;d>=0;)p=ia(e,t,n,r,d+1,a+1,s),p>f&&(d===o?p*=Bc:px.test(e.charAt(d-1))?(p*=ux,m=e.slice(o,d-1).match(hx),m&&o>0&&(p*=Math.pow(sa,m.length))):gx.test(e.charAt(d-1))?(p*=cx,h=e.slice(o,d-1).match(Wc),h&&o>0&&(p*=Math.pow(sa,h.length))):(p*=dx,o>0&&(p*=Math.pow(sa,d-o))),e.charAt(d)!==t.charAt(a)&&(p*=fx)),(p<aa&&n.charAt(d-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(d-1)!==r.charAt(a))&&(v=ia(e,t,n,r,d+1,a+2,s),v*aa>p&&(p=v*aa)),p>f&&(f=p),d=n.indexOf(u,d+1);return s[i]=f,f}function zc(e){return e.toLowerCase().replace(Wc," ")}function vx(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,ia(e,t,zc(e),zc(t),0,0,{})}var xr={exports:{}},la={};/**
241
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return c.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},yw=Vl,ww=Hl,xw=Gl,tc=Ul,nc=Yl,rc=Zl,oc=ec,ac=ql,sc=Ql;const ic=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Cw=e=>{if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);return Number.isNaN(t)?e:t},Nw=e=>{const t=function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return po(a)};return{compose:function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return Object.assign(u=>{const d=Object.fromEntries(Object.entries(u||{}).filter(f=>{let[p]=f;return!["class","className"].includes(p)}));return t(a.map(f=>f(d)),u==null?void 0:u.class,u==null?void 0:u.className)},{variants:a.reduce((u,d)=>{let{variants:f}=d;for(const p in f)u[p]=[...new Set([...u[p]??[],...f[p]??[]])];return u},{})})},cva:o=>{const{variants:a,defaultVariants:s}=o??{};return Object.assign(u=>{var d;if(a==null)return t(o==null?void 0:o.base,u==null?void 0:u.class,u==null?void 0:u.className);const f=Object.keys(a).map(m=>{const h=u==null?void 0:u[m],g=s==null?void 0:s[m],b=ic(h)||ic(g);return a[m][b]}),p={...s,...u&&Object.entries(u).reduce((m,h)=>{let[g,b]=h;return b!==void 0&&Object.assign(m,{[g]:b}),m},{})},v=o==null||(d=o.compoundVariants)===null||d===void 0?void 0:d.reduce((m,h)=>{let{class:g,className:b,...y}=h;return Object.entries(y).every(w=>{let[x,E]=w;const S=p[x];return Array.isArray(E)?E.includes(S):S===E})?[...m,g,b]:m},[]);return t(o==null?void 0:o.base,f,v,u==null?void 0:u.class,u==null?void 0:u.className)},{variants:a?Object.fromEntries(Object.entries(a).filter(u=>{let[d]=u;return!d.startsWith("$")}).map(u=>{let[d,f]=u;return[d,Object.keys(f).map(p=>Cw(p))]})):{}})},cx:t}},{compose:eP,cva:lc,cx:tP}=Nw(),na={base:["inline-flex items-center justify-center gap-2 whitespace-nowrap hover:cursor-pointer","rounded-md text-sm font-medium transition-colors focus-visible:outline-none","focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none","disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"],variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{sm:"h-8 px-3 text-xs",md:"h-9 px-4 py-2",lg:"h-10 px-8",xl:"h-12 px-10 text-xl",icon:"h-9 w-9"},rounded:{true:"rounded-full"}},defaultVariants:{variant:"default",size:"md",rounded:!1}},xr=lc(na),Se=c.forwardRef(({className:e,variant:t="default",size:n="md",rounded:r=!1,isLoading:o=!1,asChild:a=!1,theme:s=na,...i},u)=>{const d=a?lt:"button",f=Po(s,na),p=lc(f);return l.jsxs(d,{className:R(p({variant:t,size:n,rounded:r,className:e})),ref:u,...i,disabled:o||i.disabled,children:[o&&l.jsxs("svg",{className:"animate-spin -ml-1 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","data-testid":"loader-svg",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),i.children]})});Se.displayName="Button";const Sw=yw,Ew=ww,cc=xw,ra=c.forwardRef(({className:e,...t},n)=>l.jsx(tc,{className:R("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));ra.displayName=tc.displayName;const uc=c.forwardRef(({className:e,...t},n)=>l.jsxs(cc,{children:[l.jsx(ra,{}),l.jsx(nc,{ref:n,className:R("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));uc.displayName=nc.displayName;const dc=({className:e,...t})=>l.jsx("div",{className:R("flex flex-col space-y-2 text-center sm:text-left",e),...t});dc.displayName="AlertDialogHeader";const fc=({className:e,...t})=>l.jsx("div",{className:R("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});fc.displayName="AlertDialogFooter";const mc=c.forwardRef(({className:e,...t},n)=>l.jsx(ac,{ref:n,className:R("text-lg font-semibold",e),...t}));mc.displayName=ac.displayName;const pc=c.forwardRef(({className:e,...t},n)=>l.jsx(sc,{ref:n,className:R("text-sm text-muted-foreground",e),...t}));pc.displayName=sc.displayName;const hc=c.forwardRef(({className:e,...t},n)=>l.jsx(rc,{ref:n,className:R(xr(),e),...t}));hc.displayName=rc.displayName;const gc=c.forwardRef(({className:e,...t},n)=>l.jsx(oc,{ref:n,className:R(xr({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));gc.displayName=oc.displayName;function Pw({options:e,placeholder:t="Type to search...",onSelect:n,defaultSelectedOption:r}){const[o,a]=P.useState((r==null?void 0:r.label)||""),[s,i]=P.useState([]),[u,d]=P.useState(!1),[f,p]=P.useState(-1),[v,m]=P.useState("down"),[h,g]=P.useState(r||null),b=P.useRef(null),y=P.useRef(null),w=P.useRef(null);P.useEffect(()=>{const M=T=>{b.current&&!b.current.contains(T.target)&&d(!1)};return document.addEventListener("click",M),()=>{document.removeEventListener("click",M)}},[]),P.useEffect(()=>{const M=e.filter(T=>T.label.toLowerCase().includes(o.toLowerCase()));i(M),p(-1)},[o,e]),P.useEffect(()=>{if(u&&y.current){const M=y.current.getBoundingClientRect(),T=window.innerHeight-M.bottom,j=M.top,D=Math.min(s.length*40,240);m(T>=D||T>j?"down":"up")}},[u,s]);const x=M=>{a(M.target.value),g(null),d(!0)},E=M=>{a(M.label),g(M),d(!1),n(M)},S=M=>{if(!u&&(M.key==="ArrowDown"||M.key==="ArrowUp")){d(!0);return}switch(M.key){case"ArrowDown":p(T=>T<s.length-1?T+1:T);break;case"ArrowUp":p(T=>T>0?T-1:T);break;case"Enter":f>=0&&f<s.length&&E(s[f]);break;case"Escape":d(!1);break}};return P.useEffect(()=>{u&&w.current&&f>=0&&w.current.children[f].scrollIntoView({block:"nearest"})},[f,u]),l.jsxs("div",{ref:b,className:"relative w-full",children:[l.jsx(ir,{ref:y,type:"text",value:o,onChange:x,onFocus:()=>d(!0),onKeyDown:S,placeholder:t,className:"w-full","aria-expanded":u,"aria-autocomplete":"list","aria-controls":"autocomplete-list",role:"combobox",leftIcon:l.jsx(Ai,{className:"w-4 h-4"}),rightIcon:h?l.jsx("button",{className:"mt-[5px]",onClick:()=>{g(null),a(""),n(null)},children:l.jsx(er,{className:"w-5 h-5"})}):null}),u&&s.length>0&&l.jsx("ul",{id:"autocomplete-list",ref:w,className:`absolute z-10 w-full bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-auto ${v==="up"?"bottom-full mb-1":"top-full mt-1"}`,role:"listbox",children:s.map((M,T)=>l.jsx("li",{onClick:()=>E(M),className:`px-4 py-2 cursor-pointer ${T===f?"bg-blue-100":"hover:bg-gray-100"} ${(h==null?void 0:h.value)===M.value?"bg-blue-200":""}`,role:"option","aria-selected":T===f,id:`option-${T}`,children:M.label},M.value))})]})}var oa="Avatar",[Mw,nP]=ye(oa),[Tw,vc]=Mw(oa),bc=c.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=c.useState("idle");return l.jsx(Tw,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:l.jsx($.span,{...r,ref:t})})});bc.displayName=oa;var yc="AvatarImage",wc=c.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=vc(yc,n),i=Aw(r,a.referrerPolicy),u=we(d=>{o(d),s.onImageLoadingStatusChange(d)});return xe(()=>{i!=="idle"&&u(i)},[i,u]),i==="loaded"?l.jsx($.img,{...a,ref:t,src:r}):null});wc.displayName=yc;var xc="AvatarFallback",Cc=c.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=vc(xc,n),[s,i]=c.useState(r===void 0);return c.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(u)}},[r]),s&&a.imageLoadingStatus!=="loaded"?l.jsx($.span,{...o,ref:t}):null});Cc.displayName=xc;function Aw(e,t){const[n,r]=c.useState("idle");return xe(()=>{if(!e){r("error");return}let o=!0;const a=new window.Image,s=i=>()=>{o&&r(i)};return r("loading"),a.onload=s("loaded"),a.onerror=s("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{o=!1}},[e,t]),n}var Nc=bc,Sc=wc,Ec=Cc;const Pc=c.forwardRef(({className:e,...t},n)=>l.jsx(Nc,{ref:n,className:R("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Pc.displayName=Nc.displayName;const Mc=c.forwardRef(({className:e,...t},n)=>l.jsx(Sc,{ref:n,className:R("aspect-square h-full w-full",e),...t}));Mc.displayName=Sc.displayName;const Tc=c.forwardRef(({className:e,...t},n)=>l.jsx(Ec,{ref:n,className:R("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Tc.displayName=Ec.displayName;const Ac=It("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function aa({className:e,variant:t,...n}){return l.jsx("div",{className:R(Ac({variant:t}),e),...n})}const Rw={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},kw=(e,t,n)=>{let r;const o=Rw[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"em "+r:"há "+r:r},jw={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},Dw={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Iw={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_w={date:Yt({formats:jw,defaultWidth:"full"}),time:Yt({formats:Dw,defaultWidth:"full"}),dateTime:Yt({formats:Iw,defaultWidth:"full"})},Ow={lastWeek:e=>{const t=e.getDay();return"'"+(t===0||t===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},Lw=(e,t,n,r)=>{const o=Ow[e];return typeof o=="function"?o(t):o},$w={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},Fw={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Bw={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},Ww={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},zw={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},Vw={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},Hw={ordinalNumber:(e,t)=>{const n=Number(e);return(t==null?void 0:t.unit)==="week"?n+"ª":n+"º"},era:Qe({values:$w,defaultWidth:"wide"}),quarter:Qe({values:Fw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qe({values:Bw,defaultWidth:"wide"}),day:Qe({values:Ww,defaultWidth:"wide"}),dayPeriod:Qe({values:zw,defaultWidth:"wide",formattingValues:Vw,defaultFormattingWidth:"wide"})},Gw=/^(\d+)[ºªo]?/i,Uw=/\d+/i,Yw={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},Kw={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},qw={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Xw={any:[/1/i,/2/i,/3/i,/4/i]},Qw={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},Zw={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},Jw={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},ex={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},tx={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},nx={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},rx={ordinalNumber:ti({matchPattern:Gw,parsePattern:Uw,valueCallback:e=>parseInt(e,10)}),era:Ze({matchPatterns:Yw,defaultMatchWidth:"wide",parsePatterns:Kw,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:qw,defaultMatchWidth:"wide",parsePatterns:Xw,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ze({matchPatterns:Qw,defaultMatchWidth:"wide",parsePatterns:Zw,defaultParseWidth:"any"}),day:Ze({matchPatterns:Jw,defaultMatchWidth:"wide",parsePatterns:ex,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:tx,defaultMatchWidth:"any",parsePatterns:nx,defaultParseWidth:"any"})},ox={code:"pt-BR",formatDistance:kw,formatLong:_w,formatRelative:Lw,localize:Hw,match:rx,options:{weekStartsOn:0,firstWeekContainsDate:1}},ax=({selectedDate:e,onChange:t,language:n="enUS"})=>{const[r,o]=P.useState(e||new Date),s={ptBR:ox,enUS:bo}[n],i=()=>{o(m=>lv(m,1))},u=()=>{o(m=>mi(m,1))},d=m=>{t&&t(m)},f=Array.from({length:iv(r)}).map((m,h)=>new Date(r.getFullYear(),r.getMonth(),h+1)),p=sv(r).getDay(),v=Array.from({length:7}).map((m,h)=>yo(new Date(2021,0,h+3),"EEEEEE",{locale:s}));return l.jsxs("div",{className:"max-w-sm mx-auto p-4 border rounded shadow",role:"application","aria-label":"Calendar",children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("button",{className:"px-2 py-1 bg-gray-200 rounded hover:bg-gray-300",onClick:i,"aria-label":"Previous Month",children:l.jsx(Mo,{})}),l.jsx("h2",{className:"text-lg font-bold","aria-live":"polite",children:yo(r,"MMMM yyyy",{locale:s})}),l.jsx("button",{className:"px-2 py-1 bg-gray-200 rounded hover:bg-gray-300",onClick:u,"aria-label":"Next Month",children:l.jsx(Jn,{})})]}),l.jsxs("div",{className:"grid grid-cols-7 gap-2",children:[v.map((m,h)=>l.jsx("div",{className:"text-center font-medium","aria-hidden":"true",children:m},h)),Array.from({length:p}).map((m,h)=>l.jsx("div",{className:"","aria-hidden":"true"},`empty-${h}`)),f.map(m=>l.jsx("button",{className:`p-2 rounded hover:bg-blue-100 ${e&&m.toDateString()===e.toDateString()&&"bg-blue-200"}`,onClick:()=>d(m),"aria-label":yo(m,"MMMM do yyyy",{locale:s}),"aria-pressed":e&&m.toDateString()===e.toDateString()?"true":"false",children:m.getDate()},m.toISOString()))]})]})},Rc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Rc.displayName="Card";const kc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("flex flex-col space-y-1.5 p-6",e),...t}));kc.displayName="CardHeader";const jc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("font-semibold leading-none tracking-tight pb-4",e),...t}));jc.displayName="CardTitle";const Dc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("text-sm text-muted-foreground",e),...t}));Dc.displayName="CardDescription";const Ic=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("p-6 py-0",e),...t}));Ic.displayName="CardContent";const _c=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:R("flex items-center p-6 pt-6",e),...t}));_c.displayName="CardFooter";function Mn(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])}function Cr(e){const[t,n]=c.useState(void 0);return xe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;s=d.inlineSize,i=d.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var sa="Checkbox",[sx,oP]=ye(sa),[ix,lx]=sx(sa),Oc=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:u="on",onCheckedChange:d,form:f,...p}=e,[v,m]=c.useState(null),h=oe(t,E=>m(E)),g=c.useRef(!1),b=v?f||!!v.closest("form"):!0,[y=!1,w]=Ce({prop:o,defaultProp:a,onChange:d}),x=c.useRef(y);return c.useEffect(()=>{const E=v==null?void 0:v.form;if(E){const S=()=>w(x.current);return E.addEventListener("reset",S),()=>E.removeEventListener("reset",S)}},[v,w]),l.jsxs(ix,{scope:n,state:y,disabled:i,children:[l.jsx($.button,{type:"button",role:"checkbox","aria-checked":xt(y)?"mixed":y,"aria-required":s,"data-state":Fc(y),"data-disabled":i?"":void 0,disabled:i,value:u,...p,ref:h,onKeyDown:O(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:O(e.onClick,E=>{w(S=>xt(S)?!0:!S),b&&(g.current=E.isPropagationStopped(),g.current||E.stopPropagation())})}),b&&l.jsx(cx,{control:v,bubbles:!g.current,name:r,value:u,checked:y,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"},defaultChecked:xt(a)?!1:a})]})});Oc.displayName=sa;var Lc="CheckboxIndicator",$c=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=lx(Lc,n);return l.jsx(Ne,{present:r||xt(a.state)||a.state===!0,children:l.jsx($.span,{"data-state":Fc(a.state),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});$c.displayName=Lc;var cx=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...a}=e,s=c.useRef(null),i=Mn(n),u=Cr(t);c.useEffect(()=>{const f=s.current,p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(i!==n&&m){const h=new Event("click",{bubbles:r});f.indeterminate=xt(n),m.call(f,xt(n)?!1:n),f.dispatchEvent(h)}},[i,n,r]);const d=c.useRef(xt(n)?!1:n);return l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??d.current,...a,tabIndex:-1,ref:s,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function xt(e){return e==="indeterminate"}function Fc(e){return xt(e)?"indeterminate":e?"checked":"unchecked"}var Bc=Oc,ux=$c;const Wc=c.forwardRef(({className:e,...t},n)=>l.jsx(Bc,{ref:n,className:R("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:l.jsx(ux,{className:R("flex items-center justify-center text-current"),children:l.jsx(Cn,{className:"h-4 w-4"})})}));Wc.displayName=Bc.displayName;var zc=1,dx=.9,fx=.8,mx=.17,ia=.1,la=.999,px=.9999,hx=.99,gx=/[\\\/_+.#"@\[\(\{&]/,vx=/[\\\/_+.#"@\[\(\{&]/g,bx=/[\s-]/,Vc=/[\s-]/g;function ca(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?zc:hx;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var u=r.charAt(a),d=n.indexOf(u,o),f=0,p,v,m,h;d>=0;)p=ca(e,t,n,r,d+1,a+1,s),p>f&&(d===o?p*=zc:gx.test(e.charAt(d-1))?(p*=fx,m=e.slice(o,d-1).match(vx),m&&o>0&&(p*=Math.pow(la,m.length))):bx.test(e.charAt(d-1))?(p*=dx,h=e.slice(o,d-1).match(Vc),h&&o>0&&(p*=Math.pow(la,h.length))):(p*=mx,o>0&&(p*=Math.pow(la,d-o))),e.charAt(d)!==t.charAt(a)&&(p*=px)),(p<ia&&n.charAt(d-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(d-1)!==r.charAt(a))&&(v=ca(e,t,n,r,d+1,a+2,s),v*ia>p&&(p=v*ia)),p>f&&(f=p),d=n.indexOf(u,d+1);return s[i]=f,f}function Hc(e){return e.toLowerCase().replace(Vc," ")}function yx(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,ca(e,t,Hc(e),Hc(t),0,0,{})}var Nr={exports:{}},ua={};/**
242
242
  * @license React
243
243
  * use-sync-external-store-shim.production.js
244
244
  *
@@ -246,7 +246,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
246
246
  *
247
247
  * This source code is licensed under the MIT license found in the
248
248
  * LICENSE file in the root directory of this source tree.
249
- */var Vc;function bx(){if(Vc)return la;Vc=1;var e=P;function t(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(p,v){var m=v(),h=r({inst:{value:m,getSnapshot:v}}),g=h[0].inst,b=h[1];return a(function(){g.value=m,g.getSnapshot=v,u(g)&&b({inst:g})},[p,m,v]),o(function(){return u(g)&&b({inst:g}),p(function(){u(g)&&b({inst:g})})},[p]),s(m),m}function u(p){var v=p.getSnapshot;p=p.value;try{var m=v();return!n(p,m)}catch{return!0}}function d(p,v){return v()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:i;return la.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,la}var ca={};/**
249
+ */var Gc;function wx(){if(Gc)return ua;Gc=1;var e=P;function t(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(p,v){var m=v(),h=r({inst:{value:m,getSnapshot:v}}),g=h[0].inst,b=h[1];return a(function(){g.value=m,g.getSnapshot=v,u(g)&&b({inst:g})},[p,m,v]),o(function(){return u(g)&&b({inst:g}),p(function(){u(g)&&b({inst:g})})},[p]),s(m),m}function u(p){var v=p.getSnapshot;p=p.value;try{var m=v();return!n(p,m)}catch{return!0}}function d(p,v){return v()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:i;return ua.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,ua}var da={};/**
250
250
  * @license React
251
251
  * use-sync-external-store-shim.development.js
252
252
  *
@@ -254,13 +254,13 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
254
254
  *
255
255
  * This source code is licensed under the MIT license found in the
256
256
  * LICENSE file in the root directory of this source tree.
257
- */var Hc;function yx(){return Hc||(Hc=1,process.env.NODE_ENV!=="production"&&function(){function e(m,h){return m===h&&(m!==0||1/m===1/h)||m!==m&&h!==h}function t(m,h){f||o.startTransition===void 0||(f=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=h();if(!p){var b=h();a(g,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}b=s({inst:{value:g,getSnapshot:h}});var y=b[0].inst,w=b[1];return u(function(){y.value=g,y.getSnapshot=h,n(y)&&w({inst:y})},[m,g,h]),i(function(){return n(y)&&w({inst:y}),m(function(){n(y)&&w({inst:y})})},[m]),d(g),g}function n(m){var h=m.getSnapshot;m=m.value;try{var g=h();return!a(m,g)}catch{return!0}}function r(m,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=P,a=typeof Object.is=="function"?Object.is:e,s=o.useState,i=o.useEffect,u=o.useLayoutEffect,d=o.useDebugValue,f=!1,p=!1,v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;ca.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),ca}var Gc;function wx(){return Gc||(Gc=1,process.env.NODE_ENV==="production"?xr.exports=bx():xr.exports=yx()),xr.exports}var xx=wx(),Mn='[cmdk-group=""]',ua='[cmdk-group-items=""]',Cx='[cmdk-group-heading=""]',da='[cmdk-item=""]',Uc=`${da}:not([aria-disabled="true"])`,fa="cmdk-item-select",Ot="data-value",Nx=(e,t,n)=>vx(e,t,n),Yc=c.createContext(void 0),Tn=()=>c.useContext(Yc),Kc=c.createContext(void 0),ma=()=>c.useContext(Kc),qc=c.createContext(void 0),Xc=c.forwardRef((e,t)=>{let n=tn(()=>{var A,L;return{search:"",value:(L=(A=e.value)!=null?A:e.defaultValue)!=null?L:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=tn(()=>new Set),o=tn(()=>new Map),a=tn(()=>new Map),s=tn(()=>new Set),i=Qc(e),{label:u,children:d,value:f,onValueChange:p,filter:v,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:b=!0,...y}=e,w=he(),x=he(),E=he(),S=c.useRef(null),M=Ix();Lt(()=>{if(f!==void 0){let A=f.trim();n.current.value=A,T.emit()}},[f]),Lt(()=>{M(6,K)},[]);let T=c.useMemo(()=>({subscribe:A=>(s.current.add(A),()=>s.current.delete(A)),snapshot:()=>n.current,setState:(A,L,F)=>{var B,X,_;if(!Object.is(n.current[A],L)){if(n.current[A]=L,A==="search")I(),z(),M(1,Y);else if(A==="value"&&(F||M(5,K),((B=i.current)==null?void 0:B.value)!==void 0)){let Z=L??"";(_=(X=i.current).onValueChange)==null||_.call(X,Z);return}T.emit()}},emit:()=>{s.current.forEach(A=>A())}}),[]),j=c.useMemo(()=>({value:(A,L,F)=>{var B;L!==((B=a.current.get(A))==null?void 0:B.value)&&(a.current.set(A,{value:L,keywords:F}),n.current.filtered.items.set(A,D(L,F)),M(2,()=>{z(),T.emit()}))},item:(A,L)=>(r.current.add(A),L&&(o.current.has(L)?o.current.get(L).add(A):o.current.set(L,new Set([A]))),M(3,()=>{I(),z(),n.current.value||Y(),T.emit()}),()=>{a.current.delete(A),r.current.delete(A),n.current.filtered.items.delete(A);let F=H();M(4,()=>{I(),(F==null?void 0:F.getAttribute("id"))===A&&Y(),T.emit()})}),group:A=>(o.current.has(A)||o.current.set(A,new Set),()=>{a.current.delete(A),o.current.delete(A)}),filter:()=>i.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:w,inputId:E,labelId:x,listInnerRef:S}),[]);function D(A,L){var F,B;let X=(B=(F=i.current)==null?void 0:F.filter)!=null?B:Nx;return A?X(A,n.current.search,L):0}function z(){if(!n.current.search||i.current.shouldFilter===!1)return;let A=n.current.filtered.items,L=[];n.current.filtered.groups.forEach(B=>{let X=o.current.get(B),_=0;X.forEach(Z=>{let te=A.get(Z);_=Math.max(te,_)}),L.push([B,_])});let F=S.current;J().sort((B,X)=>{var _,Z;let te=B.getAttribute("id"),ne=X.getAttribute("id");return((_=A.get(ne))!=null?_:0)-((Z=A.get(te))!=null?Z:0)}).forEach(B=>{let X=B.closest(ua);X?X.appendChild(B.parentElement===X?B:B.closest(`${ua} > *`)):F.appendChild(B.parentElement===F?B:B.closest(`${ua} > *`))}),L.sort((B,X)=>X[1]-B[1]).forEach(B=>{var X;let _=(X=S.current)==null?void 0:X.querySelector(`${Mn}[${Ot}="${encodeURIComponent(B[0])}"]`);_==null||_.parentElement.appendChild(_)})}function Y(){let A=J().find(F=>F.getAttribute("aria-disabled")!=="true"),L=A==null?void 0:A.getAttribute(Ot);T.setState("value",L||void 0)}function I(){var A,L,F,B;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let X=0;for(let _ of r.current){let Z=(L=(A=a.current.get(_))==null?void 0:A.value)!=null?L:"",te=(B=(F=a.current.get(_))==null?void 0:F.keywords)!=null?B:[],ne=D(Z,te);n.current.filtered.items.set(_,ne),ne>0&&X++}for(let[_,Z]of o.current)for(let te of Z)if(n.current.filtered.items.get(te)>0){n.current.filtered.groups.add(_);break}n.current.filtered.count=X}function K(){var A,L,F;let B=H();B&&(((A=B.parentElement)==null?void 0:A.firstChild)===B&&((F=(L=B.closest(Mn))==null?void 0:L.querySelector(Cx))==null||F.scrollIntoView({block:"nearest"})),B.scrollIntoView({block:"nearest"}))}function H(){var A;return(A=S.current)==null?void 0:A.querySelector(`${da}[aria-selected="true"]`)}function J(){var A;return Array.from(((A=S.current)==null?void 0:A.querySelectorAll(Uc))||[])}function V(A){let L=J()[A];L&&T.setState("value",L.getAttribute(Ot))}function q(A){var L;let F=H(),B=J(),X=B.findIndex(Z=>Z===F),_=B[X+A];(L=i.current)!=null&&L.loop&&(_=X+A<0?B[B.length-1]:X+A===B.length?B[0]:B[X+A]),_&&T.setState("value",_.getAttribute(Ot))}function G(A){let L=H(),F=L==null?void 0:L.closest(Mn),B;for(;F&&!B;)F=A>0?jx(F,Mn):Dx(F,Mn),B=F==null?void 0:F.querySelector(Uc);B?T.setState("value",B.getAttribute(Ot)):q(A)}let k=()=>V(J().length-1),Q=A=>{A.preventDefault(),A.metaKey?k():A.altKey?G(1):q(1)},ee=A=>{A.preventDefault(),A.metaKey?V(0):A.altKey?G(-1):q(-1)};return c.createElement($.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:A=>{var L;if((L=y.onKeyDown)==null||L.call(y,A),!A.defaultPrevented)switch(A.key){case"n":case"j":{b&&A.ctrlKey&&Q(A);break}case"ArrowDown":{Q(A);break}case"p":case"k":{b&&A.ctrlKey&&ee(A);break}case"ArrowUp":{ee(A);break}case"Home":{A.preventDefault(),V(0);break}case"End":{A.preventDefault(),k();break}case"Enter":if(!A.nativeEvent.isComposing&&A.keyCode!==229){A.preventDefault();let F=H();if(F){let B=new Event(fa);F.dispatchEvent(B)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:Ox},u),Cr(e,A=>c.createElement(Kc.Provider,{value:T},c.createElement(Yc.Provider,{value:j},A))))}),Sx=c.forwardRef((e,t)=>{var n,r;let o=he(),a=c.useRef(null),s=c.useContext(qc),i=Tn(),u=Qc(e),d=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;Lt(()=>{if(!d)return i.item(o,s==null?void 0:s.id)},[d]);let f=Zc(o,a,[e.value,e.children,a],e.keywords),p=ma(),v=$t(M=>M.value&&M.value===f.current),m=$t(M=>d||i.filter()===!1?!0:M.search?M.filtered.items.get(o)>0:!0);c.useEffect(()=>{let M=a.current;if(!(!M||e.disabled))return M.addEventListener(fa,h),()=>M.removeEventListener(fa,h)},[m,e.onSelect,e.disabled]);function h(){var M,T;g(),(T=(M=u.current).onSelect)==null||T.call(M,f.current)}function g(){p.setState("value",f.current,!0)}if(!m)return null;let{disabled:b,value:y,onSelect:w,forceMount:x,keywords:E,...S}=e;return c.createElement($.div,{ref:An([a,t]),...S,id:o,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!v,"data-disabled":!!b,"data-selected":!!v,onPointerMove:b||i.getDisablePointerSelection()?void 0:g,onClick:b?void 0:h},e.children)}),Ex=c.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=he(),i=c.useRef(null),u=c.useRef(null),d=he(),f=Tn(),p=$t(m=>o||f.filter()===!1?!0:m.search?m.filtered.groups.has(s):!0);Lt(()=>f.group(s),[]),Zc(s,i,[e.value,e.heading,u]);let v=c.useMemo(()=>({id:s,forceMount:o}),[o]);return c.createElement($.div,{ref:An([i,t]),...a,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&c.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),Cr(e,m=>c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},c.createElement(qc.Provider,{value:v},m))))}),Px=c.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=c.useRef(null),a=$t(s=>!s.search);return!n&&!a?null:c.createElement($.div,{ref:An([o,t]),...r,"cmdk-separator":"",role:"separator"})}),Mx=c.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=ma(),s=$t(f=>f.search),i=$t(f=>f.value),u=Tn(),d=c.useMemo(()=>{var f;let p=(f=u.listInnerRef.current)==null?void 0:f.querySelector(`${da}[${Ot}="${encodeURIComponent(i)}"]`);return p==null?void 0:p.getAttribute("id")},[]);return c.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),c.createElement($.input,{ref:t,...r,"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":d,id:u.inputId,type:"text",value:o?e.value:s,onChange:f=>{o||a.setState("search",f.target.value),n==null||n(f.target.value)}})}),Tx=c.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=c.useRef(null),s=c.useRef(null),i=Tn();return c.useEffect(()=>{if(s.current&&a.current){let u=s.current,d=a.current,f,p=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let v=u.offsetHeight;d.style.setProperty("--cmdk-list-height",v.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(f),p.unobserve(u)}}},[]),c.createElement($.div,{ref:An([a,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:i.listId},Cr(e,u=>c.createElement("div",{ref:An([s,i.listInnerRef]),"cmdk-list-sizer":""},u)))}),Ax=c.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return c.createElement(Xo,{open:n,onOpenChange:r},c.createElement(Qo,{container:s},c.createElement(gr,{"cmdk-overlay":"",className:o}),c.createElement(vr,{"aria-label":e.label,"cmdk-dialog":"",className:a},c.createElement(Xc,{ref:t,...i}))))}),Rx=c.forwardRef((e,t)=>$t(n=>n.filtered.count===0)?c.createElement($.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),kx=c.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return c.createElement($.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Cr(e,s=>c.createElement("div",{"aria-hidden":!0},s)))}),De=Object.assign(Xc,{List:Tx,Item:Sx,Input:Mx,Group:Ex,Separator:Px,Dialog:Ax,Empty:Rx,Loading:kx});function jx(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Dx(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Qc(e){let t=c.useRef(e);return Lt(()=>{t.current=e}),t}var Lt=typeof window>"u"?c.useEffect:c.useLayoutEffect;function tn(e){let t=c.useRef();return t.current===void 0&&(t.current=e()),t}function An(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function $t(e){let t=ma(),n=()=>e(t.snapshot());return xx.useSyncExternalStore(t.subscribe,n,n)}function Zc(e,t,n,r=[]){let o=c.useRef(),a=Tn();return Lt(()=>{var s;let i=(()=>{var d;for(let f of n){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=r.map(d=>d.trim());a.value(e,i,u),(s=t.current)==null||s.setAttribute(Ot,i),o.current=i}),o}var Ix=()=>{let[e,t]=c.useState(),n=tn(()=>new Map);return Lt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function _x(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Cr({asChild:e,children:t},n){return e&&c.isValidElement(t)?c.cloneElement(_x(t),{ref:t.ref},n(t.props.children)):n(t)}var Ox={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Nr=Xo,Jc=Fl,eu=Qo,Lx=br,pa=c.forwardRef(({className:e,...t},n)=>l.jsx(gr,{ref:n,className:R("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));pa.displayName=gr.displayName;const Rn=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(eu,{children:[l.jsx(pa,{}),l.jsxs(vr,{ref:r,className:R("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border","bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]","sm:rounded-lg max-h-[100dvh] overflow-y-auto",e),...n,children:[t,l.jsxs(br,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx(Po,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Rn.displayName=vr.displayName;const Sr=({className:e,...t})=>l.jsx("div",{className:R("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Sr.displayName="DialogHeader";const tu=({className:e,...t})=>l.jsx("div",{className:R("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});tu.displayName="DialogFooter";const Er=c.forwardRef(({className:e,...t},n)=>l.jsx(Zo,{ref:n,className:R("text-lg font-semibold leading-none tracking-tight",e),...t}));Er.displayName=Zo.displayName;const Pr=c.forwardRef(({className:e,...t},n)=>l.jsx(Jo,{ref:n,className:R("text-sm text-muted-foreground",e),...t}));Pr.displayName=Jo.displayName;const Mr=c.forwardRef(({className:e,...t},n)=>l.jsx(De,{ref:n,className:R("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Mr.displayName=De.displayName;const $x=({children:e,...t})=>l.jsx(Nr,{...t,children:l.jsx(Rn,{className:"overflow-hidden p-0 shadow-lg",children:l.jsx(Mr,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),ha=c.forwardRef(({className:e,...t},n)=>l.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[l.jsx(Mi,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),l.jsx(De.Input,{ref:n,className:R("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));ha.displayName=De.Input.displayName;const ga=c.forwardRef(({className:e,...t},n)=>l.jsx(De.List,{ref:n,className:R("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));ga.displayName=De.List.displayName;const va=c.forwardRef((e,t)=>l.jsx(De.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));va.displayName=De.Empty.displayName;const Tr=c.forwardRef(({className:e,...t},n)=>l.jsx(De.Group,{ref:n,className:R("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Tr.displayName=De.Group.displayName;const ba=c.forwardRef(({className:e,...t},n)=>l.jsx(De.Separator,{ref:n,className:R("-mx-1 h-px bg-border",e),...t}));ba.displayName=De.Separator.displayName;const nn=c.forwardRef(({className:e,...t},n)=>l.jsx(De.Item,{ref:n,className:R("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));nn.displayName=De.Item.displayName;const nu=({className:e,...t})=>l.jsx("span",{className:R("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});nu.displayName="CommandShortcut";const ru=P.forwardRef((e,t)=>{const{currencySymbol:n="$",decimalSeparator:r=".",thousandSeparator:o=",",onValueChange:a,className:s,value:i=0,...u}=e,d=P.useRef(null);P.useImperativeHandle(t,()=>d.current);const[f,p]=P.useState(""),v=g=>{const b=g.toFixed(2).split("."),y=b[0].replace(/\B(?=(\d{3})+(?!\d))/g,o);return`${n} ${y}${r}${b[1]}`},m=g=>{const b=g.target.value,y=parseFloat(b.replace(/\D/g,""))/100;p(v(y)),a(y),d.current&&window.requestAnimationFrame(()=>{var w;(w=d.current)==null||w.setSelectionRange(d.current.value.length,d.current.value.length)})},h=()=>{d.current&&d.current.setSelectionRange(d.current.value.length,d.current.value.length)};return P.useEffect(()=>{p(v(+i))},[i]),l.jsx(ar,{type:"text",inputMode:"numeric",value:f,ref:d,onChange:m,onFocus:h,onClick:h,placeholder:`${n} 0${r}00`,className:s,...u})});ru.displayName="CurrencyInput";const Fx=["top","right","bottom","left"],xt=Math.min,_e=Math.max,Ar=Math.round,Rr=Math.floor,et=e=>({x:e,y:e}),Bx={left:"right",right:"left",bottom:"top",top:"bottom"},Wx={start:"end",end:"start"};function ya(e,t,n){return _e(e,xt(t,n))}function dt(e,t){return typeof e=="function"?e(t):e}function ft(e){return e.split("-")[0]}function rn(e){return e.split("-")[1]}function wa(e){return e==="x"?"y":"x"}function xa(e){return e==="y"?"height":"width"}function Ct(e){return["top","bottom"].includes(ft(e))?"y":"x"}function Ca(e){return wa(Ct(e))}function zx(e,t,n){n===void 0&&(n=!1);const r=rn(e),o=Ca(e),a=xa(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=kr(s)),[s,kr(s)]}function Vx(e){const t=kr(e);return[Na(e),t,Na(t)]}function Na(e){return e.replace(/start|end/g,t=>Wx[t])}function Hx(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:s;default:return[]}}function Gx(e,t,n,r){const o=rn(e);let a=Hx(ft(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Na)))),a}function kr(e){return e.replace(/left|right|bottom|top/g,t=>Bx[t])}function Ux(e){return{top:0,right:0,bottom:0,left:0,...e}}function ou(e){return typeof e!="number"?Ux(e):{top:e,right:e,bottom:e,left:e}}function jr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function au(e,t,n){let{reference:r,floating:o}=e;const a=Ct(t),s=Ca(t),i=xa(s),u=ft(t),d=a==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,v=r[i]/2-o[i]/2;let m;switch(u){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:p};break;case"left":m={x:r.x-o.width,y:p};break;default:m={x:r.x,y:r.y}}switch(rn(t)){case"start":m[s]-=v*(n&&d?-1:1);break;case"end":m[s]+=v*(n&&d?-1:1);break}return m}const Yx=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=au(d,r,u),v=r,m={},h=0;for(let g=0;g<i.length;g++){const{name:b,fn:y}=i[g],{x:w,y:x,data:E,reset:S}=await y({x:f,y:p,initialPlacement:r,placement:v,strategy:o,middlewareData:m,rects:d,platform:s,elements:{reference:e,floating:t}});f=w??f,p=x??p,m={...m,[b]:{...m[b],...E}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(v=S.placement),S.rects&&(d=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:f,y:p}=au(d,v,u)),g=-1)}return{x:f,y:p,placement:v,strategy:o,middlewareData:m}};async function kn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:v=!1,padding:m=0}=dt(t,e),h=ou(m),b=i[v?p==="floating"?"reference":"floating":p],y=jr(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:d,rootBoundary:f,strategy:u})),w=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),E=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},S=jr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:x,strategy:u}):w);return{top:(y.top-S.top+h.top)/E.y,bottom:(S.bottom-y.bottom+h.bottom)/E.y,left:(y.left-S.left+h.left)/E.x,right:(S.right-y.right+h.right)/E.x}}const Kx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:u}=t,{element:d,padding:f=0}=dt(e,t)||{};if(d==null)return{};const p=ou(f),v={x:n,y:r},m=Ca(o),h=xa(m),g=await s.getDimensions(d),b=m==="y",y=b?"top":"left",w=b?"bottom":"right",x=b?"clientHeight":"clientWidth",E=a.reference[h]+a.reference[m]-v[m]-a.floating[h],S=v[m]-a.reference[m],M=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let T=M?M[x]:0;(!T||!await(s.isElement==null?void 0:s.isElement(M)))&&(T=i.floating[x]||a.floating[h]);const j=E/2-S/2,D=T/2-g[h]/2-1,z=xt(p[y],D),Y=xt(p[w],D),I=z,K=T-g[h]-Y,H=T/2-g[h]/2+j,J=ya(I,H,K),V=!u.arrow&&rn(o)!=null&&H!==J&&a.reference[h]/2-(H<I?z:Y)-g[h]/2<0,q=V?H<I?H-I:H-K:0;return{[m]:v[m]+q,data:{[m]:J,centerOffset:H-J-q,...V&&{alignmentOffset:q}},reset:V}}}),qx=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...b}=dt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=ft(o),w=Ct(i),x=ft(i)===i,E=await(u.isRTL==null?void 0:u.isRTL(d.floating)),S=v||(x||!g?[kr(i)]:Vx(i)),M=h!=="none";!v&&M&&S.push(...Gx(i,g,h,E));const T=[i,...S],j=await kn(t,b),D=[];let z=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&D.push(j[y]),p){const H=zx(o,s,E);D.push(j[H[0]],j[H[1]])}if(z=[...z,{placement:o,overflows:D}],!D.every(H=>H<=0)){var Y,I;const H=(((Y=a.flip)==null?void 0:Y.index)||0)+1,J=T[H];if(J)return{data:{index:H,overflows:z},reset:{placement:J}};let V=(I=z.filter(q=>q.overflows[0]<=0).sort((q,G)=>q.overflows[1]-G.overflows[1])[0])==null?void 0:I.placement;if(!V)switch(m){case"bestFit":{var K;const q=(K=z.filter(G=>{if(M){const k=Ct(G.placement);return k===w||k==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(k=>k>0).reduce((k,Q)=>k+Q,0)]).sort((G,k)=>G[1]-k[1])[0])==null?void 0:K[0];q&&(V=q);break}case"initialPlacement":V=i;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function su(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function iu(e){return Fx.some(t=>e[t]>=0)}const Xx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=dt(e,t);switch(r){case"referenceHidden":{const a=await kn(t,{...o,elementContext:"reference"}),s=su(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:iu(s)}}}case"escaped":{const a=await kn(t,{...o,altBoundary:!0}),s=su(a,n.floating);return{data:{escapedOffsets:s,escaped:iu(s)}}}default:return{}}}}};async function Qx(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ft(n),i=rn(n),u=Ct(n)==="y",d=["left","top"].includes(s)?-1:1,f=a&&u?-1:1,p=dt(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof h=="number"&&(m=i==="end"?h*-1:h),u?{x:m*f,y:v*d}:{x:v*d,y:m*f}}const Zx=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,u=await Qx(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:s}}}}},Jx=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:b=>{let{x:y,y:w}=b;return{x:y,y:w}}},...u}=dt(e,t),d={x:n,y:r},f=await kn(t,u),p=Ct(ft(o)),v=wa(p);let m=d[v],h=d[p];if(a){const b=v==="y"?"top":"left",y=v==="y"?"bottom":"right",w=m+f[b],x=m-f[y];m=ya(w,m,x)}if(s){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=h+f[b],x=h-f[y];h=ya(w,h,x)}const g=i.fn({...t,[v]:m,[p]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[v]:a,[p]:s}}}}}},e0=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:u=!0,crossAxis:d=!0}=dt(e,t),f={x:n,y:r},p=Ct(o),v=wa(p);let m=f[v],h=f[p];const g=dt(i,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){const x=v==="y"?"height":"width",E=a.reference[v]-a.floating[x]+b.mainAxis,S=a.reference[v]+a.reference[x]-b.mainAxis;m<E?m=E:m>S&&(m=S)}if(d){var y,w;const x=v==="y"?"width":"height",E=["top","left"].includes(ft(o)),S=a.reference[p]-a.floating[x]+(E&&((y=s.offset)==null?void 0:y[p])||0)+(E?0:b.crossAxis),M=a.reference[p]+a.reference[x]+(E?0:((w=s.offset)==null?void 0:w[p])||0)-(E?b.crossAxis:0);h<S?h=S:h>M&&(h=M)}return{[v]:m,[p]:h}}}},t0=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:u=()=>{},...d}=dt(e,t),f=await kn(t,d),p=ft(o),v=rn(o),m=Ct(o)==="y",{width:h,height:g}=a.floating;let b,y;p==="top"||p==="bottom"?(b=p,y=v===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=p,b=v==="end"?"top":"bottom");const w=g-f.top-f.bottom,x=h-f.left-f.right,E=xt(g-f[b],w),S=xt(h-f[y],x),M=!t.middlewareData.shift;let T=E,j=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=w),M&&!v){const z=_e(f.left,0),Y=_e(f.right,0),I=_e(f.top,0),K=_e(f.bottom,0);m?j=h-2*(z!==0||Y!==0?z+Y:_e(f.left,f.right)):T=g-2*(I!==0||K!==0?I+K:_e(f.top,f.bottom))}await u({...t,availableWidth:j,availableHeight:T});const D=await s.getDimensions(i.floating);return h!==D.width||g!==D.height?{reset:{rects:!0}}:{}}}};function Dr(){return typeof window<"u"}function on(e){return lu(e)?(e.nodeName||"").toLowerCase():"#document"}function Oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tt(e){var t;return(t=(lu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function lu(e){return Dr()?e instanceof Node||e instanceof Oe(e).Node:!1}function Ge(e){return Dr()?e instanceof Element||e instanceof Oe(e).Element:!1}function nt(e){return Dr()?e instanceof HTMLElement||e instanceof Oe(e).HTMLElement:!1}function cu(e){return!Dr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Oe(e).ShadowRoot}function jn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function n0(e){return["table","td","th"].includes(on(e))}function Ir(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Sa(e){const t=Ea(),n=Ge(e)?Ue(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function r0(e){let t=Nt(e);for(;nt(t)&&!an(t);){if(Sa(t))return t;if(Ir(t))return null;t=Nt(t)}return null}function Ea(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function an(e){return["html","body","#document"].includes(on(e))}function Ue(e){return Oe(e).getComputedStyle(e)}function _r(e){return Ge(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nt(e){if(on(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cu(e)&&e.host||tt(e);return cu(t)?t.host:t}function uu(e){const t=Nt(e);return an(t)?e.ownerDocument?e.ownerDocument.body:e.body:nt(t)&&jn(t)?t:uu(t)}function Dn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=uu(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Oe(o);if(a){const i=Pa(s);return t.concat(s,s.visualViewport||[],jn(o)?o:[],i&&n?Dn(i):[])}return t.concat(o,Dn(o,[],n))}function Pa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function du(e){const t=Ue(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=nt(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=Ar(n)!==a||Ar(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Ma(e){return Ge(e)?e:e.contextElement}function sn(e){const t=Ma(e);if(!nt(t))return et(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=du(t);let s=(a?Ar(n.width):n.width)/r,i=(a?Ar(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const o0=et(0);function fu(e){const t=Oe(e);return!Ea()||!t.visualViewport?o0:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function a0(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Oe(e)?!1:t}function Ft(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ma(e);let s=et(1);t&&(r?Ge(r)&&(s=sn(r)):s=sn(e));const i=a0(a,n,r)?fu(a):et(0);let u=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(a){const v=Oe(a),m=r&&Ge(r)?Oe(r):r;let h=v,g=Pa(h);for(;g&&r&&m!==h;){const b=sn(g),y=g.getBoundingClientRect(),w=Ue(g),x=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*b.x,E=y.top+(g.clientTop+parseFloat(w.paddingTop))*b.y;u*=b.x,d*=b.y,f*=b.x,p*=b.y,u+=x,d+=E,h=Oe(g),g=Pa(h)}}return jr({width:f,height:p,x:u,y:d})}function Ta(e,t){const n=_r(e).scrollLeft;return t?t.left+n:Ft(tt(e)).left+n}function mu(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Ta(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function s0(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=tt(r),i=t?Ir(t.floating):!1;if(r===s||i&&a)return n;let u={scrollLeft:0,scrollTop:0},d=et(1);const f=et(0),p=nt(r);if((p||!p&&!a)&&((on(r)!=="body"||jn(s))&&(u=_r(r)),nt(r))){const m=Ft(r);d=sn(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const v=s&&!p&&!a?mu(s,u,!0):et(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+f.x+v.x,y:n.y*d.y-u.scrollTop*d.y+f.y+v.y}}function i0(e){return Array.from(e.getClientRects())}function l0(e){const t=tt(e),n=_r(e),r=e.ownerDocument.body,o=_e(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_e(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ta(e);const i=-n.scrollTop;return Ue(r).direction==="rtl"&&(s+=_e(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}function c0(e,t){const n=Oe(e),r=tt(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,u=0;if(o){a=o.width,s=o.height;const d=Ea();(!d||d&&t==="fixed")&&(i=o.offsetLeft,u=o.offsetTop)}return{width:a,height:s,x:i,y:u}}function u0(e,t){const n=Ft(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=nt(e)?sn(e):et(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,u=o*a.x,d=r*a.y;return{width:s,height:i,x:u,y:d}}function pu(e,t,n){let r;if(t==="viewport")r=c0(e,n);else if(t==="document")r=l0(tt(e));else if(Ge(t))r=u0(t,n);else{const o=fu(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return jr(r)}function hu(e,t){const n=Nt(e);return n===t||!Ge(n)||an(n)?!1:Ue(n).position==="fixed"||hu(n,t)}function d0(e,t){const n=t.get(e);if(n)return n;let r=Dn(e,[],!1).filter(i=>Ge(i)&&on(i)!=="body"),o=null;const a=Ue(e).position==="fixed";let s=a?Nt(e):e;for(;Ge(s)&&!an(s);){const i=Ue(s),u=Sa(s);!u&&i.position==="fixed"&&(o=null),(a?!u&&!o:!u&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||jn(s)&&!u&&hu(e,s))?r=r.filter(f=>f!==s):o=i,s=Nt(s)}return t.set(e,r),r}function f0(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Ir(t)?[]:d0(t,this._c):[].concat(n),r],i=s[0],u=s.reduce((d,f)=>{const p=pu(t,f,o);return d.top=_e(p.top,d.top),d.right=xt(p.right,d.right),d.bottom=xt(p.bottom,d.bottom),d.left=_e(p.left,d.left),d},pu(t,i,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function m0(e){const{width:t,height:n}=du(e);return{width:t,height:n}}function p0(e,t,n){const r=nt(t),o=tt(t),a=n==="fixed",s=Ft(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const u=et(0);if(r||!r&&!a)if((on(t)!=="body"||jn(o))&&(i=_r(t)),r){const v=Ft(t,!0,a,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else o&&(u.x=Ta(o));const d=o&&!r&&!a?mu(o,i):et(0),f=s.left+i.scrollLeft-u.x-d.x,p=s.top+i.scrollTop-u.y-d.y;return{x:f,y:p,width:s.width,height:s.height}}function Aa(e){return Ue(e).position==="static"}function gu(e,t){if(!nt(e)||Ue(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return tt(e)===n&&(n=n.ownerDocument.body),n}function vu(e,t){const n=Oe(e);if(Ir(e))return n;if(!nt(e)){let o=Nt(e);for(;o&&!an(o);){if(Ge(o)&&!Aa(o))return o;o=Nt(o)}return n}let r=gu(e,t);for(;r&&n0(r)&&Aa(r);)r=gu(r,t);return r&&an(r)&&Aa(r)&&!Sa(r)?n:r||r0(e)||n}const h0=async function(e){const t=this.getOffsetParent||vu,n=this.getDimensions,r=await n(e.floating);return{reference:p0(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function g0(e){return Ue(e).direction==="rtl"}const v0={convertOffsetParentRelativeRectToViewportRelativeRect:s0,getDocumentElement:tt,getClippingRect:f0,getOffsetParent:vu,getElementRects:h0,getClientRects:i0,getDimensions:m0,getScale:sn,isElement:Ge,isRTL:g0};function b0(e,t){let n=null,r;const o=tt(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),a();const{left:d,top:f,width:p,height:v}=e.getBoundingClientRect();if(i||t(),!p||!v)return;const m=Rr(f),h=Rr(o.clientWidth-(d+p)),g=Rr(o.clientHeight-(f+v)),b=Rr(d),w={rootMargin:-m+"px "+-h+"px "+-g+"px "+-b+"px",threshold:_e(0,xt(1,u))||1};let x=!0;function E(S){const M=S[0].intersectionRatio;if(M!==u){if(!x)return s();M?s(!1,M):r=setTimeout(()=>{s(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return s(!0),a}function y0(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=Ma(e),f=o||a?[...d?Dn(d):[],...Dn(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const p=d&&i?b0(d,n):null;let v=-1,m=null;s&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),n()}),d&&!u&&m.observe(d),m.observe(t));let h,g=u?Ft(e):null;u&&b();function b(){const y=Ft(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,h=requestAnimationFrame(b)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(h)}}const w0=Zx,x0=Jx,C0=qx,N0=t0,S0=Xx,bu=Kx,E0=e0,P0=(e,t,n)=>{const r=new Map,o={platform:v0,...n},a={...o.platform,_c:r};return Yx(e,t,{...o,platform:a})};var Or=typeof document<"u"?P.useLayoutEffect:P.useEffect;function Lr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Lr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Lr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function yu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wu(e,t){const n=yu(e);return Math.round(t*n)/n}function Ra(e){const t=c.useRef(e);return Or(()=>{t.current=e}),t}function M0(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:u,open:d}=e,[f,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=c.useState(r);Lr(v,r)||m(r);const[h,g]=c.useState(null),[b,y]=c.useState(null),w=c.useCallback(G=>{G!==M.current&&(M.current=G,g(G))},[]),x=c.useCallback(G=>{G!==T.current&&(T.current=G,y(G))},[]),E=a||h,S=s||b,M=c.useRef(null),T=c.useRef(null),j=c.useRef(f),D=u!=null,z=Ra(u),Y=Ra(o),I=Ra(d),K=c.useCallback(()=>{if(!M.current||!T.current)return;const G={placement:t,strategy:n,middleware:v};Y.current&&(G.platform=Y.current),P0(M.current,T.current,G).then(k=>{const Q={...k,isPositioned:I.current!==!1};H.current&&!Lr(j.current,Q)&&(j.current=Q,Kn.flushSync(()=>{p(Q)}))})},[v,t,n,Y,I]);Or(()=>{d===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,p(G=>({...G,isPositioned:!1})))},[d]);const H=c.useRef(!1);Or(()=>(H.current=!0,()=>{H.current=!1}),[]),Or(()=>{if(E&&(M.current=E),S&&(T.current=S),E&&S){if(z.current)return z.current(E,S,K);K()}},[E,S,K,z,D]);const J=c.useMemo(()=>({reference:M,floating:T,setReference:w,setFloating:x}),[w,x]),V=c.useMemo(()=>({reference:E,floating:S}),[E,S]),q=c.useMemo(()=>{const G={position:n,left:0,top:0};if(!V.floating)return G;const k=wu(V.floating,f.x),Q=wu(V.floating,f.y);return i?{...G,transform:"translate("+k+"px, "+Q+"px)",...yu(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:Q}},[n,i,V.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:K,refs:J,elements:V,floatingStyles:q}),[f,K,J,V,q])}const T0=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?bu({element:r.current,padding:o}).fn(n):{}:r?bu({element:r,padding:o}).fn(n):{}}}},A0=(e,t)=>({...w0(e),options:[e,t]}),R0=(e,t)=>({...x0(e),options:[e,t]}),k0=(e,t)=>({...E0(e),options:[e,t]}),j0=(e,t)=>({...C0(e),options:[e,t]}),D0=(e,t)=>({...N0(e),options:[e,t]}),I0=(e,t)=>({...S0(e),options:[e,t]}),_0=(e,t)=>({...T0(e),options:[e,t]});var O0="Arrow",xu=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return l.jsx($.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});xu.displayName=O0;var L0=xu,ka="Popper",[Cu,St]=ye(ka),[$0,Nu]=Cu(ka),Su=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return l.jsx($0,{scope:t,anchor:r,onAnchorChange:o,children:n})};Su.displayName=ka;var Eu="PopperAnchor",Pu=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Nu(Eu,n),s=c.useRef(null),i=oe(t,s);return c.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:l.jsx($.div,{...o,ref:i})});Pu.displayName=Eu;var ja="PopperContent",[F0,B0]=Cu(ja),Mu=c.forwardRef((e,t)=>{var _,Z,te,ne,ie,ce;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:h,...g}=e,b=Nu(ja,n),[y,w]=c.useState(null),x=oe(t,Se=>w(Se)),[E,S]=c.useState(null),M=wr(E),T=(M==null?void 0:M.width)??0,j=(M==null?void 0:M.height)??0,D=r+(a!=="center"?"-"+a:""),z=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},Y=Array.isArray(d)?d:[d],I=Y.length>0,K={padding:z,boundary:Y.filter(z0),altBoundary:I},{refs:H,floatingStyles:J,placement:V,isPositioned:q,middlewareData:G}=M0({strategy:"fixed",placement:D,whileElementsMounted:(...Se)=>y0(...Se,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[A0({mainAxis:o+j,alignmentAxis:s}),u&&R0({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?k0():void 0,...K}),u&&j0({...K}),D0({...K,apply:({elements:Se,rects:ve,availableWidth:Ae,availableHeight:We})=>{const{width:Pe,height:$e}=ve.reference,Re=Se.floating.style;Re.setProperty("--radix-popper-available-width",`${Ae}px`),Re.setProperty("--radix-popper-available-height",`${We}px`),Re.setProperty("--radix-popper-anchor-width",`${Pe}px`),Re.setProperty("--radix-popper-anchor-height",`${$e}px`)}}),E&&_0({element:E,padding:i}),V0({arrowWidth:T,arrowHeight:j}),v&&I0({strategy:"referenceHidden",...K})]}),[k,Q]=Ru(V),ee=we(h);xe(()=>{q&&(ee==null||ee())},[q,ee]);const A=(_=G.arrow)==null?void 0:_.x,L=(Z=G.arrow)==null?void 0:Z.y,F=((te=G.arrow)==null?void 0:te.centerOffset)!==0,[B,X]=c.useState();return xe(()=>{y&&X(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:q?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B,"--radix-popper-transform-origin":[(ne=G.transformOrigin)==null?void 0:ne.x,(ie=G.transformOrigin)==null?void 0:ie.y].join(" "),...((ce=G.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(F0,{scope:n,placedSide:k,onArrowChange:S,arrowX:A,arrowY:L,shouldHideArrow:F,children:l.jsx($.div,{"data-side":k,"data-align":Q,...g,ref:x,style:{...g.style,animation:q?void 0:"none"}})})})});Mu.displayName=ja;var Tu="PopperArrow",W0={top:"bottom",right:"left",bottom:"top",left:"right"},Au=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=B0(Tu,r),s=W0[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]: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:l.jsx(L0,{...o,ref:n,style:{...o.style,display:"block"}})})});Au.displayName=Tu;function z0(e){return e!==null}var V0=e=>({name:"transformOrigin",options:e,fn(t){var b,y,w;const{placement:n,rects:r,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,i=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[d,f]=Ru(n),p={start:"0%",center:"50%",end:"100%"}[f],v=(((y=o.arrow)==null?void 0:y.x)??0)+i/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let h="",g="";return d==="bottom"?(h=s?p:`${v}px`,g=`${-u}px`):d==="top"?(h=s?p:`${v}px`,g=`${r.floating.height+u}px`):d==="right"?(h=`${-u}px`,g=s?p:`${m}px`):d==="left"&&(h=`${r.floating.width+u}px`,g=s?p:`${m}px`),{data:{x:h,y:g}}}});function Ru(e){const[t,n="center"]=e.split("-");return[t,n]}var In=Su,_n=Pu,$r=Mu,Fr=Au,Da="rovingFocusGroup.onEntryFocus",H0={bubbles:!1,cancelable:!0},Br="RovingFocusGroup",[Ia,ku,G0]=qt(Br),[U0,Et]=ye(Br,[G0]),[Y0,K0]=U0(Br),ju=c.forwardRef((e,t)=>l.jsx(Ia.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ia.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(q0,{...e,ref:t})})}));ju.displayName=Br;var q0=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,v=c.useRef(null),m=oe(t,v),h=bt(a),[g=null,b]=Ce({prop:s,defaultProp:i,onChange:u}),[y,w]=c.useState(!1),x=we(d),E=ku(n),S=c.useRef(!1),[M,T]=c.useState(0);return c.useEffect(()=>{const j=v.current;if(j)return j.addEventListener(Da,x),()=>j.removeEventListener(Da,x)},[x]),l.jsx(Y0,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(j=>b(j),[b]),onItemShiftTab:c.useCallback(()=>w(!0),[]),onFocusableItemAdd:c.useCallback(()=>T(j=>j+1),[]),onFocusableItemRemove:c.useCallback(()=>T(j=>j-1),[]),children:l.jsx($.div,{tabIndex:y||M===0?-1:0,"data-orientation":r,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:O(e.onMouseDown,()=>{S.current=!0}),onFocus:O(e.onFocus,j=>{const D=!S.current;if(j.target===j.currentTarget&&D&&!y){const z=new CustomEvent(Da,H0);if(j.currentTarget.dispatchEvent(z),!z.defaultPrevented){const Y=E().filter(V=>V.focusable),I=Y.find(V=>V.active),K=Y.find(V=>V.id===g),J=[I,K,...Y].filter(Boolean).map(V=>V.ref.current);_u(J,f)}}S.current=!1}),onBlur:O(e.onBlur,()=>w(!1))})})}),Du="RovingFocusGroupItem",Iu=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...s}=e,i=he(),u=a||i,d=K0(Du,n),f=d.currentTabStopId===u,p=ku(n),{onFocusableItemAdd:v,onFocusableItemRemove:m}=d;return c.useEffect(()=>{if(r)return v(),()=>m()},[r,v,m]),l.jsx(Ia.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:l.jsx($.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:O(e.onMouseDown,h=>{r?d.onItemFocus(u):h.preventDefault()}),onFocus:O(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:O(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){d.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const g=Z0(h,d.orientation,d.dir);if(g!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let y=p().filter(w=>w.focusable).map(w=>w.ref.current);if(g==="last")y.reverse();else if(g==="prev"||g==="next"){g==="prev"&&y.reverse();const w=y.indexOf(h.currentTarget);y=d.loop?J0(y,w+1):y.slice(w+1)}setTimeout(()=>_u(y))}})})})});Iu.displayName=Du;var X0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Q0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Z0(e,t,n){const r=Q0(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return X0[r]}function _u(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function J0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Wr=ju,zr=Iu,_a=["Enter"," "],eC=["ArrowDown","PageUp","Home"],Ou=["ArrowUp","PageDown","End"],tC=[...eC,...Ou],nC={ltr:[..._a,"ArrowRight"],rtl:[..._a,"ArrowLeft"]},rC={ltr:["ArrowLeft"],rtl:["ArrowRight"]},On="Menu",[Ln,oC,aC]=qt(On),[Bt,Lu]=ye(On,[aC,St,Et]),$n=St(),$u=Et(),[Fu,Pt]=Bt(On),[sC,Fn]=Bt(On),Bu=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=$n(t),[u,d]=c.useState(null),f=c.useRef(!1),p=we(a),v=bt(o);return c.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),l.jsx(In,{...i,children:l.jsx(Fu,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:d,children:l.jsx(sC,{scope:t,onClose:c.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:v,modal:s,children:r})})})};Bu.displayName=On;var iC="MenuAnchor",Oa=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=$n(n);return l.jsx(_n,{...o,...r,ref:t})});Oa.displayName=iC;var La="MenuPortal",[lC,Wu]=Bt(La,{forceMount:void 0}),zu=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Pt(La,t);return l.jsx(lC,{scope:t,forceMount:n,children:l.jsx(Ne,{present:n||a.open,children:l.jsx(Sn,{asChild:!0,container:o,children:r})})})};zu.displayName=La;var Fe="MenuContent",[cC,$a]=Bt(Fe),Vu=c.forwardRef((e,t)=>{const n=Wu(Fe,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Pt(Fe,e.__scopeMenu),s=Fn(Fe,e.__scopeMenu);return l.jsx(Ln.Provider,{scope:e.__scopeMenu,children:l.jsx(Ne,{present:r||a.open,children:l.jsx(Ln.Slot,{scope:e.__scopeMenu,children:s.modal?l.jsx(uC,{...o,ref:t}):l.jsx(dC,{...o,ref:t})})})})}),uC=c.forwardRef((e,t)=>{const n=Pt(Fe,e.__scopeMenu),r=c.useRef(null),o=oe(t,r);return c.useEffect(()=>{const a=r.current;if(a)return pr(a)},[]),l.jsx(Fa,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:O(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),dC=c.forwardRef((e,t)=>{const n=Pt(Fe,e.__scopeMenu);return l.jsx(Fa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Fa=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:v,onDismiss:m,disableOutsideScroll:h,...g}=e,b=Pt(Fe,n),y=Fn(Fe,n),w=$n(n),x=$u(n),E=oC(n),[S,M]=c.useState(null),T=c.useRef(null),j=oe(t,T,b.onContentChange),D=c.useRef(0),z=c.useRef(""),Y=c.useRef(0),I=c.useRef(null),K=c.useRef("right"),H=c.useRef(0),J=h?En:c.Fragment,V=h?{as:lt,allowPinchZoom:!0}:void 0,q=k=>{var _,Z;const Q=z.current+k,ee=E().filter(te=>!te.disabled),A=document.activeElement,L=(_=ee.find(te=>te.ref.current===A))==null?void 0:_.textValue,F=ee.map(te=>te.textValue),B=NC(F,Q,L),X=(Z=ee.find(te=>te.textValue===B))==null?void 0:Z.ref.current;(function te(ne){z.current=ne,window.clearTimeout(D.current),ne!==""&&(D.current=window.setTimeout(()=>te(""),1e3))})(Q),X&&setTimeout(()=>X.focus())};c.useEffect(()=>()=>window.clearTimeout(D.current),[]),sr();const G=c.useCallback(k=>{var ee,A;return K.current===((ee=I.current)==null?void 0:ee.side)&&EC(k,(A=I.current)==null?void 0:A.area)},[]);return l.jsx(cC,{scope:n,searchRef:z,onItemEnter:c.useCallback(k=>{G(k)&&k.preventDefault()},[G]),onItemLeave:c.useCallback(k=>{var Q;G(k)||((Q=T.current)==null||Q.focus(),M(null))},[G]),onTriggerLeave:c.useCallback(k=>{G(k)&&k.preventDefault()},[G]),pointerGraceTimerRef:Y,onPointerGraceIntentChange:c.useCallback(k=>{I.current=k},[]),children:l.jsx(J,{...V,children:l.jsx(Nn,{asChild:!0,trapped:o,onMountAutoFocus:O(a,k=>{var Q;k.preventDefault(),(Q=T.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:l.jsx(It,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:v,onDismiss:m,children:l.jsx(Wr,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:M,onEntryFocus:O(u,k=>{y.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx($r,{role:"menu","aria-orientation":"vertical","data-state":id(b.open),"data-radix-menu-content":"",dir:y.dir,...w,...g,ref:j,style:{outline:"none",...g.style},onKeyDown:O(g.onKeyDown,k=>{const ee=k.target.closest("[data-radix-menu-content]")===k.currentTarget,A=k.ctrlKey||k.altKey||k.metaKey,L=k.key.length===1;ee&&(k.key==="Tab"&&k.preventDefault(),!A&&L&&q(k.key));const F=T.current;if(k.target!==F||!tC.includes(k.key))return;k.preventDefault();const X=E().filter(_=>!_.disabled).map(_=>_.ref.current);Ou.includes(k.key)&&X.reverse(),xC(X)}),onBlur:O(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(D.current),z.current="")}),onPointerMove:O(e.onPointerMove,Wn(k=>{const Q=k.target,ee=H.current!==k.clientX;if(k.currentTarget.contains(Q)&&ee){const A=k.clientX>H.current?"right":"left";K.current=A,H.current=k.clientX}}))})})})})})})});Vu.displayName=Fe;var fC="MenuGroup",Ba=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx($.div,{role:"group",...r,ref:t})});Ba.displayName=fC;var mC="MenuLabel",Hu=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx($.div,{...r,ref:t})});Hu.displayName=mC;var Vr="MenuItem",Gu="menu.itemSelect",Hr=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=c.useRef(null),s=Fn(Vr,e.__scopeMenu),i=$a(Vr,e.__scopeMenu),u=oe(t,a),d=c.useRef(!1),f=()=>{const p=a.current;if(!n&&p){const v=new CustomEvent(Gu,{bubbles:!0,cancelable:!0});p.addEventListener(Gu,m=>r==null?void 0:r(m),{once:!0}),Jn(p,v),v.defaultPrevented?d.current=!1:s.onClose()}};return l.jsx(Uu,{...o,ref:u,disabled:n,onClick:O(e.onClick,f),onPointerDown:p=>{var v;(v=e.onPointerDown)==null||v.call(e,p),d.current=!0},onPointerUp:O(e.onPointerUp,p=>{var v;d.current||(v=p.currentTarget)==null||v.click()}),onKeyDown:O(e.onKeyDown,p=>{const v=i.searchRef.current!=="";n||v&&p.key===" "||_a.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Hr.displayName=Vr;var Uu=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=$a(Vr,n),i=$u(n),u=c.useRef(null),d=oe(t,u),[f,p]=c.useState(!1),[v,m]=c.useState("");return c.useEffect(()=>{const h=u.current;h&&m((h.textContent??"").trim())},[a.children]),l.jsx(Ln.ItemSlot,{scope:n,disabled:r,textValue:o??v,children:l.jsx(zr,{asChild:!0,...i,focusable:!r,children:l.jsx($.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:O(e.onPointerMove,Wn(h=>{r?s.onItemLeave(h):(s.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:O(e.onPointerLeave,Wn(h=>s.onItemLeave(h))),onFocus:O(e.onFocus,()=>p(!0)),onBlur:O(e.onBlur,()=>p(!1))})})})}),pC="MenuCheckboxItem",Yu=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return l.jsx(Zu,{scope:e.__scopeMenu,checked:n,children:l.jsx(Hr,{role:"menuitemcheckbox","aria-checked":Gr(n)?"mixed":n,...o,ref:t,"data-state":Va(n),onSelect:O(o.onSelect,()=>r==null?void 0:r(Gr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Yu.displayName=pC;var Ku="MenuRadioGroup",[hC,gC]=Bt(Ku,{value:void 0,onValueChange:()=>{}}),qu=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=we(r);return l.jsx(hC,{scope:e.__scopeMenu,value:n,onValueChange:a,children:l.jsx(Ba,{...o,ref:t})})});qu.displayName=Ku;var Xu="MenuRadioItem",Qu=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=gC(Xu,e.__scopeMenu),a=n===o.value;return l.jsx(Zu,{scope:e.__scopeMenu,checked:a,children:l.jsx(Hr,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Va(a),onSelect:O(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Qu.displayName=Xu;var Wa="MenuItemIndicator",[Zu,vC]=Bt(Wa,{checked:!1}),Ju=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=vC(Wa,n);return l.jsx(Ne,{present:r||Gr(a.checked)||a.checked===!0,children:l.jsx($.span,{...o,ref:t,"data-state":Va(a.checked)})})});Ju.displayName=Wa;var bC="MenuSeparator",ed=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx($.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});ed.displayName=bC;var yC="MenuArrow",td=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=$n(n);return l.jsx(Fr,{...o,...r,ref:t})});td.displayName=yC;var za="MenuSub",[wC,nd]=Bt(za),rd=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Pt(za,t),s=$n(t),[i,u]=c.useState(null),[d,f]=c.useState(null),p=we(o);return c.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),l.jsx(In,{...s,children:l.jsx(Fu,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:f,children:l.jsx(wC,{scope:t,contentId:he(),triggerId:he(),trigger:i,onTriggerChange:u,children:n})})})};rd.displayName=za;var Bn="MenuSubTrigger",od=c.forwardRef((e,t)=>{const n=Pt(Bn,e.__scopeMenu),r=Fn(Bn,e.__scopeMenu),o=nd(Bn,e.__scopeMenu),a=$a(Bn,e.__scopeMenu),s=c.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const p=i.current;return()=>{window.clearTimeout(p),u(null)}},[i,u]),l.jsx(Oa,{asChild:!0,...d,children:l.jsx(Uu,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":id(n.open),...e,ref:Cn(t,o.onTriggerChange),onClick:p=>{var v;(v=e.onClick)==null||v.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:O(e.onPointerMove,Wn(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:O(e.onPointerLeave,Wn(p=>{var m,h;f();const v=(m=n.content)==null?void 0:m.getBoundingClientRect();if(v){const g=(h=n.content)==null?void 0:h.dataset.side,b=g==="right",y=b?-5:5,w=v[b?"left":"right"],x=v[b?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+y,y:p.clientY},{x:w,y:v.top},{x,y:v.top},{x,y:v.bottom},{x:w,y:v.bottom}],side:g}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:O(e.onKeyDown,p=>{var m;const v=a.searchRef.current!=="";e.disabled||v&&p.key===" "||nC[r.dir].includes(p.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),p.preventDefault())})})})});od.displayName=Bn;var ad="MenuSubContent",sd=c.forwardRef((e,t)=>{const n=Wu(Fe,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Pt(Fe,e.__scopeMenu),s=Fn(Fe,e.__scopeMenu),i=nd(ad,e.__scopeMenu),u=c.useRef(null),d=oe(t,u);return l.jsx(Ln.Provider,{scope:e.__scopeMenu,children:l.jsx(Ne,{present:r||a.open,children:l.jsx(Ln.Slot,{scope:e.__scopeMenu,children:l.jsx(Fa,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:d,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;s.isUsingKeyboardRef.current&&((p=u.current)==null||p.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:O(e.onFocusOutside,f=>{f.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:O(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:O(e.onKeyDown,f=>{var m;const p=f.currentTarget.contains(f.target),v=rC[s.dir].includes(f.key);p&&v&&(a.onOpenChange(!1),(m=i.trigger)==null||m.focus(),f.preventDefault())})})})})})});sd.displayName=ad;function id(e){return e?"open":"closed"}function Gr(e){return e==="indeterminate"}function Va(e){return Gr(e)?"indeterminate":e?"checked":"unchecked"}function xC(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function CC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function NC(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=CC(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const u=s.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function SC(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,u=t[a].y,d=t[s].x,f=t[s].y;u>r!=f>r&&n<(d-i)*(r-u)/(f-u)+i&&(o=!o)}return o}function EC(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return SC(n,t)}function Wn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var PC=Bu,MC=Oa,TC=zu,AC=Vu,RC=Ba,kC=Hu,jC=Hr,DC=Yu,IC=qu,_C=Qu,OC=Ju,LC=ed,$C=td,FC=rd,BC=od,WC=sd,Ha="DropdownMenu",[zC,rP]=ye(Ha,[Lu]),Te=Lu(),[VC,ld]=zC(Ha),cd=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,u=Te(t),d=c.useRef(null),[f=!1,p]=Ce({prop:o,defaultProp:a,onChange:s});return l.jsx(VC,{scope:t,triggerId:he(),triggerRef:d,contentId:he(),open:f,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(v=>!v),[p]),modal:i,children:l.jsx(PC,{...u,open:f,onOpenChange:p,dir:r,modal:i,children:n})})};cd.displayName=Ha;var ud="DropdownMenuTrigger",dd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=ld(ud,n),s=Te(n);return l.jsx(MC,{asChild:!0,...s,children:l.jsx($.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":r?"":void 0,disabled:r,...o,ref:Cn(t,a.triggerRef),onPointerDown:O(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:O(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});dd.displayName=ud;var HC="DropdownMenuPortal",fd=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Te(t);return l.jsx(TC,{...r,...n})};fd.displayName=HC;var md="DropdownMenuContent",pd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ld(md,n),a=Te(n),s=c.useRef(!1);return l.jsx(AC,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:O(e.onCloseAutoFocus,i=>{var u;s.current||(u=o.triggerRef.current)==null||u.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:O(e.onInteractOutside,i=>{const u=i.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!o.modal||f)&&(s.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)"}})});pd.displayName=md;var GC="DropdownMenuGroup",hd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(RC,{...o,...r,ref:t})});hd.displayName=GC;var UC="DropdownMenuLabel",gd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(kC,{...o,...r,ref:t})});gd.displayName=UC;var YC="DropdownMenuItem",vd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(jC,{...o,...r,ref:t})});vd.displayName=YC;var KC="DropdownMenuCheckboxItem",bd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(DC,{...o,...r,ref:t})});bd.displayName=KC;var qC="DropdownMenuRadioGroup",yd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(IC,{...o,...r,ref:t})});yd.displayName=qC;var XC="DropdownMenuRadioItem",wd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(_C,{...o,...r,ref:t})});wd.displayName=XC;var QC="DropdownMenuItemIndicator",xd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(OC,{...o,...r,ref:t})});xd.displayName=QC;var ZC="DropdownMenuSeparator",Cd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(LC,{...o,...r,ref:t})});Cd.displayName=ZC;var JC="DropdownMenuArrow",e1=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx($C,{...o,...r,ref:t})});e1.displayName=JC;var t1=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Te(t),[i=!1,u]=Ce({prop:r,defaultProp:a,onChange:o});return l.jsx(FC,{...s,open:i,onOpenChange:u,children:n})},n1="DropdownMenuSubTrigger",Nd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(BC,{...o,...r,ref:t})});Nd.displayName=n1;var r1="DropdownMenuSubContent",Sd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(WC,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Sd.displayName=r1;var o1=cd,a1=dd,Ed=fd,Pd=pd,s1=hd,Md=gd,Td=vd,Ad=bd,i1=yd,Rd=wd,kd=xd,jd=Cd,l1=t1,Dd=Nd,Id=Sd;const c1=o1,u1=a1,d1=s1,f1=Ed,m1=l1,p1=i1,_d=c.forwardRef(({className:e,inset:t,children:n,...r},o)=>l.jsxs(Dd,{ref:o,className:R("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,l.jsx(Zn,{className:"ml-auto"})]}));_d.displayName=Dd.displayName;const Od=c.forwardRef(({className:e,...t},n)=>l.jsx(Id,{ref:n,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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",e),...t}));Od.displayName=Id.displayName;const Ld=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(Ed,{children:l.jsx(Pd,{ref:r,sideOffset:t,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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",e),...n})}));Ld.displayName=Pd.displayName;const $d=c.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(Td,{ref:r,className:R("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-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));$d.displayName=Td.displayName;const Fd=c.forwardRef(({className:e,children:t,checked:n,...r},o)=>l.jsxs(Ad,{ref:o,className:R("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-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(kd,{children:l.jsx(xn,{className:"h-4 w-4"})})}),t]}));Fd.displayName=Ad.displayName;const Bd=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Rd,{ref:r,className:R("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-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(kd,{children:l.jsx(Pi,{className:"h-2 w-2 fill-current"})})}),t]}));Bd.displayName=Rd.displayName;const Wd=c.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(Md,{ref:r,className:R("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Wd.displayName=Md.displayName;const zd=c.forwardRef(({className:e,...t},n)=>l.jsx(jd,{ref:n,className:R("-mx-1 my-1 h-px bg-muted",e),...t}));zd.displayName=jd.displayName;const Vd=({className:e,...t})=>l.jsx("span",{className:R("ml-auto text-xs tracking-widest opacity-60",e),...t});Vd.displayName="DropdownMenuShortcut";var h1="Label",Hd=c.forwardRef((e,t)=>l.jsx($.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Hd.displayName=h1;var Gd=Hd;const g1=Dt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ud=c.forwardRef(({className:e,...t},n)=>l.jsx(Gd,{ref:n,className:R(g1(),e),...t}));Ud.displayName=Gd.displayName;var Ga="Popover",[Yd,oP]=ye(Ga,[St]),zn=St(),[v1,Mt]=Yd(Ga),Kd=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=zn(t),u=c.useRef(null),[d,f]=c.useState(!1),[p=!1,v]=Ce({prop:r,defaultProp:o,onChange:a});return l.jsx(In,{...i,children:l.jsx(v1,{scope:t,contentId:he(),triggerRef:u,open:p,onOpenChange:v,onOpenToggle:c.useCallback(()=>v(m=>!m),[v]),hasCustomAnchor:d,onCustomAnchorAdd:c.useCallback(()=>f(!0),[]),onCustomAnchorRemove:c.useCallback(()=>f(!1),[]),modal:s,children:n})})};Kd.displayName=Ga;var qd="PopoverAnchor",Xd=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mt(qd,n),a=zn(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return c.useEffect(()=>(s(),()=>i()),[s,i]),l.jsx(_n,{...a,...r,ref:t})});Xd.displayName=qd;var Qd="PopoverTrigger",Zd=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mt(Qd,n),a=zn(n),s=oe(t,o.triggerRef),i=l.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":rf(o.open),...r,ref:s,onClick:O(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(_n,{asChild:!0,...a,children:i})});Zd.displayName=Qd;var Ua="PopoverPortal",[b1,y1]=Yd(Ua,{forceMount:void 0}),Jd=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Mt(Ua,t);return l.jsx(b1,{scope:t,forceMount:n,children:l.jsx(Ne,{present:n||a.open,children:l.jsx(Sn,{asChild:!0,container:o,children:r})})})};Jd.displayName=Ua;var ln="PopoverContent",ef=c.forwardRef((e,t)=>{const n=y1(ln,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Mt(ln,e.__scopePopover);return l.jsx(Ne,{present:r||a.open,children:a.modal?l.jsx(w1,{...o,ref:t}):l.jsx(x1,{...o,ref:t})})});ef.displayName=ln;var w1=c.forwardRef((e,t)=>{const n=Mt(ln,e.__scopePopover),r=c.useRef(null),o=oe(t,r),a=c.useRef(!1);return c.useEffect(()=>{const s=r.current;if(s)return pr(s)},[]),l.jsx(En,{as:lt,allowPinchZoom:!0,children:l.jsx(tf,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:O(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:O(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,d=i.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:O(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),x1=c.forwardRef((e,t)=>{const n=Mt(ln,e.__scopePopover),r=c.useRef(!1),o=c.useRef(!1);return l.jsx(tf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),tf=c.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,...p}=e,v=Mt(ln,n),m=zn(n);return sr(),l.jsx(Nn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(It,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:l.jsx($r,{"data-state":rf(v.open),role:"dialog",id:v.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)"}})})})}),nf="PopoverClose",C1=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mt(nf,n);return l.jsx($.button,{type:"button",...r,ref:t,onClick:O(e.onClick,()=>o.onOpenChange(!1))})});C1.displayName=nf;var N1="PopoverArrow",S1=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=zn(n);return l.jsx(Fr,{...o,...r,ref:t})});S1.displayName=N1;function rf(e){return e?"open":"closed"}var E1=Kd,P1=Xd,M1=Zd,T1=Jd,of=ef;const af=E1,sf=M1,A1=P1,Ya=c.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>l.jsx(T1,{children:l.jsx(of,{ref:o,align:t,sideOffset:n,className:R("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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})}));Ya.displayName=of.displayName;var R1="Separator",lf="horizontal",k1=["horizontal","vertical"],cf=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=lf,...o}=e,a=j1(r)?r:lf,i=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return l.jsx($.div,{"data-orientation":a,...i,...o,ref:t})});cf.displayName=R1;function j1(e){return k1.includes(e)}var uf=cf;const Ur=c.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>l.jsx(uf,{ref:o,decorative:n,orientation:t,className:R("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Ur.displayName=uf.displayName;const df=Dt("m-1 transition ease-in-out delay-150 hover:-translate-y-1 hover:scale-110 duration-300",{variants:{variant:{default:"border-foreground/10 text-foreground bg-card hover:bg-card/80",secondary:"border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",inverted:"inverted"}},defaultVariants:{variant:"default"}}),ff=c.forwardRef(({options:e,onValueChange:t,variant:n,defaultValue:r=[],placeholder:o="Select options",maxCount:a=3,modalPopover:s=!1,asChild:i=!1,className:u,...d},f)=>{const[p,v]=c.useState(r),[m,h]=c.useState(!1);c.useState(!1);const g=S=>{if(S.key==="Enter")h(!0);else if(S.key==="Backspace"&&!S.currentTarget.value){const M=[...p];M.pop(),v(M),t(M)}},b=S=>{const M=p.includes(S)?p.filter(T=>T!==S):[...p,S];v(M),t(M)},y=()=>{v([]),t([])},w=()=>{h(S=>!S)},x=()=>{const S=p.slice(0,a);v(S),t(S)},E=()=>{if(p.length===e.length)y();else{const S=e.map(M=>M.value);v(S),t(S)}};return l.jsxs(af,{open:m,onOpenChange:h,modal:s,children:[l.jsx(sf,{asChild:!0,children:l.jsx(Ee,{ref:f,...d,onClick:w,className:R("flex w-full p-1 rounded-md border min-h-10 h-auto items-center justify-between bg-inherit hover:bg-inherit [&_svg]:pointer-events-auto",u),children:p.length>0?l.jsxs("div",{className:"flex justify-between items-center w-full",children:[l.jsxs("div",{className:"flex flex-wrap items-center",children:[p.slice(0,a).map(S=>{const M=e.find(T=>T.value===S);return l.jsxs(ra,{className:R(df({variant:n})),children:[M==null?void 0:M.label,l.jsx(Eo,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:T=>{T.stopPropagation(),b(S)}})]},S)}),p.length>a&&l.jsxs(ra,{className:R("bg-transparent text-foreground border-foreground/1 hover:bg-transparent",df({variant:n})),children:[`+ ${p.length-a} more`,l.jsx(Eo,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:S=>{S.stopPropagation(),x()}})]})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(Po,{className:"h-4 mx-2 cursor-pointer text-muted-foreground",onClick:S=>{S.stopPropagation(),y()}}),l.jsx(Ur,{orientation:"vertical",className:"flex min-h-6 h-full"}),l.jsx(Kt,{className:"h-4 mx-2 cursor-pointer text-muted-foreground"})]})]}):l.jsxs("div",{className:"flex items-center justify-between w-full mx-auto",children:[l.jsx("span",{className:"text-sm text-muted-foreground mx-3",children:o}),l.jsx(Kt,{className:"h-4 cursor-pointer text-muted-foreground mx-2"})]})})}),l.jsx(Ya,{className:"w-auto p-0",align:"start",onEscapeKeyDown:()=>h(!1),children:l.jsxs(Mr,{children:[l.jsx(ha,{placeholder:"Search...",onKeyDown:g}),l.jsxs(ga,{children:[l.jsx(va,{children:"No results found."}),l.jsxs(Tr,{children:[l.jsxs(nn,{onSelect:E,className:"cursor-pointer",children:[l.jsx("div",{className:R("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",p.length===e.length?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:l.jsx(xn,{className:"h-4 w-4"})}),l.jsx("span",{children:"(Select All)"})]},"all"),e.map(S=>{const M=p.includes(S.value);return l.jsxs(nn,{onSelect:()=>b(S.value),className:"cursor-pointer",children:[l.jsx("div",{className:R("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",M?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:l.jsx(xn,{className:"h-4 w-4"})}),l.jsx("span",{children:S.label})]},S.value)})]}),l.jsx(ba,{}),l.jsx(Tr,{children:l.jsxs("div",{className:"flex items-center justify-between",children:[p.length>0&&l.jsxs(l.Fragment,{children:[l.jsx(nn,{onSelect:y,className:"flex-1 justify-center cursor-pointer",children:"Clear"}),l.jsx(Ur,{orientation:"vertical",className:"flex min-h-6 h-full"})]}),l.jsx(nn,{onSelect:()=>h(!1),className:"flex-1 justify-center cursor-pointer max-w-full",children:"Close"})]})})]})]})})]})});ff.displayName="MultiSelect";var D1="VisuallyHidden",Ka=c.forwardRef((e,t)=>l.jsx($.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ka.displayName=D1;var mf=Ka,cn="NavigationMenu",[qa,pf,I1]=qt(cn),[Xa,_1,O1]=qt(cn),[Qa,aP]=ye(cn,[I1,O1]),[L1,Be]=Qa(cn),[$1,F1]=Qa(cn),hf=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:s=200,skipDelayDuration:i=300,orientation:u="horizontal",dir:d,...f}=e,[p,v]=c.useState(null),m=oe(t,D=>v(D)),h=bt(d),g=c.useRef(0),b=c.useRef(0),y=c.useRef(0),[w,x]=c.useState(!0),[E="",S]=Ce({prop:r,onChange:D=>{const z=D!=="",Y=i>0;z?(window.clearTimeout(y.current),Y&&x(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>x(!0),i)),o==null||o(D)},defaultProp:a}),M=c.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>S(""),150)},[S]),T=c.useCallback(D=>{window.clearTimeout(b.current),S(D)},[S]),j=c.useCallback(D=>{E===D?window.clearTimeout(b.current):g.current=window.setTimeout(()=>{window.clearTimeout(b.current),S(D)},s)},[E,S,s]);return c.useEffect(()=>()=>{window.clearTimeout(g.current),window.clearTimeout(b.current),window.clearTimeout(y.current)},[]),l.jsx(vf,{scope:n,isRootMenu:!0,value:E,dir:h,orientation:u,rootNavigationMenu:p,onTriggerEnter:D=>{window.clearTimeout(g.current),w?j(D):T(D)},onTriggerLeave:()=>{window.clearTimeout(g.current),M()},onContentEnter:()=>window.clearTimeout(b.current),onContentLeave:M,onItemSelect:D=>{S(z=>z===D?"":D)},onItemDismiss:()=>S(""),children:l.jsx($.nav,{"aria-label":"Main","data-orientation":u,dir:h,...f,ref:m})})});hf.displayName=cn;var gf="NavigationMenuSub",B1=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",...i}=e,u=Be(gf,n),[d="",f]=Ce({prop:r,onChange:o,defaultProp:a});return l.jsx(vf,{scope:n,isRootMenu:!1,value:d,dir:u.dir,orientation:s,rootNavigationMenu:u.rootNavigationMenu,onTriggerEnter:p=>f(p),onItemSelect:p=>f(p),onItemDismiss:()=>f(""),children:l.jsx($.div,{"data-orientation":s,...i,ref:t})})});B1.displayName=gf;var vf=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:s,value:i,onItemSelect:u,onItemDismiss:d,onTriggerEnter:f,onTriggerLeave:p,onContentEnter:v,onContentLeave:m}=e,[h,g]=c.useState(null),[b,y]=c.useState(new Map),[w,x]=c.useState(null);return l.jsx(L1,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:i,previousValue:Pn(i),baseId:he(),dir:o,orientation:a,viewport:h,onViewportChange:g,indicatorTrack:w,onIndicatorTrackChange:x,onTriggerEnter:we(f),onTriggerLeave:we(p),onContentEnter:we(v),onContentLeave:we(m),onItemSelect:we(u),onItemDismiss:we(d),onViewportContentChange:c.useCallback((E,S)=>{y(M=>(M.set(E,S),new Map(M)))},[]),onViewportContentRemove:c.useCallback(E=>{y(S=>S.has(E)?(S.delete(E),new Map(S)):S)},[]),children:l.jsx(qa.Provider,{scope:t,children:l.jsx($1,{scope:t,items:b,children:s})})})},bf="NavigationMenuList",yf=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Be(bf,n),a=l.jsx($.ul,{"data-orientation":o.orientation,...r,ref:t});return l.jsx($.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:l.jsx(qa.Slot,{scope:n,children:o.isRootMenu?l.jsx(Rf,{asChild:!0,children:a}):a})})});yf.displayName=bf;var wf="NavigationMenuItem",[W1,xf]=Qa(wf),Cf=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=he(),s=r||a||"LEGACY_REACT_AUTO_VALUE",i=c.useRef(null),u=c.useRef(null),d=c.useRef(null),f=c.useRef(()=>{}),p=c.useRef(!1),v=c.useCallback((h="start")=>{if(i.current){f.current();const g=ts(i.current);g.length&&ns(h==="start"?g:g.reverse())}},[]),m=c.useCallback(()=>{if(i.current){const h=ts(i.current);h.length&&(f.current=K1(h))}},[]);return l.jsx(W1,{scope:n,value:s,triggerRef:u,contentRef:i,focusProxyRef:d,wasEscapeCloseRef:p,onEntryKeyDown:v,onFocusProxyEnter:v,onRootContentClose:m,onContentFocusOutside:m,children:l.jsx($.li,{...o,ref:t})})});Cf.displayName=wf;var Za="NavigationMenuTrigger",Nf=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=Be(Za,e.__scopeNavigationMenu),s=xf(Za,e.__scopeNavigationMenu),i=c.useRef(null),u=oe(i,s.triggerRef,t),d=Df(a.baseId,s.value),f=If(a.baseId,s.value),p=c.useRef(!1),v=c.useRef(!1),m=s.value===a.value;return l.jsxs(l.Fragment,{children:[l.jsx(qa.ItemSlot,{scope:n,value:s.value,children:l.jsx(jf,{asChild:!0,children:l.jsx($.button,{id:d,disabled:r,"data-disabled":r?"":void 0,"data-state":os(m),"aria-expanded":m,"aria-controls":f,...o,ref:u,onPointerEnter:O(e.onPointerEnter,()=>{v.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:O(e.onPointerMove,Kr(()=>{r||v.current||s.wasEscapeCloseRef.current||p.current||(a.onTriggerEnter(s.value),p.current=!0)})),onPointerLeave:O(e.onPointerLeave,Kr(()=>{r||(a.onTriggerLeave(),p.current=!1)})),onClick:O(e.onClick,()=>{a.onItemSelect(s.value),v.current=m}),onKeyDown:O(e.onKeyDown,h=>{const b={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];m&&h.key===b&&(s.onEntryKeyDown(),h.preventDefault())})})})}),m&&l.jsxs(l.Fragment,{children:[l.jsx(mf,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:h=>{const g=s.contentRef.current,b=h.relatedTarget,y=b===i.current,w=g==null?void 0:g.contains(b);(y||!w)&&s.onFocusProxyEnter(y?"start":"end")}}),a.viewport&&l.jsx("span",{"aria-owns":f})]})]})});Nf.displayName=Za;var z1="NavigationMenuLink",Sf="navigationMenu.linkSelect",Ef=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return l.jsx(jf,{asChild:!0,children:l.jsx($.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...a,ref:t,onClick:O(e.onClick,s=>{const i=s.target,u=new CustomEvent(Sf,{bubbles:!0,cancelable:!0});if(i.addEventListener(Sf,d=>o==null?void 0:o(d),{once:!0}),Jn(i,u),!u.defaultPrevented&&!s.metaKey){const d=new CustomEvent(Yr,{bubbles:!0,cancelable:!0});Jn(i,d)}},{checkForDefaultPrevented:!1})})})});Ef.displayName=z1;var Ja="NavigationMenuIndicator",Pf=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Be(Ja,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?Yn.createPortal(l.jsx(Ne,{present:n||a,children:l.jsx(V1,{...r,ref:t})}),o.indicatorTrack):null});Pf.displayName=Ja;var V1=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Be(Ja,n),a=pf(n),[s,i]=c.useState(null),[u,d]=c.useState(null),f=o.orientation==="horizontal",p=!!o.value;c.useEffect(()=>{var g;const h=(g=a().find(b=>b.value===o.value))==null?void 0:g.ref.current;h&&i(h)},[a,o.value]);const v=()=>{s&&d({size:f?s.offsetWidth:s.offsetHeight,offset:f?s.offsetLeft:s.offsetTop})};return rs(s,v),rs(o.indicatorTrack,v),u?l.jsx($.div,{"aria-hidden":!0,"data-state":p?"visible":"hidden","data-orientation":o.orientation,...r,ref:t,style:{position:"absolute",...f?{left:0,width:u.size+"px",transform:`translateX(${u.offset}px)`}:{top:0,height:u.size+"px",transform:`translateY(${u.offset}px)`},...r.style}}):null}),un="NavigationMenuContent",Mf=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Be(un,e.__scopeNavigationMenu),a=xf(un,e.__scopeNavigationMenu),s=oe(a.contentRef,t),i=a.value===o.value,u={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?l.jsx(H1,{forceMount:n,...u,ref:s}):l.jsx(Ne,{present:n||i,children:l.jsx(Tf,{"data-state":os(i),...u,ref:s,onPointerEnter:O(e.onPointerEnter,o.onContentEnter),onPointerLeave:O(e.onPointerLeave,Kr(o.onContentLeave)),style:{pointerEvents:!i&&o.isRootMenu?"none":void 0,...u.style}})})});Mf.displayName=un;var H1=c.forwardRef((e,t)=>{const n=Be(un,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return xe(()=>{r(e.value,{ref:t,...e})},[e,t,r]),xe(()=>()=>o(e.value),[e.value,o]),null}),Yr="navigationMenu.rootContentDismiss",Tf=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:s,onRootContentClose:i,onContentFocusOutside:u,...d}=e,f=Be(un,n),p=c.useRef(null),v=oe(p,t),m=Df(f.baseId,r),h=If(f.baseId,r),g=pf(n),b=c.useRef(null),{onItemDismiss:y}=f;c.useEffect(()=>{const x=p.current;if(f.isRootMenu&&x){const E=()=>{var S;y(),i(),x.contains(document.activeElement)&&((S=o.current)==null||S.focus())};return x.addEventListener(Yr,E),()=>x.removeEventListener(Yr,E)}},[f.isRootMenu,e.value,o,y,i]);const w=c.useMemo(()=>{const E=g().map(z=>z.value);f.dir==="rtl"&&E.reverse();const S=E.indexOf(f.value),M=E.indexOf(f.previousValue),T=r===f.value,j=M===E.indexOf(r);if(!T&&!j)return b.current;const D=(()=>{if(S!==M){if(T&&M!==-1)return S>M?"from-end":"from-start";if(j&&S!==-1)return S>M?"to-start":"to-end"}return null})();return b.current=D,D},[f.previousValue,f.value,f.dir,g,r]);return l.jsx(Rf,{asChild:!0,children:l.jsx(It,{id:h,"aria-labelledby":m,"data-motion":w,"data-orientation":f.orientation,...d,ref:v,disableOutsidePointerEvents:!1,onDismiss:()=>{var E;const x=new Event(Yr,{bubbles:!0,cancelable:!0});(E=p.current)==null||E.dispatchEvent(x)},onFocusOutside:O(e.onFocusOutside,x=>{var S;u();const E=x.target;(S=f.rootNavigationMenu)!=null&&S.contains(E)&&x.preventDefault()}),onPointerDownOutside:O(e.onPointerDownOutside,x=>{var T;const E=x.target,S=g().some(j=>{var D;return(D=j.ref.current)==null?void 0:D.contains(E)}),M=f.isRootMenu&&((T=f.viewport)==null?void 0:T.contains(E));(S||M||!f.isRootMenu)&&x.preventDefault()}),onKeyDown:O(e.onKeyDown,x=>{var M;const E=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!E){const T=ts(x.currentTarget),j=document.activeElement,D=T.findIndex(I=>I===j),Y=x.shiftKey?T.slice(0,D).reverse():T.slice(D+1,T.length);ns(Y)?x.preventDefault():(M=a.current)==null||M.focus()}}),onEscapeKeyDown:O(e.onEscapeKeyDown,x=>{s.current=!0})})})}),es="NavigationMenuViewport",Af=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=!!Be(es,e.__scopeNavigationMenu).value;return l.jsx(Ne,{present:n||a,children:l.jsx(G1,{...r,ref:t})})});Af.displayName=es;var G1=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,a=Be(es,n),s=oe(t,a.onViewportChange),i=F1(un,e.__scopeNavigationMenu),[u,d]=c.useState(null),[f,p]=c.useState(null),v=u?(u==null?void 0:u.width)+"px":void 0,m=u?(u==null?void 0:u.height)+"px":void 0,h=!!a.value,g=h?a.value:a.previousValue;return rs(f,()=>{f&&d({width:f.offsetWidth,height:f.offsetHeight})}),l.jsx($.div,{"data-state":os(h),"data-orientation":a.orientation,...o,ref:s,style:{pointerEvents:!h&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":v,"--radix-navigation-menu-viewport-height":m,...o.style},onPointerEnter:O(e.onPointerEnter,a.onContentEnter),onPointerLeave:O(e.onPointerLeave,Kr(a.onContentLeave)),children:Array.from(i.items).map(([y,{ref:w,forceMount:x,...E}])=>{const S=g===y;return l.jsx(Ne,{present:x||S,children:l.jsx(Tf,{...E,ref:Cn(w,M=>{S&&M&&p(M)})})},y)})})}),U1="FocusGroup",Rf=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Be(U1,n);return l.jsx(Xa.Provider,{scope:n,children:l.jsx(Xa.Slot,{scope:n,children:l.jsx($.div,{dir:o.dir,...r,ref:t})})})}),kf=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],Y1="FocusGroupItem",jf=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=_1(n),a=Be(Y1,n);return l.jsx(Xa.ItemSlot,{scope:n,children:l.jsx($.button,{...r,ref:t,onKeyDown:O(e.onKeyDown,s=>{if(["Home","End",...kf].includes(s.key)){let u=o().map(p=>p.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(s.key)&&u.reverse(),kf.includes(s.key)){const p=u.indexOf(s.currentTarget);u=u.slice(p+1)}setTimeout(()=>ns(u)),s.preventDefault()}})})})});function ts(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ns(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function K1(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function rs(e,t){const n=we(t);xe(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}function os(e){return e?"open":"closed"}function Df(e,t){return`${e}-trigger-${t}`}function If(e,t){return`${e}-content-${t}`}function Kr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var _f=hf,Of=yf,q1=Cf,Lf=Nf,X1=Ef,$f=Pf,Ff=Mf,Bf=Af;const Wf=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(_f,{ref:r,className:R("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,l.jsx(as,{})]}));Wf.displayName=_f.displayName;const zf=c.forwardRef(({className:e,...t},n)=>l.jsx(Of,{ref:n,className:R("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));zf.displayName=Of.displayName;const Q1=q1,Vf=Dt("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Hf=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Lf,{ref:r,className:R(Vf(),"group",e),...n,children:[t," ",l.jsx(Kt,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Hf.displayName=Lf.displayName;const Gf=c.forwardRef(({className:e,...t},n)=>l.jsx(Ff,{ref:n,className:R("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",e),...t}));Gf.displayName=Ff.displayName;const Z1=X1,as=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:R("absolute left-0 top-full flex justify-center"),children:l.jsx(Bf,{className:R("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:n,...t})}));as.displayName=Bf.displayName;const Uf=c.forwardRef(({className:e,...t},n)=>l.jsx($f,{ref:n,className:R("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:l.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));Uf.displayName=$f.displayName;const ss=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:R("mx-auto flex w-full justify-center",e),...t});ss.displayName="Pagination";const is=c.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:R("flex flex-row items-center gap-1",e),...t}));is.displayName="PaginationContent";const mt=c.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:R("",e),...t}));mt.displayName="PaginationItem";const Wt=({className:e,isActive:t,size:n="icon",...r})=>l.jsx(Ee,{"aria-current":t?"page":void 0,className:R(yr({variant:t?"default":"outline",rounded:!1,size:n}),t?"text-primary-foreground":"text-foreground",e),...r,children:r.children});Wt.displayName="PaginationLink";const ls=({className:e,...t})=>l.jsx(Wt,{"aria-label":"Previous page",className:R("gap-1",e),...t,children:l.jsx(So,{className:"h-4 w-4"})});ls.displayName="PaginationPrevious";const cs=({className:e,...t})=>l.jsx(Wt,{"aria-label":"Next page",className:R("gap-1",e),...t,children:l.jsx(Zn,{className:"h-4 w-4"})});cs.displayName="PaginationNext";const qr=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:R("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(ib,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});qr.displayName="PaginationEllipsis";var us="Progress",ds=100,[J1,sP]=ye(us),[eN,tN]=J1(us),Yf=c.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=nN,...s}=e;(o||o===0)&&!Qf(o)&&console.error(rN(`${o}`,"Progress"));const i=Qf(o)?o:ds;r!==null&&!Zf(r,i)&&console.error(oN(`${r}`,"Progress"));const u=Zf(r,i)?r:null,d=Xr(u)?a(u,i):void 0;return l.jsx(eN,{scope:n,value:u,max:i,children:l.jsx($.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Xr(u)?u:void 0,"aria-valuetext":d,role:"progressbar","data-state":Xf(u,i),"data-value":u??void 0,"data-max":i,...s,ref:t})})});Yf.displayName=us;var Kf="ProgressIndicator",qf=c.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=tN(Kf,n);return l.jsx($.div,{"data-state":Xf(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});qf.displayName=Kf;function nN(e,t){return`${Math.round(e/t*100)}%`}function Xf(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Xr(e){return typeof e=="number"}function Qf(e){return Xr(e)&&!isNaN(e)&&e>0}function Zf(e,t){return Xr(e)&&!isNaN(e)&&e<=t&&e>=0}function rN(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ds}\`.`}function oN(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
257
+ */var Uc;function xx(){return Uc||(Uc=1,process.env.NODE_ENV!=="production"&&function(){function e(m,h){return m===h&&(m!==0||1/m===1/h)||m!==m&&h!==h}function t(m,h){f||o.startTransition===void 0||(f=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=h();if(!p){var b=h();a(g,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}b=s({inst:{value:g,getSnapshot:h}});var y=b[0].inst,w=b[1];return u(function(){y.value=g,y.getSnapshot=h,n(y)&&w({inst:y})},[m,g,h]),i(function(){return n(y)&&w({inst:y}),m(function(){n(y)&&w({inst:y})})},[m]),d(g),g}function n(m){var h=m.getSnapshot;m=m.value;try{var g=h();return!a(m,g)}catch{return!0}}function r(m,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=P,a=typeof Object.is=="function"?Object.is:e,s=o.useState,i=o.useEffect,u=o.useLayoutEffect,d=o.useDebugValue,f=!1,p=!1,v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;da.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),da}var Yc;function Cx(){return Yc||(Yc=1,process.env.NODE_ENV==="production"?Nr.exports=wx():Nr.exports=xx()),Nr.exports}var Nx=Cx(),Tn='[cmdk-group=""]',fa='[cmdk-group-items=""]',Sx='[cmdk-group-heading=""]',ma='[cmdk-item=""]',Kc=`${ma}:not([aria-disabled="true"])`,pa="cmdk-item-select",Lt="data-value",Ex=(e,t,n)=>yx(e,t,n),qc=c.createContext(void 0),An=()=>c.useContext(qc),Xc=c.createContext(void 0),ha=()=>c.useContext(Xc),Qc=c.createContext(void 0),Zc=c.forwardRef((e,t)=>{let n=nn(()=>{var A,L;return{search:"",value:(L=(A=e.value)!=null?A:e.defaultValue)!=null?L:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=nn(()=>new Set),o=nn(()=>new Map),a=nn(()=>new Map),s=nn(()=>new Set),i=Jc(e),{label:u,children:d,value:f,onValueChange:p,filter:v,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:b=!0,...y}=e,w=he(),x=he(),E=he(),S=c.useRef(null),M=Ox();$t(()=>{if(f!==void 0){let A=f.trim();n.current.value=A,T.emit()}},[f]),$t(()=>{M(6,K)},[]);let T=c.useMemo(()=>({subscribe:A=>(s.current.add(A),()=>s.current.delete(A)),snapshot:()=>n.current,setState:(A,L,F)=>{var B,X,_;if(!Object.is(n.current[A],L)){if(n.current[A]=L,A==="search")I(),z(),M(1,Y);else if(A==="value"&&(F||M(5,K),((B=i.current)==null?void 0:B.value)!==void 0)){let Z=L??"";(_=(X=i.current).onValueChange)==null||_.call(X,Z);return}T.emit()}},emit:()=>{s.current.forEach(A=>A())}}),[]),j=c.useMemo(()=>({value:(A,L,F)=>{var B;L!==((B=a.current.get(A))==null?void 0:B.value)&&(a.current.set(A,{value:L,keywords:F}),n.current.filtered.items.set(A,D(L,F)),M(2,()=>{z(),T.emit()}))},item:(A,L)=>(r.current.add(A),L&&(o.current.has(L)?o.current.get(L).add(A):o.current.set(L,new Set([A]))),M(3,()=>{I(),z(),n.current.value||Y(),T.emit()}),()=>{a.current.delete(A),r.current.delete(A),n.current.filtered.items.delete(A);let F=H();M(4,()=>{I(),(F==null?void 0:F.getAttribute("id"))===A&&Y(),T.emit()})}),group:A=>(o.current.has(A)||o.current.set(A,new Set),()=>{a.current.delete(A),o.current.delete(A)}),filter:()=>i.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:w,inputId:E,labelId:x,listInnerRef:S}),[]);function D(A,L){var F,B;let X=(B=(F=i.current)==null?void 0:F.filter)!=null?B:Ex;return A?X(A,n.current.search,L):0}function z(){if(!n.current.search||i.current.shouldFilter===!1)return;let A=n.current.filtered.items,L=[];n.current.filtered.groups.forEach(B=>{let X=o.current.get(B),_=0;X.forEach(Z=>{let te=A.get(Z);_=Math.max(te,_)}),L.push([B,_])});let F=S.current;J().sort((B,X)=>{var _,Z;let te=B.getAttribute("id"),ne=X.getAttribute("id");return((_=A.get(ne))!=null?_:0)-((Z=A.get(te))!=null?Z:0)}).forEach(B=>{let X=B.closest(fa);X?X.appendChild(B.parentElement===X?B:B.closest(`${fa} > *`)):F.appendChild(B.parentElement===F?B:B.closest(`${fa} > *`))}),L.sort((B,X)=>X[1]-B[1]).forEach(B=>{var X;let _=(X=S.current)==null?void 0:X.querySelector(`${Tn}[${Lt}="${encodeURIComponent(B[0])}"]`);_==null||_.parentElement.appendChild(_)})}function Y(){let A=J().find(F=>F.getAttribute("aria-disabled")!=="true"),L=A==null?void 0:A.getAttribute(Lt);T.setState("value",L||void 0)}function I(){var A,L,F,B;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let X=0;for(let _ of r.current){let Z=(L=(A=a.current.get(_))==null?void 0:A.value)!=null?L:"",te=(B=(F=a.current.get(_))==null?void 0:F.keywords)!=null?B:[],ne=D(Z,te);n.current.filtered.items.set(_,ne),ne>0&&X++}for(let[_,Z]of o.current)for(let te of Z)if(n.current.filtered.items.get(te)>0){n.current.filtered.groups.add(_);break}n.current.filtered.count=X}function K(){var A,L,F;let B=H();B&&(((A=B.parentElement)==null?void 0:A.firstChild)===B&&((F=(L=B.closest(Tn))==null?void 0:L.querySelector(Sx))==null||F.scrollIntoView({block:"nearest"})),B.scrollIntoView({block:"nearest"}))}function H(){var A;return(A=S.current)==null?void 0:A.querySelector(`${ma}[aria-selected="true"]`)}function J(){var A;return Array.from(((A=S.current)==null?void 0:A.querySelectorAll(Kc))||[])}function V(A){let L=J()[A];L&&T.setState("value",L.getAttribute(Lt))}function q(A){var L;let F=H(),B=J(),X=B.findIndex(Z=>Z===F),_=B[X+A];(L=i.current)!=null&&L.loop&&(_=X+A<0?B[B.length-1]:X+A===B.length?B[0]:B[X+A]),_&&T.setState("value",_.getAttribute(Lt))}function G(A){let L=H(),F=L==null?void 0:L.closest(Tn),B;for(;F&&!B;)F=A>0?Ix(F,Tn):_x(F,Tn),B=F==null?void 0:F.querySelector(Kc);B?T.setState("value",B.getAttribute(Lt)):q(A)}let k=()=>V(J().length-1),Q=A=>{A.preventDefault(),A.metaKey?k():A.altKey?G(1):q(1)},ee=A=>{A.preventDefault(),A.metaKey?V(0):A.altKey?G(-1):q(-1)};return c.createElement($.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:A=>{var L;if((L=y.onKeyDown)==null||L.call(y,A),!A.defaultPrevented)switch(A.key){case"n":case"j":{b&&A.ctrlKey&&Q(A);break}case"ArrowDown":{Q(A);break}case"p":case"k":{b&&A.ctrlKey&&ee(A);break}case"ArrowUp":{ee(A);break}case"Home":{A.preventDefault(),V(0);break}case"End":{A.preventDefault(),k();break}case"Enter":if(!A.nativeEvent.isComposing&&A.keyCode!==229){A.preventDefault();let F=H();if(F){let B=new Event(pa);F.dispatchEvent(B)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:$x},u),Sr(e,A=>c.createElement(Xc.Provider,{value:T},c.createElement(qc.Provider,{value:j},A))))}),Px=c.forwardRef((e,t)=>{var n,r;let o=he(),a=c.useRef(null),s=c.useContext(Qc),i=An(),u=Jc(e),d=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;$t(()=>{if(!d)return i.item(o,s==null?void 0:s.id)},[d]);let f=eu(o,a,[e.value,e.children,a],e.keywords),p=ha(),v=Ft(M=>M.value&&M.value===f.current),m=Ft(M=>d||i.filter()===!1?!0:M.search?M.filtered.items.get(o)>0:!0);c.useEffect(()=>{let M=a.current;if(!(!M||e.disabled))return M.addEventListener(pa,h),()=>M.removeEventListener(pa,h)},[m,e.onSelect,e.disabled]);function h(){var M,T;g(),(T=(M=u.current).onSelect)==null||T.call(M,f.current)}function g(){p.setState("value",f.current,!0)}if(!m)return null;let{disabled:b,value:y,onSelect:w,forceMount:x,keywords:E,...S}=e;return c.createElement($.div,{ref:Rn([a,t]),...S,id:o,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!v,"data-disabled":!!b,"data-selected":!!v,onPointerMove:b||i.getDisablePointerSelection()?void 0:g,onClick:b?void 0:h},e.children)}),Mx=c.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=he(),i=c.useRef(null),u=c.useRef(null),d=he(),f=An(),p=Ft(m=>o||f.filter()===!1?!0:m.search?m.filtered.groups.has(s):!0);$t(()=>f.group(s),[]),eu(s,i,[e.value,e.heading,u]);let v=c.useMemo(()=>({id:s,forceMount:o}),[o]);return c.createElement($.div,{ref:Rn([i,t]),...a,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&c.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),Sr(e,m=>c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},c.createElement(Qc.Provider,{value:v},m))))}),Tx=c.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=c.useRef(null),a=Ft(s=>!s.search);return!n&&!a?null:c.createElement($.div,{ref:Rn([o,t]),...r,"cmdk-separator":"",role:"separator"})}),Ax=c.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=ha(),s=Ft(f=>f.search),i=Ft(f=>f.value),u=An(),d=c.useMemo(()=>{var f;let p=(f=u.listInnerRef.current)==null?void 0:f.querySelector(`${ma}[${Lt}="${encodeURIComponent(i)}"]`);return p==null?void 0:p.getAttribute("id")},[]);return c.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),c.createElement($.input,{ref:t,...r,"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":d,id:u.inputId,type:"text",value:o?e.value:s,onChange:f=>{o||a.setState("search",f.target.value),n==null||n(f.target.value)}})}),Rx=c.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=c.useRef(null),s=c.useRef(null),i=An();return c.useEffect(()=>{if(s.current&&a.current){let u=s.current,d=a.current,f,p=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let v=u.offsetHeight;d.style.setProperty("--cmdk-list-height",v.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(f),p.unobserve(u)}}},[]),c.createElement($.div,{ref:Rn([a,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:i.listId},Sr(e,u=>c.createElement("div",{ref:Rn([s,i.listInnerRef]),"cmdk-list-sizer":""},u)))}),kx=c.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return c.createElement(Zo,{open:n,onOpenChange:r},c.createElement(Jo,{container:s},c.createElement(br,{"cmdk-overlay":"",className:o}),c.createElement(yr,{"aria-label":e.label,"cmdk-dialog":"",className:a},c.createElement(Zc,{ref:t,...i}))))}),jx=c.forwardRef((e,t)=>Ft(n=>n.filtered.count===0)?c.createElement($.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Dx=c.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return c.createElement($.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Sr(e,s=>c.createElement("div",{"aria-hidden":!0},s)))}),De=Object.assign(Zc,{List:Rx,Item:Px,Input:Ax,Group:Mx,Separator:Tx,Dialog:kx,Empty:jx,Loading:Dx});function Ix(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function _x(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Jc(e){let t=c.useRef(e);return $t(()=>{t.current=e}),t}var $t=typeof window>"u"?c.useEffect:c.useLayoutEffect;function nn(e){let t=c.useRef();return t.current===void 0&&(t.current=e()),t}function Rn(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Ft(e){let t=ha(),n=()=>e(t.snapshot());return Nx.useSyncExternalStore(t.subscribe,n,n)}function eu(e,t,n,r=[]){let o=c.useRef(),a=An();return $t(()=>{var s;let i=(()=>{var d;for(let f of n){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=r.map(d=>d.trim());a.value(e,i,u),(s=t.current)==null||s.setAttribute(Lt,i),o.current=i}),o}var Ox=()=>{let[e,t]=c.useState(),n=nn(()=>new Map);return $t(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Lx(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Sr({asChild:e,children:t},n){return e&&c.isValidElement(t)?c.cloneElement(Lx(t),{ref:t.ref},n(t.props.children)):n(t)}var $x={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Er=Zo,tu=Wl,nu=Jo,Fx=wr,ga=c.forwardRef(({className:e,...t},n)=>l.jsx(br,{ref:n,className:R("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ga.displayName=br.displayName;const kn=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(nu,{children:[l.jsx(ga,{}),l.jsxs(yr,{ref:r,className:R("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border","bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]","sm:rounded-lg max-h-[100dvh] overflow-y-auto",e),...n,children:[t,l.jsxs(wr,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx(er,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));kn.displayName=yr.displayName;const Pr=({className:e,...t})=>l.jsx("div",{className:R("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Pr.displayName="DialogHeader";const ru=({className:e,...t})=>l.jsx("div",{className:R("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ru.displayName="DialogFooter";const Mr=c.forwardRef(({className:e,...t},n)=>l.jsx(ea,{ref:n,className:R("text-lg font-semibold leading-none tracking-tight",e),...t}));Mr.displayName=ea.displayName;const Tr=c.forwardRef(({className:e,...t},n)=>l.jsx(ta,{ref:n,className:R("text-sm text-muted-foreground",e),...t}));Tr.displayName=ta.displayName;const Ar=c.forwardRef(({className:e,...t},n)=>l.jsx(De,{ref:n,className:R("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Ar.displayName=De.displayName;const Bx=({children:e,...t})=>l.jsx(Er,{...t,children:l.jsx(kn,{className:"overflow-hidden p-0 shadow-lg",children:l.jsx(Ar,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),va=c.forwardRef(({className:e,...t},n)=>l.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[l.jsx(Ai,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),l.jsx(De.Input,{ref:n,className:R("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));va.displayName=De.Input.displayName;const ba=c.forwardRef(({className:e,...t},n)=>l.jsx(De.List,{ref:n,className:R("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));ba.displayName=De.List.displayName;const ya=c.forwardRef((e,t)=>l.jsx(De.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ya.displayName=De.Empty.displayName;const Rr=c.forwardRef(({className:e,...t},n)=>l.jsx(De.Group,{ref:n,className:R("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Rr.displayName=De.Group.displayName;const wa=c.forwardRef(({className:e,...t},n)=>l.jsx(De.Separator,{ref:n,className:R("-mx-1 h-px bg-border",e),...t}));wa.displayName=De.Separator.displayName;const rn=c.forwardRef(({className:e,...t},n)=>l.jsx(De.Item,{ref:n,className:R("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));rn.displayName=De.Item.displayName;const ou=({className:e,...t})=>l.jsx("span",{className:R("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ou.displayName="CommandShortcut";const au=P.forwardRef((e,t)=>{const{currencySymbol:n="$",decimalSeparator:r=".",thousandSeparator:o=",",onValueChange:a,className:s,value:i=0,...u}=e,d=P.useRef(null);P.useImperativeHandle(t,()=>d.current);const[f,p]=P.useState(""),v=g=>{const b=g.toFixed(2).split("."),y=b[0].replace(/\B(?=(\d{3})+(?!\d))/g,o);return`${n} ${y}${r}${b[1]}`},m=g=>{const b=g.target.value,y=parseFloat(b.replace(/\D/g,""))/100;p(v(y)),a(y),d.current&&window.requestAnimationFrame(()=>{var w;(w=d.current)==null||w.setSelectionRange(d.current.value.length,d.current.value.length)})},h=()=>{d.current&&d.current.setSelectionRange(d.current.value.length,d.current.value.length)};return P.useEffect(()=>{p(v(+i))},[i]),l.jsx(ir,{type:"text",inputMode:"numeric",value:f,ref:d,onChange:m,onFocus:h,onClick:h,placeholder:`${n} 0${r}00`,className:s,...u})});au.displayName="CurrencyInput";const Wx=["top","right","bottom","left"],Ct=Math.min,_e=Math.max,kr=Math.round,jr=Math.floor,et=e=>({x:e,y:e}),zx={left:"right",right:"left",bottom:"top",top:"bottom"},Vx={start:"end",end:"start"};function xa(e,t,n){return _e(e,Ct(t,n))}function dt(e,t){return typeof e=="function"?e(t):e}function ft(e){return e.split("-")[0]}function on(e){return e.split("-")[1]}function Ca(e){return e==="x"?"y":"x"}function Na(e){return e==="y"?"height":"width"}function Nt(e){return["top","bottom"].includes(ft(e))?"y":"x"}function Sa(e){return Ca(Nt(e))}function Hx(e,t,n){n===void 0&&(n=!1);const r=on(e),o=Sa(e),a=Na(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Dr(s)),[s,Dr(s)]}function Gx(e){const t=Dr(e);return[Ea(e),t,Ea(t)]}function Ea(e){return e.replace(/start|end/g,t=>Vx[t])}function Ux(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:s;default:return[]}}function Yx(e,t,n,r){const o=on(e);let a=Ux(ft(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Ea)))),a}function Dr(e){return e.replace(/left|right|bottom|top/g,t=>zx[t])}function Kx(e){return{top:0,right:0,bottom:0,left:0,...e}}function su(e){return typeof e!="number"?Kx(e):{top:e,right:e,bottom:e,left:e}}function Ir(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function iu(e,t,n){let{reference:r,floating:o}=e;const a=Nt(t),s=Sa(t),i=Na(s),u=ft(t),d=a==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,v=r[i]/2-o[i]/2;let m;switch(u){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:p};break;case"left":m={x:r.x-o.width,y:p};break;default:m={x:r.x,y:r.y}}switch(on(t)){case"start":m[s]-=v*(n&&d?-1:1);break;case"end":m[s]+=v*(n&&d?-1:1);break}return m}const qx=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=iu(d,r,u),v=r,m={},h=0;for(let g=0;g<i.length;g++){const{name:b,fn:y}=i[g],{x:w,y:x,data:E,reset:S}=await y({x:f,y:p,initialPlacement:r,placement:v,strategy:o,middlewareData:m,rects:d,platform:s,elements:{reference:e,floating:t}});f=w??f,p=x??p,m={...m,[b]:{...m[b],...E}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(v=S.placement),S.rects&&(d=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:f,y:p}=iu(d,v,u)),g=-1)}return{x:f,y:p,placement:v,strategy:o,middlewareData:m}};async function jn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:v=!1,padding:m=0}=dt(t,e),h=su(m),b=i[v?p==="floating"?"reference":"floating":p],y=Ir(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:d,rootBoundary:f,strategy:u})),w=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),E=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},S=Ir(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:x,strategy:u}):w);return{top:(y.top-S.top+h.top)/E.y,bottom:(S.bottom-y.bottom+h.bottom)/E.y,left:(y.left-S.left+h.left)/E.x,right:(S.right-y.right+h.right)/E.x}}const Xx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:u}=t,{element:d,padding:f=0}=dt(e,t)||{};if(d==null)return{};const p=su(f),v={x:n,y:r},m=Sa(o),h=Na(m),g=await s.getDimensions(d),b=m==="y",y=b?"top":"left",w=b?"bottom":"right",x=b?"clientHeight":"clientWidth",E=a.reference[h]+a.reference[m]-v[m]-a.floating[h],S=v[m]-a.reference[m],M=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let T=M?M[x]:0;(!T||!await(s.isElement==null?void 0:s.isElement(M)))&&(T=i.floating[x]||a.floating[h]);const j=E/2-S/2,D=T/2-g[h]/2-1,z=Ct(p[y],D),Y=Ct(p[w],D),I=z,K=T-g[h]-Y,H=T/2-g[h]/2+j,J=xa(I,H,K),V=!u.arrow&&on(o)!=null&&H!==J&&a.reference[h]/2-(H<I?z:Y)-g[h]/2<0,q=V?H<I?H-I:H-K:0;return{[m]:v[m]+q,data:{[m]:J,centerOffset:H-J-q,...V&&{alignmentOffset:q}},reset:V}}}),Qx=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...b}=dt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=ft(o),w=Nt(i),x=ft(i)===i,E=await(u.isRTL==null?void 0:u.isRTL(d.floating)),S=v||(x||!g?[Dr(i)]:Gx(i)),M=h!=="none";!v&&M&&S.push(...Yx(i,g,h,E));const T=[i,...S],j=await jn(t,b),D=[];let z=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&D.push(j[y]),p){const H=Hx(o,s,E);D.push(j[H[0]],j[H[1]])}if(z=[...z,{placement:o,overflows:D}],!D.every(H=>H<=0)){var Y,I;const H=(((Y=a.flip)==null?void 0:Y.index)||0)+1,J=T[H];if(J)return{data:{index:H,overflows:z},reset:{placement:J}};let V=(I=z.filter(q=>q.overflows[0]<=0).sort((q,G)=>q.overflows[1]-G.overflows[1])[0])==null?void 0:I.placement;if(!V)switch(m){case"bestFit":{var K;const q=(K=z.filter(G=>{if(M){const k=Nt(G.placement);return k===w||k==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(k=>k>0).reduce((k,Q)=>k+Q,0)]).sort((G,k)=>G[1]-k[1])[0])==null?void 0:K[0];q&&(V=q);break}case"initialPlacement":V=i;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function lu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function cu(e){return Wx.some(t=>e[t]>=0)}const Zx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=dt(e,t);switch(r){case"referenceHidden":{const a=await jn(t,{...o,elementContext:"reference"}),s=lu(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:cu(s)}}}case"escaped":{const a=await jn(t,{...o,altBoundary:!0}),s=lu(a,n.floating);return{data:{escapedOffsets:s,escaped:cu(s)}}}default:return{}}}}};async function Jx(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ft(n),i=on(n),u=Nt(n)==="y",d=["left","top"].includes(s)?-1:1,f=a&&u?-1:1,p=dt(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof h=="number"&&(m=i==="end"?h*-1:h),u?{x:m*f,y:v*d}:{x:v*d,y:m*f}}const e0=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,u=await Jx(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:s}}}}},t0=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:b=>{let{x:y,y:w}=b;return{x:y,y:w}}},...u}=dt(e,t),d={x:n,y:r},f=await jn(t,u),p=Nt(ft(o)),v=Ca(p);let m=d[v],h=d[p];if(a){const b=v==="y"?"top":"left",y=v==="y"?"bottom":"right",w=m+f[b],x=m-f[y];m=xa(w,m,x)}if(s){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=h+f[b],x=h-f[y];h=xa(w,h,x)}const g=i.fn({...t,[v]:m,[p]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[v]:a,[p]:s}}}}}},n0=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:u=!0,crossAxis:d=!0}=dt(e,t),f={x:n,y:r},p=Nt(o),v=Ca(p);let m=f[v],h=f[p];const g=dt(i,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){const x=v==="y"?"height":"width",E=a.reference[v]-a.floating[x]+b.mainAxis,S=a.reference[v]+a.reference[x]-b.mainAxis;m<E?m=E:m>S&&(m=S)}if(d){var y,w;const x=v==="y"?"width":"height",E=["top","left"].includes(ft(o)),S=a.reference[p]-a.floating[x]+(E&&((y=s.offset)==null?void 0:y[p])||0)+(E?0:b.crossAxis),M=a.reference[p]+a.reference[x]+(E?0:((w=s.offset)==null?void 0:w[p])||0)-(E?b.crossAxis:0);h<S?h=S:h>M&&(h=M)}return{[v]:m,[p]:h}}}},r0=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:u=()=>{},...d}=dt(e,t),f=await jn(t,d),p=ft(o),v=on(o),m=Nt(o)==="y",{width:h,height:g}=a.floating;let b,y;p==="top"||p==="bottom"?(b=p,y=v===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=p,b=v==="end"?"top":"bottom");const w=g-f.top-f.bottom,x=h-f.left-f.right,E=Ct(g-f[b],w),S=Ct(h-f[y],x),M=!t.middlewareData.shift;let T=E,j=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=w),M&&!v){const z=_e(f.left,0),Y=_e(f.right,0),I=_e(f.top,0),K=_e(f.bottom,0);m?j=h-2*(z!==0||Y!==0?z+Y:_e(f.left,f.right)):T=g-2*(I!==0||K!==0?I+K:_e(f.top,f.bottom))}await u({...t,availableWidth:j,availableHeight:T});const D=await s.getDimensions(i.floating);return h!==D.width||g!==D.height?{reset:{rects:!0}}:{}}}};function _r(){return typeof window<"u"}function an(e){return uu(e)?(e.nodeName||"").toLowerCase():"#document"}function Oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tt(e){var t;return(t=(uu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uu(e){return _r()?e instanceof Node||e instanceof Oe(e).Node:!1}function Ge(e){return _r()?e instanceof Element||e instanceof Oe(e).Element:!1}function nt(e){return _r()?e instanceof HTMLElement||e instanceof Oe(e).HTMLElement:!1}function du(e){return!_r()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Oe(e).ShadowRoot}function Dn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function o0(e){return["table","td","th"].includes(an(e))}function Or(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Pa(e){const t=Ma(),n=Ge(e)?Ue(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function a0(e){let t=St(e);for(;nt(t)&&!sn(t);){if(Pa(t))return t;if(Or(t))return null;t=St(t)}return null}function Ma(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function sn(e){return["html","body","#document"].includes(an(e))}function Ue(e){return Oe(e).getComputedStyle(e)}function Lr(e){return Ge(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function St(e){if(an(e)==="html")return e;const t=e.assignedSlot||e.parentNode||du(e)&&e.host||tt(e);return du(t)?t.host:t}function fu(e){const t=St(e);return sn(t)?e.ownerDocument?e.ownerDocument.body:e.body:nt(t)&&Dn(t)?t:fu(t)}function In(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=fu(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Oe(o);if(a){const i=Ta(s);return t.concat(s,s.visualViewport||[],Dn(o)?o:[],i&&n?In(i):[])}return t.concat(o,In(o,[],n))}function Ta(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mu(e){const t=Ue(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=nt(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=kr(n)!==a||kr(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Aa(e){return Ge(e)?e:e.contextElement}function ln(e){const t=Aa(e);if(!nt(t))return et(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=mu(t);let s=(a?kr(n.width):n.width)/r,i=(a?kr(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const s0=et(0);function pu(e){const t=Oe(e);return!Ma()||!t.visualViewport?s0:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function i0(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Oe(e)?!1:t}function Bt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Aa(e);let s=et(1);t&&(r?Ge(r)&&(s=ln(r)):s=ln(e));const i=i0(a,n,r)?pu(a):et(0);let u=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(a){const v=Oe(a),m=r&&Ge(r)?Oe(r):r;let h=v,g=Ta(h);for(;g&&r&&m!==h;){const b=ln(g),y=g.getBoundingClientRect(),w=Ue(g),x=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*b.x,E=y.top+(g.clientTop+parseFloat(w.paddingTop))*b.y;u*=b.x,d*=b.y,f*=b.x,p*=b.y,u+=x,d+=E,h=Oe(g),g=Ta(h)}}return Ir({width:f,height:p,x:u,y:d})}function Ra(e,t){const n=Lr(e).scrollLeft;return t?t.left+n:Bt(tt(e)).left+n}function hu(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Ra(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function l0(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=tt(r),i=t?Or(t.floating):!1;if(r===s||i&&a)return n;let u={scrollLeft:0,scrollTop:0},d=et(1);const f=et(0),p=nt(r);if((p||!p&&!a)&&((an(r)!=="body"||Dn(s))&&(u=Lr(r)),nt(r))){const m=Bt(r);d=ln(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const v=s&&!p&&!a?hu(s,u,!0):et(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+f.x+v.x,y:n.y*d.y-u.scrollTop*d.y+f.y+v.y}}function c0(e){return Array.from(e.getClientRects())}function u0(e){const t=tt(e),n=Lr(e),r=e.ownerDocument.body,o=_e(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_e(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ra(e);const i=-n.scrollTop;return Ue(r).direction==="rtl"&&(s+=_e(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}function d0(e,t){const n=Oe(e),r=tt(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,u=0;if(o){a=o.width,s=o.height;const d=Ma();(!d||d&&t==="fixed")&&(i=o.offsetLeft,u=o.offsetTop)}return{width:a,height:s,x:i,y:u}}function f0(e,t){const n=Bt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=nt(e)?ln(e):et(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,u=o*a.x,d=r*a.y;return{width:s,height:i,x:u,y:d}}function gu(e,t,n){let r;if(t==="viewport")r=d0(e,n);else if(t==="document")r=u0(tt(e));else if(Ge(t))r=f0(t,n);else{const o=pu(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ir(r)}function vu(e,t){const n=St(e);return n===t||!Ge(n)||sn(n)?!1:Ue(n).position==="fixed"||vu(n,t)}function m0(e,t){const n=t.get(e);if(n)return n;let r=In(e,[],!1).filter(i=>Ge(i)&&an(i)!=="body"),o=null;const a=Ue(e).position==="fixed";let s=a?St(e):e;for(;Ge(s)&&!sn(s);){const i=Ue(s),u=Pa(s);!u&&i.position==="fixed"&&(o=null),(a?!u&&!o:!u&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Dn(s)&&!u&&vu(e,s))?r=r.filter(f=>f!==s):o=i,s=St(s)}return t.set(e,r),r}function p0(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Or(t)?[]:m0(t,this._c):[].concat(n),r],i=s[0],u=s.reduce((d,f)=>{const p=gu(t,f,o);return d.top=_e(p.top,d.top),d.right=Ct(p.right,d.right),d.bottom=Ct(p.bottom,d.bottom),d.left=_e(p.left,d.left),d},gu(t,i,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function h0(e){const{width:t,height:n}=mu(e);return{width:t,height:n}}function g0(e,t,n){const r=nt(t),o=tt(t),a=n==="fixed",s=Bt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const u=et(0);if(r||!r&&!a)if((an(t)!=="body"||Dn(o))&&(i=Lr(t)),r){const v=Bt(t,!0,a,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else o&&(u.x=Ra(o));const d=o&&!r&&!a?hu(o,i):et(0),f=s.left+i.scrollLeft-u.x-d.x,p=s.top+i.scrollTop-u.y-d.y;return{x:f,y:p,width:s.width,height:s.height}}function ka(e){return Ue(e).position==="static"}function bu(e,t){if(!nt(e)||Ue(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return tt(e)===n&&(n=n.ownerDocument.body),n}function yu(e,t){const n=Oe(e);if(Or(e))return n;if(!nt(e)){let o=St(e);for(;o&&!sn(o);){if(Ge(o)&&!ka(o))return o;o=St(o)}return n}let r=bu(e,t);for(;r&&o0(r)&&ka(r);)r=bu(r,t);return r&&sn(r)&&ka(r)&&!Pa(r)?n:r||a0(e)||n}const v0=async function(e){const t=this.getOffsetParent||yu,n=this.getDimensions,r=await n(e.floating);return{reference:g0(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function b0(e){return Ue(e).direction==="rtl"}const y0={convertOffsetParentRelativeRectToViewportRelativeRect:l0,getDocumentElement:tt,getClippingRect:p0,getOffsetParent:yu,getElementRects:v0,getClientRects:c0,getDimensions:h0,getScale:ln,isElement:Ge,isRTL:b0};function w0(e,t){let n=null,r;const o=tt(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),a();const{left:d,top:f,width:p,height:v}=e.getBoundingClientRect();if(i||t(),!p||!v)return;const m=jr(f),h=jr(o.clientWidth-(d+p)),g=jr(o.clientHeight-(f+v)),b=jr(d),w={rootMargin:-m+"px "+-h+"px "+-g+"px "+-b+"px",threshold:_e(0,Ct(1,u))||1};let x=!0;function E(S){const M=S[0].intersectionRatio;if(M!==u){if(!x)return s();M?s(!1,M):r=setTimeout(()=>{s(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return s(!0),a}function x0(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=Aa(e),f=o||a?[...d?In(d):[],...In(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const p=d&&i?w0(d,n):null;let v=-1,m=null;s&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),n()}),d&&!u&&m.observe(d),m.observe(t));let h,g=u?Bt(e):null;u&&b();function b(){const y=Bt(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,h=requestAnimationFrame(b)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(h)}}const C0=e0,N0=t0,S0=Qx,E0=r0,P0=Zx,wu=Xx,M0=n0,T0=(e,t,n)=>{const r=new Map,o={platform:y0,...n},a={...o.platform,_c:r};return qx(e,t,{...o,platform:a})};var $r=typeof document<"u"?P.useLayoutEffect:P.useEffect;function Fr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Fr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Fr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function xu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cu(e,t){const n=xu(e);return Math.round(t*n)/n}function ja(e){const t=c.useRef(e);return $r(()=>{t.current=e}),t}function A0(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:u,open:d}=e,[f,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=c.useState(r);Fr(v,r)||m(r);const[h,g]=c.useState(null),[b,y]=c.useState(null),w=c.useCallback(G=>{G!==M.current&&(M.current=G,g(G))},[]),x=c.useCallback(G=>{G!==T.current&&(T.current=G,y(G))},[]),E=a||h,S=s||b,M=c.useRef(null),T=c.useRef(null),j=c.useRef(f),D=u!=null,z=ja(u),Y=ja(o),I=ja(d),K=c.useCallback(()=>{if(!M.current||!T.current)return;const G={placement:t,strategy:n,middleware:v};Y.current&&(G.platform=Y.current),T0(M.current,T.current,G).then(k=>{const Q={...k,isPositioned:I.current!==!1};H.current&&!Fr(j.current,Q)&&(j.current=Q,qn.flushSync(()=>{p(Q)}))})},[v,t,n,Y,I]);$r(()=>{d===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,p(G=>({...G,isPositioned:!1})))},[d]);const H=c.useRef(!1);$r(()=>(H.current=!0,()=>{H.current=!1}),[]),$r(()=>{if(E&&(M.current=E),S&&(T.current=S),E&&S){if(z.current)return z.current(E,S,K);K()}},[E,S,K,z,D]);const J=c.useMemo(()=>({reference:M,floating:T,setReference:w,setFloating:x}),[w,x]),V=c.useMemo(()=>({reference:E,floating:S}),[E,S]),q=c.useMemo(()=>{const G={position:n,left:0,top:0};if(!V.floating)return G;const k=Cu(V.floating,f.x),Q=Cu(V.floating,f.y);return i?{...G,transform:"translate("+k+"px, "+Q+"px)",...xu(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:Q}},[n,i,V.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:K,refs:J,elements:V,floatingStyles:q}),[f,K,J,V,q])}const R0=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?wu({element:r.current,padding:o}).fn(n):{}:r?wu({element:r,padding:o}).fn(n):{}}}},k0=(e,t)=>({...C0(e),options:[e,t]}),j0=(e,t)=>({...N0(e),options:[e,t]}),D0=(e,t)=>({...M0(e),options:[e,t]}),I0=(e,t)=>({...S0(e),options:[e,t]}),_0=(e,t)=>({...E0(e),options:[e,t]}),O0=(e,t)=>({...P0(e),options:[e,t]}),L0=(e,t)=>({...R0(e),options:[e,t]});var $0="Arrow",Nu=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return l.jsx($.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Nu.displayName=$0;var F0=Nu,Da="Popper",[Su,Et]=ye(Da),[B0,Eu]=Su(Da),Pu=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return l.jsx(B0,{scope:t,anchor:r,onAnchorChange:o,children:n})};Pu.displayName=Da;var Mu="PopperAnchor",Tu=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Eu(Mu,n),s=c.useRef(null),i=oe(t,s);return c.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:l.jsx($.div,{...o,ref:i})});Tu.displayName=Mu;var Ia="PopperContent",[W0,z0]=Su(Ia),Au=c.forwardRef((e,t)=>{var _,Z,te,ne,ie,ce;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:h,...g}=e,b=Eu(Ia,n),[y,w]=c.useState(null),x=oe(t,Ee=>w(Ee)),[E,S]=c.useState(null),M=Cr(E),T=(M==null?void 0:M.width)??0,j=(M==null?void 0:M.height)??0,D=r+(a!=="center"?"-"+a:""),z=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},Y=Array.isArray(d)?d:[d],I=Y.length>0,K={padding:z,boundary:Y.filter(H0),altBoundary:I},{refs:H,floatingStyles:J,placement:V,isPositioned:q,middlewareData:G}=A0({strategy:"fixed",placement:D,whileElementsMounted:(...Ee)=>x0(...Ee,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[k0({mainAxis:o+j,alignmentAxis:s}),u&&j0({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?D0():void 0,...K}),u&&I0({...K}),_0({...K,apply:({elements:Ee,rects:ve,availableWidth:Ae,availableHeight:We})=>{const{width:Pe,height:$e}=ve.reference,Re=Ee.floating.style;Re.setProperty("--radix-popper-available-width",`${Ae}px`),Re.setProperty("--radix-popper-available-height",`${We}px`),Re.setProperty("--radix-popper-anchor-width",`${Pe}px`),Re.setProperty("--radix-popper-anchor-height",`${$e}px`)}}),E&&L0({element:E,padding:i}),G0({arrowWidth:T,arrowHeight:j}),v&&O0({strategy:"referenceHidden",...K})]}),[k,Q]=ju(V),ee=we(h);xe(()=>{q&&(ee==null||ee())},[q,ee]);const A=(_=G.arrow)==null?void 0:_.x,L=(Z=G.arrow)==null?void 0:Z.y,F=((te=G.arrow)==null?void 0:te.centerOffset)!==0,[B,X]=c.useState();return xe(()=>{y&&X(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:q?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B,"--radix-popper-transform-origin":[(ne=G.transformOrigin)==null?void 0:ne.x,(ie=G.transformOrigin)==null?void 0:ie.y].join(" "),...((ce=G.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(W0,{scope:n,placedSide:k,onArrowChange:S,arrowX:A,arrowY:L,shouldHideArrow:F,children:l.jsx($.div,{"data-side":k,"data-align":Q,...g,ref:x,style:{...g.style,animation:q?void 0:"none"}})})})});Au.displayName=Ia;var Ru="PopperArrow",V0={top:"bottom",right:"left",bottom:"top",left:"right"},ku=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=z0(Ru,r),s=V0[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]: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:l.jsx(F0,{...o,ref:n,style:{...o.style,display:"block"}})})});ku.displayName=Ru;function H0(e){return e!==null}var G0=e=>({name:"transformOrigin",options:e,fn(t){var b,y,w;const{placement:n,rects:r,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,i=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[d,f]=ju(n),p={start:"0%",center:"50%",end:"100%"}[f],v=(((y=o.arrow)==null?void 0:y.x)??0)+i/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let h="",g="";return d==="bottom"?(h=s?p:`${v}px`,g=`${-u}px`):d==="top"?(h=s?p:`${v}px`,g=`${r.floating.height+u}px`):d==="right"?(h=`${-u}px`,g=s?p:`${m}px`):d==="left"&&(h=`${r.floating.width+u}px`,g=s?p:`${m}px`),{data:{x:h,y:g}}}});function ju(e){const[t,n="center"]=e.split("-");return[t,n]}var _n=Pu,On=Tu,Br=Au,Wr=ku,_a="rovingFocusGroup.onEntryFocus",U0={bubbles:!1,cancelable:!0},zr="RovingFocusGroup",[Oa,Du,Y0]=Xt(zr),[K0,Pt]=ye(zr,[Y0]),[q0,X0]=K0(zr),Iu=c.forwardRef((e,t)=>l.jsx(Oa.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Oa.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Q0,{...e,ref:t})})}));Iu.displayName=zr;var Q0=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,v=c.useRef(null),m=oe(t,v),h=yt(a),[g=null,b]=Ce({prop:s,defaultProp:i,onChange:u}),[y,w]=c.useState(!1),x=we(d),E=Du(n),S=c.useRef(!1),[M,T]=c.useState(0);return c.useEffect(()=>{const j=v.current;if(j)return j.addEventListener(_a,x),()=>j.removeEventListener(_a,x)},[x]),l.jsx(q0,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(j=>b(j),[b]),onItemShiftTab:c.useCallback(()=>w(!0),[]),onFocusableItemAdd:c.useCallback(()=>T(j=>j+1),[]),onFocusableItemRemove:c.useCallback(()=>T(j=>j-1),[]),children:l.jsx($.div,{tabIndex:y||M===0?-1:0,"data-orientation":r,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:O(e.onMouseDown,()=>{S.current=!0}),onFocus:O(e.onFocus,j=>{const D=!S.current;if(j.target===j.currentTarget&&D&&!y){const z=new CustomEvent(_a,U0);if(j.currentTarget.dispatchEvent(z),!z.defaultPrevented){const Y=E().filter(V=>V.focusable),I=Y.find(V=>V.active),K=Y.find(V=>V.id===g),J=[I,K,...Y].filter(Boolean).map(V=>V.ref.current);Lu(J,f)}}S.current=!1}),onBlur:O(e.onBlur,()=>w(!1))})})}),_u="RovingFocusGroupItem",Ou=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...s}=e,i=he(),u=a||i,d=X0(_u,n),f=d.currentTabStopId===u,p=Du(n),{onFocusableItemAdd:v,onFocusableItemRemove:m}=d;return c.useEffect(()=>{if(r)return v(),()=>m()},[r,v,m]),l.jsx(Oa.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:l.jsx($.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:O(e.onMouseDown,h=>{r?d.onItemFocus(u):h.preventDefault()}),onFocus:O(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:O(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){d.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const g=eC(h,d.orientation,d.dir);if(g!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let y=p().filter(w=>w.focusable).map(w=>w.ref.current);if(g==="last")y.reverse();else if(g==="prev"||g==="next"){g==="prev"&&y.reverse();const w=y.indexOf(h.currentTarget);y=d.loop?tC(y,w+1):y.slice(w+1)}setTimeout(()=>Lu(y))}})})})});Ou.displayName=_u;var Z0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function J0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function eC(e,t,n){const r=J0(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Z0[r]}function Lu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function tC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Vr=Iu,Hr=Ou,La=["Enter"," "],nC=["ArrowDown","PageUp","Home"],$u=["ArrowUp","PageDown","End"],rC=[...nC,...$u],oC={ltr:[...La,"ArrowRight"],rtl:[...La,"ArrowLeft"]},aC={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ln="Menu",[$n,sC,iC]=Xt(Ln),[Wt,Fu]=ye(Ln,[iC,Et,Pt]),Fn=Et(),Bu=Pt(),[Wu,Mt]=Wt(Ln),[lC,Bn]=Wt(Ln),zu=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=Fn(t),[u,d]=c.useState(null),f=c.useRef(!1),p=we(a),v=yt(o);return c.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),l.jsx(_n,{...i,children:l.jsx(Wu,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:d,children:l.jsx(lC,{scope:t,onClose:c.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:v,modal:s,children:r})})})};zu.displayName=Ln;var cC="MenuAnchor",$a=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Fn(n);return l.jsx(On,{...o,...r,ref:t})});$a.displayName=cC;var Fa="MenuPortal",[uC,Vu]=Wt(Fa,{forceMount:void 0}),Hu=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Mt(Fa,t);return l.jsx(uC,{scope:t,forceMount:n,children:l.jsx(Ne,{present:n||a.open,children:l.jsx(En,{asChild:!0,container:o,children:r})})})};Hu.displayName=Fa;var Fe="MenuContent",[dC,Ba]=Wt(Fe),Gu=c.forwardRef((e,t)=>{const n=Vu(Fe,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Mt(Fe,e.__scopeMenu),s=Bn(Fe,e.__scopeMenu);return l.jsx($n.Provider,{scope:e.__scopeMenu,children:l.jsx(Ne,{present:r||a.open,children:l.jsx($n.Slot,{scope:e.__scopeMenu,children:s.modal?l.jsx(fC,{...o,ref:t}):l.jsx(mC,{...o,ref:t})})})})}),fC=c.forwardRef((e,t)=>{const n=Mt(Fe,e.__scopeMenu),r=c.useRef(null),o=oe(t,r);return c.useEffect(()=>{const a=r.current;if(a)return gr(a)},[]),l.jsx(Wa,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:O(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),mC=c.forwardRef((e,t)=>{const n=Mt(Fe,e.__scopeMenu);return l.jsx(Wa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Wa=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:v,onDismiss:m,disableOutsideScroll:h,...g}=e,b=Mt(Fe,n),y=Bn(Fe,n),w=Fn(n),x=Bu(n),E=sC(n),[S,M]=c.useState(null),T=c.useRef(null),j=oe(t,T,b.onContentChange),D=c.useRef(0),z=c.useRef(""),Y=c.useRef(0),I=c.useRef(null),K=c.useRef("right"),H=c.useRef(0),J=h?Pn:c.Fragment,V=h?{as:lt,allowPinchZoom:!0}:void 0,q=k=>{var _,Z;const Q=z.current+k,ee=E().filter(te=>!te.disabled),A=document.activeElement,L=(_=ee.find(te=>te.ref.current===A))==null?void 0:_.textValue,F=ee.map(te=>te.textValue),B=EC(F,Q,L),X=(Z=ee.find(te=>te.textValue===B))==null?void 0:Z.ref.current;(function te(ne){z.current=ne,window.clearTimeout(D.current),ne!==""&&(D.current=window.setTimeout(()=>te(""),1e3))})(Q),X&&setTimeout(()=>X.focus())};c.useEffect(()=>()=>window.clearTimeout(D.current),[]),lr();const G=c.useCallback(k=>{var ee,A;return K.current===((ee=I.current)==null?void 0:ee.side)&&MC(k,(A=I.current)==null?void 0:A.area)},[]);return l.jsx(dC,{scope:n,searchRef:z,onItemEnter:c.useCallback(k=>{G(k)&&k.preventDefault()},[G]),onItemLeave:c.useCallback(k=>{var Q;G(k)||((Q=T.current)==null||Q.focus(),M(null))},[G]),onTriggerLeave:c.useCallback(k=>{G(k)&&k.preventDefault()},[G]),pointerGraceTimerRef:Y,onPointerGraceIntentChange:c.useCallback(k=>{I.current=k},[]),children:l.jsx(J,{...V,children:l.jsx(Sn,{asChild:!0,trapped:o,onMountAutoFocus:O(a,k=>{var Q;k.preventDefault(),(Q=T.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:l.jsx(_t,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:v,onDismiss:m,children:l.jsx(Vr,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:M,onEntryFocus:O(u,k=>{y.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Br,{role:"menu","aria-orientation":"vertical","data-state":cd(b.open),"data-radix-menu-content":"",dir:y.dir,...w,...g,ref:j,style:{outline:"none",...g.style},onKeyDown:O(g.onKeyDown,k=>{const ee=k.target.closest("[data-radix-menu-content]")===k.currentTarget,A=k.ctrlKey||k.altKey||k.metaKey,L=k.key.length===1;ee&&(k.key==="Tab"&&k.preventDefault(),!A&&L&&q(k.key));const F=T.current;if(k.target!==F||!rC.includes(k.key))return;k.preventDefault();const X=E().filter(_=>!_.disabled).map(_=>_.ref.current);$u.includes(k.key)&&X.reverse(),NC(X)}),onBlur:O(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(D.current),z.current="")}),onPointerMove:O(e.onPointerMove,zn(k=>{const Q=k.target,ee=H.current!==k.clientX;if(k.currentTarget.contains(Q)&&ee){const A=k.clientX>H.current?"right":"left";K.current=A,H.current=k.clientX}}))})})})})})})});Gu.displayName=Fe;var pC="MenuGroup",za=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx($.div,{role:"group",...r,ref:t})});za.displayName=pC;var hC="MenuLabel",Uu=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx($.div,{...r,ref:t})});Uu.displayName=hC;var Gr="MenuItem",Yu="menu.itemSelect",Ur=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=c.useRef(null),s=Bn(Gr,e.__scopeMenu),i=Ba(Gr,e.__scopeMenu),u=oe(t,a),d=c.useRef(!1),f=()=>{const p=a.current;if(!n&&p){const v=new CustomEvent(Yu,{bubbles:!0,cancelable:!0});p.addEventListener(Yu,m=>r==null?void 0:r(m),{once:!0}),tr(p,v),v.defaultPrevented?d.current=!1:s.onClose()}};return l.jsx(Ku,{...o,ref:u,disabled:n,onClick:O(e.onClick,f),onPointerDown:p=>{var v;(v=e.onPointerDown)==null||v.call(e,p),d.current=!0},onPointerUp:O(e.onPointerUp,p=>{var v;d.current||(v=p.currentTarget)==null||v.click()}),onKeyDown:O(e.onKeyDown,p=>{const v=i.searchRef.current!=="";n||v&&p.key===" "||La.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Ur.displayName=Gr;var Ku=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=Ba(Gr,n),i=Bu(n),u=c.useRef(null),d=oe(t,u),[f,p]=c.useState(!1),[v,m]=c.useState("");return c.useEffect(()=>{const h=u.current;h&&m((h.textContent??"").trim())},[a.children]),l.jsx($n.ItemSlot,{scope:n,disabled:r,textValue:o??v,children:l.jsx(Hr,{asChild:!0,...i,focusable:!r,children:l.jsx($.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:O(e.onPointerMove,zn(h=>{r?s.onItemLeave(h):(s.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:O(e.onPointerLeave,zn(h=>s.onItemLeave(h))),onFocus:O(e.onFocus,()=>p(!0)),onBlur:O(e.onBlur,()=>p(!1))})})})}),gC="MenuCheckboxItem",qu=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return l.jsx(ed,{scope:e.__scopeMenu,checked:n,children:l.jsx(Ur,{role:"menuitemcheckbox","aria-checked":Yr(n)?"mixed":n,...o,ref:t,"data-state":Ga(n),onSelect:O(o.onSelect,()=>r==null?void 0:r(Yr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});qu.displayName=gC;var Xu="MenuRadioGroup",[vC,bC]=Wt(Xu,{value:void 0,onValueChange:()=>{}}),Qu=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=we(r);return l.jsx(vC,{scope:e.__scopeMenu,value:n,onValueChange:a,children:l.jsx(za,{...o,ref:t})})});Qu.displayName=Xu;var Zu="MenuRadioItem",Ju=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=bC(Zu,e.__scopeMenu),a=n===o.value;return l.jsx(ed,{scope:e.__scopeMenu,checked:a,children:l.jsx(Ur,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Ga(a),onSelect:O(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Ju.displayName=Zu;var Va="MenuItemIndicator",[ed,yC]=Wt(Va,{checked:!1}),td=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=yC(Va,n);return l.jsx(Ne,{present:r||Yr(a.checked)||a.checked===!0,children:l.jsx($.span,{...o,ref:t,"data-state":Ga(a.checked)})})});td.displayName=Va;var wC="MenuSeparator",nd=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx($.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});nd.displayName=wC;var xC="MenuArrow",rd=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Fn(n);return l.jsx(Wr,{...o,...r,ref:t})});rd.displayName=xC;var Ha="MenuSub",[CC,od]=Wt(Ha),ad=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Mt(Ha,t),s=Fn(t),[i,u]=c.useState(null),[d,f]=c.useState(null),p=we(o);return c.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),l.jsx(_n,{...s,children:l.jsx(Wu,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:f,children:l.jsx(CC,{scope:t,contentId:he(),triggerId:he(),trigger:i,onTriggerChange:u,children:n})})})};ad.displayName=Ha;var Wn="MenuSubTrigger",sd=c.forwardRef((e,t)=>{const n=Mt(Wn,e.__scopeMenu),r=Bn(Wn,e.__scopeMenu),o=od(Wn,e.__scopeMenu),a=Ba(Wn,e.__scopeMenu),s=c.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const p=i.current;return()=>{window.clearTimeout(p),u(null)}},[i,u]),l.jsx($a,{asChild:!0,...d,children:l.jsx(Ku,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":cd(n.open),...e,ref:Nn(t,o.onTriggerChange),onClick:p=>{var v;(v=e.onClick)==null||v.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:O(e.onPointerMove,zn(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:O(e.onPointerLeave,zn(p=>{var m,h;f();const v=(m=n.content)==null?void 0:m.getBoundingClientRect();if(v){const g=(h=n.content)==null?void 0:h.dataset.side,b=g==="right",y=b?-5:5,w=v[b?"left":"right"],x=v[b?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+y,y:p.clientY},{x:w,y:v.top},{x,y:v.top},{x,y:v.bottom},{x:w,y:v.bottom}],side:g}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:O(e.onKeyDown,p=>{var m;const v=a.searchRef.current!=="";e.disabled||v&&p.key===" "||oC[r.dir].includes(p.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),p.preventDefault())})})})});sd.displayName=Wn;var id="MenuSubContent",ld=c.forwardRef((e,t)=>{const n=Vu(Fe,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Mt(Fe,e.__scopeMenu),s=Bn(Fe,e.__scopeMenu),i=od(id,e.__scopeMenu),u=c.useRef(null),d=oe(t,u);return l.jsx($n.Provider,{scope:e.__scopeMenu,children:l.jsx(Ne,{present:r||a.open,children:l.jsx($n.Slot,{scope:e.__scopeMenu,children:l.jsx(Wa,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:d,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;s.isUsingKeyboardRef.current&&((p=u.current)==null||p.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:O(e.onFocusOutside,f=>{f.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:O(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:O(e.onKeyDown,f=>{var m;const p=f.currentTarget.contains(f.target),v=aC[s.dir].includes(f.key);p&&v&&(a.onOpenChange(!1),(m=i.trigger)==null||m.focus(),f.preventDefault())})})})})})});ld.displayName=id;function cd(e){return e?"open":"closed"}function Yr(e){return e==="indeterminate"}function Ga(e){return Yr(e)?"indeterminate":e?"checked":"unchecked"}function NC(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function SC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function EC(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=SC(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const u=s.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function PC(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,u=t[a].y,d=t[s].x,f=t[s].y;u>r!=f>r&&n<(d-i)*(r-u)/(f-u)+i&&(o=!o)}return o}function MC(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return PC(n,t)}function zn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var TC=zu,AC=$a,RC=Hu,kC=Gu,jC=za,DC=Uu,IC=Ur,_C=qu,OC=Qu,LC=Ju,$C=td,FC=nd,BC=rd,WC=ad,zC=sd,VC=ld,Ua="DropdownMenu",[HC,aP]=ye(Ua,[Fu]),Te=Fu(),[GC,ud]=HC(Ua),dd=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,u=Te(t),d=c.useRef(null),[f=!1,p]=Ce({prop:o,defaultProp:a,onChange:s});return l.jsx(GC,{scope:t,triggerId:he(),triggerRef:d,contentId:he(),open:f,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(v=>!v),[p]),modal:i,children:l.jsx(TC,{...u,open:f,onOpenChange:p,dir:r,modal:i,children:n})})};dd.displayName=Ua;var fd="DropdownMenuTrigger",md=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=ud(fd,n),s=Te(n);return l.jsx(AC,{asChild:!0,...s,children:l.jsx($.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":r?"":void 0,disabled:r,...o,ref:Nn(t,a.triggerRef),onPointerDown:O(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:O(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});md.displayName=fd;var UC="DropdownMenuPortal",pd=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Te(t);return l.jsx(RC,{...r,...n})};pd.displayName=UC;var hd="DropdownMenuContent",gd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ud(hd,n),a=Te(n),s=c.useRef(!1);return l.jsx(kC,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:O(e.onCloseAutoFocus,i=>{var u;s.current||(u=o.triggerRef.current)==null||u.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:O(e.onInteractOutside,i=>{const u=i.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!o.modal||f)&&(s.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)"}})});gd.displayName=hd;var YC="DropdownMenuGroup",vd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(jC,{...o,...r,ref:t})});vd.displayName=YC;var KC="DropdownMenuLabel",bd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(DC,{...o,...r,ref:t})});bd.displayName=KC;var qC="DropdownMenuItem",yd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(IC,{...o,...r,ref:t})});yd.displayName=qC;var XC="DropdownMenuCheckboxItem",wd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(_C,{...o,...r,ref:t})});wd.displayName=XC;var QC="DropdownMenuRadioGroup",xd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(OC,{...o,...r,ref:t})});xd.displayName=QC;var ZC="DropdownMenuRadioItem",Cd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(LC,{...o,...r,ref:t})});Cd.displayName=ZC;var JC="DropdownMenuItemIndicator",Nd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx($C,{...o,...r,ref:t})});Nd.displayName=JC;var e1="DropdownMenuSeparator",Sd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(FC,{...o,...r,ref:t})});Sd.displayName=e1;var t1="DropdownMenuArrow",n1=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(BC,{...o,...r,ref:t})});n1.displayName=t1;var r1=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Te(t),[i=!1,u]=Ce({prop:r,defaultProp:a,onChange:o});return l.jsx(WC,{...s,open:i,onOpenChange:u,children:n})},o1="DropdownMenuSubTrigger",Ed=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(zC,{...o,...r,ref:t})});Ed.displayName=o1;var a1="DropdownMenuSubContent",Pd=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Te(n);return l.jsx(VC,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Pd.displayName=a1;var s1=dd,i1=md,Md=pd,Td=gd,l1=vd,Ad=bd,Rd=yd,kd=wd,c1=xd,jd=Cd,Dd=Nd,Id=Sd,u1=r1,_d=Ed,Od=Pd;const d1=s1,f1=i1,m1=l1,p1=Md,h1=u1,g1=c1,Ld=c.forwardRef(({className:e,inset:t,children:n,...r},o)=>l.jsxs(_d,{ref:o,className:R("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,l.jsx(Jn,{className:"ml-auto"})]}));Ld.displayName=_d.displayName;const $d=c.forwardRef(({className:e,...t},n)=>l.jsx(Od,{ref:n,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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",e),...t}));$d.displayName=Od.displayName;const Fd=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(Md,{children:l.jsx(Td,{ref:r,sideOffset:t,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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",e),...n})}));Fd.displayName=Td.displayName;const Bd=c.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(Rd,{ref:r,className:R("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-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));Bd.displayName=Rd.displayName;const Wd=c.forwardRef(({className:e,children:t,checked:n,...r},o)=>l.jsxs(kd,{ref:o,className:R("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-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Dd,{children:l.jsx(Cn,{className:"h-4 w-4"})})}),t]}));Wd.displayName=kd.displayName;const zd=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(jd,{ref:r,className:R("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-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Dd,{children:l.jsx(Ti,{className:"h-2 w-2 fill-current"})})}),t]}));zd.displayName=jd.displayName;const Vd=c.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(Ad,{ref:r,className:R("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Vd.displayName=Ad.displayName;const Hd=c.forwardRef(({className:e,...t},n)=>l.jsx(Id,{ref:n,className:R("-mx-1 my-1 h-px bg-muted",e),...t}));Hd.displayName=Id.displayName;const Gd=({className:e,...t})=>l.jsx("span",{className:R("ml-auto text-xs tracking-widest opacity-60",e),...t});Gd.displayName="DropdownMenuShortcut";var v1="Label",Ud=c.forwardRef((e,t)=>l.jsx($.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Ud.displayName=v1;var Yd=Ud;const b1=It("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Kd=c.forwardRef(({className:e,...t},n)=>l.jsx(Yd,{ref:n,className:R(b1(),e),...t}));Kd.displayName=Yd.displayName;var Ya="Popover",[qd,sP]=ye(Ya,[Et]),Vn=Et(),[y1,Tt]=qd(Ya),Xd=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=Vn(t),u=c.useRef(null),[d,f]=c.useState(!1),[p=!1,v]=Ce({prop:r,defaultProp:o,onChange:a});return l.jsx(_n,{...i,children:l.jsx(y1,{scope:t,contentId:he(),triggerRef:u,open:p,onOpenChange:v,onOpenToggle:c.useCallback(()=>v(m=>!m),[v]),hasCustomAnchor:d,onCustomAnchorAdd:c.useCallback(()=>f(!0),[]),onCustomAnchorRemove:c.useCallback(()=>f(!1),[]),modal:s,children:n})})};Xd.displayName=Ya;var Qd="PopoverAnchor",Zd=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Tt(Qd,n),a=Vn(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return c.useEffect(()=>(s(),()=>i()),[s,i]),l.jsx(On,{...a,...r,ref:t})});Zd.displayName=Qd;var Jd="PopoverTrigger",ef=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Tt(Jd,n),a=Vn(n),s=oe(t,o.triggerRef),i=l.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":af(o.open),...r,ref:s,onClick:O(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(On,{asChild:!0,...a,children:i})});ef.displayName=Jd;var Ka="PopoverPortal",[w1,x1]=qd(Ka,{forceMount:void 0}),tf=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Tt(Ka,t);return l.jsx(w1,{scope:t,forceMount:n,children:l.jsx(Ne,{present:n||a.open,children:l.jsx(En,{asChild:!0,container:o,children:r})})})};tf.displayName=Ka;var cn="PopoverContent",nf=c.forwardRef((e,t)=>{const n=x1(cn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Tt(cn,e.__scopePopover);return l.jsx(Ne,{present:r||a.open,children:a.modal?l.jsx(C1,{...o,ref:t}):l.jsx(N1,{...o,ref:t})})});nf.displayName=cn;var C1=c.forwardRef((e,t)=>{const n=Tt(cn,e.__scopePopover),r=c.useRef(null),o=oe(t,r),a=c.useRef(!1);return c.useEffect(()=>{const s=r.current;if(s)return gr(s)},[]),l.jsx(Pn,{as:lt,allowPinchZoom:!0,children:l.jsx(rf,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:O(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:O(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,d=i.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:O(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),N1=c.forwardRef((e,t)=>{const n=Tt(cn,e.__scopePopover),r=c.useRef(!1),o=c.useRef(!1);return l.jsx(rf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),rf=c.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,...p}=e,v=Tt(cn,n),m=Vn(n);return lr(),l.jsx(Sn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(_t,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(Br,{"data-state":af(v.open),role:"dialog",id:v.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)"}})})})}),of="PopoverClose",S1=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Tt(of,n);return l.jsx($.button,{type:"button",...r,ref:t,onClick:O(e.onClick,()=>o.onOpenChange(!1))})});S1.displayName=of;var E1="PopoverArrow",P1=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Vn(n);return l.jsx(Wr,{...o,...r,ref:t})});P1.displayName=E1;function af(e){return e?"open":"closed"}var M1=Xd,T1=Zd,A1=ef,R1=tf,sf=nf;const lf=M1,cf=A1,k1=T1,qa=c.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>l.jsx(R1,{children:l.jsx(sf,{ref:o,align:t,sideOffset:n,className:R("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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})}));qa.displayName=sf.displayName;var j1="Separator",uf="horizontal",D1=["horizontal","vertical"],df=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=uf,...o}=e,a=I1(r)?r:uf,i=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return l.jsx($.div,{"data-orientation":a,...i,...o,ref:t})});df.displayName=j1;function I1(e){return D1.includes(e)}var ff=df;const Kr=c.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>l.jsx(ff,{ref:o,decorative:n,orientation:t,className:R("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Kr.displayName=ff.displayName;const mf=It("mx-1",{variants:{variant:{default:"border-foreground/10 text-foreground bg-card hover:bg-card/80",secondary:"border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",inverted:"inverted"}},defaultVariants:{variant:"default"}}),pf=c.forwardRef(({options:e,onValueChange:t,variant:n,defaultValue:r=[],placeholder:o="Select options",maxCount:a=3,modalPopover:s=!1,asChild:i=!1,className:u,...d},f)=>{const[p,v]=c.useState(r),[m,h]=c.useState(!1);c.useState(!1);const g=S=>{if(S.key==="Enter")h(!0);else if(S.key==="Backspace"&&!S.currentTarget.value){const M=[...p];M.pop(),v(M),t(M)}},b=S=>{const M=p.includes(S)?p.filter(T=>T!==S):[...p,S];v(M),t(M)},y=()=>{v([]),t([])},w=()=>{h(S=>!S)},x=()=>{const S=p.slice(0,a);v(S),t(S)},E=()=>{if(p.length===e.length)y();else{const S=e.map(M=>M.value);v(S),t(S)}};return l.jsxs(lf,{open:m,onOpenChange:h,modal:s,children:[l.jsx(cf,{asChild:!0,children:l.jsx(Se,{ref:f,...d,onClick:w,className:R("flex w-full p-1 rounded-md border min-h-10 h-auto items-center justify-between bg-inherit hover:bg-inherit [&_svg]:pointer-events-auto",u),children:p.length>0?l.jsxs("div",{className:"flex justify-between items-center w-full",children:[l.jsxs("div",{className:"flex flex-wrap items-center",children:[p.slice(0,a).map(S=>{const M=e.find(T=>T.value===S);return l.jsxs(aa,{className:R(mf({variant:n})),children:[M==null?void 0:M.label,l.jsx(To,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:T=>{T.stopPropagation(),b(S)}})]},S)}),p.length>a&&l.jsxs(aa,{className:R("bg-transparent text-foreground border-foreground/1 hover:bg-transparent",mf({variant:n})),children:[`+ ${p.length-a} more`,l.jsx(To,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:S=>{S.stopPropagation(),x()}})]})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(er,{className:"h-4 mx-2 cursor-pointer text-muted-foreground",onClick:S=>{S.stopPropagation(),y()}}),l.jsx(Kr,{orientation:"vertical",className:"flex min-h-6 h-full"}),l.jsx(qt,{className:"h-4 mx-2 cursor-pointer text-muted-foreground"})]})]}):l.jsxs("div",{className:"flex items-center justify-between w-full mx-auto",children:[l.jsx("span",{className:"text-sm text-muted-foreground mx-3",children:o}),l.jsx(qt,{className:"h-4 cursor-pointer text-muted-foreground mx-2"})]})})}),l.jsx(qa,{className:"w-auto p-0",align:"start",onEscapeKeyDown:()=>h(!1),children:l.jsxs(Ar,{children:[l.jsx(va,{placeholder:"Search...",onKeyDown:g}),l.jsxs(ba,{children:[l.jsx(ya,{children:"No results found."}),l.jsxs(Rr,{children:[l.jsxs(rn,{onSelect:E,className:"cursor-pointer",children:[l.jsx("div",{className:R("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",p.length===e.length?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:l.jsx(Cn,{className:"h-4 w-4"})}),l.jsx("span",{children:"(Select All)"})]},"all"),e.map(S=>{const M=p.includes(S.value);return l.jsxs(rn,{onSelect:()=>b(S.value),className:"cursor-pointer",children:[l.jsx("div",{className:R("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",M?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:l.jsx(Cn,{className:"h-4 w-4"})}),l.jsx("span",{children:S.label})]},S.value)})]}),l.jsx(wa,{}),l.jsx(Rr,{children:l.jsxs("div",{className:"flex items-center justify-between",children:[p.length>0&&l.jsxs(l.Fragment,{children:[l.jsx(rn,{onSelect:y,className:"flex-1 justify-center cursor-pointer",children:"Clear"}),l.jsx(Kr,{orientation:"vertical",className:"flex min-h-6 h-full"})]}),l.jsx(rn,{onSelect:()=>h(!1),className:"flex-1 justify-center cursor-pointer max-w-full",children:"Close"})]})})]})]})})]})});pf.displayName="MultiSelect";var _1="VisuallyHidden",Xa=c.forwardRef((e,t)=>l.jsx($.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Xa.displayName=_1;var hf=Xa,un="NavigationMenu",[Qa,gf,O1]=Xt(un),[Za,L1,$1]=Xt(un),[Ja,iP]=ye(un,[O1,$1]),[F1,Be]=Ja(un),[B1,W1]=Ja(un),vf=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:s=200,skipDelayDuration:i=300,orientation:u="horizontal",dir:d,...f}=e,[p,v]=c.useState(null),m=oe(t,D=>v(D)),h=yt(d),g=c.useRef(0),b=c.useRef(0),y=c.useRef(0),[w,x]=c.useState(!0),[E="",S]=Ce({prop:r,onChange:D=>{const z=D!=="",Y=i>0;z?(window.clearTimeout(y.current),Y&&x(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>x(!0),i)),o==null||o(D)},defaultProp:a}),M=c.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>S(""),150)},[S]),T=c.useCallback(D=>{window.clearTimeout(b.current),S(D)},[S]),j=c.useCallback(D=>{E===D?window.clearTimeout(b.current):g.current=window.setTimeout(()=>{window.clearTimeout(b.current),S(D)},s)},[E,S,s]);return c.useEffect(()=>()=>{window.clearTimeout(g.current),window.clearTimeout(b.current),window.clearTimeout(y.current)},[]),l.jsx(yf,{scope:n,isRootMenu:!0,value:E,dir:h,orientation:u,rootNavigationMenu:p,onTriggerEnter:D=>{window.clearTimeout(g.current),w?j(D):T(D)},onTriggerLeave:()=>{window.clearTimeout(g.current),M()},onContentEnter:()=>window.clearTimeout(b.current),onContentLeave:M,onItemSelect:D=>{S(z=>z===D?"":D)},onItemDismiss:()=>S(""),children:l.jsx($.nav,{"aria-label":"Main","data-orientation":u,dir:h,...f,ref:m})})});vf.displayName=un;var bf="NavigationMenuSub",z1=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",...i}=e,u=Be(bf,n),[d="",f]=Ce({prop:r,onChange:o,defaultProp:a});return l.jsx(yf,{scope:n,isRootMenu:!1,value:d,dir:u.dir,orientation:s,rootNavigationMenu:u.rootNavigationMenu,onTriggerEnter:p=>f(p),onItemSelect:p=>f(p),onItemDismiss:()=>f(""),children:l.jsx($.div,{"data-orientation":s,...i,ref:t})})});z1.displayName=bf;var yf=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:s,value:i,onItemSelect:u,onItemDismiss:d,onTriggerEnter:f,onTriggerLeave:p,onContentEnter:v,onContentLeave:m}=e,[h,g]=c.useState(null),[b,y]=c.useState(new Map),[w,x]=c.useState(null);return l.jsx(F1,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:i,previousValue:Mn(i),baseId:he(),dir:o,orientation:a,viewport:h,onViewportChange:g,indicatorTrack:w,onIndicatorTrackChange:x,onTriggerEnter:we(f),onTriggerLeave:we(p),onContentEnter:we(v),onContentLeave:we(m),onItemSelect:we(u),onItemDismiss:we(d),onViewportContentChange:c.useCallback((E,S)=>{y(M=>(M.set(E,S),new Map(M)))},[]),onViewportContentRemove:c.useCallback(E=>{y(S=>S.has(E)?(S.delete(E),new Map(S)):S)},[]),children:l.jsx(Qa.Provider,{scope:t,children:l.jsx(B1,{scope:t,items:b,children:s})})})},wf="NavigationMenuList",xf=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Be(wf,n),a=l.jsx($.ul,{"data-orientation":o.orientation,...r,ref:t});return l.jsx($.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:l.jsx(Qa.Slot,{scope:n,children:o.isRootMenu?l.jsx(jf,{asChild:!0,children:a}):a})})});xf.displayName=wf;var Cf="NavigationMenuItem",[V1,Nf]=Ja(Cf),Sf=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=he(),s=r||a||"LEGACY_REACT_AUTO_VALUE",i=c.useRef(null),u=c.useRef(null),d=c.useRef(null),f=c.useRef(()=>{}),p=c.useRef(!1),v=c.useCallback((h="start")=>{if(i.current){f.current();const g=rs(i.current);g.length&&os(h==="start"?g:g.reverse())}},[]),m=c.useCallback(()=>{if(i.current){const h=rs(i.current);h.length&&(f.current=X1(h))}},[]);return l.jsx(V1,{scope:n,value:s,triggerRef:u,contentRef:i,focusProxyRef:d,wasEscapeCloseRef:p,onEntryKeyDown:v,onFocusProxyEnter:v,onRootContentClose:m,onContentFocusOutside:m,children:l.jsx($.li,{...o,ref:t})})});Sf.displayName=Cf;var es="NavigationMenuTrigger",Ef=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=Be(es,e.__scopeNavigationMenu),s=Nf(es,e.__scopeNavigationMenu),i=c.useRef(null),u=oe(i,s.triggerRef,t),d=_f(a.baseId,s.value),f=Of(a.baseId,s.value),p=c.useRef(!1),v=c.useRef(!1),m=s.value===a.value;return l.jsxs(l.Fragment,{children:[l.jsx(Qa.ItemSlot,{scope:n,value:s.value,children:l.jsx(If,{asChild:!0,children:l.jsx($.button,{id:d,disabled:r,"data-disabled":r?"":void 0,"data-state":ss(m),"aria-expanded":m,"aria-controls":f,...o,ref:u,onPointerEnter:O(e.onPointerEnter,()=>{v.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:O(e.onPointerMove,Xr(()=>{r||v.current||s.wasEscapeCloseRef.current||p.current||(a.onTriggerEnter(s.value),p.current=!0)})),onPointerLeave:O(e.onPointerLeave,Xr(()=>{r||(a.onTriggerLeave(),p.current=!1)})),onClick:O(e.onClick,()=>{a.onItemSelect(s.value),v.current=m}),onKeyDown:O(e.onKeyDown,h=>{const b={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];m&&h.key===b&&(s.onEntryKeyDown(),h.preventDefault())})})})}),m&&l.jsxs(l.Fragment,{children:[l.jsx(hf,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:h=>{const g=s.contentRef.current,b=h.relatedTarget,y=b===i.current,w=g==null?void 0:g.contains(b);(y||!w)&&s.onFocusProxyEnter(y?"start":"end")}}),a.viewport&&l.jsx("span",{"aria-owns":f})]})]})});Ef.displayName=es;var H1="NavigationMenuLink",Pf="navigationMenu.linkSelect",Mf=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return l.jsx(If,{asChild:!0,children:l.jsx($.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...a,ref:t,onClick:O(e.onClick,s=>{const i=s.target,u=new CustomEvent(Pf,{bubbles:!0,cancelable:!0});if(i.addEventListener(Pf,d=>o==null?void 0:o(d),{once:!0}),tr(i,u),!u.defaultPrevented&&!s.metaKey){const d=new CustomEvent(qr,{bubbles:!0,cancelable:!0});tr(i,d)}},{checkForDefaultPrevented:!1})})})});Mf.displayName=H1;var ts="NavigationMenuIndicator",Tf=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Be(ts,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?Kn.createPortal(l.jsx(Ne,{present:n||a,children:l.jsx(G1,{...r,ref:t})}),o.indicatorTrack):null});Tf.displayName=ts;var G1=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Be(ts,n),a=gf(n),[s,i]=c.useState(null),[u,d]=c.useState(null),f=o.orientation==="horizontal",p=!!o.value;c.useEffect(()=>{var g;const h=(g=a().find(b=>b.value===o.value))==null?void 0:g.ref.current;h&&i(h)},[a,o.value]);const v=()=>{s&&d({size:f?s.offsetWidth:s.offsetHeight,offset:f?s.offsetLeft:s.offsetTop})};return as(s,v),as(o.indicatorTrack,v),u?l.jsx($.div,{"aria-hidden":!0,"data-state":p?"visible":"hidden","data-orientation":o.orientation,...r,ref:t,style:{position:"absolute",...f?{left:0,width:u.size+"px",transform:`translateX(${u.offset}px)`}:{top:0,height:u.size+"px",transform:`translateY(${u.offset}px)`},...r.style}}):null}),dn="NavigationMenuContent",Af=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Be(dn,e.__scopeNavigationMenu),a=Nf(dn,e.__scopeNavigationMenu),s=oe(a.contentRef,t),i=a.value===o.value,u={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?l.jsx(U1,{forceMount:n,...u,ref:s}):l.jsx(Ne,{present:n||i,children:l.jsx(Rf,{"data-state":ss(i),...u,ref:s,onPointerEnter:O(e.onPointerEnter,o.onContentEnter),onPointerLeave:O(e.onPointerLeave,Xr(o.onContentLeave)),style:{pointerEvents:!i&&o.isRootMenu?"none":void 0,...u.style}})})});Af.displayName=dn;var U1=c.forwardRef((e,t)=>{const n=Be(dn,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return xe(()=>{r(e.value,{ref:t,...e})},[e,t,r]),xe(()=>()=>o(e.value),[e.value,o]),null}),qr="navigationMenu.rootContentDismiss",Rf=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:s,onRootContentClose:i,onContentFocusOutside:u,...d}=e,f=Be(dn,n),p=c.useRef(null),v=oe(p,t),m=_f(f.baseId,r),h=Of(f.baseId,r),g=gf(n),b=c.useRef(null),{onItemDismiss:y}=f;c.useEffect(()=>{const x=p.current;if(f.isRootMenu&&x){const E=()=>{var S;y(),i(),x.contains(document.activeElement)&&((S=o.current)==null||S.focus())};return x.addEventListener(qr,E),()=>x.removeEventListener(qr,E)}},[f.isRootMenu,e.value,o,y,i]);const w=c.useMemo(()=>{const E=g().map(z=>z.value);f.dir==="rtl"&&E.reverse();const S=E.indexOf(f.value),M=E.indexOf(f.previousValue),T=r===f.value,j=M===E.indexOf(r);if(!T&&!j)return b.current;const D=(()=>{if(S!==M){if(T&&M!==-1)return S>M?"from-end":"from-start";if(j&&S!==-1)return S>M?"to-start":"to-end"}return null})();return b.current=D,D},[f.previousValue,f.value,f.dir,g,r]);return l.jsx(jf,{asChild:!0,children:l.jsx(_t,{id:h,"aria-labelledby":m,"data-motion":w,"data-orientation":f.orientation,...d,ref:v,disableOutsidePointerEvents:!1,onDismiss:()=>{var E;const x=new Event(qr,{bubbles:!0,cancelable:!0});(E=p.current)==null||E.dispatchEvent(x)},onFocusOutside:O(e.onFocusOutside,x=>{var S;u();const E=x.target;(S=f.rootNavigationMenu)!=null&&S.contains(E)&&x.preventDefault()}),onPointerDownOutside:O(e.onPointerDownOutside,x=>{var T;const E=x.target,S=g().some(j=>{var D;return(D=j.ref.current)==null?void 0:D.contains(E)}),M=f.isRootMenu&&((T=f.viewport)==null?void 0:T.contains(E));(S||M||!f.isRootMenu)&&x.preventDefault()}),onKeyDown:O(e.onKeyDown,x=>{var M;const E=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!E){const T=rs(x.currentTarget),j=document.activeElement,D=T.findIndex(I=>I===j),Y=x.shiftKey?T.slice(0,D).reverse():T.slice(D+1,T.length);os(Y)?x.preventDefault():(M=a.current)==null||M.focus()}}),onEscapeKeyDown:O(e.onEscapeKeyDown,x=>{s.current=!0})})})}),ns="NavigationMenuViewport",kf=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=!!Be(ns,e.__scopeNavigationMenu).value;return l.jsx(Ne,{present:n||a,children:l.jsx(Y1,{...r,ref:t})})});kf.displayName=ns;var Y1=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,a=Be(ns,n),s=oe(t,a.onViewportChange),i=W1(dn,e.__scopeNavigationMenu),[u,d]=c.useState(null),[f,p]=c.useState(null),v=u?(u==null?void 0:u.width)+"px":void 0,m=u?(u==null?void 0:u.height)+"px":void 0,h=!!a.value,g=h?a.value:a.previousValue;return as(f,()=>{f&&d({width:f.offsetWidth,height:f.offsetHeight})}),l.jsx($.div,{"data-state":ss(h),"data-orientation":a.orientation,...o,ref:s,style:{pointerEvents:!h&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":v,"--radix-navigation-menu-viewport-height":m,...o.style},onPointerEnter:O(e.onPointerEnter,a.onContentEnter),onPointerLeave:O(e.onPointerLeave,Xr(a.onContentLeave)),children:Array.from(i.items).map(([y,{ref:w,forceMount:x,...E}])=>{const S=g===y;return l.jsx(Ne,{present:x||S,children:l.jsx(Rf,{...E,ref:Nn(w,M=>{S&&M&&p(M)})})},y)})})}),K1="FocusGroup",jf=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Be(K1,n);return l.jsx(Za.Provider,{scope:n,children:l.jsx(Za.Slot,{scope:n,children:l.jsx($.div,{dir:o.dir,...r,ref:t})})})}),Df=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],q1="FocusGroupItem",If=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=L1(n),a=Be(q1,n);return l.jsx(Za.ItemSlot,{scope:n,children:l.jsx($.button,{...r,ref:t,onKeyDown:O(e.onKeyDown,s=>{if(["Home","End",...Df].includes(s.key)){let u=o().map(p=>p.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(s.key)&&u.reverse(),Df.includes(s.key)){const p=u.indexOf(s.currentTarget);u=u.slice(p+1)}setTimeout(()=>os(u)),s.preventDefault()}})})})});function rs(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function os(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function X1(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function as(e,t){const n=we(t);xe(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}function ss(e){return e?"open":"closed"}function _f(e,t){return`${e}-trigger-${t}`}function Of(e,t){return`${e}-content-${t}`}function Xr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Lf=vf,$f=xf,Q1=Sf,Ff=Ef,Z1=Mf,Bf=Tf,Wf=Af,zf=kf;const Vf=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Lf,{ref:r,className:R("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,l.jsx(is,{})]}));Vf.displayName=Lf.displayName;const Hf=c.forwardRef(({className:e,...t},n)=>l.jsx($f,{ref:n,className:R("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));Hf.displayName=$f.displayName;const J1=Q1,Gf=It("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Uf=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Ff,{ref:r,className:R(Gf(),"group",e),...n,children:[t," ",l.jsx(qt,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Uf.displayName=Ff.displayName;const Yf=c.forwardRef(({className:e,...t},n)=>l.jsx(Wf,{ref:n,className:R("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",e),...t}));Yf.displayName=Wf.displayName;const eN=Z1,is=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:R("absolute left-0 top-full flex justify-center"),children:l.jsx(zf,{className:R("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:n,...t})}));is.displayName=zf.displayName;const Kf=c.forwardRef(({className:e,...t},n)=>l.jsx(Bf,{ref:n,className:R("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:l.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));Kf.displayName=Bf.displayName;const ls=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:R("mx-auto flex w-full justify-center",e),...t});ls.displayName="Pagination";const cs=c.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:R("flex flex-row items-center gap-1",e),...t}));cs.displayName="PaginationContent";const mt=c.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:R("",e),...t}));mt.displayName="PaginationItem";const zt=({className:e,isActive:t,size:n="icon",...r})=>l.jsx(Se,{"aria-current":t?"page":void 0,className:R(xr({variant:t?"default":"outline",rounded:!1,size:n}),t?"text-primary-foreground":"text-foreground",e),...r,children:r.children});zt.displayName="PaginationLink";const us=({className:e,...t})=>l.jsx(zt,{"aria-label":"Previous page",className:R("gap-1",e),...t,children:l.jsx(Mo,{className:"h-4 w-4"})});us.displayName="PaginationPrevious";const ds=({className:e,...t})=>l.jsx(zt,{"aria-label":"Next page",className:R("gap-1",e),...t,children:l.jsx(Jn,{className:"h-4 w-4"})});ds.displayName="PaginationNext";const Qr=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:R("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(cb,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});Qr.displayName="PaginationEllipsis";var fs="Progress",ms=100,[tN,lP]=ye(fs),[nN,rN]=tN(fs),qf=c.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=oN,...s}=e;(o||o===0)&&!Jf(o)&&console.error(aN(`${o}`,"Progress"));const i=Jf(o)?o:ms;r!==null&&!em(r,i)&&console.error(sN(`${r}`,"Progress"));const u=em(r,i)?r:null,d=Zr(u)?a(u,i):void 0;return l.jsx(nN,{scope:n,value:u,max:i,children:l.jsx($.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Zr(u)?u:void 0,"aria-valuetext":d,role:"progressbar","data-state":Zf(u,i),"data-value":u??void 0,"data-max":i,...s,ref:t})})});qf.displayName=fs;var Xf="ProgressIndicator",Qf=c.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=rN(Xf,n);return l.jsx($.div,{"data-state":Zf(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Qf.displayName=Xf;function oN(e,t){return`${Math.round(e/t*100)}%`}function Zf(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Zr(e){return typeof e=="number"}function Jf(e){return Zr(e)&&!isNaN(e)&&e>0}function em(e,t){return Zr(e)&&!isNaN(e)&&e<=t&&e>=0}function aN(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ms}\`.`}function sN(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
258
258
  - a positive number
259
- - less than the value passed to \`max\` (or ${ds} if no \`max\` prop is set)
259
+ - less than the value passed to \`max\` (or ${ms} if no \`max\` prop is set)
260
260
  - \`null\` or \`undefined\` if the progress is indeterminate.
261
261
 
262
- Defaulting to \`null\`.`}var Jf=Yf,aN=qf;const fs=c.forwardRef(({className:e,value:t,...n},r)=>l.jsx(Jf,{ref:r,className:R("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:l.jsx(aN,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));fs.displayName=Jf.displayName;function sN(e){const{showStrengthMeter:t=!0,className:n,strengthLabels:r={veryWeak:"Very weak",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very strong"},showPasswordLabel:o="Show password",hidePasswordLabel:a="Hide password",strengthTitle:s="Password strength",...i}=e,[u,d]=P.useState(""),[f,p]=P.useState(!1),v=y=>{let w=0;return y.length>=8&&(w+=25),y.match(/[a-z]/)&&(w+=25),y.match(/[A-Z]/)&&(w+=25),y.match(/[0-9]/)&&(w+=25),w},m=y=>y===0?r.veryWeak:y<=25?r.weak:y<=50?r.medium:y<=75?r.strong:r.veryStrong,h=v(u),g=m(h),b=y=>{var w;d(y.target.value),(w=e.onChange)==null||w.call(e,y)};return l.jsxs("div",{className:"w-full space-y-4",children:[l.jsxs("div",{className:"relative",children:[l.jsx(or,{...i,type:f?"text":"password",value:u,onChange:b,className:`pr-10 ${n||""}`}),l.jsx(Ee,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full",onClick:()=>p(!f),"aria-label":f?a:o,children:f?l.jsx(lb,{className:"h-4 w-4"}):l.jsx(cb,{className:"h-4 w-4"})})]}),t&&l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsxs("span",{children:[s,":"]}),l.jsx("span",{children:g})]}),l.jsx(fs,{value:h,className:"h-2"})]})]})}var ms="Radio",[iN,em]=ye(ms),[lN,cN]=iN(ms),tm=c.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:u,form:d,...f}=e,[p,v]=c.useState(null),m=oe(t,b=>v(b)),h=c.useRef(!1),g=p?d||!!p.closest("form"):!0;return l.jsxs(lN,{scope:n,checked:o,disabled:s,children:[l.jsx($.button,{type:"button",role:"radio","aria-checked":o,"data-state":om(o),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:m,onClick:O(e.onClick,b=>{o||u==null||u(),g&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})}),g&&l.jsx(uN,{control:p,bubbles:!h.current,name:r,value:i,checked:o,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});tm.displayName=ms;var nm="RadioIndicator",rm=c.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=cN(nm,n);return l.jsx(Ne,{present:r||a.checked,children:l.jsx($.span,{"data-state":om(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});rm.displayName=nm;var uN=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=c.useRef(null),s=Pn(n),i=wr(t);return c.useEffect(()=>{const u=a.current,d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==n&&p){const v=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(v)}},[s,n,r]),l.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function om(e){return e?"checked":"unchecked"}var dN=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ps="RadioGroup",[fN,iP]=ye(ps,[Et,em]),am=Et(),sm=em(),[mN,pN]=fN(ps),im=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:u,dir:d,loop:f=!0,onValueChange:p,...v}=e,m=am(n),h=bt(d),[g,b]=Ce({prop:a,defaultProp:o,onChange:p});return l.jsx(mN,{scope:n,name:r,required:s,disabled:i,value:g,onValueChange:b,children:l.jsx(Wr,{asChild:!0,...m,orientation:u,dir:h,loop:f,children:l.jsx($.div,{role:"radiogroup","aria-required":s,"aria-orientation":u,"data-disabled":i?"":void 0,dir:h,...v,ref:t})})})});im.displayName=ps;var lm="RadioGroupItem",cm=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=pN(lm,n),s=a.disabled||r,i=am(n),u=sm(n),d=c.useRef(null),f=oe(t,d),p=a.value===o.value,v=c.useRef(!1);return c.useEffect(()=>{const m=g=>{dN.includes(g.key)&&(v.current=!0)},h=()=>v.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",h)}},[]),l.jsx(zr,{asChild:!0,...i,focusable:!s,active:p,children:l.jsx(tm,{disabled:s,required:a.required,checked:p,...u,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:O(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:O(o.onFocus,()=>{var m;v.current&&((m=d.current)==null||m.click())})})})});cm.displayName=lm;var hN="RadioGroupIndicator",um=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=sm(n);return l.jsx(rm,{...o,...r,ref:t})});um.displayName=hN;var dm=im,fm=cm,gN=um;const mm=c.forwardRef(({className:e,...t},n)=>l.jsx(dm,{className:R("grid gap-2",e),...t,ref:n}));mm.displayName=dm.displayName;const pm=c.forwardRef(({className:e,...t},n)=>l.jsx(fm,{ref:n,className:R("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx(gN,{className:"flex items-center justify-center",children:l.jsx(Pi,{className:"h-3.5 w-3.5 fill-primary"})})}));pm.displayName=fm.displayName;function hm(e,[t,n]){return Math.min(n,Math.max(t,e))}var vN=[" ","Enter","ArrowUp","ArrowDown"],bN=[" ","Enter"],Vn="Select",[Qr,Zr,yN]=qt(Vn),[dn,lP]=ye(Vn,[yN,St]),Jr=St(),[wN,Tt]=dn(Vn),[xN,CN]=dn(Vn),gm=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:v,required:m,form:h}=e,g=Jr(t),[b,y]=c.useState(null),[w,x]=c.useState(null),[E,S]=c.useState(!1),M=bt(d),[T=!1,j]=Ce({prop:r,defaultProp:o,onChange:a}),[D,z]=Ce({prop:s,defaultProp:i,onChange:u}),Y=c.useRef(null),I=b?h||!!b.closest("form"):!0,[K,H]=c.useState(new Set),J=Array.from(K).map(V=>V.props.value).join(";");return l.jsx(In,{...g,children:l.jsxs(wN,{required:m,scope:t,trigger:b,onTriggerChange:y,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:E,onValueNodeHasChildrenChange:S,contentId:he(),value:D,onValueChange:z,open:T,onOpenChange:j,dir:M,triggerPointerDownPosRef:Y,disabled:v,children:[l.jsx(Qr.Provider,{scope:t,children:l.jsx(xN,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(V=>{H(q=>new Set(q).add(V))},[]),onNativeOptionRemove:c.useCallback(V=>{H(q=>{const G=new Set(q);return G.delete(V),G})},[]),children:n})}),I?l.jsxs(Wm,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:D,onChange:V=>z(V.target.value),disabled:v,form:h,children:[D===void 0?l.jsx("option",{value:""}):null,Array.from(K)]},J):null]})})};gm.displayName=Vn;var vm="SelectTrigger",bm=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Jr(n),s=Tt(vm,n),i=s.disabled||r,u=oe(t,s.onTriggerChange),d=Zr(n),f=c.useRef("touch"),[p,v,m]=zm(g=>{const b=d().filter(x=>!x.disabled),y=b.find(x=>x.value===s.value),w=Vm(b,g,y);w!==void 0&&s.onValueChange(w.value)}),h=g=>{i||(s.onOpenChange(!0),m()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return l.jsx(_n,{asChild:!0,...a,children:l.jsx($.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Bm(s.value)?"":void 0,...o,ref:u,onClick:O(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&h(g)}),onPointerDown:O(o.onPointerDown,g=>{f.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(h(g),g.preventDefault())}),onKeyDown:O(o.onKeyDown,g=>{const b=p.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&v(g.key),!(b&&g.key===" ")&&vN.includes(g.key)&&(h(),g.preventDefault())})})})});bm.displayName=vm;var ym="SelectValue",wm=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,u=Tt(ym,n),{onValueNodeHasChildrenChange:d}=u,f=a!==void 0,p=oe(t,u.onValueNodeChange);return xe(()=>{d(f)},[d,f]),l.jsx($.span,{...i,ref:p,style:{pointerEvents:"none"},children:Bm(u.value)?l.jsx(l.Fragment,{children:s}):a})});wm.displayName=ym;var NN="SelectIcon",xm=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.jsx($.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});xm.displayName=NN;var zt="SelectContent",Cm=c.forwardRef((e,t)=>{const n=Tt(zt,e.__scopeSelect),[r,o]=c.useState();if(xe(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Kn.createPortal(l.jsx(Nm,{scope:e.__scopeSelect,children:l.jsx(Qr.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),a):null}return l.jsx(Sm,{...e,ref:t})});Cm.displayName=zt;var Ye=10,[Nm,At]=dn(zt),SN="SelectContentImpl",Sm=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:v,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:b,...y}=e,w=Tt(zt,n),[x,E]=c.useState(null),[S,M]=c.useState(null),T=oe(t,_=>E(_)),[j,D]=c.useState(null),[z,Y]=c.useState(null),I=Zr(n),[K,H]=c.useState(!1),J=c.useRef(!1);c.useEffect(()=>{if(x)return pr(x)},[x]),sr();const V=c.useCallback(_=>{const[Z,...te]=I().map(ce=>ce.ref.current),[ne]=te.slice(-1),ie=document.activeElement;for(const ce of _)if(ce===ie||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===Z&&S&&(S.scrollTop=0),ce===ne&&S&&(S.scrollTop=S.scrollHeight),ce==null||ce.focus(),document.activeElement!==ie))return},[I,S]),q=c.useCallback(()=>V([j,x]),[V,j,x]);c.useEffect(()=>{K&&q()},[K,q]);const{onOpenChange:G,triggerPointerDownPosRef:k}=w;c.useEffect(()=>{if(x){let _={x:0,y:0};const Z=ne=>{var ie,ce;_={x:Math.abs(Math.round(ne.pageX)-(((ie=k.current)==null?void 0:ie.x)??0)),y:Math.abs(Math.round(ne.pageY)-(((ce=k.current)==null?void 0:ce.y)??0))}},te=ne=>{_.x<=10&&_.y<=10?ne.preventDefault():x.contains(ne.target)||G(!1),document.removeEventListener("pointermove",Z),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",te,{capture:!0})}}},[x,G,k]),c.useEffect(()=>{const _=()=>G(!1);return window.addEventListener("blur",_),window.addEventListener("resize",_),()=>{window.removeEventListener("blur",_),window.removeEventListener("resize",_)}},[G]);const[Q,ee]=zm(_=>{const Z=I().filter(ie=>!ie.disabled),te=Z.find(ie=>ie.ref.current===document.activeElement),ne=Vm(Z,_,te);ne&&setTimeout(()=>ne.ref.current.focus())}),A=c.useCallback((_,Z,te)=>{const ne=!J.current&&!te;(w.value!==void 0&&w.value===Z||ne)&&(D(_),ne&&(J.current=!0))},[w.value]),L=c.useCallback(()=>x==null?void 0:x.focus(),[x]),F=c.useCallback((_,Z,te)=>{const ne=!J.current&&!te;(w.value!==void 0&&w.value===Z||ne)&&Y(_)},[w.value]),B=r==="popper"?hs:Em,X=B===hs?{side:i,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:v,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:b}:{};return l.jsx(Nm,{scope:n,content:x,viewport:S,onViewportChange:M,itemRefCallback:A,selectedItem:j,onItemLeave:L,itemTextRefCallback:F,focusSelectedItem:q,selectedItemText:z,position:r,isPositioned:K,searchRef:Q,children:l.jsx(En,{as:lt,allowPinchZoom:!0,children:l.jsx(Nn,{asChild:!0,trapped:w.open,onMountAutoFocus:_=>{_.preventDefault()},onUnmountAutoFocus:O(o,_=>{var Z;(Z=w.trigger)==null||Z.focus({preventScroll:!0}),_.preventDefault()}),children:l.jsx(It,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:_=>_.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:l.jsx(B,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:_=>_.preventDefault(),...y,...X,onPlaced:()=>H(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:O(y.onKeyDown,_=>{const Z=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!Z&&_.key.length===1&&ee(_.key),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let ne=I().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(_.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const ie=_.target,ce=ne.indexOf(ie);ne=ne.slice(ce+1)}setTimeout(()=>V(ne)),_.preventDefault()}})})})})})})});Sm.displayName=SN;var EN="SelectItemAlignedPosition",Em=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Tt(zt,n),s=At(zt,n),[i,u]=c.useState(null),[d,f]=c.useState(null),p=oe(t,T=>f(T)),v=Zr(n),m=c.useRef(!1),h=c.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:y,focusSelectedItem:w}=s,x=c.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&d&&g&&b&&y){const T=a.trigger.getBoundingClientRect(),j=d.getBoundingClientRect(),D=a.valueNode.getBoundingClientRect(),z=y.getBoundingClientRect();if(a.dir!=="rtl"){const ie=z.left-j.left,ce=D.left-ie,Se=T.left-ce,ve=T.width+Se,Ae=Math.max(ve,j.width),We=window.innerWidth-Ye,Pe=hm(ce,[Ye,Math.max(Ye,We-Ae)]);i.style.minWidth=ve+"px",i.style.left=Pe+"px"}else{const ie=j.right-z.right,ce=window.innerWidth-D.right-ie,Se=window.innerWidth-T.right-ce,ve=T.width+Se,Ae=Math.max(ve,j.width),We=window.innerWidth-Ye,Pe=hm(ce,[Ye,Math.max(Ye,We-Ae)]);i.style.minWidth=ve+"px",i.style.right=Pe+"px"}const Y=v(),I=window.innerHeight-Ye*2,K=g.scrollHeight,H=window.getComputedStyle(d),J=parseInt(H.borderTopWidth,10),V=parseInt(H.paddingTop,10),q=parseInt(H.borderBottomWidth,10),G=parseInt(H.paddingBottom,10),k=J+V+K+G+q,Q=Math.min(b.offsetHeight*5,k),ee=window.getComputedStyle(g),A=parseInt(ee.paddingTop,10),L=parseInt(ee.paddingBottom,10),F=T.top+T.height/2-Ye,B=I-F,X=b.offsetHeight/2,_=b.offsetTop+X,Z=J+V+_,te=k-Z;if(Z<=F){const ie=Y.length>0&&b===Y[Y.length-1].ref.current;i.style.bottom="0px";const ce=d.clientHeight-g.offsetTop-g.offsetHeight,Se=Math.max(B,X+(ie?L:0)+ce+q),ve=Z+Se;i.style.height=ve+"px"}else{const ie=Y.length>0&&b===Y[0].ref.current;i.style.top="0px";const Se=Math.max(F,J+g.offsetTop+(ie?A:0)+X)+te;i.style.height=Se+"px",g.scrollTop=Z-F+g.offsetTop}i.style.margin=`${Ye}px 0`,i.style.minHeight=Q+"px",i.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[v,a.trigger,a.valueNode,i,d,g,b,y,a.dir,r]);xe(()=>x(),[x]);const[E,S]=c.useState();xe(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const M=c.useCallback(T=>{T&&h.current===!0&&(x(),w==null||w(),h.current=!1)},[x,w]);return l.jsx(MN,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:M,children:l.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:l.jsx($.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Em.displayName=EN;var PN="SelectPopperPosition",hs=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ye,...a}=e,s=Jr(n);return l.jsx($r,{...s,...a,ref:t,align:r,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)"}})});hs.displayName=PN;var[MN,gs]=dn(zt,{}),vs="SelectViewport",Pm=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=At(vs,n),s=gs(vs,n),i=oe(t,a.onViewportChange),u=c.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(Qr.Slot,{scope:n,children:l.jsx($.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:O(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:v}=s;if(v!=null&&v.current&&p){const m=Math.abs(u.current-f.scrollTop);if(m>0){const h=window.innerHeight-Ye*2,g=parseFloat(p.style.minHeight),b=parseFloat(p.style.height),y=Math.max(g,b);if(y<h){const w=y+m,x=Math.min(h,w),E=w-x;p.style.height=x+"px",p.style.bottom==="0px"&&(f.scrollTop=E>0?E:0,p.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})});Pm.displayName=vs;var Mm="SelectGroup",[TN,AN]=dn(Mm),Tm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=he();return l.jsx(TN,{scope:n,id:o,children:l.jsx($.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Tm.displayName=Mm;var Am="SelectLabel",Rm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=AN(Am,n);return l.jsx($.div,{id:o.id,...r,ref:t})});Rm.displayName=Am;var eo="SelectItem",[RN,km]=dn(eo),jm=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Tt(eo,n),u=At(eo,n),d=i.value===r,[f,p]=c.useState(a??""),[v,m]=c.useState(!1),h=oe(t,w=>{var x;return(x=u.itemRefCallback)==null?void 0:x.call(u,w,r,o)}),g=he(),b=c.useRef("touch"),y=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(RN,{scope:n,value:r,disabled:o,textId:g,isSelected:d,onItemTextChange:c.useCallback(w=>{p(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:l.jsx(Qr.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:l.jsx($.div,{role:"option","aria-labelledby":g,"data-highlighted":v?"":void 0,"aria-selected":d&&v,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:h,onFocus:O(s.onFocus,()=>m(!0)),onBlur:O(s.onBlur,()=>m(!1)),onClick:O(s.onClick,()=>{b.current!=="mouse"&&y()}),onPointerUp:O(s.onPointerUp,()=>{b.current==="mouse"&&y()}),onPointerDown:O(s.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:O(s.onPointerMove,w=>{var x;b.current=w.pointerType,o?(x=u.onItemLeave)==null||x.call(u):b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:O(s.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=u.onItemLeave)==null||x.call(u))}),onKeyDown:O(s.onKeyDown,w=>{var E;((E=u.searchRef)==null?void 0:E.current)!==""&&w.key===" "||(bN.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});jm.displayName=eo;var Hn="SelectItemText",Dm=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Tt(Hn,n),i=At(Hn,n),u=km(Hn,n),d=CN(Hn,n),[f,p]=c.useState(null),v=oe(t,y=>p(y),u.onItemTextChange,y=>{var w;return(w=i.itemTextRefCallback)==null?void 0:w.call(i,y,u.value,u.disabled)}),m=f==null?void 0:f.textContent,h=c.useMemo(()=>l.jsx("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=d;return xe(()=>(g(h),()=>b(h)),[g,b,h]),l.jsxs(l.Fragment,{children:[l.jsx($.span,{id:u.textId,...a,ref:v}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Kn.createPortal(a.children,s.valueNode):null]})});Dm.displayName=Hn;var Im="SelectItemIndicator",_m=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return km(Im,n).isSelected?l.jsx($.span,{"aria-hidden":!0,...r,ref:t}):null});_m.displayName=Im;var bs="SelectScrollUpButton",Om=c.forwardRef((e,t)=>{const n=At(bs,e.__scopeSelect),r=gs(bs,e.__scopeSelect),[o,a]=c.useState(!1),s=oe(t,r.onScrollButtonChange);return xe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollTop>0;a(d)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?l.jsx($m,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop-u.offsetHeight)}}):null});Om.displayName=bs;var ys="SelectScrollDownButton",Lm=c.forwardRef((e,t)=>{const n=At(ys,e.__scopeSelect),r=gs(ys,e.__scopeSelect),[o,a]=c.useState(!1),s=oe(t,r.onScrollButtonChange);return xe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollHeight-u.clientHeight,f=Math.ceil(u.scrollTop)<d;a(f)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?l.jsx($m,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop+u.offsetHeight)}}):null});Lm.displayName=ys;var $m=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=At("SelectScrollButton",n),s=c.useRef(null),i=Zr(n),u=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),xe(()=>{var f;const d=i().find(p=>p.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),l.jsx($.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:O(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:O(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:O(o.onPointerLeave,()=>{u()})})}),kN="SelectSeparator",Fm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx($.div,{"aria-hidden":!0,...r,ref:t})});Fm.displayName=kN;var ws="SelectArrow",jN=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Jr(n),a=Tt(ws,n),s=At(ws,n);return a.open&&s.position==="popper"?l.jsx(Fr,{...o,...r,ref:t}):null});jN.displayName=ws;function Bm(e){return e===""||e===void 0}var Wm=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=c.useRef(null),a=oe(t,o),s=Pn(n);return c.useEffect(()=>{const i=o.current,u=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(u,"value").set;if(s!==n&&f){const p=new Event("change",{bubbles:!0});f.call(i,n),i.dispatchEvent(p)}},[s,n]),l.jsx(Ka,{asChild:!0,children:l.jsx("select",{...r,ref:a,defaultValue:n})})});Wm.displayName="BubbleSelect";function zm(e){const t=we(e),n=c.useRef(""),r=c.useRef(0),o=c.useCallback(s=>{const i=n.current+s;t(i),function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(i)},[t]),a=c.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Vm(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=DN(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const u=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function DN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var IN=gm,Hm=bm,_N=wm,ON=xm,Gm=Cm,LN=Pm,$N=Tm,Um=Rm,Ym=jm,FN=Dm,BN=_m,Km=Om,qm=Lm,Xm=Fm;const Qm=IN,WN=$N,Zm=_N,xs=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Hm,{ref:r,className:R("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,l.jsx(ON,{asChild:!0,children:l.jsx(Kt,{className:"h-4 w-4 opacity-50"})})]}));xs.displayName=Hm.displayName;const Cs=c.forwardRef(({className:e,...t},n)=>l.jsx(Km,{ref:n,className:R("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(rb,{className:"h-4 w-4"})}));Cs.displayName=Km.displayName;const Ns=c.forwardRef(({className:e,...t},n)=>l.jsx(qm,{ref:n,className:R("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(Kt,{className:"h-4 w-4"})}));Ns.displayName=qm.displayName;const Ss=c.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>l.jsxs(Gm,{ref:o,className:R("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground 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",n==="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:n,...r,children:[l.jsx(Cs,{}),l.jsx(LN,{className:R("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(Ns,{})]}));Ss.displayName=Gm.displayName;const Jm=c.forwardRef(({className:e,...t},n)=>l.jsx(Um,{ref:n,className:R("px-2 py-1.5 text-sm font-semibold",e),...t}));Jm.displayName=Um.displayName;const fn=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Ym,{ref:r,className:R("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(BN,{children:l.jsx(xn,{className:"h-4 w-4"})})}),l.jsx(FN,{children:t})]}));fn.displayName=Ym.displayName;const ep=c.forwardRef(({className:e,...t},n)=>l.jsx(Xm,{ref:n,className:R("-mx-1 my-1 h-px bg-muted",e),...t}));ep.displayName=Xm.displayName;const tp=({className:e,repeat:t=1,...n})=>l.jsx(l.Fragment,{children:Array.from({length:t??1}).map((r,o)=>l.jsx("div",{className:R("animate-pulse rounded-md bg-gray-700/10 w-full h-5",e),...n},o))}),zN=["primary","secondary","success","error","warning","info","white","neutral"],VN=["xs","sm","md","lg","xl","2xl"],np=Dt("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{color:{primary:"text-primary",secondary:"text-secondary",success:"text-green-700",error:"text-red-700",warning:"text-yellow-700",info:"text-blue-700",white:"text-white",neutral:"text-gray-700"},size:{xs:"h-4 w-4",sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-14 w-14","2xl":"h-20 w-20"}},defaultVariants:{color:"primary",size:"md"}}),rp=e=>{const{label:t,size:n,color:r,className:o}=e;return l.jsxs("div",{className:R("flex flex-col justify-center items-center",o),children:[l.jsx(gb,{className:R(np({color:r,size:n}),"animate-spin")}),t&&l.jsx("p",{className:R("italic",np({color:r})),children:t})]})};var Es="Switch",[HN,cP]=ye(Es),[GN,UN]=HN(Es),op=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:u="on",onCheckedChange:d,form:f,...p}=e,[v,m]=c.useState(null),h=oe(t,x=>m(x)),g=c.useRef(!1),b=v?f||!!v.closest("form"):!0,[y=!1,w]=Ce({prop:o,defaultProp:a,onChange:d});return l.jsxs(GN,{scope:n,checked:y,disabled:i,children:[l.jsx($.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":ip(y),"data-disabled":i?"":void 0,disabled:i,value:u,...p,ref:h,onClick:O(e.onClick,x=>{w(E=>!E),b&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),b&&l.jsx(YN,{control:v,bubbles:!g.current,name:r,value:u,checked:y,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});op.displayName=Es;var ap="SwitchThumb",sp=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=UN(ap,n);return l.jsx($.span,{"data-state":ip(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});sp.displayName=ap;var YN=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=c.useRef(null),s=Pn(n),i=wr(t);return c.useEffect(()=>{const u=a.current,d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==n&&p){const v=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(v)}},[s,n,r]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function ip(e){return e?"checked":"unchecked"}var lp=op,KN=sp;const cp=c.forwardRef(({className:e,...t},n)=>l.jsx(lp,{className:R("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:l.jsx(KN,{className:R("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));cp.displayName=lp.displayName;const up=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:n,className:R("w-full caption-bottom text-sm",e),...t})}));up.displayName="Table";const dp=c.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:R("[&_tr]:border-b",e),...t}));dp.displayName="TableHeader";const fp=c.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:R("[&_tr:last-child]:border-0",e),...t}));fp.displayName="TableBody";const mp=c.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:R("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));mp.displayName="TableFooter";const pp=c.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:R("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));pp.displayName="TableRow";const hp=c.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:R("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));hp.displayName="TableHead";const gp=c.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:R("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));gp.displayName="TableCell";const vp=c.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:R("mt-4 text-sm text-muted-foreground",e),...t}));vp.displayName="TableCaption";var Ps="Tabs",[qN,uP]=ye(Ps,[Et]),bp=Et(),[XN,Ms]=qN(Ps),yp=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:u="automatic",...d}=e,f=bt(i),[p,v]=Ce({prop:r,onChange:o,defaultProp:a});return l.jsx(XN,{scope:n,baseId:he(),value:p,onValueChange:v,orientation:s,dir:f,activationMode:u,children:l.jsx($.div,{dir:f,"data-orientation":s,...d,ref:t})})});yp.displayName=Ps;var wp="TabsList",xp=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Ms(wp,n),s=bp(n);return l.jsx(Wr,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:l.jsx($.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});xp.displayName=wp;var Cp="TabsTrigger",Np=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Ms(Cp,n),i=bp(n),u=Pp(s.baseId,r),d=Mp(s.baseId,r),f=r===s.value;return l.jsx(zr,{asChild:!0,...i,focusable:!o,active:f,children:l.jsx($.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...a,ref:t,onMouseDown:O(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?s.onValueChange(r):p.preventDefault()}),onKeyDown:O(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&s.onValueChange(r)}),onFocus:O(e.onFocus,()=>{const p=s.activationMode!=="manual";!f&&!o&&p&&s.onValueChange(r)})})})});Np.displayName=Cp;var Sp="TabsContent",Ep=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=Ms(Sp,n),u=Pp(i.baseId,r),d=Mp(i.baseId,r),f=r===i.value,p=c.useRef(f);return c.useEffect(()=>{const v=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(v)},[]),l.jsx(Ne,{present:o||f,children:({present:v})=>l.jsx($.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":u,hidden:!v,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:v&&a})})});Ep.displayName=Sp;function Pp(e,t){return`${e}-trigger-${t}`}function Mp(e,t){return`${e}-content-${t}`}var QN=yp,Tp=xp,Ap=Np,Rp=Ep;const ZN=QN,kp=c.forwardRef(({className:e,...t},n)=>l.jsx(Tp,{ref:n,className:R("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));kp.displayName=Tp.displayName;const jp=c.forwardRef(({className:e,...t},n)=>l.jsx(Ap,{ref:n,className:R("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));jp.displayName=Ap.displayName;const Dp=c.forwardRef(({className:e,...t},n)=>l.jsx(Rp,{ref:n,className:R("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Dp.displayName=Rp.displayName;const Ip=c.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:R("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));Ip.displayName="Textarea";var JN=e=>{switch(e){case"success":return nS;case"info":return oS;case"warning":return rS;case"error":return aS;default:return null}},eS=Array(12).fill(0),tS=({visible:e,className:t})=>P.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},P.createElement("div",{className:"sonner-spinner"},eS.map((n,r)=>P.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),nS=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),rS=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),oS=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),aS=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),sS=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},P.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),P.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),iS=()=>{let[e,t]=P.useState(document.hidden);return P.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Ts=1,lS=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Ts++,a=this.toasts.find(i=>i.id===o),s=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(i=>i.id===o?(this.publish({...i,...e,id:o,title:n}),{...i,...e,id:o,dismissible:s,title:n}):i):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,a,s=r.then(async u=>{if(a=["resolve",u],P.isValidElement(u))o=!1,this.create({id:n,type:"default",message:u});else if(uS(u)&&!u.ok){o=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:d,description:f})}else if(t.success!==void 0){o=!1;let d=typeof t.success=="function"?await t.success(u):t.success,f=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:d,description:f})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){o=!1;let d=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:d,description:f})}}).finally(()=>{var u;o&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),i=()=>new Promise((u,d)=>s.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:i}:Object.assign(n,{unwrap:i})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Ts++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Le=new lS,cS=(e,t)=>{let n=(t==null?void 0:t.id)||Ts++;return Le.addToast({title:e,...t,id:n}),n},uS=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",dS=cS,fS=()=>Le.toasts,mS=Object.assign(dS,{success:Le.success,info:Le.info,warning:Le.warning,error:Le.error,custom:Le.custom,message:Le.message,promise:Le.promise,dismiss:Le.dismiss,loading:Le.loading},{getHistory:fS});function pS(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}pS(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
263
- `);function to(e){return e.label!==void 0}var hS=3,gS="32px",_p=4e3,vS=356,bS=14,yS=20,wS=200;function xS(...e){return e.filter(Boolean).join(" ")}var CS=e=>{var t,n,r,o,a,s,i,u,d,f,p;let{invert:v,toast:m,unstyled:h,interacting:g,setHeights:b,visibleToasts:y,heights:w,index:x,toasts:E,expanded:S,removeToast:M,defaultRichColors:T,closeButton:j,style:D,cancelButtonStyle:z,actionButtonStyle:Y,className:I="",descriptionClassName:K="",duration:H,position:J,gap:V,loadingIcon:q,expandByDefault:G,classNames:k,icons:Q,closeButtonAriaLabel:ee="Close toast",pauseWhenPageIsHidden:A,cn:L}=e,[F,B]=P.useState(!1),[X,_]=P.useState(!1),[Z,te]=P.useState(!1),[ne,ie]=P.useState(!1),[ce,Se]=P.useState(!1),[ve,Ae]=P.useState(0),[We,Pe]=P.useState(0),$e=P.useRef(m.duration||H||_p),Re=P.useRef(null),pt=P.useRef(null),C=x===0,U=x+1<=y,W=m.type,le=m.dismissible!==!1,Me=m.className||"",pe=m.descriptionClassName||"",re=P.useMemo(()=>w.findIndex(ae=>ae.toastId===m.id)||0,[w,m.id]),Ke=P.useMemo(()=>{var ae;return(ae=m.closeButton)!=null?ae:j},[m.closeButton,j]);P.useMemo(()=>m.duration||H||_p,[m.duration,H]);let rt=P.useRef(0),be=P.useRef(0),ot=P.useRef(0),at=P.useRef(null),[qe,hn]=J.split("-"),ze=P.useMemo(()=>w.reduce((ae,fe,ge)=>ge>=re?ae:ae+fe.height,0),[w,re]),xh=iS(),HE=m.invert||v,Bs=W==="loading";be.current=P.useMemo(()=>re*V+ze,[re,ze]),P.useEffect(()=>{B(!0)},[]),P.useEffect(()=>{let ae=pt.current;if(ae){let fe=ae.getBoundingClientRect().height;return Pe(fe),b(ge=>[{toastId:m.id,height:fe,position:m.position},...ge]),()=>b(ge=>ge.filter(Xe=>Xe.toastId!==m.id))}},[b,m.id]),P.useLayoutEffect(()=>{if(!F)return;let ae=pt.current,fe=ae.style.height;ae.style.height="auto";let ge=ae.getBoundingClientRect().height;ae.style.height=fe,Pe(ge),b(Xe=>Xe.find(st=>st.toastId===m.id)?Xe.map(st=>st.toastId===m.id?{...st,height:ge}:st):[{toastId:m.id,height:ge,position:m.position},...Xe])},[F,m.title,m.description,b,m.id]);let kt=P.useCallback(()=>{_(!0),Ae(be.current),b(ae=>ae.filter(fe=>fe.toastId!==m.id)),setTimeout(()=>{M(m)},wS)},[m,M,b,be]);P.useEffect(()=>{if(m.promise&&W==="loading"||m.duration===1/0||m.type==="loading")return;let ae;return S||g||A&&xh?(()=>{if(ot.current<rt.current){let fe=new Date().getTime()-rt.current;$e.current=$e.current-fe}ot.current=new Date().getTime()})():$e.current!==1/0&&(rt.current=new Date().getTime(),ae=setTimeout(()=>{var fe;(fe=m.onAutoClose)==null||fe.call(m,m),kt()},$e.current)),()=>clearTimeout(ae)},[S,g,m,W,A,xh,kt]),P.useEffect(()=>{m.delete&&kt()},[kt,m.delete]);function GE(){var ae,fe,ge;return Q!=null&&Q.loading?P.createElement("div",{className:L(k==null?void 0:k.loader,(ae=m==null?void 0:m.classNames)==null?void 0:ae.loader,"sonner-loader"),"data-visible":W==="loading"},Q.loading):q?P.createElement("div",{className:L(k==null?void 0:k.loader,(fe=m==null?void 0:m.classNames)==null?void 0:fe.loader,"sonner-loader"),"data-visible":W==="loading"},q):P.createElement(tS,{className:L(k==null?void 0:k.loader,(ge=m==null?void 0:m.classNames)==null?void 0:ge.loader),visible:W==="loading"})}return P.createElement("li",{tabIndex:0,ref:pt,className:L(I,Me,k==null?void 0:k.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,k==null?void 0:k.default,k==null?void 0:k[W],(n=m==null?void 0:m.classNames)==null?void 0:n[W]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:T,"data-styled":!(m.jsx||m.unstyled||h),"data-mounted":F,"data-promise":!!m.promise,"data-swiped":ce,"data-removed":X,"data-visible":U,"data-y-position":qe,"data-x-position":hn,"data-index":x,"data-front":C,"data-swiping":Z,"data-dismissible":le,"data-type":W,"data-invert":HE,"data-swipe-out":ne,"data-expanded":!!(S||G&&F),style:{"--index":x,"--toasts-before":x,"--z-index":E.length-x,"--offset":`${X?ve:be.current}px`,"--initial-height":G?"auto":`${We}px`,...D,...m.style},onPointerDown:ae=>{Bs||!le||(Re.current=new Date,Ae(be.current),ae.target.setPointerCapture(ae.pointerId),ae.target.tagName!=="BUTTON"&&(te(!0),at.current={x:ae.clientX,y:ae.clientY}))},onPointerUp:()=>{var ae,fe,ge,Xe;if(ne||!le)return;at.current=null;let st=Number(((ae=pt.current)==null?void 0:ae.style.getPropertyValue("--swipe-amount").replace("px",""))||0),co=new Date().getTime()-((fe=Re.current)==null?void 0:fe.getTime()),UE=Math.abs(st)/co;if(Math.abs(st)>=yS||UE>.11){Ae(be.current),(ge=m.onDismiss)==null||ge.call(m,m),kt(),ie(!0),Se(!1);return}(Xe=pt.current)==null||Xe.style.setProperty("--swipe-amount","0px"),te(!1)},onPointerMove:ae=>{var fe,ge;if(!at.current||!le)return;let Xe=ae.clientY-at.current.y,st=((fe=window.getSelection())==null?void 0:fe.toString().length)>0,co=qe==="top"?Math.min(0,Xe):Math.max(0,Xe);Math.abs(co)>0&&Se(!0),!st&&((ge=pt.current)==null||ge.style.setProperty("--swipe-amount",`${co}px`))}},Ke&&!m.jsx?P.createElement("button",{"aria-label":ee,"data-disabled":Bs,"data-close-button":!0,onClick:Bs||!le?()=>{}:()=>{var ae;kt(),(ae=m.onDismiss)==null||ae.call(m,m)},className:L(k==null?void 0:k.closeButton,(o=m==null?void 0:m.classNames)==null?void 0:o.closeButton)},(a=Q==null?void 0:Q.close)!=null?a:sS):null,m.jsx||P.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:P.createElement(P.Fragment,null,W||m.icon||m.promise?P.createElement("div",{"data-icon":"",className:L(k==null?void 0:k.icon,(s=m==null?void 0:m.classNames)==null?void 0:s.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||GE():null,m.type!=="loading"?m.icon||(Q==null?void 0:Q[W])||JN(W):null):null,P.createElement("div",{"data-content":"",className:L(k==null?void 0:k.content,(i=m==null?void 0:m.classNames)==null?void 0:i.content)},P.createElement("div",{"data-title":"",className:L(k==null?void 0:k.title,(u=m==null?void 0:m.classNames)==null?void 0:u.title)},typeof m.title=="function"?m.title():m.title),m.description?P.createElement("div",{"data-description":"",className:L(K,pe,k==null?void 0:k.description,(d=m==null?void 0:m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),P.isValidElement(m.cancel)?m.cancel:m.cancel&&to(m.cancel)?P.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||z,onClick:ae=>{var fe,ge;to(m.cancel)&&le&&((ge=(fe=m.cancel).onClick)==null||ge.call(fe,ae),kt())},className:L(k==null?void 0:k.cancelButton,(f=m==null?void 0:m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,P.isValidElement(m.action)?m.action:m.action&&to(m.action)?P.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||Y,onClick:ae=>{var fe,ge;to(m.action)&&((ge=(fe=m.action).onClick)==null||ge.call(fe,ae),!ae.defaultPrevented&&kt())},className:L(k==null?void 0:k.actionButton,(p=m==null?void 0:m.classNames)==null?void 0:p.actionButton)},m.action.label):null))};function Op(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var NS=P.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:s,className:i,offset:u,theme:d="light",richColors:f,duration:p,style:v,visibleToasts:m=hS,toastOptions:h,dir:g=Op(),gap:b=bS,loadingIcon:y,icons:w,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:E,cn:S=xS}=e,[M,T]=P.useState([]),j=P.useMemo(()=>Array.from(new Set([r].concat(M.filter(A=>A.position).map(A=>A.position)))),[M,r]),[D,z]=P.useState([]),[Y,I]=P.useState(!1),[K,H]=P.useState(!1),[J,V]=P.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=P.useRef(null),G=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=P.useRef(null),Q=P.useRef(!1),ee=P.useCallback(A=>{T(L=>{var F;return(F=L.find(B=>B.id===A.id))!=null&&F.delete||Le.dismiss(A.id),L.filter(({id:B})=>B!==A.id)})},[]);return P.useEffect(()=>Le.subscribe(A=>{if(A.dismiss){T(L=>L.map(F=>F.id===A.id?{...F,delete:!0}:F));return}setTimeout(()=>{Yn.flushSync(()=>{T(L=>{let F=L.findIndex(B=>B.id===A.id);return F!==-1?[...L.slice(0,F),{...L[F],...A},...L.slice(F+1)]:[A,...L]})})})}),[]),P.useEffect(()=>{if(d!=="system"){V(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:L})=>{V(L?"dark":"light")})}catch{A.addListener(({matches:F})=>{try{V(F?"dark":"light")}catch(B){console.error(B)}})}},[d]),P.useEffect(()=>{M.length<=1&&I(!1)},[M]),P.useEffect(()=>{let A=L=>{var F,B;o.every(X=>L[X]||L.code===X)&&(I(!0),(F=q.current)==null||F.focus()),L.code==="Escape"&&(document.activeElement===q.current||(B=q.current)!=null&&B.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[o]),P.useEffect(()=>{if(q.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,Q.current=!1)}},[q.current]),P.createElement("section",{"aria-label":`${x} ${G}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},j.map((A,L)=>{var F;let[B,X]=A.split("-");return M.length?P.createElement("ol",{key:A,dir:g==="auto"?Op():g,tabIndex:-1,ref:q,className:i,"data-sonner-toaster":!0,"data-theme":J,"data-y-position":B,"data-lifted":Y&&M.length>1&&!a,"data-x-position":X,style:{"--front-toast-height":`${((F=D[0])==null?void 0:F.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||gS,"--width":`${vS}px`,"--gap":`${b}px`,...v},onBlur:_=>{Q.current&&!_.currentTarget.contains(_.relatedTarget)&&(Q.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:_=>{_.target instanceof HTMLElement&&_.target.dataset.dismissible==="false"||Q.current||(Q.current=!0,k.current=_.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{K||I(!1)},onPointerDown:_=>{_.target instanceof HTMLElement&&_.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},M.filter(_=>!_.position&&L===0||_.position===A).map((_,Z)=>{var te,ne;return P.createElement(CS,{key:_.id,icons:w,index:Z,toast:_,defaultRichColors:f,duration:(te=h==null?void 0:h.duration)!=null?te:p,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:n,visibleToasts:m,closeButton:(ne=h==null?void 0:h.closeButton)!=null?ne:s,interacting:K,position:A,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,removeToast:ee,toasts:M.filter(ie=>ie.position==_.position),heights:D.filter(ie=>ie.position==_.position),setHeights:z,expandByDefault:a,gap:b,loadingIcon:y,expanded:Y,pauseWhenPageIsHidden:E,cn:S})})):null}))});const SS=({...e})=>l.jsx(NS,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});var ES="Toggle",As=c.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...a}=e,[s=!1,i]=Ce({prop:n,onChange:o,defaultProp:r});return l.jsx($.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:O(e.onClick,()=>{e.disabled||i(!s)})})});As.displayName=ES;var Lp=As;const Rs=Dt("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent 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"}}),$p=c.forwardRef(({className:e,variant:t,size:n,...r},o)=>l.jsx(Lp,{ref:o,className:R(Rs({variant:t,size:n,className:e})),...r}));$p.displayName=Lp.displayName;var mn="ToggleGroup",[Fp,dP]=ye(mn,[Et]),Bp=Et(),ks=P.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return l.jsx(PS,{...o,ref:t})}if(n==="multiple"){const o=r;return l.jsx(MS,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${mn}\``)});ks.displayName=mn;var[Wp,zp]=Fp(mn),PS=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,i]=Ce({prop:n,defaultProp:r,onChange:o});return l.jsx(Wp,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:i,onItemDeactivate:P.useCallback(()=>i(""),[i]),children:l.jsx(Vp,{...a,ref:t})})}),MS=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s=[],i]=Ce({prop:n,defaultProp:r,onChange:o}),u=P.useCallback(f=>i((p=[])=>[...p,f]),[i]),d=P.useCallback(f=>i((p=[])=>p.filter(v=>v!==f)),[i]);return l.jsx(Wp,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:d,children:l.jsx(Vp,{...a,ref:t})})});ks.displayName=mn;var[TS,AS]=Fp(mn),Vp=P.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:s,loop:i=!0,...u}=e,d=Bp(n),f=bt(s),p={role:"group",dir:f,...u};return l.jsx(TS,{scope:n,rovingFocus:o,disabled:r,children:o?l.jsx(Wr,{asChild:!0,...d,orientation:a,dir:f,loop:i,children:l.jsx($.div,{...p,ref:t})}):l.jsx($.div,{...p,ref:t})})}),no="ToggleGroupItem",Hp=P.forwardRef((e,t)=>{const n=zp(no,e.__scopeToggleGroup),r=AS(no,e.__scopeToggleGroup),o=Bp(e.__scopeToggleGroup),a=n.value.includes(e.value),s=r.disabled||e.disabled,i={...e,pressed:a,disabled:s},u=P.useRef(null);return r.rovingFocus?l.jsx(zr,{asChild:!0,...o,focusable:!s,active:a,ref:u,children:l.jsx(Gp,{...i,ref:t})}):l.jsx(Gp,{...i,ref:t})});Hp.displayName=no;var Gp=P.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=zp(no,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=a.type==="single"?s:void 0;return l.jsx(As,{...i,...o,ref:t,onPressedChange:u=>{u?a.onItemActivate(r):a.onItemDeactivate(r)}})}),Up=ks,Yp=Hp;const Kp=c.createContext({size:"default",variant:"default"}),qp=c.forwardRef(({className:e,variant:t,size:n,children:r,...o},a)=>l.jsx(Up,{ref:a,className:R("flex items-center justify-center gap-1",e),...o,children:l.jsx(Kp.Provider,{value:{variant:t,size:n},children:r})}));qp.displayName=Up.displayName;const Xp=c.forwardRef(({className:e,children:t,variant:n,size:r,...o},a)=>{const s=c.useContext(Kp);return l.jsx(Yp,{ref:a,className:R(Rs({variant:s.variant||n,size:s.size||r}),e),...o,children:t})});Xp.displayName=Yp.displayName;var[ro,fP]=ye("Tooltip",[St]),oo=St(),Qp="TooltipProvider",RS=700,js="tooltip.open",[kS,Ds]=ro(Qp),Zp=e=>{const{__scopeTooltip:t,delayDuration:n=RS,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=c.useState(!0),u=c.useRef(!1),d=c.useRef(0);return c.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),l.jsx(kS,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(d.current),i(!1)},[]),onClose:c.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>i(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:c.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:a})};Zp.displayName=Qp;var ao="Tooltip",[jS,Gn]=ro(ao),Jp=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,u=Ds(ao,e.__scopeTooltip),d=oo(t),[f,p]=c.useState(null),v=he(),m=c.useRef(0),h=s??u.disableHoverableContent,g=i??u.delayDuration,b=c.useRef(!1),[y=!1,w]=Ce({prop:r,defaultProp:o,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(js))):u.onClose(),a==null||a(T)}}),x=c.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),E=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b.current=!1,w(!0)},[w]),S=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),M=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{b.current=!0,w(!0),m.current=0},g)},[g,w]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),l.jsx(In,{...d,children:l.jsx(jS,{scope:t,contentId:v,open:y,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{u.isOpenDelayed?M():E()},[u.isOpenDelayed,M,E]),onTriggerLeave:c.useCallback(()=>{h?S():(window.clearTimeout(m.current),m.current=0)},[S,h]),onOpen:E,onClose:S,disableHoverableContent:h,children:n})})};Jp.displayName=ao;var Is="TooltipTrigger",eh=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Gn(Is,n),a=Ds(Is,n),s=oo(n),i=c.useRef(null),u=oe(t,i,o.onTriggerChange),d=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>d.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(_n,{asChild:!0,...s,children:l.jsx($.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:O(e.onPointerMove,v=>{v.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:O(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:O(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:O(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:O(e.onBlur,o.onClose),onClick:O(e.onClick,o.onClose)})})});eh.displayName=Is;var _s="TooltipPortal",[DS,IS]=ro(_s,{forceMount:void 0}),th=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Gn(_s,t);return l.jsx(DS,{scope:t,forceMount:n,children:l.jsx(Ne,{present:n||a.open,children:l.jsx(Sn,{asChild:!0,container:o,children:r})})})};th.displayName=_s;var pn="TooltipContent",nh=c.forwardRef((e,t)=>{const n=IS(pn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Gn(pn,e.__scopeTooltip);return l.jsx(Ne,{present:r||s.open,children:s.disableHoverableContent?l.jsx(rh,{side:o,...a,ref:t}):l.jsx(_S,{side:o,...a,ref:t})})}),_S=c.forwardRef((e,t)=>{const n=Gn(pn,e.__scopeTooltip),r=Ds(pn,e.__scopeTooltip),o=c.useRef(null),a=oe(t,o),[s,i]=c.useState(null),{trigger:u,onClose:d}=n,f=o.current,{onPointerInTransitChange:p}=r,v=c.useCallback(()=>{i(null),p(!1)},[p]),m=c.useCallback((h,g)=>{const b=h.currentTarget,y={x:h.clientX,y:h.clientY},w=FS(y,b.getBoundingClientRect()),x=BS(y,w),E=WS(g.getBoundingClientRect()),S=VS([...x,...E]);i(S),p(!0)},[p]);return c.useEffect(()=>()=>v(),[v]),c.useEffect(()=>{if(u&&f){const h=b=>m(b,f),g=b=>m(b,u);return u.addEventListener("pointerleave",h),f.addEventListener("pointerleave",g),()=>{u.removeEventListener("pointerleave",h),f.removeEventListener("pointerleave",g)}}},[u,f,m,v]),c.useEffect(()=>{if(s){const h=g=>{const b=g.target,y={x:g.clientX,y:g.clientY},w=(u==null?void 0:u.contains(b))||(f==null?void 0:f.contains(b)),x=!zS(y,s);w?v():x&&(v(),d())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[u,f,s,d,v]),l.jsx(rh,{...e,ref:a})}),[OS,LS]=ro(ao,{isInside:!1}),rh=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,u=Gn(pn,n),d=oo(n),{onClose:f}=u;return c.useEffect(()=>(document.addEventListener(js,f),()=>document.removeEventListener(js,f)),[f]),c.useEffect(()=>{if(u.trigger){const p=v=>{const m=v.target;m!=null&&m.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),l.jsx(It,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs($r,{"data-state":u.stateAttribute,...d,...i,ref:t,style:{...i.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:[l.jsx(To,{children:r}),l.jsx(OS,{scope:n,isInside:!0,children:l.jsx(mf,{id:u.contentId,role:"tooltip",children:o||r})})]})})});nh.displayName=pn;var oh="TooltipArrow",$S=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=oo(n);return LS(oh,n).isInside?null:l.jsx(Fr,{...o,...r,ref:t})});$S.displayName=oh;function FS(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function BS(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function WS(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function zS(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,u=t[a].y,d=t[s].x,f=t[s].y;u>r!=f>r&&n<(d-i)*(r-u)/(f-u)+i&&(o=!o)}return o}function VS(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),HS(t)}function HS(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var GS=Zp,US=Jp,YS=eh,KS=th,ah=nh;const qS=GS,XS=US,QS=YS,sh=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(KS,{children:l.jsx(ah,{ref:r,sideOffset:t,className:R("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs 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",e),...n})}));sh.displayName=ah.displayName;function ZS(e){const{triggerElement:t,steps:n}=e,[r,o]=P.useState(!1),[a,s]=P.useState(0),i=()=>{s(d=>d<n.length-1?d+1:d)},u=()=>{s(d=>d>0?d-1:d)};return l.jsxs(Nr,{open:r,onOpenChange:o,children:[l.jsx(Jc,{asChild:!0,children:t}),l.jsxs(Rn,{className:"sm:max-w-[425px]",children:[l.jsxs(Sr,{className:R(n[a].title===""&&"sr-only"),children:[l.jsx(Er,{children:n[a].title}),l.jsx(Pr,{className:"sr-only",children:n[a].title})]}),l.jsx("div",{children:n[a].description}),l.jsxs("div",{className:"flex items-center justify-between mt-4",children:[l.jsx(Ee,{variant:"ghost",size:"icon",onClick:u,disabled:a===0,children:l.jsx(So,{className:"h-4 w-4"})}),l.jsx("div",{className:"flex justify-center gap-1",children:n.map((d,f)=>l.jsx("div",{className:R("h-3 w-3 rounded-full",f===a?"bg-primary":"bg-gray-200")},f))}),l.jsx(Ee,{variant:"ghost",size:"icon",onClick:i,disabled:a===n.length-1,children:l.jsx(Zn,{className:"h-4 w-4"})})]})]})]})}const JS=e=>l.jsx("div",{className:"unreset",dangerouslySetInnerHTML:{__html:e.children}}),eE=e=>{const{execCommand:t}=e,n=()=>{const a=document.createElement("input");a.type="file",a.accept="image/*",a.onchange=async s=>{var u;const i=(u=s.target.files)==null?void 0:u[0];if(i){const d=new FileReader;d.onload=()=>{t("insertImage",d.result)},d.readAsDataURL(i)}},a.click()},r=()=>{const a=prompt("Enter the URL:");a&&t("createLink",a)},o=a=>{t("fontSize",a)};return l.jsxs("div",{className:"flex flex-wrap gap-2 border-b pb-2 mb-2",children:[l.jsx(Ee,{variant:"outline",size:"icon",onClick:()=>t("bold"),children:l.jsx(nb,{size:16})}),l.jsx(Ee,{variant:"outline",size:"icon",onClick:()=>t("italic"),children:l.jsx(fb,{size:16})}),l.jsx(Ee,{variant:"outline",size:"icon",onClick:()=>t("underline"),children:l.jsx(bb,{size:16})}),l.jsxs(Qm,{onValueChange:a=>o(a),defaultValue:"3",children:[l.jsx(xs,{className:"w-[80px]",children:l.jsx(Zm,{placeholder:"Size"})}),l.jsxs(Ss,{children:[l.jsx(fn,{value:"1",children:l.jsx("div",{children:"Small"})}),l.jsx(fn,{value:"3",children:l.jsx("div",{children:"Medium"})}),l.jsx(fn,{value:"5",children:l.jsx("div",{children:"Large"})}),l.jsx(fn,{value:"7",children:l.jsx("div",{children:"Extra Large"})})]})]}),l.jsx(Ee,{variant:"outline",size:"icon",onClick:()=>t("insertUnorderedList"),children:l.jsx(hb,{size:16})}),l.jsx(Ee,{variant:"outline",size:"icon",onClick:()=>t("insertOrderedList"),children:l.jsx(pb,{size:16})}),l.jsx(Ee,{variant:"outline",size:"icon",onClick:()=>t("formatBlock","blockquote"),children:l.jsx(vb,{size:16})}),l.jsx(Ee,{variant:"outline",size:"icon",onClick:n,children:l.jsx(ub,{size:16})}),l.jsx(Ee,{variant:"outline",size:"icon",onClick:r,children:l.jsx(mb,{size:16})})]})},tE=({initialValue:e="",onChange:t,className:n})=>{const r=P.useRef(null);P.useEffect(()=>{const s=new MutationObserver(()=>{t==null||t(r.current?r.current.innerHTML:"")});r.current&&s.observe(r.current,{childList:!0})},[]),P.useEffect(()=>{r.current&&(r.current.innerHTML=e)},[]);const o=()=>{r.current&&(t==null||t(r.current.innerHTML))},a=(s,i)=>{r.current&&(document.execCommand(s,!1,i),o())};return l.jsxs("div",{className:R("w-full p-4 border rounded-lg shadow-md",n),children:[l.jsx(eE,{execCommand:a}),l.jsx("div",{ref:r,contentEditable:!0,className:"w-full h-48 p-2 border rounded overflow-y-auto focus:outline-none min-h-20 resize-y unreset",onInput:o})]})},nE=e=>{const{observerOptions:t,images:n,classNames:r}=e,[o,a]=P.useState([]),s=P.useRef(null);return P.useEffect(()=>{const i={root:document.querySelector(".image-gallery"),rootMargin:"0px",threshold:1,...t};return s.current=new IntersectionObserver(u=>{u.forEach(d=>{if(d.isIntersecting&&d.target instanceof HTMLDivElement){const f=Number(d.target.dataset.index);a(p=>[...new Set([...p,f])])}})},i),()=>{var u;return(u=s.current)==null?void 0:u.disconnect()}},[]),P.useEffect(()=>{document.querySelectorAll(".image-cell").forEach(u=>{var d;return(d=s.current)==null?void 0:d.observe(u)})},[n]),l.jsx("div",{className:R("image-gallery overflow-auto grid grid-cols-[repeat(auto-fit,minmax(300px,1fr))]","gap-2 justify-center h-full",r==null?void 0:r.imageGallery),children:n.map((i,u)=>l.jsx("div",{"data-index":u,className:R("image-cell w-full h-52",r==null?void 0:r.imageCell),children:o.includes(u)&&l.jsx("img",{src:i,alt:`Gallery Image ${u+1}`,className:R("animate-fade-up animate-duration-[400ms] animate-ease-linear w-full h-full object-cover",r==null?void 0:r.image)})},u))})},rE=e=>{const{currentMonth:t,currentYear:n,onChangeMonthYear:r,locale:o=ho}=e,a=s=>{let i=t,u=n;s==="prev"?i===0?(i=11,u--):i--:i===11?(i=0,u++):i++,r(i,u)};return l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>a("prev"),"aria-label":"Previous month",children:l.jsx(eb,{className:"!h-8 !w-8"})}),l.jsxs("div",{className:"text-center",children:[l.jsx("h2",{className:"text-2xl font-bold capitalize",children:o.localize.month(t,{width:"wide"})}),l.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),l.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>a("next"),"aria-label":"Next month",children:l.jsx(tb,{className:"!h-8 !w-8"})})]})};function ih({totalPages:e,maxVisiblePages:t=5,mode:n="full",onPageChange:r,current:o=1}){const[a,s]=P.useState(o);P.useEffect(()=>{s(o)},[o]);const i=d=>{d>=1&&d<=e&&(s(d),r(d))},u=()=>{if(n==="minimal")return null;const d=[],f=Math.floor(t/2);let p=Math.max(a-f,2);const v=Math.min(p+t-3,e-1);v-p+3<t&&(p=Math.max(v-t+4,2)),d.push(l.jsx(mt,{children:l.jsx(Wt,{onClick:m=>{m.preventDefault(),i(1)},isActive:a===1,children:"1"})},1)),p>2&&d.push(l.jsx(mt,{children:l.jsx(qr,{})},"start-ellipsis"));for(let m=p;m<=v;m++)d.push(l.jsx(mt,{children:l.jsx(Wt,{onClick:h=>{h.preventDefault(),i(m)},isActive:a===m,children:m})},m));return v<e-1&&d.push(l.jsx(mt,{children:l.jsx(qr,{})},"end-ellipsis")),e>1&&d.push(l.jsx(mt,{children:l.jsx(Wt,{onClick:m=>{m.preventDefault(),i(e)},isActive:a===e,children:e})},e)),d};return l.jsx(ss,{children:l.jsxs(is,{children:[l.jsx(mt,{children:l.jsx(ls,{disabled:a===1,onClick:d=>{d.preventDefault(),i(a-1)}})}),u(),l.jsx(mt,{children:l.jsx(cs,{disabled:a===e,onClick:d=>{d.preventDefault(),i(a+1)}})})]})})}const lh=({initIndex:e,onPageChange:t,totalItems:n,totalPages:r,pageTotalItems:o,currentPage:a,showItemsCounter:s=!0})=>l.jsxs("div",{className:"flex flex-col gap-2 items-end",children:[s&&l.jsxs("p",{children:[l.jsx("b",{children:e+1})," - ",l.jsx("b",{children:e+o})," (",n,")"]}),r>1&&l.jsx(ih,{current:a,onPageChange:t,totalPages:r})]}),oE=e=>{const{data:t=[],perPage:n=50,initialPage:r=1,children:o,itemsContainerClass:a="",emptyState:s=l.jsx(Ti,{notFoundText:"No item found!"}),isLoading:i=!1,showItemsCounter:u=!0,loadingVariant:d="loader"}=e,[f,p]=P.useState(t),[v,m]=P.useState(r),h=Math.ceil(f.length/n),g=(v-1)*n,b=v*n,y=f.slice(g,b),w=i?l.jsx("section",{className:"w-full",children:d==="loader"?l.jsx(rp,{size:"lg"}):l.jsx(tp,{className:"h-12 w-full",repeat:n})}):f.length===0?s:void 0;return l.jsxs("div",{className:"flex flex-col gap-4 items-end",children:[l.jsx(lh,{initIndex:g,endIndex:b,totalItems:f.length,totalPages:h,currentPage:v,pageTotalItems:y.length,onPageChange:m,showItemsCounter:u}),w?l.jsx("section",{className:"w-full",children:w}):l.jsx("section",{className:`w-full ${a}`,children:y.map((x,E)=>l.jsx(P.Fragment,{children:o(x,E)},x.id))}),l.jsx(lh,{initIndex:g,endIndex:b,totalItems:f.length,totalPages:h,currentPage:v,pageTotalItems:y.length,onPageChange:m,showItemsCounter:u})]})},aE=({fixed:e,isOpen:t,onToggle:n,children:r,className:o})=>{const[a,s]=P.useState(!0),i=P.useRef(null),u=P.useRef(null),d=t!==void 0?t:a,f=()=>{var v;e||(n?n(!1):s(!1),(v=u.current)==null||v.focus())},p=v=>{i.current&&!i.current.contains(v.target)&&!e&&f()};return P.useEffect(()=>{if(!e)return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[e]),l.jsxs(l.Fragment,{children:[l.jsx("aside",{ref:i,className:R("bg-white z-50 h-full shadow-md flex flex-col fixed top-0 left-0 transition-all duration-300 ease-in-out overflow-auto",{"w-72":e||d},{"w-0":!d&&!e},{"translate-x-0":d},{"-translate-x-full":!d&&!e},o),"aria-hidden":!d,children:r}),e&&l.jsx("div",{className:"w-72 relative"})]})},sE=({children:e,className:t})=>l.jsx("header",{className:R("p-4 flex justify-between items-center border-b",t),"aria-label":"Sidebar header",children:e}),iE=({children:e,className:t})=>l.jsx("nav",{"aria-label":"Sidebar navigation",className:t,children:e}),lE=({children:e,className:t})=>l.jsx("ul",{className:R("flex flex-col gap-2 my-4 px-4",t),children:e}),cE=({children:e,className:t,onClick:n})=>l.jsx("li",{className:R("flex items-center gap-2 hover:bg-gray-100 rounded transition-colors",t),onClick:n,children:e}),uE=({children:e,className:t})=>l.jsx("footer",{className:R("mt-auto p-4 text-sm",t),"aria-label":"Sidebar footer",children:e}),dE=()=>{const[e,t]=P.useState([]);return[e,a=>{t([...e,a])},a=>{const s=[...e];s.splice(a,1),t(s)},(a,s)=>{const i=[...e];i.filter(u=>u[a]!==s),t(i)}]};function fE(){const[e,t]=P.useState(null);return[e,async r=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(r),t(r),!0}catch(o){return console.warn("Copy failed",o),t(null),!1}}]}function mE(e,t=250){const[n,r]=P.useState(e);return P.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n}const ch=c.createContext(void 0),uh={sm:"sm:max-w-[425px]",md:"sm:max-w-[550px]",lg:"sm:max-w-[700px]",xl:"sm:max-w-[900px]"},dh={info:{icon:db,className:"text-blue-500"},success:{icon:ab,className:"text-green-500"},error:{icon:Eo,className:"text-red-500"},warning:{icon:ob,className:"text-yellow-500"},confirm:{icon:Ei,className:"text-blue-500"},custom:{icon:Ei,className:"text-gray-500"}};function pE({children:e}){var g,b,y,w,x,E,S,M,T,j,D,z,Y;const[t,n]=c.useState({isOpen:!1,options:null}),r=c.useCallback(I=>{n({isOpen:!0,options:I})},[]),o=c.useCallback(()=>{n(I=>({...I,isOpen:!1}))},[]),a=c.useCallback(I=>{r({...I,type:"info"})},[r]),s=c.useCallback(I=>{r({...I,type:"success"})},[r]),i=c.useCallback(I=>{r({...I,type:"error"})},[r]),u=c.useCallback(I=>{r({...I,type:"warning"})},[r]),d=c.useCallback(I=>{r({...I,type:"custom"})},[r]),f=c.useCallback(I=>{r({...I,type:"confirm"})},[r]),p=(I,K)=>{let H=dh[I].icon;return K&&(H=K),l.jsx(H,{className:R("h-24 w-24",dh[I].className)})},v=c.useMemo(()=>({open:r,close:o,info:a,success:s,error:i,warning:u,custom:d,confirm:f}),[r,o,a,s,i,u,d,f]),[m,h]=c.useState(!1);return l.jsxs(ch.Provider,{value:v,children:[e,l.jsx(Nr,{open:t.isOpen,onOpenChange:I=>!I&&o(),modal:!0,children:l.jsxs(Rn,{className:R((g=t.options)!=null&&g.size?uh[t.options.size]:uh.sm,(b=t.options)==null?void 0:b.className),children:[t.options&&l.jsxs(Sr,{children:[l.jsx("div",{className:"mx-auto mb-6",children:p(t.options.type,t.options.icon)}),t.options.title&&l.jsx(Er,{className:"text-center",children:t.options.title}),l.jsx(Pr,{className:"text-center",children:t.options.message})]}),((y=t.options)==null?void 0:y.type)==="confirm"&&l.jsxs("div",{className:"flex justify-center gap-4 mt-4",children:[l.jsx(Ee,{isLoading:m??((x=(w=t.options)==null?void 0:w.confirmButton)==null?void 0:x.loading),disabled:(S=(E=t.options)==null?void 0:E.confirmButton)==null?void 0:S.disabled,className:(M=t.options.confirmButton)==null?void 0:M.className,onClick:()=>{var K,H,J,V;if(!((H=(K=t.options)==null?void 0:K.confirmButton)!=null&&H.onClick))throw new Error("Confirmation type dialog needs to implement the onConfirm function");const I=(V=(J=t.options)==null?void 0:J.confirmButton)==null?void 0:V.onClick();I instanceof Promise?(h(!0),I.then(()=>{h(!1),o()}).finally(()=>h(!1))):o()},children:((T=t.options.confirmButton)==null?void 0:T.label)??"Confirm"}),((j=t.options.cancelButton)==null?void 0:j.label)&&l.jsx(Ee,{variant:"outline",onClick:o,className:t.options.cancelButton.className,isLoading:(D=t.options.cancelButton)==null?void 0:D.loading,disabled:m||((z=t.options.cancelButton)==null?void 0:z.disabled),children:(Y=t.options.cancelButton)==null?void 0:Y.label})]})]})})]})}function hE(){const e=c.useContext(ch);if(e===void 0)throw new Error("useDialog must be used within a DialogProvider");return e}const gE=(e=!1)=>{const[t,n]=c.useState(e),r=c.useCallback(()=>n(!0),[]),o=c.useCallback(()=>n(!1),[]),a=c.useCallback(()=>n(s=>!s),[]);return{isOpen:t,open:r,close:o,toggle:a}},vE=(e=!1)=>{const[t,n]=c.useState(e),r=c.useCallback(()=>n(!0),[]),o=c.useCallback(()=>n(!1),[]);return[t,r,o]};/*!
262
+ Defaulting to \`null\`.`}var tm=qf,iN=Qf;const ps=c.forwardRef(({className:e,value:t,...n},r)=>l.jsx(tm,{ref:r,className:R("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:l.jsx(iN,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));ps.displayName=tm.displayName;function lN(e){const{showStrengthMeter:t=!0,className:n,strengthLabels:r={veryWeak:"Very weak",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very strong"},showPasswordLabel:o="Show password",hidePasswordLabel:a="Hide password",strengthTitle:s="Password strength",...i}=e,[u,d]=P.useState(""),[f,p]=P.useState(!1),v=y=>{let w=0;return y.length>=8&&(w+=25),y.match(/[a-z]/)&&(w+=25),y.match(/[A-Z]/)&&(w+=25),y.match(/[0-9]/)&&(w+=25),w},m=y=>y===0?r.veryWeak:y<=25?r.weak:y<=50?r.medium:y<=75?r.strong:r.veryStrong,h=v(u),g=m(h),b=y=>{var w;d(y.target.value),(w=e.onChange)==null||w.call(e,y)};return l.jsxs("div",{className:"w-full space-y-4",children:[l.jsxs("div",{className:"relative",children:[l.jsx(sr,{...i,type:f?"text":"password",value:u,onChange:b,className:`pr-10 ${n||""}`}),l.jsx(Se,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full",onClick:()=>p(!f),"aria-label":f?a:o,children:f?l.jsx(ub,{className:"h-4 w-4"}):l.jsx(db,{className:"h-4 w-4"})})]}),t&&l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsxs("span",{children:[s,":"]}),l.jsx("span",{children:g})]}),l.jsx(ps,{value:h,className:"h-2"})]})]})}var hs="Radio",[cN,nm]=ye(hs),[uN,dN]=cN(hs),rm=c.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:u,form:d,...f}=e,[p,v]=c.useState(null),m=oe(t,b=>v(b)),h=c.useRef(!1),g=p?d||!!p.closest("form"):!0;return l.jsxs(uN,{scope:n,checked:o,disabled:s,children:[l.jsx($.button,{type:"button",role:"radio","aria-checked":o,"data-state":sm(o),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:m,onClick:O(e.onClick,b=>{o||u==null||u(),g&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})}),g&&l.jsx(fN,{control:p,bubbles:!h.current,name:r,value:i,checked:o,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});rm.displayName=hs;var om="RadioIndicator",am=c.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=dN(om,n);return l.jsx(Ne,{present:r||a.checked,children:l.jsx($.span,{"data-state":sm(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});am.displayName=om;var fN=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=c.useRef(null),s=Mn(n),i=Cr(t);return c.useEffect(()=>{const u=a.current,d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==n&&p){const v=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(v)}},[s,n,r]),l.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function sm(e){return e?"checked":"unchecked"}var mN=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],gs="RadioGroup",[pN,cP]=ye(gs,[Pt,nm]),im=Pt(),lm=nm(),[hN,gN]=pN(gs),cm=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:u,dir:d,loop:f=!0,onValueChange:p,...v}=e,m=im(n),h=yt(d),[g,b]=Ce({prop:a,defaultProp:o,onChange:p});return l.jsx(hN,{scope:n,name:r,required:s,disabled:i,value:g,onValueChange:b,children:l.jsx(Vr,{asChild:!0,...m,orientation:u,dir:h,loop:f,children:l.jsx($.div,{role:"radiogroup","aria-required":s,"aria-orientation":u,"data-disabled":i?"":void 0,dir:h,...v,ref:t})})})});cm.displayName=gs;var um="RadioGroupItem",dm=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=gN(um,n),s=a.disabled||r,i=im(n),u=lm(n),d=c.useRef(null),f=oe(t,d),p=a.value===o.value,v=c.useRef(!1);return c.useEffect(()=>{const m=g=>{mN.includes(g.key)&&(v.current=!0)},h=()=>v.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",h)}},[]),l.jsx(Hr,{asChild:!0,...i,focusable:!s,active:p,children:l.jsx(rm,{disabled:s,required:a.required,checked:p,...u,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:O(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:O(o.onFocus,()=>{var m;v.current&&((m=d.current)==null||m.click())})})})});dm.displayName=um;var vN="RadioGroupIndicator",fm=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=lm(n);return l.jsx(am,{...o,...r,ref:t})});fm.displayName=vN;var mm=cm,pm=dm,bN=fm;const hm=c.forwardRef(({className:e,...t},n)=>l.jsx(mm,{className:R("grid gap-2",e),...t,ref:n}));hm.displayName=mm.displayName;const gm=c.forwardRef(({className:e,...t},n)=>l.jsx(pm,{ref:n,className:R("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx(bN,{className:"flex items-center justify-center",children:l.jsx(Ti,{className:"h-3.5 w-3.5 fill-primary"})})}));gm.displayName=pm.displayName;function vm(e,[t,n]){return Math.min(n,Math.max(t,e))}var yN=[" ","Enter","ArrowUp","ArrowDown"],wN=[" ","Enter"],Hn="Select",[Jr,eo,xN]=Xt(Hn),[fn,uP]=ye(Hn,[xN,Et]),to=Et(),[CN,At]=fn(Hn),[NN,SN]=fn(Hn),bm=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:v,required:m,form:h}=e,g=to(t),[b,y]=c.useState(null),[w,x]=c.useState(null),[E,S]=c.useState(!1),M=yt(d),[T=!1,j]=Ce({prop:r,defaultProp:o,onChange:a}),[D,z]=Ce({prop:s,defaultProp:i,onChange:u}),Y=c.useRef(null),I=b?h||!!b.closest("form"):!0,[K,H]=c.useState(new Set),J=Array.from(K).map(V=>V.props.value).join(";");return l.jsx(_n,{...g,children:l.jsxs(CN,{required:m,scope:t,trigger:b,onTriggerChange:y,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:E,onValueNodeHasChildrenChange:S,contentId:he(),value:D,onValueChange:z,open:T,onOpenChange:j,dir:M,triggerPointerDownPosRef:Y,disabled:v,children:[l.jsx(Jr.Provider,{scope:t,children:l.jsx(NN,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(V=>{H(q=>new Set(q).add(V))},[]),onNativeOptionRemove:c.useCallback(V=>{H(q=>{const G=new Set(q);return G.delete(V),G})},[]),children:n})}),I?l.jsxs(Vm,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:D,onChange:V=>z(V.target.value),disabled:v,form:h,children:[D===void 0?l.jsx("option",{value:""}):null,Array.from(K)]},J):null]})})};bm.displayName=Hn;var ym="SelectTrigger",wm=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=to(n),s=At(ym,n),i=s.disabled||r,u=oe(t,s.onTriggerChange),d=eo(n),f=c.useRef("touch"),[p,v,m]=Hm(g=>{const b=d().filter(x=>!x.disabled),y=b.find(x=>x.value===s.value),w=Gm(b,g,y);w!==void 0&&s.onValueChange(w.value)}),h=g=>{i||(s.onOpenChange(!0),m()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return l.jsx(On,{asChild:!0,...a,children:l.jsx($.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":zm(s.value)?"":void 0,...o,ref:u,onClick:O(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&h(g)}),onPointerDown:O(o.onPointerDown,g=>{f.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(h(g),g.preventDefault())}),onKeyDown:O(o.onKeyDown,g=>{const b=p.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&v(g.key),!(b&&g.key===" ")&&yN.includes(g.key)&&(h(),g.preventDefault())})})})});wm.displayName=ym;var xm="SelectValue",Cm=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,u=At(xm,n),{onValueNodeHasChildrenChange:d}=u,f=a!==void 0,p=oe(t,u.onValueNodeChange);return xe(()=>{d(f)},[d,f]),l.jsx($.span,{...i,ref:p,style:{pointerEvents:"none"},children:zm(u.value)?l.jsx(l.Fragment,{children:s}):a})});Cm.displayName=xm;var EN="SelectIcon",Nm=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.jsx($.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Nm.displayName=EN;var Vt="SelectContent",Sm=c.forwardRef((e,t)=>{const n=At(Vt,e.__scopeSelect),[r,o]=c.useState();if(xe(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?qn.createPortal(l.jsx(Em,{scope:e.__scopeSelect,children:l.jsx(Jr.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),a):null}return l.jsx(Pm,{...e,ref:t})});Sm.displayName=Vt;var Ye=10,[Em,Rt]=fn(Vt),PN="SelectContentImpl",Pm=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:v,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:b,...y}=e,w=At(Vt,n),[x,E]=c.useState(null),[S,M]=c.useState(null),T=oe(t,_=>E(_)),[j,D]=c.useState(null),[z,Y]=c.useState(null),I=eo(n),[K,H]=c.useState(!1),J=c.useRef(!1);c.useEffect(()=>{if(x)return gr(x)},[x]),lr();const V=c.useCallback(_=>{const[Z,...te]=I().map(ce=>ce.ref.current),[ne]=te.slice(-1),ie=document.activeElement;for(const ce of _)if(ce===ie||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===Z&&S&&(S.scrollTop=0),ce===ne&&S&&(S.scrollTop=S.scrollHeight),ce==null||ce.focus(),document.activeElement!==ie))return},[I,S]),q=c.useCallback(()=>V([j,x]),[V,j,x]);c.useEffect(()=>{K&&q()},[K,q]);const{onOpenChange:G,triggerPointerDownPosRef:k}=w;c.useEffect(()=>{if(x){let _={x:0,y:0};const Z=ne=>{var ie,ce;_={x:Math.abs(Math.round(ne.pageX)-(((ie=k.current)==null?void 0:ie.x)??0)),y:Math.abs(Math.round(ne.pageY)-(((ce=k.current)==null?void 0:ce.y)??0))}},te=ne=>{_.x<=10&&_.y<=10?ne.preventDefault():x.contains(ne.target)||G(!1),document.removeEventListener("pointermove",Z),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",te,{capture:!0})}}},[x,G,k]),c.useEffect(()=>{const _=()=>G(!1);return window.addEventListener("blur",_),window.addEventListener("resize",_),()=>{window.removeEventListener("blur",_),window.removeEventListener("resize",_)}},[G]);const[Q,ee]=Hm(_=>{const Z=I().filter(ie=>!ie.disabled),te=Z.find(ie=>ie.ref.current===document.activeElement),ne=Gm(Z,_,te);ne&&setTimeout(()=>ne.ref.current.focus())}),A=c.useCallback((_,Z,te)=>{const ne=!J.current&&!te;(w.value!==void 0&&w.value===Z||ne)&&(D(_),ne&&(J.current=!0))},[w.value]),L=c.useCallback(()=>x==null?void 0:x.focus(),[x]),F=c.useCallback((_,Z,te)=>{const ne=!J.current&&!te;(w.value!==void 0&&w.value===Z||ne)&&Y(_)},[w.value]),B=r==="popper"?vs:Mm,X=B===vs?{side:i,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:v,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:b}:{};return l.jsx(Em,{scope:n,content:x,viewport:S,onViewportChange:M,itemRefCallback:A,selectedItem:j,onItemLeave:L,itemTextRefCallback:F,focusSelectedItem:q,selectedItemText:z,position:r,isPositioned:K,searchRef:Q,children:l.jsx(Pn,{as:lt,allowPinchZoom:!0,children:l.jsx(Sn,{asChild:!0,trapped:w.open,onMountAutoFocus:_=>{_.preventDefault()},onUnmountAutoFocus:O(o,_=>{var Z;(Z=w.trigger)==null||Z.focus({preventScroll:!0}),_.preventDefault()}),children:l.jsx(_t,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:_=>_.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:l.jsx(B,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:_=>_.preventDefault(),...y,...X,onPlaced:()=>H(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:O(y.onKeyDown,_=>{const Z=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!Z&&_.key.length===1&&ee(_.key),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let ne=I().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(_.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const ie=_.target,ce=ne.indexOf(ie);ne=ne.slice(ce+1)}setTimeout(()=>V(ne)),_.preventDefault()}})})})})})})});Pm.displayName=PN;var MN="SelectItemAlignedPosition",Mm=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=At(Vt,n),s=Rt(Vt,n),[i,u]=c.useState(null),[d,f]=c.useState(null),p=oe(t,T=>f(T)),v=eo(n),m=c.useRef(!1),h=c.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:y,focusSelectedItem:w}=s,x=c.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&d&&g&&b&&y){const T=a.trigger.getBoundingClientRect(),j=d.getBoundingClientRect(),D=a.valueNode.getBoundingClientRect(),z=y.getBoundingClientRect();if(a.dir!=="rtl"){const ie=z.left-j.left,ce=D.left-ie,Ee=T.left-ce,ve=T.width+Ee,Ae=Math.max(ve,j.width),We=window.innerWidth-Ye,Pe=vm(ce,[Ye,Math.max(Ye,We-Ae)]);i.style.minWidth=ve+"px",i.style.left=Pe+"px"}else{const ie=j.right-z.right,ce=window.innerWidth-D.right-ie,Ee=window.innerWidth-T.right-ce,ve=T.width+Ee,Ae=Math.max(ve,j.width),We=window.innerWidth-Ye,Pe=vm(ce,[Ye,Math.max(Ye,We-Ae)]);i.style.minWidth=ve+"px",i.style.right=Pe+"px"}const Y=v(),I=window.innerHeight-Ye*2,K=g.scrollHeight,H=window.getComputedStyle(d),J=parseInt(H.borderTopWidth,10),V=parseInt(H.paddingTop,10),q=parseInt(H.borderBottomWidth,10),G=parseInt(H.paddingBottom,10),k=J+V+K+G+q,Q=Math.min(b.offsetHeight*5,k),ee=window.getComputedStyle(g),A=parseInt(ee.paddingTop,10),L=parseInt(ee.paddingBottom,10),F=T.top+T.height/2-Ye,B=I-F,X=b.offsetHeight/2,_=b.offsetTop+X,Z=J+V+_,te=k-Z;if(Z<=F){const ie=Y.length>0&&b===Y[Y.length-1].ref.current;i.style.bottom="0px";const ce=d.clientHeight-g.offsetTop-g.offsetHeight,Ee=Math.max(B,X+(ie?L:0)+ce+q),ve=Z+Ee;i.style.height=ve+"px"}else{const ie=Y.length>0&&b===Y[0].ref.current;i.style.top="0px";const Ee=Math.max(F,J+g.offsetTop+(ie?A:0)+X)+te;i.style.height=Ee+"px",g.scrollTop=Z-F+g.offsetTop}i.style.margin=`${Ye}px 0`,i.style.minHeight=Q+"px",i.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[v,a.trigger,a.valueNode,i,d,g,b,y,a.dir,r]);xe(()=>x(),[x]);const[E,S]=c.useState();xe(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const M=c.useCallback(T=>{T&&h.current===!0&&(x(),w==null||w(),h.current=!1)},[x,w]);return l.jsx(AN,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:M,children:l.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:l.jsx($.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Mm.displayName=MN;var TN="SelectPopperPosition",vs=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ye,...a}=e,s=to(n);return l.jsx(Br,{...s,...a,ref:t,align:r,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)"}})});vs.displayName=TN;var[AN,bs]=fn(Vt,{}),ys="SelectViewport",Tm=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Rt(ys,n),s=bs(ys,n),i=oe(t,a.onViewportChange),u=c.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(Jr.Slot,{scope:n,children:l.jsx($.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:O(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:v}=s;if(v!=null&&v.current&&p){const m=Math.abs(u.current-f.scrollTop);if(m>0){const h=window.innerHeight-Ye*2,g=parseFloat(p.style.minHeight),b=parseFloat(p.style.height),y=Math.max(g,b);if(y<h){const w=y+m,x=Math.min(h,w),E=w-x;p.style.height=x+"px",p.style.bottom==="0px"&&(f.scrollTop=E>0?E:0,p.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})});Tm.displayName=ys;var Am="SelectGroup",[RN,kN]=fn(Am),Rm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=he();return l.jsx(RN,{scope:n,id:o,children:l.jsx($.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Rm.displayName=Am;var km="SelectLabel",jm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=kN(km,n);return l.jsx($.div,{id:o.id,...r,ref:t})});jm.displayName=km;var no="SelectItem",[jN,Dm]=fn(no),Im=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=At(no,n),u=Rt(no,n),d=i.value===r,[f,p]=c.useState(a??""),[v,m]=c.useState(!1),h=oe(t,w=>{var x;return(x=u.itemRefCallback)==null?void 0:x.call(u,w,r,o)}),g=he(),b=c.useRef("touch"),y=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(jN,{scope:n,value:r,disabled:o,textId:g,isSelected:d,onItemTextChange:c.useCallback(w=>{p(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:l.jsx(Jr.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:l.jsx($.div,{role:"option","aria-labelledby":g,"data-highlighted":v?"":void 0,"aria-selected":d&&v,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:h,onFocus:O(s.onFocus,()=>m(!0)),onBlur:O(s.onBlur,()=>m(!1)),onClick:O(s.onClick,()=>{b.current!=="mouse"&&y()}),onPointerUp:O(s.onPointerUp,()=>{b.current==="mouse"&&y()}),onPointerDown:O(s.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:O(s.onPointerMove,w=>{var x;b.current=w.pointerType,o?(x=u.onItemLeave)==null||x.call(u):b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:O(s.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=u.onItemLeave)==null||x.call(u))}),onKeyDown:O(s.onKeyDown,w=>{var E;((E=u.searchRef)==null?void 0:E.current)!==""&&w.key===" "||(wN.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});Im.displayName=no;var Gn="SelectItemText",_m=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=At(Gn,n),i=Rt(Gn,n),u=Dm(Gn,n),d=SN(Gn,n),[f,p]=c.useState(null),v=oe(t,y=>p(y),u.onItemTextChange,y=>{var w;return(w=i.itemTextRefCallback)==null?void 0:w.call(i,y,u.value,u.disabled)}),m=f==null?void 0:f.textContent,h=c.useMemo(()=>l.jsx("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=d;return xe(()=>(g(h),()=>b(h)),[g,b,h]),l.jsxs(l.Fragment,{children:[l.jsx($.span,{id:u.textId,...a,ref:v}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?qn.createPortal(a.children,s.valueNode):null]})});_m.displayName=Gn;var Om="SelectItemIndicator",Lm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Dm(Om,n).isSelected?l.jsx($.span,{"aria-hidden":!0,...r,ref:t}):null});Lm.displayName=Om;var ws="SelectScrollUpButton",$m=c.forwardRef((e,t)=>{const n=Rt(ws,e.__scopeSelect),r=bs(ws,e.__scopeSelect),[o,a]=c.useState(!1),s=oe(t,r.onScrollButtonChange);return xe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollTop>0;a(d)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?l.jsx(Bm,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop-u.offsetHeight)}}):null});$m.displayName=ws;var xs="SelectScrollDownButton",Fm=c.forwardRef((e,t)=>{const n=Rt(xs,e.__scopeSelect),r=bs(xs,e.__scopeSelect),[o,a]=c.useState(!1),s=oe(t,r.onScrollButtonChange);return xe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollHeight-u.clientHeight,f=Math.ceil(u.scrollTop)<d;a(f)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?l.jsx(Bm,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop+u.offsetHeight)}}):null});Fm.displayName=xs;var Bm=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Rt("SelectScrollButton",n),s=c.useRef(null),i=eo(n),u=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),xe(()=>{var f;const d=i().find(p=>p.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),l.jsx($.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:O(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:O(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:O(o.onPointerLeave,()=>{u()})})}),DN="SelectSeparator",Wm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx($.div,{"aria-hidden":!0,...r,ref:t})});Wm.displayName=DN;var Cs="SelectArrow",IN=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=to(n),a=At(Cs,n),s=Rt(Cs,n);return a.open&&s.position==="popper"?l.jsx(Wr,{...o,...r,ref:t}):null});IN.displayName=Cs;function zm(e){return e===""||e===void 0}var Vm=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=c.useRef(null),a=oe(t,o),s=Mn(n);return c.useEffect(()=>{const i=o.current,u=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(u,"value").set;if(s!==n&&f){const p=new Event("change",{bubbles:!0});f.call(i,n),i.dispatchEvent(p)}},[s,n]),l.jsx(Xa,{asChild:!0,children:l.jsx("select",{...r,ref:a,defaultValue:n})})});Vm.displayName="BubbleSelect";function Hm(e){const t=we(e),n=c.useRef(""),r=c.useRef(0),o=c.useCallback(s=>{const i=n.current+s;t(i),function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(i)},[t]),a=c.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Gm(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=_N(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const u=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function _N(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ON=bm,Um=wm,LN=Cm,$N=Nm,Ym=Sm,FN=Tm,BN=Rm,Km=jm,qm=Im,WN=_m,zN=Lm,Xm=$m,Qm=Fm,Zm=Wm;const Jm=ON,VN=BN,ep=LN,Ns=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Um,{ref:r,className:R("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,l.jsx($N,{asChild:!0,children:l.jsx(qt,{className:"h-4 w-4 opacity-50"})})]}));Ns.displayName=Um.displayName;const Ss=c.forwardRef(({className:e,...t},n)=>l.jsx(Xm,{ref:n,className:R("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(ab,{className:"h-4 w-4"})}));Ss.displayName=Xm.displayName;const Es=c.forwardRef(({className:e,...t},n)=>l.jsx(Qm,{ref:n,className:R("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(qt,{className:"h-4 w-4"})}));Es.displayName=Qm.displayName;const Ps=c.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>l.jsxs(Ym,{ref:o,className:R("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground 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",n==="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:n,...r,children:[l.jsx(Ss,{}),l.jsx(FN,{className:R("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(Es,{})]}));Ps.displayName=Ym.displayName;const tp=c.forwardRef(({className:e,...t},n)=>l.jsx(Km,{ref:n,className:R("px-2 py-1.5 text-sm font-semibold",e),...t}));tp.displayName=Km.displayName;const mn=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(qm,{ref:r,className:R("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(zN,{children:l.jsx(Cn,{className:"h-4 w-4"})})}),l.jsx(WN,{children:t})]}));mn.displayName=qm.displayName;const np=c.forwardRef(({className:e,...t},n)=>l.jsx(Zm,{ref:n,className:R("-mx-1 my-1 h-px bg-muted",e),...t}));np.displayName=Zm.displayName;const rp=({className:e,repeat:t=1,...n})=>l.jsx(l.Fragment,{children:Array.from({length:t??1}).map((r,o)=>l.jsx("div",{className:R("animate-pulse rounded-md bg-gray-700/10 w-full h-5",e),...n},o))}),HN=["primary","secondary","success","error","warning","info","white","neutral"],GN=["xs","sm","md","lg","xl","2xl"],op=It("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{color:{primary:"text-primary",secondary:"text-secondary",success:"text-green-700",error:"text-red-700",warning:"text-yellow-700",info:"text-blue-700",white:"text-white",neutral:"text-gray-700"},size:{xs:"h-4 w-4",sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-14 w-14","2xl":"h-20 w-20"}},defaultVariants:{color:"primary",size:"md"}}),ap=e=>{const{label:t,size:n,color:r,className:o}=e;return l.jsxs("div",{className:R("flex flex-col justify-center items-center",o),children:[l.jsx(bb,{className:R(op({color:r,size:n}),"animate-spin")}),t&&l.jsx("p",{className:R("italic",op({color:r})),children:t})]})};var Ms="Switch",[UN,dP]=ye(Ms),[YN,KN]=UN(Ms),sp=c.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:u="on",onCheckedChange:d,form:f,...p}=e,[v,m]=c.useState(null),h=oe(t,x=>m(x)),g=c.useRef(!1),b=v?f||!!v.closest("form"):!0,[y=!1,w]=Ce({prop:o,defaultProp:a,onChange:d});return l.jsxs(YN,{scope:n,checked:y,disabled:i,children:[l.jsx($.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":cp(y),"data-disabled":i?"":void 0,disabled:i,value:u,...p,ref:h,onClick:O(e.onClick,x=>{w(E=>!E),b&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),b&&l.jsx(qN,{control:v,bubbles:!g.current,name:r,value:u,checked:y,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});sp.displayName=Ms;var ip="SwitchThumb",lp=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=KN(ip,n);return l.jsx($.span,{"data-state":cp(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});lp.displayName=ip;var qN=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=c.useRef(null),s=Mn(n),i=Cr(t);return c.useEffect(()=>{const u=a.current,d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==n&&p){const v=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(v)}},[s,n,r]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function cp(e){return e?"checked":"unchecked"}var up=sp,XN=lp;const dp=c.forwardRef(({className:e,...t},n)=>l.jsx(up,{className:R("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:l.jsx(XN,{className:R("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));dp.displayName=up.displayName;const fp=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:n,className:R("w-full caption-bottom text-sm",e),...t})}));fp.displayName="Table";const mp=c.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:R("[&_tr]:border-b",e),...t}));mp.displayName="TableHeader";const pp=c.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:R("[&_tr:last-child]:border-0",e),...t}));pp.displayName="TableBody";const hp=c.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:R("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));hp.displayName="TableFooter";const gp=c.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:R("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));gp.displayName="TableRow";const vp=c.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:R("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));vp.displayName="TableHead";const bp=c.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:R("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));bp.displayName="TableCell";const yp=c.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:R("mt-4 text-sm text-muted-foreground",e),...t}));yp.displayName="TableCaption";var Ts="Tabs",[QN,fP]=ye(Ts,[Pt]),wp=Pt(),[ZN,As]=QN(Ts),xp=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:u="automatic",...d}=e,f=yt(i),[p,v]=Ce({prop:r,onChange:o,defaultProp:a});return l.jsx(ZN,{scope:n,baseId:he(),value:p,onValueChange:v,orientation:s,dir:f,activationMode:u,children:l.jsx($.div,{dir:f,"data-orientation":s,...d,ref:t})})});xp.displayName=Ts;var Cp="TabsList",Np=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=As(Cp,n),s=wp(n);return l.jsx(Vr,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:l.jsx($.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Np.displayName=Cp;var Sp="TabsTrigger",Ep=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=As(Sp,n),i=wp(n),u=Tp(s.baseId,r),d=Ap(s.baseId,r),f=r===s.value;return l.jsx(Hr,{asChild:!0,...i,focusable:!o,active:f,children:l.jsx($.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...a,ref:t,onMouseDown:O(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?s.onValueChange(r):p.preventDefault()}),onKeyDown:O(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&s.onValueChange(r)}),onFocus:O(e.onFocus,()=>{const p=s.activationMode!=="manual";!f&&!o&&p&&s.onValueChange(r)})})})});Ep.displayName=Sp;var Pp="TabsContent",Mp=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=As(Pp,n),u=Tp(i.baseId,r),d=Ap(i.baseId,r),f=r===i.value,p=c.useRef(f);return c.useEffect(()=>{const v=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(v)},[]),l.jsx(Ne,{present:o||f,children:({present:v})=>l.jsx($.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":u,hidden:!v,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:v&&a})})});Mp.displayName=Pp;function Tp(e,t){return`${e}-trigger-${t}`}function Ap(e,t){return`${e}-content-${t}`}var JN=xp,Rp=Np,kp=Ep,jp=Mp;const eS=JN,Dp=c.forwardRef(({className:e,...t},n)=>l.jsx(Rp,{ref:n,className:R("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Dp.displayName=Rp.displayName;const Ip=c.forwardRef(({className:e,...t},n)=>l.jsx(kp,{ref:n,className:R("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Ip.displayName=kp.displayName;const _p=c.forwardRef(({className:e,...t},n)=>l.jsx(jp,{ref:n,className:R("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));_p.displayName=jp.displayName;const Op=c.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:R("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));Op.displayName="Textarea";var tS=e=>{switch(e){case"success":return oS;case"info":return sS;case"warning":return aS;case"error":return iS;default:return null}},nS=Array(12).fill(0),rS=({visible:e,className:t})=>P.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},P.createElement("div",{className:"sonner-spinner"},nS.map((n,r)=>P.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),oS=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),aS=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),sS=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),iS=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),lS=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},P.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),P.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),cS=()=>{let[e,t]=P.useState(document.hidden);return P.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Rs=1,uS=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Rs++,a=this.toasts.find(i=>i.id===o),s=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(i=>i.id===o?(this.publish({...i,...e,id:o,title:n}),{...i,...e,id:o,dismissible:s,title:n}):i):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,a,s=r.then(async u=>{if(a=["resolve",u],P.isValidElement(u))o=!1,this.create({id:n,type:"default",message:u});else if(fS(u)&&!u.ok){o=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:d,description:f})}else if(t.success!==void 0){o=!1;let d=typeof t.success=="function"?await t.success(u):t.success,f=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:d,description:f})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){o=!1;let d=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:d,description:f})}}).finally(()=>{var u;o&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),i=()=>new Promise((u,d)=>s.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:i}:Object.assign(n,{unwrap:i})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Rs++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Le=new uS,dS=(e,t)=>{let n=(t==null?void 0:t.id)||Rs++;return Le.addToast({title:e,...t,id:n}),n},fS=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",mS=dS,pS=()=>Le.toasts,pt=Object.assign(mS,{success:Le.success,info:Le.info,warning:Le.warning,error:Le.error,custom:Le.custom,message:Le.message,promise:Le.promise,dismiss:Le.dismiss,loading:Le.loading},{getHistory:pS});function hS(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}hS(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
263
+ `);function ro(e){return e.label!==void 0}var gS=3,vS="32px",Lp=4e3,bS=356,yS=14,wS=20,xS=200;function CS(...e){return e.filter(Boolean).join(" ")}var NS=e=>{var t,n,r,o,a,s,i,u,d,f,p;let{invert:v,toast:m,unstyled:h,interacting:g,setHeights:b,visibleToasts:y,heights:w,index:x,toasts:E,expanded:S,removeToast:M,defaultRichColors:T,closeButton:j,style:D,cancelButtonStyle:z,actionButtonStyle:Y,className:I="",descriptionClassName:K="",duration:H,position:J,gap:V,loadingIcon:q,expandByDefault:G,classNames:k,icons:Q,closeButtonAriaLabel:ee="Close toast",pauseWhenPageIsHidden:A,cn:L}=e,[F,B]=P.useState(!1),[X,_]=P.useState(!1),[Z,te]=P.useState(!1),[ne,ie]=P.useState(!1),[ce,Ee]=P.useState(!1),[ve,Ae]=P.useState(0),[We,Pe]=P.useState(0),$e=P.useRef(m.duration||H||Lp),Re=P.useRef(null),ht=P.useRef(null),C=x===0,U=x+1<=y,W=m.type,le=m.dismissible!==!1,Me=m.className||"",pe=m.descriptionClassName||"",re=P.useMemo(()=>w.findIndex(ae=>ae.toastId===m.id)||0,[w,m.id]),Ke=P.useMemo(()=>{var ae;return(ae=m.closeButton)!=null?ae:j},[m.closeButton,j]);P.useMemo(()=>m.duration||H||Lp,[m.duration,H]);let rt=P.useRef(0),be=P.useRef(0),ot=P.useRef(0),at=P.useRef(null),[qe,gn]=J.split("-"),ze=P.useMemo(()=>w.reduce((ae,fe,ge)=>ge>=re?ae:ae+fe.height,0),[w,re]),Nh=cS(),UE=m.invert||v,zs=W==="loading";be.current=P.useMemo(()=>re*V+ze,[re,ze]),P.useEffect(()=>{B(!0)},[]),P.useEffect(()=>{let ae=ht.current;if(ae){let fe=ae.getBoundingClientRect().height;return Pe(fe),b(ge=>[{toastId:m.id,height:fe,position:m.position},...ge]),()=>b(ge=>ge.filter(Xe=>Xe.toastId!==m.id))}},[b,m.id]),P.useLayoutEffect(()=>{if(!F)return;let ae=ht.current,fe=ae.style.height;ae.style.height="auto";let ge=ae.getBoundingClientRect().height;ae.style.height=fe,Pe(ge),b(Xe=>Xe.find(st=>st.toastId===m.id)?Xe.map(st=>st.toastId===m.id?{...st,height:ge}:st):[{toastId:m.id,height:ge,position:m.position},...Xe])},[F,m.title,m.description,b,m.id]);let jt=P.useCallback(()=>{_(!0),Ae(be.current),b(ae=>ae.filter(fe=>fe.toastId!==m.id)),setTimeout(()=>{M(m)},xS)},[m,M,b,be]);P.useEffect(()=>{if(m.promise&&W==="loading"||m.duration===1/0||m.type==="loading")return;let ae;return S||g||A&&Nh?(()=>{if(ot.current<rt.current){let fe=new Date().getTime()-rt.current;$e.current=$e.current-fe}ot.current=new Date().getTime()})():$e.current!==1/0&&(rt.current=new Date().getTime(),ae=setTimeout(()=>{var fe;(fe=m.onAutoClose)==null||fe.call(m,m),jt()},$e.current)),()=>clearTimeout(ae)},[S,g,m,W,A,Nh,jt]),P.useEffect(()=>{m.delete&&jt()},[jt,m.delete]);function YE(){var ae,fe,ge;return Q!=null&&Q.loading?P.createElement("div",{className:L(k==null?void 0:k.loader,(ae=m==null?void 0:m.classNames)==null?void 0:ae.loader,"sonner-loader"),"data-visible":W==="loading"},Q.loading):q?P.createElement("div",{className:L(k==null?void 0:k.loader,(fe=m==null?void 0:m.classNames)==null?void 0:fe.loader,"sonner-loader"),"data-visible":W==="loading"},q):P.createElement(rS,{className:L(k==null?void 0:k.loader,(ge=m==null?void 0:m.classNames)==null?void 0:ge.loader),visible:W==="loading"})}return P.createElement("li",{tabIndex:0,ref:ht,className:L(I,Me,k==null?void 0:k.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,k==null?void 0:k.default,k==null?void 0:k[W],(n=m==null?void 0:m.classNames)==null?void 0:n[W]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:T,"data-styled":!(m.jsx||m.unstyled||h),"data-mounted":F,"data-promise":!!m.promise,"data-swiped":ce,"data-removed":X,"data-visible":U,"data-y-position":qe,"data-x-position":gn,"data-index":x,"data-front":C,"data-swiping":Z,"data-dismissible":le,"data-type":W,"data-invert":UE,"data-swipe-out":ne,"data-expanded":!!(S||G&&F),style:{"--index":x,"--toasts-before":x,"--z-index":E.length-x,"--offset":`${X?ve:be.current}px`,"--initial-height":G?"auto":`${We}px`,...D,...m.style},onPointerDown:ae=>{zs||!le||(Re.current=new Date,Ae(be.current),ae.target.setPointerCapture(ae.pointerId),ae.target.tagName!=="BUTTON"&&(te(!0),at.current={x:ae.clientX,y:ae.clientY}))},onPointerUp:()=>{var ae,fe,ge,Xe;if(ne||!le)return;at.current=null;let st=Number(((ae=ht.current)==null?void 0:ae.style.getPropertyValue("--swipe-amount").replace("px",""))||0),mo=new Date().getTime()-((fe=Re.current)==null?void 0:fe.getTime()),KE=Math.abs(st)/mo;if(Math.abs(st)>=wS||KE>.11){Ae(be.current),(ge=m.onDismiss)==null||ge.call(m,m),jt(),ie(!0),Ee(!1);return}(Xe=ht.current)==null||Xe.style.setProperty("--swipe-amount","0px"),te(!1)},onPointerMove:ae=>{var fe,ge;if(!at.current||!le)return;let Xe=ae.clientY-at.current.y,st=((fe=window.getSelection())==null?void 0:fe.toString().length)>0,mo=qe==="top"?Math.min(0,Xe):Math.max(0,Xe);Math.abs(mo)>0&&Ee(!0),!st&&((ge=ht.current)==null||ge.style.setProperty("--swipe-amount",`${mo}px`))}},Ke&&!m.jsx?P.createElement("button",{"aria-label":ee,"data-disabled":zs,"data-close-button":!0,onClick:zs||!le?()=>{}:()=>{var ae;jt(),(ae=m.onDismiss)==null||ae.call(m,m)},className:L(k==null?void 0:k.closeButton,(o=m==null?void 0:m.classNames)==null?void 0:o.closeButton)},(a=Q==null?void 0:Q.close)!=null?a:lS):null,m.jsx||P.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:P.createElement(P.Fragment,null,W||m.icon||m.promise?P.createElement("div",{"data-icon":"",className:L(k==null?void 0:k.icon,(s=m==null?void 0:m.classNames)==null?void 0:s.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||YE():null,m.type!=="loading"?m.icon||(Q==null?void 0:Q[W])||tS(W):null):null,P.createElement("div",{"data-content":"",className:L(k==null?void 0:k.content,(i=m==null?void 0:m.classNames)==null?void 0:i.content)},P.createElement("div",{"data-title":"",className:L(k==null?void 0:k.title,(u=m==null?void 0:m.classNames)==null?void 0:u.title)},typeof m.title=="function"?m.title():m.title),m.description?P.createElement("div",{"data-description":"",className:L(K,pe,k==null?void 0:k.description,(d=m==null?void 0:m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),P.isValidElement(m.cancel)?m.cancel:m.cancel&&ro(m.cancel)?P.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||z,onClick:ae=>{var fe,ge;ro(m.cancel)&&le&&((ge=(fe=m.cancel).onClick)==null||ge.call(fe,ae),jt())},className:L(k==null?void 0:k.cancelButton,(f=m==null?void 0:m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,P.isValidElement(m.action)?m.action:m.action&&ro(m.action)?P.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||Y,onClick:ae=>{var fe,ge;ro(m.action)&&((ge=(fe=m.action).onClick)==null||ge.call(fe,ae),!ae.defaultPrevented&&jt())},className:L(k==null?void 0:k.actionButton,(p=m==null?void 0:m.classNames)==null?void 0:p.actionButton)},m.action.label):null))};function $p(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var SS=P.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:s,className:i,offset:u,theme:d="light",richColors:f,duration:p,style:v,visibleToasts:m=gS,toastOptions:h,dir:g=$p(),gap:b=yS,loadingIcon:y,icons:w,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:E,cn:S=CS}=e,[M,T]=P.useState([]),j=P.useMemo(()=>Array.from(new Set([r].concat(M.filter(A=>A.position).map(A=>A.position)))),[M,r]),[D,z]=P.useState([]),[Y,I]=P.useState(!1),[K,H]=P.useState(!1),[J,V]=P.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=P.useRef(null),G=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=P.useRef(null),Q=P.useRef(!1),ee=P.useCallback(A=>{T(L=>{var F;return(F=L.find(B=>B.id===A.id))!=null&&F.delete||Le.dismiss(A.id),L.filter(({id:B})=>B!==A.id)})},[]);return P.useEffect(()=>Le.subscribe(A=>{if(A.dismiss){T(L=>L.map(F=>F.id===A.id?{...F,delete:!0}:F));return}setTimeout(()=>{Kn.flushSync(()=>{T(L=>{let F=L.findIndex(B=>B.id===A.id);return F!==-1?[...L.slice(0,F),{...L[F],...A},...L.slice(F+1)]:[A,...L]})})})}),[]),P.useEffect(()=>{if(d!=="system"){V(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:L})=>{V(L?"dark":"light")})}catch{A.addListener(({matches:F})=>{try{V(F?"dark":"light")}catch(B){console.error(B)}})}},[d]),P.useEffect(()=>{M.length<=1&&I(!1)},[M]),P.useEffect(()=>{let A=L=>{var F,B;o.every(X=>L[X]||L.code===X)&&(I(!0),(F=q.current)==null||F.focus()),L.code==="Escape"&&(document.activeElement===q.current||(B=q.current)!=null&&B.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[o]),P.useEffect(()=>{if(q.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,Q.current=!1)}},[q.current]),P.createElement("section",{"aria-label":`${x} ${G}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},j.map((A,L)=>{var F;let[B,X]=A.split("-");return M.length?P.createElement("ol",{key:A,dir:g==="auto"?$p():g,tabIndex:-1,ref:q,className:i,"data-sonner-toaster":!0,"data-theme":J,"data-y-position":B,"data-lifted":Y&&M.length>1&&!a,"data-x-position":X,style:{"--front-toast-height":`${((F=D[0])==null?void 0:F.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||vS,"--width":`${bS}px`,"--gap":`${b}px`,...v},onBlur:_=>{Q.current&&!_.currentTarget.contains(_.relatedTarget)&&(Q.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:_=>{_.target instanceof HTMLElement&&_.target.dataset.dismissible==="false"||Q.current||(Q.current=!0,k.current=_.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{K||I(!1)},onPointerDown:_=>{_.target instanceof HTMLElement&&_.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},M.filter(_=>!_.position&&L===0||_.position===A).map((_,Z)=>{var te,ne;return P.createElement(NS,{key:_.id,icons:w,index:Z,toast:_,defaultRichColors:f,duration:(te=h==null?void 0:h.duration)!=null?te:p,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:n,visibleToasts:m,closeButton:(ne=h==null?void 0:h.closeButton)!=null?ne:s,interacting:K,position:A,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,removeToast:ee,toasts:M.filter(ie=>ie.position==_.position),heights:D.filter(ie=>ie.position==_.position),setHeights:z,expandByDefault:a,gap:b,loadingIcon:y,expanded:Y,pauseWhenPageIsHidden:E,cn:S})})):null}))});const oo=({onClick:e})=>l.jsx(Se,{onClick:()=>e(),variant:"ghost",size:"xl",className:"ml-auto px-3",children:l.jsx(er,{className:"!h-6 !w-6"})}),ES={...pt,success:(e,t)=>{const n=pt.success(e,{...t,cancel:l.jsx(oo,{onClick:()=>pt.dismiss(n)})});return n},error:(e,t)=>{const n=pt.error(e,{...t,cancel:l.jsx(oo,{onClick:()=>pt.dismiss(n)})});return n},warning:(e,t)=>{const n=pt.warning(e,{...t,cancel:l.jsx(oo,{onClick:()=>pt.dismiss(n)})});return n},info:(e,t)=>{const n=pt.info(e,{...t,cancel:l.jsx(oo,{onClick:()=>pt.dismiss(n)})});return n}},PS=({...e})=>l.jsx(SS,{className:"toaster group",toastOptions:{classNames:{title:"py-3 px-0",toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg p-0",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",icon:"p-4 group-data-[type=error]:text-red-500 group-data-[type=success]:text-green-500 group-data-[type=warning]:text-amber-500 group-data-[type=info]:text-blue-500",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});var MS="Toggle",ks=c.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...a}=e,[s=!1,i]=Ce({prop:n,onChange:o,defaultProp:r});return l.jsx($.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:O(e.onClick,()=>{e.disabled||i(!s)})})});ks.displayName=MS;var Fp=ks;const js=It("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent 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"}}),Bp=c.forwardRef(({className:e,variant:t,size:n,...r},o)=>l.jsx(Fp,{ref:o,className:R(js({variant:t,size:n,className:e})),...r}));Bp.displayName=Fp.displayName;var pn="ToggleGroup",[Wp,mP]=ye(pn,[Pt]),zp=Pt(),Ds=P.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return l.jsx(TS,{...o,ref:t})}if(n==="multiple"){const o=r;return l.jsx(AS,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${pn}\``)});Ds.displayName=pn;var[Vp,Hp]=Wp(pn),TS=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,i]=Ce({prop:n,defaultProp:r,onChange:o});return l.jsx(Vp,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:i,onItemDeactivate:P.useCallback(()=>i(""),[i]),children:l.jsx(Gp,{...a,ref:t})})}),AS=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s=[],i]=Ce({prop:n,defaultProp:r,onChange:o}),u=P.useCallback(f=>i((p=[])=>[...p,f]),[i]),d=P.useCallback(f=>i((p=[])=>p.filter(v=>v!==f)),[i]);return l.jsx(Vp,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:d,children:l.jsx(Gp,{...a,ref:t})})});Ds.displayName=pn;var[RS,kS]=Wp(pn),Gp=P.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:s,loop:i=!0,...u}=e,d=zp(n),f=yt(s),p={role:"group",dir:f,...u};return l.jsx(RS,{scope:n,rovingFocus:o,disabled:r,children:o?l.jsx(Vr,{asChild:!0,...d,orientation:a,dir:f,loop:i,children:l.jsx($.div,{...p,ref:t})}):l.jsx($.div,{...p,ref:t})})}),ao="ToggleGroupItem",Up=P.forwardRef((e,t)=>{const n=Hp(ao,e.__scopeToggleGroup),r=kS(ao,e.__scopeToggleGroup),o=zp(e.__scopeToggleGroup),a=n.value.includes(e.value),s=r.disabled||e.disabled,i={...e,pressed:a,disabled:s},u=P.useRef(null);return r.rovingFocus?l.jsx(Hr,{asChild:!0,...o,focusable:!s,active:a,ref:u,children:l.jsx(Yp,{...i,ref:t})}):l.jsx(Yp,{...i,ref:t})});Up.displayName=ao;var Yp=P.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=Hp(ao,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=a.type==="single"?s:void 0;return l.jsx(ks,{...i,...o,ref:t,onPressedChange:u=>{u?a.onItemActivate(r):a.onItemDeactivate(r)}})}),Kp=Ds,qp=Up;const Xp=c.createContext({size:"default",variant:"default"}),Qp=c.forwardRef(({className:e,variant:t,size:n,children:r,...o},a)=>l.jsx(Kp,{ref:a,className:R("flex items-center justify-center gap-1",e),...o,children:l.jsx(Xp.Provider,{value:{variant:t,size:n},children:r})}));Qp.displayName=Kp.displayName;const Zp=c.forwardRef(({className:e,children:t,variant:n,size:r,...o},a)=>{const s=c.useContext(Xp);return l.jsx(qp,{ref:a,className:R(js({variant:s.variant||n,size:s.size||r}),e),...o,children:t})});Zp.displayName=qp.displayName;var[so,pP]=ye("Tooltip",[Et]),io=Et(),Jp="TooltipProvider",jS=700,Is="tooltip.open",[DS,_s]=so(Jp),eh=e=>{const{__scopeTooltip:t,delayDuration:n=jS,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=c.useState(!0),u=c.useRef(!1),d=c.useRef(0);return c.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),l.jsx(DS,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(d.current),i(!1)},[]),onClose:c.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>i(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:c.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:a})};eh.displayName=Jp;var lo="Tooltip",[IS,Un]=so(lo),th=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,u=_s(lo,e.__scopeTooltip),d=io(t),[f,p]=c.useState(null),v=he(),m=c.useRef(0),h=s??u.disableHoverableContent,g=i??u.delayDuration,b=c.useRef(!1),[y=!1,w]=Ce({prop:r,defaultProp:o,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(Is))):u.onClose(),a==null||a(T)}}),x=c.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),E=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b.current=!1,w(!0)},[w]),S=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),M=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{b.current=!0,w(!0),m.current=0},g)},[g,w]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),l.jsx(_n,{...d,children:l.jsx(IS,{scope:t,contentId:v,open:y,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{u.isOpenDelayed?M():E()},[u.isOpenDelayed,M,E]),onTriggerLeave:c.useCallback(()=>{h?S():(window.clearTimeout(m.current),m.current=0)},[S,h]),onOpen:E,onClose:S,disableHoverableContent:h,children:n})})};th.displayName=lo;var Os="TooltipTrigger",nh=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Un(Os,n),a=_s(Os,n),s=io(n),i=c.useRef(null),u=oe(t,i,o.onTriggerChange),d=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>d.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(On,{asChild:!0,...s,children:l.jsx($.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:O(e.onPointerMove,v=>{v.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:O(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:O(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:O(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:O(e.onBlur,o.onClose),onClick:O(e.onClick,o.onClose)})})});nh.displayName=Os;var Ls="TooltipPortal",[_S,OS]=so(Ls,{forceMount:void 0}),rh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Un(Ls,t);return l.jsx(_S,{scope:t,forceMount:n,children:l.jsx(Ne,{present:n||a.open,children:l.jsx(En,{asChild:!0,container:o,children:r})})})};rh.displayName=Ls;var hn="TooltipContent",oh=c.forwardRef((e,t)=>{const n=OS(hn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Un(hn,e.__scopeTooltip);return l.jsx(Ne,{present:r||s.open,children:s.disableHoverableContent?l.jsx(ah,{side:o,...a,ref:t}):l.jsx(LS,{side:o,...a,ref:t})})}),LS=c.forwardRef((e,t)=>{const n=Un(hn,e.__scopeTooltip),r=_s(hn,e.__scopeTooltip),o=c.useRef(null),a=oe(t,o),[s,i]=c.useState(null),{trigger:u,onClose:d}=n,f=o.current,{onPointerInTransitChange:p}=r,v=c.useCallback(()=>{i(null),p(!1)},[p]),m=c.useCallback((h,g)=>{const b=h.currentTarget,y={x:h.clientX,y:h.clientY},w=WS(y,b.getBoundingClientRect()),x=zS(y,w),E=VS(g.getBoundingClientRect()),S=GS([...x,...E]);i(S),p(!0)},[p]);return c.useEffect(()=>()=>v(),[v]),c.useEffect(()=>{if(u&&f){const h=b=>m(b,f),g=b=>m(b,u);return u.addEventListener("pointerleave",h),f.addEventListener("pointerleave",g),()=>{u.removeEventListener("pointerleave",h),f.removeEventListener("pointerleave",g)}}},[u,f,m,v]),c.useEffect(()=>{if(s){const h=g=>{const b=g.target,y={x:g.clientX,y:g.clientY},w=(u==null?void 0:u.contains(b))||(f==null?void 0:f.contains(b)),x=!HS(y,s);w?v():x&&(v(),d())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[u,f,s,d,v]),l.jsx(ah,{...e,ref:a})}),[$S,FS]=so(lo,{isInside:!1}),ah=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,u=Un(hn,n),d=io(n),{onClose:f}=u;return c.useEffect(()=>(document.addEventListener(Is,f),()=>document.removeEventListener(Is,f)),[f]),c.useEffect(()=>{if(u.trigger){const p=v=>{const m=v.target;m!=null&&m.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),l.jsx(_t,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs(Br,{"data-state":u.stateAttribute,...d,...i,ref:t,style:{...i.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:[l.jsx(Ro,{children:r}),l.jsx($S,{scope:n,isInside:!0,children:l.jsx(hf,{id:u.contentId,role:"tooltip",children:o||r})})]})})});oh.displayName=hn;var sh="TooltipArrow",BS=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=io(n);return FS(sh,n).isInside?null:l.jsx(Wr,{...o,...r,ref:t})});BS.displayName=sh;function WS(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function zS(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function VS(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function HS(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,u=t[a].y,d=t[s].x,f=t[s].y;u>r!=f>r&&n<(d-i)*(r-u)/(f-u)+i&&(o=!o)}return o}function GS(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),US(t)}function US(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var YS=eh,KS=th,qS=nh,XS=rh,ih=oh;const QS=YS,ZS=KS,JS=qS,lh=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(XS,{children:l.jsx(ih,{ref:r,sideOffset:t,className:R("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs 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",e),...n})}));lh.displayName=ih.displayName;function eE(e){const{triggerElement:t,steps:n}=e,[r,o]=P.useState(!1),[a,s]=P.useState(0),i=()=>{s(d=>d<n.length-1?d+1:d)},u=()=>{s(d=>d>0?d-1:d)};return l.jsxs(Er,{open:r,onOpenChange:o,children:[l.jsx(tu,{asChild:!0,children:t}),l.jsxs(kn,{className:"sm:max-w-[425px]",children:[l.jsxs(Pr,{className:R(n[a].title===""&&"sr-only"),children:[l.jsx(Mr,{children:n[a].title}),l.jsx(Tr,{className:"sr-only",children:n[a].title})]}),l.jsx("div",{children:n[a].description}),l.jsxs("div",{className:"flex items-center justify-between mt-4",children:[l.jsx(Se,{variant:"ghost",size:"icon",onClick:u,disabled:a===0,children:l.jsx(Mo,{className:"h-4 w-4"})}),l.jsx("div",{className:"flex justify-center gap-1",children:n.map((d,f)=>l.jsx("div",{className:R("h-3 w-3 rounded-full",f===a?"bg-primary":"bg-gray-200")},f))}),l.jsx(Se,{variant:"ghost",size:"icon",onClick:i,disabled:a===n.length-1,children:l.jsx(Jn,{className:"h-4 w-4"})})]})]})]})}const tE=e=>l.jsx("div",{className:"unreset",dangerouslySetInnerHTML:{__html:e.children}}),nE=e=>{const{execCommand:t}=e,n=()=>{const a=document.createElement("input");a.type="file",a.accept="image/*",a.onchange=async s=>{var u;const i=(u=s.target.files)==null?void 0:u[0];if(i){const d=new FileReader;d.onload=()=>{t("insertImage",d.result)},d.readAsDataURL(i)}},a.click()},r=()=>{const a=prompt("Enter the URL:");a&&t("createLink",a)},o=a=>{t("fontSize",a)};return l.jsxs("div",{className:"flex flex-wrap gap-2 border-b pb-2 mb-2",children:[l.jsx(Se,{variant:"outline",size:"icon",onClick:()=>t("bold"),children:l.jsx(ob,{size:16})}),l.jsx(Se,{variant:"outline",size:"icon",onClick:()=>t("italic"),children:l.jsx(pb,{size:16})}),l.jsx(Se,{variant:"outline",size:"icon",onClick:()=>t("underline"),children:l.jsx(wb,{size:16})}),l.jsxs(Jm,{onValueChange:a=>o(a),defaultValue:"3",children:[l.jsx(Ns,{className:"w-[80px]",children:l.jsx(ep,{placeholder:"Size"})}),l.jsxs(Ps,{children:[l.jsx(mn,{value:"1",children:l.jsx("div",{children:"Small"})}),l.jsx(mn,{value:"3",children:l.jsx("div",{children:"Medium"})}),l.jsx(mn,{value:"5",children:l.jsx("div",{children:"Large"})}),l.jsx(mn,{value:"7",children:l.jsx("div",{children:"Extra Large"})})]})]}),l.jsx(Se,{variant:"outline",size:"icon",onClick:()=>t("insertUnorderedList"),children:l.jsx(vb,{size:16})}),l.jsx(Se,{variant:"outline",size:"icon",onClick:()=>t("insertOrderedList"),children:l.jsx(gb,{size:16})}),l.jsx(Se,{variant:"outline",size:"icon",onClick:()=>t("formatBlock","blockquote"),children:l.jsx(yb,{size:16})}),l.jsx(Se,{variant:"outline",size:"icon",onClick:n,children:l.jsx(fb,{size:16})}),l.jsx(Se,{variant:"outline",size:"icon",onClick:r,children:l.jsx(hb,{size:16})})]})},rE=({initialValue:e="",onChange:t,className:n})=>{const r=P.useRef(null);P.useEffect(()=>{const s=new MutationObserver(()=>{t==null||t(r.current?r.current.innerHTML:"")});r.current&&s.observe(r.current,{childList:!0})},[]),P.useEffect(()=>{r.current&&(r.current.innerHTML=e)},[]);const o=()=>{r.current&&(t==null||t(r.current.innerHTML))},a=(s,i)=>{r.current&&(document.execCommand(s,!1,i),o())};return l.jsxs("div",{className:R("w-full p-4 border rounded-lg shadow-md",n),children:[l.jsx(nE,{execCommand:a}),l.jsx("div",{ref:r,contentEditable:!0,className:"w-full h-48 p-2 border rounded overflow-y-auto focus:outline-none min-h-20 resize-y unreset",onInput:o})]})},oE=e=>{const{observerOptions:t,images:n,classNames:r}=e,[o,a]=P.useState([]),s=P.useRef(null);return P.useEffect(()=>{const i={root:document.querySelector(".image-gallery"),rootMargin:"0px",threshold:1,...t};return s.current=new IntersectionObserver(u=>{u.forEach(d=>{if(d.isIntersecting&&d.target instanceof HTMLDivElement){const f=Number(d.target.dataset.index);a(p=>[...new Set([...p,f])])}})},i),()=>{var u;return(u=s.current)==null?void 0:u.disconnect()}},[]),P.useEffect(()=>{document.querySelectorAll(".image-cell").forEach(u=>{var d;return(d=s.current)==null?void 0:d.observe(u)})},[n]),l.jsx("div",{className:R("image-gallery overflow-auto grid grid-cols-[repeat(auto-fit,minmax(300px,1fr))]","gap-2 justify-center h-full",r==null?void 0:r.imageGallery),children:n.map((i,u)=>l.jsx("div",{"data-index":u,className:R("image-cell w-full h-52",r==null?void 0:r.imageCell),children:o.includes(u)&&l.jsx("img",{src:i,alt:`Gallery Image ${u+1}`,className:R("animate-fade-up animate-duration-[400ms] animate-ease-linear w-full h-full object-cover",r==null?void 0:r.image)})},u))})},aE=e=>{const{currentMonth:t,currentYear:n,onChangeMonthYear:r,locale:o=bo}=e,a=s=>{let i=t,u=n;s==="prev"?i===0?(i=11,u--):i--:i===11?(i=0,u++):i++,r(i,u)};return l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(Se,{variant:"ghost",size:"icon",onClick:()=>a("prev"),"aria-label":"Previous month",children:l.jsx(nb,{className:"!h-8 !w-8"})}),l.jsxs("div",{className:"text-center",children:[l.jsx("h2",{className:"text-2xl font-bold capitalize",children:o.localize.month(t,{width:"wide"})}),l.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),l.jsx(Se,{variant:"ghost",size:"icon",onClick:()=>a("next"),"aria-label":"Next month",children:l.jsx(rb,{className:"!h-8 !w-8"})})]})};function ch({totalPages:e,maxVisiblePages:t=5,mode:n="full",onPageChange:r,current:o=1}){const[a,s]=P.useState(o);P.useEffect(()=>{s(o)},[o]);const i=d=>{d>=1&&d<=e&&(s(d),r(d))},u=()=>{if(n==="minimal")return null;const d=[],f=Math.floor(t/2);let p=Math.max(a-f,2);const v=Math.min(p+t-3,e-1);v-p+3<t&&(p=Math.max(v-t+4,2)),d.push(l.jsx(mt,{children:l.jsx(zt,{onClick:m=>{m.preventDefault(),i(1)},isActive:a===1,children:"1"})},1)),p>2&&d.push(l.jsx(mt,{children:l.jsx(Qr,{})},"start-ellipsis"));for(let m=p;m<=v;m++)d.push(l.jsx(mt,{children:l.jsx(zt,{onClick:h=>{h.preventDefault(),i(m)},isActive:a===m,children:m})},m));return v<e-1&&d.push(l.jsx(mt,{children:l.jsx(Qr,{})},"end-ellipsis")),e>1&&d.push(l.jsx(mt,{children:l.jsx(zt,{onClick:m=>{m.preventDefault(),i(e)},isActive:a===e,children:e})},e)),d};return l.jsx(ls,{children:l.jsxs(cs,{children:[l.jsx(mt,{children:l.jsx(us,{disabled:a===1,onClick:d=>{d.preventDefault(),i(a-1)}})}),u(),l.jsx(mt,{children:l.jsx(ds,{disabled:a===e,onClick:d=>{d.preventDefault(),i(a+1)}})})]})})}const uh=({initIndex:e,onPageChange:t,totalItems:n,totalPages:r,pageTotalItems:o,currentPage:a,showItemsCounter:s=!0})=>l.jsxs("div",{className:"flex flex-col gap-2 items-end",children:[s&&l.jsxs("p",{children:[l.jsx("b",{children:e+1})," - ",l.jsx("b",{children:e+o})," (",n,")"]}),r>1&&l.jsx(ch,{current:a,onPageChange:t,totalPages:r})]}),sE=e=>{const{data:t=[],perPage:n=50,initialPage:r=1,children:o,itemsContainerClass:a="",emptyState:s=l.jsx(Ri,{notFoundText:"No item found!"}),isLoading:i=!1,showItemsCounter:u=!0,loadingVariant:d="loader"}=e,[f,p]=P.useState(t),[v,m]=P.useState(r),h=Math.ceil(f.length/n),g=(v-1)*n,b=v*n,y=f.slice(g,b),w=i?l.jsx("section",{className:"w-full",children:d==="loader"?l.jsx(ap,{size:"lg"}):l.jsx(rp,{className:"h-12 w-full",repeat:n})}):f.length===0?s:void 0;return l.jsxs("div",{className:"flex flex-col gap-4 items-end",children:[l.jsx(uh,{initIndex:g,endIndex:b,totalItems:f.length,totalPages:h,currentPage:v,pageTotalItems:y.length,onPageChange:m,showItemsCounter:u}),w?l.jsx("section",{className:"w-full",children:w}):l.jsx("section",{className:`w-full ${a}`,children:y.map((x,E)=>l.jsx(P.Fragment,{children:o(x,E)},x.id))}),l.jsx(uh,{initIndex:g,endIndex:b,totalItems:f.length,totalPages:h,currentPage:v,pageTotalItems:y.length,onPageChange:m,showItemsCounter:u})]})},iE=({fixed:e,isOpen:t,onToggle:n,children:r,className:o})=>{const[a,s]=P.useState(!0),i=P.useRef(null),u=P.useRef(null),d=t!==void 0?t:a,f=()=>{var v;e||(n?n(!1):s(!1),(v=u.current)==null||v.focus())},p=v=>{i.current&&!i.current.contains(v.target)&&!e&&f()};return P.useEffect(()=>{if(!e)return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[e]),l.jsxs(l.Fragment,{children:[l.jsx("aside",{ref:i,className:R("bg-white z-50 h-full shadow-md flex flex-col fixed top-0 left-0 transition-all duration-300 ease-in-out overflow-auto",{"w-72":e||d},{"w-0":!d&&!e},{"translate-x-0":d},{"-translate-x-full":!d&&!e},o),"aria-hidden":!d,children:r}),e&&l.jsx("div",{className:"w-72 relative"})]})},lE=({children:e,className:t})=>l.jsx("header",{className:R("p-4 flex justify-between items-center border-b",t),"aria-label":"Sidebar header",children:e}),cE=({children:e,className:t})=>l.jsx("nav",{"aria-label":"Sidebar navigation",className:t,children:e}),uE=({children:e,className:t})=>l.jsx("ul",{className:R("flex flex-col gap-2 my-4 px-4",t),children:e}),dE=({children:e,className:t,onClick:n})=>l.jsx("li",{className:R("flex items-center gap-2 hover:bg-gray-100 rounded transition-colors",t),onClick:n,children:e}),fE=({children:e,className:t})=>l.jsx("footer",{className:R("mt-auto p-4 text-sm",t),"aria-label":"Sidebar footer",children:e}),mE=()=>{const[e,t]=P.useState([]);return[e,a=>{t([...e,a])},a=>{const s=[...e];s.splice(a,1),t(s)},(a,s)=>{const i=[...e];i.filter(u=>u[a]!==s),t(i)}]};function pE(){const[e,t]=P.useState(null);return[e,async r=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(r),t(r),!0}catch(o){return console.warn("Copy failed",o),t(null),!1}}]}function hE(e,t=250){const[n,r]=P.useState(e);return P.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n}const dh=c.createContext(void 0),fh={sm:"sm:max-w-[425px]",md:"sm:max-w-[550px]",lg:"sm:max-w-[700px]",xl:"sm:max-w-[900px]"},mh={info:{icon:mb,className:"text-blue-500"},success:{icon:ib,className:"text-green-500"},error:{icon:To,className:"text-red-500"},warning:{icon:sb,className:"text-yellow-500"},confirm:{icon:Mi,className:"text-blue-500"},custom:{icon:Mi,className:"text-gray-500"}};function gE({children:e}){var g,b,y,w,x,E,S,M,T,j,D,z,Y;const[t,n]=c.useState({isOpen:!1,options:null}),r=c.useCallback(I=>{n({isOpen:!0,options:I})},[]),o=c.useCallback(()=>{n(I=>({...I,isOpen:!1}))},[]),a=c.useCallback(I=>{r({...I,type:"info"})},[r]),s=c.useCallback(I=>{r({...I,type:"success"})},[r]),i=c.useCallback(I=>{r({...I,type:"error"})},[r]),u=c.useCallback(I=>{r({...I,type:"warning"})},[r]),d=c.useCallback(I=>{r({...I,type:"custom"})},[r]),f=c.useCallback(I=>{r({...I,type:"confirm"})},[r]),p=(I,K)=>{let H=mh[I].icon;return K&&(H=K),l.jsx(H,{className:R("h-24 w-24",mh[I].className)})},v=c.useMemo(()=>({open:r,close:o,info:a,success:s,error:i,warning:u,custom:d,confirm:f}),[r,o,a,s,i,u,d,f]),[m,h]=c.useState(!1);return l.jsxs(dh.Provider,{value:v,children:[e,l.jsx(Er,{open:t.isOpen,onOpenChange:I=>!I&&o(),modal:!0,children:l.jsxs(kn,{className:R((g=t.options)!=null&&g.size?fh[t.options.size]:fh.sm,(b=t.options)==null?void 0:b.className),children:[t.options&&l.jsxs(Pr,{children:[l.jsx("div",{className:"mx-auto mb-6",children:p(t.options.type,t.options.icon)}),t.options.title&&l.jsx(Mr,{className:"text-center",children:t.options.title}),l.jsx(Tr,{className:"text-center",children:t.options.message})]}),((y=t.options)==null?void 0:y.type)==="confirm"&&l.jsxs("div",{className:"flex justify-center gap-4 mt-4",children:[l.jsx(Se,{isLoading:m??((x=(w=t.options)==null?void 0:w.confirmButton)==null?void 0:x.loading),disabled:(S=(E=t.options)==null?void 0:E.confirmButton)==null?void 0:S.disabled,className:(M=t.options.confirmButton)==null?void 0:M.className,onClick:()=>{var K,H,J,V;if(!((H=(K=t.options)==null?void 0:K.confirmButton)!=null&&H.onClick))throw new Error("Confirmation type dialog needs to implement the onConfirm function");const I=(V=(J=t.options)==null?void 0:J.confirmButton)==null?void 0:V.onClick();I instanceof Promise?(h(!0),I.then(()=>{h(!1),o()}).finally(()=>h(!1))):o()},children:((T=t.options.confirmButton)==null?void 0:T.label)??"Confirm"}),((j=t.options.cancelButton)==null?void 0:j.label)&&l.jsx(Se,{variant:"outline",onClick:o,className:t.options.cancelButton.className,isLoading:(D=t.options.cancelButton)==null?void 0:D.loading,disabled:m||((z=t.options.cancelButton)==null?void 0:z.disabled),children:(Y=t.options.cancelButton)==null?void 0:Y.label})]})]})})]})}function vE(){const e=c.useContext(dh);if(e===void 0)throw new Error("useDialog must be used within a DialogProvider");return e}const bE=(e=!1)=>{const[t,n]=c.useState(e),r=c.useCallback(()=>n(!0),[]),o=c.useCallback(()=>n(!1),[]),a=c.useCallback(()=>n(s=>!s),[]);return{isOpen:t,open:r,close:o,toggle:a}},yE=(e=!1)=>{const[t,n]=c.useState(e),r=c.useCallback(()=>n(!0),[]),o=c.useCallback(()=>n(!1),[]);return[t,r,o]};/*!
264
264
  * Compressor.js v1.2.1
265
265
  * https://fengyuanchen.github.io/compressorjs
266
266
  *
@@ -268,4 +268,4 @@ Defaulting to \`null\`.`}var Jf=Yf,aN=qf;const fs=c.forwardRef(({className:e,val
268
268
  * Released under the MIT license
269
269
  *
270
270
  * Date: 2023-02-28T14:09:41.732Z
271
- */function fh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function so(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fh(Object(n),!0).forEach(function(r){wE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ph(r.key),r)}}function yE(e,t,n){return mh(e.prototype,t),mh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wE(e,t,n){return t=ph(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function io(){return io=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},io.apply(this,arguments)}function xE(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ph(e){var t=xE(e,"string");return typeof t=="symbol"?t:String(t)}var hh={exports:{}};(function(e){typeof window>"u"||function(t){var n=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,r=t.Blob&&function(){try{return!!new Blob}catch{return!1}}(),o=r&&t.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),a=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,s=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,i=(r||a)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(u){var d,f,p,v,m,h,g,b,y;if(d=u.match(s),!d)throw new Error("invalid data URI");for(f=d[2]?d[1]:"text/plain"+(d[3]||";charset=US-ASCII"),p=!!d[4],v=u.slice(d[0].length),p?m=atob(v):m=decodeURIComponent(v),h=new ArrayBuffer(m.length),g=new Uint8Array(h),b=0;b<m.length;b+=1)g[b]=m.charCodeAt(b);return r?new Blob([o?g:h],{type:f}):(y=new a,y.append(h),y.getBlob(f))};t.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(u,d,f){var p=this;setTimeout(function(){f&&n.toDataURL&&i?u(i(p.toDataURL(d,f))):u(p.mozGetAsFile("blob",d))})}:n.toDataURL&&i&&(n.msToBlob?n.toBlob=function(u,d,f){var p=this;setTimeout(function(){(d&&d!=="image/png"||f)&&n.toDataURL&&i?u(i(p.toDataURL(d,f))):u(p.msToBlob(d))})}:n.toBlob=function(u,d,f){var p=this;setTimeout(function(){u(i(p.toDataURL(d,f)))})})),e.exports?e.exports=i:t.dataURLtoBlob=i}(window)})(hh);var gh=hh.exports,CE=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},vh={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},NE=typeof window<"u"&&typeof window.document<"u",Rt=NE?window:{},lo=function(t){return t>0&&t<1/0},SE=Array.prototype.slice;function Os(e){return Array.from?Array.from(e):SE.call(e)}var EE=/^image\/.+$/;function Ls(e){return EE.test(e)}function PE(e){var t=Ls(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var bh=String.fromCharCode;function ME(e,t,n){var r="",o;for(n+=t,o=t;o<n;o+=1)r+=bh(e.getUint8(o));return r}var TE=Rt.btoa;function yh(e,t){for(var n=[],r=8192,o=new Uint8Array(e);o.length>0;)n.push(bh.apply(null,Os(o.subarray(0,r)))),o=o.subarray(r);return"data:".concat(t,";base64,").concat(TE(n.join("")))}function AE(e){var t=new DataView(e),n;try{var r,o,a;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var s=t.byteLength,i=2;i+1<s;){if(t.getUint8(i)===255&&t.getUint8(i+1)===225){o=i;break}i+=1}if(o){var u=o+4,d=o+10;if(ME(t,u,4)==="Exif"){var f=t.getUint16(d);if(r=f===18761,(r||f===19789)&&t.getUint16(d+2,r)===42){var p=t.getUint32(d+4,r);p>=8&&(a=d+p)}}}if(a){var v=t.getUint16(a,r),m,h;for(h=0;h<v;h+=1)if(m=a+h*12+2,t.getUint16(m,r)===274){m+=8,n=t.getUint16(m,r),t.setUint16(m,1,r);break}}}catch{n=1}return n}function RE(e){var t=0,n=1,r=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:n,scaleY:r}}var kE=/\.\d*(?:0|9){12}\d*$/;function wh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return kE.test(e)?Math.round(e*t)/t:e}function Un(e){var t=e.aspectRatio,n=e.height,r=e.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",a=lo(r),s=lo(n);if(a&&s){var i=n*t;(o==="contain"||o==="none")&&i>r||o==="cover"&&i<r?n=r/t:r=n*t}else a?n=r/t:s&&(r=n*t);return{width:r,height:n}}function jE(e){for(var t=Os(new Uint8Array(e)),n=t.length,r=[],o=0;o+3<n;){var a=t[o],s=t[o+1];if(a===255&&s===218)break;if(a===255&&s===216)o+=2;else{var i=t[o+2]*256+t[o+3],u=o+i+2,d=t.slice(o,u);r.push(d),o=u}}return r.reduce(function(f,p){return p[0]===255&&p[1]===225?f.concat(p):f},[])}function DE(e,t){var n=Os(new Uint8Array(e));if(n[2]!==255||n[3]!==224)return e;var r=n[4]*256+n[5],o=[255,216].concat(t,n.slice(4+r));return new Uint8Array(o)}var IE=Rt.ArrayBuffer,$s=Rt.FileReader,Vt=Rt.URL||Rt.webkitURL,_E=/\.\w+$/,OE=Rt.Compressor,LE=function(){function e(t,n){bE(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=so(so({},vh),n),this.aborted=!1,this.result=null,this.init()}return yE(e,[{key:"init",value:function(){var n=this,r=this.file,o=this.options;if(!CE(r)){this.fail(new Error("The first argument must be a File or Blob object."));return}var a=r.type;if(!Ls(a)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!Vt||!$s){this.fail(new Error("The current browser does not support image compression."));return}IE||(o.checkOrientation=!1,o.retainExif=!1);var s=a==="image/jpeg",i=s&&o.checkOrientation,u=s&&o.retainExif;if(Vt&&!i&&!u)this.load({url:Vt.createObjectURL(r)});else{var d=new $s;this.reader=d,d.onload=function(f){var p=f.target,v=p.result,m={},h=1;i&&(h=AE(v),h>1&&io(m,RE(h))),u&&(n.exif=jE(v)),i||u?!Vt||h>1?m.url=yh(v,a):m.url=Vt.createObjectURL(r):m.url=v,n.load(m)},d.onabort=function(){n.fail(new Error("Aborted to read the image with FileReader."))},d.onerror=function(){n.fail(new Error("Failed to read the image with FileReader."))},d.onloadend=function(){n.reader=null},i||u?d.readAsArrayBuffer(r):d.readAsDataURL(r)}}},{key:"load",value:function(n){var r=this,o=this.file,a=this.image;a.onload=function(){r.draw(so(so({},n),{},{naturalWidth:a.naturalWidth,naturalHeight:a.naturalHeight}))},a.onabort=function(){r.fail(new Error("Aborted to load the image."))},a.onerror=function(){r.fail(new Error("Failed to load the image."))},Rt.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Rt.navigator.userAgent)&&(a.crossOrigin="anonymous"),a.alt=o.name,a.src=n.url}},{key:"draw",value:function(n){var r=this,o=n.naturalWidth,a=n.naturalHeight,s=n.rotate,i=s===void 0?0:s,u=n.scaleX,d=u===void 0?1:u,f=n.scaleY,p=f===void 0?1:f,v=this.file,m=this.image,h=this.options,g=document.createElement("canvas"),b=g.getContext("2d"),y=Math.abs(i)%180===90,w=(h.resize==="contain"||h.resize==="cover")&&lo(h.width)&&lo(h.height),x=Math.max(h.maxWidth,0)||1/0,E=Math.max(h.maxHeight,0)||1/0,S=Math.max(h.minWidth,0)||0,M=Math.max(h.minHeight,0)||0,T=o/a,j=h.width,D=h.height;if(y){var z=[E,x];x=z[0],E=z[1];var Y=[M,S];S=Y[0],M=Y[1];var I=[D,j];j=I[0],D=I[1]}w&&(T=j/D);var K=Un({aspectRatio:T,width:x,height:E},"contain");x=K.width,E=K.height;var H=Un({aspectRatio:T,width:S,height:M},"cover");if(S=H.width,M=H.height,w){var J=Un({aspectRatio:T,width:j,height:D},h.resize);j=J.width,D=J.height}else{var V=Un({aspectRatio:T,width:j,height:D}),q=V.width;j=q===void 0?o:q;var G=V.height;D=G===void 0?a:G}j=Math.floor(wh(Math.min(Math.max(j,S),x))),D=Math.floor(wh(Math.min(Math.max(D,M),E)));var k=-j/2,Q=-D/2,ee=j,A=D,L=[];if(w){var F=0,B=0,X=o,_=a,Z=Un({aspectRatio:T,width:o,height:a},{contain:"cover",cover:"contain"}[h.resize]);X=Z.width,_=Z.height,F=(o-X)/2,B=(a-_)/2,L.push(F,B,X,_)}if(L.push(k,Q,ee,A),y){var te=[D,j];j=te[0],D=te[1]}g.width=j,g.height=D,Ls(h.mimeType)||(h.mimeType=v.type);var ne="transparent";v.size>h.convertSize&&h.convertTypes.indexOf(h.mimeType)>=0&&(h.mimeType="image/jpeg");var ie=h.mimeType==="image/jpeg";if(ie&&(ne="#fff"),b.fillStyle=ne,b.fillRect(0,0,j,D),h.beforeDraw&&h.beforeDraw.call(this,b,g),!this.aborted&&(b.save(),b.translate(j/2,D/2),b.rotate(i*Math.PI/180),b.scale(d,p),b.drawImage.apply(b,[m].concat(L)),b.restore(),h.drew&&h.drew.call(this,b,g),!this.aborted)){var ce=function(ve){if(!r.aborted){var Ae=function(Re){return r.done({naturalWidth:o,naturalHeight:a,result:Re})};if(ve&&ie&&h.retainExif&&r.exif&&r.exif.length>0){var We=function(Re){return Ae(gh(yh(DE(Re,r.exif),h.mimeType)))};if(ve.arrayBuffer)ve.arrayBuffer().then(We).catch(function(){r.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var Pe=new $s;r.reader=Pe,Pe.onload=function($e){var Re=$e.target;We(Re.result)},Pe.onabort=function(){r.fail(new Error("Aborted to read the compressed image with FileReader."))},Pe.onerror=function(){r.fail(new Error("Failed to read the compressed image with FileReader."))},Pe.onloadend=function(){r.reader=null},Pe.readAsArrayBuffer(ve)}}else Ae(ve)}};g.toBlob?g.toBlob(ce,h.mimeType,h.quality):ce(gh(g.toDataURL(h.mimeType,h.quality)))}}},{key:"done",value:function(n){var r=n.naturalWidth,o=n.naturalHeight,a=n.result,s=this.file,i=this.image,u=this.options;if(Vt&&i.src.indexOf("blob:")===0&&Vt.revokeObjectURL(i.src),a)if(u.strict&&!u.retainExif&&a.size>s.size&&u.mimeType===s.type&&!(u.width>r||u.height>o||u.minWidth>r||u.minHeight>o||u.maxWidth<r||u.maxHeight<o))a=s;else{var d=new Date;a.lastModified=d.getTime(),a.lastModifiedDate=d,a.name=s.name,a.name&&a.type!==s.type&&(a.name=a.name.replace(_E,PE(a.type)))}else a=s;this.result=a,u.success&&u.success.call(this,a)}},{key:"fail",value:function(n){var r=this.options;if(r.error)r.error.call(this,n);else throw n}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=OE,e}},{key:"setDefaults",value:function(n){io(vh,n)}}]),e}();const $E=()=>({compressImage:async(n,r)=>await new Promise((o,a)=>{new LE(n,r??{quality:.8,maxWidth:2e3,maxHeight:2e3,mimeType:"image/jpeg",success(s){o(s)},error(s){a(s)}})}),formatFileSize:n=>{var r=n===0?0:Math.floor(Math.log(n)/Math.log(1024));return+(n/Math.pow(1024,r)).toFixed(2)*1+" "+["B","kB","MB","GB","TB"][r]}}),FE=function(e,t){const[n,r]=P.useState(!1);function o({key:s}){s===e&&r(!0)}const a=({key:s})=>{s===e&&r(!1)};return P.useEffect(()=>(window.addEventListener("keydown",o),window.addEventListener("keyup",a),()=>{window.removeEventListener("keydown",o),window.removeEventListener("keyup",a)})),P.useEffect(()=>{n&&(t==null||t(n))},[n]),n};function BE(e,t){const[n,r]=P.useState(()=>{try{const s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch(s){return console.error(s),t}});return[n,s=>{try{const i=s instanceof Function?s(n):s;r(i),window.localStorage.setItem(e,JSON.stringify(i))}catch(i){console.error(i)}},()=>{try{r(t),window.localStorage.removeItem(e)}catch(s){console.error(s)}}]}function WE(e){const[t,n]=P.useState(!1);return P.useEffect(()=>{const r=window.matchMedia(e);r.matches!==t&&n(r.matches);const o=()=>n(r.matches);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[t,e]),t}const Fs=768;function zE(){const[e,t]=c.useState(void 0);return c.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Fs-1}px)`),r=()=>{t(window.innerWidth<Fs)};return n.addEventListener("change",r),t(window.innerWidth<Fs),()=>n.removeEventListener("change",r)},[]),!!e}const VE=()=>{const[e,t]=P.useState(null),[n,r]=P.useState(!1);return P.useEffect(()=>((()=>{const s=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone;r(s)})(),window.addEventListener("beforeinstallprompt",s=>{s.preventDefault(),t(s)}),window.addEventListener("appinstalled",()=>{r(!0)}),()=>{window.removeEventListener("appinstalled",()=>r(!0))}),[]),{isPromptReady:!!e,isInstalled:n,showInstallPrompt:()=>{e&&(e.prompt(),e.userChoice.then(a=>{console.log(`User choice: ${a.outcome}`),t(null)}))}}};N.Accordion=Xb,N.AccordionContent=Xi,N.AccordionItem=Ki,N.AccordionTrigger=qi,N.AdaptiveInput=ar,N.AlertDialog=Cw,N.AlertDialogAction=mc,N.AlertDialogCancel=pc,N.AlertDialogContent=lc,N.AlertDialogDescription=fc,N.AlertDialogFooter=uc,N.AlertDialogHeader=cc,N.AlertDialogOverlay=ta,N.AlertDialogPortal=ic,N.AlertDialogTitle=dc,N.AlertDialogTrigger=Nw,N.Autocomplete=Sw,N.Avatar=Sc,N.AvatarFallback=Pc,N.AvatarImage=Ec,N.Badge=ra,N.BentoCard=Xv,N.BentoGrid=qv,N.Button=Ee,N.Calendar=rx,N.Card=Tc,N.CardContent=jc,N.CardDescription=kc,N.CardFooter=Dc,N.CardHeader=Ac,N.CardTitle=Rc,N.Checkbox=Fc,N.Command=Mr,N.CommandDialog=$x,N.CommandEmpty=va,N.CommandGroup=Tr,N.CommandInput=ha,N.CommandItem=nn,N.CommandList=ga,N.CommandSeparator=ba,N.CommandShortcut=nu,N.CurrencyInput=ru,N.Dialog=Nr,N.DialogClose=Lx,N.DialogContent=Rn,N.DialogDescription=Pr,N.DialogFooter=tu,N.DialogHeader=Sr,N.DialogOverlay=pa,N.DialogPortal=eu,N.DialogProvider=pE,N.DialogTitle=Er,N.DialogTrigger=Jc,N.DropdownMenu=c1,N.DropdownMenuCheckboxItem=Fd,N.DropdownMenuContent=Ld,N.DropdownMenuGroup=d1,N.DropdownMenuItem=$d,N.DropdownMenuLabel=Wd,N.DropdownMenuPortal=f1,N.DropdownMenuRadioGroup=p1,N.DropdownMenuRadioItem=Bd,N.DropdownMenuSeparator=zd,N.DropdownMenuShortcut=Vd,N.DropdownMenuSub=m1,N.DropdownMenuSubContent=Od,N.DropdownMenuSubTrigger=_d,N.DropdownMenuTrigger=u1,N.EmptyItems=Ti,N.HelpCarousel=ZS,N.HtmlTextArea=JS,N.HtmlTextEditor=tE,N.Input=or,N.Label=Ud,N.LazyImageGallery=nE,N.MonthNavigator=rE,N.MultiSelect=ff,N.NavigationMenu=Wf,N.NavigationMenuContent=Gf,N.NavigationMenuIndicator=Uf,N.NavigationMenuItem=Q1,N.NavigationMenuLink=Z1,N.NavigationMenuList=zf,N.NavigationMenuTrigger=Hf,N.NavigationMenuViewport=as,N.PaginatedItems=oE,N.Pagination=ss,N.PaginationContent=is,N.PaginationControls=ih,N.PaginationEllipsis=qr,N.PaginationItem=mt,N.PaginationLink=Wt,N.PaginationNext=cs,N.PaginationPrevious=ls,N.PasswordInput=sN,N.Popover=af,N.PopoverAnchor=A1,N.PopoverContent=Ya,N.PopoverTrigger=sf,N.Progress=fs,N.RadioGroup=mm,N.RadioGroupItem=pm,N.Select=Qm,N.SelectContent=Ss,N.SelectGroup=WN,N.SelectItem=fn,N.SelectLabel=Jm,N.SelectScrollDownButton=Ns,N.SelectScrollUpButton=Cs,N.SelectSeparator=ep,N.SelectTrigger=xs,N.SelectValue=Zm,N.Separator=Ur,N.Sidebar=aE,N.SidebarFooter=uE,N.SidebarHeader=sE,N.SidebarList=lE,N.SidebarListItem=cE,N.SidebarNav=iE,N.Skeleton=tp,N.Spinner=rp,N.Switch=cp,N.Table=up,N.TableBody=fp,N.TableCaption=vp,N.TableCell=gp,N.TableFooter=mp,N.TableHead=hp,N.TableHeader=dp,N.TableRow=pp,N.Tabs=ZN,N.TabsContent=Dp,N.TabsList=kp,N.TabsTrigger=jp,N.Textarea=Ip,N.Toaster=SS,N.Toggle=$p,N.ToggleGroup=qp,N.ToggleGroupItem=Xp,N.Tooltip=XS,N.TooltipContent=sh,N.TooltipProvider=qS,N.TooltipTrigger=QS,N.badgeVariants=Mc,N.buttonVariants=yr,N.capitalize=Kv,N.cn=R,N.formatCurrency=Tv,N.formatDateAndMonth=Lv,N.formatDateAndTime=jv,N.formatDateAndWeekday=_v,N.formatDateAndWeekdayAndYear=Ov,N.formatDateDayMonth=kv,N.formatDateMonthYear=Rv,N.formatDateUTC=Av,N.formatLongDate=$v,N.formatShortDate=Fv,N.formatWeekDayAndShortDate=Wv,N.getLongDate=Iv,N.getMonthName=Dv,N.getMonthYearFromISODate=Bv,N.mergeObjects=No,N.navigationMenuTriggerStyle=Vf,N.normalizeString=Ie,N.normalizeStringToCompare=zv,N.padString=Co,N.sortByField=Gv,N.sortByFieldDesc=Uv,N.sortByName=Hv,N.sortByNestedField=Yv,N.sortNormalize=Vv,N.spinnerColors=zN,N.spinnerSizes=VN,N.toast=mS,N.toggleVariants=Rs,N.useArray=dE,N.useCopyToClipboard=fE,N.useDebounce=mE,N.useDialog=hE,N.useDisclosure=gE,N.useDisclosureBool=vE,N.useFileUtilities=$E,N.useIsMobile=zE,N.useKeyPress=FE,N.useLocalStorage=BE,N.useMediaQuery=WE,N.usePWAInstall=VE,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
271
+ */function ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function co(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ph(Object(n),!0).forEach(function(r){CE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ph(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gh(r.key),r)}}function xE(e,t,n){return hh(e.prototype,t),hh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function CE(e,t,n){return t=gh(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uo(){return uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uo.apply(this,arguments)}function NE(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gh(e){var t=NE(e,"string");return typeof t=="symbol"?t:String(t)}var vh={exports:{}};(function(e){typeof window>"u"||function(t){var n=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,r=t.Blob&&function(){try{return!!new Blob}catch{return!1}}(),o=r&&t.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),a=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,s=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,i=(r||a)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(u){var d,f,p,v,m,h,g,b,y;if(d=u.match(s),!d)throw new Error("invalid data URI");for(f=d[2]?d[1]:"text/plain"+(d[3]||";charset=US-ASCII"),p=!!d[4],v=u.slice(d[0].length),p?m=atob(v):m=decodeURIComponent(v),h=new ArrayBuffer(m.length),g=new Uint8Array(h),b=0;b<m.length;b+=1)g[b]=m.charCodeAt(b);return r?new Blob([o?g:h],{type:f}):(y=new a,y.append(h),y.getBlob(f))};t.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(u,d,f){var p=this;setTimeout(function(){f&&n.toDataURL&&i?u(i(p.toDataURL(d,f))):u(p.mozGetAsFile("blob",d))})}:n.toDataURL&&i&&(n.msToBlob?n.toBlob=function(u,d,f){var p=this;setTimeout(function(){(d&&d!=="image/png"||f)&&n.toDataURL&&i?u(i(p.toDataURL(d,f))):u(p.msToBlob(d))})}:n.toBlob=function(u,d,f){var p=this;setTimeout(function(){u(i(p.toDataURL(d,f)))})})),e.exports?e.exports=i:t.dataURLtoBlob=i}(window)})(vh);var bh=vh.exports,SE=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},yh={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},EE=typeof window<"u"&&typeof window.document<"u",kt=EE?window:{},fo=function(t){return t>0&&t<1/0},PE=Array.prototype.slice;function $s(e){return Array.from?Array.from(e):PE.call(e)}var ME=/^image\/.+$/;function Fs(e){return ME.test(e)}function TE(e){var t=Fs(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var wh=String.fromCharCode;function AE(e,t,n){var r="",o;for(n+=t,o=t;o<n;o+=1)r+=wh(e.getUint8(o));return r}var RE=kt.btoa;function xh(e,t){for(var n=[],r=8192,o=new Uint8Array(e);o.length>0;)n.push(wh.apply(null,$s(o.subarray(0,r)))),o=o.subarray(r);return"data:".concat(t,";base64,").concat(RE(n.join("")))}function kE(e){var t=new DataView(e),n;try{var r,o,a;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var s=t.byteLength,i=2;i+1<s;){if(t.getUint8(i)===255&&t.getUint8(i+1)===225){o=i;break}i+=1}if(o){var u=o+4,d=o+10;if(AE(t,u,4)==="Exif"){var f=t.getUint16(d);if(r=f===18761,(r||f===19789)&&t.getUint16(d+2,r)===42){var p=t.getUint32(d+4,r);p>=8&&(a=d+p)}}}if(a){var v=t.getUint16(a,r),m,h;for(h=0;h<v;h+=1)if(m=a+h*12+2,t.getUint16(m,r)===274){m+=8,n=t.getUint16(m,r),t.setUint16(m,1,r);break}}}catch{n=1}return n}function jE(e){var t=0,n=1,r=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:n,scaleY:r}}var DE=/\.\d*(?:0|9){12}\d*$/;function Ch(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return DE.test(e)?Math.round(e*t)/t:e}function Yn(e){var t=e.aspectRatio,n=e.height,r=e.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",a=fo(r),s=fo(n);if(a&&s){var i=n*t;(o==="contain"||o==="none")&&i>r||o==="cover"&&i<r?n=r/t:r=n*t}else a?n=r/t:s&&(r=n*t);return{width:r,height:n}}function IE(e){for(var t=$s(new Uint8Array(e)),n=t.length,r=[],o=0;o+3<n;){var a=t[o],s=t[o+1];if(a===255&&s===218)break;if(a===255&&s===216)o+=2;else{var i=t[o+2]*256+t[o+3],u=o+i+2,d=t.slice(o,u);r.push(d),o=u}}return r.reduce(function(f,p){return p[0]===255&&p[1]===225?f.concat(p):f},[])}function _E(e,t){var n=$s(new Uint8Array(e));if(n[2]!==255||n[3]!==224)return e;var r=n[4]*256+n[5],o=[255,216].concat(t,n.slice(4+r));return new Uint8Array(o)}var OE=kt.ArrayBuffer,Bs=kt.FileReader,Ht=kt.URL||kt.webkitURL,LE=/\.\w+$/,$E=kt.Compressor,FE=function(){function e(t,n){wE(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=co(co({},yh),n),this.aborted=!1,this.result=null,this.init()}return xE(e,[{key:"init",value:function(){var n=this,r=this.file,o=this.options;if(!SE(r)){this.fail(new Error("The first argument must be a File or Blob object."));return}var a=r.type;if(!Fs(a)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!Ht||!Bs){this.fail(new Error("The current browser does not support image compression."));return}OE||(o.checkOrientation=!1,o.retainExif=!1);var s=a==="image/jpeg",i=s&&o.checkOrientation,u=s&&o.retainExif;if(Ht&&!i&&!u)this.load({url:Ht.createObjectURL(r)});else{var d=new Bs;this.reader=d,d.onload=function(f){var p=f.target,v=p.result,m={},h=1;i&&(h=kE(v),h>1&&uo(m,jE(h))),u&&(n.exif=IE(v)),i||u?!Ht||h>1?m.url=xh(v,a):m.url=Ht.createObjectURL(r):m.url=v,n.load(m)},d.onabort=function(){n.fail(new Error("Aborted to read the image with FileReader."))},d.onerror=function(){n.fail(new Error("Failed to read the image with FileReader."))},d.onloadend=function(){n.reader=null},i||u?d.readAsArrayBuffer(r):d.readAsDataURL(r)}}},{key:"load",value:function(n){var r=this,o=this.file,a=this.image;a.onload=function(){r.draw(co(co({},n),{},{naturalWidth:a.naturalWidth,naturalHeight:a.naturalHeight}))},a.onabort=function(){r.fail(new Error("Aborted to load the image."))},a.onerror=function(){r.fail(new Error("Failed to load the image."))},kt.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(kt.navigator.userAgent)&&(a.crossOrigin="anonymous"),a.alt=o.name,a.src=n.url}},{key:"draw",value:function(n){var r=this,o=n.naturalWidth,a=n.naturalHeight,s=n.rotate,i=s===void 0?0:s,u=n.scaleX,d=u===void 0?1:u,f=n.scaleY,p=f===void 0?1:f,v=this.file,m=this.image,h=this.options,g=document.createElement("canvas"),b=g.getContext("2d"),y=Math.abs(i)%180===90,w=(h.resize==="contain"||h.resize==="cover")&&fo(h.width)&&fo(h.height),x=Math.max(h.maxWidth,0)||1/0,E=Math.max(h.maxHeight,0)||1/0,S=Math.max(h.minWidth,0)||0,M=Math.max(h.minHeight,0)||0,T=o/a,j=h.width,D=h.height;if(y){var z=[E,x];x=z[0],E=z[1];var Y=[M,S];S=Y[0],M=Y[1];var I=[D,j];j=I[0],D=I[1]}w&&(T=j/D);var K=Yn({aspectRatio:T,width:x,height:E},"contain");x=K.width,E=K.height;var H=Yn({aspectRatio:T,width:S,height:M},"cover");if(S=H.width,M=H.height,w){var J=Yn({aspectRatio:T,width:j,height:D},h.resize);j=J.width,D=J.height}else{var V=Yn({aspectRatio:T,width:j,height:D}),q=V.width;j=q===void 0?o:q;var G=V.height;D=G===void 0?a:G}j=Math.floor(Ch(Math.min(Math.max(j,S),x))),D=Math.floor(Ch(Math.min(Math.max(D,M),E)));var k=-j/2,Q=-D/2,ee=j,A=D,L=[];if(w){var F=0,B=0,X=o,_=a,Z=Yn({aspectRatio:T,width:o,height:a},{contain:"cover",cover:"contain"}[h.resize]);X=Z.width,_=Z.height,F=(o-X)/2,B=(a-_)/2,L.push(F,B,X,_)}if(L.push(k,Q,ee,A),y){var te=[D,j];j=te[0],D=te[1]}g.width=j,g.height=D,Fs(h.mimeType)||(h.mimeType=v.type);var ne="transparent";v.size>h.convertSize&&h.convertTypes.indexOf(h.mimeType)>=0&&(h.mimeType="image/jpeg");var ie=h.mimeType==="image/jpeg";if(ie&&(ne="#fff"),b.fillStyle=ne,b.fillRect(0,0,j,D),h.beforeDraw&&h.beforeDraw.call(this,b,g),!this.aborted&&(b.save(),b.translate(j/2,D/2),b.rotate(i*Math.PI/180),b.scale(d,p),b.drawImage.apply(b,[m].concat(L)),b.restore(),h.drew&&h.drew.call(this,b,g),!this.aborted)){var ce=function(ve){if(!r.aborted){var Ae=function(Re){return r.done({naturalWidth:o,naturalHeight:a,result:Re})};if(ve&&ie&&h.retainExif&&r.exif&&r.exif.length>0){var We=function(Re){return Ae(bh(xh(_E(Re,r.exif),h.mimeType)))};if(ve.arrayBuffer)ve.arrayBuffer().then(We).catch(function(){r.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var Pe=new Bs;r.reader=Pe,Pe.onload=function($e){var Re=$e.target;We(Re.result)},Pe.onabort=function(){r.fail(new Error("Aborted to read the compressed image with FileReader."))},Pe.onerror=function(){r.fail(new Error("Failed to read the compressed image with FileReader."))},Pe.onloadend=function(){r.reader=null},Pe.readAsArrayBuffer(ve)}}else Ae(ve)}};g.toBlob?g.toBlob(ce,h.mimeType,h.quality):ce(bh(g.toDataURL(h.mimeType,h.quality)))}}},{key:"done",value:function(n){var r=n.naturalWidth,o=n.naturalHeight,a=n.result,s=this.file,i=this.image,u=this.options;if(Ht&&i.src.indexOf("blob:")===0&&Ht.revokeObjectURL(i.src),a)if(u.strict&&!u.retainExif&&a.size>s.size&&u.mimeType===s.type&&!(u.width>r||u.height>o||u.minWidth>r||u.minHeight>o||u.maxWidth<r||u.maxHeight<o))a=s;else{var d=new Date;a.lastModified=d.getTime(),a.lastModifiedDate=d,a.name=s.name,a.name&&a.type!==s.type&&(a.name=a.name.replace(LE,TE(a.type)))}else a=s;this.result=a,u.success&&u.success.call(this,a)}},{key:"fail",value:function(n){var r=this.options;if(r.error)r.error.call(this,n);else throw n}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=$E,e}},{key:"setDefaults",value:function(n){uo(yh,n)}}]),e}();const BE=()=>({compressImage:async(n,r)=>await new Promise((o,a)=>{new FE(n,r??{quality:.8,maxWidth:2e3,maxHeight:2e3,mimeType:"image/jpeg",success(s){o(s)},error(s){a(s)}})}),formatFileSize:n=>{var r=n===0?0:Math.floor(Math.log(n)/Math.log(1024));return+(n/Math.pow(1024,r)).toFixed(2)*1+" "+["B","kB","MB","GB","TB"][r]}}),WE=function(e,t){const[n,r]=P.useState(!1);function o({key:s}){s===e&&r(!0)}const a=({key:s})=>{s===e&&r(!1)};return P.useEffect(()=>(window.addEventListener("keydown",o),window.addEventListener("keyup",a),()=>{window.removeEventListener("keydown",o),window.removeEventListener("keyup",a)})),P.useEffect(()=>{n&&(t==null||t(n))},[n]),n};function zE(e,t){const[n,r]=P.useState(()=>{try{const s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch(s){return console.error(s),t}});return[n,s=>{try{const i=s instanceof Function?s(n):s;r(i),window.localStorage.setItem(e,JSON.stringify(i))}catch(i){console.error(i)}},()=>{try{r(t),window.localStorage.removeItem(e)}catch(s){console.error(s)}}]}function VE(e){const[t,n]=P.useState(!1);return P.useEffect(()=>{const r=window.matchMedia(e);r.matches!==t&&n(r.matches);const o=()=>n(r.matches);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[t,e]),t}const Ws=768;function HE(){const[e,t]=c.useState(void 0);return c.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Ws-1}px)`),r=()=>{t(window.innerWidth<Ws)};return n.addEventListener("change",r),t(window.innerWidth<Ws),()=>n.removeEventListener("change",r)},[]),!!e}const GE=()=>{const[e,t]=P.useState(null),[n,r]=P.useState(!1);return P.useEffect(()=>((()=>{const s=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone;r(s)})(),window.addEventListener("beforeinstallprompt",s=>{s.preventDefault(),t(s)}),window.addEventListener("appinstalled",()=>{r(!0)}),()=>{window.removeEventListener("appinstalled",()=>r(!0))}),[]),{isPromptReady:!!e,isInstalled:n,showInstallPrompt:()=>{e&&(e.prompt(),e.userChoice.then(a=>{console.log(`User choice: ${a.outcome}`),t(null)}))}}};N.Accordion=Zb,N.AccordionContent=Zi,N.AccordionItem=Xi,N.AccordionTrigger=Qi,N.AdaptiveInput=ir,N.AlertDialog=Sw,N.AlertDialogAction=hc,N.AlertDialogCancel=gc,N.AlertDialogContent=uc,N.AlertDialogDescription=pc,N.AlertDialogFooter=fc,N.AlertDialogHeader=dc,N.AlertDialogOverlay=ra,N.AlertDialogPortal=cc,N.AlertDialogTitle=mc,N.AlertDialogTrigger=Ew,N.Autocomplete=Pw,N.Avatar=Pc,N.AvatarFallback=Tc,N.AvatarImage=Mc,N.Badge=aa,N.BentoCard=Zv,N.BentoGrid=Qv,N.Button=Se,N.Calendar=ax,N.Card=Rc,N.CardContent=Ic,N.CardDescription=Dc,N.CardFooter=_c,N.CardHeader=kc,N.CardTitle=jc,N.Checkbox=Wc,N.Command=Ar,N.CommandDialog=Bx,N.CommandEmpty=ya,N.CommandGroup=Rr,N.CommandInput=va,N.CommandItem=rn,N.CommandList=ba,N.CommandSeparator=wa,N.CommandShortcut=ou,N.CurrencyInput=au,N.Dialog=Er,N.DialogClose=Fx,N.DialogContent=kn,N.DialogDescription=Tr,N.DialogFooter=ru,N.DialogHeader=Pr,N.DialogOverlay=ga,N.DialogPortal=nu,N.DialogProvider=gE,N.DialogTitle=Mr,N.DialogTrigger=tu,N.DropdownMenu=d1,N.DropdownMenuCheckboxItem=Wd,N.DropdownMenuContent=Fd,N.DropdownMenuGroup=m1,N.DropdownMenuItem=Bd,N.DropdownMenuLabel=Vd,N.DropdownMenuPortal=p1,N.DropdownMenuRadioGroup=g1,N.DropdownMenuRadioItem=zd,N.DropdownMenuSeparator=Hd,N.DropdownMenuShortcut=Gd,N.DropdownMenuSub=h1,N.DropdownMenuSubContent=$d,N.DropdownMenuSubTrigger=Ld,N.DropdownMenuTrigger=f1,N.EmptyItems=Ri,N.HelpCarousel=eE,N.HtmlTextArea=tE,N.HtmlTextEditor=rE,N.Input=sr,N.Label=Kd,N.LazyImageGallery=oE,N.MonthNavigator=aE,N.MultiSelect=pf,N.NavigationMenu=Vf,N.NavigationMenuContent=Yf,N.NavigationMenuIndicator=Kf,N.NavigationMenuItem=J1,N.NavigationMenuLink=eN,N.NavigationMenuList=Hf,N.NavigationMenuTrigger=Uf,N.NavigationMenuViewport=is,N.PaginatedItems=sE,N.Pagination=ls,N.PaginationContent=cs,N.PaginationControls=ch,N.PaginationEllipsis=Qr,N.PaginationItem=mt,N.PaginationLink=zt,N.PaginationNext=ds,N.PaginationPrevious=us,N.PasswordInput=lN,N.Popover=lf,N.PopoverAnchor=k1,N.PopoverContent=qa,N.PopoverTrigger=cf,N.Progress=ps,N.RadioGroup=hm,N.RadioGroupItem=gm,N.Select=Jm,N.SelectContent=Ps,N.SelectGroup=VN,N.SelectItem=mn,N.SelectLabel=tp,N.SelectScrollDownButton=Es,N.SelectScrollUpButton=Ss,N.SelectSeparator=np,N.SelectTrigger=Ns,N.SelectValue=ep,N.Separator=Kr,N.Sidebar=iE,N.SidebarFooter=fE,N.SidebarHeader=lE,N.SidebarList=uE,N.SidebarListItem=dE,N.SidebarNav=cE,N.Skeleton=rp,N.Spinner=ap,N.Switch=dp,N.Table=fp,N.TableBody=pp,N.TableCaption=yp,N.TableCell=bp,N.TableFooter=hp,N.TableHead=vp,N.TableHeader=mp,N.TableRow=gp,N.Tabs=eS,N.TabsContent=_p,N.TabsList=Dp,N.TabsTrigger=Ip,N.Textarea=Op,N.Toaster=PS,N.Toggle=Bp,N.ToggleGroup=Qp,N.ToggleGroupItem=Zp,N.Tooltip=ZS,N.TooltipContent=lh,N.TooltipProvider=QS,N.TooltipTrigger=JS,N.badgeVariants=Ac,N.buttonVariants=xr,N.capitalize=Xv,N.cn=R,N.formatCurrency=Rv,N.formatDateAndMonth=Fv,N.formatDateAndTime=Iv,N.formatDateAndWeekday=Lv,N.formatDateAndWeekdayAndYear=$v,N.formatDateDayMonth=Dv,N.formatDateMonthYear=jv,N.formatDateUTC=kv,N.formatLongDate=Bv,N.formatShortDate=Wv,N.formatWeekDayAndShortDate=Vv,N.getLongDate=Ov,N.getMonthName=_v,N.getMonthYearFromISODate=zv,N.mergeObjects=Po,N.navigationMenuTriggerStyle=Gf,N.normalizeString=Ie,N.normalizeStringToCompare=Hv,N.padString=Eo,N.sortByField=Yv,N.sortByFieldDesc=Kv,N.sortByName=Uv,N.sortByNestedField=qv,N.sortNormalize=Gv,N.spinnerColors=HN,N.spinnerSizes=GN,N.toast=ES,N.toggleVariants=js,N.useArray=mE,N.useCopyToClipboard=pE,N.useDebounce=hE,N.useDialog=vE,N.useDisclosure=bE,N.useDisclosureBool=yE,N.useFileUtilities=BE,N.useIsMobile=HE,N.useKeyPress=WE,N.useLocalStorage=zE,N.useMediaQuery=VE,N.usePWAInstall=GE,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});