@flexprice/flexprice-ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,223 @@
1
+ (function(fe,X){typeof exports=="object"&&typeof module<"u"?X(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],X):(fe=typeof globalThis<"u"?globalThis:fe||self,X(fe.FlexpriceUI={},fe.React,fe.ReactDOM))})(this,(function(fe,X,Ao){"use strict";function Oo(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const f=Oo(X),ar=Oo(Ao);var ir={exports:{}},Ut={};var To;function uc(){if(To)return Ut;To=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var i in o)i!=="key"&&(s[i]=o[i])}else s=o;return o=s.ref,{$$typeof:t,type:n,key:a,ref:o!==void 0?o:null,props:s}}return Ut.Fragment=e,Ut.jsx=r,Ut.jsxs=r,Ut}var Bt={};var Po;function dc(){return Po||(Po=1,process.env.NODE_ENV!=="production"&&(function(){function t(C){if(C==null)return null;if(typeof C=="function")return C.$$typeof===$?null:C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case g:return"Fragment";case b:return"Profiler";case x:return"StrictMode";case R:return"Suspense";case N:return"SuspenseList";case O:return"Activity"}if(typeof C=="object")switch(typeof C.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),C.$$typeof){case p:return"Portal";case S:return C.displayName||"Context";case w:return(C._context.displayName||"Context")+".Consumer";case E:var V=C.render;return C=C.displayName,C||(C=V.displayName||V.name||"",C=C!==""?"ForwardRef("+C+")":"ForwardRef"),C;case j:return V=C.displayName||null,V!==null?V:t(C.type)||"Memo";case P:V=C._payload,C=C._init;try{return t(C(V))}catch{}}return null}function e(C){return""+C}function r(C){try{e(C);var V=!1}catch{V=!0}if(V){V=console;var J=V.error,te=typeof Symbol=="function"&&Symbol.toStringTag&&C[Symbol.toStringTag]||C.constructor.name||"Object";return J.call(V,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",te),e(C)}}function n(C){if(C===g)return"<>";if(typeof C=="object"&&C!==null&&C.$$typeof===P)return"<...>";try{var V=t(C);return V?"<"+V+">":"<...>"}catch{return"<...>"}}function o(){var C=k.A;return C===null?null:C.getOwner()}function s(){return Error("react-stack-top-frame")}function a(C){if(I.call(C,"key")){var V=Object.getOwnPropertyDescriptor(C,"key").get;if(V&&V.isReactWarning)return!1}return C.key!==void 0}function i(C,V){function J(){T||(T=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",V))}J.isReactWarning=!0,Object.defineProperty(C,"key",{get:J,configurable:!0})}function c(){var C=t(this.type);return B[C]||(B[C]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),C=this.props.ref,C!==void 0?C:null}function l(C,V,J,te,Ne,Ee){var L=J.ref;return C={$$typeof:v,type:C,key:V,props:J,_owner:te},(L!==void 0?L:null)!==null?Object.defineProperty(C,"ref",{enumerable:!1,get:c}):Object.defineProperty(C,"ref",{enumerable:!1,value:null}),C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(C,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(C,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Ne}),Object.defineProperty(C,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ee}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C}function u(C,V,J,te,Ne,Ee){var L=V.children;if(L!==void 0)if(te)if(_(L)){for(te=0;te<L.length;te++)d(L[te]);Object.freeze&&Object.freeze(L)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(L);if(I.call(V,"key")){L=t(C);var ne=Object.keys(V).filter(function(se){return se!=="key"});te=0<ne.length?"{key: someKey, "+ne.join(": ..., ")+": ...}":"{key: someKey}",oe[L+te]||(ne=0<ne.length?"{"+ne.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ let props = %s;
3
+ <%s {...props} />
4
+ React keys must be passed directly to JSX without using spread:
5
+ let props = %s;
6
+ <%s key={someKey} {...props} />`,te,L,ne,L),oe[L+te]=!0)}if(L=null,J!==void 0&&(r(J),L=""+J),a(V)&&(r(V.key),L=""+V.key),"key"in V){J={};for(var me in V)me!=="key"&&(J[me]=V[me])}else J=V;return L&&i(J,typeof C=="function"?C.displayName||C.name||"Unknown":C),l(C,L,J,o(),Ne,Ee)}function d(C){h(C)?C._store&&(C._store.validated=1):typeof C=="object"&&C!==null&&C.$$typeof===P&&(C._payload.status==="fulfilled"?h(C._payload.value)&&C._payload.value._store&&(C._payload.value._store.validated=1):C._store&&(C._store.validated=1))}function h(C){return typeof C=="object"&&C!==null&&C.$$typeof===v}var m=X,v=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),S=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),k=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,_=Array.isArray,z=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(C){return C()}};var T,B={},U=m.react_stack_bottom_frame.bind(m,s)(),Z=z(n(s)),oe={};Bt.Fragment=g,Bt.jsx=function(C,V,J){var te=1e4>k.recentlyCreatedOwnerStacks++;return u(C,V,J,!1,te?Error("react-stack-top-frame"):U,te?z(n(C)):Z)},Bt.jsxs=function(C,V,J){var te=1e4>k.recentlyCreatedOwnerStacks++;return u(C,V,J,!0,te?Error("react-stack-top-frame"):U,te?z(n(C)):Z)}})()),Bt}var ko;function fc(){return ko||(ko=1,process.env.NODE_ENV==="production"?ir.exports=uc():ir.exports=dc()),ir.exports}var y=fc();function Mo(t,[e,r]){return Math.min(r,Math.max(e,t))}function re(t,e,{checkForDefaultPrevented:r=!0}={}){return function(o){if(t?.(o),r===!1||!o.defaultPrevented)return e?.(o)}}function cr(t,e=[]){let r=[];function n(s,a){const i=f.createContext(a),c=r.length;r=[...r,a];const l=d=>{const{scope:h,children:m,...v}=d,p=h?.[t]?.[c]||i,g=f.useMemo(()=>v,Object.values(v));return y.jsx(p.Provider,{value:g,children:m})};l.displayName=s+"Provider";function u(d,h){const m=h?.[t]?.[c]||i,v=f.useContext(m);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,u]}const o=()=>{const s=r.map(a=>f.createContext(a));return function(i){const c=i?.[t]||s;return f.useMemo(()=>({[`__scope${t}`]:{...i,[t]:c}}),[i,c])}};return o.scopeName=t,[n,mc(o,...e)]}function mc(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=n.reduce((i,{useScope:c,scopeName:l})=>{const d=c(s)[`__scope${l}`];return{...i,...d}},{});return f.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return r.scopeName=e.scopeName,r}function Lo(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Vt(...t){return e=>{let r=!1;const n=t.map(o=>{const s=Lo(o,e);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():Lo(t[o],null)}}}}function le(...t){return f.useCallback(Vt(...t),t)}function Io(t){const e=pc(t),r=f.forwardRef((n,o)=>{const{children:s,...a}=n,i=f.Children.toArray(s),c=i.find(yc);if(c){const l=c.props.children,u=i.map(d=>d===c?f.Children.count(l)>1?f.Children.only(null):f.isValidElement(l)?l.props.children:null:d);return y.jsx(e,{...a,ref:o,children:f.isValidElement(l)?f.cloneElement(l,void 0,u):null})}return y.jsx(e,{...a,ref:o,children:s})});return r.displayName=`${t}.Slot`,r}function pc(t){const e=f.forwardRef((r,n)=>{const{children:o,...s}=r;if(f.isValidElement(o)){const a=vc(o),i=gc(s,o.props);return o.type!==f.Fragment&&(i.ref=n?Vt(n,a):a),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var hc=Symbol("radix.slottable");function yc(t){return f.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===hc}function gc(t,e){const r={...e};for(const n in e){const o=t[n],s=e[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...t,...r}}function vc(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function bc(t){const e=t+"CollectionProvider",[r,n]=cr(e),[o,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:g,children:x}=p,b=X.useRef(null),w=X.useRef(new Map).current;return y.jsx(o,{scope:g,itemMap:w,collectionRef:b,children:x})};a.displayName=e;const i=t+"CollectionSlot",c=Io(i),l=X.forwardRef((p,g)=>{const{scope:x,children:b}=p,w=s(i,x),S=le(g,w.collectionRef);return y.jsx(c,{ref:S,children:b})});l.displayName=i;const u=t+"CollectionItemSlot",d="data-radix-collection-item",h=Io(u),m=X.forwardRef((p,g)=>{const{scope:x,children:b,...w}=p,S=X.useRef(null),E=le(g,S),R=s(u,x);return X.useEffect(()=>(R.itemMap.set(S,{ref:S,...w}),()=>{R.itemMap.delete(S)})),y.jsx(h,{[d]:"",ref:E,children:b})});m.displayName=u;function v(p){const g=s(t+"CollectionConsumer",p);return X.useCallback(()=>{const b=g.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((R,N)=>w.indexOf(R.ref.current)-w.indexOf(N.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:l,ItemSlot:m},v,n]}var xc=f.createContext(void 0);function wc(t){const e=f.useContext(xc);return t||e||"ltr"}function Cc(t){const e=Sc(t),r=f.forwardRef((n,o)=>{const{children:s,...a}=n,i=f.Children.toArray(s),c=i.find(Ec);if(c){const l=c.props.children,u=i.map(d=>d===c?f.Children.count(l)>1?f.Children.only(null):f.isValidElement(l)?l.props.children:null:d);return y.jsx(e,{...a,ref:o,children:f.isValidElement(l)?f.cloneElement(l,void 0,u):null})}return y.jsx(e,{...a,ref:o,children:s})});return r.displayName=`${t}.Slot`,r}function Sc(t){const e=f.forwardRef((r,n)=>{const{children:o,...s}=r;if(f.isValidElement(o)){const a=Rc(o),i=_c(s,o.props);return o.type!==f.Fragment&&(i.ref=n?Vt(n,a):a),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Nc=Symbol("radix.slottable");function Ec(t){return f.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Nc}function _c(t,e){const r={...e};for(const n in e){const o=t[n],s=e[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...t,...r}}function Rc(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var Ac=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=Ac.reduce((t,e)=>{const r=Cc(`Primitive.${e}`),n=f.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(c,{...i,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function Do(t,e){t&&ar.flushSync(()=>t.dispatchEvent(e))}function ke(t){const e=f.useRef(t);return f.useEffect(()=>{e.current=t}),f.useMemo(()=>(...r)=>e.current?.(...r),[])}function jo(t,e=globalThis?.document){const r=ke(t);f.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var Oc="DismissableLayer",sn="dismissableLayer.update",Tc="dismissableLayer.pointerDownOutside",Pc="dismissableLayer.focusOutside",Fo,$o=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Uo=f.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=t,l=f.useContext($o),[u,d]=f.useState(null),h=u?.ownerDocument??globalThis?.document,[,m]=f.useState({}),v=le(e,N=>d(N)),p=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=p.indexOf(g),b=u?p.indexOf(u):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=x,E=Lc(N=>{const j=N.target,P=[...l.branches].some(O=>O.contains(j));!S||P||(o?.(N),a?.(N),N.defaultPrevented||i?.())},h),R=Ic(N=>{const j=N.target;[...l.branches].some(O=>O.contains(j))||(s?.(N),a?.(N),N.defaultPrevented||i?.())},h);return jo(N=>{b===l.layers.size-1&&(n?.(N),!N.defaultPrevented&&i&&(N.preventDefault(),i()))},h),f.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Fo=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Bo(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Fo)}},[u,h,r,l]),f.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Bo())},[u,l]),f.useEffect(()=>{const N=()=>m({});return document.addEventListener(sn,N),()=>document.removeEventListener(sn,N)},[]),y.jsx(ie.div,{...c,ref:v,style:{pointerEvents:w?S?"auto":"none":void 0,...t.style},onFocusCapture:re(t.onFocusCapture,R.onFocusCapture),onBlurCapture:re(t.onBlurCapture,R.onBlurCapture),onPointerDownCapture:re(t.onPointerDownCapture,E.onPointerDownCapture)})});Uo.displayName=Oc;var kc="DismissableLayerBranch",Mc=f.forwardRef((t,e)=>{const r=f.useContext($o),n=f.useRef(null),o=le(e,n);return f.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),y.jsx(ie.div,{...t,ref:o})});Mc.displayName=kc;function Lc(t,e=globalThis?.document){const r=ke(t),n=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let c=function(){Vo(Tc,r,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=c,e.addEventListener("click",o.current,{once:!0})):c()}else e.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",s),e.removeEventListener("click",o.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function Ic(t,e=globalThis?.document){const r=ke(t),n=f.useRef(!1);return f.useEffect(()=>{const o=s=>{s.target&&!n.current&&Vo(Pc,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Bo(){const t=new CustomEvent(sn);document.dispatchEvent(t)}function Vo(t,e,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&o.addEventListener(t,e,{once:!0}),n?Do(o,s):o.dispatchEvent(s)}var an=0;function Dc(){f.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Ho()),document.body.insertAdjacentElement("beforeend",t[1]??Ho()),an++,()=>{an===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),an--}},[])}function Ho(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var cn="focusScope.autoFocusOnMount",ln="focusScope.autoFocusOnUnmount",Wo={bubbles:!1,cancelable:!0},jc="FocusScope",zo=f.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=t,[i,c]=f.useState(null),l=ke(o),u=ke(s),d=f.useRef(null),h=le(e,p=>c(p)),m=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(n){let p=function(w){if(m.paused||!i)return;const S=w.target;i.contains(S)?d.current=S:We(d.current,{select:!0})},g=function(w){if(m.paused||!i)return;const S=w.relatedTarget;S!==null&&(i.contains(S)||We(d.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const E of w)E.removedNodes.length>0&&We(i)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const b=new MutationObserver(x);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),b.disconnect()}}},[n,i,m.paused]),f.useEffect(()=>{if(i){Zo.add(m);const p=document.activeElement;if(!i.contains(p)){const x=new CustomEvent(cn,Wo);i.addEventListener(cn,l),i.dispatchEvent(x),x.defaultPrevented||(Fc(Hc(Ko(i)),{select:!0}),document.activeElement===p&&We(i))}return()=>{i.removeEventListener(cn,l),setTimeout(()=>{const x=new CustomEvent(ln,Wo);i.addEventListener(ln,u),i.dispatchEvent(x),x.defaultPrevented||We(p??document.body,{select:!0}),i.removeEventListener(ln,u),Zo.remove(m)},0)}}},[i,l,u,m]);const v=f.useCallback(p=>{if(!r&&!n||m.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,x=document.activeElement;if(g&&x){const b=p.currentTarget,[w,S]=$c(b);w&&S?!p.shiftKey&&x===S?(p.preventDefault(),r&&We(w,{select:!0})):p.shiftKey&&x===w&&(p.preventDefault(),r&&We(S,{select:!0})):x===b&&p.preventDefault()}},[r,n,m.paused]);return y.jsx(ie.div,{tabIndex:-1,...a,ref:h,onKeyDown:v})});zo.displayName=jc;function Fc(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(We(n,{select:e}),document.activeElement!==r)return}function $c(t){const e=Ko(t),r=Go(e,t),n=Go(e.reverse(),t);return[r,n]}function Ko(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Go(t,e){for(const r of t)if(!Uc(r,{upTo:e}))return r}function Uc(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Bc(t){return t instanceof HTMLInputElement&&"select"in t}function We(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Bc(t)&&e&&t.select()}}var Zo=Vc();function Vc(){let t=[];return{add(e){const r=t[0];e!==r&&r?.pause(),t=Yo(t,e),t.unshift(e)},remove(e){t=Yo(t,e),t[0]?.resume()}}}function Yo(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function Hc(t){return t.filter(e=>e.tagName!=="A")}var he=globalThis?.document?f.useLayoutEffect:()=>{},Wc=f[" useId ".trim().toString()]||(()=>{}),zc=0;function lr(t){const[e,r]=f.useState(Wc());return he(()=>{r(n=>n??String(zc++))},[t]),e?`radix-${e}`:""}const Kc=["top","right","bottom","left"],ze=Math.min,Me=Math.max,ur=Math.round,dr=Math.floor,Le=t=>({x:t,y:t}),Gc={left:"right",right:"left",bottom:"top",top:"bottom"};function Xo(t,e,r){return Me(t,ze(e,r))}function Ie(t,e){return typeof t=="function"?t(e):t}function Ke(t){return t.split("-")[0]}function Ct(t){return t.split("-")[1]}function un(t){return t==="x"?"y":"x"}function dn(t){return t==="y"?"height":"width"}function _e(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function fn(t){return un(_e(t))}function Zc(t,e,r){r===void 0&&(r=!1);const n=Ct(t),o=fn(t),s=dn(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=fr(a)),[a,fr(a)]}function Yc(t){const e=fr(t);return[mn(t),e,mn(e)]}function mn(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const qo=["left","right"],Jo=["right","left"],Xc=["top","bottom"],qc=["bottom","top"];function Jc(t,e,r){switch(t){case"top":case"bottom":return r?e?Jo:qo:e?qo:Jo;case"left":case"right":return e?Xc:qc;default:return[]}}function Qc(t,e,r,n){const o=Ct(t);let s=Jc(Ke(t),r==="start",n);return o&&(s=s.map(a=>a+"-"+o),e&&(s=s.concat(s.map(mn)))),s}function fr(t){const e=Ke(t);return Gc[e]+t.slice(e.length)}function el(t){var e,r,n,o;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(n=t.bottom)!=null?n:0,left:(o=t.left)!=null?o:0}}function Qo(t){return typeof t!="number"?el(t):{top:t,right:t,bottom:t,left:t}}function mr(t){const{x:e,y:r,width:n,height:o}=t;return{width:n,height:o,top:r,left:e,right:e+n,bottom:r+o,x:e,y:r}}function es(t,e,r){let{reference:n,floating:o}=t;const s=_e(e),a=fn(e),i=dn(a),c=Ke(e),l=s==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,h=n[i]/2-o[i]/2;let m;switch(c){case"top":m={x:u,y:n.y-o.height};break;case"bottom":m={x:u,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:d};break;case"left":m={x:n.x-o.width,y:d};break;default:m={x:n.x,y:n.y}}const v=Ct(e);return v&&(m[a]+=h*(v==="end"?1:-1)*(r&&l?-1:1)),m}async function tl(t,e){var r;e===void 0&&(e={});const{x:n,y:o,platform:s,rects:a,elements:i,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=Ie(e,t),v=Qo(m),g=i[h?d==="floating"?"reference":"floating":d],x=mr(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(g)))==null||r?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:l,rootBoundary:u,strategy:c})),b=d==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),S=await(s.isElement==null?void 0:s.isElement(w))&&await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1},E=mr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:w,strategy:c}):b);return{top:(x.top-E.top+v.top)/S.y,bottom:(E.bottom-x.bottom+v.bottom)/S.y,left:(x.left-E.left+v.left)/S.x,right:(E.right-x.right+v.right)/S.x}}const rl=50,nl=async(t,e,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=r,i=a.detectOverflow?a:{...a,detectOverflow:tl},c=await(a.isRTL==null?void 0:a.isRTL(e));let l=await a.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:d}=es(l,n,c),h=n,m=0;const v={};for(let p=0;p<s.length;p++){const g=s[p];if(!g)continue;const{name:x,fn:b}=g,{x:w,y:S,data:E,reset:R}=await b({x:u,y:d,initialPlacement:n,placement:h,strategy:o,middlewareData:v,rects:l,platform:i,elements:{reference:t,floating:e}});u=w??u,d=S??d,v[x]={...v[x],...E},R&&m<rl&&(m++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(l=R.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:o}):R.rects),{x:u,y:d}=es(l,h,c)),p=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:v}},ol=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=e,{element:l,padding:u=0}=Ie(t,e)||{};if(l==null)return{};const d=Qo(u),h={x:r,y:n},m=fn(o),v=dn(m),p=await a.getDimensions(l),g=m==="y",x=g?"top":"left",b=g?"bottom":"right",w=g?"clientHeight":"clientWidth",S=s.reference[v]+s.reference[m]-h[m]-s.floating[v],E=h[m]-s.reference[m],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let N=R?R[w]:0;(!N||!await(a.isElement==null?void 0:a.isElement(R)))&&(N=i.floating[w]||s.floating[v]);const j=S/2-E/2,P=N/2-p[v]/2-1,O=ze(d[x],P),$=ze(d[b],P),k=N-p[v]-$,I=N/2-p[v]/2+j,_=Xo(O,I,k),z=!c.arrow&&Ct(o)!=null&&I!==_&&s.reference[v]/2-(I<O?O:$)-p[v]/2<0,T=z?I<O?I-O:I-k:0;return{[m]:h[m]+T,data:{[m]:_,centerOffset:I-_-T,...z&&{alignmentOffset:T}},reset:z}}}),sl=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:l}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:p=!0,...g}=Ie(t,e);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const x=Ke(o),b=_e(i),w=Ke(i)===i,S=await(c.isRTL==null?void 0:c.isRTL(l.floating)),E=h||(w||!p?[fr(i)]:Yc(i)),R=v!=="none";!h&&R&&E.push(...Qc(i,p,v,S));const N=[i,...E],j=await c.detectOverflow(e,g),P=[];let O=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&P.push(j[x]),d){const _=Zc(o,a,S);P.push(j[_[0]],j[_[1]])}if(O=[...O,{placement:o,overflows:P}],!P.every(_=>_<=0)){var $,k;const _=((($=s.flip)==null?void 0:$.index)||0)+1,z=N[_];if(z&&(!(d==="alignment"?b!==_e(z):!1)||O.every(U=>_e(U.placement)===b?U.overflows[0]>0:!0)))return{data:{index:_,overflows:O},reset:{placement:z}};let T=(k=O.filter(B=>B.overflows[0]<=0).sort((B,U)=>B.overflows[1]-U.overflows[1])[0])==null?void 0:k.placement;if(!T)switch(m){case"bestFit":{var I;const B=(I=O.filter(U=>{if(R){const Z=_e(U.placement);return Z===b||Z==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(Z=>Z>0).reduce((Z,oe)=>Z+oe,0)]).sort((U,Z)=>U[1]-Z[1])[0])==null?void 0:I[0];B&&(T=B);break}case"initialPlacement":T=i;break}if(o!==T)return{reset:{placement:T}}}return{}}}};function ts(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function rs(t){return Kc.some(e=>t[e]>=0)}const al=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r,platform:n}=e,{strategy:o="referenceHidden",...s}=Ie(t,e);switch(o){case"referenceHidden":{const a=await n.detectOverflow(e,{...s,elementContext:"reference"}),i=ts(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:rs(i)}}}case"escaped":{const a=await n.detectOverflow(e,{...s,altBoundary:!0}),i=ts(a,r.floating);return{data:{escapedOffsets:i,escaped:rs(i)}}}default:return{}}}}},ns=new Set(["left","top"]);async function il(t,e){const{placement:r,platform:n,elements:o}=t,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Ke(r),i=Ct(r),c=_e(r)==="y",l=ns.has(a)?-1:1,u=s&&c?-1:1,d=Ie(e,t);let{mainAxis:h,crossAxis:m,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof v=="number"&&(m=i==="end"?v*-1:v),c?{x:m*u,y:h*l}:{x:h*l,y:m*u}}const cl=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:o,y:s,placement:a,middlewareData:i}=e,c=await il(e,t);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},ll=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:o,platform:s}=e,{mainAxis:a=!0,crossAxis:i=!1,limiter:c={fn:b=>{let{x:w,y:S}=b;return{x:w,y:S}}},...l}=Ie(t,e),u={x:r,y:n},d=await s.detectOverflow(e,l),h=_e(o),m=un(h);let v=u[m],p=u[h];const g=(b,w)=>Xo(w+d[b==="y"?"top":"left"],w,w-d[b==="y"?"bottom":"right"]);a&&(v=g(m,v)),i&&(p=g(h,p));const x=c.fn({...e,[m]:v,[h]:p});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[m]:a,[h]:i}}}}}},ul=function(t){return t===void 0&&(t={}),{options:t,fn(e){var r,n;const{x:o,y:s,placement:a,rects:i,middlewareData:c}=e,{offset:l=0,mainAxis:u=!0,crossAxis:d=!0}=Ie(t,e),h={x:o,y:s},m=_e(a),v=un(m);let p=h[v],g=h[m];const x=Ie(l,e),b=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(r=x.mainAxis)!=null?r:0,crossAxis:(n=x.crossAxis)!=null?n:0};if(u){const E=v==="y"?"height":"width",R=i.reference[v]-i.floating[E]+b.mainAxis,N=i.reference[v]+i.reference[E]-b.mainAxis;p<R?p=R:p>N&&(p=N)}if(d){var w,S;const E=v==="y"?"width":"height",R=ns.has(Ke(a)),N=i.reference[m]-i.floating[E]+(R&&((w=c.offset)==null?void 0:w[m])||0)+(R?0:b.crossAxis),j=i.reference[m]+i.reference[E]+(R?0:((S=c.offset)==null?void 0:S[m])||0)-(R?b.crossAxis:0);g<N?g=N:g>j&&(g=j)}return{[v]:p,[m]:g}}}},dl=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:o,elements:s}=e,{apply:a=()=>{},...i}=Ie(t,e),c=await o.detectOverflow(e,i),l=Ke(r),u=Ct(r),d=_e(r)==="y",{width:h,height:m}=n.floating;let v,p;l==="top"||l==="bottom"?(v=l,p=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(p=l,v=u==="end"?"top":"bottom");const g=m-c.top-c.bottom,x=h-c.left-c.right,b=ze(m-c[v],g),w=ze(h-c[p],x),S=e.middlewareData.shift,E=!S;let R=b,N=w;S!=null&&S.enabled.x&&(N=x),S!=null&&S.enabled.y&&(R=g),E&&!u&&(d?N=h-2*Me(c.left,c.right):R=m-2*Me(c.top,c.bottom)),await a({...e,availableWidth:N,availableHeight:R});const j=await o.getDimensions(s.floating);return h!==j.width||m!==j.height?{reset:{rects:!0}}:{}}}};function pr(){return typeof window<"u"}function St(t){return os(t)?(t.nodeName||"").toLowerCase():"#document"}function ye(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function De(t){var e;return(e=(os(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function os(t){return pr()?t instanceof Node||t instanceof ye(t).Node:!1}function Re(t){return pr()?t instanceof Element||t instanceof ye(t).Element:!1}function Ge(t){return pr()?t instanceof HTMLElement||t instanceof ye(t).HTMLElement:!1}function ss(t){return!pr()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ye(t).ShadowRoot}function hr(t){const{overflow:e,overflowX:r,overflowY:n,display:o}=Ae(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&o!=="inline"&&o!=="contents"}function fl(t){return/^(table|td|th)$/.test(St(t))}function yr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const ml=/transform|translate|scale|rotate|perspective|filter/,pl=/paint|layout|strict|content/,at=t=>!!t&&t!=="none";let pn;function hn(t){const e=Re(t)?Ae(t):t;return at(e.transform)||at(e.translate)||at(e.scale)||at(e.rotate)||at(e.perspective)||!yn()&&(at(e.backdropFilter)||at(e.filter))||ml.test(e.willChange||"")||pl.test(e.contain||"")}function hl(t){let e=it(t);for(;Ge(e)&&!Ht(e);){if(hn(e))return e;if(yr(e))return null;e=it(e)}return null}function yn(){return pn==null&&(pn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),pn}function Ht(t){return/^(html|body|#document)$/.test(St(t))}function Ae(t){return ye(t).getComputedStyle(t)}function gr(t){return Re(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function it(t){if(St(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ss(t)&&t.host||De(t);return ss(e)?e.host:e}function as(t){const e=it(t);return Ht(e)?(t.ownerDocument||t).body:Ge(e)&&hr(e)?e:as(e)}function Wt(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const o=as(t),s=o===((n=t.ownerDocument)==null?void 0:n.body),a=ye(o);if(s){const i=gn(a);return e.concat(a,a.visualViewport||[],hr(o)?o:[],i&&r?Wt(i):[])}else return e.concat(o,Wt(o,[],r))}function gn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function is(t){const e=Ae(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=Ge(t),s=o?t.offsetWidth:r,a=o?t.offsetHeight:n,i=ur(r)!==s||ur(n)!==a;return i&&(r=s,n=a),{width:r,height:n,$:i}}function vn(t){return Re(t)?t:t.contextElement}function Nt(t){const e=vn(t);if(!Ge(e))return Le(1);const r=e.getBoundingClientRect(),{width:n,height:o,$:s}=is(e);let a=(s?ur(r.width):r.width)/n,i=(s?ur(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const yl=Le(0);function cs(t){const e=ye(t);return!yn()||!e.visualViewport?yl:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function gl(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===ye(t)}function ct(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const o=t.getBoundingClientRect(),s=vn(t);let a=Le(1);e&&(n?Re(n)&&(a=Nt(n)):a=Nt(t));const i=gl(s,r,n)?cs(s):Le(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(s&&n){const h=ye(s),m=Re(n)?ye(n):n;let v=h,p=gn(v);for(;p&&m!==v;){const g=Nt(p),x=p.getBoundingClientRect(),b=Ae(p),w=x.left+(p.clientLeft+parseFloat(b.paddingLeft))*g.x,S=x.top+(p.clientTop+parseFloat(b.paddingTop))*g.y;c*=g.x,l*=g.y,u*=g.x,d*=g.y,c+=w,l+=S,v=ye(p),p=gn(v)}}return mr({width:u,height:d,x:c,y:l})}function vr(t,e){const r=gr(t).scrollLeft;return e?e.left+r:ct(De(t)).left+r}function ls(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-vr(t,r),o=r.top+e.scrollTop;return{x:n,y:o}}function vl(t){let{elements:e,rect:r,offsetParent:n,strategy:o}=t;const s=o==="fixed",a=De(n),i=e?yr(e.floating):!1;if(n===a||i&&s)return r;let c={scrollLeft:0,scrollTop:0},l=Le(1);const u=Le(0),d=Ge(n);if((d||!s)&&((St(n)!=="body"||hr(a))&&(c=gr(n)),d)){const m=ct(n);l=Nt(n),u.x=m.x+n.clientLeft,u.y=m.y+n.clientTop}const h=a&&!d&&!s?ls(a,c):Le(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+h.x,y:r.y*l.y-c.scrollTop*l.y+u.y+h.y}}function bl(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function xl(t){const e=gr(t),r=t.ownerDocument.body,n=Me(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Me(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-e.scrollLeft+vr(t);const a=-e.scrollTop;return Ae(r).direction==="rtl"&&(s+=Me(t.clientWidth,r.clientWidth)-n),{width:n,height:o,x:s,y:a}}const wl=25;function Cl(t,e,r){r===void 0&&(r="viewport");const n=r==="layoutViewport",o=ye(t),s=De(t),a=o.visualViewport;let i=s.clientWidth,c=s.clientHeight,l=0,u=0;if(a){const h=!yn()||e==="fixed";n?h||(l=-a.offsetLeft,u=-a.offsetTop):(i=a.width,c=a.height,h&&(l=a.offsetLeft,u=a.offsetTop))}if(vr(s)<=0){const h=s.ownerDocument,m=h.body,v=getComputedStyle(m),p=h.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,g=Math.abs(s.clientWidth-m.clientWidth-p),x=getComputedStyle(s).scrollbarGutter==="stable both-edges"?g/2:g;x<=wl&&(i-=x)}return{width:i,height:c,x:l,y:u}}function Sl(t,e){const r=ct(t,!0,e==="fixed"),n=r.top+t.clientTop,o=r.left+t.clientLeft,s=Nt(t),a=t.clientWidth*s.x,i=t.clientHeight*s.y,c=o*s.x,l=n*s.y;return{width:a,height:i,x:c,y:l}}function us(t,e,r){let n;if(e==="viewport"||e==="layoutViewport")n=Cl(t,r,e);else if(e==="document")n=xl(De(t));else if(Re(e))n=Sl(e,r);else{const o=cs(t);n={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return mr(n)}function Nl(t,e){const r=e.get(t);if(r)return r;let n=Wt(t,[],!1).filter(i=>Re(i)&&St(i)!=="body"),o=null;const s=Ae(t).position==="fixed";let a=s?it(t):t;for(;Re(a)&&!Ht(a);){const i=Ae(a),c=hn(a),l=o?o.position:s?"fixed":"";!c&&(l==="fixed"||l==="absolute"&&i.position==="static")?n=n.filter(d=>d!==a):o=i,a=it(a)}return e.set(t,n),n}function El(t){let{element:e,boundary:r,rootBoundary:n,strategy:o}=t;const a=[...r==="clippingAncestors"?yr(e)?[]:Nl(e,this._c):[].concat(r),n],i=us(e,a[0],o);let c=i.top,l=i.right,u=i.bottom,d=i.left;for(let h=1;h<a.length;h++){const m=us(e,a[h],o);c=Me(m.top,c),l=ze(m.right,l),u=ze(m.bottom,u),d=Me(m.left,d)}return{width:l-d,height:u-c,x:d,y:c}}function _l(t){const{width:e,height:r}=is(t);return{width:e,height:r}}function Rl(t,e,r){const n=Ge(e),o=De(e),s=r==="fixed",a=ct(t,!0,s,e);let i={scrollLeft:0,scrollTop:0};const c=Le(0);if((n||!s)&&((St(e)!=="body"||hr(o))&&(i=gr(e)),n)){const h=ct(e,!0,s,e);c.x=h.x+e.clientLeft,c.y=h.y+e.clientTop}!n&&o&&(c.x=vr(o));const l=o&&!n&&!s?ls(o,i):Le(0),u=a.left+i.scrollLeft-c.x-l.x,d=a.top+i.scrollTop-c.y-l.y;return{x:u,y:d,width:a.width,height:a.height}}function bn(t){return Ae(t).position==="static"}function ds(t,e){if(!Ge(t)||Ae(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return De(t)===r&&(r=r.ownerDocument.body),r}function fs(t,e){const r=ye(t);if(yr(t))return r;if(!Ge(t)){let o=it(t);for(;o&&!Ht(o);){if(Re(o)&&!bn(o))return o;o=it(o)}return r}let n=ds(t,e);for(;n&&fl(n)&&bn(n);)n=ds(n,e);return n&&Ht(n)&&bn(n)&&!hn(n)?r:n||hl(t)||r}const Al=async function(t){const e=this.getOffsetParent||fs,r=this.getDimensions,n=await r(t.floating);return{reference:Rl(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ol(t){return Ae(t).direction==="rtl"}const Tl={convertOffsetParentRelativeRectToViewportRelativeRect:vl,getDocumentElement:De,getClippingRect:El,getOffsetParent:fs,getElementRects:Al,getClientRects:bl,getDimensions:_l,getScale:Nt,isElement:Re,isRTL:Ol};function ms(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Pl(t,e,r){let n=null,o;const s=De(t);function a(){var u;clearTimeout(o),(u=n)==null||u.disconnect(),n=null}function i(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),a();const h=t.getBoundingClientRect(),{left:m,top:v,width:p,height:g}=h;if(u||e(),!p||!g)return;const x=dr(v),b=dr(s.clientWidth-(m+p)),w=dr(s.clientHeight-(v+g)),S=dr(m),R={rootMargin:-x+"px "+-b+"px "+-w+"px "+-S+"px",threshold:Me(0,ze(1,d))||1};let N=!0;function j(P){const O=P[0].intersectionRatio;if(!ms(h,t.getBoundingClientRect()))return i();if(O!==d){if(!N)return i();O?i(!1,O):o=setTimeout(()=>{i(!1,1e-7)},1e3)}N=!1}try{n=new IntersectionObserver(j,{...R,root:s.ownerDocument})}catch{n=new IntersectionObserver(j,R)}n.observe(t)}const c=ye(t),l=()=>i(r);return c.addEventListener("resize",l),i(!0),()=>{c.removeEventListener("resize",l),a()}}function kl(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=vn(t),u=o||s?[...l?Wt(l):[],...e?Wt(e):[]]:[];u.forEach(x=>{o&&x.addEventListener("scroll",r),s&&x.addEventListener("resize",r)});const d=l&&i?Pl(l,r,s):null;let h=-1,m=null;a&&(m=new ResizeObserver(x=>{let[b]=x;b&&b.target===l&&m&&e&&(m.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(e)})),r()}),l&&!c&&m.observe(l),e&&m.observe(e));let v,p=c?ct(t):null;c&&g();function g(){const x=ct(t);p&&!ms(p,x)&&r(),p=x,v=requestAnimationFrame(g)}return r(),()=>{var x;u.forEach(b=>{o&&b.removeEventListener("scroll",r),s&&b.removeEventListener("resize",r)}),d?.(),(x=m)==null||x.disconnect(),m=null,c&&cancelAnimationFrame(v)}}const Ml=cl,Ll=ll,Il=sl,Dl=dl,jl=al,ps=ol,Fl=ul,$l=(t,e,r)=>{const n=new Map,o=r??{},s={...Tl,...o.platform,_c:n};return nl(t,e,{...o,platform:s})};var Ul=typeof document<"u",Bl=function(){},br=Ul?X.useLayoutEffect:Bl;function xr(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!xr(t[n],e[n]))return!1;return!0}if(o=Object.keys(t),r=o.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&t.$$typeof)&&!xr(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function hs(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ys(t,e){const r=hs(t);return Math.round(e*r)/r}function xn(t){const e=f.useRef(t);return br(()=>{e.current=t}),e}function Vl(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:l}=t,[u,d]=f.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[h,m]=f.useState(n);xr(h,n)||m(n);const[v,p]=f.useState(null),[g,x]=f.useState(null),b=f.useCallback(U=>{U!==R.current&&(R.current=U,p(U))},[]),w=f.useCallback(U=>{U!==N.current&&(N.current=U,x(U))},[]),S=s||v,E=a||g,R=f.useRef(null),N=f.useRef(null),j=f.useRef(u),P=c!=null,O=xn(c),$=xn(o),k=xn(l),I=f.useCallback(()=>{if(!R.current||!N.current)return;const U={placement:e,strategy:r,middleware:h};$.current&&(U.platform=$.current),$l(R.current,N.current,U).then(Z=>{const oe={...Z,isPositioned:k.current!==!1};_.current&&!xr(j.current,oe)&&(j.current=oe,ar.flushSync(()=>{d(oe)}))})},[h,e,r,$,k]);br(()=>{l===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,d(U=>({...U,isPositioned:!1})))},[l]);const _=f.useRef(!1);br(()=>(_.current=!0,()=>{_.current=!1}),[]),br(()=>{if(S&&(R.current=S),E&&(N.current=E),S&&E){if(O.current)return O.current(S,E,I);I()}},[S,E,I,O,P]);const z=f.useMemo(()=>({reference:R,floating:N,setReference:b,setFloating:w}),[b,w]),T=f.useMemo(()=>({reference:S,floating:E}),[S,E]),B=f.useMemo(()=>{const U={position:r,left:0,top:0};if(!T.floating)return U;const Z=ys(T.floating,u.x),oe=ys(T.floating,u.y);return i?{...U,transform:"translate("+Z+"px, "+oe+"px)",...hs(T.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:oe}},[r,i,T.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:I,refs:z,elements:T,floatingStyles:B}),[u,I,z,T,B])}const Hl=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:o}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?ps({element:n.current,padding:o}).fn(r):{}:n?ps({element:n,padding:o}).fn(r):{}}}},Wl=(t,e)=>{const r=Ml(t);return{name:r.name,fn:r.fn,options:[t,e]}},zl=(t,e)=>{const r=Ll(t);return{name:r.name,fn:r.fn,options:[t,e]}},Kl=(t,e)=>({fn:Fl(t).fn,options:[t,e]}),Gl=(t,e)=>{const r=Il(t);return{name:r.name,fn:r.fn,options:[t,e]}},Zl=(t,e)=>{const r=Dl(t);return{name:r.name,fn:r.fn,options:[t,e]}},Yl=(t,e)=>{const r=jl(t);return{name:r.name,fn:r.fn,options:[t,e]}},Xl=(t,e)=>{const r=Hl(t);return{name:r.name,fn:r.fn,options:[t,e]}};var ql="Arrow",gs=f.forwardRef((t,e)=>{const{children:r,width:n=10,height:o=5,...s}=t;return y.jsx(ie.svg,{...s,ref:e,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});gs.displayName=ql;var Jl=gs;function Ql(t){const[e,r]=f.useState(void 0);return he(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,i=l.blockSize}else a=t.offsetWidth,i=t.offsetHeight;r({width:a,height:i})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var wn="Popper",[vs,wr]=cr(wn),[eu,bs]=vs(wn),xs=t=>{const{__scopePopper:e,children:r}=t,[n,o]=f.useState(null);return y.jsx(eu,{scope:e,anchor:n,onAnchorChange:o,children:r})};xs.displayName=wn;var ws="PopperAnchor",Cs=f.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...o}=t,s=bs(ws,r),a=f.useRef(null),i=le(e,a),c=f.useRef(null);return f.useEffect(()=>{const l=c.current;c.current=n?.current||a.current,l!==c.current&&s.onAnchorChange(c.current)}),n?null:y.jsx(ie.div,{...o,ref:i})});Cs.displayName=ws;var Cn="PopperContent",[tu,ru]=vs(Cn),Ss=f.forwardRef((t,e)=>{const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:v,...p}=t,g=bs(Cn,r),[x,b]=f.useState(null),w=le(e,L=>b(L)),[S,E]=f.useState(null),R=Ql(S),N=R?.width??0,j=R?.height??0,P=n+(s!=="center"?"-"+s:""),O=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},$=Array.isArray(l)?l:[l],k=$.length>0,I={padding:O,boundary:$.filter(ou),altBoundary:k},{refs:_,floatingStyles:z,placement:T,isPositioned:B,middlewareData:U}=Vl({strategy:"fixed",placement:P,whileElementsMounted:(...L)=>kl(...L,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[Wl({mainAxis:o+j,alignmentAxis:a}),c&&zl({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Kl():void 0,...I}),c&&Gl({...I}),Zl({...I,apply:({elements:L,rects:ne,availableWidth:me,availableHeight:se})=>{const{width:ce,height:de}=ne.reference,we=L.floating.style;we.setProperty("--radix-popper-available-width",`${me}px`),we.setProperty("--radix-popper-available-height",`${se}px`),we.setProperty("--radix-popper-anchor-width",`${ce}px`),we.setProperty("--radix-popper-anchor-height",`${de}px`)}}),S&&Xl({element:S,padding:i}),su({arrowWidth:N,arrowHeight:j}),h&&Yl({strategy:"referenceHidden",...I})]}),[Z,oe]=_s(T),C=ke(v);he(()=>{B&&C?.()},[B,C]);const V=U.arrow?.x,J=U.arrow?.y,te=U.arrow?.centerOffset!==0,[Ne,Ee]=f.useState();return he(()=>{x&&Ee(window.getComputedStyle(x).zIndex)},[x]),y.jsx("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:B?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ne,"--radix-popper-transform-origin":[U.transformOrigin?.x,U.transformOrigin?.y].join(" "),...U.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:y.jsx(tu,{scope:r,placedSide:Z,onArrowChange:E,arrowX:V,arrowY:J,shouldHideArrow:te,children:y.jsx(ie.div,{"data-side":Z,"data-align":oe,...p,ref:w,style:{...p.style,animation:B?void 0:"none"}})})})});Ss.displayName=Cn;var Ns="PopperArrow",nu={top:"bottom",right:"left",bottom:"top",left:"right"},Es=f.forwardRef(function(e,r){const{__scopePopper:n,...o}=e,s=ru(Ns,n),a=nu[s.placedSide];return y.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:y.jsx(Jl,{...o,ref:r,style:{...o.style,display:"block"}})})});Es.displayName=Ns;function ou(t){return t!==null}var su=t=>({name:"transformOrigin",options:t,fn(e){const{placement:r,rects:n,middlewareData:o}=e,a=o.arrow?.centerOffset!==0,i=a?0:t.arrowWidth,c=a?0:t.arrowHeight,[l,u]=_s(r),d={start:"0%",center:"50%",end:"100%"}[u],h=(o.arrow?.x??0)+i/2,m=(o.arrow?.y??0)+c/2;let v="",p="";return l==="bottom"?(v=a?d:`${h}px`,p=`${-c}px`):l==="top"?(v=a?d:`${h}px`,p=`${n.floating.height+c}px`):l==="right"?(v=`${-c}px`,p=a?d:`${m}px`):l==="left"&&(v=`${n.floating.width+c}px`,p=a?d:`${m}px`),{data:{x:v,y:p}}}});function _s(t){const[e,r="center"]=t.split("-");return[e,r]}var Rs=xs,As=Cs,Os=Ss,Ts=Es,au="Portal",Ps=f.forwardRef((t,e)=>{const{container:r,...n}=t,[o,s]=f.useState(!1);he(()=>s(!0),[]);const a=r||o&&globalThis?.document?.body;return a?Ao.createPortal(y.jsx(ie.div,{...n,ref:e}),a):null});Ps.displayName=au;function iu(t){const e=cu(t),r=f.forwardRef((n,o)=>{const{children:s,...a}=n,i=f.Children.toArray(s),c=i.find(uu);if(c){const l=c.props.children,u=i.map(d=>d===c?f.Children.count(l)>1?f.Children.only(null):f.isValidElement(l)?l.props.children:null:d);return y.jsx(e,{...a,ref:o,children:f.isValidElement(l)?f.cloneElement(l,void 0,u):null})}return y.jsx(e,{...a,ref:o,children:s})});return r.displayName=`${t}.Slot`,r}function cu(t){const e=f.forwardRef((r,n)=>{const{children:o,...s}=r;if(f.isValidElement(o)){const a=fu(o),i=du(s,o.props);return o.type!==f.Fragment&&(i.ref=n?Vt(n,a):a),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var lu=Symbol("radix.slottable");function uu(t){return f.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===lu}function du(t,e){const r={...e};for(const n in e){const o=t[n],s=e[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...t,...r}}function fu(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var mu=f[" useInsertionEffect ".trim().toString()]||he;function Sn({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[o,s,a]=pu({defaultProp:e,onChange:r}),i=t!==void 0,c=i?t:o;{const u=f.useRef(t!==void 0);f.useEffect(()=>{const d=u.current;d!==i&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,n])}const l=f.useCallback(u=>{if(i){const d=hu(u)?u(t):u;d!==t&&a.current?.(d)}else s(u)},[i,t,s,a]);return[c,l]}function pu({defaultProp:t,onChange:e}){const[r,n]=f.useState(t),o=f.useRef(r),s=f.useRef(e);return mu(()=>{s.current=e},[e]),f.useEffect(()=>{o.current!==r&&(s.current?.(r),o.current=r)},[r,o]),[r,n,s]}function hu(t){return typeof t=="function"}function yu(t){const e=f.useRef({value:t,previous:t});return f.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var ks=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),gu="VisuallyHidden",Ms=f.forwardRef((t,e)=>y.jsx(ie.span,{...t,ref:e,style:{...ks,...t.style}}));Ms.displayName=gu;var vu=Ms,bu=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Et=new WeakMap,Cr=new WeakMap,Sr={},Nn=0,Ls=function(t){return t&&(t.host||Ls(t.parentNode))},xu=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=Ls(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},wu=function(t,e,r,n){var o=xu(e,Array.isArray(t)?t:[t]);Sr[r]||(Sr[r]=new WeakMap);var s=Sr[r],a=[],i=new Set,c=new Set(o),l=function(d){!d||i.has(d)||(i.add(d),l(d.parentNode))};o.forEach(l);var u=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(h){if(i.has(h))u(h);else try{var m=h.getAttribute(n),v=m!==null&&m!=="false",p=(Et.get(h)||0)+1,g=(s.get(h)||0)+1;Et.set(h,p),s.set(h,g),a.push(h),p===1&&v&&Cr.set(h,!0),g===1&&h.setAttribute(r,"true"),v||h.setAttribute(n,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return u(e),i.clear(),Nn++,function(){a.forEach(function(d){var h=Et.get(d)-1,m=s.get(d)-1;Et.set(d,h),s.set(d,m),h||(Cr.has(d)||d.removeAttribute(n),Cr.delete(d)),m||d.removeAttribute(r)}),Nn--,Nn||(Et=new WeakMap,Et=new WeakMap,Cr=new WeakMap,Sr={})}},Cu=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),o=bu(t);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),wu(n,o,r,"aria-hidden")):function(){return null}},Oe=function(){return Oe=Object.assign||function(e){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},Oe.apply(this,arguments)};function Is(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}function Su(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n<o;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var Nr="right-scroll-bar-position",Er="width-before-scroll-bar",Nu="with-scroll-bars-hidden",Eu="--removed-body-scroll-bar-size";function En(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function _u(t,e){var r=X.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=e,r.facade}var Ru=typeof window<"u"?f.useLayoutEffect:f.useEffect,Ds=new WeakMap;function Au(t,e){var r=_u(null,function(n){return t.forEach(function(o){return En(o,n)})});return Ru(function(){var n=Ds.get(r);if(n){var o=new Set(n),s=new Set(t),a=r.current;o.forEach(function(i){s.has(i)||En(i,null)}),s.forEach(function(i){o.has(i)||En(i,a)})}Ds.set(r,t)},[t]),r}function Ou(t){return t}function Tu(t,e){e===void 0&&(e=Ou);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(s){var a=e(s,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(n=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(i){return s(i)},filter:function(){return r}}},assignMedium:function(s){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(s),a=r}var c=function(){var u=a;a=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),r}}}};return o}function Pu(t){t===void 0&&(t={});var e=Tu(null);return e.options=Oe({async:!0,ssr:!1},t),e}var js=function(t){var e=t.sideCar,r=Is(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return f.createElement(n,Oe({},r))};js.isSideCarExport=!0;function ku(t,e){return t.useMedium(e),js}var Fs=Pu(),_n=function(){},_r=f.forwardRef(function(t,e){var r=f.useRef(null),n=f.useState({onScrollCapture:_n,onWheelCapture:_n,onTouchMoveCapture:_n}),o=n[0],s=n[1],a=t.forwardProps,i=t.children,c=t.className,l=t.removeScrollBar,u=t.enabled,d=t.shards,h=t.sideCar,m=t.noRelative,v=t.noIsolation,p=t.inert,g=t.allowPinchZoom,x=t.as,b=x===void 0?"div":x,w=t.gapMode,S=Is(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,R=Au([r,e]),N=Oe(Oe({},S),o);return f.createElement(f.Fragment,null,u&&f.createElement(E,{sideCar:Fs,removeScrollBar:l,shards:d,noRelative:m,noIsolation:v,inert:p,setCallbacks:s,allowPinchZoom:!!g,lockRef:r,gapMode:w}),a?f.cloneElement(f.Children.only(i),Oe(Oe({},N),{ref:R})):f.createElement(b,Oe({},N,{className:c,ref:R}),i))});_r.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},_r.classNames={fullWidth:Er,zeroRight:Nr};var Mu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Lu(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=Mu();return e&&t.setAttribute("nonce",e),t}function Iu(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Du(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var ju=function(){var t=0,e=null;return{add:function(r){t==0&&(e=Lu())&&(Iu(e,r),Du(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Fu=function(){var t=ju();return function(e,r){f.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},$s=function(){var t=Fu(),e=function(r){var n=r.styles,o=r.dynamic;return t(n,o),null};return e},$u={left:0,top:0,right:0,gap:0},Rn=function(t){return parseInt(t||"",10)||0},Uu=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[Rn(r),Rn(n),Rn(o)]},Bu=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return $u;var e=Uu(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},Vu=$s(),_t="data-scroll-locked",Hu=function(t,e,r,n){var o=t.left,s=t.top,a=t.right,i=t.gap;return r===void 0&&(r="margin"),`
7
+ .`.concat(Nu,` {
8
+ overflow: hidden `).concat(n,`;
9
+ padding-right: `).concat(i,"px ").concat(n,`;
10
+ }
11
+ body[`).concat(_t,`] {
12
+ overflow: hidden `).concat(n,`;
13
+ overscroll-behavior: contain;
14
+ `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&`
15
+ padding-left: `.concat(o,`px;
16
+ padding-top: `).concat(s,`px;
17
+ padding-right: `).concat(a,`px;
18
+ margin-left:0;
19
+ margin-top:0;
20
+ margin-right: `).concat(i,"px ").concat(n,`;
21
+ `),r==="padding"&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),`
22
+ }
23
+
24
+ .`).concat(Nr,` {
25
+ right: `).concat(i,"px ").concat(n,`;
26
+ }
27
+
28
+ .`).concat(Er,` {
29
+ margin-right: `).concat(i,"px ").concat(n,`;
30
+ }
31
+
32
+ .`).concat(Nr," .").concat(Nr,` {
33
+ right: 0 `).concat(n,`;
34
+ }
35
+
36
+ .`).concat(Er," .").concat(Er,` {
37
+ margin-right: 0 `).concat(n,`;
38
+ }
39
+
40
+ body[`).concat(_t,`] {
41
+ `).concat(Eu,": ").concat(i,`px;
42
+ }
43
+ `)},Us=function(){var t=parseInt(document.body.getAttribute(_t)||"0",10);return isFinite(t)?t:0},Wu=function(){f.useEffect(function(){return document.body.setAttribute(_t,(Us()+1).toString()),function(){var t=Us()-1;t<=0?document.body.removeAttribute(_t):document.body.setAttribute(_t,t.toString())}},[])},zu=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,o=n===void 0?"margin":n;Wu();var s=f.useMemo(function(){return Bu(o)},[o]);return f.createElement(Vu,{styles:Hu(s,!e,o,r?"":"!important")})},An=!1;if(typeof window<"u")try{var Rr=Object.defineProperty({},"passive",{get:function(){return An=!0,!0}});window.addEventListener("test",Rr,Rr),window.removeEventListener("test",Rr,Rr)}catch{An=!1}var Rt=An?{passive:!1}:!1,Ku=function(t){return t.tagName==="TEXTAREA"},Bs=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!Ku(t)&&r[e]==="visible")},Gu=function(t){return Bs(t,"overflowY")},Zu=function(t){return Bs(t,"overflowX")},Vs=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Hs(t,n);if(o){var s=Ws(t,n),a=s[1],i=s[2];if(a>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Yu=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},Xu=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},Hs=function(t,e){return t==="v"?Gu(e):Zu(e)},Ws=function(t,e){return t==="v"?Yu(e):Xu(e)},qu=function(t,e){return t==="h"&&e==="rtl"?-1:1},Ju=function(t,e,r,n,o){var s=qu(t,window.getComputedStyle(e).direction),a=s*n,i=r.target,c=e.contains(i),l=!1,u=a>0,d=0,h=0;do{if(!i)break;var m=Ws(t,i),v=m[0],p=m[1],g=m[2],x=p-g-s*v;(v||x)&&Hs(t,i)&&(d+=x,h+=v);var b=i.parentNode;i=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&i!==document.body||c&&(e.contains(i)||e===i));return(u&&Math.abs(d)<1||!u&&Math.abs(h)<1)&&(l=!0),l},Ar=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},zs=function(t){return[t.deltaX,t.deltaY]},Ks=function(t){return t&&"current"in t?t.current:t},Qu=function(t,e){return t[0]===e[0]&&t[1]===e[1]},ed=function(t){return`
44
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
45
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
46
+ `)},td=0,At=[];function rd(t){var e=f.useRef([]),r=f.useRef([0,0]),n=f.useRef(),o=f.useState(td++)[0],s=f.useState($s)[0],a=f.useRef(t);f.useEffect(function(){a.current=t},[t]),f.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var p=Su([t.lockRef.current],(t.shards||[]).map(Ks),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var i=f.useCallback(function(p,g){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var x=Ar(p),b=r.current,w="deltaX"in p?p.deltaX:b[0]-x[0],S="deltaY"in p?p.deltaY:b[1]-x[1],E,R=p.target,N=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in p&&N==="h"&&R.type==="range")return!1;var j=window.getSelection(),P=j&&j.anchorNode,O=P?P===R||P.contains(R):!1;if(O)return!1;var $=Vs(N,R);if(!$)return!0;if($?E=N:(E=N==="v"?"h":"v",$=Vs(N,R)),!$)return!1;if(!n.current&&"changedTouches"in p&&(w||S)&&(n.current=E),!E)return!0;var k=n.current||E;return Ju(k,g,p,k==="h"?w:S)},[]),c=f.useCallback(function(p){var g=p;if(!(!At.length||At[At.length-1]!==s)){var x="deltaY"in g?zs(g):Ar(g),b=e.current.filter(function(E){return E.name===g.type&&(E.target===g.target||g.target===E.shadowParent)&&Qu(E.delta,x)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var w=(a.current.shards||[]).map(Ks).filter(Boolean).filter(function(E){return E.contains(g.target)}),S=w.length>0?i(g,w[0]):!a.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),l=f.useCallback(function(p,g,x,b){var w={name:p,delta:g,target:x,should:b,shadowParent:nd(x)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(S){return S!==w})},1)},[]),u=f.useCallback(function(p){r.current=Ar(p),n.current=void 0},[]),d=f.useCallback(function(p){l(p.type,zs(p),p.target,i(p,t.lockRef.current))},[]),h=f.useCallback(function(p){l(p.type,Ar(p),p.target,i(p,t.lockRef.current))},[]);f.useEffect(function(){return At.push(s),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Rt),document.addEventListener("touchmove",c,Rt),document.addEventListener("touchstart",u,Rt),function(){At=At.filter(function(p){return p!==s}),document.removeEventListener("wheel",c,Rt),document.removeEventListener("touchmove",c,Rt),document.removeEventListener("touchstart",u,Rt)}},[]);var m=t.removeScrollBar,v=t.inert;return f.createElement(f.Fragment,null,v?f.createElement(s,{styles:ed(o)}):null,m?f.createElement(zu,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function nd(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const od=ku(Fs,rd);var Gs=f.forwardRef(function(t,e){return f.createElement(_r,Oe({},t,{ref:e,sideCar:od}))});Gs.classNames=_r.classNames;var sd=[" ","Enter","ArrowUp","ArrowDown"],ad=[" ","Enter"],lt="Select",[Or,Tr,id]=bc(lt),[Ot]=cr(lt,[id,wr]),Pr=wr(),[cd,Ze]=Ot(lt),[ld,ud]=Ot(lt),Zs=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:o,onOpenChange:s,value:a,defaultValue:i,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:h,required:m,form:v}=t,p=Pr(e),[g,x]=f.useState(null),[b,w]=f.useState(null),[S,E]=f.useState(!1),R=wc(l),[N,j]=Sn({prop:n,defaultProp:o??!1,onChange:s,caller:lt}),[P,O]=Sn({prop:a,defaultProp:i,onChange:c,caller:lt}),$=f.useRef(null),k=g?v||!!g.closest("form"):!0,[I,_]=f.useState(new Set),z=Array.from(I).map(T=>T.props.value).join(";");return y.jsx(Rs,{...p,children:y.jsxs(cd,{required:m,scope:e,trigger:g,onTriggerChange:x,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:E,contentId:lr(),value:P,onValueChange:O,open:N,onOpenChange:j,dir:R,triggerPointerDownPosRef:$,disabled:h,children:[y.jsx(Or.Provider,{scope:e,children:y.jsx(ld,{scope:t.__scopeSelect,onNativeOptionAdd:f.useCallback(T=>{_(B=>new Set(B).add(T))},[]),onNativeOptionRemove:f.useCallback(T=>{_(B=>{const U=new Set(B);return U.delete(T),U})},[]),children:r})}),k?y.jsxs(va,{"aria-hidden":!0,required:m,tabIndex:-1,name:u,autoComplete:d,value:P,onChange:T=>O(T.target.value),disabled:h,form:v,children:[P===void 0?y.jsx("option",{value:""}):null,Array.from(I)]},z):null]})})};Zs.displayName=lt;var Ys="SelectTrigger",Xs=f.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...o}=t,s=Pr(r),a=Ze(Ys,r),i=a.disabled||n,c=le(e,a.onTriggerChange),l=Tr(r),u=f.useRef("touch"),[d,h,m]=xa(p=>{const g=l().filter(w=>!w.disabled),x=g.find(w=>w.value===a.value),b=wa(g,p,x);b!==void 0&&a.onValueChange(b.value)}),v=p=>{i||(a.onOpenChange(!0),m()),p&&(a.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return y.jsx(As,{asChild:!0,...s,children:y.jsx(ie.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":ba(a.value)?"":void 0,...o,ref:c,onClick:re(o.onClick,p=>{p.currentTarget.focus(),u.current!=="mouse"&&v(p)}),onPointerDown:re(o.onPointerDown,p=>{u.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(v(p),p.preventDefault())}),onKeyDown:re(o.onKeyDown,p=>{const g=d.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&h(p.key),!(g&&p.key===" ")&&sd.includes(p.key)&&(v(),p.preventDefault())})})})});Xs.displayName=Ys;var qs="SelectValue",dd=f.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:o,children:s,placeholder:a="",...i}=t,c=Ze(qs,r),{onValueNodeHasChildrenChange:l}=c,u=s!==void 0,d=le(e,c.onValueNodeChange);return he(()=>{l(u)},[l,u]),y.jsx(ie.span,{...i,ref:d,style:{pointerEvents:"none"},children:ba(c.value)?y.jsx(y.Fragment,{children:a}):s})});dd.displayName=qs;var fd="SelectIcon",Js=f.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...o}=t;return y.jsx(ie.span,{"aria-hidden":!0,...o,ref:e,children:n||"▼"})});Js.displayName=fd;var md="SelectPortal",Qs=t=>y.jsx(Ps,{asChild:!0,...t});Qs.displayName=md;var ut="SelectContent",ea=f.forwardRef((t,e)=>{const r=Ze(ut,t.__scopeSelect),[n,o]=f.useState();if(he(()=>{o(new DocumentFragment)},[]),!r.open){const s=n;return s?ar.createPortal(y.jsx(ta,{scope:t.__scopeSelect,children:y.jsx(Or.Slot,{scope:t.__scopeSelect,children:y.jsx("div",{children:t.children})})}),s):null}return y.jsx(ra,{...t,ref:e})});ea.displayName=ut;var Ce=10,[ta,Ye]=Ot(ut),pd="SelectContentImpl",hd=iu("SelectContent.RemoveScroll"),ra=f.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:a,side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:v,hideWhenDetached:p,avoidCollisions:g,...x}=t,b=Ze(ut,r),[w,S]=f.useState(null),[E,R]=f.useState(null),N=le(e,L=>S(L)),[j,P]=f.useState(null),[O,$]=f.useState(null),k=Tr(r),[I,_]=f.useState(!1),z=f.useRef(!1);f.useEffect(()=>{if(w)return Cu(w)},[w]),Dc();const T=f.useCallback(L=>{const[ne,...me]=k().map(de=>de.ref.current),[se]=me.slice(-1),ce=document.activeElement;for(const de of L)if(de===ce||(de?.scrollIntoView({block:"nearest"}),de===ne&&E&&(E.scrollTop=0),de===se&&E&&(E.scrollTop=E.scrollHeight),de?.focus(),document.activeElement!==ce))return},[k,E]),B=f.useCallback(()=>T([j,w]),[T,j,w]);f.useEffect(()=>{I&&B()},[I,B]);const{onOpenChange:U,triggerPointerDownPosRef:Z}=b;f.useEffect(()=>{if(w){let L={x:0,y:0};const ne=se=>{L={x:Math.abs(Math.round(se.pageX)-(Z.current?.x??0)),y:Math.abs(Math.round(se.pageY)-(Z.current?.y??0))}},me=se=>{L.x<=10&&L.y<=10?se.preventDefault():w.contains(se.target)||U(!1),document.removeEventListener("pointermove",ne),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",me,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",me,{capture:!0})}}},[w,U,Z]),f.useEffect(()=>{const L=()=>U(!1);return window.addEventListener("blur",L),window.addEventListener("resize",L),()=>{window.removeEventListener("blur",L),window.removeEventListener("resize",L)}},[U]);const[oe,C]=xa(L=>{const ne=k().filter(ce=>!ce.disabled),me=ne.find(ce=>ce.ref.current===document.activeElement),se=wa(ne,L,me);se&&setTimeout(()=>se.ref.current.focus())}),V=f.useCallback((L,ne,me)=>{const se=!z.current&&!me;(b.value!==void 0&&b.value===ne||se)&&(P(L),se&&(z.current=!0))},[b.value]),J=f.useCallback(()=>w?.focus(),[w]),te=f.useCallback((L,ne,me)=>{const se=!z.current&&!me;(b.value!==void 0&&b.value===ne||se)&&$(L)},[b.value]),Ne=n==="popper"?On:na,Ee=Ne===On?{side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:v,hideWhenDetached:p,avoidCollisions:g}:{};return y.jsx(ta,{scope:r,content:w,viewport:E,onViewportChange:R,itemRefCallback:V,selectedItem:j,onItemLeave:J,itemTextRefCallback:te,focusSelectedItem:B,selectedItemText:O,position:n,isPositioned:I,searchRef:oe,children:y.jsx(Gs,{as:hd,allowPinchZoom:!0,children:y.jsx(zo,{asChild:!0,trapped:b.open,onMountAutoFocus:L=>{L.preventDefault()},onUnmountAutoFocus:re(o,L=>{b.trigger?.focus({preventScroll:!0}),L.preventDefault()}),children:y.jsx(Uo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:L=>L.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:y.jsx(Ne,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:L=>L.preventDefault(),...x,...Ee,onPlaced:()=>_(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:re(x.onKeyDown,L=>{const ne=L.ctrlKey||L.altKey||L.metaKey;if(L.key==="Tab"&&L.preventDefault(),!ne&&L.key.length===1&&C(L.key),["ArrowUp","ArrowDown","Home","End"].includes(L.key)){let se=k().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(L.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(L.key)){const ce=L.target,de=se.indexOf(ce);se=se.slice(de+1)}setTimeout(()=>T(se)),L.preventDefault()}})})})})})})});ra.displayName=pd;var yd="SelectItemAlignedPosition",na=f.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...o}=t,s=Ze(ut,r),a=Ye(ut,r),[i,c]=f.useState(null),[l,u]=f.useState(null),d=le(e,N=>u(N)),h=Tr(r),m=f.useRef(!1),v=f.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:x,focusSelectedItem:b}=a,w=f.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&l&&p&&g&&x){const N=s.trigger.getBoundingClientRect(),j=l.getBoundingClientRect(),P=s.valueNode.getBoundingClientRect(),O=x.getBoundingClientRect();if(s.dir!=="rtl"){const ce=O.left-j.left,de=P.left-ce,we=N.left-de,wt=N.width+we,Eo=Math.max(wt,j.width),_o=window.innerWidth-Ce,Ro=Mo(de,[Ce,Math.max(Ce,_o-Eo)]);i.style.minWidth=wt+"px",i.style.left=Ro+"px"}else{const ce=j.right-O.right,de=window.innerWidth-P.right-ce,we=window.innerWidth-N.right-de,wt=N.width+we,Eo=Math.max(wt,j.width),_o=window.innerWidth-Ce,Ro=Mo(de,[Ce,Math.max(Ce,_o-Eo)]);i.style.minWidth=wt+"px",i.style.right=Ro+"px"}const $=h(),k=window.innerHeight-Ce*2,I=p.scrollHeight,_=window.getComputedStyle(l),z=parseInt(_.borderTopWidth,10),T=parseInt(_.paddingTop,10),B=parseInt(_.borderBottomWidth,10),U=parseInt(_.paddingBottom,10),Z=z+T+I+U+B,oe=Math.min(g.offsetHeight*5,Z),C=window.getComputedStyle(p),V=parseInt(C.paddingTop,10),J=parseInt(C.paddingBottom,10),te=N.top+N.height/2-Ce,Ne=k-te,Ee=g.offsetHeight/2,L=g.offsetTop+Ee,ne=z+T+L,me=Z-ne;if(ne<=te){const ce=$.length>0&&g===$[$.length-1].ref.current;i.style.bottom="0px";const de=l.clientHeight-p.offsetTop-p.offsetHeight,we=Math.max(Ne,Ee+(ce?J:0)+de+B),wt=ne+we;i.style.height=wt+"px"}else{const ce=$.length>0&&g===$[0].ref.current;i.style.top="0px";const we=Math.max(te,z+p.offsetTop+(ce?V:0)+Ee)+me;i.style.height=we+"px",p.scrollTop=ne-te+p.offsetTop}i.style.margin=`${Ce}px 0`,i.style.minHeight=oe+"px",i.style.maxHeight=k+"px",n?.(),requestAnimationFrame(()=>m.current=!0)}},[h,s.trigger,s.valueNode,i,l,p,g,x,s.dir,n]);he(()=>w(),[w]);const[S,E]=f.useState();he(()=>{l&&E(window.getComputedStyle(l).zIndex)},[l]);const R=f.useCallback(N=>{N&&v.current===!0&&(w(),b?.(),v.current=!1)},[w,b]);return y.jsx(vd,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:R,children:y.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:y.jsx(ie.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});na.displayName=yd;var gd="SelectPopperPosition",On=f.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Ce,...s}=t,a=Pr(r);return y.jsx(Os,{...a,...s,ref:e,align:n,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});On.displayName=gd;var[vd,Tn]=Ot(ut,{}),Pn="SelectViewport",oa=f.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...o}=t,s=Ye(Pn,r),a=Tn(Pn,r),i=le(e,s.onViewportChange),c=f.useRef(0);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),y.jsx(Or.Slot,{scope:r,children:y.jsx(ie.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:re(o.onScroll,l=>{const u=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=a;if(h?.current&&d){const m=Math.abs(c.current-u.scrollTop);if(m>0){const v=window.innerHeight-Ce*2,p=parseFloat(d.style.minHeight),g=parseFloat(d.style.height),x=Math.max(p,g);if(x<v){const b=x+m,w=Math.min(v,b),S=b-w;d.style.height=w+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});oa.displayName=Pn;var sa="SelectGroup",[bd,xd]=Ot(sa),aa=f.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,o=lr();return y.jsx(bd,{scope:r,id:o,children:y.jsx(ie.div,{role:"group","aria-labelledby":o,...n,ref:e})})});aa.displayName=sa;var ia="SelectLabel",ca=f.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,o=xd(ia,r);return y.jsx(ie.div,{id:o.id,...n,ref:e})});ca.displayName=ia;var kr="SelectItem",[wd,la]=Ot(kr),ua=f.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:s,...a}=t,i=Ze(kr,r),c=Ye(kr,r),l=i.value===n,[u,d]=f.useState(s??""),[h,m]=f.useState(!1),v=le(e,b=>c.itemRefCallback?.(b,n,o)),p=lr(),g=f.useRef("touch"),x=()=>{o||(i.onValueChange(n),i.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return y.jsx(wd,{scope:r,value:n,disabled:o,textId:p,isSelected:l,onItemTextChange:f.useCallback(b=>{d(w=>w||(b?.textContent??"").trim())},[]),children:y.jsx(Or.ItemSlot,{scope:r,value:n,disabled:o,textValue:u,children:y.jsx(ie.div,{role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:v,onFocus:re(a.onFocus,()=>m(!0)),onBlur:re(a.onBlur,()=>m(!1)),onClick:re(a.onClick,()=>{g.current!=="mouse"&&x()}),onPointerUp:re(a.onPointerUp,()=>{g.current==="mouse"&&x()}),onPointerDown:re(a.onPointerDown,b=>{g.current=b.pointerType}),onPointerMove:re(a.onPointerMove,b=>{g.current=b.pointerType,o?c.onItemLeave?.():g.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:re(a.onPointerLeave,b=>{b.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:re(a.onKeyDown,b=>{c.searchRef?.current!==""&&b.key===" "||(ad.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});ua.displayName=kr;var zt="SelectItemText",da=f.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:o,...s}=t,a=Ze(zt,r),i=Ye(zt,r),c=la(zt,r),l=ud(zt,r),[u,d]=f.useState(null),h=le(e,x=>d(x),c.onItemTextChange,x=>i.itemTextRefCallback?.(x,c.value,c.disabled)),m=u?.textContent,v=f.useMemo(()=>y.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=l;return he(()=>(p(v),()=>g(v)),[p,g,v]),y.jsxs(y.Fragment,{children:[y.jsx(ie.span,{id:c.textId,...s,ref:h}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?ar.createPortal(s.children,a.valueNode):null]})});da.displayName=zt;var fa="SelectItemIndicator",ma=f.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return la(fa,r).isSelected?y.jsx(ie.span,{"aria-hidden":!0,...n,ref:e}):null});ma.displayName=fa;var kn="SelectScrollUpButton",pa=f.forwardRef((t,e)=>{const r=Ye(kn,t.__scopeSelect),n=Tn(kn,t.__scopeSelect),[o,s]=f.useState(!1),a=le(e,n.onScrollButtonChange);return he(()=>{if(r.viewport&&r.isPositioned){let i=function(){const l=c.scrollTop>0;s(l)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),o?y.jsx(ya,{...t,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});pa.displayName=kn;var Mn="SelectScrollDownButton",ha=f.forwardRef((t,e)=>{const r=Ye(Mn,t.__scopeSelect),n=Tn(Mn,t.__scopeSelect),[o,s]=f.useState(!1),a=le(e,n.onScrollButtonChange);return he(()=>{if(r.viewport&&r.isPositioned){let i=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;s(u)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),o?y.jsx(ya,{...t,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});ha.displayName=Mn;var ya=f.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=t,s=Ye("SelectScrollButton",r),a=f.useRef(null),i=Tr(r),c=f.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return f.useEffect(()=>()=>c(),[c]),he(()=>{i().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),y.jsx(ie.div,{"aria-hidden":!0,...o,ref:e,style:{flexShrink:0,...o.style},onPointerDown:re(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:re(o.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:re(o.onPointerLeave,()=>{c()})})}),Cd="SelectSeparator",ga=f.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return y.jsx(ie.div,{"aria-hidden":!0,...n,ref:e})});ga.displayName=Cd;var Ln="SelectArrow",Sd=f.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,o=Pr(r),s=Ze(Ln,r),a=Ye(Ln,r);return s.open&&a.position==="popper"?y.jsx(Ts,{...o,...n,ref:e}):null});Sd.displayName=Ln;var Nd="SelectBubbleInput",va=f.forwardRef(({__scopeSelect:t,value:e,...r},n)=>{const o=f.useRef(null),s=le(n,o),a=yu(e);return f.useEffect(()=>{const i=o.current;if(!i)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==e&&u){const d=new Event("change",{bubbles:!0});u.call(i,e),i.dispatchEvent(d)}},[a,e]),y.jsx(ie.select,{...r,style:{...ks,...r.style},ref:s,defaultValue:e})});va.displayName=Nd;function ba(t){return t===""||t===void 0}function xa(t){const e=ke(t),r=f.useRef(""),n=f.useRef(0),o=f.useCallback(a=>{const i=r.current+a;e(i),(function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))})(i)},[e]),s=f.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,s]}function wa(t,e,r){const o=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let a=Ed(t,Math.max(s,0));o.length===1&&(a=a.filter(l=>l!==r));const c=a.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function Ed(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var _d=Zs,Ca=Xs,Rd=Js,Ad=Qs,Sa=ea,Od=oa,Td=aa,Na=ca,In=ua,Ea=da,_a=ma,Ra=pa,Aa=ha,Oa=ga;const Pd=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ta=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim();var kd={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Md=X.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:a,...i},c)=>X.createElement("svg",{ref:c,...kd,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:Ta("lucide",o),...i},[...a.map(([l,u])=>X.createElement(l,u)),...Array.isArray(s)?s:[s]]));const ve=(t,e)=>{const r=X.forwardRef(({className:n,...o},s)=>X.createElement(Md,{ref:s,iconNode:e,className:Ta(`lucide-${Pd(t)}`,n),...o}));return r.displayName=`${t}`,r};const Dn=ve("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Pa=ve("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Ld=ve("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const ka=ve("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const Id=ve("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);const Ma=ve("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"}]]);const Dd=ve("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);const jn=ve("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const jd=ve("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);const Fd=ve("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);const $d=ve("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);const Ud=ve("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);const Bd=ve("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function La(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=La(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Ia(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=La(t))&&(n&&(n+=" "),n+=e);return n}const Fn="-",Vd=t=>{const e=Wd(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:a=>{const i=a.split(Fn);return i[0]===""&&i.length!==1&&i.shift(),Da(i,e)||Hd(a)},getConflictingClassGroupIds:(a,i)=>{const c=r[a]||[];return i&&n[a]?[...c,...n[a]]:c}}},Da=(t,e)=>{if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),o=n?Da(t.slice(1),n):void 0;if(o)return o;if(e.validators.length===0)return;const s=t.join(Fn);return e.validators.find(({validator:a})=>a(s))?.classGroupId},ja=/^\[(.+)\]$/,Hd=t=>{if(ja.test(t)){const e=ja.exec(t)[1],r=e?.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},Wd=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return Kd(Object.entries(t.classGroups),r).forEach(([s,a])=>{$n(a,n,s,e)}),n},$n=(t,e,r,n)=>{t.forEach(o=>{if(typeof o=="string"){const s=o===""?e:Fa(e,o);s.classGroupId=r;return}if(typeof o=="function"){if(zd(o)){$n(o(n),e,r,n);return}e.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,a])=>{$n(a,Fa(e,s),r,n)})})},Fa=(t,e)=>{let r=t;return e.split(Fn).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},zd=t=>t.isThemeGetter,Kd=(t,e)=>e?t.map(([r,n])=>{const o=n.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,i])=>[e+a,i])):s);return[r,o]}):t,Gd=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const o=(s,a)=>{r.set(s,a),e++,e>t&&(e=0,n=r,r=new Map)};return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return o(s,a),a},set(s,a){r.has(s)?r.set(s,a):o(s,a)}}},$a="!",Zd=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,o=e[0],s=e.length,a=i=>{const c=[];let l=0,u=0,d;for(let g=0;g<i.length;g++){let x=i[g];if(l===0){if(x===o&&(n||i.slice(g,g+s)===e)){c.push(i.slice(u,g)),u=g+s;continue}if(x==="/"){d=g;continue}}x==="["?l++:x==="]"&&l--}const h=c.length===0?i:i.substring(u),m=h.startsWith($a),v=m?h.substring(1):h,p=d&&d>u?d-u:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:p}};return r?i=>r({className:i,parseClassName:a}):a},Yd=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},Xd=t=>({cache:Gd(t.cacheSize),parseClassName:Zd(t),...Vd(t)}),qd=/\s+/,Jd=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=e,s=[],a=t.trim().split(qd);let i="";for(let c=a.length-1;c>=0;c-=1){const l=a[c],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:m}=r(l);let v=!!m,p=n(v?h.substring(0,m):h);if(!p){if(!v){i=l+(i.length>0?" "+i:i);continue}if(p=n(h),!p){i=l+(i.length>0?" "+i:i);continue}v=!1}const g=Yd(u).join(":"),x=d?g+$a:g,b=x+p;if(s.includes(b))continue;s.push(b);const w=o(p,v);for(let S=0;S<w.length;++S){const E=w[S];s.push(x+E)}i=l+(i.length>0?" "+i:i)}return i};function Qd(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=Ua(e))&&(n&&(n+=" "),n+=r);return n}const Ua=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=Ua(t[n]))&&(r&&(r+=" "),r+=e);return r};function ef(t,...e){let r,n,o,s=a;function a(c){const l=e.reduce((u,d)=>d(u),t());return r=Xd(l),n=r.cache.get,o=r.cache.set,s=i,i(c)}function i(c){const l=n(c);if(l)return l;const u=Jd(c,r);return o(c,u),u}return function(){return s(Qd.apply(null,arguments))}}const ae=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},Ba=/^\[(?:([a-z-]+):)?(.+)\]$/i,tf=/^\d+\/\d+$/,rf=new Set(["px","full","screen"]),nf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,of=/\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$/,sf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,af=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,je=t=>Tt(t)||rf.has(t)||tf.test(t),Xe=t=>Pt(t,"length",yf),Tt=t=>!!t&&!Number.isNaN(Number(t)),Un=t=>Pt(t,"number",Tt),Kt=t=>!!t&&Number.isInteger(Number(t)),lf=t=>t.endsWith("%")&&Tt(t.slice(0,-1)),Y=t=>Ba.test(t),qe=t=>nf.test(t),uf=new Set(["length","size","percentage"]),df=t=>Pt(t,uf,Va),ff=t=>Pt(t,"position",Va),mf=new Set(["image","url"]),pf=t=>Pt(t,mf,vf),hf=t=>Pt(t,"",gf),Gt=()=>!0,Pt=(t,e,r)=>{const n=Ba.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},yf=t=>of.test(t)&&!sf.test(t),Va=()=>!1,gf=t=>af.test(t),vf=t=>cf.test(t),bf=ef(()=>{const t=ae("colors"),e=ae("spacing"),r=ae("blur"),n=ae("brightness"),o=ae("borderColor"),s=ae("borderRadius"),a=ae("borderSpacing"),i=ae("borderWidth"),c=ae("contrast"),l=ae("grayscale"),u=ae("hueRotate"),d=ae("invert"),h=ae("gap"),m=ae("gradientColorStops"),v=ae("gradientColorStopPositions"),p=ae("inset"),g=ae("margin"),x=ae("opacity"),b=ae("padding"),w=ae("saturate"),S=ae("scale"),E=ae("sepia"),R=ae("skew"),N=ae("space"),j=ae("translate"),P=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",Y,e],k=()=>[Y,e],I=()=>["",je,Xe],_=()=>["auto",Tt,Y],z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",Y],oe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>[Tt,Y];return{cacheSize:500,separator:":",theme:{colors:[Gt],spacing:[je,Xe],blur:["none","",qe,Y],brightness:C(),borderColor:[t],borderRadius:["none","","full",qe,Y],borderSpacing:k(),borderWidth:I(),contrast:C(),grayscale:Z(),hueRotate:C(),invert:Z(),gap:k(),gradientColorStops:[t],gradientColorStopPositions:[lf,Xe],inset:$(),margin:$(),opacity:C(),padding:k(),saturate:C(),scale:C(),sepia:Z(),skew:C(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",Y]}],container:["container"],columns:[{columns:[qe]}],"break-after":[{"break-after":oe()}],"break-before":[{"break-before":oe()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...z(),Y]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Kt,Y]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Y]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Kt,Y]}],"grid-cols":[{"grid-cols":[Gt]}],"col-start-end":[{col:["auto",{span:["full",Kt,Y]},Y]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[Gt]}],"row-start-end":[{row:["auto",{span:[Kt,Y]},Y]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Y]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Y,e]}],"min-w":[{"min-w":[Y,e,"min","max","fit"]}],"max-w":[{"max-w":[Y,e,"none","full","min","max","fit","prose",{screen:[qe]},qe]}],h:[{h:[Y,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Y,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Y,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Y,e,"auto","min","max","fit"]}],"font-size":[{text:["base",qe,Xe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Un]}],"font-family":[{font:[Gt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Y]}],"line-clamp":[{"line-clamp":["none",Tt,Un]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",je,Y]}],"list-image":[{"list-image":["none",Y]}],"list-style-type":[{list:["none","disc","decimal",Y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...T(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",je,Xe]}],"underline-offset":[{"underline-offset":["auto",je,Y]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...z(),ff]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",df]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},pf]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...T(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:T()}],"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:["",...T()]}],"outline-offset":[{"outline-offset":[je,Y]}],"outline-w":[{outline:[je,Xe]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[je,Xe]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",qe,hf]}],"shadow-color":[{shadow:[Gt]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",qe,Y]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Y]}],duration:[{duration:C()}],ease:[{ease:["linear","in","out","in-out",Y]}],delay:[{delay:C()}],animate:[{animate:["none","spin","ping","pulse","bounce",Y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Kt,Y]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Y]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Y]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",Y]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[je,Xe,Un]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function H(...t){return bf(Ia(t))}const xf=_d,wf=Td,Ha=f.forwardRef(({className:t,children:e,...r},n)=>y.jsxs(Ca,{ref:n,className:H("flex h-10 w-full items-center justify-between rounded-[6px] border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...r,children:[e,y.jsx(Rd,{asChild:!0,children:y.jsx(Pa,{className:"h-4 w-4 opacity-50"})})]}));Ha.displayName=Ca.displayName;const Wa=f.forwardRef(({className:t,...e},r)=>y.jsx(Ra,{ref:r,className:H("flex cursor-default items-center justify-center py-1",t),...e,children:y.jsx(Ld,{className:"h-4 w-4"})}));Wa.displayName=Ra.displayName;const za=f.forwardRef(({className:t,...e},r)=>y.jsx(Aa,{ref:r,className:H("flex cursor-default items-center justify-center py-1",t),...e,children:y.jsx(Pa,{className:"h-4 w-4"})}));za.displayName=Aa.displayName;const Ka=f.forwardRef(({className:t,children:e,position:r="popper",...n},o)=>y.jsx(Ad,{children:y.jsxs(Sa,{ref:o,className:H("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-[6px] 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",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,...n,children:[y.jsx(Wa,{}),y.jsx(Od,{className:H("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),y.jsx(za,{})]})}));Ka.displayName=Sa.displayName;const Cf=f.forwardRef(({className:t,...e},r)=>y.jsx(Na,{ref:r,className:H("py-1.5 ps-8 pe-2 text-sm font-semibold",t),...e}));Cf.displayName=Na.displayName;const Bn=f.forwardRef(({className:t,children:e,...r},n)=>y.jsxs(In,{ref:n,className:H("relative flex w-full cursor-default select-none items-center rounded-[6px] py-1.5 ps-6 pe-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[y.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(_a,{children:y.jsx(Dn,{className:"h-4 w-4"})})}),y.jsx(Ea,{children:e})]}));Bn.displayName=In.displayName;const Sf=f.forwardRef(({className:t,...e},r)=>y.jsx(Oa,{ref:r,className:H("-mx-1 my-1 h-px bg-muted",t),...e}));Sf.displayName=Oa.displayName;const Nf=X.forwardRef(({className:t,children:e,...r},n)=>y.jsxs(In,{ref:n,className:H("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[y.jsxs("span",{className:"absolute left-2 top-[10px] flex h-4 w-4 justify-center",children:[y.jsx(_a,{className:"flex items-center justify-center w-full h-full",children:y.jsx(ka,{className:"size-2 text-black fill-current"})}),y.jsx(ka,{className:"size-4 text-gray-400 absolute"})]}),y.jsx(Ea,{children:e})]})),Ga=({disabled:t=!1,options:e,value:r,placeholder:n="Select an option",label:o="",required:s=!1,description:a,onChange:i,error:c,isRadio:l,className:u,noOptionsText:d,defaultOpen:h,hideSelectedTick:m=!0,trigger:v,contentClassName:p})=>y.jsxs("div",{className:H("space-y-1 ",u),children:[o&&y.jsxs("label",{className:H(" block text-sm font-medium text-zinc break-words",t?"text-zinc-500":"text-zinc-950"),children:[o,s&&y.jsx("span",{className:"text-destructive",children:" *"})]}),y.jsxs(xf,{defaultOpen:h,onValueChange:g=>{i&&i(g===r?"":g)},value:r??"",disabled:t,children:[y.jsx(Ha,{className:H(t&&"cursor-not-allowed",u),children:v||y.jsx("span",{className:H("truncate",r?"":"text-muted-foreground"),children:r?e.find(g=>g.value===r)?.label.trim():n})}),y.jsx(Ka,{className:H("w-[var(--radix-select-trigger-width)]",p),children:y.jsxs(wf,{children:[e.length>0&&e.map(g=>l?y.jsx(Nf,{className:H(g.disabled&&"select-none cursor-not-allowed"),disabled:g.disabled,value:g.value,children:y.jsx("div",{className:"flex items-center space-x-2 w-full",children:y.jsxs("div",{className:"flex flex-col me-2 w-full",children:[y.jsx("span",{className:"break-words",children:g.label}),g.description&&y.jsx("span",{className:"text-sm text-gray-500 break-words whitespace-normal",children:g.description})]})})},g.value):y.jsx(Bn,{className:H("w-full","cursor-pointer",g.disabled&&"select-none cursor-not-allowed","flex items-center space-x-2 justify-between w-full"),disabled:g.disabled,value:g.value,children:y.jsxs("div",{className:H("flex w-full items-center space-x-2 justify-between",g.disabled&&"opacity-50 pointer-events-none",g.suffixIcon&&"pe-8",m&&"!pl-0"),children:[g.prefixIcon&&g.prefixIcon,y.jsxs("div",{className:H("flex flex-col w-full",!m&&"mr-0"),children:[y.jsx("span",{className:"break-words",children:g.label}),g.description&&y.jsx("span",{className:"text-sm text-gray-500 break-words whitespace-normal",children:g.description})]}),g.suffixIcon&&y.jsx("span",{className:"absolute right-2 top-1/2 -translate-y-1/2",children:g.suffixIcon})]})},g.value)),e.length===0&&d&&y.jsx(Bn,{value:"no-items",disabled:!0,children:y.jsx("div",{className:"flex items-center space-x-2 w-full",children:y.jsx("div",{className:"flex flex-col me-2 w-full",children:y.jsx("span",{className:"break-words",children:d})})})})]})})]}),a&&y.jsx("p",{className:"text-sm text-muted-foreground break-words",children:a}),c&&y.jsx("p",{className:"text-sm text-destructive break-words",children:c})]}),W=t=>typeof t=="string",Zt=()=>{let t,e;const r=new Promise((n,o)=>{t=n,e=o});return r.resolve=t,r.reject=e,r},Za=t=>t==null?"":String(t),Ef=(t,e,r)=>{t.forEach(n=>{e[n]&&(r[n]=e[n])})},_f=/###/g,Ya=t=>t&&t.includes("###")?t.replace(_f,"."):t,Xa=t=>!t||W(t),Yt=(t,e,r)=>{const n=W(e)?e.split("."):e;let o=0;for(;o<n.length-1;){if(Xa(t))return{};const s=Ya(n[o]);!t[s]&&r&&(t[s]=new r),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={},++o}return Xa(t)?{}:{obj:t,k:Ya(n[o])}},qa=(t,e,r)=>{const{obj:n,k:o}=Yt(t,e,Object);if(n!==void 0||e.length===1){n[o]=r;return}let s=e[e.length-1],a=e.slice(0,e.length-1),i=Yt(t,a,Object);for(;i.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),i=Yt(t,a,Object),i?.obj&&typeof i.obj[`${i.k}.${s}`]<"u"&&(i.obj=void 0);i.obj[`${i.k}.${s}`]=r},Rf=(t,e,r,n)=>{const{obj:o,k:s}=Yt(t,e,Object);o[s]=o[s]||[],o[s].push(r)},Mr=(t,e)=>{const{obj:r,k:n}=Yt(t,e);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},Af=(t,e,r)=>{const n=Mr(t,r);return n!==void 0?n:Mr(e,r)},Ja=(t,e,r)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?W(t[n])||t[n]instanceof String||W(e[n])||e[n]instanceof String?r&&(t[n]=e[n]):Ja(t[n],e[n],r):t[n]=e[n]);return t},Fe=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Of={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},Tf=t=>W(t)?t.replace(/[&<>"'\/]/g,e=>Of[e]):t;class Pf{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const kf=[" ",",","?","!",";"],Mf=new Pf(20),Lf=(t,e,r)=>{e=e||"",r=r||"";const n=kf.filter(a=>!e.includes(a)&&!r.includes(a));if(n.length===0)return!0;const o=Mf.getRegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!o.test(t);if(!s){const a=t.indexOf(r);a>0&&!o.test(t.substring(0,a))&&(s=!0)}return s},Vn=(t,e,r=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const n=e.split(r);let o=t;for(let s=0;s<n.length;){if(!o||typeof o!="object")return;let a,i="";for(let c=s;c<n.length;++c)if(c!==s&&(i+=r),i+=n[c],a=o[i],a!==void 0){if(["string","number","boolean"].includes(typeof a)&&c<n.length-1)continue;s+=c-s+1;break}o=a}return o},Xt=t=>t?.replace(/_/g,"-"),If={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class Lr{constructor(e,r={}){this.init(e,r)}init(e,r={}){this.prefix=r.prefix||"i18next:",this.logger=e||If,this.options=r,this.debug=r.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,r,n,o){return o&&!this.debug?null:(e=e.map(s=>W(s)?s.replace(/[\r\n\x00-\x1F\x7F]/g," "):s),W(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[r](e))}create(e){return new Lr(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Lr(this.logger,e)}}var Te=new Lr;class Ir{constructor(){this.observers={}}on(e,r){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const o=this.observers[n].get(r)||0;this.observers[n].set(r,o+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}once(e,r){const n=(...o)=>{r(...o),this.off(e,n)};return this.on(e,n),this}emit(e,...r){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([o,s])=>{for(let a=0;a<s;a++)o(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,s])=>{for(let a=0;a<s;a++)o(e,...r)})}}class Qa extends Ir{constructor(e,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,n,o={}){const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let i;e.includes(".")?i=e.split("."):(i=[e,r],n&&(Array.isArray(n)?i.push(...n):W(n)&&s?i.push(...n.split(s)):i.push(n)));const c=Mr(this.data,i);return!c&&!r&&!n&&e.includes(".")&&(e=i[0],r=i[1],n=i.slice(2).join(".")),c||!a||!W(n)?c:Vn(this.data?.[e]?.[r],n,s)}addResource(e,r,n,o,s={silent:!1}){const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let i=[e,r];n&&(i=i.concat(a?n.split(a):n)),e.includes(".")&&(i=e.split("."),o=r,r=i[1]),this.addNamespaces(r),qa(this.data,i,o),s.silent||this.emit("added",e,r,n,o)}addResources(e,r,n,o={silent:!1}){for(const s in n)(W(n[s])||Array.isArray(n[s]))&&this.addResource(e,r,s,n[s],{silent:!0});o.silent||this.emit("added",e,r,n)}addResourceBundle(e,r,n,o,s,a={silent:!1,skipCopy:!1}){let i=[e,r];e.includes(".")&&(i=e.split("."),o=n,n=r,r=i[1]),this.addNamespaces(r);let c=Mr(this.data,i)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),o?Ja(c,n,s):c={...c,...n},qa(this.data,i,c),a.silent||this.emit("added",e,r,n)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(o=>r[o]&&Object.keys(r[o]).length>0)}toJSON(){return this.data}}var ei={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,o){return t.forEach(s=>{e=this.processors[s]?.process(e,r,n,o)??e}),e}};const ti=Symbol("i18next/PATH_KEY");function Df(){const t=[],e=Object.create(null);let r;return e.get=(n,o)=>(r?.revoke?.(),o===ti?t:(t.push(o),r=Proxy.revocable(n,e),r.proxy)),Proxy.revocable(Object.create(null),e).proxy}function kt(t,e){const{[ti]:r}=t(Df()),n=e?.keySeparator??".",o=e?.nsSeparator??":",s=e?.enableSelector==="strict";if(r.length>1&&o){const a=e?.ns,i=s?Array.isArray(a)?a:a?[a]:null:Array.isArray(a)?a:null;if(i&&(s?i:i.length>1?i.slice(1):[]).includes(r[0]))return`${r[0]}${o}${r.slice(1).join(n)}`}return r.join(n)}const Hn=t=>!W(t)&&typeof t!="boolean"&&typeof t!="number";class Dr extends Ir{constructor(e,r={}){super(),Ef(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Te.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,r={interpolation:{}}){const n={...r};if(e==null)return!1;const o=this.resolve(e,n);if(o?.res===void 0)return!1;const s=Hn(o.res);return!(n.returnObjects===!1&&s)}extractFromKey(e,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=r.ns||this.options.defaultNS||[];const a=n&&e.includes(n),i=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!Lf(e,n,o);if(a&&!i){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:W(s)?[s]:s};const l=e.split(n);(n!==o||n===o&&this.options.ns.includes(l[0]))&&(s=l.shift()),e=l.join(o)}return{key:e,namespaces:W(s)?[s]:s}}translate(e,r,n){let o=typeof r=="object"?{...r}:r;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),e==null)return"";typeof e=="function"&&(e=kt(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]),e=e.map(I=>typeof I=="function"?kt(I,{...this.options,...o}):String(I));const s=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:i,namespaces:c}=this.extractFromKey(e[e.length-1],o),l=c[c.length-1];let u=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const d=o.lng||this.language,h=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return h?s?{res:`${l}${u}${i}`,usedKey:i,exactUsedKey:i,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(o)}:`${l}${u}${i}`:s?{res:i,usedKey:i,exactUsedKey:i,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(o)}:i;const m=this.resolve(e,o);let v=m?.res;const p=m?.usedKey||i,g=m?.exactUsedKey||i,x=["[object Number]","[object Function]","[object RegExp]"],b=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,S=o.count!==void 0&&!W(o.count),E=Dr.hasDefaultValue(o),R=S?this.pluralResolver.getSuffix(d,o.count,o):"",N=o.ordinal&&S?this.pluralResolver.getSuffix(d,o.count,{ordinal:!1}):"",j=S&&!o.ordinal&&o.count===0,P=j&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${R}`]||o[`defaultValue${N}`]||o.defaultValue;let O=v;w&&!v&&E&&(O=P);const $=Hn(O),k=Object.prototype.toString.apply(O);if(w&&O&&$&&!x.includes(k)&&!(W(b)&&Array.isArray(O))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const I=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,O,{...o,ns:c}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(m.res=I,m.usedParams=this.getUsedParamsDetails(o),m):I}if(a){const I=Array.isArray(O),_=I?[]:{},z=I?g:p;for(const T in O)if(Object.prototype.hasOwnProperty.call(O,T)){const B=`${z}${a}${T}`;E&&!v?_[T]=this.translate(B,{...o,defaultValue:Hn(P)?P[T]:void 0,joinArrays:!1,ns:c}):_[T]=this.translate(B,{...o,joinArrays:!1,ns:c}),_[T]===B&&(_[T]=O[T])}v=_}}else if(w&&W(b)&&Array.isArray(v))v=v.join(b),v&&(v=this.extendTranslation(v,e,o,n));else{let I=!1,_=!1;!this.isValidLookup(v)&&E&&(I=!0,v=P),this.isValidLookup(v)||(_=!0,v=i);const T=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&_?void 0:v,B=E&&P!==v&&this.options.updateMissing;if(_||I||B){if(this.logger.log(B?"updateKey":"missingKey",d,l,S&&!B?`${i}${this.pluralResolver.getSuffix(d,o.count,o)}`:i,B?P:v),a){const C=this.resolve(i,{...o,keySeparator:!1});C&&C.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const Z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Z&&Z[0])for(let C=0;C<Z.length;C++)U.push(Z[C]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(o.lng||this.language):U.push(o.lng||this.language);const oe=(C,V,J)=>{const te=E&&J!==v?J:T;this.options.missingKeyHandler?this.options.missingKeyHandler(C,l,V,te,B,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(C,l,V,te,B,o),this.emit("missingKey",C,l,V,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?U.forEach(C=>{const V=this.pluralResolver.getSuffixes(C,o);j&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!V.includes(`${this.options.pluralSeparator}zero`)&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(J=>{oe([C],i+J,o[`defaultValue${J}`]||P)})}):oe(U,i,P))}v=this.extendTranslation(v,e,o,m,n),_&&v===i&&this.options.appendNamespaceToMissingKey&&(v=`${l}${u}${i}`),(_||I)&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${i}`:i,I?v:void 0,o))}return s?(m.res=v,m.usedParams=this.getUsedParamsDetails(o),m):v}extendTranslation(e,r,n,o,s){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const c=W(e)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let l;if(c){const d=e.match(this.interpolator.nestingRegexp);l=d&&d.length}let u=n.replace&&!W(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||o.usedLng,n),c){const d=e.match(this.interpolator.nestingRegexp),h=d&&d.length;l<h&&(n.nest=!1)}!n.lng&&o&&o.res&&(n.lng=this.language||o.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...d)=>s?.[0]===d[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${r[0]}`),null):this.translate(...d,r),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,i=W(a)?[a]:a;return e!=null&&i?.length&&n.applyPostProcessor!==!1&&(e=ei.handle(i,e,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,r={}){let n,o,s,a,i;return W(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(c=>typeof c=="function"?kt(c,{...this.options,...r}):c)),e.forEach(c=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(c,r),u=l.key;o=u;let d=l.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const h=r.count!==void 0&&!W(r.count),m=h&&!r.ordinal&&r.count===0,v=r.context!==void 0&&(W(r.context)||typeof r.context=="number")&&r.context!=="",p=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);d.forEach(g=>{this.isValidLookup(n)||(i=g,!this.checkedLoadedFor[`${p[0]}-${g}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(i)&&(this.checkedLoadedFor[`${p[0]}-${g}`]=!0,this.logger.warn(`key "${o}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(x=>{if(this.isValidLookup(n))return;a=x;const b=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(b,u,x,g,r);else{let S;h&&(S=this.pluralResolver.getSuffix(x,r.count,r));const E=`${this.options.pluralSeparator}zero`,R=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(r.ordinal&&S.startsWith(R)&&b.push(u+S.replace(R,this.options.pluralSeparator)),b.push(u+S),m&&b.push(u+E)),v){const N=`${u}${this.options.contextSeparator||"_"}${r.context}`;b.push(N),h&&(r.ordinal&&S.startsWith(R)&&b.push(N+S.replace(R,this.options.pluralSeparator)),b.push(N+S),m&&b.push(N+E))}}let w;for(;w=b.pop();)this.isValidLookup(n)||(s=w,n=this.getResource(x,g,w,r))}))})}),{res:n,usedKey:o,exactUsedKey:s,usedLng:a,usedNS:i}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,n,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,r,n,o):this.resourceStore.getResource(e,r,n,o)}getUsedParamsDetails(e={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!W(e.replace);let o=n?e.replace:e;if(n&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!n){o={...o};for(const s of r)delete o[s]}return o}static hasDefaultValue(e){const r="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&n.startsWith(r)&&e[n]!==void 0)return!0;return!1}}class ri{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Te.create("languageUtils")}getScriptPartFromCode(e){if(e=Xt(e),!e||!e.includes("-"))return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Xt(e),!e||!e.includes("-"))return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(W(e)&&e.includes("-")){let r;try{r=Intl.getCanonicalLocales(e)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(n=>{if(r)return;const o=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(o))&&(r=o)}),!r&&this.options.supportedLngs&&e.forEach(n=>{if(r)return;const o=this.getScriptPartFromCode(n);if(this.isSupportedCode(o))return r=o;const s=this.getLanguagePartFromCode(n);if(this.isSupportedCode(s))return r=s;r=this.options.supportedLngs.find(a=>a===s?!0:!a.includes("-")&&!s.includes("-")?!1:!!(a.includes("-")&&!s.includes("-")&&a.slice(0,a.indexOf("-"))===s||a.startsWith(s)&&s.length>1))}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),W(e)&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let n=e[r];return n||(n=e[this.getScriptPartFromCode(r)]),n||(n=e[this.formatLanguageCode(r)]),n||(n=e[this.getLanguagePartFromCode(r)]),n||(n=e.default),n||[]}toResolveHierarchy(e,r){const n=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],e),o=[],s=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return W(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):W(e)&&s(this.formatLanguageCode(e)),n.forEach(a=>{o.includes(a)||s(this.formatLanguageCode(a))}),o}}const ni={zero:0,one:1,two:2,few:3,many:4,other:5},oi={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class jf{constructor(e,r={}){this.languageUtils=e,this.options=r,this.logger=Te.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,r={}){const n=Xt(e==="dev"?"en":e),o=r.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:o});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(n,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),oi;if(!e.match(/-|_/))return oi;const c=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(c,r)}return this.pluralRulesCache[s]=a,a}needsPlural(e,r={}){let n=this.getRule(e,r);return n||(n=this.getRule("dev",r)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,r,n={}){return this.getSuffixes(e,n).map(o=>`${r}${o}`)}getSuffixes(e,r={}){let n=this.getRule(e,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((o,s)=>ni[o]-ni[s]).map(o=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(e,r,n={}){const o=this.getRule(e,n);return o?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o.select(r)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",r,n))}}const si=(t,e,r,n=".",o=!0)=>{let s=Af(t,e,r);return!s&&o&&W(r)&&(s=Vn(t,r,n),s===void 0&&(s=Vn(e,r,n))),s},Wn=t=>t.replace(/\$/g,"$$$$");class ai{constructor(e={}){this.logger=Te.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(r=>r),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:o,prefix:s,prefixEscaped:a,suffix:i,suffixEscaped:c,formatSeparator:l,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:h,nestingPrefixEscaped:m,nestingSuffix:v,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:x,alwaysFormat:b}=e.interpolation;this.escape=r!==void 0?r:Tf,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=s?Fe(s):a||"{{",this.suffix=i?Fe(i):c||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":d?Fe(d):"-",this.unescapeSuffix=this.unescapePrefix?"":u?Fe(u):"",this.nestingPrefix=h?Fe(h):m||Fe("$t("),this.nestingSuffix=v?Fe(v):p||Fe(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=x||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,n)=>r?.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,r,n,o){let s,a,i;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=m=>{if(!m.includes(this.formatSeparator)){const x=si(r,c,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,n,{...o,...r,interpolationkey:m}):x}const v=m.split(this.formatSeparator),p=v.shift().trim(),g=v.join(this.formatSeparator).trim();return this.format(si(r,c,p,this.options.keySeparator,this.options.ignoreJSONStructure),g,n,{...o,...r,interpolationkey:p})};this.resetRegExp(),!this.escapeValue&&typeof e=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const u=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>Wn(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?Wn(this.escape(m)):Wn(m)}].forEach(m=>{for(i=0;s=m.regex.exec(e);){const v=s[1].trim();if(a=l(v),a===void 0)if(typeof u=="function"){const g=u(e,s,o);a=W(g)?g:""}else if(o&&Object.prototype.hasOwnProperty.call(o,v))a="";else if(d){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`),a="";else!W(a)&&!this.useRawValueToEscape&&(a=Za(a));const p=m.safeValue(a);if(e=e.replace(s[0],p),d?(m.regex.lastIndex+=a.length,m.regex.lastIndex-=s[0].length):m.regex.lastIndex=0,i++,i>=this.maxReplaces)break}}),e}nest(e,r,n={}){let o,s,a;const i=(c,l)=>{const u=this.nestingOptionsSeparator;if(!c.includes(u))return c;const d=c.split(new RegExp(`${Fe(u)}[ ]*{`));let h=`{${d[1]}`;c=d[0],h=this.interpolate(h,a);const m=h.match(/'/g),v=h.match(/"/g);((m?.length??0)%2===0&&!v||(v?.length??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),l&&(a={...l,...a})}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,p),`${c}${u}${h}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,c};for(;o=this.nestingRegexp.exec(e);){let c=[];a={...n},a=a.replace&&!W(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const l=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(l!==-1&&(c=o[1].slice(l).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),o[1]=o[1].slice(0,l)),s=r(i.call(this,o[1].trim(),a),a),s&&o[0]===e&&!W(s))return s;W(s)||(s=Za(s)),s||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),s=""),c.length&&(s=c.reduce((u,d)=>this.format(u,d,n.lng,{...n,interpolationkey:o[1].trim()}),s.trim())),e=e.replace(o[0],s),this.regexp.lastIndex=0}return e}}const Ff=t=>{let e=t.toLowerCase().trim();const r={};if(t.includes("(")){const n=t.split("(");e=n[0].toLowerCase().trim();const o=n[1].slice(0,-1);e==="currency"&&!o.includes(":")?r.currency||(r.currency=o.trim()):e==="relativetime"&&!o.includes(":")?r.range||(r.range=o.trim()):o.split(";").forEach(a=>{if(a){const[i,...c]=a.split(":"),l=c.join(":").trim().replace(/^'+|'+$/g,""),u=i.trim();r[u]||(r[u]=l),l==="false"&&(r[u]=!1),l==="true"&&(r[u]=!0),isNaN(l)||(r[u]=parseInt(l,10))}})}return{formatName:e,formatOptions:r}},ii=t=>{const e={};return(r,n,o)=>{let s=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(s={...s,[o.interpolationkey]:void 0});const a=n+JSON.stringify(s);let i=e[a];return i||(i=t(Xt(n),o),e[a]=i),i(r)}},$f=t=>(e,r,n)=>t(Xt(r),n)(e);class Uf{constructor(e={}){this.logger=Te.create("formatter"),this.options=e,this.init(e)}init(e,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const n=r.cacheInBuiltFormats?ii:$f;this.formats={number:n((o,s)=>{const a=new Intl.NumberFormat(o,{...s});return i=>a.format(i)}),currency:n((o,s)=>{const a=new Intl.NumberFormat(o,{...s,style:"currency"});return i=>a.format(i)}),datetime:n((o,s)=>{const a=new Intl.DateTimeFormat(o,{...s});return i=>a.format(i)}),relativetime:n((o,s)=>{const a=new Intl.RelativeTimeFormat(o,{...s});return i=>a.format(i,s.range||"day")}),list:n((o,s)=>{const a=new Intl.ListFormat(o,{...s});return i=>a.format(i)})}}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=ii(r)}format(e,r,n,o={}){if(!r||e==null)return e;const s=r.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&!s[0].includes(")")&&s.find(i=>i.includes(")"))){const i=s.findIndex(c=>c.includes(")"));s[0]=[s[0],...s.splice(1,i)].join(this.formatSeparator)}return s.reduce((i,c)=>{const{formatName:l,formatOptions:u}=Ff(c);if(this.formats[l]){let d=i;try{const h=o?.formatParams?.[o.interpolationkey]||{},m=h.locale||h.lng||o.locale||o.lng||n;d=this.formats[l](i,m,{...u,...o,...h})}catch(h){this.logger.warn(h)}return d}else this.logger.warn(`there was no format function for ${l}`);return i},e)}}const Bf=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class Vf extends Ir{constructor(e,r,n,o={}){super(),this.backend=e,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=o,this.logger=Te.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,o.backend,o)}queueLoad(e,r,n,o){const s={},a={},i={},c={};return e.forEach(l=>{let u=!0;r.forEach(d=>{const h=`${l}|${d}`;!n.reload&&this.store.hasResourceBundle(l,d)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?a[h]===void 0&&(a[h]=!0):(this.state[h]=1,u=!1,a[h]===void 0&&(a[h]=!0),s[h]===void 0&&(s[h]=!0),c[d]===void 0&&(c[d]=!0)))}),u||(i[l]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(c)}}loaded(e,r,n){const o=e.split("|"),s=o[0],a=o[1];r&&this.emit("failedLoading",s,a,r),!r&&n&&this.store.addResourceBundle(s,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2,r&&n&&(this.state[e]=0);const i={};this.queue.forEach(c=>{Rf(c.loaded,[s],a),Bf(c,e),r&&c.errors.push(r),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(l=>{i[l]||(i[l]={});const u=c.loaded[l];u.length&&u.forEach(d=>{i[l][d]===void 0&&(i[l][d]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(c=>!c.done)}read(e,r,n,o=0,s=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:n,tried:o,wait:s,callback:a});return}this.readingCalls++;const i=(l,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(l&&u&&o<this.maxRetries){setTimeout(()=>{this.read(e,r,n,o+1,s*2,a)},s);return}a(l,u)},c=this.backend[n].bind(this.backend);if(c.length===2){try{const l=c(e,r);l&&typeof l.then=="function"?l.then(u=>i(null,u)).catch(i):i(null,l)}catch(l){i(l)}return}return c(e,r,i)}prepareLoading(e,r,n={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();W(e)&&(e=this.languageUtils.toResolveHierarchy(e)),W(r)&&(r=[r]);const s=this.queueLoad(e,r,n,o);if(!s.toLoad.length)return s.pending.length||o(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(e,r,n){this.prepareLoading(e,r,{},n)}reload(e,r,n){this.prepareLoading(e,r,{reload:!0},n)}loadOne(e,r=""){const n=e.split("|"),o=n[0],s=n[1];this.read(o,s,"read",void 0,void 0,(a,i)=>{a&&this.logger.warn(`${r}loading namespace ${s} for language ${o} failed`,a),!a&&i&&this.logger.log(`${r}loaded namespace ${s} for language ${o}`,i),this.loaded(e,a,i)})}saveMissing(e,r,n,o,s,a={},i=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend?.create){const c={...a,isUpdate:s},l=this.backend.create.bind(this.backend);if(l.length<6)try{let u;l.length===5?u=l(e,r,n,o,c):u=l(e,r,n,o),u&&typeof u.then=="function"?u.then(d=>i(null,d)).catch(i):i(null,u)}catch(u){i(u)}else l(e,r,n,o,i,c)}!e||!e[0]||this.store.addResource(e[0],r,n,o)}}}const zn=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),W(t[1])&&(e.defaultValue=t[1]),W(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(n=>{e[n]=r[n]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ci=t=>(W(t.ns)&&(t.ns=[t.ns]),W(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),W(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&!t.supportedLngs.includes("cimode")&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),jr=()=>{},Hf=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})};class qt extends Ir{constructor(e={},r){if(super(),this.options=ci(e),this.services={},this.logger=Te,this.modules={external:[]},Hf(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(e={},r){this.isInitializing=!0,typeof e=="function"&&(r=e,e={}),e.defaultNS==null&&e.ns&&(W(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const n=zn();this.options={...n,...this.options,...ci(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const o=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?Te.init(o(this.modules.logger),this.options):Te.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=Uf;const u=new ri(this.options);this.store=new Qa(this.options.resources,this.options);const d=this.services;d.logger=Te,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new jf(u,{prepend:this.options.pluralSeparator}),l&&(d.formatter=o(l),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new ai(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Vf(o(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(h,...m)=>{this.emit(h,...m)}),this.modules.languageDetector&&(d.languageDetector=o(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=o(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Dr(this.services,this.options),this.translator.on("*",(h,...m)=>{this.emit(h,...m)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=jr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=(...u)=>this.store[l](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...u)=>(this.store[l](...u),this)});const i=Zt(),c=()=>{const l=(u,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(d),r(u,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),i}loadResources(e,r=jr){let n=r;const o=W(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const s=[],a=i=>{if(!i||i==="cimode")return;this.services.languageUtils.toResolveHierarchy(i).forEach(l=>{l!=="cimode"&&(s.includes(l)||s.push(l))})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload?.forEach?.(i=>a(i)),this.services.backendConnector.load(s,this.options.ns,i=>{!i&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(i)})}else n(null)}reloadResources(e,r,n){const o=Zt();return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r=void 0),e||(e=this.languages),r||(r=this.options.ns),n||(n=jr),this.services.backendConnector.reload(e,r,s=>{o.resolve(),n(s)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&ei.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!["cimode","dev"].includes(e)){for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!["cimode","dev"].includes(n)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,r){this.isLanguageChangingTo=e;const n=Zt();this.emit("languageChanging",e);const o=i=>{this.language=i,this.languages=this.services.languageUtils.toResolveHierarchy(i),this.resolvedLanguage=void 0,this.setResolvedLanguage(i)},s=(i,c)=>{c?this.isLanguageChangingTo===e&&(o(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,n.resolve((...l)=>this.t(...l)),r&&r(i,(...l)=>this.t(...l))},a=i=>{!e&&!i&&this.services.languageDetector&&(i=[]);const c=W(i)?i:i&&i[0],l=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(W(i)?[i]:i);l&&(this.language||o(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector?.cacheUserLanguage?.(l)),this.loadResources(l,u=>{s(u,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,r,n,o){const s=o?.scopeNs,a=(i,c,...l)=>{let u;typeof c!="object"?u=this.options.overloadTranslationOptionHandler([i,c].concat(l)):u={...c},u.lng=u.lng||a.lng,u.lngs=u.lngs||a.lngs;const d=u.ns!==void 0&&u.ns!==null;u.ns=u.ns||a.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||a.keyPrefix);const h={...this.options,...u};Array.isArray(s)&&!d&&(h.ns=s),typeof u.keyPrefix=="function"&&(u.keyPrefix=kt(u.keyPrefix,h));const m=this.options.keySeparator||".";let v;return u.keyPrefix&&Array.isArray(i)?v=i.map(p=>(typeof p=="function"&&(p=kt(p,h)),`${u.keyPrefix}${m}${p}`)):(typeof i=="function"&&(i=kt(i,h)),v=u.keyPrefix?`${u.keyPrefix}${m}${i}`:i),this.t(v,u)};return W(e)?a.lng=e:a.lngs=e,a.ns=r,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(i,c)=>{const l=this.services.backendConnector.state[`${i}|${c}`];return l===-1||l===0||l===2};if(r.precheck){const i=r.precheck(this,a);if(i!==void 0)return i}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!o||a(s,e)))}loadNamespaces(e,r){const n=Zt();return this.options.ns?(W(e)&&(e=[e]),e.forEach(o=>{this.options.ns.includes(o)||this.options.ns.push(o)}),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}loadLanguages(e,r){const n=Zt();W(e)&&(e=[e]);const o=this.options.preload||[],s=e.filter(a=>!o.includes(a)&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=o.concat(s),this.loadResources(a=>{n.resolve(),r&&r(a)}),n):(r&&r(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const o=new Intl.Locale(e);if(o&&o.getTextInfo){const s=o.getTextInfo();if(s&&s.direction)return s.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services?.languageUtils||new ri(zn());return e.toLowerCase().indexOf("-latn")>1?"ltr":r.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},r){const n=new qt(e,r);return n.createInstance=qt.createInstance,n}cloneInstance(e={},r=jr){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},s=new qt(o);if((e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(i=>{s[i]=this[i]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n){const i=Object.keys(this.store.data).reduce((c,l)=>(c[l]={...this.store.data[l]},c[l]=Object.keys(c[l]).reduce((u,d)=>(u[d]={...c[l][d]},u),c[l]),c),{});s.store=new Qa(i,o),s.services.resourceStore=s.store}if(e.interpolation){const c={...zn().interpolation,...this.options.interpolation,...e.interpolation},l={...o,interpolation:c};s.services.interpolator=new ai(l)}return s.translator=new Dr(s.services,o),s.translator.on("*",(i,...c)=>{s.emit(i,...c)}),s.init(o,r),s.translator.options=o,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ge=qt.createInstance(),Wf=ge.createInstance;ge.dir,ge.init,ge.loadResources,ge.reloadResources,ge.use,ge.changeLanguage,ge.getFixedT,ge.t,ge.exists,ge.setDefaultNamespace,ge.hasLoadedNamespace,ge.loadNamespaces,ge.loadLanguages;const zf=(t,e,r,n)=>{const o=[r,{code:e,...n||{}}];if(t?.services?.logger?.forward)return t.services.logger.forward(o,"warn","react-i18next::",!0);dt(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...o):console?.warn&&console.warn(...o)},li={},Kn=(t,e,r,n)=>{dt(r)&&li[r]||(dt(r)&&(li[r]=new Date),zf(t,e,r,n))},ui=(t,e)=>()=>{if(t.isInitialized)e();else{const r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}},Gn=(t,e,r)=>{t.loadNamespaces(e,ui(t,r))},di=(t,e,r,n)=>{if(dt(r)&&(r=[r]),t.options.preload&&t.options.preload.indexOf(e)>-1)return Gn(t,r,n);r.forEach(o=>{t.options.ns.indexOf(o)<0&&t.options.ns.push(o)}),t.loadLanguages(e,ui(t,n))},Kf=(t,e,r={})=>!e.languages||!e.languages.length?(Kn(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:r.lng,precheck:(n,o)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!o(n.isLanguageChangingTo,t))return!1}}),dt=t=>typeof t=="string",Gf=t=>typeof t=="object"&&t!==null,Zf=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Yf={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Xf=t=>Yf[t];let qf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:t=>t.replace(Zf,Xf),transDefaultProps:void 0};const Jf=()=>qf;let Qf;const em=()=>Qf,tm=X.createContext();class rm{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var Fr={exports:{}},Zn={};var fi;function nm(){if(fi)return Zn;fi=1;var t=X;function e(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,o=t.useEffect,s=t.useLayoutEffect,a=t.useDebugValue;function i(d,h){var m=h(),v=n({inst:{value:m,getSnapshot:h}}),p=v[0].inst,g=v[1];return s(function(){p.value=m,p.getSnapshot=h,c(p)&&g({inst:p})},[d,m,h]),o(function(){return c(p)&&g({inst:p}),d(function(){c(p)&&g({inst:p})})},[d]),a(m),m}function c(d){var h=d.getSnapshot;d=d.value;try{var m=h();return!r(d,m)}catch{return!0}}function l(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:i;return Zn.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,Zn}var Yn={};var mi;function om(){return mi||(mi=1,process.env.NODE_ENV!=="production"&&(function(){function t(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}function e(m,v){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var p=v();if(!d){var g=v();s(p,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}g=a({inst:{value:p,getSnapshot:v}});var x=g[0].inst,b=g[1];return c(function(){x.value=p,x.getSnapshot=v,r(x)&&b({inst:x})},[m,p,v]),i(function(){return r(x)&&b({inst:x}),m(function(){r(x)&&b({inst:x})})},[m]),l(p),p}function r(m){var v=m.getSnapshot;m=m.value;try{var p=v();return!s(m,p)}catch{return!0}}function n(m,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=X,s=typeof Object.is=="function"?Object.is:t,a=o.useState,i=o.useEffect,c=o.useLayoutEffect,l=o.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:e;Yn.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Yn}var pi;function sm(){return pi||(pi=1,process.env.NODE_ENV==="production"?Fr.exports=nm():Fr.exports=om()),Fr.exports}var am=sm();const im={t:(t,e)=>{if(dt(e))return e;if(Gf(e)&&dt(e.defaultValue))return e.defaultValue;if(typeof t=="function")return"";if(Array.isArray(t)){const r=t[t.length-1];return typeof r=="function"?"":r}return t},ready:!1},cm=()=>()=>{},lm=(t,e={})=>{const{i18n:r}=e,{i18n:n,defaultNS:o}=X.useContext(tm)||{},s=r||n||em();s&&!s.reportNamespaces&&(s.reportNamespaces=new rm),s||Kn(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const a=X.useMemo(()=>({...Jf(),...s?.options?.react,...e}),[s,e]),{useSuspense:i,keyPrefix:c}=a,l=t,u=dt(l)?[l]:l,d=X.useMemo(()=>u,u);s?.reportNamespaces?.addUsedNamespaces?.(d);const h=X.useRef(0),m=X.useCallback(P=>{if(!s)return cm;const{bindI18n:O,bindI18nStore:$}=a,k=()=>{h.current+=1,P()};return O&&s.on(O,k),$&&s.store.on($,k),()=>{O&&O.split(" ").forEach(I=>s.off(I,k)),$&&$.split(" ").forEach(I=>s.store.off(I,k))}},[s,a]),v=X.useRef(),p=X.useCallback(()=>{if(!s)return im;const P=!!(s.isInitialized||s.initializedStoreOnce)&&d.every(z=>Kf(z,s,a)),O=e.lng||s.language,$=h.current,k=v.current;if(k&&k.ready===P&&k.lng===O&&k.keyPrefix===c&&k.revision===$)return k;const _={t:s.getFixedT(O,a.nsMode==="fallback"?d:d[0],c,{scopeNs:d}),ready:P,lng:O,keyPrefix:c,revision:$};return v.current=_,_},[s,d,c,a,e.lng]),[g,x]=X.useState(0),{t:b,ready:w}=am.useSyncExternalStore(m,p,p);X.useEffect(()=>{if(s&&!w&&!i){const P=()=>x(O=>O+1);e.lng?di(s,e.lng,d,P):Gn(s,d,P)}},[s,e.lng,d,w,i,g]);const S=s||{},E=X.useRef(null),R=X.useRef(),N=P=>{const O=Object.getOwnPropertyDescriptors(P);O.__original&&delete O.__original;const $=Object.create(Object.getPrototypeOf(P),O);if(!Object.prototype.hasOwnProperty.call($,"__original"))try{Object.defineProperty($,"__original",{value:P,writable:!1,enumerable:!1,configurable:!1})}catch{}return $},j=X.useMemo(()=>{const P=S,O=P?.language;let $=P;P&&(E.current&&E.current.__original===P?R.current!==O?($=N(P),E.current=$,R.current=O):$=E.current:($=N(P),E.current=$,R.current=O));const k=!w&&!i?(..._)=>(Kn(s,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),b(..._)):b,I=[k,$,w];return I.t=k,I.i18n=$,I.ready=w,I},[b,S,w,S.resolvedLanguage,S.language,S.languages]);if(s&&i&&!w)throw new Promise(P=>{const O=()=>P();e.lng?di(s,e.lng,d,O):Gn(s,d,O)});return j};function um(t,e){const r=Wf();r.init({lng:"en",fallbackLng:"en",ns:[t],defaultNS:t,resources:{en:{[t]:e}},interpolation:{escapeValue:!1}});const n=r.getFixedT("en",t);function o(){const{t:s,i18n:a}=lm(t),i=a?.languages??[a?.resolvedLanguage??a?.language].filter(Boolean);return!!a&&a.isInitialized&&typeof a.hasResourceBundle=="function"&&i.some(l=>a.hasResourceBundle(l,t))?s:n}return{useBoundT:o}}const dm=um("common",{pricingCard:{notIncluded:"Not included",perBillingPeriod:" per {{period}}",free:"Free",plusUsage:"+ Usage",perPackage:"{{amount}} per package",perUnit:"{{amount}} per unit",startingAtPerUnit:"Starting at {{amount}} per unit",compactPerPkg:"{{amount}}/pkg",compactFromPerUnit:"from {{amount}}/unit",compactPerUnit:"{{amount}}/unit",volumePricing:"Volume Pricing",unitsLabel:"{{range}} units",perUnitShort:"{{amount}} per unit",flatFeeShort:"+ {{amount}} flat fee",usageSectionModern:"Usage",usageSectionClassic:"Usage-based charges:",moreCount:"+{{count}} more",showLess:"Show less",viewPlan:"View plan",includedHeading:"Included",addEntitlements:"Add entitlements",creditsHeading:"Credits",creditsAmount:"{{formatted}} credits",oneTime:"one-time",recurring:"recurring",previewBooleanNotIncluded:"{{name}} not included"}}).useBoundT;var fm="DismissableLayer",Xn="dismissableLayer.update",mm="dismissableLayer.pointerDownOutside",pm="dismissableLayer.focusOutside",hi,yi=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gi=f.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=t,l=f.useContext(yi),[u,d]=f.useState(null),h=u?.ownerDocument??globalThis?.document,[,m]=f.useState({}),v=le(e,N=>d(N)),p=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=p.indexOf(g),b=u?p.indexOf(u):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=x,E=gm(N=>{const j=N.target,P=[...l.branches].some(O=>O.contains(j));!S||P||(o?.(N),a?.(N),N.defaultPrevented||i?.())},h),R=vm(N=>{const j=N.target;[...l.branches].some(O=>O.contains(j))||(s?.(N),a?.(N),N.defaultPrevented||i?.())},h);return jo(N=>{b===l.layers.size-1&&(n?.(N),!N.defaultPrevented&&i&&(N.preventDefault(),i()))},h),f.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(hi=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),vi(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=hi)}},[u,h,r,l]),f.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),vi())},[u,l]),f.useEffect(()=>{const N=()=>m({});return document.addEventListener(Xn,N),()=>document.removeEventListener(Xn,N)},[]),y.jsx(ie.div,{...c,ref:v,style:{pointerEvents:w?S?"auto":"none":void 0,...t.style},onFocusCapture:re(t.onFocusCapture,R.onFocusCapture),onBlurCapture:re(t.onBlurCapture,R.onBlurCapture),onPointerDownCapture:re(t.onPointerDownCapture,E.onPointerDownCapture)})});gi.displayName=fm;var hm="DismissableLayerBranch",ym=f.forwardRef((t,e)=>{const r=f.useContext(yi),n=f.useRef(null),o=le(e,n);return f.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),y.jsx(ie.div,{...t,ref:o})});ym.displayName=hm;function gm(t,e=globalThis?.document){const r=ke(t),n=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let c=function(){bi(mm,r,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=c,e.addEventListener("click",o.current,{once:!0})):c()}else e.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",s),e.removeEventListener("click",o.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function vm(t,e=globalThis?.document){const r=ke(t),n=f.useRef(!1);return f.useEffect(()=>{const o=s=>{s.target&&!n.current&&bi(pm,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function vi(){const t=new CustomEvent(Xn);document.dispatchEvent(t)}function bi(t,e,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&o.addEventListener(t,e,{once:!0}),n?Do(o,s):o.dispatchEvent(s)}function bm(t,e){return f.useReducer((r,n)=>e[r][n]??r,t)}var xi=t=>{const{present:e,children:r}=t,n=xm(e),o=typeof r=="function"?r({present:n.isPresent}):f.Children.only(r),s=le(n.ref,wm(o));return typeof r=="function"||n.isPresent?f.cloneElement(o,{ref:s}):null};xi.displayName="Presence";function xm(t){const[e,r]=f.useState(),n=f.useRef(null),o=f.useRef(t),s=f.useRef("none"),a=t?"mounted":"unmounted",[i,c]=bm(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const l=$r(n.current);s.current=i==="mounted"?l:"none"},[i]),he(()=>{const l=n.current,u=o.current;if(u!==t){const h=s.current,m=$r(l);t?c("MOUNT"):m==="none"||l?.display==="none"?c("UNMOUNT"):c(u&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,c]),he(()=>{if(e){let l;const u=e.ownerDocument.defaultView??window,d=m=>{const p=$r(n.current).includes(CSS.escape(m.animationName));if(m.target===e&&p&&(c("ANIMATION_END"),!o.current)){const g=e.style.animationFillMode;e.style.animationFillMode="forwards",l=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=g)})}},h=m=>{m.target===e&&(s.current=$r(n.current))};return e.addEventListener("animationstart",h),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{u.clearTimeout(l),e.removeEventListener("animationstart",h),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function $r(t){return t?.animationName||"none"}function wm(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var Cm=Symbol("radix.slottable");function Sm(t){const e=({children:r})=>y.jsx(y.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=Cm,e}var[Ur]=cr("Tooltip",[wr]),Br=wr(),wi="TooltipProvider",Nm=700,qn="tooltip.open",[Em,Jn]=Ur(wi),Ci=t=>{const{__scopeTooltip:e,delayDuration:r=Nm,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:s}=t,a=f.useRef(!0),i=f.useRef(!1),c=f.useRef(0);return f.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),y.jsx(Em,{scope:e,isOpenDelayedRef:a,delayDuration:r,onOpen:f.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(l=>{i.current=l},[]),disableHoverableContent:o,children:s})};Ci.displayName=wi;var Jt="Tooltip",[_m,Vr]=Ur(Jt),Si=t=>{const{__scopeTooltip:e,children:r,open:n,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=t,c=Jn(Jt,t.__scopeTooltip),l=Br(e),[u,d]=f.useState(null),h=lr(),m=f.useRef(0),v=a??c.disableHoverableContent,p=i??c.delayDuration,g=f.useRef(!1),[x,b]=Sn({prop:n,defaultProp:o??!1,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent(qn))):c.onClose(),s?.(N)},caller:Jt}),w=f.useMemo(()=>x?g.current?"delayed-open":"instant-open":"closed",[x]),S=f.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,b(!0)},[b]),E=f.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b(!1)},[b]),R=f.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,b(!0),m.current=0},p)},[p,b]);return f.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),y.jsx(Rs,{...l,children:y.jsx(_m,{scope:e,contentId:h,open:x,stateAttribute:w,trigger:u,onTriggerChange:d,onTriggerEnter:f.useCallback(()=>{c.isOpenDelayedRef.current?R():S()},[c.isOpenDelayedRef,R,S]),onTriggerLeave:f.useCallback(()=>{v?E():(window.clearTimeout(m.current),m.current=0)},[E,v]),onOpen:S,onClose:E,disableHoverableContent:v,children:r})})};Si.displayName=Jt;var Qn="TooltipTrigger",Ni=f.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,o=Vr(Qn,r),s=Jn(Qn,r),a=Br(r),i=f.useRef(null),c=le(e,i,o.onTriggerChange),l=f.useRef(!1),u=f.useRef(!1),d=f.useCallback(()=>l.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),y.jsx(As,{asChild:!0,...a,children:y.jsx(ie.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:re(t.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:re(t.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:re(t.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:re(t.onFocus,()=>{l.current||o.onOpen()}),onBlur:re(t.onBlur,o.onClose),onClick:re(t.onClick,o.onClose)})})});Ni.displayName=Qn;var Rm="TooltipPortal",[Ih,Am]=Ur(Rm,{forceMount:void 0}),Mt="TooltipContent",Ei=f.forwardRef((t,e)=>{const r=Am(Mt,t.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...s}=t,a=Vr(Mt,t.__scopeTooltip);return y.jsx(xi,{present:n||a.open,children:a.disableHoverableContent?y.jsx(_i,{side:o,...s,ref:e}):y.jsx(Om,{side:o,...s,ref:e})})}),Om=f.forwardRef((t,e)=>{const r=Vr(Mt,t.__scopeTooltip),n=Jn(Mt,t.__scopeTooltip),o=f.useRef(null),s=le(e,o),[a,i]=f.useState(null),{trigger:c,onClose:l}=r,u=o.current,{onPointerInTransitChange:d}=n,h=f.useCallback(()=>{i(null),d(!1)},[d]),m=f.useCallback((v,p)=>{const g=v.currentTarget,x={x:v.clientX,y:v.clientY},b=Lm(x,g.getBoundingClientRect()),w=Im(x,b),S=Dm(p.getBoundingClientRect()),E=Fm([...w,...S]);i(E),d(!0)},[d]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(c&&u){const v=g=>m(g,u),p=g=>m(g,c);return c.addEventListener("pointerleave",v),u.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",p)}}},[c,u,m,h]),f.useEffect(()=>{if(a){const v=p=>{const g=p.target,x={x:p.clientX,y:p.clientY},b=c?.contains(g)||u?.contains(g),w=!jm(x,a);b?h():w&&(h(),l())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,u,a,l,h]),y.jsx(_i,{...t,ref:s})}),[Tm,Pm]=Ur(Jt,{isInside:!1}),km=Sm("TooltipContent"),_i=f.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=t,c=Vr(Mt,r),l=Br(r),{onClose:u}=c;return f.useEffect(()=>(document.addEventListener(qn,u),()=>document.removeEventListener(qn,u)),[u]),f.useEffect(()=>{if(c.trigger){const d=h=>{h.target?.contains(c.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,u]),y.jsx(gi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:y.jsxs(Os,{"data-state":c.stateAttribute,...l,...i,ref:e,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[y.jsx(km,{children:n}),y.jsx(Tm,{scope:r,isInside:!0,children:y.jsx(vu,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Ei.displayName=Mt;var Ri="TooltipArrow",Mm=f.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,o=Br(r);return Pm(Ri,r).isInside?null:y.jsx(Ts,{...o,...n,ref:e})});Mm.displayName=Ri;function Lm(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),o=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Im(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function Dm(t){const{top:e,right:r,bottom:n,left:o}=t;return[{x:o,y:e},{x:r,y:e},{x:r,y:n},{x:o,y:n}]}function jm(t,e){const{x:r,y:n}=t;let o=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const i=e[s],c=e[a],l=i.x,u=i.y,d=c.x,h=c.y;u>n!=h>n&&r<(d-l)*(n-u)/(h-u)+l&&(o=!o)}return o}function Fm(t){const e=t.slice();return e.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),$m(e)}function $m(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n<t.length;n++){const o=t[n];for(;e.length>=2;){const s=e[e.length-1],a=e[e.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))e.pop();else break}e.push(o)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const o=t[n];for(;r.length>=2;){const s=r[r.length-1],a=r[r.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var Um=Ci,Bm=Si,Vm=Ni,Ai=Ei;const Hr=Um,Wr=Bm,zr=Vm,Qt=f.forwardRef(({className:t,sideOffset:e=4,...r},n)=>y.jsx(Ai,{ref:n,sideOffset:e,className:H("z-50 overflow-hidden rounded-[6px] border-0 bg-popover/95 backdrop-blur-sm px-4 py-2 text-sm font-medium tracking-tight text-popover-foreground shadow-[0_4px_12px_rgba(0,0,0,0.08),0_2px_4px_rgba(0,0,0,0.04)] 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",t),...r}));Qt.displayName=Ai.displayName;var Hm=Symbol.for("react.lazy"),Kr=f[" use ".trim().toString()];function Wm(t){return typeof t=="object"&&t!==null&&"then"in t}function Oi(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===Hm&&"_payload"in t&&Wm(t._payload)}function zm(t){const e=Gm(t),r=f.forwardRef((n,o)=>{let{children:s,...a}=n;Oi(s)&&typeof Kr=="function"&&(s=Kr(s._payload));const i=f.Children.toArray(s),c=i.find(Ym);if(c){const l=c.props.children,u=i.map(d=>d===c?f.Children.count(l)>1?f.Children.only(null):f.isValidElement(l)?l.props.children:null:d);return y.jsx(e,{...a,ref:o,children:f.isValidElement(l)?f.cloneElement(l,void 0,u):null})}return y.jsx(e,{...a,ref:o,children:s})});return r.displayName=`${t}.Slot`,r}var Km=zm("Slot");function Gm(t){const e=f.forwardRef((r,n)=>{let{children:o,...s}=r;if(Oi(o)&&typeof Kr=="function"&&(o=Kr(o._payload)),f.isValidElement(o)){const a=qm(o),i=Xm(s,o.props);return o.type!==f.Fragment&&(i.ref=n?Vt(n,a):a),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Zm=Symbol("radix.slottable");function Ym(t){return f.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Zm}function Xm(t,e){const r={...e};for(const n in e){const o=t[n],s=e[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...t,...r}}function qm(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}const Ti=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Pi=Ia,Jm=((t,e)=>r=>{var n;if(e?.variants==null)return Pi(t,r?.class,r?.className);const{variants:o,defaultVariants:s}=e,a=Object.keys(o).map(l=>{const u=r?.[l],d=s?.[l];if(u===null)return null;const h=Ti(u)||Ti(d);return o[l][h]}),i=r&&Object.entries(r).reduce((l,u)=>{let[d,h]=u;return h===void 0||(l[d]=h),l},{}),c=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((l,u)=>{let{class:d,className:h,...m}=u;return Object.entries(m).every(v=>{let[p,g]=v;return Array.isArray(g)?g.includes({...s,...i}[p]):{...s,...i}[p]===g})?[...l,d,h]:l},[]);return Pi(t,a,c,r?.class,r?.className)})("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[7px] 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-[#092E44] text-white shadow hover:opacity-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:{default:"h-9 px-4 py-2",sm:"h-8 rounded-[7px] px-3 text-xs",lg:"h-10 rounded-[7px] px-8",icon:"h-9 w-9",xs:"h-8 rounded-[7px] px-3 text-xs"}},defaultVariants:{variant:"default",size:"default"}}),ki=f.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...o},s)=>{const a=n?Km:"button";return y.jsx(a,{className:H(Jm({variant:e,size:r,className:t})),ref:s,...o})});ki.displayName="Button";var $e={},Mi;function Qm(){if(Mi)return $e;Mi=1;const t={AD:{countryName:"Andorra",currency:"EUR",symbol:"€",numericCode:978},AE:{countryName:"United Arab Emirates",currency:"AED",symbol:"AED",dateFormat:"dd/MM/yyyy",numericCode:784},AF:{countryName:"Afghanistan",currency:"AFN",symbol:"Af",numericCode:971},AG:{countryName:"Antigua and Barbuda",currency:"XCD",symbol:"XCD",numericCode:951},AI:{countryName:"Anguilla",currency:"XCD",symbol:"XCD",numericCode:951},AL:{countryName:"Albania",currency:"ALL",symbol:"ALL",dateFormat:"yyyy-MM-dd",numericCode:8},AM:{countryName:"Armenia",currency:"AMD",symbol:"AMD",numericCode:51},AO:{countryName:"Angola",currency:"AOA",symbol:"AOA",numericCode:973},AR:{countryName:"Argentina",currency:"ARS",symbol:"AR$",dateFormat:"dd/MM/yyyy",numericCode:32},AS:{countryName:"American Samoa",currency:"USD",symbol:"$",numericCode:840},AT:{countryName:"Austria",currency:"EUR",symbol:"€",dateFormat:"dd.MM.yyyy",numericCode:978},AU:{countryName:"Australia",currency:"AUD",symbol:"$",dateFormat:"d/MM/yyyy",numericCode:36},AW:{countryName:"Aruba",currency:"AWG",symbol:"AWG",numericCode:533},AX:{countryName:"Aland Islands",currency:"EUR",symbol:"€",numericCode:978},AZ:{countryName:"Azerbaijan",currency:"AZN",symbol:"man.",numericCode:944},BA:{countryName:"Bosnia and Herzegovina",currency:"BAM",symbol:"KM",dateFormat:"yyyy-MM-dd",numericCode:977},BB:{countryName:"Barbados",currency:"BBD",symbol:"BBD",numericCode:52},BD:{countryName:"Bangladesh",currency:"BDT",symbol:"Tk",numericCode:50},BE:{countryName:"Belgium",currency:"EUR",symbol:"€",dateFormat:"d/MM/yyyy",numericCode:978},BF:{countryName:"Burkina Faso",currency:"XOF",symbol:"CFA",numericCode:952},BG:{countryName:"Bulgaria",currency:"BGN",symbol:"BGN",dateFormat:"yyyy-M-d",numericCode:975},BH:{countryName:"Bahrain",currency:"BHD",symbol:"BD",dateFormat:"dd/MM/yyyy",numericCode:48},BI:{countryName:"Burundi",currency:"BIF",symbol:"FBu",numericCode:108},BJ:{countryName:"Benin",currency:"XOF",symbol:"CFA",numericCode:952},BL:{countryName:"Saint Barthelemy",currency:"EUR",symbol:"€",numericCode:978},BM:{countryName:"Bermuda",currency:"BMD",symbol:"BMD",numericCode:60},BN:{countryName:"Brunei",currency:"BND",symbol:"BN$",numericCode:96},BO:{countryName:"Bolivia",currency:"BOB",symbol:"Bs",dateFormat:"dd-MM-yyyy",numericCode:68},BQ:{countryName:"Bonaire, Saint Eustatius and Saba ",currency:"USD",symbol:"$",numericCode:840},BR:{countryName:"Brazil",currency:"BRL",symbol:"R$",dateFormat:"dd/MM/yyyy",numericCode:986},BS:{countryName:"Bahamas",currency:"BSD",symbol:"BSD",numericCode:44},BT:{countryName:"Bhutan",currency:"BTN",symbol:"BTN",numericCode:64},BV:{countryName:"Bouvet Island",currency:"NOK",symbol:"Nkr",numericCode:578},BW:{countryName:"Botswana",currency:"BWP",symbol:"BWP",numericCode:72},BY:{countryName:"Belarus",currency:"BYN",symbol:"BYN",dateFormat:"d.M.yyyy",numericCode:933},BZ:{countryName:"Belize",currency:"BZD",symbol:"BZ$",numericCode:84},CA:{countryName:"Canada",currency:"CAD",symbol:"CA$",dateFormat:"dd/MM/yyyy",numericCode:124},CC:{countryName:"Cocos Islands",currency:"AUD",symbol:"AU$",numericCode:36},CD:{countryName:"Democratic Republic of the Congo",currency:"CDF",symbol:"CDF",numericCode:976},CF:{countryName:"Central African Republic",currency:"XAF",symbol:"FCFA",numericCode:950},CG:{countryName:"Republic of the Congo",currency:"XAF",symbol:"FCFA",numericCode:950},CH:{countryName:"Switzerland",currency:"CHF",symbol:"CHF",dateFormat:"dd.MM.yyyy",numericCode:756},CI:{countryName:"Ivory Coast",currency:"XOF",symbol:"CFA",numericCode:952},CK:{countryName:"Cook Islands",currency:"NZD",symbol:"NZ$",numericCode:554},CL:{countryName:"Chile",currency:"CLP",symbol:"CL$",dateFormat:"dd-MM-yyyy",numericCode:152},CM:{countryName:"Cameroon",currency:"XAF",symbol:"FCFA",numericCode:950},CN:{countryName:"China",currency:"CNY",symbol:"CN¥",dateFormat:"yyyy-M-d",numericCode:156},CO:{countryName:"Colombia",currency:"COP",symbol:"CO$",dateFormat:"d/MM/yyyy",numericCode:170},CR:{countryName:"Costa Rica",currency:"CRC",symbol:"₡",dateFormat:"dd/MM/yyyy",numericCode:188},CU:{countryName:"Cuba",currency:"CUP",symbol:"CUP",numericCode:192},CV:{countryName:"Cape Verde",currency:"CVE",symbol:"CV$",numericCode:132},CW:{countryName:"Curacao",currency:"ANG",symbol:"ANG",numericCode:532},CX:{countryName:"Christmas Island",currency:"AUD",symbol:"AU$",numericCode:36},CY:{countryName:"Cyprus",currency:"EUR",symbol:"€",dateFormat:"dd/MM/yyyy",numericCode:978},CZ:{countryName:"Czech Republic",currency:"CZK",symbol:"Kč",dateFormat:"d.M.yyyy",numericCode:203},DE:{countryName:"Germany",currency:"EUR",symbol:"€",dateFormat:"dd.MM.yyyy",numericCode:978},DJ:{countryName:"Djibouti",currency:"DJF",symbol:"Fdj",numericCode:262},DK:{countryName:"Denmark",currency:"DKK",symbol:"Dkr",dateFormat:"dd-MM-yyyy",numericCode:208},DM:{countryName:"Dominica",currency:"XCD",symbol:"XCD",numericCode:951},DO:{countryName:"Dominican Republic",currency:"DOP",symbol:"RD$",dateFormat:"MM/dd/yyyy",numericCode:214},DZ:{countryName:"Algeria",currency:"DZD",symbol:"DA",dateFormat:"dd/MM/yyyy",numericCode:12},EC:{countryName:"Ecuador",currency:"USD",symbol:"$",dateFormat:"dd/MM/yyyy",numericCode:840},EE:{countryName:"Estonia",currency:"EUR",symbol:"€",dateFormat:"d.MM.yyyy",numericCode:978},EG:{countryName:"Egypt",currency:"EGP",symbol:"EGP",dateFormat:"dd/MM/yyyy",numericCode:818},EH:{countryName:"Western Sahara",currency:"MAD",symbol:"MAD",numericCode:504},ER:{countryName:"Eritrea",currency:"ERN",symbol:"Nfk",numericCode:232},ES:{countryName:"Spain",currency:"EUR",symbol:"€",dateFormat:"dd/MM/yyyy",numericCode:978},ET:{countryName:"Ethiopia",currency:"ETB",symbol:"Br",numericCode:230},FI:{countryName:"Finland",currency:"EUR",symbol:"€",dateFormat:"d.M.yyyy",numericCode:978},FJ:{countryName:"Fiji",currency:"FJD",symbol:"FJD",numericCode:242},FK:{countryName:"Falkland Islands",currency:"FKP",symbol:"FKP",numericCode:238},FM:{countryName:"Micronesia",currency:"USD",symbol:"$",numericCode:840},FO:{countryName:"Faroe Islands",currency:"DKK",symbol:"Dkr",numericCode:208},FR:{countryName:"France",currency:"EUR",symbol:"€",dateFormat:"dd/MM/yyyy",numericCode:978},GA:{countryName:"Gabon",currency:"XAF",symbol:"FCFA",numericCode:950},GB:{countryName:"United Kingdom",currency:"GBP",symbol:"£",dateFormat:"dd/MM/yyyy",numericCode:826},GD:{countryName:"Grenada",currency:"XCD",symbol:"XCD",numericCode:951},GE:{countryName:"Georgia",currency:"GEL",symbol:"GEL",numericCode:981},GF:{countryName:"French Guiana",currency:"EUR",symbol:"€",numericCode:978},GG:{countryName:"Guernsey",currency:"GBP",symbol:"£",numericCode:826},GH:{countryName:"Ghana",currency:"GHS",symbol:"GH₵",numericCode:936},GI:{countryName:"Gibraltar",currency:"GIP",symbol:"GIP",numericCode:292},GL:{countryName:"Greenland",currency:"DKK",symbol:"Dkr",numericCode:208},GM:{countryName:"Gambia",currency:"GMD",symbol:"GMD",numericCode:270},GN:{countryName:"Guinea",currency:"GNF",symbol:"FG",numericCode:324},GP:{countryName:"Guadeloupe",currency:"EUR",symbol:"€",numericCode:978},GQ:{countryName:"Equatorial Guinea",currency:"XAF",symbol:"FCFA",numericCode:950},GR:{countryName:"Greece",currency:"EUR",symbol:"€",dateFormat:"d/M/yyyy",numericCode:978},GS:{countryName:"South Georgia and the South Sandwich Islands",currency:"GBP",symbol:"£",numericCode:826},GT:{countryName:"Guatemala",currency:"GTQ",symbol:"GTQ",dateFormat:"d/MM/yyyy",numericCode:320},GU:{countryName:"Guam",currency:"USD",symbol:"$",numericCode:840},GW:{countryName:"Guinea-Bissau",currency:"XOF",symbol:"CFA",numericCode:952},GY:{countryName:"Guyana",currency:"GYD",symbol:"GYD",numericCode:328},HK:{countryName:"Hong Kong",currency:"HKD",symbol:"HK$",dateFormat:"yyyy年M月d日",numericCode:344},HM:{countryName:"Heard Island and McDonald Islands",currency:"AUD",symbol:"AU$",numericCode:36},HN:{countryName:"Honduras",currency:"HNL",symbol:"HNL",dateFormat:"MM-dd-yyyy",numericCode:340},HR:{countryName:"Croatia",currency:"EUR",symbol:"€",dateFormat:"dd.MM.yyyy.",numericCode:978},HT:{countryName:"Haiti",currency:"HTG",symbol:"HTG",numericCode:332},HU:{countryName:"Hungary",currency:"HUF",symbol:"Ft",dateFormat:"yyyy.MM.dd.",numericCode:348},ID:{countryName:"Indonesia",currency:"IDR",symbol:"Rp",dateFormat:"dd/MM/yyyy",numericCode:360},IE:{countryName:"Ireland",currency:"EUR",symbol:"€",dateFormat:"dd/MM/yyyy",numericCode:978},IL:{countryName:"Israel",currency:"ILS",symbol:"₪",dateFormat:"dd/MM/yyyy",numericCode:376},IM:{countryName:"Isle of Man",currency:"GBP",symbol:"£",numericCode:826},IN:{countryName:"India",currency:"INR",symbol:"₹",dateFormat:"d/M/yyyy",numericCode:356},IO:{countryName:"British Indian Ocean Territory",currency:"USD",symbol:"$",numericCode:840},IQ:{countryName:"Iraq",currency:"IQD",symbol:"IQD",dateFormat:"dd/MM/yyyy",numericCode:368},IR:{countryName:"Iran",currency:"IRR",symbol:"IRR",numericCode:364},IS:{countryName:"Iceland",currency:"ISK",symbol:"Ikr",dateFormat:"d.M.yyyy",numericCode:352},IT:{countryName:"Italy",currency:"EUR",symbol:"€",dateFormat:"dd/MM/yyyy",numericCode:978},JE:{countryName:"Jersey",currency:"GBP",symbol:"£",numericCode:826},JM:{countryName:"Jamaica",currency:"JMD",symbol:"J$",numericCode:388},JO:{countryName:"Jordan",currency:"JOD",symbol:"JD",dateFormat:"dd/MM/yyyy",numericCode:400},JP:{countryName:"Japan",currency:"JPY",symbol:"¥",dateFormat:"H24.MM.dd",numericCode:392},KE:{countryName:"Kenya",currency:"KES",symbol:"Ksh",numericCode:404},KG:{countryName:"Kyrgyzstan",currency:"KGS",symbol:"KGS",numericCode:417},KH:{countryName:"Cambodia",currency:"KHR",symbol:"KHR",numericCode:116},KI:{countryName:"Kiribati",currency:"AUD",symbol:"AU$",numericCode:36},KM:{countryName:"Comoros",currency:"KMF",symbol:"CF",numericCode:174},KN:{countryName:"Saint Kitts and Nevis",currency:"XCD",symbol:"XCD",numericCode:951},KP:{countryName:"North Korea",currency:"KPW",symbol:"KPW",numericCode:408},KR:{countryName:"South Korea",currency:"KRW",symbol:"₩",dateFormat:"yyyy. M. d",numericCode:410},KW:{countryName:"Kuwait",currency:"KWD",symbol:"KD",dateFormat:"dd/MM/yyyy",numericCode:414},KY:{countryName:"Cayman Islands",currency:"KYD",symbol:"KYD",numericCode:136},KZ:{countryName:"Kazakhstan",currency:"KZT",symbol:"KZT",numericCode:398},LA:{countryName:"Laos",currency:"LAK",symbol:"LAK",numericCode:418},LB:{countryName:"Lebanon",currency:"LBP",symbol:"LB£",dateFormat:"dd/MM/yyyy",numericCode:422},LC:{countryName:"Saint Lucia",currency:"XCD",symbol:"XCD",numericCode:951},LI:{countryName:"Liechtenstein",currency:"CHF",symbol:"CHF",numericCode:756},LK:{countryName:"Sri Lanka",currency:"LKR",symbol:"SLRs",numericCode:144},LR:{countryName:"Liberia",currency:"LRD",symbol:"LRD",numericCode:430},LS:{countryName:"Lesotho",currency:"LSL",symbol:"LSL",numericCode:426},LT:{countryName:"Lithuania",currency:"EUR",symbol:"€",dateFormat:"yyyy.M.d",numericCode:978},LU:{countryName:"Luxembourg",currency:"EUR",symbol:"€",dateFormat:"dd.MM.yyyy",numericCode:978},LV:{countryName:"Latvia",currency:"EUR",symbol:"€",dateFormat:"yyyy.d.M",numericCode:978},LY:{countryName:"Libya",currency:"LYD",symbol:"LD",dateFormat:"dd/MM/yyyy",numericCode:434},MA:{countryName:"Morocco",currency:"MAD",symbol:"MAD",dateFormat:"dd/MM/yyyy",numericCode:504},MC:{countryName:"Monaco",currency:"EUR",symbol:"€",numericCode:978},MD:{countryName:"Moldova",currency:"MDL",symbol:"MDL",numericCode:498},ME:{countryName:"Montenegro",currency:"EUR",symbol:"€",dateFormat:"d.M.yyyy.",numericCode:978},MF:{countryName:"Saint Martin",currency:"EUR",symbol:"€",numericCode:978},MG:{countryName:"Madagascar",currency:"MGA",symbol:"MGA",numericCode:969},MH:{countryName:"Marshall Islands",currency:"USD",symbol:"$",numericCode:840},MK:{countryName:"Macedonia",currency:"MKD",symbol:"MKD",dateFormat:"d.M.yyyy",numericCode:807},ML:{countryName:"Mali",currency:"XOF",symbol:"CFA",numericCode:952},MM:{countryName:"Myanmar",currency:"MMK",symbol:"MMK",numericCode:104},MN:{countryName:"Mongolia",currency:"MNT",symbol:"MNT",numericCode:496},MO:{countryName:"Macao",currency:"MOP",symbol:"MOP$",numericCode:446},MP:{countryName:"Northern Mariana Islands",currency:"USD",symbol:"$",numericCode:840},MQ:{countryName:"Martinique",currency:"EUR",symbol:"€",numericCode:978},MR:{countryName:"Mauritania",currency:"MRU",symbol:"MRU",numericCode:929},MS:{countryName:"Montserrat",currency:"XCD",symbol:"XCD",numericCode:951},MT:{countryName:"Malta",currency:"EUR",symbol:"€",dateFormat:"dd/MM/yyyy",numericCode:978},MU:{countryName:"Mauritius",currency:"MUR",symbol:"MURs",numericCode:480},MV:{countryName:"Maldives",currency:"MVR",symbol:"MVR",numericCode:462},MW:{countryName:"Malawi",currency:"MWK",symbol:"MWK",numericCode:454},MX:{countryName:"Mexico",currency:"MXN",symbol:"MX$",dateFormat:"d/MM/yyyy",numericCode:484},MY:{countryName:"Malaysia",currency:"MYR",symbol:"RM",dateFormat:"dd/MM/yyyy",numericCode:458},MZ:{countryName:"Mozambique",currency:"MZN",symbol:"MTn",numericCode:943},NA:{countryName:"Namibia",currency:"NAD",symbol:"N$",numericCode:516},NC:{countryName:"New Caledonia",currency:"XPF",symbol:"XPF",numericCode:953},NE:{countryName:"Niger",currency:"XOF",symbol:"CFA",numericCode:952},NF:{countryName:"Norfolk Island",currency:"AUD",symbol:"AU$",numericCode:36},NG:{countryName:"Nigeria",currency:"NGN",symbol:"₦",numericCode:566},NI:{countryName:"Nicaragua",currency:"NIO",symbol:"C$",dateFormat:"MM-dd-yyyy",numericCode:558},NL:{countryName:"Netherlands",currency:"EUR",symbol:"€",dateFormat:"d-M-yyyy",numericCode:978},NO:{countryName:"Norway",currency:"NOK",symbol:"Nkr",dateFormat:"dd.MM.yyyy",numericCode:578},NP:{countryName:"Nepal",currency:"NPR",symbol:"NPRs",numericCode:524},NR:{countryName:"Nauru",currency:"AUD",symbol:"AU$",numericCode:36},NU:{countryName:"Niue",currency:"NZD",symbol:"NZ$",numericCode:554},NZ:{countryName:"New Zealand",currency:"NZD",symbol:"NZ$",dateFormat:"d/MM/yyyy",numericCode:554},OM:{countryName:"Oman",currency:"OMR",symbol:"OMR",dateFormat:"dd/MM/yyyy",numericCode:512},PA:{countryName:"Panama",currency:"PAB",symbol:"B/.",dateFormat:"MM/dd/yyyy",numericCode:590},PE:{countryName:"Peru",currency:"PEN",symbol:"S/.",dateFormat:"dd/MM/yyyy",numericCode:604},PF:{countryName:"French Polynesia",currency:"XPF",symbol:"XPF",numericCode:953},PG:{countryName:"Papua New Guinea",currency:"PGK",symbol:"PGK",numericCode:598},PH:{countryName:"Philippines",currency:"PHP",symbol:"₱",dateFormat:"M/d/yyyy",numericCode:608},PK:{countryName:"Pakistan",currency:"PKR",symbol:"PKRs",numericCode:586},PL:{countryName:"Poland",currency:"PLN",symbol:"zł",dateFormat:"dd.MM.yyyy",numericCode:985},PM:{countryName:"Saint Pierre and Miquelon",currency:"EUR",symbol:"€",numericCode:978},PN:{countryName:"Pitcairn",currency:"NZD",symbol:"NZ$",numericCode:554},PR:{countryName:"Puerto Rico",currency:"USD",symbol:"$",dateFormat:"MM-dd-yyyy",numericCode:840},PS:{countryName:"Palestinian Territory",currency:"ILS",symbol:"₪",numericCode:376},PT:{countryName:"Portugal",currency:"EUR",symbol:"€",dateFormat:"dd-MM-yyyy",numericCode:978},PW:{countryName:"Palau",currency:"USD",symbol:"$",numericCode:840},PY:{countryName:"Paraguay",currency:"PYG",symbol:"₲",dateFormat:"dd/MM/yyyy",numericCode:600},QA:{countryName:"Qatar",currency:"QAR",symbol:"QR",dateFormat:"dd/MM/yyyy",numericCode:634},RE:{countryName:"Reunion",currency:"EUR",symbol:"€",numericCode:978},RO:{countryName:"Romania",currency:"RON",symbol:"RON",dateFormat:"dd.MM.yyyy",numericCode:946},RS:{countryName:"Serbia",currency:"RSD",symbol:"din.",dateFormat:"d.M.yyyy.",numericCode:941},RU:{countryName:"Russia",currency:"RUB",symbol:"RUB",dateFormat:"dd.MM.yyyy",numericCode:643},RW:{countryName:"Rwanda",currency:"RWF",symbol:"RWF",numericCode:646},SA:{countryName:"Saudi Arabia",currency:"SAR",symbol:"SR",dateFormat:"dd/MM/yyyy",numericCode:682},SB:{countryName:"Solomon Islands",currency:"SBD",symbol:"SBD",numericCode:90},SC:{countryName:"Seychelles",currency:"SCR",symbol:"SCR",numericCode:690},SD:{countryName:"Sudan",currency:"SDG",symbol:"SDG",dateFormat:"dd/MM/yyyy",numericCode:938},SE:{countryName:"Sweden",currency:"SEK",symbol:"Skr",dateFormat:"yyyy-MM-dd",numericCode:752},SG:{countryName:"Singapore",currency:"SGD",symbol:"S$",dateFormat:"M/d/yyyy",numericCode:702},SH:{countryName:"Saint Helena",currency:"SHP",symbol:"SHP",numericCode:654},SI:{countryName:"Slovenia",currency:"EUR",symbol:"€",dateFormat:"d.M.yyyy",numericCode:978},SJ:{countryName:"Svalbard and Jan Mayen",currency:"NOK",symbol:"Nkr",numericCode:578},SK:{countryName:"Slovakia",currency:"EUR",symbol:"€",dateFormat:"d.M.yyyy",numericCode:978},SL:{countryName:"Sierra Leone",currency:"SLL",symbol:"SLL",numericCode:694},SM:{countryName:"San Marino",currency:"EUR",symbol:"€",numericCode:978},SN:{countryName:"Senegal",currency:"XOF",symbol:"CFA",numericCode:952},SO:{countryName:"Somalia",currency:"SOS",symbol:"Ssh",numericCode:706},SR:{countryName:"Suriname",currency:"SRD",symbol:"SRD",numericCode:968},SS:{countryName:"South Sudan",currency:"SSP",symbol:"SSP",numericCode:728},ST:{countryName:"Sao Tome and Principe",currency:"STD",symbol:"STD",numericCode:678},SV:{countryName:"El Salvador",currency:"USD",symbol:"$",dateFormat:"MM-dd-yyyy",numericCode:840},SX:{countryName:"Sint Maarten",currency:"ANG",symbol:"ANG",numericCode:532},SY:{countryName:"Syria",currency:"SYP",symbol:"SY£",dateFormat:"dd/MM/yyyy",numericCode:760},SZ:{countryName:"Swaziland",currency:"SZL",symbol:"SZL",numericCode:748},TC:{countryName:"Turks and Caicos Islands",currency:"USD",symbol:"$",numericCode:840},TD:{countryName:"Chad",currency:"XAF",symbol:"FCFA",numericCode:950},TF:{countryName:"French Southern Territories",currency:"EUR",symbol:"€",numericCode:978},TG:{countryName:"Togo",currency:"XOF",symbol:"CFA",numericCode:952},TH:{countryName:"Thailand",currency:"THB",symbol:"฿",dateFormat:"๓/๖/๒๕๕๕",numericCode:764},TJ:{countryName:"Tajikistan",currency:"TJS",symbol:"TJS",numericCode:972},TK:{countryName:"Tokelau",currency:"NZD",symbol:"NZ$",numericCode:554},TL:{countryName:"East Timor",currency:"USD",symbol:"$",numericCode:840},TM:{countryName:"Turkmenistan",currency:"TMT",symbol:"TMT",numericCode:934},TN:{countryName:"Tunisia",currency:"TND",symbol:"DT",dateFormat:"dd/MM/yyyy",numericCode:788},TO:{countryName:"Tonga",currency:"TOP",symbol:"T$",numericCode:776},TR:{countryName:"Turkey",currency:"TRY",symbol:"₺",dateFormat:"dd.MM.yyyy",numericCode:949},TT:{countryName:"Trinidad and Tobago",currency:"TTD",symbol:"TT$",numericCode:780},TV:{countryName:"Tuvalu",currency:"AUD",symbol:"AU$",numericCode:36},TW:{countryName:"Taiwan",currency:"TWD",symbol:"NT$",dateFormat:"yyyy/M/d",numericCode:901},TZ:{countryName:"Tanzania",currency:"TZS",symbol:"TSh",numericCode:834},UA:{countryName:"Ukraine",currency:"UAH",symbol:"₴",dateFormat:"dd.MM.yyyy",numericCode:980},UG:{countryName:"Uganda",currency:"UGX",symbol:"USh",numericCode:800},UM:{countryName:"United States Minor Outlying Islands",currency:"USD",symbol:"$",numericCode:840},US:{countryName:"United States",currency:"USD",symbol:"$",dateFormat:"M/d/yyyy",numericCode:840},UY:{countryName:"Uruguay",currency:"UYU",symbol:"$U",dateFormat:"dd/MM/yyyy",numericCode:858},UZ:{countryName:"Uzbekistan",currency:"UZS",symbol:"UZS",numericCode:860},VA:{countryName:"Vatican",currency:"EUR",symbol:"€",numericCode:978},VC:{countryName:"Saint Vincent and the Grenadines",currency:"XCD",symbol:"XCD",numericCode:951},VE:{countryName:"Venezuela",currency:"VEF",symbol:"Bs.F.",dateFormat:"dd/MM/yyyy",numericCode:937},VG:{countryName:"British Virgin Islands",currency:"USD",symbol:"$",numericCode:840},VI:{countryName:"U.S. Virgin Islands",currency:"USD",symbol:"$",numericCode:840},VN:{countryName:"Vietnam",currency:"VND",symbol:"₫",dateFormat:"dd/MM/yyyy",numericCode:704},VU:{countryName:"Vanuatu",currency:"VUV",symbol:"VUV",numericCode:548},WF:{countryName:"Wallis and Futuna",currency:"XPF",symbol:"XPF",numericCode:953},WS:{countryName:"Samoa",currency:"WST",symbol:"WST",numericCode:882},XK:{countryName:"Kosovo",currency:"EUR",symbol:"€",numericCode:978},YE:{countryName:"Yemen",currency:"YER",symbol:"YR",dateFormat:"dd/MM/yyyy",numericCode:886},YT:{countryName:"Mayotte",currency:"EUR",symbol:"€",numericCode:978},ZA:{countryName:"South Africa",currency:"ZAR",symbol:"R",dateFormat:"yyyy/MM/dd",numericCode:710},ZM:{countryName:"Zambia",currency:"ZMW",symbol:"ZK",numericCode:967},ZW:{countryName:"Zimbabwe",currency:"ZWL",symbol:"ZWL",numericCode:932}},e=["currency","symbol"],r=e.concat(["countryName","dateFormat"]);$e.getAllISOCodes=function(){return Object.keys(t).map(function(s){const a=t[s];return{iso:s,currency:a.currency,symbol:a.symbol,countryName:a.countryName,dateFormat:a.dateFormat}})},$e.getAllInfoByISO=function(o){const s=o.toUpperCase();if(t.hasOwnProperty(s)){const a=t[s];return{iso:s,currency:a.currency,symbol:a.symbol,countryName:a.countryName,dateFormat:a.dateFormat}}throw new Error("ISO2 code wasn't found")},$e.getParamByISO=function(o,s){if(n(s,r),t.hasOwnProperty(o.toUpperCase()))return t[o.toUpperCase()][s];throw new Error("ISO2 code wasn't found")},$e.getISOByParam=function(o,s){n(o,r);for(let a in t)if(t.hasOwnProperty(a)&&t[a][o]===s)return a;throw new Error(s+" wasn't found in "+o)},$e.getParamByParam=function(o,s,a){n(o,r),n(a,r);for(let i in t)if(t.hasOwnProperty(i)&&t[i][o]===s)return t[i][a];throw new Error(o+" wasn't found in "+s)},$e.getAllCountriesByCurrencyOrSymbol=function(o,s){const a=[];n(o,e);for(let i in t)t.hasOwnProperty(i)&&t[i][o]===s&&a.push(t[i].countryName);if(a.length===0)throw new Error(s+" wasn't found in"+o);return a},$e.getAllISOByCurrencyOrSymbol=function(o,s){const a=[];n(o,e);for(let i in t)t.hasOwnProperty(i)&&t[i][o]===s&&a.push(i);if(a.length===0)throw new Error(s+" wasn't found in"+o);return a};function n(o,s){if(s.indexOf(o)===-1)throw new Error("Invalid search param")}return $e}var Li=Qm(),Ii=(t=>(t.ONETIME="ONETIME",t.RECURRING="RECURRING",t))(Ii||{}),ft=(t=>(t.DAILY="DAILY",t.WEEKLY="WEEKLY",t.MONTHLY="MONTHLY",t.ANNUAL="ANNUAL",t.QUARTERLY="QUARTERLY",t.HALF_YEARLY="HALF_YEARLY",t))(ft||{}),Gr=(t=>(t.FLAT_FEE="FLAT_FEE",t.PACKAGE="PACKAGE",t.TIERED="TIERED",t))(Gr||{}),Zr=(t=>(t.USAGE="USAGE",t.FIXED="FIXED",t))(Zr||{}),er=(t=>(t.PLAN="PLAN",t.ADDON="ADDON",t.FEATURE="FEATURE",t.METER="METER",t.COST_SHEET="COSTSHEET",t.SUBSCRIPTION="SUBSCRIPTION",t))(er||{}),Di=(t=>(t.MONTHLY="MONTHLY",t.ANNUAL="ANNUAL",t.WEEKLY="WEEKLY",t.DAILY="DAILY",t.QUARTERLY="QUARTERLY",t.HALF_YEARLY="HALF_YEARLY",t.ONETIME="ONETIME",t))(Di||{}),eo=(t=>(t.PLAN="PLAN",t.SUBSCRIPTION="SUBSCRIPTION",t.ADDON="ADDON",t))(eo||{}),to=(t=>(t.ARREAR="ARREAR",t.ADVANCE="ADVANCE",t))(to||{}),ro=(t=>(t.RECURRING="RECURRING",t.ONETIME="ONETIME",t))(ro||{}),no=(t=>(t.ANNIVERSARY="anniversary",t.CALENDAR="calendar",t))(no||{}),Lt=(t=>(t.ACTIVE="active",t.CANCELLED="cancelled",t.INCOMPLETE="incomplete",t.TRIALING="trialing",t.DRAFT="draft",t))(Lt||{}),tr=(t=>(t.ALLOW_INCOMPLETE="allow_incomplete",t.DEFAULT_INCOMPLETE="default_incomplete",t.ERROR_IF_INCOMPLETE="error_if_incomplete",t.DEFAULT_ACTIVE="default_active",t))(tr||{}),oo=(t=>(t.CHARGE_AUTOMATICALLY="charge_automatically",t.SEND_INVOICE="send_invoice",t))(oo||{}),mt=(t=>(t.NET_15="15 NET",t.NET_30="30 NET",t.NET_45="45 NET",t.NET_60="60 NET",t.NET_75="75 NET",t.NET_90="90 NET",t))(mt||{}),so=(t=>(t.PLAN="plan",t.ADDON="addon",t.SUBSCRIPTION="subscription",t))(so||{}),ao=(t=>(t.CREATE_PRORATIONS="create_prorations",t.NONE="none",t))(ao||{}),Yr=(t=>(t.IMMEDIATE="immediate",t.END_OF_PERIOD="end_of_period",t.SCHEDULED_DATE="scheduled_date",t))(Yr||{}),Je=(t=>(t.DAILY="DAILY",t.WEEKLY="WEEKLY",t.MONTHLY="MONTHLY",t.QUARTERLY="QUARTERLY",t.HALF_YEARLY="HALF_YEARLY",t.ANNUAL="ANNUAL",t.ONETIME="ONETIME",t))(Je||{});const ep=[{currency:"CLF",symbol:"CLF"}],tp=()=>{const t=Li.getAllISOCodes(),e=new Map,r=["USD","INR","EUR"];return r.forEach(n=>{const o=t.find(s=>s.currency===n);o&&e.set(n,{currency:o.currency,symbol:o.symbol})}),t.forEach(n=>{r.includes(n.currency)||e.set(n.currency,{currency:n.currency,symbol:n.symbol})}),ep.forEach(({currency:n,symbol:o})=>{e.has(n)||e.set(n,{currency:n,symbol:o})}),Array.from(e.values())};Array.from(new Map(tp().map(t=>[t.currency,{label:t.currency,value:t.currency,symbol:t.symbol}])).values());const rp=[{label:"Daily",value:"DAILY"},{label:"Weekly",value:"WEEKLY"},{label:"Monthly",value:"MONTHLY"},{label:"Yearly",value:"ANNUAL"},{label:"Quarterly",value:"QUARTERLY"},{label:"Half-Yearly",value:"HALF_YEARLY"},{label:"One-time",value:"ONETIME"}];ft.DAILY,ft.WEEKLY,ft.MONTHLY,ft.ANNUAL,ft.QUARTERLY,ft.HALF_YEARLY,Gr.FLAT_FEE,Gr.PACKAGE,Gr.TIERED,ro.RECURRING,ro.ONETIME,er.PLAN,er.ADDON,er.FEATURE,er.METER,eo.PLAN,eo.ADDON,to.ARREAR,to.ADVANCE,Lt.ACTIVE,Lt.CANCELLED,Lt.INCOMPLETE,Lt.TRIALING,Lt.DRAFT,no.ANNIVERSARY,no.CALENDAR,tr.ALLOW_INCOMPLETE,tr.DEFAULT_INCOMPLETE,tr.ERROR_IF_INCOMPLETE,tr.DEFAULT_ACTIVE,oo.CHARGE_AUTOMATICALLY,oo.SEND_INVOICE,mt.NET_15,mt.NET_30,mt.NET_45,mt.NET_60,mt.NET_75,mt.NET_90,ao.CREATE_PRORATIONS,ao.NONE,Yr.IMMEDIATE,Yr.END_OF_PERIOD,Yr.SCHEDULED_DATE,so.PLAN,so.ADDON;let np={data:""},op=t=>{if(typeof window=="object"){let e=(t?t.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return e.nonce=window.__nonce__,e.parentNode||(t||document.head).appendChild(e),e.firstChild}return t||np},sp=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ap=/\/\*[^]*?\*\/| +/g,ji=/\n+/g,Qe=(t,e)=>{let r="",n="",o="";for(let s in t){let a=t[s];s[0]=="@"?s[1]=="i"?r=s+" "+a+";":n+=s[1]=="f"?Qe(a,s):s+"{"+Qe(a,s[1]=="k"?"":e)+"}":typeof a=="object"?n+=Qe(a,e?e.replace(/([^,])+/g,i=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,i):i?i+" "+c:c)):s):a!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Qe.p?Qe.p(s,a):s+":"+a+";")}return r+(e&&o?e+"{"+o+"}":o)+n},Ue={},Fi=t=>{if(typeof t=="object"){let e="";for(let r in t)e+=r+Fi(t[r]);return e}return t},ip=(t,e,r,n,o)=>{let s=Fi(t),a=Ue[s]||(Ue[s]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(s));if(!Ue[a]){let c=s!==t?t:(l=>{let u,d,h=[{}];for(;u=sp.exec(l.replace(ap,""));)u[4]?h.shift():u[3]?(d=u[3].replace(ji," ").trim(),h.unshift(h[0][d]=h[0][d]||{})):h[0][u[1]]=u[2].replace(ji," ").trim();return h[0]})(t);Ue[a]=Qe(o?{["@keyframes "+a]:c}:c,r?"":"."+a)}let i=r&&Ue.g?Ue.g:null;return r&&(Ue.g=Ue[a]),((c,l,u,d)=>{d?l.data=l.data.replace(d,c):l.data.indexOf(c)===-1&&(l.data=u?c+l.data:l.data+c)})(Ue[a],e,n,i),a},cp=(t,e,r)=>t.reduce((n,o,s)=>{let a=e[s];if(a&&a.call){let i=a(r),c=i&&i.props&&i.props.className||/^go/.test(i)&&i;a=c?"."+c:i&&typeof i=="object"?i.props?"":Qe(i,""):i===!1?"":i}return n+o+(a??"")},"");function Xr(t){let e=this||{},r=t.call?t(e.p):t;return ip(r.unshift?r.raw?cp(r,[].slice.call(arguments,1),e.p):r.reduce((n,o)=>Object.assign(n,o&&o.call?o(e.p):o),{}):r,op(e.target),e.g,e.o,e.k)}let $i,io,co;Xr.bind({g:1});let Be=Xr.bind({k:1});function lp(t,e,r,n){Qe.p=e,$i=t,io=r,co=n}function et(t,e){let r=this||{};return function(){let n=arguments;function o(s,a){let i=Object.assign({},s),c=i.className||o.className;r.p=Object.assign({theme:io&&io()},i),r.o=/ *go\d+/.test(c),i.className=Xr.apply(r,n)+(c?" "+c:"");let l=t;return t[0]&&(l=i.as||t,delete i.as),co&&l[0]&&co(i),$i(l,i)}return o}}var up=t=>typeof t=="function",dp=(t,e)=>up(t)?t(e):t,fp=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),mp=Be`
47
+ from {
48
+ transform: scale(0) rotate(45deg);
49
+ opacity: 0;
50
+ }
51
+ to {
52
+ transform: scale(1) rotate(45deg);
53
+ opacity: 1;
54
+ }`,pp=Be`
55
+ from {
56
+ transform: scale(0);
57
+ opacity: 0;
58
+ }
59
+ to {
60
+ transform: scale(1);
61
+ opacity: 1;
62
+ }`,hp=Be`
63
+ from {
64
+ transform: scale(0) rotate(90deg);
65
+ opacity: 0;
66
+ }
67
+ to {
68
+ transform: scale(1) rotate(90deg);
69
+ opacity: 1;
70
+ }`,yp=et("div")`
71
+ width: 20px;
72
+ opacity: 0;
73
+ height: 20px;
74
+ border-radius: 10px;
75
+ background: ${t=>t.primary||"#ff4b4b"};
76
+ position: relative;
77
+ transform: rotate(45deg);
78
+
79
+ animation: ${mp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
80
+ forwards;
81
+ animation-delay: 100ms;
82
+
83
+ &:after,
84
+ &:before {
85
+ content: '';
86
+ animation: ${pp} 0.15s ease-out forwards;
87
+ animation-delay: 150ms;
88
+ position: absolute;
89
+ border-radius: 3px;
90
+ opacity: 0;
91
+ background: ${t=>t.secondary||"#fff"};
92
+ bottom: 9px;
93
+ left: 4px;
94
+ height: 2px;
95
+ width: 12px;
96
+ }
97
+
98
+ &:before {
99
+ animation: ${hp} 0.15s ease-out forwards;
100
+ animation-delay: 180ms;
101
+ transform: rotate(90deg);
102
+ }
103
+ `,gp=Be`
104
+ from {
105
+ transform: rotate(0deg);
106
+ }
107
+ to {
108
+ transform: rotate(360deg);
109
+ }
110
+ `,vp=et("div")`
111
+ width: 12px;
112
+ height: 12px;
113
+ box-sizing: border-box;
114
+ border: 2px solid;
115
+ border-radius: 100%;
116
+ border-color: ${t=>t.secondary||"#e0e0e0"};
117
+ border-right-color: ${t=>t.primary||"#616161"};
118
+ animation: ${gp} 1s linear infinite;
119
+ `,bp=Be`
120
+ from {
121
+ transform: scale(0) rotate(45deg);
122
+ opacity: 0;
123
+ }
124
+ to {
125
+ transform: scale(1) rotate(45deg);
126
+ opacity: 1;
127
+ }`,xp=Be`
128
+ 0% {
129
+ height: 0;
130
+ width: 0;
131
+ opacity: 0;
132
+ }
133
+ 40% {
134
+ height: 0;
135
+ width: 6px;
136
+ opacity: 1;
137
+ }
138
+ 100% {
139
+ opacity: 1;
140
+ height: 10px;
141
+ }`,wp=et("div")`
142
+ width: 20px;
143
+ opacity: 0;
144
+ height: 20px;
145
+ border-radius: 10px;
146
+ background: ${t=>t.primary||"#61d345"};
147
+ position: relative;
148
+ transform: rotate(45deg);
149
+
150
+ animation: ${bp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
151
+ forwards;
152
+ animation-delay: 100ms;
153
+ &:after {
154
+ content: '';
155
+ box-sizing: border-box;
156
+ animation: ${xp} 0.2s ease-out forwards;
157
+ opacity: 0;
158
+ animation-delay: 200ms;
159
+ position: absolute;
160
+ border-right: 2px solid;
161
+ border-bottom: 2px solid;
162
+ border-color: ${t=>t.secondary||"#fff"};
163
+ bottom: 6px;
164
+ left: 6px;
165
+ height: 10px;
166
+ width: 6px;
167
+ }
168
+ `,Cp=et("div")`
169
+ position: absolute;
170
+ `,Sp=et("div")`
171
+ position: relative;
172
+ display: flex;
173
+ justify-content: center;
174
+ align-items: center;
175
+ min-width: 20px;
176
+ min-height: 20px;
177
+ `,Np=Be`
178
+ from {
179
+ transform: scale(0.6);
180
+ opacity: 0.4;
181
+ }
182
+ to {
183
+ transform: scale(1);
184
+ opacity: 1;
185
+ }`,Ep=et("div")`
186
+ position: relative;
187
+ transform: scale(0.6);
188
+ opacity: 0.4;
189
+ min-width: 20px;
190
+ animation: ${Np} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
191
+ forwards;
192
+ `,_p=({toast:t})=>{let{icon:e,type:r,iconTheme:n}=t;return e!==void 0?typeof e=="string"?f.createElement(Ep,null,e):e:r==="blank"?null:f.createElement(Sp,null,f.createElement(vp,{...n}),r!=="loading"&&f.createElement(Cp,null,r==="error"?f.createElement(yp,{...n}):f.createElement(wp,{...n})))},Rp=t=>`
193
+ 0% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;}
194
+ 100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
195
+ `,Ap=t=>`
196
+ 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
197
+ 100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;}
198
+ `,Op="0%{opacity:0;} 100%{opacity:1;}",Tp="0%{opacity:1;} 100%{opacity:0;}",Pp=et("div")`
199
+ display: flex;
200
+ align-items: center;
201
+ background: #fff;
202
+ color: #363636;
203
+ line-height: 1.3;
204
+ will-change: transform;
205
+ box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
206
+ max-width: 350px;
207
+ pointer-events: auto;
208
+ padding: 8px 10px;
209
+ border-radius: 8px;
210
+ `,kp=et("div")`
211
+ display: flex;
212
+ justify-content: center;
213
+ margin: 4px 10px;
214
+ color: inherit;
215
+ flex: 1 1 auto;
216
+ white-space: pre-line;
217
+ `,Mp=(t,e)=>{let r=t.includes("top")?1:-1,[n,o]=fp()?[Op,Tp]:[Rp(r),Ap(r)];return{animation:e?`${Be(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Be(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}};f.memo(({toast:t,position:e,style:r,children:n})=>{let o=t.height?Mp(t.position||e||"top-center",t.visible):{opacity:0},s=f.createElement(_p,{toast:t}),a=f.createElement(kp,{...t.ariaProps},dp(t.message,t));return f.createElement(Pp,{className:t.className,style:{...o,...r,...t.style}},typeof n=="function"?n({icon:s,message:a}):f.createElement(f.Fragment,null,s,a))}),lp(f.createElement),Xr`
218
+ z-index: 9999;
219
+ > * {
220
+ pointer-events: auto;
221
+ }
222
+ `;function rr(t){try{return Li.getAllISOCodes().filter(r=>r.currency===t.toUpperCase())[0]?.symbol||t}catch(e){return console.error("Error getting currency symbol",e),t}}const lo=t=>{switch(t.toUpperCase()){case Je.DAILY:return"day";case Je.WEEKLY:return"week";case Je.MONTHLY:return"month";case Je.ANNUAL:return"year";case Je.QUARTERLY:return"quarter";case Je.HALF_YEARLY:return"half year";case Je.ONETIME:return"one-time";default:return"--"}},Lp=({label:t,disabled:e,labelClassName:r,children:n,htmlFor:o,...s})=>y.jsx("label",{...s,htmlFor:o,className:H(" block text-sm font-medium",e?"text-zinc-500":"text-zinc-950",r),children:t||n}),qr={xs:{height:"h-6",padding:"px-2 py-1",text:"text-xs",display:""},sm:{height:"h-8",padding:"px-2 py-1.5",text:"text-xs",display:""},default:{height:"h-10",padding:"px-3 py-2",text:"text-sm",display:""},lg:{height:"h-12",padding:"px-4 py-2.5",text:"text-base",display:""},icon:{height:"h-9 w-9",padding:"p-2",text:"text-sm",display:"flex items-center justify-center"}},pt={allowNegative:!1,allowDecimals:!0,thousandSeparator:",",decimalSeparator:"."},Se=(t,e=pt)=>{if(!t)return"";const{allowNegative:r,allowDecimals:n,thousandSeparator:o,decimalSeparator:s}={...pt,...e},a=r&&t.startsWith("-"),c=(a?t.slice(1):t).split(s),l=c[0]||"",u=c[1];let h=l.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n&&u!==void 0&&(h+=s+u),a?"-"+h:h},Ip=(t,e=pt)=>{const{thousandSeparator:r}={...pt,...e},n=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return t.replace(new RegExp(n,"g"),"")},Dp=/[^\x20-\x7E\u0600-\u06FF]/g,uo=t=>t.replace(Dp,""),jp=(t,e=pt)=>{const{allowNegative:r,allowDecimals:n,decimalSeparator:o}={...pt,...e};switch(t){case"integer":return r?/^-?\d*$/:/^\d*$/;case"number":case"formatted-number":return r?new RegExp(`^-?\\d*${n?`\\${o}?\\d*`:""}$`):new RegExp(`^\\d*${n?`\\${o}?\\d*`:""}$`);default:return/.*/}},Fp=f.forwardRef(({className:t,type:e,label:r,description:n,error:o,onChange:s,disabled:a,placeholder:i,suffix:c,id:l,value:u,inputPrefix:d,labelClassName:h,variant:m="text",size:v="default",formatOptions:p=pt,englishOnly:g=!0,onBeforeInput:x,onPaste:b,onCompositionEnd:w,...S},E)=>{const R=f.useRef(null),[N,j]=f.useState(null),P=g??m==="text",O=m==="formatted-number"||m==="integer",$=f.useMemo(()=>jp(m,p),[m,p]),k=f.useCallback(T=>P?uo(T):T,[P]),I=T=>typeof T.setSelectionRange=="function"&&["text","search","url","tel","password",""].includes(T.type??"");f.useEffect(()=>{N!==null&&R.current&&(I(R.current)&&R.current.setSelectionRange(N,N),j(null))},[N]);const _=T=>{let B=T.target.value;const U=u||"",Z=T.target.selectionStart||0;if(B=k(B),P&&B!==T.target.value){const oe=uo(T.target.value.slice(0,Z));j(oe.length)}if(m!=="text"){if(O&&(B=Ip(B,p)),!$.test(B))return;if(O){const oe=(U.slice(0,Z).match(/,/g)||[]).length,V=(Se(B,p).slice(0,Z).match(/,/g)||[]).length-oe;j(Z+V)}}s&&s(B)},z=()=>{let T=u;return P&&typeof T=="string"&&(T=uo(T)),O&&T?Se(T,{...p,allowDecimals:m!=="integer"}):T};return y.jsxs("div",{className:"space-y-1 w-full flex flex-col",children:[r&&y.jsx(Lp,{label:r,disabled:a,labelClassName:h,htmlFor:l}),y.jsxs("div",{className:H(qr[v].height,qr[v].padding,qr[v].text,qr[v].display,"w-full flex group items-center rounded-[6px] border bg-background ring-offset-background placeholder:text-muted-foreground disabled:opacity-50 disabled:cursor-not-allowed",o?"border-destructive":"border-input focus-within:ring-ring focus-within:ring-offset-2","focus-within:border-black",t),children:[d&&y.jsx("div",{className:"me-2",children:d}),y.jsx("input",{...S,id:l,type:e,value:z(),disabled:a,placeholder:i,className:H("peer relative min-h-0 min-w-0 flex-1 bg-transparent outline-none ring-0 focus:outline-none placeholder:text-muted-foreground",a&&"text-zinc-500",t),onChange:_,ref:T=>{R.current=T,typeof E=="function"?E(T):E&&(E.current=T)}}),c&&y.jsx("div",{className:"ms-2 flex shrink-0 items-center self-stretch ps-2 text-sm tabular-nums leading-none text-muted-foreground",children:c})]}),n&&y.jsx("p",{className:H("text-sm",a?"text-zinc-500":"text-muted-foreground"),children:n}),o&&y.jsx("p",{className:"text-sm text-destructive",children:o})]})});Fp.displayName="Input";var pe=(t=>(t.FREE="FREE",t.FIXED="FIXED",t.HYBRID_FREE="HYBRID_FREE",t.HYBRID_PAID="HYBRID_PAID",t.USAGE_ONLY="USAGE_ONLY",t))(pe||{}),ee;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{const s={};for(const a of o)s[a]=a;return s},t.getValidEnumValues=o=>{const s=t.objectKeys(o).filter(i=>typeof o[o[i]]!="number"),a={};for(const i of s)a[i]=o[i];return t.objectValues(a)},t.objectValues=o=>t.objectKeys(o).map(function(s){return o[s]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&s.push(a);return s},t.find=(o,s)=>{for(const a of o)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(ee||(ee={}));var Ui;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Ui||(Ui={}));const D=ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),tt=t=>{switch(typeof t){case"undefined":return D.undefined;case"string":return D.string;case"number":return Number.isNaN(t)?D.nan:D.number;case"boolean":return D.boolean;case"function":return D.function;case"bigint":return D.bigint;case"symbol":return D.symbol;case"object":return Array.isArray(t)?D.array:t===null?D.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?D.promise:typeof Map<"u"&&t instanceof Map?D.map:typeof Set<"u"&&t instanceof Set?D.set:typeof Date<"u"&&t instanceof Date?D.date:D.object;default:return D.unknown}},A=ee.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ve extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(s){return s.message},n={_errors:[]},o=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let i=n,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(i[l]=i[l]||{_errors:[]},i[l]._errors.push(r(a))):i[l]=i[l]||{_errors:[]},i=i[l],c++}}};return o(this),n}static assert(e){if(!(e instanceof Ve))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const o of this.issues)if(o.path.length>0){const s=o.path[0];r[s]=r[s]||[],r[s].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Ve.create=t=>new Ve(t);const fo=(t,e)=>{let r;switch(t.code){case A.invalid_type:t.received===D.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case A.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,ee.jsonStringifyReplacer)}`;break;case A.unrecognized_keys:r=`Unrecognized key(s) in object: ${ee.joinValues(t.keys,", ")}`;break;case A.invalid_union:r="Invalid input";break;case A.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ee.joinValues(t.options)}`;break;case A.invalid_enum_value:r=`Invalid enum value. Expected ${ee.joinValues(t.options)}, received '${t.received}'`;break;case A.invalid_arguments:r="Invalid function arguments";break;case A.invalid_return_type:r="Invalid function return type";break;case A.invalid_date:r="Invalid date";break;case A.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:ee.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case A.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case A.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case A.custom:r="Invalid input";break;case A.invalid_intersection_types:r="Intersection results could not be merged";break;case A.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case A.not_finite:r="Number must be finite";break;default:r=e.defaultError,ee.assertNever(t)}return{message:r}};let $p=fo;function Up(){return $p}const Bp=t=>{const{data:e,path:r,errorMaps:n,issueData:o}=t,s=[...r,...o.path||[]],a={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let i="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)i=l(a,{data:e,defaultError:i}).message;return{...o,path:s,message:i}};function M(t,e){const r=Up(),n=Bp({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===fo?void 0:fo].filter(o=>!!o)});t.common.issues.push(n)}class be{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const o of r){if(o.status==="aborted")return K;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const o of r){const s=await o.key,a=await o.value;n.push({key:s,value:a})}return be.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const o of r){const{key:s,value:a}=o;if(s.status==="aborted"||a.status==="aborted")return K;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(n[s.value]=a.value)}return{status:e.value,value:n}}}const K=Object.freeze({status:"aborted"}),nr=t=>({status:"dirty",value:t}),xe=t=>({status:"valid",value:t}),Bi=t=>t.status==="aborted",Vi=t=>t.status==="dirty",It=t=>t.status==="valid",Jr=t=>typeof Promise<"u"&&t instanceof Promise;var F;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(F||(F={}));class rt{constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Hi=(t,e)=>{if(It(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Ve(t.common.issues);return this._error=r,this._error}}};function q(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(a,i)=>{const{message:c}=t;return a.code==="invalid_enum_value"?{message:c??i.defaultError}:typeof i.data>"u"?{message:c??n??i.defaultError}:a.code!=="invalid_type"?{message:i.defaultError}:{message:c??r??i.defaultError}},description:o}}class Q{get description(){return this._def.description}_getType(e){return tt(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:tt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new be,ctx:{common:e.parent.common,data:e.data,parsedType:tt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Jr(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:tt(e)},o=this._parseSync({data:e,path:n.path,parent:n});return Hi(n,o)}"~validate"(e){const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:tt(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:r});return It(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>It(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:tt(e)},o=this._parse({data:e,path:n.path,parent:n}),s=await(Jr(o)?o:Promise.resolve(o));return Hi(n,s)}refine(e,r){const n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{const a=e(o),i=()=>s.addIssue({code:A.custom,...n(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(i(),!1)):a?!0:(i(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new vt({schema:this,typeName:G.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return ot.create(this,this._def)}nullable(){return $t.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Pe.create(this)}promise(){return rn.create(this,this._def)}or(e){return en.create([this,e],this._def)}and(e){return tn.create(this,e,this._def)}transform(e){return new vt({...q(this._def),schema:this,typeName:G.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new go({...q(this._def),innerType:this,defaultValue:r,typeName:G.ZodDefault})}brand(){return new uh({typeName:G.ZodBranded,type:this,...q(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new vo({...q(this._def),innerType:this,catchValue:r,typeName:G.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return bo.create(this,e)}readonly(){return xo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Vp=/^c[^\s-]{8,}$/i,Hp=/^[0-9a-z]+$/,Wp=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zp=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Kp=/^[a-z0-9_-]{21}$/i,Gp=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Zp=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Yp=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Xp="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let mo;const qp=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Jp=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Qp=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,eh=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,th=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rh=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Wi="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",nh=new RegExp(`^${Wi}$`);function zi(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function oh(t){return new RegExp(`^${zi(t)}$`)}function sh(t){let e=`${Wi}T${zi(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function ah(t,e){return!!((e==="v4"||!e)&&qp.test(t)||(e==="v6"||!e)&&Qp.test(t))}function ih(t,e){if(!Gp.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function ch(t,e){return!!((e==="v4"||!e)&&Jp.test(t)||(e==="v6"||!e)&&eh.test(t))}class He extends Q{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==D.string){const s=this._getOrReturnCtx(e);return M(s,{code:A.invalid_type,expected:D.string,received:s.parsedType}),K}const n=new be;let o;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(o=this._getOrReturnCtx(e,o),M(o,{code:A.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(o=this._getOrReturnCtx(e,o),M(o,{code:A.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const a=e.data.length>s.value,i=e.data.length<s.value;(a||i)&&(o=this._getOrReturnCtx(e,o),a?M(o,{code:A.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):i&&M(o,{code:A.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Yp.test(e.data)||(o=this._getOrReturnCtx(e,o),M(o,{validation:"email",code:A.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")mo||(mo=new RegExp(Xp,"u")),mo.test(e.data)||(o=this._getOrReturnCtx(e,o),M(o,{validation:"emoji",code:A.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")zp.test(e.data)||(o=this._getOrReturnCtx(e,o),M(o,{validation:"uuid",code:A.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")Kp.test(e.data)||(o=this._getOrReturnCtx(e,o),M(o,{validation:"nanoid",code:A.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")Vp.test(e.data)||(o=this._getOrReturnCtx(e,o),M(o,{validation:"cuid",code:A.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Hp.test(e.data)||(o=this._getOrReturnCtx(e,o),M(o,{validation:"cuid2",code:A.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Wp.test(e.data)||(o=this._getOrReturnCtx(e,o),M(o,{validation:"ulid",code:A.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),M(o,{validation:"url",code:A.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),M(o,{validation:"regex",code:A.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(e,o),M(o,{code:A.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(o=this._getOrReturnCtx(e,o),M(o,{code:A.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(o=this._getOrReturnCtx(e,o),M(o,{code:A.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?sh(s).test(e.data)||(o=this._getOrReturnCtx(e,o),M(o,{code:A.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?nh.test(e.data)||(o=this._getOrReturnCtx(e,o),M(o,{code:A.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?oh(s).test(e.data)||(o=this._getOrReturnCtx(e,o),M(o,{code:A.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?Zp.test(e.data)||(o=this._getOrReturnCtx(e,o),M(o,{validation:"duration",code:A.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?ah(e.data,s.version)||(o=this._getOrReturnCtx(e,o),M(o,{validation:"ip",code:A.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?ih(e.data,s.alg)||(o=this._getOrReturnCtx(e,o),M(o,{validation:"jwt",code:A.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?ch(e.data,s.version)||(o=this._getOrReturnCtx(e,o),M(o,{validation:"cidr",code:A.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?th.test(e.data)||(o=this._getOrReturnCtx(e,o),M(o,{validation:"base64",code:A.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?rh.test(e.data)||(o=this._getOrReturnCtx(e,o),M(o,{validation:"base64url",code:A.invalid_string,message:s.message}),n.dirty()):ee.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:A.invalid_string,...F.errToObj(n)})}_addCheck(e){return new He({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...F.errToObj(e)})}url(e){return this._addCheck({kind:"url",...F.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...F.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...F.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...F.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...F.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...F.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...F.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...F.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...F.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...F.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...F.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...F.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...F.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...F.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...F.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...F.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...F.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...F.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...F.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...F.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...F.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...F.errToObj(r)})}nonempty(e){return this.min(1,F.errToObj(e))}trim(){return new He({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new He({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new He({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}He.create=t=>new He({checks:[],typeName:G.ZodString,coerce:t?.coerce??!1,...q(t)});function lh(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),a=Number.parseInt(e.toFixed(o).replace(".",""));return s%a/10**o}class ht extends Q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==D.number){const s=this._getOrReturnCtx(e);return M(s,{code:A.invalid_type,expected:D.number,received:s.parsedType}),K}let n;const o=new be;for(const s of this._def.checks)s.kind==="int"?ee.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{code:A.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),M(n,{code:A.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),M(n,{code:A.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?lh(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),M(n,{code:A.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{code:A.not_finite,message:s.message}),o.dirty()):ee.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,F.toString(r))}gt(e,r){return this.setLimit("min",e,!1,F.toString(r))}lte(e,r){return this.setLimit("max",e,!0,F.toString(r))}lt(e,r){return this.setLimit("max",e,!1,F.toString(r))}setLimit(e,r,n,o){return new ht({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:F.toString(o)}]})}_addCheck(e){return new ht({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:F.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:F.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:F.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:F.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:F.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:F.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:F.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:F.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:F.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&ee.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}ht.create=t=>new ht({checks:[],typeName:G.ZodNumber,coerce:t?.coerce||!1,...q(t)});class yt extends Q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==D.bigint)return this._getInvalidInput(e);let n;const o=new be;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),M(n,{code:A.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),M(n,{code:A.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),M(n,{code:A.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):ee.assertNever(s);return{status:o.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return M(r,{code:A.invalid_type,expected:D.bigint,received:r.parsedType}),K}gte(e,r){return this.setLimit("min",e,!0,F.toString(r))}gt(e,r){return this.setLimit("min",e,!1,F.toString(r))}lte(e,r){return this.setLimit("max",e,!0,F.toString(r))}lt(e,r){return this.setLimit("max",e,!1,F.toString(r))}setLimit(e,r,n,o){return new yt({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:F.toString(o)}]})}_addCheck(e){return new yt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:F.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:F.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:F.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:F.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:F.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}yt.create=t=>new yt({checks:[],typeName:G.ZodBigInt,coerce:t?.coerce??!1,...q(t)});class Qr extends Q{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==D.boolean){const n=this._getOrReturnCtx(e);return M(n,{code:A.invalid_type,expected:D.boolean,received:n.parsedType}),K}return xe(e.data)}}Qr.create=t=>new Qr({typeName:G.ZodBoolean,coerce:t?.coerce||!1,...q(t)});class Dt extends Q{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==D.date){const s=this._getOrReturnCtx(e);return M(s,{code:A.invalid_type,expected:D.date,received:s.parsedType}),K}if(Number.isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return M(s,{code:A.invalid_date}),K}const n=new be;let o;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),M(o,{code:A.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(o=this._getOrReturnCtx(e,o),M(o,{code:A.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):ee.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Dt({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:F.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:F.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Dt.create=t=>new Dt({checks:[],coerce:t?.coerce||!1,typeName:G.ZodDate,...q(t)});class Ki extends Q{_parse(e){if(this._getType(e)!==D.symbol){const n=this._getOrReturnCtx(e);return M(n,{code:A.invalid_type,expected:D.symbol,received:n.parsedType}),K}return xe(e.data)}}Ki.create=t=>new Ki({typeName:G.ZodSymbol,...q(t)});class Gi extends Q{_parse(e){if(this._getType(e)!==D.undefined){const n=this._getOrReturnCtx(e);return M(n,{code:A.invalid_type,expected:D.undefined,received:n.parsedType}),K}return xe(e.data)}}Gi.create=t=>new Gi({typeName:G.ZodUndefined,...q(t)});class Zi extends Q{_parse(e){if(this._getType(e)!==D.null){const n=this._getOrReturnCtx(e);return M(n,{code:A.invalid_type,expected:D.null,received:n.parsedType}),K}return xe(e.data)}}Zi.create=t=>new Zi({typeName:G.ZodNull,...q(t)});class Yi extends Q{constructor(){super(...arguments),this._any=!0}_parse(e){return xe(e.data)}}Yi.create=t=>new Yi({typeName:G.ZodAny,...q(t)});class po extends Q{constructor(){super(...arguments),this._unknown=!0}_parse(e){return xe(e.data)}}po.create=t=>new po({typeName:G.ZodUnknown,...q(t)});class nt extends Q{_parse(e){const r=this._getOrReturnCtx(e);return M(r,{code:A.invalid_type,expected:D.never,received:r.parsedType}),K}}nt.create=t=>new nt({typeName:G.ZodNever,...q(t)});class Xi extends Q{_parse(e){if(this._getType(e)!==D.undefined){const n=this._getOrReturnCtx(e);return M(n,{code:A.invalid_type,expected:D.void,received:n.parsedType}),K}return xe(e.data)}}Xi.create=t=>new Xi({typeName:G.ZodVoid,...q(t)});class Pe extends Q{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==D.array)return M(r,{code:A.invalid_type,expected:D.array,received:r.parsedType}),K;if(o.exactLength!==null){const a=r.data.length>o.exactLength.value,i=r.data.length<o.exactLength.value;(a||i)&&(M(r,{code:a?A.too_big:A.too_small,minimum:i?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(M(r,{code:A.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(M(r,{code:A.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,i)=>o.type._parseAsync(new rt(r,a,r.path,i)))).then(a=>be.mergeArray(n,a));const s=[...r.data].map((a,i)=>o.type._parseSync(new rt(r,a,r.path,i)));return be.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new Pe({...this._def,minLength:{value:e,message:F.toString(r)}})}max(e,r){return new Pe({...this._def,maxLength:{value:e,message:F.toString(r)}})}length(e,r){return new Pe({...this._def,exactLength:{value:e,message:F.toString(r)}})}nonempty(e){return this.min(1,e)}}Pe.create=(t,e)=>new Pe({type:t,minLength:null,maxLength:null,exactLength:null,typeName:G.ZodArray,...q(e)});function jt(t){if(t instanceof ue){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=ot.create(jt(n))}return new ue({...t._def,shape:()=>e})}else return t instanceof Pe?new Pe({...t._def,type:jt(t.element)}):t instanceof ot?ot.create(jt(t.unwrap())):t instanceof $t?$t.create(jt(t.unwrap())):t instanceof gt?gt.create(t.items.map(e=>jt(e))):t}class ue extends Q{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=ee.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==D.object){const l=this._getOrReturnCtx(e);return M(l,{code:A.invalid_type,expected:D.object,received:l.parsedType}),K}const{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),i=[];if(!(this._def.catchall instanceof nt&&this._def.unknownKeys==="strip"))for(const l in o.data)a.includes(l)||i.push(l);const c=[];for(const l of a){const u=s[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new rt(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof nt){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of i)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")i.length>0&&(M(o,{code:A.unrecognized_keys,keys:i}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of i){const d=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new rt(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,h=await u.value;l.push({key:d,value:h,alwaysSet:u.alwaysSet})}return l}).then(l=>be.mergeObjectSync(n,l)):be.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return F.errToObj,new ue({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{const o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:F.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new ue({...this._def,unknownKeys:"strip"})}passthrough(){return new ue({...this._def,unknownKeys:"passthrough"})}extend(e){return new ue({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ue({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:G.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new ue({...this._def,catchall:e})}pick(e){const r={};for(const n of ee.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new ue({...this._def,shape:()=>r})}omit(e){const r={};for(const n of ee.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new ue({...this._def,shape:()=>r})}deepPartial(){return jt(this)}partial(e){const r={};for(const n of ee.objectKeys(this.shape)){const o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new ue({...this._def,shape:()=>r})}required(e){const r={};for(const n of ee.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof ot;)s=s._def.innerType;r[n]=s}return new ue({...this._def,shape:()=>r})}keyof(){return ec(ee.objectKeys(this.shape))}}ue.create=(t,e)=>new ue({shape:()=>t,unknownKeys:"strip",catchall:nt.create(),typeName:G.ZodObject,...q(e)}),ue.strictCreate=(t,e)=>new ue({shape:()=>t,unknownKeys:"strict",catchall:nt.create(),typeName:G.ZodObject,...q(e)}),ue.lazycreate=(t,e)=>new ue({shape:t,unknownKeys:"strip",catchall:nt.create(),typeName:G.ZodObject,...q(e)});class en extends Q{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function o(s){for(const i of s)if(i.result.status==="valid")return i.result;for(const i of s)if(i.result.status==="dirty")return r.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(i=>new Ve(i.ctx.common.issues));return M(r,{code:A.invalid_union,unionErrors:a}),K}if(r.common.async)return Promise.all(n.map(async s=>{const a={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(o);{let s;const a=[];for(const c of n){const l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const i=a.map(c=>new Ve(c));return M(r,{code:A.invalid_union,unionErrors:i}),K}}get options(){return this._def.options}}en.create=(t,e)=>new en({options:t,typeName:G.ZodUnion,...q(e)});function ho(t,e){const r=tt(t),n=tt(e);if(t===e)return{valid:!0,data:t};if(r===D.object&&n===D.object){const o=ee.objectKeys(e),s=ee.objectKeys(t).filter(i=>o.indexOf(i)!==-1),a={...t,...e};for(const i of s){const c=ho(t[i],e[i]);if(!c.valid)return{valid:!1};a[i]=c.data}return{valid:!0,data:a}}else if(r===D.array&&n===D.array){if(t.length!==e.length)return{valid:!1};const o=[];for(let s=0;s<t.length;s++){const a=t[s],i=e[s],c=ho(a,i);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===D.date&&n===D.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class tn extends Q{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),o=(s,a)=>{if(Bi(s)||Bi(a))return K;const i=ho(s.value,a.value);return i.valid?((Vi(s)||Vi(a))&&r.dirty(),{status:r.value,value:i.data}):(M(n,{code:A.invalid_intersection_types}),K)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,a])=>o(s,a)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}tn.create=(t,e,r)=>new tn({left:t,right:e,typeName:G.ZodIntersection,...q(r)});class gt extends Q{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==D.array)return M(n,{code:A.invalid_type,expected:D.array,received:n.parsedType}),K;if(n.data.length<this._def.items.length)return M(n,{code:A.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),K;!this._def.rest&&n.data.length>this._def.items.length&&(M(n,{code:A.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...n.data].map((a,i)=>{const c=this._def.items[i]||this._def.rest;return c?c._parse(new rt(n,a,n.path,i)):null}).filter(a=>!!a);return n.common.async?Promise.all(s).then(a=>be.mergeArray(r,a)):be.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new gt({...this._def,rest:e})}}gt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new gt({items:t,typeName:G.ZodTuple,rest:null,...q(e)})};class qi extends Q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==D.map)return M(n,{code:A.invalid_type,expected:D.map,received:n.parsedType}),K;const o=this._def.keyType,s=this._def.valueType,a=[...n.data.entries()].map(([i,c],l)=>({key:o._parse(new rt(n,i,n.path,[l,"key"])),value:s._parse(new rt(n,c,n.path,[l,"value"]))}));if(n.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return K;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),i.set(l.value,u.value)}return{status:r.value,value:i}})}else{const i=new Map;for(const c of a){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return K;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),i.set(l.value,u.value)}return{status:r.value,value:i}}}}qi.create=(t,e,r)=>new qi({valueType:e,keyType:t,typeName:G.ZodMap,...q(r)});class or extends Q{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==D.set)return M(n,{code:A.invalid_type,expected:D.set,received:n.parsedType}),K;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(M(n,{code:A.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(M(n,{code:A.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());const s=this._def.valueType;function a(c){const l=new Set;for(const u of c){if(u.status==="aborted")return K;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}const i=[...n.data.values()].map((c,l)=>s._parse(new rt(n,c,n.path,l)));return n.common.async?Promise.all(i).then(c=>a(c)):a(i)}min(e,r){return new or({...this._def,minSize:{value:e,message:F.toString(r)}})}max(e,r){return new or({...this._def,maxSize:{value:e,message:F.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}or.create=(t,e)=>new or({valueType:t,minSize:null,maxSize:null,typeName:G.ZodSet,...q(e)});class Ji extends Q{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Ji.create=(t,e)=>new Ji({getter:t,typeName:G.ZodLazy,...q(e)});class Qi extends Q{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return M(r,{received:r.data,code:A.invalid_literal,expected:this._def.value}),K}return{status:"valid",value:e.data}}get value(){return this._def.value}}Qi.create=(t,e)=>new Qi({value:t,typeName:G.ZodLiteral,...q(e)});function ec(t,e){return new Ft({values:t,typeName:G.ZodEnum,...q(e)})}class Ft extends Q{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return M(r,{expected:ee.joinValues(n),received:r.parsedType,code:A.invalid_type}),K}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return M(r,{received:r.data,code:A.invalid_enum_value,options:n}),K}return xe(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Ft.create(e,{...this._def,...r})}exclude(e,r=this._def){return Ft.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}Ft.create=ec;class yo extends Q{_parse(e){const r=ee.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==D.string&&n.parsedType!==D.number){const o=ee.objectValues(r);return M(n,{expected:ee.joinValues(o),received:n.parsedType,code:A.invalid_type}),K}if(this._cache||(this._cache=new Set(ee.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const o=ee.objectValues(r);return M(n,{received:n.data,code:A.invalid_enum_value,options:o}),K}return xe(e.data)}get enum(){return this._def.values}}yo.create=(t,e)=>new yo({values:t,typeName:G.ZodNativeEnum,...q(e)});class rn extends Q{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==D.promise&&r.common.async===!1)return M(r,{code:A.invalid_type,expected:D.promise,received:r.parsedType}),K;const n=r.parsedType===D.promise?r.data:Promise.resolve(r.data);return xe(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}rn.create=(t,e)=>new rn({type:t,typeName:G.ZodPromise,...q(e)});class vt extends Q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===G.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,s={addIssue:a=>{M(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const a=o.transform(n.data,s);if(n.common.async)return Promise.resolve(a).then(async i=>{if(r.value==="aborted")return K;const c=await this._def.schema._parseAsync({data:i,path:n.path,parent:n});return c.status==="aborted"?K:c.status==="dirty"||r.value==="dirty"?nr(c.value):c});{if(r.value==="aborted")return K;const i=this._def.schema._parseSync({data:a,path:n.path,parent:n});return i.status==="aborted"?K:i.status==="dirty"||r.value==="dirty"?nr(i.value):i}}if(o.type==="refinement"){const a=i=>{const c=o.refinement(i,s);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?K:(i.status==="dirty"&&r.dirty(),a(i.value),{status:r.value,value:i.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>i.status==="aborted"?K:(i.status==="dirty"&&r.dirty(),a(i.value).then(()=>({status:r.value,value:i.value}))))}if(o.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!It(a))return K;const i=o.transform(a.value,s);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:i}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>It(a)?Promise.resolve(o.transform(a.value,s)).then(i=>({status:r.value,value:i})):K);ee.assertNever(o)}}vt.create=(t,e,r)=>new vt({schema:t,typeName:G.ZodEffects,effect:e,...q(r)}),vt.createWithPreprocess=(t,e,r)=>new vt({schema:e,effect:{type:"preprocess",transform:t},typeName:G.ZodEffects,...q(r)});class ot extends Q{_parse(e){return this._getType(e)===D.undefined?xe(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ot.create=(t,e)=>new ot({innerType:t,typeName:G.ZodOptional,...q(e)});class $t extends Q{_parse(e){return this._getType(e)===D.null?xe(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}$t.create=(t,e)=>new $t({innerType:t,typeName:G.ZodNullable,...q(e)});class go extends Q{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===D.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}go.create=(t,e)=>new go({innerType:t,typeName:G.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...q(e)});class vo extends Q{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Jr(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ve(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ve(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}vo.create=(t,e)=>new vo({innerType:t,typeName:G.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...q(e)});class tc extends Q{_parse(e){if(this._getType(e)!==D.nan){const n=this._getOrReturnCtx(e);return M(n,{code:A.invalid_type,expected:D.nan,received:n.parsedType}),K}return{status:"valid",value:e.data}}}tc.create=t=>new tc({typeName:G.ZodNaN,...q(t)});class uh extends Q{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class bo extends Q{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?K:s.status==="dirty"?(r.dirty(),nr(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?K:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new bo({in:e,out:r,typeName:G.ZodPipeline})}}class xo extends Q{_parse(e){const r=this._def.innerType._parse(e),n=o=>(It(o)&&(o.value=Object.freeze(o.value)),o);return Jr(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}}xo.create=(t,e)=>new xo({innerType:t,typeName:G.ZodReadonly,...q(e)});var G;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(G||(G={}));const dh=He.create;ht.create,yt.create,Qr.create,Dt.create;const wo=po.create;nt.create;const Co=Pe.create,nn=ue.create;en.create,tn.create,gt.create;const rc=Ft.create,fh=yo.create;rn.create,ot.create,$t.create;const mh=vt.createWithPreprocess,st={string:(t=>He.create({...t,coerce:!0})),number:(t=>ht.create({...t,coerce:!0})),boolean:(t=>Qr.create({...t,coerce:!0})),bigint:(t=>yt.create({...t,coerce:!0})),date:(t=>Dt.create({...t,coerce:!0}))};function nc(t){function e(n,o){if(!Array.isArray(n))return o?.({index:-1,issues:[{code:"custom",message:"`plans` is not an array",path:[]}]}),[];const s=[];return n.forEach((a,i)=>{const c=t.safeParse(a);c.success?s.push(c.data):o?.({index:i,issues:c.error.issues})}),s}function r(n){const o=t.safeParse(n);if(o.success)return o.data;const s=n!=null&&typeof n=="object"?n:{},a=t.safeParse({...s,id:s.id??""});return a.success?a.data:n}return{normalizeMany:e,normalizeOne:r}}const bt=mh(t=>t??"",st.string()).catch(""),ph=nn({id:bt,feature_id:bt,name:bt,type:rc(["STATIC","BOOLEAN","METERED","CONFIG"]).catch("STATIC"),value:wo().nullable().catch(null),description:st.string().optional(),usage_reset_period:st.string().optional()}).passthrough(),hh=nn({amount:st.string().optional(),currency:st.string().optional(),billingPeriod:st.string().optional(),type:wo().optional(),displayType:fh(pe).catch(pe.FIXED)}).passthrough(),yh=nn({name:bt,credits:st.number().catch(0),cadence:rc(["onetime","recurring"]).catch("onetime"),period:st.string().nullish()}).passthrough(),So=nn({id:dh().min(1),name:bt,description:bt,price:hh.catch(()=>({displayType:pe.FIXED})),usageCharges:Co(wo()).catch(()=>[]),entitlements:Co(ph).catch(()=>[]),creditGrants:Co(yh).optional().catch(()=>[])}).passthrough(),gh=So.extend({id:bt}),vh=nc(So),bh=nc(gh);function oc(t,e){const r=e??(n=>{});return vh.normalizeMany(t,r)}function xh(t){return bh.normalizeOne(t)}const on=({type:t,value:e,name:r,usage_reset_period:n,feature_id:o,t:s,getFeatureHref:a})=>{const i=o?a?.(o):void 0,c=i?y.jsx("a",{href:i,className:"hover:underline decoration-dashed decoration-[0.5px] decoration-muted-foreground/50 underline-offset-4",children:r}):r;switch(t){case"STATIC":return y.jsxs(y.Fragment,{children:[e," ",c]});case"BOOLEAN":return y.jsx(y.Fragment,{children:e?c:y.jsxs(y.Fragment,{children:[r," ",s("pricingCard.notIncluded")]})});case"METERED":return y.jsxs(y.Fragment,{children:[Se((e??"").toString())," ",c,n?s("pricingCard.perBillingPeriod",{period:lo(n)}):""]});case"CONFIG":return c;default:return`${e} ${c}`}},wh=(t,e)=>{if(!t.amount)return"";const r=rr(t.currency||""),n=`${r}${Se(t.amount)}`;if(t.billing_model==="PACKAGE")return e("pricingCard.perPackage",{amount:n});if(t.billing_model==="FLAT_FEE")return e("pricingCard.perUnit",{amount:n});if(t.billing_model==="TIERED"&&t.tiers?.length){const o=`${r}${Se(t.tiers[0].unit_amount)}`;return e("pricingCard.startingAtPerUnit",{amount:o})}return e("pricingCard.perUnit",{amount:n})},Ch=(t,e)=>{if(!t.amount)return"";const r=rr(t.currency||""),n=Se(t.amount);return t.billing_model==="PACKAGE"?e("pricingCard.compactPerPkg",{amount:`${r}${n}`}):t.billing_model==="TIERED"&&t.tiers?.length?e("pricingCard.compactFromPerUnit",{amount:`${r}${Se(t.tiers[0].unit_amount)}`}):e("pricingCard.compactPerUnit",{amount:`${r}${n}`})};function Sh(t){const e=t.trim().toLowerCase().replace(/\s+/g," ");return e?/^(monthly|annual|quarterly|weekly|daily) included credits?$/.test(e):!0}function sc(t,e){const r=e.toLowerCase();return t==="METERED"?r.includes("email")||r.includes("mail")?{Icon:jd,iconClass:"text-sky-600"}:r.includes("sms")||r.includes("chat")||r.includes("message")?{Icon:Fd,iconClass:"text-violet-600"}:r.includes("phone")||r.includes("call")||r.includes("minute")?{Icon:$d,iconClass:"text-emerald-600"}:r.includes("api")||r.includes("request")||r.includes("agent")?{Icon:Bd,iconClass:"text-amber-600"}:{Icon:Dd,iconClass:"text-indigo-600"}:{Icon:Ud,iconClass:"text-emerald-600"}}function Nh(t,e){const r=t.usage_reset_period?`/${lo(t.usage_reset_period)}`:"";switch(t.type){case"STATIC":return`${t.value} ${t.name}`;case"BOOLEAN":return t.value?String(t.name):e("pricingCard.previewBooleanNotIncluded",{name:t.name});case"METERED":return`${Se(String(t.value))} ${t.name}${r}`;case"CONFIG":return String(t.name);default:return`${t.value} ${t.name}`}}const Eh=({charge:t,t:e})=>{if(t.billing_model!=="TIERED"||!t.tiers)return null;const r=(o,s,a)=>{const i=s===0?1:(a[s-1].up_to??0)+1;return o.up_to===null||s===a.length-1?`${i} - ∞`:`${i} - ${o.up_to}`},n=rr(t.currency||"");return y.jsx(Qt,{sideOffset:5,className:"bg-white border border-gray-200 shadow-lg text-sm text-gray-900 px-4 py-3 rounded-lg max-w-[320px]",children:y.jsxs("div",{className:"space-y-3",children:[y.jsx("div",{className:"font-medium border-b border-spacing-1 border-gray-200 pb-2 text-base text-gray-900",children:e("pricingCard.volumePricing")}),y.jsx("div",{className:"space-y-2",children:t.tiers.map((o,s)=>y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsxs("div",{className:"flex items-center justify-between gap-6",children:[y.jsx("div",{className:"!font-normal text-muted-foreground",children:e("pricingCard.unitsLabel",{range:r(o,s,t.tiers||[])})}),y.jsxs("div",{className:"text-end",children:[y.jsx("div",{className:"!font-normal text-muted-foreground",children:e("pricingCard.perUnitShort",{amount:`${n}${Se(o.unit_amount)}`})}),Number(o.flat_amount)>0&&y.jsx("div",{className:"text-xs text-gray-500",children:e("pricingCard.flatFeeShort",{amount:`${n}${Se(o.flat_amount)}`})})]})]}),s<(t.tiers?.length||0)-1&&y.jsx("div",{className:"h-px bg-gray-100"})]},s))})]})})},xt=3,ac=t=>{const{id:e,name:r,price:n={displayType:pe.FIXED},usageCharges:o=[],entitlements:s=[],creditGrants:a=[],className:i="",showUsageCharges:c=!1,isPreview:l=!1,useModernChrome:u=!1,onSelectPlan:d,getFeatureHref:h}=xh(t),m=dm(),[v,p]=X.useState(!1),[g,x]=X.useState(!1),b=l,w=b||u,S=X.useMemo(()=>({[pe.FREE]:{text:m("pricingCard.free"),useCurrencyZeroDisplay:!1,showBillingPeriod:!1,subtext:""},[pe.HYBRID_FREE]:{text:"",useCurrencyZeroDisplay:!0,showBillingPeriod:!0,subtext:m("pricingCard.plusUsage")},[pe.HYBRID_PAID]:{text:"",useCurrencyZeroDisplay:!1,showBillingPeriod:!0,subtext:m("pricingCard.plusUsage")},[pe.USAGE_ONLY]:{text:"",useCurrencyZeroDisplay:!0,showBillingPeriod:!0,subtext:m("pricingCard.plusUsage")},[pe.FIXED]:{text:"",useCurrencyZeroDisplay:!1,showBillingPeriod:!0,subtext:""}}),[m]),E=S[n.displayType]??S[pe.FIXED],R=E.text||`${rr(n.currency||"")}${Se(n.amount||"")}`,N=o.length>0,j=b?o.length:xt,P=b?s.length:xt,O=v?o:o.slice(0,j),$=b?0:o.length-xt,k=g?s:s.slice(0,P),I=b?0:s.length-xt;return y.jsxs("div",{className:H("flexprice-ui","border transition-all shadow-md",w?"rounded-2xl border-slate-200/90 bg-gradient-to-b from-white to-slate-50/90 p-5 shadow-sm ring-1 ring-slate-100 hover:border-slate-300/90":"border-gray-200 bg-white hover:border-gray-300 rounded-3xl p-7",i),children:[y.jsx("div",{className:H(w?"space-y-1.5":"space-y-2"),children:y.jsx("h3",{className:H("font-[300] text-gray-900",w?"text-lg":"text-xl"),children:r})}),y.jsxs("div",{className:H(w?"mt-5 space-y-3":"mt-6 space-y-4"),children:[y.jsx("div",{className:"flex flex-col",children:y.jsxs("div",{className:"flex items-baseline",children:[y.jsx("span",{className:H("font-normal text-gray-900",w?"text-[28px]":"text-4xl"),children:E.useCurrencyZeroDisplay?`${rr(n.currency||"")}0`:R}),E.showBillingPeriod&&y.jsxs("span",{className:H("ms-2 text-gray-500",w?"text-xs":"text-sm text3"),children:["/",lo(n.billingPeriod||""),E.subtext&&(!w||b)&&y.jsx("span",{className:H("ms-1",w?"text-[11px] font-semibold text-indigo-600":"font-medium text-lg"),children:E.subtext})]})]})}),N&&c&&y.jsxs("div",{className:H("border-t",w?"mt-3 border-slate-100 pt-3.5":"pt-4"),children:[y.jsx("div",{className:H("font-medium text-gray-900",w?"mb-2 text-[10px] uppercase tracking-wide text-gray-400":"mb-2 text-sm"),children:m(w?"pricingCard.usageSectionModern":"pricingCard.usageSectionClassic")}),y.jsxs("div",{className:H("space-y-2"),children:[O.map((_,z)=>y.jsxs("div",{className:H("flex items-start justify-between gap-2",w?"text-[11px] leading-snug text-slate-700":"gap-3 text-sm text-gray-600"),children:[y.jsx("span",{className:H("min-w-0 flex-1",!w&&"leading-snug"),children:_.meter_name}),y.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[y.jsx("span",{className:H("whitespace-nowrap text-end font-medium",w?"text-slate-800":"text-gray-700"),children:w?Ch(_,m):wh(_,m)}),_.billing_model==="TIERED"&&_.tiers&&y.jsx(Hr,{delayDuration:0,children:y.jsxs(Wr,{children:[y.jsx(zr,{children:y.jsx(jn,{className:H("text-gray-400 transition-colors duration-150 hover:text-gray-500",w?"h-3.5 w-3.5":"h-4 w-4")})}),y.jsx(Eh,{charge:_,t:m})]})})]})]},z)),!v&&$>0&&y.jsxs("button",{type:"button",onClick:()=>p(!0),className:H("mt-1 flex items-center gap-1.5 text-xs transition-colors",w?"text-slate-400 hover:text-slate-600":"text-gray-400 hover:text-gray-600"),children:[y.jsx(Ma,{className:"h-3.5 w-3.5"}),m("pricingCard.moreCount",{count:$})]}),v&&o.length>xt&&y.jsx("button",{type:"button",onClick:()=>p(!1),className:H("mt-1 flex items-center gap-1.5 text-xs transition-colors",w?"text-slate-400 hover:text-slate-600":"text-gray-400 hover:text-gray-600"),children:m("pricingCard.showLess")})]})]})]}),!b&&d&&y.jsx("div",{className:H(w?"mt-5":"mt-6"),children:y.jsx(ki,{onClick:()=>{d(e)},className:H("w-full py-3 text-sm font-medium transition-colors",w?"rounded-xl border border-slate-200 bg-white text-slate-900 shadow-sm hover:bg-slate-50":"rounded-2xl bg-gray-50 text-gray-900 hover:bg-gray-100"),variant:"outline",children:m("pricingCard.viewPlan")})}),(s.length>0||!b||w&&a.length>0)&&y.jsxs("div",{className:H(w?"mt-4 border-t border-slate-100 pt-4":"mt-7"),children:[s.length>0?y.jsxs(y.Fragment,{children:[w&&y.jsx("p",{className:"mb-2.5 text-[10px] font-semibold uppercase tracking-wide text-gray-400",children:m("pricingCard.includedHeading")}),y.jsxs("ul",{className:H(w?"space-y-2.5":"space-y-3.5"),children:[k.map(_=>{if(w){const{Icon:z,iconClass:T}=sc(_.type,_.name);return y.jsxs("li",{className:"flex items-center gap-2",children:[y.jsx(z,{className:H("h-3.5 w-3.5 shrink-0",T),strokeWidth:2,"aria-hidden":!0}),y.jsx("span",{className:"min-w-0 flex-1 text-[11px] font-normal leading-snug text-slate-700",children:b?Nh(_,m):y.jsx(y.Fragment,{children:on({type:_.type,value:_.value,name:_.name,usage_reset_period:_.usage_reset_period||"",feature_id:_.feature_id,t:m,getFeatureHref:h})})}),_.description&&y.jsx(Hr,{delayDuration:0,children:y.jsxs(Wr,{children:[y.jsx(zr,{className:"cursor-pointer shrink-0",children:y.jsx(jn,{className:"h-3.5 w-3.5 text-gray-400 transition-colors hover:text-gray-500"})}),y.jsx(Qt,{sideOffset:5,className:"max-w-[200px] rounded-lg bg-gray-900 px-3 py-1.5 text-xs text-white",children:_.description})]})})]},_.id)}return y.jsxs("li",{className:"flex items-center gap-3",children:[y.jsx(Dn,{className:"h-[18px] w-[18px] flex-shrink-0 text-gray-600"}),y.jsx("span",{className:"flex-1 text-[15px] font-normal text-gray-600",children:on({type:_.type,value:_.value,name:_.name,usage_reset_period:_.usage_reset_period||"",feature_id:_.feature_id,t:m,getFeatureHref:h})}),_.description&&y.jsx(Hr,{delayDuration:0,children:y.jsxs(Wr,{children:[y.jsx(zr,{className:"cursor-pointer",children:y.jsx(jn,{className:"h-4 w-4 text-gray-400 transition-colors duration-150 hover:text-gray-500"})}),y.jsx(Qt,{sideOffset:5,className:"max-w-[200px] rounded-lg bg-gray-900 px-3 py-1.5 text-xs text-white",children:_.description})]})})]},_.id)}),!g&&I>0&&y.jsx("li",{children:y.jsx(Hr,{delayDuration:0,children:y.jsxs(Wr,{children:[y.jsx(zr,{asChild:!0,children:y.jsxs("button",{type:"button",onClick:()=>x(!0),className:H("flex items-center gap-1.5 text-xs transition-colors",w?"text-slate-400 hover:text-slate-600":"text-gray-400 hover:text-gray-600"),children:[y.jsx(Ma,{className:"h-3.5 w-3.5"}),m("pricingCard.moreCount",{count:I})]})}),y.jsx(Qt,{sideOffset:5,className:"bg-white border border-gray-200 shadow-lg text-sm text-gray-900 px-4 py-3 rounded-lg max-w-[280px]",children:y.jsx("div",{className:"space-y-2",children:s.slice(xt).map((_,z)=>{if(w){const{Icon:T,iconClass:B}=sc(_.type,_.name);return y.jsxs("div",{className:"flex items-start gap-2 text-[11px] leading-snug text-slate-700",children:[y.jsx(T,{className:H("mt-0.5 h-3.5 w-3.5 shrink-0",B),strokeWidth:2,"aria-hidden":!0}),y.jsx("span",{children:on({type:_.type,value:_.value,name:_.name,usage_reset_period:_.usage_reset_period||"",feature_id:"",t:m,getFeatureHref:h})})]},z)}return y.jsxs("div",{className:"flex items-start gap-2 text-sm text-gray-600",children:[y.jsx(Dn,{className:"h-3.5 w-3.5 text-gray-400 mt-0.5 shrink-0"}),y.jsx("span",{children:on({type:_.type,value:_.value,name:_.name,usage_reset_period:_.usage_reset_period||"",feature_id:"",t:m,getFeatureHref:h})})]},z)})})})]})})}),g&&s.length>xt&&y.jsx("li",{children:y.jsx("button",{type:"button",onClick:()=>x(!1),className:H("flex items-center gap-1.5 text-xs transition-colors",w?"text-slate-400 hover:text-slate-600":"text-gray-400 hover:text-gray-600"),children:m("pricingCard.showLess")})})]})]}):y.jsx("div",{className:"text-center",children:y.jsx("button",{onClick:()=>d?.(e),className:"text-sm text-gray-900 underline decoration-dashed decoration-[0.5px] decoration-muted-foreground/50 underline-offset-4 hover:text-gray-700 transition-colors",children:m("pricingCard.addEntitlements")})}),w&&a.length>0&&y.jsxs("div",{className:H(s.length>0||!b?"mt-3 border-t border-slate-100 pt-3":""),children:[y.jsx("p",{className:"mb-2.5 text-[10px] font-semibold uppercase tracking-wide text-gray-400",children:m("pricingCard.creditsHeading")}),y.jsx("ul",{className:"space-y-2.5",children:a.map((_,z)=>y.jsxs("li",{className:"flex items-center gap-2",children:[y.jsx(Id,{className:"h-3.5 w-3.5 shrink-0 text-slate-400",strokeWidth:2,"aria-hidden":!0}),y.jsxs("span",{className:"min-w-0 flex-1 text-[11px] font-normal leading-snug text-slate-700",children:[y.jsx("span",{className:"font-medium text-slate-800",children:m("pricingCard.creditsAmount",{formatted:_.credits.toLocaleString()})}),!Sh(_.name)&&y.jsxs("span",{className:"text-slate-600",children:[" · ",_.name]}),_.cadence==="recurring"&&_.period&&y.jsxs("span",{className:"text-slate-500",children:[" /",_.period]}),_.cadence==="onetime"&&y.jsxs("span",{className:"text-slate-500",children:[" · ",m("pricingCard.oneTime")]}),_.cadence==="recurring"&&!_.period&&y.jsxs("span",{className:"text-slate-500",children:[" · ",m("pricingCard.recurring")]})]})]},`${_.name}-${z}`))})]})]})]})},_h=({plans:t,billingPeriod:e,onBillingPeriodChange:r,billingPeriodOptions:n,billingPeriodPlaceholder:o="Select billing period",currency:s,onCurrencyChange:a,currencyOptions:i,currencyPlaceholder:c="Select currency",onSelectPlan:l,getFeatureHref:u,hideFilters:d=!1,onValidationError:h,className:m})=>{const v=X.useMemo(()=>oc(t,h),[t,h]);return y.jsxs("div",{className:H("flexprice-ui","flex flex-col gap-6",m),children:[!d&&y.jsxs("div",{className:"flex w-full justify-start gap-4",children:[y.jsx(Ga,{className:"w-40 !rounded-xl",value:e,options:n,onChange:r,placeholder:o}),y.jsx(Ga,{className:"w-40 !rounded-xl",value:s,options:i,onChange:a,placeholder:c})]}),y.jsxs("div",{className:"grid grid-cols-1 gap-5 md:grid-cols-2 md:gap-6 lg:grid-cols-3 lg:gap-6",children:[y.jsx("div",{className:"contents",children:v.map((p,g)=>y.jsx("div",{className:"flex w-full",children:y.jsx(ac,{...p,className:"w-full",useModernChrome:!0,onSelectPlan:l,getFeatureHref:u})},p.id||g))}),v.length===2&&y.jsx("div",{className:"hidden lg:block"}),v.length===1&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"hidden md:block"}),y.jsx("div",{className:"hidden lg:block"})]})]})]})},ic=t=>{if(!t)return 0;const e=parseFloat(t);return isNaN(e)?0:e},sr=t=>t.type===Zr.FIXED&&t.billing_period?.toUpperCase()!==Di.ONETIME,No=t=>t.type===Zr.USAGE,cc=t=>{if(!t||t.length===0)return pe.USAGE_ONLY;const e=t.filter(sr),r=t.filter(No),n=e.some(s=>ic(s.amount)>0),o=e.every(s=>ic(s.amount)===0);return e.length>0&&!r.length&&o?pe.FREE:e.length>0&&r.length>0&&o?pe.HYBRID_FREE:e.length>0&&r.length>0?pe.HYBRID_PAID:r.length>0&&e.length===0?pe.USAGE_ONLY:e.length>0&&n?pe.FIXED:pe.USAGE_ONLY};function lc(t){const e=t.cadence===Ii.RECURRING?"recurring":"onetime";return{name:t.name,credits:t.credits,cadence:e,period:t.period?t.period.toLowerCase():null}}const Rh=(t,e,r)=>{let n=0,o="",s="";for(const a of e)for(const i of r){const c=t.map(l=>({...l,prices:l.prices?.filter(u=>u.currency.toUpperCase()===a.value&&u.billing_period===i.value&&sr(u))})).filter(l=>l.prices&&l.prices.length>0);c.length>n&&(n=c.length,o=a.value,s=i.value)}if(n>0)return{currency:o,period:s,hasPreferred:!0};for(const a of e)for(const i of r){const c=t.map(l=>({...l,prices:l.prices?.filter(u=>u.currency.toUpperCase()===a.value&&u.billing_period===i.value)})).filter(l=>(l.prices?.length??0)>0);c.length>n&&(n=c.length,o=a.value,s=i.value)}return{currency:o,period:s,hasPreferred:!1}};function Ah(t,e,r){const n=new Set;t.forEach(c=>c.prices?.forEach(l=>n.add(l.currency)));const o=Array.from(n).map(c=>({label:c.toUpperCase(),value:c.toUpperCase()})),s=rp,a=r?o.filter(c=>t.some(l=>l.prices?.some(u=>u.currency.toUpperCase()===c.value&&u.billing_period===r))):o,i=e?s.filter(c=>t.some(l=>l.prices?.some(u=>u.currency.toUpperCase()===e&&u.billing_period===c.value))):s;return{allCurrencyOptions:o,allPeriodOptions:s,availableCurrencyOptions:a,availablePeriodOptions:i}}function Oh(t,e,r){return t.map(o=>({...o,prices:o.prices?.filter(s=>s.currency.toUpperCase()===e&&s.billing_period===r)||[]})).filter(o=>o.prices?.length>0).sort((o,s)=>{const a=u=>{const d=u.prices?.find(h=>sr(h));return d?parseFloat(d.amount||"0"):0},i=u=>u.prices?.some(d=>d.type===Zr.USAGE)?1:0,c=a(o),l=a(s);return c!==l?c-l:i(o)-i(s)})}function Th(t,e){const r=t.prices,n=cc(r),o=r?.find(i=>sr(i)),s=r?.filter(i=>No(i)).map(i=>({amount:i.amount,currency:i.currency,billing_model:i.billing_model,tiers:i.tiers,meter_name:i.meter?.name||"Usage",billing_period:i.billing_period,type:i.type,invoice_cadence:i.invoice_cadence}))||[],a=o||s[0];return{id:t.id,name:t.name,description:t.description,price:{amount:a?.amount,currency:a?.currency,billingPeriod:a?.billing_period,type:a?.type,displayType:n},usageCharges:s,entitlements:t.entitlements?.map(i=>({id:i.id,feature_id:i.feature?.id||"",name:i.feature?.name||"",type:i.feature_type.toUpperCase(),value:i.feature_type==="boolean"?i.is_enabled:i.feature_type==="metered"?i.usage_limit||"Unlimited":i.static_value||"",description:i.feature?.description,usage_reset_period:i.usage_reset_period||""}))||[],creditGrants:e.map(lc)}}fe.PlanSchema=So,fe.PricingCard=ac,fe.PricingTable=_h,fe.adaptPlanToCard=Th,fe.deriveCurrencyPeriodOptions=Ah,fe.filterAndSortPlans=Oh,fe.findBestPriceCombination=Rh,fe.getPriceDisplayType=cc,fe.isRecurringPrice=sr,fe.isUsageBasedPrice=No,fe.mapCreditGrantToCardProps=lc,fe.normalizePlans=oc,Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"})}));
223
+ //# sourceMappingURL=flexprice-ui.cjs.map