buildgrid-ui 1.14.2 → 1.14.4
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/blocks/data-table/components/table-header.d.ts +2 -1
- package/dist/blocks/data-table/components/table-row.d.ts +2 -1
- package/dist/blocks/data-table/types/data-table.d.ts +13 -0
- package/dist/blocks/pagination-controls/pagination-controls.d.ts +1 -0
- package/dist/buildgrid-ui.es.js +3629 -3618
- package/dist/buildgrid-ui.umd.js +61 -61
- package/package.json +1 -1
package/dist/buildgrid-ui.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(N,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],C):(N=typeof globalThis<"u"?globalThis:N||self,C(N.BuildgridUI={},N.React,N.ReactDOM))})(this,function(N,C,
|
|
1
|
+
(function(N,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],C):(N=typeof globalThis<"u"?globalThis:N||self,C(N.BuildgridUI={},N.React,N.ReactDOM))})(this,function(N,C,nr){"use strict";function oi(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 d=oi(C),rr=oi(nr);var or={exports:{}},Nn={};/**
|
|
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 ai;function Uh(){if(ai)return Nn;ai=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 l in o)l!=="key"&&(a[l]=o[l])}else a=o;return o=a.ref,{$$typeof:e,type:r,key:s,ref:o!==void 0?o:null,props:a}}return Nn.Fragment=t,Nn.jsx=n,Nn.jsxs=n,Nn}var Sn={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,207 +14,207 @@
|
|
|
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
|
|
17
|
+
*/var si;function Yh(){return si||(si=1,process.env.NODE_ENV!=="production"&&function(){function e(M){if(M==null)return null;if(typeof M=="function")return M.$$typeof===$?null:M.displayName||M.name||null;if(typeof M=="string")return M;switch(M){case g:return"Fragment";case y:return"Profiler";case b:return"StrictMode";case E:return"Suspense";case A:return"SuspenseList";case j:return"Activity"}if(typeof M=="object")switch(typeof M.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),M.$$typeof){case v:return"Portal";case x:return(M.displayName||"Context")+".Provider";case w:return(M._context.displayName||"Context")+".Consumer";case S:var U=M.render;return M=M.displayName,M||(M=U.displayName||U.name||"",M=M!==""?"ForwardRef("+M+")":"ForwardRef"),M;case k:return U=M.displayName||null,U!==null?U:e(M.type)||"Memo";case P:U=M._payload,M=M._init;try{return e(M(U))}catch{}}return null}function t(M){return""+M}function n(M){try{t(M);var U=!1}catch{U=!0}if(U){U=console;var T=U.error,I=typeof Symbol=="function"&&Symbol.toStringTag&&M[Symbol.toStringTag]||M.constructor.name||"Object";return T.call(U,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",I),t(M)}}function r(M){if(M===g)return"<>";if(typeof M=="object"&&M!==null&&M.$$typeof===P)return"<...>";try{var U=e(M);return U?"<"+U+">":"<...>"}catch{return"<...>"}}function o(){var M=H.A;return M===null?null:M.getOwner()}function a(){return Error("react-stack-top-frame")}function s(M){if(z.call(M,"key")){var U=Object.getOwnPropertyDescriptor(M,"key").get;if(U&&U.isReactWarning)return!1}return M.key!==void 0}function l(M,U){function T(){te||(te=!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))}T.isReactWarning=!0,Object.defineProperty(M,"key",{get:T,configurable:!0})}function c(){var M=e(this.type);return V[M]||(V[M]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),M=this.props.ref,M!==void 0?M:null}function u(M,U,T,I,L,F,J,R){return T=F.ref,M={$$typeof:p,type:M,key:U,props:F,_owner:L},(T!==void 0?T:null)!==null?Object.defineProperty(M,"ref",{enumerable:!1,get:c}):Object.defineProperty(M,"ref",{enumerable:!1,value:null}),M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(M,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(M,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(M,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:R}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M}function f(M,U,T,I,L,F,J,R){var Y=U.children;if(Y!==void 0)if(I)if(ee(Y)){for(I=0;I<Y.length;I++)m(Y[I]);Object.freeze&&Object.freeze(Y)}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 m(Y);if(z.call(U,"key")){Y=e(M);var q=Object.keys(U).filter(function(re){return re!=="key"});I=0<q.length?"{key: someKey, "+q.join(": ..., ")+": ...}":"{key: someKey}",O[Y+I]||(q=0<q.length?"{"+q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,I,U,K,U),_[U+I]=!0)}if(U=null,M!==void 0&&(n(M),U=""+M),s(H)&&(n(H.key),U=""+H.key),"key"in H){M={};for(var ne in H)ne!=="key"&&(M[ne]=H[ne])}else M=H;return U&&l(M,typeof j=="function"?j.displayName||j.name||"Unknown":j),u(j,U,F,L,o(),M,J,R)}function m(j){typeof j=="object"&&j!==null&&j.$$typeof===p&&j._store&&(j._store.validated=1)}var g=C,p=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),x=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),Z=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,ee=Array.isArray,Y=console.createTask?console.createTask:function(){return null};g={"react-stack-bottom-frame":function(j){return j()}};var te,V={},Q=g["react-stack-bottom-frame"].bind(g,a)(),O=Y(r(a)),_={};Cn.Fragment=h,Cn.jsx=function(j,H,M,I,L){var F=1e4>Z.recentlyCreatedOwnerStacks++;return f(j,H,M,!1,I,L,F?Error("react-stack-top-frame"):Q,F?Y(r(j)):O)},Cn.jsxs=function(j,H,M,I,L){var F=1e4>Z.recentlyCreatedOwnerStacks++;return f(j,H,M,!0,I,L,F?Error("react-stack-top-frame"):Q,F?Y(r(j)):O)}}()),Cn}var ni;function Vh(){return ni||(ni=1,process.env.NODE_ENV==="production"?er.exports=zh():er.exports=Wh()),er.exports}var i=Vh();function ri(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=ri(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Eo(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ri(e))&&(r&&(r+=" "),r+=t);return r}const ko="-",Hh=e=>{const t=Uh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const l=s.split(ko);return l[0]===""&&l.length!==1&&l.shift(),oi(l,t)||Gh(s)},getConflictingClassGroupIds:(s,l)=>{const c=n[s]||[];return l&&r[s]?[...c,...r[s]]:c}}},oi=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?oi(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(ko);return(s=t.validators.find(({validator:l})=>l(a)))==null?void 0:s.classGroupId},ai=/^\[(.+)\]$/,Gh=e=>{if(ai.test(e)){const t=ai.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Uh=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Po(n[o],r,o,t);return r},Po=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:si(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(Yh(o)){Po(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{Po(s,si(t,a),n,r)})})},si=(e,t)=>{let n=e;return t.split(ko).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Yh=e=>e.isThemeGetter,Kh=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)}}},Mo="!",To=":",qh=To.length,Xh=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let s=0,l=0,c=0,u;for(let v=0;v<o.length;v++){let h=o[v];if(s===0&&l===0){if(h===To){a.push(o.slice(c,v)),c=v+qh;continue}if(h==="/"){u=v;continue}}h==="["?s++:h==="]"?s--:h==="("?l++:h===")"&&l--}const f=a.length===0?o:o.substring(c),m=Zh(f),g=m!==f,p=u&&u>c?u-c:void 0;return{modifiers:a,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:p}};if(t){const o=t+To,a=r;r=s=>s.startsWith(o)?a(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},Zh=e=>e.endsWith(Mo)?e.substring(0,e.length-1):e.startsWith(Mo)?e.substring(1):e,Qh=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let a=[];return r.forEach(s=>{s[0]==="["||t[s]?(o.push(...a.sort(),s),a=[]):a.push(s)}),o.push(...a.sort()),o}},Jh=e=>({cache:Kh(e.cacheSize),parseClassName:Xh(e),sortModifiers:Qh(e),...Hh(e)}),eg=/\s+/,tg=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],l=e.trim().split(eg);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:m,modifiers:g,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:h}=n(f);if(m){c=f+(c.length>0?" "+c:c);continue}let b=!!h,y=r(b?v.substring(0,h):v);if(!y){if(!b){c=f+(c.length>0?" "+c:c);continue}if(y=r(v),!y){c=f+(c.length>0?" "+c:c);continue}b=!1}const w=a(g).join(":"),x=p?w+Mo:w,S=x+y;if(s.includes(S))continue;s.push(S);const E=o(y,b);for(let A=0;A<E.length;++A){const k=E[A];s.push(x+k)}c=f+(c.length>0?" "+c:c)}return c};function ng(){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(c){const u=t.reduce((f,m)=>m(f),e());return n=Jh(u),r=n.cache.get,o=n.cache.set,a=l,l(c)}function l(c){const u=r(c);if(u)return u;const f=tg(c,n);return o(c,f),f}return function(){return a(ng.apply(null,arguments))}}const Se=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},li=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ci=/^\((?:(\w[\w-]*):)?(.+)\)$/i,og=/^\d+\/\d+$/,ag=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sg=/\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))\(.+\)$/,lg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vt=e=>og.test(e),le=e=>!!e&&!Number.isNaN(Number(e)),dt=e=>!!e&&Number.isInteger(Number(e)),jo=e=>e.endsWith("%")&&le(e.slice(0,-1)),rt=e=>ag.test(e),dg=()=>!0,ug=e=>sg.test(e)&&!ig.test(e),di=()=>!1,fg=e=>lg.test(e),mg=e=>cg.test(e),pg=e=>!q(e)&&!X(e),hg=e=>Ht(e,hi,di),q=e=>li.test(e),Rt=e=>Ht(e,gi,ug),Ao=e=>Ht(e,yg,le),ui=e=>Ht(e,mi,di),gg=e=>Ht(e,pi,mg),tr=e=>Ht(e,vi,fg),X=e=>ci.test(e),Nn=e=>Gt(e,gi),vg=e=>Gt(e,xg),fi=e=>Gt(e,mi),bg=e=>Gt(e,hi),wg=e=>Gt(e,pi),nr=e=>Gt(e,vi,!0),Ht=(e,t,n)=>{const r=li.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Gt=(e,t,n=!1)=>{const r=ci.exec(e);return r?r[1]?t(r[1]):n:!1},mi=e=>e==="position"||e==="percentage",pi=e=>e==="image"||e==="url",hi=e=>e==="length"||e==="size"||e==="bg-size",gi=e=>e==="length",yg=e=>e==="number",xg=e=>e==="family-name",vi=e=>e==="shadow",Cg=rg(()=>{const e=Se("color"),t=Se("font"),n=Se("text"),r=Se("font-weight"),o=Se("tracking"),a=Se("leading"),s=Se("breakpoint"),l=Se("container"),c=Se("spacing"),u=Se("radius"),f=Se("shadow"),m=Se("inset-shadow"),g=Se("text-shadow"),p=Se("drop-shadow"),v=Se("blur"),h=Se("perspective"),b=Se("aspect"),y=Se("ease"),w=Se("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...S(),X,q],A=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],P=()=>[X,q,c],T=()=>[Vt,"full","auto",...P()],$=()=>[dt,"none","subgrid",X,q],Z=()=>["auto",{span:["full",dt,X,q]},dt,X,q],z=()=>[dt,"auto",X,q],ee=()=>["auto","min","max","fr",X,q],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...P()],Q=()=>[Vt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],O=()=>[e,X,q],_=()=>[...S(),fi,ui,{position:[X,q]}],j=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",bg,hg,{size:[X,q]}],M=()=>[jo,Nn,Rt],I=()=>["","none","full",u,X,q],L=()=>["",le,Nn,Rt],F=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>[le,jo,fi,ui],U=()=>["","none",v,X,q],K=()=>["none",le,X,q],ne=()=>["none",le,X,q],ae=()=>[le,X,q],se=()=>[Vt,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[rt],breakpoint:[rt],color:[dg],container:[rt],"drop-shadow":[rt],ease:["in","out","in-out"],font:[pg],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[rt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[rt],shadow:[rt],spacing:["px",le],text:[rt],"text-shadow":[rt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Vt,q,X,b]}],container:["container"],columns:[{columns:[le,q,X,l]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[dt,"auto",X,q]}],basis:[{basis:[Vt,"full","auto",l,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[le,Vt,"auto","initial","none",q]}],grow:[{grow:["",le,X,q]}],shrink:[{shrink:["",le,X,q]}],order:[{order:[dt,"first","last","none",X,q]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],w:[{w:[l,"screen",...Q()]}],"min-w":[{"min-w":[l,"screen","none",...Q()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...Q()]}],h:[{h:["screen",...Q()]}],"min-h":[{"min-h":["screen","none",...Q()]}],"max-h":[{"max-h":["screen",...Q()]}],"font-size":[{text:["base",n,Nn,Rt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,X,Ao]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jo,q]}],"font-family":[{font:[vg,q,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,X,q]}],"line-clamp":[{"line-clamp":[le,"none",X,Ao]}],leading:[{leading:[a,...P()]}],"list-image":[{"list-image":["none",X,q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",X,q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[le,"from-font","auto",X,Rt]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[le,"auto",X,q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X,q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",X,q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:j()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},dt,X,q],radial:["",X,q],conic:[dt,X,q]},wg,gg]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:M()}],"gradient-via-pos":[{via:M()}],"gradient-to-pos":[{to:M()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":L()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"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:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[le,X,q]}],"outline-w":[{outline:["",le,Nn,Rt]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",f,nr,tr]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",m,nr,tr]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[le,Rt]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",g,nr,tr]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[le,X,q]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[le]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[X,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[le]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:j()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",X,q]}],filter:[{filter:["","none",X,q]}],blur:[{blur:U()}],brightness:[{brightness:[le,X,q]}],contrast:[{contrast:[le,X,q]}],"drop-shadow":[{"drop-shadow":["","none",p,nr,tr]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",le,X,q]}],"hue-rotate":[{"hue-rotate":[le,X,q]}],invert:[{invert:["",le,X,q]}],saturate:[{saturate:[le,X,q]}],sepia:[{sepia:["",le,X,q]}],"backdrop-filter":[{"backdrop-filter":["","none",X,q]}],"backdrop-blur":[{"backdrop-blur":U()}],"backdrop-brightness":[{"backdrop-brightness":[le,X,q]}],"backdrop-contrast":[{"backdrop-contrast":[le,X,q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",le,X,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[le,X,q]}],"backdrop-invert":[{"backdrop-invert":["",le,X,q]}],"backdrop-opacity":[{"backdrop-opacity":[le,X,q]}],"backdrop-saturate":[{"backdrop-saturate":[le,X,q]}],"backdrop-sepia":[{"backdrop-sepia":["",le,X,q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",X,q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[le,"initial",X,q]}],ease:[{ease:["linear","initial",y,X,q]}],delay:[{delay:[le,X,q]}],animate:[{animate:["none",w,X,q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,X,q]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[X,q,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",X,q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",X,q]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[le,Nn,Rt,Ao]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function D(...e){return Cg(Eo(e))}const Ng={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Sg=(e,t,n)=>{let r;const o=Ng[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Ut(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Eg={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},kg={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Pg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mg={date:Ut({formats:Eg,defaultWidth:"full"}),time:Ut({formats:kg,defaultWidth:"full"}),dateTime:Ut({formats:Pg,defaultWidth:"full"})},Tg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jg=(e,t,n,r)=>Tg[e];function Xe(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,l=n!=null&&n.width?String(n.width):s;o=e.formattingValues[l]||e.formattingValues[s]}else{const s=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[l]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const Ag={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Rg={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Dg={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"]},Ig={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"]},_g={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"}},Og={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"}},$g={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:Xe({values:Ag,defaultWidth:"wide"}),quarter:Xe({values:Rg,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Xe({values:Dg,defaultWidth:"wide"}),day:Xe({values:Ig,defaultWidth:"wide"}),dayPeriod:Xe({values:_g,defaultWidth:"wide",formattingValues:Og,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],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?Fg(l,m=>m.test(s)):Lg(l,m=>m.test(s));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(s.length);return{value:u,rest:f}}}function Lg(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Fg(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function bi(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 l=t.slice(o.length);return{value:s,rest:l}}}const Bg=/^(\d+)(th|st|nd|rd)?/i,zg=/\d+/i,Wg={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},Vg={any:[/^b/i,/^(a|c)/i]},Hg={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Gg={any:[/1/i,/2/i,/3/i,/4/i]},Ug={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},Yg={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]},Kg={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},qg={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]},Xg={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},Zg={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}},Qg={ordinalNumber:bi({matchPattern:Bg,parsePattern:zg,valueCallback:e=>parseInt(e,10)}),era:Ze({matchPatterns:Wg,defaultMatchWidth:"wide",parsePatterns:Vg,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:Hg,defaultMatchWidth:"wide",parsePatterns:Gg,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ze({matchPatterns:Ug,defaultMatchWidth:"wide",parsePatterns:Yg,defaultParseWidth:"any"}),day:Ze({matchPatterns:Kg,defaultMatchWidth:"wide",parsePatterns:qg,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:Xg,defaultMatchWidth:"any",parsePatterns:Zg,defaultParseWidth:"any"})},Ro={code:"en-US",formatDistance:Sg,formatLong:Mg,formatRelative:jg,localize:$g,match:Qg,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Jg={};function rr(){return Jg}const wi=6048e5,ev=864e5,yi=Symbol.for("constructDateFrom");function ze(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&yi in e?e[yi](t):e instanceof Date?new e.constructor(t):new Date(t)}function Te(e,t){return ze(t||e,e)}function xi(e){const t=Te(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 tv(e,...t){const n=ze.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Ci(e,t){const n=Te(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function nv(e,t,n){const[r,o]=tv(n==null?void 0:n.in,e,t),a=Ci(r),s=Ci(o),l=+a-xi(a),c=+s-xi(s);return Math.round((l-c)/ev)}function rv(e,t){const n=Te(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ov(e,t){const n=Te(e,t==null?void 0:t.in);return nv(n,rv(n))+1}function Sn(e,t){var l,c,u,f;const n=rr(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,o=Te(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 Sn(e,{...t,weekStartsOn:1})}function Ni(e,t){const n=Te(e,t==null?void 0:t.in),r=n.getFullYear(),o=ze(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=or(o),s=ze(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const l=or(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function av(e,t){const n=Ni(e,t),r=ze(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),or(r)}function sv(e,t){const n=Te(e,t==null?void 0:t.in),r=+or(n)-+av(n);return Math.round(r/wi)+1}function Si(e,t){var f,m,g,p;const n=Te(e,t==null?void 0:t.in),r=n.getFullYear(),o=rr(),a=(t==null?void 0:t.firstWeekContainsDate)??((m=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(g=o.locale)==null?void 0:g.options)==null?void 0:p.firstWeekContainsDate)??1,s=ze((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const l=Sn(s,t),c=ze((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=Sn(c,t);return+n>=+l?r+1:+n>=+u?r:r-1}function iv(e,t){var l,c,u,f;const n=rr(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,o=Si(e,t),a=ze((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Sn(a,t)}function lv(e,t){const n=Te(e,t==null?void 0:t.in),r=+Sn(n,t)-+iv(n,t);return Math.round(r/wi)+1}function ue(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ut={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ue(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ue(n+1,2)},d(e,t){return ue(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ue(e.getHours()%12||12,t.length)},H(e,t){return ue(e.getHours(),t.length)},m(e,t){return ue(e.getMinutes(),t.length)},s(e,t){return ue(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ue(o,t.length)}},Yt={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ei={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 ut.y(e,t)},Y:function(e,t,n,r){const o=Si(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=Ni(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 ut.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=lv(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ue(o,t.length)},I:function(e,t,n){const r=sv(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"}):ut.d(e,t)},D:function(e,t,n){const r=ov(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ue(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ue(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ue(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ue(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Yt.noon:r===0?o=Yt.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Yt.evening:r>=12?o=Yt.afternoon:r>=4?o=Yt.morning:o=Yt.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ut.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ut.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"}):ut.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ut.s(e,t)},S:function(e,t){return ut.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Pi(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 Pi(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"+ki(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"+ki(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 ki(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 Pi(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 Mi=(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"})}},Ti=(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"})}},cv={p:Ti,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Mi(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}}",Mi(r,t)).replace("{{time}}",Ti(o,t))}},dv=/^D+$/,uv=/^Y+$/,fv=["D","DD","YY","YYYY"];function mv(e){return dv.test(e)}function pv(e){return uv.test(e)}function hv(e,t,n){const r=gv(e,t,n);if(console.warn(r),fv.includes(e))throw new RangeError(r)}function gv(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 vv(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function bv(e){return!(!vv(e)&&typeof e!="number"||isNaN(+Te(e)))}const wv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xv=/^'([^]*?)'?$/,Cv=/''/g,Nv=/[a-zA-Z]/;function Do(e,t,n){var f,m,g,p,v,h,b,y;const r=rr(),o=(n==null?void 0:n.locale)??r.locale??Ro,a=(n==null?void 0:n.firstWeekContainsDate)??((m=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(g=r.locale)==null?void 0:g.options)==null?void 0:p.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,l=Te(e,n==null?void 0:n.in);if(!bv(l))throw new RangeError("Invalid time value");let c=t.match(yv).map(w=>{const x=w[0];if(x==="p"||x==="P"){const S=cv[x];return S(w,o.formatLong)}return w}).join("").match(wv).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const x=w[0];if(x==="'")return{isToken:!1,value:Sv(w)};if(Ei[x])return{isToken:!0,value:w};if(x.match(Nv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(c=o.localize.preprocessor(l,c));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return c.map(w=>{if(!w.isToken)return w.value;const x=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&pv(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&mv(x))&&hv(x,t,String(e));const S=Ei[x[0]];return S(l,x,o.localize,u)}).join("")}function Sv(e){const t=e.match(xv);return t?t[1].replace(Cv,"'"):e}function ji(e,t,n){const r=Te(e,n==null?void 0:n.in);if(isNaN(t))return ze(e,NaN);if(!t)return r;const o=r.getDate(),a=ze(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 Ev(e,t){const n=Te(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function kv(e,t){const n=Te(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=ze(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Pv(e,t,n){return ji(e,-1,n)}function Mv(e,t){const n=Dv(t);return"formatToParts"in n?jv(n,e):Av(n,e)}const Tv={year:0,month:1,day:2,hour:3,minute:4,second:5};function jv(e,t){try{const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const a=Tv[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 Av(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 Io={},Ai=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")),Rv=Ai==="06/25/2014, 00:00:00"||Ai==="06/25/2014 00:00:00";function Dv(e){return Io[e]||(Io[e]=Rv?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"})),Io[e]}function Ri(e,t,n,r,o,a,s){const l=new Date(0);return l.setUTCFullYear(e,t,n),l.setUTCHours(r,o,a,s),l}const Di=36e5,Iv=6e4,_o={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Ii(e,t,n){if(!e)return 0;let r=_o.timezoneZ.exec(e);if(r)return 0;let o,a;if(r=_o.timezoneHH.exec(e),r)return o=parseInt(r[1],10),_i(o)?-(o*Di):NaN;if(r=_o.timezoneHHMM.exec(e),r){o=parseInt(r[2],10);const s=parseInt(r[3],10);return _i(o,s)?(a=Math.abs(o)*Di+s*Iv,r[1]==="+"?-a:a):NaN}if($v(e)){t=new Date(t||Date.now());const s=n?t:_v(t),l=Oo(s,e);return-(n?l:Ov(t,l,e))}return NaN}function _v(e){return Ri(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Oo(e,t){const n=Mv(e,t),r=Ri(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 Ov(e,t,n){let o=e.getTime()-t;const a=Oo(new Date(o),n);if(t===a)return t;o-=a-t;const s=Oo(new Date(o),n);return a===s?a:Math.max(a,s)}function _i(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const Oi={};function $v(e){if(Oi[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Oi[e]=!0,!0}catch{return!1}}function $i(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 Lv=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,$o=36e5,Li=6e4,Fv=2,Pe={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,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:Lv};function Bv(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?Fv: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=zv(e),{year:o,restDateString:a}=Wv(r.date,n),s=Vv(a,o);if(s===null||isNaN(s.getTime()))return new Date(NaN);if(s){const l=s.getTime();let c=0,u;if(r.time&&(c=Hv(r.time),c===null||isNaN(c)))return new Date(NaN);if(r.timeZone||t.timeZone){if(u=Ii(r.timeZone||t.timeZone,new Date(l+c)),isNaN(u))return new Date(NaN)}else u=$i(new Date(l+c)),u=$i(new Date(l+c+u));return new Date(l+c+u)}else return new Date(NaN)}function zv(e){const t={};let n=Pe.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=Pe.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){const o=Pe.timeZone.exec(r);o?(t.time=r.replace(o[1],""),t.timeZone=o[1].trim()):t.time=r}return t}function Wv(e,t){if(e){const n=Pe.YYY[t],r=Pe.YYYYY[t];let o=Pe.YYYY.exec(e)||r.exec(e);if(o){const a=o[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(o=Pe.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 Vv(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=Pe.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,zi(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=Pe.DDD.exec(e),a){n=new Date(0);const s=parseInt(a[1],10);return Yv(t,s)?(n.setUTCFullYear(t,0,s),n):new Date(NaN)}if(a=Pe.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;const s=parseInt(a[2],10);return zi(t,r,s)?(n.setUTCFullYear(t,r,s),n):new Date(NaN)}if(a=Pe.Www.exec(e),a)return o=parseInt(a[1],10)-1,Wi(o)?Fi(t,o):new Date(NaN);if(a=Pe.WwwD.exec(e),a){o=parseInt(a[1],10)-1;const s=parseInt(a[2],10)-1;return Wi(o,s)?Fi(t,o,s):new Date(NaN)}return null}function Hv(e){let t,n,r=Pe.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),Lo(t)?t%24*$o:NaN;if(r=Pe.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),Lo(t,n)?t%24*$o+n*Li:NaN;if(r=Pe.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const o=parseFloat(r[3].replace(",","."));return Lo(t,n,o)?t%24*$o+n*Li+o*1e3:NaN}return null}function Fi(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 Gv=[31,28,31,30,31,30,31,31,30,31,30,31],Uv=[31,29,31,30,31,30,31,31,30,31,30,31];function Bi(e){return e%400===0||e%4===0&&e%100!==0}function zi(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;const r=Bi(e);if(r&&n>Uv[t]||!r&&n>Gv[t])return!1}return!0}function Yv(e,t){if(t<1)return!1;const n=Bi(e);return!(n&&t>366||!n&&t>365)}function Wi(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function Lo(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function Kv(e,t,n){e=Bv(e,n);const r=Ii(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 qv=(e,t="pt-BR",n="BRL")=>new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:2}).format(e),Fo=(e,t=2)=>{for(e=e.toString();e.length<t;)e="0"+e;return e},Xv=e=>{if(!e)return"";const t=Kv(new Date(e.seconds?e.seconds*1e3:e),"America/Sao_Paulo");return[Fo(t.getUTCDate(),2),Fo(t.getUTCMonth()+1,2),t.getUTCFullYear()].join("/")},Zv=e=>new Intl.DateTimeFormat("pt-BR",{year:"2-digit",month:"short"}).format(e),Qv=e=>new Intl.DateTimeFormat("pt-BR",{day:"2-digit",month:"2-digit"}).format(e),Jv=e=>new Intl.DateTimeFormat("pt-BR",{year:"2-digit",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(e)),eb=e=>new Intl.DateTimeFormat("pt-BR",{month:"long"}).format(e),tb=e=>new Intl.DateTimeFormat("pt-BR",{dateStyle:"long"}).format(e),nb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long"}).format(new Date(e)),rb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long",year:"numeric"}).format(new Date(e)),ob=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long"}).format(new Date(e)),ab=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"long"}).format(typeof e=="string"?new Date(e):e),sb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"short"}).format(e),ib=e=>e.slice(0,7),lb=(e,t="pt-BR")=>e.toLocaleDateString(t,{weekday:"short",day:"2-digit",month:"2-digit"});function Bo(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]=Bo(e[r],t[r]):n[r]=e[r]);return n}const De=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase():"",zo=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replaceAll(" ","").toLowerCase():"",Vi=(e,t)=>zo(e).includes(zo(t)),cb=(e,t)=>De(e)<De(t)?-1:De(e)>De(t)?1:0,db=(e,t)=>De(e.name)<De(t.name)?-1:De(e.name)>De(t.name)?1:0,ub=(e,t,n)=>e[n]<t[n]?-1:e[n]>t[n]?1:0,fb=(e,t,n)=>e[n]>t[n]?-1:e[n]<t[n]?1:0,mb=(e,t,n,r)=>De(e[n][r])<De(t[n][r])?-1:De(e[n][r])>De(t[n][r])?1:0,pb=e=>e.charAt(0).toUpperCase()+e.slice(1),hb=(e,t)=>e.replace(/{{\s*(\w+)\s*}}/g,(n,r)=>t[r]!==void 0?String(t[r]):""),gb=({children:e,className:t,...n})=>i.jsx("div",{className:D("grid w-full auto-rows-[22rem] grid-cols-3 gap-4",t),...n,children:e}),vb=({children:e,className:t,...n})=>i.jsx("div",{className:D("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});function Hi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qe(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Hi(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():Hi(e[o],null)}}}}function oe(...e){return d.useCallback(Qe(...e),e)}function ft(e){const t=wb(e),n=d.forwardRef((r,o)=>{const{children:a,...s}=r,l=d.Children.toArray(a),c=l.find(yb);if(c){const u=c.props.children,f=l.map(m=>m===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:m);return i.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return i.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var bb=ft("Slot");function wb(e){const t=d.forwardRef((n,r)=>{const{children:o,...a}=n;if(d.isValidElement(o)){const s=Cb(o),l=xb(a,o.props);return o.type!==d.Fragment&&(l.ref=r?Qe(r,s):s),d.cloneElement(o,l)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gi=Symbol("radix.slottable");function Ui(e){const t=({children:n})=>i.jsx(i.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Gi,t}function yb(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gi}function xb(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]=(...l)=>{a(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Cb(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)}const Yi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Nb=e=>{if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);return Number.isNaN(t)?e:t},Sb=e=>{const t=function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return Eo(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(c=>{const u=Object.fromEntries(Object.entries(c||{}).filter(f=>{let[m]=f;return!["class","className"].includes(m)}));return t(a.map(f=>f(u)),c==null?void 0:c.class,c==null?void 0:c.className)},{variants:a.reduce((c,u)=>{let{variants:f}=u;for(const m in f)c[m]=[...new Set([...c[m]??[],...f[m]??[]])];return c},{})})},cva:o=>{const{variants:a,defaultVariants:s}=o??{};return Object.assign(c=>{var u;if(a==null)return t(o==null?void 0:o.base,c==null?void 0:c.class,c==null?void 0:c.className);const f=Object.keys(a).map(p=>{const v=c==null?void 0:c[p],h=s==null?void 0:s[p],b=Yi(v)||Yi(h);return a[p][b]}),m={...s,...c&&Object.entries(c).reduce((p,v)=>{let[h,b]=v;return b!==void 0&&Object.assign(p,{[h]:b}),p},{})},g=o==null||(u=o.compoundVariants)===null||u===void 0?void 0:u.reduce((p,v)=>{let{class:h,className:b,...y}=v;return Object.entries(y).every(w=>{let[x,S]=w;const E=m[x];return Array.isArray(S)?S.includes(E):E===S})?[...p,h,b]:p},[]);return t(o==null?void 0:o.base,f,g,c==null?void 0:c.class,c==null?void 0:c.className)},{variants:a?Object.fromEntries(Object.entries(a).filter(c=>{let[u]=c;return!u.startsWith("$")}).map(c=>{let[u,f]=c;return[u,Object.keys(f).map(m=>Nb(m))]})):{}})},cx:t}},{cva:Ki}=Sb(),Wo={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}},ar=Ki(Wo),fe=d.forwardRef(({className:e,variant:t="default",size:n="md",rounded:r=!1,isLoading:o=!1,asChild:a=!1,theme:s=Wo,...l},c)=>{const u=a?bb:"button",f=Bo(s,Wo),m=Ki(f);return i.jsxs(u,{className:D(m({variant:t,size:n,rounded:r,className:e})),ref:c,...l,disabled:o||l.disabled,children:[o&&i.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:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.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"})]}),l.children]})});fe.displayName="Button";const sr=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{className:"relative w-full overflow-auto",children:i.jsx("table",{ref:n,className:D("w-full caption-bottom text-sm",e),...t})}));sr.displayName="Table";const ir=d.forwardRef(({className:e,...t},n)=>i.jsx("thead",{ref:n,className:D("[&_tr]:border-b",e),...t}));ir.displayName="TableHeader";const lr=d.forwardRef(({className:e,...t},n)=>i.jsx("tbody",{ref:n,className:D("[&_tr:last-child]:border-0",e),...t}));lr.displayName="TableBody";const qi=d.forwardRef(({className:e,...t},n)=>i.jsx("tfoot",{ref:n,className:D("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));qi.displayName="TableFooter";const Kt=d.forwardRef(({className:e,...t},n)=>i.jsx("tr",{ref:n,className:D("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Kt.displayName="TableRow";const En=d.forwardRef(({className:e,...t},n)=>i.jsx("th",{ref:n,className:D("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}));En.displayName="TableHead";const qt=d.forwardRef(({className:e,...t},n)=>i.jsx("td",{ref:n,className:D("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));qt.displayName="TableCell";const Xi=d.forwardRef(({className:e,...t},n)=>i.jsx("caption",{ref:n,className:D("mt-4 text-sm text-muted-foreground",e),...t}));Xi.displayName="TableCaption";/**
|
|
22
|
+
<%s key={someKey} {...props} />`,I,Y,q,Y),O[Y+I]=!0)}if(Y=null,T!==void 0&&(n(T),Y=""+T),s(U)&&(n(U.key),Y=""+U.key),"key"in U){T={};for(var ne in U)ne!=="key"&&(T[ne]=U[ne])}else T=U;return Y&&l(T,typeof M=="function"?M.displayName||M.name||"Unknown":M),u(M,Y,F,L,o(),T,J,R)}function m(M){typeof M=="object"&&M!==null&&M.$$typeof===p&&M._store&&(M._store.validated=1)}var h=C,p=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),x=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),H=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,ee=Array.isArray,K=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(M){return M()}};var te,V={},Q=h["react-stack-bottom-frame"].bind(h,a)(),_=K(r(a)),O={};Sn.Fragment=g,Sn.jsx=function(M,U,T,I,L){var F=1e4>H.recentlyCreatedOwnerStacks++;return f(M,U,T,!1,I,L,F?Error("react-stack-top-frame"):Q,F?K(r(M)):_)},Sn.jsxs=function(M,U,T,I,L){var F=1e4>H.recentlyCreatedOwnerStacks++;return f(M,U,T,!0,I,L,F?Error("react-stack-top-frame"):Q,F?K(r(M)):_)}}()),Sn}var ii;function Kh(){return ii||(ii=1,process.env.NODE_ENV==="production"?or.exports=Uh():or.exports=Yh()),or.exports}var i=Kh();function li(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=li(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function jo(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=li(e))&&(r&&(r+=" "),r+=t);return r}const Ao="-",qh=e=>{const t=Zh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const l=s.split(Ao);return l[0]===""&&l.length!==1&&l.shift(),ci(l,t)||Xh(s)},getConflictingClassGroupIds:(s,l)=>{const c=n[s]||[];return l&&r[s]?[...c,...r[s]]:c}}},ci=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ci(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Ao);return(s=t.validators.find(({validator:l})=>l(a)))==null?void 0:s.classGroupId},di=/^\[(.+)\]$/,Xh=e=>{if(di.test(e)){const t=di.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Zh=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Ro(n[o],r,o,t);return r},Ro=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:ui(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(Qh(o)){Ro(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{Ro(s,ui(t,a),n,r)})})},ui=(e,t)=>{let n=e;return t.split(Ao).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Qh=e=>e.isThemeGetter,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)}}},Do="!",Io=":",eg=Io.length,tg=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let s=0,l=0,c=0,u;for(let v=0;v<o.length;v++){let g=o[v];if(s===0&&l===0){if(g===Io){a.push(o.slice(c,v)),c=v+eg;continue}if(g==="/"){u=v;continue}}g==="["?s++:g==="]"?s--:g==="("?l++:g===")"&&l--}const f=a.length===0?o:o.substring(c),m=ng(f),h=m!==f,p=u&&u>c?u-c:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}};if(t){const o=t+Io,a=r;r=s=>s.startsWith(o)?a(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},ng=e=>e.endsWith(Do)?e.substring(0,e.length-1):e.startsWith(Do)?e.substring(1):e,rg=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let a=[];return r.forEach(s=>{s[0]==="["||t[s]?(o.push(...a.sort(),s),a=[]):a.push(s)}),o.push(...a.sort()),o}},og=e=>({cache:Jh(e.cacheSize),parseClassName:tg(e),sortModifiers:rg(e),...qh(e)}),ag=/\s+/,sg=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],l=e.trim().split(ag);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:m,modifiers:h,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:g}=n(f);if(m){c=f+(c.length>0?" "+c:c);continue}let b=!!g,y=r(b?v.substring(0,g):v);if(!y){if(!b){c=f+(c.length>0?" "+c:c);continue}if(y=r(v),!y){c=f+(c.length>0?" "+c:c);continue}b=!1}const w=a(h).join(":"),x=p?w+Do:w,S=x+y;if(s.includes(S))continue;s.push(S);const E=o(y,b);for(let A=0;A<E.length;++A){const k=E[A];s.push(x+k)}c=f+(c.length>0?" "+c:c)}return c};function ig(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=fi(t))&&(r&&(r+=" "),r+=n);return r}const fi=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=fi(e[r]))&&(n&&(n+=" "),n+=t);return n};function lg(e,...t){let n,r,o,a=s;function s(c){const u=t.reduce((f,m)=>m(f),e());return n=og(u),r=n.cache.get,o=n.cache.set,a=l,l(c)}function l(c){const u=r(c);if(u)return u;const f=sg(c,n);return o(c,f),f}return function(){return a(ig.apply(null,arguments))}}const Se=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},mi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,pi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cg=/^\d+\/\d+$/,dg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ug=/\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$/,fg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,mg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ut=e=>cg.test(e),le=e=>!!e&&!Number.isNaN(Number(e)),ft=e=>!!e&&Number.isInteger(Number(e)),_o=e=>e.endsWith("%")&&le(e.slice(0,-1)),at=e=>dg.test(e),hg=()=>!0,gg=e=>ug.test(e)&&!fg.test(e),hi=()=>!1,vg=e=>mg.test(e),bg=e=>pg.test(e),wg=e=>!X(e)&&!Z(e),yg=e=>Yt(e,yi,hi),X=e=>mi.test(e),_t=e=>Yt(e,xi,gg),Oo=e=>Yt(e,Eg,le),gi=e=>Yt(e,bi,hi),xg=e=>Yt(e,wi,bg),ar=e=>Yt(e,Ci,vg),Z=e=>pi.test(e),En=e=>Kt(e,xi),Cg=e=>Kt(e,kg),vi=e=>Kt(e,bi),Ng=e=>Kt(e,yi),Sg=e=>Kt(e,wi),sr=e=>Kt(e,Ci,!0),Yt=(e,t,n)=>{const r=mi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Kt=(e,t,n=!1)=>{const r=pi.exec(e);return r?r[1]?t(r[1]):n:!1},bi=e=>e==="position"||e==="percentage",wi=e=>e==="image"||e==="url",yi=e=>e==="length"||e==="size"||e==="bg-size",xi=e=>e==="length",Eg=e=>e==="number",kg=e=>e==="family-name",Ci=e=>e==="shadow",Pg=lg(()=>{const e=Se("color"),t=Se("font"),n=Se("text"),r=Se("font-weight"),o=Se("tracking"),a=Se("leading"),s=Se("breakpoint"),l=Se("container"),c=Se("spacing"),u=Se("radius"),f=Se("shadow"),m=Se("inset-shadow"),h=Se("text-shadow"),p=Se("drop-shadow"),v=Se("blur"),g=Se("perspective"),b=Se("aspect"),y=Se("ease"),w=Se("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...S(),Z,X],A=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],P=()=>[Z,X,c],j=()=>[Ut,"full","auto",...P()],$=()=>[ft,"none","subgrid",Z,X],H=()=>["auto",{span:["full",ft,Z,X]},ft,Z,X],z=()=>[ft,"auto",Z,X],ee=()=>["auto","min","max","fr",Z,X],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...P()],Q=()=>[Ut,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],_=()=>[e,Z,X],O=()=>[...S(),vi,gi,{position:[Z,X]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",Ng,yg,{size:[Z,X]}],T=()=>[_o,En,_t],I=()=>["","none","full",u,Z,X],L=()=>["",le,En,_t],F=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>[le,_o,vi,gi],Y=()=>["","none",v,Z,X],q=()=>["none",le,Z,X],ne=()=>["none",le,Z,X],re=()=>[le,Z,X],ie=()=>[Ut,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[at],breakpoint:[at],color:[hg],container:[at],"drop-shadow":[at],ease:["in","out","in-out"],font:[wg],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[at],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[at],shadow:[at],spacing:["px",le],text:[at],"text-shadow":[at],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ut,X,Z,b]}],container:["container"],columns:[{columns:[le,X,Z,l]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{start:j()}],end:[{end:j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[ft,"auto",Z,X]}],basis:[{basis:[Ut,"full","auto",l,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[le,Ut,"auto","initial","none",X]}],grow:[{grow:["",le,Z,X]}],shrink:[{shrink:["",le,Z,X]}],order:[{order:[ft,"first","last","none",Z,X]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],w:[{w:[l,"screen",...Q()]}],"min-w":[{"min-w":[l,"screen","none",...Q()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...Q()]}],h:[{h:["screen",...Q()]}],"min-h":[{"min-h":["screen","none",...Q()]}],"max-h":[{"max-h":["screen",...Q()]}],"font-size":[{text:["base",n,En,_t]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Z,Oo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_o,X]}],"font-family":[{font:[Cg,X,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Z,X]}],"line-clamp":[{"line-clamp":[le,"none",Z,Oo]}],leading:[{leading:[a,...P()]}],"list-image":[{"list-image":["none",Z,X]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Z,X]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[le,"from-font","auto",Z,_t]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[le,"auto",Z,X]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z,X]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Z,X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ft,Z,X],radial:["",Z,X],conic:[ft,Z,X]},Sg,xg]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":L()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[le,Z,X]}],"outline-w":[{outline:["",le,En,_t]}],"outline-color":[{outline:_()}],shadow:[{shadow:["","none",f,sr,ar]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",m,sr,ar]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[le,_t]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":_()}],"text-shadow":[{"text-shadow":["none",h,sr,ar]}],"text-shadow-color":[{"text-shadow":_()}],opacity:[{opacity:[le,Z,X]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[le]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":_()}],"mask-image-linear-to-color":[{"mask-linear-to":_()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":_()}],"mask-image-t-to-color":[{"mask-t-to":_()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":_()}],"mask-image-r-to-color":[{"mask-r-to":_()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":_()}],"mask-image-b-to-color":[{"mask-b-to":_()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":_()}],"mask-image-l-to-color":[{"mask-l-to":_()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":_()}],"mask-image-x-to-color":[{"mask-x-to":_()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":_()}],"mask-image-y-to-color":[{"mask-y-to":_()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":_()}],"mask-image-radial-to-color":[{"mask-radial-to":_()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[le]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":_()}],"mask-image-conic-to-color":[{"mask-conic-to":_()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,X]}],filter:[{filter:["","none",Z,X]}],blur:[{blur:Y()}],brightness:[{brightness:[le,Z,X]}],contrast:[{contrast:[le,Z,X]}],"drop-shadow":[{"drop-shadow":["","none",p,sr,ar]}],"drop-shadow-color":[{"drop-shadow":_()}],grayscale:[{grayscale:["",le,Z,X]}],"hue-rotate":[{"hue-rotate":[le,Z,X]}],invert:[{invert:["",le,Z,X]}],saturate:[{saturate:[le,Z,X]}],sepia:[{sepia:["",le,Z,X]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,X]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[le,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[le,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":["",le,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[le,Z,X]}],"backdrop-invert":[{"backdrop-invert":["",le,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[le,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[le,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":["",le,Z,X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Z,X]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[le,"initial",Z,X]}],ease:[{ease:["linear","initial",y,Z,X]}],delay:[{delay:[le,Z,X]}],animate:[{animate:["none",w,Z,X]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,Z,X]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:re()}],"skew-x":[{"skew-x":re()}],"skew-y":[{"skew-y":re()}],transform:[{transform:[Z,X,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Z,X]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Z,X]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[le,En,_t,Oo]}],stroke:[{stroke:["none",..._()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function D(...e){return Pg(jo(e))}const Tg={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"}},Mg=(e,t,n)=>{let r;const o=Tg[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 qt(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const jg={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ag={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Rg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Dg={date:qt({formats:jg,defaultWidth:"full"}),time:qt({formats:Ag,defaultWidth:"full"}),dateTime:qt({formats:Rg,defaultWidth:"full"})},Ig={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_g=(e,t,n,r)=>Ig[e];function Xe(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,l=n!=null&&n.width?String(n.width):s;o=e.formattingValues[l]||e.formattingValues[s]}else{const s=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[l]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const Og={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},$g={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Lg={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"]},Fg={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"]},Bg={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"}},zg={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"}},Wg={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:Xe({values:Og,defaultWidth:"wide"}),quarter:Xe({values:$g,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Xe({values:Lg,defaultWidth:"wide"}),day:Xe({values:Fg,defaultWidth:"wide"}),dayPeriod:Xe({values:Bg,defaultWidth:"wide",formattingValues:zg,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],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?Hg(l,m=>m.test(s)):Vg(l,m=>m.test(s));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(s.length);return{value:u,rest:f}}}function Vg(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Hg(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Ni(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 l=t.slice(o.length);return{value:s,rest:l}}}const Gg=/^(\d+)(th|st|nd|rd)?/i,Ug=/\d+/i,Yg={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},Kg={any:[/^b/i,/^(a|c)/i]},qg={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Xg={any:[/1/i,/2/i,/3/i,/4/i]},Zg={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},Qg={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]},Jg={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},ev={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]},tv={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},nv={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}},rv={ordinalNumber:Ni({matchPattern:Gg,parsePattern:Ug,valueCallback:e=>parseInt(e,10)}),era:Ze({matchPatterns:Yg,defaultMatchWidth:"wide",parsePatterns:Kg,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:qg,defaultMatchWidth:"wide",parsePatterns:Xg,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ze({matchPatterns:Zg,defaultMatchWidth:"wide",parsePatterns:Qg,defaultParseWidth:"any"}),day:Ze({matchPatterns:Jg,defaultMatchWidth:"wide",parsePatterns:ev,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:tv,defaultMatchWidth:"any",parsePatterns:nv,defaultParseWidth:"any"})},$o={code:"en-US",formatDistance:Mg,formatLong:Dg,formatRelative:_g,localize:Wg,match:rv,options:{weekStartsOn:0,firstWeekContainsDate:1}};let ov={};function ir(){return ov}const Si=6048e5,av=864e5,Ei=Symbol.for("constructDateFrom");function ze(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ei in e?e[Ei](t):e instanceof Date?new e.constructor(t):new Date(t)}function Me(e,t){return ze(t||e,e)}function ki(e){const t=Me(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 sv(e,...t){const n=ze.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Pi(e,t){const n=Me(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function iv(e,t,n){const[r,o]=sv(n==null?void 0:n.in,e,t),a=Pi(r),s=Pi(o),l=+a-ki(a),c=+s-ki(s);return Math.round((l-c)/av)}function lv(e,t){const n=Me(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function cv(e,t){const n=Me(e,t==null?void 0:t.in);return iv(n,lv(n))+1}function kn(e,t){var l,c,u,f;const n=ir(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,o=Me(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 lr(e,t){return kn(e,{...t,weekStartsOn:1})}function Ti(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=ze(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=lr(o),s=ze(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const l=lr(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function dv(e,t){const n=Ti(e,t),r=ze(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),lr(r)}function uv(e,t){const n=Me(e,t==null?void 0:t.in),r=+lr(n)-+dv(n);return Math.round(r/Si)+1}function Mi(e,t){var f,m,h,p;const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=ir(),a=(t==null?void 0:t.firstWeekContainsDate)??((m=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(h=o.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,s=ze((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const l=kn(s,t),c=ze((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=kn(c,t);return+n>=+l?r+1:+n>=+u?r:r-1}function fv(e,t){var l,c,u,f;const n=ir(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,o=Mi(e,t),a=ze((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),kn(a,t)}function mv(e,t){const n=Me(e,t==null?void 0:t.in),r=+kn(n,t)-+fv(n,t);return Math.round(r/Si)+1}function ue(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const mt={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)}},Xt={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ji={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 mt.y(e,t)},Y:function(e,t,n,r){const o=Mi(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=Ti(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 mt.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=mv(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ue(o,t.length)},I:function(e,t,n){const r=uv(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"}):mt.d(e,t)},D:function(e,t,n){const r=cv(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=Xt.noon:r===0?o=Xt.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=Xt.evening:r>=12?o=Xt.afternoon:r>=4?o=Xt.morning:o=Xt.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 mt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):mt.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"}):mt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):mt.s(e,t)},S:function(e,t){return mt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ri(r);case"XXXX":case"XX":return Ot(r);case"XXXXX":case"XXX":default:return Ot(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ri(r);case"xxxx":case"xx":return Ot(r);case"xxxxx":case"xxx":default:return Ot(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ai(r,":");case"OOOO":default:return"GMT"+Ot(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ai(r,":");case"zzzz":default:return"GMT"+Ot(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 Ai(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 Ri(e,t){return e%60===0?(e>0?"-":"+")+ue(Math.abs(e)/60,2):Ot(e,t)}function Ot(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"})}},Ii=(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"})}},pv={p:Ii,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}}",Ii(o,t))}},hv=/^D+$/,gv=/^Y+$/,vv=["D","DD","YY","YYYY"];function bv(e){return hv.test(e)}function wv(e){return gv.test(e)}function yv(e,t,n){const r=xv(e,t,n);if(console.warn(r),vv.includes(e))throw new RangeError(r)}function xv(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 Cv(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Nv(e){return!(!Cv(e)&&typeof e!="number"||isNaN(+Me(e)))}const Sv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ev=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kv=/^'([^]*?)'?$/,Pv=/''/g,Tv=/[a-zA-Z]/;function Lo(e,t,n){var f,m,h,p,v,g,b,y;const r=ir(),o=(n==null?void 0:n.locale)??r.locale??$o,a=(n==null?void 0:n.firstWeekContainsDate)??((m=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((g=(v=n==null?void 0:n.locale)==null?void 0:v.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((y=(b=r.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??0,l=Me(e,n==null?void 0:n.in);if(!Nv(l))throw new RangeError("Invalid time value");let c=t.match(Ev).map(w=>{const x=w[0];if(x==="p"||x==="P"){const S=pv[x];return S(w,o.formatLong)}return w}).join("").match(Sv).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const x=w[0];if(x==="'")return{isToken:!1,value:Mv(w)};if(ji[x])return{isToken:!0,value:w};if(x.match(Tv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(c=o.localize.preprocessor(l,c));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return c.map(w=>{if(!w.isToken)return w.value;const x=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&wv(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&bv(x))&&yv(x,t,String(e));const S=ji[x[0]];return S(l,x,o.localize,u)}).join("")}function Mv(e){const t=e.match(kv);return t?t[1].replace(Pv,"'"):e}function _i(e,t,n){const r=Me(e,n==null?void 0:n.in);if(isNaN(t))return ze(e,NaN);if(!t)return r;const o=r.getDate(),a=ze(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 jv(e,t){const n=Me(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Av(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=ze(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Rv(e,t,n){return _i(e,-1,n)}function Dv(e,t){const n=Lv(t);return"formatToParts"in n?_v(n,e):Ov(n,e)}const Iv={year:0,month:1,day:2,hour:3,minute:4,second:5};function _v(e,t){try{const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const a=Iv[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 Ov(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 Fo={},Oi=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")),$v=Oi==="06/25/2014, 00:00:00"||Oi==="06/25/2014 00:00:00";function Lv(e){return Fo[e]||(Fo[e]=$v?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"})),Fo[e]}function $i(e,t,n,r,o,a,s){const l=new Date(0);return l.setUTCFullYear(e,t,n),l.setUTCHours(r,o,a,s),l}const Li=36e5,Fv=6e4,Bo={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Fi(e,t,n){if(!e)return 0;let r=Bo.timezoneZ.exec(e);if(r)return 0;let o,a;if(r=Bo.timezoneHH.exec(e),r)return o=parseInt(r[1],10),Bi(o)?-(o*Li):NaN;if(r=Bo.timezoneHHMM.exec(e),r){o=parseInt(r[2],10);const s=parseInt(r[3],10);return Bi(o,s)?(a=Math.abs(o)*Li+s*Fv,r[1]==="+"?-a:a):NaN}if(Wv(e)){t=new Date(t||Date.now());const s=n?t:Bv(t),l=zo(s,e);return-(n?l:zv(t,l,e))}return NaN}function Bv(e){return $i(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function zo(e,t){const n=Dv(e,t),r=$i(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 zv(e,t,n){let o=e.getTime()-t;const a=zo(new Date(o),n);if(t===a)return t;o-=a-t;const s=zo(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 zi={};function Wv(e){if(zi[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),zi[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 Vv=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Wo=36e5,Vi=6e4,Hv=2,Pe={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:Vv};function Gv(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?Hv: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=Uv(e),{year:o,restDateString:a}=Yv(r.date,n),s=Kv(a,o);if(s===null||isNaN(s.getTime()))return new Date(NaN);if(s){const l=s.getTime();let c=0,u;if(r.time&&(c=qv(r.time),c===null||isNaN(c)))return new Date(NaN);if(r.timeZone||t.timeZone){if(u=Fi(r.timeZone||t.timeZone,new Date(l+c)),isNaN(u))return new Date(NaN)}else u=Wi(new Date(l+c)),u=Wi(new Date(l+c+u));return new Date(l+c+u)}else return new Date(NaN)}function Uv(e){const t={};let n=Pe.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=Pe.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){const o=Pe.timeZone.exec(r);o?(t.time=r.replace(o[1],""),t.timeZone=o[1].trim()):t.time=r}return t}function Yv(e,t){if(e){const n=Pe.YYY[t],r=Pe.YYYYY[t];let o=Pe.YYYY.exec(e)||r.exec(e);if(o){const a=o[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(o=Pe.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 Kv(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=Pe.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,Ui(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=Pe.DDD.exec(e),a){n=new Date(0);const s=parseInt(a[1],10);return Qv(t,s)?(n.setUTCFullYear(t,0,s),n):new Date(NaN)}if(a=Pe.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;const s=parseInt(a[2],10);return Ui(t,r,s)?(n.setUTCFullYear(t,r,s),n):new Date(NaN)}if(a=Pe.Www.exec(e),a)return o=parseInt(a[1],10)-1,Yi(o)?Hi(t,o):new Date(NaN);if(a=Pe.WwwD.exec(e),a){o=parseInt(a[1],10)-1;const s=parseInt(a[2],10)-1;return Yi(o,s)?Hi(t,o,s):new Date(NaN)}return null}function qv(e){let t,n,r=Pe.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),Vo(t)?t%24*Wo:NaN;if(r=Pe.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),Vo(t,n)?t%24*Wo+n*Vi:NaN;if(r=Pe.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const o=parseFloat(r[3].replace(",","."));return Vo(t,n,o)?t%24*Wo+n*Vi+o*1e3:NaN}return null}function Hi(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 Xv=[31,28,31,30,31,30,31,31,30,31,30,31],Zv=[31,29,31,30,31,30,31,31,30,31,30,31];function Gi(e){return e%400===0||e%4===0&&e%100!==0}function Ui(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;const r=Gi(e);if(r&&n>Zv[t]||!r&&n>Xv[t])return!1}return!0}function Qv(e,t){if(t<1)return!1;const n=Gi(e);return!(n&&t>366||!n&&t>365)}function Yi(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function Vo(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function Jv(e,t,n){e=Gv(e,n);const r=Fi(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 eb=(e,t="pt-BR",n="BRL")=>new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:2}).format(e),Ho=(e,t=2)=>{for(e=e.toString();e.length<t;)e="0"+e;return e},tb=e=>{if(!e)return"";const t=Jv(new Date(e.seconds?e.seconds*1e3:e),"America/Sao_Paulo");return[Ho(t.getUTCDate(),2),Ho(t.getUTCMonth()+1,2),t.getUTCFullYear()].join("/")},nb=e=>new Intl.DateTimeFormat("pt-BR",{year:"2-digit",month:"short"}).format(e),rb=e=>new Intl.DateTimeFormat("pt-BR",{day:"2-digit",month:"2-digit"}).format(e),ob=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)),ab=e=>new Intl.DateTimeFormat("pt-BR",{month:"long"}).format(e),sb=e=>new Intl.DateTimeFormat("pt-BR",{dateStyle:"long"}).format(e),ib=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long"}).format(new Date(e)),lb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long",year:"numeric"}).format(new Date(e)),cb=(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),ub=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"short"}).format(e),fb=e=>e.slice(0,7),mb=(e,t="pt-BR")=>e.toLocaleDateString(t,{weekday:"short",day:"2-digit",month:"2-digit"});function Go(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]=Go(e[r],t[r]):n[r]=e[r]);return n}const De=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase():"",Uo=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replaceAll(" ","").toLowerCase():"",Ki=(e,t)=>Uo(e).includes(Uo(t)),pb=(e,t)=>De(e)<De(t)?-1:De(e)>De(t)?1:0,hb=(e,t)=>De(e.name)<De(t.name)?-1:De(e.name)>De(t.name)?1:0,gb=(e,t,n)=>e[n]<t[n]?-1:e[n]>t[n]?1:0,vb=(e,t,n)=>e[n]>t[n]?-1:e[n]<t[n]?1:0,bb=(e,t,n,r)=>De(e[n][r])<De(t[n][r])?-1:De(e[n][r])>De(t[n][r])?1:0,wb=e=>e.charAt(0).toUpperCase()+e.slice(1),qi=(e,t)=>e.replace(/{{\s*(\w+)\s*}}/g,(n,r)=>t[r]!==void 0?String(t[r]):""),yb=({children:e,className:t,...n})=>i.jsx("div",{className:D("grid w-full auto-rows-[22rem] grid-cols-3 gap-4",t),...n,children:e}),xb=({children:e,className:t,...n})=>i.jsx("div",{className:D("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});function Xi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qe(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Xi(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():Xi(e[o],null)}}}}function oe(...e){return d.useCallback(Qe(...e),e)}function pt(e){const t=Nb(e),n=d.forwardRef((r,o)=>{const{children:a,...s}=r,l=d.Children.toArray(a),c=l.find(Sb);if(c){const u=c.props.children,f=l.map(m=>m===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:m);return i.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return i.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Cb=pt("Slot");function Nb(e){const t=d.forwardRef((n,r)=>{const{children:o,...a}=n;if(d.isValidElement(o)){const s=kb(o),l=Eb(a,o.props);return o.type!==d.Fragment&&(l.ref=r?Qe(r,s):s),d.cloneElement(o,l)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zi=Symbol("radix.slottable");function Qi(e){const t=({children:n})=>i.jsx(i.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Zi,t}function Sb(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zi}function Eb(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]=(...l)=>{a(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function kb(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)}const Ji=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Pb=e=>{if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);return Number.isNaN(t)?e:t},Tb=e=>{const t=function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return jo(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(c=>{const u=Object.fromEntries(Object.entries(c||{}).filter(f=>{let[m]=f;return!["class","className"].includes(m)}));return t(a.map(f=>f(u)),c==null?void 0:c.class,c==null?void 0:c.className)},{variants:a.reduce((c,u)=>{let{variants:f}=u;for(const m in f)c[m]=[...new Set([...c[m]??[],...f[m]??[]])];return c},{})})},cva:o=>{const{variants:a,defaultVariants:s}=o??{};return Object.assign(c=>{var u;if(a==null)return t(o==null?void 0:o.base,c==null?void 0:c.class,c==null?void 0:c.className);const f=Object.keys(a).map(p=>{const v=c==null?void 0:c[p],g=s==null?void 0:s[p],b=Ji(v)||Ji(g);return a[p][b]}),m={...s,...c&&Object.entries(c).reduce((p,v)=>{let[g,b]=v;return b!==void 0&&Object.assign(p,{[g]:b}),p},{})},h=o==null||(u=o.compoundVariants)===null||u===void 0?void 0:u.reduce((p,v)=>{let{class:g,className:b,...y}=v;return Object.entries(y).every(w=>{let[x,S]=w;const E=m[x];return Array.isArray(S)?S.includes(E):E===S})?[...p,g,b]:p},[]);return t(o==null?void 0:o.base,f,h,c==null?void 0:c.class,c==null?void 0:c.className)},{variants:a?Object.fromEntries(Object.entries(a).filter(c=>{let[u]=c;return!u.startsWith("$")}).map(c=>{let[u,f]=c;return[u,Object.keys(f).map(m=>Pb(m))]})):{}})},cx:t}},{cva:el}=Tb(),Yo={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=el(Yo),fe=d.forwardRef(({className:e,variant:t="default",size:n="md",rounded:r=!1,isLoading:o=!1,asChild:a=!1,theme:s=Yo,...l},c)=>{const u=a?Cb:"button",f=Go(s,Yo),m=el(f);return i.jsxs(u,{className:D(m({variant:t,size:n,rounded:r,className:e})),ref:c,...l,disabled:o||l.disabled,children:[o&&i.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:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.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"})]}),l.children]})});fe.displayName="Button";const dr=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{className:"relative w-full overflow-auto",children:i.jsx("table",{ref:n,className:D("w-full caption-bottom text-sm",e),...t})}));dr.displayName="Table";const ur=d.forwardRef(({className:e,...t},n)=>i.jsx("thead",{ref:n,className:D("[&_tr]:border-b",e),...t}));ur.displayName="TableHeader";const fr=d.forwardRef(({className:e,...t},n)=>i.jsx("tbody",{ref:n,className:D("[&_tr:last-child]:border-0",e),...t}));fr.displayName="TableBody";const tl=d.forwardRef(({className:e,...t},n)=>i.jsx("tfoot",{ref:n,className:D("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));tl.displayName="TableFooter";const Zt=d.forwardRef(({className:e,...t},n)=>i.jsx("tr",{ref:n,className:D("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Zt.displayName="TableRow";const Pn=d.forwardRef(({className:e,...t},n)=>i.jsx("th",{ref:n,className:D("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}));Pn.displayName="TableHead";const Qt=d.forwardRef(({className:e,...t},n)=>i.jsx("td",{ref:n,className:D("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Qt.displayName="TableCell";const nl=d.forwardRef(({className:e,...t},n)=>i.jsx("caption",{ref:n,className:D("mt-4 text-sm text-muted-foreground",e),...t}));nl.displayName="TableCaption";/**
|
|
23
23
|
* @license lucide-react v0.488.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const
|
|
27
|
+
*/const Mb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jb=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),rl=e=>{const t=jb(e);return t.charAt(0).toUpperCase()+t.slice(1)},ol=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
28
28
|
* @license lucide-react v0.488.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/var
|
|
32
|
+
*/var Ab={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"};/**
|
|
33
33
|
* @license lucide-react v0.488.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const
|
|
37
|
+
*/const Rb=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...l},c)=>C.createElement("svg",{ref:c,...Ab,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ol("lucide",o),...l},[...s.map(([u,f])=>C.createElement(u,f)),...Array.isArray(a)?a:[a]]));/**
|
|
38
38
|
* @license lucide-react v0.488.0 - ISC
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const de=(e,t)=>{const n=C.forwardRef(({className:r,...o},a)=>C.createElement(
|
|
42
|
+
*/const de=(e,t)=>{const n=C.forwardRef(({className:r,...o},a)=>C.createElement(Rb,{ref:a,iconNode:t,className:ol(`lucide-${Mb(rl(e))}`,`lucide-${e}`,r),...o}));return n.displayName=rl(e),n};/**
|
|
43
43
|
* @license lucide-react v0.488.0 - ISC
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
47
|
+
*/const Db=de("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
48
48
|
* @license lucide-react v0.488.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
52
|
+
*/const Ib=de("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
53
53
|
* @license lucide-react v0.488.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
57
|
+
*/const _b=de("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
58
58
|
* @license lucide-react v0.488.0 - ISC
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
62
|
+
*/const Ob=de("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
|
|
63
63
|
* @license lucide-react v0.488.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
67
|
+
*/const $b=de("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
68
68
|
* @license lucide-react v0.488.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const
|
|
72
|
+
*/const Lb=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"}]]);/**
|
|
73
73
|
* @license lucide-react v0.488.0 - ISC
|
|
74
74
|
*
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
76
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const
|
|
77
|
+
*/const Tn=de("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
78
78
|
* @license lucide-react v0.488.0 - ISC
|
|
79
79
|
*
|
|
80
80
|
* This source code is licensed under the ISC license.
|
|
81
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const
|
|
82
|
+
*/const Jt=de("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
83
83
|
* @license lucide-react v0.488.0 - ISC
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the ISC license.
|
|
86
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const
|
|
87
|
+
*/const mr=de("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
88
88
|
* @license lucide-react v0.488.0 - ISC
|
|
89
89
|
*
|
|
90
90
|
* This source code is licensed under the ISC license.
|
|
91
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const
|
|
92
|
+
*/const Mn=de("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
93
93
|
* @license lucide-react v0.488.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const
|
|
97
|
+
*/const Fb=de("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
98
98
|
* @license lucide-react v0.488.0 - ISC
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the ISC license.
|
|
101
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const
|
|
102
|
+
*/const Bb=de("circle-alert",[["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"}]]);/**
|
|
103
103
|
* @license lucide-react v0.488.0 - ISC
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the ISC license.
|
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
107
|
+
*/const zb=de("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
108
108
|
* @license lucide-react v0.488.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const
|
|
112
|
+
*/const al=de("circle-help",[["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"}]]);/**
|
|
113
113
|
* @license lucide-react v0.488.0 - ISC
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const
|
|
117
|
+
*/const Wb=de("circle-off",[["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"}]]);/**
|
|
118
118
|
* @license lucide-react v0.488.0 - ISC
|
|
119
119
|
*
|
|
120
120
|
* This source code is licensed under the ISC license.
|
|
121
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const
|
|
122
|
+
*/const Ko=de("circle-x",[["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"}]]);/**
|
|
123
123
|
* @license lucide-react v0.488.0 - ISC
|
|
124
124
|
*
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const
|
|
127
|
+
*/const sl=de("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
128
128
|
* @license lucide-react v0.488.0 - ISC
|
|
129
129
|
*
|
|
130
130
|
* This source code is licensed under the ISC license.
|
|
131
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const
|
|
132
|
+
*/const Vb=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"}]]);/**
|
|
133
133
|
* @license lucide-react v0.488.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const
|
|
137
|
+
*/const Hb=de("eye-off",[["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"}]]);/**
|
|
138
138
|
* @license lucide-react v0.488.0 - ISC
|
|
139
139
|
*
|
|
140
140
|
* This source code is licensed under the ISC license.
|
|
141
141
|
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const
|
|
142
|
+
*/const Gb=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"}]]);/**
|
|
143
143
|
* @license lucide-react v0.488.0 - ISC
|
|
144
144
|
*
|
|
145
145
|
* This source code is licensed under the ISC license.
|
|
146
146
|
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const
|
|
147
|
+
*/const Ub=de("file-down",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
|
|
148
148
|
* @license lucide-react v0.488.0 - ISC
|
|
149
149
|
*
|
|
150
150
|
* This source code is licensed under the ISC license.
|
|
151
151
|
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const
|
|
152
|
+
*/const Yb=de("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);/**
|
|
153
153
|
* @license lucide-react v0.488.0 - ISC
|
|
154
154
|
*
|
|
155
155
|
* This source code is licensed under the ISC license.
|
|
156
156
|
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const
|
|
157
|
+
*/const Kb=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"}]]);/**
|
|
158
158
|
* @license lucide-react v0.488.0 - ISC
|
|
159
159
|
*
|
|
160
160
|
* This source code is licensed under the ISC license.
|
|
161
161
|
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const
|
|
162
|
+
*/const qb=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"}]]);/**
|
|
163
163
|
* @license lucide-react v0.488.0 - ISC
|
|
164
164
|
*
|
|
165
165
|
* This source code is licensed under the ISC license.
|
|
166
166
|
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const
|
|
167
|
+
*/const Xb=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"}]]);/**
|
|
168
168
|
* @license lucide-react v0.488.0 - ISC
|
|
169
169
|
*
|
|
170
170
|
* This source code is licensed under the ISC license.
|
|
171
171
|
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const
|
|
172
|
+
*/const Zb=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"}]]);/**
|
|
173
173
|
* @license lucide-react v0.488.0 - ISC
|
|
174
174
|
*
|
|
175
175
|
* This source code is licensed under the ISC license.
|
|
176
176
|
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const
|
|
177
|
+
*/const Qb=de("list-ordered",[["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"}]]);/**
|
|
178
178
|
* @license lucide-react v0.488.0 - ISC
|
|
179
179
|
*
|
|
180
180
|
* This source code is licensed under the ISC license.
|
|
181
181
|
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/const
|
|
182
|
+
*/const Jb=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"}]]);/**
|
|
183
183
|
* @license lucide-react v0.488.0 - ISC
|
|
184
184
|
*
|
|
185
185
|
* This source code is licensed under the ISC license.
|
|
186
186
|
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
-
*/const
|
|
187
|
+
*/const ew=de("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
188
188
|
* @license lucide-react v0.488.0 - ISC
|
|
189
189
|
*
|
|
190
190
|
* This source code is licensed under the ISC license.
|
|
191
191
|
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
-
*/const
|
|
192
|
+
*/const tw=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"}]]);/**
|
|
193
193
|
* @license lucide-react v0.488.0 - ISC
|
|
194
194
|
*
|
|
195
195
|
* This source code is licensed under the ISC license.
|
|
196
196
|
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
-
*/const
|
|
197
|
+
*/const qo=de("search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
198
198
|
* @license lucide-react v0.488.0 - ISC
|
|
199
199
|
*
|
|
200
200
|
* This source code is licensed under the ISC license.
|
|
201
201
|
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
-
*/const
|
|
202
|
+
*/const nw=de("sliders-horizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
|
|
203
203
|
* @license lucide-react v0.488.0 - ISC
|
|
204
204
|
*
|
|
205
205
|
* This source code is licensed under the ISC license.
|
|
206
206
|
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
-
*/const
|
|
207
|
+
*/const rw=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"}]]);/**
|
|
208
208
|
* @license lucide-react v0.488.0 - ISC
|
|
209
209
|
*
|
|
210
210
|
* This source code is licensed under the ISC license.
|
|
211
211
|
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
-
*/const mt=de("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),tl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,nl=Eo,It=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return nl(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const f=n==null?void 0:n[u],m=a==null?void 0:a[u];if(f===null)return null;const g=tl(f)||tl(m);return o[u][g]}),l=n&&Object.entries(n).reduce((u,f)=>{let[m,g]=f;return g===void 0||(u[m]=g),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:m,className:g,...p}=f;return Object.entries(p).every(v=>{let[h,b]=v;return Array.isArray(b)?b.includes({...a,...l}[h]):{...a,...l}[h]===b})?[...u,m,g]:u},[]);return nl(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},rl=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 Zt({className:e,variant:t,...n}){return i.jsx("div",{className:D(rl({variant:t}),e),...n})}function ew({searchTerm:e,activeFilters:t,sortState:n,filters:r,columns:o,onClearSearch:a,onClearFilter:s,onClearSort:l}){var u;return Object.values(t).filter(f=>f&&f!=="all").length>0||e.trim().length>0||n.field!==null?i.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.trim()&&i.jsxs(Zt,{variant:"secondary",className:"gap-1",children:["Search: ",e,i.jsx(mt,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:a})]}),Object.entries(t).map(([f,m])=>{if(!m||m==="all")return null;const g=r.find(v=>String(v.field)===f),p=g==null?void 0:g.options.find(v=>v.value===m);return i.jsxs(Zt,{variant:"secondary",className:"gap-1",children:[g==null?void 0:g.label,": ",(p==null?void 0:p.label)||m,i.jsx(mt,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:()=>s(f)})]},f)}),n.field&&i.jsxs(Zt,{variant:"secondary",className:"gap-1",children:["Sort:"," ",((u=o.find(f=>String(f.key)===n.field))==null?void 0:u.title)||n.field," ",n.direction==="asc"?"↑":"↓",i.jsx(mt,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:l})]})]}):null}function B(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 tw(e,t){const n=d.createContext(t),r=a=>{const{children:s,...l}=a,c=d.useMemo(()=>l,Object.values(l));return i.jsx(n.Provider,{value:c,children:s})};r.displayName=e+"Provider";function o(a){const s=d.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 be(e,t=[]){let n=[];function r(a,s){const l=d.createContext(s),c=n.length;n=[...n,s];const u=m=>{var y;const{scope:g,children:p,...v}=m,h=((y=g==null?void 0:g[e])==null?void 0:y[c])||l,b=d.useMemo(()=>v,Object.values(v));return i.jsx(h.Provider,{value:b,children:p})};u.displayName=a+"Provider";function f(m,g){var h;const p=((h=g==null?void 0:g[e])==null?void 0:h[c])||l,v=d.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=n.map(s=>d.createContext(s));return function(l){const c=(l==null?void 0:l[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,nw(o,...t)]}function nw(...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((l,{useScope:c,scopeName:u})=>{const m=c(a)[`__scope${u}`];return{...l,...m}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function we(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function ye({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=rw({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,l=we(n),c=d.useCallback(u=>{if(a){const m=typeof u=="function"?u(e):u;m!==e&&l(m)}else o(u)},[a,e,o,l]);return[s,c]}function rw({defaultProp:e,onChange:t}){const n=d.useState(e),[r]=n,o=d.useRef(r),a=we(t);return d.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}var ow=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],W=ow.reduce((e,t)=>{const n=ft(`Primitive.${t}`),r=d.forwardRef((o,a)=>{const{asChild:s,...l}=o,c=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function dr(e,t){e&&Jn.flushSync(()=>e.dispatchEvent(t))}function Qt(e){const t=e+"CollectionProvider",[n,r]=be(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=h=>{const{scope:b,children:y}=h,w=C.useRef(null),x=C.useRef(new Map).current;return i.jsx(o,{scope:b,itemMap:x,collectionRef:w,children:y})};s.displayName=t;const l=e+"CollectionSlot",c=ft(l),u=C.forwardRef((h,b)=>{const{scope:y,children:w}=h,x=a(l,y),S=oe(b,x.collectionRef);return i.jsx(c,{ref:S,children:w})});u.displayName=l;const f=e+"CollectionItemSlot",m="data-radix-collection-item",g=ft(f),p=C.forwardRef((h,b)=>{const{scope:y,children:w,...x}=h,S=C.useRef(null),E=oe(b,S),A=a(f,y);return C.useEffect(()=>(A.itemMap.set(S,{ref:S,...x}),()=>void A.itemMap.delete(S))),i.jsx(g,{[m]:"",ref:E,children:w})});p.displayName=f;function v(h){const b=a(e+"CollectionConsumer",h);return C.useCallback(()=>{const w=b.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${m}]`));return Array.from(b.itemMap.values()).sort((A,k)=>x.indexOf(A.ref.current)-x.indexOf(k.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},v,r]}var aw=d.createContext(void 0);function pt(e){const t=d.useContext(aw);return e||t||"ltr"}function sw(e,t=globalThis==null?void 0:globalThis.document){const n=we(e);d.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 iw="DismissableLayer",Go="dismissableLayer.update",lw="dismissableLayer.pointerDownOutside",cw="dismissableLayer.focusOutside",ol,al=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_t=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,u=d.useContext(al),[f,m]=d.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=d.useState({}),v=oe(t,k=>m(k)),h=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(b),w=f?h.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=w>=y,E=fw(k=>{const P=k.target,T=[...u.branches].some($=>$.contains(P));!S||T||(o==null||o(k),s==null||s(k),k.defaultPrevented||l==null||l())},g),A=mw(k=>{const P=k.target;[...u.branches].some($=>$.contains(P))||(a==null||a(k),s==null||s(k),k.defaultPrevented||l==null||l())},g);return sw(k=>{w===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&l&&(k.preventDefault(),l()))},g),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ol=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),sl(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=ol)}},[f,g,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),sl())},[f,u]),d.useEffect(()=>{const k=()=>p({});return document.addEventListener(Go,k),()=>document.removeEventListener(Go,k)},[]),i.jsx(W.div,{...c,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:B(e.onFocusCapture,A.onFocusCapture),onBlurCapture:B(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,E.onPointerDownCapture)})});_t.displayName=iw;var dw="DismissableLayerBranch",uw=d.forwardRef((e,t)=>{const n=d.useContext(al),r=d.useRef(null),o=oe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),i.jsx(W.div,{...e,ref:o})});uw.displayName=dw;function fw(e,t=globalThis==null?void 0:globalThis.document){const n=we(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=l=>{if(l.target&&!r.current){let c=function(){il(lw,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}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 mw(e,t=globalThis==null?void 0:globalThis.document){const n=we(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&il(cw,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 sl(){const e=new CustomEvent(Go);document.dispatchEvent(e)}function il(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?dr(o,a):o.dispatchEvent(a)}var Uo=0;function ur(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ll()),document.body.insertAdjacentElement("beforeend",e[1]??ll()),Uo++,()=>{Uo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Uo--}},[])}function ll(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Yo="focusScope.autoFocusOnMount",Ko="focusScope.autoFocusOnUnmount",cl={bubbles:!1,cancelable:!0},pw="FocusScope",Mn=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[l,c]=d.useState(null),u=we(o),f=we(a),m=d.useRef(null),g=oe(t,h=>c(h)),p=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let h=function(x){if(p.paused||!l)return;const S=x.target;l.contains(S)?m.current=S:ht(m.current,{select:!0})},b=function(x){if(p.paused||!l)return;const S=x.relatedTarget;S!==null&&(l.contains(S)||ht(m.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&ht(l)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const w=new MutationObserver(y);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),w.disconnect()}}},[r,l,p.paused]),d.useEffect(()=>{if(l){fl.add(p);const h=document.activeElement;if(!l.contains(h)){const y=new CustomEvent(Yo,cl);l.addEventListener(Yo,u),l.dispatchEvent(y),y.defaultPrevented||(hw(yw(dl(l)),{select:!0}),document.activeElement===h&&ht(l))}return()=>{l.removeEventListener(Yo,u),setTimeout(()=>{const y=new CustomEvent(Ko,cl);l.addEventListener(Ko,f),l.dispatchEvent(y),y.defaultPrevented||ht(h??document.body,{select:!0}),l.removeEventListener(Ko,f),fl.remove(p)},0)}}},[l,u,f,p]);const v=d.useCallback(h=>{if(!n&&!r||p.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]=gw(w);x&&S?!h.shiftKey&&y===S?(h.preventDefault(),n&&ht(x,{select:!0})):h.shiftKey&&y===x&&(h.preventDefault(),n&&ht(S,{select:!0})):y===w&&h.preventDefault()}},[n,r,p.paused]);return i.jsx(W.div,{tabIndex:-1,...s,ref:g,onKeyDown:v})});Mn.displayName=pw;function hw(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ht(r,{select:t}),document.activeElement!==n)return}function gw(e){const t=dl(e),n=ul(t,e),r=ul(t.reverse(),e);return[n,r]}function dl(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 ul(e,t){for(const n of e)if(!vw(n,{upTo:t}))return n}function vw(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 bw(e){return e instanceof HTMLInputElement&&"select"in e}function ht(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&bw(e)&&t&&e.select()}}var fl=ww();function ww(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ml(e,t),e.unshift(t)},remove(t){var n;e=ml(e,t),(n=e[0])==null||n.resume()}}}function ml(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function yw(e){return e.filter(t=>t.tagName!=="A")}var ve=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},xw=d[" useId ".trim().toString()]||(()=>{}),Cw=0;function pe(e){const[t,n]=d.useState(xw());return ve(()=>{n(r=>r??String(Cw++))},[e]),t?`radix-${t}`:""}const Nw=["top","right","bottom","left"],gt=Math.min,Ie=Math.max,fr=Math.round,mr=Math.floor,Je=e=>({x:e,y:e}),Sw={left:"right",right:"left",bottom:"top",top:"bottom"},Ew={start:"end",end:"start"};function qo(e,t,n){return Ie(e,gt(t,n))}function ot(e,t){return typeof e=="function"?e(t):e}function at(e){return e.split("-")[0]}function Jt(e){return e.split("-")[1]}function Xo(e){return e==="x"?"y":"x"}function Zo(e){return e==="y"?"height":"width"}function vt(e){return["top","bottom"].includes(at(e))?"y":"x"}function Qo(e){return Xo(vt(e))}function kw(e,t,n){n===void 0&&(n=!1);const r=Jt(e),o=Qo(e),a=Zo(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=pr(s)),[s,pr(s)]}function Pw(e){const t=pr(e);return[Jo(e),t,Jo(t)]}function Jo(e){return e.replace(/start|end/g,t=>Ew[t])}function Mw(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 Tw(e,t,n,r){const o=Jt(e);let a=Mw(at(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Jo)))),a}function pr(e){return e.replace(/left|right|bottom|top/g,t=>Sw[t])}function jw(e){return{top:0,right:0,bottom:0,left:0,...e}}function pl(e){return typeof e!="number"?jw(e):{top:e,right:e,bottom:e,left:e}}function hr(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 hl(e,t,n){let{reference:r,floating:o}=e;const a=vt(t),s=Qo(t),l=Zo(s),c=at(t),u=a==="y",f=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,g=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:m};break;case"left":p={x:r.x-o.width,y:m};break;default:p={x:r.x,y:r.y}}switch(Jt(t)){case"start":p[s]-=g*(n&&u?-1:1);break;case"end":p[s]+=g*(n&&u?-1:1);break}return p}const Aw=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,l=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:m}=hl(u,r,c),g=r,p={},v=0;for(let h=0;h<l.length;h++){const{name:b,fn:y}=l[h],{x:w,y:x,data:S,reset:E}=await y({x:f,y:m,initialPlacement:r,placement:g,strategy:o,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});f=w??f,m=x??m,p={...p,[b]:{...p[b],...S}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(g=E.placement),E.rects&&(u=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:m}=hl(u,g,c)),h=-1)}return{x:f,y:m,placement:g,strategy:o,middlewareData:p}};async function Tn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:g=!1,padding:p=0}=ot(t,e),v=pl(p),b=l[g?m==="floating"?"reference":"floating":m],y=hr(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(l.floating)),boundary:u,rootBoundary:f,strategy:c})),w=m==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.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},E=hr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:x,strategy:c}):w);return{top:(y.top-E.top+v.top)/S.y,bottom:(E.bottom-y.bottom+v.bottom)/S.y,left:(y.left-E.left+v.left)/S.x,right:(E.right-y.right+v.right)/S.x}}const Rw=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:l,middlewareData:c}=t,{element:u,padding:f=0}=ot(e,t)||{};if(u==null)return{};const m=pl(f),g={x:n,y:r},p=Qo(o),v=Zo(p),h=await s.getDimensions(u),b=p==="y",y=b?"top":"left",w=b?"bottom":"right",x=b?"clientHeight":"clientWidth",S=a.reference[v]+a.reference[p]-g[p]-a.floating[v],E=g[p]-a.reference[p],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=A?A[x]:0;(!k||!await(s.isElement==null?void 0:s.isElement(A)))&&(k=l.floating[x]||a.floating[v]);const P=S/2-E/2,T=k/2-h[v]/2-1,$=gt(m[y],T),Z=gt(m[w],T),z=$,ee=k-h[v]-Z,Y=k/2-h[v]/2+P,te=qo(z,Y,ee),V=!c.arrow&&Jt(o)!=null&&Y!==te&&a.reference[v]/2-(Y<z?$:Z)-h[v]/2<0,Q=V?Y<z?Y-z:Y-ee:0;return{[p]:g[p]+Q,data:{[p]:te,centerOffset:Y-te-Q,...V&&{alignmentOffset:Q}},reset:V}}}),Dw=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:l,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...b}=ot(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=at(o),w=vt(l),x=at(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),E=g||(x||!h?[pr(l)]:Pw(l)),A=v!=="none";!g&&A&&E.push(...Tw(l,h,v,S));const k=[l,...E],P=await Tn(t,b),T=[];let $=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&T.push(P[y]),m){const Y=kw(o,s,S);T.push(P[Y[0]],P[Y[1]])}if($=[...$,{placement:o,overflows:T}],!T.every(Y=>Y<=0)){var Z,z;const Y=(((Z=a.flip)==null?void 0:Z.index)||0)+1,te=k[Y];if(te)return{data:{index:Y,overflows:$},reset:{placement:te}};let V=(z=$.filter(Q=>Q.overflows[0]<=0).sort((Q,O)=>Q.overflows[1]-O.overflows[1])[0])==null?void 0:z.placement;if(!V)switch(p){case"bestFit":{var ee;const Q=(ee=$.filter(O=>{if(A){const _=vt(O.placement);return _===w||_==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(_=>_>0).reduce((_,j)=>_+j,0)]).sort((O,_)=>O[1]-_[1])[0])==null?void 0:ee[0];Q&&(V=Q);break}case"initialPlacement":V=l;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function gl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vl(e){return Nw.some(t=>e[t]>=0)}const Iw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ot(e,t);switch(r){case"referenceHidden":{const a=await Tn(t,{...o,elementContext:"reference"}),s=gl(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:vl(s)}}}case"escaped":{const a=await Tn(t,{...o,altBoundary:!0}),s=gl(a,n.floating);return{data:{escapedOffsets:s,escaped:vl(s)}}}default:return{}}}}};async function _w(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=at(n),l=Jt(n),c=vt(n)==="y",u=["left","top"].includes(s)?-1:1,f=a&&c?-1:1,m=ot(t,e);let{mainAxis:g,crossAxis:p,alignmentAxis:v}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof v=="number"&&(p=l==="end"?v*-1:v),c?{x:p*f,y:g*u}:{x:g*u,y:p*f}}const Ow=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:l}=t,c=await _w(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},$w=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:l={fn:b=>{let{x:y,y:w}=b;return{x:y,y:w}}},...c}=ot(e,t),u={x:n,y:r},f=await Tn(t,c),m=vt(at(o)),g=Xo(m);let p=u[g],v=u[m];if(a){const b=g==="y"?"top":"left",y=g==="y"?"bottom":"right",w=p+f[b],x=p-f[y];p=qo(w,p,x)}if(s){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=v+f[b],x=v-f[y];v=qo(w,v,x)}const h=l.fn({...t,[g]:p,[m]:v});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[g]:a,[m]:s}}}}}},Lw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=ot(e,t),f={x:n,y:r},m=vt(o),g=Xo(m);let p=f[g],v=f[m];const h=ot(l,t),b=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const x=g==="y"?"height":"width",S=a.reference[g]-a.floating[x]+b.mainAxis,E=a.reference[g]+a.reference[x]-b.mainAxis;p<S?p=S:p>E&&(p=E)}if(u){var y,w;const x=g==="y"?"width":"height",S=["top","left"].includes(at(o)),E=a.reference[m]-a.floating[x]+(S&&((y=s.offset)==null?void 0:y[m])||0)+(S?0:b.crossAxis),A=a.reference[m]+a.reference[x]+(S?0:((w=s.offset)==null?void 0:w[m])||0)-(S?b.crossAxis:0);v<E?v=E:v>A&&(v=A)}return{[g]:p,[m]:v}}}},Fw=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:l}=t,{apply:c=()=>{},...u}=ot(e,t),f=await Tn(t,u),m=at(o),g=Jt(o),p=vt(o)==="y",{width:v,height:h}=a.floating;let b,y;m==="top"||m==="bottom"?(b=m,y=g===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(y=m,b=g==="end"?"top":"bottom");const w=h-f.top-f.bottom,x=v-f.left-f.right,S=gt(h-f[b],w),E=gt(v-f[y],x),A=!t.middlewareData.shift;let k=S,P=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=w),A&&!g){const $=Ie(f.left,0),Z=Ie(f.right,0),z=Ie(f.top,0),ee=Ie(f.bottom,0);p?P=v-2*($!==0||Z!==0?$+Z:Ie(f.left,f.right)):k=h-2*(z!==0||ee!==0?z+ee:Ie(f.top,f.bottom))}await c({...t,availableWidth:P,availableHeight:k});const T=await s.getDimensions(l.floating);return v!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function gr(){return typeof window<"u"}function en(e){return bl(e)?(e.nodeName||"").toLowerCase():"#document"}function _e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function et(e){var t;return(t=(bl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function bl(e){return gr()?e instanceof Node||e instanceof _e(e).Node:!1}function We(e){return gr()?e instanceof Element||e instanceof _e(e).Element:!1}function tt(e){return gr()?e instanceof HTMLElement||e instanceof _e(e).HTMLElement:!1}function wl(e){return!gr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _e(e).ShadowRoot}function jn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ve(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Bw(e){return["table","td","th"].includes(en(e))}function vr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ea(e){const t=ta(),n=We(e)?Ve(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function zw(e){let t=bt(e);for(;tt(t)&&!tn(t);){if(ea(t))return t;if(vr(t))return null;t=bt(t)}return null}function ta(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function tn(e){return["html","body","#document"].includes(en(e))}function Ve(e){return _e(e).getComputedStyle(e)}function br(e){return We(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bt(e){if(en(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wl(e)&&e.host||et(e);return wl(t)?t.host:t}function yl(e){const t=bt(e);return tn(t)?e.ownerDocument?e.ownerDocument.body:e.body:tt(t)&&jn(t)?t:yl(t)}function An(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=yl(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=_e(o);if(a){const l=na(s);return t.concat(s,s.visualViewport||[],jn(o)?o:[],l&&n?An(l):[])}return t.concat(o,An(o,[],n))}function na(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xl(e){const t=Ve(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=tt(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=fr(n)!==a||fr(r)!==s;return l&&(n=a,r=s),{width:n,height:r,$:l}}function ra(e){return We(e)?e:e.contextElement}function nn(e){const t=ra(e);if(!tt(t))return Je(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=xl(t);let s=(a?fr(n.width):n.width)/r,l=(a?fr(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Ww=Je(0);function Cl(e){const t=_e(e);return!ta()||!t.visualViewport?Ww:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==_e(e)?!1:t}function Ot(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=ra(e);let s=Je(1);t&&(r?We(r)&&(s=nn(r)):s=nn(e));const l=Vw(a,n,r)?Cl(a):Je(0);let c=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,f=o.width/s.x,m=o.height/s.y;if(a){const g=_e(a),p=r&&We(r)?_e(r):r;let v=g,h=na(v);for(;h&&r&&p!==v;){const b=nn(h),y=h.getBoundingClientRect(),w=Ve(h),x=y.left+(h.clientLeft+parseFloat(w.paddingLeft))*b.x,S=y.top+(h.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,u*=b.y,f*=b.x,m*=b.y,c+=x,u+=S,v=_e(h),h=na(v)}}return hr({width:f,height:m,x:c,y:u})}function oa(e,t){const n=br(e).scrollLeft;return t?t.left+n:Ot(et(e)).left+n}function Nl(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:oa(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function Hw(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=et(r),l=t?vr(t.floating):!1;if(r===s||l&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Je(1);const f=Je(0),m=tt(r);if((m||!m&&!a)&&((en(r)!=="body"||jn(s))&&(c=br(r)),tt(r))){const p=Ot(r);u=nn(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const g=s&&!m&&!a?Nl(s,c,!0):Je(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+g.x,y:n.y*u.y-c.scrollTop*u.y+f.y+g.y}}function Gw(e){return Array.from(e.getClientRects())}function Uw(e){const t=et(e),n=br(e),r=e.ownerDocument.body,o=Ie(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ie(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+oa(e);const l=-n.scrollTop;return Ve(r).direction==="rtl"&&(s+=Ie(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:l}}function Yw(e,t){const n=_e(e),r=et(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,l=0,c=0;if(o){a=o.width,s=o.height;const u=ta();(!u||u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:a,height:s,x:l,y:c}}function Kw(e,t){const n=Ot(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=tt(e)?nn(e):Je(1),s=e.clientWidth*a.x,l=e.clientHeight*a.y,c=o*a.x,u=r*a.y;return{width:s,height:l,x:c,y:u}}function Sl(e,t,n){let r;if(t==="viewport")r=Yw(e,n);else if(t==="document")r=Uw(et(e));else if(We(t))r=Kw(t,n);else{const o=Cl(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return hr(r)}function El(e,t){const n=bt(e);return n===t||!We(n)||tn(n)?!1:Ve(n).position==="fixed"||El(n,t)}function qw(e,t){const n=t.get(e);if(n)return n;let r=An(e,[],!1).filter(l=>We(l)&&en(l)!=="body"),o=null;const a=Ve(e).position==="fixed";let s=a?bt(e):e;for(;We(s)&&!tn(s);){const l=Ve(s),c=ea(s);!c&&l.position==="fixed"&&(o=null),(a?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||jn(s)&&!c&&El(e,s))?r=r.filter(f=>f!==s):o=l,s=bt(s)}return t.set(e,r),r}function Xw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?vr(t)?[]:qw(t,this._c):[].concat(n),r],l=s[0],c=s.reduce((u,f)=>{const m=Sl(t,f,o);return u.top=Ie(m.top,u.top),u.right=gt(m.right,u.right),u.bottom=gt(m.bottom,u.bottom),u.left=Ie(m.left,u.left),u},Sl(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Zw(e){const{width:t,height:n}=xl(e);return{width:t,height:n}}function Qw(e,t,n){const r=tt(t),o=et(t),a=n==="fixed",s=Ot(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=Je(0);if(r||!r&&!a)if((en(t)!=="body"||jn(o))&&(l=br(t)),r){const g=Ot(t,!0,a,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&(c.x=oa(o));const u=o&&!r&&!a?Nl(o,l):Je(0),f=s.left+l.scrollLeft-c.x-u.x,m=s.top+l.scrollTop-c.y-u.y;return{x:f,y:m,width:s.width,height:s.height}}function aa(e){return Ve(e).position==="static"}function kl(e,t){if(!tt(e)||Ve(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return et(e)===n&&(n=n.ownerDocument.body),n}function Pl(e,t){const n=_e(e);if(vr(e))return n;if(!tt(e)){let o=bt(e);for(;o&&!tn(o);){if(We(o)&&!aa(o))return o;o=bt(o)}return n}let r=kl(e,t);for(;r&&Bw(r)&&aa(r);)r=kl(r,t);return r&&tn(r)&&aa(r)&&!ea(r)?n:r||zw(e)||n}const Jw=async function(e){const t=this.getOffsetParent||Pl,n=this.getDimensions,r=await n(e.floating);return{reference:Qw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ey(e){return Ve(e).direction==="rtl"}const ty={convertOffsetParentRelativeRectToViewportRelativeRect:Hw,getDocumentElement:et,getClippingRect:Xw,getOffsetParent:Pl,getElementRects:Jw,getClientRects:Gw,getDimensions:Zw,getScale:nn,isElement:We,isRTL:ey};function Ml(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ny(e,t){let n=null,r;const o=et(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:m,width:g,height:p}=u;if(l||t(),!g||!p)return;const v=mr(m),h=mr(o.clientWidth-(f+g)),b=mr(o.clientHeight-(m+p)),y=mr(f),x={rootMargin:-v+"px "+-h+"px "+-b+"px "+-y+"px",threshold:Ie(0,gt(1,c))||1};let S=!0;function E(A){const k=A[0].intersectionRatio;if(k!==c){if(!S)return s();k?s(!1,k):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!Ml(u,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return s(!0),a}function ry(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=ra(e),f=o||a?[...u?An(u):[],...An(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const m=u&&l?ny(u,n):null;let g=-1,p=null;s&&(p=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let v,h=c?Ot(e):null;c&&b();function b(){const y=Ot(e);h&&!Ml(h,y)&&n(),h=y,v=requestAnimationFrame(b)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),m==null||m(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const oy=Ow,ay=$w,sy=Dw,iy=Fw,ly=Iw,Tl=Rw,cy=Lw,dy=(e,t,n)=>{const r=new Map,o={platform:ty,...n},a={...o.platform,_c:r};return Aw(e,t,{...o,platform:a})};var wr=typeof document<"u"?C.useLayoutEffect:C.useEffect;function yr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let 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(!yr(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)&&!yr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function jl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Al(e,t){const n=jl(e);return Math.round(t*n)/n}function sa(e){const t=d.useRef(e);return wr(()=>{t.current=e}),t}function uy(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[f,m]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,p]=d.useState(r);yr(g,r)||p(r);const[v,h]=d.useState(null),[b,y]=d.useState(null),w=d.useCallback(O=>{O!==A.current&&(A.current=O,h(O))},[]),x=d.useCallback(O=>{O!==k.current&&(k.current=O,y(O))},[]),S=a||v,E=s||b,A=d.useRef(null),k=d.useRef(null),P=d.useRef(f),T=c!=null,$=sa(c),Z=sa(o),z=sa(u),ee=d.useCallback(()=>{if(!A.current||!k.current)return;const O={placement:t,strategy:n,middleware:g};Z.current&&(O.platform=Z.current),dy(A.current,k.current,O).then(_=>{const j={..._,isPositioned:z.current!==!1};Y.current&&!yr(P.current,j)&&(P.current=j,Jn.flushSync(()=>{m(j)}))})},[g,t,n,Z,z]);wr(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(O=>({...O,isPositioned:!1})))},[u]);const Y=d.useRef(!1);wr(()=>(Y.current=!0,()=>{Y.current=!1}),[]),wr(()=>{if(S&&(A.current=S),E&&(k.current=E),S&&E){if($.current)return $.current(S,E,ee);ee()}},[S,E,ee,$,T]);const te=d.useMemo(()=>({reference:A,floating:k,setReference:w,setFloating:x}),[w,x]),V=d.useMemo(()=>({reference:S,floating:E}),[S,E]),Q=d.useMemo(()=>{const O={position:n,left:0,top:0};if(!V.floating)return O;const _=Al(V.floating,f.x),j=Al(V.floating,f.y);return l?{...O,transform:"translate("+_+"px, "+j+"px)",...jl(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:j}},[n,l,V.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:ee,refs:te,elements:V,floatingStyles:Q}),[f,ee,te,V,Q])}const fy=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?Tl({element:r.current,padding:o}).fn(n):{}:r?Tl({element:r,padding:o}).fn(n):{}}}},my=(e,t)=>({...oy(e),options:[e,t]}),py=(e,t)=>({...ay(e),options:[e,t]}),hy=(e,t)=>({...cy(e),options:[e,t]}),gy=(e,t)=>({...sy(e),options:[e,t]}),vy=(e,t)=>({...iy(e),options:[e,t]}),by=(e,t)=>({...ly(e),options:[e,t]}),wy=(e,t)=>({...fy(e),options:[e,t]});var yy="Arrow",Rl=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return i.jsx(W.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});Rl.displayName=yy;var xy=Rl;function xr(e){const[t,n]=d.useState(void 0);return ve(()=>{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,l;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;n({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ia="Popper",[Dl,wt]=be(ia),[Cy,Il]=Dl(ia),_l=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return i.jsx(Cy,{scope:t,anchor:r,onAnchorChange:o,children:n})};_l.displayName=ia;var Ol="PopperAnchor",$l=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Il(Ol,n),s=d.useRef(null),l=oe(t,s);return d.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:i.jsx(W.div,{...o,ref:l})});$l.displayName=Ol;var la="PopperContent",[Ny,Sy]=Dl(la),Ll=d.forwardRef((e,t)=>{var R,U,K,ne,ae,se;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:p="optimized",onPlaced:v,...h}=e,b=Il(la,n),[y,w]=d.useState(null),x=oe(t,Ce=>w(Ce)),[S,E]=d.useState(null),A=xr(S),k=(A==null?void 0:A.width)??0,P=(A==null?void 0:A.height)??0,T=r+(a!=="center"?"-"+a:""),$=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},Z=Array.isArray(u)?u:[u],z=Z.length>0,ee={padding:$,boundary:Z.filter(ky),altBoundary:z},{refs:Y,floatingStyles:te,placement:V,isPositioned:Q,middlewareData:O}=uy({strategy:"fixed",placement:T,whileElementsMounted:(...Ce)=>ry(...Ce,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[my({mainAxis:o+P,alignmentAxis:s}),c&&py({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?hy():void 0,...ee}),c&&gy({...ee}),vy({...ee,apply:({elements:Ce,rects:Ne,availableWidth:Le,availableHeight:Re})=>{const{width:Ee,height:G}=Ne.reference,re=Ce.floating.style;re.setProperty("--radix-popper-available-width",`${Le}px`),re.setProperty("--radix-popper-available-height",`${Re}px`),re.setProperty("--radix-popper-anchor-width",`${Ee}px`),re.setProperty("--radix-popper-anchor-height",`${G}px`)}}),S&&wy({element:S,padding:l}),Py({arrowWidth:k,arrowHeight:P}),g&&by({strategy:"referenceHidden",...ee})]}),[_,j]=zl(V),H=we(v);ve(()=>{Q&&(H==null||H())},[Q,H]);const M=(R=O.arrow)==null?void 0:R.x,I=(U=O.arrow)==null?void 0:U.y,L=((K=O.arrow)==null?void 0:K.centerOffset)!==0,[F,J]=d.useState();return ve(()=>{y&&J(window.getComputedStyle(y).zIndex)},[y]),i.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:Q?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[(ne=O.transformOrigin)==null?void 0:ne.x,(ae=O.transformOrigin)==null?void 0:ae.y].join(" "),...((se=O.hide)==null?void 0:se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(Ny,{scope:n,placedSide:_,onArrowChange:E,arrowX:M,arrowY:I,shouldHideArrow:L,children:i.jsx(W.div,{"data-side":_,"data-align":j,...h,ref:x,style:{...h.style,animation:Q?void 0:"none"}})})})});Ll.displayName=la;var Fl="PopperArrow",Ey={top:"bottom",right:"left",bottom:"top",left:"right"},Bl=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Sy(Fl,r),s=Ey[a.placedSide];return i.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:i.jsx(xy,{...o,ref:n,style:{...o.style,display:"block"}})})});Bl.displayName=Fl;function ky(e){return e!==null}var Py=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,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,f]=zl(n),m={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,p=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let v="",h="";return u==="bottom"?(v=s?m:`${g}px`,h=`${-c}px`):u==="top"?(v=s?m:`${g}px`,h=`${r.floating.height+c}px`):u==="right"?(v=`${-c}px`,h=s?m:`${p}px`):u==="left"&&(v=`${r.floating.width+c}px`,h=s?m:`${p}px`),{data:{x:v,y:h}}}});function zl(e){const[t,n="center"]=e.split("-");return[t,n]}var Rn=_l,Dn=$l,Cr=Ll,Nr=Bl,My="Portal",In=d.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,a]=d.useState(!1);ve(()=>a(!0),[]);const s=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?Qn.createPortal(i.jsx(W.div,{...r,ref:t}),s):null});In.displayName=My;function Ty(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var xe=e=>{const{present:t,children:n}=e,r=jy(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),a=oe(r.ref,Ay(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:a}):null};xe.displayName="Presence";function jy(e){const[t,n]=d.useState(),r=d.useRef({}),o=d.useRef(e),a=d.useRef("none"),s=e?"mounted":"unmounted",[l,c]=Ty(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Sr(r.current);a.current=l==="mounted"?u:"none"},[l]),ve(()=>{const u=r.current,f=o.current;if(f!==e){const g=a.current,p=Sr(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&g!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ve(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=p=>{const h=Sr(r.current).includes(p.animationName);if(p.target===t&&h&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},g=p=>{p.target===t&&(a.current=Sr(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:d.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Sr(e){return(e==null?void 0:e.animationName)||"none"}function Ay(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 ca="rovingFocusGroup.onEntryFocus",Ry={bubbles:!1,cancelable:!0},Er="RovingFocusGroup",[da,Wl,Dy]=Qt(Er),[Iy,yt]=be(Er,[Dy]),[_y,Oy]=Iy(Er),Vl=d.forwardRef((e,t)=>i.jsx(da.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(da.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx($y,{...e,ref:t})})}));Vl.displayName=Er;var $y=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...m}=e,g=d.useRef(null),p=oe(t,g),v=pt(a),[h=null,b]=ye({prop:s,defaultProp:l,onChange:c}),[y,w]=d.useState(!1),x=we(u),S=Wl(n),E=d.useRef(!1),[A,k]=d.useState(0);return d.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(ca,x),()=>P.removeEventListener(ca,x)},[x]),i.jsx(_y,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:h,onItemFocus:d.useCallback(P=>b(P),[b]),onItemShiftTab:d.useCallback(()=>w(!0),[]),onFocusableItemAdd:d.useCallback(()=>k(P=>P+1),[]),onFocusableItemRemove:d.useCallback(()=>k(P=>P-1),[]),children:i.jsx(W.div,{tabIndex:y||A===0?-1:0,"data-orientation":r,...m,ref:p,style:{outline:"none",...e.style},onMouseDown:B(e.onMouseDown,()=>{E.current=!0}),onFocus:B(e.onFocus,P=>{const T=!E.current;if(P.target===P.currentTarget&&T&&!y){const $=new CustomEvent(ca,Ry);if(P.currentTarget.dispatchEvent($),!$.defaultPrevented){const Z=S().filter(V=>V.focusable),z=Z.find(V=>V.active),ee=Z.find(V=>V.id===h),te=[z,ee,...Z].filter(Boolean).map(V=>V.ref.current);Ul(te,f)}}E.current=!1}),onBlur:B(e.onBlur,()=>w(!1))})})}),Hl="RovingFocusGroupItem",Gl=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...s}=e,l=pe(),c=a||l,u=Oy(Hl,n),f=u.currentTabStopId===c,m=Wl(n),{onFocusableItemAdd:g,onFocusableItemRemove:p}=u;return d.useEffect(()=>{if(r)return g(),()=>p()},[r,g,p]),i.jsx(da.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:i.jsx(W.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:B(e.onMouseDown,v=>{r?u.onItemFocus(c):v.preventDefault()}),onFocus:B(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:B(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const h=By(v,u.orientation,u.dir);if(h!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let y=m().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=u.loop?zy(y,w+1):y.slice(w+1)}setTimeout(()=>Ul(y))}})})})});Gl.displayName=Hl;var Ly={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Fy(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function By(e,t,n){const r=Fy(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ly[r]}function Ul(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function zy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var kr=Vl,Pr=Gl,Wy=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},rn=new WeakMap,Mr=new WeakMap,Tr={},ua=0,Yl=function(e){return e&&(e.host||Yl(e.parentNode))},Vy=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Yl(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})},Hy=function(e,t,n,r){var o=Vy(t,Array.isArray(e)?e:[e]);Tr[n]||(Tr[n]=new WeakMap);var a=Tr[n],s=[],l=new Set,c=new Set(o),u=function(m){!m||l.has(m)||(l.add(m),u(m.parentNode))};o.forEach(u);var f=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(g){if(l.has(g))f(g);else try{var p=g.getAttribute(r),v=p!==null&&p!=="false",h=(rn.get(g)||0)+1,b=(a.get(g)||0)+1;rn.set(g,h),a.set(g,b),s.push(g),h===1&&v&&Mr.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),l.clear(),ua++,function(){s.forEach(function(m){var g=rn.get(m)-1,p=a.get(m)-1;rn.set(m,g),a.set(m,p),g||(Mr.has(m)||m.removeAttribute(r),Mr.delete(m)),p||m.removeAttribute(n)}),ua--,ua||(rn=new WeakMap,rn=new WeakMap,Mr=new WeakMap,Tr={})}},jr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Wy(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Hy(r,o,n,"aria-hidden")):function(){return null}},nt=function(){return nt=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},nt.apply(this,arguments)};function Kl(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 Gy(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 Ar="right-scroll-bar-position",Rr="width-before-scroll-bar",Uy="with-scroll-bars-hidden",Yy="--removed-body-scroll-bar-size";function fa(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ky(e,t){var n=C.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 qy=typeof window<"u"?d.useLayoutEffect:d.useEffect,ql=new WeakMap;function Xy(e,t){var n=Ky(null,function(r){return e.forEach(function(o){return fa(o,r)})});return qy(function(){var r=ql.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(l){a.has(l)||fa(l,null)}),a.forEach(function(l){o.has(l)||fa(l,s)})}ql.set(n,e)},[e]),n}function Zy(e){return e}function Qy(e,t){t===void 0&&(t=Zy);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(l){return l!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(l){return a(l)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var l=n;n=[],l.forEach(a),s=n}var c=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),n}}}};return o}function Jy(e){e===void 0&&(e={});var t=Qy(null);return t.options=nt({async:!0,ssr:!1},e),t}var Xl=function(e){var t=e.sideCar,n=Kl(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 d.createElement(r,nt({},n))};Xl.isSideCarExport=!0;function ex(e,t){return e.useMedium(t),Xl}var Zl=Jy(),ma=function(){},Dr=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:ma,onWheelCapture:ma,onTouchMoveCapture:ma}),o=r[0],a=r[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,m=e.shards,g=e.sideCar,p=e.noIsolation,v=e.inert,h=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,w=e.gapMode,x=Kl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=g,E=Xy([n,t]),A=nt(nt({},x),o);return d.createElement(d.Fragment,null,f&&d.createElement(S,{sideCar:Zl,removeScrollBar:u,shards:m,noIsolation:p,inert:v,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:w}),s?d.cloneElement(d.Children.only(l),nt(nt({},A),{ref:E})):d.createElement(y,nt({},A,{className:c,ref:E}),l))});Dr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Dr.classNames={fullWidth:Rr,zeroRight:Ar};var tx=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nx(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=tx();return t&&e.setAttribute("nonce",t),e}function rx(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ox(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ax=function(){var e=0,t=null;return{add:function(n){e==0&&(t=nx())&&(rx(t,n),ox(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sx=function(){var e=ax();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ql=function(){var e=sx(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ix={left:0,top:0,right:0,gap:0},pa=function(e){return parseInt(e||"",10)||0},lx=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[pa(n),pa(r),pa(o)]},cx=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ix;var t=lx(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])}},dx=Ql(),on="data-scroll-locked",ux=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
213
|
-
.`.concat(
|
|
212
|
+
*/const ht=de("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),il=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ll=jo,$t=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ll(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const f=n==null?void 0:n[u],m=a==null?void 0:a[u];if(f===null)return null;const h=il(f)||il(m);return o[u][h]}),l=n&&Object.entries(n).reduce((u,f)=>{let[m,h]=f;return h===void 0||(u[m]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:m,className:h,...p}=f;return Object.entries(p).every(v=>{let[g,b]=v;return Array.isArray(b)?b.includes({...a,...l}[g]):{...a,...l}[g]===b})?[...u,m,h]:u},[]);return ll(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},cl=$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 en({className:e,variant:t,...n}){return i.jsx("div",{className:D(cl({variant:t}),e),...n})}function ow({searchTerm:e,activeFilters:t,sortState:n,filters:r,columns:o,onClearSearch:a,onClearFilter:s,onClearSort:l}){var u;return Object.values(t).filter(f=>f&&f!=="all").length>0||e.trim().length>0||n.field!==null?i.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.trim()&&i.jsxs(en,{variant:"secondary",className:"gap-1",children:["Search: ",e,i.jsx(ht,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:a})]}),Object.entries(t).map(([f,m])=>{if(!m||m==="all")return null;const h=r.find(v=>String(v.field)===f),p=h==null?void 0:h.options.find(v=>v.value===m);return i.jsxs(en,{variant:"secondary",className:"gap-1",children:[h==null?void 0:h.label,": ",(p==null?void 0:p.label)||m,i.jsx(ht,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:()=>s(f)})]},f)}),n.field&&i.jsxs(en,{variant:"secondary",className:"gap-1",children:["Sort:"," ",((u=o.find(f=>String(f.key)===n.field))==null?void 0:u.title)||n.field," ",n.direction==="asc"?"↑":"↓",i.jsx(ht,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:l})]})]}):null}function B(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 aw(e,t){const n=d.createContext(t),r=a=>{const{children:s,...l}=a,c=d.useMemo(()=>l,Object.values(l));return i.jsx(n.Provider,{value:c,children:s})};r.displayName=e+"Provider";function o(a){const s=d.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 be(e,t=[]){let n=[];function r(a,s){const l=d.createContext(s),c=n.length;n=[...n,s];const u=m=>{var y;const{scope:h,children:p,...v}=m,g=((y=h==null?void 0:h[e])==null?void 0:y[c])||l,b=d.useMemo(()=>v,Object.values(v));return i.jsx(g.Provider,{value:b,children:p})};u.displayName=a+"Provider";function f(m,h){var g;const p=((g=h==null?void 0:h[e])==null?void 0:g[c])||l,v=d.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=n.map(s=>d.createContext(s));return function(l){const c=(l==null?void 0:l[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,sw(o,...t)]}function sw(...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((l,{useScope:c,scopeName:u})=>{const m=c(a)[`__scope${u}`];return{...l,...m}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function we(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function xe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=iw({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,l=we(n),c=d.useCallback(u=>{if(a){const m=typeof u=="function"?u(e):u;m!==e&&l(m)}else o(u)},[a,e,o,l]);return[s,c]}function iw({defaultProp:e,onChange:t}){const n=d.useState(e),[r]=n,o=d.useRef(r),a=we(t);return d.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}var lw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],W=lw.reduce((e,t)=>{const n=pt(`Primitive.${t}`),r=d.forwardRef((o,a)=>{const{asChild:s,...l}=o,c=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function pr(e,t){e&&rr.flushSync(()=>e.dispatchEvent(t))}function tn(e){const t=e+"CollectionProvider",[n,r]=be(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:b,children:y}=g,w=C.useRef(null),x=C.useRef(new Map).current;return i.jsx(o,{scope:b,itemMap:x,collectionRef:w,children:y})};s.displayName=t;const l=e+"CollectionSlot",c=pt(l),u=C.forwardRef((g,b)=>{const{scope:y,children:w}=g,x=a(l,y),S=oe(b,x.collectionRef);return i.jsx(c,{ref:S,children:w})});u.displayName=l;const f=e+"CollectionItemSlot",m="data-radix-collection-item",h=pt(f),p=C.forwardRef((g,b)=>{const{scope:y,children:w,...x}=g,S=C.useRef(null),E=oe(b,S),A=a(f,y);return C.useEffect(()=>(A.itemMap.set(S,{ref:S,...x}),()=>void A.itemMap.delete(S))),i.jsx(h,{[m]:"",ref:E,children:w})});p.displayName=f;function v(g){const b=a(e+"CollectionConsumer",g);return C.useCallback(()=>{const w=b.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${m}]`));return Array.from(b.itemMap.values()).sort((A,k)=>x.indexOf(A.ref.current)-x.indexOf(k.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},v,r]}var cw=d.createContext(void 0);function gt(e){const t=d.useContext(cw);return e||t||"ltr"}function dw(e,t=globalThis==null?void 0:globalThis.document){const n=we(e);d.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 uw="DismissableLayer",Xo="dismissableLayer.update",fw="dismissableLayer.pointerDownOutside",mw="dismissableLayer.focusOutside",dl,ul=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lt=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,u=d.useContext(ul),[f,m]=d.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=d.useState({}),v=oe(t,k=>m(k)),g=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),w=f?g.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=w>=y,E=gw(k=>{const P=k.target,j=[...u.branches].some($=>$.contains(P));!S||j||(o==null||o(k),s==null||s(k),k.defaultPrevented||l==null||l())},h),A=vw(k=>{const P=k.target;[...u.branches].some($=>$.contains(P))||(a==null||a(k),s==null||s(k),k.defaultPrevented||l==null||l())},h);return dw(k=>{w===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&l&&(k.preventDefault(),l()))},h),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(dl=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),fl(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=dl)}},[f,h,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),fl())},[f,u]),d.useEffect(()=>{const k=()=>p({});return document.addEventListener(Xo,k),()=>document.removeEventListener(Xo,k)},[]),i.jsx(W.div,{...c,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:B(e.onFocusCapture,A.onFocusCapture),onBlurCapture:B(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,E.onPointerDownCapture)})});Lt.displayName=uw;var pw="DismissableLayerBranch",hw=d.forwardRef((e,t)=>{const n=d.useContext(ul),r=d.useRef(null),o=oe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),i.jsx(W.div,{...e,ref:o})});hw.displayName=pw;function gw(e,t=globalThis==null?void 0:globalThis.document){const n=we(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=l=>{if(l.target&&!r.current){let c=function(){ml(fw,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}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 vw(e,t=globalThis==null?void 0:globalThis.document){const n=we(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&ml(mw,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 fl(){const e=new CustomEvent(Xo);document.dispatchEvent(e)}function ml(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?pr(o,a):o.dispatchEvent(a)}var Zo=0;function hr(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??pl()),document.body.insertAdjacentElement("beforeend",e[1]??pl()),Zo++,()=>{Zo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Zo--}},[])}function pl(){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 Qo="focusScope.autoFocusOnMount",Jo="focusScope.autoFocusOnUnmount",hl={bubbles:!1,cancelable:!0},bw="FocusScope",jn=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[l,c]=d.useState(null),u=we(o),f=we(a),m=d.useRef(null),h=oe(t,g=>c(g)),p=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let g=function(x){if(p.paused||!l)return;const S=x.target;l.contains(S)?m.current=S:vt(m.current,{select:!0})},b=function(x){if(p.paused||!l)return;const S=x.relatedTarget;S!==null&&(l.contains(S)||vt(m.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&vt(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const w=new MutationObserver(y);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),w.disconnect()}}},[r,l,p.paused]),d.useEffect(()=>{if(l){bl.add(p);const g=document.activeElement;if(!l.contains(g)){const y=new CustomEvent(Qo,hl);l.addEventListener(Qo,u),l.dispatchEvent(y),y.defaultPrevented||(ww(Sw(gl(l)),{select:!0}),document.activeElement===g&&vt(l))}return()=>{l.removeEventListener(Qo,u),setTimeout(()=>{const y=new CustomEvent(Jo,hl);l.addEventListener(Jo,f),l.dispatchEvent(y),y.defaultPrevented||vt(g??document.body,{select:!0}),l.removeEventListener(Jo,f),bl.remove(p)},0)}}},[l,u,f,p]);const v=d.useCallback(g=>{if(!n&&!r||p.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(b&&y){const w=g.currentTarget,[x,S]=yw(w);x&&S?!g.shiftKey&&y===S?(g.preventDefault(),n&&vt(x,{select:!0})):g.shiftKey&&y===x&&(g.preventDefault(),n&&vt(S,{select:!0})):y===w&&g.preventDefault()}},[n,r,p.paused]);return i.jsx(W.div,{tabIndex:-1,...s,ref:h,onKeyDown:v})});jn.displayName=bw;function ww(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(vt(r,{select:t}),document.activeElement!==n)return}function yw(e){const t=gl(e),n=vl(t,e),r=vl(t.reverse(),e);return[n,r]}function gl(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 vl(e,t){for(const n of e)if(!xw(n,{upTo:t}))return n}function xw(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 Cw(e){return e instanceof HTMLInputElement&&"select"in e}function vt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Cw(e)&&t&&e.select()}}var bl=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 Sw(e){return e.filter(t=>t.tagName!=="A")}var ve=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Ew=d[" useId ".trim().toString()]||(()=>{}),kw=0;function pe(e){const[t,n]=d.useState(Ew());return ve(()=>{n(r=>r??String(kw++))},[e]),t?`radix-${t}`:""}const Pw=["top","right","bottom","left"],bt=Math.min,Ie=Math.max,gr=Math.round,vr=Math.floor,Je=e=>({x:e,y:e}),Tw={left:"right",right:"left",bottom:"top",top:"bottom"},Mw={start:"end",end:"start"};function ea(e,t,n){return Ie(e,bt(t,n))}function st(e,t){return typeof e=="function"?e(t):e}function it(e){return e.split("-")[0]}function nn(e){return e.split("-")[1]}function ta(e){return e==="x"?"y":"x"}function na(e){return e==="y"?"height":"width"}function wt(e){return["top","bottom"].includes(it(e))?"y":"x"}function ra(e){return ta(wt(e))}function jw(e,t,n){n===void 0&&(n=!1);const r=nn(e),o=ra(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=br(s)),[s,br(s)]}function Aw(e){const t=br(e);return[oa(e),t,oa(t)]}function oa(e){return e.replace(/start|end/g,t=>Mw[t])}function Rw(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 Dw(e,t,n,r){const o=nn(e);let a=Rw(it(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(oa)))),a}function br(e){return e.replace(/left|right|bottom|top/g,t=>Tw[t])}function Iw(e){return{top:0,right:0,bottom:0,left:0,...e}}function yl(e){return typeof e!="number"?Iw(e):{top:e,right:e,bottom:e,left:e}}function wr(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 xl(e,t,n){let{reference:r,floating:o}=e;const a=wt(t),s=ra(t),l=na(s),c=it(t),u=a==="y",f=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:m};break;case"left":p={x:r.x-o.width,y:m};break;default:p={x:r.x,y:r.y}}switch(nn(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}const _w=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,l=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:m}=xl(u,r,c),h=r,p={},v=0;for(let g=0;g<l.length;g++){const{name:b,fn:y}=l[g],{x:w,y:x,data:S,reset:E}=await y({x:f,y:m,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});f=w??f,m=x??m,p={...p,[b]:{...p[b],...S}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(u=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:m}=xl(u,h,c)),g=-1)}return{x:f,y:m,placement:h,strategy:o,middlewareData:p}};async function An(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:h=!1,padding:p=0}=st(t,e),v=yl(p),b=l[h?m==="floating"?"reference":"floating":m],y=wr(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(l.floating)),boundary:u,rootBoundary:f,strategy:c})),w=m==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.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},E=wr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:x,strategy:c}):w);return{top:(y.top-E.top+v.top)/S.y,bottom:(E.bottom-y.bottom+v.bottom)/S.y,left:(y.left-E.left+v.left)/S.x,right:(E.right-y.right+v.right)/S.x}}const Ow=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:l,middlewareData:c}=t,{element:u,padding:f=0}=st(e,t)||{};if(u==null)return{};const m=yl(f),h={x:n,y:r},p=ra(o),v=na(p),g=await s.getDimensions(u),b=p==="y",y=b?"top":"left",w=b?"bottom":"right",x=b?"clientHeight":"clientWidth",S=a.reference[v]+a.reference[p]-h[p]-a.floating[v],E=h[p]-a.reference[p],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=A?A[x]:0;(!k||!await(s.isElement==null?void 0:s.isElement(A)))&&(k=l.floating[x]||a.floating[v]);const P=S/2-E/2,j=k/2-g[v]/2-1,$=bt(m[y],j),H=bt(m[w],j),z=$,ee=k-g[v]-H,K=k/2-g[v]/2+P,te=ea(z,K,ee),V=!c.arrow&&nn(o)!=null&&K!==te&&a.reference[v]/2-(K<z?$:H)-g[v]/2<0,Q=V?K<z?K-z:K-ee:0;return{[p]:h[p]+Q,data:{[p]:te,centerOffset:K-te-Q,...V&&{alignmentOffset:Q}},reset:V}}}),$w=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:l,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...b}=st(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=it(o),w=wt(l),x=it(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),E=h||(x||!g?[br(l)]:Aw(l)),A=v!=="none";!h&&A&&E.push(...Dw(l,g,v,S));const k=[l,...E],P=await An(t,b),j=[];let $=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&j.push(P[y]),m){const K=jw(o,s,S);j.push(P[K[0]],P[K[1]])}if($=[...$,{placement:o,overflows:j}],!j.every(K=>K<=0)){var H,z;const K=(((H=a.flip)==null?void 0:H.index)||0)+1,te=k[K];if(te)return{data:{index:K,overflows:$},reset:{placement:te}};let V=(z=$.filter(Q=>Q.overflows[0]<=0).sort((Q,_)=>Q.overflows[1]-_.overflows[1])[0])==null?void 0:z.placement;if(!V)switch(p){case"bestFit":{var ee;const Q=(ee=$.filter(_=>{if(A){const O=wt(_.placement);return O===w||O==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(O=>O>0).reduce((O,M)=>O+M,0)]).sort((_,O)=>_[1]-O[1])[0])==null?void 0:ee[0];Q&&(V=Q);break}case"initialPlacement":V=l;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function Cl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Nl(e){return Pw.some(t=>e[t]>=0)}const Lw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=st(e,t);switch(r){case"referenceHidden":{const a=await An(t,{...o,elementContext:"reference"}),s=Cl(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Nl(s)}}}case"escaped":{const a=await An(t,{...o,altBoundary:!0}),s=Cl(a,n.floating);return{data:{escapedOffsets:s,escaped:Nl(s)}}}default:return{}}}}};async function Fw(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=it(n),l=nn(n),c=wt(n)==="y",u=["left","top"].includes(s)?-1:1,f=a&&c?-1:1,m=st(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:v}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof v=="number"&&(p=l==="end"?v*-1:v),c?{x:p*f,y:h*u}:{x:h*u,y:p*f}}const Bw=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:l}=t,c=await Fw(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},zw=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:l={fn:b=>{let{x:y,y:w}=b;return{x:y,y:w}}},...c}=st(e,t),u={x:n,y:r},f=await An(t,c),m=wt(it(o)),h=ta(m);let p=u[h],v=u[m];if(a){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=p+f[b],x=p-f[y];p=ea(w,p,x)}if(s){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=v+f[b],x=v-f[y];v=ea(w,v,x)}const g=l.fn({...t,[h]:p,[m]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:a,[m]:s}}}}}},Ww=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=st(e,t),f={x:n,y:r},m=wt(o),h=ta(m);let p=f[h],v=f[m];const g=st(l,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const x=h==="y"?"height":"width",S=a.reference[h]-a.floating[x]+b.mainAxis,E=a.reference[h]+a.reference[x]-b.mainAxis;p<S?p=S:p>E&&(p=E)}if(u){var y,w;const x=h==="y"?"width":"height",S=["top","left"].includes(it(o)),E=a.reference[m]-a.floating[x]+(S&&((y=s.offset)==null?void 0:y[m])||0)+(S?0:b.crossAxis),A=a.reference[m]+a.reference[x]+(S?0:((w=s.offset)==null?void 0:w[m])||0)-(S?b.crossAxis:0);v<E?v=E:v>A&&(v=A)}return{[h]:p,[m]:v}}}},Vw=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:l}=t,{apply:c=()=>{},...u}=st(e,t),f=await An(t,u),m=it(o),h=nn(o),p=wt(o)==="y",{width:v,height:g}=a.floating;let b,y;m==="top"||m==="bottom"?(b=m,y=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(y=m,b=h==="end"?"top":"bottom");const w=g-f.top-f.bottom,x=v-f.left-f.right,S=bt(g-f[b],w),E=bt(v-f[y],x),A=!t.middlewareData.shift;let k=S,P=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=w),A&&!h){const $=Ie(f.left,0),H=Ie(f.right,0),z=Ie(f.top,0),ee=Ie(f.bottom,0);p?P=v-2*($!==0||H!==0?$+H:Ie(f.left,f.right)):k=g-2*(z!==0||ee!==0?z+ee:Ie(f.top,f.bottom))}await c({...t,availableWidth:P,availableHeight:k});const j=await s.getDimensions(l.floating);return v!==j.width||g!==j.height?{reset:{rects:!0}}:{}}}};function yr(){return typeof window<"u"}function rn(e){return Sl(e)?(e.nodeName||"").toLowerCase():"#document"}function _e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function et(e){var t;return(t=(Sl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sl(e){return yr()?e instanceof Node||e instanceof _e(e).Node:!1}function We(e){return yr()?e instanceof Element||e instanceof _e(e).Element:!1}function tt(e){return yr()?e instanceof HTMLElement||e instanceof _e(e).HTMLElement:!1}function El(e){return!yr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _e(e).ShadowRoot}function Rn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ve(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Hw(e){return["table","td","th"].includes(rn(e))}function xr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function aa(e){const t=sa(),n=We(e)?Ve(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Gw(e){let t=yt(e);for(;tt(t)&&!on(t);){if(aa(t))return t;if(xr(t))return null;t=yt(t)}return null}function sa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function on(e){return["html","body","#document"].includes(rn(e))}function Ve(e){return _e(e).getComputedStyle(e)}function Cr(e){return We(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yt(e){if(rn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||El(e)&&e.host||et(e);return El(t)?t.host:t}function kl(e){const t=yt(e);return on(t)?e.ownerDocument?e.ownerDocument.body:e.body:tt(t)&&Rn(t)?t:kl(t)}function Dn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=kl(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=_e(o);if(a){const l=ia(s);return t.concat(s,s.visualViewport||[],Rn(o)?o:[],l&&n?Dn(l):[])}return t.concat(o,Dn(o,[],n))}function ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Pl(e){const t=Ve(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=tt(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=gr(n)!==a||gr(r)!==s;return l&&(n=a,r=s),{width:n,height:r,$:l}}function la(e){return We(e)?e:e.contextElement}function an(e){const t=la(e);if(!tt(t))return Je(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Pl(t);let s=(a?gr(n.width):n.width)/r,l=(a?gr(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Uw=Je(0);function Tl(e){const t=_e(e);return!sa()||!t.visualViewport?Uw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==_e(e)?!1:t}function Ft(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=la(e);let s=Je(1);t&&(r?We(r)&&(s=an(r)):s=an(e));const l=Yw(a,n,r)?Tl(a):Je(0);let c=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,f=o.width/s.x,m=o.height/s.y;if(a){const h=_e(a),p=r&&We(r)?_e(r):r;let v=h,g=ia(v);for(;g&&r&&p!==v;){const b=an(g),y=g.getBoundingClientRect(),w=Ve(g),x=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*b.x,S=y.top+(g.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,u*=b.y,f*=b.x,m*=b.y,c+=x,u+=S,v=_e(g),g=ia(v)}}return wr({width:f,height:m,x:c,y:u})}function ca(e,t){const n=Cr(e).scrollLeft;return t?t.left+n:Ft(et(e)).left+n}function Ml(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ca(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function Kw(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=et(r),l=t?xr(t.floating):!1;if(r===s||l&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Je(1);const f=Je(0),m=tt(r);if((m||!m&&!a)&&((rn(r)!=="body"||Rn(s))&&(c=Cr(r)),tt(r))){const p=Ft(r);u=an(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const h=s&&!m&&!a?Ml(s,c,!0):Je(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+h.x,y:n.y*u.y-c.scrollTop*u.y+f.y+h.y}}function qw(e){return Array.from(e.getClientRects())}function Xw(e){const t=et(e),n=Cr(e),r=e.ownerDocument.body,o=Ie(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ie(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ca(e);const l=-n.scrollTop;return Ve(r).direction==="rtl"&&(s+=Ie(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:l}}function Zw(e,t){const n=_e(e),r=et(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,l=0,c=0;if(o){a=o.width,s=o.height;const u=sa();(!u||u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:a,height:s,x:l,y:c}}function Qw(e,t){const n=Ft(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=tt(e)?an(e):Je(1),s=e.clientWidth*a.x,l=e.clientHeight*a.y,c=o*a.x,u=r*a.y;return{width:s,height:l,x:c,y:u}}function jl(e,t,n){let r;if(t==="viewport")r=Zw(e,n);else if(t==="document")r=Xw(et(e));else if(We(t))r=Qw(t,n);else{const o=Tl(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return wr(r)}function Al(e,t){const n=yt(e);return n===t||!We(n)||on(n)?!1:Ve(n).position==="fixed"||Al(n,t)}function Jw(e,t){const n=t.get(e);if(n)return n;let r=Dn(e,[],!1).filter(l=>We(l)&&rn(l)!=="body"),o=null;const a=Ve(e).position==="fixed";let s=a?yt(e):e;for(;We(s)&&!on(s);){const l=Ve(s),c=aa(s);!c&&l.position==="fixed"&&(o=null),(a?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Rn(s)&&!c&&Al(e,s))?r=r.filter(f=>f!==s):o=l,s=yt(s)}return t.set(e,r),r}function ey(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?xr(t)?[]:Jw(t,this._c):[].concat(n),r],l=s[0],c=s.reduce((u,f)=>{const m=jl(t,f,o);return u.top=Ie(m.top,u.top),u.right=bt(m.right,u.right),u.bottom=bt(m.bottom,u.bottom),u.left=Ie(m.left,u.left),u},jl(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function ty(e){const{width:t,height:n}=Pl(e);return{width:t,height:n}}function ny(e,t,n){const r=tt(t),o=et(t),a=n==="fixed",s=Ft(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=Je(0);if(r||!r&&!a)if((rn(t)!=="body"||Rn(o))&&(l=Cr(t)),r){const h=Ft(t,!0,a,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else o&&(c.x=ca(o));const u=o&&!r&&!a?Ml(o,l):Je(0),f=s.left+l.scrollLeft-c.x-u.x,m=s.top+l.scrollTop-c.y-u.y;return{x:f,y:m,width:s.width,height:s.height}}function da(e){return Ve(e).position==="static"}function Rl(e,t){if(!tt(e)||Ve(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return et(e)===n&&(n=n.ownerDocument.body),n}function Dl(e,t){const n=_e(e);if(xr(e))return n;if(!tt(e)){let o=yt(e);for(;o&&!on(o);){if(We(o)&&!da(o))return o;o=yt(o)}return n}let r=Rl(e,t);for(;r&&Hw(r)&&da(r);)r=Rl(r,t);return r&&on(r)&&da(r)&&!aa(r)?n:r||Gw(e)||n}const ry=async function(e){const t=this.getOffsetParent||Dl,n=this.getDimensions,r=await n(e.floating);return{reference:ny(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function oy(e){return Ve(e).direction==="rtl"}const ay={convertOffsetParentRelativeRectToViewportRelativeRect:Kw,getDocumentElement:et,getClippingRect:ey,getOffsetParent:Dl,getElementRects:ry,getClientRects:qw,getDimensions:ty,getScale:an,isElement:We,isRTL:oy};function Il(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sy(e,t){let n=null,r;const o=et(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:m,width:h,height:p}=u;if(l||t(),!h||!p)return;const v=vr(m),g=vr(o.clientWidth-(f+h)),b=vr(o.clientHeight-(m+p)),y=vr(f),x={rootMargin:-v+"px "+-g+"px "+-b+"px "+-y+"px",threshold:Ie(0,bt(1,c))||1};let S=!0;function E(A){const k=A[0].intersectionRatio;if(k!==c){if(!S)return s();k?s(!1,k):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!Il(u,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return s(!0),a}function iy(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=la(e),f=o||a?[...u?Dn(u):[],...Dn(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const m=u&&l?sy(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let v,g=c?Ft(e):null;c&&b();function b(){const y=Ft(e);g&&!Il(g,y)&&n(),g=y,v=requestAnimationFrame(b)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),m==null||m(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const ly=Bw,cy=zw,dy=$w,uy=Vw,fy=Lw,_l=Ow,my=Ww,py=(e,t,n)=>{const r=new Map,o={platform:ay,...n},a={...o.platform,_c:r};return _w(e,t,{...o,platform:a})};var Nr=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Sr(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(!Sr(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)&&!Sr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Ol(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $l(e,t){const n=Ol(e);return Math.round(t*n)/n}function ua(e){const t=d.useRef(e);return Nr(()=>{t.current=e}),t}function hy(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[f,m]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=d.useState(r);Sr(h,r)||p(r);const[v,g]=d.useState(null),[b,y]=d.useState(null),w=d.useCallback(_=>{_!==A.current&&(A.current=_,g(_))},[]),x=d.useCallback(_=>{_!==k.current&&(k.current=_,y(_))},[]),S=a||v,E=s||b,A=d.useRef(null),k=d.useRef(null),P=d.useRef(f),j=c!=null,$=ua(c),H=ua(o),z=ua(u),ee=d.useCallback(()=>{if(!A.current||!k.current)return;const _={placement:t,strategy:n,middleware:h};H.current&&(_.platform=H.current),py(A.current,k.current,_).then(O=>{const M={...O,isPositioned:z.current!==!1};K.current&&!Sr(P.current,M)&&(P.current=M,rr.flushSync(()=>{m(M)}))})},[h,t,n,H,z]);Nr(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(_=>({..._,isPositioned:!1})))},[u]);const K=d.useRef(!1);Nr(()=>(K.current=!0,()=>{K.current=!1}),[]),Nr(()=>{if(S&&(A.current=S),E&&(k.current=E),S&&E){if($.current)return $.current(S,E,ee);ee()}},[S,E,ee,$,j]);const te=d.useMemo(()=>({reference:A,floating:k,setReference:w,setFloating:x}),[w,x]),V=d.useMemo(()=>({reference:S,floating:E}),[S,E]),Q=d.useMemo(()=>{const _={position:n,left:0,top:0};if(!V.floating)return _;const O=$l(V.floating,f.x),M=$l(V.floating,f.y);return l?{..._,transform:"translate("+O+"px, "+M+"px)",...Ol(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:M}},[n,l,V.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:ee,refs:te,elements:V,floatingStyles:Q}),[f,ee,te,V,Q])}const gy=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?_l({element:r.current,padding:o}).fn(n):{}:r?_l({element:r,padding:o}).fn(n):{}}}},vy=(e,t)=>({...ly(e),options:[e,t]}),by=(e,t)=>({...cy(e),options:[e,t]}),wy=(e,t)=>({...my(e),options:[e,t]}),yy=(e,t)=>({...dy(e),options:[e,t]}),xy=(e,t)=>({...uy(e),options:[e,t]}),Cy=(e,t)=>({...fy(e),options:[e,t]}),Ny=(e,t)=>({...gy(e),options:[e,t]});var Sy="Arrow",Ll=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return i.jsx(W.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ll.displayName=Sy;var Ey=Ll;function Er(e){const[t,n]=d.useState(void 0);return ve(()=>{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,l;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;n({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var fa="Popper",[Fl,xt]=be(fa),[ky,Bl]=Fl(fa),zl=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return i.jsx(ky,{scope:t,anchor:r,onAnchorChange:o,children:n})};zl.displayName=fa;var Wl="PopperAnchor",Vl=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Bl(Wl,n),s=d.useRef(null),l=oe(t,s);return d.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:i.jsx(W.div,{...o,ref:l})});Vl.displayName=Wl;var ma="PopperContent",[Py,Ty]=Fl(ma),Hl=d.forwardRef((e,t)=>{var R,Y,q,ne,re,ie;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:v,...g}=e,b=Bl(ma,n),[y,w]=d.useState(null),x=oe(t,Ne=>w(Ne)),[S,E]=d.useState(null),A=Er(S),k=(A==null?void 0:A.width)??0,P=(A==null?void 0:A.height)??0,j=r+(a!=="center"?"-"+a:""),$=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},H=Array.isArray(u)?u:[u],z=H.length>0,ee={padding:$,boundary:H.filter(jy),altBoundary:z},{refs:K,floatingStyles:te,placement:V,isPositioned:Q,middlewareData:_}=hy({strategy:"fixed",placement:j,whileElementsMounted:(...Ne)=>iy(...Ne,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[vy({mainAxis:o+P,alignmentAxis:s}),c&&by({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?wy():void 0,...ee}),c&&yy({...ee}),xy({...ee,apply:({elements:Ne,rects:ye,availableWidth:Fe,availableHeight:Oe})=>{const{width:Ee,height:Be}=ye.reference,Te=Ne.floating.style;Te.setProperty("--radix-popper-available-width",`${Fe}px`),Te.setProperty("--radix-popper-available-height",`${Oe}px`),Te.setProperty("--radix-popper-anchor-width",`${Ee}px`),Te.setProperty("--radix-popper-anchor-height",`${Be}px`)}}),S&&Ny({element:S,padding:l}),Ay({arrowWidth:k,arrowHeight:P}),h&&Cy({strategy:"referenceHidden",...ee})]}),[O,M]=Yl(V),U=we(v);ve(()=>{Q&&(U==null||U())},[Q,U]);const T=(R=_.arrow)==null?void 0:R.x,I=(Y=_.arrow)==null?void 0:Y.y,L=((q=_.arrow)==null?void 0:q.centerOffset)!==0,[F,J]=d.useState();return ve(()=>{y&&J(window.getComputedStyle(y).zIndex)},[y]),i.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:Q?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[(ne=_.transformOrigin)==null?void 0:ne.x,(re=_.transformOrigin)==null?void 0:re.y].join(" "),...((ie=_.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(Py,{scope:n,placedSide:O,onArrowChange:E,arrowX:T,arrowY:I,shouldHideArrow:L,children:i.jsx(W.div,{"data-side":O,"data-align":M,...g,ref:x,style:{...g.style,animation:Q?void 0:"none"}})})})});Hl.displayName=ma;var Gl="PopperArrow",My={top:"bottom",right:"left",bottom:"top",left:"right"},Ul=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Ty(Gl,r),s=My[a.placedSide];return i.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:i.jsx(Ey,{...o,ref:n,style:{...o.style,display:"block"}})})});Ul.displayName=Gl;function jy(e){return e!==null}var Ay=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,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,f]=Yl(n),m={start:"0%",center:"50%",end:"100%"}[f],h=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,p=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let v="",g="";return u==="bottom"?(v=s?m:`${h}px`,g=`${-c}px`):u==="top"?(v=s?m:`${h}px`,g=`${r.floating.height+c}px`):u==="right"?(v=`${-c}px`,g=s?m:`${p}px`):u==="left"&&(v=`${r.floating.width+c}px`,g=s?m:`${p}px`),{data:{x:v,y:g}}}});function Yl(e){const[t,n="center"]=e.split("-");return[t,n]}var In=zl,_n=Vl,kr=Hl,Pr=Ul,Ry="Portal",On=d.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,a]=d.useState(!1);ve(()=>a(!0),[]);const s=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?nr.createPortal(i.jsx(W.div,{...r,ref:t}),s):null});On.displayName=Ry;function Dy(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var Ce=e=>{const{present:t,children:n}=e,r=Iy(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),a=oe(r.ref,_y(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:a}):null};Ce.displayName="Presence";function Iy(e){const[t,n]=d.useState(),r=d.useRef({}),o=d.useRef(e),a=d.useRef("none"),s=e?"mounted":"unmounted",[l,c]=Dy(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Tr(r.current);a.current=l==="mounted"?u:"none"},[l]),ve(()=>{const u=r.current,f=o.current;if(f!==e){const h=a.current,p=Tr(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ve(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=p=>{const g=Tr(r.current).includes(p.animationName);if(p.target===t&&g&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=p=>{p.target===t&&(a.current=Tr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:d.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Tr(e){return(e==null?void 0:e.animationName)||"none"}function _y(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 pa="rovingFocusGroup.onEntryFocus",Oy={bubbles:!1,cancelable:!0},Mr="RovingFocusGroup",[ha,Kl,$y]=tn(Mr),[Ly,Ct]=be(Mr,[$y]),[Fy,By]=Ly(Mr),ql=d.forwardRef((e,t)=>i.jsx(ha.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(ha.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(zy,{...e,ref:t})})}));ql.displayName=Mr;var zy=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...m}=e,h=d.useRef(null),p=oe(t,h),v=gt(a),[g=null,b]=xe({prop:s,defaultProp:l,onChange:c}),[y,w]=d.useState(!1),x=we(u),S=Kl(n),E=d.useRef(!1),[A,k]=d.useState(0);return d.useEffect(()=>{const P=h.current;if(P)return P.addEventListener(pa,x),()=>P.removeEventListener(pa,x)},[x]),i.jsx(Fy,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:g,onItemFocus:d.useCallback(P=>b(P),[b]),onItemShiftTab:d.useCallback(()=>w(!0),[]),onFocusableItemAdd:d.useCallback(()=>k(P=>P+1),[]),onFocusableItemRemove:d.useCallback(()=>k(P=>P-1),[]),children:i.jsx(W.div,{tabIndex:y||A===0?-1:0,"data-orientation":r,...m,ref:p,style:{outline:"none",...e.style},onMouseDown:B(e.onMouseDown,()=>{E.current=!0}),onFocus:B(e.onFocus,P=>{const j=!E.current;if(P.target===P.currentTarget&&j&&!y){const $=new CustomEvent(pa,Oy);if(P.currentTarget.dispatchEvent($),!$.defaultPrevented){const H=S().filter(V=>V.focusable),z=H.find(V=>V.active),ee=H.find(V=>V.id===g),te=[z,ee,...H].filter(Boolean).map(V=>V.ref.current);Ql(te,f)}}E.current=!1}),onBlur:B(e.onBlur,()=>w(!1))})})}),Xl="RovingFocusGroupItem",Zl=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...s}=e,l=pe(),c=a||l,u=By(Xl,n),f=u.currentTabStopId===c,m=Kl(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=u;return d.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),i.jsx(ha.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:i.jsx(W.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:B(e.onMouseDown,v=>{r?u.onItemFocus(c):v.preventDefault()}),onFocus:B(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:B(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const g=Hy(v,u.orientation,u.dir);if(g!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let y=m().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(v.currentTarget);y=u.loop?Gy(y,w+1):y.slice(w+1)}setTimeout(()=>Ql(y))}})})})});Zl.displayName=Xl;var Wy={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Vy(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Hy(e,t,n){const r=Vy(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Wy[r]}function Ql(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Gy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var jr=ql,Ar=Zl,Uy=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},sn=new WeakMap,Rr=new WeakMap,Dr={},ga=0,Jl=function(e){return e&&(e.host||Jl(e.parentNode))},Yy=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Jl(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})},Ky=function(e,t,n,r){var o=Yy(t,Array.isArray(e)?e:[e]);Dr[n]||(Dr[n]=new WeakMap);var a=Dr[n],s=[],l=new Set,c=new Set(o),u=function(m){!m||l.has(m)||(l.add(m),u(m.parentNode))};o.forEach(u);var f=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(h){if(l.has(h))f(h);else try{var p=h.getAttribute(r),v=p!==null&&p!=="false",g=(sn.get(h)||0)+1,b=(a.get(h)||0)+1;sn.set(h,g),a.set(h,b),s.push(h),g===1&&v&&Rr.set(h,!0),b===1&&h.setAttribute(n,"true"),v||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return f(t),l.clear(),ga++,function(){s.forEach(function(m){var h=sn.get(m)-1,p=a.get(m)-1;sn.set(m,h),a.set(m,p),h||(Rr.has(m)||m.removeAttribute(r),Rr.delete(m)),p||m.removeAttribute(n)}),ga--,ga||(sn=new WeakMap,sn=new WeakMap,Rr=new WeakMap,Dr={})}},Ir=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Uy(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Ky(r,o,n,"aria-hidden")):function(){return null}},nt=function(){return nt=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},nt.apply(this,arguments)};function ec(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 qy(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 _r="right-scroll-bar-position",Or="width-before-scroll-bar",Xy="with-scroll-bars-hidden",Zy="--removed-body-scroll-bar-size";function va(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Qy(e,t){var n=C.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 Jy=typeof window<"u"?d.useLayoutEffect:d.useEffect,tc=new WeakMap;function ex(e,t){var n=Qy(null,function(r){return e.forEach(function(o){return va(o,r)})});return Jy(function(){var r=tc.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(l){a.has(l)||va(l,null)}),a.forEach(function(l){o.has(l)||va(l,s)})}tc.set(n,e)},[e]),n}function tx(e){return e}function nx(e,t){t===void 0&&(t=tx);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(l){return l!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(l){return a(l)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var l=n;n=[],l.forEach(a),s=n}var c=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),n}}}};return o}function rx(e){e===void 0&&(e={});var t=nx(null);return t.options=nt({async:!0,ssr:!1},e),t}var nc=function(e){var t=e.sideCar,n=ec(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 d.createElement(r,nt({},n))};nc.isSideCarExport=!0;function ox(e,t){return e.useMedium(t),nc}var rc=rx(),ba=function(){},$r=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:ba,onWheelCapture:ba,onTouchMoveCapture:ba}),o=r[0],a=r[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,m=e.shards,h=e.sideCar,p=e.noIsolation,v=e.inert,g=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,w=e.gapMode,x=ec(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,E=ex([n,t]),A=nt(nt({},x),o);return d.createElement(d.Fragment,null,f&&d.createElement(S,{sideCar:rc,removeScrollBar:u,shards:m,noIsolation:p,inert:v,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:w}),s?d.cloneElement(d.Children.only(l),nt(nt({},A),{ref:E})):d.createElement(y,nt({},A,{className:c,ref:E}),l))});$r.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$r.classNames={fullWidth:Or,zeroRight:_r};var ax=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sx(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ax();return t&&e.setAttribute("nonce",t),e}function ix(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lx(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cx=function(){var e=0,t=null;return{add:function(n){e==0&&(t=sx())&&(ix(t,n),lx(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dx=function(){var e=cx();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},oc=function(){var e=dx(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ux={left:0,top:0,right:0,gap:0},wa=function(e){return parseInt(e||"",10)||0},fx=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[wa(n),wa(r),wa(o)]},mx=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ux;var t=fx(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])}},px=oc(),ln="data-scroll-locked",hx=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
213
|
+
.`.concat(Xy,` {
|
|
214
214
|
overflow: hidden `).concat(r,`;
|
|
215
215
|
padding-right: `).concat(l,"px ").concat(r,`;
|
|
216
216
|
}
|
|
217
|
-
body[`).concat(
|
|
217
|
+
body[`).concat(ln,`] {
|
|
218
218
|
overflow: hidden `).concat(r,`;
|
|
219
219
|
overscroll-behavior: contain;
|
|
220
220
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
@@ -227,46 +227,46 @@ React keys must be passed directly to JSX without using spread:
|
|
|
227
227
|
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
.`).concat(
|
|
230
|
+
.`).concat(_r,` {
|
|
231
231
|
right: `).concat(l,"px ").concat(r,`;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
.`).concat(
|
|
234
|
+
.`).concat(Or,` {
|
|
235
235
|
margin-right: `).concat(l,"px ").concat(r,`;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
.`).concat(
|
|
238
|
+
.`).concat(_r," .").concat(_r,` {
|
|
239
239
|
right: 0 `).concat(r,`;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
.`).concat(
|
|
242
|
+
.`).concat(Or," .").concat(Or,` {
|
|
243
243
|
margin-right: 0 `).concat(r,`;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
body[`).concat(
|
|
247
|
-
`).concat(
|
|
246
|
+
body[`).concat(ln,`] {
|
|
247
|
+
`).concat(Zy,": ").concat(l,`px;
|
|
248
248
|
}
|
|
249
|
-
`)},
|
|
249
|
+
`)},ac=function(){var e=parseInt(document.body.getAttribute(ln)||"0",10);return isFinite(e)?e:0},gx=function(){d.useEffect(function(){return document.body.setAttribute(ln,(ac()+1).toString()),function(){var e=ac()-1;e<=0?document.body.removeAttribute(ln):document.body.setAttribute(ln,e.toString())}},[])},vx=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;gx();var a=d.useMemo(function(){return mx(o)},[o]);return d.createElement(px,{styles:hx(a,!t,o,n?"":"!important")})},ya=!1;if(typeof window<"u")try{var Lr=Object.defineProperty({},"passive",{get:function(){return ya=!0,!0}});window.addEventListener("test",Lr,Lr),window.removeEventListener("test",Lr,Lr)}catch{ya=!1}var cn=ya?{passive:!1}:!1,bx=function(e){return e.tagName==="TEXTAREA"},sc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!bx(e)&&n[t]==="visible")},wx=function(e){return sc(e,"overflowY")},yx=function(e){return sc(e,"overflowX")},ic=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=lc(e,r);if(o){var a=cc(e,r),s=a[1],l=a[2];if(s>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},xx=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Cx=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},lc=function(e,t){return e==="v"?wx(t):yx(t)},cc=function(e,t){return e==="v"?xx(t):Cx(t)},Nx=function(e,t){return e==="h"&&t==="rtl"?-1:1},Sx=function(e,t,n,r,o){var a=Nx(e,window.getComputedStyle(t).direction),s=a*r,l=n.target,c=t.contains(l),u=!1,f=s>0,m=0,h=0;do{var p=cc(e,l),v=p[0],g=p[1],b=p[2],y=g-b-a*v;(v||y)&&lc(e,l)&&(m+=y,h+=v),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(f&&Math.abs(m)<1||!f&&Math.abs(h)<1)&&(u=!0),u},Fr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dc=function(e){return[e.deltaX,e.deltaY]},uc=function(e){return e&&"current"in e?e.current:e},Ex=function(e,t){return e[0]===t[0]&&e[1]===t[1]},kx=function(e){return`
|
|
250
250
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
251
251
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
252
|
-
`)},Nx=0,sn=[];function Sx(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(Nx++)[0],a=d.useState(Ql)[0],s=d.useRef(e);d.useEffect(function(){s.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Gy([e.lockRef.current],(e.shards||[]).map(ac),!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 l=d.useCallback(function(h,b){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!s.current.allowPinchZoom;var y=_r(h),w=n.current,x="deltaX"in h?h.deltaX:w[0]-y[0],S="deltaY"in h?h.deltaY:w[1]-y[1],E,A=h.target,k=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in h&&k==="h"&&A.type==="range")return!1;var P=tc(k,A);if(!P)return!0;if(P?E=k:(E=k==="v"?"h":"v",P=tc(k,A)),!P)return!1;if(!r.current&&"changedTouches"in h&&(x||S)&&(r.current=E),!E)return!0;var T=r.current||E;return yx(T,b,h,T==="h"?x:S)},[]),c=d.useCallback(function(h){var b=h;if(!(!sn.length||sn[sn.length-1]!==a)){var y="deltaY"in b?oc(b):_r(b),w=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&xx(E.delta,y)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(ac).filter(Boolean).filter(function(E){return E.contains(b.target)}),S=x.length>0?l(b,x[0]):!s.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),u=d.useCallback(function(h,b,y,w){var x={name:h,delta:b,target:y,should:w,shadowParent:Ex(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),f=d.useCallback(function(h){n.current=_r(h),r.current=void 0},[]),m=d.useCallback(function(h){u(h.type,oc(h),h.target,l(h,e.lockRef.current))},[]),g=d.useCallback(function(h){u(h.type,_r(h),h.target,l(h,e.lockRef.current))},[]);d.useEffect(function(){return sn.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",c,an),document.addEventListener("touchmove",c,an),document.addEventListener("touchstart",f,an),function(){sn=sn.filter(function(h){return h!==a}),document.removeEventListener("wheel",c,an),document.removeEventListener("touchmove",c,an),document.removeEventListener("touchstart",f,an)}},[]);var p=e.removeScrollBar,v=e.inert;return d.createElement(d.Fragment,null,v?d.createElement(a,{styles:Cx(o)}):null,p?d.createElement(mx,{gapMode:e.gapMode}):null)}function Ex(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const kx=ex(Zl,Sx);var _n=d.forwardRef(function(e,t){return d.createElement(Dr,nt({},e,{ref:t,sideCar:kx}))});_n.classNames=Dr.classNames;var ga=["Enter"," "],Px=["ArrowDown","PageUp","Home"],sc=["ArrowUp","PageDown","End"],Mx=[...Px,...sc],Tx={ltr:[...ga,"ArrowRight"],rtl:[...ga,"ArrowLeft"]},jx={ltr:["ArrowLeft"],rtl:["ArrowRight"]},On="Menu",[$n,Ax,Rx]=Qt(On),[$t,ic]=be(On,[Rx,wt,yt]),Ln=wt(),lc=yt(),[cc,xt]=$t(On),[Dx,Fn]=$t(On),dc=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,l=Ln(t),[c,u]=d.useState(null),f=d.useRef(!1),m=we(a),g=pt(o);return d.useEffect(()=>{const p=()=>{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",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),i.jsx(Rn,{...l,children:i.jsx(cc,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:u,children:i.jsx(Dx,{scope:t,onClose:d.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:f,dir:g,modal:s,children:r})})})};dc.displayName=On;var Ix="MenuAnchor",va=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ln(n);return i.jsx(Dn,{...o,...r,ref:t})});va.displayName=Ix;var ba="MenuPortal",[_x,uc]=$t(ba,{forceMount:void 0}),fc=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=xt(ba,t);return i.jsx(_x,{scope:t,forceMount:n,children:i.jsx(xe,{present:n||a.open,children:i.jsx(In,{asChild:!0,container:o,children:r})})})};fc.displayName=ba;var Oe="MenuContent",[Ox,wa]=$t(Oe),mc=d.forwardRef((e,t)=>{const n=uc(Oe,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=xt(Oe,e.__scopeMenu),s=Fn(Oe,e.__scopeMenu);return i.jsx($n.Provider,{scope:e.__scopeMenu,children:i.jsx(xe,{present:r||a.open,children:i.jsx($n.Slot,{scope:e.__scopeMenu,children:s.modal?i.jsx($x,{...o,ref:t}):i.jsx(Lx,{...o,ref:t})})})})}),$x=d.forwardRef((e,t)=>{const n=xt(Oe,e.__scopeMenu),r=d.useRef(null),o=oe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return jr(a)},[]),i.jsx(ya,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:B(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Lx=d.forwardRef((e,t)=>{const n=xt(Oe,e.__scopeMenu);return i.jsx(ya,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Fx=ft("MenuContent.ScrollLock"),ya=d.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:g,onDismiss:p,disableOutsideScroll:v,...h}=e,b=xt(Oe,n),y=Fn(Oe,n),w=Ln(n),x=lc(n),S=Ax(n),[E,A]=d.useState(null),k=d.useRef(null),P=oe(t,k,b.onContentChange),T=d.useRef(0),$=d.useRef(""),Z=d.useRef(0),z=d.useRef(null),ee=d.useRef("right"),Y=d.useRef(0),te=v?_n:d.Fragment,V=v?{as:Fx,allowPinchZoom:!0}:void 0,Q=_=>{var R,U;const j=$.current+_,H=S().filter(K=>!K.disabled),M=document.activeElement,I=(R=H.find(K=>K.ref.current===M))==null?void 0:R.textValue,L=H.map(K=>K.textValue),F=Zx(L,j,I),J=(U=H.find(K=>K.textValue===F))==null?void 0:U.ref.current;(function K(ne){$.current=ne,window.clearTimeout(T.current),ne!==""&&(T.current=window.setTimeout(()=>K(""),1e3))})(j),J&&setTimeout(()=>J.focus())};d.useEffect(()=>()=>window.clearTimeout(T.current),[]),ur();const O=d.useCallback(_=>{var H,M;return ee.current===((H=z.current)==null?void 0:H.side)&&Jx(_,(M=z.current)==null?void 0:M.area)},[]);return i.jsx(Ox,{scope:n,searchRef:$,onItemEnter:d.useCallback(_=>{O(_)&&_.preventDefault()},[O]),onItemLeave:d.useCallback(_=>{var j;O(_)||((j=k.current)==null||j.focus(),A(null))},[O]),onTriggerLeave:d.useCallback(_=>{O(_)&&_.preventDefault()},[O]),pointerGraceTimerRef:Z,onPointerGraceIntentChange:d.useCallback(_=>{z.current=_},[]),children:i.jsx(te,{...V,children:i.jsx(Mn,{asChild:!0,trapped:o,onMountAutoFocus:B(a,_=>{var j;_.preventDefault(),(j=k.current)==null||j.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:i.jsx(_t,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:g,onDismiss:p,children:i.jsx(kr,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:A,onEntryFocus:B(c,_=>{y.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(Cr,{role:"menu","aria-orientation":"vertical","data-state":Ac(b.open),"data-radix-menu-content":"",dir:y.dir,...w,...h,ref:P,style:{outline:"none",...h.style},onKeyDown:B(h.onKeyDown,_=>{const H=_.target.closest("[data-radix-menu-content]")===_.currentTarget,M=_.ctrlKey||_.altKey||_.metaKey,I=_.key.length===1;H&&(_.key==="Tab"&&_.preventDefault(),!M&&I&&Q(_.key));const L=k.current;if(_.target!==L||!Mx.includes(_.key))return;_.preventDefault();const J=S().filter(R=>!R.disabled).map(R=>R.ref.current);sc.includes(_.key)&&J.reverse(),qx(J)}),onBlur:B(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(T.current),$.current="")}),onPointerMove:B(e.onPointerMove,zn(_=>{const j=_.target,H=Y.current!==_.clientX;if(_.currentTarget.contains(j)&&H){const M=_.clientX>Y.current?"right":"left";ee.current=M,Y.current=_.clientX}}))})})})})})})});mc.displayName=Oe;var Bx="MenuGroup",xa=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(W.div,{role:"group",...r,ref:t})});xa.displayName=Bx;var zx="MenuLabel",pc=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(W.div,{...r,ref:t})});pc.displayName=zx;var Or="MenuItem",hc="menu.itemSelect",$r=d.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=d.useRef(null),s=Fn(Or,e.__scopeMenu),l=wa(Or,e.__scopeMenu),c=oe(t,a),u=d.useRef(!1),f=()=>{const m=a.current;if(!n&&m){const g=new CustomEvent(hc,{bubbles:!0,cancelable:!0});m.addEventListener(hc,p=>r==null?void 0:r(p),{once:!0}),dr(m,g),g.defaultPrevented?u.current=!1:s.onClose()}};return i.jsx(gc,{...o,ref:c,disabled:n,onClick:B(e.onClick,f),onPointerDown:m=>{var g;(g=e.onPointerDown)==null||g.call(e,m),u.current=!0},onPointerUp:B(e.onPointerUp,m=>{var g;u.current||(g=m.currentTarget)==null||g.click()}),onKeyDown:B(e.onKeyDown,m=>{const g=l.searchRef.current!=="";n||g&&m.key===" "||ga.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});$r.displayName=Or;var gc=d.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=wa(Or,n),l=lc(n),c=d.useRef(null),u=oe(t,c),[f,m]=d.useState(!1),[g,p]=d.useState("");return d.useEffect(()=>{const v=c.current;v&&p((v.textContent??"").trim())},[a.children]),i.jsx($n.ItemSlot,{scope:n,disabled:r,textValue:o??g,children:i.jsx(Pr,{asChild:!0,...l,focusable:!r,children:i.jsx(W.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:B(e.onPointerMove,zn(v=>{r?s.onItemLeave(v):(s.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:B(e.onPointerLeave,zn(v=>s.onItemLeave(v))),onFocus:B(e.onFocus,()=>m(!0)),onBlur:B(e.onBlur,()=>m(!1))})})})}),Wx="MenuCheckboxItem",vc=d.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return i.jsx(Cc,{scope:e.__scopeMenu,checked:n,children:i.jsx($r,{role:"menuitemcheckbox","aria-checked":Lr(n)?"mixed":n,...o,ref:t,"data-state":Sa(n),onSelect:B(o.onSelect,()=>r==null?void 0:r(Lr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});vc.displayName=Wx;var bc="MenuRadioGroup",[Vx,Hx]=$t(bc,{value:void 0,onValueChange:()=>{}}),wc=d.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=we(r);return i.jsx(Vx,{scope:e.__scopeMenu,value:n,onValueChange:a,children:i.jsx(xa,{...o,ref:t})})});wc.displayName=bc;var yc="MenuRadioItem",xc=d.forwardRef((e,t)=>{const{value:n,...r}=e,o=Hx(yc,e.__scopeMenu),a=n===o.value;return i.jsx(Cc,{scope:e.__scopeMenu,checked:a,children:i.jsx($r,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Sa(a),onSelect:B(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});xc.displayName=yc;var Ca="MenuItemIndicator",[Cc,Gx]=$t(Ca,{checked:!1}),Nc=d.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=Gx(Ca,n);return i.jsx(xe,{present:r||Lr(a.checked)||a.checked===!0,children:i.jsx(W.span,{...o,ref:t,"data-state":Sa(a.checked)})})});Nc.displayName=Ca;var Ux="MenuSeparator",Sc=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(W.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Sc.displayName=Ux;var Yx="MenuArrow",Ec=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ln(n);return i.jsx(Nr,{...o,...r,ref:t})});Ec.displayName=Yx;var Na="MenuSub",[Kx,kc]=$t(Na),Pc=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=xt(Na,t),s=Ln(t),[l,c]=d.useState(null),[u,f]=d.useState(null),m=we(o);return d.useEffect(()=>(a.open===!1&&m(!1),()=>m(!1)),[a.open,m]),i.jsx(Rn,{...s,children:i.jsx(cc,{scope:t,open:r,onOpenChange:m,content:u,onContentChange:f,children:i.jsx(Kx,{scope:t,contentId:pe(),triggerId:pe(),trigger:l,onTriggerChange:c,children:n})})})};Pc.displayName=Na;var Bn="MenuSubTrigger",Mc=d.forwardRef((e,t)=>{const n=xt(Bn,e.__scopeMenu),r=Fn(Bn,e.__scopeMenu),o=kc(Bn,e.__scopeMenu),a=wa(Bn,e.__scopeMenu),s=d.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},f=d.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return d.useEffect(()=>f,[f]),d.useEffect(()=>{const m=l.current;return()=>{window.clearTimeout(m),c(null)}},[l,c]),i.jsx(va,{asChild:!0,...u,children:i.jsx(gc,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Ac(n.open),...e,ref:Qe(t,o.onTriggerChange),onClick:m=>{var g;(g=e.onClick)==null||g.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:B(e.onPointerMove,zn(m=>{a.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:B(e.onPointerLeave,zn(m=>{var p,v;f();const g=(p=n.content)==null?void 0:p.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:m.clientX+y,y:m.clientY},{x:w,y:g.top},{x,y:g.top},{x,y:g.bottom},{x:w,y:g.bottom}],side:h}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(m),m.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:B(e.onKeyDown,m=>{var p;const g=a.searchRef.current!=="";e.disabled||g&&m.key===" "||Tx[r.dir].includes(m.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),m.preventDefault())})})})});Mc.displayName=Bn;var Tc="MenuSubContent",jc=d.forwardRef((e,t)=>{const n=uc(Oe,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=xt(Oe,e.__scopeMenu),s=Fn(Oe,e.__scopeMenu),l=kc(Tc,e.__scopeMenu),c=d.useRef(null),u=oe(t,c);return i.jsx($n.Provider,{scope:e.__scopeMenu,children:i.jsx(xe,{present:r||a.open,children:i.jsx($n.Slot,{scope:e.__scopeMenu,children:i.jsx(ya,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var m;s.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:B(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:B(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:B(e.onKeyDown,f=>{var p;const m=f.currentTarget.contains(f.target),g=jx[s.dir].includes(f.key);m&&g&&(a.onOpenChange(!1),(p=l.trigger)==null||p.focus(),f.preventDefault())})})})})})});jc.displayName=Tc;function Ac(e){return e?"open":"closed"}function Lr(e){return e==="indeterminate"}function Sa(e){return Lr(e)?"indeterminate":e?"checked":"unchecked"}function qx(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Xx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Zx(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=Xx(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const c=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Qx(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 l=t[a].x,c=t[a].y,u=t[s].x,f=t[s].y;c>r!=f>r&&n<(u-l)*(r-c)/(f-c)+l&&(o=!o)}return o}function Jx(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Qx(n,t)}function zn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var e0=dc,t0=va,n0=fc,r0=mc,o0=xa,a0=pc,s0=$r,i0=vc,l0=wc,c0=xc,d0=Nc,u0=Sc,f0=Ec,m0=Pc,p0=Mc,h0=jc,Ea="DropdownMenu",[g0,kP]=be(Ea,[ic]),ke=ic(),[v0,Rc]=g0(Ea),Dc=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,c=ke(t),u=d.useRef(null),[f=!1,m]=ye({prop:o,defaultProp:a,onChange:s});return i.jsx(v0,{scope:t,triggerId:pe(),triggerRef:u,contentId:pe(),open:f,onOpenChange:m,onOpenToggle:d.useCallback(()=>m(g=>!g),[m]),modal:l,children:i.jsx(e0,{...c,open:f,onOpenChange:m,dir:r,modal:l,children:n})})};Dc.displayName=Ea;var Ic="DropdownMenuTrigger",_c=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=Rc(Ic,n),s=ke(n);return i.jsx(t0,{asChild:!0,...s,children:i.jsx(W.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:Qe(t,a.triggerRef),onPointerDown:B(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:B(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});_c.displayName=Ic;var b0="DropdownMenuPortal",Oc=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ke(t);return i.jsx(n0,{...r,...n})};Oc.displayName=b0;var $c="DropdownMenuContent",Lc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Rc($c,n),a=ke(n),s=d.useRef(!1);return i.jsx(r0,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:B(e.onCloseAutoFocus,l=>{var c;s.current||(c=o.triggerRef.current)==null||c.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:B(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!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)"}})});Lc.displayName=$c;var w0="DropdownMenuGroup",Fc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(o0,{...o,...r,ref:t})});Fc.displayName=w0;var y0="DropdownMenuLabel",Bc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(a0,{...o,...r,ref:t})});Bc.displayName=y0;var x0="DropdownMenuItem",zc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(s0,{...o,...r,ref:t})});zc.displayName=x0;var C0="DropdownMenuCheckboxItem",Wc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(i0,{...o,...r,ref:t})});Wc.displayName=C0;var N0="DropdownMenuRadioGroup",Vc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(l0,{...o,...r,ref:t})});Vc.displayName=N0;var S0="DropdownMenuRadioItem",Hc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(c0,{...o,...r,ref:t})});Hc.displayName=S0;var E0="DropdownMenuItemIndicator",Gc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(d0,{...o,...r,ref:t})});Gc.displayName=E0;var k0="DropdownMenuSeparator",Uc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(u0,{...o,...r,ref:t})});Uc.displayName=k0;var P0="DropdownMenuArrow",M0=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(f0,{...o,...r,ref:t})});M0.displayName=P0;var T0=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=ke(t),[l=!1,c]=ye({prop:r,defaultProp:a,onChange:o});return i.jsx(m0,{...s,open:l,onOpenChange:c,children:n})},j0="DropdownMenuSubTrigger",Yc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(p0,{...o,...r,ref:t})});Yc.displayName=j0;var A0="DropdownMenuSubContent",Kc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(h0,{...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)"}})});Kc.displayName=A0;var R0=Dc,D0=_c,qc=Oc,Xc=Lc,I0=Fc,Zc=Bc,Qc=zc,Jc=Wc,_0=Vc,ed=Hc,td=Gc,nd=Uc,O0=T0,rd=Yc,od=Kc;const ad=R0,sd=D0,$0=I0,L0=qc,F0=O0,B0=_0,id=d.forwardRef(({className:e,inset:t,children:n,...r},o)=>i.jsxs(rd,{ref:o,className:D("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,i.jsx(Pn,{className:"ml-auto"})]}));id.displayName=rd.displayName;const ld=d.forwardRef(({className:e,...t},n)=>i.jsx(od,{ref:n,className:D("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}));ld.displayName=od.displayName;const ka=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(qc,{children:i.jsx(Xc,{ref:r,sideOffset:t,className:D("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})}));ka.displayName=Xc.displayName;const cd=d.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(Qc,{ref:r,className:D("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}));cd.displayName=Qc.displayName;const Pa=d.forwardRef(({className:e,children:t,checked:n,...r},o)=>i.jsxs(Jc,{ref:o,className:D("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:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(td,{children:i.jsx(kn,{className:"h-4 w-4"})})}),t]}));Pa.displayName=Jc.displayName;const dd=d.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(ed,{ref:r,className:D("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:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(td,{children:i.jsx(el,{className:"h-2 w-2 fill-current"})})}),t]}));dd.displayName=ed.displayName;const Ma=d.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(Zc,{ref:r,className:D("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Ma.displayName=Zc.displayName;const Fr=d.forwardRef(({className:e,...t},n)=>i.jsx(nd,{ref:n,className:D("-mx-1 my-1 h-px bg-muted",e),...t}));Fr.displayName=nd.displayName;const ud=({className:e,...t})=>i.jsx("span",{className:D("ml-auto text-xs tracking-widest opacity-60",e),...t});ud.displayName="DropdownMenuShortcut";function z0({columns:e,onToggleVisibility:t,onReset:n}){return i.jsxs(ad,{children:[i.jsx(sd,{asChild:!0,children:i.jsxs(fe,{variant:"outline",className:"ml-auto",children:[i.jsx(Qb,{className:"h-4 w-4 mr-2"}),"Columns"]})}),i.jsxs(ka,{align:"end",className:"w-48",children:[i.jsx(Ma,{children:"Toggle columns"}),i.jsx(Fr,{}),e.map(r=>i.jsx(Pa,{checked:!r.hidden,onCheckedChange:o=>t(String(r.key),o),children:r.title},String(r.key))),i.jsx(Fr,{}),i.jsx(fe,{variant:"ghost",size:"sm",className:"w-full justify-start",onClick:n,children:"Reset columns"})]})]})}function fd(e,[t,n]){return Math.min(n,Math.max(t,e))}function Wn(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var W0="VisuallyHidden",Ta=d.forwardRef((e,t)=>i.jsx(W.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}}));Ta.displayName=W0;var md=Ta,V0=[" ","Enter","ArrowUp","ArrowDown"],H0=[" ","Enter"],Vn="Select",[Br,zr,G0]=Qt(Vn),[ln,PP]=be(Vn,[G0,wt]),Wr=wt(),[U0,Ct]=ln(Vn),[Y0,K0]=ln(Vn),pd=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:l,onValueChange:c,dir:u,name:f,autoComplete:m,disabled:g,required:p,form:v}=e,h=Wr(t),[b,y]=d.useState(null),[w,x]=d.useState(null),[S,E]=d.useState(!1),A=pt(u),[k=!1,P]=ye({prop:r,defaultProp:o,onChange:a}),[T,$]=ye({prop:s,defaultProp:l,onChange:c}),Z=d.useRef(null),z=b?v||!!b.closest("form"):!0,[ee,Y]=d.useState(new Set),te=Array.from(ee).map(V=>V.props.value).join(";");return i.jsx(Rn,{...h,children:i.jsxs(U0,{required:p,scope:t,trigger:b,onTriggerChange:y,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:E,contentId:pe(),value:T,onValueChange:$,open:k,onOpenChange:P,dir:A,triggerPointerDownPosRef:Z,disabled:g,children:[i.jsx(Br.Provider,{scope:t,children:i.jsx(Y0,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(V=>{Y(Q=>new Set(Q).add(V))},[]),onNativeOptionRemove:d.useCallback(V=>{Y(Q=>{const O=new Set(Q);return O.delete(V),O})},[]),children:n})}),z?i.jsxs(Fd,{"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:m,value:T,onChange:V=>$(V.target.value),disabled:g,form:v,children:[T===void 0?i.jsx("option",{value:""}):null,Array.from(ee)]},te):null]})})};pd.displayName=Vn;var hd="SelectTrigger",gd=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Wr(n),s=Ct(hd,n),l=s.disabled||r,c=oe(t,s.onTriggerChange),u=zr(n),f=d.useRef("touch"),[m,g,p]=Bd(h=>{const b=u().filter(x=>!x.disabled),y=b.find(x=>x.value===s.value),w=zd(b,h,y);w!==void 0&&s.onValueChange(w.value)}),v=h=>{l||(s.onOpenChange(!0),p()),h&&(s.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return i.jsx(Dn,{asChild:!0,...a,children:i.jsx(W.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:l,"data-disabled":l?"":void 0,"data-placeholder":Ld(s.value)?"":void 0,...o,ref:c,onClick:B(o.onClick,h=>{h.currentTarget.focus(),f.current!=="mouse"&&v(h)}),onPointerDown:B(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:B(o.onKeyDown,h=>{const b=m.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&g(h.key),!(b&&h.key===" ")&&V0.includes(h.key)&&(v(),h.preventDefault())})})})});gd.displayName=hd;var vd="SelectValue",bd=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...l}=e,c=Ct(vd,n),{onValueNodeHasChildrenChange:u}=c,f=a!==void 0,m=oe(t,c.onValueNodeChange);return ve(()=>{u(f)},[u,f]),i.jsx(W.span,{...l,ref:m,style:{pointerEvents:"none"},children:Ld(c.value)?i.jsx(i.Fragment,{children:s}):a})});bd.displayName=vd;var q0="SelectIcon",wd=d.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return i.jsx(W.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});wd.displayName=q0;var Lt="SelectContent",yd=d.forwardRef((e,t)=>{const n=Ct(Lt,e.__scopeSelect),[r,o]=d.useState();if(ve(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Jn.createPortal(i.jsx(xd,{scope:e.__scopeSelect,children:i.jsx(Br.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),a):null}return i.jsx(Cd,{...e,ref:t})});yd.displayName=Lt;var He=10,[xd,Nt]=ln(Lt),X0="SelectContentImpl",Z0=ft("SelectContent.RemoveScroll"),Cd=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:g,collisionPadding:p,sticky:v,hideWhenDetached:h,avoidCollisions:b,...y}=e,w=Ct(Lt,n),[x,S]=d.useState(null),[E,A]=d.useState(null),k=oe(t,R=>S(R)),[P,T]=d.useState(null),[$,Z]=d.useState(null),z=zr(n),[ee,Y]=d.useState(!1),te=d.useRef(!1);d.useEffect(()=>{if(x)return jr(x)},[x]),ur();const V=d.useCallback(R=>{const[U,...K]=z().map(se=>se.ref.current),[ne]=K.slice(-1),ae=document.activeElement;for(const se of R)if(se===ae||(se==null||se.scrollIntoView({block:"nearest"}),se===U&&E&&(E.scrollTop=0),se===ne&&E&&(E.scrollTop=E.scrollHeight),se==null||se.focus(),document.activeElement!==ae))return},[z,E]),Q=d.useCallback(()=>V([P,x]),[V,P,x]);d.useEffect(()=>{ee&&Q()},[ee,Q]);const{onOpenChange:O,triggerPointerDownPosRef:_}=w;d.useEffect(()=>{if(x){let R={x:0,y:0};const U=ne=>{var ae,se;R={x:Math.abs(Math.round(ne.pageX)-(((ae=_.current)==null?void 0:ae.x)??0)),y:Math.abs(Math.round(ne.pageY)-(((se=_.current)==null?void 0:se.y)??0))}},K=ne=>{R.x<=10&&R.y<=10?ne.preventDefault():x.contains(ne.target)||O(!1),document.removeEventListener("pointermove",U),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",K,{capture:!0})}}},[x,O,_]),d.useEffect(()=>{const R=()=>O(!1);return window.addEventListener("blur",R),window.addEventListener("resize",R),()=>{window.removeEventListener("blur",R),window.removeEventListener("resize",R)}},[O]);const[j,H]=Bd(R=>{const U=z().filter(ae=>!ae.disabled),K=U.find(ae=>ae.ref.current===document.activeElement),ne=zd(U,R,K);ne&&setTimeout(()=>ne.ref.current.focus())}),M=d.useCallback((R,U,K)=>{const ne=!te.current&&!K;(w.value!==void 0&&w.value===U||ne)&&(T(R),ne&&(te.current=!0))},[w.value]),I=d.useCallback(()=>x==null?void 0:x.focus(),[x]),L=d.useCallback((R,U,K)=>{const ne=!te.current&&!K;(w.value!==void 0&&w.value===U||ne)&&Z(R)},[w.value]),F=r==="popper"?ja:Nd,J=F===ja?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:g,collisionPadding:p,sticky:v,hideWhenDetached:h,avoidCollisions:b}:{};return i.jsx(xd,{scope:n,content:x,viewport:E,onViewportChange:A,itemRefCallback:M,selectedItem:P,onItemLeave:I,itemTextRefCallback:L,focusSelectedItem:Q,selectedItemText:$,position:r,isPositioned:ee,searchRef:j,children:i.jsx(_n,{as:Z0,allowPinchZoom:!0,children:i.jsx(Mn,{asChild:!0,trapped:w.open,onMountAutoFocus:R=>{R.preventDefault()},onUnmountAutoFocus:B(o,R=>{var U;(U=w.trigger)==null||U.focus({preventScroll:!0}),R.preventDefault()}),children:i.jsx(_t,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:R=>R.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:i.jsx(F,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:R=>R.preventDefault(),...y,...J,onPlaced:()=>Y(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:B(y.onKeyDown,R=>{const U=R.ctrlKey||R.altKey||R.metaKey;if(R.key==="Tab"&&R.preventDefault(),!U&&R.key.length===1&&H(R.key),["ArrowUp","ArrowDown","Home","End"].includes(R.key)){let ne=z().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(R.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(R.key)){const ae=R.target,se=ne.indexOf(ae);ne=ne.slice(se+1)}setTimeout(()=>V(ne)),R.preventDefault()}})})})})})})});Cd.displayName=X0;var Q0="SelectItemAlignedPosition",Nd=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Ct(Lt,n),s=Nt(Lt,n),[l,c]=d.useState(null),[u,f]=d.useState(null),m=oe(t,k=>f(k)),g=zr(n),p=d.useRef(!1),v=d.useRef(!0),{viewport:h,selectedItem:b,selectedItemText:y,focusSelectedItem:w}=s,x=d.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&h&&b&&y){const k=a.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),T=a.valueNode.getBoundingClientRect(),$=y.getBoundingClientRect();if(a.dir!=="rtl"){const ae=$.left-P.left,se=T.left-ae,Ce=k.left-se,Ne=k.width+Ce,Le=Math.max(Ne,P.width),Re=window.innerWidth-He,Ee=fd(se,[He,Math.max(He,Re-Le)]);l.style.minWidth=Ne+"px",l.style.left=Ee+"px"}else{const ae=P.right-$.right,se=window.innerWidth-T.right-ae,Ce=window.innerWidth-k.right-se,Ne=k.width+Ce,Le=Math.max(Ne,P.width),Re=window.innerWidth-He,Ee=fd(se,[He,Math.max(He,Re-Le)]);l.style.minWidth=Ne+"px",l.style.right=Ee+"px"}const Z=g(),z=window.innerHeight-He*2,ee=h.scrollHeight,Y=window.getComputedStyle(u),te=parseInt(Y.borderTopWidth,10),V=parseInt(Y.paddingTop,10),Q=parseInt(Y.borderBottomWidth,10),O=parseInt(Y.paddingBottom,10),_=te+V+ee+O+Q,j=Math.min(b.offsetHeight*5,_),H=window.getComputedStyle(h),M=parseInt(H.paddingTop,10),I=parseInt(H.paddingBottom,10),L=k.top+k.height/2-He,F=z-L,J=b.offsetHeight/2,R=b.offsetTop+J,U=te+V+R,K=_-U;if(U<=L){const ae=Z.length>0&&b===Z[Z.length-1].ref.current;l.style.bottom="0px";const se=u.clientHeight-h.offsetTop-h.offsetHeight,Ce=Math.max(F,J+(ae?I:0)+se+Q),Ne=U+Ce;l.style.height=Ne+"px"}else{const ae=Z.length>0&&b===Z[0].ref.current;l.style.top="0px";const Ce=Math.max(L,te+h.offsetTop+(ae?M:0)+J)+K;l.style.height=Ce+"px",h.scrollTop=U-L+h.offsetTop}l.style.margin=`${He}px 0`,l.style.minHeight=j+"px",l.style.maxHeight=z+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[g,a.trigger,a.valueNode,l,u,h,b,y,a.dir,r]);ve(()=>x(),[x]);const[S,E]=d.useState();ve(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const A=d.useCallback(k=>{k&&v.current===!0&&(x(),w==null||w(),v.current=!1)},[x,w]);return i.jsx(eC,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:A,children:i.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:i.jsx(W.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Nd.displayName=Q0;var J0="SelectPopperPosition",ja=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=He,...a}=e,s=Wr(n);return i.jsx(Cr,{...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)"}})});ja.displayName=J0;var[eC,Aa]=ln(Lt,{}),Ra="SelectViewport",Sd=d.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Nt(Ra,n),s=Aa(Ra,n),l=oe(t,a.onViewportChange),c=d.useRef(0);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),i.jsx(Br.Slot,{scope:n,children:i.jsx(W.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:B(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:g}=s;if(g!=null&&g.current&&m){const p=Math.abs(c.current-f.scrollTop);if(p>0){const v=window.innerHeight-He*2,h=parseFloat(m.style.minHeight),b=parseFloat(m.style.height),y=Math.max(h,b);if(y<v){const w=y+p,x=Math.min(v,w),S=w-x;m.style.height=x+"px",m.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,m.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});Sd.displayName=Ra;var Ed="SelectGroup",[tC,nC]=ln(Ed),kd=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=pe();return i.jsx(tC,{scope:n,id:o,children:i.jsx(W.div,{role:"group","aria-labelledby":o,...r,ref:t})})});kd.displayName=Ed;var Pd="SelectLabel",Md=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=nC(Pd,n);return i.jsx(W.div,{id:o.id,...r,ref:t})});Md.displayName=Pd;var Vr="SelectItem",[rC,Td]=ln(Vr),jd=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,l=Ct(Vr,n),c=Nt(Vr,n),u=l.value===r,[f,m]=d.useState(a??""),[g,p]=d.useState(!1),v=oe(t,w=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,w,r,o)}),h=pe(),b=d.useRef("touch"),y=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return i.jsx(rC,{scope:n,value:r,disabled:o,textId:h,isSelected:u,onItemTextChange:d.useCallback(w=>{m(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:i.jsx(Br.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:i.jsx(W.div,{role:"option","aria-labelledby":h,"data-highlighted":g?"":void 0,"aria-selected":u&&g,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:v,onFocus:B(s.onFocus,()=>p(!0)),onBlur:B(s.onBlur,()=>p(!1)),onClick:B(s.onClick,()=>{b.current!=="mouse"&&y()}),onPointerUp:B(s.onPointerUp,()=>{b.current==="mouse"&&y()}),onPointerDown:B(s.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:B(s.onPointerMove,w=>{var x;b.current=w.pointerType,o?(x=c.onItemLeave)==null||x.call(c):b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:B(s.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:B(s.onKeyDown,w=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(H0.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});jd.displayName=Vr;var Hn="SelectItemText",Ad=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Ct(Hn,n),l=Nt(Hn,n),c=Td(Hn,n),u=K0(Hn,n),[f,m]=d.useState(null),g=oe(t,y=>m(y),c.onItemTextChange,y=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,y,c.value,c.disabled)}),p=f==null?void 0:f.textContent,v=d.useMemo(()=>i.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:b}=u;return ve(()=>(h(v),()=>b(v)),[h,b,v]),i.jsxs(i.Fragment,{children:[i.jsx(W.span,{id:c.textId,...a,ref:g}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Jn.createPortal(a.children,s.valueNode):null]})});Ad.displayName=Hn;var Rd="SelectItemIndicator",Dd=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Td(Rd,n).isSelected?i.jsx(W.span,{"aria-hidden":!0,...r,ref:t}):null});Dd.displayName=Rd;var Da="SelectScrollUpButton",Id=d.forwardRef((e,t)=>{const n=Nt(Da,e.__scopeSelect),r=Aa(Da,e.__scopeSelect),[o,a]=d.useState(!1),s=oe(t,r.onScrollButtonChange);return ve(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;a(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?i.jsx(Od,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Id.displayName=Da;var Ia="SelectScrollDownButton",_d=d.forwardRef((e,t)=>{const n=Nt(Ia,e.__scopeSelect),r=Aa(Ia,e.__scopeSelect),[o,a]=d.useState(!1),s=oe(t,r.onScrollButtonChange);return ve(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;a(f)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?i.jsx(Od,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});_d.displayName=Ia;var Od=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Nt("SelectScrollButton",n),s=d.useRef(null),l=zr(n),c=d.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),ve(()=>{var f;const u=l().find(m=>m.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),i.jsx(W.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:B(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:B(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:B(o.onPointerLeave,()=>{c()})})}),oC="SelectSeparator",$d=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i.jsx(W.div,{"aria-hidden":!0,...r,ref:t})});$d.displayName=oC;var _a="SelectArrow",aC=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Wr(n),a=Ct(_a,n),s=Nt(_a,n);return a.open&&s.position==="popper"?i.jsx(Nr,{...o,...r,ref:t}):null});aC.displayName=_a;function Ld(e){return e===""||e===void 0}var Fd=d.forwardRef((e,t)=>{const{value:n,...r}=e,o=d.useRef(null),a=oe(t,o),s=Wn(n);return d.useEffect(()=>{const l=o.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==n&&f){const m=new Event("change",{bubbles:!0});f.call(l,n),l.dispatchEvent(m)}},[s,n]),i.jsx(Ta,{asChild:!0,children:i.jsx("select",{...r,ref:a,defaultValue:n})})});Fd.displayName="BubbleSelect";function Bd(e){const t=we(e),n=d.useRef(""),r=d.useRef(0),o=d.useCallback(s=>{const l=n.current+s;t(l),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),a=d.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function zd(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===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(u=>u!==n));const c=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function sC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var iC=pd,Wd=gd,lC=bd,cC=wd,Vd=yd,dC=Sd,uC=kd,Hd=Md,Gd=jd,fC=Ad,mC=Dd,Ud=Id,Yd=_d,Kd=$d;const Oa=iC,pC=uC,$a=lC,Hr=d.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Wd,{ref:r,className:D("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,i.jsx(cC,{asChild:!0,children:i.jsx(Xt,{className:"h-4 w-4 opacity-50"})})]}));Hr.displayName=Wd.displayName;const La=d.forwardRef(({className:e,...t},n)=>i.jsx(Ud,{ref:n,className:D("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(_b,{className:"h-4 w-4"})}));La.displayName=Ud.displayName;const Fa=d.forwardRef(({className:e,...t},n)=>i.jsx(Yd,{ref:n,className:D("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(Xt,{className:"h-4 w-4"})}));Fa.displayName=Yd.displayName;const Gr=d.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>i.jsxs(Vd,{ref:o,className:D("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:[i.jsx(La,{}),i.jsx(dC,{className:D("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),i.jsx(Fa,{})]}));Gr.displayName=Vd.displayName;const qd=d.forwardRef(({className:e,...t},n)=>i.jsx(Hd,{ref:n,className:D("px-2 py-1.5 text-sm font-semibold",e),...t}));qd.displayName=Hd.displayName;const St=d.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Gd,{ref:r,className:D("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:[i.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(mC,{children:i.jsx(kn,{className:"h-4 w-4"})})}),i.jsx(fC,{children:t})]}));St.displayName=Gd.displayName;const Xd=d.forwardRef(({className:e,...t},n)=>i.jsx(Kd,{ref:n,className:D("-mx-1 my-1 h-px bg-muted",e),...t}));Xd.displayName=Kd.displayName;function hC({filter:e,value:t,onChange:n}){return i.jsxs(Oa,{value:t||"all",onValueChange:n,children:[i.jsx(Hr,{className:"w-40",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Vb,{className:"h-4 w-4"}),i.jsx($a,{placeholder:e.label})]})}),i.jsxs(Gr,{children:[i.jsxs(St,{value:"all",children:["All ",e.label]}),e.options.map(r=>i.jsx(St,{value:r.value,children:r.label},r.value))]})]})}const gC=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"}}),Gn=d.forwardRef(({className:e,sizing:t,type:n,...r},o)=>i.jsx("input",{type:n,className:D(gC({sizing:t,className:e})),ref:o,...r}));Gn.displayName="Input";function vC({value:e,onChange:t,placeholder:n="Search..."}){return i.jsxs("div",{className:"relative flex-1 max-w-sm",children:[i.jsx(Ho,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground h-4 w-4"}),i.jsx(Gn,{placeholder:n,value:e,onChange:r=>t(r.target.value),className:"pl-10"})]})}function bC({selectedCount:e,onClearSelection:t}){return e===0?null:i.jsxs("div",{className:"bg-muted/50 p-2 rounded-md flex items-center justify-between",children:[i.jsxs("div",{className:"text-sm",children:[i.jsx("span",{className:"font-medium",children:e})," ",e===1?"row":"rows"," selected"]}),i.jsx(fe,{variant:"ghost",size:"sm",onClick:t,children:"Clear selection"})]})}var Ba="Checkbox",[wC,MP]=be(Ba),[yC,xC]=wC(Ba),Zd=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:l,value:c="on",onCheckedChange:u,form:f,...m}=e,[g,p]=d.useState(null),v=oe(t,S=>p(S)),h=d.useRef(!1),b=g?f||!!g.closest("form"):!0,[y=!1,w]=ye({prop:o,defaultProp:a,onChange:u}),x=d.useRef(y);return d.useEffect(()=>{const S=g==null?void 0:g.form;if(S){const E=()=>w(x.current);return S.addEventListener("reset",E),()=>S.removeEventListener("reset",E)}},[g,w]),i.jsxs(yC,{scope:n,state:y,disabled:l,children:[i.jsx(W.button,{type:"button",role:"checkbox","aria-checked":Et(y)?"mixed":y,"aria-required":s,"data-state":eu(y),"data-disabled":l?"":void 0,disabled:l,value:c,...m,ref:v,onKeyDown:B(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:B(e.onClick,S=>{w(E=>Et(E)?!0:!E),b&&(h.current=S.isPropagationStopped(),h.current||S.stopPropagation())})}),b&&i.jsx(CC,{control:g,bubbles:!h.current,name:r,value:c,checked:y,required:s,disabled:l,form:f,style:{transform:"translateX(-100%)"},defaultChecked:Et(a)?!1:a})]})});Zd.displayName=Ba;var Qd="CheckboxIndicator",Jd=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=xC(Qd,n);return i.jsx(xe,{present:r||Et(a.state)||a.state===!0,children:i.jsx(W.span,{"data-state":eu(a.state),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Jd.displayName=Qd;var CC=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...a}=e,s=d.useRef(null),l=Wn(n),c=xr(t);d.useEffect(()=>{const f=s.current,m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"checked").set;if(l!==n&&p){const v=new Event("click",{bubbles:r});f.indeterminate=Et(n),p.call(f,Et(n)?!1:n),f.dispatchEvent(v)}},[l,n,r]);const u=d.useRef(Et(n)?!1:n);return i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??u.current,...a,tabIndex:-1,ref:s,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Et(e){return e==="indeterminate"}function eu(e){return Et(e)?"indeterminate":e?"checked":"unchecked"}var tu=Zd,NC=Jd;const Ur=d.forwardRef(({className:e,...t},n)=>i.jsx(tu,{ref:n,className:D("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:i.jsx(NC,{className:D("flex items-center justify-center text-current"),children:i.jsx(kn,{className:"h-4 w-4"})})}));Ur.displayName=tu.displayName;function SC({columns:e,sortState:t,allRowsSelected:n,hasData:r,onSort:o,onToggleAllRows:a}){const s=e.filter(l=>!l.hidden);return i.jsxs(Kt,{children:[i.jsx(En,{className:"w-12",children:i.jsx(Ur,{checked:n&&r,onCheckedChange:a,"aria-label":"Select all rows"})}),s.map(l=>i.jsx(En,{className:l.sortable?"cursor-pointer select-none":"",onClick:l.sortable?()=>o(String(l.key)):void 0,children:i.jsxs("div",{className:"flex items-center gap-1",children:[l.title,l.sortable&&i.jsx(i.Fragment,{children:t.field===l.key?t.direction==="asc"?i.jsx(Db,{className:"h-4 w-4"}):i.jsx(Tb,{className:"h-4 w-4"}):i.jsx(Rb,{className:"h-4 w-4 opacity-50"})})]})},String(l.key)))]})}function EC({row:e,index:t,columns:n,isSelected:r,rowId:o,onToggleSelection:a}){const s=n.filter(l=>!l.hidden);return i.jsxs(Kt,{className:r?"bg-muted/50":"",children:[i.jsx(qt,{className:"w-12",children:i.jsx(Ur,{checked:r,onCheckedChange:l=>a(o,!!l),"aria-label":`Select row ${t+1}`})}),s.map(l=>{const c=e[l.key];return i.jsx(qt,{children:l.customRenderer?l.customRenderer(c,e):String(c??"")},String(l.key))})]})}const Yr=({className:e,repeat:t=1,...n})=>i.jsx(i.Fragment,{children:Array.from({length:t??1}).map((r,o)=>i.jsx("div",{className:D("animate-shimmer bg-gradient-to-r from-gray-300 via-gray-100 to-gray-300","bg-[length:200%_100%] rounded-md h-5",e),...n},o))});function kC({columns:e,rows:t=5}){return i.jsx("div",{className:"rounded-md border",children:i.jsxs(sr,{children:[i.jsx(ir,{children:i.jsx(Kt,{children:Array.from({length:e}).map((n,r)=>i.jsx(En,{children:i.jsx(Yr,{className:"h-4 w-20"})},r))})}),i.jsx(lr,{children:Array.from({length:t}).map((n,r)=>i.jsx(Kt,{children:Array.from({length:e}).map((o,a)=>i.jsx(qt,{children:i.jsx(Yr,{className:"h-4 w-full"})},a))},r))})]})})}function PC(e,t,n){const r=t.filter(f=>!f.hidden),o=r.map(f=>f.title),a=e.map(f=>r.map(m=>{const g=f[m.key];return g!=null?String(g):""})),s=[o.join(","),...a.map(f=>f.join(","))].join(`
|
|
253
|
-
`),l=new Blob([s],{type:"text/csv;charset=utf-8;"}),c=URL.createObjectURL(l),u=document.createElement("a");u.setAttribute("href",c),u.setAttribute("download",`${n}.csv`),u.style.visibility="hidden",document.body.appendChild(u),u.click(),document.body.removeChild(u)}const MC=()=>{const[e,t]=C.useState([]);return[e,a=>{t([...e,a])},a=>{const s=[...e];s.splice(a,1),t(s)},(a,s)=>{const l=[...e];l.filter(c=>c[a]!==s),t(l)}]};function TC(){const[e,t]=C.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 nu(e,t=250){const[n,r]=C.useState(e);return C.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n}var za="Collapsible",[jC,ru]=be(za),[AC,Wa]=jC(za),ou=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...l}=e,[c=!1,u]=ye({prop:r,defaultProp:o,onChange:s});return i.jsx(AC,{scope:n,disabled:a,contentId:pe(),open:c,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),children:i.jsx(W.div,{"data-state":Ha(c),"data-disabled":a?"":void 0,...l,ref:t})})});ou.displayName=za;var au="CollapsibleTrigger",su=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Wa(au,n);return i.jsx(W.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ha(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:B(e.onClick,o.onOpenToggle)})});su.displayName=au;var Va="CollapsibleContent",iu=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Wa(Va,e.__scopeCollapsible);return i.jsx(xe,{present:n||o.open,children:({present:a})=>i.jsx(RC,{...r,ref:t,present:a})})});iu.displayName=Va;var RC=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=Wa(Va,n),[l,c]=d.useState(r),u=d.useRef(null),f=oe(t,u),m=d.useRef(0),g=m.current,p=d.useRef(0),v=p.current,h=s.open||l,b=d.useRef(h),y=d.useRef(void 0);return d.useEffect(()=>{const w=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(w)},[]),ve(()=>{const w=u.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();m.current=x.height,p.current=x.width,b.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),c(r)}},[s.open,r]),i.jsx(W.div,{"data-state":Ha(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 Ha(e){return e?"open":"closed"}var DC=ou,IC=su,_C=iu,st="Accordion",OC=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ga,$C,LC]=Qt(st),[Kr,TP]=be(st,[LC,ru]),Ua=ru(),lu=C.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return i.jsx(Ga.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?i.jsx(WC,{...a,ref:t}):i.jsx(zC,{...o,ref:t})})});lu.displayName=st;var[cu,FC]=Kr(st),[du,BC]=Kr(st,{collapsible:!1}),zC=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[l,c]=ye({prop:n,defaultProp:r,onChange:o});return i.jsx(cu,{scope:e.__scopeAccordion,value:l?[l]:[],onItemOpen:c,onItemClose:C.useCallback(()=>a&&c(""),[a,c]),children:i.jsx(du,{scope:e.__scopeAccordion,collapsible:a,children:i.jsx(uu,{...s,ref:t})})})}),WC=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s=[],l]=ye({prop:n,defaultProp:r,onChange:o}),c=C.useCallback(f=>l((m=[])=>[...m,f]),[l]),u=C.useCallback(f=>l((m=[])=>m.filter(g=>g!==f)),[l]);return i.jsx(cu,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:u,children:i.jsx(du,{scope:e.__scopeAccordion,collapsible:!0,children:i.jsx(uu,{...a,ref:t})})})}),[VC,qr]=Kr(st),uu=C.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,l=C.useRef(null),c=oe(l,t),u=$C(n),m=pt(o)==="ltr",g=B(e.onKeyDown,p=>{var P;if(!OC.includes(p.key))return;const v=p.target,h=u().filter(T=>{var $;return!(($=T.ref.current)!=null&&$.disabled)}),b=h.findIndex(T=>T.ref.current===v),y=h.length;if(b===-1)return;p.preventDefault();let w=b;const x=0,S=y-1,E=()=>{w=b+1,w>S&&(w=x)},A=()=>{w=b-1,w<x&&(w=S)};switch(p.key){case"Home":w=x;break;case"End":w=S;break;case"ArrowRight":a==="horizontal"&&(m?E():A());break;case"ArrowDown":a==="vertical"&&E();break;case"ArrowLeft":a==="horizontal"&&(m?A():E());break;case"ArrowUp":a==="vertical"&&A();break}const k=w%y;(P=h[k].ref.current)==null||P.focus()});return i.jsx(VC,{scope:n,disabled:r,direction:o,orientation:a,children:i.jsx(Ga.Slot,{scope:n,children:i.jsx(W.div,{...s,"data-orientation":a,ref:c,onKeyDown:r?void 0:g})})})}),Xr="AccordionItem",[HC,Ya]=Kr(Xr),fu=C.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=qr(Xr,n),s=FC(Xr,n),l=Ua(n),c=pe(),u=r&&s.value.includes(r)||!1,f=a.disabled||e.disabled;return i.jsx(HC,{scope:n,open:u,disabled:f,triggerId:c,children:i.jsx(DC,{"data-orientation":a.orientation,"data-state":bu(u),...l,...o,ref:t,disabled:f,open:u,onOpenChange:m=>{m?s.onItemOpen(r):s.onItemClose(r)}})})});fu.displayName=Xr;var mu="AccordionHeader",pu=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=qr(st,n),a=Ya(mu,n);return i.jsx(W.h3,{"data-orientation":o.orientation,"data-state":bu(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});pu.displayName=mu;var Ka="AccordionTrigger",hu=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=qr(st,n),a=Ya(Ka,n),s=BC(Ka,n),l=Ua(n);return i.jsx(Ga.ItemSlot,{scope:n,children:i.jsx(IC,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...r,ref:t})})});hu.displayName=Ka;var gu="AccordionContent",vu=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=qr(st,n),a=Ya(gu,n),s=Ua(n);return i.jsx(_C,{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}})});vu.displayName=gu;function bu(e){return e?"open":"closed"}var GC=lu,UC=fu,YC=pu,wu=hu,yu=vu;const KC=GC,xu=d.forwardRef(({className:e,...t},n)=>i.jsx(UC,{ref:n,className:D("border-b",e),...t}));xu.displayName="AccordionItem";const Cu=d.forwardRef(({className:e,children:t,...n},r)=>i.jsx(YC,{className:"flex",children:i.jsxs(wu,{ref:r,className:D("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,i.jsx(Xt,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Cu.displayName=wu.displayName;const Nu=d.forwardRef(({className:e,children:t,...n},r)=>i.jsx(yu,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:i.jsx("div",{className:D("pb-4 pt-0",e),children:t})}));Nu.displayName=yu.displayName;const qC=(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},Zr=d.forwardRef(({className:e,leftIcon:t,rightIcon:n,mask:r,onChange:o,...a},s)=>{const l=c=>{const u=c.target;if(r){const f=qC(u.value,r);u.value=f}o==null||o(c)};return i.jsxs("div",{className:"relative w-full",children:[t&&i.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:t}),i.jsx(Gn,{className:D(t&&"pl-8",n&&"pr-8",e),ref:s,onInput:l,...a}),n&&i.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:n})]})});Zr.displayName="AdaptiveInput";var qa="Dialog",[Su,Eu]=be(qa),[XC,Ge]=Su(qa),ku=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,l=d.useRef(null),c=d.useRef(null),[u=!1,f]=ye({prop:r,defaultProp:o,onChange:a});return i.jsx(XC,{scope:t,triggerRef:l,contentRef:c,contentId:pe(),titleId:pe(),descriptionId:pe(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(m=>!m),[f]),modal:s,children:n})};ku.displayName=qa;var Pu="DialogTrigger",Mu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(Pu,n),a=oe(t,o.triggerRef);return i.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Qa(o.open),...r,ref:a,onClick:B(e.onClick,o.onOpenToggle)})});Mu.displayName=Pu;var Xa="DialogPortal",[ZC,Tu]=Su(Xa,{forceMount:void 0}),ju=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Ge(Xa,t);return i.jsx(ZC,{scope:t,forceMount:n,children:d.Children.map(r,s=>i.jsx(xe,{present:n||a.open,children:i.jsx(In,{asChild:!0,container:o,children:s})}))})};ju.displayName=Xa;var Qr="DialogOverlay",Au=d.forwardRef((e,t)=>{const n=Tu(Qr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ge(Qr,e.__scopeDialog);return a.modal?i.jsx(xe,{present:r||a.open,children:i.jsx(JC,{...o,ref:t})}):null});Au.displayName=Qr;var QC=ft("DialogOverlay.RemoveScroll"),JC=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(Qr,n);return i.jsx(_n,{as:QC,allowPinchZoom:!0,shards:[o.contentRef],children:i.jsx(W.div,{"data-state":Qa(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ft="DialogContent",Ru=d.forwardRef((e,t)=>{const n=Tu(Ft,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ge(Ft,e.__scopeDialog);return i.jsx(xe,{present:r||a.open,children:a.modal?i.jsx(e1,{...o,ref:t}):i.jsx(t1,{...o,ref:t})})});Ru.displayName=Ft;var e1=d.forwardRef((e,t)=>{const n=Ge(Ft,e.__scopeDialog),r=d.useRef(null),o=oe(t,n.contentRef,r);return d.useEffect(()=>{const a=r.current;if(a)return jr(a)},[]),i.jsx(Du,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&a.preventDefault()}),onFocusOutside:B(e.onFocusOutside,a=>a.preventDefault())})}),t1=d.forwardRef((e,t)=>{const n=Ge(Ft,e.__scopeDialog),r=d.useRef(!1),o=d.useRef(!1);return i.jsx(Du,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Du=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,l=Ge(Ft,n),c=d.useRef(null),u=oe(t,c);return ur(),i.jsxs(i.Fragment,{children:[i.jsx(Mn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:i.jsx(_t,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Qa(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(r1,{titleId:l.titleId}),i.jsx(a1,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Za="DialogTitle",Iu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(Za,n);return i.jsx(W.h2,{id:o.titleId,...r,ref:t})});Iu.displayName=Za;var _u="DialogDescription",Ou=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(_u,n);return i.jsx(W.p,{id:o.descriptionId,...r,ref:t})});Ou.displayName=_u;var $u="DialogClose",Lu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge($u,n);return i.jsx(W.button,{type:"button",...r,ref:t,onClick:B(e.onClick,()=>o.onOpenChange(!1))})});Lu.displayName=$u;function Qa(e){return e?"open":"closed"}var Fu="DialogTitleWarning",[n1,Bu]=tw(Fu,{contentName:Ft,titleName:Za,docsSlug:"dialog"}),r1=({titleId:e})=>{const t=Bu(Fu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
252
|
+
`)},Px=0,dn=[];function Tx(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(Px++)[0],a=d.useState(oc)[0],s=d.useRef(e);d.useEffect(function(){s.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=qy([e.lockRef.current],(e.shards||[]).map(uc),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=d.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var y=Fr(g),w=n.current,x="deltaX"in g?g.deltaX:w[0]-y[0],S="deltaY"in g?g.deltaY:w[1]-y[1],E,A=g.target,k=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&k==="h"&&A.type==="range")return!1;var P=ic(k,A);if(!P)return!0;if(P?E=k:(E=k==="v"?"h":"v",P=ic(k,A)),!P)return!1;if(!r.current&&"changedTouches"in g&&(x||S)&&(r.current=E),!E)return!0;var j=r.current||E;return Sx(j,b,g,j==="h"?x:S)},[]),c=d.useCallback(function(g){var b=g;if(!(!dn.length||dn[dn.length-1]!==a)){var y="deltaY"in b?dc(b):Fr(b),w=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&Ex(E.delta,y)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(uc).filter(Boolean).filter(function(E){return E.contains(b.target)}),S=x.length>0?l(b,x[0]):!s.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),u=d.useCallback(function(g,b,y,w){var x={name:g,delta:b,target:y,should:w,shadowParent:Mx(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),f=d.useCallback(function(g){n.current=Fr(g),r.current=void 0},[]),m=d.useCallback(function(g){u(g.type,dc(g),g.target,l(g,e.lockRef.current))},[]),h=d.useCallback(function(g){u(g.type,Fr(g),g.target,l(g,e.lockRef.current))},[]);d.useEffect(function(){return dn.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:h}),document.addEventListener("wheel",c,cn),document.addEventListener("touchmove",c,cn),document.addEventListener("touchstart",f,cn),function(){dn=dn.filter(function(g){return g!==a}),document.removeEventListener("wheel",c,cn),document.removeEventListener("touchmove",c,cn),document.removeEventListener("touchstart",f,cn)}},[]);var p=e.removeScrollBar,v=e.inert;return d.createElement(d.Fragment,null,v?d.createElement(a,{styles:kx(o)}):null,p?d.createElement(vx,{gapMode:e.gapMode}):null)}function Mx(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const jx=ox(rc,Tx);var $n=d.forwardRef(function(e,t){return d.createElement($r,nt({},e,{ref:t,sideCar:jx}))});$n.classNames=$r.classNames;var xa=["Enter"," "],Ax=["ArrowDown","PageUp","Home"],fc=["ArrowUp","PageDown","End"],Rx=[...Ax,...fc],Dx={ltr:[...xa,"ArrowRight"],rtl:[...xa,"ArrowLeft"]},Ix={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ln="Menu",[Fn,_x,Ox]=tn(Ln),[Bt,mc]=be(Ln,[Ox,xt,Ct]),Bn=xt(),pc=Ct(),[hc,Nt]=Bt(Ln),[$x,zn]=Bt(Ln),gc=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,l=Bn(t),[c,u]=d.useState(null),f=d.useRef(!1),m=we(a),h=gt(o);return d.useEffect(()=>{const p=()=>{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",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),i.jsx(In,{...l,children:i.jsx(hc,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:u,children:i.jsx($x,{scope:t,onClose:d.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:f,dir:h,modal:s,children:r})})})};gc.displayName=Ln;var Lx="MenuAnchor",Ca=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Bn(n);return i.jsx(_n,{...o,...r,ref:t})});Ca.displayName=Lx;var Na="MenuPortal",[Fx,vc]=Bt(Na,{forceMount:void 0}),bc=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Nt(Na,t);return i.jsx(Fx,{scope:t,forceMount:n,children:i.jsx(Ce,{present:n||a.open,children:i.jsx(On,{asChild:!0,container:o,children:r})})})};bc.displayName=Na;var $e="MenuContent",[Bx,Sa]=Bt($e),wc=d.forwardRef((e,t)=>{const n=vc($e,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Nt($e,e.__scopeMenu),s=zn($e,e.__scopeMenu);return i.jsx(Fn.Provider,{scope:e.__scopeMenu,children:i.jsx(Ce,{present:r||a.open,children:i.jsx(Fn.Slot,{scope:e.__scopeMenu,children:s.modal?i.jsx(zx,{...o,ref:t}):i.jsx(Wx,{...o,ref:t})})})})}),zx=d.forwardRef((e,t)=>{const n=Nt($e,e.__scopeMenu),r=d.useRef(null),o=oe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return Ir(a)},[]),i.jsx(Ea,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:B(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Wx=d.forwardRef((e,t)=>{const n=Nt($e,e.__scopeMenu);return i.jsx(Ea,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Vx=pt("MenuContent.ScrollLock"),Ea=d.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:p,disableOutsideScroll:v,...g}=e,b=Nt($e,n),y=zn($e,n),w=Bn(n),x=pc(n),S=_x(n),[E,A]=d.useState(null),k=d.useRef(null),P=oe(t,k,b.onContentChange),j=d.useRef(0),$=d.useRef(""),H=d.useRef(0),z=d.useRef(null),ee=d.useRef("right"),K=d.useRef(0),te=v?$n:d.Fragment,V=v?{as:Vx,allowPinchZoom:!0}:void 0,Q=O=>{var R,Y;const M=$.current+O,U=S().filter(q=>!q.disabled),T=document.activeElement,I=(R=U.find(q=>q.ref.current===T))==null?void 0:R.textValue,L=U.map(q=>q.textValue),F=t0(L,M,I),J=(Y=U.find(q=>q.textValue===F))==null?void 0:Y.ref.current;(function q(ne){$.current=ne,window.clearTimeout(j.current),ne!==""&&(j.current=window.setTimeout(()=>q(""),1e3))})(M),J&&setTimeout(()=>J.focus())};d.useEffect(()=>()=>window.clearTimeout(j.current),[]),hr();const _=d.useCallback(O=>{var U,T;return ee.current===((U=z.current)==null?void 0:U.side)&&r0(O,(T=z.current)==null?void 0:T.area)},[]);return i.jsx(Bx,{scope:n,searchRef:$,onItemEnter:d.useCallback(O=>{_(O)&&O.preventDefault()},[_]),onItemLeave:d.useCallback(O=>{var M;_(O)||((M=k.current)==null||M.focus(),A(null))},[_]),onTriggerLeave:d.useCallback(O=>{_(O)&&O.preventDefault()},[_]),pointerGraceTimerRef:H,onPointerGraceIntentChange:d.useCallback(O=>{z.current=O},[]),children:i.jsx(te,{...V,children:i.jsx(jn,{asChild:!0,trapped:o,onMountAutoFocus:B(a,O=>{var M;O.preventDefault(),(M=k.current)==null||M.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:i.jsx(Lt,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:p,children:i.jsx(jr,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:A,onEntryFocus:B(c,O=>{y.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(kr,{role:"menu","aria-orientation":"vertical","data-state":$c(b.open),"data-radix-menu-content":"",dir:y.dir,...w,...g,ref:P,style:{outline:"none",...g.style},onKeyDown:B(g.onKeyDown,O=>{const U=O.target.closest("[data-radix-menu-content]")===O.currentTarget,T=O.ctrlKey||O.altKey||O.metaKey,I=O.key.length===1;U&&(O.key==="Tab"&&O.preventDefault(),!T&&I&&Q(O.key));const L=k.current;if(O.target!==L||!Rx.includes(O.key))return;O.preventDefault();const J=S().filter(R=>!R.disabled).map(R=>R.ref.current);fc.includes(O.key)&&J.reverse(),Jx(J)}),onBlur:B(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(j.current),$.current="")}),onPointerMove:B(e.onPointerMove,Vn(O=>{const M=O.target,U=K.current!==O.clientX;if(O.currentTarget.contains(M)&&U){const T=O.clientX>K.current?"right":"left";ee.current=T,K.current=O.clientX}}))})})})})})})});wc.displayName=$e;var Hx="MenuGroup",ka=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(W.div,{role:"group",...r,ref:t})});ka.displayName=Hx;var Gx="MenuLabel",yc=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(W.div,{...r,ref:t})});yc.displayName=Gx;var Br="MenuItem",xc="menu.itemSelect",zr=d.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=d.useRef(null),s=zn(Br,e.__scopeMenu),l=Sa(Br,e.__scopeMenu),c=oe(t,a),u=d.useRef(!1),f=()=>{const m=a.current;if(!n&&m){const h=new CustomEvent(xc,{bubbles:!0,cancelable:!0});m.addEventListener(xc,p=>r==null?void 0:r(p),{once:!0}),pr(m,h),h.defaultPrevented?u.current=!1:s.onClose()}};return i.jsx(Cc,{...o,ref:c,disabled:n,onClick:B(e.onClick,f),onPointerDown:m=>{var h;(h=e.onPointerDown)==null||h.call(e,m),u.current=!0},onPointerUp:B(e.onPointerUp,m=>{var h;u.current||(h=m.currentTarget)==null||h.click()}),onKeyDown:B(e.onKeyDown,m=>{const h=l.searchRef.current!=="";n||h&&m.key===" "||xa.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});zr.displayName=Br;var Cc=d.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=Sa(Br,n),l=pc(n),c=d.useRef(null),u=oe(t,c),[f,m]=d.useState(!1),[h,p]=d.useState("");return d.useEffect(()=>{const v=c.current;v&&p((v.textContent??"").trim())},[a.children]),i.jsx(Fn.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:i.jsx(Ar,{asChild:!0,...l,focusable:!r,children:i.jsx(W.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:B(e.onPointerMove,Vn(v=>{r?s.onItemLeave(v):(s.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:B(e.onPointerLeave,Vn(v=>s.onItemLeave(v))),onFocus:B(e.onFocus,()=>m(!0)),onBlur:B(e.onBlur,()=>m(!1))})})})}),Ux="MenuCheckboxItem",Nc=d.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return i.jsx(Tc,{scope:e.__scopeMenu,checked:n,children:i.jsx(zr,{role:"menuitemcheckbox","aria-checked":Wr(n)?"mixed":n,...o,ref:t,"data-state":Ma(n),onSelect:B(o.onSelect,()=>r==null?void 0:r(Wr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Nc.displayName=Ux;var Sc="MenuRadioGroup",[Yx,Kx]=Bt(Sc,{value:void 0,onValueChange:()=>{}}),Ec=d.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=we(r);return i.jsx(Yx,{scope:e.__scopeMenu,value:n,onValueChange:a,children:i.jsx(ka,{...o,ref:t})})});Ec.displayName=Sc;var kc="MenuRadioItem",Pc=d.forwardRef((e,t)=>{const{value:n,...r}=e,o=Kx(kc,e.__scopeMenu),a=n===o.value;return i.jsx(Tc,{scope:e.__scopeMenu,checked:a,children:i.jsx(zr,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Ma(a),onSelect:B(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Pc.displayName=kc;var Pa="MenuItemIndicator",[Tc,qx]=Bt(Pa,{checked:!1}),Mc=d.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=qx(Pa,n);return i.jsx(Ce,{present:r||Wr(a.checked)||a.checked===!0,children:i.jsx(W.span,{...o,ref:t,"data-state":Ma(a.checked)})})});Mc.displayName=Pa;var Xx="MenuSeparator",jc=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(W.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});jc.displayName=Xx;var Zx="MenuArrow",Ac=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Bn(n);return i.jsx(Pr,{...o,...r,ref:t})});Ac.displayName=Zx;var Ta="MenuSub",[Qx,Rc]=Bt(Ta),Dc=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Nt(Ta,t),s=Bn(t),[l,c]=d.useState(null),[u,f]=d.useState(null),m=we(o);return d.useEffect(()=>(a.open===!1&&m(!1),()=>m(!1)),[a.open,m]),i.jsx(In,{...s,children:i.jsx(hc,{scope:t,open:r,onOpenChange:m,content:u,onContentChange:f,children:i.jsx(Qx,{scope:t,contentId:pe(),triggerId:pe(),trigger:l,onTriggerChange:c,children:n})})})};Dc.displayName=Ta;var Wn="MenuSubTrigger",Ic=d.forwardRef((e,t)=>{const n=Nt(Wn,e.__scopeMenu),r=zn(Wn,e.__scopeMenu),o=Rc(Wn,e.__scopeMenu),a=Sa(Wn,e.__scopeMenu),s=d.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},f=d.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return d.useEffect(()=>f,[f]),d.useEffect(()=>{const m=l.current;return()=>{window.clearTimeout(m),c(null)}},[l,c]),i.jsx(Ca,{asChild:!0,...u,children:i.jsx(Cc,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":$c(n.open),...e,ref:Qe(t,o.onTriggerChange),onClick:m=>{var h;(h=e.onClick)==null||h.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:B(e.onPointerMove,Vn(m=>{a.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:B(e.onPointerLeave,Vn(m=>{var p,v;f();const h=(p=n.content)==null?void 0:p.getBoundingClientRect();if(h){const g=(v=n.content)==null?void 0:v.dataset.side,b=g==="right",y=b?-5:5,w=h[b?"left":"right"],x=h[b?"right":"left"];a.onPointerGraceIntentChange({area:[{x:m.clientX+y,y:m.clientY},{x:w,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:w,y:h.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(m),m.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:B(e.onKeyDown,m=>{var p;const h=a.searchRef.current!=="";e.disabled||h&&m.key===" "||Dx[r.dir].includes(m.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),m.preventDefault())})})})});Ic.displayName=Wn;var _c="MenuSubContent",Oc=d.forwardRef((e,t)=>{const n=vc($e,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Nt($e,e.__scopeMenu),s=zn($e,e.__scopeMenu),l=Rc(_c,e.__scopeMenu),c=d.useRef(null),u=oe(t,c);return i.jsx(Fn.Provider,{scope:e.__scopeMenu,children:i.jsx(Ce,{present:r||a.open,children:i.jsx(Fn.Slot,{scope:e.__scopeMenu,children:i.jsx(Ea,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var m;s.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:B(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:B(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:B(e.onKeyDown,f=>{var p;const m=f.currentTarget.contains(f.target),h=Ix[s.dir].includes(f.key);m&&h&&(a.onOpenChange(!1),(p=l.trigger)==null||p.focus(),f.preventDefault())})})})})})});Oc.displayName=_c;function $c(e){return e?"open":"closed"}function Wr(e){return e==="indeterminate"}function Ma(e){return Wr(e)?"indeterminate":e?"checked":"unchecked"}function Jx(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function e0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function t0(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=e0(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const c=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function n0(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 l=t[a].x,c=t[a].y,u=t[s].x,f=t[s].y;c>r!=f>r&&n<(u-l)*(r-c)/(f-c)+l&&(o=!o)}return o}function r0(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return n0(n,t)}function Vn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var o0=gc,a0=Ca,s0=bc,i0=wc,l0=ka,c0=yc,d0=zr,u0=Nc,f0=Ec,m0=Pc,p0=Mc,h0=jc,g0=Ac,v0=Dc,b0=Ic,w0=Oc,ja="DropdownMenu",[y0,kP]=be(ja,[mc]),ke=mc(),[x0,Lc]=y0(ja),Fc=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,c=ke(t),u=d.useRef(null),[f=!1,m]=xe({prop:o,defaultProp:a,onChange:s});return i.jsx(x0,{scope:t,triggerId:pe(),triggerRef:u,contentId:pe(),open:f,onOpenChange:m,onOpenToggle:d.useCallback(()=>m(h=>!h),[m]),modal:l,children:i.jsx(o0,{...c,open:f,onOpenChange:m,dir:r,modal:l,children:n})})};Fc.displayName=ja;var Bc="DropdownMenuTrigger",zc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=Lc(Bc,n),s=ke(n);return i.jsx(a0,{asChild:!0,...s,children:i.jsx(W.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:Qe(t,a.triggerRef),onPointerDown:B(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:B(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});zc.displayName=Bc;var C0="DropdownMenuPortal",Wc=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ke(t);return i.jsx(s0,{...r,...n})};Wc.displayName=C0;var Vc="DropdownMenuContent",Hc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lc(Vc,n),a=ke(n),s=d.useRef(!1);return i.jsx(i0,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:B(e.onCloseAutoFocus,l=>{var c;s.current||(c=o.triggerRef.current)==null||c.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:B(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!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)"}})});Hc.displayName=Vc;var N0="DropdownMenuGroup",Gc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(l0,{...o,...r,ref:t})});Gc.displayName=N0;var S0="DropdownMenuLabel",Uc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(c0,{...o,...r,ref:t})});Uc.displayName=S0;var E0="DropdownMenuItem",Yc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(d0,{...o,...r,ref:t})});Yc.displayName=E0;var k0="DropdownMenuCheckboxItem",Kc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(u0,{...o,...r,ref:t})});Kc.displayName=k0;var P0="DropdownMenuRadioGroup",qc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(f0,{...o,...r,ref:t})});qc.displayName=P0;var T0="DropdownMenuRadioItem",Xc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(m0,{...o,...r,ref:t})});Xc.displayName=T0;var M0="DropdownMenuItemIndicator",Zc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(p0,{...o,...r,ref:t})});Zc.displayName=M0;var j0="DropdownMenuSeparator",Qc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(h0,{...o,...r,ref:t})});Qc.displayName=j0;var A0="DropdownMenuArrow",R0=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(g0,{...o,...r,ref:t})});R0.displayName=A0;var D0=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=ke(t),[l=!1,c]=xe({prop:r,defaultProp:a,onChange:o});return i.jsx(v0,{...s,open:l,onOpenChange:c,children:n})},I0="DropdownMenuSubTrigger",Jc=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(b0,{...o,...r,ref:t})});Jc.displayName=I0;var _0="DropdownMenuSubContent",ed=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(w0,{...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)"}})});ed.displayName=_0;var O0=Fc,$0=zc,td=Wc,nd=Hc,L0=Gc,rd=Uc,od=Yc,ad=Kc,F0=qc,sd=Xc,id=Zc,ld=Qc,B0=D0,cd=Jc,dd=ed;const ud=O0,fd=$0,z0=L0,W0=td,V0=B0,H0=F0,md=d.forwardRef(({className:e,inset:t,children:n,...r},o)=>i.jsxs(cd,{ref:o,className:D("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,i.jsx(Mn,{className:"ml-auto"})]}));md.displayName=cd.displayName;const pd=d.forwardRef(({className:e,...t},n)=>i.jsx(dd,{ref:n,className:D("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}));pd.displayName=dd.displayName;const Aa=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(td,{children:i.jsx(nd,{ref:r,sideOffset:t,className:D("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})}));Aa.displayName=nd.displayName;const hd=d.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(od,{ref:r,className:D("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}));hd.displayName=od.displayName;const Ra=d.forwardRef(({className:e,children:t,checked:n,...r},o)=>i.jsxs(ad,{ref:o,className:D("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:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(id,{children:i.jsx(Tn,{className:"h-4 w-4"})})}),t]}));Ra.displayName=ad.displayName;const gd=d.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(sd,{ref:r,className:D("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:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(id,{children:i.jsx(sl,{className:"h-2 w-2 fill-current"})})}),t]}));gd.displayName=sd.displayName;const Da=d.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(rd,{ref:r,className:D("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Da.displayName=rd.displayName;const Vr=d.forwardRef(({className:e,...t},n)=>i.jsx(ld,{ref:n,className:D("-mx-1 my-1 h-px bg-muted",e),...t}));Vr.displayName=ld.displayName;const vd=({className:e,...t})=>i.jsx("span",{className:D("ml-auto text-xs tracking-widest opacity-60",e),...t});vd.displayName="DropdownMenuShortcut";function G0({columns:e,onToggleVisibility:t,onReset:n}){return i.jsxs(ud,{children:[i.jsx(fd,{asChild:!0,children:i.jsxs(fe,{variant:"outline",className:"ml-auto",children:[i.jsx(nw,{className:"h-4 w-4 mr-2"}),"Columns"]})}),i.jsxs(Aa,{align:"end",className:"w-48",children:[i.jsx(Da,{children:"Toggle columns"}),i.jsx(Vr,{}),e.map(r=>i.jsx(Ra,{checked:!r.hidden,onCheckedChange:o=>t(String(r.key),o),children:r.title},String(r.key))),i.jsx(Vr,{}),i.jsx(fe,{variant:"ghost",size:"sm",className:"w-full justify-start",onClick:n,children:"Reset columns"})]})]})}function bd(e,[t,n]){return Math.min(n,Math.max(t,e))}function Hn(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var U0="VisuallyHidden",Ia=d.forwardRef((e,t)=>i.jsx(W.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}}));Ia.displayName=U0;var wd=Ia,Y0=[" ","Enter","ArrowUp","ArrowDown"],K0=[" ","Enter"],Gn="Select",[Hr,Gr,q0]=tn(Gn),[un,PP]=be(Gn,[q0,xt]),Ur=xt(),[X0,St]=un(Gn),[Z0,Q0]=un(Gn),yd=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:l,onValueChange:c,dir:u,name:f,autoComplete:m,disabled:h,required:p,form:v}=e,g=Ur(t),[b,y]=d.useState(null),[w,x]=d.useState(null),[S,E]=d.useState(!1),A=gt(u),[k=!1,P]=xe({prop:r,defaultProp:o,onChange:a}),[j,$]=xe({prop:s,defaultProp:l,onChange:c}),H=d.useRef(null),z=b?v||!!b.closest("form"):!0,[ee,K]=d.useState(new Set),te=Array.from(ee).map(V=>V.props.value).join(";");return i.jsx(In,{...g,children:i.jsxs(X0,{required:p,scope:t,trigger:b,onTriggerChange:y,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:E,contentId:pe(),value:j,onValueChange:$,open:k,onOpenChange:P,dir:A,triggerPointerDownPosRef:H,disabled:h,children:[i.jsx(Hr.Provider,{scope:t,children:i.jsx(Z0,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(V=>{K(Q=>new Set(Q).add(V))},[]),onNativeOptionRemove:d.useCallback(V=>{K(Q=>{const _=new Set(Q);return _.delete(V),_})},[]),children:n})}),z?i.jsxs(Gd,{"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:m,value:j,onChange:V=>$(V.target.value),disabled:h,form:v,children:[j===void 0?i.jsx("option",{value:""}):null,Array.from(ee)]},te):null]})})};yd.displayName=Gn;var xd="SelectTrigger",Cd=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Ur(n),s=St(xd,n),l=s.disabled||r,c=oe(t,s.onTriggerChange),u=Gr(n),f=d.useRef("touch"),[m,h,p]=Ud(g=>{const b=u().filter(x=>!x.disabled),y=b.find(x=>x.value===s.value),w=Yd(b,g,y);w!==void 0&&s.onValueChange(w.value)}),v=g=>{l||(s.onOpenChange(!0),p()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return i.jsx(_n,{asChild:!0,...a,children:i.jsx(W.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:l,"data-disabled":l?"":void 0,"data-placeholder":Hd(s.value)?"":void 0,...o,ref:c,onClick:B(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&v(g)}),onPointerDown:B(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"&&(v(g),g.preventDefault())}),onKeyDown:B(o.onKeyDown,g=>{const b=m.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(b&&g.key===" ")&&Y0.includes(g.key)&&(v(),g.preventDefault())})})})});Cd.displayName=xd;var Nd="SelectValue",Sd=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...l}=e,c=St(Nd,n),{onValueNodeHasChildrenChange:u}=c,f=a!==void 0,m=oe(t,c.onValueNodeChange);return ve(()=>{u(f)},[u,f]),i.jsx(W.span,{...l,ref:m,style:{pointerEvents:"none"},children:Hd(c.value)?i.jsx(i.Fragment,{children:s}):a})});Sd.displayName=Nd;var J0="SelectIcon",Ed=d.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return i.jsx(W.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Ed.displayName=J0;var zt="SelectContent",kd=d.forwardRef((e,t)=>{const n=St(zt,e.__scopeSelect),[r,o]=d.useState();if(ve(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?rr.createPortal(i.jsx(Pd,{scope:e.__scopeSelect,children:i.jsx(Hr.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),a):null}return i.jsx(Td,{...e,ref:t})});kd.displayName=zt;var He=10,[Pd,Et]=un(zt),eC="SelectContentImpl",tC=pt("SelectContent.RemoveScroll"),Td=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:v,hideWhenDetached:g,avoidCollisions:b,...y}=e,w=St(zt,n),[x,S]=d.useState(null),[E,A]=d.useState(null),k=oe(t,R=>S(R)),[P,j]=d.useState(null),[$,H]=d.useState(null),z=Gr(n),[ee,K]=d.useState(!1),te=d.useRef(!1);d.useEffect(()=>{if(x)return Ir(x)},[x]),hr();const V=d.useCallback(R=>{const[Y,...q]=z().map(ie=>ie.ref.current),[ne]=q.slice(-1),re=document.activeElement;for(const ie of R)if(ie===re||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===Y&&E&&(E.scrollTop=0),ie===ne&&E&&(E.scrollTop=E.scrollHeight),ie==null||ie.focus(),document.activeElement!==re))return},[z,E]),Q=d.useCallback(()=>V([P,x]),[V,P,x]);d.useEffect(()=>{ee&&Q()},[ee,Q]);const{onOpenChange:_,triggerPointerDownPosRef:O}=w;d.useEffect(()=>{if(x){let R={x:0,y:0};const Y=ne=>{var re,ie;R={x:Math.abs(Math.round(ne.pageX)-(((re=O.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(ne.pageY)-(((ie=O.current)==null?void 0:ie.y)??0))}},q=ne=>{R.x<=10&&R.y<=10?ne.preventDefault():x.contains(ne.target)||_(!1),document.removeEventListener("pointermove",Y),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",q,{capture:!0})}}},[x,_,O]),d.useEffect(()=>{const R=()=>_(!1);return window.addEventListener("blur",R),window.addEventListener("resize",R),()=>{window.removeEventListener("blur",R),window.removeEventListener("resize",R)}},[_]);const[M,U]=Ud(R=>{const Y=z().filter(re=>!re.disabled),q=Y.find(re=>re.ref.current===document.activeElement),ne=Yd(Y,R,q);ne&&setTimeout(()=>ne.ref.current.focus())}),T=d.useCallback((R,Y,q)=>{const ne=!te.current&&!q;(w.value!==void 0&&w.value===Y||ne)&&(j(R),ne&&(te.current=!0))},[w.value]),I=d.useCallback(()=>x==null?void 0:x.focus(),[x]),L=d.useCallback((R,Y,q)=>{const ne=!te.current&&!q;(w.value!==void 0&&w.value===Y||ne)&&H(R)},[w.value]),F=r==="popper"?_a:Md,J=F===_a?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:v,hideWhenDetached:g,avoidCollisions:b}:{};return i.jsx(Pd,{scope:n,content:x,viewport:E,onViewportChange:A,itemRefCallback:T,selectedItem:P,onItemLeave:I,itemTextRefCallback:L,focusSelectedItem:Q,selectedItemText:$,position:r,isPositioned:ee,searchRef:M,children:i.jsx($n,{as:tC,allowPinchZoom:!0,children:i.jsx(jn,{asChild:!0,trapped:w.open,onMountAutoFocus:R=>{R.preventDefault()},onUnmountAutoFocus:B(o,R=>{var Y;(Y=w.trigger)==null||Y.focus({preventScroll:!0}),R.preventDefault()}),children:i.jsx(Lt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:R=>R.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:i.jsx(F,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:R=>R.preventDefault(),...y,...J,onPlaced:()=>K(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:B(y.onKeyDown,R=>{const Y=R.ctrlKey||R.altKey||R.metaKey;if(R.key==="Tab"&&R.preventDefault(),!Y&&R.key.length===1&&U(R.key),["ArrowUp","ArrowDown","Home","End"].includes(R.key)){let ne=z().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(R.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(R.key)){const re=R.target,ie=ne.indexOf(re);ne=ne.slice(ie+1)}setTimeout(()=>V(ne)),R.preventDefault()}})})})})})})});Td.displayName=eC;var nC="SelectItemAlignedPosition",Md=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=St(zt,n),s=Et(zt,n),[l,c]=d.useState(null),[u,f]=d.useState(null),m=oe(t,k=>f(k)),h=Gr(n),p=d.useRef(!1),v=d.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:y,focusSelectedItem:w}=s,x=d.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&g&&b&&y){const k=a.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),j=a.valueNode.getBoundingClientRect(),$=y.getBoundingClientRect();if(a.dir!=="rtl"){const re=$.left-P.left,ie=j.left-re,Ne=k.left-ie,ye=k.width+Ne,Fe=Math.max(ye,P.width),Oe=window.innerWidth-He,Ee=bd(ie,[He,Math.max(He,Oe-Fe)]);l.style.minWidth=ye+"px",l.style.left=Ee+"px"}else{const re=P.right-$.right,ie=window.innerWidth-j.right-re,Ne=window.innerWidth-k.right-ie,ye=k.width+Ne,Fe=Math.max(ye,P.width),Oe=window.innerWidth-He,Ee=bd(ie,[He,Math.max(He,Oe-Fe)]);l.style.minWidth=ye+"px",l.style.right=Ee+"px"}const H=h(),z=window.innerHeight-He*2,ee=g.scrollHeight,K=window.getComputedStyle(u),te=parseInt(K.borderTopWidth,10),V=parseInt(K.paddingTop,10),Q=parseInt(K.borderBottomWidth,10),_=parseInt(K.paddingBottom,10),O=te+V+ee+_+Q,M=Math.min(b.offsetHeight*5,O),U=window.getComputedStyle(g),T=parseInt(U.paddingTop,10),I=parseInt(U.paddingBottom,10),L=k.top+k.height/2-He,F=z-L,J=b.offsetHeight/2,R=b.offsetTop+J,Y=te+V+R,q=O-Y;if(Y<=L){const re=H.length>0&&b===H[H.length-1].ref.current;l.style.bottom="0px";const ie=u.clientHeight-g.offsetTop-g.offsetHeight,Ne=Math.max(F,J+(re?I:0)+ie+Q),ye=Y+Ne;l.style.height=ye+"px"}else{const re=H.length>0&&b===H[0].ref.current;l.style.top="0px";const Ne=Math.max(L,te+g.offsetTop+(re?T:0)+J)+q;l.style.height=Ne+"px",g.scrollTop=Y-L+g.offsetTop}l.style.margin=`${He}px 0`,l.style.minHeight=M+"px",l.style.maxHeight=z+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[h,a.trigger,a.valueNode,l,u,g,b,y,a.dir,r]);ve(()=>x(),[x]);const[S,E]=d.useState();ve(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const A=d.useCallback(k=>{k&&v.current===!0&&(x(),w==null||w(),v.current=!1)},[x,w]);return i.jsx(oC,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:A,children:i.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:i.jsx(W.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Md.displayName=nC;var rC="SelectPopperPosition",_a=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=He,...a}=e,s=Ur(n);return i.jsx(kr,{...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)"}})});_a.displayName=rC;var[oC,Oa]=un(zt,{}),$a="SelectViewport",jd=d.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Et($a,n),s=Oa($a,n),l=oe(t,a.onViewportChange),c=d.useRef(0);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),i.jsx(Hr.Slot,{scope:n,children:i.jsx(W.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:B(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&m){const p=Math.abs(c.current-f.scrollTop);if(p>0){const v=window.innerHeight-He*2,g=parseFloat(m.style.minHeight),b=parseFloat(m.style.height),y=Math.max(g,b);if(y<v){const w=y+p,x=Math.min(v,w),S=w-x;m.style.height=x+"px",m.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,m.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});jd.displayName=$a;var Ad="SelectGroup",[aC,sC]=un(Ad),Rd=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=pe();return i.jsx(aC,{scope:n,id:o,children:i.jsx(W.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Rd.displayName=Ad;var Dd="SelectLabel",Id=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=sC(Dd,n);return i.jsx(W.div,{id:o.id,...r,ref:t})});Id.displayName=Dd;var Yr="SelectItem",[iC,_d]=un(Yr),Od=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,l=St(Yr,n),c=Et(Yr,n),u=l.value===r,[f,m]=d.useState(a??""),[h,p]=d.useState(!1),v=oe(t,w=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,w,r,o)}),g=pe(),b=d.useRef("touch"),y=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return i.jsx(iC,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:d.useCallback(w=>{m(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:i.jsx(Hr.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:i.jsx(W.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:v,onFocus:B(s.onFocus,()=>p(!0)),onBlur:B(s.onBlur,()=>p(!1)),onClick:B(s.onClick,()=>{b.current!=="mouse"&&y()}),onPointerUp:B(s.onPointerUp,()=>{b.current==="mouse"&&y()}),onPointerDown:B(s.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:B(s.onPointerMove,w=>{var x;b.current=w.pointerType,o?(x=c.onItemLeave)==null||x.call(c):b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:B(s.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:B(s.onKeyDown,w=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(K0.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});Od.displayName=Yr;var Un="SelectItemText",$d=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=St(Un,n),l=Et(Un,n),c=_d(Un,n),u=Q0(Un,n),[f,m]=d.useState(null),h=oe(t,y=>m(y),c.onItemTextChange,y=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,y,c.value,c.disabled)}),p=f==null?void 0:f.textContent,v=d.useMemo(()=>i.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=u;return ve(()=>(g(v),()=>b(v)),[g,b,v]),i.jsxs(i.Fragment,{children:[i.jsx(W.span,{id:c.textId,...a,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?rr.createPortal(a.children,s.valueNode):null]})});$d.displayName=Un;var Ld="SelectItemIndicator",Fd=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return _d(Ld,n).isSelected?i.jsx(W.span,{"aria-hidden":!0,...r,ref:t}):null});Fd.displayName=Ld;var La="SelectScrollUpButton",Bd=d.forwardRef((e,t)=>{const n=Et(La,e.__scopeSelect),r=Oa(La,e.__scopeSelect),[o,a]=d.useState(!1),s=oe(t,r.onScrollButtonChange);return ve(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;a(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?i.jsx(Wd,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Bd.displayName=La;var Fa="SelectScrollDownButton",zd=d.forwardRef((e,t)=>{const n=Et(Fa,e.__scopeSelect),r=Oa(Fa,e.__scopeSelect),[o,a]=d.useState(!1),s=oe(t,r.onScrollButtonChange);return ve(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;a(f)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?i.jsx(Wd,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});zd.displayName=Fa;var Wd=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Et("SelectScrollButton",n),s=d.useRef(null),l=Gr(n),c=d.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),ve(()=>{var f;const u=l().find(m=>m.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),i.jsx(W.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:B(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:B(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:B(o.onPointerLeave,()=>{c()})})}),lC="SelectSeparator",Vd=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i.jsx(W.div,{"aria-hidden":!0,...r,ref:t})});Vd.displayName=lC;var Ba="SelectArrow",cC=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ur(n),a=St(Ba,n),s=Et(Ba,n);return a.open&&s.position==="popper"?i.jsx(Pr,{...o,...r,ref:t}):null});cC.displayName=Ba;function Hd(e){return e===""||e===void 0}var Gd=d.forwardRef((e,t)=>{const{value:n,...r}=e,o=d.useRef(null),a=oe(t,o),s=Hn(n);return d.useEffect(()=>{const l=o.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==n&&f){const m=new Event("change",{bubbles:!0});f.call(l,n),l.dispatchEvent(m)}},[s,n]),i.jsx(Ia,{asChild:!0,children:i.jsx("select",{...r,ref:a,defaultValue:n})})});Gd.displayName="BubbleSelect";function Ud(e){const t=we(e),n=d.useRef(""),r=d.useRef(0),o=d.useCallback(s=>{const l=n.current+s;t(l),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),a=d.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Yd(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=dC(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const c=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function dC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var uC=yd,Kd=Cd,fC=Sd,mC=Ed,qd=kd,pC=jd,hC=Rd,Xd=Id,Zd=Od,gC=$d,vC=Fd,Qd=Bd,Jd=zd,eu=Vd;const za=uC,bC=hC,Wa=fC,Kr=d.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Kd,{ref:r,className:D("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,i.jsx(mC,{asChild:!0,children:i.jsx(Jt,{className:"h-4 w-4 opacity-50"})})]}));Kr.displayName=Kd.displayName;const Va=d.forwardRef(({className:e,...t},n)=>i.jsx(Qd,{ref:n,className:D("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(Fb,{className:"h-4 w-4"})}));Va.displayName=Qd.displayName;const Ha=d.forwardRef(({className:e,...t},n)=>i.jsx(Jd,{ref:n,className:D("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(Jt,{className:"h-4 w-4"})}));Ha.displayName=Jd.displayName;const qr=d.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>i.jsxs(qd,{ref:o,className:D("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:[i.jsx(Va,{}),i.jsx(pC,{className:D("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),i.jsx(Ha,{})]}));qr.displayName=qd.displayName;const tu=d.forwardRef(({className:e,...t},n)=>i.jsx(Xd,{ref:n,className:D("px-2 py-1.5 text-sm font-semibold",e),...t}));tu.displayName=Xd.displayName;const kt=d.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Zd,{ref:r,className:D("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:[i.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(vC,{children:i.jsx(Tn,{className:"h-4 w-4"})})}),i.jsx(gC,{children:t})]}));kt.displayName=Zd.displayName;const nu=d.forwardRef(({className:e,...t},n)=>i.jsx(eu,{ref:n,className:D("-mx-1 my-1 h-px bg-muted",e),...t}));nu.displayName=eu.displayName;function wC({filter:e,value:t,onChange:n}){return i.jsxs(za,{value:t||"all",onValueChange:n,children:[i.jsx(Kr,{className:"w-40",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Yb,{className:"h-4 w-4"}),i.jsx(Wa,{placeholder:e.label})]})}),i.jsxs(qr,{children:[i.jsxs(kt,{value:"all",children:["All ",e.label]}),e.options.map(r=>i.jsx(kt,{value:r.value,children:r.label},r.value))]})]})}const yC=$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"}}),Yn=d.forwardRef(({className:e,sizing:t,type:n,...r},o)=>i.jsx("input",{type:n,className:D(yC({sizing:t,className:e})),ref:o,...r}));Yn.displayName="Input";function xC({value:e,onChange:t,placeholder:n="Search..."}){return i.jsxs("div",{className:"relative flex-1 max-w-sm",children:[i.jsx(qo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground h-4 w-4"}),i.jsx(Yn,{placeholder:n,value:e,onChange:r=>t(r.target.value),className:"pl-10"})]})}function CC({selectedCount:e,onClearSelection:t}){return e===0?null:i.jsxs("div",{className:"bg-muted/50 p-2 rounded-md flex items-center justify-between",children:[i.jsxs("div",{className:"text-sm",children:[i.jsx("span",{className:"font-medium",children:e})," ",e===1?"row":"rows"," selected"]}),i.jsx(fe,{variant:"ghost",size:"sm",onClick:t,children:"Clear selection"})]})}var Ga="Checkbox",[NC,TP]=be(Ga),[SC,EC]=NC(Ga),ru=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:l,value:c="on",onCheckedChange:u,form:f,...m}=e,[h,p]=d.useState(null),v=oe(t,S=>p(S)),g=d.useRef(!1),b=h?f||!!h.closest("form"):!0,[y=!1,w]=xe({prop:o,defaultProp:a,onChange:u}),x=d.useRef(y);return d.useEffect(()=>{const S=h==null?void 0:h.form;if(S){const E=()=>w(x.current);return S.addEventListener("reset",E),()=>S.removeEventListener("reset",E)}},[h,w]),i.jsxs(SC,{scope:n,state:y,disabled:l,children:[i.jsx(W.button,{type:"button",role:"checkbox","aria-checked":Pt(y)?"mixed":y,"aria-required":s,"data-state":su(y),"data-disabled":l?"":void 0,disabled:l,value:c,...m,ref:v,onKeyDown:B(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:B(e.onClick,S=>{w(E=>Pt(E)?!0:!E),b&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})}),b&&i.jsx(kC,{control:h,bubbles:!g.current,name:r,value:c,checked:y,required:s,disabled:l,form:f,style:{transform:"translateX(-100%)"},defaultChecked:Pt(a)?!1:a})]})});ru.displayName=Ga;var ou="CheckboxIndicator",au=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=EC(ou,n);return i.jsx(Ce,{present:r||Pt(a.state)||a.state===!0,children:i.jsx(W.span,{"data-state":su(a.state),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});au.displayName=ou;var kC=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...a}=e,s=d.useRef(null),l=Hn(n),c=Er(t);d.useEffect(()=>{const f=s.current,m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"checked").set;if(l!==n&&p){const v=new Event("click",{bubbles:r});f.indeterminate=Pt(n),p.call(f,Pt(n)?!1:n),f.dispatchEvent(v)}},[l,n,r]);const u=d.useRef(Pt(n)?!1:n);return i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??u.current,...a,tabIndex:-1,ref:s,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Pt(e){return e==="indeterminate"}function su(e){return Pt(e)?"indeterminate":e?"checked":"unchecked"}var iu=ru,PC=au;const Xr=d.forwardRef(({className:e,...t},n)=>i.jsx(iu,{ref:n,className:D("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:i.jsx(PC,{className:D("flex items-center justify-center text-current"),children:i.jsx(Tn,{className:"h-4 w-4"})})}));Xr.displayName=iu.displayName;function TC({columns:e,sortState:t,allRowsSelected:n,hasData:r,onSort:o,onToggleAllRows:a,allowSelectAllRows:s}){const l=e.filter(c=>!c.hidden);return i.jsxs(Zt,{children:[s&&i.jsx(Pn,{className:"w-12",children:i.jsx(Xr,{checked:n&&r,onCheckedChange:a,"aria-label":"Select all rows"})}),l.map(c=>i.jsx(Pn,{className:c.sortable?"cursor-pointer select-none":"",onClick:c.sortable?()=>o(String(c.key)):void 0,children:i.jsxs("div",{className:"flex items-center gap-1",children:[c.title,c.sortable&&i.jsx(i.Fragment,{children:t.field===c.key?t.direction==="asc"?i.jsx($b,{className:"h-4 w-4"}):i.jsx(Db,{className:"h-4 w-4"}):i.jsx(Ob,{className:"h-4 w-4 opacity-50"})})]})},String(c.key)))]})}function MC({row:e,index:t,columns:n,isSelected:r,rowId:o,onToggleSelection:a,allowSelection:s=!0}){const l=n.filter(c=>!c.hidden);return i.jsxs(Zt,{className:r?"bg-muted/50":"",children:[s&&i.jsx(Qt,{className:"w-12",children:i.jsx(Xr,{checked:r,onCheckedChange:c=>a(o,!!c),"aria-label":`Select row ${t+1}`})}),l.map(c=>{const u=e[c.key];return i.jsx(Qt,{children:c.customRenderer?c.customRenderer(u,e):String(u??"")},String(c.key))})]})}const Zr=({className:e,repeat:t=1,...n})=>i.jsx(i.Fragment,{children:Array.from({length:t??1}).map((r,o)=>i.jsx("div",{className:D("animate-shimmer bg-gradient-to-r from-gray-300 via-gray-100 to-gray-300","bg-[length:200%_100%] rounded-md h-5",e),...n},o))});function jC({columns:e,rows:t=5}){return i.jsx("div",{className:"rounded-md border",children:i.jsxs(dr,{children:[i.jsx(ur,{children:i.jsx(Zt,{children:Array.from({length:e}).map((n,r)=>i.jsx(Pn,{children:i.jsx(Zr,{className:"h-4 w-20"})},r))})}),i.jsx(fr,{children:Array.from({length:t}).map((n,r)=>i.jsx(Zt,{children:Array.from({length:e}).map((o,a)=>i.jsx(Qt,{children:i.jsx(Zr,{className:"h-4 w-full"})},a))},r))})]})})}function AC(e,t,n){const r=t.filter(f=>!f.hidden),o=r.map(f=>f.title),a=e.map(f=>r.map(m=>{const h=f[m.key];return h!=null?String(h):""})),s=[o.join(","),...a.map(f=>f.join(","))].join(`
|
|
253
|
+
`),l=new Blob([s],{type:"text/csv;charset=utf-8;"}),c=URL.createObjectURL(l),u=document.createElement("a");u.setAttribute("href",c),u.setAttribute("download",`${n}.csv`),u.style.visibility="hidden",document.body.appendChild(u),u.click(),document.body.removeChild(u)}const RC=()=>{const[e,t]=C.useState([]);return[e,a=>{t([...e,a])},a=>{const s=[...e];s.splice(a,1),t(s)},(a,s)=>{const l=[...e];l.filter(c=>c[a]!==s),t(l)}]};function DC(){const[e,t]=C.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 lu(e,t=250){const[n,r]=C.useState(e);return C.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n}var Ua="Collapsible",[IC,cu]=be(Ua),[_C,Ya]=IC(Ua),du=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...l}=e,[c=!1,u]=xe({prop:r,defaultProp:o,onChange:s});return i.jsx(_C,{scope:n,disabled:a,contentId:pe(),open:c,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),children:i.jsx(W.div,{"data-state":qa(c),"data-disabled":a?"":void 0,...l,ref:t})})});du.displayName=Ua;var uu="CollapsibleTrigger",fu=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Ya(uu,n);return i.jsx(W.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":qa(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:B(e.onClick,o.onOpenToggle)})});fu.displayName=uu;var Ka="CollapsibleContent",mu=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ya(Ka,e.__scopeCollapsible);return i.jsx(Ce,{present:n||o.open,children:({present:a})=>i.jsx(OC,{...r,ref:t,present:a})})});mu.displayName=Ka;var OC=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=Ya(Ka,n),[l,c]=d.useState(r),u=d.useRef(null),f=oe(t,u),m=d.useRef(0),h=m.current,p=d.useRef(0),v=p.current,g=s.open||l,b=d.useRef(g),y=d.useRef(void 0);return d.useEffect(()=>{const w=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(w)},[]),ve(()=>{const w=u.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();m.current=x.height,p.current=x.width,b.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),c(r)}},[s.open,r]),i.jsx(W.div,{"data-state":qa(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...a,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:g&&o})});function qa(e){return e?"open":"closed"}var $C=du,LC=fu,FC=mu,lt="Accordion",BC=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Xa,zC,WC]=tn(lt),[Qr,MP]=be(lt,[WC,cu]),Za=cu(),pu=C.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return i.jsx(Xa.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?i.jsx(UC,{...a,ref:t}):i.jsx(GC,{...o,ref:t})})});pu.displayName=lt;var[hu,VC]=Qr(lt),[gu,HC]=Qr(lt,{collapsible:!1}),GC=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[l,c]=xe({prop:n,defaultProp:r,onChange:o});return i.jsx(hu,{scope:e.__scopeAccordion,value:l?[l]:[],onItemOpen:c,onItemClose:C.useCallback(()=>a&&c(""),[a,c]),children:i.jsx(gu,{scope:e.__scopeAccordion,collapsible:a,children:i.jsx(vu,{...s,ref:t})})})}),UC=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s=[],l]=xe({prop:n,defaultProp:r,onChange:o}),c=C.useCallback(f=>l((m=[])=>[...m,f]),[l]),u=C.useCallback(f=>l((m=[])=>m.filter(h=>h!==f)),[l]);return i.jsx(hu,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:u,children:i.jsx(gu,{scope:e.__scopeAccordion,collapsible:!0,children:i.jsx(vu,{...a,ref:t})})})}),[YC,Jr]=Qr(lt),vu=C.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,l=C.useRef(null),c=oe(l,t),u=zC(n),m=gt(o)==="ltr",h=B(e.onKeyDown,p=>{var P;if(!BC.includes(p.key))return;const v=p.target,g=u().filter(j=>{var $;return!(($=j.ref.current)!=null&&$.disabled)}),b=g.findIndex(j=>j.ref.current===v),y=g.length;if(b===-1)return;p.preventDefault();let w=b;const x=0,S=y-1,E=()=>{w=b+1,w>S&&(w=x)},A=()=>{w=b-1,w<x&&(w=S)};switch(p.key){case"Home":w=x;break;case"End":w=S;break;case"ArrowRight":a==="horizontal"&&(m?E():A());break;case"ArrowDown":a==="vertical"&&E();break;case"ArrowLeft":a==="horizontal"&&(m?A():E());break;case"ArrowUp":a==="vertical"&&A();break}const k=w%y;(P=g[k].ref.current)==null||P.focus()});return i.jsx(YC,{scope:n,disabled:r,direction:o,orientation:a,children:i.jsx(Xa.Slot,{scope:n,children:i.jsx(W.div,{...s,"data-orientation":a,ref:c,onKeyDown:r?void 0:h})})})}),eo="AccordionItem",[KC,Qa]=Qr(eo),bu=C.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=Jr(eo,n),s=VC(eo,n),l=Za(n),c=pe(),u=r&&s.value.includes(r)||!1,f=a.disabled||e.disabled;return i.jsx(KC,{scope:n,open:u,disabled:f,triggerId:c,children:i.jsx($C,{"data-orientation":a.orientation,"data-state":Su(u),...l,...o,ref:t,disabled:f,open:u,onOpenChange:m=>{m?s.onItemOpen(r):s.onItemClose(r)}})})});bu.displayName=eo;var wu="AccordionHeader",yu=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Jr(lt,n),a=Qa(wu,n);return i.jsx(W.h3,{"data-orientation":o.orientation,"data-state":Su(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});yu.displayName=wu;var Ja="AccordionTrigger",xu=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Jr(lt,n),a=Qa(Ja,n),s=HC(Ja,n),l=Za(n);return i.jsx(Xa.ItemSlot,{scope:n,children:i.jsx(LC,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...r,ref:t})})});xu.displayName=Ja;var Cu="AccordionContent",Nu=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Jr(lt,n),a=Qa(Cu,n),s=Za(n);return i.jsx(FC,{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}})});Nu.displayName=Cu;function Su(e){return e?"open":"closed"}var qC=pu,XC=bu,ZC=yu,Eu=xu,ku=Nu;const QC=qC,Pu=d.forwardRef(({className:e,...t},n)=>i.jsx(XC,{ref:n,className:D("border-b",e),...t}));Pu.displayName="AccordionItem";const Tu=d.forwardRef(({className:e,children:t,...n},r)=>i.jsx(ZC,{className:"flex",children:i.jsxs(Eu,{ref:r,className:D("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,i.jsx(Jt,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Tu.displayName=Eu.displayName;const Mu=d.forwardRef(({className:e,children:t,...n},r)=>i.jsx(ku,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:i.jsx("div",{className:D("pb-4 pt-0",e),children:t})}));Mu.displayName=ku.displayName;const JC=(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},to=d.forwardRef(({className:e,leftIcon:t,rightIcon:n,mask:r,onChange:o,...a},s)=>{const l=c=>{const u=c.target;if(r){const f=JC(u.value,r);u.value=f}o==null||o(c)};return i.jsxs("div",{className:"relative w-full",children:[t&&i.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:t}),i.jsx(Yn,{className:D(t&&"pl-8",n&&"pr-8",e),ref:s,onInput:l,...a}),n&&i.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:n})]})});to.displayName="AdaptiveInput";var es="Dialog",[ju,Au]=be(es),[e1,Ge]=ju(es),Ru=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,l=d.useRef(null),c=d.useRef(null),[u=!1,f]=xe({prop:r,defaultProp:o,onChange:a});return i.jsx(e1,{scope:t,triggerRef:l,contentRef:c,contentId:pe(),titleId:pe(),descriptionId:pe(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(m=>!m),[f]),modal:s,children:n})};Ru.displayName=es;var Du="DialogTrigger",Iu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(Du,n),a=oe(t,o.triggerRef);return i.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":rs(o.open),...r,ref:a,onClick:B(e.onClick,o.onOpenToggle)})});Iu.displayName=Du;var ts="DialogPortal",[t1,_u]=ju(ts,{forceMount:void 0}),Ou=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Ge(ts,t);return i.jsx(t1,{scope:t,forceMount:n,children:d.Children.map(r,s=>i.jsx(Ce,{present:n||a.open,children:i.jsx(On,{asChild:!0,container:o,children:s})}))})};Ou.displayName=ts;var no="DialogOverlay",$u=d.forwardRef((e,t)=>{const n=_u(no,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ge(no,e.__scopeDialog);return a.modal?i.jsx(Ce,{present:r||a.open,children:i.jsx(r1,{...o,ref:t})}):null});$u.displayName=no;var n1=pt("DialogOverlay.RemoveScroll"),r1=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(no,n);return i.jsx($n,{as:n1,allowPinchZoom:!0,shards:[o.contentRef],children:i.jsx(W.div,{"data-state":rs(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Wt="DialogContent",Lu=d.forwardRef((e,t)=>{const n=_u(Wt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ge(Wt,e.__scopeDialog);return i.jsx(Ce,{present:r||a.open,children:a.modal?i.jsx(o1,{...o,ref:t}):i.jsx(a1,{...o,ref:t})})});Lu.displayName=Wt;var o1=d.forwardRef((e,t)=>{const n=Ge(Wt,e.__scopeDialog),r=d.useRef(null),o=oe(t,n.contentRef,r);return d.useEffect(()=>{const a=r.current;if(a)return Ir(a)},[]),i.jsx(Fu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&a.preventDefault()}),onFocusOutside:B(e.onFocusOutside,a=>a.preventDefault())})}),a1=d.forwardRef((e,t)=>{const n=Ge(Wt,e.__scopeDialog),r=d.useRef(!1),o=d.useRef(!1);return i.jsx(Fu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Fu=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,l=Ge(Wt,n),c=d.useRef(null),u=oe(t,c);return hr(),i.jsxs(i.Fragment,{children:[i.jsx(jn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:i.jsx(Lt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":rs(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(i1,{titleId:l.titleId}),i.jsx(c1,{contentRef:c,descriptionId:l.descriptionId})]})]})}),ns="DialogTitle",Bu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(ns,n);return i.jsx(W.h2,{id:o.titleId,...r,ref:t})});Bu.displayName=ns;var zu="DialogDescription",Wu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(zu,n);return i.jsx(W.p,{id:o.descriptionId,...r,ref:t})});Wu.displayName=zu;var Vu="DialogClose",Hu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(Vu,n);return i.jsx(W.button,{type:"button",...r,ref:t,onClick:B(e.onClick,()=>o.onOpenChange(!1))})});Hu.displayName=Vu;function rs(e){return e?"open":"closed"}var Gu="DialogTitleWarning",[s1,Uu]=aw(Gu,{contentName:Wt,titleName:ns,docsSlug:"dialog"}),i1=({titleId:e})=>{const t=Uu(Gu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
254
254
|
|
|
255
255
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
256
256
|
|
|
257
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},
|
|
257
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},l1="DialogDescriptionWarning",c1=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Uu(l1).contentName}}.`;return d.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},os=Ru,Yu=Iu,as=Ou,ro=$u,oo=Lu,ss=Bu,is=Wu,ao=Hu,Ku="AlertDialog",[d1,jP]=be(Ku,[Au]),ct=Au(),qu=e=>{const{__scopeAlertDialog:t,...n}=e,r=ct(t);return i.jsx(os,{...r,...n,modal:!0})};qu.displayName=Ku;var u1="AlertDialogTrigger",Xu=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ct(n);return i.jsx(Yu,{...o,...r,ref:t})});Xu.displayName=u1;var f1="AlertDialogPortal",Zu=e=>{const{__scopeAlertDialog:t,...n}=e,r=ct(t);return i.jsx(as,{...r,...n})};Zu.displayName=f1;var m1="AlertDialogOverlay",Qu=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ct(n);return i.jsx(ro,{...o,...r,ref:t})});Qu.displayName=m1;var fn="AlertDialogContent",[p1,h1]=d1(fn),g1=Qi("AlertDialogContent"),Ju=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,a=ct(n),s=d.useRef(null),l=oe(t,s),c=d.useRef(null);return i.jsx(s1,{contentName:fn,titleName:ef,docsSlug:"alert-dialog",children:i.jsx(p1,{scope:n,cancelRef:c,children:i.jsxs(oo,{role:"alertdialog",...a,...o,ref:l,onOpenAutoFocus:B(o.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=c.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[i.jsx(g1,{children:r}),i.jsx(b1,{contentRef:s})]})})})});Ju.displayName=fn;var ef="AlertDialogTitle",tf=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ct(n);return i.jsx(ss,{...o,...r,ref:t})});tf.displayName=ef;var nf="AlertDialogDescription",rf=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ct(n);return i.jsx(is,{...o,...r,ref:t})});rf.displayName=nf;var v1="AlertDialogAction",of=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ct(n);return i.jsx(ao,{...o,...r,ref:t})});of.displayName=v1;var af="AlertDialogCancel",sf=d.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=h1(af,n),a=ct(n),s=oe(t,o);return i.jsx(ao,{...a,...r,ref:s})});sf.displayName=af;var b1=({contentRef:e})=>{const t=`\`${fn}\` requires a description for the component to be accessible for screen reader users.
|
|
258
258
|
|
|
259
|
-
You can add a description to the \`${
|
|
259
|
+
You can add a description to the \`${fn}\` by passing a \`${nf}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
260
260
|
|
|
261
|
-
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 \`${
|
|
261
|
+
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 \`${fn}\`. 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.
|
|
262
262
|
|
|
263
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return d.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},h1=Vu,g1=Hu,v1=Gu,tf=Uu,nf=Yu,rf=Qu,of=ef,af=qu,sf=Zu;const b1=h1,w1=g1,lf=v1,rs=d.forwardRef(({className:e,...t},n)=>i.jsx(tf,{className:D("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}));rs.displayName=tf.displayName;const cf=d.forwardRef(({className:e,...t},n)=>i.jsxs(lf,{children:[i.jsx(rs,{}),i.jsx(nf,{ref:n,className:D("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})]}));cf.displayName=nf.displayName;const df=({className:e,...t})=>i.jsx("div",{className:D("flex flex-col space-y-2 text-center sm:text-left",e),...t});df.displayName="AlertDialogHeader";const uf=({className:e,...t})=>i.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});uf.displayName="AlertDialogFooter";const ff=d.forwardRef(({className:e,...t},n)=>i.jsx(af,{ref:n,className:D("text-lg font-semibold",e),...t}));ff.displayName=af.displayName;const mf=d.forwardRef(({className:e,...t},n)=>i.jsx(sf,{ref:n,className:D("text-sm text-muted-foreground",e),...t}));mf.displayName=sf.displayName;const pf=d.forwardRef(({className:e,...t},n)=>i.jsx(rf,{ref:n,className:D(ar(),e),...t}));pf.displayName=rf.displayName;const hf=d.forwardRef(({className:e,...t},n)=>i.jsx(of,{ref:n,className:D(ar({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));hf.displayName=of.displayName;const y1=C.forwardRef(function(t,n){const{options:r,placeholder:o="Type to search...",onSelect:a,defaultSelectedOption:s}=t,[l,c]=C.useState((s==null?void 0:s.label)||""),[u,f]=C.useState([]),[m,g]=C.useState(!1),[p,v]=C.useState(-1),[h,b]=C.useState("down"),[y,w]=C.useState(s||null),x=C.useRef(null),S=C.useRef(null),E=C.useRef(null);C.useImperativeHandle(n,()=>({clearSelection:()=>{w(null),c(""),a(null)}})),C.useEffect(()=>{const T=$=>{x.current&&!x.current.contains($.target)&&g(!1)};return document.addEventListener("click",T),()=>{document.removeEventListener("click",T)}},[]),C.useEffect(()=>{const T=r.filter($=>Vi($.label,l));f(T),v(-1)},[l,r]),C.useEffect(()=>{if(m&&S.current){const T=S.current.getBoundingClientRect(),$=window.innerHeight-T.bottom,Z=T.top,z=Math.min(u.length*40,240);b($>=z||$>Z?"down":"up")}},[m,u]);const A=T=>{var $;c(T.target.value),($=t.onChange)==null||$.call(t,T.target.value),w(null),g(!0)},k=T=>{c(T.label),w(T),g(!1),a(T)},P=T=>{if(!m&&(T.key==="ArrowDown"||T.key==="ArrowUp")){g(!0);return}switch(T.key){case"ArrowDown":v($=>$<u.length-1?$+1:$);break;case"ArrowUp":v($=>$>0?$-1:$);break;case"Enter":p>=0&&p<u.length&&k(u[p]);break;case"Escape":g(!1);break}};return C.useEffect(()=>{m&&E.current&&p>=0&&E.current.children[p].scrollIntoView({block:"nearest"})},[p,m]),i.jsxs("div",{ref:x,className:"relative w-full",children:[i.jsx(Zr,{ref:S,type:"text",value:l,onChange:A,onFocus:()=>g(!0),onKeyDown:P,placeholder:o,className:D("w-full",t.className),"aria-expanded":m,"aria-autocomplete":"list","aria-controls":"autocomplete-list",role:"combobox",leftIcon:i.jsx(Ho,{className:"w-4 h-4"}),rightIcon:y?i.jsx("button",{className:"mt-[5px]",onClick:()=>{w(null),c(""),a(null)},children:i.jsx(mt,{className:"w-5 h-5"})}):null}),m&&u.length>0&&i.jsx("ul",{id:"autocomplete-list",ref:E,className:`absolute z-10 w-full bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-auto ${h==="up"?"bottom-full mb-1":"top-full mt-1"}`,role:"listbox",children:u.map((T,$)=>{const Z=T.label.split(new RegExp(`(${l})`,"gi"));return i.jsx("li",{onClick:()=>k(T),className:`px-4 py-2 cursor-pointer ${$===p?"bg-blue-100":"hover:bg-gray-100"} ${(y==null?void 0:y.value)===T.value?"bg-blue-200":""}`,role:"option","aria-selected":$===p,id:`option-${$}`,children:Z.map((z,ee)=>z.toLowerCase()===l.toLowerCase()?i.jsx("span",{className:"font-bold text-blue-600",children:z},ee):z)},T.value)})})]})});var os="Avatar",[x1,AP]=be(os),[C1,gf]=x1(os),vf=d.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=d.useState("idle");return i.jsx(C1,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:i.jsx(W.span,{...r,ref:t})})});vf.displayName=os;var bf="AvatarImage",wf=d.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=gf(bf,n),l=N1(r,a),c=we(u=>{o(u),s.onImageLoadingStatusChange(u)});return ve(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?i.jsx(W.img,{...a,ref:t,src:r}):null});wf.displayName=bf;var yf="AvatarFallback",xf=d.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=gf(yf,n),[s,l]=d.useState(r===void 0);return d.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(c)}},[r]),s&&a.imageLoadingStatus!=="loaded"?i.jsx(W.span,{...o,ref:t}):null});xf.displayName=yf;function Cf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function N1(e,{referrerPolicy:t,crossOrigin:n}){const r=E1(),o=d.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,l]=d.useState(()=>Cf(a,e));return ve(()=>{l(Cf(a,e))},[a,e]),ve(()=>{const c=m=>()=>{l(m)};if(!a)return;const u=c("loaded"),f=c("error");return a.addEventListener("load",u),a.addEventListener("error",f),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",u),a.removeEventListener("error",f)}},[a,n,t]),s}function S1(){return()=>{}}function E1(){return d.useSyncExternalStore(S1,()=>!0,()=>!1)}var Nf=vf,Sf=wf,Ef=xf;const kf=d.forwardRef(({className:e,...t},n)=>i.jsx(Nf,{ref:n,className:D("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));kf.displayName=Nf.displayName;const Pf=d.forwardRef(({className:e,...t},n)=>i.jsx(Sf,{ref:n,className:D("aspect-square h-full w-full",e),...t}));Pf.displayName=Sf.displayName;const Mf=d.forwardRef(({className:e,...t},n)=>i.jsx(Ef,{ref:n,className:D("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Mf.displayName=Ef.displayName;const k1={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"}},P1=(e,t,n)=>{let r;const o=k1[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},M1={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},T1={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},j1={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},A1={date:Ut({formats:M1,defaultWidth:"full"}),time:Ut({formats:T1,defaultWidth:"full"}),dateTime:Ut({formats:j1,defaultWidth:"full"})},R1={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"},D1=(e,t,n,r)=>{const o=R1[e];return typeof o=="function"?o(t):o},I1={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},_1={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},O1={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"]},$1={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"]},L1={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"}},F1={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"}},B1={ordinalNumber:(e,t)=>{const n=Number(e);return(t==null?void 0:t.unit)==="week"?n+"ª":n+"º"},era:Xe({values:I1,defaultWidth:"wide"}),quarter:Xe({values:_1,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Xe({values:O1,defaultWidth:"wide"}),day:Xe({values:$1,defaultWidth:"wide"}),dayPeriod:Xe({values:L1,defaultWidth:"wide",formattingValues:F1,defaultFormattingWidth:"wide"})},z1=/^(\d+)[ºªo]?/i,W1=/\d+/i,V1={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},H1={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},G1={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},U1={any:[/1/i,/2/i,/3/i,/4/i]},Y1={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},K1={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]},q1={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},X1={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]},Z1={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},Q1={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}},J1={ordinalNumber:bi({matchPattern:z1,parsePattern:W1,valueCallback:e=>parseInt(e,10)}),era:Ze({matchPatterns:V1,defaultMatchWidth:"wide",parsePatterns:H1,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:G1,defaultMatchWidth:"wide",parsePatterns:U1,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ze({matchPatterns:Y1,defaultMatchWidth:"wide",parsePatterns:K1,defaultParseWidth:"any"}),day:Ze({matchPatterns:q1,defaultMatchWidth:"wide",parsePatterns:X1,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:Z1,defaultMatchWidth:"any",parsePatterns:Q1,defaultParseWidth:"any"})},eN={code:"pt-BR",formatDistance:P1,formatLong:A1,formatRelative:D1,localize:B1,match:J1,options:{weekStartsOn:0,firstWeekContainsDate:1}},tN=({selectedDate:e,onChange:t,language:n="enUS"})=>{const[r,o]=C.useState(e||new Date),s={ptBR:eN,enUS:Ro}[n],l=()=>{o(p=>Pv(p))},c=()=>{o(p=>ji(p,1))},u=p=>{t&&t(p)},f=Array.from({length:kv(r)}).map((p,v)=>new Date(r.getFullYear(),r.getMonth(),v+1)),m=Ev(r).getDay(),g=Array.from({length:7}).map((p,v)=>Do(new Date(2021,0,v+3),"EEEEEE",{locale:s}));return i.jsxs("div",{className:"max-w-sm mx-auto p-4 border rounded shadow",role:"application","aria-label":"Calendar",children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("button",{className:"px-2 py-1 bg-gray-200 rounded hover:bg-gray-300",onClick:l,"aria-label":"Previous Month",children:i.jsx(cr,{})}),i.jsx("h2",{className:"text-lg font-bold","aria-live":"polite",children:Do(r,"MMMM yyyy",{locale:s})}),i.jsx("button",{className:"px-2 py-1 bg-gray-200 rounded hover:bg-gray-300",onClick:c,"aria-label":"Next Month",children:i.jsx(Pn,{})})]}),i.jsxs("div",{className:"grid grid-cols-7 gap-2",children:[g.map((p,v)=>i.jsx("div",{className:"text-center font-medium","aria-hidden":"true",children:p},v)),Array.from({length:m}).map((p,v)=>i.jsx("div",{className:"","aria-hidden":"true"},`empty-${v}`)),f.map(p=>i.jsx("button",{className:`p-2 rounded hover:bg-blue-100 ${e&&p.toDateString()===e.toDateString()&&"bg-blue-200"}`,onClick:()=>u(p),"aria-label":Do(p,"MMMM do yyyy",{locale:s}),"aria-pressed":e&&p.toDateString()===e.toDateString()?"true":"false",children:p.getDate()},p.toISOString()))]})]})},Tf=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:D("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Tf.displayName="Card";const jf=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:D("flex flex-col space-y-1.5 p-6",e),...t}));jf.displayName="CardHeader";const Af=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:D("font-semibold leading-none tracking-tight pb-4",e),...t}));Af.displayName="CardTitle";const Rf=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:D("text-sm text-muted-foreground",e),...t}));Rf.displayName="CardDescription";const Df=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:D("p-6 py-0",e),...t}));Df.displayName="CardContent";const If=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:D("flex items-center p-6 pt-6",e),...t}));If.displayName="CardFooter";var _f=1,nN=.9,rN=.8,oN=.17,as=.1,ss=.999,aN=.9999,sN=.99,iN=/[\\\/_+.#"@\[\(\{&]/,lN=/[\\\/_+.#"@\[\(\{&]/g,cN=/[\s-]/,Of=/[\s-]/g;function is(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?_f:sN;var l=`${o},${a}`;if(s[l]!==void 0)return s[l];for(var c=r.charAt(a),u=n.indexOf(c,o),f=0,m,g,p,v;u>=0;)m=is(e,t,n,r,u+1,a+1,s),m>f&&(u===o?m*=_f:iN.test(e.charAt(u-1))?(m*=rN,p=e.slice(o,u-1).match(lN),p&&o>0&&(m*=Math.pow(ss,p.length))):cN.test(e.charAt(u-1))?(m*=nN,v=e.slice(o,u-1).match(Of),v&&o>0&&(m*=Math.pow(ss,v.length))):(m*=oN,o>0&&(m*=Math.pow(ss,u-o))),e.charAt(u)!==t.charAt(a)&&(m*=aN)),(m<as&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(g=is(e,t,n,r,u+1,a+2,s),g*as>m&&(m=g*as)),m>f&&(f=m),u=n.indexOf(c,u+1);return s[l]=f,f}function $f(e){return e.toLowerCase().replace(Of," ")}function dN(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,is(e,t,$f(e),$f(t),0,0,{})}var Un='[cmdk-group=""]',ls='[cmdk-group-items=""]',uN='[cmdk-group-heading=""]',Lf='[cmdk-item=""]',Ff=`${Lf}:not([aria-disabled="true"])`,cs="cmdk-item-select",dn="data-value",fN=(e,t,n)=>dN(e,t,n),Bf=d.createContext(void 0),Yn=()=>d.useContext(Bf),zf=d.createContext(void 0),ds=()=>d.useContext(zf),Wf=d.createContext(void 0),Vf=d.forwardRef((e,t)=>{let n=un(()=>{var M,I;return{search:"",value:(I=(M=e.value)!=null?M:e.defaultValue)!=null?I:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=un(()=>new Set),o=un(()=>new Map),a=un(()=>new Map),s=un(()=>new Set),l=Hf(e),{label:c,children:u,value:f,onValueChange:m,filter:g,shouldFilter:p,loop:v,disablePointerSelection:h=!1,vimBindings:b=!0,...y}=e,w=pe(),x=pe(),S=pe(),E=d.useRef(null),A=NN();Bt(()=>{if(f!==void 0){let M=f.trim();n.current.value=M,k.emit()}},[f]),Bt(()=>{A(6,ee)},[]);let k=d.useMemo(()=>({subscribe:M=>(s.current.add(M),()=>s.current.delete(M)),snapshot:()=>n.current,setState:(M,I,L)=>{var F,J,R,U;if(!Object.is(n.current[M],I)){if(n.current[M]=I,M==="search")z(),$(),A(1,Z);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(S);K?K.focus():(F=document.getElementById(w))==null||F.focus()}if(A(7,()=>{var K;n.current.selectedItemId=(K=Y())==null?void 0:K.id,k.emit()}),L||A(5,ee),((J=l.current)==null?void 0:J.value)!==void 0){let K=I??"";(U=(R=l.current).onValueChange)==null||U.call(R,K);return}}k.emit()}},emit:()=>{s.current.forEach(M=>M())}}),[]),P=d.useMemo(()=>({value:(M,I,L)=>{var F;I!==((F=a.current.get(M))==null?void 0:F.value)&&(a.current.set(M,{value:I,keywords:L}),n.current.filtered.items.set(M,T(I,L)),A(2,()=>{$(),k.emit()}))},item:(M,I)=>(r.current.add(M),I&&(o.current.has(I)?o.current.get(I).add(M):o.current.set(I,new Set([M]))),A(3,()=>{z(),$(),n.current.value||Z(),k.emit()}),()=>{a.current.delete(M),r.current.delete(M),n.current.filtered.items.delete(M);let L=Y();A(4,()=>{z(),(L==null?void 0:L.getAttribute("id"))===M&&Z(),k.emit()})}),group:M=>(o.current.has(M)||o.current.set(M,new Set),()=>{a.current.delete(M),o.current.delete(M)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:w,inputId:S,labelId:x,listInnerRef:E}),[]);function T(M,I){var L,F;let J=(F=(L=l.current)==null?void 0:L.filter)!=null?F:fN;return M?J(M,n.current.search,I):0}function $(){if(!n.current.search||l.current.shouldFilter===!1)return;let M=n.current.filtered.items,I=[];n.current.filtered.groups.forEach(F=>{let J=o.current.get(F),R=0;J.forEach(U=>{let K=M.get(U);R=Math.max(K,R)}),I.push([F,R])});let L=E.current;te().sort((F,J)=>{var R,U;let K=F.getAttribute("id"),ne=J.getAttribute("id");return((R=M.get(ne))!=null?R:0)-((U=M.get(K))!=null?U:0)}).forEach(F=>{let J=F.closest(ls);J?J.appendChild(F.parentElement===J?F:F.closest(`${ls} > *`)):L.appendChild(F.parentElement===L?F:F.closest(`${ls} > *`))}),I.sort((F,J)=>J[1]-F[1]).forEach(F=>{var J;let R=(J=E.current)==null?void 0:J.querySelector(`${Un}[${dn}="${encodeURIComponent(F[0])}"]`);R==null||R.parentElement.appendChild(R)})}function Z(){let M=te().find(L=>L.getAttribute("aria-disabled")!=="true"),I=M==null?void 0:M.getAttribute(dn);k.setState("value",I||void 0)}function z(){var M,I,L,F;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let J=0;for(let R of r.current){let U=(I=(M=a.current.get(R))==null?void 0:M.value)!=null?I:"",K=(F=(L=a.current.get(R))==null?void 0:L.keywords)!=null?F:[],ne=T(U,K);n.current.filtered.items.set(R,ne),ne>0&&J++}for(let[R,U]of o.current)for(let K of U)if(n.current.filtered.items.get(K)>0){n.current.filtered.groups.add(R);break}n.current.filtered.count=J}function ee(){var M,I,L;let F=Y();F&&(((M=F.parentElement)==null?void 0:M.firstChild)===F&&((L=(I=F.closest(Un))==null?void 0:I.querySelector(uN))==null||L.scrollIntoView({block:"nearest"})),F.scrollIntoView({block:"nearest"}))}function Y(){var M;return(M=E.current)==null?void 0:M.querySelector(`${Lf}[aria-selected="true"]`)}function te(){var M;return Array.from(((M=E.current)==null?void 0:M.querySelectorAll(Ff))||[])}function V(M){let I=te()[M];I&&k.setState("value",I.getAttribute(dn))}function Q(M){var I;let L=Y(),F=te(),J=F.findIndex(U=>U===L),R=F[J+M];(I=l.current)!=null&&I.loop&&(R=J+M<0?F[F.length-1]:J+M===F.length?F[0]:F[J+M]),R&&k.setState("value",R.getAttribute(dn))}function O(M){let I=Y(),L=I==null?void 0:I.closest(Un),F;for(;L&&!F;)L=M>0?xN(L,Un):CN(L,Un),F=L==null?void 0:L.querySelector(Ff);F?k.setState("value",F.getAttribute(dn)):Q(M)}let _=()=>V(te().length-1),j=M=>{M.preventDefault(),M.metaKey?_():M.altKey?O(1):Q(1)},H=M=>{M.preventDefault(),M.metaKey?V(0):M.altKey?O(-1):Q(-1)};return d.createElement(W.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:M=>{var I;(I=y.onKeyDown)==null||I.call(y,M);let L=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||L))switch(M.key){case"n":case"j":{b&&M.ctrlKey&&j(M);break}case"ArrowDown":{j(M);break}case"p":case"k":{b&&M.ctrlKey&&H(M);break}case"ArrowUp":{H(M);break}case"Home":{M.preventDefault(),V(0);break}case"End":{M.preventDefault(),_();break}case"Enter":{M.preventDefault();let F=Y();if(F){let J=new Event(cs);F.dispatchEvent(J)}}}}},d.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:EN},c),no(e,M=>d.createElement(zf.Provider,{value:k},d.createElement(Bf.Provider,{value:P},M))))}),mN=d.forwardRef((e,t)=>{var n,r;let o=pe(),a=d.useRef(null),s=d.useContext(Wf),l=Yn(),c=Hf(e),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;Bt(()=>{if(!u)return l.item(o,s==null?void 0:s.id)},[u]);let f=Gf(o,a,[e.value,e.children,a],e.keywords),m=ds(),g=kt(A=>A.value&&A.value===f.current),p=kt(A=>u||l.filter()===!1?!0:A.search?A.filtered.items.get(o)>0:!0);d.useEffect(()=>{let A=a.current;if(!(!A||e.disabled))return A.addEventListener(cs,v),()=>A.removeEventListener(cs,v)},[p,e.onSelect,e.disabled]);function v(){var A,k;h(),(k=(A=c.current).onSelect)==null||k.call(A,f.current)}function h(){m.setState("value",f.current,!0)}if(!p)return null;let{disabled:b,value:y,onSelect:w,forceMount:x,keywords:S,...E}=e;return d.createElement(W.div,{ref:Qe(a,t),...E,id:o,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!g,"data-disabled":!!b,"data-selected":!!g,onPointerMove:b||l.getDisablePointerSelection()?void 0:h,onClick:b?void 0:v},e.children)}),pN=d.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=pe(),l=d.useRef(null),c=d.useRef(null),u=pe(),f=Yn(),m=kt(p=>o||f.filter()===!1?!0:p.search?p.filtered.groups.has(s):!0);Bt(()=>f.group(s),[]),Gf(s,l,[e.value,e.heading,c]);let g=d.useMemo(()=>({id:s,forceMount:o}),[o]);return d.createElement(W.div,{ref:Qe(l,t),...a,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&d.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),no(e,p=>d.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},d.createElement(Wf.Provider,{value:g},p))))}),hN=d.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=d.useRef(null),a=kt(s=>!s.search);return!n&&!a?null:d.createElement(W.div,{ref:Qe(o,t),...r,"cmdk-separator":"",role:"separator"})}),gN=d.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=ds(),s=kt(u=>u.search),l=kt(u=>u.selectedItemId),c=Yn();return d.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),d.createElement(W.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:o?e.value:s,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),vN=d.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=d.useRef(null),s=d.useRef(null),l=kt(u=>u.selectedItemId),c=Yn();return d.useEffect(()=>{if(s.current&&a.current){let u=s.current,f=a.current,m,g=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let p=u.offsetHeight;f.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return g.observe(u),()=>{cancelAnimationFrame(m),g.unobserve(u)}}},[]),d.createElement(W.div,{ref:Qe(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:c.listId},no(e,u=>d.createElement("div",{ref:Qe(s,c.listInnerRef),"cmdk-list-sizer":""},u)))}),bN=d.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...l}=e;return d.createElement(Ja,{open:n,onOpenChange:r},d.createElement(es,{container:s},d.createElement(Jr,{"cmdk-overlay":"",className:o}),d.createElement(eo,{"aria-label":e.label,"cmdk-dialog":"",className:a},d.createElement(Vf,{ref:t,...l}))))}),wN=d.forwardRef((e,t)=>kt(n=>n.filtered.count===0)?d.createElement(W.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),yN=d.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return d.createElement(W.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},no(e,s=>d.createElement("div",{"aria-hidden":!0},s)))}),je=Object.assign(Vf,{List:vN,Item:mN,Input:gN,Group:pN,Separator:hN,Dialog:bN,Empty:wN,Loading:yN});function xN(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function CN(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Hf(e){let t=d.useRef(e);return Bt(()=>{t.current=e}),t}var Bt=typeof window>"u"?d.useEffect:d.useLayoutEffect;function un(e){let t=d.useRef();return t.current===void 0&&(t.current=e()),t}function kt(e){let t=ds(),n=()=>e(t.snapshot());return d.useSyncExternalStore(t.subscribe,n,n)}function Gf(e,t,n,r=[]){let o=d.useRef(),a=Yn();return Bt(()=>{var s;let l=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),c=r.map(u=>u.trim());a.value(e,l,c),(s=t.current)==null||s.setAttribute(dn,l),o.current=l}),o}var NN=()=>{let[e,t]=d.useState(),n=un(()=>new Map);return Bt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function SN(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function no({asChild:e,children:t},n){return e&&d.isValidElement(t)?d.cloneElement(SN(t),{ref:t.ref},n(t.props.children)):n(t)}var EN={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const ro=Ja,Uf=zu,Yf=es,kN=to,us=d.forwardRef(({className:e,...t},n)=>i.jsx(Jr,{ref:n,className:D("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}));us.displayName=Jr.displayName;const Kn=d.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Yf,{children:[i.jsx(us,{}),i.jsxs(eo,{ref:r,className:D("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,i.jsxs(to,{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:[i.jsx(mt,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Kn.displayName=eo.displayName;const oo=({className:e,...t})=>i.jsx("div",{className:D("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});oo.displayName="DialogHeader";const Kf=({className:e,...t})=>i.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Kf.displayName="DialogFooter";const ao=d.forwardRef(({className:e,...t},n)=>i.jsx(ts,{ref:n,className:D("text-lg font-semibold leading-none tracking-tight",e),...t}));ao.displayName=ts.displayName;const so=d.forwardRef(({className:e,...t},n)=>i.jsx(ns,{ref:n,className:D("text-sm text-muted-foreground",e),...t}));so.displayName=ns.displayName;const io=d.forwardRef(({className:e,...t},n)=>i.jsx(je,{ref:n,className:D("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));io.displayName=je.displayName;const PN=({children:e,...t})=>i.jsx(ro,{...t,children:i.jsx(Kn,{className:"overflow-hidden p-0 shadow-lg",children:i.jsx(io,{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})})}),fs=d.forwardRef(({className:e,...t},n)=>i.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[i.jsx(Ho,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),i.jsx(je.Input,{ref:n,className:D("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})]}));fs.displayName=je.Input.displayName;const ms=d.forwardRef(({className:e,...t},n)=>i.jsx(je.List,{ref:n,className:D("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));ms.displayName=je.List.displayName;const ps=d.forwardRef((e,t)=>i.jsx(je.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ps.displayName=je.Empty.displayName;const lo=d.forwardRef(({className:e,...t},n)=>i.jsx(je.Group,{ref:n,className:D("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}));lo.displayName=je.Group.displayName;const hs=d.forwardRef(({className:e,...t},n)=>i.jsx(je.Separator,{ref:n,className:D("-mx-1 h-px bg-border",e),...t}));hs.displayName=je.Separator.displayName;const fn=d.forwardRef(({className:e,...t},n)=>i.jsx(je.Item,{ref:n,className:D("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}));fn.displayName=je.Item.displayName;const qf=({className:e,...t})=>i.jsx("span",{className:D("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});qf.displayName="CommandShortcut";const Xf=C.forwardRef((e,t)=>{const{currencySymbol:n="$",decimalSeparator:r=".",thousandSeparator:o=",",onValueChange:a,className:s,value:l=0,...c}=e,u=C.useRef(null);C.useImperativeHandle(t,()=>u.current);const[f,m]=C.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]}`},p=h=>{const b=h.target.value,y=parseFloat(b.replace(/\D/g,""))/100;m(g(y)),a(y),u.current&&window.requestAnimationFrame(()=>{var w;(w=u.current)==null||w.setSelectionRange(u.current.value.length,u.current.value.length)})},v=()=>{u.current&&u.current.setSelectionRange(u.current.value.length,u.current.value.length)};return C.useEffect(()=>{m(g(+l))},[l]),i.jsx(Zr,{type:"text",inputMode:"numeric",value:f,ref:u,onChange:p,onFocus:v,onClick:v,placeholder:`${n} 0${r}00`,className:s,...c})});Xf.displayName="CurrencyInput";var MN="Label",Zf=d.forwardRef((e,t)=>i.jsx(W.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())}}));Zf.displayName=MN;var Qf=Zf;const TN=It("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Jf=d.forwardRef(({className:e,...t},n)=>i.jsx(Qf,{ref:n,className:D(TN(),e),...t}));Jf.displayName=Qf.displayName;var gs="Popover",[em,DP]=be(gs,[wt]),qn=wt(),[jN,Pt]=em(gs),tm=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,l=qn(t),c=d.useRef(null),[u,f]=d.useState(!1),[m=!1,g]=ye({prop:r,defaultProp:o,onChange:a});return i.jsx(Rn,{...l,children:i.jsx(jN,{scope:t,contentId:pe(),triggerRef:c,open:m,onOpenChange:g,onOpenToggle:d.useCallback(()=>g(p=>!p),[g]),hasCustomAnchor:u,onCustomAnchorAdd:d.useCallback(()=>f(!0),[]),onCustomAnchorRemove:d.useCallback(()=>f(!1),[]),modal:s,children:n})})};tm.displayName=gs;var nm="PopoverAnchor",rm=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Pt(nm,n),a=qn(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=o;return d.useEffect(()=>(s(),()=>l()),[s,l]),i.jsx(Dn,{...a,...r,ref:t})});rm.displayName=nm;var om="PopoverTrigger",am=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Pt(om,n),a=qn(n),s=oe(t,o.triggerRef),l=i.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":dm(o.open),...r,ref:s,onClick:B(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:i.jsx(Dn,{asChild:!0,...a,children:l})});am.displayName=om;var vs="PopoverPortal",[AN,RN]=em(vs,{forceMount:void 0}),sm=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Pt(vs,t);return i.jsx(AN,{scope:t,forceMount:n,children:i.jsx(xe,{present:n||a.open,children:i.jsx(In,{asChild:!0,container:o,children:r})})})};sm.displayName=vs;var mn="PopoverContent",im=d.forwardRef((e,t)=>{const n=RN(mn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Pt(mn,e.__scopePopover);return i.jsx(xe,{present:r||a.open,children:a.modal?i.jsx(IN,{...o,ref:t}):i.jsx(_N,{...o,ref:t})})});im.displayName=mn;var DN=ft("PopoverContent.RemoveScroll"),IN=d.forwardRef((e,t)=>{const n=Pt(mn,e.__scopePopover),r=d.useRef(null),o=oe(t,r),a=d.useRef(!1);return d.useEffect(()=>{const s=r.current;if(s)return jr(s)},[]),i.jsx(_n,{as:DN,allowPinchZoom:!0,children:i.jsx(lm,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),a.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:B(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),_N=d.forwardRef((e,t)=>{const n=Pt(mn,e.__scopePopover),r=d.useRef(!1),o=d.useRef(!1);return i.jsx(lm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),lm=d.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...m}=e,g=Pt(mn,n),p=qn(n);return ur(),i.jsx(Mn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:i.jsx(_t,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>g.onOpenChange(!1),children:i.jsx(Cr,{"data-state":dm(g.open),role:"dialog",id:g.contentId,...p,...m,ref:t,style:{...m.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)"}})})})}),cm="PopoverClose",ON=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Pt(cm,n);return i.jsx(W.button,{type:"button",...r,ref:t,onClick:B(e.onClick,()=>o.onOpenChange(!1))})});ON.displayName=cm;var $N="PopoverArrow",LN=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=qn(n);return i.jsx(Nr,{...o,...r,ref:t})});LN.displayName=$N;function dm(e){return e?"open":"closed"}var FN=tm,BN=rm,zN=am,WN=sm,um=im;const fm=FN,mm=zN,VN=BN,bs=d.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>i.jsx(WN,{children:i.jsx(um,{ref:o,align:t,sideOffset:n,className:D("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})}));bs.displayName=um.displayName;var HN="Separator",pm="horizontal",GN=["horizontal","vertical"],hm=d.forwardRef((e,t)=>{const{decorative:n,orientation:r=pm,...o}=e,a=UN(r)?r:pm,l=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return i.jsx(W.div,{"data-orientation":a,...l,...o,ref:t})});hm.displayName=HN;function UN(e){return GN.includes(e)}var gm=hm;const co=d.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>i.jsx(gm,{ref:o,decorative:n,orientation:t,className:D("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));co.displayName=gm.displayName;const vm=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"}}),bm=d.forwardRef(({options:e,onValueChange:t,variant:n,defaultValue:r=[],placeholder:o="Select options",maxCount:a=3,modalPopover:s=!1,asChild:l=!1,className:c,...u},f)=>{const[m,g]=d.useState(r),[p,v]=d.useState(!1),[h,b]=d.useState(!1),y=k=>{if(k.key==="Enter")v(!0);else if(k.key==="Backspace"&&!k.currentTarget.value){const P=[...m];P.pop(),g(P),t(P)}},w=k=>{const P=m.includes(k)?m.filter(T=>T!==k):[...m,k];g(P),t(P)},x=()=>{g([]),t([])},S=()=>{v(k=>!k)},E=()=>{const k=m.slice(0,a);g(k),t(k)},A=()=>{if(m.length===e.length)x();else{const k=e.map(P=>P.value);g(k),t(k)}};return i.jsxs(fm,{open:p,onOpenChange:v,modal:s,children:[i.jsx(mm,{asChild:!0,children:i.jsx(fe,{ref:f,...u,onClick:S,className:D("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",c),children:m.length>0?i.jsxs("div",{className:"flex justify-between items-center w-full",children:[i.jsxs("div",{className:"flex flex-wrap items-center",children:[m.slice(0,a).map(k=>{const P=e.find(T=>T.value===k);return i.jsxs(Zt,{className:D(vm({variant:n})),children:[P==null?void 0:P.label,i.jsx(Vo,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:T=>{T.stopPropagation(),w(k)}})]},k)}),m.length>a&&i.jsxs(Zt,{className:D("bg-transparent text-foreground border-foreground/1 hover:bg-transparent",vm({variant:n})),children:[`+ ${m.length-a} more`,i.jsx(Vo,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:k=>{k.stopPropagation(),E()}})]})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(mt,{className:"h-4 mx-2 cursor-pointer text-muted-foreground",onClick:k=>{k.stopPropagation(),x()}}),i.jsx(co,{orientation:"vertical",className:"flex min-h-6 h-full"}),i.jsx(Xt,{className:"h-4 mx-2 cursor-pointer text-muted-foreground"})]})]}):i.jsxs("div",{className:"flex items-center justify-between w-full mx-auto",children:[i.jsx("span",{className:"text-sm text-muted-foreground mx-3",children:o}),i.jsx(Xt,{className:"h-4 cursor-pointer text-muted-foreground mx-2"})]})})}),i.jsx(bs,{className:"w-auto p-0",align:"start",onEscapeKeyDown:()=>v(!1),children:i.jsxs(io,{children:[i.jsx(fs,{placeholder:"Search...",onKeyDown:y}),i.jsxs(ms,{children:[i.jsx(ps,{children:"No results found."}),i.jsxs(lo,{children:[i.jsxs(fn,{onSelect:A,className:"cursor-pointer",children:[i.jsx("div",{className:D("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",m.length===e.length?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:i.jsx(kn,{className:"h-4 w-4"})}),i.jsx("span",{children:"(Select All)"})]},"all"),e.map(k=>{const P=m.includes(k.value);return i.jsxs(fn,{onSelect:()=>w(k.value),className:"cursor-pointer",children:[i.jsx("div",{className:D("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",P?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:i.jsx(kn,{className:"h-4 w-4"})}),i.jsx("span",{children:k.label})]},k.value)})]}),i.jsx(hs,{}),i.jsx(lo,{children:i.jsxs("div",{className:"flex items-center justify-between",children:[m.length>0&&i.jsxs(i.Fragment,{children:[i.jsx(fn,{onSelect:x,className:"flex-1 justify-center cursor-pointer",children:"Clear"}),i.jsx(co,{orientation:"vertical",className:"flex min-h-6 h-full"})]}),i.jsx(fn,{onSelect:()=>v(!1),className:"flex-1 justify-center cursor-pointer max-w-full",children:"Close"})]})})]})]})})]})});bm.displayName="MultiSelect";var pn="NavigationMenu",[ws,wm,YN]=Qt(pn),[ys,KN,qN]=Qt(pn),[xs,IP]=be(pn,[YN,qN]),[XN,$e]=xs(pn),[ZN,QN]=xs(pn),ym=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:s=200,skipDelayDuration:l=300,orientation:c="horizontal",dir:u,...f}=e,[m,g]=d.useState(null),p=oe(t,T=>g(T)),v=pt(u),h=d.useRef(0),b=d.useRef(0),y=d.useRef(0),[w,x]=d.useState(!0),[S="",E]=ye({prop:r,onChange:T=>{const $=T!=="",Z=l>0;$?(window.clearTimeout(y.current),Z&&x(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>x(!0),l)),o==null||o(T)},defaultProp:a}),A=d.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>E(""),150)},[E]),k=d.useCallback(T=>{window.clearTimeout(b.current),E(T)},[E]),P=d.useCallback(T=>{S===T?window.clearTimeout(b.current):h.current=window.setTimeout(()=>{window.clearTimeout(b.current),E(T)},s)},[S,E,s]);return d.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(b.current),window.clearTimeout(y.current)},[]),i.jsx(Cm,{scope:n,isRootMenu:!0,value:S,dir:v,orientation:c,rootNavigationMenu:m,onTriggerEnter:T=>{window.clearTimeout(h.current),w?P(T):k(T)},onTriggerLeave:()=>{window.clearTimeout(h.current),A()},onContentEnter:()=>window.clearTimeout(b.current),onContentLeave:A,onItemSelect:T=>{E($=>$===T?"":T)},onItemDismiss:()=>E(""),children:i.jsx(W.nav,{"aria-label":"Main","data-orientation":c,dir:v,...f,ref:p})})});ym.displayName=pn;var xm="NavigationMenuSub",JN=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",...l}=e,c=$e(xm,n),[u="",f]=ye({prop:r,onChange:o,defaultProp:a});return i.jsx(Cm,{scope:n,isRootMenu:!1,value:u,dir:c.dir,orientation:s,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:m=>f(m),onItemSelect:m=>f(m),onItemDismiss:()=>f(""),children:i.jsx(W.div,{"data-orientation":s,...l,ref:t})})});JN.displayName=xm;var Cm=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:s,value:l,onItemSelect:c,onItemDismiss:u,onTriggerEnter:f,onTriggerLeave:m,onContentEnter:g,onContentLeave:p}=e,[v,h]=d.useState(null),[b,y]=d.useState(new Map),[w,x]=d.useState(null);return i.jsx(XN,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:l,previousValue:Wn(l),baseId:pe(),dir:o,orientation:a,viewport:v,onViewportChange:h,indicatorTrack:w,onIndicatorTrackChange:x,onTriggerEnter:we(f),onTriggerLeave:we(m),onContentEnter:we(g),onContentLeave:we(p),onItemSelect:we(c),onItemDismiss:we(u),onViewportContentChange:d.useCallback((S,E)=>{y(A=>(A.set(S,E),new Map(A)))},[]),onViewportContentRemove:d.useCallback(S=>{y(E=>E.has(S)?(E.delete(S),new Map(E)):E)},[]),children:i.jsx(ws.Provider,{scope:t,children:i.jsx(ZN,{scope:t,items:b,children:s})})})},Nm="NavigationMenuList",Sm=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=$e(Nm,n),a=i.jsx(W.ul,{"data-orientation":o.orientation,...r,ref:t});return i.jsx(W.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:i.jsx(ws.Slot,{scope:n,children:o.isRootMenu?i.jsx(_m,{asChild:!0,children:a}):a})})});Sm.displayName=Nm;var Em="NavigationMenuItem",[eS,km]=xs(Em),Pm=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=pe(),s=r||a||"LEGACY_REACT_AUTO_VALUE",l=d.useRef(null),c=d.useRef(null),u=d.useRef(null),f=d.useRef(()=>{}),m=d.useRef(!1),g=d.useCallback((v="start")=>{if(l.current){f.current();const h=Es(l.current);h.length&&ks(v==="start"?h:h.reverse())}},[]),p=d.useCallback(()=>{if(l.current){const v=Es(l.current);v.length&&(f.current=iS(v))}},[]);return i.jsx(eS,{scope:n,value:s,triggerRef:c,contentRef:l,focusProxyRef:u,wasEscapeCloseRef:m,onEntryKeyDown:g,onFocusProxyEnter:g,onRootContentClose:p,onContentFocusOutside:p,children:i.jsx(W.li,{...o,ref:t})})});Pm.displayName=Em;var Cs="NavigationMenuTrigger",Mm=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=$e(Cs,e.__scopeNavigationMenu),s=km(Cs,e.__scopeNavigationMenu),l=d.useRef(null),c=oe(l,s.triggerRef,t),u=Lm(a.baseId,s.value),f=Fm(a.baseId,s.value),m=d.useRef(!1),g=d.useRef(!1),p=s.value===a.value;return i.jsxs(i.Fragment,{children:[i.jsx(ws.ItemSlot,{scope:n,value:s.value,children:i.jsx($m,{asChild:!0,children:i.jsx(W.button,{id:u,disabled:r,"data-disabled":r?"":void 0,"data-state":Ms(p),"aria-expanded":p,"aria-controls":f,...o,ref:c,onPointerEnter:B(e.onPointerEnter,()=>{g.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:B(e.onPointerMove,fo(()=>{r||g.current||s.wasEscapeCloseRef.current||m.current||(a.onTriggerEnter(s.value),m.current=!0)})),onPointerLeave:B(e.onPointerLeave,fo(()=>{r||(a.onTriggerLeave(),m.current=!1)})),onClick:B(e.onClick,()=>{a.onItemSelect(s.value),g.current=p}),onKeyDown:B(e.onKeyDown,v=>{const b={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];p&&v.key===b&&(s.onEntryKeyDown(),v.preventDefault())})})})}),p&&i.jsxs(i.Fragment,{children:[i.jsx(md,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:v=>{const h=s.contentRef.current,b=v.relatedTarget,y=b===l.current,w=h==null?void 0:h.contains(b);(y||!w)&&s.onFocusProxyEnter(y?"start":"end")}}),a.viewport&&i.jsx("span",{"aria-owns":f})]})]})});Mm.displayName=Cs;var tS="NavigationMenuLink",Tm="navigationMenu.linkSelect",jm=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return i.jsx($m,{asChild:!0,children:i.jsx(W.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...a,ref:t,onClick:B(e.onClick,s=>{const l=s.target,c=new CustomEvent(Tm,{bubbles:!0,cancelable:!0});if(l.addEventListener(Tm,u=>o==null?void 0:o(u),{once:!0}),dr(l,c),!c.defaultPrevented&&!s.metaKey){const u=new CustomEvent(uo,{bubbles:!0,cancelable:!0});dr(l,u)}},{checkForDefaultPrevented:!1})})})});jm.displayName=tS;var Ns="NavigationMenuIndicator",Am=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=$e(Ns,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?Qn.createPortal(i.jsx(xe,{present:n||a,children:i.jsx(nS,{...r,ref:t})}),o.indicatorTrack):null});Am.displayName=Ns;var nS=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=$e(Ns,n),a=wm(n),[s,l]=d.useState(null),[c,u]=d.useState(null),f=o.orientation==="horizontal",m=!!o.value;d.useEffect(()=>{var h;const v=(h=a().find(b=>b.value===o.value))==null?void 0:h.ref.current;v&&l(v)},[a,o.value]);const g=()=>{s&&u({size:f?s.offsetWidth:s.offsetHeight,offset:f?s.offsetLeft:s.offsetTop})};return Ps(s,g),Ps(o.indicatorTrack,g),c?i.jsx(W.div,{"aria-hidden":!0,"data-state":m?"visible":"hidden","data-orientation":o.orientation,...r,ref:t,style:{position:"absolute",...f?{left:0,width:c.size+"px",transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+"px",transform:`translateY(${c.offset}px)`},...r.style}}):null}),hn="NavigationMenuContent",Rm=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=$e(hn,e.__scopeNavigationMenu),a=km(hn,e.__scopeNavigationMenu),s=oe(a.contentRef,t),l=a.value===o.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?i.jsx(rS,{forceMount:n,...c,ref:s}):i.jsx(xe,{present:n||l,children:i.jsx(Dm,{"data-state":Ms(l),...c,ref:s,onPointerEnter:B(e.onPointerEnter,o.onContentEnter),onPointerLeave:B(e.onPointerLeave,fo(o.onContentLeave)),style:{pointerEvents:!l&&o.isRootMenu?"none":void 0,...c.style}})})});Rm.displayName=hn;var rS=d.forwardRef((e,t)=>{const n=$e(hn,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return ve(()=>{r(e.value,{ref:t,...e})},[e,t,r]),ve(()=>()=>o(e.value),[e.value,o]),null}),uo="navigationMenu.rootContentDismiss",Dm=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:s,onRootContentClose:l,onContentFocusOutside:c,...u}=e,f=$e(hn,n),m=d.useRef(null),g=oe(m,t),p=Lm(f.baseId,r),v=Fm(f.baseId,r),h=wm(n),b=d.useRef(null),{onItemDismiss:y}=f;d.useEffect(()=>{const x=m.current;if(f.isRootMenu&&x){const S=()=>{var E;y(),l(),x.contains(document.activeElement)&&((E=o.current)==null||E.focus())};return x.addEventListener(uo,S),()=>x.removeEventListener(uo,S)}},[f.isRootMenu,e.value,o,y,l]);const w=d.useMemo(()=>{const S=h().map($=>$.value);f.dir==="rtl"&&S.reverse();const E=S.indexOf(f.value),A=S.indexOf(f.previousValue),k=r===f.value,P=A===S.indexOf(r);if(!k&&!P)return b.current;const T=(()=>{if(E!==A){if(k&&A!==-1)return E>A?"from-end":"from-start";if(P&&E!==-1)return E>A?"to-start":"to-end"}return null})();return b.current=T,T},[f.previousValue,f.value,f.dir,h,r]);return i.jsx(_m,{asChild:!0,children:i.jsx(_t,{id:v,"aria-labelledby":p,"data-motion":w,"data-orientation":f.orientation,...u,ref:g,disableOutsidePointerEvents:!1,onDismiss:()=>{var S;const x=new Event(uo,{bubbles:!0,cancelable:!0});(S=m.current)==null||S.dispatchEvent(x)},onFocusOutside:B(e.onFocusOutside,x=>{var E;c();const S=x.target;(E=f.rootNavigationMenu)!=null&&E.contains(S)&&x.preventDefault()}),onPointerDownOutside:B(e.onPointerDownOutside,x=>{var k;const S=x.target,E=h().some(P=>{var T;return(T=P.ref.current)==null?void 0:T.contains(S)}),A=f.isRootMenu&&((k=f.viewport)==null?void 0:k.contains(S));(E||A||!f.isRootMenu)&&x.preventDefault()}),onKeyDown:B(e.onKeyDown,x=>{var A;const S=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!S){const k=Es(x.currentTarget),P=document.activeElement,T=k.findIndex(z=>z===P),Z=x.shiftKey?k.slice(0,T).reverse():k.slice(T+1,k.length);ks(Z)?x.preventDefault():(A=a.current)==null||A.focus()}}),onEscapeKeyDown:B(e.onEscapeKeyDown,x=>{s.current=!0})})})}),Ss="NavigationMenuViewport",Im=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=!!$e(Ss,e.__scopeNavigationMenu).value;return i.jsx(xe,{present:n||a,children:i.jsx(oS,{...r,ref:t})})});Im.displayName=Ss;var oS=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,a=$e(Ss,n),s=oe(t,a.onViewportChange),l=QN(hn,e.__scopeNavigationMenu),[c,u]=d.useState(null),[f,m]=d.useState(null),g=c?(c==null?void 0:c.width)+"px":void 0,p=c?(c==null?void 0:c.height)+"px":void 0,v=!!a.value,h=v?a.value:a.previousValue;return Ps(f,()=>{f&&u({width:f.offsetWidth,height:f.offsetHeight})}),i.jsx(W.div,{"data-state":Ms(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":p,...o.style},onPointerEnter:B(e.onPointerEnter,a.onContentEnter),onPointerLeave:B(e.onPointerLeave,fo(a.onContentLeave)),children:Array.from(l.items).map(([y,{ref:w,forceMount:x,...S}])=>{const E=h===y;return i.jsx(xe,{present:x||E,children:i.jsx(Dm,{...S,ref:Qe(w,A=>{E&&A&&m(A)})})},y)})})}),aS="FocusGroup",_m=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=$e(aS,n);return i.jsx(ys.Provider,{scope:n,children:i.jsx(ys.Slot,{scope:n,children:i.jsx(W.div,{dir:o.dir,...r,ref:t})})})}),Om=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],sS="FocusGroupItem",$m=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=KN(n),a=$e(sS,n);return i.jsx(ys.ItemSlot,{scope:n,children:i.jsx(W.button,{...r,ref:t,onKeyDown:B(e.onKeyDown,s=>{if(["Home","End",...Om].includes(s.key)){let c=o().map(m=>m.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(s.key)&&c.reverse(),Om.includes(s.key)){const m=c.indexOf(s.currentTarget);c=c.slice(m+1)}setTimeout(()=>ks(c)),s.preventDefault()}})})})});function Es(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 ks(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function iS(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=we(t);ve(()=>{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 Ms(e){return e?"open":"closed"}function Lm(e,t){return`${e}-trigger-${t}`}function Fm(e,t){return`${e}-content-${t}`}function fo(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Bm=ym,zm=Sm,lS=Pm,Wm=Mm,cS=jm,Vm=Am,Hm=Rm,Gm=Im;const Um=d.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Bm,{ref:r,className:D("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,i.jsx(Ts,{})]}));Um.displayName=Bm.displayName;const Ym=d.forwardRef(({className:e,...t},n)=>i.jsx(zm,{ref:n,className:D("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));Ym.displayName=zm.displayName;const dS=lS,Km=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"),qm=d.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Wm,{ref:r,className:D(Km(),"group",e),...n,children:[t," ",i.jsx(Xt,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));qm.displayName=Wm.displayName;const Xm=d.forwardRef(({className:e,...t},n)=>i.jsx(Hm,{ref:n,className:D("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}));Xm.displayName=Hm.displayName;const uS=cS,Ts=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{className:D("absolute left-0 top-full flex justify-center"),children:i.jsx(Gm,{className:D("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})}));Ts.displayName=Gm.displayName;const Zm=d.forwardRef(({className:e,...t},n)=>i.jsx(Vm,{ref:n,className:D("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:i.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));Zm.displayName=Vm.displayName;const Qm=({className:e,...t})=>i.jsx("nav",{role:"navigation","aria-label":"pagination",className:D("mx-auto flex w-full justify-center",e),...t});Qm.displayName="Pagination";const Jm=d.forwardRef(({className:e,...t},n)=>i.jsx("ul",{ref:n,className:D("flex flex-row items-center gap-1",e),...t}));Jm.displayName="PaginationContent";const ep=d.forwardRef(({className:e,...t},n)=>i.jsx("li",{ref:n,className:D("",e),...t}));ep.displayName="PaginationItem";const mo=({className:e,isActive:t,size:n="icon",...r})=>i.jsx(fe,{"aria-current":t?"page":void 0,className:D(ar({variant:t?"default":"outline",rounded:!1,size:n}),t?"text-primary-foreground":"text-foreground",e),...r,children:r.children});mo.displayName="PaginationLink";const tp=({className:e,...t})=>i.jsx(mo,{"aria-label":"Previous page",className:D("gap-1",e),...t,children:i.jsx(cr,{className:"h-4 w-4"})});tp.displayName="PaginationPrevious";const np=({className:e,...t})=>i.jsx(mo,{"aria-label":"Next page",className:D("gap-1",e),...t,children:i.jsx(Pn,{className:"h-4 w-4"})});np.displayName="PaginationNext";const rp=({className:e,...t})=>i.jsxs("span",{"aria-hidden":!0,className:D("flex h-9 w-9 items-center justify-center",e),...t,children:[i.jsx(Fb,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"More pages"})]});rp.displayName="PaginationEllipsis";var js="Progress",As=100,[fS,_P]=be(js),[mS,pS]=fS(js),op=d.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=hS,...s}=e;(o||o===0)&&!lp(o)&&console.error(gS(`${o}`,"Progress"));const l=lp(o)?o:As;r!==null&&!cp(r,l)&&console.error(vS(`${r}`,"Progress"));const c=cp(r,l)?r:null,u=po(c)?a(c,l):void 0;return i.jsx(mS,{scope:n,value:c,max:l,children:i.jsx(W.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":po(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":ip(c,l),"data-value":c??void 0,"data-max":l,...s,ref:t})})});op.displayName=js;var ap="ProgressIndicator",sp=d.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=pS(ap,n);return i.jsx(W.div,{"data-state":ip(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});sp.displayName=ap;function hS(e,t){return`${Math.round(e/t*100)}%`}function ip(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function po(e){return typeof e=="number"}function lp(e){return po(e)&&!isNaN(e)&&e>0}function cp(e,t){return po(e)&&!isNaN(e)&&e<=t&&e>=0}function gS(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${As}\`.`}function vS(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
263
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return d.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},w1=qu,y1=Xu,x1=Zu,lf=Qu,cf=Ju,df=of,uf=sf,ff=tf,mf=rf;const C1=w1,N1=y1,pf=x1,ls=d.forwardRef(({className:e,...t},n)=>i.jsx(lf,{className:D("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}));ls.displayName=lf.displayName;const hf=d.forwardRef(({className:e,...t},n)=>i.jsxs(pf,{children:[i.jsx(ls,{}),i.jsx(cf,{ref:n,className:D("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})]}));hf.displayName=cf.displayName;const gf=({className:e,...t})=>i.jsx("div",{className:D("flex flex-col space-y-2 text-center sm:text-left",e),...t});gf.displayName="AlertDialogHeader";const vf=({className:e,...t})=>i.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});vf.displayName="AlertDialogFooter";const bf=d.forwardRef(({className:e,...t},n)=>i.jsx(ff,{ref:n,className:D("text-lg font-semibold",e),...t}));bf.displayName=ff.displayName;const wf=d.forwardRef(({className:e,...t},n)=>i.jsx(mf,{ref:n,className:D("text-sm text-muted-foreground",e),...t}));wf.displayName=mf.displayName;const yf=d.forwardRef(({className:e,...t},n)=>i.jsx(df,{ref:n,className:D(cr(),e),...t}));yf.displayName=df.displayName;const xf=d.forwardRef(({className:e,...t},n)=>i.jsx(uf,{ref:n,className:D(cr({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));xf.displayName=uf.displayName;const S1=C.forwardRef(function(t,n){const{options:r,placeholder:o="Type to search...",onSelect:a,defaultSelectedOption:s}=t,[l,c]=C.useState((s==null?void 0:s.label)||""),[u,f]=C.useState([]),[m,h]=C.useState(!1),[p,v]=C.useState(-1),[g,b]=C.useState("down"),[y,w]=C.useState(s||null),x=C.useRef(null),S=C.useRef(null),E=C.useRef(null);C.useImperativeHandle(n,()=>({clearSelection:()=>{w(null),c(""),a(null)}})),C.useEffect(()=>{const j=$=>{x.current&&!x.current.contains($.target)&&h(!1)};return document.addEventListener("click",j),()=>{document.removeEventListener("click",j)}},[]),C.useEffect(()=>{const j=r.filter($=>Ki($.label,l));f(j),v(-1)},[l,r]),C.useEffect(()=>{if(m&&S.current){const j=S.current.getBoundingClientRect(),$=window.innerHeight-j.bottom,H=j.top,z=Math.min(u.length*40,240);b($>=z||$>H?"down":"up")}},[m,u]);const A=j=>{var $;c(j.target.value),($=t.onChange)==null||$.call(t,j.target.value),w(null),h(!0)},k=j=>{c(j.label),w(j),h(!1),a(j)},P=j=>{if(!m&&(j.key==="ArrowDown"||j.key==="ArrowUp")){h(!0);return}switch(j.key){case"ArrowDown":v($=>$<u.length-1?$+1:$);break;case"ArrowUp":v($=>$>0?$-1:$);break;case"Enter":p>=0&&p<u.length&&k(u[p]);break;case"Escape":h(!1);break}};return C.useEffect(()=>{m&&E.current&&p>=0&&E.current.children[p].scrollIntoView({block:"nearest"})},[p,m]),i.jsxs("div",{ref:x,className:"relative w-full",children:[i.jsx(to,{ref:S,type:"text",value:l,onChange:A,onFocus:()=>h(!0),onKeyDown:P,placeholder:o,className:D("w-full",t.className),"aria-expanded":m,"aria-autocomplete":"list","aria-controls":"autocomplete-list",role:"combobox",leftIcon:i.jsx(qo,{className:"w-4 h-4"}),rightIcon:y?i.jsx("button",{className:"mt-[5px]",onClick:()=>{w(null),c(""),a(null)},children:i.jsx(ht,{className:"w-5 h-5"})}):null}),m&&u.length>0&&i.jsx("ul",{id:"autocomplete-list",ref:E,className:`absolute z-10 w-full bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-auto ${g==="up"?"bottom-full mb-1":"top-full mt-1"}`,role:"listbox",children:u.map((j,$)=>{const H=j.label.split(new RegExp(`(${l})`,"gi"));return i.jsx("li",{onClick:()=>k(j),className:`px-4 py-2 cursor-pointer ${$===p?"bg-blue-100":"hover:bg-gray-100"} ${(y==null?void 0:y.value)===j.value?"bg-blue-200":""}`,role:"option","aria-selected":$===p,id:`option-${$}`,children:H.map((z,ee)=>z.toLowerCase()===l.toLowerCase()?i.jsx("span",{className:"font-bold text-blue-600",children:z},ee):z)},j.value)})})]})});var cs="Avatar",[E1,AP]=be(cs),[k1,Cf]=E1(cs),Nf=d.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=d.useState("idle");return i.jsx(k1,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:i.jsx(W.span,{...r,ref:t})})});Nf.displayName=cs;var Sf="AvatarImage",Ef=d.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=Cf(Sf,n),l=P1(r,a),c=we(u=>{o(u),s.onImageLoadingStatusChange(u)});return ve(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?i.jsx(W.img,{...a,ref:t,src:r}):null});Ef.displayName=Sf;var kf="AvatarFallback",Pf=d.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=Cf(kf,n),[s,l]=d.useState(r===void 0);return d.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(c)}},[r]),s&&a.imageLoadingStatus!=="loaded"?i.jsx(W.span,{...o,ref:t}):null});Pf.displayName=kf;function Tf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function P1(e,{referrerPolicy:t,crossOrigin:n}){const r=M1(),o=d.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,l]=d.useState(()=>Tf(a,e));return ve(()=>{l(Tf(a,e))},[a,e]),ve(()=>{const c=m=>()=>{l(m)};if(!a)return;const u=c("loaded"),f=c("error");return a.addEventListener("load",u),a.addEventListener("error",f),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",u),a.removeEventListener("error",f)}},[a,n,t]),s}function T1(){return()=>{}}function M1(){return d.useSyncExternalStore(T1,()=>!0,()=>!1)}var Mf=Nf,jf=Ef,Af=Pf;const Rf=d.forwardRef(({className:e,...t},n)=>i.jsx(Mf,{ref:n,className:D("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Rf.displayName=Mf.displayName;const Df=d.forwardRef(({className:e,...t},n)=>i.jsx(jf,{ref:n,className:D("aspect-square h-full w-full",e),...t}));Df.displayName=jf.displayName;const If=d.forwardRef(({className:e,...t},n)=>i.jsx(Af,{ref:n,className:D("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));If.displayName=Af.displayName;const j1={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"}},A1=(e,t,n)=>{let r;const o=j1[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},R1={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},D1={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},I1={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_1={date:qt({formats:R1,defaultWidth:"full"}),time:qt({formats:D1,defaultWidth:"full"}),dateTime:qt({formats:I1,defaultWidth:"full"})},O1={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"},$1=(e,t,n,r)=>{const o=O1[e];return typeof o=="function"?o(t):o},L1={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},F1={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},B1={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"]},z1={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"]},W1={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"}},V1={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"}},H1={ordinalNumber:(e,t)=>{const n=Number(e);return(t==null?void 0:t.unit)==="week"?n+"ª":n+"º"},era:Xe({values:L1,defaultWidth:"wide"}),quarter:Xe({values:F1,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Xe({values:B1,defaultWidth:"wide"}),day:Xe({values:z1,defaultWidth:"wide"}),dayPeriod:Xe({values:W1,defaultWidth:"wide",formattingValues:V1,defaultFormattingWidth:"wide"})},G1=/^(\d+)[ºªo]?/i,U1=/\d+/i,Y1={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},K1={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},q1={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},X1={any:[/1/i,/2/i,/3/i,/4/i]},Z1={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},Q1={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]},J1={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},eN={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]},tN={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},nN={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}},rN={ordinalNumber:Ni({matchPattern:G1,parsePattern:U1,valueCallback:e=>parseInt(e,10)}),era:Ze({matchPatterns:Y1,defaultMatchWidth:"wide",parsePatterns:K1,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:q1,defaultMatchWidth:"wide",parsePatterns:X1,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ze({matchPatterns:Z1,defaultMatchWidth:"wide",parsePatterns:Q1,defaultParseWidth:"any"}),day:Ze({matchPatterns:J1,defaultMatchWidth:"wide",parsePatterns:eN,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:tN,defaultMatchWidth:"any",parsePatterns:nN,defaultParseWidth:"any"})},oN={code:"pt-BR",formatDistance:A1,formatLong:_1,formatRelative:$1,localize:H1,match:rN,options:{weekStartsOn:0,firstWeekContainsDate:1}},aN=({selectedDate:e,onChange:t,language:n="enUS"})=>{const[r,o]=C.useState(e||new Date),s={ptBR:oN,enUS:$o}[n],l=()=>{o(p=>Rv(p))},c=()=>{o(p=>_i(p,1))},u=p=>{t&&t(p)},f=Array.from({length:Av(r)}).map((p,v)=>new Date(r.getFullYear(),r.getMonth(),v+1)),m=jv(r).getDay(),h=Array.from({length:7}).map((p,v)=>Lo(new Date(2021,0,v+3),"EEEEEE",{locale:s}));return i.jsxs("div",{className:"max-w-sm mx-auto p-4 border rounded shadow",role:"application","aria-label":"Calendar",children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("button",{className:"px-2 py-1 bg-gray-200 rounded hover:bg-gray-300",onClick:l,"aria-label":"Previous Month",children:i.jsx(mr,{})}),i.jsx("h2",{className:"text-lg font-bold","aria-live":"polite",children:Lo(r,"MMMM yyyy",{locale:s})}),i.jsx("button",{className:"px-2 py-1 bg-gray-200 rounded hover:bg-gray-300",onClick:c,"aria-label":"Next Month",children:i.jsx(Mn,{})})]}),i.jsxs("div",{className:"grid grid-cols-7 gap-2",children:[h.map((p,v)=>i.jsx("div",{className:"text-center font-medium","aria-hidden":"true",children:p},v)),Array.from({length:m}).map((p,v)=>i.jsx("div",{className:"","aria-hidden":"true"},`empty-${v}`)),f.map(p=>i.jsx("button",{className:`p-2 rounded hover:bg-blue-100 ${e&&p.toDateString()===e.toDateString()&&"bg-blue-200"}`,onClick:()=>u(p),"aria-label":Lo(p,"MMMM do yyyy",{locale:s}),"aria-pressed":e&&p.toDateString()===e.toDateString()?"true":"false",children:p.getDate()},p.toISOString()))]})]})},_f=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:D("rounded-xl border bg-card text-card-foreground shadow",e),...t}));_f.displayName="Card";const Of=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:D("flex flex-col space-y-1.5 p-6",e),...t}));Of.displayName="CardHeader";const $f=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:D("font-semibold leading-none tracking-tight pb-4",e),...t}));$f.displayName="CardTitle";const Lf=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:D("text-sm text-muted-foreground",e),...t}));Lf.displayName="CardDescription";const Ff=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:D("p-6 py-0",e),...t}));Ff.displayName="CardContent";const Bf=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:D("flex items-center p-6 pt-6",e),...t}));Bf.displayName="CardFooter";var zf=1,sN=.9,iN=.8,lN=.17,ds=.1,us=.999,cN=.9999,dN=.99,uN=/[\\\/_+.#"@\[\(\{&]/,fN=/[\\\/_+.#"@\[\(\{&]/g,mN=/[\s-]/,Wf=/[\s-]/g;function fs(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?zf:dN;var l=`${o},${a}`;if(s[l]!==void 0)return s[l];for(var c=r.charAt(a),u=n.indexOf(c,o),f=0,m,h,p,v;u>=0;)m=fs(e,t,n,r,u+1,a+1,s),m>f&&(u===o?m*=zf:uN.test(e.charAt(u-1))?(m*=iN,p=e.slice(o,u-1).match(fN),p&&o>0&&(m*=Math.pow(us,p.length))):mN.test(e.charAt(u-1))?(m*=sN,v=e.slice(o,u-1).match(Wf),v&&o>0&&(m*=Math.pow(us,v.length))):(m*=lN,o>0&&(m*=Math.pow(us,u-o))),e.charAt(u)!==t.charAt(a)&&(m*=cN)),(m<ds&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(h=fs(e,t,n,r,u+1,a+2,s),h*ds>m&&(m=h*ds)),m>f&&(f=m),u=n.indexOf(c,u+1);return s[l]=f,f}function Vf(e){return e.toLowerCase().replace(Wf," ")}function pN(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,fs(e,t,Vf(e),Vf(t),0,0,{})}var Kn='[cmdk-group=""]',ms='[cmdk-group-items=""]',hN='[cmdk-group-heading=""]',Hf='[cmdk-item=""]',Gf=`${Hf}:not([aria-disabled="true"])`,ps="cmdk-item-select",mn="data-value",gN=(e,t,n)=>pN(e,t,n),Uf=d.createContext(void 0),qn=()=>d.useContext(Uf),Yf=d.createContext(void 0),hs=()=>d.useContext(Yf),Kf=d.createContext(void 0),qf=d.forwardRef((e,t)=>{let n=pn(()=>{var T,I;return{search:"",value:(I=(T=e.value)!=null?T:e.defaultValue)!=null?I:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=pn(()=>new Set),o=pn(()=>new Map),a=pn(()=>new Map),s=pn(()=>new Set),l=Xf(e),{label:c,children:u,value:f,onValueChange:m,filter:h,shouldFilter:p,loop:v,disablePointerSelection:g=!1,vimBindings:b=!0,...y}=e,w=pe(),x=pe(),S=pe(),E=d.useRef(null),A=PN();Vt(()=>{if(f!==void 0){let T=f.trim();n.current.value=T,k.emit()}},[f]),Vt(()=>{A(6,ee)},[]);let k=d.useMemo(()=>({subscribe:T=>(s.current.add(T),()=>s.current.delete(T)),snapshot:()=>n.current,setState:(T,I,L)=>{var F,J,R,Y;if(!Object.is(n.current[T],I)){if(n.current[T]=I,T==="search")z(),$(),A(1,H);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let q=document.getElementById(S);q?q.focus():(F=document.getElementById(w))==null||F.focus()}if(A(7,()=>{var q;n.current.selectedItemId=(q=K())==null?void 0:q.id,k.emit()}),L||A(5,ee),((J=l.current)==null?void 0:J.value)!==void 0){let q=I??"";(Y=(R=l.current).onValueChange)==null||Y.call(R,q);return}}k.emit()}},emit:()=>{s.current.forEach(T=>T())}}),[]),P=d.useMemo(()=>({value:(T,I,L)=>{var F;I!==((F=a.current.get(T))==null?void 0:F.value)&&(a.current.set(T,{value:I,keywords:L}),n.current.filtered.items.set(T,j(I,L)),A(2,()=>{$(),k.emit()}))},item:(T,I)=>(r.current.add(T),I&&(o.current.has(I)?o.current.get(I).add(T):o.current.set(I,new Set([T]))),A(3,()=>{z(),$(),n.current.value||H(),k.emit()}),()=>{a.current.delete(T),r.current.delete(T),n.current.filtered.items.delete(T);let L=K();A(4,()=>{z(),(L==null?void 0:L.getAttribute("id"))===T&&H(),k.emit()})}),group:T=>(o.current.has(T)||o.current.set(T,new Set),()=>{a.current.delete(T),o.current.delete(T)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:w,inputId:S,labelId:x,listInnerRef:E}),[]);function j(T,I){var L,F;let J=(F=(L=l.current)==null?void 0:L.filter)!=null?F:gN;return T?J(T,n.current.search,I):0}function $(){if(!n.current.search||l.current.shouldFilter===!1)return;let T=n.current.filtered.items,I=[];n.current.filtered.groups.forEach(F=>{let J=o.current.get(F),R=0;J.forEach(Y=>{let q=T.get(Y);R=Math.max(q,R)}),I.push([F,R])});let L=E.current;te().sort((F,J)=>{var R,Y;let q=F.getAttribute("id"),ne=J.getAttribute("id");return((R=T.get(ne))!=null?R:0)-((Y=T.get(q))!=null?Y:0)}).forEach(F=>{let J=F.closest(ms);J?J.appendChild(F.parentElement===J?F:F.closest(`${ms} > *`)):L.appendChild(F.parentElement===L?F:F.closest(`${ms} > *`))}),I.sort((F,J)=>J[1]-F[1]).forEach(F=>{var J;let R=(J=E.current)==null?void 0:J.querySelector(`${Kn}[${mn}="${encodeURIComponent(F[0])}"]`);R==null||R.parentElement.appendChild(R)})}function H(){let T=te().find(L=>L.getAttribute("aria-disabled")!=="true"),I=T==null?void 0:T.getAttribute(mn);k.setState("value",I||void 0)}function z(){var T,I,L,F;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let J=0;for(let R of r.current){let Y=(I=(T=a.current.get(R))==null?void 0:T.value)!=null?I:"",q=(F=(L=a.current.get(R))==null?void 0:L.keywords)!=null?F:[],ne=j(Y,q);n.current.filtered.items.set(R,ne),ne>0&&J++}for(let[R,Y]of o.current)for(let q of Y)if(n.current.filtered.items.get(q)>0){n.current.filtered.groups.add(R);break}n.current.filtered.count=J}function ee(){var T,I,L;let F=K();F&&(((T=F.parentElement)==null?void 0:T.firstChild)===F&&((L=(I=F.closest(Kn))==null?void 0:I.querySelector(hN))==null||L.scrollIntoView({block:"nearest"})),F.scrollIntoView({block:"nearest"}))}function K(){var T;return(T=E.current)==null?void 0:T.querySelector(`${Hf}[aria-selected="true"]`)}function te(){var T;return Array.from(((T=E.current)==null?void 0:T.querySelectorAll(Gf))||[])}function V(T){let I=te()[T];I&&k.setState("value",I.getAttribute(mn))}function Q(T){var I;let L=K(),F=te(),J=F.findIndex(Y=>Y===L),R=F[J+T];(I=l.current)!=null&&I.loop&&(R=J+T<0?F[F.length-1]:J+T===F.length?F[0]:F[J+T]),R&&k.setState("value",R.getAttribute(mn))}function _(T){let I=K(),L=I==null?void 0:I.closest(Kn),F;for(;L&&!F;)L=T>0?EN(L,Kn):kN(L,Kn),F=L==null?void 0:L.querySelector(Gf);F?k.setState("value",F.getAttribute(mn)):Q(T)}let O=()=>V(te().length-1),M=T=>{T.preventDefault(),T.metaKey?O():T.altKey?_(1):Q(1)},U=T=>{T.preventDefault(),T.metaKey?V(0):T.altKey?_(-1):Q(-1)};return d.createElement(W.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:T=>{var I;(I=y.onKeyDown)==null||I.call(y,T);let L=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||L))switch(T.key){case"n":case"j":{b&&T.ctrlKey&&M(T);break}case"ArrowDown":{M(T);break}case"p":case"k":{b&&T.ctrlKey&&U(T);break}case"ArrowUp":{U(T);break}case"Home":{T.preventDefault(),V(0);break}case"End":{T.preventDefault(),O();break}case"Enter":{T.preventDefault();let F=K();if(F){let J=new Event(ps);F.dispatchEvent(J)}}}}},d.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:MN},c),so(e,T=>d.createElement(Yf.Provider,{value:k},d.createElement(Uf.Provider,{value:P},T))))}),vN=d.forwardRef((e,t)=>{var n,r;let o=pe(),a=d.useRef(null),s=d.useContext(Kf),l=qn(),c=Xf(e),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;Vt(()=>{if(!u)return l.item(o,s==null?void 0:s.id)},[u]);let f=Zf(o,a,[e.value,e.children,a],e.keywords),m=hs(),h=Tt(A=>A.value&&A.value===f.current),p=Tt(A=>u||l.filter()===!1?!0:A.search?A.filtered.items.get(o)>0:!0);d.useEffect(()=>{let A=a.current;if(!(!A||e.disabled))return A.addEventListener(ps,v),()=>A.removeEventListener(ps,v)},[p,e.onSelect,e.disabled]);function v(){var A,k;g(),(k=(A=c.current).onSelect)==null||k.call(A,f.current)}function g(){m.setState("value",f.current,!0)}if(!p)return null;let{disabled:b,value:y,onSelect:w,forceMount:x,keywords:S,...E}=e;return d.createElement(W.div,{ref:Qe(a,t),...E,id:o,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!h,"data-disabled":!!b,"data-selected":!!h,onPointerMove:b||l.getDisablePointerSelection()?void 0:g,onClick:b?void 0:v},e.children)}),bN=d.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=pe(),l=d.useRef(null),c=d.useRef(null),u=pe(),f=qn(),m=Tt(p=>o||f.filter()===!1?!0:p.search?p.filtered.groups.has(s):!0);Vt(()=>f.group(s),[]),Zf(s,l,[e.value,e.heading,c]);let h=d.useMemo(()=>({id:s,forceMount:o}),[o]);return d.createElement(W.div,{ref:Qe(l,t),...a,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&d.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),so(e,p=>d.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},d.createElement(Kf.Provider,{value:h},p))))}),wN=d.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=d.useRef(null),a=Tt(s=>!s.search);return!n&&!a?null:d.createElement(W.div,{ref:Qe(o,t),...r,"cmdk-separator":"",role:"separator"})}),yN=d.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=hs(),s=Tt(u=>u.search),l=Tt(u=>u.selectedItemId),c=qn();return d.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),d.createElement(W.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:o?e.value:s,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),xN=d.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=d.useRef(null),s=d.useRef(null),l=Tt(u=>u.selectedItemId),c=qn();return d.useEffect(()=>{if(s.current&&a.current){let u=s.current,f=a.current,m,h=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let p=u.offsetHeight;f.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return h.observe(u),()=>{cancelAnimationFrame(m),h.unobserve(u)}}},[]),d.createElement(W.div,{ref:Qe(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:c.listId},so(e,u=>d.createElement("div",{ref:Qe(s,c.listInnerRef),"cmdk-list-sizer":""},u)))}),CN=d.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...l}=e;return d.createElement(os,{open:n,onOpenChange:r},d.createElement(as,{container:s},d.createElement(ro,{"cmdk-overlay":"",className:o}),d.createElement(oo,{"aria-label":e.label,"cmdk-dialog":"",className:a},d.createElement(qf,{ref:t,...l}))))}),NN=d.forwardRef((e,t)=>Tt(n=>n.filtered.count===0)?d.createElement(W.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),SN=d.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return d.createElement(W.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},so(e,s=>d.createElement("div",{"aria-hidden":!0},s)))}),je=Object.assign(qf,{List:xN,Item:vN,Input:yN,Group:bN,Separator:wN,Dialog:CN,Empty:NN,Loading:SN});function EN(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function kN(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Xf(e){let t=d.useRef(e);return Vt(()=>{t.current=e}),t}var Vt=typeof window>"u"?d.useEffect:d.useLayoutEffect;function pn(e){let t=d.useRef();return t.current===void 0&&(t.current=e()),t}function Tt(e){let t=hs(),n=()=>e(t.snapshot());return d.useSyncExternalStore(t.subscribe,n,n)}function Zf(e,t,n,r=[]){let o=d.useRef(),a=qn();return Vt(()=>{var s;let l=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),c=r.map(u=>u.trim());a.value(e,l,c),(s=t.current)==null||s.setAttribute(mn,l),o.current=l}),o}var PN=()=>{let[e,t]=d.useState(),n=pn(()=>new Map);return Vt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function TN(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function so({asChild:e,children:t},n){return e&&d.isValidElement(t)?d.cloneElement(TN(t),{ref:t.ref},n(t.props.children)):n(t)}var MN={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const io=os,Qf=Yu,Jf=as,jN=ao,gs=d.forwardRef(({className:e,...t},n)=>i.jsx(ro,{ref:n,className:D("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}));gs.displayName=ro.displayName;const Xn=d.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Jf,{children:[i.jsx(gs,{}),i.jsxs(oo,{ref:r,className:D("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,i.jsxs(ao,{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:[i.jsx(ht,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Xn.displayName=oo.displayName;const lo=({className:e,...t})=>i.jsx("div",{className:D("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});lo.displayName="DialogHeader";const em=({className:e,...t})=>i.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});em.displayName="DialogFooter";const co=d.forwardRef(({className:e,...t},n)=>i.jsx(ss,{ref:n,className:D("text-lg font-semibold leading-none tracking-tight",e),...t}));co.displayName=ss.displayName;const uo=d.forwardRef(({className:e,...t},n)=>i.jsx(is,{ref:n,className:D("text-sm text-muted-foreground",e),...t}));uo.displayName=is.displayName;const fo=d.forwardRef(({className:e,...t},n)=>i.jsx(je,{ref:n,className:D("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));fo.displayName=je.displayName;const AN=({children:e,...t})=>i.jsx(io,{...t,children:i.jsx(Xn,{className:"overflow-hidden p-0 shadow-lg",children:i.jsx(fo,{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})})}),vs=d.forwardRef(({className:e,...t},n)=>i.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[i.jsx(qo,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),i.jsx(je.Input,{ref:n,className:D("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})]}));vs.displayName=je.Input.displayName;const bs=d.forwardRef(({className:e,...t},n)=>i.jsx(je.List,{ref:n,className:D("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));bs.displayName=je.List.displayName;const ws=d.forwardRef((e,t)=>i.jsx(je.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ws.displayName=je.Empty.displayName;const mo=d.forwardRef(({className:e,...t},n)=>i.jsx(je.Group,{ref:n,className:D("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}));mo.displayName=je.Group.displayName;const ys=d.forwardRef(({className:e,...t},n)=>i.jsx(je.Separator,{ref:n,className:D("-mx-1 h-px bg-border",e),...t}));ys.displayName=je.Separator.displayName;const hn=d.forwardRef(({className:e,...t},n)=>i.jsx(je.Item,{ref:n,className:D("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}));hn.displayName=je.Item.displayName;const tm=({className:e,...t})=>i.jsx("span",{className:D("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});tm.displayName="CommandShortcut";const nm=C.forwardRef((e,t)=>{const{currencySymbol:n="$",decimalSeparator:r=".",thousandSeparator:o=",",onValueChange:a,className:s,value:l=0,...c}=e,u=C.useRef(null);C.useImperativeHandle(t,()=>u.current);const[f,m]=C.useState(""),h=g=>{const b=g.toFixed(2).split("."),y=b[0].replace(/\B(?=(\d{3})+(?!\d))/g,o);return`${n} ${y}${r}${b[1]}`},p=g=>{const b=g.target.value,y=parseFloat(b.replace(/\D/g,""))/100;m(h(y)),a(y),u.current&&window.requestAnimationFrame(()=>{var w;(w=u.current)==null||w.setSelectionRange(u.current.value.length,u.current.value.length)})},v=()=>{u.current&&u.current.setSelectionRange(u.current.value.length,u.current.value.length)};return C.useEffect(()=>{m(h(+l))},[l]),i.jsx(to,{type:"text",inputMode:"numeric",value:f,ref:u,onChange:p,onFocus:v,onClick:v,placeholder:`${n} 0${r}00`,className:s,...c})});nm.displayName="CurrencyInput";var RN="Label",rm=d.forwardRef((e,t)=>i.jsx(W.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())}}));rm.displayName=RN;var om=rm;const DN=$t("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),am=d.forwardRef(({className:e,...t},n)=>i.jsx(om,{ref:n,className:D(DN(),e),...t}));am.displayName=om.displayName;var xs="Popover",[sm,DP]=be(xs,[xt]),Zn=xt(),[IN,Mt]=sm(xs),im=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,l=Zn(t),c=d.useRef(null),[u,f]=d.useState(!1),[m=!1,h]=xe({prop:r,defaultProp:o,onChange:a});return i.jsx(In,{...l,children:i.jsx(IN,{scope:t,contentId:pe(),triggerRef:c,open:m,onOpenChange:h,onOpenToggle:d.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:u,onCustomAnchorAdd:d.useCallback(()=>f(!0),[]),onCustomAnchorRemove:d.useCallback(()=>f(!1),[]),modal:s,children:n})})};im.displayName=xs;var lm="PopoverAnchor",cm=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mt(lm,n),a=Zn(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=o;return d.useEffect(()=>(s(),()=>l()),[s,l]),i.jsx(_n,{...a,...r,ref:t})});cm.displayName=lm;var dm="PopoverTrigger",um=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mt(dm,n),a=Zn(n),s=oe(t,o.triggerRef),l=i.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":gm(o.open),...r,ref:s,onClick:B(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:i.jsx(_n,{asChild:!0,...a,children:l})});um.displayName=dm;var Cs="PopoverPortal",[_N,ON]=sm(Cs,{forceMount:void 0}),fm=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Mt(Cs,t);return i.jsx(_N,{scope:t,forceMount:n,children:i.jsx(Ce,{present:n||a.open,children:i.jsx(On,{asChild:!0,container:o,children:r})})})};fm.displayName=Cs;var gn="PopoverContent",mm=d.forwardRef((e,t)=>{const n=ON(gn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Mt(gn,e.__scopePopover);return i.jsx(Ce,{present:r||a.open,children:a.modal?i.jsx(LN,{...o,ref:t}):i.jsx(FN,{...o,ref:t})})});mm.displayName=gn;var $N=pt("PopoverContent.RemoveScroll"),LN=d.forwardRef((e,t)=>{const n=Mt(gn,e.__scopePopover),r=d.useRef(null),o=oe(t,r),a=d.useRef(!1);return d.useEffect(()=>{const s=r.current;if(s)return Ir(s)},[]),i.jsx($n,{as:$N,allowPinchZoom:!0,children:i.jsx(pm,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),a.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:B(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),FN=d.forwardRef((e,t)=>{const n=Mt(gn,e.__scopePopover),r=d.useRef(!1),o=d.useRef(!1);return i.jsx(pm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),pm=d.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...m}=e,h=Mt(gn,n),p=Zn(n);return hr(),i.jsx(jn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:i.jsx(Lt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:i.jsx(kr,{"data-state":gm(h.open),role:"dialog",id:h.contentId,...p,...m,ref:t,style:{...m.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)"}})})})}),hm="PopoverClose",BN=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mt(hm,n);return i.jsx(W.button,{type:"button",...r,ref:t,onClick:B(e.onClick,()=>o.onOpenChange(!1))})});BN.displayName=hm;var zN="PopoverArrow",WN=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Zn(n);return i.jsx(Pr,{...o,...r,ref:t})});WN.displayName=zN;function gm(e){return e?"open":"closed"}var VN=im,HN=cm,GN=um,UN=fm,vm=mm;const bm=VN,wm=GN,YN=HN,Ns=d.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>i.jsx(UN,{children:i.jsx(vm,{ref:o,align:t,sideOffset:n,className:D("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})}));Ns.displayName=vm.displayName;var KN="Separator",ym="horizontal",qN=["horizontal","vertical"],xm=d.forwardRef((e,t)=>{const{decorative:n,orientation:r=ym,...o}=e,a=XN(r)?r:ym,l=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return i.jsx(W.div,{"data-orientation":a,...l,...o,ref:t})});xm.displayName=KN;function XN(e){return qN.includes(e)}var Cm=xm;const po=d.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>i.jsx(Cm,{ref:o,decorative:n,orientation:t,className:D("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));po.displayName=Cm.displayName;const Nm=$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"}}),Sm=d.forwardRef(({options:e,onValueChange:t,variant:n,defaultValue:r=[],placeholder:o="Select options",maxCount:a=3,modalPopover:s=!1,asChild:l=!1,className:c,...u},f)=>{const[m,h]=d.useState(r),[p,v]=d.useState(!1),[g,b]=d.useState(!1),y=k=>{if(k.key==="Enter")v(!0);else if(k.key==="Backspace"&&!k.currentTarget.value){const P=[...m];P.pop(),h(P),t(P)}},w=k=>{const P=m.includes(k)?m.filter(j=>j!==k):[...m,k];h(P),t(P)},x=()=>{h([]),t([])},S=()=>{v(k=>!k)},E=()=>{const k=m.slice(0,a);h(k),t(k)},A=()=>{if(m.length===e.length)x();else{const k=e.map(P=>P.value);h(k),t(k)}};return i.jsxs(bm,{open:p,onOpenChange:v,modal:s,children:[i.jsx(wm,{asChild:!0,children:i.jsx(fe,{ref:f,...u,onClick:S,className:D("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",c),children:m.length>0?i.jsxs("div",{className:"flex justify-between items-center w-full",children:[i.jsxs("div",{className:"flex flex-wrap items-center",children:[m.slice(0,a).map(k=>{const P=e.find(j=>j.value===k);return i.jsxs(en,{className:D(Nm({variant:n})),children:[P==null?void 0:P.label,i.jsx(Ko,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:j=>{j.stopPropagation(),w(k)}})]},k)}),m.length>a&&i.jsxs(en,{className:D("bg-transparent text-foreground border-foreground/1 hover:bg-transparent",Nm({variant:n})),children:[`+ ${m.length-a} more`,i.jsx(Ko,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:k=>{k.stopPropagation(),E()}})]})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(ht,{className:"h-4 mx-2 cursor-pointer text-muted-foreground",onClick:k=>{k.stopPropagation(),x()}}),i.jsx(po,{orientation:"vertical",className:"flex min-h-6 h-full"}),i.jsx(Jt,{className:"h-4 mx-2 cursor-pointer text-muted-foreground"})]})]}):i.jsxs("div",{className:"flex items-center justify-between w-full mx-auto",children:[i.jsx("span",{className:"text-sm text-muted-foreground mx-3",children:o}),i.jsx(Jt,{className:"h-4 cursor-pointer text-muted-foreground mx-2"})]})})}),i.jsx(Ns,{className:"w-auto p-0",align:"start",onEscapeKeyDown:()=>v(!1),children:i.jsxs(fo,{children:[i.jsx(vs,{placeholder:"Search...",onKeyDown:y}),i.jsxs(bs,{children:[i.jsx(ws,{children:"No results found."}),i.jsxs(mo,{children:[i.jsxs(hn,{onSelect:A,className:"cursor-pointer",children:[i.jsx("div",{className:D("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",m.length===e.length?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:i.jsx(Tn,{className:"h-4 w-4"})}),i.jsx("span",{children:"(Select All)"})]},"all"),e.map(k=>{const P=m.includes(k.value);return i.jsxs(hn,{onSelect:()=>w(k.value),className:"cursor-pointer",children:[i.jsx("div",{className:D("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",P?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:i.jsx(Tn,{className:"h-4 w-4"})}),i.jsx("span",{children:k.label})]},k.value)})]}),i.jsx(ys,{}),i.jsx(mo,{children:i.jsxs("div",{className:"flex items-center justify-between",children:[m.length>0&&i.jsxs(i.Fragment,{children:[i.jsx(hn,{onSelect:x,className:"flex-1 justify-center cursor-pointer",children:"Clear"}),i.jsx(po,{orientation:"vertical",className:"flex min-h-6 h-full"})]}),i.jsx(hn,{onSelect:()=>v(!1),className:"flex-1 justify-center cursor-pointer max-w-full",children:"Close"})]})})]})]})})]})});Sm.displayName="MultiSelect";var vn="NavigationMenu",[Ss,Em,ZN]=tn(vn),[Es,QN,JN]=tn(vn),[ks,IP]=be(vn,[ZN,JN]),[eS,Le]=ks(vn),[tS,nS]=ks(vn),km=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:s=200,skipDelayDuration:l=300,orientation:c="horizontal",dir:u,...f}=e,[m,h]=d.useState(null),p=oe(t,j=>h(j)),v=gt(u),g=d.useRef(0),b=d.useRef(0),y=d.useRef(0),[w,x]=d.useState(!0),[S="",E]=xe({prop:r,onChange:j=>{const $=j!=="",H=l>0;$?(window.clearTimeout(y.current),H&&x(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>x(!0),l)),o==null||o(j)},defaultProp:a}),A=d.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>E(""),150)},[E]),k=d.useCallback(j=>{window.clearTimeout(b.current),E(j)},[E]),P=d.useCallback(j=>{S===j?window.clearTimeout(b.current):g.current=window.setTimeout(()=>{window.clearTimeout(b.current),E(j)},s)},[S,E,s]);return d.useEffect(()=>()=>{window.clearTimeout(g.current),window.clearTimeout(b.current),window.clearTimeout(y.current)},[]),i.jsx(Tm,{scope:n,isRootMenu:!0,value:S,dir:v,orientation:c,rootNavigationMenu:m,onTriggerEnter:j=>{window.clearTimeout(g.current),w?P(j):k(j)},onTriggerLeave:()=>{window.clearTimeout(g.current),A()},onContentEnter:()=>window.clearTimeout(b.current),onContentLeave:A,onItemSelect:j=>{E($=>$===j?"":j)},onItemDismiss:()=>E(""),children:i.jsx(W.nav,{"aria-label":"Main","data-orientation":c,dir:v,...f,ref:p})})});km.displayName=vn;var Pm="NavigationMenuSub",rS=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",...l}=e,c=Le(Pm,n),[u="",f]=xe({prop:r,onChange:o,defaultProp:a});return i.jsx(Tm,{scope:n,isRootMenu:!1,value:u,dir:c.dir,orientation:s,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:m=>f(m),onItemSelect:m=>f(m),onItemDismiss:()=>f(""),children:i.jsx(W.div,{"data-orientation":s,...l,ref:t})})});rS.displayName=Pm;var Tm=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:s,value:l,onItemSelect:c,onItemDismiss:u,onTriggerEnter:f,onTriggerLeave:m,onContentEnter:h,onContentLeave:p}=e,[v,g]=d.useState(null),[b,y]=d.useState(new Map),[w,x]=d.useState(null);return i.jsx(eS,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:l,previousValue:Hn(l),baseId:pe(),dir:o,orientation:a,viewport:v,onViewportChange:g,indicatorTrack:w,onIndicatorTrackChange:x,onTriggerEnter:we(f),onTriggerLeave:we(m),onContentEnter:we(h),onContentLeave:we(p),onItemSelect:we(c),onItemDismiss:we(u),onViewportContentChange:d.useCallback((S,E)=>{y(A=>(A.set(S,E),new Map(A)))},[]),onViewportContentRemove:d.useCallback(S=>{y(E=>E.has(S)?(E.delete(S),new Map(E)):E)},[]),children:i.jsx(Ss.Provider,{scope:t,children:i.jsx(tS,{scope:t,items:b,children:s})})})},Mm="NavigationMenuList",jm=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Le(Mm,n),a=i.jsx(W.ul,{"data-orientation":o.orientation,...r,ref:t});return i.jsx(W.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:i.jsx(Ss.Slot,{scope:n,children:o.isRootMenu?i.jsx(zm,{asChild:!0,children:a}):a})})});jm.displayName=Mm;var Am="NavigationMenuItem",[oS,Rm]=ks(Am),Dm=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=pe(),s=r||a||"LEGACY_REACT_AUTO_VALUE",l=d.useRef(null),c=d.useRef(null),u=d.useRef(null),f=d.useRef(()=>{}),m=d.useRef(!1),h=d.useCallback((v="start")=>{if(l.current){f.current();const g=js(l.current);g.length&&As(v==="start"?g:g.reverse())}},[]),p=d.useCallback(()=>{if(l.current){const v=js(l.current);v.length&&(f.current=uS(v))}},[]);return i.jsx(oS,{scope:n,value:s,triggerRef:c,contentRef:l,focusProxyRef:u,wasEscapeCloseRef:m,onEntryKeyDown:h,onFocusProxyEnter:h,onRootContentClose:p,onContentFocusOutside:p,children:i.jsx(W.li,{...o,ref:t})})});Dm.displayName=Am;var Ps="NavigationMenuTrigger",Im=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=Le(Ps,e.__scopeNavigationMenu),s=Rm(Ps,e.__scopeNavigationMenu),l=d.useRef(null),c=oe(l,s.triggerRef,t),u=Hm(a.baseId,s.value),f=Gm(a.baseId,s.value),m=d.useRef(!1),h=d.useRef(!1),p=s.value===a.value;return i.jsxs(i.Fragment,{children:[i.jsx(Ss.ItemSlot,{scope:n,value:s.value,children:i.jsx(Vm,{asChild:!0,children:i.jsx(W.button,{id:u,disabled:r,"data-disabled":r?"":void 0,"data-state":Ds(p),"aria-expanded":p,"aria-controls":f,...o,ref:c,onPointerEnter:B(e.onPointerEnter,()=>{h.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:B(e.onPointerMove,go(()=>{r||h.current||s.wasEscapeCloseRef.current||m.current||(a.onTriggerEnter(s.value),m.current=!0)})),onPointerLeave:B(e.onPointerLeave,go(()=>{r||(a.onTriggerLeave(),m.current=!1)})),onClick:B(e.onClick,()=>{a.onItemSelect(s.value),h.current=p}),onKeyDown:B(e.onKeyDown,v=>{const b={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];p&&v.key===b&&(s.onEntryKeyDown(),v.preventDefault())})})})}),p&&i.jsxs(i.Fragment,{children:[i.jsx(wd,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:v=>{const g=s.contentRef.current,b=v.relatedTarget,y=b===l.current,w=g==null?void 0:g.contains(b);(y||!w)&&s.onFocusProxyEnter(y?"start":"end")}}),a.viewport&&i.jsx("span",{"aria-owns":f})]})]})});Im.displayName=Ps;var aS="NavigationMenuLink",_m="navigationMenu.linkSelect",Om=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return i.jsx(Vm,{asChild:!0,children:i.jsx(W.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...a,ref:t,onClick:B(e.onClick,s=>{const l=s.target,c=new CustomEvent(_m,{bubbles:!0,cancelable:!0});if(l.addEventListener(_m,u=>o==null?void 0:o(u),{once:!0}),pr(l,c),!c.defaultPrevented&&!s.metaKey){const u=new CustomEvent(ho,{bubbles:!0,cancelable:!0});pr(l,u)}},{checkForDefaultPrevented:!1})})})});Om.displayName=aS;var Ts="NavigationMenuIndicator",$m=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Le(Ts,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?nr.createPortal(i.jsx(Ce,{present:n||a,children:i.jsx(sS,{...r,ref:t})}),o.indicatorTrack):null});$m.displayName=Ts;var sS=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Le(Ts,n),a=Em(n),[s,l]=d.useState(null),[c,u]=d.useState(null),f=o.orientation==="horizontal",m=!!o.value;d.useEffect(()=>{var g;const v=(g=a().find(b=>b.value===o.value))==null?void 0:g.ref.current;v&&l(v)},[a,o.value]);const h=()=>{s&&u({size:f?s.offsetWidth:s.offsetHeight,offset:f?s.offsetLeft:s.offsetTop})};return Rs(s,h),Rs(o.indicatorTrack,h),c?i.jsx(W.div,{"aria-hidden":!0,"data-state":m?"visible":"hidden","data-orientation":o.orientation,...r,ref:t,style:{position:"absolute",...f?{left:0,width:c.size+"px",transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+"px",transform:`translateY(${c.offset}px)`},...r.style}}):null}),bn="NavigationMenuContent",Lm=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Le(bn,e.__scopeNavigationMenu),a=Rm(bn,e.__scopeNavigationMenu),s=oe(a.contentRef,t),l=a.value===o.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?i.jsx(iS,{forceMount:n,...c,ref:s}):i.jsx(Ce,{present:n||l,children:i.jsx(Fm,{"data-state":Ds(l),...c,ref:s,onPointerEnter:B(e.onPointerEnter,o.onContentEnter),onPointerLeave:B(e.onPointerLeave,go(o.onContentLeave)),style:{pointerEvents:!l&&o.isRootMenu?"none":void 0,...c.style}})})});Lm.displayName=bn;var iS=d.forwardRef((e,t)=>{const n=Le(bn,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return ve(()=>{r(e.value,{ref:t,...e})},[e,t,r]),ve(()=>()=>o(e.value),[e.value,o]),null}),ho="navigationMenu.rootContentDismiss",Fm=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:s,onRootContentClose:l,onContentFocusOutside:c,...u}=e,f=Le(bn,n),m=d.useRef(null),h=oe(m,t),p=Hm(f.baseId,r),v=Gm(f.baseId,r),g=Em(n),b=d.useRef(null),{onItemDismiss:y}=f;d.useEffect(()=>{const x=m.current;if(f.isRootMenu&&x){const S=()=>{var E;y(),l(),x.contains(document.activeElement)&&((E=o.current)==null||E.focus())};return x.addEventListener(ho,S),()=>x.removeEventListener(ho,S)}},[f.isRootMenu,e.value,o,y,l]);const w=d.useMemo(()=>{const S=g().map($=>$.value);f.dir==="rtl"&&S.reverse();const E=S.indexOf(f.value),A=S.indexOf(f.previousValue),k=r===f.value,P=A===S.indexOf(r);if(!k&&!P)return b.current;const j=(()=>{if(E!==A){if(k&&A!==-1)return E>A?"from-end":"from-start";if(P&&E!==-1)return E>A?"to-start":"to-end"}return null})();return b.current=j,j},[f.previousValue,f.value,f.dir,g,r]);return i.jsx(zm,{asChild:!0,children:i.jsx(Lt,{id:v,"aria-labelledby":p,"data-motion":w,"data-orientation":f.orientation,...u,ref:h,disableOutsidePointerEvents:!1,onDismiss:()=>{var S;const x=new Event(ho,{bubbles:!0,cancelable:!0});(S=m.current)==null||S.dispatchEvent(x)},onFocusOutside:B(e.onFocusOutside,x=>{var E;c();const S=x.target;(E=f.rootNavigationMenu)!=null&&E.contains(S)&&x.preventDefault()}),onPointerDownOutside:B(e.onPointerDownOutside,x=>{var k;const S=x.target,E=g().some(P=>{var j;return(j=P.ref.current)==null?void 0:j.contains(S)}),A=f.isRootMenu&&((k=f.viewport)==null?void 0:k.contains(S));(E||A||!f.isRootMenu)&&x.preventDefault()}),onKeyDown:B(e.onKeyDown,x=>{var A;const S=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!S){const k=js(x.currentTarget),P=document.activeElement,j=k.findIndex(z=>z===P),H=x.shiftKey?k.slice(0,j).reverse():k.slice(j+1,k.length);As(H)?x.preventDefault():(A=a.current)==null||A.focus()}}),onEscapeKeyDown:B(e.onEscapeKeyDown,x=>{s.current=!0})})})}),Ms="NavigationMenuViewport",Bm=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=!!Le(Ms,e.__scopeNavigationMenu).value;return i.jsx(Ce,{present:n||a,children:i.jsx(lS,{...r,ref:t})})});Bm.displayName=Ms;var lS=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,a=Le(Ms,n),s=oe(t,a.onViewportChange),l=nS(bn,e.__scopeNavigationMenu),[c,u]=d.useState(null),[f,m]=d.useState(null),h=c?(c==null?void 0:c.width)+"px":void 0,p=c?(c==null?void 0:c.height)+"px":void 0,v=!!a.value,g=v?a.value:a.previousValue;return Rs(f,()=>{f&&u({width:f.offsetWidth,height:f.offsetHeight})}),i.jsx(W.div,{"data-state":Ds(v),"data-orientation":a.orientation,...o,ref:s,style:{pointerEvents:!v&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":h,"--radix-navigation-menu-viewport-height":p,...o.style},onPointerEnter:B(e.onPointerEnter,a.onContentEnter),onPointerLeave:B(e.onPointerLeave,go(a.onContentLeave)),children:Array.from(l.items).map(([y,{ref:w,forceMount:x,...S}])=>{const E=g===y;return i.jsx(Ce,{present:x||E,children:i.jsx(Fm,{...S,ref:Qe(w,A=>{E&&A&&m(A)})})},y)})})}),cS="FocusGroup",zm=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Le(cS,n);return i.jsx(Es.Provider,{scope:n,children:i.jsx(Es.Slot,{scope:n,children:i.jsx(W.div,{dir:o.dir,...r,ref:t})})})}),Wm=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],dS="FocusGroupItem",Vm=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=QN(n),a=Le(dS,n);return i.jsx(Es.ItemSlot,{scope:n,children:i.jsx(W.button,{...r,ref:t,onKeyDown:B(e.onKeyDown,s=>{if(["Home","End",...Wm].includes(s.key)){let c=o().map(m=>m.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(s.key)&&c.reverse(),Wm.includes(s.key)){const m=c.indexOf(s.currentTarget);c=c.slice(m+1)}setTimeout(()=>As(c)),s.preventDefault()}})})})});function js(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 As(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function uS(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function Rs(e,t){const n=we(t);ve(()=>{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 Ds(e){return e?"open":"closed"}function Hm(e,t){return`${e}-trigger-${t}`}function Gm(e,t){return`${e}-content-${t}`}function go(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Um=km,Ym=jm,fS=Dm,Km=Im,mS=Om,qm=$m,Xm=Lm,Zm=Bm;const Qm=d.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Um,{ref:r,className:D("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,i.jsx(Is,{})]}));Qm.displayName=Um.displayName;const Jm=d.forwardRef(({className:e,...t},n)=>i.jsx(Ym,{ref:n,className:D("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));Jm.displayName=Ym.displayName;const pS=fS,ep=$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"),tp=d.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Km,{ref:r,className:D(ep(),"group",e),...n,children:[t," ",i.jsx(Jt,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));tp.displayName=Km.displayName;const np=d.forwardRef(({className:e,...t},n)=>i.jsx(Xm,{ref:n,className:D("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}));np.displayName=Xm.displayName;const hS=mS,Is=d.forwardRef(({className:e,...t},n)=>i.jsx("div",{className:D("absolute left-0 top-full flex justify-center"),children:i.jsx(Zm,{className:D("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=Zm.displayName;const rp=d.forwardRef(({className:e,...t},n)=>i.jsx(qm,{ref:n,className:D("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:i.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));rp.displayName=qm.displayName;const op=({className:e,...t})=>i.jsx("nav",{role:"navigation","aria-label":"pagination",className:D("mx-auto flex w-full justify-center",e),...t});op.displayName="Pagination";const ap=d.forwardRef(({className:e,...t},n)=>i.jsx("ul",{ref:n,className:D("flex flex-row items-center gap-1",e),...t}));ap.displayName="PaginationContent";const sp=d.forwardRef(({className:e,...t},n)=>i.jsx("li",{ref:n,className:D("",e),...t}));sp.displayName="PaginationItem";const vo=({className:e,isActive:t,size:n="icon",...r})=>i.jsx(fe,{"aria-current":t?"page":void 0,className:D(cr({variant:t?"default":"outline",rounded:!1,size:n}),t?"text-primary-foreground":"text-foreground",e),...r,children:r.children});vo.displayName="PaginationLink";const ip=({className:e,...t})=>i.jsx(vo,{"aria-label":"Previous page",className:D("gap-1",e),...t,children:i.jsx(mr,{className:"h-4 w-4"})});ip.displayName="PaginationPrevious";const lp=({className:e,...t})=>i.jsx(vo,{"aria-label":"Next page",className:D("gap-1",e),...t,children:i.jsx(Mn,{className:"h-4 w-4"})});lp.displayName="PaginationNext";const cp=({className:e,...t})=>i.jsxs("span",{"aria-hidden":!0,className:D("flex h-9 w-9 items-center justify-center",e),...t,children:[i.jsx(Vb,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"More pages"})]});cp.displayName="PaginationEllipsis";var _s="Progress",Os=100,[gS,_P]=be(_s),[vS,bS]=gS(_s),dp=d.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=wS,...s}=e;(o||o===0)&&!pp(o)&&console.error(yS(`${o}`,"Progress"));const l=pp(o)?o:Os;r!==null&&!hp(r,l)&&console.error(xS(`${r}`,"Progress"));const c=hp(r,l)?r:null,u=bo(c)?a(c,l):void 0;return i.jsx(vS,{scope:n,value:c,max:l,children:i.jsx(W.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":bo(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":mp(c,l),"data-value":c??void 0,"data-max":l,...s,ref:t})})});dp.displayName=_s;var up="ProgressIndicator",fp=d.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=bS(up,n);return i.jsx(W.div,{"data-state":mp(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});fp.displayName=up;function wS(e,t){return`${Math.round(e/t*100)}%`}function mp(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function bo(e){return typeof e=="number"}function pp(e){return bo(e)&&!isNaN(e)&&e>0}function hp(e,t){return bo(e)&&!isNaN(e)&&e<=t&&e>=0}function yS(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Os}\`.`}function xS(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
264
264
|
- a positive number
|
|
265
|
-
- less than the value passed to \`max\` (or ${
|
|
265
|
+
- less than the value passed to \`max\` (or ${Os} if no \`max\` prop is set)
|
|
266
266
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
267
267
|
|
|
268
|
-
Defaulting to \`null\`.`}var dp=op,bS=sp;const Rs=d.forwardRef(({className:e,value:t,...n},r)=>i.jsx(dp,{ref:r,className:D("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:i.jsx(bS,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Rs.displayName=dp.displayName;function wS(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",...l}=e,[c,u]=C.useState(""),[f,m]=C.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},p=y=>y===0?r.veryWeak:y<=25?r.weak:y<=50?r.medium:y<=75?r.strong:r.veryStrong,v=g(c),h=p(v),b=y=>{var w;u(y.target.value),(w=e.onChange)==null||w.call(e,y)};return i.jsxs("div",{className:"w-full space-y-4",children:[i.jsxs("div",{className:"relative",children:[i.jsx(Gn,{...l,type:f?"text":"password",value:c,onChange:b,className:`pr-10 ${n||""}`}),i.jsx(fe,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full",onClick:()=>m(!f),"aria-label":f?a:o,children:f?i.jsx(Bb,{className:"h-4 w-4"}):i.jsx(zb,{className:"h-4 w-4"})})]}),t&&i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex justify-between text-sm",children:[i.jsxs("span",{children:[s,":"]}),i.jsx("span",{children:h})]}),i.jsx(Rs,{value:v,className:"h-2"})]})]})}var Ds="Radio",[yS,up]=be(Ds),[xS,CS]=yS(Ds),fp=d.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:l="on",onCheck:c,form:u,...f}=e,[m,g]=d.useState(null),p=oe(t,b=>g(b)),v=d.useRef(!1),h=m?u||!!m.closest("form"):!0;return i.jsxs(xS,{scope:n,checked:o,disabled:s,children:[i.jsx(W.button,{type:"button",role:"radio","aria-checked":o,"data-state":hp(o),"data-disabled":s?"":void 0,disabled:s,value:l,...f,ref:p,onClick:B(e.onClick,b=>{o||c==null||c(),h&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),h&&i.jsx(NS,{control:m,bubbles:!v.current,name:r,value:l,checked:o,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});fp.displayName=Ds;var mp="RadioIndicator",pp=d.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=CS(mp,n);return i.jsx(xe,{present:r||a.checked,children:i.jsx(W.span,{"data-state":hp(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});pp.displayName=mp;var NS=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=d.useRef(null),s=Wn(n),l=xr(t);return d.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&m){const g=new Event("click",{bubbles:r});m.call(c,n),c.dispatchEvent(g)}},[s,n,r]),i.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function hp(e){return e?"checked":"unchecked"}var SS=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Is="RadioGroup",[ES,OP]=be(Is,[yt,up]),gp=yt(),vp=up(),[kS,PS]=ES(Is),bp=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:l=!1,orientation:c,dir:u,loop:f=!0,onValueChange:m,...g}=e,p=gp(n),v=pt(u),[h,b]=ye({prop:a,defaultProp:o,onChange:m});return i.jsx(kS,{scope:n,name:r,required:s,disabled:l,value:h,onValueChange:b,children:i.jsx(kr,{asChild:!0,...p,orientation:c,dir:v,loop:f,children:i.jsx(W.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":l?"":void 0,dir:v,...g,ref:t})})})});bp.displayName=Is;var wp="RadioGroupItem",yp=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=PS(wp,n),s=a.disabled||r,l=gp(n),c=vp(n),u=d.useRef(null),f=oe(t,u),m=a.value===o.value,g=d.useRef(!1);return d.useEffect(()=>{const p=h=>{SS.includes(h.key)&&(g.current=!0)},v=()=>g.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",v)}},[]),i.jsx(Pr,{asChild:!0,...l,focusable:!s,active:m,children:i.jsx(fp,{disabled:s,required:a.required,checked:m,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:B(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:B(o.onFocus,()=>{var p;g.current&&((p=u.current)==null||p.click())})})})});yp.displayName=wp;var MS="RadioGroupIndicator",xp=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=vp(n);return i.jsx(pp,{...o,...r,ref:t})});xp.displayName=MS;var Cp=bp,Np=yp,TS=xp;const Sp=d.forwardRef(({className:e,...t},n)=>i.jsx(Cp,{className:D("grid gap-2",e),...t,ref:n}));Sp.displayName=Cp.displayName;const Ep=d.forwardRef(({className:e,...t},n)=>i.jsx(Np,{ref:n,className:D("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:i.jsx(TS,{className:"flex items-center justify-center",children:i.jsx(el,{className:"h-3.5 w-3.5 fill-primary"})})}));Ep.displayName=Np.displayName;const jS=["primary","secondary","success","error","warning","info","white","neutral"],AS=["xs","sm","md","lg","xl","2xl"],kp=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"}}),Pp=e=>{const{label:t,size:n,color:r,className:o}=e;return i.jsxs("div",{className:D("flex flex-col justify-center items-center",o),children:[i.jsx(Xb,{className:D(kp({color:r,size:n}),"animate-spin")}),t&&i.jsx("p",{className:D("italic",kp({color:r})),children:t})]})};var _s="Switch",[RS,$P]=be(_s),[DS,IS]=RS(_s),Mp=d.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:l,value:c="on",onCheckedChange:u,form:f,...m}=e,[g,p]=d.useState(null),v=oe(t,x=>p(x)),h=d.useRef(!1),b=g?f||!!g.closest("form"):!0,[y=!1,w]=ye({prop:o,defaultProp:a,onChange:u});return i.jsxs(DS,{scope:n,checked:y,disabled:l,children:[i.jsx(W.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":Ap(y),"data-disabled":l?"":void 0,disabled:l,value:c,...m,ref:v,onClick:B(e.onClick,x=>{w(S=>!S),b&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})}),b&&i.jsx(_S,{control:g,bubbles:!h.current,name:r,value:c,checked:y,required:s,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Mp.displayName=_s;var Tp="SwitchThumb",jp=d.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=IS(Tp,n);return i.jsx(W.span,{"data-state":Ap(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});jp.displayName=Tp;var _S=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=d.useRef(null),s=Wn(n),l=xr(t);return d.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&m){const g=new Event("click",{bubbles:r});m.call(c,n),c.dispatchEvent(g)}},[s,n,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Ap(e){return e?"checked":"unchecked"}var Rp=Mp,OS=jp;const Dp=d.forwardRef(({className:e,...t},n)=>i.jsx(Rp,{className:D("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:i.jsx(OS,{className:D("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=Rp.displayName;var Os="Tabs",[$S,LP]=be(Os,[yt]),Ip=yt(),[LS,$s]=$S(Os),_p=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:c="automatic",...u}=e,f=pt(l),[m,g]=ye({prop:r,onChange:o,defaultProp:a});return i.jsx(LS,{scope:n,baseId:pe(),value:m,onValueChange:g,orientation:s,dir:f,activationMode:c,children:i.jsx(W.div,{dir:f,"data-orientation":s,...u,ref:t})})});_p.displayName=Os;var Op="TabsList",$p=d.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=$s(Op,n),s=Ip(n);return i.jsx(kr,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:i.jsx(W.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});$p.displayName=Op;var Lp="TabsTrigger",Fp=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=$s(Lp,n),l=Ip(n),c=Wp(s.baseId,r),u=Vp(s.baseId,r),f=r===s.value;return i.jsx(Pr,{asChild:!0,...l,focusable:!o,active:f,children:i.jsx(W.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:B(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?s.onValueChange(r):m.preventDefault()}),onKeyDown:B(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&s.onValueChange(r)}),onFocus:B(e.onFocus,()=>{const m=s.activationMode!=="manual";!f&&!o&&m&&s.onValueChange(r)})})})});Fp.displayName=Lp;var Bp="TabsContent",zp=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,l=$s(Bp,n),c=Wp(l.baseId,r),u=Vp(l.baseId,r),f=r===l.value,m=d.useRef(f);return d.useEffect(()=>{const g=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(g)},[]),i.jsx(xe,{present:o||f,children:({present:g})=>i.jsx(W.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!g,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:g&&a})})});zp.displayName=Bp;function Wp(e,t){return`${e}-trigger-${t}`}function Vp(e,t){return`${e}-content-${t}`}var FS=_p,Hp=$p,Gp=Fp,Up=zp;const BS=FS,Yp=d.forwardRef(({className:e,...t},n)=>i.jsx(Hp,{ref:n,className:D("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Yp.displayName=Hp.displayName;const Kp=d.forwardRef(({className:e,...t},n)=>i.jsx(Gp,{ref:n,className:D("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}));Kp.displayName=Gp.displayName;const qp=d.forwardRef(({className:e,...t},n)=>i.jsx(Up,{ref:n,className:D("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));qp.displayName=Up.displayName;const Xp=d.forwardRef(({className:e,...t},n)=>i.jsx("textarea",{className:D("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}));Xp.displayName="Textarea";var zS=e=>{switch(e){case"success":return HS;case"info":return US;case"warning":return GS;case"error":return YS;default:return null}},WS=Array(12).fill(0),VS=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},WS.map((n,r)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),HS=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),GS=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.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"})),US=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),YS=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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=C.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"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),qS=()=>{let[e,t]=C.useState(document.hidden);return C.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Ls=1,XS=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:Ls++,a=this.toasts.find(l=>l.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:s,title:n}):l):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(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 c=>{if(a=["resolve",c],C.isValidElement(c))o=!1,this.create({id:n,type:"default",message:c});else if(QS(c)&&!c.ok){o=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:f})}else if(t.success!==void 0){o=!1;let u=typeof t.success=="function"?await t.success(c):t.success,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:f})}}).catch(async c=>{if(a=["reject",c],t.error!==void 0){o=!1;let u=typeof t.error=="function"?await t.error(c):t.error,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:f})}}).finally(()=>{var c;o&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>s.then(()=>a[0]==="reject"?u(a[1]):c(a[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Ls++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ae=new XS,ZS=(e,t)=>{let n=(t==null?void 0:t.id)||Ls++;return Ae.addToast({title:e,...t,id:n}),n},QS=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",JS=ZS,eE=()=>Ae.toasts,tE=()=>Ae.getActiveToasts(),lt=Object.assign(JS,{success:Ae.success,info:Ae.info,warning:Ae.warning,error:Ae.error,custom:Ae.custom,message:Ae.message,promise:Ae.promise,dismiss:Ae.dismiss,loading:Ae.loading},{getHistory:eE,getToasts:tE});function nE(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))}nE(`: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:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-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:-50%;right:-50%;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-y, 0px)) translate(var(--swipe-amount-x, 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-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);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-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--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-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[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%)}
|
|
269
|
-
`);function ho(e){return e.label!==void 0}var rE=3,oE="32px",aE="16px",Zp=4e3,sE=356,iE=14,lE=20,cE=200;function Ue(...e){return e.filter(Boolean).join(" ")}function dE(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var uE=e=>{var t,n,r,o,a,s,l,c,u,f,m;let{invert:g,toast:p,unstyled:v,interacting:h,setHeights:b,visibleToasts:y,heights:w,index:x,toasts:S,expanded:E,removeToast:A,defaultRichColors:k,closeButton:P,style:T,cancelButtonStyle:$,actionButtonStyle:Z,className:z="",descriptionClassName:ee="",duration:Y,position:te,gap:V,loadingIcon:Q,expandByDefault:O,classNames:_,icons:j,closeButtonAriaLabel:H="Close toast",pauseWhenPageIsHidden:M}=e,[I,L]=C.useState(null),[F,J]=C.useState(null),[R,U]=C.useState(!1),[K,ne]=C.useState(!1),[ae,se]=C.useState(!1),[Ce,Ne]=C.useState(!1),[Le,Re]=C.useState(!1),[Ee,G]=C.useState(0),[re,ce]=C.useState(0),he=C.useRef(p.duration||Y||Zp),Fe=C.useRef(null),Me=C.useRef(null),ct=x===0,_k=x+1<=y,Be=p.type,bn=p.dismissible!==!1,Ok=p.className||"",$k=p.descriptionClassName||"",So=C.useMemo(()=>w.findIndex(ie=>ie.toastId===p.id)||0,[w,p.id]),Lk=C.useMemo(()=>{var ie;return(ie=p.closeButton)!=null?ie:P},[p.closeButton,P]),$h=C.useMemo(()=>p.duration||Y||Zp,[p.duration,Y]),Zs=C.useRef(0),wn=C.useRef(0),Lh=C.useRef(0),yn=C.useRef(null),[Fk,Bk]=te.split("-"),Fh=C.useMemo(()=>w.reduce((ie,me,ge)=>ge>=So?ie:ie+me.height,0),[w,So]),Bh=qS(),zk=p.invert||g,Qs=Be==="loading";wn.current=C.useMemo(()=>So*V+Fh,[So,Fh]),C.useEffect(()=>{he.current=$h},[$h]),C.useEffect(()=>{U(!0)},[]),C.useEffect(()=>{let ie=Me.current;if(ie){let me=ie.getBoundingClientRect().height;return ce(me),b(ge=>[{toastId:p.id,height:me,position:p.position},...ge]),()=>b(ge=>ge.filter(Ye=>Ye.toastId!==p.id))}},[b,p.id]),C.useLayoutEffect(()=>{if(!R)return;let ie=Me.current,me=ie.style.height;ie.style.height="auto";let ge=ie.getBoundingClientRect().height;ie.style.height=me,ce(ge),b(Ye=>Ye.find(Ke=>Ke.toastId===p.id)?Ye.map(Ke=>Ke.toastId===p.id?{...Ke,height:ge}:Ke):[{toastId:p.id,height:ge,position:p.position},...Ye])},[R,p.title,p.description,b,p.id]);let Tt=C.useCallback(()=>{ne(!0),G(wn.current),b(ie=>ie.filter(me=>me.toastId!==p.id)),setTimeout(()=>{A(p)},cE)},[p,A,b,wn]);C.useEffect(()=>{if(p.promise&&Be==="loading"||p.duration===1/0||p.type==="loading")return;let ie;return E||h||M&&Bh?(()=>{if(Lh.current<Zs.current){let me=new Date().getTime()-Zs.current;he.current=he.current-me}Lh.current=new Date().getTime()})():he.current!==1/0&&(Zs.current=new Date().getTime(),ie=setTimeout(()=>{var me;(me=p.onAutoClose)==null||me.call(p,p),Tt()},he.current)),()=>clearTimeout(ie)},[E,h,p,Be,M,Bh,Tt]),C.useEffect(()=>{p.delete&&Tt()},[Tt,p.delete]);function Wk(){var ie,me,ge;return j!=null&&j.loading?C.createElement("div",{className:Ue(_==null?void 0:_.loader,(ie=p==null?void 0:p.classNames)==null?void 0:ie.loader,"sonner-loader"),"data-visible":Be==="loading"},j.loading):Q?C.createElement("div",{className:Ue(_==null?void 0:_.loader,(me=p==null?void 0:p.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":Be==="loading"},Q):C.createElement(VS,{className:Ue(_==null?void 0:_.loader,(ge=p==null?void 0:p.classNames)==null?void 0:ge.loader),visible:Be==="loading"})}return C.createElement("li",{tabIndex:0,ref:Me,className:Ue(z,Ok,_==null?void 0:_.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,_==null?void 0:_.default,_==null?void 0:_[Be],(n=p==null?void 0:p.classNames)==null?void 0:n[Be]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:k,"data-styled":!(p.jsx||p.unstyled||v),"data-mounted":R,"data-promise":!!p.promise,"data-swiped":Le,"data-removed":K,"data-visible":_k,"data-y-position":Fk,"data-x-position":Bk,"data-index":x,"data-front":ct,"data-swiping":ae,"data-dismissible":bn,"data-type":Be,"data-invert":zk,"data-swipe-out":Ce,"data-swipe-direction":F,"data-expanded":!!(E||O&&R),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${K?Ee:wn.current}px`,"--initial-height":O?"auto":`${re}px`,...T,...p.style},onDragEnd:()=>{se(!1),L(null),yn.current=null},onPointerDown:ie=>{Qs||!bn||(Fe.current=new Date,G(wn.current),ie.target.setPointerCapture(ie.pointerId),ie.target.tagName!=="BUTTON"&&(se(!0),yn.current={x:ie.clientX,y:ie.clientY}))},onPointerUp:()=>{var ie,me,ge,Ye;if(Ce||!bn)return;yn.current=null;let Ke=Number(((ie=Me.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),jt=Number(((me=Me.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Wt=new Date().getTime()-((ge=Fe.current)==null?void 0:ge.getTime()),qe=I==="x"?Ke:jt,At=Math.abs(qe)/Wt;if(Math.abs(qe)>=lE||At>.11){G(wn.current),(Ye=p.onDismiss)==null||Ye.call(p,p),J(I==="x"?Ke>0?"right":"left":jt>0?"down":"up"),Tt(),Ne(!0),Re(!1);return}se(!1),L(null)},onPointerMove:ie=>{var me,ge,Ye,Ke;if(!yn.current||!bn||((me=window.getSelection())==null?void 0:me.toString().length)>0)return;let jt=ie.clientY-yn.current.y,Wt=ie.clientX-yn.current.x,qe=(ge=e.swipeDirections)!=null?ge:dE(te);!I&&(Math.abs(Wt)>1||Math.abs(jt)>1)&&L(Math.abs(Wt)>Math.abs(jt)?"x":"y");let At={x:0,y:0};I==="y"?(qe.includes("top")||qe.includes("bottom"))&&(qe.includes("top")&&jt<0||qe.includes("bottom")&&jt>0)&&(At.y=jt):I==="x"&&(qe.includes("left")||qe.includes("right"))&&(qe.includes("left")&&Wt<0||qe.includes("right")&&Wt>0)&&(At.x=Wt),(Math.abs(At.x)>0||Math.abs(At.y)>0)&&Re(!0),(Ye=Me.current)==null||Ye.style.setProperty("--swipe-amount-x",`${At.x}px`),(Ke=Me.current)==null||Ke.style.setProperty("--swipe-amount-y",`${At.y}px`)}},Lk&&!p.jsx?C.createElement("button",{"aria-label":H,"data-disabled":Qs,"data-close-button":!0,onClick:Qs||!bn?()=>{}:()=>{var ie;Tt(),(ie=p.onDismiss)==null||ie.call(p,p)},className:Ue(_==null?void 0:_.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(a=j==null?void 0:j.close)!=null?a:KS):null,p.jsx||C.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:C.createElement(C.Fragment,null,Be||p.icon||p.promise?C.createElement("div",{"data-icon":"",className:Ue(_==null?void 0:_.icon,(s=p==null?void 0:p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Wk():null,p.type!=="loading"?p.icon||(j==null?void 0:j[Be])||zS(Be):null):null,C.createElement("div",{"data-content":"",className:Ue(_==null?void 0:_.content,(l=p==null?void 0:p.classNames)==null?void 0:l.content)},C.createElement("div",{"data-title":"",className:Ue(_==null?void 0:_.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?C.createElement("div",{"data-description":"",className:Ue(ee,$k,_==null?void 0:_.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),C.isValidElement(p.cancel)?p.cancel:p.cancel&&ho(p.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||$,onClick:ie=>{var me,ge;ho(p.cancel)&&bn&&((ge=(me=p.cancel).onClick)==null||ge.call(me,ie),Tt())},className:Ue(_==null?void 0:_.cancelButton,(f=p==null?void 0:p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,C.isValidElement(p.action)?p.action:p.action&&ho(p.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||Z,onClick:ie=>{var me,ge;ho(p.action)&&((ge=(me=p.action).onClick)==null||ge.call(me,ie),!ie.defaultPrevented&&Tt())},className:Ue(_==null?void 0:_.actionButton,(m=p==null?void 0:p.classNames)==null?void 0:m.actionButton)},p.action.label):null))};function Qp(){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}function fE(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,s=a?"--mobile-offset":"--offset",l=a?aE:oE;function c(u){["top","right","bottom","left"].forEach(f=>{n[`${s}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=l:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}var mE=C.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:s,className:l,offset:c,mobileOffset:u,theme:f="light",richColors:m,duration:g,style:p,visibleToasts:v=rE,toastOptions:h,dir:b=Qp(),gap:y=iE,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:E}=e,[A,k]=C.useState([]),P=C.useMemo(()=>Array.from(new Set([r].concat(A.filter(M=>M.position).map(M=>M.position)))),[A,r]),[T,$]=C.useState([]),[Z,z]=C.useState(!1),[ee,Y]=C.useState(!1),[te,V]=C.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=C.useRef(null),O=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=C.useRef(null),j=C.useRef(!1),H=C.useCallback(M=>{k(I=>{var L;return(L=I.find(F=>F.id===M.id))!=null&&L.delete||Ae.dismiss(M.id),I.filter(({id:F})=>F!==M.id)})},[]);return C.useEffect(()=>Ae.subscribe(M=>{if(M.dismiss){k(I=>I.map(L=>L.id===M.id?{...L,delete:!0}:L));return}setTimeout(()=>{Qn.flushSync(()=>{k(I=>{let L=I.findIndex(F=>F.id===M.id);return L!==-1?[...I.slice(0,L),{...I[L],...M},...I.slice(L+1)]:[M,...I]})})})}),[]),C.useEffect(()=>{if(f!=="system"){V(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let M=window.matchMedia("(prefers-color-scheme: dark)");try{M.addEventListener("change",({matches:I})=>{V(I?"dark":"light")})}catch{M.addListener(({matches:L})=>{try{V(L?"dark":"light")}catch(F){console.error(F)}})}},[f]),C.useEffect(()=>{A.length<=1&&z(!1)},[A]),C.useEffect(()=>{let M=I=>{var L,F;o.every(J=>I[J]||I.code===J)&&(z(!0),(L=Q.current)==null||L.focus()),I.code==="Escape"&&(document.activeElement===Q.current||(F=Q.current)!=null&&F.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[o]),C.useEffect(()=>{if(Q.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,j.current=!1)}},[Q.current]),C.createElement("section",{ref:t,"aria-label":`${S} ${O}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((M,I)=>{var L;let[F,J]=M.split("-");return A.length?C.createElement("ol",{key:M,dir:b==="auto"?Qp():b,tabIndex:-1,ref:Q,className:l,"data-sonner-toaster":!0,"data-theme":te,"data-y-position":F,"data-lifted":Z&&A.length>1&&!a,"data-x-position":J,style:{"--front-toast-height":`${((L=T[0])==null?void 0:L.height)||0}px`,"--width":`${sE}px`,"--gap":`${y}px`,...p,...fE(c,u)},onBlur:R=>{j.current&&!R.currentTarget.contains(R.relatedTarget)&&(j.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:R=>{R.target instanceof HTMLElement&&R.target.dataset.dismissible==="false"||j.current||(j.current=!0,_.current=R.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{ee||z(!1)},onDragEnd:()=>z(!1),onPointerDown:R=>{R.target instanceof HTMLElement&&R.target.dataset.dismissible==="false"||Y(!0)},onPointerUp:()=>Y(!1)},A.filter(R=>!R.position&&I===0||R.position===M).map((R,U)=>{var K,ne;return C.createElement(uE,{key:R.id,icons:x,index:U,toast:R,defaultRichColors:m,duration:(K=h==null?void 0:h.duration)!=null?K:g,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:n,visibleToasts:v,closeButton:(ne=h==null?void 0:h.closeButton)!=null?ne:s,interacting:ee,position:M,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:H,toasts:A.filter(ae=>ae.position==R.position),heights:T.filter(ae=>ae.position==R.position),setHeights:$,expandByDefault:a,gap:y,loadingIcon:w,expanded:Z,pauseWhenPageIsHidden:E,swipeDirections:e.swipeDirections})})):null}))});const go=({onClick:e})=>i.jsx(fe,{onClick:()=>e(),variant:"ghost",size:"xl",className:"ml-auto px-3",children:i.jsx(mt,{className:"!h-6 !w-6"})}),pE={...lt,success:(e,t)=>{const n=lt.success(e,{...t,cancel:i.jsx(go,{onClick:()=>lt.dismiss(n)})});return n},error:(e,t)=>{const n=lt.error(e,{...t,cancel:i.jsx(go,{onClick:()=>lt.dismiss(n)})});return n},warning:(e,t)=>{const n=lt.warning(e,{...t,cancel:i.jsx(go,{onClick:()=>lt.dismiss(n)})});return n},info:(e,t)=>{const n=lt.info(e,{...t,cancel:i.jsx(go,{onClick:()=>lt.dismiss(n)})});return n}},hE=({...e})=>i.jsx(mE,{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 gE="Toggle",Fs=d.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...a}=e,[s=!1,l]=ye({prop:n,onChange:o,defaultProp:r});return i.jsx(W.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:B(e.onClick,()=>{e.disabled||l(!s)})})});Fs.displayName=gE;var Jp=Fs;const Bs=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"}}),eh=d.forwardRef(({className:e,variant:t,size:n,...r},o)=>i.jsx(Jp,{ref:o,className:D(Bs({variant:t,size:n,className:e})),...r}));eh.displayName=Jp.displayName;var gn="ToggleGroup",[th,FP]=be(gn,[yt]),nh=yt(),zs=C.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return i.jsx(vE,{...o,ref:t})}if(n==="multiple"){const o=r;return i.jsx(bE,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${gn}\``)});zs.displayName=gn;var[rh,oh]=th(gn),vE=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,l]=ye({prop:n,defaultProp:r,onChange:o});return i.jsx(rh,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:l,onItemDeactivate:C.useCallback(()=>l(""),[l]),children:i.jsx(ah,{...a,ref:t})})}),bE=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s=[],l]=ye({prop:n,defaultProp:r,onChange:o}),c=C.useCallback(f=>l((m=[])=>[...m,f]),[l]),u=C.useCallback(f=>l((m=[])=>m.filter(g=>g!==f)),[l]);return i.jsx(rh,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:c,onItemDeactivate:u,children:i.jsx(ah,{...a,ref:t})})});zs.displayName=gn;var[wE,yE]=th(gn),ah=C.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:s,loop:l=!0,...c}=e,u=nh(n),f=pt(s),m={role:"group",dir:f,...c};return i.jsx(wE,{scope:n,rovingFocus:o,disabled:r,children:o?i.jsx(kr,{asChild:!0,...u,orientation:a,dir:f,loop:l,children:i.jsx(W.div,{...m,ref:t})}):i.jsx(W.div,{...m,ref:t})})}),vo="ToggleGroupItem",sh=C.forwardRef((e,t)=>{const n=oh(vo,e.__scopeToggleGroup),r=yE(vo,e.__scopeToggleGroup),o=nh(e.__scopeToggleGroup),a=n.value.includes(e.value),s=r.disabled||e.disabled,l={...e,pressed:a,disabled:s},c=C.useRef(null);return r.rovingFocus?i.jsx(Pr,{asChild:!0,...o,focusable:!s,active:a,ref:c,children:i.jsx(ih,{...l,ref:t})}):i.jsx(ih,{...l,ref:t})});sh.displayName=vo;var ih=C.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=oh(vo,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?s:void 0;return i.jsx(Fs,{...l,...o,ref:t,onPressedChange:c=>{c?a.onItemActivate(r):a.onItemDeactivate(r)}})}),lh=zs,ch=sh;const dh=d.createContext({size:"default",variant:"default"}),uh=d.forwardRef(({className:e,variant:t,size:n,children:r,...o},a)=>i.jsx(lh,{ref:a,className:D("flex items-center justify-center gap-1",e),...o,children:i.jsx(dh.Provider,{value:{variant:t,size:n},children:r})}));uh.displayName=lh.displayName;const fh=d.forwardRef(({className:e,children:t,variant:n,size:r,...o},a)=>{const s=d.useContext(dh);return i.jsx(ch,{ref:a,className:D(Bs({variant:s.variant||n,size:s.size||r}),e),...o,children:t})});fh.displayName=ch.displayName;var[bo,BP]=be("Tooltip",[wt]),wo=wt(),mh="TooltipProvider",xE=700,Ws="tooltip.open",[CE,Vs]=bo(mh),ph=e=>{const{__scopeTooltip:t,delayDuration:n=xE,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=d.useRef(!0),l=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),i.jsx(CE,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:d.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:a})};ph.displayName=mh;var yo="Tooltip",[NE,Xn]=bo(yo),hh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,c=Vs(yo,e.__scopeTooltip),u=wo(t),[f,m]=d.useState(null),g=pe(),p=d.useRef(0),v=s??c.disableHoverableContent,h=l??c.delayDuration,b=d.useRef(!1),[y=!1,w]=ye({prop:r,defaultProp:o,onChange:k=>{k?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ws))):c.onClose(),a==null||a(k)}}),x=d.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),S=d.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,w(!0)},[w]),E=d.useCallback(()=>{window.clearTimeout(p.current),p.current=0,w(!1)},[w]),A=d.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,w(!0),p.current=0},h)},[h,w]);return d.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),i.jsx(Rn,{...u,children:i.jsx(NE,{scope:t,contentId:g,open:y,stateAttribute:x,trigger:f,onTriggerChange:m,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?A():S()},[c.isOpenDelayedRef,A,S]),onTriggerLeave:d.useCallback(()=>{v?E():(window.clearTimeout(p.current),p.current=0)},[E,v]),onOpen:S,onClose:E,disableHoverableContent:v,children:n})})};hh.displayName=yo;var Hs="TooltipTrigger",gh=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Xn(Hs,n),a=Vs(Hs,n),s=wo(n),l=d.useRef(null),c=oe(t,l,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),m=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),i.jsx(Dn,{asChild:!0,...s,children:i.jsx(W.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:B(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:B(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:B(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:B(e.onBlur,o.onClose),onClick:B(e.onClick,o.onClose)})})});gh.displayName=Hs;var Gs="TooltipPortal",[SE,EE]=bo(Gs,{forceMount:void 0}),vh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Xn(Gs,t);return i.jsx(SE,{scope:t,forceMount:n,children:i.jsx(xe,{present:n||a.open,children:i.jsx(In,{asChild:!0,container:o,children:r})})})};vh.displayName=Gs;var vn="TooltipContent",bh=d.forwardRef((e,t)=>{const n=EE(vn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Xn(vn,e.__scopeTooltip);return i.jsx(xe,{present:r||s.open,children:s.disableHoverableContent?i.jsx(wh,{side:o,...a,ref:t}):i.jsx(kE,{side:o,...a,ref:t})})}),kE=d.forwardRef((e,t)=>{const n=Xn(vn,e.__scopeTooltip),r=Vs(vn,e.__scopeTooltip),o=d.useRef(null),a=oe(t,o),[s,l]=d.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:m}=r,g=d.useCallback(()=>{l(null),m(!1)},[m]),p=d.useCallback((v,h)=>{const b=v.currentTarget,y={x:v.clientX,y:v.clientY},w=AE(y,b.getBoundingClientRect()),x=RE(y,w),S=DE(h.getBoundingClientRect()),E=_E([...x,...S]);l(E),m(!0)},[m]);return d.useEffect(()=>()=>g(),[g]),d.useEffect(()=>{if(c&&f){const v=b=>p(b,f),h=b=>p(b,c);return c.addEventListener("pointerleave",v),f.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",h)}}},[c,f,p,g]),d.useEffect(()=>{if(s){const v=h=>{const b=h.target,y={x:h.clientX,y:h.clientY},w=(c==null?void 0:c.contains(b))||(f==null?void 0:f.contains(b)),x=!IE(y,s);w?g():x&&(g(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,f,s,u,g]),i.jsx(wh,{...e,ref:a})}),[PE,ME]=bo(yo,{isInside:!1}),TE=Ui("TooltipContent"),wh=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=e,c=Xn(vn,n),u=wo(n),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(Ws,f),()=>document.removeEventListener(Ws,f)),[f]),d.useEffect(()=>{if(c.trigger){const m=g=>{const p=g.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,f]),i.jsx(_t,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:i.jsxs(Cr,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[i.jsx(TE,{children:r}),i.jsx(PE,{scope:n,isInside:!0,children:i.jsx(md,{id:c.contentId,role:"tooltip",children:o||r})})]})})});bh.displayName=vn;var yh="TooltipArrow",jE=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=wo(n);return ME(yh,n).isInside?null:i.jsx(Nr,{...o,...r,ref:t})});jE.displayName=yh;function AE(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 RE(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 DE(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 IE(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 l=t[a].x,c=t[a].y,u=t[s].x,f=t[s].y;c>r!=f>r&&n<(u-l)*(r-c)/(f-c)+l&&(o=!o)}return o}function _E(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),OE(t)}function OE(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 $E=ph,LE=hh,FE=gh,BE=vh,xh=bh;const zE=$E,WE=LE,VE=FE,Ch=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(BE,{children:i.jsx(xh,{ref:r,sideOffset:t,className:D("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})}));Ch.displayName=xh.displayName;const Nh=d.createContext(void 0),Sh={sm:"sm:max-w-[425px]",md:"sm:max-w-[550px]",lg:"sm:max-w-[700px]",xl:"sm:max-w-[900px]"},Eh={info:{icon:Gb,className:"text-blue-500"},success:{icon:$b,className:"text-green-500"},error:{icon:Vo,className:"text-red-500"},warning:{icon:Ob,className:"text-yellow-500"},confirm:{icon:Ji,className:"text-blue-500"},custom:{icon:Ji,className:"text-gray-500"}};function HE({children:e}){var h,b,y,w,x,S,E,A,k,P,T,$,Z;const[t,n]=d.useState({isOpen:!1,options:null}),r=d.useCallback(z=>{n({isOpen:!0,options:z})},[]),o=d.useCallback(()=>{n(z=>({...z,isOpen:!1}))},[]),a=d.useCallback(z=>{r({...z,type:"info"})},[r]),s=d.useCallback(z=>{r({...z,type:"success"})},[r]),l=d.useCallback(z=>{r({...z,type:"error"})},[r]),c=d.useCallback(z=>{r({...z,type:"warning"})},[r]),u=d.useCallback(z=>{r({...z,type:"custom"})},[r]),f=d.useCallback(z=>{r({...z,type:"confirm"})},[r]),m=(z,ee)=>{let Y=Eh[z].icon;return ee&&(Y=ee),i.jsx(Y,{className:D("h-24 w-24",Eh[z].className)})},g=d.useMemo(()=>({open:r,close:o,info:a,success:s,error:l,warning:c,custom:u,confirm:f}),[r,o,a,s,l,c,u,f]),[p,v]=d.useState(!1);return i.jsxs(Nh.Provider,{value:g,children:[e,i.jsx(ro,{open:t.isOpen,onOpenChange:z=>!z&&o(),modal:!0,children:i.jsxs(Kn,{className:D((h=t.options)!=null&&h.size?Sh[t.options.size]:Sh.sm,(b=t.options)==null?void 0:b.className),children:[t.options&&i.jsxs(oo,{children:[i.jsx("div",{className:"mx-auto mb-6",children:m(t.options.type,t.options.icon)}),t.options.title&&i.jsx(ao,{className:"text-center",children:t.options.title}),i.jsx(so,{className:"text-center",children:t.options.message})]}),((y=t.options)==null?void 0:y.type)==="confirm"&&i.jsxs("div",{className:"flex justify-center gap-4 mt-4",children:[i.jsx(fe,{isLoading:p??((x=(w=t.options)==null?void 0:w.confirmButton)==null?void 0:x.loading),disabled:(E=(S=t.options)==null?void 0:S.confirmButton)==null?void 0:E.disabled,className:(A=t.options.confirmButton)==null?void 0:A.className,onClick:()=>{var ee,Y,te,V;if(!((Y=(ee=t.options)==null?void 0:ee.confirmButton)!=null&&Y.onClick))throw new Error("Confirmation type dialog needs to implement the onConfirm function");const z=(V=(te=t.options)==null?void 0:te.confirmButton)==null?void 0:V.onClick();z instanceof Promise?(v(!0),z.then(()=>{v(!1),o()}).finally(()=>v(!1))):o()},children:((k=t.options.confirmButton)==null?void 0:k.label)??"Confirm"}),((P=t.options.cancelButton)==null?void 0:P.label)&&i.jsx(fe,{variant:"outline",onClick:o,className:t.options.cancelButton.className,isLoading:(T=t.options.cancelButton)==null?void 0:T.loading,disabled:p||(($=t.options.cancelButton)==null?void 0:$.disabled),children:(Z=t.options.cancelButton)==null?void 0:Z.label})]})]})})]})}function GE(){const e=d.useContext(Nh);if(e===void 0)throw new Error("useDialog must be used within a DialogProvider");return e}const UE=(e=!1)=>{const[t,n]=d.useState(e),r=d.useCallback(()=>n(!0),[]),o=d.useCallback(()=>n(!1),[]),a=d.useCallback(()=>n(s=>!s),[]);return{isOpen:t,open:r,close:o,toggle:a}},YE=(e=!1)=>{const[t,n]=d.useState(e),r=d.useCallback(()=>n(!0),[]),o=d.useCallback(()=>n(!1),[]);return[t,r,o]};/*!
|
|
268
|
+
Defaulting to \`null\`.`}var gp=dp,CS=fp;const $s=d.forwardRef(({className:e,value:t,...n},r)=>i.jsx(gp,{ref:r,className:D("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:i.jsx(CS,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));$s.displayName=gp.displayName;function NS(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",...l}=e,[c,u]=C.useState(""),[f,m]=C.useState(!1),h=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},p=y=>y===0?r.veryWeak:y<=25?r.weak:y<=50?r.medium:y<=75?r.strong:r.veryStrong,v=h(c),g=p(v),b=y=>{var w;u(y.target.value),(w=e.onChange)==null||w.call(e,y)};return i.jsxs("div",{className:"w-full space-y-4",children:[i.jsxs("div",{className:"relative",children:[i.jsx(Yn,{...l,type:f?"text":"password",value:c,onChange:b,className:`pr-10 ${n||""}`}),i.jsx(fe,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full",onClick:()=>m(!f),"aria-label":f?a:o,children:f?i.jsx(Hb,{className:"h-4 w-4"}):i.jsx(Gb,{className:"h-4 w-4"})})]}),t&&i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex justify-between text-sm",children:[i.jsxs("span",{children:[s,":"]}),i.jsx("span",{children:g})]}),i.jsx($s,{value:v,className:"h-2"})]})]})}var Ls="Radio",[SS,vp]=be(Ls),[ES,kS]=SS(Ls),bp=d.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:l="on",onCheck:c,form:u,...f}=e,[m,h]=d.useState(null),p=oe(t,b=>h(b)),v=d.useRef(!1),g=m?u||!!m.closest("form"):!0;return i.jsxs(ES,{scope:n,checked:o,disabled:s,children:[i.jsx(W.button,{type:"button",role:"radio","aria-checked":o,"data-state":xp(o),"data-disabled":s?"":void 0,disabled:s,value:l,...f,ref:p,onClick:B(e.onClick,b=>{o||c==null||c(),g&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),g&&i.jsx(PS,{control:m,bubbles:!v.current,name:r,value:l,checked:o,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});bp.displayName=Ls;var wp="RadioIndicator",yp=d.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=kS(wp,n);return i.jsx(Ce,{present:r||a.checked,children:i.jsx(W.span,{"data-state":xp(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});yp.displayName=wp;var PS=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=d.useRef(null),s=Hn(n),l=Er(t);return d.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&m){const h=new Event("click",{bubbles:r});m.call(c,n),c.dispatchEvent(h)}},[s,n,r]),i.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function xp(e){return e?"checked":"unchecked"}var TS=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Fs="RadioGroup",[MS,OP]=be(Fs,[Ct,vp]),Cp=Ct(),Np=vp(),[jS,AS]=MS(Fs),Sp=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:l=!1,orientation:c,dir:u,loop:f=!0,onValueChange:m,...h}=e,p=Cp(n),v=gt(u),[g,b]=xe({prop:a,defaultProp:o,onChange:m});return i.jsx(jS,{scope:n,name:r,required:s,disabled:l,value:g,onValueChange:b,children:i.jsx(jr,{asChild:!0,...p,orientation:c,dir:v,loop:f,children:i.jsx(W.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":l?"":void 0,dir:v,...h,ref:t})})})});Sp.displayName=Fs;var Ep="RadioGroupItem",kp=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=AS(Ep,n),s=a.disabled||r,l=Cp(n),c=Np(n),u=d.useRef(null),f=oe(t,u),m=a.value===o.value,h=d.useRef(!1);return d.useEffect(()=>{const p=g=>{TS.includes(g.key)&&(h.current=!0)},v=()=>h.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",v)}},[]),i.jsx(Ar,{asChild:!0,...l,focusable:!s,active:m,children:i.jsx(bp,{disabled:s,required:a.required,checked:m,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:B(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:B(o.onFocus,()=>{var p;h.current&&((p=u.current)==null||p.click())})})})});kp.displayName=Ep;var RS="RadioGroupIndicator",Pp=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Np(n);return i.jsx(yp,{...o,...r,ref:t})});Pp.displayName=RS;var Tp=Sp,Mp=kp,DS=Pp;const jp=d.forwardRef(({className:e,...t},n)=>i.jsx(Tp,{className:D("grid gap-2",e),...t,ref:n}));jp.displayName=Tp.displayName;const Ap=d.forwardRef(({className:e,...t},n)=>i.jsx(Mp,{ref:n,className:D("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:i.jsx(DS,{className:"flex items-center justify-center",children:i.jsx(sl,{className:"h-3.5 w-3.5 fill-primary"})})}));Ap.displayName=Mp.displayName;const IS=["primary","secondary","success","error","warning","info","white","neutral"],_S=["xs","sm","md","lg","xl","2xl"],Rp=$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"}}),Dp=e=>{const{label:t,size:n,color:r,className:o}=e;return i.jsxs("div",{className:D("flex flex-col justify-center items-center",o),children:[i.jsx(ew,{className:D(Rp({color:r,size:n}),"animate-spin")}),t&&i.jsx("p",{className:D("italic",Rp({color:r})),children:t})]})};var Bs="Switch",[OS,$P]=be(Bs),[$S,LS]=OS(Bs),Ip=d.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:l,value:c="on",onCheckedChange:u,form:f,...m}=e,[h,p]=d.useState(null),v=oe(t,x=>p(x)),g=d.useRef(!1),b=h?f||!!h.closest("form"):!0,[y=!1,w]=xe({prop:o,defaultProp:a,onChange:u});return i.jsxs($S,{scope:n,checked:y,disabled:l,children:[i.jsx(W.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":$p(y),"data-disabled":l?"":void 0,disabled:l,value:c,...m,ref:v,onClick:B(e.onClick,x=>{w(S=>!S),b&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),b&&i.jsx(FS,{control:h,bubbles:!g.current,name:r,value:c,checked:y,required:s,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Ip.displayName=Bs;var _p="SwitchThumb",Op=d.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=LS(_p,n);return i.jsx(W.span,{"data-state":$p(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Op.displayName=_p;var FS=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=d.useRef(null),s=Hn(n),l=Er(t);return d.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&m){const h=new Event("click",{bubbles:r});m.call(c,n),c.dispatchEvent(h)}},[s,n,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function $p(e){return e?"checked":"unchecked"}var Lp=Ip,BS=Op;const Fp=d.forwardRef(({className:e,...t},n)=>i.jsx(Lp,{className:D("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:i.jsx(BS,{className:D("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")})}));Fp.displayName=Lp.displayName;var zs="Tabs",[zS,LP]=be(zs,[Ct]),Bp=Ct(),[WS,Ws]=zS(zs),zp=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:c="automatic",...u}=e,f=gt(l),[m,h]=xe({prop:r,onChange:o,defaultProp:a});return i.jsx(WS,{scope:n,baseId:pe(),value:m,onValueChange:h,orientation:s,dir:f,activationMode:c,children:i.jsx(W.div,{dir:f,"data-orientation":s,...u,ref:t})})});zp.displayName=zs;var Wp="TabsList",Vp=d.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Ws(Wp,n),s=Bp(n);return i.jsx(jr,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:i.jsx(W.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Vp.displayName=Wp;var Hp="TabsTrigger",Gp=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Ws(Hp,n),l=Bp(n),c=Kp(s.baseId,r),u=qp(s.baseId,r),f=r===s.value;return i.jsx(Ar,{asChild:!0,...l,focusable:!o,active:f,children:i.jsx(W.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:B(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?s.onValueChange(r):m.preventDefault()}),onKeyDown:B(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&s.onValueChange(r)}),onFocus:B(e.onFocus,()=>{const m=s.activationMode!=="manual";!f&&!o&&m&&s.onValueChange(r)})})})});Gp.displayName=Hp;var Up="TabsContent",Yp=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,l=Ws(Up,n),c=Kp(l.baseId,r),u=qp(l.baseId,r),f=r===l.value,m=d.useRef(f);return d.useEffect(()=>{const h=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(h)},[]),i.jsx(Ce,{present:o||f,children:({present:h})=>i.jsx(W.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:h&&a})})});Yp.displayName=Up;function Kp(e,t){return`${e}-trigger-${t}`}function qp(e,t){return`${e}-content-${t}`}var VS=zp,Xp=Vp,Zp=Gp,Qp=Yp;const HS=VS,Jp=d.forwardRef(({className:e,...t},n)=>i.jsx(Xp,{ref:n,className:D("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Jp.displayName=Xp.displayName;const eh=d.forwardRef(({className:e,...t},n)=>i.jsx(Zp,{ref:n,className:D("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}));eh.displayName=Zp.displayName;const th=d.forwardRef(({className:e,...t},n)=>i.jsx(Qp,{ref:n,className:D("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));th.displayName=Qp.displayName;const nh=d.forwardRef(({className:e,...t},n)=>i.jsx("textarea",{className:D("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}));nh.displayName="Textarea";var GS=e=>{switch(e){case"success":return KS;case"info":return XS;case"warning":return qS;case"error":return ZS;default:return null}},US=Array(12).fill(0),YS=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},US.map((n,r)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),KS=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),qS=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.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"})),XS=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),ZS=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),QS=C.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"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),JS=()=>{let[e,t]=C.useState(document.hidden);return C.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Vs=1,eE=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:Vs++,a=this.toasts.find(l=>l.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:s,title:n}):l):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(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 c=>{if(a=["resolve",c],C.isValidElement(c))o=!1,this.create({id:n,type:"default",message:c});else if(nE(c)&&!c.ok){o=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:f})}else if(t.success!==void 0){o=!1;let u=typeof t.success=="function"?await t.success(c):t.success,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:f})}}).catch(async c=>{if(a=["reject",c],t.error!==void 0){o=!1;let u=typeof t.error=="function"?await t.error(c):t.error,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:f})}}).finally(()=>{var c;o&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>s.then(()=>a[0]==="reject"?u(a[1]):c(a[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Vs++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ae=new eE,tE=(e,t)=>{let n=(t==null?void 0:t.id)||Vs++;return Ae.addToast({title:e,...t,id:n}),n},nE=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",rE=tE,oE=()=>Ae.toasts,aE=()=>Ae.getActiveToasts(),dt=Object.assign(rE,{success:Ae.success,info:Ae.info,warning:Ae.warning,error:Ae.error,custom:Ae.custom,message:Ae.message,promise:Ae.promise,dismiss:Ae.dismiss,loading:Ae.loading},{getHistory:oE,getToasts:aE});function sE(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))}sE(`: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:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-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:-50%;right:-50%;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-y, 0px)) translate(var(--swipe-amount-x, 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-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);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-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--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-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[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%)}
|
|
269
|
+
`);function wo(e){return e.label!==void 0}var iE=3,lE="32px",cE="16px",rh=4e3,dE=356,uE=14,fE=20,mE=200;function Ue(...e){return e.filter(Boolean).join(" ")}function pE(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var hE=e=>{var t,n,r,o,a,s,l,c,u,f,m;let{invert:h,toast:p,unstyled:v,interacting:g,setHeights:b,visibleToasts:y,heights:w,index:x,toasts:S,expanded:E,removeToast:A,defaultRichColors:k,closeButton:P,style:j,cancelButtonStyle:$,actionButtonStyle:H,className:z="",descriptionClassName:ee="",duration:K,position:te,gap:V,loadingIcon:Q,expandByDefault:_,classNames:O,icons:M,closeButtonAriaLabel:U="Close toast",pauseWhenPageIsHidden:T}=e,[I,L]=C.useState(null),[F,J]=C.useState(null),[R,Y]=C.useState(!1),[q,ne]=C.useState(!1),[re,ie]=C.useState(!1),[Ne,ye]=C.useState(!1),[Fe,Oe]=C.useState(!1),[Ee,Be]=C.useState(0),[Te,er]=C.useState(0),At=C.useRef(p.duration||K||rh),tr=C.useRef(null),rt=C.useRef(null),To=x===0,Mo=x+1<=y,G=p.type,ae=p.dismissible!==!1,ce=p.className||"",ge=p.descriptionClassName||"",Re=C.useMemo(()=>w.findIndex(se=>se.toastId===p.id)||0,[w,p.id]),ut=C.useMemo(()=>{var se;return(se=p.closeButton)!=null?se:P},[p.closeButton,P]),ot=C.useMemo(()=>p.duration||K||rh,[p.duration,K]),ni=C.useRef(0),xn=C.useRef(0),Vh=C.useRef(0),Cn=C.useRef(null),[Fk,Bk]=te.split("-"),Hh=C.useMemo(()=>w.reduce((se,me,he)=>he>=Re?se:se+me.height,0),[w,Re]),Gh=JS(),zk=p.invert||h,ri=G==="loading";xn.current=C.useMemo(()=>Re*V+Hh,[Re,Hh]),C.useEffect(()=>{At.current=ot},[ot]),C.useEffect(()=>{Y(!0)},[]),C.useEffect(()=>{let se=rt.current;if(se){let me=se.getBoundingClientRect().height;return er(me),b(he=>[{toastId:p.id,height:me,position:p.position},...he]),()=>b(he=>he.filter(Ye=>Ye.toastId!==p.id))}},[b,p.id]),C.useLayoutEffect(()=>{if(!R)return;let se=rt.current,me=se.style.height;se.style.height="auto";let he=se.getBoundingClientRect().height;se.style.height=me,er(he),b(Ye=>Ye.find(Ke=>Ke.toastId===p.id)?Ye.map(Ke=>Ke.toastId===p.id?{...Ke,height:he}:Ke):[{toastId:p.id,height:he,position:p.position},...Ye])},[R,p.title,p.description,b,p.id]);let Rt=C.useCallback(()=>{ne(!0),Be(xn.current),b(se=>se.filter(me=>me.toastId!==p.id)),setTimeout(()=>{A(p)},mE)},[p,A,b,xn]);C.useEffect(()=>{if(p.promise&&G==="loading"||p.duration===1/0||p.type==="loading")return;let se;return E||g||T&&Gh?(()=>{if(Vh.current<ni.current){let me=new Date().getTime()-ni.current;At.current=At.current-me}Vh.current=new Date().getTime()})():At.current!==1/0&&(ni.current=new Date().getTime(),se=setTimeout(()=>{var me;(me=p.onAutoClose)==null||me.call(p,p),Rt()},At.current)),()=>clearTimeout(se)},[E,g,p,G,T,Gh,Rt]),C.useEffect(()=>{p.delete&&Rt()},[Rt,p.delete]);function Wk(){var se,me,he;return M!=null&&M.loading?C.createElement("div",{className:Ue(O==null?void 0:O.loader,(se=p==null?void 0:p.classNames)==null?void 0:se.loader,"sonner-loader"),"data-visible":G==="loading"},M.loading):Q?C.createElement("div",{className:Ue(O==null?void 0:O.loader,(me=p==null?void 0:p.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":G==="loading"},Q):C.createElement(YS,{className:Ue(O==null?void 0:O.loader,(he=p==null?void 0:p.classNames)==null?void 0:he.loader),visible:G==="loading"})}return C.createElement("li",{tabIndex:0,ref:rt,className:Ue(z,ce,O==null?void 0:O.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,O==null?void 0:O.default,O==null?void 0:O[G],(n=p==null?void 0:p.classNames)==null?void 0:n[G]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:k,"data-styled":!(p.jsx||p.unstyled||v),"data-mounted":R,"data-promise":!!p.promise,"data-swiped":Fe,"data-removed":q,"data-visible":Mo,"data-y-position":Fk,"data-x-position":Bk,"data-index":x,"data-front":To,"data-swiping":re,"data-dismissible":ae,"data-type":G,"data-invert":zk,"data-swipe-out":Ne,"data-swipe-direction":F,"data-expanded":!!(E||_&&R),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${q?Ee:xn.current}px`,"--initial-height":_?"auto":`${Te}px`,...j,...p.style},onDragEnd:()=>{ie(!1),L(null),Cn.current=null},onPointerDown:se=>{ri||!ae||(tr.current=new Date,Be(xn.current),se.target.setPointerCapture(se.pointerId),se.target.tagName!=="BUTTON"&&(ie(!0),Cn.current={x:se.clientX,y:se.clientY}))},onPointerUp:()=>{var se,me,he,Ye;if(Ne||!ae)return;Cn.current=null;let Ke=Number(((se=rt.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Dt=Number(((me=rt.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Gt=new Date().getTime()-((he=tr.current)==null?void 0:he.getTime()),qe=I==="x"?Ke:Dt,It=Math.abs(qe)/Gt;if(Math.abs(qe)>=fE||It>.11){Be(xn.current),(Ye=p.onDismiss)==null||Ye.call(p,p),J(I==="x"?Ke>0?"right":"left":Dt>0?"down":"up"),Rt(),ye(!0),Oe(!1);return}ie(!1),L(null)},onPointerMove:se=>{var me,he,Ye,Ke;if(!Cn.current||!ae||((me=window.getSelection())==null?void 0:me.toString().length)>0)return;let Dt=se.clientY-Cn.current.y,Gt=se.clientX-Cn.current.x,qe=(he=e.swipeDirections)!=null?he:pE(te);!I&&(Math.abs(Gt)>1||Math.abs(Dt)>1)&&L(Math.abs(Gt)>Math.abs(Dt)?"x":"y");let It={x:0,y:0};I==="y"?(qe.includes("top")||qe.includes("bottom"))&&(qe.includes("top")&&Dt<0||qe.includes("bottom")&&Dt>0)&&(It.y=Dt):I==="x"&&(qe.includes("left")||qe.includes("right"))&&(qe.includes("left")&&Gt<0||qe.includes("right")&&Gt>0)&&(It.x=Gt),(Math.abs(It.x)>0||Math.abs(It.y)>0)&&Oe(!0),(Ye=rt.current)==null||Ye.style.setProperty("--swipe-amount-x",`${It.x}px`),(Ke=rt.current)==null||Ke.style.setProperty("--swipe-amount-y",`${It.y}px`)}},ut&&!p.jsx?C.createElement("button",{"aria-label":U,"data-disabled":ri,"data-close-button":!0,onClick:ri||!ae?()=>{}:()=>{var se;Rt(),(se=p.onDismiss)==null||se.call(p,p)},className:Ue(O==null?void 0:O.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(a=M==null?void 0:M.close)!=null?a:QS):null,p.jsx||C.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:C.createElement(C.Fragment,null,G||p.icon||p.promise?C.createElement("div",{"data-icon":"",className:Ue(O==null?void 0:O.icon,(s=p==null?void 0:p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Wk():null,p.type!=="loading"?p.icon||(M==null?void 0:M[G])||GS(G):null):null,C.createElement("div",{"data-content":"",className:Ue(O==null?void 0:O.content,(l=p==null?void 0:p.classNames)==null?void 0:l.content)},C.createElement("div",{"data-title":"",className:Ue(O==null?void 0:O.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?C.createElement("div",{"data-description":"",className:Ue(ee,ge,O==null?void 0:O.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),C.isValidElement(p.cancel)?p.cancel:p.cancel&&wo(p.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||$,onClick:se=>{var me,he;wo(p.cancel)&&ae&&((he=(me=p.cancel).onClick)==null||he.call(me,se),Rt())},className:Ue(O==null?void 0:O.cancelButton,(f=p==null?void 0:p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,C.isValidElement(p.action)?p.action:p.action&&wo(p.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||H,onClick:se=>{var me,he;wo(p.action)&&((he=(me=p.action).onClick)==null||he.call(me,se),!se.defaultPrevented&&Rt())},className:Ue(O==null?void 0:O.actionButton,(m=p==null?void 0:p.classNames)==null?void 0:m.actionButton)},p.action.label):null))};function oh(){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}function gE(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,s=a?"--mobile-offset":"--offset",l=a?cE:lE;function c(u){["top","right","bottom","left"].forEach(f=>{n[`${s}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=l:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}var vE=C.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:s,className:l,offset:c,mobileOffset:u,theme:f="light",richColors:m,duration:h,style:p,visibleToasts:v=iE,toastOptions:g,dir:b=oh(),gap:y=uE,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:E}=e,[A,k]=C.useState([]),P=C.useMemo(()=>Array.from(new Set([r].concat(A.filter(T=>T.position).map(T=>T.position)))),[A,r]),[j,$]=C.useState([]),[H,z]=C.useState(!1),[ee,K]=C.useState(!1),[te,V]=C.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=C.useRef(null),_=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=C.useRef(null),M=C.useRef(!1),U=C.useCallback(T=>{k(I=>{var L;return(L=I.find(F=>F.id===T.id))!=null&&L.delete||Ae.dismiss(T.id),I.filter(({id:F})=>F!==T.id)})},[]);return C.useEffect(()=>Ae.subscribe(T=>{if(T.dismiss){k(I=>I.map(L=>L.id===T.id?{...L,delete:!0}:L));return}setTimeout(()=>{nr.flushSync(()=>{k(I=>{let L=I.findIndex(F=>F.id===T.id);return L!==-1?[...I.slice(0,L),{...I[L],...T},...I.slice(L+1)]:[T,...I]})})})}),[]),C.useEffect(()=>{if(f!=="system"){V(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let T=window.matchMedia("(prefers-color-scheme: dark)");try{T.addEventListener("change",({matches:I})=>{V(I?"dark":"light")})}catch{T.addListener(({matches:L})=>{try{V(L?"dark":"light")}catch(F){console.error(F)}})}},[f]),C.useEffect(()=>{A.length<=1&&z(!1)},[A]),C.useEffect(()=>{let T=I=>{var L,F;o.every(J=>I[J]||I.code===J)&&(z(!0),(L=Q.current)==null||L.focus()),I.code==="Escape"&&(document.activeElement===Q.current||(F=Q.current)!=null&&F.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[o]),C.useEffect(()=>{if(Q.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,M.current=!1)}},[Q.current]),C.createElement("section",{ref:t,"aria-label":`${S} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((T,I)=>{var L;let[F,J]=T.split("-");return A.length?C.createElement("ol",{key:T,dir:b==="auto"?oh():b,tabIndex:-1,ref:Q,className:l,"data-sonner-toaster":!0,"data-theme":te,"data-y-position":F,"data-lifted":H&&A.length>1&&!a,"data-x-position":J,style:{"--front-toast-height":`${((L=j[0])==null?void 0:L.height)||0}px`,"--width":`${dE}px`,"--gap":`${y}px`,...p,...gE(c,u)},onBlur:R=>{M.current&&!R.currentTarget.contains(R.relatedTarget)&&(M.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:R=>{R.target instanceof HTMLElement&&R.target.dataset.dismissible==="false"||M.current||(M.current=!0,O.current=R.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{ee||z(!1)},onDragEnd:()=>z(!1),onPointerDown:R=>{R.target instanceof HTMLElement&&R.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},A.filter(R=>!R.position&&I===0||R.position===T).map((R,Y)=>{var q,ne;return C.createElement(hE,{key:R.id,icons:x,index:Y,toast:R,defaultRichColors:m,duration:(q=g==null?void 0:g.duration)!=null?q:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:v,closeButton:(ne=g==null?void 0:g.closeButton)!=null?ne:s,interacting:ee,position:T,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:U,toasts:A.filter(re=>re.position==R.position),heights:j.filter(re=>re.position==R.position),setHeights:$,expandByDefault:a,gap:y,loadingIcon:w,expanded:H,pauseWhenPageIsHidden:E,swipeDirections:e.swipeDirections})})):null}))});const yo=({onClick:e})=>i.jsx(fe,{onClick:()=>e(),variant:"ghost",size:"xl",className:"ml-auto px-3",children:i.jsx(ht,{className:"!h-6 !w-6"})}),bE={...dt,success:(e,t)=>{const n=dt.success(e,{...t,cancel:i.jsx(yo,{onClick:()=>dt.dismiss(n)})});return n},error:(e,t)=>{const n=dt.error(e,{...t,cancel:i.jsx(yo,{onClick:()=>dt.dismiss(n)})});return n},warning:(e,t)=>{const n=dt.warning(e,{...t,cancel:i.jsx(yo,{onClick:()=>dt.dismiss(n)})});return n},info:(e,t)=>{const n=dt.info(e,{...t,cancel:i.jsx(yo,{onClick:()=>dt.dismiss(n)})});return n}},wE=({...e})=>i.jsx(vE,{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 yE="Toggle",Hs=d.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...a}=e,[s=!1,l]=xe({prop:n,onChange:o,defaultProp:r});return i.jsx(W.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:B(e.onClick,()=>{e.disabled||l(!s)})})});Hs.displayName=yE;var ah=Hs;const Gs=$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"}}),sh=d.forwardRef(({className:e,variant:t,size:n,...r},o)=>i.jsx(ah,{ref:o,className:D(Gs({variant:t,size:n,className:e})),...r}));sh.displayName=ah.displayName;var wn="ToggleGroup",[ih,FP]=be(wn,[Ct]),lh=Ct(),Us=C.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return i.jsx(xE,{...o,ref:t})}if(n==="multiple"){const o=r;return i.jsx(CE,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${wn}\``)});Us.displayName=wn;var[ch,dh]=ih(wn),xE=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,l]=xe({prop:n,defaultProp:r,onChange:o});return i.jsx(ch,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:l,onItemDeactivate:C.useCallback(()=>l(""),[l]),children:i.jsx(uh,{...a,ref:t})})}),CE=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s=[],l]=xe({prop:n,defaultProp:r,onChange:o}),c=C.useCallback(f=>l((m=[])=>[...m,f]),[l]),u=C.useCallback(f=>l((m=[])=>m.filter(h=>h!==f)),[l]);return i.jsx(ch,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:c,onItemDeactivate:u,children:i.jsx(uh,{...a,ref:t})})});Us.displayName=wn;var[NE,SE]=ih(wn),uh=C.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:s,loop:l=!0,...c}=e,u=lh(n),f=gt(s),m={role:"group",dir:f,...c};return i.jsx(NE,{scope:n,rovingFocus:o,disabled:r,children:o?i.jsx(jr,{asChild:!0,...u,orientation:a,dir:f,loop:l,children:i.jsx(W.div,{...m,ref:t})}):i.jsx(W.div,{...m,ref:t})})}),xo="ToggleGroupItem",fh=C.forwardRef((e,t)=>{const n=dh(xo,e.__scopeToggleGroup),r=SE(xo,e.__scopeToggleGroup),o=lh(e.__scopeToggleGroup),a=n.value.includes(e.value),s=r.disabled||e.disabled,l={...e,pressed:a,disabled:s},c=C.useRef(null);return r.rovingFocus?i.jsx(Ar,{asChild:!0,...o,focusable:!s,active:a,ref:c,children:i.jsx(mh,{...l,ref:t})}):i.jsx(mh,{...l,ref:t})});fh.displayName=xo;var mh=C.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=dh(xo,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?s:void 0;return i.jsx(Hs,{...l,...o,ref:t,onPressedChange:c=>{c?a.onItemActivate(r):a.onItemDeactivate(r)}})}),ph=Us,hh=fh;const gh=d.createContext({size:"default",variant:"default"}),vh=d.forwardRef(({className:e,variant:t,size:n,children:r,...o},a)=>i.jsx(ph,{ref:a,className:D("flex items-center justify-center gap-1",e),...o,children:i.jsx(gh.Provider,{value:{variant:t,size:n},children:r})}));vh.displayName=ph.displayName;const bh=d.forwardRef(({className:e,children:t,variant:n,size:r,...o},a)=>{const s=d.useContext(gh);return i.jsx(hh,{ref:a,className:D(Gs({variant:s.variant||n,size:s.size||r}),e),...o,children:t})});bh.displayName=hh.displayName;var[Co,BP]=be("Tooltip",[xt]),No=xt(),wh="TooltipProvider",EE=700,Ys="tooltip.open",[kE,Ks]=Co(wh),yh=e=>{const{__scopeTooltip:t,delayDuration:n=EE,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=d.useRef(!0),l=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),i.jsx(kE,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:d.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:a})};yh.displayName=wh;var So="Tooltip",[PE,Qn]=Co(So),xh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,c=Ks(So,e.__scopeTooltip),u=No(t),[f,m]=d.useState(null),h=pe(),p=d.useRef(0),v=s??c.disableHoverableContent,g=l??c.delayDuration,b=d.useRef(!1),[y=!1,w]=xe({prop:r,defaultProp:o,onChange:k=>{k?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ys))):c.onClose(),a==null||a(k)}}),x=d.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),S=d.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,w(!0)},[w]),E=d.useCallback(()=>{window.clearTimeout(p.current),p.current=0,w(!1)},[w]),A=d.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,w(!0),p.current=0},g)},[g,w]);return d.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),i.jsx(In,{...u,children:i.jsx(PE,{scope:t,contentId:h,open:y,stateAttribute:x,trigger:f,onTriggerChange:m,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?A():S()},[c.isOpenDelayedRef,A,S]),onTriggerLeave:d.useCallback(()=>{v?E():(window.clearTimeout(p.current),p.current=0)},[E,v]),onOpen:S,onClose:E,disableHoverableContent:v,children:n})})};xh.displayName=So;var qs="TooltipTrigger",Ch=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Qn(qs,n),a=Ks(qs,n),s=No(n),l=d.useRef(null),c=oe(t,l,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),m=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),i.jsx(_n,{asChild:!0,...s,children:i.jsx(W.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:B(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:B(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:B(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:B(e.onBlur,o.onClose),onClick:B(e.onClick,o.onClose)})})});Ch.displayName=qs;var Xs="TooltipPortal",[TE,ME]=Co(Xs,{forceMount:void 0}),Nh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Qn(Xs,t);return i.jsx(TE,{scope:t,forceMount:n,children:i.jsx(Ce,{present:n||a.open,children:i.jsx(On,{asChild:!0,container:o,children:r})})})};Nh.displayName=Xs;var yn="TooltipContent",Sh=d.forwardRef((e,t)=>{const n=ME(yn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Qn(yn,e.__scopeTooltip);return i.jsx(Ce,{present:r||s.open,children:s.disableHoverableContent?i.jsx(Eh,{side:o,...a,ref:t}):i.jsx(jE,{side:o,...a,ref:t})})}),jE=d.forwardRef((e,t)=>{const n=Qn(yn,e.__scopeTooltip),r=Ks(yn,e.__scopeTooltip),o=d.useRef(null),a=oe(t,o),[s,l]=d.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:m}=r,h=d.useCallback(()=>{l(null),m(!1)},[m]),p=d.useCallback((v,g)=>{const b=v.currentTarget,y={x:v.clientX,y:v.clientY},w=_E(y,b.getBoundingClientRect()),x=OE(y,w),S=$E(g.getBoundingClientRect()),E=FE([...x,...S]);l(E),m(!0)},[m]);return d.useEffect(()=>()=>h(),[h]),d.useEffect(()=>{if(c&&f){const v=b=>p(b,f),g=b=>p(b,c);return c.addEventListener("pointerleave",v),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",g)}}},[c,f,p,h]),d.useEffect(()=>{if(s){const v=g=>{const b=g.target,y={x:g.clientX,y:g.clientY},w=(c==null?void 0:c.contains(b))||(f==null?void 0:f.contains(b)),x=!LE(y,s);w?h():x&&(h(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,f,s,u,h]),i.jsx(Eh,{...e,ref:a})}),[AE,RE]=Co(So,{isInside:!1}),DE=Qi("TooltipContent"),Eh=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=e,c=Qn(yn,n),u=No(n),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(Ys,f),()=>document.removeEventListener(Ys,f)),[f]),d.useEffect(()=>{if(c.trigger){const m=h=>{const p=h.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,f]),i.jsx(Lt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:i.jsxs(kr,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[i.jsx(DE,{children:r}),i.jsx(AE,{scope:n,isInside:!0,children:i.jsx(wd,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Sh.displayName=yn;var kh="TooltipArrow",IE=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=No(n);return RE(kh,n).isInside?null:i.jsx(Pr,{...o,...r,ref:t})});IE.displayName=kh;function _E(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 OE(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 $E(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 LE(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 l=t[a].x,c=t[a].y,u=t[s].x,f=t[s].y;c>r!=f>r&&n<(u-l)*(r-c)/(f-c)+l&&(o=!o)}return o}function FE(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),BE(t)}function BE(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 zE=yh,WE=xh,VE=Ch,HE=Nh,Ph=Sh;const GE=zE,UE=WE,YE=VE,Th=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(HE,{children:i.jsx(Ph,{ref:r,sideOffset:t,className:D("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})}));Th.displayName=Ph.displayName;const Mh=d.createContext(void 0),jh={sm:"sm:max-w-[425px]",md:"sm:max-w-[550px]",lg:"sm:max-w-[700px]",xl:"sm:max-w-[900px]"},Ah={info:{icon:qb,className:"text-blue-500"},success:{icon:zb,className:"text-green-500"},error:{icon:Ko,className:"text-red-500"},warning:{icon:Bb,className:"text-yellow-500"},confirm:{icon:al,className:"text-blue-500"},custom:{icon:al,className:"text-gray-500"}};function KE({children:e}){var g,b,y,w,x,S,E,A,k,P,j,$,H;const[t,n]=d.useState({isOpen:!1,options:null}),r=d.useCallback(z=>{n({isOpen:!0,options:z})},[]),o=d.useCallback(()=>{n(z=>({...z,isOpen:!1}))},[]),a=d.useCallback(z=>{r({...z,type:"info"})},[r]),s=d.useCallback(z=>{r({...z,type:"success"})},[r]),l=d.useCallback(z=>{r({...z,type:"error"})},[r]),c=d.useCallback(z=>{r({...z,type:"warning"})},[r]),u=d.useCallback(z=>{r({...z,type:"custom"})},[r]),f=d.useCallback(z=>{r({...z,type:"confirm"})},[r]),m=(z,ee)=>{let K=Ah[z].icon;return ee&&(K=ee),i.jsx(K,{className:D("h-24 w-24",Ah[z].className)})},h=d.useMemo(()=>({open:r,close:o,info:a,success:s,error:l,warning:c,custom:u,confirm:f}),[r,o,a,s,l,c,u,f]),[p,v]=d.useState(!1);return i.jsxs(Mh.Provider,{value:h,children:[e,i.jsx(io,{open:t.isOpen,onOpenChange:z=>!z&&o(),modal:!0,children:i.jsxs(Xn,{className:D((g=t.options)!=null&&g.size?jh[t.options.size]:jh.sm,(b=t.options)==null?void 0:b.className),children:[t.options&&i.jsxs(lo,{children:[i.jsx("div",{className:"mx-auto mb-6",children:m(t.options.type,t.options.icon)}),t.options.title&&i.jsx(co,{className:"text-center",children:t.options.title}),i.jsx(uo,{className:"text-center",children:t.options.message})]}),((y=t.options)==null?void 0:y.type)==="confirm"&&i.jsxs("div",{className:"flex justify-center gap-4 mt-4",children:[i.jsx(fe,{isLoading:p??((x=(w=t.options)==null?void 0:w.confirmButton)==null?void 0:x.loading),disabled:(E=(S=t.options)==null?void 0:S.confirmButton)==null?void 0:E.disabled,className:(A=t.options.confirmButton)==null?void 0:A.className,onClick:()=>{var ee,K,te,V;if(!((K=(ee=t.options)==null?void 0:ee.confirmButton)!=null&&K.onClick))throw new Error("Confirmation type dialog needs to implement the onConfirm function");const z=(V=(te=t.options)==null?void 0:te.confirmButton)==null?void 0:V.onClick();z instanceof Promise?(v(!0),z.then(()=>{v(!1),o()}).finally(()=>v(!1))):o()},children:((k=t.options.confirmButton)==null?void 0:k.label)??"Confirm"}),((P=t.options.cancelButton)==null?void 0:P.label)&&i.jsx(fe,{variant:"outline",onClick:o,className:t.options.cancelButton.className,isLoading:(j=t.options.cancelButton)==null?void 0:j.loading,disabled:p||(($=t.options.cancelButton)==null?void 0:$.disabled),children:(H=t.options.cancelButton)==null?void 0:H.label})]})]})})]})}function qE(){const e=d.useContext(Mh);if(e===void 0)throw new Error("useDialog must be used within a DialogProvider");return e}const XE=(e=!1)=>{const[t,n]=d.useState(e),r=d.useCallback(()=>n(!0),[]),o=d.useCallback(()=>n(!1),[]),a=d.useCallback(()=>n(s=>!s),[]);return{isOpen:t,open:r,close:o,toggle:a}},ZE=(e=!1)=>{const[t,n]=d.useState(e),r=d.useCallback(()=>n(!0),[]),o=d.useCallback(()=>n(!1),[]);return[t,r,o]};/*!
|
|
270
270
|
* Compressor.js v1.2.1
|
|
271
271
|
* https://fengyuanchen.github.io/compressorjs
|
|
272
272
|
*
|
|
@@ -274,4 +274,4 @@ Defaulting to \`null\`.`}var dp=op,bS=sp;const Rs=d.forwardRef(({className:e,val
|
|
|
274
274
|
* Released under the MIT license
|
|
275
275
|
*
|
|
276
276
|
* Date: 2023-02-28T14:09:41.732Z
|
|
277
|
-
*/function kh(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 xo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kh(Object(n),!0).forEach(function(r){XE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ph(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,Mh(r.key),r)}}function qE(e,t,n){return t&&Ph(e.prototype,t),n&&Ph(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function XE(e,t,n){return t=Mh(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Co(){return Co=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},Co.apply(this,arguments)}function ZE(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);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Mh(e){var t=ZE(e,"string");return typeof t=="symbol"?t:String(t)}var Th={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)?,/,l=(r||a)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(c){var u,f,m,g,p,v,h,b,y;if(u=c.match(s),!u)throw new Error("invalid data URI");for(f=u[2]?u[1]:"text/plain"+(u[3]||";charset=US-ASCII"),m=!!u[4],g=c.slice(u[0].length),m?p=atob(g):p=decodeURIComponent(g),v=new ArrayBuffer(p.length),h=new Uint8Array(v),b=0;b<p.length;b+=1)h[b]=p.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(c,u,f){var m=this;setTimeout(function(){f&&n.toDataURL&&l?c(l(m.toDataURL(u,f))):c(m.mozGetAsFile("blob",u))})}:n.toDataURL&&l&&(n.msToBlob?n.toBlob=function(c,u,f){var m=this;setTimeout(function(){(u&&u!=="image/png"||f)&&n.toDataURL&&l?c(l(m.toDataURL(u,f))):c(m.msToBlob(u))})}:n.toBlob=function(c,u,f){var m=this;setTimeout(function(){c(l(m.toDataURL(u,f)))})})),e.exports?e.exports=l:t.dataURLtoBlob=l}(window)})(Th);var jh=Th.exports,QE=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},Ah={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},JE=typeof window<"u"&&typeof window.document<"u",Mt=JE?window:{},No=function(t){return t>0&&t<1/0},ek=Array.prototype.slice;function Us(e){return Array.from?Array.from(e):ek.call(e)}var tk=/^image\/.+$/;function Ys(e){return tk.test(e)}function nk(e){var t=Ys(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var Rh=String.fromCharCode;function rk(e,t,n){var r="",o;for(n+=t,o=t;o<n;o+=1)r+=Rh(e.getUint8(o));return r}var ok=Mt.btoa;function Dh(e,t){for(var n=[],r=8192,o=new Uint8Array(e);o.length>0;)n.push(Rh.apply(null,Us(o.subarray(0,r)))),o=o.subarray(r);return"data:".concat(t,";base64,").concat(ok(n.join("")))}function ak(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,l=2;l+1<s;){if(t.getUint8(l)===255&&t.getUint8(l+1)===225){o=l;break}l+=1}if(o){var c=o+4,u=o+10;if(rk(t,c,4)==="Exif"){var f=t.getUint16(u);if(r=f===18761,(r||f===19789)&&t.getUint16(u+2,r)===42){var m=t.getUint32(u+4,r);m>=8&&(a=u+m)}}}if(a){var g=t.getUint16(a,r),p,v;for(v=0;v<g;v+=1)if(p=a+v*12+2,t.getUint16(p,r)===274){p+=8,n=t.getUint16(p,r),t.setUint16(p,1,r);break}}}catch{n=1}return n}function sk(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 ik=/\.\d*(?:0|9){12}\d*$/;function Ih(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return ik.test(e)?Math.round(e*t)/t:e}function Zn(e){var t=e.aspectRatio,n=e.height,r=e.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",a=No(r),s=No(n);if(a&&s){var l=n*t;(o==="contain"||o==="none")&&l>r||o==="cover"&&l<r?n=r/t:r=n*t}else a?n=r/t:s&&(r=n*t);return{width:r,height:n}}function lk(e){for(var t=Us(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 l=t[o+2]*256+t[o+3],c=o+l+2,u=t.slice(o,c);r.push(u),o=c}}return r.reduce(function(f,m){return m[0]===255&&m[1]===225?f.concat(m):f},[])}function ck(e,t){var n=Us(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 dk=Mt.ArrayBuffer,Ks=Mt.FileReader,zt=Mt.URL||Mt.webkitURL,uk=/\.\w+$/,fk=Mt.Compressor,mk=function(){function e(t,n){KE(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=xo(xo({},Ah),n),this.aborted=!1,this.result=null,this.init()}return qE(e,[{key:"init",value:function(){var n=this,r=this.file,o=this.options;if(!QE(r)){this.fail(new Error("The first argument must be a File or Blob object."));return}var a=r.type;if(!Ys(a)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!zt||!Ks){this.fail(new Error("The current browser does not support image compression."));return}dk||(o.checkOrientation=!1,o.retainExif=!1);var s=a==="image/jpeg",l=s&&o.checkOrientation,c=s&&o.retainExif;if(zt&&!l&&!c)this.load({url:zt.createObjectURL(r)});else{var u=new Ks;this.reader=u,u.onload=function(f){var m=f.target,g=m.result,p={},v=1;l&&(v=ak(g),v>1&&Co(p,sk(v))),c&&(n.exif=lk(g)),l||c?!zt||v>1?p.url=Dh(g,a):p.url=zt.createObjectURL(r):p.url=g,n.load(p)},u.onabort=function(){n.fail(new Error("Aborted to read the image with FileReader."))},u.onerror=function(){n.fail(new Error("Failed to read the image with FileReader."))},u.onloadend=function(){n.reader=null},l||c?u.readAsArrayBuffer(r):u.readAsDataURL(r)}}},{key:"load",value:function(n){var r=this,o=this.file,a=this.image;a.onload=function(){r.draw(xo(xo({},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."))},Mt.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Mt.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,l=s===void 0?0:s,c=n.scaleX,u=c===void 0?1:c,f=n.scaleY,m=f===void 0?1:f,g=this.file,p=this.image,v=this.options,h=document.createElement("canvas"),b=h.getContext("2d"),y=Math.abs(l)%180===90,w=(v.resize==="contain"||v.resize==="cover")&&No(v.width)&&No(v.height),x=Math.max(v.maxWidth,0)||1/0,S=Math.max(v.maxHeight,0)||1/0,E=Math.max(v.minWidth,0)||0,A=Math.max(v.minHeight,0)||0,k=o/a,P=v.width,T=v.height;if(y){var $=[S,x];x=$[0],S=$[1];var Z=[A,E];E=Z[0],A=Z[1];var z=[T,P];P=z[0],T=z[1]}w&&(k=P/T);var ee=Zn({aspectRatio:k,width:x,height:S},"contain");x=ee.width,S=ee.height;var Y=Zn({aspectRatio:k,width:E,height:A},"cover");if(E=Y.width,A=Y.height,w){var te=Zn({aspectRatio:k,width:P,height:T},v.resize);P=te.width,T=te.height}else{var V=Zn({aspectRatio:k,width:P,height:T}),Q=V.width;P=Q===void 0?o:Q;var O=V.height;T=O===void 0?a:O}P=Math.floor(Ih(Math.min(Math.max(P,E),x))),T=Math.floor(Ih(Math.min(Math.max(T,A),S)));var _=-P/2,j=-T/2,H=P,M=T,I=[];if(w){var L=0,F=0,J=o,R=a,U=Zn({aspectRatio:k,width:o,height:a},{contain:"cover",cover:"contain"}[v.resize]);J=U.width,R=U.height,L=(o-J)/2,F=(a-R)/2,I.push(L,F,J,R)}if(I.push(_,j,H,M),y){var K=[T,P];P=K[0],T=K[1]}h.width=P,h.height=T,Ys(v.mimeType)||(v.mimeType=g.type);var ne="transparent";g.size>v.convertSize&&v.convertTypes.indexOf(v.mimeType)>=0&&(v.mimeType="image/jpeg");var ae=v.mimeType==="image/jpeg";if(ae&&(ne="#fff"),b.fillStyle=ne,b.fillRect(0,0,P,T),v.beforeDraw&&v.beforeDraw.call(this,b,h),!this.aborted&&(b.save(),b.translate(P/2,T/2),b.rotate(l*Math.PI/180),b.scale(u,m),b.drawImage.apply(b,[p].concat(I)),b.restore(),v.drew&&v.drew.call(this,b,h),!this.aborted)){var se=function(Ne){if(!r.aborted){var Le=function(re){return r.done({naturalWidth:o,naturalHeight:a,result:re})};if(Ne&&ae&&v.retainExif&&r.exif&&r.exif.length>0){var Re=function(re){return Le(jh(Dh(ck(re,r.exif),v.mimeType)))};if(Ne.arrayBuffer)Ne.arrayBuffer().then(Re).catch(function(){r.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var Ee=new Ks;r.reader=Ee,Ee.onload=function(G){var re=G.target;Re(re.result)},Ee.onabort=function(){r.fail(new Error("Aborted to read the compressed image with FileReader."))},Ee.onerror=function(){r.fail(new Error("Failed to read the compressed image with FileReader."))},Ee.onloadend=function(){r.reader=null},Ee.readAsArrayBuffer(Ne)}}else Le(Ne)}};h.toBlob?h.toBlob(se,v.mimeType,v.quality):se(jh(h.toDataURL(v.mimeType,v.quality)))}}},{key:"done",value:function(n){var r=n.naturalWidth,o=n.naturalHeight,a=n.result,s=this.file,l=this.image,c=this.options;if(zt&&l.src.indexOf("blob:")===0&&zt.revokeObjectURL(l.src),a)if(c.strict&&!c.retainExif&&a.size>s.size&&c.mimeType===s.type&&!(c.width>r||c.height>o||c.minWidth>r||c.minHeight>o||c.maxWidth<r||c.maxHeight<o))a=s;else{var u=new Date;a.lastModified=u.getTime(),a.lastModifiedDate=u,a.name=s.name,a.name&&a.type!==s.type&&(a.name=a.name.replace(uk,nk(a.type)))}else a=s;this.result=a,c.success&&c.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=fk,e}},{key:"setDefaults",value:function(n){Co(Ah,n)}}]),e}();const pk=()=>({compressImage:async(n,r)=>await new Promise((o,a)=>{new mk(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]}}),hk=function(e,t){const[n,r]=C.useState(!1);function o({key:s}){s===e&&r(!0)}const a=({key:s})=>{s===e&&r(!1)};return C.useEffect(()=>(window.addEventListener("keydown",o),window.addEventListener("keyup",a),()=>{window.removeEventListener("keydown",o),window.removeEventListener("keyup",a)})),C.useEffect(()=>{n&&(t==null||t(n))},[n]),n};function gk(e,t){const[n,r]=C.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 l=s instanceof Function?s(n):s;r(l),window.localStorage.setItem(e,JSON.stringify(l))}catch(l){console.error(l)}},()=>{try{r(t),window.localStorage.removeItem(e)}catch(s){console.error(s)}}]}function vk(e){const[t,n]=C.useState(!1);return C.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 qs=768;function bk(){const[e,t]=d.useState(void 0);return d.useEffect(()=>{const n=window.matchMedia(`(max-width: ${qs-1}px)`),r=()=>{t(window.innerWidth<qs)};return n.addEventListener("change",r),t(window.innerWidth<qs),()=>n.removeEventListener("change",r)},[]),!!e}const wk=()=>{const[e,t]=C.useState(null),[n,r]=C.useState(!1);return C.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)}))}}},Xs=e=>{const{currentPage:t,totalPages:n,totalItems:r,startIndex:o,endIndex:a,onPageChange:s,onPreviousPage:l,onNextPage:c,showItemsCounter:u=!0}=e,f=()=>{const m=[];if(n<=7)for(let p=1;p<=n;p++)m.push(p);else{m.push(1),t>4&&m.push("...");const p=Math.max(2,t-1),v=Math.min(n-1,t+1);for(let h=p;h<=v;h++)h!==1&&h!==n&&m.push(h);t<n-3&&m.push("..."),n>1&&m.push(n)}return m};return n<=1?null:i.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[u?i.jsxs("div",{className:"text-sm text-muted-foreground",children:["Showing ",o+1," to ",a," of ",r," results"]}):null,i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx(fe,{variant:"outline",size:"sm",onClick:l,disabled:t===1,className:"h-8 w-8 p-0",children:i.jsx(cr,{className:"h-4 w-4"})}),f().map((m,g)=>i.jsx(C.Fragment,{children:m==="..."?i.jsx("span",{className:"px-2 text-muted-foreground",children:"..."}):i.jsx(fe,{variant:t===m?"default":"outline",size:"sm",onClick:()=>s(m),className:"h-8 w-8 p-0",children:m})},g)),i.jsx(fe,{variant:"outline",size:"sm",onClick:c,disabled:t===n,className:"h-8 w-8 p-0",children:i.jsx(Pn,{className:"h-4 w-4"})})]})]})};function yk({data:e,columns:t,searchFields:n,filters:r=[],pageSize:o=40,className:a="",loading:s=!1,tools:l},c){var Re,Ee;const[u,f]=C.useState(""),[m,g]=C.useState(1),[p,v]=C.useState({}),[h,b]=C.useState({field:null,direction:null}),[y,w]=C.useState(new Set),[x,S]=C.useState(t),[E,A]=C.useState(0),k=nu(u,300),P=(G,re)=>String(G.id||G._id||`row-${re}`),T=C.useMemo(()=>{let G=e.slice();if(k.trim()){const re=k.toLowerCase();G=G.filter(ce=>n.some(he=>{const Fe=ce[he];return Fe==null?!1:String(Fe).toLowerCase().includes(re)}))}if(Object.entries(p).forEach(([re,ce])=>{ce&&ce!=="all"&&(G=G.filter(he=>{const Fe=he[re];return String(Fe)===ce}))}),h.field&&h.direction){const{field:re,direction:ce}=h;G.sort((he,Fe)=>{const Me=he[re],ct=Fe[re];return Me==null&&ct==null?0:Me==null?ce==="asc"?-1:1:ct==null?ce==="asc"?1:-1:typeof Me=="string"&&typeof ct=="string"?ce==="asc"?Me.localeCompare(ct):ct.localeCompare(Me):ce==="asc"?Me-ct:ct-Me})}return G},[e,n,k,p,h,E]),$=C.useMemo(()=>{const G=T.length,re=Math.ceil(G/o),ce=(m-1)*o,he=ce+o;return{currentData:T.slice(ce,he),totalItems:G,totalPages:re,startIndex:ce,endIndex:Math.min(he,G)}},[T,m,o]);C.useEffect(()=>{g(1)},[k,p,h]);const Z=C.useCallback(()=>T.filter((G,re)=>{const ce=P(G,re);return y.has(ce)}),[T,y]),z=C.useCallback(()=>y.size,[y]),ee=C.useCallback(G=>{w(new Set(G))},[]),Y=C.useCallback(()=>T,[T]),te=C.useCallback(()=>{v({}),f(""),b({field:null,direction:null}),g(1)},[]),V=C.useCallback((G="table-export")=>{PC(T,x,G)},[T,x]),Q=C.useCallback(G=>{G>=1&&G<=$.totalPages&&g(G)},[$.totalPages]),O=C.useCallback(()=>{A(G=>G+1)},[]),_=C.useCallback((G,re)=>{v(ce=>({...ce,[G]:re}))},[]),j=C.useCallback(G=>{v(re=>{const ce={...re};return delete ce[G],ce})},[]),H=C.useCallback(()=>{te()},[te]),M=C.useCallback(G=>{b(re=>re.field===G?re.direction==="asc"?{field:G,direction:"desc"}:re.direction==="desc"?{field:null,direction:null}:{field:G,direction:"asc"}:{field:G,direction:"asc"})},[]),I=C.useCallback((G,re)=>{S(ce=>ce.map(he=>String(he.key)===G?{...he,hidden:!re}:he))},[]),L=C.useCallback(()=>{S(t)},[t]),F=C.useCallback(G=>{if(G){const re=new Set;$.currentData.forEach((ce,he)=>{const Fe=P(ce,he);re.add(Fe)}),w(re)}else w(new Set)},[$.currentData]),J=C.useCallback((G,re)=>{w(ce=>{const he=new Set(ce);return re?he.add(G):he.delete(G),he})},[]),R=C.useCallback(()=>{V()},[V]),U=C.useCallback(()=>{g(G=>Math.max(G-1,1))},[]),K=C.useCallback(()=>{g(G=>Math.min(G+1,$.totalPages))},[$.totalPages]),ne=C.useCallback(G=>{Q(G)},[Q]),se=Object.values(p).filter(G=>G&&G!=="all").length>0||u.trim().length>0||h.field!==null,Ce=x.filter(G=>!G.hidden),Ne=y.size,Le=C.useMemo(()=>$.currentData.length>0&&$.currentData.every((G,re)=>{const ce=P(G,re);return y.has(ce)}),[$.currentData,y]);return C.useImperativeHandle(c,()=>({getSelectedItems:Z,clearSelection:()=>w(new Set),getSelectionCount:z,selectItems:ee,getFilteredData:Y,resetFilters:te,exportData:V,goToPage:Q,refresh:O}),[Z,z,ee,Y,te,V,Q,O]),s?i.jsxs("div",{className:`space-y-4 ${a}`,children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[i.jsx("div",{className:"h-10 w-full max-w-sm bg-muted animate-pulse rounded"}),r.map((G,re)=>i.jsx("div",{className:"h-10 w-40 bg-muted animate-pulse rounded"},re)),i.jsx("div",{className:"h-10 w-32 ml-auto bg-muted animate-pulse rounded"})]}),i.jsx(kC,{columns:Ce.length+1,rows:o}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("div",{className:"h-4 w-48 bg-muted animate-pulse rounded"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("div",{className:"h-8 w-20 bg-muted animate-pulse rounded"}),i.jsx("div",{className:"h-8 w-8 bg-muted animate-pulse rounded"}),i.jsx("div",{className:"h-8 w-8 bg-muted animate-pulse rounded"}),i.jsx("div",{className:"h-8 w-8 bg-muted animate-pulse rounded"}),i.jsx("div",{className:"h-8 w-20 bg-muted animate-pulse rounded"})]})]})]}):i.jsxs("div",{className:`space-y-4 ${a}`,children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[i.jsx(vC,{value:u,onChange:f}),r.map(G=>i.jsx(hC,{filter:G,value:p[String(G.field)],onChange:re=>_(String(G.field),re)},String(G.field))),(Re=l==null?void 0:l.columnSelector)!=null&&Re.hide?i.jsx(z0,{columns:x,onToggleVisibility:I,onReset:L}):null,(Ee=l==null?void 0:l.export)!=null&&Ee.hide?i.jsxs(fe,{variant:"outline",onClick:R,children:[i.jsx(Wb,{className:"h-4 w-4 mr-2"}),"Export CSV"]}):null,se&&i.jsxs(fe,{variant:"outline",onClick:H,children:[i.jsx(mt,{className:"h-4 w-4 mr-2"}),"Clear All"]})]}),i.jsx(ew,{searchTerm:u,activeFilters:p,sortState:h,filters:r,columns:x,onClearSearch:()=>f(""),onClearFilter:j,onClearSort:()=>b({field:null,direction:null})}),i.jsx(bC,{selectedCount:Ne,onClearSelection:()=>w(new Set)}),i.jsx("div",{className:"rounded-md border",children:i.jsxs(sr,{children:[i.jsx(ir,{children:i.jsx(SC,{columns:x,sortState:h,allRowsSelected:Le,hasData:$.currentData.length>0,onSort:M,onToggleAllRows:F})}),i.jsx(lr,{children:$.currentData.length===0?i.jsx("tr",{children:i.jsx(qt,{colSpan:Ce.length+1,className:"h-24 text-center text-muted-foreground",children:se?"No results found for the current filters.":"No data available."})}):$.currentData.map((G,re)=>{const ce=P(G,re);return i.jsx(EC,{row:G,index:re,columns:x,isSelected:y.has(ce),rowId:ce,onToggleSelection:J},ce)})})]})}),i.jsx(Xs,{currentPage:m,totalPages:$.totalPages,totalItems:$.totalItems,startIndex:$.startIndex,endIndex:$.endIndex,onPageChange:ne,onPreviousPage:U,onNextPage:K})]})}const xk=C.forwardRef(yk),_h=e=>{const{notFoundText:t,notFoundAction:n,icon:r,className:o}=e;return i.jsxs("div",{className:D("flex flex-col gap-4 items-center bg-gray-200 rounded-lg p-6 justify-center",o),children:[r||i.jsx(Lb,{size:45}),i.jsxs("div",{className:"text-lg font-medium m-0",children:[t,n||null]})]})};function Ck(e){const{triggerElement:t,steps:n}=e,[r,o]=C.useState(!1),[a,s]=C.useState(0),l=()=>{s(u=>u<n.length-1?u+1:u)},c=()=>{s(u=>u>0?u-1:u)};return i.jsxs(ro,{open:r,onOpenChange:o,children:[i.jsx(Uf,{asChild:!0,children:t}),i.jsxs(Kn,{className:"sm:max-w-[425px]",children:[i.jsxs(oo,{className:D(n[a].title===""&&"sr-only"),children:[i.jsx(ao,{children:n[a].title}),i.jsx(so,{className:"sr-only",children:n[a].title})]}),i.jsx("div",{children:n[a].description}),i.jsxs("div",{className:"flex items-center justify-between mt-4",children:[i.jsx(fe,{variant:"ghost",size:"icon",onClick:c,disabled:a===0,children:i.jsx(cr,{className:"h-4 w-4"})}),i.jsx("div",{className:"flex justify-center gap-1",children:n.map((u,f)=>i.jsx("div",{className:D("h-3 w-3 rounded-full",f===a?"bg-primary":"bg-gray-200")},f))}),i.jsx(fe,{variant:"ghost",size:"icon",onClick:l,disabled:a===n.length-1,children:i.jsx(Pn,{className:"h-4 w-4"})})]})]})]})}const Nk=e=>i.jsx("div",{className:"unreset",dangerouslySetInnerHTML:{__html:e.children}}),Sk=e=>{const{execCommand:t}=e,n=()=>{const a=document.createElement("input");a.type="file",a.accept="image/*",a.onchange=async s=>{var c;const l=(c=s.target.files)==null?void 0:c[0];if(l){const u=new FileReader;u.onload=()=>{t("insertImage",u.result)},u.readAsDataURL(l)}},a.click()},r=()=>{const a=prompt("Enter the URL:");a&&t("createLink",a)},o=a=>{t("fontSize",a)};return i.jsxs("div",{className:"flex flex-wrap gap-2 border-b pb-2 mb-2",children:[i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("bold"),type:"button",children:i.jsx(Ib,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("italic"),type:"button",children:i.jsx(Ub,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("underline"),type:"button",children:i.jsx(Jb,{size:16})}),i.jsxs(Oa,{onValueChange:a=>o(a),defaultValue:"3",children:[i.jsx(Hr,{className:"w-[100px]",children:i.jsx($a,{placeholder:"Size"})}),i.jsxs(Gr,{children:[i.jsx(St,{value:"1",children:i.jsx("div",{children:"Small"})}),i.jsx(St,{value:"3",children:i.jsx("div",{children:"Medium"})}),i.jsx(St,{value:"5",children:i.jsx("div",{children:"Large"})}),i.jsx(St,{value:"7",children:i.jsx("div",{children:"Extra Large"})})]})]}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("insertUnorderedList"),type:"button",children:i.jsx(qb,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("insertOrderedList"),type:"button",children:i.jsx(Kb,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("formatBlock","blockquote"),type:"button",children:i.jsx(Zb,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:n,type:"button",children:i.jsx(Hb,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:r,type:"button",children:i.jsx(Yb,{size:16})})]})},Ek=({initialValue:e="",onChange:t,className:n})=>{const r=C.useRef(null);C.useEffect(()=>{const s=new MutationObserver(()=>{t==null||t(r.current?r.current.innerHTML:"")});r.current&&s.observe(r.current,{childList:!0})},[]),C.useEffect(()=>{r.current&&(r.current.innerHTML=e)},[]);const o=()=>{r.current&&(t==null||t(r.current.innerHTML))},a=(s,l)=>{r.current&&(document.execCommand(s,!1,l),o())};return i.jsxs("div",{className:D("w-full p-4 border rounded-lg shadow-md",n),children:[i.jsx(Sk,{execCommand:a}),i.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})]})},kk=e=>{const{observerOptions:t,images:n,classNames:r}=e,[o,a]=C.useState([]),s=C.useRef(null);return C.useEffect(()=>{const l={root:document.querySelector(".image-gallery"),rootMargin:"0px",threshold:1,...t};return s.current=new IntersectionObserver(c=>{c.forEach(u=>{if(u.isIntersecting&&u.target instanceof HTMLDivElement){const f=Number(u.target.dataset.index);a(m=>[...new Set([...m,f])])}})},l),()=>{var c;return(c=s.current)==null?void 0:c.disconnect()}},[]),C.useEffect(()=>{document.querySelectorAll(".image-cell").forEach(c=>{var u;return(u=s.current)==null?void 0:u.observe(c)})},[n]),i.jsx("div",{className:D("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((l,c)=>i.jsx("div",{"data-index":c,className:D("image-cell w-full h-52",r==null?void 0:r.imageCell),children:o.includes(c)&&i.jsx("img",{src:l,alt:`Gallery Image ${c+1}`,className:D("animate-fade-up animate-duration-[400ms] animate-ease-linear w-full h-full object-cover",r==null?void 0:r.image)})},c))})},Pk=e=>{const{currentMonth:t,currentYear:n,onChangeMonthYear:r,locale:o=Ro,mode:a="month"}=e,s=l=>{let c=t,u=n;a==="month"?l==="prev"?c===0?(c=11,u--):c--:c===11?(c=0,u++):c++:u=l==="prev"?u-1:u+1,r(c,u)};return i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(fe,{variant:"ghost",size:"icon",onClick:()=>s("prev"),"aria-label":`Previous ${a}`,children:i.jsx(jb,{className:"!h-8 !w-8"})}),i.jsxs("div",{className:"text-center",children:[i.jsx("h2",{className:"text-2xl font-bold capitalize",children:a==="month"?o.localize.month(t,{width:"wide"}):n}),a==="month"&&i.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),i.jsx(fe,{variant:"ghost",size:"icon",onClick:()=>s("next"),"aria-label":`Next ${a}`,children:i.jsx(Ab,{className:"!h-8 !w-8"})})]})},Oh=({initIndex:e,onPageChange:t,totalItems:n,totalPages:r,pageTotalItems:o,currentPage:a,showItemsCounter:s=!0})=>i.jsxs("div",{className:"flex flex-col gap-2 items-end",children:[s&&i.jsxs("p",{children:[i.jsx("b",{children:e+1})," - ",i.jsx("b",{children:e+o})," (",n,")"]}),r>1&&i.jsx(Xs,{currentPage:a,onPageChange:t,totalPages:r,totalItems:n,startIndex:e,endIndex:e+o,onPreviousPage:()=>t(a-1),onNextPage:()=>t(a+1)})]}),Mk=e=>{const{data:t=[],perPage:n=50,initialPage:r=1,children:o,itemsContainerClass:a="",emptyState:s=i.jsx(_h,{notFoundText:"No item found!"}),isLoading:l=!1,showItemsCounter:c=!0,loadingVariant:u="loader"}=e,[f,m]=C.useState(t);C.useEffect(()=>{m(t),p(1)},[t]);const[g,p]=C.useState(r),v=Math.ceil(f.length/n),h=(g-1)*n,b=g*n,y=f.slice(h,b),w=l?i.jsx("section",{className:"w-full",children:u==="loader"?i.jsx(Pp,{size:"lg"}):i.jsx(Yr,{className:"h-12 w-full",repeat:n})}):f.length===0?s:void 0;return i.jsxs("div",{className:"flex flex-col gap-4 items-end",children:[i.jsx(Oh,{initIndex:h,endIndex:b,totalItems:f.length,totalPages:v,currentPage:g,pageTotalItems:y.length,onPageChange:p,showItemsCounter:c}),w?i.jsx("section",{className:"w-full",children:w}):i.jsx("section",{className:`w-full ${a}`,children:y.map((x,S)=>i.jsx(C.Fragment,{children:o(x,S)},x.id))}),i.jsx(Oh,{initIndex:h,endIndex:b,totalItems:f.length,totalPages:v,currentPage:g,pageTotalItems:y.length,onPageChange:p,showItemsCounter:c})]})},Tk=({fixed:e,isOpen:t,onToggle:n,children:r,className:o})=>{const[a,s]=C.useState(!0),l=C.useRef(null),c=C.useRef(null),u=t!==void 0?t:a,f=()=>{var g;e||(n?n(!1):s(!1),(g=c.current)==null||g.focus())},m=g=>{l.current&&!l.current.contains(g.target)&&!e&&f()};return C.useEffect(()=>{if(!e)return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[e]),i.jsxs(i.Fragment,{children:[i.jsx("aside",{ref:l,className:D("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||u},{"w-0":!u&&!e},{"translate-x-0":u},{"-translate-x-full":!u&&!e},o),"aria-hidden":!u,children:r}),e&&i.jsx("div",{className:"w-72 relative"})]})},jk=({children:e,className:t})=>i.jsx("header",{className:D("p-4 flex justify-between items-center border-b",t),"aria-label":"Sidebar header",children:e}),Ak=({children:e,className:t})=>i.jsx("nav",{"aria-label":"Sidebar navigation",className:t,children:e}),Rk=({children:e,className:t})=>i.jsx("ul",{className:D("flex flex-col gap-2 my-4 px-4",t),children:e}),Dk=({children:e,className:t,onClick:n})=>i.jsx("li",{className:D("flex items-center gap-2 hover:bg-gray-100 rounded transition-colors",t),onClick:n,children:e}),Ik=({children:e,className:t})=>i.jsx("footer",{className:D("mt-auto p-4 text-sm",t),"aria-label":"Sidebar footer",children:e});N.Accordion=KC,N.AccordionContent=Nu,N.AccordionItem=xu,N.AccordionTrigger=Cu,N.AdaptiveInput=Zr,N.AlertDialog=b1,N.AlertDialogAction=pf,N.AlertDialogCancel=hf,N.AlertDialogContent=cf,N.AlertDialogDescription=mf,N.AlertDialogFooter=uf,N.AlertDialogHeader=df,N.AlertDialogOverlay=rs,N.AlertDialogPortal=lf,N.AlertDialogTitle=ff,N.AlertDialogTrigger=w1,N.Autocomplete=y1,N.Avatar=kf,N.AvatarFallback=Mf,N.AvatarImage=Pf,N.Badge=Zt,N.BentoCard=vb,N.BentoGrid=gb,N.Button=fe,N.Calendar=tN,N.Card=Tf,N.CardContent=Df,N.CardDescription=Rf,N.CardFooter=If,N.CardHeader=jf,N.CardTitle=Af,N.Checkbox=Ur,N.Command=io,N.CommandDialog=PN,N.CommandEmpty=ps,N.CommandGroup=lo,N.CommandInput=fs,N.CommandItem=fn,N.CommandList=ms,N.CommandSeparator=hs,N.CommandShortcut=qf,N.CurrencyInput=Xf,N.DataTable=xk,N.Dialog=ro,N.DialogClose=kN,N.DialogContent=Kn,N.DialogDescription=so,N.DialogFooter=Kf,N.DialogHeader=oo,N.DialogOverlay=us,N.DialogPortal=Yf,N.DialogProvider=HE,N.DialogTitle=ao,N.DialogTrigger=Uf,N.DropdownMenu=ad,N.DropdownMenuCheckboxItem=Pa,N.DropdownMenuContent=ka,N.DropdownMenuGroup=$0,N.DropdownMenuItem=cd,N.DropdownMenuLabel=Ma,N.DropdownMenuPortal=L0,N.DropdownMenuRadioGroup=B0,N.DropdownMenuRadioItem=dd,N.DropdownMenuSeparator=Fr,N.DropdownMenuShortcut=ud,N.DropdownMenuSub=F0,N.DropdownMenuSubContent=ld,N.DropdownMenuSubTrigger=id,N.DropdownMenuTrigger=sd,N.EmptyItems=_h,N.HelpCarousel=Ck,N.HtmlTextArea=Nk,N.HtmlTextEditor=Ek,N.Input=Gn,N.Label=Jf,N.LazyImageGallery=kk,N.MonthNavigator=Pk,N.MultiSelect=bm,N.NavigationMenu=Um,N.NavigationMenuContent=Xm,N.NavigationMenuIndicator=Zm,N.NavigationMenuItem=dS,N.NavigationMenuLink=uS,N.NavigationMenuList=Ym,N.NavigationMenuTrigger=qm,N.NavigationMenuViewport=Ts,N.PaginatedItems=Mk,N.Pagination=Qm,N.PaginationContent=Jm,N.PaginationControls=Xs,N.PaginationEllipsis=rp,N.PaginationItem=ep,N.PaginationLink=mo,N.PaginationNext=np,N.PaginationPrevious=tp,N.PasswordInput=wS,N.Popover=fm,N.PopoverAnchor=VN,N.PopoverContent=bs,N.PopoverTrigger=mm,N.Progress=Rs,N.RadioGroup=Sp,N.RadioGroupItem=Ep,N.Select=Oa,N.SelectContent=Gr,N.SelectGroup=pC,N.SelectItem=St,N.SelectLabel=qd,N.SelectScrollDownButton=Fa,N.SelectScrollUpButton=La,N.SelectSeparator=Xd,N.SelectTrigger=Hr,N.SelectValue=$a,N.Separator=co,N.Sidebar=Tk,N.SidebarFooter=Ik,N.SidebarHeader=jk,N.SidebarList=Rk,N.SidebarListItem=Dk,N.SidebarNav=Ak,N.Skeleton=Yr,N.Spinner=Pp,N.Switch=Dp,N.Table=sr,N.TableBody=lr,N.TableCaption=Xi,N.TableCell=qt,N.TableFooter=qi,N.TableHead=En,N.TableHeader=ir,N.TableRow=Kt,N.Tabs=BS,N.TabsContent=qp,N.TabsList=Yp,N.TabsTrigger=Kp,N.Textarea=Xp,N.Toaster=hE,N.Toggle=eh,N.ToggleGroup=uh,N.ToggleGroupItem=fh,N.Tooltip=WE,N.TooltipContent=Ch,N.TooltipProvider=zE,N.TooltipTrigger=VE,N.badgeVariants=rl,N.buttonVariants=ar,N.capitalize=pb,N.cn=D,N.containSearchStrings=Vi,N.formatCurrency=qv,N.formatDateAndMonth=ob,N.formatDateAndTime=Jv,N.formatDateAndWeekday=nb,N.formatDateAndWeekdayAndYear=rb,N.formatDateDayMonth=Qv,N.formatDateMonthYear=Zv,N.formatDateUTC=Xv,N.formatLongDate=ab,N.formatShortDate=sb,N.formatWeekDayAndShortDate=lb,N.getLongDate=tb,N.getMonthName=eb,N.getMonthYearFromISODate=ib,N.mergeObjects=Bo,N.navigationMenuTriggerStyle=Km,N.normalizeString=De,N.normalizeStringToCompare=zo,N.padString=Fo,N.replaceTemplateWithVariables=hb,N.sortByField=ub,N.sortByFieldDesc=fb,N.sortByName=db,N.sortByNestedField=mb,N.sortNormalize=cb,N.spinnerColors=jS,N.spinnerSizes=AS,N.toast=pE,N.toggleVariants=Bs,N.useArray=MC,N.useCopyToClipboard=TC,N.useDebounce=nu,N.useDialog=GE,N.useDisclosure=UE,N.useDisclosureBool=YE,N.useFileUtilities=pk,N.useIsMobile=bk,N.useKeyPress=hk,N.useLocalStorage=gk,N.useMediaQuery=vk,N.usePWAInstall=wk,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|
|
277
|
+
*/function Rh(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 Eo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rh(Object(n),!0).forEach(function(r){ek(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dh(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,Ih(r.key),r)}}function JE(e,t,n){return t&&Dh(e.prototype,t),n&&Dh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ek(e,t,n){return t=Ih(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ko(){return ko=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},ko.apply(this,arguments)}function tk(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);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ih(e){var t=tk(e,"string");return typeof t=="symbol"?t:String(t)}var _h={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)?,/,l=(r||a)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(c){var u,f,m,h,p,v,g,b,y;if(u=c.match(s),!u)throw new Error("invalid data URI");for(f=u[2]?u[1]:"text/plain"+(u[3]||";charset=US-ASCII"),m=!!u[4],h=c.slice(u[0].length),m?p=atob(h):p=decodeURIComponent(h),v=new ArrayBuffer(p.length),g=new Uint8Array(v),b=0;b<p.length;b+=1)g[b]=p.charCodeAt(b);return r?new Blob([o?g:v],{type:f}):(y=new a,y.append(v),y.getBlob(f))};t.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(c,u,f){var m=this;setTimeout(function(){f&&n.toDataURL&&l?c(l(m.toDataURL(u,f))):c(m.mozGetAsFile("blob",u))})}:n.toDataURL&&l&&(n.msToBlob?n.toBlob=function(c,u,f){var m=this;setTimeout(function(){(u&&u!=="image/png"||f)&&n.toDataURL&&l?c(l(m.toDataURL(u,f))):c(m.msToBlob(u))})}:n.toBlob=function(c,u,f){var m=this;setTimeout(function(){c(l(m.toDataURL(u,f)))})})),e.exports?e.exports=l:t.dataURLtoBlob=l}(window)})(_h);var Oh=_h.exports,nk=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},$h={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},rk=typeof window<"u"&&typeof window.document<"u",jt=rk?window:{},Po=function(t){return t>0&&t<1/0},ok=Array.prototype.slice;function Zs(e){return Array.from?Array.from(e):ok.call(e)}var ak=/^image\/.+$/;function Qs(e){return ak.test(e)}function sk(e){var t=Qs(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var Lh=String.fromCharCode;function ik(e,t,n){var r="",o;for(n+=t,o=t;o<n;o+=1)r+=Lh(e.getUint8(o));return r}var lk=jt.btoa;function Fh(e,t){for(var n=[],r=8192,o=new Uint8Array(e);o.length>0;)n.push(Lh.apply(null,Zs(o.subarray(0,r)))),o=o.subarray(r);return"data:".concat(t,";base64,").concat(lk(n.join("")))}function ck(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,l=2;l+1<s;){if(t.getUint8(l)===255&&t.getUint8(l+1)===225){o=l;break}l+=1}if(o){var c=o+4,u=o+10;if(ik(t,c,4)==="Exif"){var f=t.getUint16(u);if(r=f===18761,(r||f===19789)&&t.getUint16(u+2,r)===42){var m=t.getUint32(u+4,r);m>=8&&(a=u+m)}}}if(a){var h=t.getUint16(a,r),p,v;for(v=0;v<h;v+=1)if(p=a+v*12+2,t.getUint16(p,r)===274){p+=8,n=t.getUint16(p,r),t.setUint16(p,1,r);break}}}catch{n=1}return n}function dk(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 uk=/\.\d*(?:0|9){12}\d*$/;function Bh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return uk.test(e)?Math.round(e*t)/t:e}function Jn(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 l=n*t;(o==="contain"||o==="none")&&l>r||o==="cover"&&l<r?n=r/t:r=n*t}else a?n=r/t:s&&(r=n*t);return{width:r,height:n}}function fk(e){for(var t=Zs(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 l=t[o+2]*256+t[o+3],c=o+l+2,u=t.slice(o,c);r.push(u),o=c}}return r.reduce(function(f,m){return m[0]===255&&m[1]===225?f.concat(m):f},[])}function mk(e,t){var n=Zs(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 pk=jt.ArrayBuffer,Js=jt.FileReader,Ht=jt.URL||jt.webkitURL,hk=/\.\w+$/,gk=jt.Compressor,vk=function(){function e(t,n){QE(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=Eo(Eo({},$h),n),this.aborted=!1,this.result=null,this.init()}return JE(e,[{key:"init",value:function(){var n=this,r=this.file,o=this.options;if(!nk(r)){this.fail(new Error("The first argument must be a File or Blob object."));return}var a=r.type;if(!Qs(a)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!Ht||!Js){this.fail(new Error("The current browser does not support image compression."));return}pk||(o.checkOrientation=!1,o.retainExif=!1);var s=a==="image/jpeg",l=s&&o.checkOrientation,c=s&&o.retainExif;if(Ht&&!l&&!c)this.load({url:Ht.createObjectURL(r)});else{var u=new Js;this.reader=u,u.onload=function(f){var m=f.target,h=m.result,p={},v=1;l&&(v=ck(h),v>1&&ko(p,dk(v))),c&&(n.exif=fk(h)),l||c?!Ht||v>1?p.url=Fh(h,a):p.url=Ht.createObjectURL(r):p.url=h,n.load(p)},u.onabort=function(){n.fail(new Error("Aborted to read the image with FileReader."))},u.onerror=function(){n.fail(new Error("Failed to read the image with FileReader."))},u.onloadend=function(){n.reader=null},l||c?u.readAsArrayBuffer(r):u.readAsDataURL(r)}}},{key:"load",value:function(n){var r=this,o=this.file,a=this.image;a.onload=function(){r.draw(Eo(Eo({},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."))},jt.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(jt.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,l=s===void 0?0:s,c=n.scaleX,u=c===void 0?1:c,f=n.scaleY,m=f===void 0?1:f,h=this.file,p=this.image,v=this.options,g=document.createElement("canvas"),b=g.getContext("2d"),y=Math.abs(l)%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,E=Math.max(v.minWidth,0)||0,A=Math.max(v.minHeight,0)||0,k=o/a,P=v.width,j=v.height;if(y){var $=[S,x];x=$[0],S=$[1];var H=[A,E];E=H[0],A=H[1];var z=[j,P];P=z[0],j=z[1]}w&&(k=P/j);var ee=Jn({aspectRatio:k,width:x,height:S},"contain");x=ee.width,S=ee.height;var K=Jn({aspectRatio:k,width:E,height:A},"cover");if(E=K.width,A=K.height,w){var te=Jn({aspectRatio:k,width:P,height:j},v.resize);P=te.width,j=te.height}else{var V=Jn({aspectRatio:k,width:P,height:j}),Q=V.width;P=Q===void 0?o:Q;var _=V.height;j=_===void 0?a:_}P=Math.floor(Bh(Math.min(Math.max(P,E),x))),j=Math.floor(Bh(Math.min(Math.max(j,A),S)));var O=-P/2,M=-j/2,U=P,T=j,I=[];if(w){var L=0,F=0,J=o,R=a,Y=Jn({aspectRatio:k,width:o,height:a},{contain:"cover",cover:"contain"}[v.resize]);J=Y.width,R=Y.height,L=(o-J)/2,F=(a-R)/2,I.push(L,F,J,R)}if(I.push(O,M,U,T),y){var q=[j,P];P=q[0],j=q[1]}g.width=P,g.height=j,Qs(v.mimeType)||(v.mimeType=h.type);var ne="transparent";h.size>v.convertSize&&v.convertTypes.indexOf(v.mimeType)>=0&&(v.mimeType="image/jpeg");var re=v.mimeType==="image/jpeg";if(re&&(ne="#fff"),b.fillStyle=ne,b.fillRect(0,0,P,j),v.beforeDraw&&v.beforeDraw.call(this,b,g),!this.aborted&&(b.save(),b.translate(P/2,j/2),b.rotate(l*Math.PI/180),b.scale(u,m),b.drawImage.apply(b,[p].concat(I)),b.restore(),v.drew&&v.drew.call(this,b,g),!this.aborted)){var ie=function(ye){if(!r.aborted){var Fe=function(Te){return r.done({naturalWidth:o,naturalHeight:a,result:Te})};if(ye&&re&&v.retainExif&&r.exif&&r.exif.length>0){var Oe=function(Te){return Fe(Oh(Fh(mk(Te,r.exif),v.mimeType)))};if(ye.arrayBuffer)ye.arrayBuffer().then(Oe).catch(function(){r.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var Ee=new Js;r.reader=Ee,Ee.onload=function(Be){var Te=Be.target;Oe(Te.result)},Ee.onabort=function(){r.fail(new Error("Aborted to read the compressed image with FileReader."))},Ee.onerror=function(){r.fail(new Error("Failed to read the compressed image with FileReader."))},Ee.onloadend=function(){r.reader=null},Ee.readAsArrayBuffer(ye)}}else Fe(ye)}};g.toBlob?g.toBlob(ie,v.mimeType,v.quality):ie(Oh(g.toDataURL(v.mimeType,v.quality)))}}},{key:"done",value:function(n){var r=n.naturalWidth,o=n.naturalHeight,a=n.result,s=this.file,l=this.image,c=this.options;if(Ht&&l.src.indexOf("blob:")===0&&Ht.revokeObjectURL(l.src),a)if(c.strict&&!c.retainExif&&a.size>s.size&&c.mimeType===s.type&&!(c.width>r||c.height>o||c.minWidth>r||c.minHeight>o||c.maxWidth<r||c.maxHeight<o))a=s;else{var u=new Date;a.lastModified=u.getTime(),a.lastModifiedDate=u,a.name=s.name,a.name&&a.type!==s.type&&(a.name=a.name.replace(hk,sk(a.type)))}else a=s;this.result=a,c.success&&c.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=gk,e}},{key:"setDefaults",value:function(n){ko($h,n)}}]),e}();const bk=()=>({compressImage:async(n,r)=>await new Promise((o,a)=>{new vk(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]}}),wk=function(e,t){const[n,r]=C.useState(!1);function o({key:s}){s===e&&r(!0)}const a=({key:s})=>{s===e&&r(!1)};return C.useEffect(()=>(window.addEventListener("keydown",o),window.addEventListener("keyup",a),()=>{window.removeEventListener("keydown",o),window.removeEventListener("keyup",a)})),C.useEffect(()=>{n&&(t==null||t(n))},[n]),n};function yk(e,t){const[n,r]=C.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 l=s instanceof Function?s(n):s;r(l),window.localStorage.setItem(e,JSON.stringify(l))}catch(l){console.error(l)}},()=>{try{r(t),window.localStorage.removeItem(e)}catch(s){console.error(s)}}]}function xk(e){const[t,n]=C.useState(!1);return C.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 ei=768;function Ck(){const[e,t]=d.useState(void 0);return d.useEffect(()=>{const n=window.matchMedia(`(max-width: ${ei-1}px)`),r=()=>{t(window.innerWidth<ei)};return n.addEventListener("change",r),t(window.innerWidth<ei),()=>n.removeEventListener("change",r)},[]),!!e}const Nk=()=>{const[e,t]=C.useState(null),[n,r]=C.useState(!1);return C.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)}))}}},ti=e=>{const{currentPage:t,totalPages:n,totalItems:r,startIndex:o,endIndex:a,onPageChange:s,onPreviousPage:l,onNextPage:c,showItemsCounter:u=!0,counterText:f="Showing {{startIndex}} to {{endIndex}} of {{totalItems}} results"}=e,m=()=>{const h=[];if(n<=7)for(let v=1;v<=n;v++)h.push(v);else{h.push(1),t>4&&h.push("...");const v=Math.max(2,t-1),g=Math.min(n-1,t+1);for(let b=v;b<=g;b++)b!==1&&b!==n&&h.push(b);t<n-3&&h.push("..."),n>1&&h.push(n)}return h};return n<=1?null:i.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[u?i.jsx("div",{className:"text-sm text-muted-foreground",children:qi(f,{startIndex:o+1,endIndex:a,totalItems:r})}):null,i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx(fe,{variant:"outline",size:"sm",onClick:l,disabled:t===1,className:"h-8 w-8 p-0",children:i.jsx(mr,{className:"h-4 w-4"})}),m().map((h,p)=>i.jsx(C.Fragment,{children:h==="..."?i.jsx("span",{className:"px-2 text-muted-foreground",children:"..."}):i.jsx(fe,{variant:t===h?"default":"outline",size:"sm",onClick:()=>s(h),className:"h-8 w-8 p-0",children:h})},p)),i.jsx(fe,{variant:"outline",size:"sm",onClick:c,disabled:t===n,className:"h-8 w-8 p-0",children:i.jsx(Mn,{className:"h-4 w-4"})})]})]})};function Sk({data:e,columns:t,searchFields:n,filters:r=[],pageSize:o=40,className:a="",loading:s=!1,tools:l,activeFilters:c={}},u){var Ee,Be,Te,er,At,tr,rt,To,Mo;const[f,m]=C.useState(""),[h,p]=C.useState(1),[v,g]=C.useState(c),[b,y]=C.useState({field:null,direction:null}),[w,x]=C.useState(new Set),[S,E]=C.useState(t),[A,k]=C.useState(0),P=lu(f,1e3),j=(G,ae)=>String(G.id||G._id||`row-${ae}`),$=C.useMemo(()=>{let G=e.slice();if(P.trim()){const ae=P.toLowerCase();G=G.filter(ce=>n.some(ge=>{const Re=ce[ge];return Re==null?!1:String(Re).toLowerCase().includes(ae)}))}if(Object.entries(v).forEach(([ae,ce])=>{ce&&ce!=="all"&&(G=G.filter(ge=>{const Re=ge[ae];return String(Re)===ce}))}),b.field&&b.direction){const{field:ae,direction:ce}=b;G.sort((ge,Re)=>{const ut=ge[ae],ot=Re[ae];return ut==null&&ot==null?0:ut==null?ce==="asc"?-1:1:ot==null?ce==="asc"?1:-1:typeof ut=="string"&&typeof ot=="string"?ce==="asc"?ut.localeCompare(ot):ot.localeCompare(ut):ce==="asc"?ut-ot:ot-ut})}return G},[e,n,P,v,b,A]),H=C.useMemo(()=>{const G=$.length,ae=Math.ceil(G/o),ce=(h-1)*o,ge=ce+o;return{currentData:$.slice(ce,ge),totalItems:G,totalPages:ae,startIndex:ce,endIndex:Math.min(ge,G)}},[$,h,o]);C.useEffect(()=>{p(1)},[P,v,b]);const z=C.useCallback(()=>$.filter((G,ae)=>{const ce=j(G,ae);return w.has(ce)}),[$,w]),ee=C.useCallback(()=>w.size,[w]),K=C.useCallback(G=>{x(new Set(G))},[]),te=C.useCallback(()=>$,[$]),V=C.useCallback(()=>{g({}),m(""),y({field:null,direction:null}),p(1)},[]),Q=C.useCallback((G="table-export")=>{AC($,S,G)},[$,S]),_=C.useCallback(G=>{G>=1&&G<=H.totalPages&&p(G)},[H.totalPages]),O=C.useCallback(()=>{k(G=>G+1)},[]),M=C.useCallback((G,ae)=>{g(ce=>({...ce,[G]:ae}))},[]),U=C.useCallback(G=>{g(ae=>{const ce={...ae};return delete ce[G],ce})},[]),T=C.useCallback(()=>{V()},[V]),I=C.useCallback(G=>{y(ae=>ae.field===G?ae.direction==="asc"?{field:G,direction:"desc"}:ae.direction==="desc"?{field:null,direction:null}:{field:G,direction:"asc"}:{field:G,direction:"asc"})},[]),L=C.useCallback((G,ae)=>{E(ce=>ce.map(ge=>String(ge.key)===G?{...ge,hidden:!ae}:ge))},[]),F=C.useCallback(()=>{E(t)},[t]),J=C.useCallback(G=>{if(G){const ae=new Set;H.currentData.forEach((ce,ge)=>{const Re=j(ce,ge);ae.add(Re)}),x(ae)}else x(new Set)},[H.currentData]),R=C.useCallback((G,ae)=>{x(ce=>{const ge=new Set(ce);return ae?ge.add(G):ge.delete(G),ge})},[]),Y=C.useCallback(()=>{Q()},[Q]),q=C.useCallback(()=>{p(G=>Math.max(G-1,1))},[]),ne=C.useCallback(()=>{p(G=>Math.min(G+1,H.totalPages))},[H.totalPages]),re=C.useCallback(G=>{_(G)},[_]),Ne=Object.values(v).filter(G=>G&&G!=="all").length>0||f.trim().length>0||b.field!==null,ye=S.filter(G=>!G.hidden),Fe=w.size,Oe=C.useMemo(()=>H.currentData.length>0&&H.currentData.every((G,ae)=>{const ce=j(G,ae);return w.has(ce)}),[H.currentData,w]);return C.useImperativeHandle(u,()=>({getSelectedItems:z,clearSelection:()=>x(new Set),getSelectionCount:ee,selectItems:K,getFilteredData:te,resetFilters:V,exportData:Q,goToPage:_,refresh:O}),[z,ee,K,te,V,Q,_,O]),s?i.jsxs("div",{className:`space-y-4 ${a}`,children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[i.jsx("div",{className:"h-10 w-full max-w-sm bg-muted animate-pulse rounded"}),r.map((G,ae)=>i.jsx("div",{className:"h-10 w-40 bg-muted animate-pulse rounded"},ae)),i.jsx("div",{className:"h-10 w-32 ml-auto bg-muted animate-pulse rounded"})]}),i.jsx(jC,{columns:ye.length+1,rows:o}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("div",{className:"h-4 w-48 bg-muted animate-pulse rounded"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("div",{className:"h-8 w-20 bg-muted animate-pulse rounded"}),i.jsx("div",{className:"h-8 w-8 bg-muted animate-pulse rounded"}),i.jsx("div",{className:"h-8 w-8 bg-muted animate-pulse rounded"}),i.jsx("div",{className:"h-8 w-8 bg-muted animate-pulse rounded"}),i.jsx("div",{className:"h-8 w-20 bg-muted animate-pulse rounded"})]})]})]}):i.jsxs("div",{className:`space-y-4 ${a}`,children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[(Ee=l==null?void 0:l.search)!=null&&Ee.hide?null:i.jsx(xC,{placeholder:(Be=l==null?void 0:l.search)==null?void 0:Be.placeholder,value:f,onChange:m}),r.map(G=>i.jsx(wC,{filter:G,value:v[String(G.field)],onChange:ae=>M(String(G.field),ae)},String(G.field))),(Te=l==null?void 0:l.columnSelector)!=null&&Te.hide?i.jsx(G0,{columns:S,onToggleVisibility:L,onReset:F}):null,(er=l==null?void 0:l.export)!=null&&er.hide?i.jsxs(fe,{variant:"outline",onClick:Y,children:[i.jsx(Ub,{className:"h-4 w-4 mr-2"}),((At=l==null?void 0:l.export)==null?void 0:At.label)??"Export CSV"]}):null,!((tr=l==null?void 0:l.clearFilters)!=null&&tr.hide)&&Ne&&i.jsxs(fe,{variant:"outline",onClick:T,children:[i.jsx(ht,{className:"h-4 w-4 mr-2"}),((rt=l==null?void 0:l.clearFilters)==null?void 0:rt.label)??"Clear All"]})]}),i.jsx(ow,{searchTerm:f,activeFilters:v,sortState:b,filters:r,columns:S,onClearSearch:()=>m(""),onClearFilter:U,onClearSort:()=>y({field:null,direction:null})}),i.jsx(CC,{selectedCount:Fe,onClearSelection:()=>x(new Set)}),i.jsx("div",{className:"rounded-md border",children:i.jsxs(dr,{children:[i.jsx(ur,{children:i.jsx(TC,{allowSelectAllRows:!((To=l==null?void 0:l.rowSelector)!=null&&To.hide),columns:S,sortState:b,allRowsSelected:Oe,hasData:H.currentData.length>0,onSort:I,onToggleAllRows:J})}),i.jsx(fr,{children:H.currentData.length===0?i.jsx("tr",{children:i.jsx(Qt,{colSpan:ye.length+1,className:"h-24 text-center text-muted-foreground",children:Ne?"No results found for the current filters.":"No data available."})}):H.currentData.map((G,ae)=>{var ge;const ce=j(G,ae);return i.jsx(MC,{row:G,index:ae,allowSelection:!((ge=l==null?void 0:l.rowSelector)!=null&&ge.hide),columns:S,isSelected:w.has(ce),rowId:ce,onToggleSelection:R},ce)})})]})}),i.jsx(ti,{currentPage:h,totalPages:H.totalPages,totalItems:H.totalItems,startIndex:H.startIndex,endIndex:H.endIndex,onPageChange:re,onPreviousPage:q,onNextPage:ne,counterText:(Mo=l==null?void 0:l.pagination)==null?void 0:Mo.label})]})}const Ek=C.forwardRef(Sk),zh=e=>{const{notFoundText:t,notFoundAction:n,icon:r,className:o}=e;return i.jsxs("div",{className:D("flex flex-col gap-4 items-center bg-gray-200 rounded-lg p-6 justify-center",o),children:[r||i.jsx(Wb,{size:45}),i.jsxs("div",{className:"text-lg font-medium m-0",children:[t,n||null]})]})};function kk(e){const{triggerElement:t,steps:n}=e,[r,o]=C.useState(!1),[a,s]=C.useState(0),l=()=>{s(u=>u<n.length-1?u+1:u)},c=()=>{s(u=>u>0?u-1:u)};return i.jsxs(io,{open:r,onOpenChange:o,children:[i.jsx(Qf,{asChild:!0,children:t}),i.jsxs(Xn,{className:"sm:max-w-[425px]",children:[i.jsxs(lo,{className:D(n[a].title===""&&"sr-only"),children:[i.jsx(co,{children:n[a].title}),i.jsx(uo,{className:"sr-only",children:n[a].title})]}),i.jsx("div",{children:n[a].description}),i.jsxs("div",{className:"flex items-center justify-between mt-4",children:[i.jsx(fe,{variant:"ghost",size:"icon",onClick:c,disabled:a===0,children:i.jsx(mr,{className:"h-4 w-4"})}),i.jsx("div",{className:"flex justify-center gap-1",children:n.map((u,f)=>i.jsx("div",{className:D("h-3 w-3 rounded-full",f===a?"bg-primary":"bg-gray-200")},f))}),i.jsx(fe,{variant:"ghost",size:"icon",onClick:l,disabled:a===n.length-1,children:i.jsx(Mn,{className:"h-4 w-4"})})]})]})]})}const Pk=e=>i.jsx("div",{className:"unreset",dangerouslySetInnerHTML:{__html:e.children}}),Tk=e=>{const{execCommand:t}=e,n=()=>{const a=document.createElement("input");a.type="file",a.accept="image/*",a.onchange=async s=>{var c;const l=(c=s.target.files)==null?void 0:c[0];if(l){const u=new FileReader;u.onload=()=>{t("insertImage",u.result)},u.readAsDataURL(l)}},a.click()},r=()=>{const a=prompt("Enter the URL:");a&&t("createLink",a)},o=a=>{t("fontSize",a)};return i.jsxs("div",{className:"flex flex-wrap gap-2 border-b pb-2 mb-2",children:[i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("bold"),type:"button",children:i.jsx(Lb,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("italic"),type:"button",children:i.jsx(Xb,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("underline"),type:"button",children:i.jsx(rw,{size:16})}),i.jsxs(za,{onValueChange:a=>o(a),defaultValue:"3",children:[i.jsx(Kr,{className:"w-[100px]",children:i.jsx(Wa,{placeholder:"Size"})}),i.jsxs(qr,{children:[i.jsx(kt,{value:"1",children:i.jsx("div",{children:"Small"})}),i.jsx(kt,{value:"3",children:i.jsx("div",{children:"Medium"})}),i.jsx(kt,{value:"5",children:i.jsx("div",{children:"Large"})}),i.jsx(kt,{value:"7",children:i.jsx("div",{children:"Extra Large"})})]})]}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("insertUnorderedList"),type:"button",children:i.jsx(Jb,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("insertOrderedList"),type:"button",children:i.jsx(Qb,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("formatBlock","blockquote"),type:"button",children:i.jsx(tw,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:n,type:"button",children:i.jsx(Kb,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:r,type:"button",children:i.jsx(Zb,{size:16})})]})},Mk=({initialValue:e="",onChange:t,className:n})=>{const r=C.useRef(null);C.useEffect(()=>{const s=new MutationObserver(()=>{t==null||t(r.current?r.current.innerHTML:"")});r.current&&s.observe(r.current,{childList:!0})},[]),C.useEffect(()=>{r.current&&(r.current.innerHTML=e)},[]);const o=()=>{r.current&&(t==null||t(r.current.innerHTML))},a=(s,l)=>{r.current&&(document.execCommand(s,!1,l),o())};return i.jsxs("div",{className:D("w-full p-4 border rounded-lg shadow-md",n),children:[i.jsx(Tk,{execCommand:a}),i.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})]})},jk=e=>{const{observerOptions:t,images:n,classNames:r}=e,[o,a]=C.useState([]),s=C.useRef(null);return C.useEffect(()=>{const l={root:document.querySelector(".image-gallery"),rootMargin:"0px",threshold:1,...t};return s.current=new IntersectionObserver(c=>{c.forEach(u=>{if(u.isIntersecting&&u.target instanceof HTMLDivElement){const f=Number(u.target.dataset.index);a(m=>[...new Set([...m,f])])}})},l),()=>{var c;return(c=s.current)==null?void 0:c.disconnect()}},[]),C.useEffect(()=>{document.querySelectorAll(".image-cell").forEach(c=>{var u;return(u=s.current)==null?void 0:u.observe(c)})},[n]),i.jsx("div",{className:D("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((l,c)=>i.jsx("div",{"data-index":c,className:D("image-cell w-full h-52",r==null?void 0:r.imageCell),children:o.includes(c)&&i.jsx("img",{src:l,alt:`Gallery Image ${c+1}`,className:D("animate-fade-up animate-duration-[400ms] animate-ease-linear w-full h-full object-cover",r==null?void 0:r.image)})},c))})},Ak=e=>{const{currentMonth:t,currentYear:n,onChangeMonthYear:r,locale:o=$o,mode:a="month"}=e,s=l=>{let c=t,u=n;a==="month"?l==="prev"?c===0?(c=11,u--):c--:c===11?(c=0,u++):c++:u=l==="prev"?u-1:u+1,r(c,u)};return i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(fe,{variant:"ghost",size:"icon",onClick:()=>s("prev"),"aria-label":`Previous ${a}`,children:i.jsx(Ib,{className:"!h-8 !w-8"})}),i.jsxs("div",{className:"text-center",children:[i.jsx("h2",{className:"text-2xl font-bold capitalize",children:a==="month"?o.localize.month(t,{width:"wide"}):n}),a==="month"&&i.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),i.jsx(fe,{variant:"ghost",size:"icon",onClick:()=>s("next"),"aria-label":`Next ${a}`,children:i.jsx(_b,{className:"!h-8 !w-8"})})]})},Wh=({initIndex:e,onPageChange:t,totalItems:n,totalPages:r,pageTotalItems:o,currentPage:a,showItemsCounter:s=!0})=>i.jsxs("div",{className:"flex flex-col gap-2 items-end",children:[s&&i.jsxs("p",{children:[i.jsx("b",{children:e+1})," - ",i.jsx("b",{children:e+o})," (",n,")"]}),r>1&&i.jsx(ti,{currentPage:a,onPageChange:t,totalPages:r,totalItems:n,startIndex:e,endIndex:e+o,onPreviousPage:()=>t(a-1),onNextPage:()=>t(a+1)})]}),Rk=e=>{const{data:t=[],perPage:n=50,initialPage:r=1,children:o,itemsContainerClass:a="",emptyState:s=i.jsx(zh,{notFoundText:"No item found!"}),isLoading:l=!1,showItemsCounter:c=!0,loadingVariant:u="loader"}=e,[f,m]=C.useState(t);C.useEffect(()=>{m(t),p(1)},[t]);const[h,p]=C.useState(r),v=Math.ceil(f.length/n),g=(h-1)*n,b=h*n,y=f.slice(g,b),w=l?i.jsx("section",{className:"w-full",children:u==="loader"?i.jsx(Dp,{size:"lg"}):i.jsx(Zr,{className:"h-12 w-full",repeat:n})}):f.length===0?s:void 0;return i.jsxs("div",{className:"flex flex-col gap-4 items-end",children:[i.jsx(Wh,{initIndex:g,endIndex:b,totalItems:f.length,totalPages:v,currentPage:h,pageTotalItems:y.length,onPageChange:p,showItemsCounter:c}),w?i.jsx("section",{className:"w-full",children:w}):i.jsx("section",{className:`w-full ${a}`,children:y.map((x,S)=>i.jsx(C.Fragment,{children:o(x,S)},x.id))}),i.jsx(Wh,{initIndex:g,endIndex:b,totalItems:f.length,totalPages:v,currentPage:h,pageTotalItems:y.length,onPageChange:p,showItemsCounter:c})]})},Dk=({fixed:e,isOpen:t,onToggle:n,children:r,className:o})=>{const[a,s]=C.useState(!0),l=C.useRef(null),c=C.useRef(null),u=t!==void 0?t:a,f=()=>{var h;e||(n?n(!1):s(!1),(h=c.current)==null||h.focus())},m=h=>{l.current&&!l.current.contains(h.target)&&!e&&f()};return C.useEffect(()=>{if(!e)return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[e]),i.jsxs(i.Fragment,{children:[i.jsx("aside",{ref:l,className:D("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||u},{"w-0":!u&&!e},{"translate-x-0":u},{"-translate-x-full":!u&&!e},o),"aria-hidden":!u,children:r}),e&&i.jsx("div",{className:"w-72 relative"})]})},Ik=({children:e,className:t})=>i.jsx("header",{className:D("p-4 flex justify-between items-center border-b",t),"aria-label":"Sidebar header",children:e}),_k=({children:e,className:t})=>i.jsx("nav",{"aria-label":"Sidebar navigation",className:t,children:e}),Ok=({children:e,className:t})=>i.jsx("ul",{className:D("flex flex-col gap-2 my-4 px-4",t),children:e}),$k=({children:e,className:t,onClick:n})=>i.jsx("li",{className:D("flex items-center gap-2 hover:bg-gray-100 rounded transition-colors",t),onClick:n,children:e}),Lk=({children:e,className:t})=>i.jsx("footer",{className:D("mt-auto p-4 text-sm",t),"aria-label":"Sidebar footer",children:e});N.Accordion=QC,N.AccordionContent=Mu,N.AccordionItem=Pu,N.AccordionTrigger=Tu,N.AdaptiveInput=to,N.AlertDialog=C1,N.AlertDialogAction=yf,N.AlertDialogCancel=xf,N.AlertDialogContent=hf,N.AlertDialogDescription=wf,N.AlertDialogFooter=vf,N.AlertDialogHeader=gf,N.AlertDialogOverlay=ls,N.AlertDialogPortal=pf,N.AlertDialogTitle=bf,N.AlertDialogTrigger=N1,N.Autocomplete=S1,N.Avatar=Rf,N.AvatarFallback=If,N.AvatarImage=Df,N.Badge=en,N.BentoCard=xb,N.BentoGrid=yb,N.Button=fe,N.Calendar=aN,N.Card=_f,N.CardContent=Ff,N.CardDescription=Lf,N.CardFooter=Bf,N.CardHeader=Of,N.CardTitle=$f,N.Checkbox=Xr,N.Command=fo,N.CommandDialog=AN,N.CommandEmpty=ws,N.CommandGroup=mo,N.CommandInput=vs,N.CommandItem=hn,N.CommandList=bs,N.CommandSeparator=ys,N.CommandShortcut=tm,N.CurrencyInput=nm,N.DataTable=Ek,N.Dialog=io,N.DialogClose=jN,N.DialogContent=Xn,N.DialogDescription=uo,N.DialogFooter=em,N.DialogHeader=lo,N.DialogOverlay=gs,N.DialogPortal=Jf,N.DialogProvider=KE,N.DialogTitle=co,N.DialogTrigger=Qf,N.DropdownMenu=ud,N.DropdownMenuCheckboxItem=Ra,N.DropdownMenuContent=Aa,N.DropdownMenuGroup=z0,N.DropdownMenuItem=hd,N.DropdownMenuLabel=Da,N.DropdownMenuPortal=W0,N.DropdownMenuRadioGroup=H0,N.DropdownMenuRadioItem=gd,N.DropdownMenuSeparator=Vr,N.DropdownMenuShortcut=vd,N.DropdownMenuSub=V0,N.DropdownMenuSubContent=pd,N.DropdownMenuSubTrigger=md,N.DropdownMenuTrigger=fd,N.EmptyItems=zh,N.HelpCarousel=kk,N.HtmlTextArea=Pk,N.HtmlTextEditor=Mk,N.Input=Yn,N.Label=am,N.LazyImageGallery=jk,N.MonthNavigator=Ak,N.MultiSelect=Sm,N.NavigationMenu=Qm,N.NavigationMenuContent=np,N.NavigationMenuIndicator=rp,N.NavigationMenuItem=pS,N.NavigationMenuLink=hS,N.NavigationMenuList=Jm,N.NavigationMenuTrigger=tp,N.NavigationMenuViewport=Is,N.PaginatedItems=Rk,N.Pagination=op,N.PaginationContent=ap,N.PaginationControls=ti,N.PaginationEllipsis=cp,N.PaginationItem=sp,N.PaginationLink=vo,N.PaginationNext=lp,N.PaginationPrevious=ip,N.PasswordInput=NS,N.Popover=bm,N.PopoverAnchor=YN,N.PopoverContent=Ns,N.PopoverTrigger=wm,N.Progress=$s,N.RadioGroup=jp,N.RadioGroupItem=Ap,N.Select=za,N.SelectContent=qr,N.SelectGroup=bC,N.SelectItem=kt,N.SelectLabel=tu,N.SelectScrollDownButton=Ha,N.SelectScrollUpButton=Va,N.SelectSeparator=nu,N.SelectTrigger=Kr,N.SelectValue=Wa,N.Separator=po,N.Sidebar=Dk,N.SidebarFooter=Lk,N.SidebarHeader=Ik,N.SidebarList=Ok,N.SidebarListItem=$k,N.SidebarNav=_k,N.Skeleton=Zr,N.Spinner=Dp,N.Switch=Fp,N.Table=dr,N.TableBody=fr,N.TableCaption=nl,N.TableCell=Qt,N.TableFooter=tl,N.TableHead=Pn,N.TableHeader=ur,N.TableRow=Zt,N.Tabs=HS,N.TabsContent=th,N.TabsList=Jp,N.TabsTrigger=eh,N.Textarea=nh,N.Toaster=wE,N.Toggle=sh,N.ToggleGroup=vh,N.ToggleGroupItem=bh,N.Tooltip=UE,N.TooltipContent=Th,N.TooltipProvider=GE,N.TooltipTrigger=YE,N.badgeVariants=cl,N.buttonVariants=cr,N.capitalize=wb,N.cn=D,N.containSearchStrings=Ki,N.formatCurrency=eb,N.formatDateAndMonth=cb,N.formatDateAndTime=ob,N.formatDateAndWeekday=ib,N.formatDateAndWeekdayAndYear=lb,N.formatDateDayMonth=rb,N.formatDateMonthYear=nb,N.formatDateUTC=tb,N.formatLongDate=db,N.formatShortDate=ub,N.formatWeekDayAndShortDate=mb,N.getLongDate=sb,N.getMonthName=ab,N.getMonthYearFromISODate=fb,N.mergeObjects=Go,N.navigationMenuTriggerStyle=ep,N.normalizeString=De,N.normalizeStringToCompare=Uo,N.padString=Ho,N.replaceTemplateWithVariables=qi,N.sortByField=gb,N.sortByFieldDesc=vb,N.sortByName=hb,N.sortByNestedField=bb,N.sortNormalize=pb,N.spinnerColors=IS,N.spinnerSizes=_S,N.toast=bE,N.toggleVariants=Gs,N.useArray=RC,N.useCopyToClipboard=DC,N.useDebounce=lu,N.useDialog=qE,N.useDisclosure=XE,N.useDisclosureBool=ZE,N.useFileUtilities=bk,N.useIsMobile=Ck,N.useKeyPress=wk,N.useLocalStorage=yk,N.useMediaQuery=xk,N.usePWAInstall=Nk,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|