buildgrid-ui 1.11.2 → 1.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buildgrid-ui.es.js +5041 -4499
- package/dist/buildgrid-ui.umd.js +67 -63
- package/dist/components/autocomplete/autocomplete.d.ts +3 -1
- package/package.json +2 -1
package/dist/buildgrid-ui.umd.js
CHANGED
|
@@ -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,
|
|
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,En){"use strict";function Qs(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=Qs(P),Nn=Qs(En);var nr={exports:{}},Sn={};/**
|
|
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
|
|
9
|
+
*/var Js;function pg(){if(Js)return Sn;Js=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 Sn.Fragment=t,Sn.jsx=n,Sn.jsxs=n,Sn}var Pn={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,186 +14,186 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
at`)?" (<anonymous>)":-1<
|
|
19
|
-
`+ce+
|
|
20
|
-
`),ot
|
|
21
|
-
`);for(
|
|
22
|
-
`+
|
|
17
|
+
*/var ei;function hg(){return ei||(ei=1,process.env.NODE_ENV!=="production"&&function(){function e(E){if(E==null)return null;if(typeof E=="function")return E.$$typeof===G?null:E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case M:return"Fragment";case C:return"Portal";case D:return"Profiler";case T:return"StrictMode";case O:return"Suspense";case K:return"SuspenseList"}if(typeof E=="object")switch(typeof E.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),E.$$typeof){case W:return(E.displayName||"Context")+".Provider";case k:return(E._context.displayName||"Context")+".Consumer";case Y:var U=E.render;return E=E.displayName,E||(E=U.displayName||U.name||"",E=E!==""?"ForwardRef("+E+")":"ForwardRef"),E;case H:return U=E.displayName||null,U!==null?U:e(E.type)||"Memo";case ee:U=E._payload,E=E._init;try{return e(E(U))}catch{}}return null}function t(E){return""+E}function n(E){try{t(E);var U=!1}catch{U=!0}if(U){U=console;var z=U.error,le=typeof Symbol=="function"&&Symbol.toStringTag&&E[Symbol.toStringTag]||E.constructor.name||"Object";return z.call(U,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",le),t(E)}}function r(){}function o(){if(F===0){B=console.log,X=console.info,_=console.warn,Q=console.error,ne=console.group,re=console.groupCollapsed,ie=console.groupEnd;var E={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:E,log:E,warn:E,error:E,group:E,groupCollapsed:E,groupEnd:E})}F++}function a(){if(F--,F===0){var E={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},E,{value:B}),info:te({},E,{value:X}),warn:te({},E,{value:_}),error:te({},E,{value:Q}),group:te({},E,{value:ne}),groupCollapsed:te({},E,{value:re}),groupEnd:te({},E,{value:ie})})}0>F&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function s(E){if(ce===void 0)try{throw Error()}catch(z){var U=z.stack.trim().match(/\n( *(at )?)/);ce=U&&U[1]||"",Se=-1<z.stack.indexOf(`
|
|
18
|
+
at`)?" (<anonymous>)":-1<z.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
+
`+ce+E+Se}function i(E,U){if(!E||xe)return"";var z=Re.get(E);if(z!==void 0)return z;xe=!0,z=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var le=null;le=j.H,j.H=null,o();try{var Te={DetermineComponentFrameRoot:function(){try{if(U){var Xe=function(){throw Error()};if(Object.defineProperty(Xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Xe,[])}catch(ze){var Cn=ze}Reflect.construct(E,[],Xe)}else{try{Xe.call()}catch(ze){Cn=ze}E.call(Xe.prototype)}}else{try{throw Error()}catch(ze){Cn=ze}(Xe=E())&&typeof Xe.catch=="function"&&Xe.catch(function(){})}}catch(ze){if(ze&&Cn&&typeof ze.stack=="string")return[ze.stack,Cn.stack]}return[null,null]}};Te.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var ge=Object.getOwnPropertyDescriptor(Te.DetermineComponentFrameRoot,"name");ge&&ge.configurable&&Object.defineProperty(Te.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var oe=Te.DetermineComponentFrameRoot(),qe=oe[0],ot=oe[1];if(qe&&ot){var Ce=qe.split(`
|
|
20
|
+
`),at=ot.split(`
|
|
21
|
+
`);for(oe=ge=0;ge<Ce.length&&!Ce[ge].includes("DetermineComponentFrameRoot");)ge++;for(;oe<at.length&&!at[oe].includes("DetermineComponentFrameRoot");)oe++;if(ge===Ce.length||oe===at.length)for(ge=Ce.length-1,oe=at.length-1;1<=ge&&0<=oe&&Ce[ge]!==at[oe];)oe--;for(;1<=ge&&0<=oe;ge--,oe--)if(Ce[ge]!==at[oe]){if(ge!==1||oe!==1)do if(ge--,oe--,0>oe||Ce[ge]!==at[oe]){var st=`
|
|
22
|
+
`+Ce[ge].replace(" at new "," at ");return E.displayName&&st.includes("<anonymous>")&&(st=st.replace("<anonymous>",E.displayName)),typeof E=="function"&&Re.set(E,st),st}while(1<=ge&&0<=oe);break}}}finally{xe=!1,j.H=le,a(),Error.prepareStackTrace=z}return Ce=(Ce=E?E.displayName||E.name:"")?s(Ce):"",typeof E=="function"&&Re.set(E,Ce),Ce}function u(E){if(E==null)return"";if(typeof E=="function"){var U=E.prototype;return i(E,!(!U||!U.isReactComponent))}if(typeof E=="string")return s(E);switch(E){case O:return s("Suspense");case K:return s("SuspenseList")}if(typeof E=="object")switch(E.$$typeof){case Y:return E=i(E.render,!1),E;case H:return u(E.type);case ee:U=E._payload,E=E._init;try{return u(E(U))}catch{}}return""}function d(){var E=j.A;return E===null?null:E.getOwner()}function f(E){if(Z.call(E,"key")){var U=Object.getOwnPropertyDescriptor(E,"key").get;if(U&&U.isReactWarning)return!1}return E.key!==void 0}function p(E,U){function z(){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))}z.isReactWarning=!0,Object.defineProperty(E,"key",{get:z,configurable:!0})}function g(){var E=e(this.type);return Le[E]||(Le[E]=!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.")),E=this.props.ref,E!==void 0?E:null}function m(E,U,z,le,Te,ge){return z=ge.ref,E={$$typeof:S,type:E,key:U,props:ge,_owner:Te},(z!==void 0?z:null)!==null?Object.defineProperty(E,"ref",{enumerable:!1,get:g}):Object.defineProperty(E,"ref",{enumerable:!1,value:null}),E._store={},Object.defineProperty(E._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(E,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(E.props),Object.freeze(E)),E}function v(E,U,z,le,Te,ge){if(typeof E=="string"||typeof E=="function"||E===M||E===D||E===T||E===O||E===K||E===V||typeof E=="object"&&E!==null&&(E.$$typeof===ee||E.$$typeof===H||E.$$typeof===W||E.$$typeof===k||E.$$typeof===Y||E.$$typeof===R||E.getModuleId!==void 0)){var oe=U.children;if(oe!==void 0)if(le)if($(oe)){for(le=0;le<oe.length;le++)h(oe[le],E);Object.freeze&&Object.freeze(oe)}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 h(oe,E)}else oe="",(E===void 0||typeof E=="object"&&E!==null&&Object.keys(E).length===0)&&(oe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),E===null?le="null":$(E)?le="array":E!==void 0&&E.$$typeof===S?(le="<"+(e(E.type)||"Unknown")+" />",oe=" Did you accidentally export a JSX literal instead of a component?"):le=typeof E,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,oe);if(Z.call(U,"key")){oe=e(E);var qe=Object.keys(U).filter(function(Ce){return Ce!=="key"});le=0<qe.length?"{key: someKey, "+qe.join(": ..., ")+": ...}":"{key: someKey}",De[oe+le]||(qe=0<qe.length?"{"+qe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
23
|
let props = %s;
|
|
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,
|
|
27
|
+
<%s key={someKey} {...props} />`,le,oe,qe,oe),De[oe+le]=!0)}if(oe=null,z!==void 0&&(n(z),oe=""+z),f(U)&&(n(U.key),oe=""+U.key),"key"in U){z={};for(var ot in U)ot!=="key"&&(z[ot]=U[ot])}else z=U;return oe&&p(z,typeof E=="function"?E.displayName||E.name||"Unknown":E),m(E,oe,ge,Te,d(),z)}function h(E,U){if(typeof E=="object"&&E&&E.$$typeof!==We){if($(E))for(var z=0;z<E.length;z++){var le=E[z];b(le)&&y(le,U)}else if(b(E))E._store&&(E._store.validated=1);else if(E===null||typeof E!="object"?z=null:(z=q&&E[q]||E["@@iterator"],z=typeof z=="function"?z:null),typeof z=="function"&&z!==E.entries&&(z=z.call(E),z!==E))for(;!(E=z.next()).done;)b(E.value)&&y(E.value,U)}}function b(E){return typeof E=="object"&&E!==null&&E.$$typeof===S}function y(E,U){if(E._store&&!E._store.validated&&E.key==null&&(E._store.validated=1,U=w(U),!vt[U])){vt[U]=!0;var z="";E&&E._owner!=null&&E._owner!==d()&&(z=null,typeof E._owner.tag=="number"?z=e(E._owner.type):typeof E._owner.name=="string"&&(z=E._owner.name),z=" It was passed a child from "+z+".");var le=j.getCurrentStack;j.getCurrentStack=function(){var Te=u(E.type);return le&&(Te+=le()||""),Te},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,z),j.getCurrentStack=le}}function w(E){var U="",z=d();return z&&(z=e(z.type))&&(U=`
|
|
28
28
|
|
|
29
|
-
Check the render method of \``+
|
|
29
|
+
Check the render method of \``+z+"`."),U||(E=e(E))&&(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,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});/**
|
|
31
|
+
Check the top-level render call using <`+E+">."),U}var x=P,S=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),W=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),q=Symbol.iterator,G=Symbol.for("react.client.reference"),j=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=Object.prototype.hasOwnProperty,te=Object.assign,R=Symbol.for("react.client.reference"),$=Array.isArray,F=0,B,X,_,Q,ne,re,ie;r.__reactDisabledLog=!0;var ce,Se,xe=!1,Re=new(typeof WeakMap=="function"?WeakMap:Map),We=Symbol.for("react.client.reference"),Pe,Le={},De={},vt={};Pn.Fragment=M,Pn.jsx=function(E,U,z,le,Te){return v(E,U,z,!1,le,Te)},Pn.jsxs=function(E,U,z,le,Te){return v(E,U,z,!0,le,Te)}}()),Pn}var ti;function gg(){return ti||(ti=1,process.env.NODE_ENV==="production"?nr.exports=pg():nr.exports=hg()),nr.exports}var l=gg();function ni(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=ni(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function go(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ni(e))&&(r&&(r+=" "),r+=t);return r}const vo="-",vg=e=>{const t=yg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(vo);return i[0]===""&&i.length!==1&&i.shift(),ri(i,t)||bg(s)},getConflictingClassGroupIds:(s,i)=>{const u=n[s]||[];return i&&r[s]?[...u,...r[s]]:u}}},ri=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ri(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(vo);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},oi=/^\[(.+)\]$/,bg=e=>{if(oi.test(e)){const t=oi.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},yg=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return xg(Object.entries(e.classGroups),n).forEach(([a,s])=>{bo(s,r,a,t)}),r},bo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:ai(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(wg(o)){bo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{bo(s,ai(t,a),n,r)})})},ai=(e,t)=>{let n=e;return t.split(vo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},wg=e=>e.isThemeGetter,xg=(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,Cg=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)}}},si="!",Eg=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 g=u.length===0?i:i.substring(f),m=g.startsWith(si),v=m?g.substring(1):g,h=p&&p>f?p-f:void 0;return{modifiers:u,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:h}};return n?i=>n({className:i,parseClassName:s}):s},Ng=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},Sg=e=>({cache:Cg(e.cacheSize),parseClassName:Eg(e),...vg(e)}),Pg=/\s+/,Tg=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(Pg);let i="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{modifiers:f,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}=n(d);let v=!!m,h=r(v?g.substring(0,m):g);if(!h){if(!v){i=d+(i.length>0?" "+i:i);continue}if(h=r(g),!h){i=d+(i.length>0?" "+i:i);continue}v=!1}const b=Ng(f).join(":"),y=p?b+si:b,w=y+h;if(a.includes(w))continue;a.push(w);const x=o(h,v);for(let S=0;S<x.length;++S){const C=x[S];a.push(y+C)}i=d+(i.length>0?" "+i:i)}return i};function Mg(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ii(t))&&(r&&(r+=" "),r+=n);return r}const ii=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ii(e[r]))&&(n&&(n+=" "),n+=t);return n};function Rg(e,...t){let n,r,o,a=s;function s(u){const d=t.reduce((f,p)=>p(f),e());return n=Sg(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=Tg(u,n);return o(u,f),f}return function(){return a(Mg.apply(null,arguments))}}const pe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},li=/^\[(?:([a-z-]+):)?(.+)\]$/i,Dg=/^\d+\/\d+$/,Ag=new Set(["px","full","screen"]),jg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kg=/\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$/,Ig=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Og=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_g=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,lt=e=>qt(e)||Ag.has(e)||Dg.test(e),bt=e=>Xt(e,"length",Hg),qt=e=>!!e&&!Number.isNaN(Number(e)),yo=e=>Xt(e,"number",qt),Tn=e=>!!e&&Number.isInteger(Number(e)),$g=e=>e.endsWith("%")&&qt(e.slice(0,-1)),se=e=>li.test(e),yt=e=>jg.test(e),Lg=new Set(["length","size","percentage"]),Fg=e=>Xt(e,Lg,ci),Bg=e=>Xt(e,"position",ci),Wg=new Set(["image","url"]),zg=e=>Xt(e,Wg,Ug),Vg=e=>Xt(e,"",Gg),Mn=()=>!0,Xt=(e,t,n)=>{const r=li.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Hg=e=>kg.test(e)&&!Ig.test(e),ci=()=>!1,Gg=e=>Og.test(e),Ug=e=>_g.test(e),Yg=Rg(()=>{const e=pe("colors"),t=pe("spacing"),n=pe("blur"),r=pe("brightness"),o=pe("borderColor"),a=pe("borderRadius"),s=pe("borderSpacing"),i=pe("borderWidth"),u=pe("contrast"),d=pe("grayscale"),f=pe("hueRotate"),p=pe("invert"),g=pe("gap"),m=pe("gradientColorStops"),v=pe("gradientColorStopPositions"),h=pe("inset"),b=pe("margin"),y=pe("opacity"),w=pe("padding"),x=pe("saturate"),S=pe("scale"),C=pe("sepia"),M=pe("skew"),T=pe("space"),D=pe("translate"),k=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",se,t],O=()=>[se,t],K=()=>["",lt,bt],H=()=>["auto",qt,se],ee=()=>["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"],j=()=>["","0",se],Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[qt,se];return{cacheSize:500,separator:":",theme:{colors:[Mn],spacing:[lt,bt],blur:["none","",yt,se],brightness:te(),borderColor:[e],borderRadius:["none","","full",yt,se],borderSpacing:O(),borderWidth:K(),contrast:te(),grayscale:j(),hueRotate:te(),invert:j(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[$g,bt],inset:Y(),margin:Y(),opacity:te(),padding:O(),saturate:te(),scale:te(),sepia:j(),skew:te(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",se]}],container:["container"],columns:[{columns:[yt]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"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:[...ee(),se]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Tn,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:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Tn,se]}],"grid-cols":[{"grid-cols":[Mn]}],"col-start-end":[{col:["auto",{span:["full",Tn,se]},se]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[Mn]}],"row-start-end":[{row:["auto",{span:[Tn,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:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"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:[yt]},yt]}],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",yt,bt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",yo]}],"font-family":[{font:[Mn]}],"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",qt,yo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",lt,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",lt,bt]}],"underline-offset":[{"underline-offset":["auto",lt,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:O()}],"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:[...ee(),Bg]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Fg]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},zg]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"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":[lt,se]}],"outline-w":[{outline:[lt,bt]}],"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":[lt,bt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",yt,Vg]}],"shadow-color":[{shadow:[Mn]}],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",yt,se]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[p]}],saturate:[{saturate:[x]}],sepia:[{sepia:[C]}],"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":[C]}],"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:te()}],ease:[{ease:["linear","in","out","in-out",se]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Tn,se]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"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":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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:[lt,bt,yo]}],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 A(...e){return Yg(go(e))}const Kg={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"}},qg=(e,t,n)=>{let r;const o=Kg[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 Zt(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Xg={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Zg={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Qg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Jg={date:Zt({formats:Xg,defaultWidth:"full"}),time:Zt({formats:Zg,defaultWidth:"full"}),dateTime:Zt({formats:Qg,defaultWidth:"full"})},ev={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},tv=(e,t,n,r)=>ev[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 nv={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},rv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ov={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"]},av={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"]},sv={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"}},iv={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"}},lv={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:nv,defaultWidth:"wide"}),quarter:Qe({values:rv,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qe({values:ov,defaultWidth:"wide"}),day:Qe({values:av,defaultWidth:"wide"}),dayPeriod:Qe({values:sv,defaultWidth:"wide",formattingValues:iv,defaultFormattingWidth:"wide"})};function Je(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)?uv(i,p=>p.test(s)):cv(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 cv(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function uv(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function ui(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 dv=/^(\d+)(th|st|nd|rd)?/i,fv=/\d+/i,mv={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},pv={any:[/^b/i,/^(a|c)/i]},hv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},gv={any:[/1/i,/2/i,/3/i,/4/i]},vv={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},bv={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]},yv={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},wv={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]},xv={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},Cv={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}},Ev={ordinalNumber:ui({matchPattern:dv,parsePattern:fv,valueCallback:e=>parseInt(e,10)}),era:Je({matchPatterns:mv,defaultMatchWidth:"wide",parsePatterns:pv,defaultParseWidth:"any"}),quarter:Je({matchPatterns:hv,defaultMatchWidth:"wide",parsePatterns:gv,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Je({matchPatterns:vv,defaultMatchWidth:"wide",parsePatterns:bv,defaultParseWidth:"any"}),day:Je({matchPatterns:yv,defaultMatchWidth:"wide",parsePatterns:wv,defaultParseWidth:"any"}),dayPeriod:Je({matchPatterns:xv,defaultMatchWidth:"any",parsePatterns:Cv,defaultParseWidth:"any"})},wo={code:"en-US",formatDistance:qg,formatLong:Jg,formatRelative:tv,localize:lv,match:Ev,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Nv={};function rr(){return Nv}const di=6048e5,Sv=864e5,fi=Symbol.for("constructDateFrom");function Ve(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&fi in e?e[fi](t):e instanceof Date?new e.constructor(t):new Date(t)}function je(e,t){return Ve(t||e,e)}function mi(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 Pv(e,...t){const n=Ve.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function pi(e,t){const n=je(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Tv(e,t,n){const[r,o]=Pv(n==null?void 0:n.in,e,t),a=pi(r),s=pi(o),i=+a-mi(a),u=+s-mi(s);return Math.round((i-u)/Sv)}function Mv(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 Rv(e,t){const n=je(e,t==null?void 0:t.in);return Tv(n,Mv(n))+1}function Rn(e,t){var i,u,d,f;const n=rr(),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 or(e,t){return Rn(e,{...t,weekStartsOn:1})}function hi(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=or(o),s=Ve(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=or(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function Dv(e,t){const n=hi(e,t),r=Ve(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),or(r)}function Av(e,t){const n=je(e,t==null?void 0:t.in),r=+or(n)-+Dv(n);return Math.round(r/di)+1}function gi(e,t){var f,p,g,m;const n=je(e,t==null?void 0:t.in),r=n.getFullYear(),o=rr(),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=(g=o.locale)==null?void 0:g.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=Rn(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=Rn(u,t);return+n>=+i?r+1:+n>=+d?r:r-1}function jv(e,t){var i,u,d,f;const n=rr(),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=gi(e,t),a=Ve((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Rn(a,t)}function kv(e,t){const n=je(e,t==null?void 0:t.in),r=+Rn(n,t)-+jv(n,t);return Math.round(r/di)+1}function ue(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const wt={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)}},Qt={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vi={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 wt.y(e,t)},Y:function(e,t,n,r){const o=gi(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=hi(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 wt.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=kv(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ue(o,t.length)},I:function(e,t,n){const r=Av(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"}):wt.d(e,t)},D:function(e,t,n){const r=Rv(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=Qt.noon:r===0?o=Qt.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=Qt.evening:r>=12?o=Qt.afternoon:r>=4?o=Qt.morning:o=Qt.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 wt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):wt.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"}):wt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):wt.s(e,t)},S:function(e,t){return wt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return yi(r);case"XXXX":case"XX":return _t(r);case"XXXXX":case"XXX":default:return _t(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return yi(r);case"xxxx":case"xx":return _t(r);case"xxxxx":case"xxx":default:return _t(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+bi(r,":");case"OOOO":default:return"GMT"+_t(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+bi(r,":");case"zzzz":default:return"GMT"+_t(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 bi(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 yi(e,t){return e%60===0?(e>0?"-":"+")+ue(Math.abs(e)/60,2):_t(e,t)}function _t(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 wi=(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"})}},xi=(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"})}},Iv={p:xi,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return wi(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}}",wi(r,t)).replace("{{time}}",xi(o,t))}},Ov=/^D+$/,_v=/^Y+$/,$v=["D","DD","YY","YYYY"];function Lv(e){return Ov.test(e)}function Fv(e){return _v.test(e)}function Bv(e,t,n){const r=Wv(e,t,n);if(console.warn(r),$v.includes(e))throw new RangeError(r)}function Wv(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 zv(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Vv(e){return!(!zv(e)&&typeof e!="number"||isNaN(+je(e)))}const Hv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Gv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Uv=/^'([^]*?)'?$/,Yv=/''/g,Kv=/[a-zA-Z]/;function xo(e,t,n){var f,p,g,m,v,h,b,y;const r=rr(),o=(n==null?void 0:n.locale)??r.locale??wo,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=(g=r.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((h=(v=n==null?void 0:n.locale)==null?void 0:v.options)==null?void 0:h.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(!Vv(i))throw new RangeError("Invalid time value");let u=t.match(Gv).map(w=>{const x=w[0];if(x==="p"||x==="P"){const S=Iv[x];return S(w,o.formatLong)}return w}).join("").match(Hv).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const x=w[0];if(x==="'")return{isToken:!1,value:qv(w)};if(vi[x])return{isToken:!0,value:w};if(x.match(Kv))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)&&Fv(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Lv(x))&&Bv(x,t,String(e));const S=vi[x[0]];return S(i,x,o.localize,d)}).join("")}function qv(e){const t=e.match(Uv);return t?t[1].replace(Yv,"'"):e}function Ci(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 Xv(e,t){const n=je(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Zv(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 Qv(e,t,n){return Ci(e,-t,n)}function Jv(e,t){const n=ob(t);return"formatToParts"in n?tb(n,e):nb(n,e)}const eb={year:0,month:1,day:2,hour:3,minute:4,second:5};function tb(e,t){try{const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const a=eb[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 nb(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 Co={},Ei=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")),rb=Ei==="06/25/2014, 00:00:00"||Ei==="06/25/2014 00:00:00";function ob(e){return Co[e]||(Co[e]=rb?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"})),Co[e]}function Ni(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 Si=36e5,ab=6e4,Eo={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Pi(e,t,n){if(!e)return 0;let r=Eo.timezoneZ.exec(e);if(r)return 0;let o,a;if(r=Eo.timezoneHH.exec(e),r)return o=parseInt(r[1],10),Ti(o)?-(o*Si):NaN;if(r=Eo.timezoneHHMM.exec(e),r){o=parseInt(r[2],10);const s=parseInt(r[3],10);return Ti(o,s)?(a=Math.abs(o)*Si+s*ab,r[1]==="+"?-a:a):NaN}if(lb(e)){t=new Date(t||Date.now());const s=n?t:sb(t),i=No(s,e);return-(n?i:ib(t,i,e))}return NaN}function sb(e){return Ni(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function No(e,t){const n=Jv(e,t),r=Ni(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 ib(e,t,n){let o=e.getTime()-t;const a=No(new Date(o),n);if(t===a)return t;o-=a-t;const s=No(new Date(o),n);return a===s?a:Math.max(a,s)}function Ti(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const Mi={};function lb(e){if(Mi[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Mi[e]=!0,!0}catch{return!1}}function Ri(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 cb=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,So=36e5,Di=6e4,ub=2,Ae={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:cb};function db(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?ub: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=fb(e),{year:o,restDateString:a}=mb(r.date,n),s=pb(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=hb(r.time),u===null||isNaN(u)))return new Date(NaN);if(r.timeZone||t.timeZone){if(d=Pi(r.timeZone||t.timeZone,new Date(i+u)),isNaN(d))return new Date(NaN)}else d=Ri(new Date(i+u)),d=Ri(new Date(i+u+d));return new Date(i+u+d)}else return new Date(NaN)}function fb(e){const t={};let n=Ae.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=Ae.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){const o=Ae.timeZone.exec(r);o?(t.time=r.replace(o[1],""),t.timeZone=o[1].trim()):t.time=r}return t}function mb(e,t){if(e){const n=Ae.YYY[t],r=Ae.YYYYY[t];let o=Ae.YYYY.exec(e)||r.exec(e);if(o){const a=o[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(o=Ae.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 pb(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=Ae.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,ki(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=Ae.DDD.exec(e),a){n=new Date(0);const s=parseInt(a[1],10);return bb(t,s)?(n.setUTCFullYear(t,0,s),n):new Date(NaN)}if(a=Ae.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;const s=parseInt(a[2],10);return ki(t,r,s)?(n.setUTCFullYear(t,r,s),n):new Date(NaN)}if(a=Ae.Www.exec(e),a)return o=parseInt(a[1],10)-1,Ii(o)?Ai(t,o):new Date(NaN);if(a=Ae.WwwD.exec(e),a){o=parseInt(a[1],10)-1;const s=parseInt(a[2],10)-1;return Ii(o,s)?Ai(t,o,s):new Date(NaN)}return null}function hb(e){let t,n,r=Ae.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),Po(t)?t%24*So:NaN;if(r=Ae.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),Po(t,n)?t%24*So+n*Di:NaN;if(r=Ae.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const o=parseFloat(r[3].replace(",","."));return Po(t,n,o)?t%24*So+n*Di+o*1e3:NaN}return null}function Ai(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 gb=[31,28,31,30,31,30,31,31,30,31,30,31],vb=[31,29,31,30,31,30,31,31,30,31,30,31];function ji(e){return e%400===0||e%4===0&&e%100!==0}function ki(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;const r=ji(e);if(r&&n>vb[t]||!r&&n>gb[t])return!1}return!0}function bb(e,t){if(t<1)return!1;const n=ji(e);return!(n&&t>366||!n&&t>365)}function Ii(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function Po(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function yb(e,t,n){e=db(e,n);const r=Pi(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 wb=(e,t="pt-BR",n="BRL")=>new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:2}).format(e),To=(e,t=2)=>{for(e=e.toString();e.length<t;)e="0"+e;return e},xb=e=>{if(!e)return"";const t=yb(new Date(e.seconds?e.seconds*1e3:e),"America/Sao_Paulo");return[To(t.getUTCDate(),2),To(t.getUTCMonth()+1,2),t.getUTCFullYear()].join("/")},Cb=e=>new Intl.DateTimeFormat("pt-BR",{year:"2-digit",month:"short"}).format(e),Eb=e=>new Intl.DateTimeFormat("pt-BR",{day:"2-digit",month:"2-digit"}).format(e),Nb=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)),Sb=e=>new Intl.DateTimeFormat("pt-BR",{month:"long"}).format(e),Pb=e=>new Intl.DateTimeFormat("pt-BR",{dateStyle:"long"}).format(e),Tb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long"}).format(new Date(e)),Mb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long",year:"numeric"}).format(new Date(e)),Rb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long"}).format(new Date(e)),Db=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"long"}).format(typeof e=="string"?new Date(e):e),Ab=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"short"}).format(e),jb=e=>e.slice(0,7),kb=(e,t="pt-BR")=>e.toLocaleDateString(t,{weekday:"short",day:"2-digit",month:"2-digit"});function Mo(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]=Mo(e[r],t[r]):n[r]=e[r]);return n}const Ie=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase():"",Ib=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replaceAll(" ","").toLowerCase():"",Ob=(e,t)=>Ie(e)<Ie(t)?-1:Ie(e)>Ie(t)?1:0,_b=(e,t)=>Ie(e.name)<Ie(t.name)?-1:Ie(e.name)>Ie(t.name)?1:0,$b=(e,t,n)=>e[n]<t[n]?-1:e[n]>t[n]?1:0,Lb=(e,t,n)=>e[n]>t[n]?-1:e[n]<t[n]?1:0,Fb=(e,t,n,r)=>Ie(e[n][r])<Ie(t[n][r])?-1:Ie(e[n][r])>Ie(t[n][r])?1:0,Bb=e=>e.charAt(0).toUpperCase()+e.slice(1),Wb=({children:e,className:t,...n})=>l.jsx("div",{className:A("grid w-full auto-rows-[22rem] grid-cols-3 gap-4",t),...n,children:e}),zb=({children:e,className:t,...n})=>l.jsx("div",{className:A("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
|
|
36
|
+
*/const Vb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Oi=(...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
|
|
41
|
+
*/var Hb={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
|
|
46
|
+
*/const Gb=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,...Hb,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Oi("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(
|
|
51
|
+
*/const de=(e,t)=>{const n=P.forwardRef(({className:r,...o},a)=>P.createElement(Gb,{ref:a,iconNode:t,className:Oi(`lucide-${Vb(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
|
|
56
|
+
*/const Ub=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
|
|
61
|
+
*/const Yb=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
|
|
66
|
+
*/const Kb=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
|
|
71
|
+
*/const Dn=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
|
|
76
|
+
*/const Jt=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
|
|
81
|
+
*/const Ro=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
|
|
86
|
+
*/const ar=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
|
|
91
|
+
*/const qb=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
|
|
96
|
+
*/const Xb=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
|
|
101
|
+
*/const Zb=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
|
|
106
|
+
*/const _i=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
|
|
111
|
+
*/const Qb=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
|
|
116
|
+
*/const Do=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
|
|
121
|
+
*/const $i=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
|
|
126
|
+
*/const Jb=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
|
|
131
|
+
*/const ey=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
|
|
136
|
+
*/const ty=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
|
|
141
|
+
*/const ny=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
|
|
146
|
+
*/const ry=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
|
|
151
|
+
*/const oy=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
|
|
156
|
+
*/const ay=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
|
|
161
|
+
*/const sy=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
|
|
166
|
+
*/const iy=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
|
|
171
|
+
*/const ly=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
|
|
176
|
+
*/const cy=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
|
|
181
|
+
*/const Li=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
|
|
186
|
+
*/const uy=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 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(
|
|
191
|
+
*/const sr=de("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Fi=e=>{const{notFoundText:t,notFoundAction:n,icon:r,className:o}=e;return l.jsxs("div",{className:A("flex flex-col gap-4 items-center bg-gray-200 rounded-lg p-6 justify-center",o),children:[r||l.jsx(Qb,{size:45}),l.jsxs("div",{className:"text-lg font-medium m-0",children:[t,n||null]})]})};function Bi(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:g,children:m,...v}=p,h=((y=g==null?void 0:g[e])==null?void 0:y[u])||i,b=c.useMemo(()=>v,Object.values(v));return l.jsx(h.Provider,{value:b,children:m})};d.displayName=a+"Provider";function f(p,g){var h;const m=((h=g==null?void 0:g[e])==null?void 0:h[u])||i,v=c.useContext(m);if(v)return v;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,dy(o,...t)]}function dy(...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 Wi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function en(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Wi(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():Wi(e[o],null)}}}}function J(...e){return c.useCallback(en(...e),e)}var ct=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),a=o.find(fy);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})});ct.displayName="Slot";var Ao=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const o=py(n);return c.cloneElement(n,{...my(r,n.props),ref:t?en(t,o):o})}return c.Children.count(n)>1?c.Children.only(null):null});Ao.displayName="SlotClone";var jo=({children:e})=>l.jsx(l.Fragment,{children:e});function fy(e){return c.isValidElement(e)&&e.type===jo}function my(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 py(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 tn(e){const t=e+"CollectionProvider",[n,r]=ye(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:v,children:h}=m,b=P.useRef(null),y=P.useRef(new Map).current;return l.jsx(o,{scope:v,itemMap:y,collectionRef:b,children:h})};s.displayName=t;const i=e+"CollectionSlot",u=P.forwardRef((m,v)=>{const{scope:h,children:b}=m,y=a(i,h),w=J(v,y.collectionRef);return l.jsx(ct,{ref:w,children:b})});u.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=P.forwardRef((m,v)=>{const{scope:h,children:b,...y}=m,w=P.useRef(null),x=J(v,w),S=a(d,h);return P.useEffect(()=>(S.itemMap.set(w,{ref:w,...y}),()=>void S.itemMap.delete(w))),l.jsx(ct,{[f]:"",ref:x,children:b})});p.displayName=d;function g(m){const v=a(e+"CollectionConsumer",m);return P.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((S,C)=>y.indexOf(S.ref.current)-y.indexOf(C.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},g,r]}function I(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 he(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 Ee({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=hy({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=he(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 hy({defaultProp:e,onChange:t}){const n=c.useState(e),[r]=n,o=c.useRef(r),a=he(t);return c.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}var gy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],L=gy.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:a,...s}=r,i=a?ct: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 ir(e,t){e&&Nn.flushSync(()=>e.dispatchEvent(t))}var we=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{};function vy(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var be=e=>{const{present:t,children:n}=e,r=by(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),a=J(r.ref,yy(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:a}):null};be.displayName="Presence";function by(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),a=c.useRef("none"),s=e?"mounted":"unmounted",[i,u]=vy(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const d=lr(r.current);a.current=i==="mounted"?d:"none"},[i]),we(()=>{const d=r.current,f=o.current;if(f!==e){const g=a.current,m=lr(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&g!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),we(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=m=>{const h=lr(r.current).includes(m.animationName);if(m.target===t&&h&&(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)})}},g=m=>{m.target===t&&(a.current=lr(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(d=>{d&&(r.current=getComputedStyle(d)),n(d)},[])}}function lr(e){return(e==null?void 0:e.animationName)||"none"}function yy(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 wy=c.useId||(()=>{}),xy=0;function me(e){const[t,n]=c.useState(wy());return we(()=>{n(r=>r??String(xy++))},[e]),t?`radix-${t}`:""}var ko="Collapsible",[Cy,zi]=ye(ko),[Ey,Io]=Cy(ko),Vi=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[u=!1,d]=Ee({prop:r,defaultProp:o,onChange:s});return l.jsx(Ey,{scope:n,disabled:a,contentId:me(),open:u,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),children:l.jsx(L.div,{"data-state":_o(u),"data-disabled":a?"":void 0,...i,ref:t})})});Vi.displayName=ko;var Hi="CollapsibleTrigger",Gi=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Io(Hi,n);return l.jsx(L.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":_o(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:I(e.onClick,o.onOpenToggle)})});Gi.displayName=Hi;var Oo="CollapsibleContent",Ui=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Io(Oo,e.__scopeCollapsible);return l.jsx(be,{present:n||o.open,children:({present:a})=>l.jsx(Ny,{...r,ref:t,present:a})})});Ui.displayName=Oo;var Ny=c.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=Io(Oo,n),[i,u]=c.useState(r),d=c.useRef(null),f=J(t,d),p=c.useRef(0),g=p.current,m=c.useRef(0),v=m.current,h=s.open||i,b=c.useRef(h),y=c.useRef(void 0);return c.useEffect(()=>{const w=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(w)},[]),we(()=>{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(L.div,{"data-state":_o(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!h,...a,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:h&&o})});function _o(e){return e?"open":"closed"}var Sy=Vi,Py=Gi,Ty=Ui,My=c.createContext(void 0);function xt(e){const t=c.useContext(My);return e||t||"ltr"}var ut="Accordion",Ry=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[$o,Dy,Ay]=tn(ut),[cr,ET]=ye(ut,[Ay,zi]),Lo=zi(),Yi=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(Oy,{...a,ref:t}):l.jsx(Iy,{...o,ref:t})})});Yi.displayName=ut;var[Ki,jy]=cr(ut),[qi,ky]=cr(ut,{collapsible:!1}),Iy=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[i,u]=Ee({prop:n,defaultProp:r,onChange:o});return l.jsx(Ki,{scope:e.__scopeAccordion,value:i?[i]:[],onItemOpen:u,onItemClose:P.useCallback(()=>a&&u(""),[a,u]),children:l.jsx(qi,{scope:e.__scopeAccordion,collapsible:a,children:l.jsx(Xi,{...s,ref:t})})})}),Oy=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s=[],i]=Ee({prop:n,defaultProp:r,onChange:o}),u=P.useCallback(f=>i((p=[])=>[...p,f]),[i]),d=P.useCallback(f=>i((p=[])=>p.filter(g=>g!==f)),[i]);return l.jsx(Ki,{scope:e.__scopeAccordion,value:s,onItemOpen:u,onItemClose:d,children:l.jsx(qi,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(Xi,{...a,ref:t})})})}),[_y,ur]=cr(ut),Xi=P.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,i=P.useRef(null),u=J(i,t),d=Dy(n),p=xt(o)==="ltr",g=I(e.onKeyDown,m=>{var D;if(!Ry.includes(m.key))return;const v=m.target,h=d().filter(k=>{var W;return!((W=k.ref.current)!=null&&W.disabled)}),b=h.findIndex(k=>k.ref.current===v),y=h.length;if(b===-1)return;m.preventDefault();let w=b;const x=0,S=y-1,C=()=>{w=b+1,w>S&&(w=x)},M=()=>{w=b-1,w<x&&(w=S)};switch(m.key){case"Home":w=x;break;case"End":w=S;break;case"ArrowRight":a==="horizontal"&&(p?C():M());break;case"ArrowDown":a==="vertical"&&C();break;case"ArrowLeft":a==="horizontal"&&(p?M():C());break;case"ArrowUp":a==="vertical"&&M();break}const T=w%y;(D=h[T].ref.current)==null||D.focus()});return l.jsx(_y,{scope:n,disabled:r,direction:o,orientation:a,children:l.jsx($o.Slot,{scope:n,children:l.jsx(L.div,{...s,"data-orientation":a,ref:u,onKeyDown:r?void 0:g})})})}),dr="AccordionItem",[$y,Fo]=cr(dr),Zi=P.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=ur(dr,n),s=jy(dr,n),i=Lo(n),u=me(),d=r&&s.value.includes(r)||!1,f=a.disabled||e.disabled;return l.jsx($y,{scope:n,open:d,disabled:f,triggerId:u,children:l.jsx(Sy,{"data-orientation":a.orientation,"data-state":rl(d),...i,...o,ref:t,disabled:f,open:d,onOpenChange:p=>{p?s.onItemOpen(r):s.onItemClose(r)}})})});Zi.displayName=dr;var Qi="AccordionHeader",Ji=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ur(ut,n),a=Fo(Qi,n);return l.jsx(L.h3,{"data-orientation":o.orientation,"data-state":rl(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});Ji.displayName=Qi;var Bo="AccordionTrigger",el=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ur(ut,n),a=Fo(Bo,n),s=ky(Bo,n),i=Lo(n);return l.jsx($o.ItemSlot,{scope:n,children:l.jsx(Py,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...r,ref:t})})});el.displayName=Bo;var tl="AccordionContent",nl=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ur(ut,n),a=Fo(tl,n),s=Lo(n);return l.jsx(Ty,{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}})});nl.displayName=tl;function rl(e){return e?"open":"closed"}var Ly=Yi,Fy=Zi,By=Ji,ol=el,al=nl;const Wy=Ly,sl=c.forwardRef(({className:e,...t},n)=>l.jsx(Fy,{ref:n,className:A("border-b",e),...t}));sl.displayName="AccordionItem";const il=c.forwardRef(({className:e,children:t,...n},r)=>l.jsx(By,{className:"flex",children:l.jsxs(ol,{ref:r,className:A("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(Jt,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));il.displayName=ol.displayName;const ll=c.forwardRef(({className:e,children:t,...n},r)=>l.jsx(al,{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:A("pb-4 pt-0",e),children:t})}));ll.displayName=al.displayName;const cl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ul=go,$t=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ul(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 g=cl(f)||cl(p);return o[d][g]}),i=n&&Object.entries(n).reduce((d,f)=>{let[p,g]=f;return g===void 0||(d[p]=g),d},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:p,className:g,...m}=f;return Object.entries(m).every(v=>{let[h,b]=v;return Array.isArray(b)?b.includes({...a,...i}[h]):{...a,...i}[h]===b})?[...d,p,g]:d},[]);return ul(e,s,u,n==null?void 0:n.class,n==null?void 0:n.className)},zy=$t("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"}}),fr=c.forwardRef(({className:e,sizing:t,type:n,...r},o)=>l.jsx("input",{type:n,className:A(zy({sizing:t,className:e})),ref:o,...r}));fr.displayName="Input";const Vy=(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},mr=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=Vy(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(fr,{className:A(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})]})});mr.displayName="AdaptiveInput";function dl(e,t=globalThis==null?void 0:globalThis.document){const n=he(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 Hy="DismissableLayer",Wo="dismissableLayer.update",Gy="dismissableLayer.pointerDownOutside",Uy="dismissableLayer.focusOutside",fl,ml=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lt=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...u}=e,d=c.useContext(ml),[f,p]=c.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),v=J(t,T=>p(T)),h=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(b),w=f?h.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=w>=y,C=qy(T=>{const D=T.target,k=[...d.branches].some(W=>W.contains(D));!S||k||(o==null||o(T),s==null||s(T),T.defaultPrevented||i==null||i())},g),M=Xy(T=>{const D=T.target;[...d.branches].some(W=>W.contains(D))||(a==null||a(T),s==null||s(T),T.defaultPrevented||i==null||i())},g);return dl(T=>{w===d.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&i&&(T.preventDefault(),i()))},g),c.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(fl=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),pl(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=fl)}},[f,g,n,d]),c.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),pl())},[f,d]),c.useEffect(()=>{const T=()=>m({});return document.addEventListener(Wo,T),()=>document.removeEventListener(Wo,T)},[]),l.jsx(L.div,{...u,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,M.onFocusCapture),onBlurCapture:I(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,C.onPointerDownCapture)})});Lt.displayName=Hy;var Yy="DismissableLayerBranch",Ky=c.forwardRef((e,t)=>{const n=c.useContext(ml),r=c.useRef(null),o=J(t,r);return c.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(L.div,{...e,ref:o})});Ky.displayName=Yy;function qy(e,t=globalThis==null?void 0:globalThis.document){const n=he(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let u=function(){hl(Gy,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 Xy(e,t=globalThis==null?void 0:globalThis.document){const n=he(e),r=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!r.current&&hl(Uy,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 pl(){const e=new CustomEvent(Wo);document.dispatchEvent(e)}function hl(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?ir(o,a):o.dispatchEvent(a)}var zo="focusScope.autoFocusOnMount",Vo="focusScope.autoFocusOnUnmount",gl={bubbles:!1,cancelable:!0},Zy="FocusScope",An=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,u]=c.useState(null),d=he(o),f=he(a),p=c.useRef(null),g=J(t,h=>u(h)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let h=function(x){if(m.paused||!i)return;const S=x.target;i.contains(S)?p.current=S:Ct(p.current,{select:!0})},b=function(x){if(m.paused||!i)return;const S=x.relatedTarget;S!==null&&(i.contains(S)||Ct(p.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&Ct(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const w=new MutationObserver(y);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),w.disconnect()}}},[r,i,m.paused]),c.useEffect(()=>{if(i){yl.add(m);const h=document.activeElement;if(!i.contains(h)){const y=new CustomEvent(zo,gl);i.addEventListener(zo,d),i.dispatchEvent(y),y.defaultPrevented||(Qy(rw(vl(i)),{select:!0}),document.activeElement===h&&Ct(i))}return()=>{i.removeEventListener(zo,d),setTimeout(()=>{const y=new CustomEvent(Vo,gl);i.addEventListener(Vo,f),i.dispatchEvent(y),y.defaultPrevented||Ct(h??document.body,{select:!0}),i.removeEventListener(Vo,f),yl.remove(m)},0)}}},[i,d,f,m]);const v=c.useCallback(h=>{if(!n&&!r||m.paused)return;const b=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(b&&y){const w=h.currentTarget,[x,S]=Jy(w);x&&S?!h.shiftKey&&y===S?(h.preventDefault(),n&&Ct(x,{select:!0})):h.shiftKey&&y===x&&(h.preventDefault(),n&&Ct(S,{select:!0})):y===w&&h.preventDefault()}},[n,r,m.paused]);return l.jsx(L.div,{tabIndex:-1,...s,ref:g,onKeyDown:v})});An.displayName=Zy;function Qy(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ct(r,{select:t}),document.activeElement!==n)return}function Jy(e){const t=vl(e),n=bl(t,e),r=bl(t.reverse(),e);return[n,r]}function vl(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 bl(e,t){for(const n of e)if(!ew(n,{upTo:t}))return n}function ew(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 tw(e){return e instanceof HTMLInputElement&&"select"in e}function Ct(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tw(e)&&t&&e.select()}}var yl=nw();function nw(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=wl(e,t),e.unshift(t)},remove(t){var n;e=wl(e,t),(n=e[0])==null||n.resume()}}}function wl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function rw(e){return e.filter(t=>t.tagName!=="A")}var ow="Portal",jn=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=c.useState(!1);we(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?En.createPortal(l.jsx(L.div,{...r,ref:t}),s):null});jn.displayName=ow;var Ho=0;function kn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??xl()),document.body.insertAdjacentElement("beforeend",e[1]??xl()),Ho++,()=>{Ho===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ho--}},[])}function xl(){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 et=function(){return et=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},et.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 aw(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 pr="right-scroll-bar-position",hr="width-before-scroll-bar",sw="with-scroll-bars-hidden",iw="--removed-body-scroll-bar-size";function Go(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function lw(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 cw=typeof window<"u"?c.useLayoutEffect:c.useEffect,El=new WeakMap;function uw(e,t){var n=lw(null,function(r){return e.forEach(function(o){return Go(o,r)})});return cw(function(){var r=El.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Go(i,null)}),a.forEach(function(i){o.has(i)||Go(i,s)})}El.set(n,e)},[e]),n}function dw(e){return e}function fw(e,t){t===void 0&&(t=dw);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 mw(e){e===void 0&&(e={});var t=fw(null);return t.options=et({async:!0,ssr:!1},e),t}var Nl=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,et({},n))};Nl.isSideCarExport=!0;function pw(e,t){return e.useMedium(t),Nl}var Sl=mw(),Uo=function(){},gr=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Uo,onWheelCapture:Uo,onTouchMoveCapture:Uo}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,m=e.noIsolation,v=e.inert,h=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"]),S=g,C=uw([n,t]),M=et(et({},x),o);return c.createElement(c.Fragment,null,f&&c.createElement(S,{sideCar:Sl,removeScrollBar:d,shards:p,noIsolation:m,inert:v,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:w}),s?c.cloneElement(c.Children.only(i),et(et({},M),{ref:C})):c.createElement(y,et({},M,{className:u,ref:C}),i))});gr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},gr.classNames={fullWidth:hr,zeroRight:pr};var hw=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function gw(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=hw();return t&&e.setAttribute("nonce",t),e}function vw(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function bw(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var yw=function(){var e=0,t=null;return{add:function(n){e==0&&(t=gw())&&(vw(t,n),bw(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ww=function(){var e=yw();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Pl=function(){var e=ww(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},xw={left:0,top:0,right:0,gap:0},Yo=function(e){return parseInt(e||"",10)||0},Cw=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[Yo(n),Yo(r),Yo(o)]},Ew=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return xw;var t=Cw(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])}},Nw=Pl(),nn="data-scroll-locked",Sw=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(sw,` {
|
|
193
193
|
overflow: hidden `).concat(r,`;
|
|
194
194
|
padding-right: `).concat(i,"px ").concat(r,`;
|
|
195
195
|
}
|
|
196
|
-
body[`).concat(
|
|
196
|
+
body[`).concat(nn,`] {
|
|
197
197
|
overflow: hidden `).concat(r,`;
|
|
198
198
|
overscroll-behavior: contain;
|
|
199
199
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
@@ -206,39 +206,43 @@ 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(
|
|
209
|
+
.`).concat(pr,` {
|
|
210
210
|
right: `).concat(i,"px ").concat(r,`;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
.`).concat(
|
|
213
|
+
.`).concat(hr,` {
|
|
214
214
|
margin-right: `).concat(i,"px ").concat(r,`;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
.`).concat(
|
|
217
|
+
.`).concat(pr," .").concat(pr,` {
|
|
218
218
|
right: 0 `).concat(r,`;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
.`).concat(
|
|
221
|
+
.`).concat(hr," .").concat(hr,` {
|
|
222
222
|
margin-right: 0 `).concat(r,`;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
body[`).concat(
|
|
226
|
-
`).concat(
|
|
225
|
+
body[`).concat(nn,`] {
|
|
226
|
+
`).concat(iw,": ").concat(i,`px;
|
|
227
227
|
}
|
|
228
|
-
`)},
|
|
228
|
+
`)},Tl=function(){var e=parseInt(document.body.getAttribute(nn)||"0",10);return isFinite(e)?e:0},Pw=function(){c.useEffect(function(){return document.body.setAttribute(nn,(Tl()+1).toString()),function(){var e=Tl()-1;e<=0?document.body.removeAttribute(nn):document.body.setAttribute(nn,e.toString())}},[])},Tw=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Pw();var a=c.useMemo(function(){return Ew(o)},[o]);return c.createElement(Nw,{styles:Sw(a,!t,o,n?"":"!important")})},Ko=!1;if(typeof window<"u")try{var vr=Object.defineProperty({},"passive",{get:function(){return Ko=!0,!0}});window.addEventListener("test",vr,vr),window.removeEventListener("test",vr,vr)}catch{Ko=!1}var rn=Ko?{passive:!1}:!1,Mw=function(e){return e.tagName==="TEXTAREA"},Ml=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Mw(e)&&n[t]==="visible")},Rw=function(e){return Ml(e,"overflowY")},Dw=function(e){return Ml(e,"overflowX")},Rl=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Dl(e,r);if(o){var a=Al(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Aw=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},jw=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Dl=function(e,t){return e==="v"?Rw(t):Dw(t)},Al=function(e,t){return e==="v"?Aw(t):jw(t)},kw=function(e,t){return e==="h"&&t==="rtl"?-1:1},Iw=function(e,t,n,r,o){var a=kw(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,u=t.contains(i),d=!1,f=s>0,p=0,g=0;do{var m=Al(e,i),v=m[0],h=m[1],b=m[2],y=h-b-a*v;(v||y)&&Dl(e,i)&&(p+=y,g+=v),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(g)<1||!o))&&(d=!0),d},br=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jl=function(e){return[e.deltaX,e.deltaY]},kl=function(e){return e&&"current"in e?e.current:e},Ow=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_w=function(e){return`
|
|
229
229
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
230
230
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
231
|
-
`)}
|
|
231
|
+
`)},$w=0,on=[];function Lw(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState($w++)[0],a=c.useState(Pl)[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 h=aw([e.lockRef.current],(e.shards||[]).map(kl),!0).filter(Boolean);return h.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback(function(h,b){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!s.current.allowPinchZoom;var y=br(h),w=n.current,x="deltaX"in h?h.deltaX:w[0]-y[0],S="deltaY"in h?h.deltaY:w[1]-y[1],C,M=h.target,T=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in h&&T==="h"&&M.type==="range")return!1;var D=Rl(T,M);if(!D)return!0;if(D?C=T:(C=T==="v"?"h":"v",D=Rl(T,M)),!D)return!1;if(!r.current&&"changedTouches"in h&&(x||S)&&(r.current=C),!C)return!0;var k=r.current||C;return Iw(k,b,h,k==="h"?x:S,!0)},[]),u=c.useCallback(function(h){var b=h;if(!(!on.length||on[on.length-1]!==a)){var y="deltaY"in b?jl(b):br(b),w=t.current.filter(function(C){return C.name===b.type&&(C.target===b.target||b.target===C.shadowParent)&&Ow(C.delta,y)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(kl).filter(Boolean).filter(function(C){return C.contains(b.target)}),S=x.length>0?i(b,x[0]):!s.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),d=c.useCallback(function(h,b,y,w){var x={name:h,delta:b,target:y,should:w,shadowParent:Fw(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),f=c.useCallback(function(h){n.current=br(h),r.current=void 0},[]),p=c.useCallback(function(h){d(h.type,jl(h),h.target,i(h,e.lockRef.current))},[]),g=c.useCallback(function(h){d(h.type,br(h),h.target,i(h,e.lockRef.current))},[]);c.useEffect(function(){return on.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,rn),document.addEventListener("touchmove",u,rn),document.addEventListener("touchstart",f,rn),function(){on=on.filter(function(h){return h!==a}),document.removeEventListener("wheel",u,rn),document.removeEventListener("touchmove",u,rn),document.removeEventListener("touchstart",f,rn)}},[]);var m=e.removeScrollBar,v=e.inert;return c.createElement(c.Fragment,null,v?c.createElement(a,{styles:_w(o)}):null,m?c.createElement(Tw,{gapMode:e.gapMode}):null)}function Fw(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Bw=pw(Sl,Lw);var an=c.forwardRef(function(e,t){return c.createElement(gr,et({},e,{ref:t,sideCar:Bw}))});an.classNames=gr.classNames;var Ww=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},sn=new WeakMap,yr=new WeakMap,wr={},qo=0,Il=function(e){return e&&(e.host||Il(e.parentNode))},zw=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Il(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})},Vw=function(e,t,n,r){var o=zw(t,Array.isArray(e)?e:[e]);wr[n]||(wr[n]=new WeakMap);var a=wr[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(g){if(i.has(g))f(g);else try{var m=g.getAttribute(r),v=m!==null&&m!=="false",h=(sn.get(g)||0)+1,b=(a.get(g)||0)+1;sn.set(g,h),a.set(g,b),s.push(g),h===1&&v&&yr.set(g,!0),b===1&&g.setAttribute(n,"true"),v||g.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return f(t),i.clear(),qo++,function(){s.forEach(function(p){var g=sn.get(p)-1,m=a.get(p)-1;sn.set(p,g),a.set(p,m),g||(yr.has(p)||p.removeAttribute(r),yr.delete(p)),m||p.removeAttribute(n)}),qo--,qo||(sn=new WeakMap,sn=new WeakMap,yr=new WeakMap,wr={})}},In=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Ww(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Vw(r,o,n,"aria-hidden")):function(){return null}},Xo="Dialog",[Ol,_l]=ye(Xo),[Hw,He]=Ol(Xo),$l=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]=Ee({prop:r,defaultProp:o,onChange:a});return l.jsx(Hw,{scope:t,triggerRef:i,contentRef:u,contentId:me(),titleId:me(),descriptionId:me(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:s,children:n})};$l.displayName=Xo;var Ll="DialogTrigger",Fl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Ll,n),a=J(t,o.triggerRef);return l.jsx(L.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Jo(o.open),...r,ref:a,onClick:I(e.onClick,o.onOpenToggle)})});Fl.displayName=Ll;var Zo="DialogPortal",[Gw,Bl]=Ol(Zo,{forceMount:void 0}),Wl=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=He(Zo,t);return l.jsx(Gw,{scope:t,forceMount:n,children:c.Children.map(r,s=>l.jsx(be,{present:n||a.open,children:l.jsx(jn,{asChild:!0,container:o,children:s})}))})};Wl.displayName=Zo;var xr="DialogOverlay",zl=c.forwardRef((e,t)=>{const n=Bl(xr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=He(xr,e.__scopeDialog);return a.modal?l.jsx(be,{present:r||a.open,children:l.jsx(Uw,{...o,ref:t})}):null});zl.displayName=xr;var Uw=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(xr,n);return l.jsx(an,{as:ct,allowPinchZoom:!0,shards:[o.contentRef],children:l.jsx(L.div,{"data-state":Jo(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ft="DialogContent",Vl=c.forwardRef((e,t)=>{const n=Bl(Ft,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=He(Ft,e.__scopeDialog);return l.jsx(be,{present:r||a.open,children:a.modal?l.jsx(Yw,{...o,ref:t}):l.jsx(Kw,{...o,ref:t})})});Vl.displayName=Ft;var Yw=c.forwardRef((e,t)=>{const n=He(Ft,e.__scopeDialog),r=c.useRef(null),o=J(t,n.contentRef,r);return c.useEffect(()=>{const a=r.current;if(a)return In(a)},[]),l.jsx(Hl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:I(e.onFocusOutside,a=>a.preventDefault())})}),Kw=c.forwardRef((e,t)=>{const n=He(Ft,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return l.jsx(Hl,{...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()}})}),Hl=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=He(Ft,n),u=c.useRef(null),d=J(t,u);return kn(),l.jsxs(l.Fragment,{children:[l.jsx(An,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(Lt,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Jo(i.open),...s,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(Xw,{titleId:i.titleId}),l.jsx(Qw,{contentRef:u,descriptionId:i.descriptionId})]})]})}),Qo="DialogTitle",Gl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Qo,n);return l.jsx(L.h2,{id:o.titleId,...r,ref:t})});Gl.displayName=Qo;var Ul="DialogDescription",Yl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Ul,n);return l.jsx(L.p,{id:o.descriptionId,...r,ref:t})});Yl.displayName=Ul;var Kl="DialogClose",ql=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Kl,n);return l.jsx(L.button,{type:"button",...r,ref:t,onClick:I(e.onClick,()=>o.onOpenChange(!1))})});ql.displayName=Kl;function Jo(e){return e?"open":"closed"}var Xl="DialogTitleWarning",[qw,Zl]=Bi(Xl,{contentName:Ft,titleName:Qo,docsSlug:"dialog"}),Xw=({titleId:e})=>{const t=Zl(Xl),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},
|
|
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},Zw="DialogDescriptionWarning",Qw=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Zl(Zw).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},Jw=$l,ex=Fl,tx=Wl,nx=zl,rx=Vl,ox=Gl,ax=Yl,Ql=ql,Jl="AlertDialog",[sx,NT]=ye(Jl,[_l]),dt=_l(),ec=e=>{const{__scopeAlertDialog:t,...n}=e,r=dt(t);return l.jsx(Jw,{...r,...n,modal:!0})};ec.displayName=Jl;var ix="AlertDialogTrigger",tc=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=dt(n);return l.jsx(ex,{...o,...r,ref:t})});tc.displayName=ix;var lx="AlertDialogPortal",nc=e=>{const{__scopeAlertDialog:t,...n}=e,r=dt(t);return l.jsx(tx,{...r,...n})};nc.displayName=lx;var cx="AlertDialogOverlay",rc=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=dt(n);return l.jsx(nx,{...o,...r,ref:t})});rc.displayName=cx;var ln="AlertDialogContent",[ux,dx]=sx(ln),oc=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,a=dt(n),s=c.useRef(null),i=J(t,s),u=c.useRef(null);return l.jsx(qw,{contentName:ln,titleName:ac,docsSlug:"alert-dialog",children:l.jsx(ux,{scope:n,cancelRef:u,children:l.jsxs(rx,{role:"alertdialog",...a,...o,ref:i,onOpenAutoFocus:I(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(jo,{children:r}),l.jsx(mx,{contentRef:s})]})})})});oc.displayName=ln;var ac="AlertDialogTitle",sc=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=dt(n);return l.jsx(ox,{...o,...r,ref:t})});sc.displayName=ac;var ic="AlertDialogDescription",lc=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=dt(n);return l.jsx(ax,{...o,...r,ref:t})});lc.displayName=ic;var fx="AlertDialogAction",cc=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=dt(n);return l.jsx(Ql,{...o,...r,ref:t})});cc.displayName=fx;var uc="AlertDialogCancel",dc=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=dx(uc,n),a=dt(n),s=J(t,o);return l.jsx(Ql,{...a,...r,ref:s})});dc.displayName=uc;var mx=({contentRef:e})=>{const t=`\`${ln}\` requires a description for the component to be accessible for screen reader users.
|
|
236
236
|
|
|
237
|
-
You can add a description to the \`${
|
|
237
|
+
You can add a description to the \`${ln}\` by passing a \`${ic}\` 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 \`${
|
|
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 \`${ln}\`. 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},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={};/**
|
|
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},px=ec,hx=tc,gx=nc,fc=rc,mc=oc,pc=cc,hc=dc,gc=sc,vc=lc;const bc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,vx=e=>{if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);return Number.isNaN(t)?e:t},bx=e=>{const t=function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return go(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 v=u==null?void 0:u[m],h=s==null?void 0:s[m],b=bc(v)||bc(h);return a[m][b]}),p={...s,...u&&Object.entries(u).reduce((m,v)=>{let[h,b]=v;return b!==void 0&&Object.assign(m,{[h]:b}),m},{})},g=o==null||(d=o.compoundVariants)===null||d===void 0?void 0:d.reduce((m,v)=>{let{class:h,className:b,...y}=v;return Object.entries(y).every(w=>{let[x,S]=w;const C=p[x];return Array.isArray(S)?S.includes(C):C===S})?[...m,h,b]:m},[]);return t(o==null?void 0:o.base,f,g,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=>vx(p))]})):{}})},cx:t}},{compose:ST,cva:yc,cx:PT}=bx(),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}},Cr=yc(ea),Ne=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?ct:"button",f=Mo(s,ea),p=yc(f);return l.jsxs(d,{className:A(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]})});Ne.displayName="Button";const yx=px,wx=hx,wc=gx,ta=c.forwardRef(({className:e,...t},n)=>l.jsx(fc,{className:A("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=fc.displayName;const xc=c.forwardRef(({className:e,...t},n)=>l.jsxs(wc,{children:[l.jsx(ta,{}),l.jsx(mc,{ref:n,className:A("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})]}));xc.displayName=mc.displayName;const Cc=({className:e,...t})=>l.jsx("div",{className:A("flex flex-col space-y-2 text-center sm:text-left",e),...t});Cc.displayName="AlertDialogHeader";const Ec=({className:e,...t})=>l.jsx("div",{className:A("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ec.displayName="AlertDialogFooter";const Nc=c.forwardRef(({className:e,...t},n)=>l.jsx(gc,{ref:n,className:A("text-lg font-semibold",e),...t}));Nc.displayName=gc.displayName;const Sc=c.forwardRef(({className:e,...t},n)=>l.jsx(vc,{ref:n,className:A("text-sm text-muted-foreground",e),...t}));Sc.displayName=vc.displayName;const Pc=c.forwardRef(({className:e,...t},n)=>l.jsx(pc,{ref:n,className:A(Cr(),e),...t}));Pc.displayName=pc.displayName;const Tc=c.forwardRef(({className:e,...t},n)=>l.jsx(hc,{ref:n,className:A(Cr({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Tc.displayName=hc.displayName;function xx(e){const{options:t,placeholder:n="Type to search...",onSelect:r,defaultSelectedOption:o}=e,[a,s]=P.useState((o==null?void 0:o.label)||""),[i,u]=P.useState([]),[d,f]=P.useState(!1),[p,g]=P.useState(-1),[m,v]=P.useState("down"),[h,b]=P.useState(o||null),y=P.useRef(null),w=P.useRef(null),x=P.useRef(null);P.useEffect(()=>{const T=D=>{y.current&&!y.current.contains(D.target)&&f(!1)};return document.addEventListener("click",T),()=>{document.removeEventListener("click",T)}},[]),P.useEffect(()=>{const T=t.filter(D=>D.label.toLowerCase().includes(a.toLowerCase()));u(T),g(-1)},[a,t]),P.useEffect(()=>{if(d&&w.current){const T=w.current.getBoundingClientRect(),D=window.innerHeight-T.bottom,k=T.top,W=Math.min(i.length*40,240);v(D>=W||D>k?"down":"up")}},[d,i]);const S=T=>{var D;s(T.target.value),(D=e.onChange)==null||D.call(e,T.target.value),b(null),f(!0)},C=T=>{s(T.label),b(T),f(!1),r(T)},M=T=>{if(!d&&(T.key==="ArrowDown"||T.key==="ArrowUp")){f(!0);return}switch(T.key){case"ArrowDown":g(D=>D<i.length-1?D+1:D);break;case"ArrowUp":g(D=>D>0?D-1:D);break;case"Enter":p>=0&&p<i.length&&C(i[p]);break;case"Escape":f(!1);break}};return P.useEffect(()=>{d&&x.current&&p>=0&&x.current.children[p].scrollIntoView({block:"nearest"})},[p,d]),l.jsxs("div",{ref:y,className:"relative w-full",children:[l.jsx(mr,{ref:w,type:"text",value:a,onChange:S,onFocus:()=>f(!0),onKeyDown:M,placeholder:n,className:A("w-full",e.className),"aria-expanded":d,"aria-autocomplete":"list","aria-controls":"autocomplete-list",role:"combobox",leftIcon:l.jsx(Li,{className:"w-4 h-4"}),rightIcon:h?l.jsx("button",{className:"mt-[5px]",onClick:()=>{b(null),s(""),r(null)},children:l.jsx(sr,{className:"w-5 h-5"})}):null}),d&&i.length>0&&l.jsx("ul",{id:"autocomplete-list",ref:x,className:`absolute z-10 w-full bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-auto ${m==="up"?"bottom-full mb-1":"top-full mt-1"}`,role:"listbox",children:i.map((T,D)=>l.jsx("li",{onClick:()=>C(T),className:`px-4 py-2 cursor-pointer ${D===p?"bg-blue-100":"hover:bg-gray-100"} ${(h==null?void 0:h.value)===T.value?"bg-blue-200":""}`,role:"option","aria-selected":D===p,id:`option-${D}`,children:T.label},T.value))})]})}var na="Avatar",[Cx,TT]=ye(na),[Ex,Mc]=Cx(na),Rc=c.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=c.useState("idle");return l.jsx(Ex,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:l.jsx(L.span,{...r,ref:t})})});Rc.displayName=na;var Dc="AvatarImage",Ac=c.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=Mc(Dc,n),i=Nx(r,a.referrerPolicy),u=he(d=>{o(d),s.onImageLoadingStatusChange(d)});return we(()=>{i!=="idle"&&u(i)},[i,u]),i==="loaded"?l.jsx(L.img,{...a,ref:t,src:r}):null});Ac.displayName=Dc;var jc="AvatarFallback",kc=c.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=Mc(jc,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(L.span,{...o,ref:t}):null});kc.displayName=jc;function Nx(e,t){const[n,r]=c.useState("idle");return we(()=>{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 Ic=Rc,Oc=Ac,_c=kc;const $c=c.forwardRef(({className:e,...t},n)=>l.jsx(Ic,{ref:n,className:A("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));$c.displayName=Ic.displayName;const Lc=c.forwardRef(({className:e,...t},n)=>l.jsx(Oc,{ref:n,className:A("aspect-square h-full w-full",e),...t}));Lc.displayName=Oc.displayName;const Fc=c.forwardRef(({className:e,...t},n)=>l.jsx(_c,{ref:n,className:A("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Fc.displayName=_c.displayName;const Bc=$t("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:A(Bc({variant:t}),e),...n})}const Sx={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"}},Px=(e,t,n)=>{let r;const o=Sx[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},Tx={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},Mx={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Rx={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Dx={date:Zt({formats:Tx,defaultWidth:"full"}),time:Zt({formats:Mx,defaultWidth:"full"}),dateTime:Zt({formats:Rx,defaultWidth:"full"})},Ax={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"},jx=(e,t,n,r)=>{const o=Ax[e];return typeof o=="function"?o(t):o},kx={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},Ix={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Ox={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"]},_x={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"]},$x={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"}},Lx={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"}},Fx={ordinalNumber:(e,t)=>{const n=Number(e);return(t==null?void 0:t.unit)==="week"?n+"ª":n+"º"},era:Qe({values:kx,defaultWidth:"wide"}),quarter:Qe({values:Ix,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qe({values:Ox,defaultWidth:"wide"}),day:Qe({values:_x,defaultWidth:"wide"}),dayPeriod:Qe({values:$x,defaultWidth:"wide",formattingValues:Lx,defaultFormattingWidth:"wide"})},Bx=/^(\d+)[ºªo]?/i,Wx=/\d+/i,zx={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},Vx={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},Hx={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Gx={any:[/1/i,/2/i,/3/i,/4/i]},Ux={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},Yx={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]},Kx={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},qx={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]},Xx={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},Zx={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}},Qx={ordinalNumber:ui({matchPattern:Bx,parsePattern:Wx,valueCallback:e=>parseInt(e,10)}),era:Je({matchPatterns:zx,defaultMatchWidth:"wide",parsePatterns:Vx,defaultParseWidth:"any"}),quarter:Je({matchPatterns:Hx,defaultMatchWidth:"wide",parsePatterns:Gx,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Je({matchPatterns:Ux,defaultMatchWidth:"wide",parsePatterns:Yx,defaultParseWidth:"any"}),day:Je({matchPatterns:Kx,defaultMatchWidth:"wide",parsePatterns:qx,defaultParseWidth:"any"}),dayPeriod:Je({matchPatterns:Xx,defaultMatchWidth:"any",parsePatterns:Zx,defaultParseWidth:"any"})},Jx={code:"pt-BR",formatDistance:Px,formatLong:Dx,formatRelative:jx,localize:Fx,match:Qx,options:{weekStartsOn:0,firstWeekContainsDate:1}},e0=({selectedDate:e,onChange:t,language:n="enUS"})=>{const[r,o]=P.useState(e||new Date),s={ptBR:Jx,enUS:wo}[n],i=()=>{o(m=>Qv(m,1))},u=()=>{o(m=>Ci(m,1))},d=m=>{t&&t(m)},f=Array.from({length:Zv(r)}).map((m,v)=>new Date(r.getFullYear(),r.getMonth(),v+1)),p=Xv(r).getDay(),g=Array.from({length:7}).map((m,v)=>xo(new Date(2021,0,v+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(Ro,{})}),l.jsx("h2",{className:"text-lg font-bold","aria-live":"polite",children:xo(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(ar,{})})]}),l.jsxs("div",{className:"grid grid-cols-7 gap-2",children:[g.map((m,v)=>l.jsx("div",{className:"text-center font-medium","aria-hidden":"true",children:m},v)),Array.from({length:p}).map((m,v)=>l.jsx("div",{className:"","aria-hidden":"true"},`empty-${v}`)),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":xo(m,"MMMM do yyyy",{locale:s}),"aria-pressed":e&&m.toDateString()===e.toDateString()?"true":"false",children:m.getDate()},m.toISOString()))]})]})},Wc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:A("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Wc.displayName="Card";const zc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:A("flex flex-col space-y-1.5 p-6",e),...t}));zc.displayName="CardHeader";const Vc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:A("font-semibold leading-none tracking-tight pb-4",e),...t}));Vc.displayName="CardTitle";const Hc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:A("text-sm text-muted-foreground",e),...t}));Hc.displayName="CardDescription";const Gc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:A("p-6 py-0",e),...t}));Gc.displayName="CardContent";const Uc=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:A("flex items-center p-6 pt-6",e),...t}));Uc.displayName="CardFooter";function On(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 Er(e){const[t,n]=c.useState(void 0);return we(()=>{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",[t0,RT]=ye(oa),[n0,r0]=t0(oa),Yc=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,[g,m]=c.useState(null),v=J(t,S=>m(S)),h=c.useRef(!1),b=g?f||!!g.closest("form"):!0,[y=!1,w]=Ee({prop:o,defaultProp:a,onChange:d}),x=c.useRef(y);return c.useEffect(()=>{const S=g==null?void 0:g.form;if(S){const C=()=>w(x.current);return S.addEventListener("reset",C),()=>S.removeEventListener("reset",C)}},[g,w]),l.jsxs(n0,{scope:n,state:y,disabled:i,children:[l.jsx(L.button,{type:"button",role:"checkbox","aria-checked":Et(y)?"mixed":y,"aria-required":s,"data-state":Xc(y),"data-disabled":i?"":void 0,disabled:i,value:u,...p,ref:v,onKeyDown:I(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:I(e.onClick,S=>{w(C=>Et(C)?!0:!C),b&&(h.current=S.isPropagationStopped(),h.current||S.stopPropagation())})}),b&&l.jsx(o0,{control:g,bubbles:!h.current,name:r,value:u,checked:y,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"},defaultChecked:Et(a)?!1:a})]})});Yc.displayName=oa;var Kc="CheckboxIndicator",qc=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=r0(Kc,n);return l.jsx(be,{present:r||Et(a.state)||a.state===!0,children:l.jsx(L.span,{"data-state":Xc(a.state),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});qc.displayName=Kc;var o0=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...a}=e,s=c.useRef(null),i=On(n),u=Er(t);c.useEffect(()=>{const f=s.current,p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(i!==n&&m){const v=new Event("click",{bubbles:r});f.indeterminate=Et(n),m.call(f,Et(n)?!1:n),f.dispatchEvent(v)}},[i,n,r]);const d=c.useRef(Et(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 Et(e){return e==="indeterminate"}function Xc(e){return Et(e)?"indeterminate":e?"checked":"unchecked"}var Zc=Yc,a0=qc;const Qc=c.forwardRef(({className:e,...t},n)=>l.jsx(Zc,{ref:n,className:A("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(a0,{className:A("flex items-center justify-center text-current"),children:l.jsx(Dn,{className:"h-4 w-4"})})}));Qc.displayName=Zc.displayName;var Jc=1,s0=.9,i0=.8,l0=.17,aa=.1,sa=.999,c0=.9999,u0=.99,d0=/[\\\/_+.#"@\[\(\{&]/,f0=/[\\\/_+.#"@\[\(\{&]/g,m0=/[\s-]/,eu=/[\s-]/g;function ia(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?Jc:u0;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,g,m,v;d>=0;)p=ia(e,t,n,r,d+1,a+1,s),p>f&&(d===o?p*=Jc:d0.test(e.charAt(d-1))?(p*=i0,m=e.slice(o,d-1).match(f0),m&&o>0&&(p*=Math.pow(sa,m.length))):m0.test(e.charAt(d-1))?(p*=s0,v=e.slice(o,d-1).match(eu),v&&o>0&&(p*=Math.pow(sa,v.length))):(p*=l0,o>0&&(p*=Math.pow(sa,d-o))),e.charAt(d)!==t.charAt(a)&&(p*=c0)),(p<aa&&n.charAt(d-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(d-1)!==r.charAt(a))&&(g=ia(e,t,n,r,d+1,a+2,s),g*aa>p&&(p=g*aa)),p>f&&(f=p),d=n.indexOf(u,d+1);return s[i]=f,f}function tu(e){return e.toLowerCase().replace(eu," ")}function p0(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,ia(e,t,tu(e),tu(t),0,0,{})}var la=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),a=o.find(g0);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(ca,{...r,ref:t,children:c.isValidElement(s)?c.cloneElement(s,void 0,i):null})}return l.jsx(ca,{...r,ref:t,children:n})});la.displayName="Slot";var ca=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const o=b0(n),a=v0(r,n.props);return n.type!==c.Fragment&&(a.ref=t?en(t,o):o),c.cloneElement(n,a)}return c.Children.count(n)>1?c.Children.only(null):null});ca.displayName="SlotClone";var h0=({children:e})=>l.jsx(l.Fragment,{children:e});function g0(e){return c.isValidElement(e)&&e.type===h0}function v0(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 b0(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 y0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ft=y0.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:a,...s}=r,i=a?la: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 w0(e,t){e&&Nn.flushSync(()=>e.dispatchEvent(t))}var x0="DismissableLayer",ua="dismissableLayer.update",C0="dismissableLayer.pointerDownOutside",E0="dismissableLayer.focusOutside",nu,ru=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ou=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...u}=e,d=c.useContext(ru),[f,p]=c.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),v=J(t,T=>p(T)),h=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(b),w=f?h.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=w>=y,C=P0(T=>{const D=T.target,k=[...d.branches].some(W=>W.contains(D));!S||k||(o==null||o(T),s==null||s(T),T.defaultPrevented||i==null||i())},g),M=T0(T=>{const D=T.target;[...d.branches].some(W=>W.contains(D))||(a==null||a(T),s==null||s(T),T.defaultPrevented||i==null||i())},g);return dl(T=>{w===d.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&i&&(T.preventDefault(),i()))},g),c.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(nu=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),au(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=nu)}},[f,g,n,d]),c.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),au())},[f,d]),c.useEffect(()=>{const T=()=>m({});return document.addEventListener(ua,T),()=>document.removeEventListener(ua,T)},[]),l.jsx(ft.div,{...u,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,M.onFocusCapture),onBlurCapture:I(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,C.onPointerDownCapture)})});ou.displayName=x0;var N0="DismissableLayerBranch",S0=c.forwardRef((e,t)=>{const n=c.useContext(ru),r=c.useRef(null),o=J(t,r);return c.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(ft.div,{...e,ref:o})});S0.displayName=N0;function P0(e,t=globalThis==null?void 0:globalThis.document){const n=he(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let u=function(){su(C0,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 T0(e,t=globalThis==null?void 0:globalThis.document){const n=he(e),r=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!r.current&&su(E0,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 au(){const e=new CustomEvent(ua);document.dispatchEvent(e)}function su(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?w0(o,a):o.dispatchEvent(a)}var da="focusScope.autoFocusOnMount",fa="focusScope.autoFocusOnUnmount",iu={bubbles:!1,cancelable:!0},M0="FocusScope",lu=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,u]=c.useState(null),d=he(o),f=he(a),p=c.useRef(null),g=J(t,h=>u(h)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let h=function(x){if(m.paused||!i)return;const S=x.target;i.contains(S)?p.current=S:Nt(p.current,{select:!0})},b=function(x){if(m.paused||!i)return;const S=x.relatedTarget;S!==null&&(i.contains(S)||Nt(p.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&Nt(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const w=new MutationObserver(y);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),w.disconnect()}}},[r,i,m.paused]),c.useEffect(()=>{if(i){du.add(m);const h=document.activeElement;if(!i.contains(h)){const y=new CustomEvent(da,iu);i.addEventListener(da,d),i.dispatchEvent(y),y.defaultPrevented||(R0(I0(cu(i)),{select:!0}),document.activeElement===h&&Nt(i))}return()=>{i.removeEventListener(da,d),setTimeout(()=>{const y=new CustomEvent(fa,iu);i.addEventListener(fa,f),i.dispatchEvent(y),y.defaultPrevented||Nt(h??document.body,{select:!0}),i.removeEventListener(fa,f),du.remove(m)},0)}}},[i,d,f,m]);const v=c.useCallback(h=>{if(!n&&!r||m.paused)return;const b=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(b&&y){const w=h.currentTarget,[x,S]=D0(w);x&&S?!h.shiftKey&&y===S?(h.preventDefault(),n&&Nt(x,{select:!0})):h.shiftKey&&y===x&&(h.preventDefault(),n&&Nt(S,{select:!0})):y===w&&h.preventDefault()}},[n,r,m.paused]);return l.jsx(ft.div,{tabIndex:-1,...s,ref:g,onKeyDown:v})});lu.displayName=M0;function R0(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Nt(r,{select:t}),document.activeElement!==n)return}function D0(e){const t=cu(e),n=uu(t,e),r=uu(t.reverse(),e);return[n,r]}function cu(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 uu(e,t){for(const n of e)if(!A0(n,{upTo:t}))return n}function A0(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 j0(e){return e instanceof HTMLInputElement&&"select"in e}function Nt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&j0(e)&&t&&e.select()}}var du=k0();function k0(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fu(e,t),e.unshift(t)},remove(t){var n;e=fu(e,t),(n=e[0])==null||n.resume()}}}function fu(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function I0(e){return e.filter(t=>t.tagName!=="A")}var O0="Portal",mu=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=c.useState(!1);we(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?En.createPortal(l.jsx(ft.div,{...r,ref:t}),s):null});mu.displayName=O0;var ma="Dialog",[pu,DT]=ye(ma),[_0,Ge]=pu(ma),hu=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]=Ee({prop:r,defaultProp:o,onChange:a});return l.jsx(_0,{scope:t,triggerRef:i,contentRef:u,contentId:me(),titleId:me(),descriptionId:me(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:s,children:n})};hu.displayName=ma;var gu="DialogTrigger",vu=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(gu,n),a=J(t,o.triggerRef);return l.jsx(ft.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ga(o.open),...r,ref:a,onClick:I(e.onClick,o.onOpenToggle)})});vu.displayName=gu;var pa="DialogPortal",[$0,bu]=pu(pa,{forceMount:void 0}),yu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Ge(pa,t);return l.jsx($0,{scope:t,forceMount:n,children:c.Children.map(r,s=>l.jsx(be,{present:n||a.open,children:l.jsx(mu,{asChild:!0,container:o,children:s})}))})};yu.displayName=pa;var Nr="DialogOverlay",wu=c.forwardRef((e,t)=>{const n=bu(Nr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ge(Nr,e.__scopeDialog);return a.modal?l.jsx(be,{present:r||a.open,children:l.jsx(L0,{...o,ref:t})}):null});wu.displayName=Nr;var L0=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(Nr,n);return l.jsx(an,{as:la,allowPinchZoom:!0,shards:[o.contentRef],children:l.jsx(ft.div,{"data-state":ga(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Bt="DialogContent",xu=c.forwardRef((e,t)=>{const n=bu(Bt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ge(Bt,e.__scopeDialog);return l.jsx(be,{present:r||a.open,children:a.modal?l.jsx(F0,{...o,ref:t}):l.jsx(B0,{...o,ref:t})})});xu.displayName=Bt;var F0=c.forwardRef((e,t)=>{const n=Ge(Bt,e.__scopeDialog),r=c.useRef(null),o=J(t,n.contentRef,r);return c.useEffect(()=>{const a=r.current;if(a)return In(a)},[]),l.jsx(Cu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:I(e.onFocusOutside,a=>a.preventDefault())})}),B0=c.forwardRef((e,t)=>{const n=Ge(Bt,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return l.jsx(Cu,{...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()}})}),Cu=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=Ge(Bt,n),u=c.useRef(null),d=J(t,u);return kn(),l.jsxs(l.Fragment,{children:[l.jsx(lu,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(ou,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":ga(i.open),...s,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(W0,{titleId:i.titleId}),l.jsx(V0,{contentRef:u,descriptionId:i.descriptionId})]})]})}),ha="DialogTitle",Eu=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(ha,n);return l.jsx(ft.h2,{id:o.titleId,...r,ref:t})});Eu.displayName=ha;var Nu="DialogDescription",Su=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(Nu,n);return l.jsx(ft.p,{id:o.descriptionId,...r,ref:t})});Su.displayName=Nu;var Pu="DialogClose",Tu=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(Pu,n);return l.jsx(ft.button,{type:"button",...r,ref:t,onClick:I(e.onClick,()=>o.onOpenChange(!1))})});Tu.displayName=Pu;function ga(e){return e?"open":"closed"}var Mu="DialogTitleWarning",[AT,Ru]=Bi(Mu,{contentName:Bt,titleName:ha,docsSlug:"dialog"}),W0=({titleId:e})=>{const t=Ru(Mu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
242
|
+
|
|
243
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
244
|
+
|
|
245
|
+
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},z0="DialogDescriptionWarning",V0=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ru(z0).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},Du=hu,H0=vu,Au=yu,va=wu,ba=xu,ju=Eu,ku=Su,Iu=Tu,Sr={exports:{}},ya={};/**
|
|
242
246
|
* @license React
|
|
243
247
|
* use-sync-external-store-shim.production.js
|
|
244
248
|
*
|
|
@@ -246,7 +250,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
|
|
|
246
250
|
*
|
|
247
251
|
* This source code is licensed under the MIT license found in the
|
|
248
252
|
* LICENSE file in the root directory of this source tree.
|
|
249
|
-
*/var
|
|
253
|
+
*/var Ou;function G0(){if(Ou)return ya;Ou=1;var e=P;function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(p,g){var m=g(),v=r({inst:{value:m,getSnapshot:g}}),h=v[0].inst,b=v[1];return a(function(){h.value=m,h.getSnapshot=g,u(h)&&b({inst:h})},[p,m,g]),o(function(){return u(h)&&b({inst:h}),p(function(){u(h)&&b({inst:h})})},[p]),s(m),m}function u(p){var g=p.getSnapshot;p=p.value;try{var m=g();return!n(p,m)}catch{return!0}}function d(p,g){return g()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:i;return ya.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,ya}var wa={};/**
|
|
250
254
|
* @license React
|
|
251
255
|
* use-sync-external-store-shim.development.js
|
|
252
256
|
*
|
|
@@ -254,13 +258,13 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
|
|
|
254
258
|
*
|
|
255
259
|
* This source code is licensed under the MIT license found in the
|
|
256
260
|
* LICENSE file in the root directory of this source tree.
|
|
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:
|
|
261
|
+
*/var _u;function U0(){return _u||(_u=1,process.env.NODE_ENV!=="production"&&function(){function e(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}function t(m,v){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 h=v();if(!p){var b=v();a(h,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}b=s({inst:{value:h,getSnapshot:v}});var y=b[0].inst,w=b[1];return u(function(){y.value=h,y.getSnapshot=v,n(y)&&w({inst:y})},[m,h,v]),i(function(){return n(y)&&w({inst:y}),m(function(){n(y)&&w({inst:y})})},[m]),d(h),h}function n(m){var v=m.getSnapshot;m=m.value;try{var h=v();return!a(m,h)}catch{return!0}}function r(m,v){return v()}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,g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;wa.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),wa}var $u;function Y0(){return $u||($u=1,process.env.NODE_ENV==="production"?Sr.exports=G0():Sr.exports=U0()),Sr.exports}var K0=Y0(),_n='[cmdk-group=""]',xa='[cmdk-group-items=""]',q0='[cmdk-group-heading=""]',Ca='[cmdk-item=""]',Lu=`${Ca}:not([aria-disabled="true"])`,Ea="cmdk-item-select",Wt="data-value",X0=(e,t,n)=>p0(e,t,n),Fu=c.createContext(void 0),$n=()=>c.useContext(Fu),Bu=c.createContext(void 0),Na=()=>c.useContext(Bu),Wu=c.createContext(void 0),zu=c.forwardRef((e,t)=>{let n=cn(()=>{var R,$;return{search:"",value:($=(R=e.value)!=null?R:e.defaultValue)!=null?$:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=cn(()=>new Set),o=cn(()=>new Map),a=cn(()=>new Map),s=cn(()=>new Set),i=Vu(e),{label:u,children:d,value:f,onValueChange:p,filter:g,shouldFilter:m,loop:v,disablePointerSelection:h=!1,vimBindings:b=!0,...y}=e,w=me(),x=me(),S=me(),C=c.useRef(null),M=iC();zt(()=>{if(f!==void 0){let R=f.trim();n.current.value=R,T.emit()}},[f]),zt(()=>{M(6,K)},[]);let T=c.useMemo(()=>({subscribe:R=>(s.current.add(R),()=>s.current.delete(R)),snapshot:()=>n.current,setState:(R,$,F)=>{var B,X,_;if(!Object.is(n.current[R],$)){if(n.current[R]=$,R==="search")O(),W(),M(1,Y);else if(R==="value"&&(F||M(5,K),((B=i.current)==null?void 0:B.value)!==void 0)){let Q=$??"";(_=(X=i.current).onValueChange)==null||_.call(X,Q);return}T.emit()}},emit:()=>{s.current.forEach(R=>R())}}),[]),D=c.useMemo(()=>({value:(R,$,F)=>{var B;$!==((B=a.current.get(R))==null?void 0:B.value)&&(a.current.set(R,{value:$,keywords:F}),n.current.filtered.items.set(R,k($,F)),M(2,()=>{W(),T.emit()}))},item:(R,$)=>(r.current.add(R),$&&(o.current.has($)?o.current.get($).add(R):o.current.set($,new Set([R]))),M(3,()=>{O(),W(),n.current.value||Y(),T.emit()}),()=>{a.current.delete(R),r.current.delete(R),n.current.filtered.items.delete(R);let F=H();M(4,()=>{O(),(F==null?void 0:F.getAttribute("id"))===R&&Y(),T.emit()})}),group:R=>(o.current.has(R)||o.current.set(R,new Set),()=>{a.current.delete(R),o.current.delete(R)}),filter:()=>i.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:w,inputId:S,labelId:x,listInnerRef:C}),[]);function k(R,$){var F,B;let X=(B=(F=i.current)==null?void 0:F.filter)!=null?B:X0;return R?X(R,n.current.search,$):0}function W(){if(!n.current.search||i.current.shouldFilter===!1)return;let R=n.current.filtered.items,$=[];n.current.filtered.groups.forEach(B=>{let X=o.current.get(B),_=0;X.forEach(Q=>{let ne=R.get(Q);_=Math.max(ne,_)}),$.push([B,_])});let F=C.current;ee().sort((B,X)=>{var _,Q;let ne=B.getAttribute("id"),re=X.getAttribute("id");return((_=R.get(re))!=null?_:0)-((Q=R.get(ne))!=null?Q:0)}).forEach(B=>{let X=B.closest(xa);X?X.appendChild(B.parentElement===X?B:B.closest(`${xa} > *`)):F.appendChild(B.parentElement===F?B:B.closest(`${xa} > *`))}),$.sort((B,X)=>X[1]-B[1]).forEach(B=>{var X;let _=(X=C.current)==null?void 0:X.querySelector(`${_n}[${Wt}="${encodeURIComponent(B[0])}"]`);_==null||_.parentElement.appendChild(_)})}function Y(){let R=ee().find(F=>F.getAttribute("aria-disabled")!=="true"),$=R==null?void 0:R.getAttribute(Wt);T.setState("value",$||void 0)}function O(){var R,$,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 Q=($=(R=a.current.get(_))==null?void 0:R.value)!=null?$:"",ne=(B=(F=a.current.get(_))==null?void 0:F.keywords)!=null?B:[],re=k(Q,ne);n.current.filtered.items.set(_,re),re>0&&X++}for(let[_,Q]of o.current)for(let ne of Q)if(n.current.filtered.items.get(ne)>0){n.current.filtered.groups.add(_);break}n.current.filtered.count=X}function K(){var R,$,F;let B=H();B&&(((R=B.parentElement)==null?void 0:R.firstChild)===B&&((F=($=B.closest(_n))==null?void 0:$.querySelector(q0))==null||F.scrollIntoView({block:"nearest"})),B.scrollIntoView({block:"nearest"}))}function H(){var R;return(R=C.current)==null?void 0:R.querySelector(`${Ca}[aria-selected="true"]`)}function ee(){var R;return Array.from(((R=C.current)==null?void 0:R.querySelectorAll(Lu))||[])}function V(R){let $=ee()[R];$&&T.setState("value",$.getAttribute(Wt))}function q(R){var $;let F=H(),B=ee(),X=B.findIndex(Q=>Q===F),_=B[X+R];($=i.current)!=null&&$.loop&&(_=X+R<0?B[B.length-1]:X+R===B.length?B[0]:B[X+R]),_&&T.setState("value",_.getAttribute(Wt))}function G(R){let $=H(),F=$==null?void 0:$.closest(_n),B;for(;F&&!B;)F=R>0?aC(F,_n):sC(F,_n),B=F==null?void 0:F.querySelector(Lu);B?T.setState("value",B.getAttribute(Wt)):q(R)}let j=()=>V(ee().length-1),Z=R=>{R.preventDefault(),R.metaKey?j():R.altKey?G(1):q(1)},te=R=>{R.preventDefault(),R.metaKey?V(0):R.altKey?G(-1):q(-1)};return c.createElement(L.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:R=>{var $;if(($=y.onKeyDown)==null||$.call(y,R),!R.defaultPrevented)switch(R.key){case"n":case"j":{b&&R.ctrlKey&&Z(R);break}case"ArrowDown":{Z(R);break}case"p":case"k":{b&&R.ctrlKey&&te(R);break}case"ArrowUp":{te(R);break}case"Home":{R.preventDefault(),V(0);break}case"End":{R.preventDefault(),j();break}case"Enter":if(!R.nativeEvent.isComposing&&R.keyCode!==229){R.preventDefault();let F=H();if(F){let B=new Event(Ea);F.dispatchEvent(B)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:D.inputId,id:D.labelId,style:cC},u),Pr(e,R=>c.createElement(Bu.Provider,{value:T},c.createElement(Fu.Provider,{value:D},R))))}),Z0=c.forwardRef((e,t)=>{var n,r;let o=me(),a=c.useRef(null),s=c.useContext(Wu),i=$n(),u=Vu(e),d=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;zt(()=>{if(!d)return i.item(o,s==null?void 0:s.id)},[d]);let f=Hu(o,a,[e.value,e.children,a],e.keywords),p=Na(),g=Vt(M=>M.value&&M.value===f.current),m=Vt(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(Ea,v),()=>M.removeEventListener(Ea,v)},[m,e.onSelect,e.disabled]);function v(){var M,T;h(),(T=(M=u.current).onSelect)==null||T.call(M,f.current)}function h(){p.setState("value",f.current,!0)}if(!m)return null;let{disabled:b,value:y,onSelect:w,forceMount:x,keywords:S,...C}=e;return c.createElement(L.div,{ref:Ln([a,t]),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!g,"data-disabled":!!b,"data-selected":!!g,onPointerMove:b||i.getDisablePointerSelection()?void 0:h,onClick:b?void 0:v},e.children)}),Q0=c.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=me(),i=c.useRef(null),u=c.useRef(null),d=me(),f=$n(),p=Vt(m=>o||f.filter()===!1?!0:m.search?m.filtered.groups.has(s):!0);zt(()=>f.group(s),[]),Hu(s,i,[e.value,e.heading,u]);let g=c.useMemo(()=>({id:s,forceMount:o}),[o]);return c.createElement(L.div,{ref:Ln([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),Pr(e,m=>c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},c.createElement(Wu.Provider,{value:g},m))))}),J0=c.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=c.useRef(null),a=Vt(s=>!s.search);return!n&&!a?null:c.createElement(L.div,{ref:Ln([o,t]),...r,"cmdk-separator":"",role:"separator"})}),eC=c.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=Na(),s=Vt(f=>f.search),i=Vt(f=>f.value),u=$n(),d=c.useMemo(()=>{var f;let p=(f=u.listInnerRef.current)==null?void 0:f.querySelector(`${Ca}[${Wt}="${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(L.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)}})}),tC=c.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=c.useRef(null),s=c.useRef(null),i=$n();return c.useEffect(()=>{if(s.current&&a.current){let u=s.current,d=a.current,f,p=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let g=u.offsetHeight;d.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(f),p.unobserve(u)}}},[]),c.createElement(L.div,{ref:Ln([a,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:i.listId},Pr(e,u=>c.createElement("div",{ref:Ln([s,i.listInnerRef]),"cmdk-list-sizer":""},u)))}),nC=c.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return c.createElement(Du,{open:n,onOpenChange:r},c.createElement(Au,{container:s},c.createElement(va,{"cmdk-overlay":"",className:o}),c.createElement(ba,{"aria-label":e.label,"cmdk-dialog":"",className:a},c.createElement(zu,{ref:t,...i}))))}),rC=c.forwardRef((e,t)=>Vt(n=>n.filtered.count===0)?c.createElement(L.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),oC=c.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return c.createElement(L.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Pr(e,s=>c.createElement("div",{"aria-hidden":!0},s)))}),ke=Object.assign(zu,{List:tC,Item:Z0,Input:eC,Group:Q0,Separator:J0,Dialog:nC,Empty:rC,Loading:oC});function aC(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function sC(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Vu(e){let t=c.useRef(e);return zt(()=>{t.current=e}),t}var zt=typeof window>"u"?c.useEffect:c.useLayoutEffect;function cn(e){let t=c.useRef();return t.current===void 0&&(t.current=e()),t}function Ln(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Vt(e){let t=Na(),n=()=>e(t.snapshot());return K0.useSyncExternalStore(t.subscribe,n,n)}function Hu(e,t,n,r=[]){let o=c.useRef(),a=$n();return zt(()=>{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(Wt,i),o.current=i}),o}var iC=()=>{let[e,t]=c.useState(),n=cn(()=>new Map);return zt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function lC(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Pr({asChild:e,children:t},n){return e&&c.isValidElement(t)?c.cloneElement(lC(t),{ref:t.ref},n(t.props.children)):n(t)}var cC={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Tr=Du,Gu=H0,Uu=Au,uC=Iu,Sa=c.forwardRef(({className:e,...t},n)=>l.jsx(va,{ref:n,className:A("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}));Sa.displayName=va.displayName;const Fn=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Uu,{children:[l.jsx(Sa,{}),l.jsxs(ba,{ref:r,className:A("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(Iu,{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(sr,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Fn.displayName=ba.displayName;const Mr=({className:e,...t})=>l.jsx("div",{className:A("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Mr.displayName="DialogHeader";const Yu=({className:e,...t})=>l.jsx("div",{className:A("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Yu.displayName="DialogFooter";const Rr=c.forwardRef(({className:e,...t},n)=>l.jsx(ju,{ref:n,className:A("text-lg font-semibold leading-none tracking-tight",e),...t}));Rr.displayName=ju.displayName;const Dr=c.forwardRef(({className:e,...t},n)=>l.jsx(ku,{ref:n,className:A("text-sm text-muted-foreground",e),...t}));Dr.displayName=ku.displayName;const Ar=c.forwardRef(({className:e,...t},n)=>l.jsx(ke,{ref:n,className:A("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Ar.displayName=ke.displayName;const dC=({children:e,...t})=>l.jsx(Tr,{...t,children:l.jsx(Fn,{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})})}),Pa=c.forwardRef(({className:e,...t},n)=>l.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[l.jsx(Li,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),l.jsx(ke.Input,{ref:n,className:A("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})]}));Pa.displayName=ke.Input.displayName;const Ta=c.forwardRef(({className:e,...t},n)=>l.jsx(ke.List,{ref:n,className:A("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Ta.displayName=ke.List.displayName;const Ma=c.forwardRef((e,t)=>l.jsx(ke.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ma.displayName=ke.Empty.displayName;const jr=c.forwardRef(({className:e,...t},n)=>l.jsx(ke.Group,{ref:n,className:A("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}));jr.displayName=ke.Group.displayName;const Ra=c.forwardRef(({className:e,...t},n)=>l.jsx(ke.Separator,{ref:n,className:A("-mx-1 h-px bg-border",e),...t}));Ra.displayName=ke.Separator.displayName;const un=c.forwardRef(({className:e,...t},n)=>l.jsx(ke.Item,{ref:n,className:A("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}));un.displayName=ke.Item.displayName;const Ku=({className:e,...t})=>l.jsx("span",{className:A("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Ku.displayName="CommandShortcut";const qu=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(""),g=h=>{const b=h.toFixed(2).split("."),y=b[0].replace(/\B(?=(\d{3})+(?!\d))/g,o);return`${n} ${y}${r}${b[1]}`},m=h=>{const b=h.target.value,y=parseFloat(b.replace(/\D/g,""))/100;p(g(y)),a(y),d.current&&window.requestAnimationFrame(()=>{var w;(w=d.current)==null||w.setSelectionRange(d.current.value.length,d.current.value.length)})},v=()=>{d.current&&d.current.setSelectionRange(d.current.value.length,d.current.value.length)};return P.useEffect(()=>{p(g(+i))},[i]),l.jsx(mr,{type:"text",inputMode:"numeric",value:f,ref:d,onChange:m,onFocus:v,onClick:v,placeholder:`${n} 0${r}00`,className:s,...u})});qu.displayName="CurrencyInput";const fC=["top","right","bottom","left"],St=Math.min,Oe=Math.max,kr=Math.round,Ir=Math.floor,tt=e=>({x:e,y:e}),mC={left:"right",right:"left",bottom:"top",top:"bottom"},pC={start:"end",end:"start"};function Da(e,t,n){return Oe(e,St(t,n))}function mt(e,t){return typeof e=="function"?e(t):e}function pt(e){return e.split("-")[0]}function dn(e){return e.split("-")[1]}function Aa(e){return e==="x"?"y":"x"}function ja(e){return e==="y"?"height":"width"}function Pt(e){return["top","bottom"].includes(pt(e))?"y":"x"}function ka(e){return Aa(Pt(e))}function hC(e,t,n){n===void 0&&(n=!1);const r=dn(e),o=ka(e),a=ja(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Or(s)),[s,Or(s)]}function gC(e){const t=Or(e);return[Ia(e),t,Ia(t)]}function Ia(e){return e.replace(/start|end/g,t=>pC[t])}function vC(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 bC(e,t,n,r){const o=dn(e);let a=vC(pt(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Ia)))),a}function Or(e){return e.replace(/left|right|bottom|top/g,t=>mC[t])}function yC(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xu(e){return typeof e!="number"?yC(e):{top:e,right:e,bottom:e,left:e}}function _r(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 Zu(e,t,n){let{reference:r,floating:o}=e;const a=Pt(t),s=ka(t),i=ja(s),u=pt(t),d=a==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,g=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(dn(t)){case"start":m[s]-=g*(n&&d?-1:1);break;case"end":m[s]+=g*(n&&d?-1:1);break}return m}const wC=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}=Zu(d,r,u),g=r,m={},v=0;for(let h=0;h<i.length;h++){const{name:b,fn:y}=i[h],{x:w,y:x,data:S,reset:C}=await y({x:f,y:p,initialPlacement:r,placement:g,strategy:o,middlewareData:m,rects:d,platform:s,elements:{reference:e,floating:t}});f=w??f,p=x??p,m={...m,[b]:{...m[b],...S}},C&&v<=50&&(v++,typeof C=="object"&&(C.placement&&(g=C.placement),C.rects&&(d=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:p}=Zu(d,g,u)),h=-1)}return{x:f,y:p,placement:g,strategy:o,middlewareData:m}};async function Bn(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:g=!1,padding:m=0}=mt(t,e),v=Xu(m),b=i[g?p==="floating"?"reference":"floating":p],y=_r(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)),S=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},C=_r(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:x,strategy:u}):w);return{top:(y.top-C.top+v.top)/S.y,bottom:(C.bottom-y.bottom+v.bottom)/S.y,left:(y.left-C.left+v.left)/S.x,right:(C.right-y.right+v.right)/S.x}}const xC=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}=mt(e,t)||{};if(d==null)return{};const p=Xu(f),g={x:n,y:r},m=ka(o),v=ja(m),h=await s.getDimensions(d),b=m==="y",y=b?"top":"left",w=b?"bottom":"right",x=b?"clientHeight":"clientWidth",S=a.reference[v]+a.reference[m]-g[m]-a.floating[v],C=g[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[v]);const D=S/2-C/2,k=T/2-h[v]/2-1,W=St(p[y],k),Y=St(p[w],k),O=W,K=T-h[v]-Y,H=T/2-h[v]/2+D,ee=Da(O,H,K),V=!u.arrow&&dn(o)!=null&&H!==ee&&a.reference[v]/2-(H<O?W:Y)-h[v]/2<0,q=V?H<O?H-O:H-K:0;return{[m]:g[m]+q,data:{[m]:ee,centerOffset:H-ee-q,...V&&{alignmentOffset:q}},reset:V}}}),CC=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:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...b}=mt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=pt(o),w=Pt(i),x=pt(i)===i,S=await(u.isRTL==null?void 0:u.isRTL(d.floating)),C=g||(x||!h?[Or(i)]:gC(i)),M=v!=="none";!g&&M&&C.push(...bC(i,h,v,S));const T=[i,...C],D=await Bn(t,b),k=[];let W=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&k.push(D[y]),p){const H=hC(o,s,S);k.push(D[H[0]],D[H[1]])}if(W=[...W,{placement:o,overflows:k}],!k.every(H=>H<=0)){var Y,O;const H=(((Y=a.flip)==null?void 0:Y.index)||0)+1,ee=T[H];if(ee)return{data:{index:H,overflows:W},reset:{placement:ee}};let V=(O=W.filter(q=>q.overflows[0]<=0).sort((q,G)=>q.overflows[1]-G.overflows[1])[0])==null?void 0:O.placement;if(!V)switch(m){case"bestFit":{var K;const q=(K=W.filter(G=>{if(M){const j=Pt(G.placement);return j===w||j==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(j=>j>0).reduce((j,Z)=>j+Z,0)]).sort((G,j)=>G[1]-j[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 Qu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ju(e){return fC.some(t=>e[t]>=0)}const EC=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=mt(e,t);switch(r){case"referenceHidden":{const a=await Bn(t,{...o,elementContext:"reference"}),s=Qu(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ju(s)}}}case"escaped":{const a=await Bn(t,{...o,altBoundary:!0}),s=Qu(a,n.floating);return{data:{escapedOffsets:s,escaped:Ju(s)}}}default:return{}}}}};async function NC(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=pt(n),i=dn(n),u=Pt(n)==="y",d=["left","top"].includes(s)?-1:1,f=a&&u?-1:1,p=mt(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof v=="number"&&(m=i==="end"?v*-1:v),u?{x:m*f,y:g*d}:{x:g*d,y:m*f}}const SC=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 NC(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}}}}},PC=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}=mt(e,t),d={x:n,y:r},f=await Bn(t,u),p=Pt(pt(o)),g=Aa(p);let m=d[g],v=d[p];if(a){const b=g==="y"?"top":"left",y=g==="y"?"bottom":"right",w=m+f[b],x=m-f[y];m=Da(w,m,x)}if(s){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=v+f[b],x=v-f[y];v=Da(w,v,x)}const h=i.fn({...t,[g]:m,[p]:v});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[g]:a,[p]:s}}}}}},TC=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}=mt(e,t),f={x:n,y:r},p=Pt(o),g=Aa(p);let m=f[g],v=f[p];const h=mt(i,t),b=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const x=g==="y"?"height":"width",S=a.reference[g]-a.floating[x]+b.mainAxis,C=a.reference[g]+a.reference[x]-b.mainAxis;m<S?m=S:m>C&&(m=C)}if(d){var y,w;const x=g==="y"?"width":"height",S=["top","left"].includes(pt(o)),C=a.reference[p]-a.floating[x]+(S&&((y=s.offset)==null?void 0:y[p])||0)+(S?0:b.crossAxis),M=a.reference[p]+a.reference[x]+(S?0:((w=s.offset)==null?void 0:w[p])||0)-(S?b.crossAxis:0);v<C?v=C:v>M&&(v=M)}return{[g]:m,[p]:v}}}},MC=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}=mt(e,t),f=await Bn(t,d),p=pt(o),g=dn(o),m=Pt(o)==="y",{width:v,height:h}=a.floating;let b,y;p==="top"||p==="bottom"?(b=p,y=g===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=p,b=g==="end"?"top":"bottom");const w=h-f.top-f.bottom,x=v-f.left-f.right,S=St(h-f[b],w),C=St(v-f[y],x),M=!t.middlewareData.shift;let T=S,D=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=w),M&&!g){const W=Oe(f.left,0),Y=Oe(f.right,0),O=Oe(f.top,0),K=Oe(f.bottom,0);m?D=v-2*(W!==0||Y!==0?W+Y:Oe(f.left,f.right)):T=h-2*(O!==0||K!==0?O+K:Oe(f.top,f.bottom))}await u({...t,availableWidth:D,availableHeight:T});const k=await s.getDimensions(i.floating);return v!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function $r(){return typeof window<"u"}function fn(e){return ed(e)?(e.nodeName||"").toLowerCase():"#document"}function _e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nt(e){var t;return(t=(ed(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ed(e){return $r()?e instanceof Node||e instanceof _e(e).Node:!1}function Ue(e){return $r()?e instanceof Element||e instanceof _e(e).Element:!1}function rt(e){return $r()?e instanceof HTMLElement||e instanceof _e(e).HTMLElement:!1}function td(e){return!$r()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _e(e).ShadowRoot}function Wn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ye(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function RC(e){return["table","td","th"].includes(fn(e))}function Lr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Oa(e){const t=_a(),n=Ue(e)?Ye(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 DC(e){let t=Tt(e);for(;rt(t)&&!mn(t);){if(Oa(t))return t;if(Lr(t))return null;t=Tt(t)}return null}function _a(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function mn(e){return["html","body","#document"].includes(fn(e))}function Ye(e){return _e(e).getComputedStyle(e)}function Fr(e){return Ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tt(e){if(fn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||td(e)&&e.host||nt(e);return td(t)?t.host:t}function nd(e){const t=Tt(e);return mn(t)?e.ownerDocument?e.ownerDocument.body:e.body:rt(t)&&Wn(t)?t:nd(t)}function zn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=nd(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=_e(o);if(a){const i=$a(s);return t.concat(s,s.visualViewport||[],Wn(o)?o:[],i&&n?zn(i):[])}return t.concat(o,zn(o,[],n))}function $a(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rd(e){const t=Ye(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=rt(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 La(e){return Ue(e)?e:e.contextElement}function pn(e){const t=La(e);if(!rt(t))return tt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=rd(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 AC=tt(0);function od(e){const t=_e(e);return!_a()||!t.visualViewport?AC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jC(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==_e(e)?!1:t}function Ht(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=La(e);let s=tt(1);t&&(r?Ue(r)&&(s=pn(r)):s=pn(e));const i=jC(a,n,r)?od(a):tt(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 g=_e(a),m=r&&Ue(r)?_e(r):r;let v=g,h=$a(v);for(;h&&r&&m!==v;){const b=pn(h),y=h.getBoundingClientRect(),w=Ye(h),x=y.left+(h.clientLeft+parseFloat(w.paddingLeft))*b.x,S=y.top+(h.clientTop+parseFloat(w.paddingTop))*b.y;u*=b.x,d*=b.y,f*=b.x,p*=b.y,u+=x,d+=S,v=_e(h),h=$a(v)}}return _r({width:f,height:p,x:u,y:d})}function Fa(e,t){const n=Fr(e).scrollLeft;return t?t.left+n:Ht(nt(e)).left+n}function ad(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Fa(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function kC(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=nt(r),i=t?Lr(t.floating):!1;if(r===s||i&&a)return n;let u={scrollLeft:0,scrollTop:0},d=tt(1);const f=tt(0),p=rt(r);if((p||!p&&!a)&&((fn(r)!=="body"||Wn(s))&&(u=Fr(r)),rt(r))){const m=Ht(r);d=pn(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const g=s&&!p&&!a?ad(s,u,!0):tt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+f.x+g.x,y:n.y*d.y-u.scrollTop*d.y+f.y+g.y}}function IC(e){return Array.from(e.getClientRects())}function OC(e){const t=nt(e),n=Fr(e),r=e.ownerDocument.body,o=Oe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Oe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Fa(e);const i=-n.scrollTop;return Ye(r).direction==="rtl"&&(s+=Oe(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}function _C(e,t){const n=_e(e),r=nt(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=_a();(!d||d&&t==="fixed")&&(i=o.offsetLeft,u=o.offsetTop)}return{width:a,height:s,x:i,y:u}}function $C(e,t){const n=Ht(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=rt(e)?pn(e):tt(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 sd(e,t,n){let r;if(t==="viewport")r=_C(e,n);else if(t==="document")r=OC(nt(e));else if(Ue(t))r=$C(t,n);else{const o=od(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return _r(r)}function id(e,t){const n=Tt(e);return n===t||!Ue(n)||mn(n)?!1:Ye(n).position==="fixed"||id(n,t)}function LC(e,t){const n=t.get(e);if(n)return n;let r=zn(e,[],!1).filter(i=>Ue(i)&&fn(i)!=="body"),o=null;const a=Ye(e).position==="fixed";let s=a?Tt(e):e;for(;Ue(s)&&!mn(s);){const i=Ye(s),u=Oa(s);!u&&i.position==="fixed"&&(o=null),(a?!u&&!o:!u&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Wn(s)&&!u&&id(e,s))?r=r.filter(f=>f!==s):o=i,s=Tt(s)}return t.set(e,r),r}function FC(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Lr(t)?[]:LC(t,this._c):[].concat(n),r],i=s[0],u=s.reduce((d,f)=>{const p=sd(t,f,o);return d.top=Oe(p.top,d.top),d.right=St(p.right,d.right),d.bottom=St(p.bottom,d.bottom),d.left=Oe(p.left,d.left),d},sd(t,i,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function BC(e){const{width:t,height:n}=rd(e);return{width:t,height:n}}function WC(e,t,n){const r=rt(t),o=nt(t),a=n==="fixed",s=Ht(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const u=tt(0);if(r||!r&&!a)if((fn(t)!=="body"||Wn(o))&&(i=Fr(t)),r){const g=Ht(t,!0,a,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else o&&(u.x=Fa(o));const d=o&&!r&&!a?ad(o,i):tt(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 Ba(e){return Ye(e).position==="static"}function ld(e,t){if(!rt(e)||Ye(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return nt(e)===n&&(n=n.ownerDocument.body),n}function cd(e,t){const n=_e(e);if(Lr(e))return n;if(!rt(e)){let o=Tt(e);for(;o&&!mn(o);){if(Ue(o)&&!Ba(o))return o;o=Tt(o)}return n}let r=ld(e,t);for(;r&&RC(r)&&Ba(r);)r=ld(r,t);return r&&mn(r)&&Ba(r)&&!Oa(r)?n:r||DC(e)||n}const zC=async function(e){const t=this.getOffsetParent||cd,n=this.getDimensions,r=await n(e.floating);return{reference:WC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function VC(e){return Ye(e).direction==="rtl"}const HC={convertOffsetParentRelativeRectToViewportRelativeRect:kC,getDocumentElement:nt,getClippingRect:FC,getOffsetParent:cd,getElementRects:zC,getClientRects:IC,getDimensions:BC,getScale:pn,isElement:Ue,isRTL:VC};function GC(e,t){let n=null,r;const o=nt(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:g}=e.getBoundingClientRect();if(i||t(),!p||!g)return;const m=Ir(f),v=Ir(o.clientWidth-(d+p)),h=Ir(o.clientHeight-(f+g)),b=Ir(d),w={rootMargin:-m+"px "+-v+"px "+-h+"px "+-b+"px",threshold:Oe(0,St(1,u))||1};let x=!0;function S(C){const M=C[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(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return s(!0),a}function UC(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=La(e),f=o||a?[...d?zn(d):[],...zn(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const p=d&&i?GC(d,n):null;let g=-1,m=null;s&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),n()}),d&&!u&&m.observe(d),m.observe(t));let v,h=u?Ht(e):null;u&&b();function b(){const y=Ht(e);h&&(y.x!==h.x||y.y!==h.y||y.width!==h.width||y.height!==h.height)&&n(),h=y,v=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(v)}}const YC=SC,KC=PC,qC=CC,XC=MC,ZC=EC,ud=xC,QC=TC,JC=(e,t,n)=>{const r=new Map,o={platform:HC,...n},a={...o.platform,_c:r};return wC(e,t,{...o,platform:a})};var Br=typeof document<"u"?P.useLayoutEffect:P.useEffect;function Wr(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(!Wr(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)&&!Wr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function dd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fd(e,t){const n=dd(e);return Math.round(t*n)/n}function Wa(e){const t=c.useRef(e);return Br(()=>{t.current=e}),t}function e1(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}),[g,m]=c.useState(r);Wr(g,r)||m(r);const[v,h]=c.useState(null),[b,y]=c.useState(null),w=c.useCallback(G=>{G!==M.current&&(M.current=G,h(G))},[]),x=c.useCallback(G=>{G!==T.current&&(T.current=G,y(G))},[]),S=a||v,C=s||b,M=c.useRef(null),T=c.useRef(null),D=c.useRef(f),k=u!=null,W=Wa(u),Y=Wa(o),O=Wa(d),K=c.useCallback(()=>{if(!M.current||!T.current)return;const G={placement:t,strategy:n,middleware:g};Y.current&&(G.platform=Y.current),JC(M.current,T.current,G).then(j=>{const Z={...j,isPositioned:O.current!==!1};H.current&&!Wr(D.current,Z)&&(D.current=Z,Nn.flushSync(()=>{p(Z)}))})},[g,t,n,Y,O]);Br(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p(G=>({...G,isPositioned:!1})))},[d]);const H=c.useRef(!1);Br(()=>(H.current=!0,()=>{H.current=!1}),[]),Br(()=>{if(S&&(M.current=S),C&&(T.current=C),S&&C){if(W.current)return W.current(S,C,K);K()}},[S,C,K,W,k]);const ee=c.useMemo(()=>({reference:M,floating:T,setReference:w,setFloating:x}),[w,x]),V=c.useMemo(()=>({reference:S,floating:C}),[S,C]),q=c.useMemo(()=>{const G={position:n,left:0,top:0};if(!V.floating)return G;const j=fd(V.floating,f.x),Z=fd(V.floating,f.y);return i?{...G,transform:"translate("+j+"px, "+Z+"px)",...dd(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:Z}},[n,i,V.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:K,refs:ee,elements:V,floatingStyles:q}),[f,K,ee,V,q])}const t1=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?ud({element:r.current,padding:o}).fn(n):{}:r?ud({element:r,padding:o}).fn(n):{}}}},n1=(e,t)=>({...YC(e),options:[e,t]}),r1=(e,t)=>({...KC(e),options:[e,t]}),o1=(e,t)=>({...QC(e),options:[e,t]}),a1=(e,t)=>({...qC(e),options:[e,t]}),s1=(e,t)=>({...XC(e),options:[e,t]}),i1=(e,t)=>({...ZC(e),options:[e,t]}),l1=(e,t)=>({...t1(e),options:[e,t]});var c1="Arrow",md=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return l.jsx(L.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"})})});md.displayName=c1;var u1=md,za="Popper",[pd,Mt]=ye(za),[d1,hd]=pd(za),gd=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return l.jsx(d1,{scope:t,anchor:r,onAnchorChange:o,children:n})};gd.displayName=za;var vd="PopperAnchor",bd=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=hd(vd,n),s=c.useRef(null),i=J(t,s);return c.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:l.jsx(L.div,{...o,ref:i})});bd.displayName=vd;var Va="PopperContent",[f1,m1]=pd(Va),yd=c.forwardRef((e,t)=>{var _,Q,ne,re,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:g=!1,updatePositionStrategy:m="optimized",onPlaced:v,...h}=e,b=hd(Va,n),[y,w]=c.useState(null),x=J(t,Se=>w(Se)),[S,C]=c.useState(null),M=Er(S),T=(M==null?void 0:M.width)??0,D=(M==null?void 0:M.height)??0,k=r+(a!=="center"?"-"+a:""),W=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},Y=Array.isArray(d)?d:[d],O=Y.length>0,K={padding:W,boundary:Y.filter(h1),altBoundary:O},{refs:H,floatingStyles:ee,placement:V,isPositioned:q,middlewareData:G}=e1({strategy:"fixed",placement:k,whileElementsMounted:(...Se)=>UC(...Se,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[n1({mainAxis:o+D,alignmentAxis:s}),u&&r1({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?o1():void 0,...K}),u&&a1({...K}),s1({...K,apply:({elements:Se,rects:xe,availableWidth:Re,availableHeight:We})=>{const{width:Pe,height:Le}=xe.reference,De=Se.floating.style;De.setProperty("--radix-popper-available-width",`${Re}px`),De.setProperty("--radix-popper-available-height",`${We}px`),De.setProperty("--radix-popper-anchor-width",`${Pe}px`),De.setProperty("--radix-popper-anchor-height",`${Le}px`)}}),S&&l1({element:S,padding:i}),g1({arrowWidth:T,arrowHeight:D}),g&&i1({strategy:"referenceHidden",...K})]}),[j,Z]=Cd(V),te=he(v);we(()=>{q&&(te==null||te())},[q,te]);const R=(_=G.arrow)==null?void 0:_.x,$=(Q=G.arrow)==null?void 0:Q.y,F=((ne=G.arrow)==null?void 0:ne.centerOffset)!==0,[B,X]=c.useState();return we(()=>{y&&X(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:q?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B,"--radix-popper-transform-origin":[(re=G.transformOrigin)==null?void 0:re.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(f1,{scope:n,placedSide:j,onArrowChange:C,arrowX:R,arrowY:$,shouldHideArrow:F,children:l.jsx(L.div,{"data-side":j,"data-align":Z,...h,ref:x,style:{...h.style,animation:q?void 0:"none"}})})})});yd.displayName=Va;var wd="PopperArrow",p1={top:"bottom",right:"left",bottom:"top",left:"right"},xd=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=m1(wd,r),s=p1[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(u1,{...o,ref:n,style:{...o.style,display:"block"}})})});xd.displayName=wd;function h1(e){return e!==null}var g1=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]=Cd(n),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+i/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let v="",h="";return d==="bottom"?(v=s?p:`${g}px`,h=`${-u}px`):d==="top"?(v=s?p:`${g}px`,h=`${r.floating.height+u}px`):d==="right"?(v=`${-u}px`,h=s?p:`${m}px`):d==="left"&&(v=`${r.floating.width+u}px`,h=s?p:`${m}px`),{data:{x:v,y:h}}}});function Cd(e){const[t,n="center"]=e.split("-");return[t,n]}var Vn=gd,Hn=bd,zr=yd,Vr=xd,Ha="rovingFocusGroup.onEntryFocus",v1={bubbles:!1,cancelable:!0},Hr="RovingFocusGroup",[Ga,Ed,b1]=tn(Hr),[y1,Rt]=ye(Hr,[b1]),[w1,x1]=y1(Hr),Nd=c.forwardRef((e,t)=>l.jsx(Ga.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ga.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(C1,{...e,ref:t})})}));Nd.displayName=Hr;var C1=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,g=c.useRef(null),m=J(t,g),v=xt(a),[h=null,b]=Ee({prop:s,defaultProp:i,onChange:u}),[y,w]=c.useState(!1),x=he(d),S=Ed(n),C=c.useRef(!1),[M,T]=c.useState(0);return c.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(Ha,x),()=>D.removeEventListener(Ha,x)},[x]),l.jsx(w1,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:h,onItemFocus:c.useCallback(D=>b(D),[b]),onItemShiftTab:c.useCallback(()=>w(!0),[]),onFocusableItemAdd:c.useCallback(()=>T(D=>D+1),[]),onFocusableItemRemove:c.useCallback(()=>T(D=>D-1),[]),children:l.jsx(L.div,{tabIndex:y||M===0?-1:0,"data-orientation":r,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{C.current=!0}),onFocus:I(e.onFocus,D=>{const k=!C.current;if(D.target===D.currentTarget&&k&&!y){const W=new CustomEvent(Ha,v1);if(D.currentTarget.dispatchEvent(W),!W.defaultPrevented){const Y=S().filter(V=>V.focusable),O=Y.find(V=>V.active),K=Y.find(V=>V.id===h),ee=[O,K,...Y].filter(Boolean).map(V=>V.ref.current);Td(ee,f)}}C.current=!1}),onBlur:I(e.onBlur,()=>w(!1))})})}),Sd="RovingFocusGroupItem",Pd=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...s}=e,i=me(),u=a||i,d=x1(Sd,n),f=d.currentTabStopId===u,p=Ed(n),{onFocusableItemAdd:g,onFocusableItemRemove:m}=d;return c.useEffect(()=>{if(r)return g(),()=>m()},[r,g,m]),l.jsx(Ga.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:l.jsx(L.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:I(e.onMouseDown,v=>{r?d.onItemFocus(u):v.preventDefault()}),onFocus:I(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:I(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const h=S1(v,d.orientation,d.dir);if(h!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let y=p().filter(w=>w.focusable).map(w=>w.ref.current);if(h==="last")y.reverse();else if(h==="prev"||h==="next"){h==="prev"&&y.reverse();const w=y.indexOf(v.currentTarget);y=d.loop?P1(y,w+1):y.slice(w+1)}setTimeout(()=>Td(y))}})})})});Pd.displayName=Sd;var E1={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function N1(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function S1(e,t,n){const r=N1(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return E1[r]}function Td(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function P1(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Gr=Nd,Ur=Pd,Ua=["Enter"," "],T1=["ArrowDown","PageUp","Home"],Md=["ArrowUp","PageDown","End"],M1=[...T1,...Md],R1={ltr:[...Ua,"ArrowRight"],rtl:[...Ua,"ArrowLeft"]},D1={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Gn="Menu",[Un,A1,j1]=tn(Gn),[Gt,Rd]=ye(Gn,[j1,Mt,Rt]),Yn=Mt(),Dd=Rt(),[Ad,Dt]=Gt(Gn),[k1,Kn]=Gt(Gn),jd=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=Yn(t),[u,d]=c.useState(null),f=c.useRef(!1),p=he(a),g=xt(o);return c.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),l.jsx(Vn,{...i,children:l.jsx(Ad,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:d,children:l.jsx(k1,{scope:t,onClose:c.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:g,modal:s,children:r})})})};jd.displayName=Gn;var I1="MenuAnchor",Ya=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Yn(n);return l.jsx(Hn,{...o,...r,ref:t})});Ya.displayName=I1;var Ka="MenuPortal",[O1,kd]=Gt(Ka,{forceMount:void 0}),Id=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Dt(Ka,t);return l.jsx(O1,{scope:t,forceMount:n,children:l.jsx(be,{present:n||a.open,children:l.jsx(jn,{asChild:!0,container:o,children:r})})})};Id.displayName=Ka;var Fe="MenuContent",[_1,qa]=Gt(Fe),Od=c.forwardRef((e,t)=>{const n=kd(Fe,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Dt(Fe,e.__scopeMenu),s=Kn(Fe,e.__scopeMenu);return l.jsx(Un.Provider,{scope:e.__scopeMenu,children:l.jsx(be,{present:r||a.open,children:l.jsx(Un.Slot,{scope:e.__scopeMenu,children:s.modal?l.jsx($1,{...o,ref:t}):l.jsx(L1,{...o,ref:t})})})})}),$1=c.forwardRef((e,t)=>{const n=Dt(Fe,e.__scopeMenu),r=c.useRef(null),o=J(t,r);return c.useEffect(()=>{const a=r.current;if(a)return In(a)},[]),l.jsx(Xa,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:I(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),L1=c.forwardRef((e,t)=>{const n=Dt(Fe,e.__scopeMenu);return l.jsx(Xa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Xa=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:g,onDismiss:m,disableOutsideScroll:v,...h}=e,b=Dt(Fe,n),y=Kn(Fe,n),w=Yn(n),x=Dd(n),S=A1(n),[C,M]=c.useState(null),T=c.useRef(null),D=J(t,T,b.onContentChange),k=c.useRef(0),W=c.useRef(""),Y=c.useRef(0),O=c.useRef(null),K=c.useRef("right"),H=c.useRef(0),ee=v?an:c.Fragment,V=v?{as:ct,allowPinchZoom:!0}:void 0,q=j=>{var _,Q;const Z=W.current+j,te=S().filter(ne=>!ne.disabled),R=document.activeElement,$=(_=te.find(ne=>ne.ref.current===R))==null?void 0:_.textValue,F=te.map(ne=>ne.textValue),B=X1(F,Z,$),X=(Q=te.find(ne=>ne.textValue===B))==null?void 0:Q.ref.current;(function ne(re){W.current=re,window.clearTimeout(k.current),re!==""&&(k.current=window.setTimeout(()=>ne(""),1e3))})(Z),X&&setTimeout(()=>X.focus())};c.useEffect(()=>()=>window.clearTimeout(k.current),[]),kn();const G=c.useCallback(j=>{var te,R;return K.current===((te=O.current)==null?void 0:te.side)&&Q1(j,(R=O.current)==null?void 0:R.area)},[]);return l.jsx(_1,{scope:n,searchRef:W,onItemEnter:c.useCallback(j=>{G(j)&&j.preventDefault()},[G]),onItemLeave:c.useCallback(j=>{var Z;G(j)||((Z=T.current)==null||Z.focus(),M(null))},[G]),onTriggerLeave:c.useCallback(j=>{G(j)&&j.preventDefault()},[G]),pointerGraceTimerRef:Y,onPointerGraceIntentChange:c.useCallback(j=>{O.current=j},[]),children:l.jsx(ee,{...V,children:l.jsx(An,{asChild:!0,trapped:o,onMountAutoFocus:I(a,j=>{var Z;j.preventDefault(),(Z=T.current)==null||Z.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:l.jsx(Lt,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,children:l.jsx(Gr,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:M,onEntryFocus:I(u,j=>{y.isUsingKeyboardRef.current||j.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(zr,{role:"menu","aria-orientation":"vertical","data-state":Jd(b.open),"data-radix-menu-content":"",dir:y.dir,...w,...h,ref:D,style:{outline:"none",...h.style},onKeyDown:I(h.onKeyDown,j=>{const te=j.target.closest("[data-radix-menu-content]")===j.currentTarget,R=j.ctrlKey||j.altKey||j.metaKey,$=j.key.length===1;te&&(j.key==="Tab"&&j.preventDefault(),!R&&$&&q(j.key));const F=T.current;if(j.target!==F||!M1.includes(j.key))return;j.preventDefault();const X=S().filter(_=>!_.disabled).map(_=>_.ref.current);Md.includes(j.key)&&X.reverse(),K1(X)}),onBlur:I(e.onBlur,j=>{j.currentTarget.contains(j.target)||(window.clearTimeout(k.current),W.current="")}),onPointerMove:I(e.onPointerMove,Xn(j=>{const Z=j.target,te=H.current!==j.clientX;if(j.currentTarget.contains(Z)&&te){const R=j.clientX>H.current?"right":"left";K.current=R,H.current=j.clientX}}))})})})})})})});Od.displayName=Fe;var F1="MenuGroup",Za=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(L.div,{role:"group",...r,ref:t})});Za.displayName=F1;var B1="MenuLabel",_d=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(L.div,{...r,ref:t})});_d.displayName=B1;var Yr="MenuItem",$d="menu.itemSelect",Kr=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=c.useRef(null),s=Kn(Yr,e.__scopeMenu),i=qa(Yr,e.__scopeMenu),u=J(t,a),d=c.useRef(!1),f=()=>{const p=a.current;if(!n&&p){const g=new CustomEvent($d,{bubbles:!0,cancelable:!0});p.addEventListener($d,m=>r==null?void 0:r(m),{once:!0}),ir(p,g),g.defaultPrevented?d.current=!1:s.onClose()}};return l.jsx(Ld,{...o,ref:u,disabled:n,onClick:I(e.onClick,f),onPointerDown:p=>{var g;(g=e.onPointerDown)==null||g.call(e,p),d.current=!0},onPointerUp:I(e.onPointerUp,p=>{var g;d.current||(g=p.currentTarget)==null||g.click()}),onKeyDown:I(e.onKeyDown,p=>{const g=i.searchRef.current!=="";n||g&&p.key===" "||Ua.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Kr.displayName=Yr;var Ld=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=qa(Yr,n),i=Dd(n),u=c.useRef(null),d=J(t,u),[f,p]=c.useState(!1),[g,m]=c.useState("");return c.useEffect(()=>{const v=u.current;v&&m((v.textContent??"").trim())},[a.children]),l.jsx(Un.ItemSlot,{scope:n,disabled:r,textValue:o??g,children:l.jsx(Ur,{asChild:!0,...i,focusable:!r,children:l.jsx(L.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:I(e.onPointerMove,Xn(v=>{r?s.onItemLeave(v):(s.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:I(e.onPointerLeave,Xn(v=>s.onItemLeave(v))),onFocus:I(e.onFocus,()=>p(!0)),onBlur:I(e.onBlur,()=>p(!1))})})})}),W1="MenuCheckboxItem",Fd=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return l.jsx(Hd,{scope:e.__scopeMenu,checked:n,children:l.jsx(Kr,{role:"menuitemcheckbox","aria-checked":qr(n)?"mixed":n,...o,ref:t,"data-state":es(n),onSelect:I(o.onSelect,()=>r==null?void 0:r(qr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Fd.displayName=W1;var Bd="MenuRadioGroup",[z1,V1]=Gt(Bd,{value:void 0,onValueChange:()=>{}}),Wd=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=he(r);return l.jsx(z1,{scope:e.__scopeMenu,value:n,onValueChange:a,children:l.jsx(Za,{...o,ref:t})})});Wd.displayName=Bd;var zd="MenuRadioItem",Vd=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=V1(zd,e.__scopeMenu),a=n===o.value;return l.jsx(Hd,{scope:e.__scopeMenu,checked:a,children:l.jsx(Kr,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":es(a),onSelect:I(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Vd.displayName=zd;var Qa="MenuItemIndicator",[Hd,H1]=Gt(Qa,{checked:!1}),Gd=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=H1(Qa,n);return l.jsx(be,{present:r||qr(a.checked)||a.checked===!0,children:l.jsx(L.span,{...o,ref:t,"data-state":es(a.checked)})})});Gd.displayName=Qa;var G1="MenuSeparator",Ud=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(L.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ud.displayName=G1;var U1="MenuArrow",Yd=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Yn(n);return l.jsx(Vr,{...o,...r,ref:t})});Yd.displayName=U1;var Ja="MenuSub",[Y1,Kd]=Gt(Ja),qd=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Dt(Ja,t),s=Yn(t),[i,u]=c.useState(null),[d,f]=c.useState(null),p=he(o);return c.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),l.jsx(Vn,{...s,children:l.jsx(Ad,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:f,children:l.jsx(Y1,{scope:t,contentId:me(),triggerId:me(),trigger:i,onTriggerChange:u,children:n})})})};qd.displayName=Ja;var qn="MenuSubTrigger",Xd=c.forwardRef((e,t)=>{const n=Dt(qn,e.__scopeMenu),r=Kn(qn,e.__scopeMenu),o=Kd(qn,e.__scopeMenu),a=qa(qn,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(Ya,{asChild:!0,...d,children:l.jsx(Ld,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Jd(n.open),...e,ref:en(t,o.onTriggerChange),onClick:p=>{var g;(g=e.onClick)==null||g.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:I(e.onPointerMove,Xn(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:I(e.onPointerLeave,Xn(p=>{var m,v;f();const g=(m=n.content)==null?void 0:m.getBoundingClientRect();if(g){const h=(v=n.content)==null?void 0:v.dataset.side,b=h==="right",y=b?-5:5,w=g[b?"left":"right"],x=g[b?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+y,y:p.clientY},{x:w,y:g.top},{x,y:g.top},{x,y:g.bottom},{x:w,y:g.bottom}],side:h}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:I(e.onKeyDown,p=>{var m;const g=a.searchRef.current!=="";e.disabled||g&&p.key===" "||R1[r.dir].includes(p.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),p.preventDefault())})})})});Xd.displayName=qn;var Zd="MenuSubContent",Qd=c.forwardRef((e,t)=>{const n=kd(Fe,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Dt(Fe,e.__scopeMenu),s=Kn(Fe,e.__scopeMenu),i=Kd(Zd,e.__scopeMenu),u=c.useRef(null),d=J(t,u);return l.jsx(Un.Provider,{scope:e.__scopeMenu,children:l.jsx(be,{present:r||a.open,children:l.jsx(Un.Slot,{scope:e.__scopeMenu,children:l.jsx(Xa,{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:I(e.onFocusOutside,f=>{f.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:I(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:I(e.onKeyDown,f=>{var m;const p=f.currentTarget.contains(f.target),g=D1[s.dir].includes(f.key);p&&g&&(a.onOpenChange(!1),(m=i.trigger)==null||m.focus(),f.preventDefault())})})})})})});Qd.displayName=Zd;function Jd(e){return e?"open":"closed"}function qr(e){return e==="indeterminate"}function es(e){return qr(e)?"indeterminate":e?"checked":"unchecked"}function K1(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function q1(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function X1(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=q1(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 Z1(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 Q1(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Z1(n,t)}function Xn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var J1=jd,eE=Ya,tE=Id,nE=Od,rE=Za,oE=_d,aE=Kr,sE=Fd,iE=Wd,lE=Vd,cE=Gd,uE=Ud,dE=Yd,fE=qd,mE=Xd,pE=Qd,ts="DropdownMenu",[hE,jT]=ye(ts,[Rd]),Me=Rd(),[gE,ef]=hE(ts),tf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,u=Me(t),d=c.useRef(null),[f=!1,p]=Ee({prop:o,defaultProp:a,onChange:s});return l.jsx(gE,{scope:t,triggerId:me(),triggerRef:d,contentId:me(),open:f,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(g=>!g),[p]),modal:i,children:l.jsx(J1,{...u,open:f,onOpenChange:p,dir:r,modal:i,children:n})})};tf.displayName=ts;var nf="DropdownMenuTrigger",rf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=ef(nf,n),s=Me(n);return l.jsx(eE,{asChild:!0,...s,children:l.jsx(L.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:en(t,a.triggerRef),onPointerDown:I(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:I(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});rf.displayName=nf;var vE="DropdownMenuPortal",of=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Me(t);return l.jsx(tE,{...r,...n})};of.displayName=vE;var af="DropdownMenuContent",sf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ef(af,n),a=Me(n),s=c.useRef(!1);return l.jsx(nE,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:I(e.onCloseAutoFocus,i=>{var u;s.current||(u=o.triggerRef.current)==null||u.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:I(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)"}})});sf.displayName=af;var bE="DropdownMenuGroup",lf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Me(n);return l.jsx(rE,{...o,...r,ref:t})});lf.displayName=bE;var yE="DropdownMenuLabel",cf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Me(n);return l.jsx(oE,{...o,...r,ref:t})});cf.displayName=yE;var wE="DropdownMenuItem",uf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Me(n);return l.jsx(aE,{...o,...r,ref:t})});uf.displayName=wE;var xE="DropdownMenuCheckboxItem",df=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Me(n);return l.jsx(sE,{...o,...r,ref:t})});df.displayName=xE;var CE="DropdownMenuRadioGroup",ff=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Me(n);return l.jsx(iE,{...o,...r,ref:t})});ff.displayName=CE;var EE="DropdownMenuRadioItem",mf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Me(n);return l.jsx(lE,{...o,...r,ref:t})});mf.displayName=EE;var NE="DropdownMenuItemIndicator",pf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Me(n);return l.jsx(cE,{...o,...r,ref:t})});pf.displayName=NE;var SE="DropdownMenuSeparator",hf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Me(n);return l.jsx(uE,{...o,...r,ref:t})});hf.displayName=SE;var PE="DropdownMenuArrow",TE=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Me(n);return l.jsx(dE,{...o,...r,ref:t})});TE.displayName=PE;var ME=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Me(t),[i=!1,u]=Ee({prop:r,defaultProp:a,onChange:o});return l.jsx(fE,{...s,open:i,onOpenChange:u,children:n})},RE="DropdownMenuSubTrigger",gf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Me(n);return l.jsx(mE,{...o,...r,ref:t})});gf.displayName=RE;var DE="DropdownMenuSubContent",vf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Me(n);return l.jsx(pE,{...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)"}})});vf.displayName=DE;var AE=tf,jE=rf,bf=of,yf=sf,kE=lf,wf=cf,xf=uf,Cf=df,IE=ff,Ef=mf,Nf=pf,Sf=hf,OE=ME,Pf=gf,Tf=vf;const _E=AE,$E=jE,LE=kE,FE=bf,BE=OE,WE=IE,Mf=c.forwardRef(({className:e,inset:t,children:n,...r},o)=>l.jsxs(Pf,{ref:o,className:A("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(ar,{className:"ml-auto"})]}));Mf.displayName=Pf.displayName;const Rf=c.forwardRef(({className:e,...t},n)=>l.jsx(Tf,{ref:n,className:A("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}));Rf.displayName=Tf.displayName;const Df=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(bf,{children:l.jsx(yf,{ref:r,sideOffset:t,className:A("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})}));Df.displayName=yf.displayName;const Af=c.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(xf,{ref:r,className:A("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}));Af.displayName=xf.displayName;const jf=c.forwardRef(({className:e,children:t,checked:n,...r},o)=>l.jsxs(Cf,{ref:o,className:A("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(Nf,{children:l.jsx(Dn,{className:"h-4 w-4"})})}),t]}));jf.displayName=Cf.displayName;const kf=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Ef,{ref:r,className:A("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(Nf,{children:l.jsx($i,{className:"h-2 w-2 fill-current"})})}),t]}));kf.displayName=Ef.displayName;const If=c.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(wf,{ref:r,className:A("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));If.displayName=wf.displayName;const Of=c.forwardRef(({className:e,...t},n)=>l.jsx(Sf,{ref:n,className:A("-mx-1 my-1 h-px bg-muted",e),...t}));Of.displayName=Sf.displayName;const _f=({className:e,...t})=>l.jsx("span",{className:A("ml-auto text-xs tracking-widest opacity-60",e),...t});_f.displayName="DropdownMenuShortcut";var zE="Label",$f=c.forwardRef((e,t)=>l.jsx(L.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())}}));$f.displayName=zE;var Lf=$f;const VE=$t("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ff=c.forwardRef(({className:e,...t},n)=>l.jsx(Lf,{ref:n,className:A(VE(),e),...t}));Ff.displayName=Lf.displayName;var ns="Popover",[Bf,kT]=ye(ns,[Mt]),Zn=Mt(),[HE,At]=Bf(ns),Wf=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,g]=Ee({prop:r,defaultProp:o,onChange:a});return l.jsx(Vn,{...i,children:l.jsx(HE,{scope:t,contentId:me(),triggerRef:u,open:p,onOpenChange:g,onOpenToggle:c.useCallback(()=>g(m=>!m),[g]),hasCustomAnchor:d,onCustomAnchorAdd:c.useCallback(()=>f(!0),[]),onCustomAnchorRemove:c.useCallback(()=>f(!1),[]),modal:s,children:n})})};Wf.displayName=ns;var zf="PopoverAnchor",Vf=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=At(zf,n),a=Zn(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return c.useEffect(()=>(s(),()=>i()),[s,i]),l.jsx(Hn,{...a,...r,ref:t})});Vf.displayName=zf;var Hf="PopoverTrigger",Gf=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=At(Hf,n),a=Zn(n),s=J(t,o.triggerRef),i=l.jsx(L.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xf(o.open),...r,ref:s,onClick:I(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(Hn,{asChild:!0,...a,children:i})});Gf.displayName=Hf;var rs="PopoverPortal",[GE,UE]=Bf(rs,{forceMount:void 0}),Uf=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=At(rs,t);return l.jsx(GE,{scope:t,forceMount:n,children:l.jsx(be,{present:n||a.open,children:l.jsx(jn,{asChild:!0,container:o,children:r})})})};Uf.displayName=rs;var hn="PopoverContent",Yf=c.forwardRef((e,t)=>{const n=UE(hn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=At(hn,e.__scopePopover);return l.jsx(be,{present:r||a.open,children:a.modal?l.jsx(YE,{...o,ref:t}):l.jsx(KE,{...o,ref:t})})});Yf.displayName=hn;var YE=c.forwardRef((e,t)=>{const n=At(hn,e.__scopePopover),r=c.useRef(null),o=J(t,r),a=c.useRef(!1);return c.useEffect(()=>{const s=r.current;if(s)return In(s)},[]),l.jsx(an,{as:ct,allowPinchZoom:!0,children:l.jsx(Kf,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:I(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:I(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),KE=c.forwardRef((e,t)=>{const n=At(hn,e.__scopePopover),r=c.useRef(!1),o=c.useRef(!1);return l.jsx(Kf,{...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()}})}),Kf=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,g=At(hn,n),m=Zn(n);return kn(),l.jsx(An,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(Lt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>g.onOpenChange(!1),children:l.jsx(zr,{"data-state":Xf(g.open),role:"dialog",id:g.contentId,...m,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),qf="PopoverClose",qE=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=At(qf,n);return l.jsx(L.button,{type:"button",...r,ref:t,onClick:I(e.onClick,()=>o.onOpenChange(!1))})});qE.displayName=qf;var XE="PopoverArrow",ZE=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Zn(n);return l.jsx(Vr,{...o,...r,ref:t})});ZE.displayName=XE;function Xf(e){return e?"open":"closed"}var QE=Wf,JE=Vf,eN=Gf,tN=Uf,Zf=Yf;const Qf=QE,Jf=eN,nN=JE,os=c.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>l.jsx(tN,{children:l.jsx(Zf,{ref:o,align:t,sideOffset:n,className:A("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})}));os.displayName=Zf.displayName;var rN="Separator",em="horizontal",oN=["horizontal","vertical"],tm=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=em,...o}=e,a=aN(r)?r:em,i=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return l.jsx(L.div,{"data-orientation":a,...i,...o,ref:t})});tm.displayName=rN;function aN(e){return oN.includes(e)}var nm=tm;const Xr=c.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>l.jsx(nm,{ref:o,decorative:n,orientation:t,className:A("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Xr.displayName=nm.displayName;const rm=$t("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"}}),om=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,g]=c.useState(r),[m,v]=c.useState(!1);c.useState(!1);const h=C=>{if(C.key==="Enter")v(!0);else if(C.key==="Backspace"&&!C.currentTarget.value){const M=[...p];M.pop(),g(M),t(M)}},b=C=>{const M=p.includes(C)?p.filter(T=>T!==C):[...p,C];g(M),t(M)},y=()=>{g([]),t([])},w=()=>{v(C=>!C)},x=()=>{const C=p.slice(0,a);g(C),t(C)},S=()=>{if(p.length===e.length)y();else{const C=e.map(M=>M.value);g(C),t(C)}};return l.jsxs(Qf,{open:m,onOpenChange:v,modal:s,children:[l.jsx(Jf,{asChild:!0,children:l.jsx(Ne,{ref:f,...d,onClick:w,className:A("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(C=>{const M=e.find(T=>T.value===C);return l.jsxs(ra,{className:A(rm({variant:n})),children:[M==null?void 0:M.label,l.jsx(Do,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:T=>{T.stopPropagation(),b(C)}})]},C)}),p.length>a&&l.jsxs(ra,{className:A("bg-transparent text-foreground border-foreground/1 hover:bg-transparent",rm({variant:n})),children:[`+ ${p.length-a} more`,l.jsx(Do,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:C=>{C.stopPropagation(),x()}})]})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(sr,{className:"h-4 mx-2 cursor-pointer text-muted-foreground",onClick:C=>{C.stopPropagation(),y()}}),l.jsx(Xr,{orientation:"vertical",className:"flex min-h-6 h-full"}),l.jsx(Jt,{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(Jt,{className:"h-4 cursor-pointer text-muted-foreground mx-2"})]})})}),l.jsx(os,{className:"w-auto p-0",align:"start",onEscapeKeyDown:()=>v(!1),children:l.jsxs(Ar,{children:[l.jsx(Pa,{placeholder:"Search...",onKeyDown:h}),l.jsxs(Ta,{children:[l.jsx(Ma,{children:"No results found."}),l.jsxs(jr,{children:[l.jsxs(un,{onSelect:S,className:"cursor-pointer",children:[l.jsx("div",{className:A("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(Dn,{className:"h-4 w-4"})}),l.jsx("span",{children:"(Select All)"})]},"all"),e.map(C=>{const M=p.includes(C.value);return l.jsxs(un,{onSelect:()=>b(C.value),className:"cursor-pointer",children:[l.jsx("div",{className:A("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(Dn,{className:"h-4 w-4"})}),l.jsx("span",{children:C.label})]},C.value)})]}),l.jsx(Ra,{}),l.jsx(jr,{children:l.jsxs("div",{className:"flex items-center justify-between",children:[p.length>0&&l.jsxs(l.Fragment,{children:[l.jsx(un,{onSelect:y,className:"flex-1 justify-center cursor-pointer",children:"Clear"}),l.jsx(Xr,{orientation:"vertical",className:"flex min-h-6 h-full"})]}),l.jsx(un,{onSelect:()=>v(!1),className:"flex-1 justify-center cursor-pointer max-w-full",children:"Close"})]})})]})]})})]})});om.displayName="MultiSelect";var sN="VisuallyHidden",as=c.forwardRef((e,t)=>l.jsx(L.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}}));as.displayName=sN;var am=as,gn="NavigationMenu",[ss,sm,iN]=tn(gn),[is,lN,cN]=tn(gn),[ls,IT]=ye(gn,[iN,cN]),[uN,Be]=ls(gn),[dN,fN]=ls(gn),im=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,g]=c.useState(null),m=J(t,k=>g(k)),v=xt(d),h=c.useRef(0),b=c.useRef(0),y=c.useRef(0),[w,x]=c.useState(!0),[S="",C]=Ee({prop:r,onChange:k=>{const W=k!=="",Y=i>0;W?(window.clearTimeout(y.current),Y&&x(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>x(!0),i)),o==null||o(k)},defaultProp:a}),M=c.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>C(""),150)},[C]),T=c.useCallback(k=>{window.clearTimeout(b.current),C(k)},[C]),D=c.useCallback(k=>{S===k?window.clearTimeout(b.current):h.current=window.setTimeout(()=>{window.clearTimeout(b.current),C(k)},s)},[S,C,s]);return c.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(b.current),window.clearTimeout(y.current)},[]),l.jsx(cm,{scope:n,isRootMenu:!0,value:S,dir:v,orientation:u,rootNavigationMenu:p,onTriggerEnter:k=>{window.clearTimeout(h.current),w?D(k):T(k)},onTriggerLeave:()=>{window.clearTimeout(h.current),M()},onContentEnter:()=>window.clearTimeout(b.current),onContentLeave:M,onItemSelect:k=>{C(W=>W===k?"":k)},onItemDismiss:()=>C(""),children:l.jsx(L.nav,{"aria-label":"Main","data-orientation":u,dir:v,...f,ref:m})})});im.displayName=gn;var lm="NavigationMenuSub",mN=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",...i}=e,u=Be(lm,n),[d="",f]=Ee({prop:r,onChange:o,defaultProp:a});return l.jsx(cm,{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(L.div,{"data-orientation":s,...i,ref:t})})});mN.displayName=lm;var cm=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:g,onContentLeave:m}=e,[v,h]=c.useState(null),[b,y]=c.useState(new Map),[w,x]=c.useState(null);return l.jsx(uN,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:i,previousValue:On(i),baseId:me(),dir:o,orientation:a,viewport:v,onViewportChange:h,indicatorTrack:w,onIndicatorTrackChange:x,onTriggerEnter:he(f),onTriggerLeave:he(p),onContentEnter:he(g),onContentLeave:he(m),onItemSelect:he(u),onItemDismiss:he(d),onViewportContentChange:c.useCallback((S,C)=>{y(M=>(M.set(S,C),new Map(M)))},[]),onViewportContentRemove:c.useCallback(S=>{y(C=>C.has(S)?(C.delete(S),new Map(C)):C)},[]),children:l.jsx(ss.Provider,{scope:t,children:l.jsx(dN,{scope:t,items:b,children:s})})})},um="NavigationMenuList",dm=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Be(um,n),a=l.jsx(L.ul,{"data-orientation":o.orientation,...r,ref:t});return l.jsx(L.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:l.jsx(ss.Slot,{scope:n,children:o.isRootMenu?l.jsx(Cm,{asChild:!0,children:a}):a})})});dm.displayName=um;var fm="NavigationMenuItem",[pN,mm]=ls(fm),pm=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=me(),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),g=c.useCallback((v="start")=>{if(i.current){f.current();const h=fs(i.current);h.length&&ms(v==="start"?h:h.reverse())}},[]),m=c.useCallback(()=>{if(i.current){const v=fs(i.current);v.length&&(f.current=xN(v))}},[]);return l.jsx(pN,{scope:n,value:s,triggerRef:u,contentRef:i,focusProxyRef:d,wasEscapeCloseRef:p,onEntryKeyDown:g,onFocusProxyEnter:g,onRootContentClose:m,onContentFocusOutside:m,children:l.jsx(L.li,{...o,ref:t})})});pm.displayName=fm;var cs="NavigationMenuTrigger",hm=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=Be(cs,e.__scopeNavigationMenu),s=mm(cs,e.__scopeNavigationMenu),i=c.useRef(null),u=J(i,s.triggerRef,t),d=Sm(a.baseId,s.value),f=Pm(a.baseId,s.value),p=c.useRef(!1),g=c.useRef(!1),m=s.value===a.value;return l.jsxs(l.Fragment,{children:[l.jsx(ss.ItemSlot,{scope:n,value:s.value,children:l.jsx(Nm,{asChild:!0,children:l.jsx(L.button,{id:d,disabled:r,"data-disabled":r?"":void 0,"data-state":hs(m),"aria-expanded":m,"aria-controls":f,...o,ref:u,onPointerEnter:I(e.onPointerEnter,()=>{g.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:I(e.onPointerMove,Qr(()=>{r||g.current||s.wasEscapeCloseRef.current||p.current||(a.onTriggerEnter(s.value),p.current=!0)})),onPointerLeave:I(e.onPointerLeave,Qr(()=>{r||(a.onTriggerLeave(),p.current=!1)})),onClick:I(e.onClick,()=>{a.onItemSelect(s.value),g.current=m}),onKeyDown:I(e.onKeyDown,v=>{const b={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];m&&v.key===b&&(s.onEntryKeyDown(),v.preventDefault())})})})}),m&&l.jsxs(l.Fragment,{children:[l.jsx(am,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:v=>{const h=s.contentRef.current,b=v.relatedTarget,y=b===i.current,w=h==null?void 0:h.contains(b);(y||!w)&&s.onFocusProxyEnter(y?"start":"end")}}),a.viewport&&l.jsx("span",{"aria-owns":f})]})]})});hm.displayName=cs;var hN="NavigationMenuLink",gm="navigationMenu.linkSelect",vm=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return l.jsx(Nm,{asChild:!0,children:l.jsx(L.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...a,ref:t,onClick:I(e.onClick,s=>{const i=s.target,u=new CustomEvent(gm,{bubbles:!0,cancelable:!0});if(i.addEventListener(gm,d=>o==null?void 0:o(d),{once:!0}),ir(i,u),!u.defaultPrevented&&!s.metaKey){const d=new CustomEvent(Zr,{bubbles:!0,cancelable:!0});ir(i,d)}},{checkForDefaultPrevented:!1})})})});vm.displayName=hN;var us="NavigationMenuIndicator",bm=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Be(us,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?En.createPortal(l.jsx(be,{present:n||a,children:l.jsx(gN,{...r,ref:t})}),o.indicatorTrack):null});bm.displayName=us;var gN=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Be(us,n),a=sm(n),[s,i]=c.useState(null),[u,d]=c.useState(null),f=o.orientation==="horizontal",p=!!o.value;c.useEffect(()=>{var h;const v=(h=a().find(b=>b.value===o.value))==null?void 0:h.ref.current;v&&i(v)},[a,o.value]);const g=()=>{s&&d({size:f?s.offsetWidth:s.offsetHeight,offset:f?s.offsetLeft:s.offsetTop})};return ps(s,g),ps(o.indicatorTrack,g),u?l.jsx(L.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}),vn="NavigationMenuContent",ym=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Be(vn,e.__scopeNavigationMenu),a=mm(vn,e.__scopeNavigationMenu),s=J(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(vN,{forceMount:n,...u,ref:s}):l.jsx(be,{present:n||i,children:l.jsx(wm,{"data-state":hs(i),...u,ref:s,onPointerEnter:I(e.onPointerEnter,o.onContentEnter),onPointerLeave:I(e.onPointerLeave,Qr(o.onContentLeave)),style:{pointerEvents:!i&&o.isRootMenu?"none":void 0,...u.style}})})});ym.displayName=vn;var vN=c.forwardRef((e,t)=>{const n=Be(vn,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return we(()=>{r(e.value,{ref:t,...e})},[e,t,r]),we(()=>()=>o(e.value),[e.value,o]),null}),Zr="navigationMenu.rootContentDismiss",wm=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:s,onRootContentClose:i,onContentFocusOutside:u,...d}=e,f=Be(vn,n),p=c.useRef(null),g=J(p,t),m=Sm(f.baseId,r),v=Pm(f.baseId,r),h=sm(n),b=c.useRef(null),{onItemDismiss:y}=f;c.useEffect(()=>{const x=p.current;if(f.isRootMenu&&x){const S=()=>{var C;y(),i(),x.contains(document.activeElement)&&((C=o.current)==null||C.focus())};return x.addEventListener(Zr,S),()=>x.removeEventListener(Zr,S)}},[f.isRootMenu,e.value,o,y,i]);const w=c.useMemo(()=>{const S=h().map(W=>W.value);f.dir==="rtl"&&S.reverse();const C=S.indexOf(f.value),M=S.indexOf(f.previousValue),T=r===f.value,D=M===S.indexOf(r);if(!T&&!D)return b.current;const k=(()=>{if(C!==M){if(T&&M!==-1)return C>M?"from-end":"from-start";if(D&&C!==-1)return C>M?"to-start":"to-end"}return null})();return b.current=k,k},[f.previousValue,f.value,f.dir,h,r]);return l.jsx(Cm,{asChild:!0,children:l.jsx(Lt,{id:v,"aria-labelledby":m,"data-motion":w,"data-orientation":f.orientation,...d,ref:g,disableOutsidePointerEvents:!1,onDismiss:()=>{var S;const x=new Event(Zr,{bubbles:!0,cancelable:!0});(S=p.current)==null||S.dispatchEvent(x)},onFocusOutside:I(e.onFocusOutside,x=>{var C;u();const S=x.target;(C=f.rootNavigationMenu)!=null&&C.contains(S)&&x.preventDefault()}),onPointerDownOutside:I(e.onPointerDownOutside,x=>{var T;const S=x.target,C=h().some(D=>{var k;return(k=D.ref.current)==null?void 0:k.contains(S)}),M=f.isRootMenu&&((T=f.viewport)==null?void 0:T.contains(S));(C||M||!f.isRootMenu)&&x.preventDefault()}),onKeyDown:I(e.onKeyDown,x=>{var M;const S=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!S){const T=fs(x.currentTarget),D=document.activeElement,k=T.findIndex(O=>O===D),Y=x.shiftKey?T.slice(0,k).reverse():T.slice(k+1,T.length);ms(Y)?x.preventDefault():(M=a.current)==null||M.focus()}}),onEscapeKeyDown:I(e.onEscapeKeyDown,x=>{s.current=!0})})})}),ds="NavigationMenuViewport",xm=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=!!Be(ds,e.__scopeNavigationMenu).value;return l.jsx(be,{present:n||a,children:l.jsx(bN,{...r,ref:t})})});xm.displayName=ds;var bN=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,a=Be(ds,n),s=J(t,a.onViewportChange),i=fN(vn,e.__scopeNavigationMenu),[u,d]=c.useState(null),[f,p]=c.useState(null),g=u?(u==null?void 0:u.width)+"px":void 0,m=u?(u==null?void 0:u.height)+"px":void 0,v=!!a.value,h=v?a.value:a.previousValue;return ps(f,()=>{f&&d({width:f.offsetWidth,height:f.offsetHeight})}),l.jsx(L.div,{"data-state":hs(v),"data-orientation":a.orientation,...o,ref:s,style:{pointerEvents:!v&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":g,"--radix-navigation-menu-viewport-height":m,...o.style},onPointerEnter:I(e.onPointerEnter,a.onContentEnter),onPointerLeave:I(e.onPointerLeave,Qr(a.onContentLeave)),children:Array.from(i.items).map(([y,{ref:w,forceMount:x,...S}])=>{const C=h===y;return l.jsx(be,{present:x||C,children:l.jsx(wm,{...S,ref:en(w,M=>{C&&M&&p(M)})})},y)})})}),yN="FocusGroup",Cm=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Be(yN,n);return l.jsx(is.Provider,{scope:n,children:l.jsx(is.Slot,{scope:n,children:l.jsx(L.div,{dir:o.dir,...r,ref:t})})})}),Em=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],wN="FocusGroupItem",Nm=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=lN(n),a=Be(wN,n);return l.jsx(is.ItemSlot,{scope:n,children:l.jsx(L.button,{...r,ref:t,onKeyDown:I(e.onKeyDown,s=>{if(["Home","End",...Em].includes(s.key)){let u=o().map(p=>p.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(s.key)&&u.reverse(),Em.includes(s.key)){const p=u.indexOf(s.currentTarget);u=u.slice(p+1)}setTimeout(()=>ms(u)),s.preventDefault()}})})})});function fs(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 ms(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function xN(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 ps(e,t){const n=he(t);we(()=>{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 hs(e){return e?"open":"closed"}function Sm(e,t){return`${e}-trigger-${t}`}function Pm(e,t){return`${e}-content-${t}`}function Qr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Tm=im,Mm=dm,CN=pm,Rm=hm,EN=vm,Dm=bm,Am=ym,jm=xm;const km=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Tm,{ref:r,className:A("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,l.jsx(gs,{})]}));km.displayName=Tm.displayName;const Im=c.forwardRef(({className:e,...t},n)=>l.jsx(Mm,{ref:n,className:A("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));Im.displayName=Mm.displayName;const NN=CN,Om=$t("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"),_m=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Rm,{ref:r,className:A(Om(),"group",e),...n,children:[t," ",l.jsx(Jt,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));_m.displayName=Rm.displayName;const $m=c.forwardRef(({className:e,...t},n)=>l.jsx(Am,{ref:n,className:A("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}));$m.displayName=Am.displayName;const SN=EN,gs=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:A("absolute left-0 top-full flex justify-center"),children:l.jsx(jm,{className:A("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})}));gs.displayName=jm.displayName;const Lm=c.forwardRef(({className:e,...t},n)=>l.jsx(Dm,{ref:n,className:A("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"})}));Lm.displayName=Dm.displayName;const vs=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:A("mx-auto flex w-full justify-center",e),...t});vs.displayName="Pagination";const bs=c.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:A("flex flex-row items-center gap-1",e),...t}));bs.displayName="PaginationContent";const ht=c.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:A("",e),...t}));ht.displayName="PaginationItem";const Ut=({className:e,isActive:t,size:n="icon",...r})=>l.jsx(Ne,{"aria-current":t?"page":void 0,className:A(Cr({variant:t?"default":"outline",rounded:!1,size:n}),t?"text-primary-foreground":"text-foreground",e),...r,children:r.children});Ut.displayName="PaginationLink";const ys=({className:e,...t})=>l.jsx(Ut,{"aria-label":"Previous page",className:A("gap-1",e),...t,children:l.jsx(Ro,{className:"h-4 w-4"})});ys.displayName="PaginationPrevious";const ws=({className:e,...t})=>l.jsx(Ut,{"aria-label":"Next page",className:A("gap-1",e),...t,children:l.jsx(ar,{className:"h-4 w-4"})});ws.displayName="PaginationNext";const Jr=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:A("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(Jb,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});Jr.displayName="PaginationEllipsis";var xs="Progress",Cs=100,[PN,OT]=ye(xs),[TN,MN]=PN(xs),Fm=c.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=RN,...s}=e;(o||o===0)&&!Vm(o)&&console.error(DN(`${o}`,"Progress"));const i=Vm(o)?o:Cs;r!==null&&!Hm(r,i)&&console.error(AN(`${r}`,"Progress"));const u=Hm(r,i)?r:null,d=eo(u)?a(u,i):void 0;return l.jsx(TN,{scope:n,value:u,max:i,children:l.jsx(L.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":eo(u)?u:void 0,"aria-valuetext":d,role:"progressbar","data-state":zm(u,i),"data-value":u??void 0,"data-max":i,...s,ref:t})})});Fm.displayName=xs;var Bm="ProgressIndicator",Wm=c.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=MN(Bm,n);return l.jsx(L.div,{"data-state":zm(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Wm.displayName=Bm;function RN(e,t){return`${Math.round(e/t*100)}%`}function zm(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function eo(e){return typeof e=="number"}function Vm(e){return eo(e)&&!isNaN(e)&&e>0}function Hm(e,t){return eo(e)&&!isNaN(e)&&e<=t&&e>=0}function DN(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Cs}\`.`}function AN(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
258
262
|
- a positive number
|
|
259
|
-
- less than the value passed to \`max\` (or ${
|
|
263
|
+
- less than the value passed to \`max\` (or ${Cs} if no \`max\` prop is set)
|
|
260
264
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
261
265
|
|
|
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]};/*!
|
|
266
|
+
Defaulting to \`null\`.`}var Gm=Fm,jN=Wm;const Es=c.forwardRef(({className:e,value:t,...n},r)=>l.jsx(Gm,{ref:r,className:A("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:l.jsx(jN,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Es.displayName=Gm.displayName;function kN(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),g=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,v=g(u),h=m(v),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(fr,{...i,type:f?"text":"password",value:u,onChange:b,className:`pr-10 ${n||""}`}),l.jsx(Ne,{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(ey,{className:"h-4 w-4"}):l.jsx(ty,{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:h})]}),l.jsx(Es,{value:v,className:"h-2"})]})]})}var Ns="Radio",[IN,Um]=ye(Ns),[ON,_N]=IN(Ns),Ym=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,g]=c.useState(null),m=J(t,b=>g(b)),v=c.useRef(!1),h=p?d||!!p.closest("form"):!0;return l.jsxs(ON,{scope:n,checked:o,disabled:s,children:[l.jsx(L.button,{type:"button",role:"radio","aria-checked":o,"data-state":Xm(o),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:m,onClick:I(e.onClick,b=>{o||u==null||u(),h&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),h&&l.jsx($N,{control:p,bubbles:!v.current,name:r,value:i,checked:o,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});Ym.displayName=Ns;var Km="RadioIndicator",qm=c.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=_N(Km,n);return l.jsx(be,{present:r||a.checked,children:l.jsx(L.span,{"data-state":Xm(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});qm.displayName=Km;var $N=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=c.useRef(null),s=On(n),i=Er(t);return c.useEffect(()=>{const u=a.current,d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==n&&p){const g=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(g)}},[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 Xm(e){return e?"checked":"unchecked"}var LN=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ss="RadioGroup",[FN,_T]=ye(Ss,[Rt,Um]),Zm=Rt(),Qm=Um(),[BN,WN]=FN(Ss),Jm=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,...g}=e,m=Zm(n),v=xt(d),[h,b]=Ee({prop:a,defaultProp:o,onChange:p});return l.jsx(BN,{scope:n,name:r,required:s,disabled:i,value:h,onValueChange:b,children:l.jsx(Gr,{asChild:!0,...m,orientation:u,dir:v,loop:f,children:l.jsx(L.div,{role:"radiogroup","aria-required":s,"aria-orientation":u,"data-disabled":i?"":void 0,dir:v,...g,ref:t})})})});Jm.displayName=Ss;var ep="RadioGroupItem",tp=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=WN(ep,n),s=a.disabled||r,i=Zm(n),u=Qm(n),d=c.useRef(null),f=J(t,d),p=a.value===o.value,g=c.useRef(!1);return c.useEffect(()=>{const m=h=>{LN.includes(h.key)&&(g.current=!0)},v=()=>g.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",v)}},[]),l.jsx(Ur,{asChild:!0,...i,focusable:!s,active:p,children:l.jsx(Ym,{disabled:s,required:a.required,checked:p,...u,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:I(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:I(o.onFocus,()=>{var m;g.current&&((m=d.current)==null||m.click())})})})});tp.displayName=ep;var zN="RadioGroupIndicator",np=c.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Qm(n);return l.jsx(qm,{...o,...r,ref:t})});np.displayName=zN;var rp=Jm,op=tp,VN=np;const ap=c.forwardRef(({className:e,...t},n)=>l.jsx(rp,{className:A("grid gap-2",e),...t,ref:n}));ap.displayName=rp.displayName;const sp=c.forwardRef(({className:e,...t},n)=>l.jsx(op,{ref:n,className:A("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(VN,{className:"flex items-center justify-center",children:l.jsx($i,{className:"h-3.5 w-3.5 fill-primary"})})}));sp.displayName=op.displayName;function ip(e,[t,n]){return Math.min(n,Math.max(t,e))}var HN=[" ","Enter","ArrowUp","ArrowDown"],GN=[" ","Enter"],Qn="Select",[to,no,UN]=tn(Qn),[bn,$T]=ye(Qn,[UN,Mt]),ro=Mt(),[YN,jt]=bn(Qn),[KN,qN]=bn(Qn),lp=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:g,required:m,form:v}=e,h=ro(t),[b,y]=c.useState(null),[w,x]=c.useState(null),[S,C]=c.useState(!1),M=xt(d),[T=!1,D]=Ee({prop:r,defaultProp:o,onChange:a}),[k,W]=Ee({prop:s,defaultProp:i,onChange:u}),Y=c.useRef(null),O=b?v||!!b.closest("form"):!0,[K,H]=c.useState(new Set),ee=Array.from(K).map(V=>V.props.value).join(";");return l.jsx(Vn,{...h,children:l.jsxs(YN,{required:m,scope:t,trigger:b,onTriggerChange:y,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:me(),value:k,onValueChange:W,open:T,onOpenChange:D,dir:M,triggerPointerDownPosRef:Y,disabled:g,children:[l.jsx(to.Provider,{scope:t,children:l.jsx(KN,{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})}),O?l.jsxs(kp,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:k,onChange:V=>W(V.target.value),disabled:g,form:v,children:[k===void 0?l.jsx("option",{value:""}):null,Array.from(K)]},ee):null]})})};lp.displayName=Qn;var cp="SelectTrigger",up=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=ro(n),s=jt(cp,n),i=s.disabled||r,u=J(t,s.onTriggerChange),d=no(n),f=c.useRef("touch"),[p,g,m]=Ip(h=>{const b=d().filter(x=>!x.disabled),y=b.find(x=>x.value===s.value),w=Op(b,h,y);w!==void 0&&s.onValueChange(w.value)}),v=h=>{i||(s.onOpenChange(!0),m()),h&&(s.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return l.jsx(Hn,{asChild:!0,...a,children:l.jsx(L.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":jp(s.value)?"":void 0,...o,ref:u,onClick:I(o.onClick,h=>{h.currentTarget.focus(),f.current!=="mouse"&&v(h)}),onPointerDown:I(o.onPointerDown,h=>{f.current=h.pointerType;const b=h.target;b.hasPointerCapture(h.pointerId)&&b.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(v(h),h.preventDefault())}),onKeyDown:I(o.onKeyDown,h=>{const b=p.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&g(h.key),!(b&&h.key===" ")&&HN.includes(h.key)&&(v(),h.preventDefault())})})})});up.displayName=cp;var dp="SelectValue",fp=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,u=jt(dp,n),{onValueNodeHasChildrenChange:d}=u,f=a!==void 0,p=J(t,u.onValueNodeChange);return we(()=>{d(f)},[d,f]),l.jsx(L.span,{...i,ref:p,style:{pointerEvents:"none"},children:jp(u.value)?l.jsx(l.Fragment,{children:s}):a})});fp.displayName=dp;var XN="SelectIcon",mp=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.jsx(L.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});mp.displayName=XN;var Yt="SelectContent",pp=c.forwardRef((e,t)=>{const n=jt(Yt,e.__scopeSelect),[r,o]=c.useState();if(we(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Nn.createPortal(l.jsx(hp,{scope:e.__scopeSelect,children:l.jsx(to.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),a):null}return l.jsx(gp,{...e,ref:t})});pp.displayName=Yt;var Ke=10,[hp,kt]=bn(Yt),ZN="SelectContentImpl",gp=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:g,collisionPadding:m,sticky:v,hideWhenDetached:h,avoidCollisions:b,...y}=e,w=jt(Yt,n),[x,S]=c.useState(null),[C,M]=c.useState(null),T=J(t,_=>S(_)),[D,k]=c.useState(null),[W,Y]=c.useState(null),O=no(n),[K,H]=c.useState(!1),ee=c.useRef(!1);c.useEffect(()=>{if(x)return In(x)},[x]),kn();const V=c.useCallback(_=>{const[Q,...ne]=O().map(ce=>ce.ref.current),[re]=ne.slice(-1),ie=document.activeElement;for(const ce of _)if(ce===ie||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===Q&&C&&(C.scrollTop=0),ce===re&&C&&(C.scrollTop=C.scrollHeight),ce==null||ce.focus(),document.activeElement!==ie))return},[O,C]),q=c.useCallback(()=>V([D,x]),[V,D,x]);c.useEffect(()=>{K&&q()},[K,q]);const{onOpenChange:G,triggerPointerDownPosRef:j}=w;c.useEffect(()=>{if(x){let _={x:0,y:0};const Q=re=>{var ie,ce;_={x:Math.abs(Math.round(re.pageX)-(((ie=j.current)==null?void 0:ie.x)??0)),y:Math.abs(Math.round(re.pageY)-(((ce=j.current)==null?void 0:ce.y)??0))}},ne=re=>{_.x<=10&&_.y<=10?re.preventDefault():x.contains(re.target)||G(!1),document.removeEventListener("pointermove",Q),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",ne,{capture:!0})}}},[x,G,j]),c.useEffect(()=>{const _=()=>G(!1);return window.addEventListener("blur",_),window.addEventListener("resize",_),()=>{window.removeEventListener("blur",_),window.removeEventListener("resize",_)}},[G]);const[Z,te]=Ip(_=>{const Q=O().filter(ie=>!ie.disabled),ne=Q.find(ie=>ie.ref.current===document.activeElement),re=Op(Q,_,ne);re&&setTimeout(()=>re.ref.current.focus())}),R=c.useCallback((_,Q,ne)=>{const re=!ee.current&&!ne;(w.value!==void 0&&w.value===Q||re)&&(k(_),re&&(ee.current=!0))},[w.value]),$=c.useCallback(()=>x==null?void 0:x.focus(),[x]),F=c.useCallback((_,Q,ne)=>{const re=!ee.current&&!ne;(w.value!==void 0&&w.value===Q||re)&&Y(_)},[w.value]),B=r==="popper"?Ps:vp,X=B===Ps?{side:i,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:v,hideWhenDetached:h,avoidCollisions:b}:{};return l.jsx(hp,{scope:n,content:x,viewport:C,onViewportChange:M,itemRefCallback:R,selectedItem:D,onItemLeave:$,itemTextRefCallback:F,focusSelectedItem:q,selectedItemText:W,position:r,isPositioned:K,searchRef:Z,children:l.jsx(an,{as:ct,allowPinchZoom:!0,children:l.jsx(An,{asChild:!0,trapped:w.open,onMountAutoFocus:_=>{_.preventDefault()},onUnmountAutoFocus:I(o,_=>{var Q;(Q=w.trigger)==null||Q.focus({preventScroll:!0}),_.preventDefault()}),children:l.jsx(Lt,{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:I(y.onKeyDown,_=>{const Q=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!Q&&_.key.length===1&&te(_.key),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let re=O().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(_.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const ie=_.target,ce=re.indexOf(ie);re=re.slice(ce+1)}setTimeout(()=>V(re)),_.preventDefault()}})})})})})})});gp.displayName=ZN;var QN="SelectItemAlignedPosition",vp=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=jt(Yt,n),s=kt(Yt,n),[i,u]=c.useState(null),[d,f]=c.useState(null),p=J(t,T=>f(T)),g=no(n),m=c.useRef(!1),v=c.useRef(!0),{viewport:h,selectedItem:b,selectedItemText:y,focusSelectedItem:w}=s,x=c.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&d&&h&&b&&y){const T=a.trigger.getBoundingClientRect(),D=d.getBoundingClientRect(),k=a.valueNode.getBoundingClientRect(),W=y.getBoundingClientRect();if(a.dir!=="rtl"){const ie=W.left-D.left,ce=k.left-ie,Se=T.left-ce,xe=T.width+Se,Re=Math.max(xe,D.width),We=window.innerWidth-Ke,Pe=ip(ce,[Ke,Math.max(Ke,We-Re)]);i.style.minWidth=xe+"px",i.style.left=Pe+"px"}else{const ie=D.right-W.right,ce=window.innerWidth-k.right-ie,Se=window.innerWidth-T.right-ce,xe=T.width+Se,Re=Math.max(xe,D.width),We=window.innerWidth-Ke,Pe=ip(ce,[Ke,Math.max(Ke,We-Re)]);i.style.minWidth=xe+"px",i.style.right=Pe+"px"}const Y=g(),O=window.innerHeight-Ke*2,K=h.scrollHeight,H=window.getComputedStyle(d),ee=parseInt(H.borderTopWidth,10),V=parseInt(H.paddingTop,10),q=parseInt(H.borderBottomWidth,10),G=parseInt(H.paddingBottom,10),j=ee+V+K+G+q,Z=Math.min(b.offsetHeight*5,j),te=window.getComputedStyle(h),R=parseInt(te.paddingTop,10),$=parseInt(te.paddingBottom,10),F=T.top+T.height/2-Ke,B=O-F,X=b.offsetHeight/2,_=b.offsetTop+X,Q=ee+V+_,ne=j-Q;if(Q<=F){const ie=Y.length>0&&b===Y[Y.length-1].ref.current;i.style.bottom="0px";const ce=d.clientHeight-h.offsetTop-h.offsetHeight,Se=Math.max(B,X+(ie?$:0)+ce+q),xe=Q+Se;i.style.height=xe+"px"}else{const ie=Y.length>0&&b===Y[0].ref.current;i.style.top="0px";const Se=Math.max(F,ee+h.offsetTop+(ie?R:0)+X)+ne;i.style.height=Se+"px",h.scrollTop=Q-F+h.offsetTop}i.style.margin=`${Ke}px 0`,i.style.minHeight=Z+"px",i.style.maxHeight=O+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[g,a.trigger,a.valueNode,i,d,h,b,y,a.dir,r]);we(()=>x(),[x]);const[S,C]=c.useState();we(()=>{d&&C(window.getComputedStyle(d).zIndex)},[d]);const M=c.useCallback(T=>{T&&v.current===!0&&(x(),w==null||w(),v.current=!1)},[x,w]);return l.jsx(eS,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:M,children:l.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:l.jsx(L.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});vp.displayName=QN;var JN="SelectPopperPosition",Ps=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ke,...a}=e,s=ro(n);return l.jsx(zr,{...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)"}})});Ps.displayName=JN;var[eS,Ts]=bn(Yt,{}),Ms="SelectViewport",bp=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=kt(Ms,n),s=Ts(Ms,n),i=J(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(to.Slot,{scope:n,children:l.jsx(L.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:I(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=s;if(g!=null&&g.current&&p){const m=Math.abs(u.current-f.scrollTop);if(m>0){const v=window.innerHeight-Ke*2,h=parseFloat(p.style.minHeight),b=parseFloat(p.style.height),y=Math.max(h,b);if(y<v){const w=y+m,x=Math.min(v,w),S=w-x;p.style.height=x+"px",p.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,p.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})});bp.displayName=Ms;var yp="SelectGroup",[tS,nS]=bn(yp),wp=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=me();return l.jsx(tS,{scope:n,id:o,children:l.jsx(L.div,{role:"group","aria-labelledby":o,...r,ref:t})})});wp.displayName=yp;var xp="SelectLabel",Cp=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=nS(xp,n);return l.jsx(L.div,{id:o.id,...r,ref:t})});Cp.displayName=xp;var oo="SelectItem",[rS,Ep]=bn(oo),Np=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=jt(oo,n),u=kt(oo,n),d=i.value===r,[f,p]=c.useState(a??""),[g,m]=c.useState(!1),v=J(t,w=>{var x;return(x=u.itemRefCallback)==null?void 0:x.call(u,w,r,o)}),h=me(),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(rS,{scope:n,value:r,disabled:o,textId:h,isSelected:d,onItemTextChange:c.useCallback(w=>{p(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:l.jsx(to.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:l.jsx(L.div,{role:"option","aria-labelledby":h,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:v,onFocus:I(s.onFocus,()=>m(!0)),onBlur:I(s.onBlur,()=>m(!1)),onClick:I(s.onClick,()=>{b.current!=="mouse"&&y()}),onPointerUp:I(s.onPointerUp,()=>{b.current==="mouse"&&y()}),onPointerDown:I(s.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:I(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:I(s.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=u.onItemLeave)==null||x.call(u))}),onKeyDown:I(s.onKeyDown,w=>{var S;((S=u.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(GN.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});Np.displayName=oo;var Jn="SelectItemText",Sp=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=jt(Jn,n),i=kt(Jn,n),u=Ep(Jn,n),d=qN(Jn,n),[f,p]=c.useState(null),g=J(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,v=c.useMemo(()=>l.jsx("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:b}=d;return we(()=>(h(v),()=>b(v)),[h,b,v]),l.jsxs(l.Fragment,{children:[l.jsx(L.span,{id:u.textId,...a,ref:g}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Nn.createPortal(a.children,s.valueNode):null]})});Sp.displayName=Jn;var Pp="SelectItemIndicator",Tp=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Ep(Pp,n).isSelected?l.jsx(L.span,{"aria-hidden":!0,...r,ref:t}):null});Tp.displayName=Pp;var Rs="SelectScrollUpButton",Mp=c.forwardRef((e,t)=>{const n=kt(Rs,e.__scopeSelect),r=Ts(Rs,e.__scopeSelect),[o,a]=c.useState(!1),s=J(t,r.onScrollButtonChange);return we(()=>{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(Dp,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop-u.offsetHeight)}}):null});Mp.displayName=Rs;var Ds="SelectScrollDownButton",Rp=c.forwardRef((e,t)=>{const n=kt(Ds,e.__scopeSelect),r=Ts(Ds,e.__scopeSelect),[o,a]=c.useState(!1),s=J(t,r.onScrollButtonChange);return we(()=>{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(Dp,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop+u.offsetHeight)}}):null});Rp.displayName=Ds;var Dp=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=kt("SelectScrollButton",n),s=c.useRef(null),i=no(n),u=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),we(()=>{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(L.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:I(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:I(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:I(o.onPointerLeave,()=>{u()})})}),oS="SelectSeparator",Ap=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(L.div,{"aria-hidden":!0,...r,ref:t})});Ap.displayName=oS;var As="SelectArrow",aS=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ro(n),a=jt(As,n),s=kt(As,n);return a.open&&s.position==="popper"?l.jsx(Vr,{...o,...r,ref:t}):null});aS.displayName=As;function jp(e){return e===""||e===void 0}var kp=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=c.useRef(null),a=J(t,o),s=On(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(as,{asChild:!0,children:l.jsx("select",{...r,ref:a,defaultValue:n})})});kp.displayName="BubbleSelect";function Ip(e){const t=he(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 Op(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=sS(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 sS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var iS=lp,_p=up,lS=fp,cS=mp,$p=pp,uS=bp,dS=wp,Lp=Cp,Fp=Np,fS=Sp,mS=Tp,Bp=Mp,Wp=Rp,zp=Ap;const Vp=iS,pS=dS,Hp=lS,js=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(_p,{ref:r,className:A("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(cS,{asChild:!0,children:l.jsx(Jt,{className:"h-4 w-4 opacity-50"})})]}));js.displayName=_p.displayName;const ks=c.forwardRef(({className:e,...t},n)=>l.jsx(Bp,{ref:n,className:A("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(qb,{className:"h-4 w-4"})}));ks.displayName=Bp.displayName;const Is=c.forwardRef(({className:e,...t},n)=>l.jsx(Wp,{ref:n,className:A("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(Jt,{className:"h-4 w-4"})}));Is.displayName=Wp.displayName;const Os=c.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>l.jsxs($p,{ref:o,className:A("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(ks,{}),l.jsx(uS,{className:A("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(Is,{})]}));Os.displayName=$p.displayName;const Gp=c.forwardRef(({className:e,...t},n)=>l.jsx(Lp,{ref:n,className:A("px-2 py-1.5 text-sm font-semibold",e),...t}));Gp.displayName=Lp.displayName;const yn=c.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Fp,{ref:r,className:A("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(mS,{children:l.jsx(Dn,{className:"h-4 w-4"})})}),l.jsx(fS,{children:t})]}));yn.displayName=Fp.displayName;const Up=c.forwardRef(({className:e,...t},n)=>l.jsx(zp,{ref:n,className:A("-mx-1 my-1 h-px bg-muted",e),...t}));Up.displayName=zp.displayName;const Yp=({className:e,repeat:t=1,...n})=>l.jsx(l.Fragment,{children:Array.from({length:t??1}).map((r,o)=>l.jsx("div",{className:A("animate-pulse rounded-md bg-gray-700/10 w-full h-5",e),...n},o))}),hS=["primary","secondary","success","error","warning","info","white","neutral"],gS=["xs","sm","md","lg","xl","2xl"],Kp=$t("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"}}),qp=e=>{const{label:t,size:n,color:r,className:o}=e;return l.jsxs("div",{className:A("flex flex-col justify-center items-center",o),children:[l.jsx(ly,{className:A(Kp({color:r,size:n}),"animate-spin")}),t&&l.jsx("p",{className:A("italic",Kp({color:r})),children:t})]})};var _s="Switch",[vS,LT]=ye(_s),[bS,yS]=vS(_s),Xp=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,[g,m]=c.useState(null),v=J(t,x=>m(x)),h=c.useRef(!1),b=g?f||!!g.closest("form"):!0,[y=!1,w]=Ee({prop:o,defaultProp:a,onChange:d});return l.jsxs(bS,{scope:n,checked:y,disabled:i,children:[l.jsx(L.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":Jp(y),"data-disabled":i?"":void 0,disabled:i,value:u,...p,ref:v,onClick:I(e.onClick,x=>{w(S=>!S),b&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})}),b&&l.jsx(wS,{control:g,bubbles:!h.current,name:r,value:u,checked:y,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});Xp.displayName=_s;var Zp="SwitchThumb",Qp=c.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=yS(Zp,n);return l.jsx(L.span,{"data-state":Jp(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Qp.displayName=Zp;var wS=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=c.useRef(null),s=On(n),i=Er(t);return c.useEffect(()=>{const u=a.current,d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==n&&p){const g=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(g)}},[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 Jp(e){return e?"checked":"unchecked"}var eh=Xp,xS=Qp;const th=c.forwardRef(({className:e,...t},n)=>l.jsx(eh,{className:A("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(xS,{className:A("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")})}));th.displayName=eh.displayName;const nh=c.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:n,className:A("w-full caption-bottom text-sm",e),...t})}));nh.displayName="Table";const rh=c.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:A("[&_tr]:border-b",e),...t}));rh.displayName="TableHeader";const oh=c.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:A("[&_tr:last-child]:border-0",e),...t}));oh.displayName="TableBody";const ah=c.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:A("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));ah.displayName="TableFooter";const sh=c.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:A("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));sh.displayName="TableRow";const ih=c.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:A("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}));ih.displayName="TableHead";const lh=c.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:A("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));lh.displayName="TableCell";const ch=c.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:A("mt-4 text-sm text-muted-foreground",e),...t}));ch.displayName="TableCaption";var $s="Tabs",[CS,FT]=ye($s,[Rt]),uh=Rt(),[ES,Ls]=CS($s),dh=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:u="automatic",...d}=e,f=xt(i),[p,g]=Ee({prop:r,onChange:o,defaultProp:a});return l.jsx(ES,{scope:n,baseId:me(),value:p,onValueChange:g,orientation:s,dir:f,activationMode:u,children:l.jsx(L.div,{dir:f,"data-orientation":s,...d,ref:t})})});dh.displayName=$s;var fh="TabsList",mh=c.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Ls(fh,n),s=uh(n);return l.jsx(Gr,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:l.jsx(L.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});mh.displayName=fh;var ph="TabsTrigger",hh=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Ls(ph,n),i=uh(n),u=bh(s.baseId,r),d=yh(s.baseId,r),f=r===s.value;return l.jsx(Ur,{asChild:!0,...i,focusable:!o,active:f,children:l.jsx(L.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:I(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?s.onValueChange(r):p.preventDefault()}),onKeyDown:I(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&s.onValueChange(r)}),onFocus:I(e.onFocus,()=>{const p=s.activationMode!=="manual";!f&&!o&&p&&s.onValueChange(r)})})})});hh.displayName=ph;var gh="TabsContent",vh=c.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=Ls(gh,n),u=bh(i.baseId,r),d=yh(i.baseId,r),f=r===i.value,p=c.useRef(f);return c.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),l.jsx(be,{present:o||f,children:({present:g})=>l.jsx(L.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":u,hidden:!g,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&a})})});vh.displayName=gh;function bh(e,t){return`${e}-trigger-${t}`}function yh(e,t){return`${e}-content-${t}`}var NS=dh,wh=mh,xh=hh,Ch=vh;const SS=NS,Eh=c.forwardRef(({className:e,...t},n)=>l.jsx(wh,{ref:n,className:A("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Eh.displayName=wh.displayName;const Nh=c.forwardRef(({className:e,...t},n)=>l.jsx(xh,{ref:n,className:A("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}));Nh.displayName=xh.displayName;const Sh=c.forwardRef(({className:e,...t},n)=>l.jsx(Ch,{ref:n,className:A("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Sh.displayName=Ch.displayName;const Ph=c.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:A("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}));Ph.displayName="Textarea";var PS=e=>{switch(e){case"success":return RS;case"info":return AS;case"warning":return DS;case"error":return jS;default:return null}},TS=Array(12).fill(0),MS=({visible:e,className:t})=>P.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},P.createElement("div",{className:"sonner-spinner"},TS.map((n,r)=>P.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),RS=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"})),DS=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"})),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-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"})),jS=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"})),kS=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},Fs=1,OS=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:Fs++,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($S(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)||Fs++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},$e=new OS,_S=(e,t)=>{let n=(t==null?void 0:t.id)||Fs++;return $e.addToast({title:e,...t,id:n}),n},$S=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",LS=_S,FS=()=>$e.toasts,gt=Object.assign(LS,{success:$e.success,info:$e.info,warning:$e.warning,error:$e.error,custom:$e.custom,message:$e.message,promise:$e.promise,dismiss:$e.dismiss,loading:$e.loading},{getHistory:FS});function BS(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))}BS(`: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%)}
|
|
267
|
+
`);function ao(e){return e.label!==void 0}var WS=3,zS="32px",Th=4e3,VS=356,HS=14,GS=20,US=200;function YS(...e){return e.filter(Boolean).join(" ")}var KS=e=>{var t,n,r,o,a,s,i,u,d,f,p;let{invert:g,toast:m,unstyled:v,interacting:h,setHeights:b,visibleToasts:y,heights:w,index:x,toasts:S,expanded:C,removeToast:M,defaultRichColors:T,closeButton:D,style:k,cancelButtonStyle:W,actionButtonStyle:Y,className:O="",descriptionClassName:K="",duration:H,position:ee,gap:V,loadingIcon:q,expandByDefault:G,classNames:j,icons:Z,closeButtonAriaLabel:te="Close toast",pauseWhenPageIsHidden:R,cn:$}=e,[F,B]=P.useState(!1),[X,_]=P.useState(!1),[Q,ne]=P.useState(!1),[re,ie]=P.useState(!1),[ce,Se]=P.useState(!1),[xe,Re]=P.useState(0),[We,Pe]=P.useState(0),Le=P.useRef(m.duration||H||Th),De=P.useRef(null),vt=P.useRef(null),E=x===0,U=x+1<=y,z=m.type,le=m.dismissible!==!1,Te=m.className||"",ge=m.descriptionClassName||"",oe=P.useMemo(()=>w.findIndex(ae=>ae.toastId===m.id)||0,[w,m.id]),qe=P.useMemo(()=>{var ae;return(ae=m.closeButton)!=null?ae:D},[m.closeButton,D]);P.useMemo(()=>m.duration||H||Th,[m.duration,H]);let ot=P.useRef(0),Ce=P.useRef(0),at=P.useRef(0),st=P.useRef(null),[Xe,Cn]=ee.split("-"),ze=P.useMemo(()=>w.reduce((ae,fe,ve)=>ve>=oe?ae:ae+fe.height,0),[w,oe]),mg=IS(),vT=m.invert||g,Zs=z==="loading";Ce.current=P.useMemo(()=>oe*V+ze,[oe,ze]),P.useEffect(()=>{B(!0)},[]),P.useEffect(()=>{let ae=vt.current;if(ae){let fe=ae.getBoundingClientRect().height;return Pe(fe),b(ve=>[{toastId:m.id,height:fe,position:m.position},...ve]),()=>b(ve=>ve.filter(Ze=>Ze.toastId!==m.id))}},[b,m.id]),P.useLayoutEffect(()=>{if(!F)return;let ae=vt.current,fe=ae.style.height;ae.style.height="auto";let ve=ae.getBoundingClientRect().height;ae.style.height=fe,Pe(ve),b(Ze=>Ze.find(it=>it.toastId===m.id)?Ze.map(it=>it.toastId===m.id?{...it,height:ve}:it):[{toastId:m.id,height:ve,position:m.position},...Ze])},[F,m.title,m.description,b,m.id]);let Ot=P.useCallback(()=>{_(!0),Re(Ce.current),b(ae=>ae.filter(fe=>fe.toastId!==m.id)),setTimeout(()=>{M(m)},US)},[m,M,b,Ce]);P.useEffect(()=>{if(m.promise&&z==="loading"||m.duration===1/0||m.type==="loading")return;let ae;return C||h||R&&mg?(()=>{if(at.current<ot.current){let fe=new Date().getTime()-ot.current;Le.current=Le.current-fe}at.current=new Date().getTime()})():Le.current!==1/0&&(ot.current=new Date().getTime(),ae=setTimeout(()=>{var fe;(fe=m.onAutoClose)==null||fe.call(m,m),Ot()},Le.current)),()=>clearTimeout(ae)},[C,h,m,z,R,mg,Ot]),P.useEffect(()=>{m.delete&&Ot()},[Ot,m.delete]);function bT(){var ae,fe,ve;return Z!=null&&Z.loading?P.createElement("div",{className:$(j==null?void 0:j.loader,(ae=m==null?void 0:m.classNames)==null?void 0:ae.loader,"sonner-loader"),"data-visible":z==="loading"},Z.loading):q?P.createElement("div",{className:$(j==null?void 0:j.loader,(fe=m==null?void 0:m.classNames)==null?void 0:fe.loader,"sonner-loader"),"data-visible":z==="loading"},q):P.createElement(MS,{className:$(j==null?void 0:j.loader,(ve=m==null?void 0:m.classNames)==null?void 0:ve.loader),visible:z==="loading"})}return P.createElement("li",{tabIndex:0,ref:vt,className:$(O,Te,j==null?void 0:j.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,j==null?void 0:j.default,j==null?void 0:j[z],(n=m==null?void 0:m.classNames)==null?void 0:n[z]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:T,"data-styled":!(m.jsx||m.unstyled||v),"data-mounted":F,"data-promise":!!m.promise,"data-swiped":ce,"data-removed":X,"data-visible":U,"data-y-position":Xe,"data-x-position":Cn,"data-index":x,"data-front":E,"data-swiping":Q,"data-dismissible":le,"data-type":z,"data-invert":vT,"data-swipe-out":re,"data-expanded":!!(C||G&&F),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${X?xe:Ce.current}px`,"--initial-height":G?"auto":`${We}px`,...k,...m.style},onPointerDown:ae=>{Zs||!le||(De.current=new Date,Re(Ce.current),ae.target.setPointerCapture(ae.pointerId),ae.target.tagName!=="BUTTON"&&(ne(!0),st.current={x:ae.clientX,y:ae.clientY}))},onPointerUp:()=>{var ae,fe,ve,Ze;if(re||!le)return;st.current=null;let it=Number(((ae=vt.current)==null?void 0:ae.style.getPropertyValue("--swipe-amount").replace("px",""))||0),ho=new Date().getTime()-((fe=De.current)==null?void 0:fe.getTime()),yT=Math.abs(it)/ho;if(Math.abs(it)>=GS||yT>.11){Re(Ce.current),(ve=m.onDismiss)==null||ve.call(m,m),Ot(),ie(!0),Se(!1);return}(Ze=vt.current)==null||Ze.style.setProperty("--swipe-amount","0px"),ne(!1)},onPointerMove:ae=>{var fe,ve;if(!st.current||!le)return;let Ze=ae.clientY-st.current.y,it=((fe=window.getSelection())==null?void 0:fe.toString().length)>0,ho=Xe==="top"?Math.min(0,Ze):Math.max(0,Ze);Math.abs(ho)>0&&Se(!0),!it&&((ve=vt.current)==null||ve.style.setProperty("--swipe-amount",`${ho}px`))}},qe&&!m.jsx?P.createElement("button",{"aria-label":te,"data-disabled":Zs,"data-close-button":!0,onClick:Zs||!le?()=>{}:()=>{var ae;Ot(),(ae=m.onDismiss)==null||ae.call(m,m)},className:$(j==null?void 0:j.closeButton,(o=m==null?void 0:m.classNames)==null?void 0:o.closeButton)},(a=Z==null?void 0:Z.close)!=null?a:kS):null,m.jsx||P.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:P.createElement(P.Fragment,null,z||m.icon||m.promise?P.createElement("div",{"data-icon":"",className:$(j==null?void 0:j.icon,(s=m==null?void 0:m.classNames)==null?void 0:s.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||bT():null,m.type!=="loading"?m.icon||(Z==null?void 0:Z[z])||PS(z):null):null,P.createElement("div",{"data-content":"",className:$(j==null?void 0:j.content,(i=m==null?void 0:m.classNames)==null?void 0:i.content)},P.createElement("div",{"data-title":"",className:$(j==null?void 0:j.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:$(K,ge,j==null?void 0:j.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&&ao(m.cancel)?P.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||W,onClick:ae=>{var fe,ve;ao(m.cancel)&&le&&((ve=(fe=m.cancel).onClick)==null||ve.call(fe,ae),Ot())},className:$(j==null?void 0:j.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&&ao(m.action)?P.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||Y,onClick:ae=>{var fe,ve;ao(m.action)&&((ve=(fe=m.action).onClick)==null||ve.call(fe,ae),!ae.defaultPrevented&&Ot())},className:$(j==null?void 0:j.actionButton,(p=m==null?void 0:m.classNames)==null?void 0:p.actionButton)},m.action.label):null))};function Mh(){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 qS=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:g,visibleToasts:m=WS,toastOptions:v,dir:h=Mh(),gap:b=HS,loadingIcon:y,icons:w,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:S,cn:C=YS}=e,[M,T]=P.useState([]),D=P.useMemo(()=>Array.from(new Set([r].concat(M.filter(R=>R.position).map(R=>R.position)))),[M,r]),[k,W]=P.useState([]),[Y,O]=P.useState(!1),[K,H]=P.useState(!1),[ee,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,""),j=P.useRef(null),Z=P.useRef(!1),te=P.useCallback(R=>{T($=>{var F;return(F=$.find(B=>B.id===R.id))!=null&&F.delete||$e.dismiss(R.id),$.filter(({id:B})=>B!==R.id)})},[]);return P.useEffect(()=>$e.subscribe(R=>{if(R.dismiss){T($=>$.map(F=>F.id===R.id?{...F,delete:!0}:F));return}setTimeout(()=>{En.flushSync(()=>{T($=>{let F=$.findIndex(B=>B.id===R.id);return F!==-1?[...$.slice(0,F),{...$[F],...R},...$.slice(F+1)]:[R,...$]})})})}),[]),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 R=window.matchMedia("(prefers-color-scheme: dark)");try{R.addEventListener("change",({matches:$})=>{V($?"dark":"light")})}catch{R.addListener(({matches:F})=>{try{V(F?"dark":"light")}catch(B){console.error(B)}})}},[d]),P.useEffect(()=>{M.length<=1&&O(!1)},[M]),P.useEffect(()=>{let R=$=>{var F,B;o.every(X=>$[X]||$.code===X)&&(O(!0),(F=q.current)==null||F.focus()),$.code==="Escape"&&(document.activeElement===q.current||(B=q.current)!=null&&B.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[o]),P.useEffect(()=>{if(q.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,Z.current=!1)}},[q.current]),P.createElement("section",{"aria-label":`${x} ${G}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},D.map((R,$)=>{var F;let[B,X]=R.split("-");return M.length?P.createElement("ol",{key:R,dir:h==="auto"?Mh():h,tabIndex:-1,ref:q,className:i,"data-sonner-toaster":!0,"data-theme":ee,"data-y-position":B,"data-lifted":Y&&M.length>1&&!a,"data-x-position":X,style:{"--front-toast-height":`${((F=k[0])==null?void 0:F.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||zS,"--width":`${VS}px`,"--gap":`${b}px`,...g},onBlur:_=>{Z.current&&!_.currentTarget.contains(_.relatedTarget)&&(Z.current=!1,j.current&&(j.current.focus({preventScroll:!0}),j.current=null))},onFocus:_=>{_.target instanceof HTMLElement&&_.target.dataset.dismissible==="false"||Z.current||(Z.current=!0,j.current=_.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{K||O(!1)},onPointerDown:_=>{_.target instanceof HTMLElement&&_.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},M.filter(_=>!_.position&&$===0||_.position===R).map((_,Q)=>{var ne,re;return P.createElement(KS,{key:_.id,icons:w,index:Q,toast:_,defaultRichColors:f,duration:(ne=v==null?void 0:v.duration)!=null?ne:p,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:m,closeButton:(re=v==null?void 0:v.closeButton)!=null?re:s,interacting:K,position:R,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:te,toasts:M.filter(ie=>ie.position==_.position),heights:k.filter(ie=>ie.position==_.position),setHeights:W,expandByDefault:a,gap:b,loadingIcon:y,expanded:Y,pauseWhenPageIsHidden:S,cn:C})})):null}))});const so=({onClick:e})=>l.jsx(Ne,{onClick:()=>e(),variant:"ghost",size:"xl",className:"ml-auto px-3",children:l.jsx(sr,{className:"!h-6 !w-6"})}),XS={...gt,success:(e,t)=>{const n=gt.success(e,{...t,cancel:l.jsx(so,{onClick:()=>gt.dismiss(n)})});return n},error:(e,t)=>{const n=gt.error(e,{...t,cancel:l.jsx(so,{onClick:()=>gt.dismiss(n)})});return n},warning:(e,t)=>{const n=gt.warning(e,{...t,cancel:l.jsx(so,{onClick:()=>gt.dismiss(n)})});return n},info:(e,t)=>{const n=gt.info(e,{...t,cancel:l.jsx(so,{onClick:()=>gt.dismiss(n)})});return n}},ZS=({...e})=>l.jsx(qS,{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 QS="Toggle",Bs=c.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...a}=e,[s=!1,i]=Ee({prop:n,onChange:o,defaultProp:r});return l.jsx(L.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:I(e.onClick,()=>{e.disabled||i(!s)})})});Bs.displayName=QS;var Rh=Bs;const Ws=$t("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"}}),Dh=c.forwardRef(({className:e,variant:t,size:n,...r},o)=>l.jsx(Rh,{ref:o,className:A(Ws({variant:t,size:n,className:e})),...r}));Dh.displayName=Rh.displayName;var wn="ToggleGroup",[Ah,BT]=ye(wn,[Rt]),jh=Rt(),zs=P.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return l.jsx(JS,{...o,ref:t})}if(n==="multiple"){const o=r;return l.jsx(eP,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${wn}\``)});zs.displayName=wn;var[kh,Ih]=Ah(wn),JS=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,i]=Ee({prop:n,defaultProp:r,onChange:o});return l.jsx(kh,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:i,onItemDeactivate:P.useCallback(()=>i(""),[i]),children:l.jsx(Oh,{...a,ref:t})})}),eP=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s=[],i]=Ee({prop:n,defaultProp:r,onChange:o}),u=P.useCallback(f=>i((p=[])=>[...p,f]),[i]),d=P.useCallback(f=>i((p=[])=>p.filter(g=>g!==f)),[i]);return l.jsx(kh,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:d,children:l.jsx(Oh,{...a,ref:t})})});zs.displayName=wn;var[tP,nP]=Ah(wn),Oh=P.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:s,loop:i=!0,...u}=e,d=jh(n),f=xt(s),p={role:"group",dir:f,...u};return l.jsx(tP,{scope:n,rovingFocus:o,disabled:r,children:o?l.jsx(Gr,{asChild:!0,...d,orientation:a,dir:f,loop:i,children:l.jsx(L.div,{...p,ref:t})}):l.jsx(L.div,{...p,ref:t})})}),io="ToggleGroupItem",_h=P.forwardRef((e,t)=>{const n=Ih(io,e.__scopeToggleGroup),r=nP(io,e.__scopeToggleGroup),o=jh(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(Ur,{asChild:!0,...o,focusable:!s,active:a,ref:u,children:l.jsx($h,{...i,ref:t})}):l.jsx($h,{...i,ref:t})});_h.displayName=io;var $h=P.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=Ih(io,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=a.type==="single"?s:void 0;return l.jsx(Bs,{...i,...o,ref:t,onPressedChange:u=>{u?a.onItemActivate(r):a.onItemDeactivate(r)}})}),Lh=zs,Fh=_h;const Bh=c.createContext({size:"default",variant:"default"}),Wh=c.forwardRef(({className:e,variant:t,size:n,children:r,...o},a)=>l.jsx(Lh,{ref:a,className:A("flex items-center justify-center gap-1",e),...o,children:l.jsx(Bh.Provider,{value:{variant:t,size:n},children:r})}));Wh.displayName=Lh.displayName;const zh=c.forwardRef(({className:e,children:t,variant:n,size:r,...o},a)=>{const s=c.useContext(Bh);return l.jsx(Fh,{ref:a,className:A(Ws({variant:s.variant||n,size:s.size||r}),e),...o,children:t})});zh.displayName=Fh.displayName;var[lo,WT]=ye("Tooltip",[Mt]),co=Mt(),Vh="TooltipProvider",rP=700,Vs="tooltip.open",[oP,Hs]=lo(Vh),Hh=e=>{const{__scopeTooltip:t,delayDuration:n=rP,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(oP,{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})};Hh.displayName=Vh;var uo="Tooltip",[aP,er]=lo(uo),Gh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,u=Hs(uo,e.__scopeTooltip),d=co(t),[f,p]=c.useState(null),g=me(),m=c.useRef(0),v=s??u.disableHoverableContent,h=i??u.delayDuration,b=c.useRef(!1),[y=!1,w]=Ee({prop:r,defaultProp:o,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(Vs))):u.onClose(),a==null||a(T)}}),x=c.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),S=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b.current=!1,w(!0)},[w]),C=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},h)},[h,w]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),l.jsx(Vn,{...d,children:l.jsx(aP,{scope:t,contentId:g,open:y,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{u.isOpenDelayed?M():S()},[u.isOpenDelayed,M,S]),onTriggerLeave:c.useCallback(()=>{v?C():(window.clearTimeout(m.current),m.current=0)},[C,v]),onOpen:S,onClose:C,disableHoverableContent:v,children:n})})};Gh.displayName=uo;var Gs="TooltipTrigger",Uh=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=er(Gs,n),a=Hs(Gs,n),s=co(n),i=c.useRef(null),u=J(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(Hn,{asChild:!0,...s,children:l.jsx(L.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:I(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:I(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:I(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:I(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:I(e.onBlur,o.onClose),onClick:I(e.onClick,o.onClose)})})});Uh.displayName=Gs;var Us="TooltipPortal",[sP,iP]=lo(Us,{forceMount:void 0}),Yh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=er(Us,t);return l.jsx(sP,{scope:t,forceMount:n,children:l.jsx(be,{present:n||a.open,children:l.jsx(jn,{asChild:!0,container:o,children:r})})})};Yh.displayName=Us;var xn="TooltipContent",Kh=c.forwardRef((e,t)=>{const n=iP(xn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=er(xn,e.__scopeTooltip);return l.jsx(be,{present:r||s.open,children:s.disableHoverableContent?l.jsx(qh,{side:o,...a,ref:t}):l.jsx(lP,{side:o,...a,ref:t})})}),lP=c.forwardRef((e,t)=>{const n=er(xn,e.__scopeTooltip),r=Hs(xn,e.__scopeTooltip),o=c.useRef(null),a=J(t,o),[s,i]=c.useState(null),{trigger:u,onClose:d}=n,f=o.current,{onPointerInTransitChange:p}=r,g=c.useCallback(()=>{i(null),p(!1)},[p]),m=c.useCallback((v,h)=>{const b=v.currentTarget,y={x:v.clientX,y:v.clientY},w=fP(y,b.getBoundingClientRect()),x=mP(y,w),S=pP(h.getBoundingClientRect()),C=gP([...x,...S]);i(C),p(!0)},[p]);return c.useEffect(()=>()=>g(),[g]),c.useEffect(()=>{if(u&&f){const v=b=>m(b,f),h=b=>m(b,u);return u.addEventListener("pointerleave",v),f.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",h)}}},[u,f,m,g]),c.useEffect(()=>{if(s){const v=h=>{const b=h.target,y={x:h.clientX,y:h.clientY},w=(u==null?void 0:u.contains(b))||(f==null?void 0:f.contains(b)),x=!hP(y,s);w?g():x&&(g(),d())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,f,s,d,g]),l.jsx(qh,{...e,ref:a})}),[cP,uP]=lo(uo,{isInside:!1}),qh=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,u=er(xn,n),d=co(n),{onClose:f}=u;return c.useEffect(()=>(document.addEventListener(Vs,f),()=>document.removeEventListener(Vs,f)),[f]),c.useEffect(()=>{if(u.trigger){const p=g=>{const m=g.target;m!=null&&m.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),l.jsx(Lt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs(zr,{"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(jo,{children:r}),l.jsx(cP,{scope:n,isInside:!0,children:l.jsx(am,{id:u.contentId,role:"tooltip",children:o||r})})]})})});Kh.displayName=xn;var Xh="TooltipArrow",dP=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=co(n);return uP(Xh,n).isInside?null:l.jsx(Vr,{...o,...r,ref:t})});dP.displayName=Xh;function fP(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 mP(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 pP(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 hP(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 gP(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),vP(t)}function vP(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 bP=Hh,yP=Gh,wP=Uh,xP=Yh,Zh=Kh;const CP=bP,EP=yP,NP=wP,Qh=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(xP,{children:l.jsx(Zh,{ref:r,sideOffset:t,className:A("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})}));Qh.displayName=Zh.displayName;function SP(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(Tr,{open:r,onOpenChange:o,children:[l.jsx(Gu,{asChild:!0,children:t}),l.jsxs(Fn,{className:"sm:max-w-[425px]",children:[l.jsxs(Mr,{className:A(n[a].title===""&&"sr-only"),children:[l.jsx(Rr,{children:n[a].title}),l.jsx(Dr,{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(Ne,{variant:"ghost",size:"icon",onClick:u,disabled:a===0,children:l.jsx(Ro,{className:"h-4 w-4"})}),l.jsx("div",{className:"flex justify-center gap-1",children:n.map((d,f)=>l.jsx("div",{className:A("h-3 w-3 rounded-full",f===a?"bg-primary":"bg-gray-200")},f))}),l.jsx(Ne,{variant:"ghost",size:"icon",onClick:i,disabled:a===n.length-1,children:l.jsx(ar,{className:"h-4 w-4"})})]})]})]})}const PP=e=>l.jsx("div",{className:"unreset",dangerouslySetInnerHTML:{__html:e.children}}),TP=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(Ne,{variant:"outline",size:"icon",onClick:()=>t("bold"),children:l.jsx(Kb,{size:16})}),l.jsx(Ne,{variant:"outline",size:"icon",onClick:()=>t("italic"),children:l.jsx(oy,{size:16})}),l.jsx(Ne,{variant:"outline",size:"icon",onClick:()=>t("underline"),children:l.jsx(uy,{size:16})}),l.jsxs(Vp,{onValueChange:a=>o(a),defaultValue:"3",children:[l.jsx(js,{className:"w-[80px]",children:l.jsx(Hp,{placeholder:"Size"})}),l.jsxs(Os,{children:[l.jsx(yn,{value:"1",children:l.jsx("div",{children:"Small"})}),l.jsx(yn,{value:"3",children:l.jsx("div",{children:"Medium"})}),l.jsx(yn,{value:"5",children:l.jsx("div",{children:"Large"})}),l.jsx(yn,{value:"7",children:l.jsx("div",{children:"Extra Large"})})]})]}),l.jsx(Ne,{variant:"outline",size:"icon",onClick:()=>t("insertUnorderedList"),children:l.jsx(iy,{size:16})}),l.jsx(Ne,{variant:"outline",size:"icon",onClick:()=>t("insertOrderedList"),children:l.jsx(sy,{size:16})}),l.jsx(Ne,{variant:"outline",size:"icon",onClick:()=>t("formatBlock","blockquote"),children:l.jsx(cy,{size:16})}),l.jsx(Ne,{variant:"outline",size:"icon",onClick:n,children:l.jsx(ny,{size:16})}),l.jsx(Ne,{variant:"outline",size:"icon",onClick:r,children:l.jsx(ay,{size:16})})]})},MP=({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:A("w-full p-4 border rounded-lg shadow-md",n),children:[l.jsx(TP,{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})]})},RP=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:A("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:A("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:A("animate-fade-up animate-duration-[400ms] animate-ease-linear w-full h-full object-cover",r==null?void 0:r.image)})},u))})},DP=e=>{const{currentMonth:t,currentYear:n,onChangeMonthYear:r,locale:o=wo}=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(Ne,{variant:"ghost",size:"icon",onClick:()=>a("prev"),"aria-label":"Previous month",children:l.jsx(Ub,{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(Ne,{variant:"ghost",size:"icon",onClick:()=>a("next"),"aria-label":"Next month",children:l.jsx(Yb,{className:"!h-8 !w-8"})})]})};function Jh({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 g=Math.min(p+t-3,e-1);g-p+3<t&&(p=Math.max(g-t+4,2)),d.push(l.jsx(ht,{children:l.jsx(Ut,{onClick:m=>{m.preventDefault(),i(1)},isActive:a===1,children:"1"})},1)),p>2&&d.push(l.jsx(ht,{children:l.jsx(Jr,{})},"start-ellipsis"));for(let m=p;m<=g;m++)d.push(l.jsx(ht,{children:l.jsx(Ut,{onClick:v=>{v.preventDefault(),i(m)},isActive:a===m,children:m})},m));return g<e-1&&d.push(l.jsx(ht,{children:l.jsx(Jr,{})},"end-ellipsis")),e>1&&d.push(l.jsx(ht,{children:l.jsx(Ut,{onClick:m=>{m.preventDefault(),i(e)},isActive:a===e,children:e})},e)),d};return l.jsx(vs,{children:l.jsxs(bs,{children:[l.jsx(ht,{children:l.jsx(ys,{disabled:a===1,onClick:d=>{d.preventDefault(),i(a-1)}})}),u(),l.jsx(ht,{children:l.jsx(ws,{disabled:a===e,onClick:d=>{d.preventDefault(),i(a+1)}})})]})})}const eg=({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(Jh,{current:a,onPageChange:t,totalPages:r})]}),AP=e=>{const{data:t=[],perPage:n=50,initialPage:r=1,children:o,itemsContainerClass:a="",emptyState:s=l.jsx(Fi,{notFoundText:"No item found!"}),isLoading:i=!1,showItemsCounter:u=!0,loadingVariant:d="loader"}=e,[f,p]=P.useState(t),[g,m]=P.useState(r),v=Math.ceil(f.length/n),h=(g-1)*n,b=g*n,y=f.slice(h,b),w=i?l.jsx("section",{className:"w-full",children:d==="loader"?l.jsx(qp,{size:"lg"}):l.jsx(Yp,{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(eg,{initIndex:h,endIndex:b,totalItems:f.length,totalPages:v,currentPage:g,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,S)=>l.jsx(P.Fragment,{children:o(x,S)},x.id))}),l.jsx(eg,{initIndex:h,endIndex:b,totalItems:f.length,totalPages:v,currentPage:g,pageTotalItems:y.length,onPageChange:m,showItemsCounter:u})]})},jP=({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 g;e||(n?n(!1):s(!1),(g=u.current)==null||g.focus())},p=g=>{i.current&&!i.current.contains(g.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:A("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"})]})},kP=({children:e,className:t})=>l.jsx("header",{className:A("p-4 flex justify-between items-center border-b",t),"aria-label":"Sidebar header",children:e}),IP=({children:e,className:t})=>l.jsx("nav",{"aria-label":"Sidebar navigation",className:t,children:e}),OP=({children:e,className:t})=>l.jsx("ul",{className:A("flex flex-col gap-2 my-4 px-4",t),children:e}),_P=({children:e,className:t,onClick:n})=>l.jsx("li",{className:A("flex items-center gap-2 hover:bg-gray-100 rounded transition-colors",t),onClick:n,children:e}),$P=({children:e,className:t})=>l.jsx("footer",{className:A("mt-auto p-4 text-sm",t),"aria-label":"Sidebar footer",children:e}),LP=()=>{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 FP(){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 BP(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 tg=c.createContext(void 0),ng={sm:"sm:max-w-[425px]",md:"sm:max-w-[550px]",lg:"sm:max-w-[700px]",xl:"sm:max-w-[900px]"},rg={info:{icon:ry,className:"text-blue-500"},success:{icon:Zb,className:"text-green-500"},error:{icon:Do,className:"text-red-500"},warning:{icon:Xb,className:"text-yellow-500"},confirm:{icon:_i,className:"text-blue-500"},custom:{icon:_i,className:"text-gray-500"}};function WP({children:e}){var h,b,y,w,x,S,C,M,T,D,k,W,Y;const[t,n]=c.useState({isOpen:!1,options:null}),r=c.useCallback(O=>{n({isOpen:!0,options:O})},[]),o=c.useCallback(()=>{n(O=>({...O,isOpen:!1}))},[]),a=c.useCallback(O=>{r({...O,type:"info"})},[r]),s=c.useCallback(O=>{r({...O,type:"success"})},[r]),i=c.useCallback(O=>{r({...O,type:"error"})},[r]),u=c.useCallback(O=>{r({...O,type:"warning"})},[r]),d=c.useCallback(O=>{r({...O,type:"custom"})},[r]),f=c.useCallback(O=>{r({...O,type:"confirm"})},[r]),p=(O,K)=>{let H=rg[O].icon;return K&&(H=K),l.jsx(H,{className:A("h-24 w-24",rg[O].className)})},g=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,v]=c.useState(!1);return l.jsxs(tg.Provider,{value:g,children:[e,l.jsx(Tr,{open:t.isOpen,onOpenChange:O=>!O&&o(),modal:!0,children:l.jsxs(Fn,{className:A((h=t.options)!=null&&h.size?ng[t.options.size]:ng.sm,(b=t.options)==null?void 0:b.className),children:[t.options&&l.jsxs(Mr,{children:[l.jsx("div",{className:"mx-auto mb-6",children:p(t.options.type,t.options.icon)}),t.options.title&&l.jsx(Rr,{className:"text-center",children:t.options.title}),l.jsx(Dr,{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(Ne,{isLoading:m??((x=(w=t.options)==null?void 0:w.confirmButton)==null?void 0:x.loading),disabled:(C=(S=t.options)==null?void 0:S.confirmButton)==null?void 0:C.disabled,className:(M=t.options.confirmButton)==null?void 0:M.className,onClick:()=>{var K,H,ee,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 O=(V=(ee=t.options)==null?void 0:ee.confirmButton)==null?void 0:V.onClick();O instanceof Promise?(v(!0),O.then(()=>{v(!1),o()}).finally(()=>v(!1))):o()},children:((T=t.options.confirmButton)==null?void 0:T.label)??"Confirm"}),((D=t.options.cancelButton)==null?void 0:D.label)&&l.jsx(Ne,{variant:"outline",onClick:o,className:t.options.cancelButton.className,isLoading:(k=t.options.cancelButton)==null?void 0:k.loading,disabled:m||((W=t.options.cancelButton)==null?void 0:W.disabled),children:(Y=t.options.cancelButton)==null?void 0:Y.label})]})]})})]})}function zP(){const e=c.useContext(tg);if(e===void 0)throw new Error("useDialog must be used within a DialogProvider");return e}const VP=(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}},HP=(e=!1)=>{const[t,n]=c.useState(e),r=c.useCallback(()=>n(!0),[]),o=c.useCallback(()=>n(!1),[]);return[t,r,o]};/*!
|
|
264
268
|
* Compressor.js v1.2.1
|
|
265
269
|
* https://fengyuanchen.github.io/compressorjs
|
|
266
270
|
*
|
|
@@ -268,4 +272,4 @@ Defaulting to \`null\`.`}var tm=qf,iN=Qf;const ps=c.forwardRef(({className:e,val
|
|
|
268
272
|
* Released under the MIT license
|
|
269
273
|
*
|
|
270
274
|
* Date: 2023-02-28T14:09:41.732Z
|
|
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"})});
|
|
275
|
+
*/function og(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 fo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?og(Object(n),!0).forEach(function(r){YP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):og(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ag(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,sg(r.key),r)}}function UP(e,t,n){return ag(e.prototype,t),ag(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function YP(e,t,n){return t=sg(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mo(){return mo=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},mo.apply(this,arguments)}function KP(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 sg(e){var t=KP(e,"string");return typeof t=="symbol"?t:String(t)}var ig={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,g,m,v,h,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],g=u.slice(d[0].length),p?m=atob(g):m=decodeURIComponent(g),v=new ArrayBuffer(m.length),h=new Uint8Array(v),b=0;b<m.length;b+=1)h[b]=m.charCodeAt(b);return r?new Blob([o?h:v],{type:f}):(y=new a,y.append(v),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)})(ig);var lg=ig.exports,qP=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},cg={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},XP=typeof window<"u"&&typeof window.document<"u",It=XP?window:{},po=function(t){return t>0&&t<1/0},ZP=Array.prototype.slice;function Ys(e){return Array.from?Array.from(e):ZP.call(e)}var QP=/^image\/.+$/;function Ks(e){return QP.test(e)}function JP(e){var t=Ks(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var ug=String.fromCharCode;function eT(e,t,n){var r="",o;for(n+=t,o=t;o<n;o+=1)r+=ug(e.getUint8(o));return r}var tT=It.btoa;function dg(e,t){for(var n=[],r=8192,o=new Uint8Array(e);o.length>0;)n.push(ug.apply(null,Ys(o.subarray(0,r)))),o=o.subarray(r);return"data:".concat(t,";base64,").concat(tT(n.join("")))}function nT(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(eT(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 g=t.getUint16(a,r),m,v;for(v=0;v<g;v+=1)if(m=a+v*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 rT(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 oT=/\.\d*(?:0|9){12}\d*$/;function fg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return oT.test(e)?Math.round(e*t)/t:e}function tr(e){var t=e.aspectRatio,n=e.height,r=e.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",a=po(r),s=po(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 aT(e){for(var t=Ys(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 sT(e,t){var n=Ys(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 iT=It.ArrayBuffer,qs=It.FileReader,Kt=It.URL||It.webkitURL,lT=/\.\w+$/,cT=It.Compressor,uT=function(){function e(t,n){GP(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=fo(fo({},cg),n),this.aborted=!1,this.result=null,this.init()}return UP(e,[{key:"init",value:function(){var n=this,r=this.file,o=this.options;if(!qP(r)){this.fail(new Error("The first argument must be a File or Blob object."));return}var a=r.type;if(!Ks(a)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!Kt||!qs){this.fail(new Error("The current browser does not support image compression."));return}iT||(o.checkOrientation=!1,o.retainExif=!1);var s=a==="image/jpeg",i=s&&o.checkOrientation,u=s&&o.retainExif;if(Kt&&!i&&!u)this.load({url:Kt.createObjectURL(r)});else{var d=new qs;this.reader=d,d.onload=function(f){var p=f.target,g=p.result,m={},v=1;i&&(v=nT(g),v>1&&mo(m,rT(v))),u&&(n.exif=aT(g)),i||u?!Kt||v>1?m.url=dg(g,a):m.url=Kt.createObjectURL(r):m.url=g,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(fo(fo({},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."))},It.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(It.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,g=this.file,m=this.image,v=this.options,h=document.createElement("canvas"),b=h.getContext("2d"),y=Math.abs(i)%180===90,w=(v.resize==="contain"||v.resize==="cover")&&po(v.width)&&po(v.height),x=Math.max(v.maxWidth,0)||1/0,S=Math.max(v.maxHeight,0)||1/0,C=Math.max(v.minWidth,0)||0,M=Math.max(v.minHeight,0)||0,T=o/a,D=v.width,k=v.height;if(y){var W=[S,x];x=W[0],S=W[1];var Y=[M,C];C=Y[0],M=Y[1];var O=[k,D];D=O[0],k=O[1]}w&&(T=D/k);var K=tr({aspectRatio:T,width:x,height:S},"contain");x=K.width,S=K.height;var H=tr({aspectRatio:T,width:C,height:M},"cover");if(C=H.width,M=H.height,w){var ee=tr({aspectRatio:T,width:D,height:k},v.resize);D=ee.width,k=ee.height}else{var V=tr({aspectRatio:T,width:D,height:k}),q=V.width;D=q===void 0?o:q;var G=V.height;k=G===void 0?a:G}D=Math.floor(fg(Math.min(Math.max(D,C),x))),k=Math.floor(fg(Math.min(Math.max(k,M),S)));var j=-D/2,Z=-k/2,te=D,R=k,$=[];if(w){var F=0,B=0,X=o,_=a,Q=tr({aspectRatio:T,width:o,height:a},{contain:"cover",cover:"contain"}[v.resize]);X=Q.width,_=Q.height,F=(o-X)/2,B=(a-_)/2,$.push(F,B,X,_)}if($.push(j,Z,te,R),y){var ne=[k,D];D=ne[0],k=ne[1]}h.width=D,h.height=k,Ks(v.mimeType)||(v.mimeType=g.type);var re="transparent";g.size>v.convertSize&&v.convertTypes.indexOf(v.mimeType)>=0&&(v.mimeType="image/jpeg");var ie=v.mimeType==="image/jpeg";if(ie&&(re="#fff"),b.fillStyle=re,b.fillRect(0,0,D,k),v.beforeDraw&&v.beforeDraw.call(this,b,h),!this.aborted&&(b.save(),b.translate(D/2,k/2),b.rotate(i*Math.PI/180),b.scale(d,p),b.drawImage.apply(b,[m].concat($)),b.restore(),v.drew&&v.drew.call(this,b,h),!this.aborted)){var ce=function(xe){if(!r.aborted){var Re=function(De){return r.done({naturalWidth:o,naturalHeight:a,result:De})};if(xe&&ie&&v.retainExif&&r.exif&&r.exif.length>0){var We=function(De){return Re(lg(dg(sT(De,r.exif),v.mimeType)))};if(xe.arrayBuffer)xe.arrayBuffer().then(We).catch(function(){r.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var Pe=new qs;r.reader=Pe,Pe.onload=function(Le){var De=Le.target;We(De.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(xe)}}else Re(xe)}};h.toBlob?h.toBlob(ce,v.mimeType,v.quality):ce(lg(h.toDataURL(v.mimeType,v.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(Kt&&i.src.indexOf("blob:")===0&&Kt.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(lT,JP(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=cT,e}},{key:"setDefaults",value:function(n){mo(cg,n)}}]),e}();const dT=()=>({compressImage:async(n,r)=>await new Promise((o,a)=>{new uT(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]}}),fT=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 mT(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 pT(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 Xs=768;function hT(){const[e,t]=c.useState(void 0);return c.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Xs-1}px)`),r=()=>{t(window.innerWidth<Xs)};return n.addEventListener("change",r),t(window.innerWidth<Xs),()=>n.removeEventListener("change",r)},[]),!!e}const gT=()=>{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=Wy,N.AccordionContent=ll,N.AccordionItem=sl,N.AccordionTrigger=il,N.AdaptiveInput=mr,N.AlertDialog=yx,N.AlertDialogAction=Pc,N.AlertDialogCancel=Tc,N.AlertDialogContent=xc,N.AlertDialogDescription=Sc,N.AlertDialogFooter=Ec,N.AlertDialogHeader=Cc,N.AlertDialogOverlay=ta,N.AlertDialogPortal=wc,N.AlertDialogTitle=Nc,N.AlertDialogTrigger=wx,N.Autocomplete=xx,N.Avatar=$c,N.AvatarFallback=Fc,N.AvatarImage=Lc,N.Badge=ra,N.BentoCard=zb,N.BentoGrid=Wb,N.Button=Ne,N.Calendar=e0,N.Card=Wc,N.CardContent=Gc,N.CardDescription=Hc,N.CardFooter=Uc,N.CardHeader=zc,N.CardTitle=Vc,N.Checkbox=Qc,N.Command=Ar,N.CommandDialog=dC,N.CommandEmpty=Ma,N.CommandGroup=jr,N.CommandInput=Pa,N.CommandItem=un,N.CommandList=Ta,N.CommandSeparator=Ra,N.CommandShortcut=Ku,N.CurrencyInput=qu,N.Dialog=Tr,N.DialogClose=uC,N.DialogContent=Fn,N.DialogDescription=Dr,N.DialogFooter=Yu,N.DialogHeader=Mr,N.DialogOverlay=Sa,N.DialogPortal=Uu,N.DialogProvider=WP,N.DialogTitle=Rr,N.DialogTrigger=Gu,N.DropdownMenu=_E,N.DropdownMenuCheckboxItem=jf,N.DropdownMenuContent=Df,N.DropdownMenuGroup=LE,N.DropdownMenuItem=Af,N.DropdownMenuLabel=If,N.DropdownMenuPortal=FE,N.DropdownMenuRadioGroup=WE,N.DropdownMenuRadioItem=kf,N.DropdownMenuSeparator=Of,N.DropdownMenuShortcut=_f,N.DropdownMenuSub=BE,N.DropdownMenuSubContent=Rf,N.DropdownMenuSubTrigger=Mf,N.DropdownMenuTrigger=$E,N.EmptyItems=Fi,N.HelpCarousel=SP,N.HtmlTextArea=PP,N.HtmlTextEditor=MP,N.Input=fr,N.Label=Ff,N.LazyImageGallery=RP,N.MonthNavigator=DP,N.MultiSelect=om,N.NavigationMenu=km,N.NavigationMenuContent=$m,N.NavigationMenuIndicator=Lm,N.NavigationMenuItem=NN,N.NavigationMenuLink=SN,N.NavigationMenuList=Im,N.NavigationMenuTrigger=_m,N.NavigationMenuViewport=gs,N.PaginatedItems=AP,N.Pagination=vs,N.PaginationContent=bs,N.PaginationControls=Jh,N.PaginationEllipsis=Jr,N.PaginationItem=ht,N.PaginationLink=Ut,N.PaginationNext=ws,N.PaginationPrevious=ys,N.PasswordInput=kN,N.Popover=Qf,N.PopoverAnchor=nN,N.PopoverContent=os,N.PopoverTrigger=Jf,N.Progress=Es,N.RadioGroup=ap,N.RadioGroupItem=sp,N.Select=Vp,N.SelectContent=Os,N.SelectGroup=pS,N.SelectItem=yn,N.SelectLabel=Gp,N.SelectScrollDownButton=Is,N.SelectScrollUpButton=ks,N.SelectSeparator=Up,N.SelectTrigger=js,N.SelectValue=Hp,N.Separator=Xr,N.Sidebar=jP,N.SidebarFooter=$P,N.SidebarHeader=kP,N.SidebarList=OP,N.SidebarListItem=_P,N.SidebarNav=IP,N.Skeleton=Yp,N.Spinner=qp,N.Switch=th,N.Table=nh,N.TableBody=oh,N.TableCaption=ch,N.TableCell=lh,N.TableFooter=ah,N.TableHead=ih,N.TableHeader=rh,N.TableRow=sh,N.Tabs=SS,N.TabsContent=Sh,N.TabsList=Eh,N.TabsTrigger=Nh,N.Textarea=Ph,N.Toaster=ZS,N.Toggle=Dh,N.ToggleGroup=Wh,N.ToggleGroupItem=zh,N.Tooltip=EP,N.TooltipContent=Qh,N.TooltipProvider=CP,N.TooltipTrigger=NP,N.badgeVariants=Bc,N.buttonVariants=Cr,N.capitalize=Bb,N.cn=A,N.formatCurrency=wb,N.formatDateAndMonth=Rb,N.formatDateAndTime=Nb,N.formatDateAndWeekday=Tb,N.formatDateAndWeekdayAndYear=Mb,N.formatDateDayMonth=Eb,N.formatDateMonthYear=Cb,N.formatDateUTC=xb,N.formatLongDate=Db,N.formatShortDate=Ab,N.formatWeekDayAndShortDate=kb,N.getLongDate=Pb,N.getMonthName=Sb,N.getMonthYearFromISODate=jb,N.mergeObjects=Mo,N.navigationMenuTriggerStyle=Om,N.normalizeString=Ie,N.normalizeStringToCompare=Ib,N.padString=To,N.sortByField=$b,N.sortByFieldDesc=Lb,N.sortByName=_b,N.sortByNestedField=Fb,N.sortNormalize=Ob,N.spinnerColors=hS,N.spinnerSizes=gS,N.toast=XS,N.toggleVariants=Ws,N.useArray=LP,N.useCopyToClipboard=FP,N.useDebounce=BP,N.useDialog=zP,N.useDisclosure=VP,N.useDisclosureBool=HP,N.useFileUtilities=dT,N.useIsMobile=hT,N.useKeyPress=fT,N.useLocalStorage=mT,N.useMediaQuery=pT,N.usePWAInstall=gT,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|