@mp-front/components 0.0.1-next-2 → 0.0.1-next-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-BP9HuXkV.cjs +31 -0
- package/dist/index-C0ENqrRs.js +570 -0
- package/dist/layout/content.component.d.ts +19 -0
- package/dist/layout/content.component.d.ts.map +1 -0
- package/dist/layout/footer.component.d.ts +17 -0
- package/dist/layout/footer.component.d.ts.map +1 -0
- package/dist/layout/header/header.component.d.ts +33 -0
- package/dist/layout/header/header.component.d.ts.map +1 -0
- package/dist/layout/header/header.types.d.ts +30 -0
- package/dist/layout/header/header.types.d.ts.map +1 -0
- package/dist/layout/header/left-side.component.d.ts +19 -0
- package/dist/layout/header/left-side.component.d.ts.map +1 -0
- package/dist/layout/header/right-side.component.d.ts +27 -0
- package/dist/layout/header/right-side.component.d.ts.map +1 -0
- package/dist/layout/header/store.component.d.ts +20 -0
- package/dist/layout/header/store.component.d.ts.map +1 -0
- package/dist/layout/header/user.component.d.ts +27 -0
- package/dist/layout/header/user.component.d.ts.map +1 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/root-layout.component.d.ts +46 -0
- package/dist/layout/root-layout.component.d.ts.map +1 -0
- package/dist/layout/root-layout.stories.d.ts +12 -0
- package/dist/layout/root-layout.stories.d.ts.map +1 -0
- package/dist/layout/root-layout.test.d.ts +2 -0
- package/dist/layout/root-layout.test.d.ts.map +1 -0
- package/dist/layout/root-layout.types.d.ts +10 -0
- package/dist/layout/root-layout.types.d.ts.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/ui-components-hooks.cjs +1 -1
- package/dist/ui-components-hooks.js +29 -170
- package/dist/ui-components-index.cjs +33 -63
- package/dist/ui-components-index.js +7171 -7722
- package/dist/ui-components-layout.cjs +135 -0
- package/dist/ui-components-layout.js +19938 -0
- package/dist/useTranslation-Cenukg7h.js +147 -0
- package/dist/useTranslation-CnSCmJou.cjs +1 -0
- package/package.json +6 -18
|
@@ -1,78 +1,48 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react"),N=require("./index-B2DyV2Jl.cjs"),xa=require("react-dom"),ce=require("./skeleton-avatar-Ce_osCsT.cjs"),dd=require("./use-controlled-state-H7oMYjxi.cjs");function hd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const y=hd(_),oi=hd(xa);function pd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ir={exports:{}},Mn={};/**
|
|
2
|
-
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var qc;function Ty(){if(qc)return Mn;qc=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var c=null;if(i!==void 0&&(c=""+i),o.key!==void 0&&(c=""+o.key),"key"in o){i={};for(var u in o)u!=="key"&&(i[u]=o[u])}else i=o;return o=i.ref,{$$typeof:e,type:r,key:c,ref:o!==void 0?o:null,props:i}}return Mn.Fragment=t,Mn.jsx=n,Mn.jsxs=n,Mn}var In={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Kc;function Py(){return Kc||(Kc=1,process.env.NODE_ENV!=="production"&&(function(){function e(C){if(C==null)return null;if(typeof C=="function")return C.$$typeof===U?null:C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case A:return"Fragment";case E:return"Portal";case T:return"Profiler";case R:return"StrictMode";case j:return"Suspense";case V:return"SuspenseList"}if(typeof C=="object")switch(typeof C.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),C.$$typeof){case P:return(C.displayName||"Context")+".Provider";case I:return(C._context.displayName||"Context")+".Consumer";case M:var Q=C.render;return C=C.displayName,C||(C=Q.displayName||Q.name||"",C=C!==""?"ForwardRef("+C+")":"ForwardRef"),C;case $:return Q=C.displayName||null,Q!==null?Q:e(C.type)||"Memo";case K:Q=C._payload,C=C._init;try{return e(C(Q))}catch{}}return null}function t(C){return""+C}function n(C){try{t(C);var Q=!1}catch{Q=!0}if(Q){Q=console;var J=Q.error,ue=typeof Symbol=="function"&&Symbol.toStringTag&&C[Symbol.toStringTag]||C.constructor.name||"Object";return J.call(Q,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ue),t(C)}}function r(){}function o(){if(X===0){ie=console.log,te=console.info,F=console.warn,Y=console.error,Z=console.group,q=console.groupCollapsed,oe=console.groupEnd;var C={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}X++}function i(){if(X--,X===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},C,{value:ie}),info:k({},C,{value:te}),warn:k({},C,{value:F}),error:k({},C,{value:Y}),group:k({},C,{value:Z}),groupCollapsed:k({},C,{value:q}),groupEnd:k({},C,{value:oe})})}0>X&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function c(C){if(D===void 0)try{throw Error()}catch(J){var Q=J.stack.trim().match(/\n( *(at )?)/);D=Q&&Q[1]||"",he=-1<J.stack.indexOf(`
|
|
18
|
-
at`)?" (<anonymous>)":-1<J.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
-
`+D+C+he}function u(C,Q){if(!C||Se)return"";var J=$e.get(C);if(J!==void 0)return J;Se=!0,J=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var ue=null;ue=L.H,L.H=null,o();try{var Te={DetermineComponentFrameRoot:function(){try{if(Q){var yt=function(){throw Error()};if(Object.defineProperty(yt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(yt,[])}catch(ft){var Mr=ft}Reflect.construct(C,[],yt)}else{try{yt.call()}catch(ft){Mr=ft}C.call(yt.prototype)}}else{try{throw Error()}catch(ft){Mr=ft}(yt=C())&&typeof yt.catch=="function"&&yt.catch(function(){})}}catch(ft){if(ft&&Mr&&typeof ft.stack=="string")return[ft.stack,Mr.stack]}return[null,null]}};Te.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var me=Object.getOwnPropertyDescriptor(Te.DetermineComponentFrameRoot,"name");me&&me.configurable&&Object.defineProperty(Te.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var se=Te.DetermineComponentFrameRoot(),ut=se[0],Qt=se[1];if(ut&&Qt){var Ae=ut.split(`
|
|
20
|
-
`),jt=Qt.split(`
|
|
21
|
-
`);for(se=me=0;me<Ae.length&&!Ae[me].includes("DetermineComponentFrameRoot");)me++;for(;se<jt.length&&!jt[se].includes("DetermineComponentFrameRoot");)se++;if(me===Ae.length||se===jt.length)for(me=Ae.length-1,se=jt.length-1;1<=me&&0<=se&&Ae[me]!==jt[se];)se--;for(;1<=me&&0<=se;me--,se--)if(Ae[me]!==jt[se]){if(me!==1||se!==1)do if(me--,se--,0>se||Ae[me]!==jt[se]){var On=`
|
|
22
|
-
`+Ae[me].replace(" at new "," at ");return C.displayName&&On.includes("<anonymous>")&&(On=On.replace("<anonymous>",C.displayName)),typeof C=="function"&&$e.set(C,On),On}while(1<=me&&0<=se);break}}}finally{Se=!1,L.H=ue,i(),Error.prepareStackTrace=J}return Ae=(Ae=C?C.displayName||C.name:"")?c(Ae):"",typeof C=="function"&&$e.set(C,Ae),Ae}function l(C){if(C==null)return"";if(typeof C=="function"){var Q=C.prototype;return u(C,!(!Q||!Q.isReactComponent))}if(typeof C=="string")return c(C);switch(C){case j:return c("Suspense");case V:return c("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case M:return C=u(C.render,!1),C;case $:return l(C.type);case K:Q=C._payload,C=C._init;try{return l(C(Q))}catch{}}return""}function s(){var C=L.A;return C===null?null:C.getOwner()}function a(C){if(O.call(C,"key")){var Q=Object.getOwnPropertyDescriptor(C,"key").get;if(Q&&Q.isReactWarning)return!1}return C.key!==void 0}function f(C,Q){function J(){vt||(vt=!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)",Q))}J.isReactWarning=!0,Object.defineProperty(C,"key",{get:J,configurable:!0})}function d(){var C=e(this.type);return Or[C]||(Or[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 h(C,Q,J,ue,Te,me){return J=me.ref,C={$$typeof:S,type:C,key:Q,props:me,_owner:Te},(J!==void 0?J:null)!==null?Object.defineProperty(C,"ref",{enumerable:!1,get:d}):Object.defineProperty(C,"ref",{enumerable:!1,value:null}),C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(C,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C}function m(C,Q,J,ue,Te,me){if(typeof C=="string"||typeof C=="function"||C===A||C===T||C===R||C===j||C===V||C===G||typeof C=="object"&&C!==null&&(C.$$typeof===K||C.$$typeof===$||C.$$typeof===P||C.$$typeof===I||C.$$typeof===M||C.$$typeof===ee||C.getModuleId!==void 0)){var se=Q.children;if(se!==void 0)if(ue)if(ne(se)){for(ue=0;ue<se.length;ue++)p(se[ue],C);Object.freeze&&Object.freeze(se)}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 p(se,C)}else se="",(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(se+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),C===null?ue="null":ne(C)?ue="array":C!==void 0&&C.$$typeof===S?(ue="<"+(e(C.type)||"Unknown")+" />",se=" Did you accidentally export a JSX literal instead of a component?"):ue=typeof C,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ue,se);if(O.call(Q,"key")){se=e(C);var ut=Object.keys(Q).filter(function(Ae){return Ae!=="key"});ue=0<ut.length?"{key: someKey, "+ut.join(": ..., ")+": ...}":"{key: someKey}",Nt[se+ue]||(ut=0<ut.length?"{"+ut.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
|
-
let props = %s;
|
|
24
|
-
<%s {...props} />
|
|
25
|
-
React keys must be passed directly to JSX without using spread:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,ue,se,ut,se),Nt[se+ue]=!0)}if(se=null,J!==void 0&&(n(J),se=""+J),a(Q)&&(n(Q.key),se=""+Q.key),"key"in Q){J={};for(var Qt in Q)Qt!=="key"&&(J[Qt]=Q[Qt])}else J=Q;return se&&f(J,typeof C=="function"?C.displayName||C.name||"Unknown":C),h(C,se,me,Te,s(),J)}function p(C,Q){if(typeof C=="object"&&C&&C.$$typeof!==It){if(ne(C))for(var J=0;J<C.length;J++){var ue=C[J];v(ue)&&x(ue,Q)}else if(v(C))C._store&&(C._store.validated=1);else if(C===null||typeof C!="object"?J=null:(J=H&&C[H]||C["@@iterator"],J=typeof J=="function"?J:null),typeof J=="function"&&J!==C.entries&&(J=J.call(C),J!==C))for(;!(C=J.next()).done;)v(C.value)&&x(C.value,Q)}}function v(C){return typeof C=="object"&&C!==null&&C.$$typeof===S}function x(C,Q){if(C._store&&!C._store.validated&&C.key==null&&(C._store.validated=1,Q=b(Q),!Wc[Q])){Wc[Q]=!0;var J="";C&&C._owner!=null&&C._owner!==s()&&(J=null,typeof C._owner.tag=="number"?J=e(C._owner.type):typeof C._owner.name=="string"&&(J=C._owner.name),J=" It was passed a child from "+J+".");var ue=L.getCurrentStack;L.getCurrentStack=function(){var Te=l(C.type);return ue&&(Te+=ue()||""),Te},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',Q,J),L.getCurrentStack=ue}}function b(C){var Q="",J=s();return J&&(J=e(J.type))&&(Q=`
|
|
28
|
-
|
|
29
|
-
Check the render method of \``+J+"`."),Q||(C=e(C))&&(Q=`
|
|
30
|
-
|
|
31
|
-
Check the top-level render call using <`+C+">."),Q}var w=_,S=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),P=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),G=Symbol.for("react.offscreen"),H=Symbol.iterator,U=Symbol.for("react.client.reference"),L=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=Object.prototype.hasOwnProperty,k=Object.assign,ee=Symbol.for("react.client.reference"),ne=Array.isArray,X=0,ie,te,F,Y,Z,q,oe;r.__reactDisabledLog=!0;var D,he,Se=!1,$e=new(typeof WeakMap=="function"?WeakMap:Map),It=Symbol.for("react.client.reference"),vt,Or={},Nt={},Wc={};In.Fragment=A,In.jsx=function(C,Q,J,ue,Te){return m(C,Q,J,!1,ue,Te)},In.jsxs=function(C,Q,J,ue,Te){return m(C,Q,J,!0,ue,Te)}})()),In}var Yc;function Ay(){return Yc||(Yc=1,process.env.NODE_ENV==="production"?Ir.exports=Ty():Ir.exports=Py()),Ir.exports}var g=Ay();const md={sm:"size-8",md:"size-12",lg:"size-16",xl:"size-20"},Oy=({size:e="sm",text:t,className:n,color:r="border-t-blue-500"})=>g.jsx("div",{className:"grid gap-4 place-content-center",children:g.jsxs("div",{className:"flex flex-col items-center",children:[g.jsx("output",{className:N.classNames(md[e],"animate-spin rounded-full border-4",r,n),"aria-busy":"true"}),!!t&&g.jsx("span",{className:"flex justify-center",children:t})]})});function Xc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ii(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Xc(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Xc(e[o],null)}}}}function re(...e){return y.useCallback(ii(...e),e)}function St(e){const t=My(e),n=y.forwardRef((r,o)=>{const{children:i,...c}=r,u=y.Children.toArray(i),l=u.find(Ny);if(l){const s=l.props.children,a=u.map(f=>f===l?y.Children.count(s)>1?y.Children.only(null):y.isValidElement(s)?s.props.children:null:f);return g.jsx(t,{...c,ref:o,children:y.isValidElement(s)?y.cloneElement(s,void 0,a):null})}return g.jsx(t,{...c,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var gd=St("Slot");function My(e){const t=y.forwardRef((n,r)=>{const{children:o,...i}=n;if(y.isValidElement(o)){const c=Dy(o),u=jy(i,o.props);return o.type!==y.Fragment&&(u.ref=r?ii(r,c):c),y.cloneElement(o,u)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vd=Symbol("radix.slottable");function Iy(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=vd,t}function Ny(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vd}function jy(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...u)=>{const l=i(...u);return o(...u),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Dy(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ky=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],z=ky.reduce((e,t)=>{const n=St(`Primitive.${t}`),r=y.forwardRef((o,i)=>{const{asChild:c,...u}=o,l=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function yd(e,t){e&&oi.flushSync(()=>e.dispatchEvent(t))}var xd=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"}),Ly="VisuallyHidden",bd=y.forwardRef((e,t)=>g.jsx(z.span,{...e,ref:t,style:{...xd,...e.style}}));bd.displayName=Ly;var Fy=bd;function Vy(e,t){const n=y.createContext(t),r=i=>{const{children:c,...u}=i,l=y.useMemo(()=>u,Object.values(u));return g.jsx(n.Provider,{value:l,children:c})};r.displayName=e+"Provider";function o(i){const c=y.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Ee(e,t=[]){let n=[];function r(i,c){const u=y.createContext(c),l=n.length;n=[...n,c];const s=f=>{var x;const{scope:d,children:h,...m}=f,p=((x=d==null?void 0:d[e])==null?void 0:x[l])||u,v=y.useMemo(()=>m,Object.values(m));return g.jsx(p.Provider,{value:v,children:h})};s.displayName=i+"Provider";function a(f,d){var p;const h=((p=d==null?void 0:d[e])==null?void 0:p[l])||u,m=y.useContext(h);if(m)return m;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[s,a]}const o=()=>{const i=n.map(c=>y.createContext(c));return function(u){const l=(u==null?void 0:u[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return o.scopeName=e,[r,By(o,...t)]}function By(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const c=r.reduce((u,{useScope:l,scopeName:s})=>{const f=l(i)[`__scope${s}`];return{...u,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function ar(e){const t=e+"CollectionProvider",[n,r]=Ee(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=p=>{const{scope:v,children:x}=p,b=_.useRef(null),w=_.useRef(new Map).current;return g.jsx(o,{scope:v,itemMap:w,collectionRef:b,children:x})};c.displayName=t;const u=e+"CollectionSlot",l=St(u),s=_.forwardRef((p,v)=>{const{scope:x,children:b}=p,w=i(u,x),S=re(v,w.collectionRef);return g.jsx(l,{ref:S,children:b})});s.displayName=u;const a=e+"CollectionItemSlot",f="data-radix-collection-item",d=St(a),h=_.forwardRef((p,v)=>{const{scope:x,children:b,...w}=p,S=_.useRef(null),E=re(v,S),A=i(a,x);return _.useEffect(()=>(A.itemMap.set(S,{ref:S,...w}),()=>void A.itemMap.delete(S))),g.jsx(d,{[f]:"",ref:E,children:b})});h.displayName=a;function m(p){const v=i(e+"CollectionConsumer",p);return _.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((A,R)=>w.indexOf(A.ref.current)-w.indexOf(R.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:c,Slot:s,ItemSlot:h},m,r]}function B(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var we=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},$y=y[" useInsertionEffect ".trim().toString()]||we;function Ne({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,c]=Uy({defaultProp:t,onChange:n}),u=e!==void 0,l=u?e:o;{const a=y.useRef(e!==void 0);y.useEffect(()=>{const f=a.current;f!==u&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${u?"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.`),a.current=u},[u,r])}const s=y.useCallback(a=>{var f;if(u){const d=Gy(a)?a(e):a;d!==e&&((f=c.current)==null||f.call(c,d))}else i(a)},[u,e,i,c]);return[l,s]}function Uy({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),o=y.useRef(n),i=y.useRef(t);return $y(()=>{i.current=t},[t]),y.useEffect(()=>{var c;o.current!==n&&((c=i.current)==null||c.call(i,n),o.current=n)},[n,o]),[n,r,i]}function Gy(e){return typeof e=="function"}function Hy(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var je=e=>{const{present:t,children:n}=e,r=zy(t),o=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),i=re(r.ref,Wy(o));return typeof n=="function"||r.isPresent?y.cloneElement(o,{ref:i}):null};je.displayName="Presence";function zy(e){const[t,n]=y.useState(),r=y.useRef(null),o=y.useRef(e),i=y.useRef("none"),c=e?"mounted":"unmounted",[u,l]=Hy(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const s=Nr(r.current);i.current=u==="mounted"?s:"none"},[u]),we(()=>{const s=r.current,a=o.current;if(a!==e){const d=i.current,h=Nr(s);e?l("MOUNT"):h==="none"||(s==null?void 0:s.display)==="none"?l("UNMOUNT"):l(a&&d!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),we(()=>{if(t){let s;const a=t.ownerDocument.defaultView??window,f=h=>{const p=Nr(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&p&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",s=a.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},d=h=>{h.target===t&&(i.current=Nr(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{a.clearTimeout(s),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(s=>{r.current=s?getComputedStyle(s):null,n(s)},[])}}function Nr(e){return(e==null?void 0:e.animationName)||"none"}function Wy(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qy=y[" useId ".trim().toString()]||(()=>{}),Ky=0;function Re(e){const[t,n]=y.useState(qy());return we(()=>{n(r=>r??String(Ky++))},[e]),t?`radix-${t}`:""}var si="Collapsible",[Yy,wd]=Ee(si),[Xy,ba]=Yy(si),Ed=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:c,...u}=e,[l,s]=Ne({prop:r,defaultProp:o??!1,onChange:c,caller:si});return g.jsx(Xy,{scope:n,disabled:i,contentId:Re(),open:l,onOpenToggle:y.useCallback(()=>s(a=>!a),[s]),children:g.jsx(z.div,{"data-state":Ea(l),"data-disabled":i?"":void 0,...u,ref:t})})});Ed.displayName=si;var Sd="CollapsibleTrigger",Cd=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=ba(Sd,n);return g.jsx(z.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ea(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:B(e.onClick,o.onOpenToggle)})});Cd.displayName=Sd;var wa="CollapsibleContent",_d=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ba(wa,e.__scopeCollapsible);return g.jsx(je,{present:n||o.open,children:({present:i})=>g.jsx(Zy,{...r,ref:t,present:i})})});_d.displayName=wa;var Zy=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,c=ba(wa,n),[u,l]=y.useState(r),s=y.useRef(null),a=re(t,s),f=y.useRef(0),d=f.current,h=y.useRef(0),m=h.current,p=c.open||u,v=y.useRef(p),x=y.useRef(void 0);return y.useEffect(()=>{const b=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(b)},[]),we(()=>{const b=s.current;if(b){x.current=x.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();f.current=w.height,h.current=w.width,v.current||(b.style.transitionDuration=x.current.transitionDuration,b.style.animationName=x.current.animationName),l(r)}},[c.open,r]),g.jsx(z.div,{"data-state":Ea(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!p,...i,ref:a,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:p&&o})});function Ea(e){return e?"open":"closed"}var Qy=Ed,Jy=Cd,e0=_d,t0=y.createContext(void 0);function Kt(e){const t=y.useContext(t0);return e||t||"ltr"}var et="Accordion",n0=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Sa,r0,o0]=ar(et),[ai]=Ee(et,[o0,wd]),Ca=wd(),Rd=_.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return g.jsx(Sa.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?g.jsx(c0,{...i,ref:t}):g.jsx(a0,{...o,ref:t})})});Rd.displayName=et;var[Td,i0]=ai(et),[Pd,s0]=ai(et,{collapsible:!1}),a0=_.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...c}=e,[u,l]=Ne({prop:n,defaultProp:r??"",onChange:o,caller:et});return g.jsx(Td,{scope:e.__scopeAccordion,value:_.useMemo(()=>u?[u]:[],[u]),onItemOpen:l,onItemClose:_.useCallback(()=>i&&l(""),[i,l]),children:g.jsx(Pd,{scope:e.__scopeAccordion,collapsible:i,children:g.jsx(Ad,{...c,ref:t})})})}),c0=_.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[c,u]=Ne({prop:n,defaultProp:r??[],onChange:o,caller:et}),l=_.useCallback(a=>u((f=[])=>[...f,a]),[u]),s=_.useCallback(a=>u((f=[])=>f.filter(d=>d!==a)),[u]);return g.jsx(Td,{scope:e.__scopeAccordion,value:c,onItemOpen:l,onItemClose:s,children:g.jsx(Pd,{scope:e.__scopeAccordion,collapsible:!0,children:g.jsx(Ad,{...i,ref:t})})})}),[l0,ci]=ai(et),Ad=_.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...c}=e,u=_.useRef(null),l=re(u,t),s=r0(n),f=Kt(o)==="ltr",d=B(e.onKeyDown,h=>{var T;if(!n0.includes(h.key))return;const m=h.target,p=s().filter(I=>{var P;return!((P=I.ref.current)!=null&&P.disabled)}),v=p.findIndex(I=>I.ref.current===m),x=p.length;if(v===-1)return;h.preventDefault();let b=v;const w=0,S=x-1,E=()=>{b=v+1,b>S&&(b=w)},A=()=>{b=v-1,b<w&&(b=S)};switch(h.key){case"Home":b=w;break;case"End":b=S;break;case"ArrowRight":i==="horizontal"&&(f?E():A());break;case"ArrowDown":i==="vertical"&&E();break;case"ArrowLeft":i==="horizontal"&&(f?A():E());break;case"ArrowUp":i==="vertical"&&A();break}const R=b%x;(T=p[R].ref.current)==null||T.focus()});return g.jsx(l0,{scope:n,disabled:r,direction:o,orientation:i,children:g.jsx(Sa.Slot,{scope:n,children:g.jsx(z.div,{...c,"data-orientation":i,ref:l,onKeyDown:r?void 0:d})})})}),Vo="AccordionItem",[u0,_a]=ai(Vo),Od=_.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=ci(Vo,n),c=i0(Vo,n),u=Ca(n),l=Re(),s=r&&c.value.includes(r)||!1,a=i.disabled||e.disabled;return g.jsx(u0,{scope:n,open:s,disabled:a,triggerId:l,children:g.jsx(Qy,{"data-orientation":i.orientation,"data-state":kd(s),...u,...o,ref:t,disabled:a,open:s,onOpenChange:f=>{f?c.onItemOpen(r):c.onItemClose(r)}})})});Od.displayName=Vo;var Md="AccordionHeader",Id=_.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ci(et,n),i=_a(Md,n);return g.jsx(z.h3,{"data-orientation":o.orientation,"data-state":kd(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:t})});Id.displayName=Md;var Ps="AccordionTrigger",Nd=_.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ci(et,n),i=_a(Ps,n),c=s0(Ps,n),u=Ca(n);return g.jsx(Sa.ItemSlot,{scope:n,children:g.jsx(Jy,{"aria-disabled":i.open&&!c.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId,...u,...r,ref:t})})});Nd.displayName=Ps;var jd="AccordionContent",Dd=_.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ci(et,n),i=_a(jd,n),c=Ca(n);return g.jsx(e0,{role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation,...c,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Dd.displayName=jd;function kd(e){return e?"open":"closed"}var f0=Rd,d0=Od,h0=Id,p0=Nd,m0=Dd;function Ze(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function g0(e,t=globalThis==null?void 0:globalThis.document){const n=Ze(e);y.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var v0="DismissableLayer",As="dismissableLayer.update",y0="dismissableLayer.pointerDownOutside",x0="dismissableLayer.focusOutside",Zc,Ld=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xn=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:c,onDismiss:u,...l}=e,s=y.useContext(Ld),[a,f]=y.useState(null),d=(a==null?void 0:a.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=y.useState({}),m=re(t,R=>f(R)),p=Array.from(s.layers),[v]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),x=p.indexOf(v),b=a?p.indexOf(a):-1,w=s.layersWithOutsidePointerEventsDisabled.size>0,S=b>=x,E=E0(R=>{const T=R.target,I=[...s.branches].some(P=>P.contains(T));!S||I||(o==null||o(R),c==null||c(R),R.defaultPrevented||u==null||u())},d),A=S0(R=>{const T=R.target;[...s.branches].some(P=>P.contains(T))||(i==null||i(R),c==null||c(R),R.defaultPrevented||u==null||u())},d);return g0(R=>{b===s.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&u&&(R.preventDefault(),u()))},d),y.useEffect(()=>{if(a)return n&&(s.layersWithOutsidePointerEventsDisabled.size===0&&(Zc=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(a)),s.layers.add(a),Qc(),()=>{n&&s.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Zc)}},[a,d,n,s]),y.useEffect(()=>()=>{a&&(s.layers.delete(a),s.layersWithOutsidePointerEventsDisabled.delete(a),Qc())},[a,s]),y.useEffect(()=>{const R=()=>h({});return document.addEventListener(As,R),()=>document.removeEventListener(As,R)},[]),g.jsx(z.div,{...l,ref:m,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:B(e.onFocusCapture,A.onFocusCapture),onBlurCapture:B(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,E.onPointerDownCapture)})});xn.displayName=v0;var b0="DismissableLayerBranch",w0=y.forwardRef((e,t)=>{const n=y.useContext(Ld),r=y.useRef(null),o=re(t,r);return y.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(z.div,{...e,ref:o})});w0.displayName=b0;function E0(e,t=globalThis==null?void 0:globalThis.document){const n=Ze(e),r=y.useRef(!1),o=y.useRef(()=>{});return y.useEffect(()=>{const i=u=>{if(u.target&&!r.current){let l=function(){Fd(y0,n,s,{discrete:!0})};const s={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function S0(e,t=globalThis==null?void 0:globalThis.document){const n=Ze(e),r=y.useRef(!1);return y.useEffect(()=>{const o=i=>{i.target&&!r.current&&Fd(x0,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Qc(){const e=new CustomEvent(As);document.dispatchEvent(e)}function Fd(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?yd(o,i):o.dispatchEvent(i)}var Ui="focusScope.autoFocusOnMount",Gi="focusScope.autoFocusOnUnmount",Jc={bubbles:!1,cancelable:!0},C0="FocusScope",cr=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...c}=e,[u,l]=y.useState(null),s=Ze(o),a=Ze(i),f=y.useRef(null),d=re(t,p=>l(p)),h=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let p=function(w){if(h.paused||!u)return;const S=w.target;u.contains(S)?f.current=S:xt(f.current,{select:!0})},v=function(w){if(h.paused||!u)return;const S=w.relatedTarget;S!==null&&(u.contains(S)||xt(f.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const E of w)E.removedNodes.length>0&&xt(u)};document.addEventListener("focusin",p),document.addEventListener("focusout",v);const b=new MutationObserver(x);return u&&b.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),b.disconnect()}}},[r,u,h.paused]),y.useEffect(()=>{if(u){tl.add(h);const p=document.activeElement;if(!u.contains(p)){const x=new CustomEvent(Ui,Jc);u.addEventListener(Ui,s),u.dispatchEvent(x),x.defaultPrevented||(_0(O0(Vd(u)),{select:!0}),document.activeElement===p&&xt(u))}return()=>{u.removeEventListener(Ui,s),setTimeout(()=>{const x=new CustomEvent(Gi,Jc);u.addEventListener(Gi,a),u.dispatchEvent(x),x.defaultPrevented||xt(p??document.body,{select:!0}),u.removeEventListener(Gi,a),tl.remove(h)},0)}}},[u,s,a,h]);const m=y.useCallback(p=>{if(!n&&!r||h.paused)return;const v=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,x=document.activeElement;if(v&&x){const b=p.currentTarget,[w,S]=R0(b);w&&S?!p.shiftKey&&x===S?(p.preventDefault(),n&&xt(w,{select:!0})):p.shiftKey&&x===w&&(p.preventDefault(),n&&xt(S,{select:!0})):x===b&&p.preventDefault()}},[n,r,h.paused]);return g.jsx(z.div,{tabIndex:-1,...c,ref:d,onKeyDown:m})});cr.displayName=C0;function _0(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(xt(r,{select:t}),document.activeElement!==n)return}function R0(e){const t=Vd(e),n=el(t,e),r=el(t.reverse(),e);return[n,r]}function Vd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function el(e,t){for(const n of e)if(!T0(n,{upTo:t}))return n}function T0(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function P0(e){return e instanceof HTMLInputElement&&"select"in e}function xt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&P0(e)&&t&&e.select()}}var tl=A0();function A0(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=nl(e,t),e.unshift(t)},remove(t){var n;e=nl(e,t),(n=e[0])==null||n.resume()}}}function nl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function O0(e){return e.filter(t=>t.tagName!=="A")}var M0="Portal",lr=y.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[o,i]=y.useState(!1);we(()=>i(!0),[]);const c=n||o&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return c?xa.createPortal(g.jsx(z.div,{...r,ref:t}),c):null});lr.displayName=M0;var Hi=0;function li(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??rl()),document.body.insertAdjacentElement("beforeend",e[1]??rl()),Hi++,()=>{Hi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hi--}},[])}function rl(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var nt=function(){return nt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},nt.apply(this,arguments)};function Bd(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function I0(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Mo="right-scroll-bar-position",Io="width-before-scroll-bar",N0="with-scroll-bars-hidden",j0="--removed-body-scroll-bar-size";function zi(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function D0(e,t){var n=_.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var k0=typeof window<"u"?y.useLayoutEffect:y.useEffect,ol=new WeakMap;function L0(e,t){var n=D0(null,function(r){return e.forEach(function(o){return zi(o,r)})});return k0(function(){var r=ol.get(n);if(r){var o=new Set(r),i=new Set(e),c=n.current;o.forEach(function(u){i.has(u)||zi(u,null)}),i.forEach(function(u){o.has(u)||zi(u,c)})}ol.set(n,e)},[e]),n}function F0(e){return e}function V0(e,t){t===void 0&&(t=F0);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var c=t(i,r);return n.push(c),function(){n=n.filter(function(u){return u!==c})}},assignSyncMedium:function(i){for(r=!0;n.length;){var c=n;n=[],c.forEach(i)}n={push:function(u){return i(u)},filter:function(){return n}}},assignMedium:function(i){r=!0;var c=[];if(n.length){var u=n;n=[],u.forEach(i),c=n}var l=function(){var a=c;c=[],a.forEach(i)},s=function(){return Promise.resolve().then(l)};s(),n={push:function(a){c.push(a),s()},filter:function(a){return c=c.filter(a),n}}}};return o}function B0(e){e===void 0&&(e={});var t=V0(null);return t.options=nt({async:!0,ssr:!1},e),t}var $d=function(e){var t=e.sideCar,n=Bd(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,nt({},n))};$d.isSideCarExport=!0;function $0(e,t){return e.useMedium(t),$d}var Ud=B0(),Wi=function(){},ui=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:Wi,onWheelCapture:Wi,onTouchMoveCapture:Wi}),o=r[0],i=r[1],c=e.forwardProps,u=e.children,l=e.className,s=e.removeScrollBar,a=e.enabled,f=e.shards,d=e.sideCar,h=e.noRelative,m=e.noIsolation,p=e.inert,v=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,w=e.gapMode,S=Bd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=d,A=L0([n,t]),R=nt(nt({},S),o);return y.createElement(y.Fragment,null,a&&y.createElement(E,{sideCar:Ud,removeScrollBar:s,shards:f,noRelative:h,noIsolation:m,inert:p,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:w}),c?y.cloneElement(y.Children.only(u),nt(nt({},R),{ref:A})):y.createElement(b,nt({},R,{className:l,ref:A}),u))});ui.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ui.classNames={fullWidth:Io,zeroRight:Mo};var U0=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function G0(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=U0();return t&&e.setAttribute("nonce",t),e}function H0(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z0(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var W0=function(){var e=0,t=null;return{add:function(n){e==0&&(t=G0())&&(H0(t,n),z0(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},q0=function(){var e=W0();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Gd=function(){var e=q0(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},K0={left:0,top:0,right:0,gap:0},qi=function(e){return parseInt(e||"",10)||0},Y0=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[qi(n),qi(r),qi(o)]},X0=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return K0;var t=Y0(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Z0=Gd(),dn="data-scroll-locked",Q0=function(e,t,n,r){var o=e.left,i=e.top,c=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
32
|
-
.`.concat(N0,` {
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-BP9HuXkV.cjs"),O=require("./index-B2DyV2Jl.cjs"),S=require("react"),ne=require("./skeleton-avatar-Ce_osCsT.cjs"),Nf=require("react-dom"),kf=require("./use-controlled-state-H7oMYjxi.cjs");function Lf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const v=Lf(S),qs=Lf(Nf);function Ff(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const Vf={sm:"size-8",md:"size-12",lg:"size-16",xl:"size-20"},Xx=({size:e="sm",text:t,className:n,color:r="border-t-blue-500"})=>h.jsxRuntimeExports.jsx("div",{className:"grid gap-4 place-content-center",children:h.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center",children:[h.jsxRuntimeExports.jsx("output",{className:O.classNames(Vf[e],"animate-spin rounded-full border-4",r,n),"aria-busy":"true"}),!!t&&h.jsxRuntimeExports.jsx("span",{className:"flex justify-center",children:t})]})});var Bf=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"}),Yx="VisuallyHidden",$f=v.forwardRef((e,t)=>h.jsxRuntimeExports.jsx(h.Primitive.span,{...e,ref:t,style:{...Bf,...e.style}}));$f.displayName=Yx;var Zx=$f;function Qx(e,t){const n=v.createContext(t),r=s=>{const{children:c,...l}=s,u=v.useMemo(()=>l,Object.values(l));return h.jsxRuntimeExports.jsx(n.Provider,{value:u,children:c})};r.displayName=e+"Provider";function o(s){const c=v.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function he(e,t=[]){let n=[];function r(s,c){const l=v.createContext(c),u=n.length;n=[...n,c];const i=f=>{var y;const{scope:d,children:p,...g}=f,m=((y=d==null?void 0:d[e])==null?void 0:y[u])||l,x=v.useMemo(()=>g,Object.values(g));return h.jsxRuntimeExports.jsx(m.Provider,{value:x,children:p})};i.displayName=s+"Provider";function a(f,d){var m;const p=((m=d==null?void 0:d[e])==null?void 0:m[u])||l,g=v.useContext(p);if(g)return g;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[i,a]}const o=()=>{const s=n.map(c=>v.createContext(c));return function(l){const u=(l==null?void 0:l[e])||s;return v.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,Jx(o,...t)]}function Jx(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const c=r.reduce((l,{useScope:u,scopeName:i})=>{const f=u(s)[`__scope${i}`];return{...l,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function Bn(e){const t=e+"CollectionProvider",[n,r]=he(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=m=>{const{scope:x,children:y}=m,E=S.useRef(null),b=S.useRef(new Map).current;return h.jsxRuntimeExports.jsx(o,{scope:x,itemMap:b,collectionRef:E,children:y})};c.displayName=t;const l=e+"CollectionSlot",u=h.createSlot(l),i=S.forwardRef((m,x)=>{const{scope:y,children:E}=m,b=s(l,y),R=h.useComposedRefs(x,b.collectionRef);return h.jsxRuntimeExports.jsx(u,{ref:R,children:E})});i.displayName=l;const a=e+"CollectionItemSlot",f="data-radix-collection-item",d=h.createSlot(a),p=S.forwardRef((m,x)=>{const{scope:y,children:E,...b}=m,R=S.useRef(null),w=h.useComposedRefs(x,R),P=s(a,y);return S.useEffect(()=>(P.itemMap.set(R,{ref:R,...b}),()=>void P.itemMap.delete(R))),h.jsxRuntimeExports.jsx(d,{[f]:"",ref:w,children:E})});p.displayName=a;function g(m){const x=s(e+"CollectionConsumer",m);return S.useCallback(()=>{const E=x.collectionRef.current;if(!E)return[];const b=Array.from(E.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((P,C)=>b.indexOf(P.ref.current)-b.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:c,Slot:i,ItemSlot:p},g,r]}function N(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var ev=v[" useInsertionEffect ".trim().toString()]||h.useLayoutEffect2;function we({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,c]=tv({defaultProp:t,onChange:n}),l=e!==void 0,u=l?e:o;{const a=v.useRef(e!==void 0);v.useEffect(()=>{const f=a.current;f!==l&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),a.current=l},[l,r])}const i=v.useCallback(a=>{var f;if(l){const d=nv(a)?a(e):a;d!==e&&((f=c.current)==null||f.call(c,d))}else s(a)},[l,e,s,c]);return[u,i]}function tv({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),o=v.useRef(n),s=v.useRef(t);return ev(()=>{s.current=t},[t]),v.useEffect(()=>{var c;o.current!==n&&((c=s.current)==null||c.call(s,n),o.current=n)},[n,o]),[n,r,s]}function nv(e){return typeof e=="function"}function rv(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Re=e=>{const{present:t,children:n}=e,r=ov(t),o=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),s=h.useComposedRefs(r.ref,iv(o));return typeof n=="function"||r.isPresent?v.cloneElement(o,{ref:s}):null};Re.displayName="Presence";function ov(e){const[t,n]=v.useState(),r=v.useRef(null),o=v.useRef(e),s=v.useRef("none"),c=e?"mounted":"unmounted",[l,u]=rv(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const i=ur(r.current);s.current=l==="mounted"?i:"none"},[l]),h.useLayoutEffect2(()=>{const i=r.current,a=o.current;if(a!==e){const d=s.current,p=ur(i);e?u("MOUNT"):p==="none"||(i==null?void 0:i.display)==="none"?u("UNMOUNT"):u(a&&d!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),h.useLayoutEffect2(()=>{if(t){let i;const a=t.ownerDocument.defaultView??window,f=p=>{const m=ur(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(u("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",i=a.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},d=p=>{p.target===t&&(s.current=ur(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{a.clearTimeout(i),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:v.useCallback(i=>{r.current=i?getComputedStyle(i):null,n(i)},[])}}function ur(e){return(e==null?void 0:e.animationName)||"none"}function iv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sv=v[" useId ".trim().toString()]||(()=>{}),av=0;function ge(e){const[t,n]=v.useState(sv());return h.useLayoutEffect2(()=>{n(r=>r??String(av++))},[e]),t?`radix-${t}`:""}var Do="Collapsible",[cv,Uf]=he(Do),[uv,Ks]=cv(Do),Gf=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:c,...l}=e,[u,i]=we({prop:r,defaultProp:o??!1,onChange:c,caller:Do});return h.jsxRuntimeExports.jsx(uv,{scope:n,disabled:s,contentId:ge(),open:u,onOpenToggle:v.useCallback(()=>i(a=>!a),[i]),children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":Ys(u),"data-disabled":s?"":void 0,...l,ref:t})})});Gf.displayName=Do;var Hf="CollapsibleTrigger",zf=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Ks(Hf,n);return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ys(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:N(e.onClick,o.onOpenToggle)})});zf.displayName=Hf;var Xs="CollapsibleContent",Wf=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ks(Xs,e.__scopeCollapsible);return h.jsxRuntimeExports.jsx(Re,{present:n||o.open,children:({present:s})=>h.jsxRuntimeExports.jsx(lv,{...r,ref:t,present:s})})});Wf.displayName=Xs;var lv=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,c=Ks(Xs,n),[l,u]=v.useState(r),i=v.useRef(null),a=h.useComposedRefs(t,i),f=v.useRef(0),d=f.current,p=v.useRef(0),g=p.current,m=c.open||l,x=v.useRef(m),y=v.useRef(void 0);return v.useEffect(()=>{const E=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(E)},[]),h.useLayoutEffect2(()=>{const E=i.current;if(E){y.current=y.current||{transitionDuration:E.style.transitionDuration,animationName:E.style.animationName},E.style.transitionDuration="0s",E.style.animationName="none";const b=E.getBoundingClientRect();f.current=b.height,p.current=b.width,x.current||(E.style.transitionDuration=y.current.transitionDuration,E.style.animationName=y.current.animationName),u(r)}},[c.open,r]),h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":Ys(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!m,...s,ref:a,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:m&&o})});function Ys(e){return e?"open":"closed"}var fv=Gf,dv=zf,hv=Wf,pv=v.createContext(void 0);function Tt(e){const t=v.useContext(pv);return e||t||"ltr"}var Ue="Accordion",mv=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Zs,gv,xv]=Bn(Ue),[No]=he(Ue,[xv,Uf]),Qs=Uf(),qf=S.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,s=r;return h.jsxRuntimeExports.jsx(Zs.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?h.jsxRuntimeExports.jsx(bv,{...s,ref:t}):h.jsxRuntimeExports.jsx(Ev,{...o,ref:t})})});qf.displayName=Ue;var[Kf,vv]=No(Ue),[Xf,yv]=No(Ue,{collapsible:!1}),Ev=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:s=!1,...c}=e,[l,u]=we({prop:n,defaultProp:r??"",onChange:o,caller:Ue});return h.jsxRuntimeExports.jsx(Kf,{scope:e.__scopeAccordion,value:S.useMemo(()=>l?[l]:[],[l]),onItemOpen:u,onItemClose:S.useCallback(()=>s&&u(""),[s,u]),children:h.jsxRuntimeExports.jsx(Xf,{scope:e.__scopeAccordion,collapsible:s,children:h.jsxRuntimeExports.jsx(Yf,{...c,ref:t})})})}),bv=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[c,l]=we({prop:n,defaultProp:r??[],onChange:o,caller:Ue}),u=S.useCallback(a=>l((f=[])=>[...f,a]),[l]),i=S.useCallback(a=>l((f=[])=>f.filter(d=>d!==a)),[l]);return h.jsxRuntimeExports.jsx(Kf,{scope:e.__scopeAccordion,value:c,onItemOpen:u,onItemClose:i,children:h.jsxRuntimeExports.jsx(Xf,{scope:e.__scopeAccordion,collapsible:!0,children:h.jsxRuntimeExports.jsx(Yf,{...s,ref:t})})})}),[wv,ko]=No(Ue),Yf=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:s="vertical",...c}=e,l=S.useRef(null),u=h.useComposedRefs(l,t),i=gv(n),f=Tt(o)==="ltr",d=N(e.onKeyDown,p=>{var _;if(!mv.includes(p.key))return;const g=p.target,m=i().filter(M=>{var j;return!((j=M.ref.current)!=null&&j.disabled)}),x=m.findIndex(M=>M.ref.current===g),y=m.length;if(x===-1)return;p.preventDefault();let E=x;const b=0,R=y-1,w=()=>{E=x+1,E>R&&(E=b)},P=()=>{E=x-1,E<b&&(E=R)};switch(p.key){case"Home":E=b;break;case"End":E=R;break;case"ArrowRight":s==="horizontal"&&(f?w():P());break;case"ArrowDown":s==="vertical"&&w();break;case"ArrowLeft":s==="horizontal"&&(f?P():w());break;case"ArrowUp":s==="vertical"&&P();break}const C=E%y;(_=m[C].ref.current)==null||_.focus()});return h.jsxRuntimeExports.jsx(wv,{scope:n,disabled:r,direction:o,orientation:s,children:h.jsxRuntimeExports.jsx(Zs.Slot,{scope:n,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{...c,"data-orientation":s,ref:u,onKeyDown:r?void 0:d})})})}),mo="AccordionItem",[Rv,Js]=No(mo),Zf=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,s=ko(mo,n),c=vv(mo,n),l=Qs(n),u=ge(),i=r&&c.value.includes(r)||!1,a=s.disabled||e.disabled;return h.jsxRuntimeExports.jsx(Rv,{scope:n,open:i,disabled:a,triggerId:u,children:h.jsxRuntimeExports.jsx(fv,{"data-orientation":s.orientation,"data-state":rd(i),...l,...o,ref:t,disabled:a,open:i,onOpenChange:f=>{f?c.onItemOpen(r):c.onItemClose(r)}})})});Zf.displayName=mo;var Qf="AccordionHeader",Jf=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ko(Ue,n),s=Js(Qf,n);return h.jsxRuntimeExports.jsx(h.Primitive.h3,{"data-orientation":o.orientation,"data-state":rd(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:t})});Jf.displayName=Qf;var ns="AccordionTrigger",ed=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ko(Ue,n),s=Js(ns,n),c=yv(ns,n),l=Qs(n);return h.jsxRuntimeExports.jsx(Zs.ItemSlot,{scope:n,children:h.jsxRuntimeExports.jsx(dv,{"aria-disabled":s.open&&!c.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...l,...r,ref:t})})});ed.displayName=ns;var td="AccordionContent",nd=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ko(Ue,n),s=Js(td,n),c=Qs(n);return h.jsxRuntimeExports.jsx(hv,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...c,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});nd.displayName=td;function rd(e){return e?"open":"closed"}var Sv=qf,Cv=Zf,_v=Jf,jv=ed,Pv=nd;function Ve(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Tv(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e);v.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Av="DismissableLayer",rs="dismissableLayer.update",Ov="dismissableLayer.pointerDownOutside",Mv="dismissableLayer.focusOutside",Ec,od=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qt=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:l,...u}=e,i=v.useContext(od),[a,f]=v.useState(null),d=(a==null?void 0:a.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),g=h.useComposedRefs(t,C=>f(C)),m=Array.from(i.layers),[x]=[...i.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(x),E=a?m.indexOf(a):-1,b=i.layersWithOutsidePointerEventsDisabled.size>0,R=E>=y,w=Nv(C=>{const _=C.target,M=[...i.branches].some(j=>j.contains(_));!R||M||(o==null||o(C),c==null||c(C),C.defaultPrevented||l==null||l())},d),P=kv(C=>{const _=C.target;[...i.branches].some(j=>j.contains(_))||(s==null||s(C),c==null||c(C),C.defaultPrevented||l==null||l())},d);return Tv(C=>{E===i.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},d),v.useEffect(()=>{if(a)return n&&(i.layersWithOutsidePointerEventsDisabled.size===0&&(Ec=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),i.layersWithOutsidePointerEventsDisabled.add(a)),i.layers.add(a),bc(),()=>{n&&i.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Ec)}},[a,d,n,i]),v.useEffect(()=>()=>{a&&(i.layers.delete(a),i.layersWithOutsidePointerEventsDisabled.delete(a),bc())},[a,i]),v.useEffect(()=>{const C=()=>p({});return document.addEventListener(rs,C),()=>document.removeEventListener(rs,C)},[]),h.jsxRuntimeExports.jsx(h.Primitive.div,{...u,ref:g,style:{pointerEvents:b?R?"auto":"none":void 0,...e.style},onFocusCapture:N(e.onFocusCapture,P.onFocusCapture),onBlurCapture:N(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:N(e.onPointerDownCapture,w.onPointerDownCapture)})});Qt.displayName=Av;var Iv="DismissableLayerBranch",Dv=v.forwardRef((e,t)=>{const n=v.useContext(od),r=v.useRef(null),o=h.useComposedRefs(t,r);return v.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsxRuntimeExports.jsx(h.Primitive.div,{...e,ref:o})});Dv.displayName=Iv;function Nv(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e),r=v.useRef(!1),o=v.useRef(()=>{});return v.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let u=function(){id(Ov,n,i,{discrete:!0})};const i={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function kv(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e),r=v.useRef(!1);return v.useEffect(()=>{const o=s=>{s.target&&!r.current&&id(Mv,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bc(){const e=new CustomEvent(rs);document.dispatchEvent(e)}function id(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?h.dispatchDiscreteCustomEvent(o,s):o.dispatchEvent(s)}var gi="focusScope.autoFocusOnMount",xi="focusScope.autoFocusOnUnmount",wc={bubbles:!1,cancelable:!0},Lv="FocusScope",$n=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[l,u]=v.useState(null),i=Ve(o),a=Ve(s),f=v.useRef(null),d=h.useComposedRefs(t,m=>u(m)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let m=function(b){if(p.paused||!l)return;const R=b.target;l.contains(R)?f.current=R:ot(f.current,{select:!0})},x=function(b){if(p.paused||!l)return;const R=b.relatedTarget;R!==null&&(l.contains(R)||ot(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const w of b)w.removedNodes.length>0&&ot(l)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const E=new MutationObserver(y);return l&&E.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),E.disconnect()}}},[r,l,p.paused]),v.useEffect(()=>{if(l){Sc.add(p);const m=document.activeElement;if(!l.contains(m)){const y=new CustomEvent(gi,wc);l.addEventListener(gi,i),l.dispatchEvent(y),y.defaultPrevented||(Fv(Gv(sd(l)),{select:!0}),document.activeElement===m&&ot(l))}return()=>{l.removeEventListener(gi,i),setTimeout(()=>{const y=new CustomEvent(xi,wc);l.addEventListener(xi,a),l.dispatchEvent(y),y.defaultPrevented||ot(m??document.body,{select:!0}),l.removeEventListener(xi,a),Sc.remove(p)},0)}}},[l,i,a,p]);const g=v.useCallback(m=>{if(!n&&!r||p.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(x&&y){const E=m.currentTarget,[b,R]=Vv(E);b&&R?!m.shiftKey&&y===R?(m.preventDefault(),n&&ot(b,{select:!0})):m.shiftKey&&y===b&&(m.preventDefault(),n&&ot(R,{select:!0})):y===E&&m.preventDefault()}},[n,r,p.paused]);return h.jsxRuntimeExports.jsx(h.Primitive.div,{tabIndex:-1,...c,ref:d,onKeyDown:g})});$n.displayName=Lv;function Fv(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ot(r,{select:t}),document.activeElement!==n)return}function Vv(e){const t=sd(e),n=Rc(t,e),r=Rc(t.reverse(),e);return[n,r]}function sd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Rc(e,t){for(const n of e)if(!Bv(n,{upTo:t}))return n}function Bv(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $v(e){return e instanceof HTMLInputElement&&"select"in e}function ot(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$v(e)&&t&&e.select()}}var Sc=Uv();function Uv(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Cc(e,t),e.unshift(t)},remove(t){var n;e=Cc(e,t),(n=e[0])==null||n.resume()}}}function Cc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Gv(e){return e.filter(t=>t.tagName!=="A")}var vi=0;function Lo(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_c()),document.body.insertAdjacentElement("beforeend",e[1]??_c()),vi++,()=>{vi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),vi--}},[])}function _c(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var He=function(){return He=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},He.apply(this,arguments)};function ad(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Hv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var so="right-scroll-bar-position",ao="width-before-scroll-bar",zv="with-scroll-bars-hidden",Wv="--removed-body-scroll-bar-size";function yi(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function qv(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Kv=typeof window<"u"?v.useLayoutEffect:v.useEffect,jc=new WeakMap;function Xv(e,t){var n=qv(null,function(r){return e.forEach(function(o){return yi(o,r)})});return Kv(function(){var r=jc.get(n);if(r){var o=new Set(r),s=new Set(e),c=n.current;o.forEach(function(l){s.has(l)||yi(l,null)}),s.forEach(function(l){o.has(l)||yi(l,c)})}jc.set(n,e)},[e]),n}function Yv(e){return e}function Zv(e,t){t===void 0&&(t=Yv);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var c=t(s,r);return n.push(c),function(){n=n.filter(function(l){return l!==c})}},assignSyncMedium:function(s){for(r=!0;n.length;){var c=n;n=[],c.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var c=[];if(n.length){var l=n;n=[],l.forEach(s),c=n}var u=function(){var a=c;c=[],a.forEach(s)},i=function(){return Promise.resolve().then(u)};i(),n={push:function(a){c.push(a),i()},filter:function(a){return c=c.filter(a),n}}}};return o}function Qv(e){e===void 0&&(e={});var t=Zv(null);return t.options=He({async:!0,ssr:!1},e),t}var cd=function(e){var t=e.sideCar,n=ad(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,He({},n))};cd.isSideCarExport=!0;function Jv(e,t){return e.useMedium(t),cd}var ud=Qv(),Ei=function(){},Fo=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Ei,onWheelCapture:Ei,onTouchMoveCapture:Ei}),o=r[0],s=r[1],c=e.forwardProps,l=e.children,u=e.className,i=e.removeScrollBar,a=e.enabled,f=e.shards,d=e.sideCar,p=e.noRelative,g=e.noIsolation,m=e.inert,x=e.allowPinchZoom,y=e.as,E=y===void 0?"div":y,b=e.gapMode,R=ad(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,P=Xv([n,t]),C=He(He({},R),o);return v.createElement(v.Fragment,null,a&&v.createElement(w,{sideCar:ud,removeScrollBar:i,shards:f,noRelative:p,noIsolation:g,inert:m,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:b}),c?v.cloneElement(v.Children.only(l),He(He({},C),{ref:P})):v.createElement(E,He({},C,{className:u,ref:P}),l))});Fo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Fo.classNames={fullWidth:ao,zeroRight:so};var e0=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function t0(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=e0();return t&&e.setAttribute("nonce",t),e}function n0(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function r0(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var o0=function(){var e=0,t=null;return{add:function(n){e==0&&(t=t0())&&(n0(t,n),r0(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},i0=function(){var e=o0();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ld=function(){var e=i0(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},s0={left:0,top:0,right:0,gap:0},bi=function(e){return parseInt(e||"",10)||0},a0=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[bi(n),bi(r),bi(o)]},c0=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return s0;var t=a0(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},u0=ld(),zt="data-scroll-locked",l0=function(e,t,n,r){var o=e.left,s=e.top,c=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(zv,` {
|
|
33
3
|
overflow: hidden `).concat(r,`;
|
|
34
|
-
padding-right: `).concat(
|
|
4
|
+
padding-right: `).concat(l,"px ").concat(r,`;
|
|
35
5
|
}
|
|
36
|
-
body[`).concat(
|
|
6
|
+
body[`).concat(zt,`] {
|
|
37
7
|
overflow: hidden `).concat(r,`;
|
|
38
8
|
overscroll-behavior: contain;
|
|
39
9
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
40
10
|
padding-left: `.concat(o,`px;
|
|
41
|
-
padding-top: `).concat(
|
|
11
|
+
padding-top: `).concat(s,`px;
|
|
42
12
|
padding-right: `).concat(c,`px;
|
|
43
13
|
margin-left:0;
|
|
44
14
|
margin-top:0;
|
|
45
|
-
margin-right: `).concat(
|
|
46
|
-
`),n==="padding"&&"padding-right: ".concat(
|
|
15
|
+
margin-right: `).concat(l,"px ").concat(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
47
17
|
}
|
|
48
18
|
|
|
49
|
-
.`).concat(
|
|
50
|
-
right: `).concat(
|
|
19
|
+
.`).concat(so,` {
|
|
20
|
+
right: `).concat(l,"px ").concat(r,`;
|
|
51
21
|
}
|
|
52
22
|
|
|
53
|
-
.`).concat(
|
|
54
|
-
margin-right: `).concat(
|
|
23
|
+
.`).concat(ao,` {
|
|
24
|
+
margin-right: `).concat(l,"px ").concat(r,`;
|
|
55
25
|
}
|
|
56
26
|
|
|
57
|
-
.`).concat(
|
|
27
|
+
.`).concat(so," .").concat(so,` {
|
|
58
28
|
right: 0 `).concat(r,`;
|
|
59
29
|
}
|
|
60
30
|
|
|
61
|
-
.`).concat(
|
|
31
|
+
.`).concat(ao," .").concat(ao,` {
|
|
62
32
|
margin-right: 0 `).concat(r,`;
|
|
63
33
|
}
|
|
64
34
|
|
|
65
|
-
body[`).concat(
|
|
66
|
-
`).concat(
|
|
35
|
+
body[`).concat(zt,`] {
|
|
36
|
+
`).concat(Wv,": ").concat(l,`px;
|
|
67
37
|
}
|
|
68
|
-
`)},
|
|
38
|
+
`)},Pc=function(){var e=parseInt(document.body.getAttribute(zt)||"0",10);return isFinite(e)?e:0},f0=function(){v.useEffect(function(){return document.body.setAttribute(zt,(Pc()+1).toString()),function(){var e=Pc()-1;e<=0?document.body.removeAttribute(zt):document.body.setAttribute(zt,e.toString())}},[])},d0=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;f0();var s=v.useMemo(function(){return c0(o)},[o]);return v.createElement(u0,{styles:l0(s,!t,o,n?"":"!important")})},os=!1;if(typeof window<"u")try{var lr=Object.defineProperty({},"passive",{get:function(){return os=!0,!0}});window.addEventListener("test",lr,lr),window.removeEventListener("test",lr,lr)}catch{os=!1}var It=os?{passive:!1}:!1,h0=function(e){return e.tagName==="TEXTAREA"},fd=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!h0(e)&&n[t]==="visible")},p0=function(e){return fd(e,"overflowY")},m0=function(e){return fd(e,"overflowX")},Tc=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=dd(e,r);if(o){var s=hd(e,r),c=s[1],l=s[2];if(c>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},g0=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},x0=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},dd=function(e,t){return e==="v"?p0(t):m0(t)},hd=function(e,t){return e==="v"?g0(t):x0(t)},v0=function(e,t){return e==="h"&&t==="rtl"?-1:1},y0=function(e,t,n,r,o){var s=v0(e,window.getComputedStyle(t).direction),c=s*r,l=n.target,u=t.contains(l),i=!1,a=c>0,f=0,d=0;do{if(!l)break;var p=hd(e,l),g=p[0],m=p[1],x=p[2],y=m-x-s*g;(g||y)&&dd(e,l)&&(f+=y,d+=g);var E=l.parentNode;l=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(a&&Math.abs(f)<1||!a&&Math.abs(d)<1)&&(i=!0),i},fr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ac=function(e){return[e.deltaX,e.deltaY]},Oc=function(e){return e&&"current"in e?e.current:e},E0=function(e,t){return e[0]===t[0]&&e[1]===t[1]},b0=function(e){return`
|
|
69
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
70
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
71
|
-
`)},
|
|
41
|
+
`)},w0=0,Dt=[];function R0(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),o=v.useState(w0++)[0],s=v.useState(ld)[0],c=v.useRef(e);v.useEffect(function(){c.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Hv([e.lockRef.current],(e.shards||[]).map(Oc),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=v.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!c.current.allowPinchZoom;var y=fr(m),E=n.current,b="deltaX"in m?m.deltaX:E[0]-y[0],R="deltaY"in m?m.deltaY:E[1]-y[1],w,P=m.target,C=Math.abs(b)>Math.abs(R)?"h":"v";if("touches"in m&&C==="h"&&P.type==="range")return!1;var _=window.getSelection(),M=_&&_.anchorNode,j=M?M===P||M.contains(P):!1;if(j)return!1;var A=Tc(C,P);if(!A)return!0;if(A?w=C:(w=C==="v"?"h":"v",A=Tc(C,P)),!A)return!1;if(!r.current&&"changedTouches"in m&&(b||R)&&(r.current=w),!w)return!0;var I=r.current||w;return y0(I,x,m,I==="h"?b:R)},[]),u=v.useCallback(function(m){var x=m;if(!(!Dt.length||Dt[Dt.length-1]!==s)){var y="deltaY"in x?Ac(x):fr(x),E=t.current.filter(function(w){return w.name===x.type&&(w.target===x.target||x.target===w.shadowParent)&&E0(w.delta,y)})[0];if(E&&E.should){x.cancelable&&x.preventDefault();return}if(!E){var b=(c.current.shards||[]).map(Oc).filter(Boolean).filter(function(w){return w.contains(x.target)}),R=b.length>0?l(x,b[0]):!c.current.noIsolation;R&&x.cancelable&&x.preventDefault()}}},[]),i=v.useCallback(function(m,x,y,E){var b={name:m,delta:x,target:y,should:E,shadowParent:S0(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(R){return R!==b})},1)},[]),a=v.useCallback(function(m){n.current=fr(m),r.current=void 0},[]),f=v.useCallback(function(m){i(m.type,Ac(m),m.target,l(m,e.lockRef.current))},[]),d=v.useCallback(function(m){i(m.type,fr(m),m.target,l(m,e.lockRef.current))},[]);v.useEffect(function(){return Dt.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",u,It),document.addEventListener("touchmove",u,It),document.addEventListener("touchstart",a,It),function(){Dt=Dt.filter(function(m){return m!==s}),document.removeEventListener("wheel",u,It),document.removeEventListener("touchmove",u,It),document.removeEventListener("touchstart",a,It)}},[]);var p=e.removeScrollBar,g=e.inert;return v.createElement(v.Fragment,null,g?v.createElement(s,{styles:b0(o)}):null,p?v.createElement(d0,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function S0(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const C0=Jv(ud,R0);var Un=v.forwardRef(function(e,t){return v.createElement(Fo,He({},e,{ref:t,sideCar:C0}))});Un.classNames=Fo.classNames;var _0=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Nt=new WeakMap,dr=new WeakMap,hr={},wi=0,pd=function(e){return e&&(e.host||pd(e.parentNode))},j0=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=pd(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},P0=function(e,t,n,r){var o=j0(t,Array.isArray(e)?e:[e]);hr[n]||(hr[n]=new WeakMap);var s=hr[n],c=[],l=new Set,u=new Set(o),i=function(f){!f||l.has(f)||(l.add(f),i(f.parentNode))};o.forEach(i);var a=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(d){if(l.has(d))a(d);else try{var p=d.getAttribute(r),g=p!==null&&p!=="false",m=(Nt.get(d)||0)+1,x=(s.get(d)||0)+1;Nt.set(d,m),s.set(d,x),c.push(d),m===1&&g&&dr.set(d,!0),x===1&&d.setAttribute(n,"true"),g||d.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",d,y)}})};return a(t),l.clear(),wi++,function(){c.forEach(function(f){var d=Nt.get(f)-1,p=s.get(f)-1;Nt.set(f,d),s.set(f,p),d||(dr.has(f)||f.removeAttribute(r),dr.delete(f)),p||f.removeAttribute(n)}),wi--,wi||(Nt=new WeakMap,Nt=new WeakMap,dr=new WeakMap,hr={})}},Vo=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=_0(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),P0(r,o,n,"aria-hidden")):function(){return null}},Bo="Dialog",[md]=he(Bo),[T0,Ge]=md(Bo),gd=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,l=v.useRef(null),u=v.useRef(null),[i,a]=we({prop:r,defaultProp:o??!1,onChange:s,caller:Bo});return h.jsxRuntimeExports.jsx(T0,{scope:t,triggerRef:l,contentRef:u,contentId:ge(),titleId:ge(),descriptionId:ge(),open:i,onOpenChange:a,onOpenToggle:v.useCallback(()=>a(f=>!f),[a]),modal:c,children:n})};gd.displayName=Bo;var xd="DialogTrigger",A0=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(xd,n),s=h.useComposedRefs(t,o.triggerRef);return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":na(o.open),...r,ref:s,onClick:N(e.onClick,o.onOpenToggle)})});A0.displayName=xd;var ea="DialogPortal",[O0,vd]=md(ea,{forceMount:void 0}),yd=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Ge(ea,t);return h.jsxRuntimeExports.jsx(O0,{scope:t,forceMount:n,children:v.Children.map(r,c=>h.jsxRuntimeExports.jsx(Re,{present:n||s.open,children:h.jsxRuntimeExports.jsx(h.Portal,{asChild:!0,container:o,children:c})}))})};yd.displayName=ea;var go="DialogOverlay",Ed=v.forwardRef((e,t)=>{const n=vd(go,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Ge(go,e.__scopeDialog);return s.modal?h.jsxRuntimeExports.jsx(Re,{present:r||s.open,children:h.jsxRuntimeExports.jsx(I0,{...o,ref:t})}):null});Ed.displayName=go;var M0=h.createSlot("DialogOverlay.RemoveScroll"),I0=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(go,n);return h.jsxRuntimeExports.jsx(Un,{as:M0,allowPinchZoom:!0,shards:[o.contentRef],children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":na(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Rt="DialogContent",bd=v.forwardRef((e,t)=>{const n=vd(Rt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Ge(Rt,e.__scopeDialog);return h.jsxRuntimeExports.jsx(Re,{present:r||s.open,children:s.modal?h.jsxRuntimeExports.jsx(D0,{...o,ref:t}):h.jsxRuntimeExports.jsx(N0,{...o,ref:t})})});bd.displayName=Rt;var D0=v.forwardRef((e,t)=>{const n=Ge(Rt,e.__scopeDialog),r=v.useRef(null),o=h.useComposedRefs(t,n.contentRef,r);return v.useEffect(()=>{const s=r.current;if(s)return Vo(s)},[]),h.jsxRuntimeExports.jsx(wd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:N(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:N(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0;(c.button===2||l)&&s.preventDefault()}),onFocusOutside:N(e.onFocusOutside,s=>s.preventDefault())})}),N0=v.forwardRef((e,t)=>{const n=Ge(Rt,e.__scopeDialog),r=v.useRef(!1),o=v.useRef(!1);return h.jsxRuntimeExports.jsx(wd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,l;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var u,i;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((i=n.triggerRef.current)==null?void 0:i.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),wd=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...c}=e,l=Ge(Rt,n),u=v.useRef(null),i=h.useComposedRefs(t,u);return Lo(),h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx($n,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:h.jsxRuntimeExports.jsx(Qt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":na(l.open),...c,ref:i,onDismiss:()=>l.onOpenChange(!1)})}),h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx(L0,{titleId:l.titleId}),h.jsxRuntimeExports.jsx(V0,{contentRef:u,descriptionId:l.descriptionId})]})]})}),ta="DialogTitle",Rd=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(ta,n);return h.jsxRuntimeExports.jsx(h.Primitive.h2,{id:o.titleId,...r,ref:t})});Rd.displayName=ta;var Sd="DialogDescription",Cd=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(Sd,n);return h.jsxRuntimeExports.jsx(h.Primitive.p,{id:o.descriptionId,...r,ref:t})});Cd.displayName=Sd;var _d="DialogClose",k0=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(_d,n);return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",...r,ref:t,onClick:N(e.onClick,()=>o.onOpenChange(!1))})});k0.displayName=_d;function na(e){return e?"open":"closed"}var jd="DialogTitleWarning",[MM,Pd]=Qx(jd,{contentName:Rt,titleName:ta,docsSlug:"dialog"}),L0=({titleId:e})=>{const t=Pd(jd),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
72
42
|
|
|
73
43
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
74
44
|
|
|
75
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},F0="DialogDescriptionWarning",V0=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Pd(F0).contentName}}.`;return v.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},B0=gd,$0=yd,U0=Ed,G0=bd,H0=Rd,z0=Cd,pr={exports:{}},Ri={};/**
|
|
76
46
|
* @license React
|
|
77
47
|
* use-sync-external-store-shim.production.js
|
|
78
48
|
*
|
|
@@ -80,7 +50,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
80
50
|
*
|
|
81
51
|
* This source code is licensed under the MIT license found in the
|
|
82
52
|
* LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/var
|
|
53
|
+
*/var Mc;function W0(){if(Mc)return Ri;Mc=1;var e=S;function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,c=e.useDebugValue;function l(f,d){var p=d(),g=r({inst:{value:p,getSnapshot:d}}),m=g[0].inst,x=g[1];return s(function(){m.value=p,m.getSnapshot=d,u(m)&&x({inst:m})},[f,p,d]),o(function(){return u(m)&&x({inst:m}),f(function(){u(m)&&x({inst:m})})},[f]),c(p),p}function u(f){var d=f.getSnapshot;f=f.value;try{var p=d();return!n(f,p)}catch{return!0}}function i(f,d){return d()}var a=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?i:l;return Ri.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:a,Ri}var Si={};/**
|
|
84
54
|
* @license React
|
|
85
55
|
* use-sync-external-store-shim.development.js
|
|
86
56
|
*
|
|
@@ -88,53 +58,53 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
88
58
|
*
|
|
89
59
|
* This source code is licensed under the MIT license found in the
|
|
90
60
|
* LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/var ul;function Dx(){return ul||(ul=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}function t(h,m){a||o.startTransition===void 0||(a=!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=m();if(!f){var v=m();i(p,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}v=c({inst:{value:p,getSnapshot:m}});var x=v[0].inst,b=v[1];return l(function(){x.value=p,x.getSnapshot=m,n(x)&&b({inst:x})},[h,p,m]),u(function(){return n(x)&&b({inst:x}),h(function(){n(x)&&b({inst:x})})},[h]),s(p),p}function n(h){var m=h.getSnapshot;h=h.value;try{var p=m();return!i(h,p)}catch{return!0}}function r(h,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=_,i=typeof Object.is=="function"?Object.is:e,c=o.useState,u=o.useEffect,l=o.useLayoutEffect,s=o.useDebugValue,a=!1,f=!1,d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Xi.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Xi}var fl;function kx(){return fl||(fl=1,process.env.NODE_ENV==="production"?Fr.exports=jx():Fr.exports=Dx()),Fr.exports}var Lx=kx();function Fx(){return Lx.useSyncExternalStore(Vx,()=>!0,()=>!1)}function Vx(){return()=>{}}var Aa="Avatar",[Bx]=Ee(Aa),[$x,ch]=Bx(Aa),lh=y.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=y.useState("idle");return g.jsx($x,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:g.jsx(z.span,{...r,ref:t})})});lh.displayName=Aa;var uh="AvatarImage",fh=y.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,c=ch(uh,n),u=Ux(r,i),l=Ze(s=>{o(s),c.onImageLoadingStatusChange(s)});return we(()=>{u!=="idle"&&l(u)},[u,l]),u==="loaded"?g.jsx(z.img,{...i,ref:t,src:r}):null});fh.displayName=uh;var dh="AvatarFallback",hh=y.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=ch(dh,n),[c,u]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(l)}},[r]),c&&i.imageLoadingStatus!=="loaded"?g.jsx(z.span,{...o,ref:t}):null});hh.displayName=dh;function dl(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Ux(e,{referrerPolicy:t,crossOrigin:n}){const r=Fx(),o=y.useRef(null),i=r?(o.current||(o.current=new window.Image),o.current):null,[c,u]=y.useState(()=>dl(i,e));return we(()=>{u(dl(i,e))},[i,e]),we(()=>{const l=f=>()=>{u(f)};if(!i)return;const s=l("loaded"),a=l("error");return i.addEventListener("load",s),i.addEventListener("error",a),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",s),i.removeEventListener("error",a)}},[i,n,t]),c}var Gx=lh,Hx=fh,zx=hh;function fr(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function dr(e){const[t,n]=y.useState(void 0);return we(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let c,u;if("borderBoxSize"in i){const l=i.borderBoxSize,s=Array.isArray(l)?l[0]:l;c=s.inlineSize,u=s.blockSize}else c=e.offsetWidth,u=e.offsetHeight;n({width:c,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var hi="Checkbox",[Wx]=Ee(hi),[qx,Oa]=Wx(hi);function Kx(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:c,name:u,onCheckedChange:l,required:s,value:a="on",internal_do_not_use_render:f}=e,[d,h]=Ne({prop:n,defaultProp:o??!1,onChange:l,caller:hi}),[m,p]=y.useState(null),[v,x]=y.useState(null),b=y.useRef(!1),w=m?!!c||!!m.closest("form"):!0,S={checked:d,disabled:i,setChecked:h,control:m,setControl:p,name:u,form:c,value:a,hasConsumerStoppedPropagationRef:b,required:s,defaultChecked:Et(o)?!1:o,isFormControl:w,bubbleInput:v,setBubbleInput:x};return g.jsx(qx,{scope:t,...S,children:Xx(f)?f(S):r})}var ph="CheckboxTrigger",mh=y.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:c,disabled:u,checked:l,required:s,setControl:a,setChecked:f,hasConsumerStoppedPropagationRef:d,isFormControl:h,bubbleInput:m}=Oa(ph,e),p=re(o,a),v=y.useRef(l);return y.useEffect(()=>{const x=i==null?void 0:i.form;if(x){const b=()=>f(v.current);return x.addEventListener("reset",b),()=>x.removeEventListener("reset",b)}},[i,f]),g.jsx(z.button,{type:"button",role:"checkbox","aria-checked":Et(l)?"mixed":l,"aria-required":s,"data-state":bh(l),"data-disabled":u?"":void 0,disabled:u,value:c,...r,ref:p,onKeyDown:B(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:B(n,x=>{f(b=>Et(b)?!0:!b),m&&h&&(d.current=x.isPropagationStopped(),d.current||x.stopPropagation())})})});mh.displayName=ph;var gh=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:c,disabled:u,value:l,onCheckedChange:s,form:a,...f}=e;return g.jsx(Kx,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:u,required:c,onCheckedChange:s,name:r,form:a,value:l,internal_do_not_use_render:({isFormControl:d})=>g.jsxs(g.Fragment,{children:[g.jsx(mh,{...f,ref:t,__scopeCheckbox:n}),d&&g.jsx(xh,{__scopeCheckbox:n})]})})});gh.displayName=hi;var vh="CheckboxIndicator",Yx=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Oa(vh,n);return g.jsx(je,{present:r||Et(i.checked)||i.checked===!0,children:g.jsx(z.span,{"data-state":bh(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Yx.displayName=vh;var yh="CheckboxBubbleInput",xh=y.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:c,required:u,disabled:l,name:s,value:a,form:f,bubbleInput:d,setBubbleInput:h}=Oa(yh,e),m=re(n,h),p=fr(i),v=dr(r);y.useEffect(()=>{const b=d;if(!b)return;const w=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(w,"checked").set,A=!o.current;if(p!==i&&E){const R=new Event("click",{bubbles:A});b.indeterminate=Et(i),E.call(b,Et(i)?!1:i),b.dispatchEvent(R)}},[d,p,i,o]);const x=y.useRef(Et(i)?!1:i);return g.jsx(z.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??x.current,required:u,disabled:l,name:s,value:a,form:f,...t,tabIndex:-1,ref:m,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});xh.displayName=yh;function Xx(e){return typeof e=="function"}function Et(e){return e==="indeterminate"}function bh(e){return Et(e)?"indeterminate":e?"checked":"unchecked"}const Zx=["top","right","bottom","left"],Ct=Math.min,Fe=Math.max,$o=Math.round,Vr=Math.floor,ot=e=>({x:e,y:e}),Qx={left:"right",right:"left",bottom:"top",top:"bottom"},Jx={start:"end",end:"start"};function Ms(e,t,n){return Fe(e,Ct(t,n))}function ht(e,t){return typeof e=="function"?e(t):e}function pt(e){return e.split("-")[0]}function bn(e){return e.split("-")[1]}function Ma(e){return e==="x"?"y":"x"}function Ia(e){return e==="y"?"height":"width"}const e1=new Set(["top","bottom"]);function rt(e){return e1.has(pt(e))?"y":"x"}function Na(e){return Ma(rt(e))}function t1(e,t,n){n===void 0&&(n=!1);const r=bn(e),o=Na(e),i=Ia(o);let c=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(c=Uo(c)),[c,Uo(c)]}function n1(e){const t=Uo(e);return[Is(e),t,Is(t)]}function Is(e){return e.replace(/start|end/g,t=>Jx[t])}const hl=["left","right"],pl=["right","left"],r1=["top","bottom"],o1=["bottom","top"];function i1(e,t,n){switch(e){case"top":case"bottom":return n?t?pl:hl:t?hl:pl;case"left":case"right":return t?r1:o1;default:return[]}}function s1(e,t,n,r){const o=bn(e);let i=i1(pt(e),n==="start",r);return o&&(i=i.map(c=>c+"-"+o),t&&(i=i.concat(i.map(Is)))),i}function Uo(e){return e.replace(/left|right|bottom|top/g,t=>Qx[t])}function a1(e){return{top:0,right:0,bottom:0,left:0,...e}}function wh(e){return typeof e!="number"?a1(e):{top:e,right:e,bottom:e,left:e}}function Go(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ml(e,t,n){let{reference:r,floating:o}=e;const i=rt(t),c=Na(t),u=Ia(c),l=pt(t),s=i==="y",a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[u]/2-o[u]/2;let h;switch(l){case"top":h={x:a,y:r.y-o.height};break;case"bottom":h={x:a,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(bn(t)){case"start":h[c]-=d*(n&&s?-1:1);break;case"end":h[c]+=d*(n&&s?-1:1);break}return h}const c1=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:c}=n,u=i.filter(Boolean),l=await(c.isRTL==null?void 0:c.isRTL(t));let s=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=ml(s,r,l),d=r,h={},m=0;for(let p=0;p<u.length;p++){const{name:v,fn:x}=u[p],{x:b,y:w,data:S,reset:E}=await x({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:s,platform:c,elements:{reference:e,floating:t}});a=b??a,f=w??f,h={...h,[v]:{...h[v],...S}},E&&m<=50&&(m++,typeof E=="object"&&(E.placement&&(d=E.placement),E.rects&&(s=E.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:a,y:f}=ml(s,d,l)),p=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:h}};async function Xn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:c,elements:u,strategy:l}=e,{boundary:s="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=ht(t,e),m=wh(h),v=u[d?f==="floating"?"reference":"floating":f],x=Go(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:s,rootBoundary:a,strategy:l})),b=f==="floating"?{x:r,y:o,width:c.floating.width,height:c.floating.height}:c.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},E=Go(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:b,offsetParent:w,strategy:l}):b);return{top:(x.top-E.top+m.top)/S.y,bottom:(E.bottom-x.bottom+m.bottom)/S.y,left:(x.left-E.left+m.left)/S.x,right:(E.right-x.right+m.right)/S.x}}const l1=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:c,elements:u,middlewareData:l}=t,{element:s,padding:a=0}=ht(e,t)||{};if(s==null)return{};const f=wh(a),d={x:n,y:r},h=Na(o),m=Ia(h),p=await c.getDimensions(s),v=h==="y",x=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",S=i.reference[m]+i.reference[h]-d[h]-i.floating[m],E=d[h]-i.reference[h],A=await(c.getOffsetParent==null?void 0:c.getOffsetParent(s));let R=A?A[w]:0;(!R||!await(c.isElement==null?void 0:c.isElement(A)))&&(R=u.floating[w]||i.floating[m]);const T=S/2-E/2,I=R/2-p[m]/2-1,P=Ct(f[x],I),M=Ct(f[b],I),j=P,V=R-p[m]-M,$=R/2-p[m]/2+T,K=Ms(j,$,V),G=!l.arrow&&bn(o)!=null&&$!==K&&i.reference[m]/2-($<j?P:M)-p[m]/2<0,H=G?$<j?$-j:$-V:0;return{[h]:d[h]+H,data:{[h]:K,centerOffset:$-K-H,...G&&{alignmentOffset:H}},reset:G}}}),u1=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:c,initialPlacement:u,platform:l,elements:s}=t,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...v}=ht(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=pt(o),b=rt(u),w=pt(u)===u,S=await(l.isRTL==null?void 0:l.isRTL(s.floating)),E=d||(w||!p?[Uo(u)]:n1(u)),A=m!=="none";!d&&A&&E.push(...s1(u,p,m,S));const R=[u,...E],T=await Xn(t,v),I=[];let P=((r=i.flip)==null?void 0:r.overflows)||[];if(a&&I.push(T[x]),f){const $=t1(o,c,S);I.push(T[$[0]],T[$[1]])}if(P=[...P,{placement:o,overflows:I}],!I.every($=>$<=0)){var M,j;const $=(((M=i.flip)==null?void 0:M.index)||0)+1,K=R[$];if(K&&(!(f==="alignment"?b!==rt(K):!1)||P.every(U=>rt(U.placement)===b?U.overflows[0]>0:!0)))return{data:{index:$,overflows:P},reset:{placement:K}};let G=(j=P.filter(H=>H.overflows[0]<=0).sort((H,U)=>H.overflows[1]-U.overflows[1])[0])==null?void 0:j.placement;if(!G)switch(h){case"bestFit":{var V;const H=(V=P.filter(U=>{if(A){const L=rt(U.placement);return L===b||L==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(L=>L>0).reduce((L,O)=>L+O,0)]).sort((U,L)=>U[1]-L[1])[0])==null?void 0:V[0];H&&(G=H);break}case"initialPlacement":G=u;break}if(o!==G)return{reset:{placement:G}}}return{}}}};function gl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vl(e){return Zx.some(t=>e[t]>=0)}const f1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ht(e,t);switch(r){case"referenceHidden":{const i=await Xn(t,{...o,elementContext:"reference"}),c=gl(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:vl(c)}}}case"escaped":{const i=await Xn(t,{...o,altBoundary:!0}),c=gl(i,n.floating);return{data:{escapedOffsets:c,escaped:vl(c)}}}default:return{}}}}},Eh=new Set(["left","top"]);async function d1(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),c=pt(n),u=bn(n),l=rt(n)==="y",s=Eh.has(c)?-1:1,a=i&&l?-1:1,f=ht(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return u&&typeof m=="number"&&(h=u==="end"?m*-1:m),l?{x:h*a,y:d*s}:{x:d*s,y:h*a}}const h1=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:c,middlewareData:u}=t,l=await d1(t,e);return c===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:c}}}}},p1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:u={fn:v=>{let{x,y:b}=v;return{x,y:b}}},...l}=ht(e,t),s={x:n,y:r},a=await Xn(t,l),f=rt(pt(o)),d=Ma(f);let h=s[d],m=s[f];if(i){const v=d==="y"?"top":"left",x=d==="y"?"bottom":"right",b=h+a[v],w=h-a[x];h=Ms(b,h,w)}if(c){const v=f==="y"?"top":"left",x=f==="y"?"bottom":"right",b=m+a[v],w=m-a[x];m=Ms(b,m,w)}const p=u.fn({...t,[d]:h,[f]:m});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[d]:i,[f]:c}}}}}},m1=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:c}=t,{offset:u=0,mainAxis:l=!0,crossAxis:s=!0}=ht(e,t),a={x:n,y:r},f=rt(o),d=Ma(f);let h=a[d],m=a[f];const p=ht(u,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const w=d==="y"?"height":"width",S=i.reference[d]-i.floating[w]+v.mainAxis,E=i.reference[d]+i.reference[w]-v.mainAxis;h<S?h=S:h>E&&(h=E)}if(s){var x,b;const w=d==="y"?"width":"height",S=Eh.has(pt(o)),E=i.reference[f]-i.floating[w]+(S&&((x=c.offset)==null?void 0:x[f])||0)+(S?0:v.crossAxis),A=i.reference[f]+i.reference[w]+(S?0:((b=c.offset)==null?void 0:b[f])||0)-(S?v.crossAxis:0);m<E?m=E:m>A&&(m=A)}return{[d]:h,[f]:m}}}},g1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:c,elements:u}=t,{apply:l=()=>{},...s}=ht(e,t),a=await Xn(t,s),f=pt(o),d=bn(o),h=rt(o)==="y",{width:m,height:p}=i.floating;let v,x;f==="top"||f==="bottom"?(v=f,x=d===(await(c.isRTL==null?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(x=f,v=d==="end"?"top":"bottom");const b=p-a.top-a.bottom,w=m-a.left-a.right,S=Ct(p-a[v],b),E=Ct(m-a[x],w),A=!t.middlewareData.shift;let R=S,T=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=b),A&&!d){const P=Fe(a.left,0),M=Fe(a.right,0),j=Fe(a.top,0),V=Fe(a.bottom,0);h?T=m-2*(P!==0||M!==0?P+M:Fe(a.left,a.right)):R=p-2*(j!==0||V!==0?j+V:Fe(a.top,a.bottom))}await l({...t,availableWidth:T,availableHeight:R});const I=await c.getDimensions(u.floating);return m!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function pi(){return typeof window<"u"}function wn(e){return Sh(e)?(e.nodeName||"").toLowerCase():"#document"}function Ve(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function lt(e){var t;return(t=(Sh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sh(e){return pi()?e instanceof Node||e instanceof Ve(e).Node:!1}function Qe(e){return pi()?e instanceof Element||e instanceof Ve(e).Element:!1}function at(e){return pi()?e instanceof HTMLElement||e instanceof Ve(e).HTMLElement:!1}function yl(e){return!pi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ve(e).ShadowRoot}const v1=new Set(["inline","contents"]);function hr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Je(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!v1.has(o)}const y1=new Set(["table","td","th"]);function x1(e){return y1.has(wn(e))}const b1=[":popover-open",":modal"];function mi(e){return b1.some(t=>{try{return e.matches(t)}catch{return!1}})}const w1=["transform","translate","scale","rotate","perspective"],E1=["transform","translate","scale","rotate","perspective","filter"],S1=["paint","layout","strict","content"];function ja(e){const t=Da(),n=Qe(e)?Je(e):e;return w1.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||E1.some(r=>(n.willChange||"").includes(r))||S1.some(r=>(n.contain||"").includes(r))}function C1(e){let t=_t(e);for(;at(t)&&!mn(t);){if(ja(t))return t;if(mi(t))return null;t=_t(t)}return null}function Da(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _1=new Set(["html","body","#document"]);function mn(e){return _1.has(wn(e))}function Je(e){return Ve(e).getComputedStyle(e)}function gi(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _t(e){if(wn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yl(e)&&e.host||lt(e);return yl(t)?t.host:t}function Ch(e){const t=_t(e);return mn(t)?e.ownerDocument?e.ownerDocument.body:e.body:at(t)&&hr(t)?t:Ch(t)}function Zn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ch(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),c=Ve(o);if(i){const u=Ns(c);return t.concat(c,c.visualViewport||[],hr(o)?o:[],u&&n?Zn(u):[])}return t.concat(o,Zn(o,[],n))}function Ns(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _h(e){const t=Je(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=at(e),i=o?e.offsetWidth:n,c=o?e.offsetHeight:r,u=$o(n)!==i||$o(r)!==c;return u&&(n=i,r=c),{width:n,height:r,$:u}}function ka(e){return Qe(e)?e:e.contextElement}function hn(e){const t=ka(e);if(!at(t))return ot(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=_h(t);let c=(i?$o(n.width):n.width)/r,u=(i?$o(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!u||!Number.isFinite(u))&&(u=1),{x:c,y:u}}const R1=ot(0);function Rh(e){const t=Ve(e);return!Da()||!t.visualViewport?R1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function T1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ve(e)?!1:t}function Gt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ka(e);let c=ot(1);t&&(r?Qe(r)&&(c=hn(r)):c=hn(e));const u=T1(i,n,r)?Rh(i):ot(0);let l=(o.left+u.x)/c.x,s=(o.top+u.y)/c.y,a=o.width/c.x,f=o.height/c.y;if(i){const d=Ve(i),h=r&&Qe(r)?Ve(r):r;let m=d,p=Ns(m);for(;p&&r&&h!==m;){const v=hn(p),x=p.getBoundingClientRect(),b=Je(p),w=x.left+(p.clientLeft+parseFloat(b.paddingLeft))*v.x,S=x.top+(p.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,s*=v.y,a*=v.x,f*=v.y,l+=w,s+=S,m=Ve(p),p=Ns(m)}}return Go({width:a,height:f,x:l,y:s})}function vi(e,t){const n=gi(e).scrollLeft;return t?t.left+n:Gt(lt(e)).left+n}function Th(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-vi(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function P1(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",c=lt(r),u=t?mi(t.floating):!1;if(r===c||u&&i)return n;let l={scrollLeft:0,scrollTop:0},s=ot(1);const a=ot(0),f=at(r);if((f||!f&&!i)&&((wn(r)!=="body"||hr(c))&&(l=gi(r)),at(r))){const h=Gt(r);s=hn(r),a.x=h.x+r.clientLeft,a.y=h.y+r.clientTop}const d=c&&!f&&!i?Th(c,l):ot(0);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-l.scrollLeft*s.x+a.x+d.x,y:n.y*s.y-l.scrollTop*s.y+a.y+d.y}}function A1(e){return Array.from(e.getClientRects())}function O1(e){const t=lt(e),n=gi(e),r=e.ownerDocument.body,o=Fe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Fe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+vi(e);const u=-n.scrollTop;return Je(r).direction==="rtl"&&(c+=Fe(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:c,y:u}}const xl=25;function M1(e,t){const n=Ve(e),r=lt(e),o=n.visualViewport;let i=r.clientWidth,c=r.clientHeight,u=0,l=0;if(o){i=o.width,c=o.height;const a=Da();(!a||a&&t==="fixed")&&(u=o.offsetLeft,l=o.offsetTop)}const s=vi(r);if(s<=0){const a=r.ownerDocument,f=a.body,d=getComputedStyle(f),h=a.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(r.clientWidth-f.clientWidth-h);m<=xl&&(i-=m)}else s<=xl&&(i+=s);return{width:i,height:c,x:u,y:l}}const I1=new Set(["absolute","fixed"]);function N1(e,t){const n=Gt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=at(e)?hn(e):ot(1),c=e.clientWidth*i.x,u=e.clientHeight*i.y,l=o*i.x,s=r*i.y;return{width:c,height:u,x:l,y:s}}function bl(e,t,n){let r;if(t==="viewport")r=M1(e,n);else if(t==="document")r=O1(lt(e));else if(Qe(t))r=N1(t,n);else{const o=Rh(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Go(r)}function Ph(e,t){const n=_t(e);return n===t||!Qe(n)||mn(n)?!1:Je(n).position==="fixed"||Ph(n,t)}function j1(e,t){const n=t.get(e);if(n)return n;let r=Zn(e,[],!1).filter(u=>Qe(u)&&wn(u)!=="body"),o=null;const i=Je(e).position==="fixed";let c=i?_t(e):e;for(;Qe(c)&&!mn(c);){const u=Je(c),l=ja(c);!l&&u.position==="fixed"&&(o=null),(i?!l&&!o:!l&&u.position==="static"&&!!o&&I1.has(o.position)||hr(c)&&!l&&Ph(e,c))?r=r.filter(a=>a!==c):o=u,c=_t(c)}return t.set(e,r),r}function D1(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const c=[...n==="clippingAncestors"?mi(t)?[]:j1(t,this._c):[].concat(n),r],u=c[0],l=c.reduce((s,a)=>{const f=bl(t,a,o);return s.top=Fe(f.top,s.top),s.right=Ct(f.right,s.right),s.bottom=Ct(f.bottom,s.bottom),s.left=Fe(f.left,s.left),s},bl(t,u,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function k1(e){const{width:t,height:n}=_h(e);return{width:t,height:n}}function L1(e,t,n){const r=at(t),o=lt(t),i=n==="fixed",c=Gt(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const l=ot(0);function s(){l.x=vi(o)}if(r||!r&&!i)if((wn(t)!=="body"||hr(o))&&(u=gi(t)),r){const h=Gt(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&s();i&&!r&&o&&s();const a=o&&!r&&!i?Th(o,u):ot(0),f=c.left+u.scrollLeft-l.x-a.x,d=c.top+u.scrollTop-l.y-a.y;return{x:f,y:d,width:c.width,height:c.height}}function Zi(e){return Je(e).position==="static"}function wl(e,t){if(!at(e)||Je(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return lt(e)===n&&(n=n.ownerDocument.body),n}function Ah(e,t){const n=Ve(e);if(mi(e))return n;if(!at(e)){let o=_t(e);for(;o&&!mn(o);){if(Qe(o)&&!Zi(o))return o;o=_t(o)}return n}let r=wl(e,t);for(;r&&x1(r)&&Zi(r);)r=wl(r,t);return r&&mn(r)&&Zi(r)&&!ja(r)?n:r||C1(e)||n}const F1=async function(e){const t=this.getOffsetParent||Ah,n=this.getDimensions,r=await n(e.floating);return{reference:L1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function V1(e){return Je(e).direction==="rtl"}const B1={convertOffsetParentRelativeRectToViewportRelativeRect:P1,getDocumentElement:lt,getClippingRect:D1,getOffsetParent:Ah,getElementRects:F1,getClientRects:A1,getDimensions:k1,getScale:hn,isElement:Qe,isRTL:V1};function Oh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $1(e,t){let n=null,r;const o=lt(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function c(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),i();const s=e.getBoundingClientRect(),{left:a,top:f,width:d,height:h}=s;if(u||t(),!d||!h)return;const m=Vr(f),p=Vr(o.clientWidth-(a+d)),v=Vr(o.clientHeight-(f+h)),x=Vr(a),w={rootMargin:-m+"px "+-p+"px "+-v+"px "+-x+"px",threshold:Fe(0,Ct(1,l))||1};let S=!0;function E(A){const R=A[0].intersectionRatio;if(R!==l){if(!S)return c();R?c(!1,R):r=setTimeout(()=>{c(!1,1e-7)},1e3)}R===1&&!Oh(s,e.getBoundingClientRect())&&c(),S=!1}try{n=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return c(!0),i}function U1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,s=ka(e),a=o||i?[...s?Zn(s):[],...Zn(t)]:[];a.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const f=s&&u?$1(s,n):null;let d=-1,h=null;c&&(h=new ResizeObserver(x=>{let[b]=x;b&&b.target===s&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),s&&!l&&h.observe(s),h.observe(t));let m,p=l?Gt(e):null;l&&v();function v(){const x=Gt(e);p&&!Oh(p,x)&&n(),p=x,m=requestAnimationFrame(v)}return n(),()=>{var x;a.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),f==null||f(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const G1=h1,H1=p1,z1=u1,W1=g1,q1=f1,El=l1,K1=m1,Y1=(e,t,n)=>{const r=new Map,o={platform:B1,...n},i={...o.platform,_c:r};return c1(e,t,{...o,platform:i})};var X1=typeof document<"u",Z1=function(){},No=X1?_.useLayoutEffect:Z1;function Ho(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ho(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ho(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Mh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Sl(e,t){const n=Mh(e);return Math.round(t*n)/n}function Qi(e){const t=y.useRef(e);return No(()=>{t.current=e}),t}function Q1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:c}={},transform:u=!0,whileElementsMounted:l,open:s}=e,[a,f]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=y.useState(r);Ho(d,r)||h(r);const[m,p]=y.useState(null),[v,x]=y.useState(null),b=y.useCallback(U=>{U!==A.current&&(A.current=U,p(U))},[]),w=y.useCallback(U=>{U!==R.current&&(R.current=U,x(U))},[]),S=i||m,E=c||v,A=y.useRef(null),R=y.useRef(null),T=y.useRef(a),I=l!=null,P=Qi(l),M=Qi(o),j=Qi(s),V=y.useCallback(()=>{if(!A.current||!R.current)return;const U={placement:t,strategy:n,middleware:d};M.current&&(U.platform=M.current),Y1(A.current,R.current,U).then(L=>{const O={...L,isPositioned:j.current!==!1};$.current&&!Ho(T.current,O)&&(T.current=O,oi.flushSync(()=>{f(O)}))})},[d,t,n,M,j]);No(()=>{s===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[s]);const $=y.useRef(!1);No(()=>($.current=!0,()=>{$.current=!1}),[]),No(()=>{if(S&&(A.current=S),E&&(R.current=E),S&&E){if(P.current)return P.current(S,E,V);V()}},[S,E,V,P,I]);const K=y.useMemo(()=>({reference:A,floating:R,setReference:b,setFloating:w}),[b,w]),G=y.useMemo(()=>({reference:S,floating:E}),[S,E]),H=y.useMemo(()=>{const U={position:n,left:0,top:0};if(!G.floating)return U;const L=Sl(G.floating,a.x),O=Sl(G.floating,a.y);return u?{...U,transform:"translate("+L+"px, "+O+"px)",...Mh(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:O}},[n,u,G.floating,a.x,a.y]);return y.useMemo(()=>({...a,update:V,refs:K,elements:G,floatingStyles:H}),[a,V,K,G,H])}const J1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?El({element:r.current,padding:o}).fn(n):{}:r?El({element:r,padding:o}).fn(n):{}}}},eb=(e,t)=>({...G1(e),options:[e,t]}),tb=(e,t)=>({...H1(e),options:[e,t]}),nb=(e,t)=>({...K1(e),options:[e,t]}),rb=(e,t)=>({...z1(e),options:[e,t]}),ob=(e,t)=>({...W1(e),options:[e,t]}),ib=(e,t)=>({...q1(e),options:[e,t]}),sb=(e,t)=>({...J1(e),options:[e,t]});var ab="Arrow",Ih=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return g.jsx(z.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ih.displayName=ab;var cb=Ih,La="Popper",[Nh,Pt]=Ee(La),[lb,jh]=Nh(La),Dh=e=>{const{__scopePopper:t,children:n}=e,[r,o]=y.useState(null);return g.jsx(lb,{scope:t,anchor:r,onAnchorChange:o,children:n})};Dh.displayName=La;var kh="PopperAnchor",Lh=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=jh(kh,n),c=y.useRef(null),u=re(t,c),l=y.useRef(null);return y.useEffect(()=>{const s=l.current;l.current=(r==null?void 0:r.current)||c.current,s!==l.current&&i.onAnchorChange(l.current)}),r?null:g.jsx(z.div,{...o,ref:u})});Lh.displayName=kh;var Fa="PopperContent",[ub,fb]=Nh(Fa),Fh=y.forwardRef((e,t)=>{var F,Y,Z,q,oe,D;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:l=!0,collisionBoundary:s=[],collisionPadding:a=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:m,...p}=e,v=jh(Fa,n),[x,b]=y.useState(null),w=re(t,he=>b(he)),[S,E]=y.useState(null),A=dr(S),R=(A==null?void 0:A.width)??0,T=(A==null?void 0:A.height)??0,I=r+(i!=="center"?"-"+i:""),P=typeof a=="number"?a:{top:0,right:0,bottom:0,left:0,...a},M=Array.isArray(s)?s:[s],j=M.length>0,V={padding:P,boundary:M.filter(hb),altBoundary:j},{refs:$,floatingStyles:K,placement:G,isPositioned:H,middlewareData:U}=Q1({strategy:"fixed",placement:I,whileElementsMounted:(...he)=>U1(...he,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[eb({mainAxis:o+T,alignmentAxis:c}),l&&tb({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?nb():void 0,...V}),l&&rb({...V}),ob({...V,apply:({elements:he,rects:Se,availableWidth:$e,availableHeight:It})=>{const{width:vt,height:Or}=Se.reference,Nt=he.floating.style;Nt.setProperty("--radix-popper-available-width",`${$e}px`),Nt.setProperty("--radix-popper-available-height",`${It}px`),Nt.setProperty("--radix-popper-anchor-width",`${vt}px`),Nt.setProperty("--radix-popper-anchor-height",`${Or}px`)}}),S&&sb({element:S,padding:u}),pb({arrowWidth:R,arrowHeight:T}),d&&ib({strategy:"referenceHidden",...V})]}),[L,O]=$h(G),k=Ze(m);we(()=>{H&&(k==null||k())},[H,k]);const ee=(F=U.arrow)==null?void 0:F.x,ne=(Y=U.arrow)==null?void 0:Y.y,X=((Z=U.arrow)==null?void 0:Z.centerOffset)!==0,[ie,te]=y.useState();return we(()=>{x&&te(window.getComputedStyle(x).zIndex)},[x]),g.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:H?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(q=U.transformOrigin)==null?void 0:q.x,(oe=U.transformOrigin)==null?void 0:oe.y].join(" "),...((D=U.hide)==null?void 0:D.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(ub,{scope:n,placedSide:L,onArrowChange:E,arrowX:ee,arrowY:ne,shouldHideArrow:X,children:g.jsx(z.div,{"data-side":L,"data-align":O,...p,ref:w,style:{...p.style,animation:H?void 0:"none"}})})})});Fh.displayName=Fa;var Vh="PopperArrow",db={top:"bottom",right:"left",bottom:"top",left:"right"},Bh=y.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=fb(Vh,r),c=db[i.placedSide];return g.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:g.jsx(cb,{...o,ref:n,style:{...o.style,display:"block"}})})});Bh.displayName=Vh;function hb(e){return e!==null}var pb=e=>({name:"transformOrigin",options:e,fn(t){var v,x,b;const{placement:n,rects:r,middlewareData:o}=t,c=((v=o.arrow)==null?void 0:v.centerOffset)!==0,u=c?0:e.arrowWidth,l=c?0:e.arrowHeight,[s,a]=$h(n),f={start:"0%",center:"50%",end:"100%"}[a],d=(((x=o.arrow)==null?void 0:x.x)??0)+u/2,h=(((b=o.arrow)==null?void 0:b.y)??0)+l/2;let m="",p="";return s==="bottom"?(m=c?f:`${d}px`,p=`${-l}px`):s==="top"?(m=c?f:`${d}px`,p=`${r.floating.height+l}px`):s==="right"?(m=`${-l}px`,p=c?f:`${h}px`):s==="left"&&(m=`${r.floating.width+l}px`,p=c?f:`${h}px`),{data:{x:m,y:p}}}});function $h(e){const[t,n="center"]=e.split("-");return[t,n]}var yi=Dh,pr=Lh,xi=Fh,bi=Bh,Ji="rovingFocusGroup.onEntryFocus",mb={bubbles:!1,cancelable:!0},mr="RovingFocusGroup",[js,Uh,gb]=ar(mr),[vb,En]=Ee(mr,[gb]),[yb,xb]=vb(mr),Gh=y.forwardRef((e,t)=>g.jsx(js.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(js.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(bb,{...e,ref:t})})}));Gh.displayName=mr;var bb=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:l,onEntryFocus:s,preventScrollOnEntryFocus:a=!1,...f}=e,d=y.useRef(null),h=re(t,d),m=Kt(i),[p,v]=Ne({prop:c,defaultProp:u??null,onChange:l,caller:mr}),[x,b]=y.useState(!1),w=Ze(s),S=Uh(n),E=y.useRef(!1),[A,R]=y.useState(0);return y.useEffect(()=>{const T=d.current;if(T)return T.addEventListener(Ji,w),()=>T.removeEventListener(Ji,w)},[w]),g.jsx(yb,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:p,onItemFocus:y.useCallback(T=>v(T),[v]),onItemShiftTab:y.useCallback(()=>b(!0),[]),onFocusableItemAdd:y.useCallback(()=>R(T=>T+1),[]),onFocusableItemRemove:y.useCallback(()=>R(T=>T-1),[]),children:g.jsx(z.div,{tabIndex:x||A===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:B(e.onMouseDown,()=>{E.current=!0}),onFocus:B(e.onFocus,T=>{const I=!E.current;if(T.target===T.currentTarget&&I&&!x){const P=new CustomEvent(Ji,mb);if(T.currentTarget.dispatchEvent(P),!P.defaultPrevented){const M=S().filter(G=>G.focusable),j=M.find(G=>G.active),V=M.find(G=>G.id===p),K=[j,V,...M].filter(Boolean).map(G=>G.ref.current);Wh(K,a)}}E.current=!1}),onBlur:B(e.onBlur,()=>b(!1))})})}),Hh="RovingFocusGroupItem",zh=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:c,...u}=e,l=Re(),s=i||l,a=xb(Hh,n),f=a.currentTabStopId===s,d=Uh(n),{onFocusableItemAdd:h,onFocusableItemRemove:m,currentTabStopId:p}=a;return y.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),g.jsx(js.ItemSlot,{scope:n,id:s,focusable:r,active:o,children:g.jsx(z.span,{tabIndex:f?0:-1,"data-orientation":a.orientation,...u,ref:t,onMouseDown:B(e.onMouseDown,v=>{r?a.onItemFocus(s):v.preventDefault()}),onFocus:B(e.onFocus,()=>a.onItemFocus(s)),onKeyDown:B(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){a.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const x=Sb(v,a.orientation,a.dir);if(x!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=d().filter(S=>S.focusable).map(S=>S.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const S=w.indexOf(v.currentTarget);w=a.loop?Cb(w,S+1):w.slice(S+1)}setTimeout(()=>Wh(w))}}),children:typeof c=="function"?c({isCurrentTabStop:f,hasTabStop:p!=null}):c})})});zh.displayName=Hh;var wb={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Eb(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Sb(e,t,n){const r=Eb(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return wb[r]}function Wh(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Cb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Va=Gh,Ba=zh,Ds=["Enter"," "],_b=["ArrowDown","PageUp","Home"],qh=["ArrowUp","PageDown","End"],Rb=[..._b,...qh],Tb={ltr:[...Ds,"ArrowRight"],rtl:[...Ds,"ArrowLeft"]},Pb={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gr="Menu",[Qn,Ab,Ob]=ar(gr),[Yt,Kh]=Ee(gr,[Ob,Pt,En]),wi=Pt(),Yh=En(),[Mb,Xt]=Yt(gr),[Ib,vr]=Yt(gr),Xh=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:c=!0}=e,u=wi(t),[l,s]=y.useState(null),a=y.useRef(!1),f=Ze(i),d=Kt(o);return y.useEffect(()=>{const h=()=>{a.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>a.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),g.jsx(yi,{...u,children:g.jsx(Mb,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:s,children:g.jsx(Ib,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:a,dir:d,modal:c,children:r})})})};Xh.displayName=gr;var Nb="MenuAnchor",$a=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wi(n);return g.jsx(pr,{...o,...r,ref:t})});$a.displayName=Nb;var Ua="MenuPortal",[jb,Zh]=Yt(Ua,{forceMount:void 0}),Qh=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Xt(Ua,t);return g.jsx(jb,{scope:t,forceMount:n,children:g.jsx(je,{present:n||i.open,children:g.jsx(lr,{asChild:!0,container:o,children:r})})})};Qh.displayName=Ua;var He="MenuContent",[Db,Ga]=Yt(He),Jh=y.forwardRef((e,t)=>{const n=Zh(He,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Xt(He,e.__scopeMenu),c=vr(He,e.__scopeMenu);return g.jsx(Qn.Provider,{scope:e.__scopeMenu,children:g.jsx(je,{present:r||i.open,children:g.jsx(Qn.Slot,{scope:e.__scopeMenu,children:c.modal?g.jsx(kb,{...o,ref:t}):g.jsx(Lb,{...o,ref:t})})})})}),kb=y.forwardRef((e,t)=>{const n=Xt(He,e.__scopeMenu),r=y.useRef(null),o=re(t,r);return y.useEffect(()=>{const i=r.current;if(i)return fi(i)},[]),g.jsx(Ha,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:B(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Lb=y.forwardRef((e,t)=>{const n=Xt(He,e.__scopeMenu);return g.jsx(Ha,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Fb=St("MenuContent.ScrollLock"),Ha=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEntryFocus:l,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f,onInteractOutside:d,onDismiss:h,disableOutsideScroll:m,...p}=e,v=Xt(He,n),x=vr(He,n),b=wi(n),w=Yh(n),S=Ab(n),[E,A]=y.useState(null),R=y.useRef(null),T=re(t,R,v.onContentChange),I=y.useRef(0),P=y.useRef(""),M=y.useRef(0),j=y.useRef(null),V=y.useRef("right"),$=y.useRef(0),K=m?ur:y.Fragment,G=m?{as:Fb,allowPinchZoom:!0}:void 0,H=L=>{var F,Y;const O=P.current+L,k=S().filter(Z=>!Z.disabled),ee=document.activeElement,ne=(F=k.find(Z=>Z.ref.current===ee))==null?void 0:F.textValue,X=k.map(Z=>Z.textValue),ie=Xb(X,O,ne),te=(Y=k.find(Z=>Z.textValue===ie))==null?void 0:Y.ref.current;(function Z(q){P.current=q,window.clearTimeout(I.current),q!==""&&(I.current=window.setTimeout(()=>Z(""),1e3))})(O),te&&setTimeout(()=>te.focus())};y.useEffect(()=>()=>window.clearTimeout(I.current),[]),li();const U=y.useCallback(L=>{var k,ee;return V.current===((k=j.current)==null?void 0:k.side)&&Qb(L,(ee=j.current)==null?void 0:ee.area)},[]);return g.jsx(Db,{scope:n,searchRef:P,onItemEnter:y.useCallback(L=>{U(L)&&L.preventDefault()},[U]),onItemLeave:y.useCallback(L=>{var O;U(L)||((O=R.current)==null||O.focus(),A(null))},[U]),onTriggerLeave:y.useCallback(L=>{U(L)&&L.preventDefault()},[U]),pointerGraceTimerRef:M,onPointerGraceIntentChange:y.useCallback(L=>{j.current=L},[]),children:g.jsx(K,{...G,children:g.jsx(cr,{asChild:!0,trapped:o,onMountAutoFocus:B(i,L=>{var O;L.preventDefault(),(O=R.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:g.jsx(xn,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f,onInteractOutside:d,onDismiss:h,children:g.jsx(Va,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:A,onEntryFocus:B(l,L=>{x.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(xi,{role:"menu","aria-orientation":"vertical","data-state":mp(v.open),"data-radix-menu-content":"",dir:x.dir,...b,...p,ref:T,style:{outline:"none",...p.style},onKeyDown:B(p.onKeyDown,L=>{const k=L.target.closest("[data-radix-menu-content]")===L.currentTarget,ee=L.ctrlKey||L.altKey||L.metaKey,ne=L.key.length===1;k&&(L.key==="Tab"&&L.preventDefault(),!ee&&ne&&H(L.key));const X=R.current;if(L.target!==X||!Rb.includes(L.key))return;L.preventDefault();const te=S().filter(F=>!F.disabled).map(F=>F.ref.current);qh.includes(L.key)&&te.reverse(),Kb(te)}),onBlur:B(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(I.current),P.current="")}),onPointerMove:B(e.onPointerMove,Jn(L=>{const O=L.target,k=$.current!==L.clientX;if(L.currentTarget.contains(O)&&k){const ee=L.clientX>$.current?"right":"left";V.current=ee,$.current=L.clientX}}))})})})})})})});Jh.displayName=He;var Vb="MenuGroup",za=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(z.div,{role:"group",...r,ref:t})});za.displayName=Vb;var Bb="MenuLabel",ep=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(z.div,{...r,ref:t})});ep.displayName=Bb;var zo="MenuItem",Cl="menu.itemSelect",Ei=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=y.useRef(null),c=vr(zo,e.__scopeMenu),u=Ga(zo,e.__scopeMenu),l=re(t,i),s=y.useRef(!1),a=()=>{const f=i.current;if(!n&&f){const d=new CustomEvent(Cl,{bubbles:!0,cancelable:!0});f.addEventListener(Cl,h=>r==null?void 0:r(h),{once:!0}),yd(f,d),d.defaultPrevented?s.current=!1:c.onClose()}};return g.jsx(tp,{...o,ref:l,disabled:n,onClick:B(e.onClick,a),onPointerDown:f=>{var d;(d=e.onPointerDown)==null||d.call(e,f),s.current=!0},onPointerUp:B(e.onPointerUp,f=>{var d;s.current||(d=f.currentTarget)==null||d.click()}),onKeyDown:B(e.onKeyDown,f=>{const d=u.searchRef.current!=="";n||d&&f.key===" "||Ds.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Ei.displayName=zo;var tp=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,c=Ga(zo,n),u=Yh(n),l=y.useRef(null),s=re(t,l),[a,f]=y.useState(!1),[d,h]=y.useState("");return y.useEffect(()=>{const m=l.current;m&&h((m.textContent??"").trim())},[i.children]),g.jsx(Qn.ItemSlot,{scope:n,disabled:r,textValue:o??d,children:g.jsx(Ba,{asChild:!0,...u,focusable:!r,children:g.jsx(z.div,{role:"menuitem","data-highlighted":a?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:s,onPointerMove:B(e.onPointerMove,Jn(m=>{r?c.onItemLeave(m):(c.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:B(e.onPointerLeave,Jn(m=>c.onItemLeave(m))),onFocus:B(e.onFocus,()=>f(!0)),onBlur:B(e.onBlur,()=>f(!1))})})})}),$b="MenuCheckboxItem",np=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return g.jsx(ap,{scope:e.__scopeMenu,checked:n,children:g.jsx(Ei,{role:"menuitemcheckbox","aria-checked":Wo(n)?"mixed":n,...o,ref:t,"data-state":qa(n),onSelect:B(o.onSelect,()=>r==null?void 0:r(Wo(n)?!0:!n),{checkForDefaultPrevented:!1})})})});np.displayName=$b;var rp="MenuRadioGroup",[Ub,Gb]=Yt(rp,{value:void 0,onValueChange:()=>{}}),op=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Ze(r);return g.jsx(Ub,{scope:e.__scopeMenu,value:n,onValueChange:i,children:g.jsx(za,{...o,ref:t})})});op.displayName=rp;var ip="MenuRadioItem",sp=y.forwardRef((e,t)=>{const{value:n,...r}=e,o=Gb(ip,e.__scopeMenu),i=n===o.value;return g.jsx(ap,{scope:e.__scopeMenu,checked:i,children:g.jsx(Ei,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":qa(i),onSelect:B(r.onSelect,()=>{var c;return(c=o.onValueChange)==null?void 0:c.call(o,n)},{checkForDefaultPrevented:!1})})})});sp.displayName=ip;var Wa="MenuItemIndicator",[ap,Hb]=Yt(Wa,{checked:!1}),cp=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=Hb(Wa,n);return g.jsx(je,{present:r||Wo(i.checked)||i.checked===!0,children:g.jsx(z.span,{...o,ref:t,"data-state":qa(i.checked)})})});cp.displayName=Wa;var zb="MenuSeparator",lp=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(z.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});lp.displayName=zb;var Wb="MenuArrow",up=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wi(n);return g.jsx(bi,{...o,...r,ref:t})});up.displayName=Wb;var qb="MenuSub",[wN,fp]=Yt(qb),Un="MenuSubTrigger",dp=y.forwardRef((e,t)=>{const n=Xt(Un,e.__scopeMenu),r=vr(Un,e.__scopeMenu),o=fp(Un,e.__scopeMenu),i=Ga(Un,e.__scopeMenu),c=y.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:l}=i,s={__scopeMenu:e.__scopeMenu},a=y.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return y.useEffect(()=>a,[a]),y.useEffect(()=>{const f=u.current;return()=>{window.clearTimeout(f),l(null)}},[u,l]),g.jsx($a,{asChild:!0,...s,children:g.jsx(tp,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":mp(n.open),...e,ref:ii(t,o.onTriggerChange),onClick:f=>{var d;(d=e.onClick)==null||d.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:B(e.onPointerMove,Jn(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(i.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),a()},100))})),onPointerLeave:B(e.onPointerLeave,Jn(f=>{var h,m;a();const d=(h=n.content)==null?void 0:h.getBoundingClientRect();if(d){const p=(m=n.content)==null?void 0:m.dataset.side,v=p==="right",x=v?-5:5,b=d[v?"left":"right"],w=d[v?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+x,y:f.clientY},{x:b,y:d.top},{x:w,y:d.top},{x:w,y:d.bottom},{x:b,y:d.bottom}],side:p}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:B(e.onKeyDown,f=>{var h;const d=i.searchRef.current!=="";e.disabled||d&&f.key===" "||Tb[r.dir].includes(f.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),f.preventDefault())})})})});dp.displayName=Un;var hp="MenuSubContent",pp=y.forwardRef((e,t)=>{const n=Zh(He,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Xt(He,e.__scopeMenu),c=vr(He,e.__scopeMenu),u=fp(hp,e.__scopeMenu),l=y.useRef(null),s=re(t,l);return g.jsx(Qn.Provider,{scope:e.__scopeMenu,children:g.jsx(je,{present:r||i.open,children:g.jsx(Qn.Slot,{scope:e.__scopeMenu,children:g.jsx(Ha,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:s,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:a=>{var f;c.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),a.preventDefault()},onCloseAutoFocus:a=>a.preventDefault(),onFocusOutside:B(e.onFocusOutside,a=>{a.target!==u.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:B(e.onEscapeKeyDown,a=>{c.onClose(),a.preventDefault()}),onKeyDown:B(e.onKeyDown,a=>{var h;const f=a.currentTarget.contains(a.target),d=Pb[c.dir].includes(a.key);f&&d&&(i.onOpenChange(!1),(h=u.trigger)==null||h.focus(),a.preventDefault())})})})})})});pp.displayName=hp;function mp(e){return e?"open":"closed"}function Wo(e){return e==="indeterminate"}function qa(e){return Wo(e)?"indeterminate":e?"checked":"unchecked"}function Kb(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Xb(e,t,n){const o=t.length>1&&Array.from(t).every(s=>s===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let c=Yb(e,Math.max(i,0));o.length===1&&(c=c.filter(s=>s!==n));const l=c.find(s=>s.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Zb(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,c=t.length-1;i<t.length;c=i++){const u=t[i],l=t[c],s=u.x,a=u.y,f=l.x,d=l.y;a>r!=d>r&&n<(f-s)*(r-a)/(d-a)+s&&(o=!o)}return o}function Qb(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Zb(n,t)}function Jn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Jb=Xh,ew=$a,tw=Qh,nw=Jh,rw=za,ow=ep,iw=Ei,sw=np,aw=op,cw=sp,lw=cp,uw=lp,fw=up,dw=dp,hw=pp,Si="DropdownMenu",[pw]=Ee(Si,[Kh]),De=Kh(),[mw,gp]=pw(Si),vp=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:c,modal:u=!0}=e,l=De(t),s=y.useRef(null),[a,f]=Ne({prop:o,defaultProp:i??!1,onChange:c,caller:Si});return g.jsx(mw,{scope:t,triggerId:Re(),triggerRef:s,contentId:Re(),open:a,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(d=>!d),[f]),modal:u,children:g.jsx(Jb,{...l,open:a,onOpenChange:f,dir:r,modal:u,children:n})})};vp.displayName=Si;var yp="DropdownMenuTrigger",xp=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=gp(yp,n),c=De(n);return g.jsx(ew,{asChild:!0,...c,children:g.jsx(z.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:ii(t,i.triggerRef),onPointerDown:B(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(i.onOpenToggle(),i.open||u.preventDefault())}),onKeyDown:B(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&i.onOpenToggle(),u.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});xp.displayName=yp;var gw="DropdownMenuPortal",bp=e=>{const{__scopeDropdownMenu:t,...n}=e,r=De(t);return g.jsx(tw,{...r,...n})};bp.displayName=gw;var wp="DropdownMenuContent",Ep=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gp(wp,n),i=De(n),c=y.useRef(!1);return g.jsx(nw,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:B(e.onCloseAutoFocus,u=>{var l;c.current||(l=o.triggerRef.current)==null||l.focus(),c.current=!1,u.preventDefault()}),onInteractOutside:B(e.onInteractOutside,u=>{const l=u.detail.originalEvent,s=l.button===0&&l.ctrlKey===!0,a=l.button===2||s;(!o.modal||a)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ep.displayName=wp;var vw="DropdownMenuGroup",yw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(rw,{...o,...r,ref:t})});yw.displayName=vw;var xw="DropdownMenuLabel",Sp=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(ow,{...o,...r,ref:t})});Sp.displayName=xw;var bw="DropdownMenuItem",Cp=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(iw,{...o,...r,ref:t})});Cp.displayName=bw;var ww="DropdownMenuCheckboxItem",Ew=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(sw,{...o,...r,ref:t})});Ew.displayName=ww;var Sw="DropdownMenuRadioGroup",Cw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(aw,{...o,...r,ref:t})});Cw.displayName=Sw;var _w="DropdownMenuRadioItem",Rw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(cw,{...o,...r,ref:t})});Rw.displayName=_w;var Tw="DropdownMenuItemIndicator",Pw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(lw,{...o,...r,ref:t})});Pw.displayName=Tw;var Aw="DropdownMenuSeparator",_p=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(uw,{...o,...r,ref:t})});_p.displayName=Aw;var Ow="DropdownMenuArrow",Mw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(fw,{...o,...r,ref:t})});Mw.displayName=Ow;var Iw="DropdownMenuSubTrigger",Nw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(dw,{...o,...r,ref:t})});Nw.displayName=Iw;var jw="DropdownMenuSubContent",Dw=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return g.jsx(hw,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Dw.displayName=jw;var kw=vp,Lw=xp,Fw=bp,Vw=Ep,Bw=Sp,$w=Cp,Uw=_p,Gw="Label",Rp=y.forwardRef((e,t)=>g.jsx(z.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Rp.displayName=Gw;var[Ka]=Ee("Form"),Ya="Form",[Hw,yr]=Ka(Ya),[zw,Tp]=Ka(Ya),Pp=y.forwardRef((e,t)=>{const{__scopeForm:n,onClearServerErrors:r=()=>{},...o}=e,i=y.useRef(null),c=re(t,i),[u,l]=y.useState({}),s=y.useCallback(P=>u[P],[u]),a=y.useCallback((P,M)=>l(j=>({...j,[P]:{...j[P]??{},...M}})),[]),f=y.useCallback(P=>{l(M=>({...M,[P]:void 0})),b(M=>({...M,[P]:{}}))},[]),[d,h]=y.useState({}),m=y.useCallback(P=>d[P]??[],[d]),p=y.useCallback((P,M)=>{h(j=>({...j,[P]:[...j[P]??[],M]}))},[]),v=y.useCallback((P,M)=>{h(j=>({...j,[P]:(j[P]??[]).filter(V=>V.id!==M)}))},[]),[x,b]=y.useState({}),w=y.useCallback(P=>x[P]??{},[x]),S=y.useCallback((P,M)=>{b(j=>({...j,[P]:{...j[P]??{},...M}}))},[]),[E,A]=y.useState({}),R=y.useCallback((P,M)=>{A(j=>{const V=new Set(j[P]).add(M);return{...j,[P]:V}})},[]),T=y.useCallback((P,M)=>{A(j=>{const V=new Set(j[P]);return V.delete(M),{...j,[P]:V}})},[]),I=y.useCallback(P=>Array.from(E[P]??[]).join(" ")||void 0,[E]);return g.jsx(Hw,{scope:n,getFieldValidity:s,onFieldValidityChange:a,getFieldCustomMatcherEntries:m,onFieldCustomMatcherEntryAdd:p,onFieldCustomMatcherEntryRemove:v,getFieldCustomErrors:w,onFieldCustomErrorsChange:S,onFieldValiditionClear:f,children:g.jsx(zw,{scope:n,onFieldMessageIdAdd:R,onFieldMessageIdRemove:T,getFieldDescription:I,children:g.jsx(z.form,{...o,ref:c,onInvalid:B(e.onInvalid,P=>{const M=Np(P.currentTarget);M===P.target&&M.focus(),P.preventDefault()}),onSubmit:B(e.onSubmit,r,{checkForDefaultPrevented:!1}),onReset:B(e.onReset,r)})})})});Pp.displayName=Ya;var Xa="FormField",[Ww,Za]=Ka(Xa),Ap=y.forwardRef((e,t)=>{const{__scopeForm:n,name:r,serverInvalid:o=!1,...i}=e,u=yr(Xa,n).getFieldValidity(r),l=Re();return g.jsx(Ww,{scope:n,id:l,name:r,serverInvalid:o,children:g.jsx(z.div,{"data-valid":Ja(u,o),"data-invalid":ec(u,o),...i,ref:t})})});Ap.displayName=Xa;var ks="FormLabel",Op=y.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e,o=yr(ks,n),i=Za(ks,n),c=r.htmlFor||i.id,u=o.getFieldValidity(i.name);return g.jsx(Rp,{"data-valid":Ja(u,i.serverInvalid),"data-invalid":ec(u,i.serverInvalid),...r,ref:t,htmlFor:c})});Op.displayName=ks;var jo="FormControl",Mp=y.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e,o=yr(jo,n),i=Za(jo,n),c=Tp(jo,n),u=y.useRef(null),l=re(t,u),s=r.name||i.name,a=r.id||i.id,f=o.getFieldCustomMatcherEntries(s),{onFieldValidityChange:d,onFieldCustomErrorsChange:h,onFieldValiditionClear:m}=o,p=y.useCallback(async b=>{if(jp(b.validity)){const j=es(b.validity);d(s,j);return}const w=b.form?new FormData(b.form):new FormData,S=[b.value,w],E=[],A=[];f.forEach(j=>{tE(j,S)?A.push(j):nE(j)&&E.push(j)});const R=E.map(({id:j,match:V})=>[j,V(...S)]),T=Object.fromEntries(R),I=Object.values(T).some(Boolean),P=I;b.setCustomValidity(P?er:"");const M=es(b.validity);if(d(s,M),h(s,T),!I&&A.length>0){const j=A.map(({id:U,match:L})=>L(...S).then(O=>[U,O])),V=await Promise.all(j),$=Object.fromEntries(V),G=Object.values($).some(Boolean);b.setCustomValidity(G?er:"");const H=es(b.validity);d(s,H),h(s,$)}},[f,s,h,d]);y.useEffect(()=>{const b=u.current;if(b){const w=()=>p(b);return b.addEventListener("change",w),()=>b.removeEventListener("change",w)}},[p]);const v=y.useCallback(()=>{const b=u.current;b&&(b.setCustomValidity(""),m(s))},[s,m]);y.useEffect(()=>{var w;const b=(w=u.current)==null?void 0:w.form;if(b)return b.addEventListener("reset",v),()=>b.removeEventListener("reset",v)},[v]),y.useEffect(()=>{const b=u.current,w=b==null?void 0:b.closest("form");if(w&&i.serverInvalid){const S=Np(w);S===b&&S.focus()}},[i.serverInvalid]);const x=o.getFieldValidity(s);return g.jsx(z.input,{"data-valid":Ja(x,i.serverInvalid),"data-invalid":ec(x,i.serverInvalid),"aria-invalid":i.serverInvalid?!0:void 0,"aria-describedby":c.getFieldDescription(s),title:"",...r,ref:l,id:a,name:s,onInvalid:B(e.onInvalid,b=>{const w=b.currentTarget;p(w)}),onChange:B(e.onChange,b=>{v()})})});Mp.displayName=jo;var er="This value is not valid",qw={badInput:er,patternMismatch:"This value does not match the required pattern",rangeOverflow:"This value is too large",rangeUnderflow:"This value is too small",stepMismatch:"This value does not match the required step",tooLong:"This value is too long",tooShort:"This value is too short",typeMismatch:"This value does not match the required type",valid:void 0,valueMissing:"This value is missing"},xr="FormMessage",Ip=y.forwardRef((e,t)=>{const{match:n,name:r,...o}=e,i=Za(xr,e.__scopeForm),c=r??i.name;return n===void 0?g.jsx(Qa,{...o,ref:t,name:c,children:e.children||er}):typeof n=="function"?g.jsx(Yw,{match:n,...o,ref:t,name:c}):g.jsx(Kw,{match:n,...o,ref:t,name:c})});Ip.displayName=xr;var Kw=y.forwardRef((e,t)=>{const{match:n,forceMatch:r=!1,name:o,children:i,...c}=e,l=yr(xr,c.__scopeForm).getFieldValidity(o);return r||(l==null?void 0:l[n])?g.jsx(Qa,{ref:t,...c,name:o,children:i??qw[n]}):null}),Yw=y.forwardRef((e,t)=>{const{match:n,forceMatch:r=!1,name:o,id:i,children:c,...u}=e,l=yr(xr,u.__scopeForm),s=y.useRef(null),a=re(t,s),f=Re(),d=i??f,h=y.useMemo(()=>({id:d,match:n}),[d,n]),{onFieldCustomMatcherEntryAdd:m,onFieldCustomMatcherEntryRemove:p}=l;y.useEffect(()=>(m(o,h),()=>p(o,h.id)),[h,o,m,p]);const v=l.getFieldValidity(o),b=l.getFieldCustomErrors(o)[d];return r||v&&!jp(v)&&b?g.jsx(Qa,{id:d,ref:a,...u,name:o,children:c??er}):null}),Qa=y.forwardRef((e,t)=>{const{__scopeForm:n,id:r,name:o,...i}=e,c=Tp(xr,n),u=Re(),l=r??u,{onFieldMessageIdAdd:s,onFieldMessageIdRemove:a}=c;return y.useEffect(()=>(s(o,l),()=>a(o,l)),[o,l,s,a]),g.jsx(z.span,{id:l,...i,ref:t})}),Xw="FormSubmit",Zw=y.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e;return g.jsx(z.button,{type:"submit",...r,ref:t})});Zw.displayName=Xw;function es(e){const t={};for(const n in e)t[n]=e[n];return t}function Qw(e){return e instanceof HTMLElement}function Jw(e){return"validity"in e}function eE(e){return Jw(e)&&(e.validity.valid===!1||e.getAttribute("aria-invalid")==="true")}function Np(e){const t=e.elements,[n]=Array.from(t).filter(Qw).filter(eE);return n}function tE(e,t){return e.match.constructor.name==="AsyncFunction"||rE(e.match,t)}function nE(e){return e.match.constructor.name==="Function"}function rE(e,t){return e(...t)instanceof Promise}function jp(e){let t=!1;for(const n in e){const r=n;if(r!=="valid"&&r!=="customError"&&e[r]){t=!0;break}}return t}function Ja(e,t){if((e==null?void 0:e.valid)===!0&&!t)return!0}function ec(e,t){if((e==null?void 0:e.valid)===!1||t)return!0}var oE=Pp,iE=Ap,sE=Op,aE=Mp,cE=Ip;function qo(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ci="Popover",[Dp]=Ee(Ci,[Pt]),br=Pt(),[lE,Zt]=Dp(Ci),kp=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:c=!1}=e,u=br(t),l=y.useRef(null),[s,a]=y.useState(!1),[f,d]=Ne({prop:r,defaultProp:o??!1,onChange:i,caller:Ci});return g.jsx(yi,{...u,children:g.jsx(lE,{scope:t,contentId:Re(),triggerRef:l,open:f,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:s,onCustomAnchorAdd:y.useCallback(()=>a(!0),[]),onCustomAnchorRemove:y.useCallback(()=>a(!1),[]),modal:c,children:n})})};kp.displayName=Ci;var Lp="PopoverAnchor",uE=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Zt(Lp,n),i=br(n),{onCustomAnchorAdd:c,onCustomAnchorRemove:u}=o;return y.useEffect(()=>(c(),()=>u()),[c,u]),g.jsx(pr,{...i,...r,ref:t})});uE.displayName=Lp;var Fp="PopoverTrigger",fE=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Zt(Fp,n),i=br(n),c=re(t,o.triggerRef),u=g.jsx(z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":$p(o.open),...r,ref:c,onClick:B(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?u:g.jsx(pr,{asChild:!0,...i,children:u})});fE.displayName=Fp;var dE="PopoverPortal",[EN,hE]=Dp(dE,{forceMount:void 0}),gn="PopoverContent",pE=y.forwardRef((e,t)=>{const n=hE(gn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Zt(gn,e.__scopePopover);return g.jsx(je,{present:r||i.open,children:i.modal?g.jsx(gE,{...o,ref:t}):g.jsx(vE,{...o,ref:t})})});pE.displayName=gn;var mE=St("PopoverContent.RemoveScroll"),gE=y.forwardRef((e,t)=>{const n=Zt(gn,e.__scopePopover),r=y.useRef(null),o=re(t,r),i=y.useRef(!1);return y.useEffect(()=>{const c=r.current;if(c)return fi(c)},[]),g.jsx(ur,{as:mE,allowPinchZoom:!0,children:g.jsx(Vp,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,c=>{var u;c.preventDefault(),i.current||(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,c=>{const u=c.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,s=u.button===2||l;i.current=s},{checkForDefaultPrevented:!1}),onFocusOutside:B(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),vE=y.forwardRef((e,t)=>{const n=Zt(gn,e.__scopePopover),r=y.useRef(!1),o=y.useRef(!1);return g.jsx(Vp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var c,u;(c=e.onCloseAutoFocus)==null||c.call(e,i),i.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,s;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)==null?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Vp=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:l,onFocusOutside:s,onInteractOutside:a,...f}=e,d=Zt(gn,n),h=br(n);return li(),g.jsx(cr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:g.jsx(xn,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:a,onEscapeKeyDown:u,onPointerDownOutside:l,onFocusOutside:s,onDismiss:()=>d.onOpenChange(!1),children:g.jsx(xi,{"data-state":$p(d.open),role:"dialog",id:d.contentId,...h,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Bp="PopoverClose",yE=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Zt(Bp,n);return g.jsx(z.button,{type:"button",...r,ref:t,onClick:B(e.onClick,()=>o.onOpenChange(!1))})});yE.displayName=Bp;var xE="PopoverArrow",bE=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=br(n);return g.jsx(bi,{...o,...r,ref:t})});bE.displayName=xE;function $p(e){return e?"open":"closed"}var wE=kp,tc="Progress",nc=100,[EE]=Ee(tc),[SE,CE]=EE(tc),Up=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=_E,...c}=e;(o||o===0)&&!_l(o)&&console.error(RE(`${o}`,"Progress"));const u=_l(o)?o:nc;r!==null&&!Rl(r,u)&&console.error(TE(`${r}`,"Progress"));const l=Rl(r,u)?r:null,s=Ko(l)?i(l,u):void 0;return g.jsx(SE,{scope:n,value:l,max:u,children:g.jsx(z.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":Ko(l)?l:void 0,"aria-valuetext":s,role:"progressbar","data-state":zp(l,u),"data-value":l??void 0,"data-max":u,...c,ref:t})})});Up.displayName=tc;var Gp="ProgressIndicator",Hp=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=CE(Gp,n);return g.jsx(z.div,{"data-state":zp(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Hp.displayName=Gp;function _E(e,t){return`${Math.round(e/t*100)}%`}function zp(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Ko(e){return typeof e=="number"}function _l(e){return Ko(e)&&!isNaN(e)&&e>0}function Rl(e,t){return Ko(e)&&!isNaN(e)&&e<=t&&e>=0}function RE(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${nc}\`.`}function TE(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
61
|
+
*/var Ic;function q0(){return Ic||(Ic=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function t(p,g){a||o.startTransition===void 0||(a=!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 m=g();if(!f){var x=g();s(m,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}x=c({inst:{value:m,getSnapshot:g}});var y=x[0].inst,E=x[1];return u(function(){y.value=m,y.getSnapshot=g,n(y)&&E({inst:y})},[p,m,g]),l(function(){return n(y)&&E({inst:y}),p(function(){n(y)&&E({inst:y})})},[p]),i(m),m}function n(p){var g=p.getSnapshot;p=p.value;try{var m=g();return!s(p,m)}catch{return!0}}function r(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,s=typeof Object.is=="function"?Object.is:e,c=o.useState,l=o.useEffect,u=o.useLayoutEffect,i=o.useDebugValue,a=!1,f=!1,d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Si.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Si}var Dc;function K0(){return Dc||(Dc=1,process.env.NODE_ENV==="production"?pr.exports=W0():pr.exports=q0()),pr.exports}var X0=K0();function Y0(){return X0.useSyncExternalStore(Z0,()=>!0,()=>!1)}function Z0(){return()=>{}}var ra="Avatar",[Q0]=he(ra),[J0,Td]=Q0(ra),Ad=v.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=v.useState("idle");return h.jsxRuntimeExports.jsx(J0,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{...r,ref:t})})});Ad.displayName=ra;var Od="AvatarImage",Md=v.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,c=Td(Od,n),l=ey(r,s),u=Ve(i=>{o(i),c.onImageLoadingStatusChange(i)});return h.useLayoutEffect2(()=>{l!=="idle"&&u(l)},[l,u]),l==="loaded"?h.jsxRuntimeExports.jsx(h.Primitive.img,{...s,ref:t,src:r}):null});Md.displayName=Od;var Id="AvatarFallback",Dd=v.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=Td(Id,n),[c,l]=v.useState(r===void 0);return v.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(u)}},[r]),c&&s.imageLoadingStatus!=="loaded"?h.jsxRuntimeExports.jsx(h.Primitive.span,{...o,ref:t}):null});Dd.displayName=Id;function Nc(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function ey(e,{referrerPolicy:t,crossOrigin:n}){const r=Y0(),o=v.useRef(null),s=r?(o.current||(o.current=new window.Image),o.current):null,[c,l]=v.useState(()=>Nc(s,e));return h.useLayoutEffect2(()=>{l(Nc(s,e))},[s,e]),h.useLayoutEffect2(()=>{const u=f=>()=>{l(f)};if(!s)return;const i=u("loaded"),a=u("error");return s.addEventListener("load",i),s.addEventListener("error",a),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",i),s.removeEventListener("error",a)}},[s,n,t]),c}var ty=Ad,ny=Md,ry=Dd;function Gn(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Hn(e){const[t,n]=v.useState(void 0);return h.useLayoutEffect2(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let c,l;if("borderBoxSize"in s){const u=s.borderBoxSize,i=Array.isArray(u)?u[0]:u;c=i.inlineSize,l=i.blockSize}else c=e.offsetWidth,l=e.offsetHeight;n({width:c,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var $o="Checkbox",[oy]=he($o),[iy,oa]=oy($o);function sy(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:c,name:l,onCheckedChange:u,required:i,value:a="on",internal_do_not_use_render:f}=e,[d,p]=we({prop:n,defaultProp:o??!1,onChange:u,caller:$o}),[g,m]=v.useState(null),[x,y]=v.useState(null),E=v.useRef(!1),b=g?!!c||!!g.closest("form"):!0,R={checked:d,disabled:s,setChecked:p,control:g,setControl:m,name:l,form:c,value:a,hasConsumerStoppedPropagationRef:E,required:i,defaultChecked:at(o)?!1:o,isFormControl:b,bubbleInput:x,setBubbleInput:y};return h.jsxRuntimeExports.jsx(iy,{scope:t,...R,children:cy(f)?f(R):r})}var Nd="CheckboxTrigger",kd=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:c,disabled:l,checked:u,required:i,setControl:a,setChecked:f,hasConsumerStoppedPropagationRef:d,isFormControl:p,bubbleInput:g}=oa(Nd,e),m=h.useComposedRefs(o,a),x=v.useRef(u);return v.useEffect(()=>{const y=s==null?void 0:s.form;if(y){const E=()=>f(x.current);return y.addEventListener("reset",E),()=>y.removeEventListener("reset",E)}},[s,f]),h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"checkbox","aria-checked":at(u)?"mixed":u,"aria-required":i,"data-state":$d(u),"data-disabled":l?"":void 0,disabled:l,value:c,...r,ref:m,onKeyDown:N(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:N(n,y=>{f(E=>at(E)?!0:!E),g&&p&&(d.current=y.isPropagationStopped(),d.current||y.stopPropagation())})})});kd.displayName=Nd;var Ld=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:c,disabled:l,value:u,onCheckedChange:i,form:a,...f}=e;return h.jsxRuntimeExports.jsx(sy,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:l,required:c,onCheckedChange:i,name:r,form:a,value:u,internal_do_not_use_render:({isFormControl:d})=>h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx(kd,{...f,ref:t,__scopeCheckbox:n}),d&&h.jsxRuntimeExports.jsx(Bd,{__scopeCheckbox:n})]})})});Ld.displayName=$o;var Fd="CheckboxIndicator",ay=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=oa(Fd,n);return h.jsxRuntimeExports.jsx(Re,{present:r||at(s.checked)||s.checked===!0,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-state":$d(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});ay.displayName=Fd;var Vd="CheckboxBubbleInput",Bd=v.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:c,required:l,disabled:u,name:i,value:a,form:f,bubbleInput:d,setBubbleInput:p}=oa(Vd,e),g=h.useComposedRefs(n,p),m=Gn(s),x=Hn(r);v.useEffect(()=>{const E=d;if(!E)return;const b=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(b,"checked").set,P=!o.current;if(m!==s&&w){const C=new Event("click",{bubbles:P});E.indeterminate=at(s),w.call(E,at(s)?!1:s),E.dispatchEvent(C)}},[d,m,s,o]);const y=v.useRef(at(s)?!1:s);return h.jsxRuntimeExports.jsx(h.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??y.current,required:l,disabled:u,name:i,value:a,form:f,...t,tabIndex:-1,ref:g,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Bd.displayName=Vd;function cy(e){return typeof e=="function"}function at(e){return e==="indeterminate"}function $d(e){return at(e)?"indeterminate":e?"checked":"unchecked"}const uy=["top","right","bottom","left"],ct=Math.min,je=Math.max,xo=Math.round,mr=Math.floor,We=e=>({x:e,y:e}),ly={left:"right",right:"left",bottom:"top",top:"bottom"},fy={start:"end",end:"start"};function is(e,t,n){return je(e,ct(t,n))}function Je(e,t){return typeof e=="function"?e(t):e}function et(e){return e.split("-")[0]}function Jt(e){return e.split("-")[1]}function ia(e){return e==="x"?"y":"x"}function sa(e){return e==="y"?"height":"width"}const dy=new Set(["top","bottom"]);function ze(e){return dy.has(et(e))?"y":"x"}function aa(e){return ia(ze(e))}function hy(e,t,n){n===void 0&&(n=!1);const r=Jt(e),o=aa(e),s=sa(o);let c=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=vo(c)),[c,vo(c)]}function py(e){const t=vo(e);return[ss(e),t,ss(t)]}function ss(e){return e.replace(/start|end/g,t=>fy[t])}const kc=["left","right"],Lc=["right","left"],my=["top","bottom"],gy=["bottom","top"];function xy(e,t,n){switch(e){case"top":case"bottom":return n?t?Lc:kc:t?kc:Lc;case"left":case"right":return t?my:gy;default:return[]}}function vy(e,t,n,r){const o=Jt(e);let s=xy(et(e),n==="start",r);return o&&(s=s.map(c=>c+"-"+o),t&&(s=s.concat(s.map(ss)))),s}function vo(e){return e.replace(/left|right|bottom|top/g,t=>ly[t])}function yy(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ud(e){return typeof e!="number"?yy(e):{top:e,right:e,bottom:e,left:e}}function yo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Fc(e,t,n){let{reference:r,floating:o}=e;const s=ze(t),c=aa(t),l=sa(c),u=et(t),i=s==="y",a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[l]/2-o[l]/2;let p;switch(u){case"top":p={x:a,y:r.y-o.height};break;case"bottom":p={x:a,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Jt(t)){case"start":p[c]-=d*(n&&i?-1:1);break;case"end":p[c]+=d*(n&&i?-1:1);break}return p}const Ey=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:c}=n,l=s.filter(Boolean),u=await(c.isRTL==null?void 0:c.isRTL(t));let i=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=Fc(i,r,u),d=r,p={},g=0;for(let m=0;m<l.length;m++){const{name:x,fn:y}=l[m],{x:E,y:b,data:R,reset:w}=await y({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:i,platform:c,elements:{reference:e,floating:t}});a=E??a,f=b??f,p={...p,[x]:{...p[x],...R}},w&&g<=50&&(g++,typeof w=="object"&&(w.placement&&(d=w.placement),w.rects&&(i=w.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:a,y:f}=Fc(i,d,u)),m=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:p}};async function Tn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:c,elements:l,strategy:u}=e,{boundary:i="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Je(t,e),g=Ud(p),x=l[d?f==="floating"?"reference":"floating":f],y=yo(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:i,rootBoundary:a,strategy:u})),E=f==="floating"?{x:r,y:o,width:c.floating.width,height:c.floating.height}:c.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),R=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},w=yo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:b,strategy:u}):E);return{top:(y.top-w.top+g.top)/R.y,bottom:(w.bottom-y.bottom+g.bottom)/R.y,left:(y.left-w.left+g.left)/R.x,right:(w.right-y.right+g.right)/R.x}}const by=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:c,elements:l,middlewareData:u}=t,{element:i,padding:a=0}=Je(e,t)||{};if(i==null)return{};const f=Ud(a),d={x:n,y:r},p=aa(o),g=sa(p),m=await c.getDimensions(i),x=p==="y",y=x?"top":"left",E=x?"bottom":"right",b=x?"clientHeight":"clientWidth",R=s.reference[g]+s.reference[p]-d[p]-s.floating[g],w=d[p]-s.reference[p],P=await(c.getOffsetParent==null?void 0:c.getOffsetParent(i));let C=P?P[b]:0;(!C||!await(c.isElement==null?void 0:c.isElement(P)))&&(C=l.floating[b]||s.floating[g]);const _=R/2-w/2,M=C/2-m[g]/2-1,j=ct(f[y],M),A=ct(f[E],M),I=j,F=C-m[g]-A,B=C/2-m[g]/2+_,q=is(I,B,F),U=!u.arrow&&Jt(o)!=null&&B!==q&&s.reference[g]/2-(B<I?j:A)-m[g]/2<0,G=U?B<I?B-I:B-F:0;return{[p]:d[p]+G,data:{[p]:q,centerOffset:B-q-G,...U&&{alignmentOffset:G}},reset:U}}}),wy=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:c,initialPlacement:l,platform:u,elements:i}=t,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...x}=Je(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=et(o),E=ze(l),b=et(l)===l,R=await(u.isRTL==null?void 0:u.isRTL(i.floating)),w=d||(b||!m?[vo(l)]:py(l)),P=g!=="none";!d&&P&&w.push(...vy(l,m,g,R));const C=[l,...w],_=await Tn(t,x),M=[];let j=((r=s.flip)==null?void 0:r.overflows)||[];if(a&&M.push(_[y]),f){const B=hy(o,c,R);M.push(_[B[0]],_[B[1]])}if(j=[...j,{placement:o,overflows:M}],!M.every(B=>B<=0)){var A,I;const B=(((A=s.flip)==null?void 0:A.index)||0)+1,q=C[B];if(q&&(!(f==="alignment"?E!==ze(q):!1)||j.every($=>ze($.placement)===E?$.overflows[0]>0:!0)))return{data:{index:B,overflows:j},reset:{placement:q}};let U=(I=j.filter(G=>G.overflows[0]<=0).sort((G,$)=>G.overflows[1]-$.overflows[1])[0])==null?void 0:I.placement;if(!U)switch(p){case"bestFit":{var F;const G=(F=j.filter($=>{if(P){const V=ze($.placement);return V===E||V==="y"}return!0}).map($=>[$.placement,$.overflows.filter(V=>V>0).reduce((V,T)=>V+T,0)]).sort(($,V)=>$[1]-V[1])[0])==null?void 0:F[0];G&&(U=G);break}case"initialPlacement":U=l;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function Vc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bc(e){return uy.some(t=>e[t]>=0)}const Ry=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Je(e,t);switch(r){case"referenceHidden":{const s=await Tn(t,{...o,elementContext:"reference"}),c=Vc(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Bc(c)}}}case"escaped":{const s=await Tn(t,{...o,altBoundary:!0}),c=Vc(s,n.floating);return{data:{escapedOffsets:c,escaped:Bc(c)}}}default:return{}}}}},Gd=new Set(["left","top"]);async function Sy(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),c=et(n),l=Jt(n),u=ze(n)==="y",i=Gd.has(c)?-1:1,a=s&&u?-1:1,f=Je(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(p=l==="end"?g*-1:g),u?{x:p*a,y:d*i}:{x:d*i,y:p*a}}const Cy=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:c,middlewareData:l}=t,u=await Sy(t,e);return c===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:c}}}}},_y=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:l={fn:x=>{let{x:y,y:E}=x;return{x:y,y:E}}},...u}=Je(e,t),i={x:n,y:r},a=await Tn(t,u),f=ze(et(o)),d=ia(f);let p=i[d],g=i[f];if(s){const x=d==="y"?"top":"left",y=d==="y"?"bottom":"right",E=p+a[x],b=p-a[y];p=is(E,p,b)}if(c){const x=f==="y"?"top":"left",y=f==="y"?"bottom":"right",E=g+a[x],b=g-a[y];g=is(E,g,b)}const m=l.fn({...t,[d]:p,[f]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:s,[f]:c}}}}}},jy=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:c}=t,{offset:l=0,mainAxis:u=!0,crossAxis:i=!0}=Je(e,t),a={x:n,y:r},f=ze(o),d=ia(f);let p=a[d],g=a[f];const m=Je(l,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const b=d==="y"?"height":"width",R=s.reference[d]-s.floating[b]+x.mainAxis,w=s.reference[d]+s.reference[b]-x.mainAxis;p<R?p=R:p>w&&(p=w)}if(i){var y,E;const b=d==="y"?"width":"height",R=Gd.has(et(o)),w=s.reference[f]-s.floating[b]+(R&&((y=c.offset)==null?void 0:y[f])||0)+(R?0:x.crossAxis),P=s.reference[f]+s.reference[b]+(R?0:((E=c.offset)==null?void 0:E[f])||0)-(R?x.crossAxis:0);g<w?g=w:g>P&&(g=P)}return{[d]:p,[f]:g}}}},Py=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:c,elements:l}=t,{apply:u=()=>{},...i}=Je(e,t),a=await Tn(t,i),f=et(o),d=Jt(o),p=ze(o)==="y",{width:g,height:m}=s.floating;let x,y;f==="top"||f==="bottom"?(x=f,y=d===(await(c.isRTL==null?void 0:c.isRTL(l.floating))?"start":"end")?"left":"right"):(y=f,x=d==="end"?"top":"bottom");const E=m-a.top-a.bottom,b=g-a.left-a.right,R=ct(m-a[x],E),w=ct(g-a[y],b),P=!t.middlewareData.shift;let C=R,_=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=E),P&&!d){const j=je(a.left,0),A=je(a.right,0),I=je(a.top,0),F=je(a.bottom,0);p?_=g-2*(j!==0||A!==0?j+A:je(a.left,a.right)):C=m-2*(I!==0||F!==0?I+F:je(a.top,a.bottom))}await u({...t,availableWidth:_,availableHeight:C});const M=await c.getDimensions(l.floating);return g!==M.width||m!==M.height?{reset:{rects:!0}}:{}}}};function Uo(){return typeof window<"u"}function en(e){return Hd(e)?(e.nodeName||"").toLowerCase():"#document"}function Pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ze(e){var t;return(t=(Hd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hd(e){return Uo()?e instanceof Node||e instanceof Pe(e).Node:!1}function Be(e){return Uo()?e instanceof Element||e instanceof Pe(e).Element:!1}function Xe(e){return Uo()?e instanceof HTMLElement||e instanceof Pe(e).HTMLElement:!1}function $c(e){return!Uo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}const Ty=new Set(["inline","contents"]);function zn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=$e(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Ty.has(o)}const Ay=new Set(["table","td","th"]);function Oy(e){return Ay.has(en(e))}const My=[":popover-open",":modal"];function Go(e){return My.some(t=>{try{return e.matches(t)}catch{return!1}})}const Iy=["transform","translate","scale","rotate","perspective"],Dy=["transform","translate","scale","rotate","perspective","filter"],Ny=["paint","layout","strict","content"];function ca(e){const t=ua(),n=Be(e)?$e(e):e;return Iy.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Dy.some(r=>(n.willChange||"").includes(r))||Ny.some(r=>(n.contain||"").includes(r))}function ky(e){let t=ut(e);for(;Xe(t)&&!Kt(t);){if(ca(t))return t;if(Go(t))return null;t=ut(t)}return null}function ua(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ly=new Set(["html","body","#document"]);function Kt(e){return Ly.has(en(e))}function $e(e){return Pe(e).getComputedStyle(e)}function Ho(e){return Be(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ut(e){if(en(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$c(e)&&e.host||Ze(e);return $c(t)?t.host:t}function zd(e){const t=ut(e);return Kt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xe(t)&&zn(t)?t:zd(t)}function An(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=zd(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),c=Pe(o);if(s){const l=as(c);return t.concat(c,c.visualViewport||[],zn(o)?o:[],l&&n?An(l):[])}return t.concat(o,An(o,[],n))}function as(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Wd(e){const t=$e(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Xe(e),s=o?e.offsetWidth:n,c=o?e.offsetHeight:r,l=xo(n)!==s||xo(r)!==c;return l&&(n=s,r=c),{width:n,height:r,$:l}}function la(e){return Be(e)?e:e.contextElement}function Wt(e){const t=la(e);if(!Xe(t))return We(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Wd(t);let c=(s?xo(n.width):n.width)/r,l=(s?xo(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!l||!Number.isFinite(l))&&(l=1),{x:c,y:l}}const Fy=We(0);function qd(e){const t=Pe(e);return!ua()||!t.visualViewport?Fy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vy(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pe(e)?!1:t}function St(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=la(e);let c=We(1);t&&(r?Be(r)&&(c=Wt(r)):c=Wt(e));const l=Vy(s,n,r)?qd(s):We(0);let u=(o.left+l.x)/c.x,i=(o.top+l.y)/c.y,a=o.width/c.x,f=o.height/c.y;if(s){const d=Pe(s),p=r&&Be(r)?Pe(r):r;let g=d,m=as(g);for(;m&&r&&p!==g;){const x=Wt(m),y=m.getBoundingClientRect(),E=$e(m),b=y.left+(m.clientLeft+parseFloat(E.paddingLeft))*x.x,R=y.top+(m.clientTop+parseFloat(E.paddingTop))*x.y;u*=x.x,i*=x.y,a*=x.x,f*=x.y,u+=b,i+=R,g=Pe(m),m=as(g)}}return yo({width:a,height:f,x:u,y:i})}function zo(e,t){const n=Ho(e).scrollLeft;return t?t.left+n:St(Ze(e)).left+n}function Kd(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-zo(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function By(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",c=Ze(r),l=t?Go(t.floating):!1;if(r===c||l&&s)return n;let u={scrollLeft:0,scrollTop:0},i=We(1);const a=We(0),f=Xe(r);if((f||!f&&!s)&&((en(r)!=="body"||zn(c))&&(u=Ho(r)),Xe(r))){const p=St(r);i=Wt(r),a.x=p.x+r.clientLeft,a.y=p.y+r.clientTop}const d=c&&!f&&!s?Kd(c,u):We(0);return{width:n.width*i.x,height:n.height*i.y,x:n.x*i.x-u.scrollLeft*i.x+a.x+d.x,y:n.y*i.y-u.scrollTop*i.y+a.y+d.y}}function $y(e){return Array.from(e.getClientRects())}function Uy(e){const t=Ze(e),n=Ho(e),r=e.ownerDocument.body,o=je(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=je(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+zo(e);const l=-n.scrollTop;return $e(r).direction==="rtl"&&(c+=je(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:c,y:l}}const Uc=25;function Gy(e,t){const n=Pe(e),r=Ze(e),o=n.visualViewport;let s=r.clientWidth,c=r.clientHeight,l=0,u=0;if(o){s=o.width,c=o.height;const a=ua();(!a||a&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}const i=zo(r);if(i<=0){const a=r.ownerDocument,f=a.body,d=getComputedStyle(f),p=a.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-p);g<=Uc&&(s-=g)}else i<=Uc&&(s+=i);return{width:s,height:c,x:l,y:u}}const Hy=new Set(["absolute","fixed"]);function zy(e,t){const n=St(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Xe(e)?Wt(e):We(1),c=e.clientWidth*s.x,l=e.clientHeight*s.y,u=o*s.x,i=r*s.y;return{width:c,height:l,x:u,y:i}}function Gc(e,t,n){let r;if(t==="viewport")r=Gy(e,n);else if(t==="document")r=Uy(Ze(e));else if(Be(t))r=zy(t,n);else{const o=qd(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return yo(r)}function Xd(e,t){const n=ut(e);return n===t||!Be(n)||Kt(n)?!1:$e(n).position==="fixed"||Xd(n,t)}function Wy(e,t){const n=t.get(e);if(n)return n;let r=An(e,[],!1).filter(l=>Be(l)&&en(l)!=="body"),o=null;const s=$e(e).position==="fixed";let c=s?ut(e):e;for(;Be(c)&&!Kt(c);){const l=$e(c),u=ca(c);!u&&l.position==="fixed"&&(o=null),(s?!u&&!o:!u&&l.position==="static"&&!!o&&Hy.has(o.position)||zn(c)&&!u&&Xd(e,c))?r=r.filter(a=>a!==c):o=l,c=ut(c)}return t.set(e,r),r}function qy(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const c=[...n==="clippingAncestors"?Go(t)?[]:Wy(t,this._c):[].concat(n),r],l=c[0],u=c.reduce((i,a)=>{const f=Gc(t,a,o);return i.top=je(f.top,i.top),i.right=ct(f.right,i.right),i.bottom=ct(f.bottom,i.bottom),i.left=je(f.left,i.left),i},Gc(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Ky(e){const{width:t,height:n}=Wd(e);return{width:t,height:n}}function Xy(e,t,n){const r=Xe(t),o=Ze(t),s=n==="fixed",c=St(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const u=We(0);function i(){u.x=zo(o)}if(r||!r&&!s)if((en(t)!=="body"||zn(o))&&(l=Ho(t)),r){const p=St(t,!0,s,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else o&&i();s&&!r&&o&&i();const a=o&&!r&&!s?Kd(o,l):We(0),f=c.left+l.scrollLeft-u.x-a.x,d=c.top+l.scrollTop-u.y-a.y;return{x:f,y:d,width:c.width,height:c.height}}function Ci(e){return $e(e).position==="static"}function Hc(e,t){if(!Xe(e)||$e(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ze(e)===n&&(n=n.ownerDocument.body),n}function Yd(e,t){const n=Pe(e);if(Go(e))return n;if(!Xe(e)){let o=ut(e);for(;o&&!Kt(o);){if(Be(o)&&!Ci(o))return o;o=ut(o)}return n}let r=Hc(e,t);for(;r&&Oy(r)&&Ci(r);)r=Hc(r,t);return r&&Kt(r)&&Ci(r)&&!ca(r)?n:r||ky(e)||n}const Yy=async function(e){const t=this.getOffsetParent||Yd,n=this.getDimensions,r=await n(e.floating);return{reference:Xy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Zy(e){return $e(e).direction==="rtl"}const Qy={convertOffsetParentRelativeRectToViewportRelativeRect:By,getDocumentElement:Ze,getClippingRect:qy,getOffsetParent:Yd,getElementRects:Yy,getClientRects:$y,getDimensions:Ky,getScale:Wt,isElement:Be,isRTL:Zy};function Zd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Jy(e,t){let n=null,r;const o=Ze(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function c(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const i=e.getBoundingClientRect(),{left:a,top:f,width:d,height:p}=i;if(l||t(),!d||!p)return;const g=mr(f),m=mr(o.clientWidth-(a+d)),x=mr(o.clientHeight-(f+p)),y=mr(a),b={rootMargin:-g+"px "+-m+"px "+-x+"px "+-y+"px",threshold:je(0,ct(1,u))||1};let R=!0;function w(P){const C=P[0].intersectionRatio;if(C!==u){if(!R)return c();C?c(!1,C):r=setTimeout(()=>{c(!1,1e-7)},1e3)}C===1&&!Zd(i,e.getBoundingClientRect())&&c(),R=!1}try{n=new IntersectionObserver(w,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,b)}n.observe(e)}return c(!0),s}function e1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,i=la(e),a=o||s?[...i?An(i):[],...An(t)]:[];a.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=i&&l?Jy(i,n):null;let d=-1,p=null;c&&(p=new ResizeObserver(y=>{let[E]=y;E&&E.target===i&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),i&&!u&&p.observe(i),p.observe(t));let g,m=u?St(e):null;u&&x();function x(){const y=St(e);m&&!Zd(m,y)&&n(),m=y,g=requestAnimationFrame(x)}return n(),()=>{var y;a.forEach(E=>{o&&E.removeEventListener("scroll",n),s&&E.removeEventListener("resize",n)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,u&&cancelAnimationFrame(g)}}const t1=Cy,n1=_y,r1=wy,o1=Py,i1=Ry,zc=by,s1=jy,a1=(e,t,n)=>{const r=new Map,o={platform:Qy,...n},s={...o.platform,_c:r};return Ey(e,t,{...o,platform:s})};var c1=typeof document<"u",u1=function(){},co=c1?S.useLayoutEffect:u1;function Eo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Eo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Eo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Qd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wc(e,t){const n=Qd(e);return Math.round(t*n)/n}function _i(e){const t=v.useRef(e);return co(()=>{t.current=e}),t}function l1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:c}={},transform:l=!0,whileElementsMounted:u,open:i}=e,[a,f]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=v.useState(r);Eo(d,r)||p(r);const[g,m]=v.useState(null),[x,y]=v.useState(null),E=v.useCallback($=>{$!==P.current&&(P.current=$,m($))},[]),b=v.useCallback($=>{$!==C.current&&(C.current=$,y($))},[]),R=s||g,w=c||x,P=v.useRef(null),C=v.useRef(null),_=v.useRef(a),M=u!=null,j=_i(u),A=_i(o),I=_i(i),F=v.useCallback(()=>{if(!P.current||!C.current)return;const $={placement:t,strategy:n,middleware:d};A.current&&($.platform=A.current),a1(P.current,C.current,$).then(V=>{const T={...V,isPositioned:I.current!==!1};B.current&&!Eo(_.current,T)&&(_.current=T,qs.flushSync(()=>{f(T)}))})},[d,t,n,A,I]);co(()=>{i===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f($=>({...$,isPositioned:!1})))},[i]);const B=v.useRef(!1);co(()=>(B.current=!0,()=>{B.current=!1}),[]),co(()=>{if(R&&(P.current=R),w&&(C.current=w),R&&w){if(j.current)return j.current(R,w,F);F()}},[R,w,F,j,M]);const q=v.useMemo(()=>({reference:P,floating:C,setReference:E,setFloating:b}),[E,b]),U=v.useMemo(()=>({reference:R,floating:w}),[R,w]),G=v.useMemo(()=>{const $={position:n,left:0,top:0};if(!U.floating)return $;const V=Wc(U.floating,a.x),T=Wc(U.floating,a.y);return l?{...$,transform:"translate("+V+"px, "+T+"px)",...Qd(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:T}},[n,l,U.floating,a.x,a.y]);return v.useMemo(()=>({...a,update:F,refs:q,elements:U,floatingStyles:G}),[a,F,q,U,G])}const f1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?zc({element:r.current,padding:o}).fn(n):{}:r?zc({element:r,padding:o}).fn(n):{}}}},d1=(e,t)=>({...t1(e),options:[e,t]}),h1=(e,t)=>({...n1(e),options:[e,t]}),p1=(e,t)=>({...s1(e),options:[e,t]}),m1=(e,t)=>({...r1(e),options:[e,t]}),g1=(e,t)=>({...o1(e),options:[e,t]}),x1=(e,t)=>({...i1(e),options:[e,t]}),v1=(e,t)=>({...f1(e),options:[e,t]});var y1="Arrow",Jd=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return h.jsxRuntimeExports.jsx(h.Primitive.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});Jd.displayName=y1;var E1=Jd,fa="Popper",[eh,dt]=he(fa),[b1,th]=eh(fa),nh=e=>{const{__scopePopper:t,children:n}=e,[r,o]=v.useState(null);return h.jsxRuntimeExports.jsx(b1,{scope:t,anchor:r,onAnchorChange:o,children:n})};nh.displayName=fa;var rh="PopperAnchor",oh=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=th(rh,n),c=v.useRef(null),l=h.useComposedRefs(t,c),u=v.useRef(null);return v.useEffect(()=>{const i=u.current;u.current=(r==null?void 0:r.current)||c.current,i!==u.current&&s.onAnchorChange(u.current)}),r?null:h.jsxRuntimeExports.jsx(h.Primitive.div,{...o,ref:l})});oh.displayName=rh;var da="PopperContent",[w1,R1]=eh(da),ih=v.forwardRef((e,t)=>{var k,W,K,z,J,D;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:c=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:i=[],collisionPadding:a=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=e,x=th(da,n),[y,E]=v.useState(null),b=h.useComposedRefs(t,ae=>E(ae)),[R,w]=v.useState(null),P=Hn(R),C=(P==null?void 0:P.width)??0,_=(P==null?void 0:P.height)??0,M=r+(s!=="center"?"-"+s:""),j=typeof a=="number"?a:{top:0,right:0,bottom:0,left:0,...a},A=Array.isArray(i)?i:[i],I=A.length>0,F={padding:j,boundary:A.filter(C1),altBoundary:I},{refs:B,floatingStyles:q,placement:U,isPositioned:G,middlewareData:$}=l1({strategy:"fixed",placement:M,whileElementsMounted:(...ae)=>e1(...ae,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[d1({mainAxis:o+_,alignmentAxis:c}),u&&h1({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?p1():void 0,...F}),u&&m1({...F}),g1({...F,apply:({elements:ae,rects:ve,availableWidth:rt,availableHeight:ln})=>{const{width:fn,height:Kx}=ve.reference,cr=ae.floating.style;cr.setProperty("--radix-popper-available-width",`${rt}px`),cr.setProperty("--radix-popper-available-height",`${ln}px`),cr.setProperty("--radix-popper-anchor-width",`${fn}px`),cr.setProperty("--radix-popper-anchor-height",`${Kx}px`)}}),R&&v1({element:R,padding:l}),_1({arrowWidth:C,arrowHeight:_}),d&&x1({strategy:"referenceHidden",...F})]}),[V,T]=ch(U),L=Ve(g);h.useLayoutEffect2(()=>{G&&(L==null||L())},[G,L]);const Y=(k=$.arrow)==null?void 0:k.x,Q=(W=$.arrow)==null?void 0:W.y,X=((K=$.arrow)==null?void 0:K.centerOffset)!==0,[ee,Z]=v.useState();return h.useLayoutEffect2(()=>{y&&Z(window.getComputedStyle(y).zIndex)},[y]),h.jsxRuntimeExports.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:G?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(z=$.transformOrigin)==null?void 0:z.x,(J=$.transformOrigin)==null?void 0:J.y].join(" "),...((D=$.hide)==null?void 0:D.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsxRuntimeExports.jsx(w1,{scope:n,placedSide:V,onArrowChange:w,arrowX:Y,arrowY:Q,shouldHideArrow:X,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-side":V,"data-align":T,...m,ref:b,style:{...m.style,animation:G?void 0:"none"}})})})});ih.displayName=da;var sh="PopperArrow",S1={top:"bottom",right:"left",bottom:"top",left:"right"},ah=v.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=R1(sh,r),c=S1[s.placedSide];return h.jsxRuntimeExports.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]: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:h.jsxRuntimeExports.jsx(E1,{...o,ref:n,style:{...o.style,display:"block"}})})});ah.displayName=sh;function C1(e){return e!==null}var _1=e=>({name:"transformOrigin",options:e,fn(t){var x,y,E;const{placement:n,rects:r,middlewareData:o}=t,c=((x=o.arrow)==null?void 0:x.centerOffset)!==0,l=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[i,a]=ch(n),f={start:"0%",center:"50%",end:"100%"}[a],d=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,p=(((E=o.arrow)==null?void 0:E.y)??0)+u/2;let g="",m="";return i==="bottom"?(g=c?f:`${d}px`,m=`${-u}px`):i==="top"?(g=c?f:`${d}px`,m=`${r.floating.height+u}px`):i==="right"?(g=`${-u}px`,m=c?f:`${p}px`):i==="left"&&(g=`${r.floating.width+u}px`,m=c?f:`${p}px`),{data:{x:g,y:m}}}});function ch(e){const[t,n="center"]=e.split("-");return[t,n]}var Wo=nh,Wn=oh,qo=ih,Ko=ah,ji="rovingFocusGroup.onEntryFocus",j1={bubbles:!1,cancelable:!0},qn="RovingFocusGroup",[cs,uh,P1]=Bn(qn),[T1,tn]=he(qn,[P1]),[A1,O1]=T1(qn),lh=v.forwardRef((e,t)=>h.jsxRuntimeExports.jsx(cs.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsxRuntimeExports.jsx(cs.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsxRuntimeExports.jsx(M1,{...e,ref:t})})}));lh.displayName=qn;var M1=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:i,preventScrollOnEntryFocus:a=!1,...f}=e,d=v.useRef(null),p=h.useComposedRefs(t,d),g=Tt(s),[m,x]=we({prop:c,defaultProp:l??null,onChange:u,caller:qn}),[y,E]=v.useState(!1),b=Ve(i),R=uh(n),w=v.useRef(!1),[P,C]=v.useState(0);return v.useEffect(()=>{const _=d.current;if(_)return _.addEventListener(ji,b),()=>_.removeEventListener(ji,b)},[b]),h.jsxRuntimeExports.jsx(A1,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:m,onItemFocus:v.useCallback(_=>x(_),[x]),onItemShiftTab:v.useCallback(()=>E(!0),[]),onFocusableItemAdd:v.useCallback(()=>C(_=>_+1),[]),onFocusableItemRemove:v.useCallback(()=>C(_=>_-1),[]),children:h.jsxRuntimeExports.jsx(h.Primitive.div,{tabIndex:y||P===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:N(e.onMouseDown,()=>{w.current=!0}),onFocus:N(e.onFocus,_=>{const M=!w.current;if(_.target===_.currentTarget&&M&&!y){const j=new CustomEvent(ji,j1);if(_.currentTarget.dispatchEvent(j),!j.defaultPrevented){const A=R().filter(U=>U.focusable),I=A.find(U=>U.active),F=A.find(U=>U.id===m),q=[I,F,...A].filter(Boolean).map(U=>U.ref.current);hh(q,a)}}w.current=!1}),onBlur:N(e.onBlur,()=>E(!1))})})}),fh="RovingFocusGroupItem",dh=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:c,...l}=e,u=ge(),i=s||u,a=O1(fh,n),f=a.currentTabStopId===i,d=uh(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:m}=a;return v.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),h.jsxRuntimeExports.jsx(cs.ItemSlot,{scope:n,id:i,focusable:r,active:o,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{tabIndex:f?0:-1,"data-orientation":a.orientation,...l,ref:t,onMouseDown:N(e.onMouseDown,x=>{r?a.onItemFocus(i):x.preventDefault()}),onFocus:N(e.onFocus,()=>a.onItemFocus(i)),onKeyDown:N(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){a.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=N1(x,a.orientation,a.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=d().filter(R=>R.focusable).map(R=>R.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const R=b.indexOf(x.currentTarget);b=a.loop?k1(b,R+1):b.slice(R+1)}setTimeout(()=>hh(b))}}),children:typeof c=="function"?c({isCurrentTabStop:f,hasTabStop:m!=null}):c})})});dh.displayName=fh;var I1={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function D1(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function N1(e,t,n){const r=D1(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return I1[r]}function hh(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function k1(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ha=lh,pa=dh,us=["Enter"," "],L1=["ArrowDown","PageUp","Home"],ph=["ArrowUp","PageDown","End"],F1=[...L1,...ph],V1={ltr:[...us,"ArrowRight"],rtl:[...us,"ArrowLeft"]},B1={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Kn="Menu",[On,$1,U1]=Bn(Kn),[At,mh]=he(Kn,[U1,dt,tn]),Xo=dt(),gh=tn(),[G1,Ot]=At(Kn),[H1,Xn]=At(Kn),xh=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:c=!0}=e,l=Xo(t),[u,i]=v.useState(null),a=v.useRef(!1),f=Ve(s),d=Tt(o);return v.useEffect(()=>{const p=()=>{a.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>a.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),h.jsxRuntimeExports.jsx(Wo,{...l,children:h.jsxRuntimeExports.jsx(G1,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:i,children:h.jsxRuntimeExports.jsx(H1,{scope:t,onClose:v.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:a,dir:d,modal:c,children:r})})})};xh.displayName=Kn;var z1="MenuAnchor",ma=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xo(n);return h.jsxRuntimeExports.jsx(Wn,{...o,...r,ref:t})});ma.displayName=z1;var ga="MenuPortal",[W1,vh]=At(ga,{forceMount:void 0}),yh=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ot(ga,t);return h.jsxRuntimeExports.jsx(W1,{scope:t,forceMount:n,children:h.jsxRuntimeExports.jsx(Re,{present:n||s.open,children:h.jsxRuntimeExports.jsx(h.Portal,{asChild:!0,container:o,children:r})})})};yh.displayName=ga;var Me="MenuContent",[q1,xa]=At(Me),Eh=v.forwardRef((e,t)=>{const n=vh(Me,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ot(Me,e.__scopeMenu),c=Xn(Me,e.__scopeMenu);return h.jsxRuntimeExports.jsx(On.Provider,{scope:e.__scopeMenu,children:h.jsxRuntimeExports.jsx(Re,{present:r||s.open,children:h.jsxRuntimeExports.jsx(On.Slot,{scope:e.__scopeMenu,children:c.modal?h.jsxRuntimeExports.jsx(K1,{...o,ref:t}):h.jsxRuntimeExports.jsx(X1,{...o,ref:t})})})})}),K1=v.forwardRef((e,t)=>{const n=Ot(Me,e.__scopeMenu),r=v.useRef(null),o=h.useComposedRefs(t,r);return v.useEffect(()=>{const s=r.current;if(s)return Vo(s)},[]),h.jsxRuntimeExports.jsx(va,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:N(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),X1=v.forwardRef((e,t)=>{const n=Ot(Me,e.__scopeMenu);return h.jsxRuntimeExports.jsx(va,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Y1=h.createSlot("MenuContent.ScrollLock"),va=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f,onInteractOutside:d,onDismiss:p,disableOutsideScroll:g,...m}=e,x=Ot(Me,n),y=Xn(Me,n),E=Xo(n),b=gh(n),R=$1(n),[w,P]=v.useState(null),C=v.useRef(null),_=h.useComposedRefs(t,C,x.onContentChange),M=v.useRef(0),j=v.useRef(""),A=v.useRef(0),I=v.useRef(null),F=v.useRef("right"),B=v.useRef(0),q=g?Un:v.Fragment,U=g?{as:Y1,allowPinchZoom:!0}:void 0,G=V=>{var k,W;const T=j.current+V,L=R().filter(K=>!K.disabled),Y=document.activeElement,Q=(k=L.find(K=>K.ref.current===Y))==null?void 0:k.textValue,X=L.map(K=>K.textValue),ee=cE(X,T,Q),Z=(W=L.find(K=>K.textValue===ee))==null?void 0:W.ref.current;(function K(z){j.current=z,window.clearTimeout(M.current),z!==""&&(M.current=window.setTimeout(()=>K(""),1e3))})(T),Z&&setTimeout(()=>Z.focus())};v.useEffect(()=>()=>window.clearTimeout(M.current),[]),Lo();const $=v.useCallback(V=>{var L,Y;return F.current===((L=I.current)==null?void 0:L.side)&&lE(V,(Y=I.current)==null?void 0:Y.area)},[]);return h.jsxRuntimeExports.jsx(q1,{scope:n,searchRef:j,onItemEnter:v.useCallback(V=>{$(V)&&V.preventDefault()},[$]),onItemLeave:v.useCallback(V=>{var T;$(V)||((T=C.current)==null||T.focus(),P(null))},[$]),onTriggerLeave:v.useCallback(V=>{$(V)&&V.preventDefault()},[$]),pointerGraceTimerRef:A,onPointerGraceIntentChange:v.useCallback(V=>{I.current=V},[]),children:h.jsxRuntimeExports.jsx(q,{...U,children:h.jsxRuntimeExports.jsx($n,{asChild:!0,trapped:o,onMountAutoFocus:N(s,V=>{var T;V.preventDefault(),(T=C.current)==null||T.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:h.jsxRuntimeExports.jsx(Qt,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f,onInteractOutside:d,onDismiss:p,children:h.jsxRuntimeExports.jsx(ha,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:w,onCurrentTabStopIdChange:P,onEntryFocus:N(u,V=>{y.isUsingKeyboardRef.current||V.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsxRuntimeExports.jsx(qo,{role:"menu","aria-orientation":"vertical","data-state":kh(x.open),"data-radix-menu-content":"",dir:y.dir,...E,...m,ref:_,style:{outline:"none",...m.style},onKeyDown:N(m.onKeyDown,V=>{const L=V.target.closest("[data-radix-menu-content]")===V.currentTarget,Y=V.ctrlKey||V.altKey||V.metaKey,Q=V.key.length===1;L&&(V.key==="Tab"&&V.preventDefault(),!Y&&Q&&G(V.key));const X=C.current;if(V.target!==X||!F1.includes(V.key))return;V.preventDefault();const Z=R().filter(k=>!k.disabled).map(k=>k.ref.current);ph.includes(V.key)&&Z.reverse(),sE(Z)}),onBlur:N(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(M.current),j.current="")}),onPointerMove:N(e.onPointerMove,Mn(V=>{const T=V.target,L=B.current!==V.clientX;if(V.currentTarget.contains(T)&&L){const Y=V.clientX>B.current?"right":"left";F.current=Y,B.current=V.clientX}}))})})})})})})});Eh.displayName=Me;var Z1="MenuGroup",ya=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"group",...r,ref:t})});ya.displayName=Z1;var Q1="MenuLabel",bh=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.div,{...r,ref:t})});bh.displayName=Q1;var bo="MenuItem",qc="menu.itemSelect",Yo=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=v.useRef(null),c=Xn(bo,e.__scopeMenu),l=xa(bo,e.__scopeMenu),u=h.useComposedRefs(t,s),i=v.useRef(!1),a=()=>{const f=s.current;if(!n&&f){const d=new CustomEvent(qc,{bubbles:!0,cancelable:!0});f.addEventListener(qc,p=>r==null?void 0:r(p),{once:!0}),h.dispatchDiscreteCustomEvent(f,d),d.defaultPrevented?i.current=!1:c.onClose()}};return h.jsxRuntimeExports.jsx(wh,{...o,ref:u,disabled:n,onClick:N(e.onClick,a),onPointerDown:f=>{var d;(d=e.onPointerDown)==null||d.call(e,f),i.current=!0},onPointerUp:N(e.onPointerUp,f=>{var d;i.current||(d=f.currentTarget)==null||d.click()}),onKeyDown:N(e.onKeyDown,f=>{const d=l.searchRef.current!=="";n||d&&f.key===" "||us.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Yo.displayName=bo;var wh=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,c=xa(bo,n),l=gh(n),u=v.useRef(null),i=h.useComposedRefs(t,u),[a,f]=v.useState(!1),[d,p]=v.useState("");return v.useEffect(()=>{const g=u.current;g&&p((g.textContent??"").trim())},[s.children]),h.jsxRuntimeExports.jsx(On.ItemSlot,{scope:n,disabled:r,textValue:o??d,children:h.jsxRuntimeExports.jsx(pa,{asChild:!0,...l,focusable:!r,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"menuitem","data-highlighted":a?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:i,onPointerMove:N(e.onPointerMove,Mn(g=>{r?c.onItemLeave(g):(c.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:N(e.onPointerLeave,Mn(g=>c.onItemLeave(g))),onFocus:N(e.onFocus,()=>f(!0)),onBlur:N(e.onBlur,()=>f(!1))})})})}),J1="MenuCheckboxItem",Rh=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return h.jsxRuntimeExports.jsx(Ph,{scope:e.__scopeMenu,checked:n,children:h.jsxRuntimeExports.jsx(Yo,{role:"menuitemcheckbox","aria-checked":wo(n)?"mixed":n,...o,ref:t,"data-state":ba(n),onSelect:N(o.onSelect,()=>r==null?void 0:r(wo(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Rh.displayName=J1;var Sh="MenuRadioGroup",[eE,tE]=At(Sh,{value:void 0,onValueChange:()=>{}}),Ch=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Ve(r);return h.jsxRuntimeExports.jsx(eE,{scope:e.__scopeMenu,value:n,onValueChange:s,children:h.jsxRuntimeExports.jsx(ya,{...o,ref:t})})});Ch.displayName=Sh;var _h="MenuRadioItem",jh=v.forwardRef((e,t)=>{const{value:n,...r}=e,o=tE(_h,e.__scopeMenu),s=n===o.value;return h.jsxRuntimeExports.jsx(Ph,{scope:e.__scopeMenu,checked:s,children:h.jsxRuntimeExports.jsx(Yo,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":ba(s),onSelect:N(r.onSelect,()=>{var c;return(c=o.onValueChange)==null?void 0:c.call(o,n)},{checkForDefaultPrevented:!1})})})});jh.displayName=_h;var Ea="MenuItemIndicator",[Ph,nE]=At(Ea,{checked:!1}),Th=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=nE(Ea,n);return h.jsxRuntimeExports.jsx(Re,{present:r||wo(s.checked)||s.checked===!0,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{...o,ref:t,"data-state":ba(s.checked)})})});Th.displayName=Ea;var rE="MenuSeparator",Ah=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ah.displayName=rE;var oE="MenuArrow",Oh=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xo(n);return h.jsxRuntimeExports.jsx(Ko,{...o,...r,ref:t})});Oh.displayName=oE;var iE="MenuSub",[IM,Mh]=At(iE),bn="MenuSubTrigger",Ih=v.forwardRef((e,t)=>{const n=Ot(bn,e.__scopeMenu),r=Xn(bn,e.__scopeMenu),o=Mh(bn,e.__scopeMenu),s=xa(bn,e.__scopeMenu),c=v.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=s,i={__scopeMenu:e.__scopeMenu},a=v.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return v.useEffect(()=>a,[a]),v.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),u(null)}},[l,u]),h.jsxRuntimeExports.jsx(ma,{asChild:!0,...i,children:h.jsxRuntimeExports.jsx(wh,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":kh(n.open),...e,ref:h.composeRefs(t,o.onTriggerChange),onClick:f=>{var d;(d=e.onClick)==null||d.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:N(e.onPointerMove,Mn(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),a()},100))})),onPointerLeave:N(e.onPointerLeave,Mn(f=>{var p,g;a();const d=(p=n.content)==null?void 0:p.getBoundingClientRect();if(d){const m=(g=n.content)==null?void 0:g.dataset.side,x=m==="right",y=x?-5:5,E=d[x?"left":"right"],b=d[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x:E,y:d.top},{x:b,y:d.top},{x:b,y:d.bottom},{x:E,y:d.bottom}],side:m}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:N(e.onKeyDown,f=>{var p;const d=s.searchRef.current!=="";e.disabled||d&&f.key===" "||V1[r.dir].includes(f.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),f.preventDefault())})})})});Ih.displayName=bn;var Dh="MenuSubContent",Nh=v.forwardRef((e,t)=>{const n=vh(Me,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ot(Me,e.__scopeMenu),c=Xn(Me,e.__scopeMenu),l=Mh(Dh,e.__scopeMenu),u=v.useRef(null),i=h.useComposedRefs(t,u);return h.jsxRuntimeExports.jsx(On.Provider,{scope:e.__scopeMenu,children:h.jsxRuntimeExports.jsx(Re,{present:r||s.open,children:h.jsxRuntimeExports.jsx(On.Slot,{scope:e.__scopeMenu,children:h.jsxRuntimeExports.jsx(va,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:i,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:a=>{var f;c.isUsingKeyboardRef.current&&((f=u.current)==null||f.focus()),a.preventDefault()},onCloseAutoFocus:a=>a.preventDefault(),onFocusOutside:N(e.onFocusOutside,a=>{a.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:N(e.onEscapeKeyDown,a=>{c.onClose(),a.preventDefault()}),onKeyDown:N(e.onKeyDown,a=>{var p;const f=a.currentTarget.contains(a.target),d=B1[c.dir].includes(a.key);f&&d&&(s.onOpenChange(!1),(p=l.trigger)==null||p.focus(),a.preventDefault())})})})})})});Nh.displayName=Dh;function kh(e){return e?"open":"closed"}function wo(e){return e==="indeterminate"}function ba(e){return wo(e)?"indeterminate":e?"checked":"unchecked"}function sE(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function aE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function cE(e,t,n){const o=t.length>1&&Array.from(t).every(i=>i===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=aE(e,Math.max(s,0));o.length===1&&(c=c.filter(i=>i!==n));const u=c.find(i=>i.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function uE(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const l=t[s],u=t[c],i=l.x,a=l.y,f=u.x,d=u.y;a>r!=d>r&&n<(f-i)*(r-a)/(d-a)+i&&(o=!o)}return o}function lE(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return uE(n,t)}function Mn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var fE=xh,dE=ma,hE=yh,pE=Eh,mE=ya,gE=bh,xE=Yo,vE=Rh,yE=Ch,EE=jh,bE=Th,wE=Ah,RE=Oh,SE=Ih,CE=Nh,Zo="DropdownMenu",[_E]=he(Zo,[mh]),Se=mh(),[jE,Lh]=_E(Zo),Fh=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:c,modal:l=!0}=e,u=Se(t),i=v.useRef(null),[a,f]=we({prop:o,defaultProp:s??!1,onChange:c,caller:Zo});return h.jsxRuntimeExports.jsx(jE,{scope:t,triggerId:ge(),triggerRef:i,contentId:ge(),open:a,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(d=>!d),[f]),modal:l,children:h.jsxRuntimeExports.jsx(fE,{...u,open:a,onOpenChange:f,dir:r,modal:l,children:n})})};Fh.displayName=Zo;var Vh="DropdownMenuTrigger",Bh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Lh(Vh,n),c=Se(n);return h.jsxRuntimeExports.jsx(dE,{asChild:!0,...c,children:h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:h.composeRefs(t,s.triggerRef),onPointerDown:N(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:N(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Bh.displayName=Vh;var PE="DropdownMenuPortal",$h=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Se(t);return h.jsxRuntimeExports.jsx(hE,{...r,...n})};$h.displayName=PE;var Uh="DropdownMenuContent",Gh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lh(Uh,n),s=Se(n),c=v.useRef(!1);return h.jsxRuntimeExports.jsx(pE,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:N(e.onCloseAutoFocus,l=>{var u;c.current||(u=o.triggerRef.current)==null||u.focus(),c.current=!1,l.preventDefault()}),onInteractOutside:N(e.onInteractOutside,l=>{const u=l.detail.originalEvent,i=u.button===0&&u.ctrlKey===!0,a=u.button===2||i;(!o.modal||a)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Gh.displayName=Uh;var TE="DropdownMenuGroup",AE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(mE,{...o,...r,ref:t})});AE.displayName=TE;var OE="DropdownMenuLabel",Hh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(gE,{...o,...r,ref:t})});Hh.displayName=OE;var ME="DropdownMenuItem",zh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(xE,{...o,...r,ref:t})});zh.displayName=ME;var IE="DropdownMenuCheckboxItem",DE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(vE,{...o,...r,ref:t})});DE.displayName=IE;var NE="DropdownMenuRadioGroup",kE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(yE,{...o,...r,ref:t})});kE.displayName=NE;var LE="DropdownMenuRadioItem",FE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(EE,{...o,...r,ref:t})});FE.displayName=LE;var VE="DropdownMenuItemIndicator",BE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(bE,{...o,...r,ref:t})});BE.displayName=VE;var $E="DropdownMenuSeparator",Wh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(wE,{...o,...r,ref:t})});Wh.displayName=$E;var UE="DropdownMenuArrow",GE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(RE,{...o,...r,ref:t})});GE.displayName=UE;var HE="DropdownMenuSubTrigger",zE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(SE,{...o,...r,ref:t})});zE.displayName=HE;var WE="DropdownMenuSubContent",qE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(CE,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});qE.displayName=WE;var KE=Fh,XE=Bh,YE=$h,ZE=Gh,QE=Hh,JE=zh,eb=Wh,tb="Label",qh=v.forwardRef((e,t)=>h.jsxRuntimeExports.jsx(h.Primitive.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));qh.displayName=tb;var[wa]=he("Form"),Ra="Form",[nb,Yn]=wa(Ra),[rb,Kh]=wa(Ra),Xh=v.forwardRef((e,t)=>{const{__scopeForm:n,onClearServerErrors:r=()=>{},...o}=e,s=v.useRef(null),c=h.useComposedRefs(t,s),[l,u]=v.useState({}),i=v.useCallback(j=>l[j],[l]),a=v.useCallback((j,A)=>u(I=>({...I,[j]:{...I[j]??{},...A}})),[]),f=v.useCallback(j=>{u(A=>({...A,[j]:void 0})),E(A=>({...A,[j]:{}}))},[]),[d,p]=v.useState({}),g=v.useCallback(j=>d[j]??[],[d]),m=v.useCallback((j,A)=>{p(I=>({...I,[j]:[...I[j]??[],A]}))},[]),x=v.useCallback((j,A)=>{p(I=>({...I,[j]:(I[j]??[]).filter(F=>F.id!==A)}))},[]),[y,E]=v.useState({}),b=v.useCallback(j=>y[j]??{},[y]),R=v.useCallback((j,A)=>{E(I=>({...I,[j]:{...I[j]??{},...A}}))},[]),[w,P]=v.useState({}),C=v.useCallback((j,A)=>{P(I=>{const F=new Set(I[j]).add(A);return{...I,[j]:F}})},[]),_=v.useCallback((j,A)=>{P(I=>{const F=new Set(I[j]);return F.delete(A),{...I,[j]:F}})},[]),M=v.useCallback(j=>Array.from(w[j]??[]).join(" ")||void 0,[w]);return h.jsxRuntimeExports.jsx(nb,{scope:n,getFieldValidity:i,onFieldValidityChange:a,getFieldCustomMatcherEntries:g,onFieldCustomMatcherEntryAdd:m,onFieldCustomMatcherEntryRemove:x,getFieldCustomErrors:b,onFieldCustomErrorsChange:R,onFieldValiditionClear:f,children:h.jsxRuntimeExports.jsx(rb,{scope:n,onFieldMessageIdAdd:C,onFieldMessageIdRemove:_,getFieldDescription:M,children:h.jsxRuntimeExports.jsx(h.Primitive.form,{...o,ref:c,onInvalid:N(e.onInvalid,j=>{const A=ep(j.currentTarget);A===j.target&&A.focus(),j.preventDefault()}),onSubmit:N(e.onSubmit,r,{checkForDefaultPrevented:!1}),onReset:N(e.onReset,r)})})})});Xh.displayName=Ra;var Sa="FormField",[ob,Ca]=wa(Sa),Yh=v.forwardRef((e,t)=>{const{__scopeForm:n,name:r,serverInvalid:o=!1,...s}=e,l=Yn(Sa,n).getFieldValidity(r),u=ge();return h.jsxRuntimeExports.jsx(ob,{scope:n,id:u,name:r,serverInvalid:o,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-valid":ja(l,o),"data-invalid":Pa(l,o),...s,ref:t})})});Yh.displayName=Sa;var ls="FormLabel",Zh=v.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e,o=Yn(ls,n),s=Ca(ls,n),c=r.htmlFor||s.id,l=o.getFieldValidity(s.name);return h.jsxRuntimeExports.jsx(qh,{"data-valid":ja(l,s.serverInvalid),"data-invalid":Pa(l,s.serverInvalid),...r,ref:t,htmlFor:c})});Zh.displayName=ls;var uo="FormControl",Qh=v.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e,o=Yn(uo,n),s=Ca(uo,n),c=Kh(uo,n),l=v.useRef(null),u=h.useComposedRefs(t,l),i=r.name||s.name,a=r.id||s.id,f=o.getFieldCustomMatcherEntries(i),{onFieldValidityChange:d,onFieldCustomErrorsChange:p,onFieldValiditionClear:g}=o,m=v.useCallback(async E=>{if(tp(E.validity)){const I=Pi(E.validity);d(i,I);return}const b=E.form?new FormData(E.form):new FormData,R=[E.value,b],w=[],P=[];f.forEach(I=>{hb(I,R)?P.push(I):pb(I)&&w.push(I)});const C=w.map(({id:I,match:F})=>[I,F(...R)]),_=Object.fromEntries(C),M=Object.values(_).some(Boolean),j=M;E.setCustomValidity(j?In:"");const A=Pi(E.validity);if(d(i,A),p(i,_),!M&&P.length>0){const I=P.map(({id:$,match:V})=>V(...R).then(T=>[$,T])),F=await Promise.all(I),B=Object.fromEntries(F),U=Object.values(B).some(Boolean);E.setCustomValidity(U?In:"");const G=Pi(E.validity);d(i,G),p(i,B)}},[f,i,p,d]);v.useEffect(()=>{const E=l.current;if(E){const b=()=>m(E);return E.addEventListener("change",b),()=>E.removeEventListener("change",b)}},[m]);const x=v.useCallback(()=>{const E=l.current;E&&(E.setCustomValidity(""),g(i))},[i,g]);v.useEffect(()=>{var b;const E=(b=l.current)==null?void 0:b.form;if(E)return E.addEventListener("reset",x),()=>E.removeEventListener("reset",x)},[x]),v.useEffect(()=>{const E=l.current,b=E==null?void 0:E.closest("form");if(b&&s.serverInvalid){const R=ep(b);R===E&&R.focus()}},[s.serverInvalid]);const y=o.getFieldValidity(i);return h.jsxRuntimeExports.jsx(h.Primitive.input,{"data-valid":ja(y,s.serverInvalid),"data-invalid":Pa(y,s.serverInvalid),"aria-invalid":s.serverInvalid?!0:void 0,"aria-describedby":c.getFieldDescription(i),title:"",...r,ref:u,id:a,name:i,onInvalid:N(e.onInvalid,E=>{const b=E.currentTarget;m(b)}),onChange:N(e.onChange,E=>{x()})})});Qh.displayName=uo;var In="This value is not valid",ib={badInput:In,patternMismatch:"This value does not match the required pattern",rangeOverflow:"This value is too large",rangeUnderflow:"This value is too small",stepMismatch:"This value does not match the required step",tooLong:"This value is too long",tooShort:"This value is too short",typeMismatch:"This value does not match the required type",valid:void 0,valueMissing:"This value is missing"},Zn="FormMessage",Jh=v.forwardRef((e,t)=>{const{match:n,name:r,...o}=e,s=Ca(Zn,e.__scopeForm),c=r??s.name;return n===void 0?h.jsxRuntimeExports.jsx(_a,{...o,ref:t,name:c,children:e.children||In}):typeof n=="function"?h.jsxRuntimeExports.jsx(ab,{match:n,...o,ref:t,name:c}):h.jsxRuntimeExports.jsx(sb,{match:n,...o,ref:t,name:c})});Jh.displayName=Zn;var sb=v.forwardRef((e,t)=>{const{match:n,forceMatch:r=!1,name:o,children:s,...c}=e,u=Yn(Zn,c.__scopeForm).getFieldValidity(o);return r||(u==null?void 0:u[n])?h.jsxRuntimeExports.jsx(_a,{ref:t,...c,name:o,children:s??ib[n]}):null}),ab=v.forwardRef((e,t)=>{const{match:n,forceMatch:r=!1,name:o,id:s,children:c,...l}=e,u=Yn(Zn,l.__scopeForm),i=v.useRef(null),a=h.useComposedRefs(t,i),f=ge(),d=s??f,p=v.useMemo(()=>({id:d,match:n}),[d,n]),{onFieldCustomMatcherEntryAdd:g,onFieldCustomMatcherEntryRemove:m}=u;v.useEffect(()=>(g(o,p),()=>m(o,p.id)),[p,o,g,m]);const x=u.getFieldValidity(o),E=u.getFieldCustomErrors(o)[d];return r||x&&!tp(x)&&E?h.jsxRuntimeExports.jsx(_a,{id:d,ref:a,...l,name:o,children:c??In}):null}),_a=v.forwardRef((e,t)=>{const{__scopeForm:n,id:r,name:o,...s}=e,c=Kh(Zn,n),l=ge(),u=r??l,{onFieldMessageIdAdd:i,onFieldMessageIdRemove:a}=c;return v.useEffect(()=>(i(o,u),()=>a(o,u)),[o,u,i,a]),h.jsxRuntimeExports.jsx(h.Primitive.span,{id:u,...s,ref:t})}),cb="FormSubmit",ub=v.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"submit",...r,ref:t})});ub.displayName=cb;function Pi(e){const t={};for(const n in e)t[n]=e[n];return t}function lb(e){return e instanceof HTMLElement}function fb(e){return"validity"in e}function db(e){return fb(e)&&(e.validity.valid===!1||e.getAttribute("aria-invalid")==="true")}function ep(e){const t=e.elements,[n]=Array.from(t).filter(lb).filter(db);return n}function hb(e,t){return e.match.constructor.name==="AsyncFunction"||mb(e.match,t)}function pb(e){return e.match.constructor.name==="Function"}function mb(e,t){return e(...t)instanceof Promise}function tp(e){let t=!1;for(const n in e){const r=n;if(r!=="valid"&&r!=="customError"&&e[r]){t=!0;break}}return t}function ja(e,t){if((e==null?void 0:e.valid)===!0&&!t)return!0}function Pa(e,t){if((e==null?void 0:e.valid)===!1||t)return!0}var gb=Xh,xb=Yh,vb=Zh,yb=Qh,Eb=Jh;function Ro(e,[t,n]){return Math.min(n,Math.max(t,e))}var Qo="Popover",[np]=he(Qo,[dt]),Qn=dt(),[bb,Mt]=np(Qo),rp=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,l=Qn(t),u=v.useRef(null),[i,a]=v.useState(!1),[f,d]=we({prop:r,defaultProp:o??!1,onChange:s,caller:Qo});return h.jsxRuntimeExports.jsx(Wo,{...l,children:h.jsxRuntimeExports.jsx(bb,{scope:t,contentId:ge(),triggerRef:u,open:f,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(p=>!p),[d]),hasCustomAnchor:i,onCustomAnchorAdd:v.useCallback(()=>a(!0),[]),onCustomAnchorRemove:v.useCallback(()=>a(!1),[]),modal:c,children:n})})};rp.displayName=Qo;var op="PopoverAnchor",wb=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mt(op,n),s=Qn(n),{onCustomAnchorAdd:c,onCustomAnchorRemove:l}=o;return v.useEffect(()=>(c(),()=>l()),[c,l]),h.jsxRuntimeExports.jsx(Wn,{...s,...r,ref:t})});wb.displayName=op;var ip="PopoverTrigger",Rb=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mt(ip,n),s=Qn(n),c=h.useComposedRefs(t,o.triggerRef),l=h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":cp(o.open),...r,ref:c,onClick:N(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:h.jsxRuntimeExports.jsx(Wn,{asChild:!0,...s,children:l})});Rb.displayName=ip;var Sb="PopoverPortal",[DM,Cb]=np(Sb,{forceMount:void 0}),Xt="PopoverContent",_b=v.forwardRef((e,t)=>{const n=Cb(Xt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Mt(Xt,e.__scopePopover);return h.jsxRuntimeExports.jsx(Re,{present:r||s.open,children:s.modal?h.jsxRuntimeExports.jsx(Pb,{...o,ref:t}):h.jsxRuntimeExports.jsx(Tb,{...o,ref:t})})});_b.displayName=Xt;var jb=h.createSlot("PopoverContent.RemoveScroll"),Pb=v.forwardRef((e,t)=>{const n=Mt(Xt,e.__scopePopover),r=v.useRef(null),o=h.useComposedRefs(t,r),s=v.useRef(!1);return v.useEffect(()=>{const c=r.current;if(c)return Vo(c)},[]),h.jsxRuntimeExports.jsx(Un,{as:jb,allowPinchZoom:!0,children:h.jsxRuntimeExports.jsx(sp,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:N(e.onCloseAutoFocus,c=>{var l;c.preventDefault(),s.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:N(e.onPointerDownOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,i=l.button===2||u;s.current=i},{checkForDefaultPrevented:!1}),onFocusOutside:N(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),Tb=v.forwardRef((e,t)=>{const n=Mt(Xt,e.__scopePopover),r=v.useRef(!1),o=v.useRef(!1);return h.jsxRuntimeExports.jsx(sp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,l;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var u,i;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((i=n.triggerRef.current)==null?void 0:i.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),sp=v.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:i,onInteractOutside:a,...f}=e,d=Mt(Xt,n),p=Qn(n);return Lo(),h.jsxRuntimeExports.jsx($n,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:h.jsxRuntimeExports.jsx(Qt,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:i,onDismiss:()=>d.onOpenChange(!1),children:h.jsxRuntimeExports.jsx(qo,{"data-state":cp(d.open),role:"dialog",id:d.contentId,...p,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ap="PopoverClose",Ab=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mt(ap,n);return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",...r,ref:t,onClick:N(e.onClick,()=>o.onOpenChange(!1))})});Ab.displayName=ap;var Ob="PopoverArrow",Mb=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Qn(n);return h.jsxRuntimeExports.jsx(Ko,{...o,...r,ref:t})});Mb.displayName=Ob;function cp(e){return e?"open":"closed"}var Ib=rp,Ta="Progress",Aa=100,[Db]=he(Ta),[Nb,kb]=Db(Ta),up=v.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:s=Lb,...c}=e;(o||o===0)&&!Kc(o)&&console.error(Fb(`${o}`,"Progress"));const l=Kc(o)?o:Aa;r!==null&&!Xc(r,l)&&console.error(Vb(`${r}`,"Progress"));const u=Xc(r,l)?r:null,i=So(u)?s(u,l):void 0;return h.jsxRuntimeExports.jsx(Nb,{scope:n,value:u,max:l,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":So(u)?u:void 0,"aria-valuetext":i,role:"progressbar","data-state":dp(u,l),"data-value":u??void 0,"data-max":l,...c,ref:t})})});up.displayName=Ta;var lp="ProgressIndicator",fp=v.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=kb(lp,n);return h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":dp(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});fp.displayName=lp;function Lb(e,t){return`${Math.round(e/t*100)}%`}function dp(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function So(e){return typeof e=="number"}function Kc(e){return So(e)&&!isNaN(e)&&e>0}function Xc(e,t){return So(e)&&!isNaN(e)&&e<=t&&e>=0}function Fb(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Aa}\`.`}function Vb(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
92
62
|
- a positive number
|
|
93
|
-
- less than the value passed to \`max\` (or ${
|
|
63
|
+
- less than the value passed to \`max\` (or ${Aa} if no \`max\` prop is set)
|
|
94
64
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
95
65
|
|
|
96
|
-
Defaulting to \`null\`.`}var PE=Up,AE=Hp,rc="Radio",[OE,Wp]=Ee(rc),[ME,IE]=OE(rc),qp=y.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:c,value:u="on",onCheck:l,form:s,...a}=e,[f,d]=y.useState(null),h=re(t,v=>d(v)),m=y.useRef(!1),p=f?s||!!f.closest("form"):!0;return g.jsxs(ME,{scope:n,checked:o,disabled:c,children:[g.jsx(z.button,{type:"button",role:"radio","aria-checked":o,"data-state":Zp(o),"data-disabled":c?"":void 0,disabled:c,value:u,...a,ref:h,onClick:B(e.onClick,v=>{o||l==null||l(),p&&(m.current=v.isPropagationStopped(),m.current||v.stopPropagation())})}),p&&g.jsx(Xp,{control:f,bubbles:!m.current,name:r,value:u,checked:o,required:i,disabled:c,form:s,style:{transform:"translateX(-100%)"}})]})});qp.displayName=rc;var Kp="RadioIndicator",Yp=y.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=IE(Kp,n);return g.jsx(je,{present:r||i.checked,children:g.jsx(z.span,{"data-state":Zp(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});Yp.displayName=Kp;var NE="RadioBubbleInput",Xp=y.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const c=y.useRef(null),u=re(c,i),l=fr(n),s=dr(t);return y.useEffect(()=>{const a=c.current;if(!a)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&h){const m=new Event("click",{bubbles:r});h.call(a,n),a.dispatchEvent(m)}},[l,n,r]),g.jsx(z.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:u,style:{...o.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Xp.displayName=NE;function Zp(e){return e?"checked":"unchecked"}var jE=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_i="RadioGroup",[DE]=Ee(_i,[En,Wp]),Qp=En(),Jp=Wp(),[kE,LE]=DE(_i),em=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:c=!1,disabled:u=!1,orientation:l,dir:s,loop:a=!0,onValueChange:f,...d}=e,h=Qp(n),m=Kt(s),[p,v]=Ne({prop:i,defaultProp:o??null,onChange:f,caller:_i});return g.jsx(kE,{scope:n,name:r,required:c,disabled:u,value:p,onValueChange:v,children:g.jsx(Va,{asChild:!0,...h,orientation:l,dir:m,loop:a,children:g.jsx(z.div,{role:"radiogroup","aria-required":c,"aria-orientation":l,"data-disabled":u?"":void 0,dir:m,...d,ref:t})})})});em.displayName=_i;var tm="RadioGroupItem",nm=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=LE(tm,n),c=i.disabled||r,u=Qp(n),l=Jp(n),s=y.useRef(null),a=re(t,s),f=i.value===o.value,d=y.useRef(!1);return y.useEffect(()=>{const h=p=>{jE.includes(p.key)&&(d.current=!0)},m=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),g.jsx(Ba,{asChild:!0,...u,focusable:!c,active:f,children:g.jsx(qp,{disabled:c,required:i.required,checked:f,...l,...o,name:i.name,ref:a,onCheck:()=>i.onValueChange(o.value),onKeyDown:B(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:B(o.onFocus,()=>{var h;d.current&&((h=s.current)==null||h.click())})})})});nm.displayName=tm;var FE="RadioGroupIndicator",rm=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Jp(n);return g.jsx(Yp,{...o,...r,ref:t})});rm.displayName=FE;var VE=em,BE=nm,$E=rm,UE=[" ","Enter","ArrowUp","ArrowDown"],GE=[" ","Enter"],Ht="Select",[Ri,Ti,HE]=ar(Ht),[Sn]=Ee(Ht,[HE,Pt]),Pi=Pt(),[zE,At]=Sn(Ht),[WE,qE]=Sn(Ht),om=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:c,defaultValue:u,onValueChange:l,dir:s,name:a,autoComplete:f,disabled:d,required:h,form:m}=e,p=Pi(t),[v,x]=y.useState(null),[b,w]=y.useState(null),[S,E]=y.useState(!1),A=Kt(s),[R,T]=Ne({prop:r,defaultProp:o??!1,onChange:i,caller:Ht}),[I,P]=Ne({prop:c,defaultProp:u,onChange:l,caller:Ht}),M=y.useRef(null),j=v?m||!!v.closest("form"):!0,[V,$]=y.useState(new Set),K=Array.from(V).map(G=>G.props.value).join(";");return g.jsx(yi,{...p,children:g.jsxs(zE,{required:h,scope:t,trigger:v,onTriggerChange:x,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:E,contentId:Re(),value:I,onValueChange:P,open:R,onOpenChange:T,dir:A,triggerPointerDownPosRef:M,disabled:d,children:[g.jsx(Ri.Provider,{scope:t,children:g.jsx(WE,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(G=>{$(H=>new Set(H).add(G))},[]),onNativeOptionRemove:y.useCallback(G=>{$(H=>{const U=new Set(H);return U.delete(G),U})},[]),children:n})}),j?g.jsxs(Sm,{"aria-hidden":!0,required:h,tabIndex:-1,name:a,autoComplete:f,value:I,onChange:G=>P(G.target.value),disabled:d,form:m,children:[I===void 0?g.jsx("option",{value:""}):null,Array.from(V)]},K):null]})})};om.displayName=Ht;var im="SelectTrigger",sm=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Pi(n),c=At(im,n),u=c.disabled||r,l=re(t,c.onTriggerChange),s=Ti(n),a=y.useRef("touch"),[f,d,h]=_m(p=>{const v=s().filter(w=>!w.disabled),x=v.find(w=>w.value===c.value),b=Rm(v,p,x);b!==void 0&&c.onValueChange(b.value)}),m=p=>{u||(c.onOpenChange(!0),h()),p&&(c.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return g.jsx(pr,{asChild:!0,...i,children:g.jsx(z.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":Cm(c.value)?"":void 0,...o,ref:l,onClick:B(o.onClick,p=>{p.currentTarget.focus(),a.current!=="mouse"&&m(p)}),onPointerDown:B(o.onPointerDown,p=>{a.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(m(p),p.preventDefault())}),onKeyDown:B(o.onKeyDown,p=>{const v=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&d(p.key),!(v&&p.key===" ")&&UE.includes(p.key)&&(m(),p.preventDefault())})})})});sm.displayName=im;var am="SelectValue",cm=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:c="",...u}=e,l=At(am,n),{onValueNodeHasChildrenChange:s}=l,a=i!==void 0,f=re(t,l.onValueNodeChange);return we(()=>{s(a)},[s,a]),g.jsx(z.span,{...u,ref:f,style:{pointerEvents:"none"},children:Cm(l.value)?g.jsx(g.Fragment,{children:c}):i})});cm.displayName=am;var KE="SelectIcon",lm=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return g.jsx(z.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});lm.displayName=KE;var YE="SelectPortal",um=e=>g.jsx(lr,{asChild:!0,...e});um.displayName=YE;var zt="SelectContent",fm=y.forwardRef((e,t)=>{const n=At(zt,e.__scopeSelect),[r,o]=y.useState();if(we(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?oi.createPortal(g.jsx(dm,{scope:e.__scopeSelect,children:g.jsx(Ri.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),i):null}return g.jsx(hm,{...e,ref:t})});fm.displayName=zt;var Ye=10,[dm,Ot]=Sn(zt),XE="SelectContentImpl",ZE=St("SelectContent.RemoveScroll"),hm=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:c,side:u,sideOffset:l,align:s,alignOffset:a,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:v,...x}=e,b=At(zt,n),[w,S]=y.useState(null),[E,A]=y.useState(null),R=re(t,F=>S(F)),[T,I]=y.useState(null),[P,M]=y.useState(null),j=Ti(n),[V,$]=y.useState(!1),K=y.useRef(!1);y.useEffect(()=>{if(w)return fi(w)},[w]),li();const G=y.useCallback(F=>{const[Y,...Z]=j().map(D=>D.ref.current),[q]=Z.slice(-1),oe=document.activeElement;for(const D of F)if(D===oe||(D==null||D.scrollIntoView({block:"nearest"}),D===Y&&E&&(E.scrollTop=0),D===q&&E&&(E.scrollTop=E.scrollHeight),D==null||D.focus(),document.activeElement!==oe))return},[j,E]),H=y.useCallback(()=>G([T,w]),[G,T,w]);y.useEffect(()=>{V&&H()},[V,H]);const{onOpenChange:U,triggerPointerDownPosRef:L}=b;y.useEffect(()=>{if(w){let F={x:0,y:0};const Y=q=>{var oe,D;F={x:Math.abs(Math.round(q.pageX)-(((oe=L.current)==null?void 0:oe.x)??0)),y:Math.abs(Math.round(q.pageY)-(((D=L.current)==null?void 0:D.y)??0))}},Z=q=>{F.x<=10&&F.y<=10?q.preventDefault():w.contains(q.target)||U(!1),document.removeEventListener("pointermove",Y),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",Z,{capture:!0})}}},[w,U,L]),y.useEffect(()=>{const F=()=>U(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[U]);const[O,k]=_m(F=>{const Y=j().filter(oe=>!oe.disabled),Z=Y.find(oe=>oe.ref.current===document.activeElement),q=Rm(Y,F,Z);q&&setTimeout(()=>q.ref.current.focus())}),ee=y.useCallback((F,Y,Z)=>{const q=!K.current&&!Z;(b.value!==void 0&&b.value===Y||q)&&(I(F),q&&(K.current=!0))},[b.value]),ne=y.useCallback(()=>w==null?void 0:w.focus(),[w]),X=y.useCallback((F,Y,Z)=>{const q=!K.current&&!Z;(b.value!==void 0&&b.value===Y||q)&&M(F)},[b.value]),ie=r==="popper"?Ls:pm,te=ie===Ls?{side:u,sideOffset:l,align:s,alignOffset:a,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:p,avoidCollisions:v}:{};return g.jsx(dm,{scope:n,content:w,viewport:E,onViewportChange:A,itemRefCallback:ee,selectedItem:T,onItemLeave:ne,itemTextRefCallback:X,focusSelectedItem:H,selectedItemText:P,position:r,isPositioned:V,searchRef:O,children:g.jsx(ur,{as:ZE,allowPinchZoom:!0,children:g.jsx(cr,{asChild:!0,trapped:b.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:B(o,F=>{var Y;(Y=b.trigger)==null||Y.focus({preventScroll:!0}),F.preventDefault()}),children:g.jsx(xn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:g.jsx(ie,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:F=>F.preventDefault(),...x,...te,onPlaced:()=>$(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:B(x.onKeyDown,F=>{const Y=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!Y&&F.key.length===1&&k(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let q=j().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(F.key)&&(q=q.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const oe=F.target,D=q.indexOf(oe);q=q.slice(D+1)}setTimeout(()=>G(q)),F.preventDefault()}})})})})})})});hm.displayName=XE;var QE="SelectItemAlignedPosition",pm=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=At(zt,n),c=Ot(zt,n),[u,l]=y.useState(null),[s,a]=y.useState(null),f=re(t,R=>a(R)),d=Ti(n),h=y.useRef(!1),m=y.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:x,focusSelectedItem:b}=c,w=y.useCallback(()=>{if(i.trigger&&i.valueNode&&u&&s&&p&&v&&x){const R=i.trigger.getBoundingClientRect(),T=s.getBoundingClientRect(),I=i.valueNode.getBoundingClientRect(),P=x.getBoundingClientRect();if(i.dir!=="rtl"){const oe=P.left-T.left,D=I.left-oe,he=R.left-D,Se=R.width+he,$e=Math.max(Se,T.width),It=window.innerWidth-Ye,vt=qo(D,[Ye,Math.max(Ye,It-$e)]);u.style.minWidth=Se+"px",u.style.left=vt+"px"}else{const oe=T.right-P.right,D=window.innerWidth-I.right-oe,he=window.innerWidth-R.right-D,Se=R.width+he,$e=Math.max(Se,T.width),It=window.innerWidth-Ye,vt=qo(D,[Ye,Math.max(Ye,It-$e)]);u.style.minWidth=Se+"px",u.style.right=vt+"px"}const M=d(),j=window.innerHeight-Ye*2,V=p.scrollHeight,$=window.getComputedStyle(s),K=parseInt($.borderTopWidth,10),G=parseInt($.paddingTop,10),H=parseInt($.borderBottomWidth,10),U=parseInt($.paddingBottom,10),L=K+G+V+U+H,O=Math.min(v.offsetHeight*5,L),k=window.getComputedStyle(p),ee=parseInt(k.paddingTop,10),ne=parseInt(k.paddingBottom,10),X=R.top+R.height/2-Ye,ie=j-X,te=v.offsetHeight/2,F=v.offsetTop+te,Y=K+G+F,Z=L-Y;if(Y<=X){const oe=M.length>0&&v===M[M.length-1].ref.current;u.style.bottom="0px";const D=s.clientHeight-p.offsetTop-p.offsetHeight,he=Math.max(ie,te+(oe?ne:0)+D+H),Se=Y+he;u.style.height=Se+"px"}else{const oe=M.length>0&&v===M[0].ref.current;u.style.top="0px";const he=Math.max(X,K+p.offsetTop+(oe?ee:0)+te)+Z;u.style.height=he+"px",p.scrollTop=Y-X+p.offsetTop}u.style.margin=`${Ye}px 0`,u.style.minHeight=O+"px",u.style.maxHeight=j+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,u,s,p,v,x,i.dir,r]);we(()=>w(),[w]);const[S,E]=y.useState();we(()=>{s&&E(window.getComputedStyle(s).zIndex)},[s]);const A=y.useCallback(R=>{R&&m.current===!0&&(w(),b==null||b(),m.current=!1)},[w,b]);return g.jsx(eS,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:h,onScrollButtonChange:A,children:g.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:g.jsx(z.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});pm.displayName=QE;var JE="SelectPopperPosition",Ls=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ye,...i}=e,c=Pi(n);return g.jsx(xi,{...c,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.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)"}})});Ls.displayName=JE;var[eS,oc]=Sn(zt,{}),Fs="SelectViewport",mm=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=Ot(Fs,n),c=oc(Fs,n),u=re(t,i.onViewportChange),l=y.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),g.jsx(Ri.Slot,{scope:n,children:g.jsx(z.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:B(o.onScroll,s=>{const a=s.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=c;if(d!=null&&d.current&&f){const h=Math.abs(l.current-a.scrollTop);if(h>0){const m=window.innerHeight-Ye*2,p=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),x=Math.max(p,v);if(x<m){const b=x+h,w=Math.min(m,b),S=b-w;f.style.height=w+"px",f.style.bottom==="0px"&&(a.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}l.current=a.scrollTop})})})]})});mm.displayName=Fs;var gm="SelectGroup",[tS,nS]=Sn(gm),rS=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Re();return g.jsx(tS,{scope:n,id:o,children:g.jsx(z.div,{role:"group","aria-labelledby":o,...r,ref:t})})});rS.displayName=gm;var vm="SelectLabel",oS=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=nS(vm,n);return g.jsx(z.div,{id:o.id,...r,ref:t})});oS.displayName=vm;var Yo="SelectItem",[iS,ym]=Sn(Yo),xm=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...c}=e,u=At(Yo,n),l=Ot(Yo,n),s=u.value===r,[a,f]=y.useState(i??""),[d,h]=y.useState(!1),m=re(t,b=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,b,r,o)}),p=Re(),v=y.useRef("touch"),x=()=>{o||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(iS,{scope:n,value:r,disabled:o,textId:p,isSelected:s,onItemTextChange:y.useCallback(b=>{f(w=>w||((b==null?void 0:b.textContent)??"").trim())},[]),children:g.jsx(Ri.ItemSlot,{scope:n,value:r,disabled:o,textValue:a,children:g.jsx(z.div,{role:"option","aria-labelledby":p,"data-highlighted":d?"":void 0,"aria-selected":s&&d,"data-state":s?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...c,ref:m,onFocus:B(c.onFocus,()=>h(!0)),onBlur:B(c.onBlur,()=>h(!1)),onClick:B(c.onClick,()=>{v.current!=="mouse"&&x()}),onPointerUp:B(c.onPointerUp,()=>{v.current==="mouse"&&x()}),onPointerDown:B(c.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:B(c.onPointerMove,b=>{var w;v.current=b.pointerType,o?(w=l.onItemLeave)==null||w.call(l):v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:B(c.onPointerLeave,b=>{var w;b.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:B(c.onKeyDown,b=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&b.key===" "||(GE.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});xm.displayName=Yo;var Gn="SelectItemText",bm=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,c=At(Gn,n),u=Ot(Gn,n),l=ym(Gn,n),s=qE(Gn,n),[a,f]=y.useState(null),d=re(t,x=>f(x),l.onItemTextChange,x=>{var b;return(b=u.itemTextRefCallback)==null?void 0:b.call(u,x,l.value,l.disabled)}),h=a==null?void 0:a.textContent,m=y.useMemo(()=>g.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=s;return we(()=>(p(m),()=>v(m)),[p,v,m]),g.jsxs(g.Fragment,{children:[g.jsx(z.span,{id:l.textId,...i,ref:d}),l.isSelected&&c.valueNode&&!c.valueNodeHasChildren?oi.createPortal(i.children,c.valueNode):null]})});bm.displayName=Gn;var wm="SelectItemIndicator",sS=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ym(wm,n).isSelected?g.jsx(z.span,{"aria-hidden":!0,...r,ref:t}):null});sS.displayName=wm;var Vs="SelectScrollUpButton",aS=y.forwardRef((e,t)=>{const n=Ot(Vs,e.__scopeSelect),r=oc(Vs,e.__scopeSelect),[o,i]=y.useState(!1),c=re(t,r.onScrollButtonChange);return we(()=>{if(n.viewport&&n.isPositioned){let u=function(){const s=l.scrollTop>0;i(s)};const l=n.viewport;return u(),l.addEventListener("scroll",u),()=>l.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?g.jsx(Em,{...e,ref:c,onAutoScroll:()=>{const{viewport:u,selectedItem:l}=n;u&&l&&(u.scrollTop=u.scrollTop-l.offsetHeight)}}):null});aS.displayName=Vs;var Bs="SelectScrollDownButton",cS=y.forwardRef((e,t)=>{const n=Ot(Bs,e.__scopeSelect),r=oc(Bs,e.__scopeSelect),[o,i]=y.useState(!1),c=re(t,r.onScrollButtonChange);return we(()=>{if(n.viewport&&n.isPositioned){let u=function(){const s=l.scrollHeight-l.clientHeight,a=Math.ceil(l.scrollTop)<s;i(a)};const l=n.viewport;return u(),l.addEventListener("scroll",u),()=>l.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?g.jsx(Em,{...e,ref:c,onAutoScroll:()=>{const{viewport:u,selectedItem:l}=n;u&&l&&(u.scrollTop=u.scrollTop+l.offsetHeight)}}):null});cS.displayName=Bs;var Em=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Ot("SelectScrollButton",n),c=y.useRef(null),u=Ti(n),l=y.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return y.useEffect(()=>()=>l(),[l]),we(()=>{var a;const s=u().find(f=>f.ref.current===document.activeElement);(a=s==null?void 0:s.ref.current)==null||a.scrollIntoView({block:"nearest"})},[u]),g.jsx(z.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:B(o.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:B(o.onPointerMove,()=>{var s;(s=i.onItemLeave)==null||s.call(i),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:B(o.onPointerLeave,()=>{l()})})}),lS="SelectSeparator",uS=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return g.jsx(z.div,{"aria-hidden":!0,...r,ref:t})});uS.displayName=lS;var $s="SelectArrow",fS=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Pi(n),i=At($s,n),c=Ot($s,n);return i.open&&c.position==="popper"?g.jsx(bi,{...o,...r,ref:t}):null});fS.displayName=$s;var dS="SelectBubbleInput",Sm=y.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=y.useRef(null),i=re(r,o),c=fr(t);return y.useEffect(()=>{const u=o.current;if(!u)return;const l=window.HTMLSelectElement.prototype,a=Object.getOwnPropertyDescriptor(l,"value").set;if(c!==t&&a){const f=new Event("change",{bubbles:!0});a.call(u,t),u.dispatchEvent(f)}},[c,t]),g.jsx(z.select,{...n,style:{...xd,...n.style},ref:i,defaultValue:t})});Sm.displayName=dS;function Cm(e){return e===""||e===void 0}function _m(e){const t=Ze(e),n=y.useRef(""),r=y.useRef(0),o=y.useCallback(c=>{const u=n.current+c;t(u),(function l(s){n.current=s,window.clearTimeout(r.current),s!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(u)},[t]),i=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function Rm(e,t,n){const o=t.length>1&&Array.from(t).every(s=>s===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let c=hS(e,Math.max(i,0));o.length===1&&(c=c.filter(s=>s!==n));const l=c.find(s=>s.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function hS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var pS=om,mS=sm,gS=cm,vS=lm,yS=um,xS=fm,bS=mm,wS=xm,ES=bm,Tm=["PageUp","PageDown"],Pm=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Am={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Cn="Slider",[Us,SS,CS]=ar(Cn),[Om]=Ee(Cn,[CS]),[_S,Ai]=Om(Cn),Mm=y.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:c="horizontal",disabled:u=!1,minStepsBetweenThumbs:l=0,defaultValue:s=[r],value:a,onValueChange:f=()=>{},onValueCommit:d=()=>{},inverted:h=!1,form:m,...p}=e,v=y.useRef(new Set),x=y.useRef(0),w=c==="horizontal"?RS:TS,[S=[],E]=Ne({prop:a,defaultProp:s,onChange:M=>{var V;(V=[...v.current][x.current])==null||V.focus(),f(M)}}),A=y.useRef(S);function R(M){const j=IS(S,M);P(M,j)}function T(M){P(M,x.current)}function I(){const M=A.current[x.current];S[x.current]!==M&&d(S)}function P(M,j,{commit:V}={commit:!1}){const $=kS(i),K=LS(Math.round((M-r)/i)*i+r,$),G=qo(K,[r,o]);E((H=[])=>{const U=OS(H,G,j);if(DS(U,l*i)){x.current=U.indexOf(G);const L=String(U)!==String(H);return L&&V&&d(U),L?U:H}else return H})}return g.jsx(_S,{scope:e.__scopeSlider,name:n,disabled:u,min:r,max:o,valueIndexToChangeRef:x,thumbs:v.current,values:S,orientation:c,form:m,children:g.jsx(Us.Provider,{scope:e.__scopeSlider,children:g.jsx(Us.Slot,{scope:e.__scopeSlider,children:g.jsx(w,{"aria-disabled":u,"data-disabled":u?"":void 0,...p,ref:t,onPointerDown:B(p.onPointerDown,()=>{u||(A.current=S)}),min:r,max:o,inverted:h,onSlideStart:u?void 0:R,onSlideMove:u?void 0:T,onSlideEnd:u?void 0:I,onHomeKeyDown:()=>!u&&P(r,0,{commit:!0}),onEndKeyDown:()=>!u&&P(o,S.length-1,{commit:!0}),onStepKeyDown:({event:M,direction:j})=>{if(!u){const K=Tm.includes(M.key)||M.shiftKey&&Pm.includes(M.key)?10:1,G=x.current,H=S[G],U=i*K*j;P(H+U,G,{commit:!0})}}})})})})});Mm.displayName=Cn;var[Im,Nm]=Om(Cn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),RS=y.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:c,onSlideMove:u,onSlideEnd:l,onStepKeyDown:s,...a}=e,[f,d]=y.useState(null),h=re(t,w=>d(w)),m=y.useRef(void 0),p=Kt(o),v=p==="ltr",x=v&&!i||!v&&i;function b(w){const S=m.current||f.getBoundingClientRect(),E=[0,S.width],R=ic(E,x?[n,r]:[r,n]);return m.current=S,R(w-S.left)}return g.jsx(Im,{scope:e.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:g.jsx(jm,{dir:p,"data-orientation":"horizontal",...a,ref:h,style:{...a.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=b(w.clientX);c==null||c(S)},onSlideMove:w=>{const S=b(w.clientX);u==null||u(S)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:w=>{const E=Am[x?"from-left":"from-right"].includes(w.key);s==null||s({event:w,direction:E?-1:1})}})})}),TS=y.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:c,onSlideEnd:u,onStepKeyDown:l,...s}=e,a=y.useRef(null),f=re(t,a),d=y.useRef(void 0),h=!o;function m(p){const v=d.current||a.current.getBoundingClientRect(),x=[0,v.height],w=ic(x,h?[r,n]:[n,r]);return d.current=v,w(p-v.top)}return g.jsx(Im,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:g.jsx(jm,{"data-orientation":"vertical",...s,ref:f,style:{...s.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:p=>{const v=m(p.clientY);i==null||i(v)},onSlideMove:p=>{const v=m(p.clientY);c==null||c(v)},onSlideEnd:()=>{d.current=void 0,u==null||u()},onStepKeyDown:p=>{const x=Am[h?"from-bottom":"from-top"].includes(p.key);l==null||l({event:p,direction:x?-1:1})}})})}),jm=y.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:c,onEndKeyDown:u,onStepKeyDown:l,...s}=e,a=Ai(Cn,n);return g.jsx(z.span,{...s,ref:t,onKeyDown:B(e.onKeyDown,f=>{f.key==="Home"?(c(f),f.preventDefault()):f.key==="End"?(u(f),f.preventDefault()):Tm.concat(Pm).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:B(e.onPointerDown,f=>{const d=f.target;d.setPointerCapture(f.pointerId),f.preventDefault(),a.thumbs.has(d)?d.focus():r(f)}),onPointerMove:B(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&o(f)}),onPointerUp:B(e.onPointerUp,f=>{const d=f.target;d.hasPointerCapture(f.pointerId)&&(d.releasePointerCapture(f.pointerId),i(f))})})}),Dm="SliderTrack",km=y.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Ai(Dm,n);return g.jsx(z.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});km.displayName=Dm;var Gs="SliderRange",Lm=y.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Ai(Gs,n),i=Nm(Gs,n),c=y.useRef(null),u=re(t,c),l=o.values.length,s=o.values.map(d=>Bm(d,o.min,o.max)),a=l>1?Math.min(...s):0,f=100-Math.max(...s);return g.jsx(z.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:u,style:{...e.style,[i.startEdge]:a+"%",[i.endEdge]:f+"%"}})});Lm.displayName=Gs;var Hs="SliderThumb",Fm=y.forwardRef((e,t)=>{const n=SS(e.__scopeSlider),[r,o]=y.useState(null),i=re(t,u=>o(u)),c=y.useMemo(()=>r?n().findIndex(u=>u.ref.current===r):-1,[n,r]);return g.jsx(PS,{...e,ref:i,index:c})}),PS=y.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,c=Ai(Hs,n),u=Nm(Hs,n),[l,s]=y.useState(null),a=re(t,b=>s(b)),f=l?c.form||!!l.closest("form"):!0,d=dr(l),h=c.values[r],m=h===void 0?0:Bm(h,c.min,c.max),p=MS(r,c.values.length),v=d==null?void 0:d[u.size],x=v?NS(v,m,u.direction):0;return y.useEffect(()=>{if(l)return c.thumbs.add(l),()=>{c.thumbs.delete(l)}},[l,c.thumbs]),g.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[u.startEdge]:`calc(${m}% + ${x}px)`},children:[g.jsx(Us.ItemSlot,{scope:e.__scopeSlider,children:g.jsx(z.span,{role:"slider","aria-label":e["aria-label"]||p,"aria-valuemin":c.min,"aria-valuenow":h,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...i,ref:a,style:h===void 0?{display:"none"}:e.style,onFocus:B(e.onFocus,()=>{c.valueIndexToChangeRef.current=r})})}),f&&g.jsx(Vm,{name:o??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:h},r)]})});Fm.displayName=Hs;var AS="RadioBubbleInput",Vm=y.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=y.useRef(null),i=re(o,r),c=fr(t);return y.useEffect(()=>{const u=o.current;if(!u)return;const l=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(l,"value").set;if(c!==t&&a){const f=new Event("input",{bubbles:!0});a.call(u,t),u.dispatchEvent(f)}},[c,t]),g.jsx(z.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});Vm.displayName=AS;function OS(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function Bm(e,t,n){const i=100/(n-t)*(e-t);return qo(i,[0,100])}function MS(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function IS(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function NS(e,t,n){const r=e/2,i=ic([0,50],[0,r]);return(r-i(t)*n)*n}function jS(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function DS(e,t){if(t>0){const n=jS(e);return Math.min(...n)>=t}return!0}function ic(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function kS(e){return(String(e).split(".")[1]||"").length}function LS(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var FS=Mm,VS=km,BS=Lm,$S=Fm,Oi="Switch",[US]=Ee(Oi),[GS,HS]=US(Oi),$m=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:c,disabled:u,value:l="on",onCheckedChange:s,form:a,...f}=e,[d,h]=y.useState(null),m=re(t,w=>h(w)),p=y.useRef(!1),v=d?a||!!d.closest("form"):!0,[x,b]=Ne({prop:o,defaultProp:i??!1,onChange:s,caller:Oi});return g.jsxs(GS,{scope:n,checked:x,disabled:u,children:[g.jsx(z.button,{type:"button",role:"switch","aria-checked":x,"aria-required":c,"data-state":zm(x),"data-disabled":u?"":void 0,disabled:u,value:l,...f,ref:m,onClick:B(e.onClick,w=>{b(S=>!S),v&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})}),v&&g.jsx(Hm,{control:d,bubbles:!p.current,name:r,value:l,checked:x,required:c,disabled:u,form:a,style:{transform:"translateX(-100%)"}})]})});$m.displayName=Oi;var Um="SwitchThumb",Gm=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=HS(Um,n);return g.jsx(z.span,{"data-state":zm(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Gm.displayName=Um;var zS="SwitchBubbleInput",Hm=y.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const c=y.useRef(null),u=re(c,i),l=fr(n),s=dr(t);return y.useEffect(()=>{const a=c.current;if(!a)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&h){const m=new Event("click",{bubbles:r});h.call(a,n),a.dispatchEvent(m)}},[l,n,r]),g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:u,style:{...o.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Hm.displayName=zS;function zm(e){return e?"checked":"unchecked"}var WS=$m,qS=Gm,Mi="Tabs",[KS]=Ee(Mi,[En]),Wm=En(),[YS,sc]=KS(Mi),qm=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:c="horizontal",dir:u,activationMode:l="automatic",...s}=e,a=Kt(u),[f,d]=Ne({prop:r,onChange:o,defaultProp:i??"",caller:Mi});return g.jsx(YS,{scope:n,baseId:Re(),value:f,onValueChange:d,orientation:c,dir:a,activationMode:l,children:g.jsx(z.div,{dir:a,"data-orientation":c,...s,ref:t})})});qm.displayName=Mi;var Km="TabsList",Ym=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=sc(Km,n),c=Wm(n);return g.jsx(Va,{asChild:!0,...c,orientation:i.orientation,dir:i.dir,loop:r,children:g.jsx(z.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});Ym.displayName=Km;var Xm="TabsTrigger",Zm=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,c=sc(Xm,n),u=Wm(n),l=eg(c.baseId,r),s=tg(c.baseId,r),a=r===c.value;return g.jsx(Ba,{asChild:!0,...u,focusable:!o,active:a,children:g.jsx(z.button,{type:"button",role:"tab","aria-selected":a,"aria-controls":s,"data-state":a?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...i,ref:t,onMouseDown:B(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?c.onValueChange(r):f.preventDefault()}),onKeyDown:B(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&c.onValueChange(r)}),onFocus:B(e.onFocus,()=>{const f=c.activationMode!=="manual";!a&&!o&&f&&c.onValueChange(r)})})})});Zm.displayName=Xm;var Qm="TabsContent",Jm=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...c}=e,u=sc(Qm,n),l=eg(u.baseId,r),s=tg(u.baseId,r),a=r===u.value,f=y.useRef(a);return y.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),g.jsx(je,{present:o||a,children:({present:d})=>g.jsx(z.div,{"data-state":a?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":l,hidden:!d,id:s,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:d&&i})})});Jm.displayName=Qm;function eg(e,t){return`${e}-trigger-${t}`}function tg(e,t){return`${e}-content-${t}`}var XS=qm,ZS=Ym,QS=Zm,Tl=Jm,[Ii]=Ee("Tooltip",[Pt]),Ni=Pt(),ng="TooltipProvider",JS=700,zs="tooltip.open",[eC,ac]=Ii(ng),rg=e=>{const{__scopeTooltip:t,delayDuration:n=JS,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,c=y.useRef(!0),u=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const s=l.current;return()=>window.clearTimeout(s)},[]),g.jsx(eC,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),c.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>c.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:y.useCallback(s=>{u.current=s},[]),disableHoverableContent:o,children:i})};rg.displayName=ng;var tr="Tooltip",[tC,wr]=Ii(tr),og=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:c,delayDuration:u}=e,l=ac(tr,e.__scopeTooltip),s=Ni(t),[a,f]=y.useState(null),d=Re(),h=y.useRef(0),m=c??l.disableHoverableContent,p=u??l.delayDuration,v=y.useRef(!1),[x,b]=Ne({prop:r,defaultProp:o??!1,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(zs))):l.onClose(),i==null||i(R)},caller:tr}),w=y.useMemo(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),S=y.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),E=y.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),A=y.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},p)},[p,b]);return y.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),g.jsx(yi,{...s,children:g.jsx(tC,{scope:t,contentId:d,open:x,stateAttribute:w,trigger:a,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{l.isOpenDelayedRef.current?A():S()},[l.isOpenDelayedRef,A,S]),onTriggerLeave:y.useCallback(()=>{m?E():(window.clearTimeout(h.current),h.current=0)},[E,m]),onOpen:S,onClose:E,disableHoverableContent:m,children:n})})};og.displayName=tr;var Ws="TooltipTrigger",ig=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=wr(Ws,n),i=ac(Ws,n),c=Ni(n),u=y.useRef(null),l=re(t,u,o.onTriggerChange),s=y.useRef(!1),a=y.useRef(!1),f=y.useCallback(()=>s.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),g.jsx(pr,{asChild:!0,...c,children:g.jsx(z.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:B(e.onPointerMove,d=>{d.pointerType!=="touch"&&!a.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),a.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{o.onTriggerLeave(),a.current=!1}),onPointerDown:B(e.onPointerDown,()=>{o.open&&o.onClose(),s.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:B(e.onFocus,()=>{s.current||o.onOpen()}),onBlur:B(e.onBlur,o.onClose),onClick:B(e.onClick,o.onClose)})})});ig.displayName=Ws;var cc="TooltipPortal",[nC,rC]=Ii(cc,{forceMount:void 0}),sg=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=wr(cc,t);return g.jsx(nC,{scope:t,forceMount:n,children:g.jsx(je,{present:n||i.open,children:g.jsx(lr,{asChild:!0,container:o,children:r})})})};sg.displayName=cc;var vn="TooltipContent",ag=y.forwardRef((e,t)=>{const n=rC(vn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,c=wr(vn,e.__scopeTooltip);return g.jsx(je,{present:r||c.open,children:c.disableHoverableContent?g.jsx(cg,{side:o,...i,ref:t}):g.jsx(oC,{side:o,...i,ref:t})})}),oC=y.forwardRef((e,t)=>{const n=wr(vn,e.__scopeTooltip),r=ac(vn,e.__scopeTooltip),o=y.useRef(null),i=re(t,o),[c,u]=y.useState(null),{trigger:l,onClose:s}=n,a=o.current,{onPointerInTransitChange:f}=r,d=y.useCallback(()=>{u(null),f(!1)},[f]),h=y.useCallback((m,p)=>{const v=m.currentTarget,x={x:m.clientX,y:m.clientY},b=cC(x,v.getBoundingClientRect()),w=lC(x,b),S=uC(p.getBoundingClientRect()),E=dC([...w,...S]);u(E),f(!0)},[f]);return y.useEffect(()=>()=>d(),[d]),y.useEffect(()=>{if(l&&a){const m=v=>h(v,a),p=v=>h(v,l);return l.addEventListener("pointerleave",m),a.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",m),a.removeEventListener("pointerleave",p)}}},[l,a,h,d]),y.useEffect(()=>{if(c){const m=p=>{const v=p.target,x={x:p.clientX,y:p.clientY},b=(l==null?void 0:l.contains(v))||(a==null?void 0:a.contains(v)),w=!fC(x,c);b?d():w&&(d(),s())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,a,c,s,d]),g.jsx(cg,{...e,ref:i})}),[iC,sC]=Ii(tr,{isInside:!1}),aC=Iy("TooltipContent"),cg=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:c,...u}=e,l=wr(vn,n),s=Ni(n),{onClose:a}=l;return y.useEffect(()=>(document.addEventListener(zs,a),()=>document.removeEventListener(zs,a)),[a]),y.useEffect(()=>{if(l.trigger){const f=d=>{const h=d.target;h!=null&&h.contains(l.trigger)&&a()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,a]),g.jsx(xn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:f=>f.preventDefault(),onDismiss:a,children:g.jsxs(xi,{"data-state":l.stateAttribute,...s,...u,ref:t,style:{...u.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:[g.jsx(aC,{children:r}),g.jsx(iC,{scope:n,isInside:!0,children:g.jsx(Fy,{id:l.contentId,role:"tooltip",children:o||r})})]})})});ag.displayName=vn;var lg="TooltipArrow",ug=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ni(n);return sC(lg,n).isInside?null:g.jsx(bi,{...o,...r,ref:t})});ug.displayName=lg;function cC(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function lC(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function uC(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function fC(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,c=t.length-1;i<t.length;c=i++){const u=t[i],l=t[c],s=u.x,a=u.y,f=l.x,d=l.y;a>r!=d>r&&n<(f-s)*(r-a)/(d-a)+s&&(o=!o)}return o}function dC(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),hC(t)}function hC(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],c=t[t.length-2];if((i.x-c.x)*(o.y-c.y)>=(i.y-c.y)*(o.x-c.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],c=n[n.length-2];if((i.x-c.x)*(o.y-c.y)>=(i.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var pC=rg,mC=og,gC=ig,vC=sg,yC=ag,xC=ug;const bC=_.forwardRef(({children:e,className:t,...n},r)=>g.jsx(d0,{className:N.classNames("overflow-hidden rounded-xl shadow-(--box-shadow-accordion)",t),ref:r,...n,children:e})),wC=_.forwardRef(({children:e,className:t,triggerIcon:n,...r},o)=>g.jsx(h0,{className:"flex",children:g.jsxs(p0,{className:N.classNames("group flex h-14 flex-1 cursor-pointer items-center justify-between px-6 text-[15px] leading-none bg-white space-x-2",t),ref:o,...r,children:[e,n??g.jsx(ce.SvgArrowMp,{className:"size-3 shrink-0 transition-transform duration-300 ease-in-out group-data-[state=open]:rotate-180 fill-primary-blue"})]})})),lc=_.createContext({});function uc(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}const fg=typeof window<"u",dg=fg?_.useLayoutEffect:_.useEffect,ji=_.createContext(null);function fc(e,t){e.indexOf(t)===-1&&e.push(t)}function dc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ct=(e,t,n)=>n>t?t:n<e?e:n;function qs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let _n=()=>{},mt=()=>{};var fd;typeof process<"u"&&((fd=process.env)==null?void 0:fd.NODE_ENV)!=="production"&&(_n=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(qs(t,n))},mt=(e,t,n)=>{if(!e)throw new Error(qs(t,n))});const gt={},hg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function pg(e){return typeof e=="object"&&e!==null}const mg=e=>/^0[^.\s]+$/u.test(e);function hc(e){let t;return()=>(t===void 0&&(t=e()),t)}const ze=e=>e,EC=(e,t)=>n=>t(e(n)),Er=(...e)=>e.reduce(EC),nr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class pc{constructor(){this.subscriptions=[]}add(t){return fc(this.subscriptions,t),()=>dc(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const c=this.subscriptions[i];c&&c(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const it=e=>e*1e3,Ge=e=>e/1e3;function gg(e,t){return t?e*(1e3/t):0}const Pl=new Set;function mc(e,t,n){e||Pl.has(t)||(console.warn(qs(t,n)),Pl.add(t))}const vg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,SC=1e-7,CC=12;function _C(e,t,n,r,o){let i,c,u=0;do c=t+(n-t)/2,i=vg(c,r,o)-e,i>0?n=c:t=c;while(Math.abs(i)>SC&&++u<CC);return c}function Sr(e,t,n,r){if(e===t&&n===r)return ze;const o=i=>_C(i,0,1,e,n);return i=>i===0||i===1?i:vg(o(i),t,r)}const yg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xg=e=>t=>1-e(1-t),bg=Sr(.33,1.53,.69,.99),gc=xg(bg),wg=yg(gc),Eg=e=>(e*=2)<1?.5*gc(e):.5*(2-Math.pow(2,-10*(e-1))),vc=e=>1-Math.sin(Math.acos(e)),Sg=xg(vc),Cg=yg(vc),RC=Sr(.42,0,1,1),TC=Sr(0,0,.58,1),_g=Sr(.42,0,.58,1),PC=e=>Array.isArray(e)&&typeof e[0]!="number",Rg=e=>Array.isArray(e)&&typeof e[0]=="number",Al={linear:ze,easeIn:RC,easeInOut:_g,easeOut:TC,circIn:vc,circInOut:Cg,circOut:Sg,backIn:gc,backInOut:wg,backOut:bg,anticipate:Eg},AC=e=>typeof e=="string",Ol=e=>{if(Rg(e)){mt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return Sr(t,n,r,o)}else if(AC(e))return mt(Al[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Al[e];return e},Br=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function OC(e,t){let n=new Set,r=new Set,o=!1,i=!1;const c=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function l(a){c.has(a)&&(s.schedule(a),e()),a(u)}const s={schedule:(a,f=!1,d=!1)=>{const m=d&&o?n:r;return f&&c.add(a),m.has(a)||m.add(a),a},cancel:a=>{r.delete(a),c.delete(a)},process:a=>{if(u=a,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,s.process(a))}};return s}const MC=40;function Tg(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,c=Br.reduce((w,S)=>(w[S]=OC(i),w),{}),{setup:u,read:l,resolveKeyframes:s,preUpdate:a,update:f,preRender:d,render:h,postRender:m}=c,p=()=>{const w=gt.useManualTiming?o.timestamp:performance.now();n=!1,gt.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(w-o.timestamp,MC),1)),o.timestamp=w,o.isProcessing=!0,u.process(o),l.process(o),s.process(o),a.process(o),f.process(o),d.process(o),h.process(o),m.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))},v=()=>{n=!0,r=!0,o.isProcessing||e(p)};return{schedule:Br.reduce((w,S)=>{const E=c[S];return w[S]=(A,R=!1,T=!1)=>(n||v(),E.schedule(A,R,T)),w},{}),cancel:w=>{for(let S=0;S<Br.length;S++)c[Br[S]].cancel(w)},state:o,steps:c}}const{schedule:pe,cancel:Rt,state:_e,steps:ts}=Tg(typeof requestAnimationFrame<"u"?requestAnimationFrame:ze,!0);let Do;function IC(){Do=void 0}const Me={now:()=>(Do===void 0&&Me.set(_e.isProcessing||gt.useManualTiming?_e.timestamp:performance.now()),Do),set:e=>{Do=e,queueMicrotask(IC)}},Pg=e=>t=>typeof t=="string"&&t.startsWith(e),Ag=Pg("--"),NC=Pg("var(--"),yc=e=>NC(e)?jC.test(e.split("/*")[0].trim()):!1,jC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ml(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Rn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},rr={...Rn,transform:e=>ct(0,1,e)},$r={...Rn,default:1},Wn=e=>Math.round(e*1e5)/1e5,xc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function DC(e){return e==null}const kC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bc=(e,t)=>n=>!!(typeof n=="string"&&kC.test(n)&&n.startsWith(e)||t&&!DC(n)&&Object.prototype.hasOwnProperty.call(n,t)),Og=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,c,u]=r.match(xc);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(c),alpha:u!==void 0?parseFloat(u):1}},LC=e=>ct(0,255,e),ns={...Rn,transform:e=>Math.round(LC(e))},Vt={test:bc("rgb","red"),parse:Og("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ns.transform(e)+", "+ns.transform(t)+", "+ns.transform(n)+", "+Wn(rr.transform(r))+")"};function FC(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Ks={test:bc("#"),parse:FC,transform:Vt.transform},Cr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),bt=Cr("deg"),st=Cr("%"),W=Cr("px"),VC=Cr("vh"),BC=Cr("vw"),Il={...st,parse:e=>st.parse(e)/100,transform:e=>st.transform(e*100)},sn={test:bc("hsl","hue"),parse:Og("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+st.transform(Wn(t))+", "+st.transform(Wn(n))+", "+Wn(rr.transform(r))+")"},be={test:e=>Vt.test(e)||Ks.test(e)||sn.test(e),parse:e=>Vt.test(e)?Vt.parse(e):sn.test(e)?sn.parse(e):Ks.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Vt.transform(e):sn.transform(e),getAnimatableNone:e=>{const t=be.parse(e);return t.alpha=0,be.transform(t)}},$C=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function UC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(xc))==null?void 0:t.length)||0)+(((n=e.match($C))==null?void 0:n.length)||0)>0}const Mg="number",Ig="color",GC="var",HC="var(",Nl="${}",zC=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function or(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const u=t.replace(zC,l=>(be.test(l)?(r.color.push(i),o.push(Ig),n.push(be.parse(l))):l.startsWith(HC)?(r.var.push(i),o.push(GC),n.push(l)):(r.number.push(i),o.push(Mg),n.push(parseFloat(l))),++i,Nl)).split(Nl);return{values:n,split:u,indexes:r,types:o}}function Ng(e){return or(e).values}function jg(e){const{split:t,types:n}=or(e),r=t.length;return o=>{let i="";for(let c=0;c<r;c++)if(i+=t[c],o[c]!==void 0){const u=n[c];u===Mg?i+=Wn(o[c]):u===Ig?i+=be.transform(o[c]):i+=o[c]}return i}}const WC=e=>typeof e=="number"?0:be.test(e)?be.getAnimatableNone(e):e;function qC(e){const t=Ng(e);return jg(e)(t.map(WC))}const Tt={test:UC,parse:Ng,createTransformer:jg,getAnimatableNone:qC};function rs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function KC({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,c=0;if(!t)o=i=c=n;else{const u=n<.5?n*(1+t):n+t-n*t,l=2*n-u;o=rs(l,u,e+1/3),i=rs(l,u,e),c=rs(l,u,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(c*255),alpha:r}}function Xo(e,t){return n=>n>0?t:e}const ve=(e,t,n)=>e+(t-e)*n,os=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},YC=[Ks,Vt,sn],XC=e=>YC.find(t=>t.test(e));function jl(e){const t=XC(e);if(_n(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===sn&&(n=KC(n)),n}const Dl=(e,t)=>{const n=jl(e),r=jl(t);if(!n||!r)return Xo(e,t);const o={...n};return i=>(o.red=os(n.red,r.red,i),o.green=os(n.green,r.green,i),o.blue=os(n.blue,r.blue,i),o.alpha=ve(n.alpha,r.alpha,i),Vt.transform(o))},Ys=new Set(["none","hidden"]);function ZC(e,t){return Ys.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function QC(e,t){return n=>ve(e,t,n)}function wc(e){return typeof e=="number"?QC:typeof e=="string"?yc(e)?Xo:be.test(e)?Dl:t_:Array.isArray(e)?Dg:typeof e=="object"?be.test(e)?Dl:JC:Xo}function Dg(e,t){const n=[...e],r=n.length,o=e.map((i,c)=>wc(i)(i,t[c]));return i=>{for(let c=0;c<r;c++)n[c]=o[c](i);return n}}function JC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=wc(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function e_(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],c=e.indexes[i][r[i]],u=e.values[c]??0;n[o]=u,r[i]++}return n}const t_=(e,t)=>{const n=Tt.createTransformer(t),r=or(e),o=or(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Ys.has(e)&&!o.values.length||Ys.has(t)&&!r.values.length?ZC(e,t):Er(Dg(e_(r,o),o.values),n):(_n(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Xo(e,t))};function kg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ve(e,t,n):wc(e)(e,t)}const n_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>pe.update(t,n),stop:()=>Rt(t),now:()=>_e.isProcessing?_e.timestamp:Me.now()}},Lg=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Zo=2e4;function Ec(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Zo;)t+=n,r=e.next(t);return t>=Zo?1/0:t}function r_(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Ec(r),Zo);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Ge(o)}}const o_=5;function Fg(e,t,n){const r=Math.max(t-o_,0);return gg(n-e(r),t-r)}const ge={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},is=.001;function i_({duration:e=ge.duration,bounce:t=ge.bounce,velocity:n=ge.velocity,mass:r=ge.mass}){let o,i;_n(e<=it(ge.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let c=1-t;c=ct(ge.minDamping,ge.maxDamping,c),e=ct(ge.minDuration,ge.maxDuration,Ge(e)),c<1?(o=s=>{const a=s*c,f=a*e,d=a-n,h=Xs(s,c),m=Math.exp(-f);return is-d/h*m},i=s=>{const f=s*c*e,d=f*n+n,h=Math.pow(c,2)*Math.pow(s,2)*e,m=Math.exp(-f),p=Xs(Math.pow(s,2),c);return(-o(s)+is>0?-1:1)*((d-h)*m)/p}):(o=s=>{const a=Math.exp(-s*e),f=(s-n)*e+1;return-is+a*f},i=s=>{const a=Math.exp(-s*e),f=(n-s)*(e*e);return a*f});const u=5/e,l=a_(o,i,u);if(e=it(e),isNaN(l))return{stiffness:ge.stiffness,damping:ge.damping,duration:e};{const s=Math.pow(l,2)*r;return{stiffness:s,damping:c*2*Math.sqrt(r*s),duration:e}}}const s_=12;function a_(e,t,n){let r=n;for(let o=1;o<s_;o++)r=r-e(r)/t(r);return r}function Xs(e,t){return e*Math.sqrt(1-t*t)}const c_=["duration","bounce"],l_=["stiffness","damping","mass"];function kl(e,t){return t.some(n=>e[n]!==void 0)}function u_(e){let t={velocity:ge.velocity,stiffness:ge.stiffness,damping:ge.damping,mass:ge.mass,isResolvedFromDuration:!1,...e};if(!kl(e,l_)&&kl(e,c_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*ct(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ge.mass,stiffness:o,damping:i}}else{const n=i_(e);t={...t,...n,mass:ge.mass},t.isResolvedFromDuration=!0}return t}function Qo(e=ge.visualDuration,t=ge.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],u={done:!1,value:i},{stiffness:l,damping:s,mass:a,duration:f,velocity:d,isResolvedFromDuration:h}=u_({...n,velocity:-Ge(n.velocity||0)}),m=d||0,p=s/(2*Math.sqrt(l*a)),v=c-i,x=Ge(Math.sqrt(l/a)),b=Math.abs(v)<5;r||(r=b?ge.restSpeed.granular:ge.restSpeed.default),o||(o=b?ge.restDelta.granular:ge.restDelta.default);let w;if(p<1){const E=Xs(x,p);w=A=>{const R=Math.exp(-p*x*A);return c-R*((m+p*x*v)/E*Math.sin(E*A)+v*Math.cos(E*A))}}else if(p===1)w=E=>c-Math.exp(-x*E)*(v+(m+x*v)*E);else{const E=x*Math.sqrt(p*p-1);w=A=>{const R=Math.exp(-p*x*A),T=Math.min(E*A,300);return c-R*((m+p*x*v)*Math.sinh(T)+E*v*Math.cosh(T))/E}}const S={calculatedDuration:h&&f||null,next:E=>{const A=w(E);if(h)u.done=E>=f;else{let R=E===0?m:0;p<1&&(R=E===0?it(m):Fg(w,E,A));const T=Math.abs(R)<=r,I=Math.abs(c-A)<=o;u.done=T&&I}return u.value=u.done?c:A,u},toString:()=>{const E=Math.min(Ec(S),Zo),A=Lg(R=>S.next(E*R).value,E,30);return E+"ms "+A},toTransition:()=>{}};return S}Qo.applyToOptions=e=>{const t=r_(e,100,Qo);return e.ease=t.ease,e.duration=it(t.duration),e.type="keyframes",e};function Zs({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:c,min:u,max:l,restDelta:s=.5,restSpeed:a}){const f=e[0],d={done:!1,value:f},h=T=>u!==void 0&&T<u||l!==void 0&&T>l,m=T=>u===void 0?l:l===void 0||Math.abs(u-T)<Math.abs(l-T)?u:l;let p=n*t;const v=f+p,x=c===void 0?v:c(v);x!==v&&(p=x-f);const b=T=>-p*Math.exp(-T/r),w=T=>x+b(T),S=T=>{const I=b(T),P=w(T);d.done=Math.abs(I)<=s,d.value=d.done?x:P};let E,A;const R=T=>{h(d.value)&&(E=T,A=Qo({keyframes:[d.value,m(d.value)],velocity:Fg(w,T,d.value),damping:o,stiffness:i,restDelta:s,restSpeed:a}))};return R(0),{calculatedDuration:null,next:T=>{let I=!1;return!A&&E===void 0&&(I=!0,S(T),R(T)),E!==void 0&&T>=E?A.next(T-E):(!I&&S(T),d)}}}function f_(e,t,n){const r=[],o=n||gt.mix||kg,i=e.length-1;for(let c=0;c<i;c++){let u=o(e[c],e[c+1]);if(t){const l=Array.isArray(t)?t[c]||ze:t;u=Er(l,u)}r.push(u)}return r}function d_(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(mt(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=f_(t,r,o),l=u.length,s=a=>{if(c&&a<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(a<e[f+1]);f++);const d=nr(e[f],e[f+1],a);return u[f](d)};return n?a=>s(ct(e[0],e[i-1],a)):s}function h_(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=nr(0,t,r);e.push(ve(n,1,o))}}function p_(e){const t=[0];return h_(t,e.length-1),t}function m_(e,t){return e.map(n=>n*t)}function g_(e,t){return e.map(()=>t||_g).splice(0,e.length-1)}function an({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=PC(r)?r.map(Ol):Ol(r),i={done:!1,value:t[0]},c=m_(n&&n.length===t.length?n:p_(t),e),u=d_(c,t,{ease:Array.isArray(o)?o:g_(t,o)});return{calculatedDuration:e,next:l=>(i.value=u(l),i.done=l>=e,i)}}const v_=e=>e!==null;function Sc(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(v_),u=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!u||r===void 0?i[u]:r}const y_={decay:Zs,inertia:Zs,tween:an,keyframes:an,spring:Qo};function Vg(e){typeof e.type=="string"&&(e.type=y_[e.type])}class Cc{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const x_=e=>e/100;class _c extends Cc{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,o;const{motionValue:n}=this.options;n&&n.updatedAt!==Me.now()&&this.tick(Me.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Vg(t);const{type:n=an,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:c=0}=t;let{keyframes:u}=t;const l=n||an;process.env.NODE_ENV!=="production"&&l!==an&&mt(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),l!==an&&typeof u[0]!="number"&&(this.mixKeyframes=Er(x_,kg(u[0],u[1])),u=[0,100]);const s=l({...t,keyframes:u});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...u].reverse(),velocity:-c})),s.calculatedDuration===null&&(s.calculatedDuration=Ec(s));const{calculatedDuration:a}=s;this.calculatedDuration=a,this.resolvedDuration=a+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=s}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:c,resolvedDuration:u,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:s=0,keyframes:a,repeat:f,repeatType:d,repeatDelay:h,type:m,onUpdate:p,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-s*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?x<0:x>o;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let w=this.currentTime,S=r;if(f){const T=Math.min(this.currentTime,o)/u;let I=Math.floor(T),P=T%1;!P&&T>=1&&(P=1),P===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(d==="reverse"?(P=1-P,h&&(P-=h/u)):d==="mirror"&&(S=c)),w=ct(0,1,P)*u}const E=b?{done:!1,value:a[0]}:S.next(w);i&&(E.value=i(E.value));let{done:A}=E;!b&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return R&&m!==Zs&&(E.value=Sc(a,this.options,v,this.speed)),p&&p(E.value),R&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return Ge(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ge(t)}get time(){return Ge(this.currentTime)}set time(t){var n;t=it(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Me.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ge(this.currentTime))}play(){var o,i;if(this.isStopped)return;const{driver:t=n_,startTime:n}=this.options;this.driver||(this.driver=t(c=>this.tick(c))),(i=(o=this.options).onPlay)==null||i.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Me.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function b_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Bt=e=>e*180/Math.PI,Qs=e=>{const t=Bt(Math.atan2(e[1],e[0]));return Js(t)},w_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Qs,rotateZ:Qs,skewX:e=>Bt(Math.atan(e[1])),skewY:e=>Bt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Js=e=>(e=e%360,e<0&&(e+=360),e),Ll=Qs,Fl=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Vl=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),E_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Fl,scaleY:Vl,scale:e=>(Fl(e)+Vl(e))/2,rotateX:e=>Js(Bt(Math.atan2(e[6],e[5]))),rotateY:e=>Js(Bt(Math.atan2(-e[2],e[0]))),rotateZ:Ll,rotate:Ll,skewX:e=>Bt(Math.atan(e[4])),skewY:e=>Bt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ea(e){return e.includes("scale")?1:0}function ta(e,t){if(!e||e==="none")return ea(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=E_,o=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=w_,o=u}if(!o)return ea(t);const i=r[t],c=o[1].split(",").map(C_);return typeof i=="function"?i(c):c[i]}const S_=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ta(n,t)};function C_(e){return parseFloat(e.trim())}const Tn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pn=new Set(Tn),Bl=e=>e===Rn||e===W,__=new Set(["x","y","z"]),R_=Tn.filter(e=>!__.has(e));function T_(e){const t=[];return R_.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const wt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ta(t,"x"),y:(e,{transform:t})=>ta(t,"y")};wt.translateX=wt.x;wt.translateY=wt.y;const $t=new Set;let na=!1,ra=!1,oa=!1;function Bg(){if(ra){const e=Array.from($t).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=T_(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,c])=>{var u;(u=r.getValue(i))==null||u.set(c)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ra=!1,na=!1,$t.forEach(e=>e.complete(oa)),$t.clear()}function $g(){$t.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ra=!0)})}function P_(){oa=!0,$g(),Bg(),oa=!1}class Rc{constructor(t,n,r,o,i,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?($t.add(this),na||(na=!0,pe.read($g),pe.resolveKeyframes(Bg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o==null?void 0:o.get(),c=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const u=r.readValue(n,c);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=c),o&&i===void 0&&o.set(t[0])}b_(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),$t.delete(this)}cancel(){this.state==="scheduled"&&($t.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const A_=e=>e.startsWith("--");function O_(e,t,n){A_(t)?e.style.setProperty(t,n):e.style[t]=n}const M_=hc(()=>window.ScrollTimeline!==void 0),I_={};function N_(e,t){const n=hc(e);return()=>I_[t]??n()}const Ug=N_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Hn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,$l={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hn([0,.65,.55,1]),circOut:Hn([.55,0,1,.45]),backIn:Hn([.31,.01,.66,-.59]),backOut:Hn([.33,1.53,.69,.99])};function Gg(e,t){if(e)return typeof e=="function"?Ug()?Lg(e,t):"ease-out":Rg(e)?Hn(e):Array.isArray(e)?e.map(n=>Gg(n,t)||$l.easeOut):$l[e]}function j_(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:c="loop",ease:u="easeOut",times:l}={},s=void 0){const a={[t]:n};l&&(a.offset=l);const f=Gg(u,o);Array.isArray(f)&&(a.easing=f);const d={delay:r,duration:o,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:c==="reverse"?"alternate":"normal"};return s&&(d.pseudoElement=s),e.animate(a,d)}function Hg(e){return typeof e=="function"&&"applyToOptions"in e}function D_({type:e,...t}){return Hg(e)&&Ug()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class k_ extends Cc{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:c=!1,finalKeyframe:u,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=c,this.options=t,mt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const s=D_(t);this.animation=j_(n,r,o,s,i),s.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const a=Sc(o,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(a):O_(n,r,a),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Ge(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ge(t)}get time(){return Ge(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=it(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&M_()?(this.animation.timeline=t,ze):n(this)}}const zg={anticipate:Eg,backInOut:wg,circInOut:Cg};function L_(e){return e in zg}function F_(e){typeof e.ease=="string"&&L_(e.ease)&&(e.ease=zg[e.ease])}const ss=10;class V_ extends k_{constructor(t){F_(t),Vg(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...c}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new _c({...c,autoplay:!1}),l=Math.max(ss,Me.now()-this.startTime),s=ct(0,ss,l-ss);n.setWithVelocity(u.sample(Math.max(0,l-s)).value,u.sample(l).value,s),u.stop()}}const Ul=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Tt.test(e)||e==="0")&&!e.startsWith("url("));function B_(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function $_(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],c=Ul(o,t),u=Ul(i,t);return _n(c===u,`You are trying to animate ${t} from "${o}" to "${i}". "${c?i:o}" is not an animatable value.`,"value-not-animatable"),!c||!u?!1:B_(e)||(n==="spring"||Hg(n))&&r}function ia(e){e.duration=0,e.type="keyframes"}const U_=new Set(["opacity","clipPath","filter","transform"]),G_=hc(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function H_(e){var a;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:c}=e;if(!(((a=t==null?void 0:t.owner)==null?void 0:a.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:s}=t.owner.getProps();return G_()&&n&&U_.has(n)&&(n!=="transform"||!s)&&!l&&!r&&o!=="mirror"&&i!==0&&c!=="inertia"}const z_=40;class W_ extends Cc{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:c="loop",keyframes:u,name:l,motionValue:s,element:a,...f}){var m;super(),this.stop=()=>{var p,v;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=Me.now();const d={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:c,name:l,motionValue:s,element:a,...f},h=(a==null?void 0:a.KeyframeResolver)||Rc;this.keyframeResolver=new h(u,(p,v,x)=>this.onKeyframesResolved(p,v,d,!x),l,s,a),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,o){var v,x;this.keyframeResolver=void 0;const{name:i,type:c,velocity:u,delay:l,isHandoff:s,onUpdate:a}=r;this.resolvedAt=Me.now(),$_(t,i,c,u)||((gt.instantAnimations||!l)&&(a==null||a(Sc(t,r,n))),t[0]=t[t.length-1],ia(r),r.repeat=0);const d={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>z_?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!s&&H_(d),m=(x=(v=d.motionValue)==null?void 0:v.owner)==null?void 0:x.current,p=h?new V_({...d,element:m}):new _c(d);p.finished.then(()=>{this.notifyFinished()}).catch(ze),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),P_()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Wg(e,t,n,r=0,o=1){const i=Array.from(e).sort((s,a)=>s.sortNodePosition(a)).indexOf(t),c=e.size,u=(c-1)*r;return typeof n=="function"?n(i,c):o===1?i*r:u-i*r}const q_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function K_(e){const t=q_.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const Y_=4;function qg(e,t,n=1){mt(n<=Y_,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=K_(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const c=i.trim();return hg(c)?parseFloat(c):c}return yc(o)?qg(o,t,n+1):o}const X_={type:"spring",stiffness:500,damping:25,restSpeed:10},Z_=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Q_={type:"keyframes",duration:.8},J_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},eR=(e,{keyframes:t})=>t.length>2?Q_:Pn.has(e)?e.startsWith("scale")?Z_(t[1]):X_:J_,tR=e=>e!==null;function nR(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(tR),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function Tc(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function rR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:c,repeatDelay:u,from:l,elapsed:s,...a}){return!!Object.keys(a).length}const Pc=(e,t,n,r={},o,i)=>c=>{const u=Tc(r,e)||{},l=u.delay||r.delay||0;let{elapsed:s=0}=r;s=s-it(l);const a={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-s,onUpdate:d=>{t.set(d),u.onUpdate&&u.onUpdate(d)},onComplete:()=>{c(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:i?void 0:o};rR(u)||Object.assign(a,eR(e,a)),a.duration&&(a.duration=it(a.duration)),a.repeatDelay&&(a.repeatDelay=it(a.repeatDelay)),a.from!==void 0&&(a.keyframes[0]=a.from);let f=!1;if((a.type===!1||a.duration===0&&!a.repeatDelay)&&(ia(a),a.delay===0&&(f=!0)),(gt.instantAnimations||gt.skipAnimations)&&(f=!0,ia(a),a.delay=0),a.allowFlatten=!u.type&&!u.ease,f&&!i&&t.get()!==void 0){const d=nR(a.keyframes,u);if(d!==void 0){pe.update(()=>{a.onUpdate(d),a.onComplete()});return}}return u.isSync?new _c(a):new W_(a)};function Gl(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ac(e,t,n,r){if(typeof t=="function"){const[o,i]=Gl(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Gl(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function pn(e,t,n){const r=e.getProps();return Ac(r,t,n!==void 0?n:r.custom,e)}const Kg=new Set(["width","height","top","left","right","bottom",...Tn]),Hl=30,oR=e=>!isNaN(parseFloat(e));class iR{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const o=Me.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Me.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=oR(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&mc(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new pc);const r=this.events[t].add(n);return t==="change"?()=>{r(),pe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Me.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Hl)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Hl);return gg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function yn(e,t){return new iR(e,t)}const sa=e=>Array.isArray(e);function sR(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,yn(n))}function aR(e){return sa(e)?e[e.length-1]||0:e}function cR(e,t){const n=pn(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const c in i){const u=aR(i[c]);sR(e,c,u)}}const Pe=e=>!!(e&&e.getVelocity);function lR(e){return!!(Pe(e)&&e.add)}function aa(e,t){const n=e.getValue("willChange");if(lR(n))return n.add(t);if(!n&>.WillChange){const r=new gt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Oc(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const uR="framerAppearId",Yg="data-"+Oc(uR);function Xg(e){return e.props[Yg]}function fR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Zg(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:c,...u}=t;r&&(i=r);const l=[],s=o&&e.animationState&&e.animationState.getState()[o];for(const a in u){const f=e.getValue(a,e.latestValues[a]??null),d=u[a];if(d===void 0||s&&fR(s,a))continue;const h={delay:n,...Tc(i||{},a)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===m&&!h.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const x=Xg(e);if(x){const b=window.MotionHandoffAnimation(x,a,pe);b!==null&&(h.startTime=b,p=!0)}}aa(e,a),f.start(Pc(a,f,d,e.shouldReduceMotion&&Kg.has(a)?{type:!1}:h,e,p));const v=f.animation;v&&l.push(v)}return c&&Promise.all(l).then(()=>{pe.update(()=>{c&&cR(e,c)})}),l}function ca(e,t,n={}){var l;const r=pn(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Zg(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(s=0)=>{const{delayChildren:a=0,staggerChildren:f,staggerDirection:d}=o;return dR(e,t,s,a,f,d,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[s,a]=u==="beforeChildren"?[i,c]:[c,i];return s().then(()=>a())}else return Promise.all([i(),c(n.delay)])}function dR(e,t,n=0,r=0,o=0,i=1,c){const u=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),u.push(ca(l,t,{...c,delay:n+(typeof r=="function"?0:r)+Wg(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(u)}function hR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>ca(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=ca(e,t,n);else{const o=typeof t=="function"?pn(e,t,n.custom):t;r=Promise.all(Zg(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const pR={test:e=>e==="auto",parse:e=>e},Qg=e=>t=>t.test(e),Jg=[Rn,W,st,bt,BC,VC,pR],zl=e=>Jg.find(Qg(e));function mR(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mg(e):!0}const gR=new Set(["brightness","contrast","saturate","opacity"]);function vR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(xc)||[];if(!r)return e;const o=n.replace(r,"");let i=gR.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const yR=/\b([a-z-]*)\(.*?\)/gu,la={...Tt,getAnimatableNone:e=>{const t=e.match(yR);return t?t.map(vR).join(" "):e}},Wl={...Rn,transform:Math.round},xR={rotate:bt,rotateX:bt,rotateY:bt,rotateZ:bt,scale:$r,scaleX:$r,scaleY:$r,scaleZ:$r,skew:bt,skewX:bt,skewY:bt,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:rr,originX:Il,originY:Il,originZ:W},Mc={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,inset:W,insetBlock:W,insetBlockStart:W,insetBlockEnd:W,insetInline:W,insetInlineStart:W,insetInlineEnd:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockStart:W,paddingBlockEnd:W,paddingInline:W,paddingInlineStart:W,paddingInlineEnd:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockStart:W,marginBlockEnd:W,marginInline:W,marginInlineStart:W,marginInlineEnd:W,backgroundPositionX:W,backgroundPositionY:W,...xR,zIndex:Wl,fillOpacity:rr,strokeOpacity:rr,numOctaves:Wl},bR={...Mc,color:be,backgroundColor:be,outlineColor:be,fill:be,stroke:be,borderColor:be,borderTopColor:be,borderRightColor:be,borderBottomColor:be,borderLeftColor:be,filter:la,WebkitFilter:la},ev=e=>bR[e];function tv(e,t){let n=ev(e);return n!==la&&(n=Tt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const wR=new Set(["auto","none","0"]);function ER(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!wR.has(i)&&or(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=tv(n,o)}class SR extends Rc{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let f=t[a];if(typeof f=="string"&&(f=f.trim(),yc(f))){const d=qg(f,n.current);d!==void 0&&(t[a]=d),a===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Kg.has(r)||t.length!==2)return;const[o,i]=t,c=zl(o),u=zl(i),l=Ml(o),s=Ml(i);if(l!==s&&wt[r]){this.needsMeasurement=!0;return}if(c!==u)if(Bl(c)&&Bl(u))for(let a=0;a<t.length;a++){const f=t[a];typeof f=="string"&&(t[a]=parseFloat(f))}else wt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||mR(t[o]))&&r.push(o);r.length&&ER(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=wt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,c=r[i];r[i]=wt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([l,s])=>{t.getValue(l).set(s)}),this.resolveNoneKeyframes()}}function CR(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const nv=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function rv(e){return pg(e)&&"offsetHeight"in e}const{schedule:Ic}=Tg(queueMicrotask,!1),Xe={x:!1,y:!1};function ov(){return Xe.x||Xe.y}function _R(e){return e==="x"||e==="y"?Xe[e]?null:(Xe[e]=!0,()=>{Xe[e]=!1}):Xe.x||Xe.y?null:(Xe.x=Xe.y=!0,()=>{Xe.x=Xe.y=!1})}function iv(e,t){const n=CR(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function ql(e){return!(e.pointerType==="touch"||ov())}function RR(e,t,n={}){const[r,o,i]=iv(e,n),c=u=>{if(!ql(u))return;const{target:l}=u,s=t(l,u);if(typeof s!="function"||!l)return;const a=f=>{ql(f)&&(s(f),l.removeEventListener("pointerleave",a))};l.addEventListener("pointerleave",a,o)};return r.forEach(u=>{u.addEventListener("pointerenter",c,o)}),i}const sv=(e,t)=>t?e===t?!0:sv(e,t.parentElement):!1,Nc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,TR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function av(e){return TR.has(e.tagName)||e.isContentEditable===!0}const ko=new WeakSet;function Kl(e){return t=>{t.key==="Enter"&&e(t)}}function as(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const PR=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Kl(()=>{if(ko.has(n))return;as(n,"down");const o=Kl(()=>{as(n,"up")}),i=()=>as(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Yl(e){return Nc(e)&&!ov()}function AR(e,t,n={}){const[r,o,i]=iv(e,n),c=u=>{const l=u.currentTarget;if(!Yl(u))return;ko.add(l);const s=t(l,u),a=(h,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),ko.has(l)&&ko.delete(l),Yl(h)&&typeof s=="function"&&s(h,{success:m})},f=h=>{a(h,l===window||l===document||n.useGlobalTarget||sv(l,h.target))},d=h=>{a(h,!1)};window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",d,o)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",c,o),rv(u)&&(u.addEventListener("focus",s=>PR(s,o)),!av(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),i}function cv(e){return pg(e)&&"ownerSVGElement"in e}function OR(e){return cv(e)&&e.tagName==="svg"}const MR=[...Jg,be,Tt],IR=e=>MR.find(Qg(e)),Xl=()=>({translate:0,scale:1,origin:0,originPoint:0}),cn=()=>({x:Xl(),y:Xl()}),Zl=()=>({min:0,max:0}),Ce=()=>({x:Zl(),y:Zl()}),ua={current:null},lv={current:!1},NR=typeof window<"u";function jR(){if(lv.current=!0,!!NR)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ua.current=e.matches;e.addEventListener("change",t),t()}else ua.current=!1}const DR=new WeakMap;function Di(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ir(e){return typeof e=="string"||Array.isArray(e)}const jc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dc=["initial",...jc];function ki(e){return Di(e.animate)||Dc.some(t=>ir(e[t]))}function uv(e){return!!(ki(e)||e.variants)}function kR(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Pe(o))e.addValue(r,o);else if(Pe(i))e.addValue(r,yn(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const c=e.getValue(r);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(r);e.addValue(r,yn(c!==void 0?c:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ql=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Jo={};function fv(e){Jo=e}function LR(){return Jo}class FR{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:c},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Rc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=Me.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,pe.render(this.render,!1,!0))};const{latestValues:l,renderState:s}=c;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=s,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=u,this.blockInitialAnimation=!!i,this.isControllingVariants=ki(n),this.isVariantNode=uv(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:a,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&Pe(h)&&h.set(l[d])}}mount(t){var n;this.current=t,DR.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(lv.current||jR(),this.shouldReduceMotion=ua.current),process.env.NODE_ENV!=="production"&&mc(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Rt(this.notifyUpdate),Rt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Pn.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&pe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Jo){const n=Jo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ce()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Ql.length;r++){const o=Ql[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,c=t[i];c&&(this.propEventSubscriptions[o]=this.on(o,c))}this.prevMotionValues=kR(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=yn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(hg(r)||mg(r))?r=parseFloat(r):!IR(r)&&Tt.test(n)&&(r=tv(t,n)),this.setBaseTarget(t,Pe(r)?r.get():r)),Pe(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const c=Ac(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);c&&(r=c[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Pe(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new pc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ic.render(this.render)}}class dv extends FR{constructor(){super(...arguments),this.KeyframeResolver=SR}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Pe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Mt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function hv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function VR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function BR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function cs(e){return e===void 0||e===1}function fa({scale:e,scaleX:t,scaleY:n}){return!cs(e)||!cs(t)||!cs(n)}function Ft(e){return fa(e)||pv(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function pv(e){return Jl(e.x)||Jl(e.y)}function Jl(e){return e&&e!=="0%"}function ei(e,t,n){const r=e-n,o=t*r;return n+o}function eu(e,t,n,r,o){return o!==void 0&&(e=ei(e,o,r)),ei(e,n,r)+t}function da(e,t=0,n=1,r,o){e.min=eu(e.min,t,n,r,o),e.max=eu(e.max,t,n,r,o)}function mv(e,{x:t,y:n}){da(e.x,t.translate,t.scale,t.originPoint),da(e.y,n.translate,n.scale,n.originPoint)}const tu=.999999999999,nu=1.0000000000001;function $R(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,c;for(let u=0;u<o;u++){i=n[u],c=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&un(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,mv(e,c)),r&&Ft(i.latestValues)&&un(e,i.latestValues))}t.x<nu&&t.x>tu&&(t.x=1),t.y<nu&&t.y>tu&&(t.y=1)}function ln(e,t){e.min=e.min+t,e.max=e.max+t}function ru(e,t,n,r,o=.5){const i=ve(e.min,e.max,o);da(e,t,n,i,r)}function un(e,t){ru(e.x,t.x,t.scaleX,t.scale,t.originX),ru(e.y,t.y,t.scaleY,t.scale,t.originY)}function gv(e,t){return hv(BR(e.getBoundingClientRect(),t))}function UR(e,t,n){const r=gv(e,n),{scroll:o}=t;return o&&(ln(r.x,o.offset.x),ln(r.y,o.offset.y)),r}const GR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},HR=Tn.length;function zR(e,t,n){let r="",o=!0;for(let i=0;i<HR;i++){const c=Tn[i],u=e[c];if(u===void 0)continue;let l=!0;if(typeof u=="number"?l=u===(c.startsWith("scale")?1:0):l=parseFloat(u)===0,!l||n){const s=nv(u,Mc[c]);if(!l){o=!1;const a=GR[c]||c;r+=`${a}(${s}) `}n&&(t[c]=s)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function kc(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let c=!1,u=!1;for(const l in t){const s=t[l];if(Pn.has(l)){c=!0;continue}else if(Ag(l)){o[l]=s;continue}else{const a=nv(s,Mc[l]);l.startsWith("origin")?(u=!0,i[l]=a):r[l]=a}}if(t.transform||(c||n?r.transform=zR(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:l="50%",originY:s="50%",originZ:a=0}=i;r.transformOrigin=`${l} ${s} ${a}`}}function vv(e,{style:t,vars:n},r,o){const i=e.style;let c;for(c in t)i[c]=t[c];o==null||o.applyProjectionStyles(i,r);for(c in n)i.setProperty(c,n[c])}function ou(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Nn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(W.test(e))e=parseFloat(e);else return e;const n=ou(e,t.target.x),r=ou(e,t.target.y);return`${n}% ${r}%`}},WR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Tt.parse(e);if(o.length>5)return r;const i=Tt.createTransformer(e),c=typeof o[0]!="number"?1:0,u=n.x.scale*t.x,l=n.y.scale*t.y;o[0+c]/=u,o[1+c]/=l;const s=ve(u,l,.5);return typeof o[2+c]=="number"&&(o[2+c]/=s),typeof o[3+c]=="number"&&(o[3+c]/=s),i(o)}},ha={borderRadius:{...Nn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Nn,borderTopRightRadius:Nn,borderBottomLeftRadius:Nn,borderBottomRightRadius:Nn,boxShadow:WR};function yv(e,{layout:t,layoutId:n}){return Pn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ha[e]||e==="opacity")}function Lc(e,t,n){var c;const r=e.style,o=t==null?void 0:t.style,i={};if(!r)return i;for(const u in r)(Pe(r[u])||o&&Pe(o[u])||yv(u,e)||((c=n==null?void 0:n.getValue(u))==null?void 0:c.liveStyle)!==void 0)&&(i[u]=r[u]);return i}function qR(e){return window.getComputedStyle(e)}class KR extends dv{constructor(){super(...arguments),this.type="html",this.renderInstance=vv}readValueFromInstance(t,n){var r;if(Pn.has(n))return(r=this.projection)!=null&&r.isProjecting?ea(n):S_(t,n);{const o=qR(t),i=(Ag(n)?o.getPropertyValue(n):o[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return gv(t,n)}build(t,n,r){kc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Lc(t,n,r)}}const YR={offset:"stroke-dashoffset",array:"stroke-dasharray"},XR={offset:"strokeDashoffset",array:"strokeDasharray"};function ZR(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?YR:XR;e[i.offset]=W.transform(-r);const c=W.transform(t),u=W.transform(n);e[i.array]=`${c} ${u}`}const QR=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function xv(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:c=0,...u},l,s,a){if(kc(e,u,s),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(a==null?void 0:a.transformBox)??"fill-box",delete f.transformBox);for(const h of QR)f[h]!==void 0&&(d[h]=f[h],delete f[h]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&ZR(f,o,i,c,!1)}const bv=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),wv=e=>typeof e=="string"&&e.toLowerCase()==="svg";function JR(e,t,n,r){vv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(bv.has(o)?o:Oc(o),t.attrs[o])}function Ev(e,t,n){const r=Lc(e,t,n);for(const o in e)if(Pe(e[o])||Pe(t[o])){const i=Tn.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class eT extends dv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ce}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Pn.has(n)){const r=ev(n);return r&&r.default||0}return n=bv.has(n)?n:Oc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ev(t,n,r)}build(t,n,r){xv(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){JR(t,n,r,o)}mount(t){this.isSVGTag=wv(t.tagName),super.mount(t)}}const tT=Dc.length;function Sv(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Sv(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<tT;n++){const r=Dc[n],o=e.props[r];(ir(o)||o===!1)&&(t[r]=o)}return t}function Cv(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const nT=[...jc].reverse(),rT=jc.length;function oT(e){return t=>Promise.all(t.map(({animation:n,options:r})=>hR(e,n,r)))}function iT(e){let t=oT(e),n=iu(),r=!0;const o=l=>(s,a)=>{var d;const f=pn(e,a,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:m,...p}=f;s={...s,...p,...m}}return s};function i(l){t=l(e)}function c(l){const{props:s}=e,a=Sv(e.parent)||{},f=[],d=new Set;let h={},m=1/0;for(let v=0;v<rT;v++){const x=nT[v],b=n[x],w=s[x]!==void 0?s[x]:a[x],S=ir(w),E=x===l?b.isActive:null;E===!1&&(m=v);let A=w===a[x]&&w!==s[x]&&S;if(A&&r&&e.manuallyAnimateOnMount&&(A=!1),b.protectedKeys={...h},!b.isActive&&E===null||!w&&!b.prevProp||Di(w)||typeof w=="boolean")continue;const R=sT(b.prevProp,w);let T=R||x===l&&b.isActive&&!A&&S||v>m&&S,I=!1;const P=Array.isArray(w)?w:[w];let M=P.reduce(o(x),{});E===!1&&(M={});const{prevResolvedValues:j={}}=b,V={...j,...M},$=H=>{T=!0,d.has(H)&&(I=!0,d.delete(H)),b.needsAnimating[H]=!0;const U=e.getValue(H);U&&(U.liveStyle=!1)};for(const H in V){const U=M[H],L=j[H];if(h.hasOwnProperty(H))continue;let O=!1;sa(U)&&sa(L)?O=!Cv(U,L):O=U!==L,O?U!=null?$(H):d.add(H):U!==void 0&&d.has(H)?$(H):b.protectedKeys[H]=!0}b.prevProp=w,b.prevResolvedValues=M,b.isActive&&(h={...h,...M}),r&&e.blockInitialAnimation&&(T=!1);const K=A&&R;T&&(!K||I)&&f.push(...P.map(H=>{const U={type:x};if(typeof H=="string"&&r&&!K&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,O=pn(L,H);if(L.enteringChildren&&O){const{delayChildren:k}=O.transition||{};U.delay=Wg(L.enteringChildren,e,k)}}return{animation:H,options:U}}))}if(d.size){const v={};if(typeof s.initial!="boolean"){const x=pn(e,Array.isArray(s.initial)?s.initial[0]:s.initial);x&&x.transition&&(v.transition=x.transition)}d.forEach(x=>{const b=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),v[x]=b??null}),f.push({animation:v})}let p=!!f.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(f):Promise.resolve()}function u(l,s){var f;if(n[l].isActive===s)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,s)}),n[l].isActive=s;const a=c(l);for(const d in n)n[d].protectedKeys={};return a}return{animateChanges:c,setActive:u,setAnimateFunction:i,getState:()=>n,reset:()=>{n=iu()}}}function sT(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Cv(t,e):!1}function Dt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function iu(){return{animate:Dt(!0),whileInView:Dt(),whileHover:Dt(),whileTap:Dt(),whileDrag:Dt(),whileFocus:Dt(),exit:Dt()}}function su(e,t){e.min=t.min,e.max=t.max}function qe(e,t){su(e.x,t.x),su(e.y,t.y)}function au(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const _v=1e-4,aT=1-_v,cT=1+_v,Rv=.01,lT=0-Rv,uT=0+Rv;function Ie(e){return e.max-e.min}function fT(e,t,n){return Math.abs(e-t)<=n}function cu(e,t,n,r=.5){e.origin=r,e.originPoint=ve(t.min,t.max,e.origin),e.scale=Ie(n)/Ie(t),e.translate=ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=aT&&e.scale<=cT||isNaN(e.scale))&&(e.scale=1),(e.translate>=lT&&e.translate<=uT||isNaN(e.translate))&&(e.translate=0)}function qn(e,t,n,r){cu(e.x,t.x,n.x,r?r.originX:void 0),cu(e.y,t.y,n.y,r?r.originY:void 0)}function lu(e,t,n){e.min=n.min+t.min,e.max=e.min+Ie(t)}function dT(e,t,n){lu(e.x,t.x,n.x),lu(e.y,t.y,n.y)}function uu(e,t,n){e.min=t.min-n.min,e.max=e.min+Ie(t)}function ti(e,t,n){uu(e.x,t.x,n.x),uu(e.y,t.y,n.y)}function fu(e,t,n,r,o){return e-=t,e=ei(e,1/n,r),o!==void 0&&(e=ei(e,1/o,r)),e}function hT(e,t=0,n=1,r=.5,o,i=e,c=e){if(st.test(t)&&(t=parseFloat(t),t=ve(c.min,c.max,t/100)-c.min),typeof t!="number")return;let u=ve(i.min,i.max,r);e===i&&(u-=t),e.min=fu(e.min,t,n,u,o),e.max=fu(e.max,t,n,u,o)}function du(e,t,[n,r,o],i,c){hT(e,t[n],t[r],t[o],t.scale,i,c)}const pT=["x","scaleX","originX"],mT=["y","scaleY","originY"];function hu(e,t,n,r){du(e.x,t,pT,n?n.x:void 0,r?r.x:void 0),du(e.y,t,mT,n?n.y:void 0,r?r.y:void 0)}function pu(e){return e.translate===0&&e.scale===1}function Tv(e){return pu(e.x)&&pu(e.y)}function mu(e,t){return e.min===t.min&&e.max===t.max}function gT(e,t){return mu(e.x,t.x)&&mu(e.y,t.y)}function gu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Pv(e,t){return gu(e.x,t.x)&&gu(e.y,t.y)}function vu(e){return Ie(e.x)/Ie(e.y)}function yu(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ue(e){return[e("x"),e("y")]}function vT(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,c=(n==null?void 0:n.z)||0;if((o||i||c)&&(r=`translate3d(${o}px, ${i}px, ${c}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:s,rotate:a,rotateX:f,rotateY:d,skewX:h,skewY:m}=n;s&&(r=`perspective(${s}px) ${r}`),a&&(r+=`rotate(${a}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const u=e.x.scale*t.x,l=e.y.scale*t.y;return(u!==1||l!==1)&&(r+=`scale(${u}, ${l})`),r||"none"}const Av=["TopLeft","TopRight","BottomLeft","BottomRight"],yT=Av.length,xu=e=>typeof e=="string"?parseFloat(e):e,bu=e=>typeof e=="number"||W.test(e);function xT(e,t,n,r,o,i){o?(e.opacity=ve(0,n.opacity??1,bT(r)),e.opacityExit=ve(t.opacity??1,0,wT(r))):i&&(e.opacity=ve(t.opacity??1,n.opacity??1,r));for(let c=0;c<yT;c++){const u=`border${Av[c]}Radius`;let l=wu(t,u),s=wu(n,u);if(l===void 0&&s===void 0)continue;l||(l=0),s||(s=0),l===0||s===0||bu(l)===bu(s)?(e[u]=Math.max(ve(xu(l),xu(s),r),0),(st.test(s)||st.test(l))&&(e[u]+="%")):e[u]=s}(t.rotate||n.rotate)&&(e.rotate=ve(t.rotate||0,n.rotate||0,r))}function wu(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const bT=Ov(0,.5,Sg),wT=Ov(.5,.95,ze);function Ov(e,t,n){return r=>r<e?0:r>t?1:n(nr(e,t,r))}function ET(e,t,n){const r=Pe(e)?e:yn(e);return r.start(Pc("",r,t,n)),r.animation}function sr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const ST=(e,t)=>e.depth-t.depth;class CT{constructor(){this.children=[],this.isDirty=!1}add(t){fc(this.children,t),this.isDirty=!0}remove(t){dc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ST),this.isDirty=!1,this.children.forEach(t)}}function _T(e,t){const n=Me.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Rt(r),e(i-t))};return pe.setup(r,!0),()=>Rt(r)}function Lo(e){return Pe(e)?e.get():e}class RT{constructor(){this.members=[]}add(t){fc(this.members,t),t.scheduleRender()}remove(t){if(dc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Fo={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ls=["","X","Y","Z"],TT=1e3;let PT=0;function us(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Mv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Xg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",pe,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Mv(r)}function Iv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(c={},u=t==null?void 0:t()){this.id=PT++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(MT),this.nodes.forEach(DT),this.nodes.forEach(kT),this.nodes.forEach(IT)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new CT)}addEventListener(c,u){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new pc),this.eventHandlers.get(c).add(u)}notifyListeners(c,...u){const l=this.eventHandlers.get(c);l&&l.notify(...u)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=cv(c)&&!OR(c),this.instance=c;const{layoutId:u,layout:l,visualElement:s}=this.options;if(s&&!s.current&&s.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||u)&&(this.isLayoutDirty=!0),e){let a,f=0;const d=()=>this.root.updateBlockedByResize=!1;pe.read(()=>{f=window.innerWidth}),e(c,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,a&&a(),a=_T(d,250),Fo.hasAnimatedSinceResize&&(Fo.hasAnimatedSinceResize=!1,this.nodes.forEach(Cu)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&s&&(u||l)&&this.addEventListener("didUpdate",({delta:a,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||s.getDefaultTransition()||$T,{onLayoutAnimationStart:p,onLayoutAnimationComplete:v}=s.getProps(),x=!this.targetLayout||!Pv(this.targetLayout,h),b=!f&&d;if(this.options.layoutRoot||this.resumeFrom||b||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Tc(m,"layout"),onPlay:p,onComplete:v};(s.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(a,b)}else f||Cu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Rt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(LT),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Mv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const f=this.path[a];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:u,layout:l}=this.options;if(u===void 0&&!l)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Eu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Su);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(jT),this.nodes.forEach(AT),this.nodes.forEach(OT)):this.nodes.forEach(Su),this.clearAllSnapshots();const u=Me.now();_e.delta=ct(0,1e3/60,u-_e.timestamp),_e.timestamp=u,_e.isProcessing=!0,ts.update.process(_e),ts.preRender.process(_e),ts.render.process(_e),_e.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ic.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(NT),this.sharedNodes.forEach(FT)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,pe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){pe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ie(this.snapshot.measuredBox.x)&&!Ie(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ce(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(u=!1),u&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!Tv(this.projectionDelta),l=this.getTransformTemplate(),s=l?l(this.latestValues,""):void 0,a=s!==this.prevTransformTemplateValue;c&&this.instance&&(u||Ft(this.latestValues)||a)&&(o(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const u=this.measurePageBox();let l=this.removeElementScroll(u);return c&&(l=this.removeTransform(l)),UT(l),{animationId:this.root.animationId,measuredBox:u,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var s;const{visualElement:c}=this.options;if(!c)return Ce();const u=c.measureViewportBox();if(!(((s=this.scroll)==null?void 0:s.wasRoot)||this.path.some(GT))){const{scroll:a}=this.root;a&&(ln(u.x,a.offset.x),ln(u.y,a.offset.y))}return u}removeElementScroll(c){var l;const u=Ce();if(qe(u,c),(l=this.scroll)!=null&&l.wasRoot)return u;for(let s=0;s<this.path.length;s++){const a=this.path[s],{scroll:f,options:d}=a;a!==this.root&&f&&d.layoutScroll&&(f.wasRoot&&qe(u,c),ln(u.x,f.offset.x),ln(u.y,f.offset.y))}return u}applyTransform(c,u=!1){const l=Ce();qe(l,c);for(let s=0;s<this.path.length;s++){const a=this.path[s];!u&&a.options.layoutScroll&&a.scroll&&a!==a.root&&un(l,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),Ft(a.latestValues)&&un(l,a.latestValues)}return Ft(this.latestValues)&&un(l,this.latestValues),l}removeTransform(c){const u=Ce();qe(u,c);for(let l=0;l<this.path.length;l++){const s=this.path[l];if(!s.instance||!Ft(s.latestValues))continue;fa(s.latestValues)&&s.updateSnapshot();const a=Ce(),f=s.measurePageBox();qe(a,f),hu(u,s.latestValues,s.snapshot?s.snapshot.layoutBox:void 0,a)}return Ft(this.latestValues)&&hu(u,this.latestValues),u}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==_e.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){var h;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==u;if(!(c||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:a,layoutId:f}=this.options;if(!this.layout||!(a||f))return;this.resolvedRelativeTargetAt=_e.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ce(),this.targetWithTransforms=Ce()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dT(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qe(this.target,this.layout.layoutBox),mv(this.target,this.targetDelta)):qe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||fa(this.parent.latestValues)||pv(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,u,l){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ce(),this.relativeTargetOrigin=Ce(),ti(this.relativeTargetOrigin,u,l),qe(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const c=this.getLead(),u=!!this.resumingFrom||this!==c;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===_e.timestamp&&(l=!1),l)return;const{layout:s,layoutId:a}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(s||a))return;qe(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;$R(this.layoutCorrected,this.treeScale,this.path,u),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Ce());const{target:h}=c;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(au(this.prevProjectionDelta.x,this.projectionDelta.x),au(this.prevProjectionDelta.y,this.projectionDelta.y)),qn(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!yu(this.projectionDelta.x,this.prevProjectionDelta.x)||!yu(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){var u;if((u=this.options.visualElement)==null||u.scheduleRender(),c){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=cn(),this.projectionDelta=cn(),this.projectionDeltaWithTransform=cn()}setAnimationOrigin(c,u=!1){const l=this.snapshot,s=l?l.latestValues:{},a={...this.latestValues},f=cn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const d=Ce(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=h!==m,v=this.getStack(),x=!v||v.members.length<=1,b=!!(p&&!x&&this.options.crossfade===!0&&!this.path.some(BT));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const E=S/1e3;_u(f.x,c.x,E),_u(f.y,c.y,E),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ti(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),VT(this.relativeTarget,this.relativeTargetOrigin,d,E),w&&gT(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ce()),qe(w,this.relativeTarget)),p&&(this.animationValues=a,xT(a,s,this.latestValues,E,b,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){var u,l,s;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(),(s=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||s.stop(),this.pendingAnimation&&(Rt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=pe.update(()=>{Fo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=yn(0)),this.currentAnimation=ET(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),c.onUpdate&&c.onUpdate(a)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(TT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:u,target:l,layout:s,latestValues:a}=c;if(!(!u||!l||!s)){if(this!==c&&this.layout&&s&&Nv(this.options.animationType,this.layout.layoutBox,s.layoutBox)){l=this.target||Ce();const f=Ie(this.layout.layoutBox.x);l.x.min=c.target.x.min,l.x.max=l.x.min+f;const d=Ie(this.layout.layoutBox.y);l.y.min=c.target.y.min,l.y.max=l.y.min+d}qe(u,l),un(u,a),qn(this.projectionDeltaWithTransform,this.layoutCorrected,u,a)}}registerSharedNode(c,u){this.sharedNodes.has(c)||this.sharedNodes.set(c,new RT),this.sharedNodes.get(c).add(u);const s=u.options.initialPromotionConfig;u.promote({transition:s?s.transition:void 0,preserveFollowOpacity:s&&s.shouldPreserveFollowOpacity?s.shouldPreserveFollowOpacity(u):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var u;const{layoutId:c}=this.options;return c?((u=this.getStack())==null?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:c}=this.options;return c?(u=this.getStack())==null?void 0:u.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:u,preserveFollowOpacity:l}={}){const s=this.getStack();s&&s.promote(this,l),c&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let u=!1;const{latestValues:l}=c;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(u=!0),!u)return;const s={};l.z&&us("z",c,s,this.animationValues);for(let a=0;a<ls.length;a++)us(`rotate${ls[a]}`,c,s,this.animationValues),us(`skew${ls[a]}`,c,s,this.animationValues);c.render();for(const a in s)c.setStaticValue(a,s[a]),this.animationValues&&(this.animationValues[a]=s[a]);c.scheduleRender()}applyProjectionStyles(c,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=Lo(u==null?void 0:u.pointerEvents)||"",c.transform=l?l(this.latestValues,""):"none";return}const s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=Lo(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!Ft(this.latestValues)&&(c.transform=l?l({},""):"none",this.hasProjected=!1);return}c.visibility="";const a=s.animationValues||s.latestValues;this.applyTransformsToTarget();let f=vT(this.projectionDeltaWithTransform,this.treeScale,a);l&&(f=l(a,f)),c.transform=f;const{x:d,y:h}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,s.animationValues?c.opacity=s===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:c.opacity=s===this?a.opacity!==void 0?a.opacity:"":a.opacityExit!==void 0?a.opacityExit:0;for(const m in ha){if(a[m]===void 0)continue;const{correct:p,applyTo:v,isCSSVariable:x}=ha[m],b=f==="none"?a[m]:p(a[m],s);if(v){const w=v.length;for(let S=0;S<w;S++)c[v[S]]=b}else x?this.options.visualElement.renderState.vars[m]=b:c[m]=b}this.options.layoutId&&(c.pointerEvents=s===this?Lo(u==null?void 0:u.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>{var u;return(u=c.currentAnimation)==null?void 0:u.stop()}),this.root.nodes.forEach(Eu),this.root.sharedNodes.clear()}}}function AT(e){e.updateLayout()}function OT(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,c=t.source!==e.layout.source;i==="size"?Ue(f=>{const d=c?t.measuredBox[f]:t.layoutBox[f],h=Ie(d);d.min=r[f].min,d.max=d.min+h}):Nv(i,t.layoutBox,r)&&Ue(f=>{const d=c?t.measuredBox[f]:t.layoutBox[f],h=Ie(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const u=cn();qn(u,r,t.layoutBox);const l=cn();c?qn(l,e.applyTransform(o,!0),t.measuredBox):qn(l,r,t.layoutBox);const s=!Tv(u);let a=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const m=Ce();ti(m,t.layoutBox,d.layoutBox);const p=Ce();ti(p,r,h.layoutBox),Pv(m,p)||(a=!0),f.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:u,hasLayoutChanged:s,hasRelativeLayoutChanged:a})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function MT(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function IT(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function NT(e){e.clearSnapshot()}function Eu(e){e.clearMeasurements()}function Su(e){e.isLayoutDirty=!1}function jT(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Cu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function DT(e){e.resolveTargetDelta()}function kT(e){e.calcProjection()}function LT(e){e.resetSkewAndRotation()}function FT(e){e.removeLeadSnapshot()}function _u(e,t,n){e.translate=ve(t.translate,0,n),e.scale=ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ru(e,t,n,r){e.min=ve(t.min,n.min,r),e.max=ve(t.max,n.max,r)}function VT(e,t,n,r){Ru(e.x,t.x,n.x,r),Ru(e.y,t.y,n.y,r)}function BT(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const $T={duration:.45,ease:[.4,0,.1,1]},Tu=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Pu=Tu("applewebkit/")&&!Tu("chrome/")?Math.round:ze;function Au(e){e.min=Pu(e.min),e.max=Pu(e.max)}function UT(e){Au(e.x),Au(e.y)}function Nv(e,t,n){return e==="position"||e==="preserve-aspect"&&!fT(vu(t),vu(n),.2)}function GT(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const HT=Iv({attachResizeListener:(e,t)=>sr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),fs={current:void 0},jv=Iv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fs.current){const e=new HT({});e.mount(window),e.setOptions({layoutScroll:!0}),fs.current=e}return fs.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Fc=_.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ou(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zT(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ou(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Ou(e[o],null)}}}}function WT(...e){return y.useCallback(zT(...e),e)}class qT extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=rv(r)&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function KT({children:e,isPresent:t,anchorX:n,root:r}){var a;const o=_.useId(),i=_.useRef(null),c=_.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:u}=_.useContext(Fc),l=((a=e.props)==null?void 0:a.ref)??(e==null?void 0:e.ref),s=WT(i,l);return _.useInsertionEffect(()=>{const{width:f,height:d,top:h,left:m,right:p}=c.current;if(t||!i.current||!f||!d)return;const v=n==="left"?`left: ${m}`:`right: ${p}`;i.current.dataset.motionPopId=o;const x=document.createElement("style");u&&(x.nonce=u);const b=r??document.head;return b.appendChild(x),x.sheet&&x.sheet.insertRule(`
|
|
66
|
+
Defaulting to \`null\`.`}var Bb=up,$b=fp,Oa="Radio",[Ub,hp]=he(Oa),[Gb,Hb]=Ub(Oa),pp=v.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:c,value:l="on",onCheck:u,form:i,...a}=e,[f,d]=v.useState(null),p=h.useComposedRefs(t,x=>d(x)),g=v.useRef(!1),m=f?i||!!f.closest("form"):!0;return h.jsxRuntimeExports.jsxs(Gb,{scope:n,checked:o,disabled:c,children:[h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"radio","aria-checked":o,"data-state":vp(o),"data-disabled":c?"":void 0,disabled:c,value:l,...a,ref:p,onClick:N(e.onClick,x=>{o||u==null||u(),m&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),m&&h.jsxRuntimeExports.jsx(xp,{control:f,bubbles:!g.current,name:r,value:l,checked:o,required:s,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});pp.displayName=Oa;var mp="RadioIndicator",gp=v.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=Hb(mp,n);return h.jsxRuntimeExports.jsx(Re,{present:r||s.checked,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-state":vp(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});gp.displayName=mp;var zb="RadioBubbleInput",xp=v.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const c=v.useRef(null),l=h.useComposedRefs(c,s),u=Gn(n),i=Hn(t);return v.useEffect(()=>{const a=c.current;if(!a)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==n&&p){const g=new Event("click",{bubbles:r});p.call(a,n),a.dispatchEvent(g)}},[u,n,r]),h.jsxRuntimeExports.jsx(h.Primitive.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});xp.displayName=zb;function vp(e){return e?"checked":"unchecked"}var Wb=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Jo="RadioGroup",[qb]=he(Jo,[tn,hp]),yp=tn(),Ep=hp(),[Kb,Xb]=qb(Jo),bp=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:c=!1,disabled:l=!1,orientation:u,dir:i,loop:a=!0,onValueChange:f,...d}=e,p=yp(n),g=Tt(i),[m,x]=we({prop:s,defaultProp:o??null,onChange:f,caller:Jo});return h.jsxRuntimeExports.jsx(Kb,{scope:n,name:r,required:c,disabled:l,value:m,onValueChange:x,children:h.jsxRuntimeExports.jsx(ha,{asChild:!0,...p,orientation:u,dir:g,loop:a,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"radiogroup","aria-required":c,"aria-orientation":u,"data-disabled":l?"":void 0,dir:g,...d,ref:t})})})});bp.displayName=Jo;var wp="RadioGroupItem",Rp=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=Xb(wp,n),c=s.disabled||r,l=yp(n),u=Ep(n),i=v.useRef(null),a=h.useComposedRefs(t,i),f=s.value===o.value,d=v.useRef(!1);return v.useEffect(()=>{const p=m=>{Wb.includes(m.key)&&(d.current=!0)},g=()=>d.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",g)}},[]),h.jsxRuntimeExports.jsx(pa,{asChild:!0,...l,focusable:!c,active:f,children:h.jsxRuntimeExports.jsx(pp,{disabled:c,required:s.required,checked:f,...u,...o,name:s.name,ref:a,onCheck:()=>s.onValueChange(o.value),onKeyDown:N(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:N(o.onFocus,()=>{var p;d.current&&((p=i.current)==null||p.click())})})})});Rp.displayName=wp;var Yb="RadioGroupIndicator",Sp=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Ep(n);return h.jsxRuntimeExports.jsx(gp,{...o,...r,ref:t})});Sp.displayName=Yb;var Zb=bp,Qb=Rp,Jb=Sp,ew=[" ","Enter","ArrowUp","ArrowDown"],tw=[" ","Enter"],Ct="Select",[ei,ti,nw]=Bn(Ct),[nn]=he(Ct,[nw,dt]),ni=dt(),[rw,ht]=nn(Ct),[ow,iw]=nn(Ct),Cp=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:c,defaultValue:l,onValueChange:u,dir:i,name:a,autoComplete:f,disabled:d,required:p,form:g}=e,m=ni(t),[x,y]=v.useState(null),[E,b]=v.useState(null),[R,w]=v.useState(!1),P=Tt(i),[C,_]=we({prop:r,defaultProp:o??!1,onChange:s,caller:Ct}),[M,j]=we({prop:c,defaultProp:l,onChange:u,caller:Ct}),A=v.useRef(null),I=x?g||!!x.closest("form"):!0,[F,B]=v.useState(new Set),q=Array.from(F).map(U=>U.props.value).join(";");return h.jsxRuntimeExports.jsx(Wo,{...m,children:h.jsxRuntimeExports.jsxs(rw,{required:p,scope:t,trigger:x,onTriggerChange:y,valueNode:E,onValueNodeChange:b,valueNodeHasChildren:R,onValueNodeHasChildrenChange:w,contentId:ge(),value:M,onValueChange:j,open:C,onOpenChange:_,dir:P,triggerPointerDownPosRef:A,disabled:d,children:[h.jsxRuntimeExports.jsx(ei.Provider,{scope:t,children:h.jsxRuntimeExports.jsx(ow,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(U=>{B(G=>new Set(G).add(U))},[]),onNativeOptionRemove:v.useCallback(U=>{B(G=>{const $=new Set(G);return $.delete(U),$})},[]),children:n})}),I?h.jsxRuntimeExports.jsxs(Hp,{"aria-hidden":!0,required:p,tabIndex:-1,name:a,autoComplete:f,value:M,onChange:U=>j(U.target.value),disabled:d,form:g,children:[M===void 0?h.jsxRuntimeExports.jsx("option",{value:""}):null,Array.from(F)]},q):null]})})};Cp.displayName=Ct;var _p="SelectTrigger",jp=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=ni(n),c=ht(_p,n),l=c.disabled||r,u=h.useComposedRefs(t,c.onTriggerChange),i=ti(n),a=v.useRef("touch"),[f,d,p]=Wp(m=>{const x=i().filter(b=>!b.disabled),y=x.find(b=>b.value===c.value),E=qp(x,m,y);E!==void 0&&c.onValueChange(E.value)}),g=m=>{l||(c.onOpenChange(!0),p()),m&&(c.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return h.jsxRuntimeExports.jsx(Wn,{asChild:!0,...s,children:h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":zp(c.value)?"":void 0,...o,ref:u,onClick:N(o.onClick,m=>{m.currentTarget.focus(),a.current!=="mouse"&&g(m)}),onPointerDown:N(o.onPointerDown,m=>{a.current=m.pointerType;const x=m.target;x.hasPointerCapture(m.pointerId)&&x.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:N(o.onKeyDown,m=>{const x=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&d(m.key),!(x&&m.key===" ")&&ew.includes(m.key)&&(g(),m.preventDefault())})})})});jp.displayName=_p;var Pp="SelectValue",Tp=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:c="",...l}=e,u=ht(Pp,n),{onValueNodeHasChildrenChange:i}=u,a=s!==void 0,f=h.useComposedRefs(t,u.onValueNodeChange);return h.useLayoutEffect2(()=>{i(a)},[i,a]),h.jsxRuntimeExports.jsx(h.Primitive.span,{...l,ref:f,style:{pointerEvents:"none"},children:zp(u.value)?h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:c}):s})});Tp.displayName=Pp;var sw="SelectIcon",Ap=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return h.jsxRuntimeExports.jsx(h.Primitive.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Ap.displayName=sw;var aw="SelectPortal",Op=e=>h.jsxRuntimeExports.jsx(h.Portal,{asChild:!0,...e});Op.displayName=aw;var _t="SelectContent",Mp=v.forwardRef((e,t)=>{const n=ht(_t,e.__scopeSelect),[r,o]=v.useState();if(h.useLayoutEffect2(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?qs.createPortal(h.jsxRuntimeExports.jsx(Ip,{scope:e.__scopeSelect,children:h.jsxRuntimeExports.jsx(ei.Slot,{scope:e.__scopeSelect,children:h.jsxRuntimeExports.jsx("div",{children:e.children})})}),s):null}return h.jsxRuntimeExports.jsx(Dp,{...e,ref:t})});Mp.displayName=_t;var Le=10,[Ip,pt]=nn(_t),cw="SelectContentImpl",uw=h.createSlot("SelectContent.RemoveScroll"),Dp=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:c,side:l,sideOffset:u,align:i,alignOffset:a,arrowPadding:f,collisionBoundary:d,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:x,...y}=e,E=ht(_t,n),[b,R]=v.useState(null),[w,P]=v.useState(null),C=h.useComposedRefs(t,k=>R(k)),[_,M]=v.useState(null),[j,A]=v.useState(null),I=ti(n),[F,B]=v.useState(!1),q=v.useRef(!1);v.useEffect(()=>{if(b)return Vo(b)},[b]),Lo();const U=v.useCallback(k=>{const[W,...K]=I().map(D=>D.ref.current),[z]=K.slice(-1),J=document.activeElement;for(const D of k)if(D===J||(D==null||D.scrollIntoView({block:"nearest"}),D===W&&w&&(w.scrollTop=0),D===z&&w&&(w.scrollTop=w.scrollHeight),D==null||D.focus(),document.activeElement!==J))return},[I,w]),G=v.useCallback(()=>U([_,b]),[U,_,b]);v.useEffect(()=>{F&&G()},[F,G]);const{onOpenChange:$,triggerPointerDownPosRef:V}=E;v.useEffect(()=>{if(b){let k={x:0,y:0};const W=z=>{var J,D;k={x:Math.abs(Math.round(z.pageX)-(((J=V.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(z.pageY)-(((D=V.current)==null?void 0:D.y)??0))}},K=z=>{k.x<=10&&k.y<=10?z.preventDefault():b.contains(z.target)||$(!1),document.removeEventListener("pointermove",W),V.current=null};return V.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",K,{capture:!0})}}},[b,$,V]),v.useEffect(()=>{const k=()=>$(!1);return window.addEventListener("blur",k),window.addEventListener("resize",k),()=>{window.removeEventListener("blur",k),window.removeEventListener("resize",k)}},[$]);const[T,L]=Wp(k=>{const W=I().filter(J=>!J.disabled),K=W.find(J=>J.ref.current===document.activeElement),z=qp(W,k,K);z&&setTimeout(()=>z.ref.current.focus())}),Y=v.useCallback((k,W,K)=>{const z=!q.current&&!K;(E.value!==void 0&&E.value===W||z)&&(M(k),z&&(q.current=!0))},[E.value]),Q=v.useCallback(()=>b==null?void 0:b.focus(),[b]),X=v.useCallback((k,W,K)=>{const z=!q.current&&!K;(E.value!==void 0&&E.value===W||z)&&A(k)},[E.value]),ee=r==="popper"?fs:Np,Z=ee===fs?{side:l,sideOffset:u,align:i,alignOffset:a,arrowPadding:f,collisionBoundary:d,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:x}:{};return h.jsxRuntimeExports.jsx(Ip,{scope:n,content:b,viewport:w,onViewportChange:P,itemRefCallback:Y,selectedItem:_,onItemLeave:Q,itemTextRefCallback:X,focusSelectedItem:G,selectedItemText:j,position:r,isPositioned:F,searchRef:T,children:h.jsxRuntimeExports.jsx(Un,{as:uw,allowPinchZoom:!0,children:h.jsxRuntimeExports.jsx($n,{asChild:!0,trapped:E.open,onMountAutoFocus:k=>{k.preventDefault()},onUnmountAutoFocus:N(o,k=>{var W;(W=E.trigger)==null||W.focus({preventScroll:!0}),k.preventDefault()}),children:h.jsxRuntimeExports.jsx(Qt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:k=>k.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:h.jsxRuntimeExports.jsx(ee,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:k=>k.preventDefault(),...y,...Z,onPlaced:()=>B(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:N(y.onKeyDown,k=>{const W=k.ctrlKey||k.altKey||k.metaKey;if(k.key==="Tab"&&k.preventDefault(),!W&&k.key.length===1&&L(k.key),["ArrowUp","ArrowDown","Home","End"].includes(k.key)){let z=I().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(k.key)&&(z=z.slice().reverse()),["ArrowUp","ArrowDown"].includes(k.key)){const J=k.target,D=z.indexOf(J);z=z.slice(D+1)}setTimeout(()=>U(z)),k.preventDefault()}})})})})})})});Dp.displayName=cw;var lw="SelectItemAlignedPosition",Np=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=ht(_t,n),c=pt(_t,n),[l,u]=v.useState(null),[i,a]=v.useState(null),f=h.useComposedRefs(t,C=>a(C)),d=ti(n),p=v.useRef(!1),g=v.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:y,focusSelectedItem:E}=c,b=v.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&i&&m&&x&&y){const C=s.trigger.getBoundingClientRect(),_=i.getBoundingClientRect(),M=s.valueNode.getBoundingClientRect(),j=y.getBoundingClientRect();if(s.dir!=="rtl"){const J=j.left-_.left,D=M.left-J,ae=C.left-D,ve=C.width+ae,rt=Math.max(ve,_.width),ln=window.innerWidth-Le,fn=Ro(D,[Le,Math.max(Le,ln-rt)]);l.style.minWidth=ve+"px",l.style.left=fn+"px"}else{const J=_.right-j.right,D=window.innerWidth-M.right-J,ae=window.innerWidth-C.right-D,ve=C.width+ae,rt=Math.max(ve,_.width),ln=window.innerWidth-Le,fn=Ro(D,[Le,Math.max(Le,ln-rt)]);l.style.minWidth=ve+"px",l.style.right=fn+"px"}const A=d(),I=window.innerHeight-Le*2,F=m.scrollHeight,B=window.getComputedStyle(i),q=parseInt(B.borderTopWidth,10),U=parseInt(B.paddingTop,10),G=parseInt(B.borderBottomWidth,10),$=parseInt(B.paddingBottom,10),V=q+U+F+$+G,T=Math.min(x.offsetHeight*5,V),L=window.getComputedStyle(m),Y=parseInt(L.paddingTop,10),Q=parseInt(L.paddingBottom,10),X=C.top+C.height/2-Le,ee=I-X,Z=x.offsetHeight/2,k=x.offsetTop+Z,W=q+U+k,K=V-W;if(W<=X){const J=A.length>0&&x===A[A.length-1].ref.current;l.style.bottom="0px";const D=i.clientHeight-m.offsetTop-m.offsetHeight,ae=Math.max(ee,Z+(J?Q:0)+D+G),ve=W+ae;l.style.height=ve+"px"}else{const J=A.length>0&&x===A[0].ref.current;l.style.top="0px";const ae=Math.max(X,q+m.offsetTop+(J?Y:0)+Z)+K;l.style.height=ae+"px",m.scrollTop=W-X+m.offsetTop}l.style.margin=`${Le}px 0`,l.style.minHeight=T+"px",l.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[d,s.trigger,s.valueNode,l,i,m,x,y,s.dir,r]);h.useLayoutEffect2(()=>b(),[b]);const[R,w]=v.useState();h.useLayoutEffect2(()=>{i&&w(window.getComputedStyle(i).zIndex)},[i]);const P=v.useCallback(C=>{C&&g.current===!0&&(b(),E==null||E(),g.current=!1)},[b,E]);return h.jsxRuntimeExports.jsx(dw,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:P,children:h.jsxRuntimeExports.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:h.jsxRuntimeExports.jsx(h.Primitive.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Np.displayName=lw;var fw="SelectPopperPosition",fs=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Le,...s}=e,c=ni(n);return h.jsxRuntimeExports.jsx(qo,{...c,...s,ref:t,align:r,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)"}})});fs.displayName=fw;var[dw,Ma]=nn(_t,{}),ds="SelectViewport",kp=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=pt(ds,n),c=Ma(ds,n),l=h.useComposedRefs(t,s.onViewportChange),u=v.useRef(0);return h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),h.jsxRuntimeExports.jsx(ei.Slot,{scope:n,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:N(o.onScroll,i=>{const a=i.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=c;if(d!=null&&d.current&&f){const p=Math.abs(u.current-a.scrollTop);if(p>0){const g=window.innerHeight-Le*2,m=parseFloat(f.style.minHeight),x=parseFloat(f.style.height),y=Math.max(m,x);if(y<g){const E=y+p,b=Math.min(g,E),R=E-b;f.style.height=b+"px",f.style.bottom==="0px"&&(a.scrollTop=R>0?R:0,f.style.justifyContent="flex-end")}}}u.current=a.scrollTop})})})]})});kp.displayName=ds;var Lp="SelectGroup",[hw,pw]=nn(Lp),mw=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ge();return h.jsxRuntimeExports.jsx(hw,{scope:n,id:o,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"group","aria-labelledby":o,...r,ref:t})})});mw.displayName=Lp;var Fp="SelectLabel",gw=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=pw(Fp,n);return h.jsxRuntimeExports.jsx(h.Primitive.div,{id:o.id,...r,ref:t})});gw.displayName=Fp;var Co="SelectItem",[xw,Vp]=nn(Co),Bp=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...c}=e,l=ht(Co,n),u=pt(Co,n),i=l.value===r,[a,f]=v.useState(s??""),[d,p]=v.useState(!1),g=h.useComposedRefs(t,E=>{var b;return(b=u.itemRefCallback)==null?void 0:b.call(u,E,r,o)}),m=ge(),x=v.useRef("touch"),y=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.jsxRuntimeExports.jsx(xw,{scope:n,value:r,disabled:o,textId:m,isSelected:i,onItemTextChange:v.useCallback(E=>{f(b=>b||((E==null?void 0:E.textContent)??"").trim())},[]),children:h.jsxRuntimeExports.jsx(ei.ItemSlot,{scope:n,value:r,disabled:o,textValue:a,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":i&&d,"data-state":i?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...c,ref:g,onFocus:N(c.onFocus,()=>p(!0)),onBlur:N(c.onBlur,()=>p(!1)),onClick:N(c.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:N(c.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:N(c.onPointerDown,E=>{x.current=E.pointerType}),onPointerMove:N(c.onPointerMove,E=>{var b;x.current=E.pointerType,o?(b=u.onItemLeave)==null||b.call(u):x.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(c.onPointerLeave,E=>{var b;E.currentTarget===document.activeElement&&((b=u.onItemLeave)==null||b.call(u))}),onKeyDown:N(c.onKeyDown,E=>{var R;((R=u.searchRef)==null?void 0:R.current)!==""&&E.key===" "||(tw.includes(E.key)&&y(),E.key===" "&&E.preventDefault())})})})})});Bp.displayName=Co;var wn="SelectItemText",$p=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,c=ht(wn,n),l=pt(wn,n),u=Vp(wn,n),i=iw(wn,n),[a,f]=v.useState(null),d=h.useComposedRefs(t,y=>f(y),u.onItemTextChange,y=>{var E;return(E=l.itemTextRefCallback)==null?void 0:E.call(l,y,u.value,u.disabled)}),p=a==null?void 0:a.textContent,g=v.useMemo(()=>h.jsxRuntimeExports.jsx("option",{value:u.value,disabled:u.disabled,children:p},u.value),[u.disabled,u.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=i;return h.useLayoutEffect2(()=>(m(g),()=>x(g)),[m,x,g]),h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx(h.Primitive.span,{id:u.textId,...s,ref:d}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?qs.createPortal(s.children,c.valueNode):null]})});$p.displayName=wn;var Up="SelectItemIndicator",vw=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Vp(Up,n).isSelected?h.jsxRuntimeExports.jsx(h.Primitive.span,{"aria-hidden":!0,...r,ref:t}):null});vw.displayName=Up;var hs="SelectScrollUpButton",yw=v.forwardRef((e,t)=>{const n=pt(hs,e.__scopeSelect),r=Ma(hs,e.__scopeSelect),[o,s]=v.useState(!1),c=h.useComposedRefs(t,r.onScrollButtonChange);return h.useLayoutEffect2(()=>{if(n.viewport&&n.isPositioned){let l=function(){const i=u.scrollTop>0;s(i)};const u=n.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?h.jsxRuntimeExports.jsx(Gp,{...e,ref:c,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});yw.displayName=hs;var ps="SelectScrollDownButton",Ew=v.forwardRef((e,t)=>{const n=pt(ps,e.__scopeSelect),r=Ma(ps,e.__scopeSelect),[o,s]=v.useState(!1),c=h.useComposedRefs(t,r.onScrollButtonChange);return h.useLayoutEffect2(()=>{if(n.viewport&&n.isPositioned){let l=function(){const i=u.scrollHeight-u.clientHeight,a=Math.ceil(u.scrollTop)<i;s(a)};const u=n.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?h.jsxRuntimeExports.jsx(Gp,{...e,ref:c,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});Ew.displayName=ps;var Gp=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=pt("SelectScrollButton",n),c=v.useRef(null),l=ti(n),u=v.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return v.useEffect(()=>()=>u(),[u]),h.useLayoutEffect2(()=>{var a;const i=l().find(f=>f.ref.current===document.activeElement);(a=i==null?void 0:i.ref.current)==null||a.scrollIntoView({block:"nearest"})},[l]),h.jsxRuntimeExports.jsx(h.Primitive.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:N(o.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:N(o.onPointerMove,()=>{var i;(i=s.onItemLeave)==null||i.call(s),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:N(o.onPointerLeave,()=>{u()})})}),bw="SelectSeparator",ww=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.div,{"aria-hidden":!0,...r,ref:t})});ww.displayName=bw;var ms="SelectArrow",Rw=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ni(n),s=ht(ms,n),c=pt(ms,n);return s.open&&c.position==="popper"?h.jsxRuntimeExports.jsx(Ko,{...o,...r,ref:t}):null});Rw.displayName=ms;var Sw="SelectBubbleInput",Hp=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=v.useRef(null),s=h.useComposedRefs(r,o),c=Gn(t);return v.useEffect(()=>{const l=o.current;if(!l)return;const u=window.HTMLSelectElement.prototype,a=Object.getOwnPropertyDescriptor(u,"value").set;if(c!==t&&a){const f=new Event("change",{bubbles:!0});a.call(l,t),l.dispatchEvent(f)}},[c,t]),h.jsxRuntimeExports.jsx(h.Primitive.select,{...n,style:{...Bf,...n.style},ref:s,defaultValue:t})});Hp.displayName=Sw;function zp(e){return e===""||e===void 0}function Wp(e){const t=Ve(e),n=v.useRef(""),r=v.useRef(0),o=v.useCallback(c=>{const l=n.current+c;t(l),(function u(i){n.current=i,window.clearTimeout(r.current),i!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(l)},[t]),s=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function qp(e,t,n){const o=t.length>1&&Array.from(t).every(i=>i===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=Cw(e,Math.max(s,0));o.length===1&&(c=c.filter(i=>i!==n));const u=c.find(i=>i.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Cw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _w=Cp,jw=jp,Pw=Tp,Tw=Ap,Aw=Op,Ow=Mp,Mw=kp,Iw=Bp,Dw=$p,Kp=["PageUp","PageDown"],Xp=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Yp={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},rn="Slider",[gs,Nw,kw]=Bn(rn),[Zp]=he(rn,[kw]),[Lw,ri]=Zp(rn),Qp=v.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:s=1,orientation:c="horizontal",disabled:l=!1,minStepsBetweenThumbs:u=0,defaultValue:i=[r],value:a,onValueChange:f=()=>{},onValueCommit:d=()=>{},inverted:p=!1,form:g,...m}=e,x=v.useRef(new Set),y=v.useRef(0),b=c==="horizontal"?Fw:Vw,[R=[],w]=we({prop:a,defaultProp:i,onChange:A=>{var F;(F=[...x.current][y.current])==null||F.focus(),f(A)}}),P=v.useRef(R);function C(A){const I=Hw(R,A);j(A,I)}function _(A){j(A,y.current)}function M(){const A=P.current[y.current];R[y.current]!==A&&d(R)}function j(A,I,{commit:F}={commit:!1}){const B=Kw(s),q=Xw(Math.round((A-r)/s)*s+r,B),U=Ro(q,[r,o]);w((G=[])=>{const $=Uw(G,U,I);if(qw($,u*s)){y.current=$.indexOf(U);const V=String($)!==String(G);return V&&F&&d($),V?$:G}else return G})}return h.jsxRuntimeExports.jsx(Lw,{scope:e.__scopeSlider,name:n,disabled:l,min:r,max:o,valueIndexToChangeRef:y,thumbs:x.current,values:R,orientation:c,form:g,children:h.jsxRuntimeExports.jsx(gs.Provider,{scope:e.__scopeSlider,children:h.jsxRuntimeExports.jsx(gs.Slot,{scope:e.__scopeSlider,children:h.jsxRuntimeExports.jsx(b,{"aria-disabled":l,"data-disabled":l?"":void 0,...m,ref:t,onPointerDown:N(m.onPointerDown,()=>{l||(P.current=R)}),min:r,max:o,inverted:p,onSlideStart:l?void 0:C,onSlideMove:l?void 0:_,onSlideEnd:l?void 0:M,onHomeKeyDown:()=>!l&&j(r,0,{commit:!0}),onEndKeyDown:()=>!l&&j(o,R.length-1,{commit:!0}),onStepKeyDown:({event:A,direction:I})=>{if(!l){const q=Kp.includes(A.key)||A.shiftKey&&Xp.includes(A.key)?10:1,U=y.current,G=R[U],$=s*q*I;j(G+$,U,{commit:!0})}}})})})})});Qp.displayName=rn;var[Jp,em]=Zp(rn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Fw=v.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:s,onSlideStart:c,onSlideMove:l,onSlideEnd:u,onStepKeyDown:i,...a}=e,[f,d]=v.useState(null),p=h.useComposedRefs(t,b=>d(b)),g=v.useRef(void 0),m=Tt(o),x=m==="ltr",y=x&&!s||!x&&s;function E(b){const R=g.current||f.getBoundingClientRect(),w=[0,R.width],C=Ia(w,y?[n,r]:[r,n]);return g.current=R,C(b-R.left)}return h.jsxRuntimeExports.jsx(Jp,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:h.jsxRuntimeExports.jsx(tm,{dir:m,"data-orientation":"horizontal",...a,ref:p,style:{...a.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const R=E(b.clientX);c==null||c(R)},onSlideMove:b=>{const R=E(b.clientX);l==null||l(R)},onSlideEnd:()=>{g.current=void 0,u==null||u()},onStepKeyDown:b=>{const w=Yp[y?"from-left":"from-right"].includes(b.key);i==null||i({event:b,direction:w?-1:1})}})})}),Vw=v.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:s,onSlideMove:c,onSlideEnd:l,onStepKeyDown:u,...i}=e,a=v.useRef(null),f=h.useComposedRefs(t,a),d=v.useRef(void 0),p=!o;function g(m){const x=d.current||a.current.getBoundingClientRect(),y=[0,x.height],b=Ia(y,p?[r,n]:[n,r]);return d.current=x,b(m-x.top)}return h.jsxRuntimeExports.jsx(Jp,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:h.jsxRuntimeExports.jsx(tm,{"data-orientation":"vertical",...i,ref:f,style:{...i.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const x=g(m.clientY);s==null||s(x)},onSlideMove:m=>{const x=g(m.clientY);c==null||c(x)},onSlideEnd:()=>{d.current=void 0,l==null||l()},onStepKeyDown:m=>{const y=Yp[p?"from-bottom":"from-top"].includes(m.key);u==null||u({event:m,direction:y?-1:1})}})})}),tm=v.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:c,onEndKeyDown:l,onStepKeyDown:u,...i}=e,a=ri(rn,n);return h.jsxRuntimeExports.jsx(h.Primitive.span,{...i,ref:t,onKeyDown:N(e.onKeyDown,f=>{f.key==="Home"?(c(f),f.preventDefault()):f.key==="End"?(l(f),f.preventDefault()):Kp.concat(Xp).includes(f.key)&&(u(f),f.preventDefault())}),onPointerDown:N(e.onPointerDown,f=>{const d=f.target;d.setPointerCapture(f.pointerId),f.preventDefault(),a.thumbs.has(d)?d.focus():r(f)}),onPointerMove:N(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&o(f)}),onPointerUp:N(e.onPointerUp,f=>{const d=f.target;d.hasPointerCapture(f.pointerId)&&(d.releasePointerCapture(f.pointerId),s(f))})})}),nm="SliderTrack",rm=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ri(nm,n);return h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});rm.displayName=nm;var xs="SliderRange",om=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ri(xs,n),s=em(xs,n),c=v.useRef(null),l=h.useComposedRefs(t,c),u=o.values.length,i=o.values.map(d=>am(d,o.min,o.max)),a=u>1?Math.min(...i):0,f=100-Math.max(...i);return h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:l,style:{...e.style,[s.startEdge]:a+"%",[s.endEdge]:f+"%"}})});om.displayName=xs;var vs="SliderThumb",im=v.forwardRef((e,t)=>{const n=Nw(e.__scopeSlider),[r,o]=v.useState(null),s=h.useComposedRefs(t,l=>o(l)),c=v.useMemo(()=>r?n().findIndex(l=>l.ref.current===r):-1,[n,r]);return h.jsxRuntimeExports.jsx(Bw,{...e,ref:s,index:c})}),Bw=v.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...s}=e,c=ri(vs,n),l=em(vs,n),[u,i]=v.useState(null),a=h.useComposedRefs(t,E=>i(E)),f=u?c.form||!!u.closest("form"):!0,d=Hn(u),p=c.values[r],g=p===void 0?0:am(p,c.min,c.max),m=Gw(r,c.values.length),x=d==null?void 0:d[l.size],y=x?zw(x,g,l.direction):0;return v.useEffect(()=>{if(u)return c.thumbs.add(u),()=>{c.thumbs.delete(u)}},[u,c.thumbs]),h.jsxRuntimeExports.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${g}% + ${y}px)`},children:[h.jsxRuntimeExports.jsx(gs.ItemSlot,{scope:e.__scopeSlider,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":c.min,"aria-valuenow":p,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...s,ref:a,style:p===void 0?{display:"none"}:e.style,onFocus:N(e.onFocus,()=>{c.valueIndexToChangeRef.current=r})})}),f&&h.jsxRuntimeExports.jsx(sm,{name:o??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:p},r)]})});im.displayName=vs;var $w="RadioBubbleInput",sm=v.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=v.useRef(null),s=h.useComposedRefs(o,r),c=Gn(t);return v.useEffect(()=>{const l=o.current;if(!l)return;const u=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(u,"value").set;if(c!==t&&a){const f=new Event("input",{bubbles:!0});a.call(l,t),l.dispatchEvent(f)}},[c,t]),h.jsxRuntimeExports.jsx(h.Primitive.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});sm.displayName=$w;function Uw(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,s)=>o-s)}function am(e,t,n){const s=100/(n-t)*(e-t);return Ro(s,[0,100])}function Gw(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Hw(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function zw(e,t,n){const r=e/2,s=Ia([0,50],[0,r]);return(r-s(t)*n)*n}function Ww(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function qw(e,t){if(t>0){const n=Ww(e);return Math.min(...n)>=t}return!0}function Ia(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Kw(e){return(String(e).split(".")[1]||"").length}function Xw(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Yw=Qp,Zw=rm,Qw=om,Jw=im,oi="Switch",[eR]=he(oi),[tR,nR]=eR(oi),cm=v.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:c,disabled:l,value:u="on",onCheckedChange:i,form:a,...f}=e,[d,p]=v.useState(null),g=h.useComposedRefs(t,b=>p(b)),m=v.useRef(!1),x=d?a||!!d.closest("form"):!0,[y,E]=we({prop:o,defaultProp:s??!1,onChange:i,caller:oi});return h.jsxRuntimeExports.jsxs(tR,{scope:n,checked:y,disabled:l,children:[h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"switch","aria-checked":y,"aria-required":c,"data-state":dm(y),"data-disabled":l?"":void 0,disabled:l,value:u,...f,ref:g,onClick:N(e.onClick,b=>{E(R=>!R),x&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})}),x&&h.jsxRuntimeExports.jsx(fm,{control:d,bubbles:!m.current,name:r,value:u,checked:y,required:c,disabled:l,form:a,style:{transform:"translateX(-100%)"}})]})});cm.displayName=oi;var um="SwitchThumb",lm=v.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=nR(um,n);return h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-state":dm(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});lm.displayName=um;var rR="SwitchBubbleInput",fm=v.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const c=v.useRef(null),l=h.useComposedRefs(c,s),u=Gn(n),i=Hn(t);return v.useEffect(()=>{const a=c.current;if(!a)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==n&&p){const g=new Event("click",{bubbles:r});p.call(a,n),a.dispatchEvent(g)}},[u,n,r]),h.jsxRuntimeExports.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});fm.displayName=rR;function dm(e){return e?"checked":"unchecked"}var oR=cm,iR=lm,ii="Tabs",[sR]=he(ii,[tn]),hm=tn(),[aR,Da]=sR(ii),pm=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:c="horizontal",dir:l,activationMode:u="automatic",...i}=e,a=Tt(l),[f,d]=we({prop:r,onChange:o,defaultProp:s??"",caller:ii});return h.jsxRuntimeExports.jsx(aR,{scope:n,baseId:ge(),value:f,onValueChange:d,orientation:c,dir:a,activationMode:u,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{dir:a,"data-orientation":c,...i,ref:t})})});pm.displayName=ii;var mm="TabsList",gm=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=Da(mm,n),c=hm(n);return h.jsxRuntimeExports.jsx(ha,{asChild:!0,...c,orientation:s.orientation,dir:s.dir,loop:r,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});gm.displayName=mm;var xm="TabsTrigger",vm=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,c=Da(xm,n),l=hm(n),u=bm(c.baseId,r),i=wm(c.baseId,r),a=r===c.value;return h.jsxRuntimeExports.jsx(pa,{asChild:!0,...l,focusable:!o,active:a,children:h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"tab","aria-selected":a,"aria-controls":i,"data-state":a?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...s,ref:t,onMouseDown:N(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?c.onValueChange(r):f.preventDefault()}),onKeyDown:N(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&c.onValueChange(r)}),onFocus:N(e.onFocus,()=>{const f=c.activationMode!=="manual";!a&&!o&&f&&c.onValueChange(r)})})})});vm.displayName=xm;var ym="TabsContent",Em=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...c}=e,l=Da(ym,n),u=bm(l.baseId,r),i=wm(l.baseId,r),a=r===l.value,f=v.useRef(a);return v.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),h.jsxRuntimeExports.jsx(Re,{present:o||a,children:({present:d})=>h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":a?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!d,id:i,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:d&&s})})});Em.displayName=ym;function bm(e,t){return`${e}-trigger-${t}`}function wm(e,t){return`${e}-content-${t}`}var cR=pm,uR=gm,lR=vm,Yc=Em,[si]=he("Tooltip",[dt]),ai=dt(),Rm="TooltipProvider",fR=700,ys="tooltip.open",[dR,Na]=si(Rm),Sm=e=>{const{__scopeTooltip:t,delayDuration:n=fR,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,c=v.useRef(!0),l=v.useRef(!1),u=v.useRef(0);return v.useEffect(()=>{const i=u.current;return()=>window.clearTimeout(i)},[]),h.jsxRuntimeExports.jsx(dR,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(u.current),c.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>c.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:v.useCallback(i=>{l.current=i},[]),disableHoverableContent:o,children:s})};Sm.displayName=Rm;var Dn="Tooltip",[hR,Jn]=si(Dn),Cm=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:c,delayDuration:l}=e,u=Na(Dn,e.__scopeTooltip),i=ai(t),[a,f]=v.useState(null),d=ge(),p=v.useRef(0),g=c??u.disableHoverableContent,m=l??u.delayDuration,x=v.useRef(!1),[y,E]=we({prop:r,defaultProp:o??!1,onChange:C=>{C?(u.onOpen(),document.dispatchEvent(new CustomEvent(ys))):u.onClose(),s==null||s(C)},caller:Dn}),b=v.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),R=v.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,E(!0)},[E]),w=v.useCallback(()=>{window.clearTimeout(p.current),p.current=0,E(!1)},[E]),P=v.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,E(!0),p.current=0},m)},[m,E]);return v.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),h.jsxRuntimeExports.jsx(Wo,{...i,children:h.jsxRuntimeExports.jsx(hR,{scope:t,contentId:d,open:y,stateAttribute:b,trigger:a,onTriggerChange:f,onTriggerEnter:v.useCallback(()=>{u.isOpenDelayedRef.current?P():R()},[u.isOpenDelayedRef,P,R]),onTriggerLeave:v.useCallback(()=>{g?w():(window.clearTimeout(p.current),p.current=0)},[w,g]),onOpen:R,onClose:w,disableHoverableContent:g,children:n})})};Cm.displayName=Dn;var Es="TooltipTrigger",_m=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Jn(Es,n),s=Na(Es,n),c=ai(n),l=v.useRef(null),u=h.useComposedRefs(t,l,o.onTriggerChange),i=v.useRef(!1),a=v.useRef(!1),f=v.useCallback(()=>i.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),h.jsxRuntimeExports.jsx(Wn,{asChild:!0,...c,children:h.jsxRuntimeExports.jsx(h.Primitive.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:N(e.onPointerMove,d=>{d.pointerType!=="touch"&&!a.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),a.current=!0)}),onPointerLeave:N(e.onPointerLeave,()=>{o.onTriggerLeave(),a.current=!1}),onPointerDown:N(e.onPointerDown,()=>{o.open&&o.onClose(),i.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:N(e.onFocus,()=>{i.current||o.onOpen()}),onBlur:N(e.onBlur,o.onClose),onClick:N(e.onClick,o.onClose)})})});_m.displayName=Es;var ka="TooltipPortal",[pR,mR]=si(ka,{forceMount:void 0}),jm=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Jn(ka,t);return h.jsxRuntimeExports.jsx(pR,{scope:t,forceMount:n,children:h.jsxRuntimeExports.jsx(Re,{present:n||s.open,children:h.jsxRuntimeExports.jsx(h.Portal,{asChild:!0,container:o,children:r})})})};jm.displayName=ka;var Yt="TooltipContent",Pm=v.forwardRef((e,t)=>{const n=mR(Yt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,c=Jn(Yt,e.__scopeTooltip);return h.jsxRuntimeExports.jsx(Re,{present:r||c.open,children:c.disableHoverableContent?h.jsxRuntimeExports.jsx(Tm,{side:o,...s,ref:t}):h.jsxRuntimeExports.jsx(gR,{side:o,...s,ref:t})})}),gR=v.forwardRef((e,t)=>{const n=Jn(Yt,e.__scopeTooltip),r=Na(Yt,e.__scopeTooltip),o=v.useRef(null),s=h.useComposedRefs(t,o),[c,l]=v.useState(null),{trigger:u,onClose:i}=n,a=o.current,{onPointerInTransitChange:f}=r,d=v.useCallback(()=>{l(null),f(!1)},[f]),p=v.useCallback((g,m)=>{const x=g.currentTarget,y={x:g.clientX,y:g.clientY},E=ER(y,x.getBoundingClientRect()),b=bR(y,E),R=wR(m.getBoundingClientRect()),w=SR([...b,...R]);l(w),f(!0)},[f]);return v.useEffect(()=>()=>d(),[d]),v.useEffect(()=>{if(u&&a){const g=x=>p(x,a),m=x=>p(x,u);return u.addEventListener("pointerleave",g),a.addEventListener("pointerleave",m),()=>{u.removeEventListener("pointerleave",g),a.removeEventListener("pointerleave",m)}}},[u,a,p,d]),v.useEffect(()=>{if(c){const g=m=>{const x=m.target,y={x:m.clientX,y:m.clientY},E=(u==null?void 0:u.contains(x))||(a==null?void 0:a.contains(x)),b=!RR(y,c);E?d():b&&(d(),i())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[u,a,c,i,d]),h.jsxRuntimeExports.jsx(Tm,{...e,ref:s})}),[xR,vR]=si(Dn,{isInside:!1}),yR=h.createSlottable("TooltipContent"),Tm=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:c,...l}=e,u=Jn(Yt,n),i=ai(n),{onClose:a}=u;return v.useEffect(()=>(document.addEventListener(ys,a),()=>document.removeEventListener(ys,a)),[a]),v.useEffect(()=>{if(u.trigger){const f=d=>{const p=d.target;p!=null&&p.contains(u.trigger)&&a()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,a]),h.jsxRuntimeExports.jsx(Qt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:f=>f.preventDefault(),onDismiss:a,children:h.jsxRuntimeExports.jsxs(qo,{"data-state":u.stateAttribute,...i,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsxRuntimeExports.jsx(yR,{children:r}),h.jsxRuntimeExports.jsx(xR,{scope:n,isInside:!0,children:h.jsxRuntimeExports.jsx(Zx,{id:u.contentId,role:"tooltip",children:o||r})})]})})});Pm.displayName=Yt;var Am="TooltipArrow",Om=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ai(n);return vR(Am,n).isInside?null:h.jsxRuntimeExports.jsx(Ko,{...o,...r,ref:t})});Om.displayName=Am;function ER(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function bR(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function wR(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function RR(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const l=t[s],u=t[c],i=l.x,a=l.y,f=u.x,d=u.y;a>r!=d>r&&n<(f-i)*(r-a)/(d-a)+i&&(o=!o)}return o}function SR(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),CR(t)}function CR(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],c=t[t.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var _R=Sm,jR=Cm,PR=_m,TR=jm,AR=Pm,OR=Om;const MR=S.forwardRef(({children:e,className:t,...n},r)=>h.jsxRuntimeExports.jsx(Cv,{className:O.classNames("overflow-hidden rounded-xl shadow-(--box-shadow-accordion)",t),ref:r,...n,children:e})),IR=S.forwardRef(({children:e,className:t,triggerIcon:n,...r},o)=>h.jsxRuntimeExports.jsx(_v,{className:"flex",children:h.jsxRuntimeExports.jsxs(jv,{className:O.classNames("group flex h-14 flex-1 cursor-pointer items-center justify-between px-6 text-[15px] leading-none bg-white space-x-2",t),ref:o,...r,children:[e,n??h.jsxRuntimeExports.jsx(ne.SvgArrowMp,{className:"size-3 shrink-0 transition-transform duration-300 ease-in-out group-data-[state=open]:rotate-180 fill-primary-blue"})]})})),La=S.createContext({});function Fa(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const Mm=typeof window<"u",Im=Mm?S.useLayoutEffect:S.useEffect,ci=S.createContext(null);function Va(e,t){e.indexOf(t)===-1&&e.push(t)}function Ba(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ye=(e,t,n)=>n>t?t:n<e?e:n;function bs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let on=()=>{},tt=()=>{};var Df;typeof process<"u"&&((Df=process.env)==null?void 0:Df.NODE_ENV)!=="production"&&(on=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(bs(t,n))},tt=(e,t,n)=>{if(!e)throw new Error(bs(t,n))});const nt={},Dm=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Nm(e){return typeof e=="object"&&e!==null}const km=e=>/^0[^.\s]+$/u.test(e);function $a(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ie=e=>e,DR=(e,t)=>n=>t(e(n)),er=(...e)=>e.reduce(DR),Nn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ua{constructor(){this.subscriptions=[]}add(t){return Va(this.subscriptions,t),()=>Ba(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const c=this.subscriptions[s];c&&c(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const qe=e=>e*1e3,Oe=e=>e/1e3;function Lm(e,t){return t?e*(1e3/t):0}const Zc=new Set;function Ga(e,t,n){e||Zc.has(t)||(console.warn(bs(t,n)),Zc.add(t))}const Fm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,NR=1e-7,kR=12;function LR(e,t,n,r,o){let s,c,l=0;do c=t+(n-t)/2,s=Fm(c,r,o)-e,s>0?n=c:t=c;while(Math.abs(s)>NR&&++l<kR);return c}function tr(e,t,n,r){if(e===t&&n===r)return Ie;const o=s=>LR(s,0,1,e,n);return s=>s===0||s===1?s:Fm(o(s),t,r)}const Vm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bm=e=>t=>1-e(1-t),$m=tr(.33,1.53,.69,.99),Ha=Bm($m),Um=Vm(Ha),Gm=e=>(e*=2)<1?.5*Ha(e):.5*(2-Math.pow(2,-10*(e-1))),za=e=>1-Math.sin(Math.acos(e)),Hm=Bm(za),zm=Vm(za),FR=tr(.42,0,1,1),VR=tr(0,0,.58,1),Wm=tr(.42,0,.58,1),BR=e=>Array.isArray(e)&&typeof e[0]!="number",qm=e=>Array.isArray(e)&&typeof e[0]=="number",Qc={linear:Ie,easeIn:FR,easeInOut:Wm,easeOut:VR,circIn:za,circInOut:zm,circOut:Hm,backIn:Ha,backInOut:Um,backOut:$m,anticipate:Gm},$R=e=>typeof e=="string",Jc=e=>{if(qm(e)){tt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return tr(t,n,r,o)}else if($R(e))return tt(Qc[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Qc[e];return e},gr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function UR(e,t){let n=new Set,r=new Set,o=!1,s=!1;const c=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function u(a){c.has(a)&&(i.schedule(a),e()),a(l)}const i={schedule:(a,f=!1,d=!1)=>{const g=d&&o?n:r;return f&&c.add(a),g.has(a)||g.add(a),a},cancel:a=>{r.delete(a),c.delete(a)},process:a=>{if(l=a,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),n.clear(),o=!1,s&&(s=!1,i.process(a))}};return i}const GR=40;function Km(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,c=gr.reduce((b,R)=>(b[R]=UR(s),b),{}),{setup:l,read:u,resolveKeyframes:i,preUpdate:a,update:f,preRender:d,render:p,postRender:g}=c,m=()=>{const b=nt.useManualTiming?o.timestamp:performance.now();n=!1,nt.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,GR),1)),o.timestamp=b,o.isProcessing=!0,l.process(o),u.process(o),i.process(o),a.process(o),f.process(o),d.process(o),p.process(o),g.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))},x=()=>{n=!0,r=!0,o.isProcessing||e(m)};return{schedule:gr.reduce((b,R)=>{const w=c[R];return b[R]=(P,C=!1,_=!1)=>(n||x(),w.schedule(P,C,_)),b},{}),cancel:b=>{for(let R=0;R<gr.length;R++)c[gr[R]].cancel(b)},state:o,steps:c}}const{schedule:se,cancel:lt,state:me,steps:Ti}=Km(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ie,!0);let lo;function HR(){lo=void 0}const Ee={now:()=>(lo===void 0&&Ee.set(me.isProcessing||nt.useManualTiming?me.timestamp:performance.now()),lo),set:e=>{lo=e,queueMicrotask(HR)}},Xm=e=>t=>typeof t=="string"&&t.startsWith(e),Ym=Xm("--"),zR=Xm("var(--"),Wa=e=>zR(e)?WR.test(e.split("/*")[0].trim()):!1,WR=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function eu(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const sn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},kn={...sn,transform:e=>Ye(0,1,e)},xr={...sn,default:1},Cn=e=>Math.round(e*1e5)/1e5,qa=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qR(e){return e==null}const KR=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ka=(e,t)=>n=>!!(typeof n=="string"&&KR.test(n)&&n.startsWith(e)||t&&!qR(n)&&Object.prototype.hasOwnProperty.call(n,t)),Zm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,c,l]=r.match(qa);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(c),alpha:l!==void 0?parseFloat(l):1}},XR=e=>Ye(0,255,e),Ai={...sn,transform:e=>Math.round(XR(e))},Et={test:Ka("rgb","red"),parse:Zm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ai.transform(e)+", "+Ai.transform(t)+", "+Ai.transform(n)+", "+Cn(kn.transform(r))+")"};function YR(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const ws={test:Ka("#"),parse:YR,transform:Et.transform},nr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),it=nr("deg"),Ke=nr("%"),H=nr("px"),ZR=nr("vh"),QR=nr("vw"),tu={...Ke,parse:e=>Ke.parse(e)/100,transform:e=>Ke.transform(e*100)},Vt={test:Ka("hsl","hue"),parse:Zm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ke.transform(Cn(t))+", "+Ke.transform(Cn(n))+", "+Cn(kn.transform(r))+")"},de={test:e=>Et.test(e)||ws.test(e)||Vt.test(e),parse:e=>Et.test(e)?Et.parse(e):Vt.test(e)?Vt.parse(e):ws.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Et.transform(e):Vt.transform(e),getAnimatableNone:e=>{const t=de.parse(e);return t.alpha=0,de.transform(t)}},JR=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function eS(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(qa))==null?void 0:t.length)||0)+(((n=e.match(JR))==null?void 0:n.length)||0)>0}const Qm="number",Jm="color",tS="var",nS="var(",nu="${}",rS=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ln(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const l=t.replace(rS,u=>(de.test(u)?(r.color.push(s),o.push(Jm),n.push(de.parse(u))):u.startsWith(nS)?(r.var.push(s),o.push(tS),n.push(u)):(r.number.push(s),o.push(Qm),n.push(parseFloat(u))),++s,nu)).split(nu);return{values:n,split:l,indexes:r,types:o}}function eg(e){return Ln(e).values}function tg(e){const{split:t,types:n}=Ln(e),r=t.length;return o=>{let s="";for(let c=0;c<r;c++)if(s+=t[c],o[c]!==void 0){const l=n[c];l===Qm?s+=Cn(o[c]):l===Jm?s+=de.transform(o[c]):s+=o[c]}return s}}const oS=e=>typeof e=="number"?0:de.test(e)?de.getAnimatableNone(e):e;function iS(e){const t=eg(e);return tg(e)(t.map(oS))}const ft={test:eS,parse:eg,createTransformer:tg,getAnimatableNone:iS};function Oi(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function sS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,c=0;if(!t)o=s=c=n;else{const l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;o=Oi(u,l,e+1/3),s=Oi(u,l,e),c=Oi(u,l,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(c*255),alpha:r}}function _o(e,t){return n=>n>0?t:e}const ue=(e,t,n)=>e+(t-e)*n,Mi=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},aS=[ws,Et,Vt],cS=e=>aS.find(t=>t.test(e));function ru(e){const t=cS(e);if(on(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Vt&&(n=sS(n)),n}const ou=(e,t)=>{const n=ru(e),r=ru(t);if(!n||!r)return _o(e,t);const o={...n};return s=>(o.red=Mi(n.red,r.red,s),o.green=Mi(n.green,r.green,s),o.blue=Mi(n.blue,r.blue,s),o.alpha=ue(n.alpha,r.alpha,s),Et.transform(o))},Rs=new Set(["none","hidden"]);function uS(e,t){return Rs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function lS(e,t){return n=>ue(e,t,n)}function Xa(e){return typeof e=="number"?lS:typeof e=="string"?Wa(e)?_o:de.test(e)?ou:hS:Array.isArray(e)?ng:typeof e=="object"?de.test(e)?ou:fS:_o}function ng(e,t){const n=[...e],r=n.length,o=e.map((s,c)=>Xa(s)(s,t[c]));return s=>{for(let c=0;c<r;c++)n[c]=o[c](s);return n}}function fS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Xa(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function dS(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],c=e.indexes[s][r[s]],l=e.values[c]??0;n[o]=l,r[s]++}return n}const hS=(e,t)=>{const n=ft.createTransformer(t),r=Ln(e),o=Ln(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Rs.has(e)&&!o.values.length||Rs.has(t)&&!r.values.length?uS(e,t):er(ng(dS(r,o),o.values),n):(on(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),_o(e,t))};function rg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ue(e,t,n):Xa(e)(e,t)}const pS=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>se.update(t,n),stop:()=>lt(t),now:()=>me.isProcessing?me.timestamp:Ee.now()}},og=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},jo=2e4;function Ya(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<jo;)t+=n,r=e.next(t);return t>=jo?1/0:t}function mS(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Ya(r),jo);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:Oe(o)}}const gS=5;function ig(e,t,n){const r=Math.max(t-gS,0);return Lm(n-e(r),t-r)}const ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ii=.001;function xS({duration:e=ce.duration,bounce:t=ce.bounce,velocity:n=ce.velocity,mass:r=ce.mass}){let o,s;on(e<=qe(ce.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let c=1-t;c=Ye(ce.minDamping,ce.maxDamping,c),e=Ye(ce.minDuration,ce.maxDuration,Oe(e)),c<1?(o=i=>{const a=i*c,f=a*e,d=a-n,p=Ss(i,c),g=Math.exp(-f);return Ii-d/p*g},s=i=>{const f=i*c*e,d=f*n+n,p=Math.pow(c,2)*Math.pow(i,2)*e,g=Math.exp(-f),m=Ss(Math.pow(i,2),c);return(-o(i)+Ii>0?-1:1)*((d-p)*g)/m}):(o=i=>{const a=Math.exp(-i*e),f=(i-n)*e+1;return-Ii+a*f},s=i=>{const a=Math.exp(-i*e),f=(n-i)*(e*e);return a*f});const l=5/e,u=yS(o,s,l);if(e=qe(e),isNaN(u))return{stiffness:ce.stiffness,damping:ce.damping,duration:e};{const i=Math.pow(u,2)*r;return{stiffness:i,damping:c*2*Math.sqrt(r*i),duration:e}}}const vS=12;function yS(e,t,n){let r=n;for(let o=1;o<vS;o++)r=r-e(r)/t(r);return r}function Ss(e,t){return e*Math.sqrt(1-t*t)}const ES=["duration","bounce"],bS=["stiffness","damping","mass"];function iu(e,t){return t.some(n=>e[n]!==void 0)}function wS(e){let t={velocity:ce.velocity,stiffness:ce.stiffness,damping:ce.damping,mass:ce.mass,isResolvedFromDuration:!1,...e};if(!iu(e,bS)&&iu(e,ES))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Ye(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ce.mass,stiffness:o,damping:s}}else{const n=xS(e);t={...t,...n,mass:ce.mass},t.isResolvedFromDuration=!0}return t}function Po(e=ce.visualDuration,t=ce.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:u,damping:i,mass:a,duration:f,velocity:d,isResolvedFromDuration:p}=wS({...n,velocity:-Oe(n.velocity||0)}),g=d||0,m=i/(2*Math.sqrt(u*a)),x=c-s,y=Oe(Math.sqrt(u/a)),E=Math.abs(x)<5;r||(r=E?ce.restSpeed.granular:ce.restSpeed.default),o||(o=E?ce.restDelta.granular:ce.restDelta.default);let b;if(m<1){const w=Ss(y,m);b=P=>{const C=Math.exp(-m*y*P);return c-C*((g+m*y*x)/w*Math.sin(w*P)+x*Math.cos(w*P))}}else if(m===1)b=w=>c-Math.exp(-y*w)*(x+(g+y*x)*w);else{const w=y*Math.sqrt(m*m-1);b=P=>{const C=Math.exp(-m*y*P),_=Math.min(w*P,300);return c-C*((g+m*y*x)*Math.sinh(_)+w*x*Math.cosh(_))/w}}const R={calculatedDuration:p&&f||null,next:w=>{const P=b(w);if(p)l.done=w>=f;else{let C=w===0?g:0;m<1&&(C=w===0?qe(g):ig(b,w,P));const _=Math.abs(C)<=r,M=Math.abs(c-P)<=o;l.done=_&&M}return l.value=l.done?c:P,l},toString:()=>{const w=Math.min(Ya(R),jo),P=og(C=>R.next(w*C).value,w,30);return w+"ms "+P},toTransition:()=>{}};return R}Po.applyToOptions=e=>{const t=mS(e,100,Po);return e.ease=t.ease,e.duration=qe(t.duration),e.type="keyframes",e};function Cs({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:c,min:l,max:u,restDelta:i=.5,restSpeed:a}){const f=e[0],d={done:!1,value:f},p=_=>l!==void 0&&_<l||u!==void 0&&_>u,g=_=>l===void 0?u:u===void 0||Math.abs(l-_)<Math.abs(u-_)?l:u;let m=n*t;const x=f+m,y=c===void 0?x:c(x);y!==x&&(m=y-f);const E=_=>-m*Math.exp(-_/r),b=_=>y+E(_),R=_=>{const M=E(_),j=b(_);d.done=Math.abs(M)<=i,d.value=d.done?y:j};let w,P;const C=_=>{p(d.value)&&(w=_,P=Po({keyframes:[d.value,g(d.value)],velocity:ig(b,_,d.value),damping:o,stiffness:s,restDelta:i,restSpeed:a}))};return C(0),{calculatedDuration:null,next:_=>{let M=!1;return!P&&w===void 0&&(M=!0,R(_),C(_)),w!==void 0&&_>=w?P.next(_-w):(!M&&R(_),d)}}}function RS(e,t,n){const r=[],o=n||nt.mix||rg,s=e.length-1;for(let c=0;c<s;c++){let l=o(e[c],e[c+1]);if(t){const u=Array.isArray(t)?t[c]||Ie:t;l=er(u,l)}r.push(l)}return r}function SS(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(tt(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=RS(t,r,o),u=l.length,i=a=>{if(c&&a<e[0])return t[0];let f=0;if(u>1)for(;f<e.length-2&&!(a<e[f+1]);f++);const d=Nn(e[f],e[f+1],a);return l[f](d)};return n?a=>i(Ye(e[0],e[s-1],a)):i}function CS(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Nn(0,t,r);e.push(ue(n,1,o))}}function _S(e){const t=[0];return CS(t,e.length-1),t}function jS(e,t){return e.map(n=>n*t)}function PS(e,t){return e.map(()=>t||Wm).splice(0,e.length-1)}function Bt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=BR(r)?r.map(Jc):Jc(r),s={done:!1,value:t[0]},c=jS(n&&n.length===t.length?n:_S(t),e),l=SS(c,t,{ease:Array.isArray(o)?o:PS(t,o)});return{calculatedDuration:e,next:u=>(s.value=l(u),s.done=u>=e,s)}}const TS=e=>e!==null;function Za(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(TS),l=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!l||r===void 0?s[l]:r}const AS={decay:Cs,inertia:Cs,tween:Bt,keyframes:Bt,spring:Po};function sg(e){typeof e.type=="string"&&(e.type=AS[e.type])}class Qa{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const OS=e=>e/100;class Ja extends Qa{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,o;const{motionValue:n}=this.options;n&&n.updatedAt!==Ee.now()&&this.tick(Ee.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;sg(t);const{type:n=Bt,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:c=0}=t;let{keyframes:l}=t;const u=n||Bt;process.env.NODE_ENV!=="production"&&u!==Bt&&tt(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),u!==Bt&&typeof l[0]!="number"&&(this.mixKeyframes=er(OS,rg(l[0],l[1])),l=[0,100]);const i=u({...t,keyframes:l});s==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...l].reverse(),velocity:-c})),i.calculatedDuration===null&&(i.calculatedDuration=Ya(i));const{calculatedDuration:a}=i;this.calculatedDuration=a,this.resolvedDuration=a+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=i}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:c,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:i=0,keyframes:a,repeat:f,repeatType:d,repeatDelay:p,type:g,onUpdate:m,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-i*(this.playbackSpeed>=0?1:-1),E=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let b=this.currentTime,R=r;if(f){const _=Math.min(this.currentTime,o)/l;let M=Math.floor(_),j=_%1;!j&&_>=1&&(j=1),j===1&&M--,M=Math.min(M,f+1),!!(M%2)&&(d==="reverse"?(j=1-j,p&&(j-=p/l)):d==="mirror"&&(R=c)),b=Ye(0,1,j)*l}const w=E?{done:!1,value:a[0]}:R.next(b);s&&(w.value=s(w.value));let{done:P}=w;!E&&u!==null&&(P=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return C&&g!==Cs&&(w.value=Za(a,this.options,x,this.speed)),m&&m(w.value),C&&this.finish(),w}then(t,n){return this.finished.then(t,n)}get duration(){return Oe(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Oe(t)}get time(){return Oe(this.currentTime)}set time(t){var n;t=qe(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ee.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Oe(this.currentTime))}play(){var o,s;if(this.isStopped)return;const{driver:t=pS,startTime:n}=this.options;this.driver||(this.driver=t(c=>this.tick(c))),(s=(o=this.options).onPlay)==null||s.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ee.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function MS(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const bt=e=>e*180/Math.PI,_s=e=>{const t=bt(Math.atan2(e[1],e[0]));return js(t)},IS={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:_s,rotateZ:_s,skewX:e=>bt(Math.atan(e[1])),skewY:e=>bt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},js=e=>(e=e%360,e<0&&(e+=360),e),su=_s,au=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),cu=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),DS={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:au,scaleY:cu,scale:e=>(au(e)+cu(e))/2,rotateX:e=>js(bt(Math.atan2(e[6],e[5]))),rotateY:e=>js(bt(Math.atan2(-e[2],e[0]))),rotateZ:su,rotate:su,skewX:e=>bt(Math.atan(e[4])),skewY:e=>bt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ps(e){return e.includes("scale")?1:0}function Ts(e,t){if(!e||e==="none")return Ps(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=DS,o=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=IS,o=l}if(!o)return Ps(t);const s=r[t],c=o[1].split(",").map(kS);return typeof s=="function"?s(c):c[s]}const NS=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ts(n,t)};function kS(e){return parseFloat(e.trim())}const an=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],cn=new Set(an),uu=e=>e===sn||e===H,LS=new Set(["x","y","z"]),FS=an.filter(e=>!LS.has(e));function VS(e){const t=[];return FS.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const st={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ts(t,"x"),y:(e,{transform:t})=>Ts(t,"y")};st.translateX=st.x;st.translateY=st.y;const wt=new Set;let As=!1,Os=!1,Ms=!1;function ag(){if(Os){const e=Array.from(wt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=VS(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,c])=>{var l;(l=r.getValue(s))==null||l.set(c)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Os=!1,As=!1,wt.forEach(e=>e.complete(Ms)),wt.clear()}function cg(){wt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Os=!0)})}function BS(){Ms=!0,cg(),ag(),Ms=!1}class ec{constructor(t,n,r,o,s,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(wt.add(this),As||(As=!0,se.read(cg),se.resolveKeyframes(ag))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o==null?void 0:o.get(),c=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,c);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=c),o&&s===void 0&&o.set(t[0])}MS(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),wt.delete(this)}cancel(){this.state==="scheduled"&&(wt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const $S=e=>e.startsWith("--");function US(e,t,n){$S(t)?e.style.setProperty(t,n):e.style[t]=n}const GS=$a(()=>window.ScrollTimeline!==void 0),HS={};function zS(e,t){const n=$a(e);return()=>HS[t]??n()}const ug=zS(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Rn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,lu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rn([0,.65,.55,1]),circOut:Rn([.55,0,1,.45]),backIn:Rn([.31,.01,.66,-.59]),backOut:Rn([.33,1.53,.69,.99])};function lg(e,t){if(e)return typeof e=="function"?ug()?og(e,t):"ease-out":qm(e)?Rn(e):Array.isArray(e)?e.map(n=>lg(n,t)||lu.easeOut):lu[e]}function WS(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:c="loop",ease:l="easeOut",times:u}={},i=void 0){const a={[t]:n};u&&(a.offset=u);const f=lg(l,o);Array.isArray(f)&&(a.easing=f);const d={delay:r,duration:o,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:c==="reverse"?"alternate":"normal"};return i&&(d.pseudoElement=i),e.animate(a,d)}function fg(e){return typeof e=="function"&&"applyToOptions"in e}function qS({type:e,...t}){return fg(e)&&ug()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class KS extends Qa{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:c=!1,finalKeyframe:l,onComplete:u}=t;this.isPseudoElement=!!s,this.allowFlatten=c,this.options=t,tt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const i=qS(t);this.animation=WS(n,r,o,i,s),i.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const a=Za(o,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(a):US(n,r,a),this.animation.cancel()}u==null||u(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Oe(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Oe(t)}get time(){return Oe(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=qe(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&GS()?(this.animation.timeline=t,Ie):n(this)}}const dg={anticipate:Gm,backInOut:Um,circInOut:zm};function XS(e){return e in dg}function YS(e){typeof e.ease=="string"&&XS(e.ease)&&(e.ease=dg[e.ease])}const Di=10;class ZS extends KS{constructor(t){YS(t),sg(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...c}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new Ja({...c,autoplay:!1}),u=Math.max(Di,Ee.now()-this.startTime),i=Ye(0,Di,u-Di);n.setWithVelocity(l.sample(Math.max(0,u-i)).value,l.sample(u).value,i),l.stop()}}const fu=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ft.test(e)||e==="0")&&!e.startsWith("url("));function QS(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function JS(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],c=fu(o,t),l=fu(s,t);return on(c===l,`You are trying to animate ${t} from "${o}" to "${s}". "${c?s:o}" is not an animatable value.`,"value-not-animatable"),!c||!l?!1:QS(e)||(n==="spring"||fg(n))&&r}function Is(e){e.duration=0,e.type="keyframes"}const eC=new Set(["opacity","clipPath","filter","transform"]),tC=$a(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function nC(e){var a;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:c}=e;if(!(((a=t==null?void 0:t.owner)==null?void 0:a.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:i}=t.owner.getProps();return tC()&&n&&eC.has(n)&&(n!=="transform"||!i)&&!u&&!r&&o!=="mirror"&&s!==0&&c!=="inertia"}const rC=40;class oC extends Qa{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:c="loop",keyframes:l,name:u,motionValue:i,element:a,...f}){var g;super(),this.stop=()=>{var m,x;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Ee.now();const d={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:c,name:u,motionValue:i,element:a,...f},p=(a==null?void 0:a.KeyframeResolver)||ec;this.keyframeResolver=new p(l,(m,x,y)=>this.onKeyframesResolved(m,x,d,!y),u,i,a),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,o){var x,y;this.keyframeResolver=void 0;const{name:s,type:c,velocity:l,delay:u,isHandoff:i,onUpdate:a}=r;this.resolvedAt=Ee.now(),JS(t,s,c,l)||((nt.instantAnimations||!u)&&(a==null||a(Za(t,r,n))),t[0]=t[t.length-1],Is(r),r.repeat=0);const d={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>rC?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!i&&nC(d),g=(y=(x=d.motionValue)==null?void 0:x.owner)==null?void 0:y.current,m=p?new ZS({...d,element:g}):new Ja(d);m.finished.then(()=>{this.notifyFinished()}).catch(Ie),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),BS()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function hg(e,t,n,r=0,o=1){const s=Array.from(e).sort((i,a)=>i.sortNodePosition(a)).indexOf(t),c=e.size,l=(c-1)*r;return typeof n=="function"?n(s,c):o===1?s*r:l-s*r}const iC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function sC(e){const t=iC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const aC=4;function pg(e,t,n=1){tt(n<=aC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=sC(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const c=s.trim();return Dm(c)?parseFloat(c):c}return Wa(o)?pg(o,t,n+1):o}const cC={type:"spring",stiffness:500,damping:25,restSpeed:10},uC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lC={type:"keyframes",duration:.8},fC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},dC=(e,{keyframes:t})=>t.length>2?lC:cn.has(e)?e.startsWith("scale")?uC(t[1]):cC:fC,hC=e=>e!==null;function pC(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(hC),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}function tc(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function mC({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:c,repeatDelay:l,from:u,elapsed:i,...a}){return!!Object.keys(a).length}const nc=(e,t,n,r={},o,s)=>c=>{const l=tc(r,e)||{},u=l.delay||r.delay||0;let{elapsed:i=0}=r;i=i-qe(u);const a={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-i,onUpdate:d=>{t.set(d),l.onUpdate&&l.onUpdate(d)},onComplete:()=>{c(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:o};mC(l)||Object.assign(a,dC(e,a)),a.duration&&(a.duration=qe(a.duration)),a.repeatDelay&&(a.repeatDelay=qe(a.repeatDelay)),a.from!==void 0&&(a.keyframes[0]=a.from);let f=!1;if((a.type===!1||a.duration===0&&!a.repeatDelay)&&(Is(a),a.delay===0&&(f=!0)),(nt.instantAnimations||nt.skipAnimations)&&(f=!0,Is(a),a.delay=0),a.allowFlatten=!l.type&&!l.ease,f&&!s&&t.get()!==void 0){const d=pC(a.keyframes,l);if(d!==void 0){se.update(()=>{a.onUpdate(d),a.onComplete()});return}}return l.isSync?new Ja(a):new oC(a)};function du(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function rc(e,t,n,r){if(typeof t=="function"){const[o,s]=du(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=du(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function qt(e,t,n){const r=e.getProps();return rc(r,t,n!==void 0?n:r.custom,e)}const mg=new Set(["width","height","top","left","right","bottom",...an]),hu=30,gC=e=>!isNaN(parseFloat(e));class xC{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const o=Ee.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ee.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=gC(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ga(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ua);const r=this.events[t].add(n);return t==="change"?()=>{r(),se.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ee.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>hu)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,hu);return Lm(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zt(e,t){return new xC(e,t)}const Ds=e=>Array.isArray(e);function vC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zt(n))}function yC(e){return Ds(e)?e[e.length-1]||0:e}function EC(e,t){const n=qt(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const c in s){const l=yC(s[c]);vC(e,c,l)}}const xe=e=>!!(e&&e.getVelocity);function bC(e){return!!(xe(e)&&e.add)}function Ns(e,t){const n=e.getValue("willChange");if(bC(n))return n.add(t);if(!n&&nt.WillChange){const r=new nt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function oc(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const wC="framerAppearId",gg="data-"+oc(wC);function xg(e){return e.props[gg]}function RC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function vg(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:c,...l}=t;r&&(s=r);const u=[],i=o&&e.animationState&&e.animationState.getState()[o];for(const a in l){const f=e.getValue(a,e.latestValues[a]??null),d=l[a];if(d===void 0||i&&RC(i,a))continue;const p={delay:n,...tc(s||{},a)},g=f.get();if(g!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===g&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const y=xg(e);if(y){const E=window.MotionHandoffAnimation(y,a,se);E!==null&&(p.startTime=E,m=!0)}}Ns(e,a),f.start(nc(a,f,d,e.shouldReduceMotion&&mg.has(a)?{type:!1}:p,e,m));const x=f.animation;x&&u.push(x)}return c&&Promise.all(u).then(()=>{se.update(()=>{c&&EC(e,c)})}),u}function ks(e,t,n={}){var u;const r=qt(e,t,n.type==="exit"?(u=e.presenceContext)==null?void 0:u.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(vg(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(i=0)=>{const{delayChildren:a=0,staggerChildren:f,staggerDirection:d}=o;return SC(e,t,i,a,f,d,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[i,a]=l==="beforeChildren"?[s,c]:[c,s];return i().then(()=>a())}else return Promise.all([s(),c(n.delay)])}function SC(e,t,n=0,r=0,o=0,s=1,c){const l=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),l.push(ks(u,t,{...c,delay:n+(typeof r=="function"?0:r)+hg(e.variantChildren,u,r,o,s)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(l)}function CC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>ks(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=ks(e,t,n);else{const o=typeof t=="function"?qt(e,t,n.custom):t;r=Promise.all(vg(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const _C={test:e=>e==="auto",parse:e=>e},yg=e=>t=>t.test(e),Eg=[sn,H,Ke,it,QR,ZR,_C],pu=e=>Eg.find(yg(e));function jC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||km(e):!0}const PC=new Set(["brightness","contrast","saturate","opacity"]);function TC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(qa)||[];if(!r)return e;const o=n.replace(r,"");let s=PC.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const AC=/\b([a-z-]*)\(.*?\)/gu,Ls={...ft,getAnimatableNone:e=>{const t=e.match(AC);return t?t.map(TC).join(" "):e}},mu={...sn,transform:Math.round},OC={rotate:it,rotateX:it,rotateY:it,rotateZ:it,scale:xr,scaleX:xr,scaleY:xr,scaleZ:xr,skew:it,skewX:it,skewY:it,distance:H,translateX:H,translateY:H,translateZ:H,x:H,y:H,z:H,perspective:H,transformPerspective:H,opacity:kn,originX:tu,originY:tu,originZ:H},ic={borderWidth:H,borderTopWidth:H,borderRightWidth:H,borderBottomWidth:H,borderLeftWidth:H,borderRadius:H,radius:H,borderTopLeftRadius:H,borderTopRightRadius:H,borderBottomRightRadius:H,borderBottomLeftRadius:H,width:H,maxWidth:H,height:H,maxHeight:H,top:H,right:H,bottom:H,left:H,inset:H,insetBlock:H,insetBlockStart:H,insetBlockEnd:H,insetInline:H,insetInlineStart:H,insetInlineEnd:H,padding:H,paddingTop:H,paddingRight:H,paddingBottom:H,paddingLeft:H,paddingBlock:H,paddingBlockStart:H,paddingBlockEnd:H,paddingInline:H,paddingInlineStart:H,paddingInlineEnd:H,margin:H,marginTop:H,marginRight:H,marginBottom:H,marginLeft:H,marginBlock:H,marginBlockStart:H,marginBlockEnd:H,marginInline:H,marginInlineStart:H,marginInlineEnd:H,backgroundPositionX:H,backgroundPositionY:H,...OC,zIndex:mu,fillOpacity:kn,strokeOpacity:kn,numOctaves:mu},MC={...ic,color:de,backgroundColor:de,outlineColor:de,fill:de,stroke:de,borderColor:de,borderTopColor:de,borderRightColor:de,borderBottomColor:de,borderLeftColor:de,filter:Ls,WebkitFilter:Ls},bg=e=>MC[e];function wg(e,t){let n=bg(e);return n!==Ls&&(n=ft),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const IC=new Set(["auto","none","0"]);function DC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!IC.has(s)&&Ln(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=wg(n,o)}class NC extends ec{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let f=t[a];if(typeof f=="string"&&(f=f.trim(),Wa(f))){const d=pg(f,n.current);d!==void 0&&(t[a]=d),a===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!mg.has(r)||t.length!==2)return;const[o,s]=t,c=pu(o),l=pu(s),u=eu(o),i=eu(s);if(u!==i&&st[r]){this.needsMeasurement=!0;return}if(c!==l)if(uu(c)&&uu(l))for(let a=0;a<t.length;a++){const f=t[a];typeof f=="string"&&(t[a]=parseFloat(f))}else st[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||jC(t[o]))&&r.push(o);r.length&&DC(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=st[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,c=r[s];r[s]=st[n](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([u,i])=>{t.getValue(u).set(i)}),this.resolveNoneKeyframes()}}function kC(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const Rg=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Sg(e){return Nm(e)&&"offsetHeight"in e}const{schedule:sc}=Km(queueMicrotask,!1),Fe={x:!1,y:!1};function Cg(){return Fe.x||Fe.y}function LC(e){return e==="x"||e==="y"?Fe[e]?null:(Fe[e]=!0,()=>{Fe[e]=!1}):Fe.x||Fe.y?null:(Fe.x=Fe.y=!0,()=>{Fe.x=Fe.y=!1})}function _g(e,t){const n=kC(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function gu(e){return!(e.pointerType==="touch"||Cg())}function FC(e,t,n={}){const[r,o,s]=_g(e,n),c=l=>{if(!gu(l))return;const{target:u}=l,i=t(u,l);if(typeof i!="function"||!u)return;const a=f=>{gu(f)&&(i(f),u.removeEventListener("pointerleave",a))};u.addEventListener("pointerleave",a,o)};return r.forEach(l=>{l.addEventListener("pointerenter",c,o)}),s}const jg=(e,t)=>t?e===t?!0:jg(e,t.parentElement):!1,ac=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,VC=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Pg(e){return VC.has(e.tagName)||e.isContentEditable===!0}const fo=new WeakSet;function xu(e){return t=>{t.key==="Enter"&&e(t)}}function Ni(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const BC=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=xu(()=>{if(fo.has(n))return;Ni(n,"down");const o=xu(()=>{Ni(n,"up")}),s=()=>Ni(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function vu(e){return ac(e)&&!Cg()}function $C(e,t,n={}){const[r,o,s]=_g(e,n),c=l=>{const u=l.currentTarget;if(!vu(l))return;fo.add(u);const i=t(u,l),a=(p,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),fo.has(u)&&fo.delete(u),vu(p)&&typeof i=="function"&&i(p,{success:g})},f=p=>{a(p,u===window||u===document||n.useGlobalTarget||jg(u,p.target))},d=p=>{a(p,!1)};window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",d,o)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",c,o),Sg(l)&&(l.addEventListener("focus",i=>BC(i,o)),!Pg(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),s}function Tg(e){return Nm(e)&&"ownerSVGElement"in e}function UC(e){return Tg(e)&&e.tagName==="svg"}const GC=[...Eg,de,ft],HC=e=>GC.find(yg(e)),yu=()=>({translate:0,scale:1,origin:0,originPoint:0}),$t=()=>({x:yu(),y:yu()}),Eu=()=>({min:0,max:0}),pe=()=>({x:Eu(),y:Eu()}),Fs={current:null},Ag={current:!1},zC=typeof window<"u";function WC(){if(Ag.current=!0,!!zC)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fs.current=e.matches;e.addEventListener("change",t),t()}else Fs.current=!1}const qC=new WeakMap;function ui(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Fn(e){return typeof e=="string"||Array.isArray(e)}const cc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],uc=["initial",...cc];function li(e){return ui(e.animate)||uc.some(t=>Fn(e[t]))}function Og(e){return!!(li(e)||e.variants)}function KC(e,t,n){for(const r in t){const o=t[r],s=n[r];if(xe(o))e.addValue(r,o);else if(xe(s))e.addValue(r,Zt(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const c=e.getValue(r);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(r);e.addValue(r,Zt(c!==void 0?c:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const bu=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let To={};function Mg(e){To=e}function XC(){return To}class YC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:c},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ec,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=Ee.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,se.render(this.render,!1,!0))};const{latestValues:u,renderState:i}=c;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=i,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=li(n),this.isVariantNode=Og(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:a,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];u[d]!==void 0&&xe(p)&&p.set(u[d])}}mount(t){var n;this.current=t,qC.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ag.current||WC(),this.shouldReduceMotion=Fs.current),process.env.NODE_ENV!=="production"&&Ga(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),lt(this.notifyUpdate),lt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=cn.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&se.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in To){const n=To[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):pe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<bu.length;r++){const o=bu[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,c=t[s];c&&(this.propEventSubscriptions[o]=this.on(o,c))}this.prevMotionValues=KC(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Zt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Dm(r)||km(r))?r=parseFloat(r):!HC(r)&&ft.test(n)&&(r=wg(t,n)),this.setBaseTarget(t,xe(r)?r.get():r)),xe(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const c=rc(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);c&&(r=c[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!xe(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ua),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){sc.render(this.render)}}class Ig extends YC{constructor(){super(...arguments),this.KeyframeResolver=NC}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;xe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class mt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Dg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ZC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function QC(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ki(e){return e===void 0||e===1}function Vs({scale:e,scaleX:t,scaleY:n}){return!ki(e)||!ki(t)||!ki(n)}function yt(e){return Vs(e)||Ng(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ng(e){return wu(e.x)||wu(e.y)}function wu(e){return e&&e!=="0%"}function Ao(e,t,n){const r=e-n,o=t*r;return n+o}function Ru(e,t,n,r,o){return o!==void 0&&(e=Ao(e,o,r)),Ao(e,n,r)+t}function Bs(e,t=0,n=1,r,o){e.min=Ru(e.min,t,n,r,o),e.max=Ru(e.max,t,n,r,o)}function kg(e,{x:t,y:n}){Bs(e.x,t.translate,t.scale,t.originPoint),Bs(e.y,n.translate,n.scale,n.originPoint)}const Su=.999999999999,Cu=1.0000000000001;function JC(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,c;for(let l=0;l<o;l++){s=n[l],c=s.projectionDelta;const{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Gt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,kg(e,c)),r&&yt(s.latestValues)&&Gt(e,s.latestValues))}t.x<Cu&&t.x>Su&&(t.x=1),t.y<Cu&&t.y>Su&&(t.y=1)}function Ut(e,t){e.min=e.min+t,e.max=e.max+t}function _u(e,t,n,r,o=.5){const s=ue(e.min,e.max,o);Bs(e,t,n,s,r)}function Gt(e,t){_u(e.x,t.x,t.scaleX,t.scale,t.originX),_u(e.y,t.y,t.scaleY,t.scale,t.originY)}function Lg(e,t){return Dg(QC(e.getBoundingClientRect(),t))}function e_(e,t,n){const r=Lg(e,n),{scroll:o}=t;return o&&(Ut(r.x,o.offset.x),Ut(r.y,o.offset.y)),r}const t_={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},n_=an.length;function r_(e,t,n){let r="",o=!0;for(let s=0;s<n_;s++){const c=an[s],l=e[c];if(l===void 0)continue;let u=!0;if(typeof l=="number"?u=l===(c.startsWith("scale")?1:0):u=parseFloat(l)===0,!u||n){const i=Rg(l,ic[c]);if(!u){o=!1;const a=t_[c]||c;r+=`${a}(${i}) `}n&&(t[c]=i)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function lc(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let c=!1,l=!1;for(const u in t){const i=t[u];if(cn.has(u)){c=!0;continue}else if(Ym(u)){o[u]=i;continue}else{const a=Rg(i,ic[u]);u.startsWith("origin")?(l=!0,s[u]=a):r[u]=a}}if(t.transform||(c||n?r.transform=r_(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:i="50%",originZ:a=0}=s;r.transformOrigin=`${u} ${i} ${a}`}}function Fg(e,{style:t,vars:n},r,o){const s=e.style;let c;for(c in t)s[c]=t[c];o==null||o.applyProjectionStyles(s,r);for(c in n)s.setProperty(c,n[c])}function ju(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const dn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(H.test(e))e=parseFloat(e);else return e;const n=ju(e,t.target.x),r=ju(e,t.target.y);return`${n}% ${r}%`}},o_={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ft.parse(e);if(o.length>5)return r;const s=ft.createTransformer(e),c=typeof o[0]!="number"?1:0,l=n.x.scale*t.x,u=n.y.scale*t.y;o[0+c]/=l,o[1+c]/=u;const i=ue(l,u,.5);return typeof o[2+c]=="number"&&(o[2+c]/=i),typeof o[3+c]=="number"&&(o[3+c]/=i),s(o)}},$s={borderRadius:{...dn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:dn,borderTopRightRadius:dn,borderBottomLeftRadius:dn,borderBottomRightRadius:dn,boxShadow:o_};function Vg(e,{layout:t,layoutId:n}){return cn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$s[e]||e==="opacity")}function fc(e,t,n){var c;const r=e.style,o=t==null?void 0:t.style,s={};if(!r)return s;for(const l in r)(xe(r[l])||o&&xe(o[l])||Vg(l,e)||((c=n==null?void 0:n.getValue(l))==null?void 0:c.liveStyle)!==void 0)&&(s[l]=r[l]);return s}function i_(e){return window.getComputedStyle(e)}class s_ extends Ig{constructor(){super(...arguments),this.type="html",this.renderInstance=Fg}readValueFromInstance(t,n){var r;if(cn.has(n))return(r=this.projection)!=null&&r.isProjecting?Ps(n):NS(t,n);{const o=i_(t),s=(Ym(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Lg(t,n)}build(t,n,r){lc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return fc(t,n,r)}}const a_={offset:"stroke-dashoffset",array:"stroke-dasharray"},c_={offset:"strokeDashoffset",array:"strokeDasharray"};function u_(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?a_:c_;e[s.offset]=H.transform(-r);const c=H.transform(t),l=H.transform(n);e[s.array]=`${c} ${l}`}const l_=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Bg(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:c=0,...l},u,i,a){if(lc(e,l,i),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(a==null?void 0:a.transformBox)??"fill-box",delete f.transformBox);for(const p of l_)f[p]!==void 0&&(d[p]=f[p],delete f[p]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&u_(f,o,s,c,!1)}const $g=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Ug=e=>typeof e=="string"&&e.toLowerCase()==="svg";function f_(e,t,n,r){Fg(e,t,void 0,r);for(const o in t.attrs)e.setAttribute($g.has(o)?o:oc(o),t.attrs[o])}function Gg(e,t,n){const r=fc(e,t,n);for(const o in e)if(xe(e[o])||xe(t[o])){const s=an.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}class d_ extends Ig{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=pe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(cn.has(n)){const r=bg(n);return r&&r.default||0}return n=$g.has(n)?n:oc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Gg(t,n,r)}build(t,n,r){Bg(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){f_(t,n,r,o)}mount(t){this.isSVGTag=Ug(t.tagName),super.mount(t)}}const h_=uc.length;function Hg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Hg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<h_;n++){const r=uc[n],o=e.props[r];(Fn(o)||o===!1)&&(t[r]=o)}return t}function zg(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const p_=[...cc].reverse(),m_=cc.length;function g_(e){return t=>Promise.all(t.map(({animation:n,options:r})=>CC(e,n,r)))}function x_(e){let t=g_(e),n=Pu(),r=!0;const o=u=>(i,a)=>{var d;const f=qt(e,a,u==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:g,...m}=f;i={...i,...m,...g}}return i};function s(u){t=u(e)}function c(u){const{props:i}=e,a=Hg(e.parent)||{},f=[],d=new Set;let p={},g=1/0;for(let x=0;x<m_;x++){const y=p_[x],E=n[y],b=i[y]!==void 0?i[y]:a[y],R=Fn(b),w=y===u?E.isActive:null;w===!1&&(g=x);let P=b===a[y]&&b!==i[y]&&R;if(P&&r&&e.manuallyAnimateOnMount&&(P=!1),E.protectedKeys={...p},!E.isActive&&w===null||!b&&!E.prevProp||ui(b)||typeof b=="boolean")continue;const C=v_(E.prevProp,b);let _=C||y===u&&E.isActive&&!P&&R||x>g&&R,M=!1;const j=Array.isArray(b)?b:[b];let A=j.reduce(o(y),{});w===!1&&(A={});const{prevResolvedValues:I={}}=E,F={...I,...A},B=G=>{_=!0,d.has(G)&&(M=!0,d.delete(G)),E.needsAnimating[G]=!0;const $=e.getValue(G);$&&($.liveStyle=!1)};for(const G in F){const $=A[G],V=I[G];if(p.hasOwnProperty(G))continue;let T=!1;Ds($)&&Ds(V)?T=!zg($,V):T=$!==V,T?$!=null?B(G):d.add(G):$!==void 0&&d.has(G)?B(G):E.protectedKeys[G]=!0}E.prevProp=b,E.prevResolvedValues=A,E.isActive&&(p={...p,...A}),r&&e.blockInitialAnimation&&(_=!1);const q=P&&C;_&&(!q||M)&&f.push(...j.map(G=>{const $={type:y};if(typeof G=="string"&&r&&!q&&e.manuallyAnimateOnMount&&e.parent){const{parent:V}=e,T=qt(V,G);if(V.enteringChildren&&T){const{delayChildren:L}=T.transition||{};$.delay=hg(V.enteringChildren,e,L)}}return{animation:G,options:$}}))}if(d.size){const x={};if(typeof i.initial!="boolean"){const y=qt(e,Array.isArray(i.initial)?i.initial[0]:i.initial);y&&y.transition&&(x.transition=y.transition)}d.forEach(y=>{const E=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),x[y]=E??null}),f.push({animation:x})}let m=!!f.length;return r&&(i.initial===!1||i.initial===i.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function l(u,i){var f;if(n[u].isActive===i)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(d=>{var p;return(p=d.animationState)==null?void 0:p.setActive(u,i)}),n[u].isActive=i;const a=c(u);for(const d in n)n[d].protectedKeys={};return a}return{animateChanges:c,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Pu()}}}function v_(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zg(t,e):!1}function gt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pu(){return{animate:gt(!0),whileInView:gt(),whileHover:gt(),whileTap:gt(),whileDrag:gt(),whileFocus:gt(),exit:gt()}}function Tu(e,t){e.min=t.min,e.max=t.max}function Ne(e,t){Tu(e.x,t.x),Tu(e.y,t.y)}function Au(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Wg=1e-4,y_=1-Wg,E_=1+Wg,qg=.01,b_=0-qg,w_=0+qg;function be(e){return e.max-e.min}function R_(e,t,n){return Math.abs(e-t)<=n}function Ou(e,t,n,r=.5){e.origin=r,e.originPoint=ue(t.min,t.max,e.origin),e.scale=be(n)/be(t),e.translate=ue(n.min,n.max,e.origin)-e.originPoint,(e.scale>=y_&&e.scale<=E_||isNaN(e.scale))&&(e.scale=1),(e.translate>=b_&&e.translate<=w_||isNaN(e.translate))&&(e.translate=0)}function _n(e,t,n,r){Ou(e.x,t.x,n.x,r?r.originX:void 0),Ou(e.y,t.y,n.y,r?r.originY:void 0)}function Mu(e,t,n){e.min=n.min+t.min,e.max=e.min+be(t)}function S_(e,t,n){Mu(e.x,t.x,n.x),Mu(e.y,t.y,n.y)}function Iu(e,t,n){e.min=t.min-n.min,e.max=e.min+be(t)}function Oo(e,t,n){Iu(e.x,t.x,n.x),Iu(e.y,t.y,n.y)}function Du(e,t,n,r,o){return e-=t,e=Ao(e,1/n,r),o!==void 0&&(e=Ao(e,1/o,r)),e}function C_(e,t=0,n=1,r=.5,o,s=e,c=e){if(Ke.test(t)&&(t=parseFloat(t),t=ue(c.min,c.max,t/100)-c.min),typeof t!="number")return;let l=ue(s.min,s.max,r);e===s&&(l-=t),e.min=Du(e.min,t,n,l,o),e.max=Du(e.max,t,n,l,o)}function Nu(e,t,[n,r,o],s,c){C_(e,t[n],t[r],t[o],t.scale,s,c)}const __=["x","scaleX","originX"],j_=["y","scaleY","originY"];function ku(e,t,n,r){Nu(e.x,t,__,n?n.x:void 0,r?r.x:void 0),Nu(e.y,t,j_,n?n.y:void 0,r?r.y:void 0)}function Lu(e){return e.translate===0&&e.scale===1}function Kg(e){return Lu(e.x)&&Lu(e.y)}function Fu(e,t){return e.min===t.min&&e.max===t.max}function P_(e,t){return Fu(e.x,t.x)&&Fu(e.y,t.y)}function Vu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Xg(e,t){return Vu(e.x,t.x)&&Vu(e.y,t.y)}function Bu(e){return be(e.x)/be(e.y)}function $u(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ae(e){return[e("x"),e("y")]}function T_(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,c=(n==null?void 0:n.z)||0;if((o||s||c)&&(r=`translate3d(${o}px, ${s}px, ${c}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:i,rotate:a,rotateX:f,rotateY:d,skewX:p,skewY:g}=n;i&&(r=`perspective(${i}px) ${r}`),a&&(r+=`rotate(${a}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),p&&(r+=`skewX(${p}deg) `),g&&(r+=`skewY(${g}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const Yg=["TopLeft","TopRight","BottomLeft","BottomRight"],A_=Yg.length,Uu=e=>typeof e=="string"?parseFloat(e):e,Gu=e=>typeof e=="number"||H.test(e);function O_(e,t,n,r,o,s){o?(e.opacity=ue(0,n.opacity??1,M_(r)),e.opacityExit=ue(t.opacity??1,0,I_(r))):s&&(e.opacity=ue(t.opacity??1,n.opacity??1,r));for(let c=0;c<A_;c++){const l=`border${Yg[c]}Radius`;let u=Hu(t,l),i=Hu(n,l);if(u===void 0&&i===void 0)continue;u||(u=0),i||(i=0),u===0||i===0||Gu(u)===Gu(i)?(e[l]=Math.max(ue(Uu(u),Uu(i),r),0),(Ke.test(i)||Ke.test(u))&&(e[l]+="%")):e[l]=i}(t.rotate||n.rotate)&&(e.rotate=ue(t.rotate||0,n.rotate||0,r))}function Hu(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const M_=Zg(0,.5,Hm),I_=Zg(.5,.95,Ie);function Zg(e,t,n){return r=>r<e?0:r>t?1:n(Nn(e,t,r))}function D_(e,t,n){const r=xe(e)?e:Zt(e);return r.start(nc("",r,t,n)),r.animation}function Vn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const N_=(e,t)=>e.depth-t.depth;class k_{constructor(){this.children=[],this.isDirty=!1}add(t){Va(this.children,t),this.isDirty=!0}remove(t){Ba(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(N_),this.isDirty=!1,this.children.forEach(t)}}function L_(e,t){const n=Ee.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(lt(r),e(s-t))};return se.setup(r,!0),()=>lt(r)}function ho(e){return xe(e)?e.get():e}class F_{constructor(){this.members=[]}add(t){Va(this.members,t),t.scheduleRender()}remove(t){if(Ba(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const po={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Li=["","X","Y","Z"],V_=1e3;let B_=0;function Fi(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Qg(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=xg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",se,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Qg(r)}function Jg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(c={},l=t==null?void 0:t()){this.id=B_++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(G_),this.nodes.forEach(q_),this.nodes.forEach(K_),this.nodes.forEach(H_)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new k_)}addEventListener(c,l){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new Ua),this.eventHandlers.get(c).add(l)}notifyListeners(c,...l){const u=this.eventHandlers.get(c);u&&u.notify(...l)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=Tg(c)&&!UC(c),this.instance=c;const{layoutId:l,layout:u,visualElement:i}=this.options;if(i&&!i.current&&i.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||l)&&(this.isLayoutDirty=!0),e){let a,f=0;const d=()=>this.root.updateBlockedByResize=!1;se.read(()=>{f=window.innerWidth}),e(c,()=>{const p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,a&&a(),a=L_(d,250),po.hasAnimatedSinceResize&&(po.hasAnimatedSinceResize=!1,this.nodes.forEach(qu)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&i&&(l||u)&&this.addEventListener("didUpdate",({delta:a,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||i.getDefaultTransition()||J_,{onLayoutAnimationStart:m,onLayoutAnimationComplete:x}=i.getProps(),y=!this.targetLayout||!Xg(this.targetLayout,p),E=!f&&d;if(this.options.layoutRoot||this.resumeFrom||E||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...tc(g,"layout"),onPlay:m,onComplete:x};(i.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(a,E)}else f||qu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),lt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(X_),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Qg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const f=this.path[a];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:u}=this.options;if(l===void 0&&!u)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(zu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Wu);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(W_),this.nodes.forEach($_),this.nodes.forEach(U_)):this.nodes.forEach(Wu),this.clearAllSnapshots();const l=Ee.now();me.delta=Ye(0,1e3/60,l-me.timestamp),me.timestamp=l,me.isProcessing=!0,Ti.update.process(me),Ti.preRender.process(me),Ti.render.process(me),me.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,sc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(z_),this.sharedNodes.forEach(Y_)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){se.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!be(this.snapshot.measuredBox.x)&&!be(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(l=!1),l&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!o)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Kg(this.projectionDelta),u=this.getTransformTemplate(),i=u?u(this.latestValues,""):void 0,a=i!==this.prevTransformTemplateValue;c&&this.instance&&(l||yt(this.latestValues)||a)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const l=this.measurePageBox();let u=this.removeElementScroll(l);return c&&(u=this.removeTransform(u)),ej(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:c}=this.options;if(!c)return pe();const l=c.measureViewportBox();if(!(((i=this.scroll)==null?void 0:i.wasRoot)||this.path.some(tj))){const{scroll:a}=this.root;a&&(Ut(l.x,a.offset.x),Ut(l.y,a.offset.y))}return l}removeElementScroll(c){var u;const l=pe();if(Ne(l,c),(u=this.scroll)!=null&&u.wasRoot)return l;for(let i=0;i<this.path.length;i++){const a=this.path[i],{scroll:f,options:d}=a;a!==this.root&&f&&d.layoutScroll&&(f.wasRoot&&Ne(l,c),Ut(l.x,f.offset.x),Ut(l.y,f.offset.y))}return l}applyTransform(c,l=!1){const u=pe();Ne(u,c);for(let i=0;i<this.path.length;i++){const a=this.path[i];!l&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Gt(u,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),yt(a.latestValues)&&Gt(u,a.latestValues)}return yt(this.latestValues)&&Gt(u,this.latestValues),u}removeTransform(c){const l=pe();Ne(l,c);for(let u=0;u<this.path.length;u++){const i=this.path[u];if(!i.instance||!yt(i.latestValues))continue;Vs(i.latestValues)&&i.updateSnapshot();const a=pe(),f=i.measurePageBox();Ne(a,f),ku(l,i.latestValues,i.snapshot?i.snapshot.layoutBox:void 0,a)}return yt(this.latestValues)&&ku(l,this.latestValues),l}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==me.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){var p;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(c||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:a,layoutId:f}=this.options;if(!this.layout||!(a||f))return;this.resolvedRelativeTargetAt=me.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=pe(),this.targetWithTransforms=pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),S_(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ne(this.target,this.layout.layoutBox),kg(this.target,this.targetDelta)):Ne(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Vs(this.parent.latestValues)||Ng(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,l,u){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pe(),this.relativeTargetOrigin=pe(),Oo(this.relativeTargetOrigin,l,u),Ne(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const c=this.getLead(),l=!!this.resumingFrom||this!==c;let u=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===me.timestamp&&(u=!1),u)return;const{layout:i,layoutId:a}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(i||a))return;Ne(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;JC(this.layoutCorrected,this.treeScale,this.path,l),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=pe());const{target:p}=c;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Au(this.prevProjectionDelta.x,this.projectionDelta.x),Au(this.prevProjectionDelta.y,this.projectionDelta.y)),_n(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!$u(this.projectionDelta.x,this.prevProjectionDelta.x)||!$u(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),c){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=$t(),this.projectionDelta=$t(),this.projectionDeltaWithTransform=$t()}setAnimationOrigin(c,l=!1){const u=this.snapshot,i=u?u.latestValues:{},a={...this.latestValues},f=$t();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const d=pe(),p=u?u.source:void 0,g=this.layout?this.layout.source:void 0,m=p!==g,x=this.getStack(),y=!x||x.members.length<=1,E=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(Q_));this.animationProgress=0;let b;this.mixTargetDelta=R=>{const w=R/1e3;Ku(f.x,c.x,w),Ku(f.y,c.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Oo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Z_(this.relativeTarget,this.relativeTargetOrigin,d,w),b&&P_(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=pe()),Ne(b,this.relativeTarget)),m&&(this.animationValues=a,O_(a,i,this.latestValues,w,E,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){var l,u,i;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(i=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||i.stop(),this.pendingAnimation&&(lt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=se.update(()=>{po.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Zt(0)),this.currentAnimation=D_(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),c.onUpdate&&c.onUpdate(a)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(V_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:l,target:u,layout:i,latestValues:a}=c;if(!(!l||!u||!i)){if(this!==c&&this.layout&&i&&ex(this.options.animationType,this.layout.layoutBox,i.layoutBox)){u=this.target||pe();const f=be(this.layout.layoutBox.x);u.x.min=c.target.x.min,u.x.max=u.x.min+f;const d=be(this.layout.layoutBox.y);u.y.min=c.target.y.min,u.y.max=u.y.min+d}Ne(l,u),Gt(l,a),_n(this.projectionDeltaWithTransform,this.layoutCorrected,l,a)}}registerSharedNode(c,l){this.sharedNodes.has(c)||this.sharedNodes.set(c,new F_),this.sharedNodes.get(c).add(l);const i=l.options.initialPromotionConfig;l.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(l):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var l;const{layoutId:c}=this.options;return c?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:c}=this.options;return c?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:l,preserveFollowOpacity:u}={}){const i=this.getStack();i&&i.promote(this,u),c&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let l=!1;const{latestValues:u}=c;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;const i={};u.z&&Fi("z",c,i,this.animationValues);for(let a=0;a<Li.length;a++)Fi(`rotate${Li[a]}`,c,i,this.animationValues),Fi(`skew${Li[a]}`,c,i,this.animationValues);c.render();for(const a in i)c.setStaticValue(a,i[a]),this.animationValues&&(this.animationValues[a]=i[a]);c.scheduleRender()}applyProjectionStyles(c,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=ho(l==null?void 0:l.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none";return}const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=ho(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!yt(this.latestValues)&&(c.transform=u?u({},""):"none",this.hasProjected=!1);return}c.visibility="";const a=i.animationValues||i.latestValues;this.applyTransformsToTarget();let f=T_(this.projectionDeltaWithTransform,this.treeScale,a);u&&(f=u(a,f)),c.transform=f;const{x:d,y:p}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,i.animationValues?c.opacity=i===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:c.opacity=i===this?a.opacity!==void 0?a.opacity:"":a.opacityExit!==void 0?a.opacityExit:0;for(const g in $s){if(a[g]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:y}=$s[g],E=f==="none"?a[g]:m(a[g],i);if(x){const b=x.length;for(let R=0;R<b;R++)c[x[R]]=E}else y?this.options.visualElement.renderState.vars[g]=E:c[g]=E}this.options.layoutId&&(c.pointerEvents=i===this?ho(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>{var l;return(l=c.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(zu),this.root.sharedNodes.clear()}}}function $_(e){e.updateLayout()}function U_(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,c=t.source!==e.layout.source;s==="size"?Ae(f=>{const d=c?t.measuredBox[f]:t.layoutBox[f],p=be(d);d.min=r[f].min,d.max=d.min+p}):ex(s,t.layoutBox,r)&&Ae(f=>{const d=c?t.measuredBox[f]:t.layoutBox[f],p=be(r[f]);d.max=d.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const l=$t();_n(l,r,t.layoutBox);const u=$t();c?_n(u,e.applyTransform(o,!0),t.measuredBox):_n(u,r,t.layoutBox);const i=!Kg(l);let a=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:p}=f;if(d&&p){const g=pe();Oo(g,t.layoutBox,d.layoutBox);const m=pe();Oo(m,r,p.layoutBox),Xg(g,m)||(a=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=g,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:u,layoutDelta:l,hasLayoutChanged:i,hasRelativeLayoutChanged:a})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function G_(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function H_(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function z_(e){e.clearSnapshot()}function zu(e){e.clearMeasurements()}function Wu(e){e.isLayoutDirty=!1}function W_(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function qu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function q_(e){e.resolveTargetDelta()}function K_(e){e.calcProjection()}function X_(e){e.resetSkewAndRotation()}function Y_(e){e.removeLeadSnapshot()}function Ku(e,t,n){e.translate=ue(t.translate,0,n),e.scale=ue(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Xu(e,t,n,r){e.min=ue(t.min,n.min,r),e.max=ue(t.max,n.max,r)}function Z_(e,t,n,r){Xu(e.x,t.x,n.x,r),Xu(e.y,t.y,n.y,r)}function Q_(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const J_={duration:.45,ease:[.4,0,.1,1]},Yu=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Zu=Yu("applewebkit/")&&!Yu("chrome/")?Math.round:Ie;function Qu(e){e.min=Zu(e.min),e.max=Zu(e.max)}function ej(e){Qu(e.x),Qu(e.y)}function ex(e,t,n){return e==="position"||e==="preserve-aspect"&&!R_(Bu(t),Bu(n),.2)}function tj(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const nj=Jg({attachResizeListener:(e,t)=>Vn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vi={current:void 0},tx=Jg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vi.current){const e=new nj({});e.mount(window),e.setOptions({layoutScroll:!0}),Vi.current=e}return Vi.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),dc=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ju(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function rj(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Ju(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Ju(e[o],null)}}}}function oj(...e){return v.useCallback(rj(...e),e)}class ij extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=Sg(r)&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function sj({children:e,isPresent:t,anchorX:n,root:r}){var a;const o=S.useId(),s=S.useRef(null),c=S.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=S.useContext(dc),u=((a=e.props)==null?void 0:a.ref)??(e==null?void 0:e.ref),i=oj(s,u);return S.useInsertionEffect(()=>{const{width:f,height:d,top:p,left:g,right:m}=c.current;if(t||!s.current||!f||!d)return;const x=n==="left"?`left: ${g}`:`right: ${m}`;s.current.dataset.motionPopId=o;const y=document.createElement("style");l&&(y.nonce=l);const E=r??document.head;return E.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
97
67
|
[data-motion-pop-id="${o}"] {
|
|
98
68
|
position: absolute !important;
|
|
99
69
|
width: ${f}px !important;
|
|
100
70
|
height: ${d}px !important;
|
|
101
|
-
${
|
|
102
|
-
top: ${
|
|
71
|
+
${x}px !important;
|
|
72
|
+
top: ${p}px !important;
|
|
103
73
|
}
|
|
104
|
-
`),()=>{b.contains(x)&&b.removeChild(x)}},[t]),g.jsx(qT,{isPresent:t,childRef:i,sizeRef:c,children:y.cloneElement(e,{ref:s})})}const YT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:c,anchorX:u,root:l})=>{const s=uc(XT),a=_.useId();let f=!0,d=_.useMemo(()=>(f=!1,{id:a,initial:t,isPresent:n,custom:o,onExitComplete:h=>{s.set(h,!0);for(const m of s.values())if(!m)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),[n,s,r]);return i&&f&&(d={...d}),_.useMemo(()=>{s.forEach((h,m)=>s.set(m,!1))},[n]),y.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),c==="popLayout"&&(e=g.jsx(KT,{isPresent:n,anchorX:u,root:l,children:e})),g.jsx(ji.Provider,{value:d,children:e})};function XT(){return new Map}function Dv(e=!0){const t=_.useContext(ji);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=_.useId();_.useEffect(()=>{if(e)return o(i)},[e]);const c=_.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,c]:[!0]}const Ur=e=>e.key||"";function Mu(e){const t=[];return _.Children.forEach(e,n=>{_.isValidElement(n)&&t.push(n)}),t}const Wt=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:c=!1,anchorX:u="left",root:l})=>{const[s,a]=Dv(c),f=_.useMemo(()=>Mu(e),[e]),d=c&&!s?[]:f.map(Ur),h=_.useRef(!0),m=_.useRef(f),p=uc(()=>new Map),v=_.useRef(new Set),[x,b]=_.useState(f),[w,S]=_.useState(f);dg(()=>{h.current=!1,m.current=f;for(let R=0;R<w.length;R++){const T=Ur(w[R]);d.includes(T)?(p.delete(T),v.current.delete(T)):p.get(T)!==!0&&p.set(T,!1)}},[w,d.length,d.join("-")]);const E=[];if(f!==x){let R=[...f];for(let T=0;T<w.length;T++){const I=w[T],P=Ur(I);d.includes(P)||(R.splice(T,0,I),E.push(I))}return i==="wait"&&E.length&&(R=E),S(Mu(R)),b(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:A}=_.useContext(lc);return g.jsx(g.Fragment,{children:w.map(R=>{const T=Ur(R),I=c&&!s?!1:f===w||d.includes(T),P=()=>{if(v.current.has(T))return;if(v.current.add(T),p.has(T))p.set(T,!0);else return;let M=!0;p.forEach(j=>{j||(M=!1)}),M&&(A==null||A(),S(m.current),c&&(a==null||a()),r&&r())};return g.jsx(YT,{isPresent:I,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:l,onExitComplete:I?void 0:P,anchorX:u,children:R},T)})})},kv=_.createContext({strict:!1}),Iu={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Nu=!1;function ZT(){if(Nu)return;const e={};for(const t in Iu)e[t]={isEnabled:n=>Iu[t].some(r=>!!n[r])};fv(e),Nu=!0}function Lv(){return ZT(),LR()}function QT(e){const t=Lv();for(const n in e)t[n]={...t[n],...e[n]};fv(t)}const JT=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ni(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||JT.has(e)}let Fv=e=>!ni(e);function eP(e){typeof e=="function"&&(Fv=t=>t.startsWith("on")?!ni(t):e(t))}try{eP(require("@emotion/is-prop-valid").default)}catch{}function tP(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Fv(o)||n===!0&&ni(o)||!t&&!ni(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Li=_.createContext({});function nP(e,t){if(ki(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ir(n)?n:void 0,animate:ir(r)?r:void 0}}return e.inherit!==!1?t:{}}function rP(e){const{initial:t,animate:n}=nP(e,_.useContext(Li));return _.useMemo(()=>({initial:t,animate:n}),[ju(t),ju(n)])}function ju(e){return Array.isArray(e)?e.join(" "):e}const Vc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Vv(e,t,n){for(const r in t)!Pe(t[r])&&!yv(r,n)&&(e[r]=t[r])}function oP({transformTemplate:e},t){return _.useMemo(()=>{const n=Vc();return kc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function iP(e,t){const n=e.style||{},r={};return Vv(r,n,e),Object.assign(r,oP(e,t)),r}function sP(e,t){const n={},r=iP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Bv=()=>({...Vc(),attrs:{}});function aP(e,t,n,r){const o=_.useMemo(()=>{const i=Bv();return xv(i,t,wv(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Vv(i,e.style,e),o.style={...i,...o.style}}return o}const cP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Bc(e){return typeof e!="string"||e.includes("-")?!1:!!(cP.indexOf(e)>-1||/[A-Z]/u.test(e))}function lP(e,t,n,{latestValues:r},o,i=!1,c){const l=(c??Bc(e)?aP:sP)(t,r,o,e),s=tP(t,typeof e=="string",i),a=e!==_.Fragment?{...s,...l,ref:n}:{},{children:f}=t,d=_.useMemo(()=>Pe(f)?f.get():f,[f]);return _.createElement(e,{...a,children:d})}function uP({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:fP(n,r,o,e),renderState:t()}}function fP(e,t,n,r){const o={},i=r(e,{});for(const d in i)o[d]=Lo(i[d]);let{initial:c,animate:u}=e;const l=ki(e),s=uv(e);t&&s&&!l&&e.inherit!==!1&&(c===void 0&&(c=t.initial),u===void 0&&(u=t.animate));let a=n?n.initial===!1:!1;a=a||c===!1;const f=a?u:c;if(f&&typeof f!="boolean"&&!Di(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const m=Ac(e,d[h]);if(m){const{transitionEnd:p,transition:v,...x}=m;for(const b in x){let w=x[b];if(Array.isArray(w)){const S=a?w.length-1:0;w=w[S]}w!==null&&(o[b]=w)}for(const b in p)o[b]=p[b]}}}return o}const $v=e=>(t,n)=>{const r=_.useContext(Li),o=_.useContext(ji),i=()=>uP(e,t,r,o);return n?i():uc(i)},dP=$v({scrapeMotionValuesFromProps:Lc,createRenderState:Vc}),hP=$v({scrapeMotionValuesFromProps:Ev,createRenderState:Bv}),pP=Symbol.for("motionComponentSymbol");function mP(e,t,n){const r=_.useRef(n);_.useInsertionEffect(()=>{r.current=n});const o=_.useRef(null);return _.useCallback(i=>{var u;i&&((u=e.onMount)==null||u.call(e,i)),t&&(i?t.mount(i):t.unmount());const c=r.current;if(typeof c=="function")if(i){const l=c(i);typeof l=="function"&&(o.current=l)}else o.current?(o.current(),o.current=null):c(i);else c&&(c.current=i)},[t])}const Uv=_.createContext({});function zn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gP(e,t,n,r,o,i){var v,x;const{visualElement:c}=_.useContext(Li),u=_.useContext(kv),l=_.useContext(ji),s=_.useContext(Fc).reducedMotion,a=_.useRef(null);r=r||u.renderer,!a.current&&r&&(a.current=r(e,{visualState:t,parent:c,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:s,isSVG:i}));const f=a.current,d=_.useContext(Uv);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&vP(a.current,n,o,d);const h=_.useRef(!1);_.useInsertionEffect(()=>{f&&h.current&&f.update(n,l)});const m=n[Yg],p=_.useRef(!!m&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,m))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,m)));return dg(()=>{f&&(h.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),p.current&&f.animationState&&f.animationState.animateChanges())}),_.useEffect(()=>{f&&(!p.current&&f.animationState&&f.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,m)}),p.current=!1),f.enteringChildren=void 0)}),f}function vP(e,t,n,r){const{layoutId:o,layout:i,drag:c,dragConstraints:u,layoutScroll:l,layoutRoot:s,layoutCrossfade:a}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Gv(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!c||u&&zn(u),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:a,layoutScroll:l,layoutRoot:s})}function Gv(e){if(e)return e.options.allowProjection!==!1?e.projection:Gv(e.parent)}function ds(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&QT(r);const i=n?n==="svg":Bc(e),c=i?hP:dP;function u(s,a){let f;const d={..._.useContext(Fc),...s,layoutId:yP(s)},{isStatic:h}=d,m=rP(s),p=c(s,h);if(!h&&fg){xP(d,r);const v=bP(d);f=v.MeasureLayout,m.visualElement=gP(e,p,d,o,v.ProjectionNode,i)}return g.jsxs(Li.Provider,{value:m,children:[f&&m.visualElement?g.jsx(f,{visualElement:m.visualElement,...d}):null,lP(e,s,mP(p,m.visualElement,a),p,h,t,i)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=_.forwardRef(u);return l[pP]=e,l}function yP({layoutId:e}){const t=_.useContext(lc).id;return t&&e!==void 0?t+"-"+e:e}function xP(e,t){const n=_.useContext(kv).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?_n(!1,r,"lazy-strict-mode"):mt(!1,r,"lazy-strict-mode")}}function bP(e){const t=Lv(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function wP(e,t){if(typeof Proxy>"u")return ds;const n=new Map,r=(i,c)=>ds(i,c,e,t),o=(i,c)=>(process.env.NODE_ENV!=="production"&&mc(!1,"motion() is deprecated. Use motion.create() instead."),r(i,c));return new Proxy(o,{get:(i,c)=>c==="create"?r:(n.has(c)||n.set(c,ds(c,void 0,e,t)),n.get(c))})}const EP=(e,t)=>t.isSVG??Bc(e)?new eT(t):new KR(t,{allowProjection:e!==_.Fragment});class SP extends Mt{constructor(t){super(t),t.animationState||(t.animationState=iT(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Di(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let CP=0;class _P extends Mt{constructor(){super(...arguments),this.id=CP++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const RP={animation:{Feature:SP},exit:{Feature:_P}};function _r(e){return{point:{x:e.pageX,y:e.pageY}}}const TP=e=>t=>Nc(t)&&e(t,_r(t));function Kn(e,t,n,r){return sr(e,t,TP(n),r)}const Hv=({current:e})=>e?e.ownerDocument.defaultView:null,Du=(e,t)=>Math.abs(e-t);function PP(e,t){const n=Du(e.x,t.x),r=Du(e.y,t.y);return Math.sqrt(n**2+r**2)}const ku=new Set(["auto","scroll"]);class zv{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:c=3,element:u}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=ps(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=PP(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:v}=h,{timestamp:x}=_e;this.history.push({...v,timestamp:x});const{onStart:b,onMove:w}=this.handlers;m||(b&&b(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,m)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=hs(m,this.transformPagePoint),pe.update(this.updatePoint,!0)},this.handlePointerUp=(h,m)=>{this.end();const{onEnd:p,onSessionEnd:v,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=ps(h.type==="pointercancel"?this.lastMoveEventInfo:hs(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(h,b),v&&v(h,b)},!Nc(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=c,this.contextWindow=o||window;const l=_r(t),s=hs(l,this.transformPagePoint),{point:a}=s,{timestamp:f}=_e;this.history=[{...a,timestamp:f}];const{onSessionStart:d}=n;d&&d(t,ps(s,this.history)),this.removeListeners=Er(Kn(this.contextWindow,"pointermove",this.handlePointerMove),Kn(this.contextWindow,"pointerup",this.handlePointerUp),Kn(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(ku.has(r.overflowX)||ku.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),pe.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Rt(this.updatePoint)}}function hs(e,t){return t?{point:t(e.point)}:e}function Lu(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ps({point:e},t){return{point:e,delta:Lu(e,Wv(t)),offset:Lu(e,AP(t)),velocity:OP(t,.1)}}function AP(e){return e[0]}function Wv(e){return e[e.length-1]}function OP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Wv(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>it(t)));)n--;if(!r)return{x:0,y:0};const i=Ge(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const c={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function MP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ve(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ve(n,e,r.max):Math.min(e,n)),e}function Fu(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function IP(e,{top:t,left:n,bottom:r,right:o}){return{x:Fu(e.x,n,o),y:Fu(e.y,t,r)}}function Vu(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function NP(e,t){return{x:Vu(e.x,t.x),y:Vu(e.y,t.y)}}function jP(e,t){let n=.5;const r=Ie(e),o=Ie(t);return o>r?n=nr(t.min,t.max-r,e.min):r>o&&(n=nr(e.min,e.max-o,t.min)),ct(0,1,n)}function DP(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const pa=.35;function kP(e=pa){return e===!1?e=0:e===!0&&(e=pa),{x:Bu(e,"left","right"),y:Bu(e,"top","bottom")}}function Bu(e,t,n){return{min:$u(e,t),max:$u(e,n)}}function $u(e,t){return typeof e=="number"?e:e[t]||0}const LP=new WeakMap;class FP{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ce(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=f=>{n?(this.stopAnimation(),this.snapToCursor(_r(f).point)):this.pauseAnimation()},c=(f,d)=>{this.stopAnimation();const{drag:h,dragPropagation:m,onDragStart:p}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=_R(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ue(x=>{let b=this.getAxisMotionValue(x).get()||0;if(st.test(b)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[x];S&&(b=Ie(S)*(parseFloat(b)/100))}}this.originPoint[x]=b}),p&&pe.postRender(()=>p(f,d)),aa(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},u=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:p,onDrag:v}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:x}=d;if(m&&this.currentDirection===null){this.currentDirection=VP(x),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),v&&v(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},s=()=>Ue(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)==null?void 0:d.play())}),{dragSnapToOrigin:a}=this.getProps();this.panSession=new zv(t,{onSessionStart:i,onStart:c,onMove:u,onSessionEnd:l,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:r,contextWindow:Hv(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:u}=this.getProps();u&&pe.postRender(()=>u(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Gr(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let c=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(c=MP(c,this.constraints[t],this.elastic[t])),i.set(c)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,o=this.constraints;t&&zn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=IP(r.layoutBox,t):this.constraints=!1,this.elastic=kP(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ue(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=DP(r.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!zn(t))return!1;const r=t.current;mt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=UR(r,o.root,this.visualElement.getTransformPagePoint());let c=NP(o.layout.layoutBox,i);if(n){const u=n(VR(c));this.hasMutatedConstraints=!!u,u&&(c=hv(u))}return c}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:c,onDragTransitionEnd:u}=this.getProps(),l=this.constraints||{},s=Ue(a=>{if(!Gr(a,n,this.currentDirection))return;let f=l&&l[a]||{};c&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,m={type:"inertia",velocity:r?t[a]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(a,m)});return Promise.all(s).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return aa(this.visualElement,t),r.start(Pc(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ue(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ue(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ue(n=>{const{drag:r}=this.getProps();if(!Gr(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:c,max:u}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-ve(c,u,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!zn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ue(c=>{const u=this.getAxisMotionValue(c);if(u&&this.constraints!==!1){const l=u.get();o[c]=jP({min:l,max:l},this.constraints[c])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ue(c=>{if(!Gr(c,t,null))return;const u=this.getAxisMotionValue(c),{min:l,max:s}=this.constraints[c];u.set(ve(l,s,o[c]))})}addListeners(){if(!this.visualElement.current)return;LP.set(this.visualElement,this);const t=this.visualElement.current,n=Kn(t,"pointerdown",l=>{const{drag:s,dragListener:a=!0}=this.getProps();s&&a&&!av(l.target)&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();zn(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),pe.read(r);const c=sr(window,"resize",()=>this.scalePositionWithinConstraints()),u=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:s})=>{this.isDragging&&s&&(Ue(a=>{const f=this.getAxisMotionValue(a);f&&(this.originPoint[a]+=l[a].translate,f.set(f.get()+l[a].translate))}),this.visualElement.render())}));return()=>{c(),n(),i(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:c=pa,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:c,dragMomentum:u}}}function Gr(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function VP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class BP extends Mt{constructor(t){super(t),this.removeGroupControls=ze,this.removeListeners=ze,this.controls=new FP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ze}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const Uu=e=>(t,n)=>{e&&pe.postRender(()=>e(t,n))};class $P extends Mt{constructor(){super(...arguments),this.removePointerDownListener=ze}onPointerDown(t){this.session=new zv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Hv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Uu(t),onStart:Uu(n),onMove:r,onEnd:(i,c)=>{delete this.session,o&&pe.postRender(()=>o(i,c))}}}mount(){this.removePointerDownListener=Kn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let ms=!1;class UP extends _.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),ms&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Fo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:c}=r;return c&&(c.isPresent=i,ms=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?c.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?c.promote():c.relegate()||pe.postRender(()=>{const u=c.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ic.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;ms=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function qv(e){const[t,n]=Dv(),r=_.useContext(lc);return g.jsx(UP,{...e,layoutGroup:r,switchLayoutGroup:_.useContext(Uv),isPresent:t,safeToRemove:n})}const GP={pan:{Feature:$P},drag:{Feature:BP,ProjectionNode:jv,MeasureLayout:qv}};function Gu(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&pe.postRender(()=>i(t,_r(t)))}class HP extends Mt{mount(){const{current:t}=this.node;t&&(this.unmount=RR(t,(n,r)=>(Gu(this.node,r,"Start"),o=>Gu(this.node,o,"End"))))}unmount(){}}class zP extends Mt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Er(sr(this.node.current,"focus",()=>this.onFocus()),sr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Hu(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&pe.postRender(()=>i(t,_r(t)))}class WP extends Mt{mount(){const{current:t}=this.node;t&&(this.unmount=AR(t,(n,r)=>(Hu(this.node,r,"Start"),(o,{success:i})=>Hu(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ma=new WeakMap,gs=new WeakMap,qP=e=>{const t=ma.get(e.target);t&&t(e)},KP=e=>{e.forEach(qP)};function YP({root:e,...t}){const n=e||document;gs.has(n)||gs.set(n,{});const r=gs.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(KP,{root:e,...t})),r[o]}function XP(e,t,n){const r=YP(t);return ma.set(e,n),r.observe(e),()=>{ma.delete(e),r.unobserve(e)}}const ZP={some:0,all:1};class QP extends Mt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,c={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:ZP[o]},u=l=>{const{isIntersecting:s}=l;if(this.isInView===s||(this.isInView=s,i&&!s&&this.hasEnteredView))return;s&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",s);const{onViewportEnter:a,onViewportLeave:f}=this.node.getProps(),d=s?a:f;d&&d(l)};return XP(this.node.current,c,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(JP(t,n))&&this.startObserver()}unmount(){}}function JP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const eA={inView:{Feature:QP},tap:{Feature:WP},focus:{Feature:zP},hover:{Feature:HP}},tA={layout:{ProjectionNode:jv,MeasureLayout:qv}},nA={...RP,...eA,...GP,...tA},le=wP(nA,EP),rA=_.forwardRef(({children:e,className:t,dividerClassName:n,showDivider:r=!0,...o},i)=>g.jsx(m0,{...o,className:N.classNames("overflow-hidden bg-white",t),ref:i,asChild:!0,children:g.jsxs(le.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.04,.62,.23,.98]},children:[r&&g.jsx("hr",{className:N.classNames("bg-primary-blue h-0.5 border-0",n)}),g.jsx("div",{className:"px-5 py-[15px]",children:e})]})})),oA=({items:e,classNames:t,showDivider:n,defaultValue:r})=>g.jsx(f0,{className:N.classNames("flex flex-col space-y-4",t==null?void 0:t.container),type:"single",defaultValue:r,collapsible:!0,children:e==null?void 0:e.map(o=>g.jsxs(bC,{className:t==null?void 0:t.item,value:o.id,children:[g.jsx(wC,{className:t==null?void 0:t.trigger,triggerIcon:o==null?void 0:o.triggerIcon,children:o.title}),g.jsx(rA,{showDivider:n,dividerClassName:t==null?void 0:t.divider,className:t==null?void 0:t.content,children:o.content})]},o.id))}),iA={success:g.jsx(ce.SvgIconCheckCircle,{width:24,height:24}),info:g.jsx(ce.SvgIconInfoCircle,{width:24,height:24}),warning:g.jsx(ce.SvgIconWarningCircle,{width:24,height:24}),error:g.jsx(ce.SvgIconErrorCircle,{width:24,height:24})},sA={success:"text-green-6",info:"text-blue-6",warning:"text-gold-6",error:"text-red-6"},aA={success:"text-gray-6 hover:bg-gray-100 cursor-pointer",error:"text-gray-6 hover:bg-gray-100 cursor-pointer",warning:"text-gray-6 hover:bg-gray-100 cursor-pointer",info:"text-gray-6 hover:bg-gray-100 cursor-pointer"},cA={success:"bg-green-1 border border-green-3",info:"bg-blue-1 border border-blue-3",warning:"bg-gold-1 border border-gold-3",error:"bg-red-1 border border-red-3"},lA=({type:e="info",title:t,description:n,showIcon:r=!0,closable:o=!1,onClose:i,className:c="",children:u,...l})=>{const s=!!t&&!n&&!u||!t&&!!n&&!u;return g.jsxs(le.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:N.classNames("relative border rounded-lg p-4",cA[e],{[c]:c}),...l,children:[g.jsxs(We,{gap:4,align:s?"center":"start",children:[r&&g.jsx("div",{className:N.classNames("shrink-0",sA[e]),children:iA[e]}),g.jsxs(We,{direction:s?"horizontal":"vertical",gap:0,className:"flex-1 min-w-0",align:s?"center":"start",children:[t&&g.jsx("h4",{className:"text-base font-medium leading-tight text-gray-12",children:t}),n&&g.jsx("p",{className:N.classNames("text-sm font-medium leading-tight text-gray-12",{"mt-2":!!t&&!s}),children:n}),u&&g.jsx("div",{className:"mt-2",children:u})]})]}),o&&g.jsx("button",{onClick:i,className:N.classNames("absolute top-4 right-4 p-1 rounded transition-colors",aA[e]),"aria-label":"Cerrar alerta",children:g.jsx(ce.SvgClose,{width:16,height:16})})]})},uA={sm:"size-8 text-[1.3rem]",md:"size-10 text-[1.4rem]",lg:"size-12 text-[2.1rem]",xl:"size-14 text-[2.5rem]"},fA=({size:e="md",src:t,alt:n="avatar",icon:r=g.jsx(ce.SvgUser,{}),bgClassName:o="bg-[#A1ADC0]",colorClassName:i="text-white",className:c="",onClick:u,style:l})=>g.jsxs(Gx,{className:N.classNames("inline-flex shrink-0 overflow-hidden rounded-full",uA[e],c),onClick:u,style:l,children:[t&&g.jsx(Hx,{src:t,alt:n,className:"h-full w-full object-cover"}),g.jsx(zx,{delayMs:0,className:N.classNames("flex h-full w-full items-center justify-center rounded-full",i,o),children:r})]}),dA={default:N.classNames("bg-primary-blue border-primary-blue text-white","hover:bg-darks-blue-Macropay-30 hover:border-darks-blue-Macropay-30"),primary:N.classNames("bg-primary-yellow border-primary-yellow text-primary-blue","hover:bg-shades-yellow-10 hover:border-shades-yellow-10"),secondary:N.classNames("bg-white text-primary-blue border-primary-blue","hover:border-darks-blue-Macropay-30 hover:text-darks-blue-Macropay-30"),text:N.classNames("bg-transparent text-primary-blue border-transparent shadow-none","hover:text-darks-blue-Macropay-30","disabled:bg-transparent disabled:border-transparent"),danger:N.classNames("bg-primary-red border-primary-red text-white","hover:bg-shades-red-10 hover:border-shades-red-10"),withoutColor:"bg-transparent border-transparent shadow-none"},hA={sm:"px-3 text-sm h-6 rounded-md",md:"px-4 py-2 h-8",lg:"px-6 py-[7px] text-base h-10 rounded-lg",xl:"px-6 py-[11px] h-12"},zu=["sm","md","lg","xl"],pA=e=>{const t=zu.indexOf(e);return t===-1?"":N.classNames(zu.slice(0,t+1).map(n=>hA[n]))},mA={pointer:"cursor-pointer",default:"cursor-default","not-allowed":"cursor-not-allowed",wait:"cursor-wait",text:"cursor-text"},gA=e=>N.classNames("flex items-center justify-center gap-2 border active:scale-95",mA[e],"disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5 disabled:cursor-not-allowed","transition-all duration-300 ease-in-out","shadow-button"),ga=({icon:e,children:t,leftIcon:n,rightIcon:r,type:o="button",variant:i="default",size:c="md",className:u="",isLoading:l=!1,positionLoading:s="left",cursor:a="pointer",...f})=>{const d=_.useId(),h=gA(a),{isLeftLoading:m,isRightLoading:p}=_.useMemo(()=>({isLeftLoading:s==="left"&&l,isRightLoading:s==="right"&&l}),[l,s]),v=_.useMemo(()=>["primary","secondary","text","withoutColor"].includes(i)?g.jsx(ce.SvgLoaderAnimBlue,{className:"animate-spin"}):g.jsx(ce.SvgLoaderAnimWhite,{className:"animate-spin"}),[i]),x=_.useMemo(()=>e??n,[e,n]);return g.jsxs(le.button,{id:`${d}-button`,className:N.classNames(h,dA[i],pA(c),u),type:o,...f,children:[g.jsx(Wt,{mode:"wait",children:(m||x)&&g.jsx(le.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.2},children:m?v:x},"leftIcon")}),typeof t=="string"||typeof t=="number"?g.jsx("span",{className:"whitespace-normal",children:t}):t,g.jsx(Wt,{mode:"wait",children:(p||r)&&g.jsx(le.div,{initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:8},transition:{duration:.2},children:p?v:r},"rightIcon")})]})},vA=({children:e,className:t="",align:n="horizontal",shadow:r=!0,rounded:o=!0,bordered:i=!0,...c})=>{const{...u}=c,l=N.classNames("bg-white p-4",{"flex flex-col":n==="horizontal","flex flex-col md:flex-row md:max-w-xl":n==="vertical"},{"shadow-lg":r},{"rounded-2xl":o},{"border border-gray-200":i},{[t]:t});return g.jsx(le.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:l,...u,children:e})};var vs={exports:{}};/*!
|
|
74
|
+
`),()=>{E.contains(y)&&E.removeChild(y)}},[t]),h.jsxRuntimeExports.jsx(ij,{isPresent:t,childRef:s,sizeRef:c,children:v.cloneElement(e,{ref:i})})}const aj=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:c,anchorX:l,root:u})=>{const i=Fa(cj),a=S.useId();let f=!0,d=S.useMemo(()=>(f=!1,{id:a,initial:t,isPresent:n,custom:o,onExitComplete:p=>{i.set(p,!0);for(const g of i.values())if(!g)return;r&&r()},register:p=>(i.set(p,!1),()=>i.delete(p))}),[n,i,r]);return s&&f&&(d={...d}),S.useMemo(()=>{i.forEach((p,g)=>i.set(g,!1))},[n]),v.useEffect(()=>{!n&&!i.size&&r&&r()},[n]),c==="popLayout"&&(e=h.jsxRuntimeExports.jsx(sj,{isPresent:n,anchorX:l,root:u,children:e})),h.jsxRuntimeExports.jsx(ci.Provider,{value:d,children:e})};function cj(){return new Map}function nx(e=!0){const t=S.useContext(ci);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=S.useId();S.useEffect(()=>{if(e)return o(s)},[e]);const c=S.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,c]:[!0]}const vr=e=>e.key||"";function el(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const jt=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:c=!1,anchorX:l="left",root:u})=>{const[i,a]=nx(c),f=S.useMemo(()=>el(e),[e]),d=c&&!i?[]:f.map(vr),p=S.useRef(!0),g=S.useRef(f),m=Fa(()=>new Map),x=S.useRef(new Set),[y,E]=S.useState(f),[b,R]=S.useState(f);Im(()=>{p.current=!1,g.current=f;for(let C=0;C<b.length;C++){const _=vr(b[C]);d.includes(_)?(m.delete(_),x.current.delete(_)):m.get(_)!==!0&&m.set(_,!1)}},[b,d.length,d.join("-")]);const w=[];if(f!==y){let C=[...f];for(let _=0;_<b.length;_++){const M=b[_],j=vr(M);d.includes(j)||(C.splice(_,0,M),w.push(M))}return s==="wait"&&w.length&&(C=w),R(el(C)),E(f),null}process.env.NODE_ENV!=="production"&&s==="wait"&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:P}=S.useContext(La);return h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:b.map(C=>{const _=vr(C),M=c&&!i?!1:f===b||d.includes(_),j=()=>{if(x.current.has(_))return;if(x.current.add(_),m.has(_))m.set(_,!0);else return;let A=!0;m.forEach(I=>{I||(A=!1)}),A&&(P==null||P(),R(g.current),c&&(a==null||a()),r&&r())};return h.jsxRuntimeExports.jsx(aj,{isPresent:M,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:u,onExitComplete:M?void 0:j,anchorX:l,children:C},_)})})},rx=S.createContext({strict:!1}),tl={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let nl=!1;function uj(){if(nl)return;const e={};for(const t in tl)e[t]={isEnabled:n=>tl[t].some(r=>!!n[r])};Mg(e),nl=!0}function ox(){return uj(),XC()}function lj(e){const t=ox();for(const n in e)t[n]={...t[n],...e[n]};Mg(t)}const fj=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Mo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fj.has(e)}let ix=e=>!Mo(e);function dj(e){typeof e=="function"&&(ix=t=>t.startsWith("on")?!Mo(t):e(t))}try{dj(require("@emotion/is-prop-valid").default)}catch{}function hj(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(ix(o)||n===!0&&Mo(o)||!t&&!Mo(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const fi=S.createContext({});function pj(e,t){if(li(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fn(n)?n:void 0,animate:Fn(r)?r:void 0}}return e.inherit!==!1?t:{}}function mj(e){const{initial:t,animate:n}=pj(e,S.useContext(fi));return S.useMemo(()=>({initial:t,animate:n}),[rl(t),rl(n)])}function rl(e){return Array.isArray(e)?e.join(" "):e}const hc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sx(e,t,n){for(const r in t)!xe(t[r])&&!Vg(r,n)&&(e[r]=t[r])}function gj({transformTemplate:e},t){return S.useMemo(()=>{const n=hc();return lc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xj(e,t){const n=e.style||{},r={};return sx(r,n,e),Object.assign(r,gj(e,t)),r}function vj(e,t){const n={},r=xj(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const ax=()=>({...hc(),attrs:{}});function yj(e,t,n,r){const o=S.useMemo(()=>{const s=ax();return Bg(s,t,Ug(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};sx(s,e.style,e),o.style={...s,...o.style}}return o}const Ej=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function pc(e){return typeof e!="string"||e.includes("-")?!1:!!(Ej.indexOf(e)>-1||/[A-Z]/u.test(e))}function bj(e,t,n,{latestValues:r},o,s=!1,c){const u=(c??pc(e)?yj:vj)(t,r,o,e),i=hj(t,typeof e=="string",s),a=e!==S.Fragment?{...i,...u,ref:n}:{},{children:f}=t,d=S.useMemo(()=>xe(f)?f.get():f,[f]);return S.createElement(e,{...a,children:d})}function wj({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:Rj(n,r,o,e),renderState:t()}}function Rj(e,t,n,r){const o={},s=r(e,{});for(const d in s)o[d]=ho(s[d]);let{initial:c,animate:l}=e;const u=li(e),i=Og(e);t&&i&&!u&&e.inherit!==!1&&(c===void 0&&(c=t.initial),l===void 0&&(l=t.animate));let a=n?n.initial===!1:!1;a=a||c===!1;const f=a?l:c;if(f&&typeof f!="boolean"&&!ui(f)){const d=Array.isArray(f)?f:[f];for(let p=0;p<d.length;p++){const g=rc(e,d[p]);if(g){const{transitionEnd:m,transition:x,...y}=g;for(const E in y){let b=y[E];if(Array.isArray(b)){const R=a?b.length-1:0;b=b[R]}b!==null&&(o[E]=b)}for(const E in m)o[E]=m[E]}}}return o}const cx=e=>(t,n)=>{const r=S.useContext(fi),o=S.useContext(ci),s=()=>wj(e,t,r,o);return n?s():Fa(s)},Sj=cx({scrapeMotionValuesFromProps:fc,createRenderState:hc}),Cj=cx({scrapeMotionValuesFromProps:Gg,createRenderState:ax}),_j=Symbol.for("motionComponentSymbol");function jj(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(s=>{var l;s&&((l=e.onMount)==null||l.call(e,s)),t&&(s?t.mount(s):t.unmount());const c=r.current;if(typeof c=="function")if(s){const u=c(s);typeof u=="function"&&(o.current=u)}else o.current?(o.current(),o.current=null):c(s);else c&&(c.current=s)},[t])}const ux=S.createContext({});function Sn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Pj(e,t,n,r,o,s){var x,y;const{visualElement:c}=S.useContext(fi),l=S.useContext(rx),u=S.useContext(ci),i=S.useContext(dc).reducedMotion,a=S.useRef(null);r=r||l.renderer,!a.current&&r&&(a.current=r(e,{visualState:t,parent:c,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:i,isSVG:s}));const f=a.current,d=S.useContext(ux);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&Tj(a.current,n,o,d);const p=S.useRef(!1);S.useInsertionEffect(()=>{f&&p.current&&f.update(n,u)});const g=n[gg],m=S.useRef(!!g&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,g))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,g)));return Im(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),m.current&&f.animationState&&f.animationState.animateChanges())}),S.useEffect(()=>{f&&(!m.current&&f.animationState&&f.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)==null||E.call(window,g)}),m.current=!1),f.enteringChildren=void 0)}),f}function Tj(e,t,n,r){const{layoutId:o,layout:s,drag:c,dragConstraints:l,layoutScroll:u,layoutRoot:i,layoutCrossfade:a}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:lx(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!c||l&&Sn(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:a,layoutScroll:u,layoutRoot:i})}function lx(e){if(e)return e.options.allowProjection!==!1?e.projection:lx(e.parent)}function Bi(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&lj(r);const s=n?n==="svg":pc(e),c=s?Cj:Sj;function l(i,a){let f;const d={...S.useContext(dc),...i,layoutId:Aj(i)},{isStatic:p}=d,g=mj(i),m=c(i,p);if(!p&&Mm){Oj(d,r);const x=Mj(d);f=x.MeasureLayout,g.visualElement=Pj(e,m,d,o,x.ProjectionNode,s)}return h.jsxRuntimeExports.jsxs(fi.Provider,{value:g,children:[f&&g.visualElement?h.jsxRuntimeExports.jsx(f,{visualElement:g.visualElement,...d}):null,bj(e,i,jj(m,g.visualElement,a),m,p,t,s)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=S.forwardRef(l);return u[_j]=e,u}function Aj({layoutId:e}){const t=S.useContext(La).id;return t&&e!==void 0?t+"-"+e:e}function Oj(e,t){const n=S.useContext(rx).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?on(!1,r,"lazy-strict-mode"):tt(!1,r,"lazy-strict-mode")}}function Mj(e){const t=ox(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function Ij(e,t){if(typeof Proxy>"u")return Bi;const n=new Map,r=(s,c)=>Bi(s,c,e,t),o=(s,c)=>(process.env.NODE_ENV!=="production"&&Ga(!1,"motion() is deprecated. Use motion.create() instead."),r(s,c));return new Proxy(o,{get:(s,c)=>c==="create"?r:(n.has(c)||n.set(c,Bi(c,void 0,e,t)),n.get(c))})}const Dj=(e,t)=>t.isSVG??pc(e)?new d_(t):new s_(t,{allowProjection:e!==S.Fragment});class Nj extends mt{constructor(t){super(t),t.animationState||(t.animationState=x_(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ui(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let kj=0;class Lj extends mt{constructor(){super(...arguments),this.id=kj++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Fj={animation:{Feature:Nj},exit:{Feature:Lj}};function rr(e){return{point:{x:e.pageX,y:e.pageY}}}const Vj=e=>t=>ac(t)&&e(t,rr(t));function jn(e,t,n,r){return Vn(e,t,Vj(n),r)}const fx=({current:e})=>e?e.ownerDocument.defaultView:null,ol=(e,t)=>Math.abs(e-t);function Bj(e,t){const n=ol(e.x,t.x),r=ol(e.y,t.y);return Math.sqrt(n**2+r**2)}const il=new Set(["auto","scroll"]);class dx{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:c=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Ui(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,m=Bj(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!m)return;const{point:x}=p,{timestamp:y}=me;this.history.push({...x,timestamp:y});const{onStart:E,onMove:b}=this.handlers;g||(E&&E(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=$i(g,this.transformPagePoint),se.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:m,onSessionEnd:x,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=Ui(p.type==="pointercancel"?this.lastMoveEventInfo:$i(g,this.transformPagePoint),this.history);this.startEvent&&m&&m(p,E),x&&x(p,E)},!ac(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=c,this.contextWindow=o||window;const u=rr(t),i=$i(u,this.transformPagePoint),{point:a}=i,{timestamp:f}=me;this.history=[{...a,timestamp:f}];const{onSessionStart:d}=n;d&&d(t,Ui(i,this.history)),this.removeListeners=er(jn(this.contextWindow,"pointermove",this.handlePointerMove),jn(this.contextWindow,"pointerup",this.handlePointerUp),jn(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(il.has(r.overflowX)||il.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),se.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),lt(this.updatePoint)}}function $i(e,t){return t?{point:t(e.point)}:e}function sl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ui({point:e},t){return{point:e,delta:sl(e,hx(t)),offset:sl(e,$j(t)),velocity:Uj(t,.1)}}function $j(e){return e[0]}function hx(e){return e[e.length-1]}function Uj(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=hx(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>qe(t)));)n--;if(!r)return{x:0,y:0};const s=Oe(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const c={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function Gj(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ue(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ue(n,e,r.max):Math.min(e,n)),e}function al(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Hj(e,{top:t,left:n,bottom:r,right:o}){return{x:al(e.x,n,o),y:al(e.y,t,r)}}function cl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function zj(e,t){return{x:cl(e.x,t.x),y:cl(e.y,t.y)}}function Wj(e,t){let n=.5;const r=be(e),o=be(t);return o>r?n=Nn(t.min,t.max-r,e.min):r>o&&(n=Nn(e.min,e.max-o,t.min)),Ye(0,1,n)}function qj(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Us=.35;function Kj(e=Us){return e===!1?e=0:e===!0&&(e=Us),{x:ul(e,"left","right"),y:ul(e,"top","bottom")}}function ul(e,t,n){return{min:ll(e,t),max:ll(e,n)}}function ll(e,t){return typeof e=="number"?e:e[t]||0}const Xj=new WeakMap;class Yj{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=pe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=f=>{n?(this.stopAnimation(),this.snapToCursor(rr(f).point)):this.pauseAnimation()},c=(f,d)=>{this.stopAnimation();const{drag:p,dragPropagation:g,onDragStart:m}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=LC(p),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ae(y=>{let E=this.getAxisMotionValue(y).get()||0;if(Ke.test(E)){const{projection:b}=this.visualElement;if(b&&b.layout){const R=b.layout.layoutBox[y];R&&(E=be(R)*(parseFloat(E)/100))}}this.originPoint[y]=E}),m&&se.postRender(()=>m(f,d)),Ns(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:m,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=d;if(g&&this.currentDirection===null){this.currentDirection=Zj(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),x&&x(f,d)},u=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},i=()=>Ae(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)==null?void 0:d.play())}),{dragSnapToOrigin:a}=this.getProps();this.panSession=new dx(t,{onSessionStart:s,onStart:c,onMove:l,onSessionEnd:u,resumeAnimation:i},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:r,contextWindow:fx(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:l}=this.getProps();l&&se.postRender(()=>l(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!yr(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let c=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(c=Gj(c,this.constraints[t],this.elastic[t])),s.set(c)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,o=this.constraints;t&&Sn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Hj(r.layoutBox,t):this.constraints=!1,this.elastic=Kj(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ae(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=qj(r.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Sn(t))return!1;const r=t.current;tt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=e_(r,o.root,this.visualElement.getTransformPagePoint());let c=zj(o.layout.layoutBox,s);if(n){const l=n(ZC(c));this.hasMutatedConstraints=!!l,l&&(c=Dg(l))}return c}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:c,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},i=Ae(a=>{if(!yr(a,n,this.currentDirection))return;let f=u&&u[a]||{};c&&(f={min:0,max:0});const d=o?200:1e6,p=o?40:1e7,g={type:"inertia",velocity:r?t[a]:0,bounceStiffness:d,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(a,g)});return Promise.all(i).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ns(this.visualElement,t),r.start(nc(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ae(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ae(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ae(n=>{const{drag:r}=this.getProps();if(!yr(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:c,max:l}=o.layout.layoutBox[n],u=s.get()||0;s.set(t[n]-ue(c,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Sn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ae(c=>{const l=this.getAxisMotionValue(c);if(l&&this.constraints!==!1){const u=l.get();o[c]=Wj({min:u,max:u},this.constraints[c])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ae(c=>{if(!yr(c,t,null))return;const l=this.getAxisMotionValue(c),{min:u,max:i}=this.constraints[c];l.set(ue(u,i,o[c]))})}addListeners(){if(!this.visualElement.current)return;Xj.set(this.visualElement,this);const t=this.visualElement.current,n=jn(t,"pointerdown",u=>{const{drag:i,dragListener:a=!0}=this.getProps();i&&a&&!Pg(u.target)&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();Sn(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),se.read(r);const c=Vn(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:i})=>{this.isDragging&&i&&(Ae(a=>{const f=this.getAxisMotionValue(a);f&&(this.originPoint[a]+=u[a].translate,f.set(f.get()+u[a].translate))}),this.visualElement.render())}));return()=>{c(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:c=Us,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:c,dragMomentum:l}}}function yr(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Zj(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Qj extends mt{constructor(t){super(t),this.removeGroupControls=Ie,this.removeListeners=Ie,this.controls=new Yj(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ie}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const fl=e=>(t,n)=>{e&&se.postRender(()=>e(t,n))};class Jj extends mt{constructor(){super(...arguments),this.removePointerDownListener=Ie}onPointerDown(t){this.session=new dx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:fx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:fl(t),onStart:fl(n),onMove:r,onEnd:(s,c)=>{delete this.session,o&&se.postRender(()=>o(s,c))}}}mount(){this.removePointerDownListener=jn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Gi=!1;class eP extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),Gi&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),po.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:c}=r;return c&&(c.isPresent=s,Gi=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?c.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?c.promote():c.relegate()||se.postRender(()=>{const l=c.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),sc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Gi=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function px(e){const[t,n]=nx(),r=S.useContext(La);return h.jsxRuntimeExports.jsx(eP,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(ux),isPresent:t,safeToRemove:n})}const tP={pan:{Feature:Jj},drag:{Feature:Qj,ProjectionNode:tx,MeasureLayout:px}};function dl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&se.postRender(()=>s(t,rr(t)))}class nP extends mt{mount(){const{current:t}=this.node;t&&(this.unmount=FC(t,(n,r)=>(dl(this.node,r,"Start"),o=>dl(this.node,o,"End"))))}unmount(){}}class rP extends mt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=er(Vn(this.node.current,"focus",()=>this.onFocus()),Vn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function hl(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&se.postRender(()=>s(t,rr(t)))}class oP extends mt{mount(){const{current:t}=this.node;t&&(this.unmount=$C(t,(n,r)=>(hl(this.node,r,"Start"),(o,{success:s})=>hl(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Gs=new WeakMap,Hi=new WeakMap,iP=e=>{const t=Gs.get(e.target);t&&t(e)},sP=e=>{e.forEach(iP)};function aP({root:e,...t}){const n=e||document;Hi.has(n)||Hi.set(n,{});const r=Hi.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(sP,{root:e,...t})),r[o]}function cP(e,t,n){const r=aP(t);return Gs.set(e,n),r.observe(e),()=>{Gs.delete(e),r.unobserve(e)}}const uP={some:0,all:1};class lP extends mt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,c={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:uP[o]},l=u=>{const{isIntersecting:i}=u;if(this.isInView===i||(this.isInView=i,s&&!i&&this.hasEnteredView))return;i&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",i);const{onViewportEnter:a,onViewportLeave:f}=this.node.getProps(),d=i?a:f;d&&d(u)};return cP(this.node.current,c,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(fP(t,n))&&this.startObserver()}unmount(){}}function fP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const dP={inView:{Feature:lP},tap:{Feature:oP},focus:{Feature:rP},hover:{Feature:nP}},hP={layout:{ProjectionNode:tx,MeasureLayout:px}},pP={...Fj,...dP,...tP,...hP},re=Ij(pP,Dj),mP=S.forwardRef(({children:e,className:t,dividerClassName:n,showDivider:r=!0,...o},s)=>h.jsxRuntimeExports.jsx(Pv,{...o,className:O.classNames("overflow-hidden bg-white",t),ref:s,asChild:!0,children:h.jsxRuntimeExports.jsxs(re.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.04,.62,.23,.98]},children:[r&&h.jsxRuntimeExports.jsx("hr",{className:O.classNames("bg-primary-blue h-0.5 border-0",n)}),h.jsxRuntimeExports.jsx("div",{className:"px-5 py-[15px]",children:e})]})})),gP=({items:e,classNames:t,showDivider:n,defaultValue:r})=>h.jsxRuntimeExports.jsx(Sv,{className:O.classNames("flex flex-col space-y-4",t==null?void 0:t.container),type:"single",defaultValue:r,collapsible:!0,children:e==null?void 0:e.map(o=>h.jsxRuntimeExports.jsxs(MR,{className:t==null?void 0:t.item,value:o.id,children:[h.jsxRuntimeExports.jsx(IR,{className:t==null?void 0:t.trigger,triggerIcon:o==null?void 0:o.triggerIcon,children:o.title}),h.jsxRuntimeExports.jsx(mP,{showDivider:n,dividerClassName:t==null?void 0:t.divider,className:t==null?void 0:t.content,children:o.content})]},o.id))}),xP={success:h.jsxRuntimeExports.jsx(ne.SvgIconCheckCircle,{width:24,height:24}),info:h.jsxRuntimeExports.jsx(ne.SvgIconInfoCircle,{width:24,height:24}),warning:h.jsxRuntimeExports.jsx(ne.SvgIconWarningCircle,{width:24,height:24}),error:h.jsxRuntimeExports.jsx(ne.SvgIconErrorCircle,{width:24,height:24})},vP={success:"text-green-6",info:"text-blue-6",warning:"text-gold-6",error:"text-red-6"},yP={success:"text-gray-6 hover:bg-gray-100 cursor-pointer",error:"text-gray-6 hover:bg-gray-100 cursor-pointer",warning:"text-gray-6 hover:bg-gray-100 cursor-pointer",info:"text-gray-6 hover:bg-gray-100 cursor-pointer"},EP={success:"bg-green-1 border border-green-3",info:"bg-blue-1 border border-blue-3",warning:"bg-gold-1 border border-gold-3",error:"bg-red-1 border border-red-3"},bP=({type:e="info",title:t,description:n,showIcon:r=!0,closable:o=!1,onClose:s,className:c="",children:l,...u})=>{const i=!!t&&!n&&!l||!t&&!!n&&!l;return h.jsxRuntimeExports.jsxs(re.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:O.classNames("relative border rounded-lg p-4",EP[e],{[c]:c}),...u,children:[h.jsxRuntimeExports.jsxs(De,{gap:4,align:i?"center":"start",children:[r&&h.jsxRuntimeExports.jsx("div",{className:O.classNames("shrink-0",vP[e]),children:xP[e]}),h.jsxRuntimeExports.jsxs(De,{direction:i?"horizontal":"vertical",gap:0,className:"flex-1 min-w-0",align:i?"center":"start",children:[t&&h.jsxRuntimeExports.jsx("h4",{className:"text-base font-medium leading-tight text-gray-12",children:t}),n&&h.jsxRuntimeExports.jsx("p",{className:O.classNames("text-sm font-medium leading-tight text-gray-12",{"mt-2":!!t&&!i}),children:n}),l&&h.jsxRuntimeExports.jsx("div",{className:"mt-2",children:l})]})]}),o&&h.jsxRuntimeExports.jsx("button",{onClick:s,className:O.classNames("absolute top-4 right-4 p-1 rounded transition-colors",yP[e]),"aria-label":"Cerrar alerta",children:h.jsxRuntimeExports.jsx(ne.SvgClose,{width:16,height:16})})]})},wP={sm:"size-8 text-[1.3rem]",md:"size-10 text-[1.4rem]",lg:"size-12 text-[2.1rem]",xl:"size-14 text-[2.5rem]"},RP=({size:e="md",src:t,alt:n="avatar",icon:r=h.jsxRuntimeExports.jsx(ne.SvgUser,{}),bgClassName:o="bg-[#A1ADC0]",colorClassName:s="text-white",className:c="",onClick:l,style:u})=>h.jsxRuntimeExports.jsxs(ty,{className:O.classNames("inline-flex shrink-0 overflow-hidden rounded-full",wP[e],c),onClick:l,style:u,children:[t&&h.jsxRuntimeExports.jsx(ny,{src:t,alt:n,className:"h-full w-full object-cover"}),h.jsxRuntimeExports.jsx(ry,{delayMs:0,className:O.classNames("flex h-full w-full items-center justify-center rounded-full",s,o),children:r})]}),SP={default:O.classNames("bg-primary-blue border-primary-blue text-white","hover:bg-darks-blue-Macropay-30 hover:border-darks-blue-Macropay-30"),primary:O.classNames("bg-primary-yellow border-primary-yellow text-primary-blue","hover:bg-shades-yellow-10 hover:border-shades-yellow-10"),secondary:O.classNames("bg-white text-primary-blue border-primary-blue","hover:border-darks-blue-Macropay-30 hover:text-darks-blue-Macropay-30"),text:O.classNames("bg-transparent text-primary-blue border-transparent shadow-none","hover:text-darks-blue-Macropay-30","disabled:bg-transparent disabled:border-transparent"),danger:O.classNames("bg-primary-red border-primary-red text-white","hover:bg-shades-red-10 hover:border-shades-red-10"),withoutColor:"bg-transparent border-transparent shadow-none"},CP={sm:"px-3 text-sm h-6 rounded-md",md:"px-4 py-2 h-8",lg:"px-6 py-[7px] text-base h-10 rounded-lg",xl:"px-6 py-[11px] h-12"},pl=["sm","md","lg","xl"],_P=e=>{const t=pl.indexOf(e);return t===-1?"":O.classNames(pl.slice(0,t+1).map(n=>CP[n]))},jP={pointer:"cursor-pointer",default:"cursor-default","not-allowed":"cursor-not-allowed",wait:"cursor-wait",text:"cursor-text"},PP=e=>O.classNames("flex items-center justify-center gap-2 border active:scale-95",jP[e],"disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5 disabled:cursor-not-allowed","transition-all duration-300 ease-in-out","shadow-button"),Hs=({icon:e,children:t,leftIcon:n,rightIcon:r,type:o="button",variant:s="default",size:c="md",className:l="",isLoading:u=!1,positionLoading:i="left",cursor:a="pointer",...f})=>{const d=S.useId(),p=PP(a),{isLeftLoading:g,isRightLoading:m}=S.useMemo(()=>({isLeftLoading:i==="left"&&u,isRightLoading:i==="right"&&u}),[u,i]),x=S.useMemo(()=>["primary","secondary","text","withoutColor"].includes(s)?h.jsxRuntimeExports.jsx(ne.SvgLoaderAnimBlue,{className:"animate-spin"}):h.jsxRuntimeExports.jsx(ne.SvgLoaderAnimWhite,{className:"animate-spin"}),[s]),y=S.useMemo(()=>e??n,[e,n]);return h.jsxRuntimeExports.jsxs(re.button,{id:`${d}-button`,className:O.classNames(p,SP[s],_P(c),l),type:o,...f,children:[h.jsxRuntimeExports.jsx(jt,{mode:"wait",children:(g||y)&&h.jsxRuntimeExports.jsx(re.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.2},children:g?x:y},"leftIcon")}),typeof t=="string"||typeof t=="number"?h.jsxRuntimeExports.jsx("span",{className:"whitespace-normal",children:t}):t,h.jsxRuntimeExports.jsx(jt,{mode:"wait",children:(m||r)&&h.jsxRuntimeExports.jsx(re.div,{initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:8},transition:{duration:.2},children:m?x:r},"rightIcon")})]})},TP=({children:e,className:t="",align:n="horizontal",shadow:r=!0,rounded:o=!0,bordered:s=!0,...c})=>{const{...l}=c,u=O.classNames("bg-white p-4",{"flex flex-col":n==="horizontal","flex flex-col md:flex-row md:max-w-xl":n==="vertical"},{"shadow-lg":r},{"rounded-2xl":o},{"border border-gray-200":s},{[t]:t});return h.jsxRuntimeExports.jsx(re.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:u,...l,children:e})};var zi={exports:{}};/*!
|
|
105
75
|
Copyright (c) 2018 Jed Watson.
|
|
106
76
|
Licensed under the MIT License (MIT), see
|
|
107
77
|
http://jedwatson.github.io/classnames
|
|
108
|
-
*/var Wu;function yA(){return Wu||(Wu=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",c=0;c<arguments.length;c++){var u=arguments[c];u&&(i=o(i,r(u)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var c="";for(var u in i)t.call(i,u)&&i[u]&&(c=o(c,u));return c}function o(i,c){return c?i?i+" "+c:i+c:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(vs)),vs.exports}var xA=yA();const jn=pd(xA),bA={sm:"h-4 w-4",md:"h-6 w-6"},wA={sm:"h-3 w-3",md:"h-4 w-4"},EA={sm:"h-2 w-2",md:"h-4 w-4"},SA={sm:"text-sm",md:"text-base"},Kv=y.forwardRef(({label:e,size:t="md",checked:n,indeterminate:r=!1,disabled:o=!1,onCheckedChange:i,className:c,...u},l)=>{const s=y.useId(),a=h=>{o||i==null||i(h===!0)},f=r?"indeterminate":n?"checked":"none",d={checked:g.jsx(ce.SvgCheckv2,{className:jn(wA[t],o?"text-stone-300 fill-stone-300":"text-white")}),indeterminate:g.jsx(ce.SvgIndeterminate,{className:jn(EA[t],o?"text-stone-300 fill-stone-300":"text-blue-800")})};return g.jsxs("div",{className:jn("flex gap-2 items-start sm:items-center select-none",o?"pointer-events-none":"cursor-pointer",c),children:[g.jsx(gh,{id:s,ref:l,checked:n,"aria-checked":r?"mixed":n,disabled:o,onCheckedChange:a,className:jn("flex justify-center items-center rounded-sm border relative transition-[background-color]",bA[t],{"bg-white border-gray-300 hover:border-blue-800":!n&&!o,"bg-blue-800 border-blue-800":n&&!r&&!o||r&&!o,"bg-neutral-100 border-stone-300":o}),...u,children:f!=="none"&&d[f]}),e&&g.jsx("label",{htmlFor:s,className:jn(SA[t],o&&"text-gray-400","cursor-pointer"),children:e})]})});Kv.displayName="Checkbox";const CA=({children:e,className:t,width:n="min-w-full w-full",type:r="horizontal",align:o="center"})=>{const i={left:"before:w-[5%] after:w-full",center:"before:w-full after:w-full",right:"before:w-full after:w-[5%]"};return g.jsx("div",{className:N.classNames("p-0 m-0 box-border",{"flex h-px items-center":r==="horizontal","inline-block border-s border-s-gray-5 min-h-[1em] h-full":r==="vertical","bg-grays-Macropay-05":r==="horizontal"&&!e,"whitespace-nowrap before:h-px after:h-px before:bg-grays-Macropay-05 after:bg-grays-Macropay-05":r==="horizontal"&&e,[`${i[o]}`]:o,[n]:n&&r==="horizontal",[`${t}`]:t}),children:e&&r==="horizontal"&&g.jsx("span",{className:N.classNames("inline-block ps-4 pe-4",{[`text-${o}`]:o}),children:e})})},_A=({children:e,id:t,className:n=""})=>{const r=_.useRef(null),[o,i]=_.useState(!1);return _.useEffect(()=>{const c=document.getElementById(t)||document.createElement("div");return r.current=c,r.current.id=t,n&&(r.current.className=n),document.body.appendChild(r.current),i(!0),()=>{r.current.parentElement&&r.current.parentElement.removeChild(r.current)}},[t]),o?xa.createPortal(e,r.current):null},Yv=_.memo(_A),Dn={backdrop:"fixed inset-0 bg-black/50",drawer:"fixed top-0 h-full w-80 bg-white shadow-xl",header:"flex justify-end absolute right-7",closeButton:"text-gray-500 hover:text-gray-700",children:"overflow-y-auto h-[calc(100%-3rem)]"},RA={right:"right-0",left:"left-0"},Hr={backdrop:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},drawer:{transition:{type:"tween",duration:.2}}},TA=({open:e,onClose:t,children:n,position:r="right",className:o="",classNames:i={backdrop:"",drawer:"",header:"",children:""}})=>(_.useEffect(()=>{const c=u=>{u.key==="Escape"&&t()};return e&&document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e,t]),g.jsx(Yv,{id:"drawer",children:g.jsx(Wt,{children:e&&g.jsxs(g.Fragment,{children:[g.jsx(le.div,{className:N.classNames(Dn.backdrop,i.backdrop),initial:Hr.backdrop.initial,animate:Hr.backdrop.animate,exit:Hr.backdrop.exit,onClick:t}),g.jsxs(le.div,{className:N.classNames(Dn.drawer,RA[r],i.drawer,o),initial:{x:r==="right"?"100%":"-100%"},animate:{x:0},exit:{x:r==="right"?"100%":"-100%"},transition:Hr.drawer.transition,children:[g.jsx("div",{className:N.classNames(Dn.header,i.header),children:g.jsx("button",{onClick:t,className:Dn.closeButton,children:"✕"})}),g.jsx("div",{className:N.classNames(Dn.children,i.children),children:n})]})]})})})),PA=_.forwardRef(({children:e,className:t,...n},r)=>g.jsx(Lw,{className:N.classNames("inline-flex items-center justify-center rounded px-4 py-2 text-sm font-medium","bg-white border border-gray-3 text-gray-12","hover:bg-gray-1 focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","transition-colors",t),ref:r,...n,children:e})),AA=_.forwardRef(({children:e,className:t,...n},r)=>g.jsx(Fw,{children:g.jsx(Vw,{...n,className:N.classNames("min-w-[220px] rounded-lg bg-white shadow-(--box-shadow-accordion) border border-gray-2","overflow-hidden",t),ref:r,asChild:!0,children:g.jsx(le.div,{initial:{opacity:0,scale:.95,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-10},transition:{duration:.2,ease:[.04,.62,.23,.98]},children:g.jsx("div",{className:"p-1",children:e})})})})),OA=_.forwardRef(({children:e,className:t,icon:n,shortcut:r,...o},i)=>g.jsxs($w,{className:N.classNames("group relative flex cursor-pointer select-none items-center justify-between rounded px-3 py-2 text-sm outline-none","text-gray-12 hover:bg-blue-1 hover:text-blue-6","focus:bg-blue-1 focus:text-blue-6","data-disabled:pointer-events-none data-disabled:opacity-50","transition-colors",t),ref:i,...o,children:[g.jsxs("div",{className:"flex items-center gap-2",children:[n&&g.jsx("span",{className:"inline-flex shrink-0",children:n}),g.jsx("span",{children:e})]}),r&&g.jsx("span",{className:"ml-auto pl-4 text-xs text-gray-6 group-hover:text-blue-6",children:r})]})),MA=_.forwardRef(({className:e,...t},n)=>g.jsx(Uw,{className:N.classNames("my-1 h-px bg-gray-3",e),ref:n,...t})),IA=_.forwardRef(({children:e,className:t,...n},r)=>g.jsx(Bw,{className:N.classNames("px-3 py-2 text-xs font-semibold text-gray-6",t),ref:r,...n,children:e})),NA=(e,t)=>{const n={separator:()=>g.jsx(MA,{className:t==null?void 0:t.separator},e.id),label:()=>g.jsx(IA,{className:t==null?void 0:t.label,children:e.label},e.id),default:()=>g.jsx(OA,{className:t==null?void 0:t.item,icon:e.icon,shortcut:e.shortcut,disabled:e.disabled,onSelect:e.onSelect,children:e.label},e.id)};return(n[e.type]||n.default)()},jA=({trigger:e,items:t=[],align:n="start",sideOffset:r=4,classNames:o})=>g.jsxs(kw,{children:[g.jsx(PA,{children:e}),g.jsx(AA,{align:n,sideOffset:r,className:o==null?void 0:o.content,children:t.map(i=>g.jsx("div",{children:NA(i,o)},i.id))})]}),zr={container:"container mx-auto",wrapper:"flex flex-col items-center",icon:"text-3xl text-gray-300",text:"mt-3 text-base text-gray-300 font-normal"},DA=({text:e="No hay datos para mostrar",className:t="",icon:n=g.jsx(ce.SvgEmpty,{})})=>g.jsx(gd,{children:g.jsx(le.section,{"data-cy":"empty-component",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.25,ease:"easeOut"},className:N.classNames(zr.container,t),children:g.jsxs("div",{className:zr.wrapper,children:[g.jsx(le.div,{initial:{scale:.9},animate:{scale:1},transition:{duration:.2},children:_.cloneElement(n,{className:N.classNames(zr.icon,n.props.className),...n.props})}),g.jsx(le.h1,{"data-cy":"empty-text",className:zr.text,initial:{opacity:0},animate:{opacity:1},transition:{delay:.1},children:e})]})})});var Xv=(e=>(e.justify="justify",e.align="items",e.gap="gap",e))(Xv||{});const{align:kA,justify:LA,gap:FA}=Xv,VA={horizontal:"flex-row",vertical:"flex-col"},BA={horizontal:"flex-row-reverse",vertical:"flex-col-reverse"},We=({children:e,justify:t,align:n,gap:r,direction:o="horizontal",isReverse:i=!1,style:c,className:u="",onClick:l,wrap:s,...a})=>g.jsx(le.div,{"aria-hidden":!0,className:N.classNames(`flex ${i?BA[o]:VA[o]}`,N.generateClasses(FA,r),N.generateClasses(LA,t),N.generateClasses(kA,n),{[u]:u,"flex-wrap":s}),onClick:l,style:c,children:e,...a}),$A={md:"py-[5px] min-h-8 rounded-md",lg:"py-2 text-base min-h-10 rounded-lg",xl:"py-3 text-base min-h-12 rounded-lg"},Zv=(e,t,n,r,o)=>{const i=["px-3 py-px min-h-6 text-sm leading-[22px] w-full","transition-all ease-out duration-300","placeholder:text-gray-6 text-gray-10 outline-none appearance-none","disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5"],c=e==="default"?["rounded border shadow-button border-gray-7","focus:border-light-blue-30 focus:ring-light-blue-30 focus:shadow-[0_0_0_2px_#E6EDF8]"]:["border-0 border-b border-gray-7 rounded-none! bg-transparent","focus:border-light-blue-30"],u={"pl-8":o,[e==="default"?"border-red text-red focus:border-red focus:ring-red focus:shadow-[0_0_0_2px_#FFCCC7]":"border-b-red text-red focus:border-b-red"]:n,[e==="default"?"border-green text-green focus:border-green focus:ring-green focus:shadow-[0_0_0_2px_#D4F0E0]":"border-b-green text-green focus:border-b-green"]:r};return{sizeStyles:$A[t],stateStyles:u,baseStyles:i,variantStyles:c}},Qv=({onClick:e,disabled:t})=>g.jsx(le.button,{initial:{opacity:0,y:"-50%"},animate:{opacity:1,y:"-50%"},exit:{opacity:0,y:"-50%"},transition:{duration:.2},type:"button",className:"absolute transition-colors ease-out duration-300 top-1/2 right-3 disabled:opacity-100 text-gray-6 hover:text-gray-7 disabled:hover:text-gray-6",onClick:e,disabled:t,children:g.jsx(ce.SvgCloseCircle,{})},"clear-button"),UA=({error:e,size:t="md",check:n,icon:r,leftIcon:o,clear:i=!0,disabled:c=!1,variant:u="default",className:l,...s})=>{const[a,f]=_.useState(s.value??""),{baseStyles:d,variantStyles:h,sizeStyles:m,stateStyles:p}=Zv(u,t,e,n,!!r),v=_.useMemo(()=>i&&a?g.jsx(Qv,{disabled:c,onClick:()=>f("")}):o?g.jsx("div",{className:N.classNames("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:o}):null,[i,a,o,c]);return g.jsxs("div",{className:N.classNames("relative",l),children:[r&&g.jsx("div",{className:N.classNames("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:r}),g.jsx(le.input,{...s,value:a,disabled:c,onChange:x=>f(x.target.value),className:N.classNames(...d,...h,m,p,l)}),g.jsx(Wt,{children:v})]})},GA=({num:e,format:t,useGrouping:n,minFractionDigits:r,maxFractionDigits:o,mode:i,currency:c,currencyDisplay:u,locale:l,prefix:s="",suffix:a=""})=>{if(e==null||!t)return(e==null?void 0:e.toString())??"";const f={useGrouping:n,minimumFractionDigits:r,maximumFractionDigits:o,...i==="currency"&&{style:"currency",currency:c,currencyDisplay:u}},d=new Intl.NumberFormat(l,f).format(e);return`${s} ${d} ${a}`.trim()},HA=(e,t="",n="",r=!0)=>{if(!e)return r?null:0;const o=e.replace(t,"").replace(n,"").replaceAll(/[^\d.-]/g,""),i=Number.parseFloat(o);return Number.isNaN(i)?null:i},zA=(e,t,n)=>e==null||(t==null||e>=t)&&(n==null||e<=n),WA=e=>{const{onChange:t,onValueChange:n,format:r=!0,locale:o="es-MX",mode:i="decimal",currency:c="MXN",currencyDisplay:u="symbol",useGrouping:l=!0,minFractionDigits:s,maxFractionDigits:a,min:f,max:d,allowEmpty:h=!0,prefix:m,suffix:p,...v}=e,[x,b]=_.useState(Number((v==null?void 0:v.value)??null)),[w,S]=_.useState(""),[E,A]=_.useState(!1),R=_.useMemo(()=>({format:r,useGrouping:l,minFractionDigits:s,maxFractionDigits:a,mode:i,currency:c,currencyDisplay:u,locale:o,prefix:m,suffix:p}),[r,l,s,a,i,c,u,o,m,p]),T=_.useCallback($=>GA({num:$,...R}),[R]),I=_.useCallback($=>HA($,m,p,h),[m,p,h]);_.useEffect(()=>{E||S(T(x))},[x,T,E]);const P=_.useCallback($=>{const K=$.target.value;S(K);const G=I(K);zA(G,f,d)&&(b(G),t==null||t(G),n==null||n({originalEvent:$.nativeEvent,value:G}))},[I,f,d,t,n]),M=_.useCallback($=>{var K;A(!0),x!=null&&S(x.toString()),(K=v.onFocus)==null||K.call(v,$)},[x,v]),j=_.useCallback($=>{var K;A(!1),S(T(x)),(K=v.onBlur)==null||K.call(v,$)},[T,x,v]),V=_.useCallback(()=>{S(""),b(null),t==null||t(null)},[t]);return{displayValue:w,handleChange:P,handleFocus:M,handleBlur:j,handleClear:V,...v}},Jv=_.forwardRef((e,t)=>{const{error:n,size:r="md",check:o,icon:i,leftIcon:c,clear:u=!0,disabled:l=!1,variant:s="default",className:a,displayValue:f,handleChange:d,handleFocus:h,handleBlur:m,handleClear:p,...v}=WA(e),{baseStyles:x,variantStyles:b,sizeStyles:w,stateStyles:S}=Zv(s,r,n,o,!!i),E=_.useMemo(()=>u&&f?g.jsx(Qv,{disabled:l,onClick:p}):c?g.jsx("div",{className:N.classNames("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":l}),children:c}):null,[u,f,c,l,p]);return g.jsxs("div",{className:N.classNames("relative",a),children:[i&&g.jsx("div",{className:N.classNames("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":l}),children:i}),g.jsx(le.input,{...v,ref:t,type:"text",value:f,disabled:l,onChange:d,onFocus:h,onBlur:m,className:N.classNames(...x,...b,w,S,a)}),g.jsx(Wt,{children:E})]})});Jv.displayName="InputNumber";const qA={Text:UA,Number:Jv},qu=(e,t)=>`${e}-${t}`,Fi=_.forwardRef(({children:e,as:t,asChild:n=!1,className:r,italic:o=!1,size:i="base",weight:c="normal",...u},l)=>{if(!e)return null;const s=qu("text",i),a=qu("font",c),f=n?gd:t??"p";return g.jsx(f,{ref:l,className:N.classNames("text-grays-Macropay-10",s,a,r,{italic:o}),...u,children:e})});Fi.displayName="Typography";const KA=({children:e,as:t="p",className:n,...r})=>g.jsx(Fi,{as:t,className:n,...r,children:e}),YA={1:"text-4xl",2:"text-3xl",3:"text-2xl",4:"text-xl",5:"text-lg",6:"text-base"},XA={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},ZA=({children:e,className:t="",level:n=1,...r})=>{const o=XA[n];return g.jsx(Fi,{as:o,weight:"bold",className:`${YA[n]} ${t}`,...r,children:e})},An=Fi;An.Text=KA;An.Title=ZA;const QA=({title:e,className:t=""})=>g.jsx(An.Title,{level:3,className:t,children:e}),JA={sm:"12rem",md:"16rem",lg:"20rem",xl:"24rem"},eO={sm:"w-56",md:"w-64",lg:"w-80",xl:"w-96"},tO={sm:"px-2 py-1.5",md:"px-3 py-2",lg:"px-4 py-2.5",xl:"px-5 py-3"},ey={sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},nO=({item:e,index:t,isLast:n,size:r,itemClassName:o=""})=>{const i=e.href?"a":"button",c=e.href?{href:e.href}:{onClick:e.onClick,type:"button"};return g.jsx(le.li,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2,delay:t*.05},className:N.classNames("border-gray-5 transition-colors duration-200",{"border-b":!n,"hover:bg-gray-3":!e.disabled,"opacity-50 cursor-not-allowed":e.disabled}),children:g.jsx(i,{...c,disabled:e.disabled,className:N.classNames("w-full text-left block",tO[r],ey[r],"text-gray-12 no-underline","focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-inset",{"cursor-pointer":!e.disabled,"cursor-not-allowed":e.disabled,[o]:o}),children:e.content})},e.id)},rO=({message:e,size:t})=>g.jsx("li",{className:N.classNames("flex items-center justify-center h-full text-gray-9",ey[t]),children:e}),oO=({paginatedItems:e,containerHeight:t,size:n,withPagination:r,showBorder:o,showShadow:i,emptyMessage:c,itemClassName:u=""})=>g.jsx("ul",{style:{height:r?"auto":t},className:N.classNames(eO[n],"rounded-lg",{"border border-gray-6":o,"shadow-md":i,"overflow-y-auto scroll-smooth":!r}),children:e.length===0?g.jsx(rO,{message:c,size:n}):e.map((l,s)=>g.jsx(nO,{item:l,index:s,isLast:s===e.length-1,size:n,itemClassName:u},l.id))}),iO=(e,t,n,r)=>_.useMemo(()=>{if(!t)return e;const o=(n-1)*r,i=o+r;return e.slice(o,i)},[e,t,n,r]),sO=(e,t)=>_.useMemo(()=>Math.ceil(e/t),[e,t]),aO=(e,t)=>t||JA[e],cO=e=>t=>{e&&e(t)},lO=({items:e,title:t,size:n="md",withPagination:r=!1,currentPage:o=1,itemsPerPage:i=10,onPageChange:c,showBorder:u=!0,showShadow:l=!0,height:s,className:a="",titleClassName:f="",itemClassName:d="",emptyMessage:h="No items to display",onAnimationStart:m,onAnimationEnd:p,onAnimationIteration:v,...x})=>{const b=iO(e,r,o,i),w=sO(e.length,i),S=aO(n,s),E=cO(c);return g.jsx("div",{onAnimationStart:m,onAnimationEnd:p,onAnimationIteration:v,...x,children:g.jsxs(le.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:N.classNames("flex flex-col",{[a]:a}),children:[t&&g.jsx(QA,{title:t,size:n,className:f}),g.jsx(oO,{paginatedItems:b,containerHeight:S,size:n,withPagination:r,showBorder:u,showShadow:l,emptyMessage:h,itemClassName:d}),r&&w>1&&g.jsx(ty,{currentPage:o,totalPages:w,onPageChange:E,size:n})]})})},uO={hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},fO={hidden:{opacity:0,scale:.95,y:8},visible:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:8}},dO=()=>g.jsx(Ox,{asChild:!0,children:g.jsx(le.div,{className:`\r
|
|
78
|
+
*/var ml;function AP(){return ml||(ml=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",c=0;c<arguments.length;c++){var l=arguments[c];l&&(s=o(s,r(l)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var c="";for(var l in s)t.call(s,l)&&s[l]&&(c=o(c,l));return c}function o(s,c){return c?s?s+" "+c:s+c:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(zi)),zi.exports}var OP=AP();const hn=Ff(OP),MP={sm:"h-4 w-4",md:"h-6 w-6"},IP={sm:"h-3 w-3",md:"h-4 w-4"},DP={sm:"h-2 w-2",md:"h-4 w-4"},NP={sm:"text-sm",md:"text-base"},mx=v.forwardRef(({label:e,size:t="md",checked:n,indeterminate:r=!1,disabled:o=!1,onCheckedChange:s,className:c,...l},u)=>{const i=v.useId(),a=p=>{o||s==null||s(p===!0)},f=r?"indeterminate":n?"checked":"none",d={checked:h.jsxRuntimeExports.jsx(ne.SvgCheckv2,{className:hn(IP[t],o?"text-stone-300 fill-stone-300":"text-white")}),indeterminate:h.jsxRuntimeExports.jsx(ne.SvgIndeterminate,{className:hn(DP[t],o?"text-stone-300 fill-stone-300":"text-blue-800")})};return h.jsxRuntimeExports.jsxs("div",{className:hn("flex gap-2 items-start sm:items-center select-none",o?"pointer-events-none":"cursor-pointer",c),children:[h.jsxRuntimeExports.jsx(Ld,{id:i,ref:u,checked:n,"aria-checked":r?"mixed":n,disabled:o,onCheckedChange:a,className:hn("flex justify-center items-center rounded-sm border relative transition-[background-color]",MP[t],{"bg-white border-gray-300 hover:border-blue-800":!n&&!o,"bg-blue-800 border-blue-800":n&&!r&&!o||r&&!o,"bg-neutral-100 border-stone-300":o}),...l,children:f!=="none"&&d[f]}),e&&h.jsxRuntimeExports.jsx("label",{htmlFor:i,className:hn(NP[t],o&&"text-gray-400","cursor-pointer"),children:e})]})});mx.displayName="Checkbox";const kP=({children:e,className:t,width:n="min-w-full w-full",type:r="horizontal",align:o="center"})=>{const s={left:"before:w-[5%] after:w-full",center:"before:w-full after:w-full",right:"before:w-full after:w-[5%]"};return h.jsxRuntimeExports.jsx("div",{className:O.classNames("p-0 m-0 box-border",{"flex h-px items-center":r==="horizontal","inline-block border-s border-s-gray-5 min-h-[1em] h-full":r==="vertical","bg-grays-Macropay-05":r==="horizontal"&&!e,"whitespace-nowrap before:h-px after:h-px before:bg-grays-Macropay-05 after:bg-grays-Macropay-05":r==="horizontal"&&e,[`${s[o]}`]:o,[n]:n&&r==="horizontal",[`${t}`]:t}),children:e&&r==="horizontal"&&h.jsxRuntimeExports.jsx("span",{className:O.classNames("inline-block ps-4 pe-4",{[`text-${o}`]:o}),children:e})})},LP=({children:e,id:t,className:n=""})=>{const r=S.useRef(null),[o,s]=S.useState(!1);return S.useEffect(()=>{const c=document.getElementById(t)||document.createElement("div");return r.current=c,r.current.id=t,n&&(r.current.className=n),document.body.appendChild(r.current),s(!0),()=>{r.current.parentElement&&r.current.parentElement.removeChild(r.current)}},[t]),o?Nf.createPortal(e,r.current):null},gx=S.memo(LP),pn={backdrop:"fixed inset-0 bg-black/50",drawer:"fixed top-0 h-full w-80 bg-white shadow-xl",header:"flex justify-end absolute right-7",closeButton:"text-gray-500 hover:text-gray-700",children:"overflow-y-auto h-[calc(100%-3rem)]"},FP={right:"right-0",left:"left-0"},Er={backdrop:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},drawer:{transition:{type:"tween",duration:.2}}},VP=({open:e,onClose:t,children:n,position:r="right",className:o="",classNames:s={backdrop:"",drawer:"",header:"",children:""}})=>(S.useEffect(()=>{const c=l=>{l.key==="Escape"&&t()};return e&&document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e,t]),h.jsxRuntimeExports.jsx(gx,{id:"drawer",children:h.jsxRuntimeExports.jsx(jt,{children:e&&h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx(re.div,{className:O.classNames(pn.backdrop,s.backdrop),initial:Er.backdrop.initial,animate:Er.backdrop.animate,exit:Er.backdrop.exit,onClick:t}),h.jsxRuntimeExports.jsxs(re.div,{className:O.classNames(pn.drawer,FP[r],s.drawer,o),initial:{x:r==="right"?"100%":"-100%"},animate:{x:0},exit:{x:r==="right"?"100%":"-100%"},transition:Er.drawer.transition,children:[h.jsxRuntimeExports.jsx("div",{className:O.classNames(pn.header,s.header),children:h.jsxRuntimeExports.jsx("button",{onClick:t,className:pn.closeButton,children:"✕"})}),h.jsxRuntimeExports.jsx("div",{className:O.classNames(pn.children,s.children),children:n})]})]})})})),BP=S.forwardRef(({children:e,className:t,...n},r)=>h.jsxRuntimeExports.jsx(XE,{className:O.classNames("inline-flex items-center justify-center rounded px-4 py-2 text-sm font-medium","bg-white border border-gray-3 text-gray-12","hover:bg-gray-1 focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","transition-colors",t),ref:r,...n,children:e})),$P=S.forwardRef(({children:e,className:t,...n},r)=>h.jsxRuntimeExports.jsx(YE,{children:h.jsxRuntimeExports.jsx(ZE,{...n,className:O.classNames("min-w-[220px] rounded-lg bg-white shadow-(--box-shadow-accordion) border border-gray-2","overflow-hidden",t),ref:r,asChild:!0,children:h.jsxRuntimeExports.jsx(re.div,{initial:{opacity:0,scale:.95,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-10},transition:{duration:.2,ease:[.04,.62,.23,.98]},children:h.jsxRuntimeExports.jsx("div",{className:"p-1",children:e})})})})),UP=S.forwardRef(({children:e,className:t,icon:n,shortcut:r,...o},s)=>h.jsxRuntimeExports.jsxs(JE,{className:O.classNames("group relative flex cursor-pointer select-none items-center justify-between rounded px-3 py-2 text-sm outline-none","text-gray-12 hover:bg-blue-1 hover:text-blue-6","focus:bg-blue-1 focus:text-blue-6","data-disabled:pointer-events-none data-disabled:opacity-50","transition-colors",t),ref:s,...o,children:[h.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[n&&h.jsxRuntimeExports.jsx("span",{className:"inline-flex shrink-0",children:n}),h.jsxRuntimeExports.jsx("span",{children:e})]}),r&&h.jsxRuntimeExports.jsx("span",{className:"ml-auto pl-4 text-xs text-gray-6 group-hover:text-blue-6",children:r})]})),GP=S.forwardRef(({className:e,...t},n)=>h.jsxRuntimeExports.jsx(eb,{className:O.classNames("my-1 h-px bg-gray-3",e),ref:n,...t})),HP=S.forwardRef(({children:e,className:t,...n},r)=>h.jsxRuntimeExports.jsx(QE,{className:O.classNames("px-3 py-2 text-xs font-semibold text-gray-6",t),ref:r,...n,children:e})),zP=(e,t)=>{const n={separator:()=>h.jsxRuntimeExports.jsx(GP,{className:t==null?void 0:t.separator},e.id),label:()=>h.jsxRuntimeExports.jsx(HP,{className:t==null?void 0:t.label,children:e.label},e.id),default:()=>h.jsxRuntimeExports.jsx(UP,{className:t==null?void 0:t.item,icon:e.icon,shortcut:e.shortcut,disabled:e.disabled,onSelect:e.onSelect,children:e.label},e.id)};return(n[e.type]||n.default)()},WP=({trigger:e,items:t=[],align:n="start",sideOffset:r=4,classNames:o})=>h.jsxRuntimeExports.jsxs(KE,{children:[h.jsxRuntimeExports.jsx(BP,{children:e}),h.jsxRuntimeExports.jsx($P,{align:n,sideOffset:r,className:o==null?void 0:o.content,children:t.map(s=>h.jsxRuntimeExports.jsx("div",{children:zP(s,o)},s.id))})]}),br={container:"container mx-auto",wrapper:"flex flex-col items-center",icon:"text-3xl text-gray-300",text:"mt-3 text-base text-gray-300 font-normal"},qP=({text:e="No hay datos para mostrar",className:t="",icon:n=h.jsxRuntimeExports.jsx(ne.SvgEmpty,{})})=>h.jsxRuntimeExports.jsx(h.Slot,{children:h.jsxRuntimeExports.jsx(re.section,{"data-cy":"empty-component",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.25,ease:"easeOut"},className:O.classNames(br.container,t),children:h.jsxRuntimeExports.jsxs("div",{className:br.wrapper,children:[h.jsxRuntimeExports.jsx(re.div,{initial:{scale:.9},animate:{scale:1},transition:{duration:.2},children:S.cloneElement(n,{className:O.classNames(br.icon,n.props.className),...n.props})}),h.jsxRuntimeExports.jsx(re.h1,{"data-cy":"empty-text",className:br.text,initial:{opacity:0},animate:{opacity:1},transition:{delay:.1},children:e})]})})});var xx=(e=>(e.justify="justify",e.align="items",e.gap="gap",e))(xx||{});const{align:KP,justify:XP,gap:YP}=xx,ZP={horizontal:"flex-row",vertical:"flex-col"},QP={horizontal:"flex-row-reverse",vertical:"flex-col-reverse"},De=({children:e,justify:t,align:n,gap:r,direction:o="horizontal",isReverse:s=!1,style:c,className:l="",onClick:u,wrap:i,...a})=>h.jsxRuntimeExports.jsx(re.div,{"aria-hidden":!0,className:O.classNames(`flex ${s?QP[o]:ZP[o]}`,O.generateClasses(YP,r),O.generateClasses(XP,t),O.generateClasses(KP,n),{[l]:l,"flex-wrap":i}),onClick:u,style:c,children:e,...a}),JP={md:"py-[5px] min-h-8 rounded-md",lg:"py-2 text-base min-h-10 rounded-lg",xl:"py-3 text-base min-h-12 rounded-lg"},vx=(e,t,n,r,o)=>{const s=["px-3 py-px min-h-6 text-sm leading-[22px] w-full","transition-all ease-out duration-300","placeholder:text-gray-6 text-gray-10 outline-none appearance-none","disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5"],c=e==="default"?["rounded border shadow-button border-gray-7","focus:border-light-blue-30 focus:ring-light-blue-30 focus:shadow-[0_0_0_2px_#E6EDF8]"]:["border-0 border-b border-gray-7 rounded-none! bg-transparent","focus:border-light-blue-30"],l={"pl-8":o,[e==="default"?"border-red text-red focus:border-red focus:ring-red focus:shadow-[0_0_0_2px_#FFCCC7]":"border-b-red text-red focus:border-b-red"]:n,[e==="default"?"border-green text-green focus:border-green focus:ring-green focus:shadow-[0_0_0_2px_#D4F0E0]":"border-b-green text-green focus:border-b-green"]:r};return{sizeStyles:JP[t],stateStyles:l,baseStyles:s,variantStyles:c}},yx=({onClick:e,disabled:t})=>h.jsxRuntimeExports.jsx(re.button,{initial:{opacity:0,y:"-50%"},animate:{opacity:1,y:"-50%"},exit:{opacity:0,y:"-50%"},transition:{duration:.2},type:"button",className:"absolute transition-colors ease-out duration-300 top-1/2 right-3 disabled:opacity-100 text-gray-6 hover:text-gray-7 disabled:hover:text-gray-6",onClick:e,disabled:t,children:h.jsxRuntimeExports.jsx(ne.SvgCloseCircle,{})},"clear-button"),eT=({error:e,size:t="md",check:n,icon:r,leftIcon:o,clear:s=!0,disabled:c=!1,variant:l="default",className:u,...i})=>{const[a,f]=S.useState(i.value??""),{baseStyles:d,variantStyles:p,sizeStyles:g,stateStyles:m}=vx(l,t,e,n,!!r),x=S.useMemo(()=>s&&a?h.jsxRuntimeExports.jsx(yx,{disabled:c,onClick:()=>f("")}):o?h.jsxRuntimeExports.jsx("div",{className:O.classNames("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:o}):null,[s,a,o,c]);return h.jsxRuntimeExports.jsxs("div",{className:O.classNames("relative",u),children:[r&&h.jsxRuntimeExports.jsx("div",{className:O.classNames("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:r}),h.jsxRuntimeExports.jsx(re.input,{...i,value:a,disabled:c,onChange:y=>f(y.target.value),className:O.classNames(...d,...p,g,m,u)}),h.jsxRuntimeExports.jsx(jt,{children:x})]})},tT=({num:e,format:t,useGrouping:n,minFractionDigits:r,maxFractionDigits:o,mode:s,currency:c,currencyDisplay:l,locale:u,prefix:i="",suffix:a=""})=>{if(e==null||!t)return(e==null?void 0:e.toString())??"";const f={useGrouping:n,minimumFractionDigits:r,maximumFractionDigits:o,...s==="currency"&&{style:"currency",currency:c,currencyDisplay:l}},d=new Intl.NumberFormat(u,f).format(e);return`${i} ${d} ${a}`.trim()},nT=(e,t="",n="",r=!0)=>{if(!e)return r?null:0;const o=e.replace(t,"").replace(n,"").replaceAll(/[^\d.-]/g,""),s=Number.parseFloat(o);return Number.isNaN(s)?null:s},rT=(e,t,n)=>e==null||(t==null||e>=t)&&(n==null||e<=n),oT=e=>{const{onChange:t,onValueChange:n,format:r=!0,locale:o="es-MX",mode:s="decimal",currency:c="MXN",currencyDisplay:l="symbol",useGrouping:u=!0,minFractionDigits:i,maxFractionDigits:a,min:f,max:d,allowEmpty:p=!0,prefix:g,suffix:m,...x}=e,[y,E]=S.useState(Number((x==null?void 0:x.value)??null)),[b,R]=S.useState(""),[w,P]=S.useState(!1),C=S.useMemo(()=>({format:r,useGrouping:u,minFractionDigits:i,maxFractionDigits:a,mode:s,currency:c,currencyDisplay:l,locale:o,prefix:g,suffix:m}),[r,u,i,a,s,c,l,o,g,m]),_=S.useCallback(B=>tT({num:B,...C}),[C]),M=S.useCallback(B=>nT(B,g,m,p),[g,m,p]);S.useEffect(()=>{w||R(_(y))},[y,_,w]);const j=S.useCallback(B=>{const q=B.target.value;R(q);const U=M(q);rT(U,f,d)&&(E(U),t==null||t(U),n==null||n({originalEvent:B.nativeEvent,value:U}))},[M,f,d,t,n]),A=S.useCallback(B=>{var q;P(!0),y!=null&&R(y.toString()),(q=x.onFocus)==null||q.call(x,B)},[y,x]),I=S.useCallback(B=>{var q;P(!1),R(_(y)),(q=x.onBlur)==null||q.call(x,B)},[_,y,x]),F=S.useCallback(()=>{R(""),E(null),t==null||t(null)},[t]);return{displayValue:b,handleChange:j,handleFocus:A,handleBlur:I,handleClear:F,...x}},Ex=S.forwardRef((e,t)=>{const{error:n,size:r="md",check:o,icon:s,leftIcon:c,clear:l=!0,disabled:u=!1,variant:i="default",className:a,displayValue:f,handleChange:d,handleFocus:p,handleBlur:g,handleClear:m,...x}=oT(e),{baseStyles:y,variantStyles:E,sizeStyles:b,stateStyles:R}=vx(i,r,n,o,!!s),w=S.useMemo(()=>l&&f?h.jsxRuntimeExports.jsx(yx,{disabled:u,onClick:m}):c?h.jsxRuntimeExports.jsx("div",{className:O.classNames("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":u}),children:c}):null,[l,f,c,u,m]);return h.jsxRuntimeExports.jsxs("div",{className:O.classNames("relative",a),children:[s&&h.jsxRuntimeExports.jsx("div",{className:O.classNames("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":u}),children:s}),h.jsxRuntimeExports.jsx(re.input,{...x,ref:t,type:"text",value:f,disabled:u,onChange:d,onFocus:p,onBlur:g,className:O.classNames(...y,...E,b,R,a)}),h.jsxRuntimeExports.jsx(jt,{children:w})]})});Ex.displayName="InputNumber";const iT={Text:eT,Number:Ex},gl=(e,t)=>`${e}-${t}`,di=S.forwardRef(({children:e,as:t,asChild:n=!1,className:r,italic:o=!1,size:s="base",weight:c="normal",...l},u)=>{if(!e)return null;const i=gl("text",s),a=gl("font",c),f=n?h.Slot:t??"p";return h.jsxRuntimeExports.jsx(f,{ref:u,className:O.classNames("text-grays-Macropay-10",i,a,r,{italic:o}),...l,children:e})});di.displayName="Typography";const sT=({children:e,as:t="p",className:n,...r})=>h.jsxRuntimeExports.jsx(di,{as:t,className:n,...r,children:e}),aT={1:"text-4xl",2:"text-3xl",3:"text-2xl",4:"text-xl",5:"text-lg",6:"text-base"},cT={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},uT=({children:e,className:t="",level:n=1,...r})=>{const o=cT[n];return h.jsxRuntimeExports.jsx(di,{as:o,weight:"bold",className:`${aT[n]} ${t}`,...r,children:e})},un=di;un.Text=sT;un.Title=uT;const lT=({title:e,className:t=""})=>h.jsxRuntimeExports.jsx(un.Title,{level:3,className:t,children:e}),fT={sm:"12rem",md:"16rem",lg:"20rem",xl:"24rem"},dT={sm:"w-56",md:"w-64",lg:"w-80",xl:"w-96"},hT={sm:"px-2 py-1.5",md:"px-3 py-2",lg:"px-4 py-2.5",xl:"px-5 py-3"},bx={sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},pT=({item:e,index:t,isLast:n,size:r,itemClassName:o=""})=>{const s=e.href?"a":"button",c=e.href?{href:e.href}:{onClick:e.onClick,type:"button"};return h.jsxRuntimeExports.jsx(re.li,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2,delay:t*.05},className:O.classNames("border-gray-5 transition-colors duration-200",{"border-b":!n,"hover:bg-gray-3":!e.disabled,"opacity-50 cursor-not-allowed":e.disabled}),children:h.jsxRuntimeExports.jsx(s,{...c,disabled:e.disabled,className:O.classNames("w-full text-left block",hT[r],bx[r],"text-gray-12 no-underline","focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-inset",{"cursor-pointer":!e.disabled,"cursor-not-allowed":e.disabled,[o]:o}),children:e.content})},e.id)},mT=({message:e,size:t})=>h.jsxRuntimeExports.jsx("li",{className:O.classNames("flex items-center justify-center h-full text-gray-9",bx[t]),children:e}),gT=({paginatedItems:e,containerHeight:t,size:n,withPagination:r,showBorder:o,showShadow:s,emptyMessage:c,itemClassName:l=""})=>h.jsxRuntimeExports.jsx("ul",{style:{height:r?"auto":t},className:O.classNames(dT[n],"rounded-lg",{"border border-gray-6":o,"shadow-md":s,"overflow-y-auto scroll-smooth":!r}),children:e.length===0?h.jsxRuntimeExports.jsx(mT,{message:c,size:n}):e.map((u,i)=>h.jsxRuntimeExports.jsx(pT,{item:u,index:i,isLast:i===e.length-1,size:n,itemClassName:l},u.id))}),xT=(e,t,n,r)=>S.useMemo(()=>{if(!t)return e;const o=(n-1)*r,s=o+r;return e.slice(o,s)},[e,t,n,r]),vT=(e,t)=>S.useMemo(()=>Math.ceil(e/t),[e,t]),yT=(e,t)=>t||fT[e],ET=e=>t=>{e&&e(t)},bT=({items:e,title:t,size:n="md",withPagination:r=!1,currentPage:o=1,itemsPerPage:s=10,onPageChange:c,showBorder:l=!0,showShadow:u=!0,height:i,className:a="",titleClassName:f="",itemClassName:d="",emptyMessage:p="No items to display",onAnimationStart:g,onAnimationEnd:m,onAnimationIteration:x,...y})=>{const E=xT(e,r,o,s),b=vT(e.length,s),R=yT(n,i),w=ET(c);return h.jsxRuntimeExports.jsx("div",{onAnimationStart:g,onAnimationEnd:m,onAnimationIteration:x,...y,children:h.jsxRuntimeExports.jsxs(re.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:O.classNames("flex flex-col",{[a]:a}),children:[t&&h.jsxRuntimeExports.jsx(lT,{title:t,size:n,className:f}),h.jsxRuntimeExports.jsx(gT,{paginatedItems:E,containerHeight:R,size:n,withPagination:r,showBorder:l,showShadow:u,emptyMessage:p,itemClassName:d}),r&&b>1&&h.jsxRuntimeExports.jsx(wx,{currentPage:o,totalPages:b,onPageChange:w,size:n})]})})},wT={hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},RT={hidden:{opacity:0,scale:.95,y:8},visible:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:8}},ST=()=>h.jsxRuntimeExports.jsx(U0,{asChild:!0,children:h.jsxRuntimeExports.jsx(re.div,{className:`\r
|
|
109
79
|
fixed inset-0 z-10\r
|
|
110
80
|
bg-gray-500 bg-opacity-75\r
|
|
111
81
|
transition-opacity\r
|
|
112
82
|
backdrop-filter backdrop-blur-sm\r
|
|
113
|
-
`,variants:uO,initial:"hidden",animate:"visible",exit:"exit",onClick:e=>e.stopPropagation()})}),hO=({children:e,panelClassName:t,isCloseAble:n,onClose:r})=>g.jsx("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:g.jsx(We,{align:"center",justify:"center",className:"min-h-full p-4 text-center items-center",children:g.jsx(Mx,{asChild:!0,children:g.jsx(le.div,{variants:fO,initial:"hidden",animate:"visible",exit:"exit",transition:{duration:.2,ease:"easeOut"},className:N.classNames("relative min-w-full md:min-w-104.5 p-6 md:p-8 transform rounded-lg bg-white text-left shadow-xl outline-none max-w-lg",{[t]:t}),children:g.jsxs(We,{className:"relative gap-6",direction:"vertical",align:"center",children:[n&&g.jsx("button",{className:"absolute -right-4 -top-4 md:-right-5 w-auto h-auto",onClick:r,children:g.jsx(ce.SvgClose,{className:"cursor-pointer text-gray-7 text-2xl"})}),e]})})})})}),pO=({type:e="default",title:t,message:n,titleAlign:r="left",children:o})=>!t&&!n?null:g.jsxs(We,{gap:4,className:N.classNames("w-full",{hidden:!t&&!n}),children:[e!=="default"&&g.jsxs(We,{align:"center",justify:"center",className:N.classNames("w-6 h-6 md:h-7 md:w-7 shrink-0 rounded-full text-white",{"bg-error":e==="error","bg-success":e==="success","bg-warning":e==="warning","bg-info":e==="info"}),children:[e==="error"&&g.jsx(ce.SvgClose,{}),e==="success"&&g.jsx(ce.SvgDone,{}),e==="warning"&&g.jsx(ce.SvgExclamation,{}),e==="info"&&g.jsx(ce.SvgInfo,{})]}),g.jsxs(We,{direction:"vertical",gap:2,className:"w-full",children:[typeof t!="string"?t:g.jsx(Ix,{asChild:!0,children:g.jsx(An.Title,{weight:"semibold",level:4,...typeof t!="string"?t:{},className:N.classNames("inline-block",{[`text-${r}`]:r}),children:typeof t=="string"?t:o})}),n&&g.jsx(Nx,{asChild:!0,children:g.jsx("span",{className:"text-base font-normal text-black text-opacity-85",children:n})})]})]}),mO=({buttonCancel:e,buttonOk:t})=>!e&&!t?null:g.jsxs("div",{className:"w-full max-[400px]:grid grid-cols-1 flex flex-wrap justify-end gap-4",children:[t&&g.jsx(ga,{className:"outline-none inline-flex max-[400px]:order-1 order-2",variant:"primary",size:"xl",...t}),e&&g.jsx(ga,{className:"outline-none inline-flex max-[400px]:order-2 order-1",variant:"secondary",size:"xl",...e})]}),gO=({isOpen:e,onClose:t=()=>{},children:n,header:r,title:o,message:i,type:c,titleAlign:u,buttonOk:l,buttonCancel:s,isCloseAble:a,className:f=""})=>g.jsx(Px,{open:e,children:g.jsx(Wt,{children:e&&g.jsxs(Ax,{forceMount:!0,children:[g.jsx(dO,{}),g.jsxs(hO,{panelClassName:f,isCloseAble:a,onClose:t,children:[r,g.jsx(pO,{type:c,title:o,message:i,titleAlign:u,children:n}),n&&g.jsx("div",{children:n,className:"w-full"}),g.jsx(mO,{buttonOk:l,buttonCancel:s})]})]})})}),vO={success:{icon:g.jsx(ce.SvgCheckCircle,{className:"size-6"}),borderColor:"border-green-6",iconColor:"text-green-6"},error:{icon:g.jsx(ce.SvgCloseCircle,{className:"size-6"}),borderColor:"border-primary-red",iconColor:"text-primary-red"},warning:{icon:g.jsx(ce.SvgIconWarning,{className:"size-6"}),borderColor:"border-gold-6",iconColor:"text-gold-6"},info:{icon:g.jsx(ce.SvgInfoCircle,{className:"size-6"}),borderColor:"border-blue-500",iconColor:"text-blue-500"},default:{icon:g.jsx(ce.SvgCloseCircle,{className:"size-6"}),borderColor:"border-gray-300",iconColor:"text-primary-blue"}},yO=e=>({"top-left":{initial:{opacity:0,x:-100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-100,scale:.95}},"top-right":{initial:{opacity:0,x:100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:100,scale:.95}},"top-center":{initial:{opacity:0,y:-50,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-50,scale:.95}},"bottom-left":{initial:{opacity:0,x:-100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-100,scale:.95}},"bottom-right":{initial:{opacity:0,x:100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:100,scale:.95}},"bottom-center":{initial:{opacity:0,y:50,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:50,scale:.95}}})[e||"top-right"],xO=({onClose:e,id:t})=>g.jsx("button",{type:"button",onClick:()=>e==null?void 0:e(t),className:"absolute top-2 right-2 shrink-0 p-1 rounded-md transition-colors text-gray-10 hover:text-gray-12 hover:bg-gray-4 focus:outline-none focus:ring-2 focus:ring-gray-7 cursor-pointer","aria-label":"Close notification",children:g.jsx(ce.SvgClose,{className:"size-6"})}),bO=({IconComponent:e,iconColor:t,defaultIconColor:n})=>e?g.jsx(We,{align:"center",justify:"center",className:N.classNames("w-7 h-7 shrink-0 sm:w-6 sm:h-6",t||n),children:e}):null,{Title:wO,Text:EO}=An,SO=({title:e,message:t,children:n})=>g.jsxs(We,{gap:2,direction:"vertical",justify:"center",className:"w-full",children:[e&&g.jsx(wO,{level:6,weight:"medium",children:e}),t&&g.jsx(EO,{className:"leading-5",size:"sm",children:t}),n]}),CO=({type:e="default",title:t,message:n,duration:r=4e3,id:o,placement:i="top-right",showIcon:c=!0,closable:u=!1,onClose:l,className:s="",children:a,borderColor:f,iconColor:d,...h})=>{const{initial:m,animate:p,exit:v}=yO(i);_.useEffect(()=>{if(r>0){const S=setTimeout(()=>{l==null||l(o)},r);return()=>clearTimeout(S)}},[r,o,l]);const x=e?vO[e]:null,b=x==null?void 0:x.icon,w=N.classNames("px-6 py-4 rounded flex gap-4 max-w-96 shadow-md relative border bg-white",f||(x==null?void 0:x.borderColor),s);return g.jsxs(le.div,{layout:!0,initial:m,animate:p,exit:v,transition:{duration:.35,ease:"easeOut"},className:w,role:"alert","aria-live":"polite",...h,children:[u&&g.jsx(xO,{onClose:l,id:o}),c&&g.jsx(bO,{IconComponent:b,iconColor:d,defaultIconColor:x==null?void 0:x.iconColor}),g.jsx(SO,{title:t,message:n,children:a})]})},$c={sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},Uc={sm:"min-w-8 h-8",md:"min-w-9 h-9",lg:"min-w-10 h-10",xl:"min-w-12 h-12"},_O=5,Ku=({onClick:e,disabled:t,size:n,label:r,children:o})=>g.jsx(le.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:e,disabled:t,className:N.classNames(Uc[n],$c[n],"flex items-center justify-center rounded-md border border-gray-6","transition-colors duration-200","hover:bg-gray-3 active:bg-gray-4","disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent"),"aria-label":r,children:o}),RO=({pageNumber:e,isActive:t,onPageChange:n,size:r})=>g.jsx(le.button,{whileHover:{scale:t?1:1.05},whileTap:{scale:.95},onClick:()=>n(e),className:N.classNames(Uc[r],$c[r],"flex items-center justify-center rounded-md border transition-colors duration-200",{"bg-primary-blue text-white border-primary-blue":t,"border-gray-6 hover:bg-gray-3 active:bg-gray-4":!t}),"aria-label":`Page ${e}`,"aria-current":t?"page":void 0,children:e},e),TO=({prevPage:e,nextPage:t,size:n})=>g.jsx("span",{className:N.classNames(Uc[n],$c[n],"flex items-center justify-center"),children:"..."},`ellipsis-${e}-${t}`),PO=(e,t)=>t<=_O?Array.from({length:t},(n,r)=>r+1):e<=3?[1,2,3,4,"...",t]:e>=t-2?[1,"...",t-3,t-2,t-1,t]:[1,"...",e-1,e,e+1,"...",t],AO=(e,t)=>()=>{e>1&&t(e-1)},OO=(e,t,n)=>()=>{e<t&&n(e+1)},ty=({currentPage:e,totalPages:t,onPageChange:n,size:r="md",className:o=""})=>{const i=AO(e,n),c=OO(e,t,n),u=PO(e,t);return g.jsxs(le.div,{initial:{opacity:0},animate:{opacity:1},className:N.classNames("flex items-center justify-center gap-1 mt-3",{[o]:o}),children:[g.jsx(Ku,{onClick:i,disabled:e===1,size:r,label:"Previous page",children:"←"}),u.map((l,s,a)=>{if(l==="..."){const h=a[s-1]||"start",m=a[s+1]||"end";return g.jsx(TO,{prevPage:h,nextPage:m,size:r},`ellipsis-${h}-${m}`)}const f=l,d=f===e;return g.jsx(RO,{pageNumber:f,isActive:d,onPageChange:n,size:r},f)}),g.jsx(Ku,{onClick:c,disabled:e===t,size:r,label:"Next page",children:"→"})]})},MO=e=>{const t=_.createContext(void 0);return[({value:o,children:i})=>g.jsx(t.Provider,{value:o,children:i}),()=>{const o=_.useContext(t);if(o===void 0)throw new Error(`useContext must be used within a ${e}Provider`);return o}]},[IO]=MO("PopoverContext"),NO=e=>{const[t,n]=dd.useControlledState({value:e==null?void 0:e.open,defaultValue:e==null?void 0:e.defaultOpen,onChange:e==null?void 0:e.onOpenChange});return g.jsx(IO,{value:{open:t,setOpen:n},children:g.jsx(wE,{"data-slot":"popover",...e,onOpenChange:n})})},jO={sm:"h-1",md:"h-2",lg:"h-3",xl:"h-4"},DO={primary:"bg-primary-blue",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500",info:"bg-blue-400"},kO=({value:e=0,classNames:t,indicatorColor:n="primary",customIndicatorClass:r,size:o="md",showLabel:i=!1,labelClassName:c,...u})=>g.jsxs("div",{className:"w-full",children:[g.jsx(PE,{className:N.classNames("relative w-full overflow-hidden rounded-full bg-gray-200",jO[o],t==null?void 0:t.root),value:e,...u,children:g.jsx(AE,{className:N.classNames("h-full transition-transform duration-300 ease-in-out",r||DO[n],t==null?void 0:t.indicator),style:{transform:`translateX(-${100-(e||0)}%)`}})}),i&&g.jsxs("div",{className:N.classNames("mt-1 text-right text-sm text-gray-600",c),children:[e,"%"]})]});var LO=Object.defineProperty,ri=Object.getOwnPropertySymbols,ny=Object.prototype.hasOwnProperty,ry=Object.prototype.propertyIsEnumerable,Yu=(e,t,n)=>t in e?LO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,va=(e,t)=>{for(var n in t||(t={}))ny.call(t,n)&&Yu(e,n,t[n]);if(ri)for(var n of ri(t))ry.call(t,n)&&Yu(e,n,t[n]);return e},ya=(e,t)=>{var n={};for(var r in e)ny.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ri)for(var r of ri(e))t.indexOf(r)<0&&ry.call(e,r)&&(n[r]=e[r]);return n};/**
|
|
83
|
+
`,variants:wT,initial:"hidden",animate:"visible",exit:"exit",onClick:e=>e.stopPropagation()})}),CT=({children:e,panelClassName:t,isCloseAble:n,onClose:r})=>h.jsxRuntimeExports.jsx("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:h.jsxRuntimeExports.jsx(De,{align:"center",justify:"center",className:"min-h-full p-4 text-center items-center",children:h.jsxRuntimeExports.jsx(G0,{asChild:!0,children:h.jsxRuntimeExports.jsx(re.div,{variants:RT,initial:"hidden",animate:"visible",exit:"exit",transition:{duration:.2,ease:"easeOut"},className:O.classNames("relative min-w-full md:min-w-104.5 p-6 md:p-8 transform rounded-lg bg-white text-left shadow-xl outline-none max-w-lg",{[t]:t}),children:h.jsxRuntimeExports.jsxs(De,{className:"relative gap-6",direction:"vertical",align:"center",children:[n&&h.jsxRuntimeExports.jsx("button",{className:"absolute -right-4 -top-4 md:-right-5 w-auto h-auto",onClick:r,children:h.jsxRuntimeExports.jsx(ne.SvgClose,{className:"cursor-pointer text-gray-7 text-2xl"})}),e]})})})})}),_T=({type:e="default",title:t,message:n,titleAlign:r="left",children:o})=>!t&&!n?null:h.jsxRuntimeExports.jsxs(De,{gap:4,className:O.classNames("w-full",{hidden:!t&&!n}),children:[e!=="default"&&h.jsxRuntimeExports.jsxs(De,{align:"center",justify:"center",className:O.classNames("w-6 h-6 md:h-7 md:w-7 shrink-0 rounded-full text-white",{"bg-error":e==="error","bg-success":e==="success","bg-warning":e==="warning","bg-info":e==="info"}),children:[e==="error"&&h.jsxRuntimeExports.jsx(ne.SvgClose,{}),e==="success"&&h.jsxRuntimeExports.jsx(ne.SvgDone,{}),e==="warning"&&h.jsxRuntimeExports.jsx(ne.SvgExclamation,{}),e==="info"&&h.jsxRuntimeExports.jsx(ne.SvgInfo,{})]}),h.jsxRuntimeExports.jsxs(De,{direction:"vertical",gap:2,className:"w-full",children:[typeof t!="string"?t:h.jsxRuntimeExports.jsx(H0,{asChild:!0,children:h.jsxRuntimeExports.jsx(un.Title,{weight:"semibold",level:4,...typeof t!="string"?t:{},className:O.classNames("inline-block",{[`text-${r}`]:r}),children:typeof t=="string"?t:o})}),n&&h.jsxRuntimeExports.jsx(z0,{asChild:!0,children:h.jsxRuntimeExports.jsx("span",{className:"text-base font-normal text-black text-opacity-85",children:n})})]})]}),jT=({buttonCancel:e,buttonOk:t})=>!e&&!t?null:h.jsxRuntimeExports.jsxs("div",{className:"w-full max-[400px]:grid grid-cols-1 flex flex-wrap justify-end gap-4",children:[t&&h.jsxRuntimeExports.jsx(Hs,{className:"outline-none inline-flex max-[400px]:order-1 order-2",variant:"primary",size:"xl",...t}),e&&h.jsxRuntimeExports.jsx(Hs,{className:"outline-none inline-flex max-[400px]:order-2 order-1",variant:"secondary",size:"xl",...e})]}),PT=({isOpen:e,onClose:t=()=>{},children:n,header:r,title:o,message:s,type:c,titleAlign:l,buttonOk:u,buttonCancel:i,isCloseAble:a,className:f=""})=>h.jsxRuntimeExports.jsx(B0,{open:e,children:h.jsxRuntimeExports.jsx(jt,{children:e&&h.jsxRuntimeExports.jsxs($0,{forceMount:!0,children:[h.jsxRuntimeExports.jsx(ST,{}),h.jsxRuntimeExports.jsxs(CT,{panelClassName:f,isCloseAble:a,onClose:t,children:[r,h.jsxRuntimeExports.jsx(_T,{type:c,title:o,message:s,titleAlign:l,children:n}),n&&h.jsxRuntimeExports.jsx("div",{children:n,className:"w-full"}),h.jsxRuntimeExports.jsx(jT,{buttonOk:u,buttonCancel:i})]})]})})}),TT={success:{icon:h.jsxRuntimeExports.jsx(ne.SvgCheckCircle,{className:"size-6"}),borderColor:"border-green-6",iconColor:"text-green-6"},error:{icon:h.jsxRuntimeExports.jsx(ne.SvgCloseCircle,{className:"size-6"}),borderColor:"border-primary-red",iconColor:"text-primary-red"},warning:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconWarning,{className:"size-6"}),borderColor:"border-gold-6",iconColor:"text-gold-6"},info:{icon:h.jsxRuntimeExports.jsx(ne.SvgInfoCircle,{className:"size-6"}),borderColor:"border-blue-500",iconColor:"text-blue-500"},default:{icon:h.jsxRuntimeExports.jsx(ne.SvgCloseCircle,{className:"size-6"}),borderColor:"border-gray-300",iconColor:"text-primary-blue"}},AT=e=>({"top-left":{initial:{opacity:0,x:-100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-100,scale:.95}},"top-right":{initial:{opacity:0,x:100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:100,scale:.95}},"top-center":{initial:{opacity:0,y:-50,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-50,scale:.95}},"bottom-left":{initial:{opacity:0,x:-100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-100,scale:.95}},"bottom-right":{initial:{opacity:0,x:100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:100,scale:.95}},"bottom-center":{initial:{opacity:0,y:50,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:50,scale:.95}}})[e||"top-right"],OT=({onClose:e,id:t})=>h.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>e==null?void 0:e(t),className:"absolute top-2 right-2 shrink-0 p-1 rounded-md transition-colors text-gray-10 hover:text-gray-12 hover:bg-gray-4 focus:outline-none focus:ring-2 focus:ring-gray-7 cursor-pointer","aria-label":"Close notification",children:h.jsxRuntimeExports.jsx(ne.SvgClose,{className:"size-6"})}),MT=({IconComponent:e,iconColor:t,defaultIconColor:n})=>e?h.jsxRuntimeExports.jsx(De,{align:"center",justify:"center",className:O.classNames("w-7 h-7 shrink-0 sm:w-6 sm:h-6",t||n),children:e}):null,{Title:IT,Text:DT}=un,NT=({title:e,message:t,children:n})=>h.jsxRuntimeExports.jsxs(De,{gap:2,direction:"vertical",justify:"center",className:"w-full",children:[e&&h.jsxRuntimeExports.jsx(IT,{level:6,weight:"medium",children:e}),t&&h.jsxRuntimeExports.jsx(DT,{className:"leading-5",size:"sm",children:t}),n]}),kT=({type:e="default",title:t,message:n,duration:r=4e3,id:o,placement:s="top-right",showIcon:c=!0,closable:l=!1,onClose:u,className:i="",children:a,borderColor:f,iconColor:d,...p})=>{const{initial:g,animate:m,exit:x}=AT(s);S.useEffect(()=>{if(r>0){const R=setTimeout(()=>{u==null||u(o)},r);return()=>clearTimeout(R)}},[r,o,u]);const y=e?TT[e]:null,E=y==null?void 0:y.icon,b=O.classNames("px-6 py-4 rounded flex gap-4 max-w-96 shadow-md relative border bg-white",f||(y==null?void 0:y.borderColor),i);return h.jsxRuntimeExports.jsxs(re.div,{layout:!0,initial:g,animate:m,exit:x,transition:{duration:.35,ease:"easeOut"},className:b,role:"alert","aria-live":"polite",...p,children:[l&&h.jsxRuntimeExports.jsx(OT,{onClose:u,id:o}),c&&h.jsxRuntimeExports.jsx(MT,{IconComponent:E,iconColor:d,defaultIconColor:y==null?void 0:y.iconColor}),h.jsxRuntimeExports.jsx(NT,{title:t,message:n,children:a})]})},mc={sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},gc={sm:"min-w-8 h-8",md:"min-w-9 h-9",lg:"min-w-10 h-10",xl:"min-w-12 h-12"},LT=5,xl=({onClick:e,disabled:t,size:n,label:r,children:o})=>h.jsxRuntimeExports.jsx(re.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:e,disabled:t,className:O.classNames(gc[n],mc[n],"flex items-center justify-center rounded-md border border-gray-6","transition-colors duration-200","hover:bg-gray-3 active:bg-gray-4","disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent"),"aria-label":r,children:o}),FT=({pageNumber:e,isActive:t,onPageChange:n,size:r})=>h.jsxRuntimeExports.jsx(re.button,{whileHover:{scale:t?1:1.05},whileTap:{scale:.95},onClick:()=>n(e),className:O.classNames(gc[r],mc[r],"flex items-center justify-center rounded-md border transition-colors duration-200",{"bg-primary-blue text-white border-primary-blue":t,"border-gray-6 hover:bg-gray-3 active:bg-gray-4":!t}),"aria-label":`Page ${e}`,"aria-current":t?"page":void 0,children:e},e),VT=({prevPage:e,nextPage:t,size:n})=>h.jsxRuntimeExports.jsx("span",{className:O.classNames(gc[n],mc[n],"flex items-center justify-center"),children:"..."},`ellipsis-${e}-${t}`),BT=(e,t)=>t<=LT?Array.from({length:t},(n,r)=>r+1):e<=3?[1,2,3,4,"...",t]:e>=t-2?[1,"...",t-3,t-2,t-1,t]:[1,"...",e-1,e,e+1,"...",t],$T=(e,t)=>()=>{e>1&&t(e-1)},UT=(e,t,n)=>()=>{e<t&&n(e+1)},wx=({currentPage:e,totalPages:t,onPageChange:n,size:r="md",className:o=""})=>{const s=$T(e,n),c=UT(e,t,n),l=BT(e,t);return h.jsxRuntimeExports.jsxs(re.div,{initial:{opacity:0},animate:{opacity:1},className:O.classNames("flex items-center justify-center gap-1 mt-3",{[o]:o}),children:[h.jsxRuntimeExports.jsx(xl,{onClick:s,disabled:e===1,size:r,label:"Previous page",children:"←"}),l.map((u,i,a)=>{if(u==="..."){const p=a[i-1]||"start",g=a[i+1]||"end";return h.jsxRuntimeExports.jsx(VT,{prevPage:p,nextPage:g,size:r},`ellipsis-${p}-${g}`)}const f=u,d=f===e;return h.jsxRuntimeExports.jsx(FT,{pageNumber:f,isActive:d,onPageChange:n,size:r},f)}),h.jsxRuntimeExports.jsx(xl,{onClick:c,disabled:e===t,size:r,label:"Next page",children:"→"})]})},GT=e=>{const t=S.createContext(void 0);return[({value:o,children:s})=>h.jsxRuntimeExports.jsx(t.Provider,{value:o,children:s}),()=>{const o=S.useContext(t);if(o===void 0)throw new Error(`useContext must be used within a ${e}Provider`);return o}]},[HT]=GT("PopoverContext"),zT=e=>{const[t,n]=kf.useControlledState({value:e==null?void 0:e.open,defaultValue:e==null?void 0:e.defaultOpen,onChange:e==null?void 0:e.onOpenChange});return h.jsxRuntimeExports.jsx(HT,{value:{open:t,setOpen:n},children:h.jsxRuntimeExports.jsx(Ib,{"data-slot":"popover",...e,onOpenChange:n})})},WT={sm:"h-1",md:"h-2",lg:"h-3",xl:"h-4"},qT={primary:"bg-primary-blue",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500",info:"bg-blue-400"},KT=({value:e=0,classNames:t,indicatorColor:n="primary",customIndicatorClass:r,size:o="md",showLabel:s=!1,labelClassName:c,...l})=>h.jsxRuntimeExports.jsxs("div",{className:"w-full",children:[h.jsxRuntimeExports.jsx(Bb,{className:O.classNames("relative w-full overflow-hidden rounded-full bg-gray-200",WT[o],t==null?void 0:t.root),value:e,...l,children:h.jsxRuntimeExports.jsx($b,{className:O.classNames("h-full transition-transform duration-300 ease-in-out",r||qT[n],t==null?void 0:t.indicator),style:{transform:`translateX(-${100-(e||0)}%)`}})}),s&&h.jsxRuntimeExports.jsxs("div",{className:O.classNames("mt-1 text-right text-sm text-gray-600",c),children:[e,"%"]})]});var XT=Object.defineProperty,Io=Object.getOwnPropertySymbols,Rx=Object.prototype.hasOwnProperty,Sx=Object.prototype.propertyIsEnumerable,vl=(e,t,n)=>t in e?XT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zs=(e,t)=>{for(var n in t||(t={}))Rx.call(t,n)&&vl(e,n,t[n]);if(Io)for(var n of Io(t))Sx.call(t,n)&&vl(e,n,t[n]);return e},Ws=(e,t)=>{var n={};for(var r in e)Rx.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Io)for(var r of Io(e))t.indexOf(r)<0&&Sx.call(e,r)&&(n[r]=e[r]);return n};/**
|
|
114
84
|
* @license QR Code generator library (TypeScript)
|
|
115
85
|
* Copyright (c) Project Nayuki.
|
|
116
86
|
* SPDX-License-Identifier: MIT
|
|
117
|
-
*/var qt;(e=>{const t=class ae{constructor(l,s,a,f){if(this.version=l,this.errorCorrectionLevel=s,this.modules=[],this.isFunction=[],l<ae.MIN_VERSION||l>ae.MAX_VERSION)throw new RangeError("Version value out of range");if(f<-1||f>7)throw new RangeError("Mask value out of range");this.size=l*4+17;let d=[];for(let m=0;m<this.size;m++)d.push(!1);for(let m=0;m<this.size;m++)this.modules.push(d.slice()),this.isFunction.push(d.slice());this.drawFunctionPatterns();const h=this.addEccAndInterleave(a);if(this.drawCodewords(h),f==-1){let m=1e9;for(let p=0;p<8;p++){this.applyMask(p),this.drawFormatBits(p);const v=this.getPenaltyScore();v<m&&(f=p,m=v),this.applyMask(p)}}o(0<=f&&f<=7),this.mask=f,this.applyMask(f),this.drawFormatBits(f),this.isFunction=[]}static encodeText(l,s){const a=e.QrSegment.makeSegments(l);return ae.encodeSegments(a,s)}static encodeBinary(l,s){const a=e.QrSegment.makeBytes(l);return ae.encodeSegments([a],s)}static encodeSegments(l,s,a=1,f=40,d=-1,h=!0){if(!(ae.MIN_VERSION<=a&&a<=f&&f<=ae.MAX_VERSION)||d<-1||d>7)throw new RangeError("Invalid value");let m,p;for(m=a;;m++){const w=ae.getNumDataCodewords(m,s)*8,S=c.getTotalBits(l,m);if(S<=w){p=S;break}if(m>=f)throw new RangeError("Data too long")}for(const w of[ae.Ecc.MEDIUM,ae.Ecc.QUARTILE,ae.Ecc.HIGH])h&&p<=ae.getNumDataCodewords(m,w)*8&&(s=w);let v=[];for(const w of l){n(w.mode.modeBits,4,v),n(w.numChars,w.mode.numCharCountBits(m),v);for(const S of w.getData())v.push(S)}o(v.length==p);const x=ae.getNumDataCodewords(m,s)*8;o(v.length<=x),n(0,Math.min(4,x-v.length),v),n(0,(8-v.length%8)%8,v),o(v.length%8==0);for(let w=236;v.length<x;w^=253)n(w,8,v);let b=[];for(;b.length*8<v.length;)b.push(0);return v.forEach((w,S)=>b[S>>>3]|=w<<7-(S&7)),new ae(m,s,b,d)}getModule(l,s){return 0<=l&&l<this.size&&0<=s&&s<this.size&&this.modules[s][l]}getModules(){return this.modules}drawFunctionPatterns(){for(let a=0;a<this.size;a++)this.setFunctionModule(6,a,a%2==0),this.setFunctionModule(a,6,a%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const l=this.getAlignmentPatternPositions(),s=l.length;for(let a=0;a<s;a++)for(let f=0;f<s;f++)a==0&&f==0||a==0&&f==s-1||a==s-1&&f==0||this.drawAlignmentPattern(l[a],l[f]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(l){const s=this.errorCorrectionLevel.formatBits<<3|l;let a=s;for(let d=0;d<10;d++)a=a<<1^(a>>>9)*1335;const f=(s<<10|a)^21522;o(f>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,r(f,d));this.setFunctionModule(8,7,r(f,6)),this.setFunctionModule(8,8,r(f,7)),this.setFunctionModule(7,8,r(f,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,r(f,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,r(f,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,r(f,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let l=this.version;for(let a=0;a<12;a++)l=l<<1^(l>>>11)*7973;const s=this.version<<12|l;o(s>>>18==0);for(let a=0;a<18;a++){const f=r(s,a),d=this.size-11+a%3,h=Math.floor(a/3);this.setFunctionModule(d,h,f),this.setFunctionModule(h,d,f)}}drawFinderPattern(l,s){for(let a=-4;a<=4;a++)for(let f=-4;f<=4;f++){const d=Math.max(Math.abs(f),Math.abs(a)),h=l+f,m=s+a;0<=h&&h<this.size&&0<=m&&m<this.size&&this.setFunctionModule(h,m,d!=2&&d!=4)}}drawAlignmentPattern(l,s){for(let a=-2;a<=2;a++)for(let f=-2;f<=2;f++)this.setFunctionModule(l+f,s+a,Math.max(Math.abs(f),Math.abs(a))!=1)}setFunctionModule(l,s,a){this.modules[s][l]=a,this.isFunction[s][l]=!0}addEccAndInterleave(l){const s=this.version,a=this.errorCorrectionLevel;if(l.length!=ae.getNumDataCodewords(s,a))throw new RangeError("Invalid argument");const f=ae.NUM_ERROR_CORRECTION_BLOCKS[a.ordinal][s],d=ae.ECC_CODEWORDS_PER_BLOCK[a.ordinal][s],h=Math.floor(ae.getNumRawDataModules(s)/8),m=f-h%f,p=Math.floor(h/f);let v=[];const x=ae.reedSolomonComputeDivisor(d);for(let w=0,S=0;w<f;w++){let E=l.slice(S,S+p-d+(w<m?0:1));S+=E.length;const A=ae.reedSolomonComputeRemainder(E,x);w<m&&E.push(0),v.push(E.concat(A))}let b=[];for(let w=0;w<v[0].length;w++)v.forEach((S,E)=>{(w!=p-d||E>=m)&&b.push(S[w])});return o(b.length==h),b}drawCodewords(l){if(l.length!=Math.floor(ae.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let a=this.size-1;a>=1;a-=2){a==6&&(a=5);for(let f=0;f<this.size;f++)for(let d=0;d<2;d++){const h=a-d,p=(a+1&2)==0?this.size-1-f:f;!this.isFunction[p][h]&&s<l.length*8&&(this.modules[p][h]=r(l[s>>>3],7-(s&7)),s++)}}o(s==l.length*8)}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let s=0;s<this.size;s++)for(let a=0;a<this.size;a++){let f;switch(l){case 0:f=(a+s)%2==0;break;case 1:f=s%2==0;break;case 2:f=a%3==0;break;case 3:f=(a+s)%3==0;break;case 4:f=(Math.floor(a/3)+Math.floor(s/2))%2==0;break;case 5:f=a*s%2+a*s%3==0;break;case 6:f=(a*s%2+a*s%3)%2==0;break;case 7:f=((a+s)%2+a*s%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[s][a]&&f&&(this.modules[s][a]=!this.modules[s][a])}}getPenaltyScore(){let l=0;for(let d=0;d<this.size;d++){let h=!1,m=0,p=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[d][v]==h?(m++,m==5?l+=ae.PENALTY_N1:m>5&&l++):(this.finderPenaltyAddHistory(m,p),h||(l+=this.finderPenaltyCountPatterns(p)*ae.PENALTY_N3),h=this.modules[d][v],m=1);l+=this.finderPenaltyTerminateAndCount(h,m,p)*ae.PENALTY_N3}for(let d=0;d<this.size;d++){let h=!1,m=0,p=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[v][d]==h?(m++,m==5?l+=ae.PENALTY_N1:m>5&&l++):(this.finderPenaltyAddHistory(m,p),h||(l+=this.finderPenaltyCountPatterns(p)*ae.PENALTY_N3),h=this.modules[v][d],m=1);l+=this.finderPenaltyTerminateAndCount(h,m,p)*ae.PENALTY_N3}for(let d=0;d<this.size-1;d++)for(let h=0;h<this.size-1;h++){const m=this.modules[d][h];m==this.modules[d][h+1]&&m==this.modules[d+1][h]&&m==this.modules[d+1][h+1]&&(l+=ae.PENALTY_N2)}let s=0;for(const d of this.modules)s=d.reduce((h,m)=>h+(m?1:0),s);const a=this.size*this.size,f=Math.ceil(Math.abs(s*20-a*10)/a)-1;return o(0<=f&&f<=9),l+=f*ae.PENALTY_N4,o(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return[];{const l=Math.floor(this.version/7)+2,s=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2;let a=[6];for(let f=this.size-7;a.length<l;f-=s)a.splice(1,0,f);return a}}static getNumRawDataModules(l){if(l<ae.MIN_VERSION||l>ae.MAX_VERSION)throw new RangeError("Version number out of range");let s=(16*l+128)*l+64;if(l>=2){const a=Math.floor(l/7)+2;s-=(25*a-10)*a-55,l>=7&&(s-=36)}return o(208<=s&&s<=29648),s}static getNumDataCodewords(l,s){return Math.floor(ae.getNumRawDataModules(l)/8)-ae.ECC_CODEWORDS_PER_BLOCK[s.ordinal][l]*ae.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");let s=[];for(let f=0;f<l-1;f++)s.push(0);s.push(1);let a=1;for(let f=0;f<l;f++){for(let d=0;d<s.length;d++)s[d]=ae.reedSolomonMultiply(s[d],a),d+1<s.length&&(s[d]^=s[d+1]);a=ae.reedSolomonMultiply(a,2)}return s}static reedSolomonComputeRemainder(l,s){let a=s.map(f=>0);for(const f of l){const d=f^a.shift();a.push(0),s.forEach((h,m)=>a[m]^=ae.reedSolomonMultiply(h,d))}return a}static reedSolomonMultiply(l,s){if(l>>>8||s>>>8)throw new RangeError("Byte out of range");let a=0;for(let f=7;f>=0;f--)a=a<<1^(a>>>7)*285,a^=(s>>>f&1)*l;return o(a>>>8==0),a}finderPenaltyCountPatterns(l){const s=l[1];o(s<=this.size*3);const a=s>0&&l[2]==s&&l[3]==s*3&&l[4]==s&&l[5]==s;return(a&&l[0]>=s*4&&l[6]>=s?1:0)+(a&&l[6]>=s*4&&l[0]>=s?1:0)}finderPenaltyTerminateAndCount(l,s,a){return l&&(this.finderPenaltyAddHistory(s,a),s=0),s+=this.size,this.finderPenaltyAddHistory(s,a),this.finderPenaltyCountPatterns(a)}finderPenaltyAddHistory(l,s){s[0]==0&&(l+=this.size),s.pop(),s.unshift(l)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(u,l,s){if(l<0||l>31||u>>>l)throw new RangeError("Value out of range");for(let a=l-1;a>=0;a--)s.push(u>>>a&1)}function r(u,l){return(u>>>l&1)!=0}function o(u){if(!u)throw new Error("Assertion error")}const i=class xe{constructor(l,s,a){if(this.mode=l,this.numChars=s,this.bitData=a,s<0)throw new RangeError("Invalid argument");this.bitData=a.slice()}static makeBytes(l){let s=[];for(const a of l)n(a,8,s);return new xe(xe.Mode.BYTE,l.length,s)}static makeNumeric(l){if(!xe.isNumeric(l))throw new RangeError("String contains non-numeric characters");let s=[];for(let a=0;a<l.length;){const f=Math.min(l.length-a,3);n(parseInt(l.substring(a,a+f),10),f*3+1,s),a+=f}return new xe(xe.Mode.NUMERIC,l.length,s)}static makeAlphanumeric(l){if(!xe.isAlphanumeric(l))throw new RangeError("String contains unencodable characters in alphanumeric mode");let s=[],a;for(a=0;a+2<=l.length;a+=2){let f=xe.ALPHANUMERIC_CHARSET.indexOf(l.charAt(a))*45;f+=xe.ALPHANUMERIC_CHARSET.indexOf(l.charAt(a+1)),n(f,11,s)}return a<l.length&&n(xe.ALPHANUMERIC_CHARSET.indexOf(l.charAt(a)),6,s),new xe(xe.Mode.ALPHANUMERIC,l.length,s)}static makeSegments(l){return l==""?[]:xe.isNumeric(l)?[xe.makeNumeric(l)]:xe.isAlphanumeric(l)?[xe.makeAlphanumeric(l)]:[xe.makeBytes(xe.toUtf8ByteArray(l))]}static makeEci(l){let s=[];if(l<0)throw new RangeError("ECI assignment value out of range");if(l<128)n(l,8,s);else if(l<16384)n(2,2,s),n(l,14,s);else if(l<1e6)n(6,3,s),n(l,21,s);else throw new RangeError("ECI assignment value out of range");return new xe(xe.Mode.ECI,0,s)}static isNumeric(l){return xe.NUMERIC_REGEX.test(l)}static isAlphanumeric(l){return xe.ALPHANUMERIC_REGEX.test(l)}getData(){return this.bitData.slice()}static getTotalBits(l,s){let a=0;for(const f of l){const d=f.mode.numCharCountBits(s);if(f.numChars>=1<<d)return 1/0;a+=4+d+f.bitData.length}return a}static toUtf8ByteArray(l){l=encodeURI(l);let s=[];for(let a=0;a<l.length;a++)l.charAt(a)!="%"?s.push(l.charCodeAt(a)):(s.push(parseInt(l.substring(a+1,a+3),16)),a+=2);return s}};i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let c=i;e.QrSegment=i})(qt||(qt={}));(e=>{(t=>{const n=class{constructor(o,i){this.ordinal=o,this.formatBits=i}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(qt||(qt={}));(e=>{(t=>{const n=class{constructor(o,i){this.modeBits=o,this.numBitsCharCount=i}numCharCountBits(o){return this.numBitsCharCount[Math.floor((o+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(qt||(qt={}));var fn=qt;/**
|
|
87
|
+
*/var Pt;(e=>{const t=class te{constructor(u,i,a,f){if(this.version=u,this.errorCorrectionLevel=i,this.modules=[],this.isFunction=[],u<te.MIN_VERSION||u>te.MAX_VERSION)throw new RangeError("Version value out of range");if(f<-1||f>7)throw new RangeError("Mask value out of range");this.size=u*4+17;let d=[];for(let g=0;g<this.size;g++)d.push(!1);for(let g=0;g<this.size;g++)this.modules.push(d.slice()),this.isFunction.push(d.slice());this.drawFunctionPatterns();const p=this.addEccAndInterleave(a);if(this.drawCodewords(p),f==-1){let g=1e9;for(let m=0;m<8;m++){this.applyMask(m),this.drawFormatBits(m);const x=this.getPenaltyScore();x<g&&(f=m,g=x),this.applyMask(m)}}o(0<=f&&f<=7),this.mask=f,this.applyMask(f),this.drawFormatBits(f),this.isFunction=[]}static encodeText(u,i){const a=e.QrSegment.makeSegments(u);return te.encodeSegments(a,i)}static encodeBinary(u,i){const a=e.QrSegment.makeBytes(u);return te.encodeSegments([a],i)}static encodeSegments(u,i,a=1,f=40,d=-1,p=!0){if(!(te.MIN_VERSION<=a&&a<=f&&f<=te.MAX_VERSION)||d<-1||d>7)throw new RangeError("Invalid value");let g,m;for(g=a;;g++){const b=te.getNumDataCodewords(g,i)*8,R=c.getTotalBits(u,g);if(R<=b){m=R;break}if(g>=f)throw new RangeError("Data too long")}for(const b of[te.Ecc.MEDIUM,te.Ecc.QUARTILE,te.Ecc.HIGH])p&&m<=te.getNumDataCodewords(g,b)*8&&(i=b);let x=[];for(const b of u){n(b.mode.modeBits,4,x),n(b.numChars,b.mode.numCharCountBits(g),x);for(const R of b.getData())x.push(R)}o(x.length==m);const y=te.getNumDataCodewords(g,i)*8;o(x.length<=y),n(0,Math.min(4,y-x.length),x),n(0,(8-x.length%8)%8,x),o(x.length%8==0);for(let b=236;x.length<y;b^=253)n(b,8,x);let E=[];for(;E.length*8<x.length;)E.push(0);return x.forEach((b,R)=>E[R>>>3]|=b<<7-(R&7)),new te(g,i,E,d)}getModule(u,i){return 0<=u&&u<this.size&&0<=i&&i<this.size&&this.modules[i][u]}getModules(){return this.modules}drawFunctionPatterns(){for(let a=0;a<this.size;a++)this.setFunctionModule(6,a,a%2==0),this.setFunctionModule(a,6,a%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const u=this.getAlignmentPatternPositions(),i=u.length;for(let a=0;a<i;a++)for(let f=0;f<i;f++)a==0&&f==0||a==0&&f==i-1||a==i-1&&f==0||this.drawAlignmentPattern(u[a],u[f]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(u){const i=this.errorCorrectionLevel.formatBits<<3|u;let a=i;for(let d=0;d<10;d++)a=a<<1^(a>>>9)*1335;const f=(i<<10|a)^21522;o(f>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,r(f,d));this.setFunctionModule(8,7,r(f,6)),this.setFunctionModule(8,8,r(f,7)),this.setFunctionModule(7,8,r(f,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,r(f,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,r(f,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,r(f,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let u=this.version;for(let a=0;a<12;a++)u=u<<1^(u>>>11)*7973;const i=this.version<<12|u;o(i>>>18==0);for(let a=0;a<18;a++){const f=r(i,a),d=this.size-11+a%3,p=Math.floor(a/3);this.setFunctionModule(d,p,f),this.setFunctionModule(p,d,f)}}drawFinderPattern(u,i){for(let a=-4;a<=4;a++)for(let f=-4;f<=4;f++){const d=Math.max(Math.abs(f),Math.abs(a)),p=u+f,g=i+a;0<=p&&p<this.size&&0<=g&&g<this.size&&this.setFunctionModule(p,g,d!=2&&d!=4)}}drawAlignmentPattern(u,i){for(let a=-2;a<=2;a++)for(let f=-2;f<=2;f++)this.setFunctionModule(u+f,i+a,Math.max(Math.abs(f),Math.abs(a))!=1)}setFunctionModule(u,i,a){this.modules[i][u]=a,this.isFunction[i][u]=!0}addEccAndInterleave(u){const i=this.version,a=this.errorCorrectionLevel;if(u.length!=te.getNumDataCodewords(i,a))throw new RangeError("Invalid argument");const f=te.NUM_ERROR_CORRECTION_BLOCKS[a.ordinal][i],d=te.ECC_CODEWORDS_PER_BLOCK[a.ordinal][i],p=Math.floor(te.getNumRawDataModules(i)/8),g=f-p%f,m=Math.floor(p/f);let x=[];const y=te.reedSolomonComputeDivisor(d);for(let b=0,R=0;b<f;b++){let w=u.slice(R,R+m-d+(b<g?0:1));R+=w.length;const P=te.reedSolomonComputeRemainder(w,y);b<g&&w.push(0),x.push(w.concat(P))}let E=[];for(let b=0;b<x[0].length;b++)x.forEach((R,w)=>{(b!=m-d||w>=g)&&E.push(R[b])});return o(E.length==p),E}drawCodewords(u){if(u.length!=Math.floor(te.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let i=0;for(let a=this.size-1;a>=1;a-=2){a==6&&(a=5);for(let f=0;f<this.size;f++)for(let d=0;d<2;d++){const p=a-d,m=(a+1&2)==0?this.size-1-f:f;!this.isFunction[m][p]&&i<u.length*8&&(this.modules[m][p]=r(u[i>>>3],7-(i&7)),i++)}}o(i==u.length*8)}applyMask(u){if(u<0||u>7)throw new RangeError("Mask value out of range");for(let i=0;i<this.size;i++)for(let a=0;a<this.size;a++){let f;switch(u){case 0:f=(a+i)%2==0;break;case 1:f=i%2==0;break;case 2:f=a%3==0;break;case 3:f=(a+i)%3==0;break;case 4:f=(Math.floor(a/3)+Math.floor(i/2))%2==0;break;case 5:f=a*i%2+a*i%3==0;break;case 6:f=(a*i%2+a*i%3)%2==0;break;case 7:f=((a+i)%2+a*i%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[i][a]&&f&&(this.modules[i][a]=!this.modules[i][a])}}getPenaltyScore(){let u=0;for(let d=0;d<this.size;d++){let p=!1,g=0,m=[0,0,0,0,0,0,0];for(let x=0;x<this.size;x++)this.modules[d][x]==p?(g++,g==5?u+=te.PENALTY_N1:g>5&&u++):(this.finderPenaltyAddHistory(g,m),p||(u+=this.finderPenaltyCountPatterns(m)*te.PENALTY_N3),p=this.modules[d][x],g=1);u+=this.finderPenaltyTerminateAndCount(p,g,m)*te.PENALTY_N3}for(let d=0;d<this.size;d++){let p=!1,g=0,m=[0,0,0,0,0,0,0];for(let x=0;x<this.size;x++)this.modules[x][d]==p?(g++,g==5?u+=te.PENALTY_N1:g>5&&u++):(this.finderPenaltyAddHistory(g,m),p||(u+=this.finderPenaltyCountPatterns(m)*te.PENALTY_N3),p=this.modules[x][d],g=1);u+=this.finderPenaltyTerminateAndCount(p,g,m)*te.PENALTY_N3}for(let d=0;d<this.size-1;d++)for(let p=0;p<this.size-1;p++){const g=this.modules[d][p];g==this.modules[d][p+1]&&g==this.modules[d+1][p]&&g==this.modules[d+1][p+1]&&(u+=te.PENALTY_N2)}let i=0;for(const d of this.modules)i=d.reduce((p,g)=>p+(g?1:0),i);const a=this.size*this.size,f=Math.ceil(Math.abs(i*20-a*10)/a)-1;return o(0<=f&&f<=9),u+=f*te.PENALTY_N4,o(0<=u&&u<=2568888),u}getAlignmentPatternPositions(){if(this.version==1)return[];{const u=Math.floor(this.version/7)+2,i=this.version==32?26:Math.ceil((this.version*4+4)/(u*2-2))*2;let a=[6];for(let f=this.size-7;a.length<u;f-=i)a.splice(1,0,f);return a}}static getNumRawDataModules(u){if(u<te.MIN_VERSION||u>te.MAX_VERSION)throw new RangeError("Version number out of range");let i=(16*u+128)*u+64;if(u>=2){const a=Math.floor(u/7)+2;i-=(25*a-10)*a-55,u>=7&&(i-=36)}return o(208<=i&&i<=29648),i}static getNumDataCodewords(u,i){return Math.floor(te.getNumRawDataModules(u)/8)-te.ECC_CODEWORDS_PER_BLOCK[i.ordinal][u]*te.NUM_ERROR_CORRECTION_BLOCKS[i.ordinal][u]}static reedSolomonComputeDivisor(u){if(u<1||u>255)throw new RangeError("Degree out of range");let i=[];for(let f=0;f<u-1;f++)i.push(0);i.push(1);let a=1;for(let f=0;f<u;f++){for(let d=0;d<i.length;d++)i[d]=te.reedSolomonMultiply(i[d],a),d+1<i.length&&(i[d]^=i[d+1]);a=te.reedSolomonMultiply(a,2)}return i}static reedSolomonComputeRemainder(u,i){let a=i.map(f=>0);for(const f of u){const d=f^a.shift();a.push(0),i.forEach((p,g)=>a[g]^=te.reedSolomonMultiply(p,d))}return a}static reedSolomonMultiply(u,i){if(u>>>8||i>>>8)throw new RangeError("Byte out of range");let a=0;for(let f=7;f>=0;f--)a=a<<1^(a>>>7)*285,a^=(i>>>f&1)*u;return o(a>>>8==0),a}finderPenaltyCountPatterns(u){const i=u[1];o(i<=this.size*3);const a=i>0&&u[2]==i&&u[3]==i*3&&u[4]==i&&u[5]==i;return(a&&u[0]>=i*4&&u[6]>=i?1:0)+(a&&u[6]>=i*4&&u[0]>=i?1:0)}finderPenaltyTerminateAndCount(u,i,a){return u&&(this.finderPenaltyAddHistory(i,a),i=0),i+=this.size,this.finderPenaltyAddHistory(i,a),this.finderPenaltyCountPatterns(a)}finderPenaltyAddHistory(u,i){i[0]==0&&(u+=this.size),i.pop(),i.unshift(u)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(l,u,i){if(u<0||u>31||l>>>u)throw new RangeError("Value out of range");for(let a=u-1;a>=0;a--)i.push(l>>>a&1)}function r(l,u){return(l>>>u&1)!=0}function o(l){if(!l)throw new Error("Assertion error")}const s=class fe{constructor(u,i,a){if(this.mode=u,this.numChars=i,this.bitData=a,i<0)throw new RangeError("Invalid argument");this.bitData=a.slice()}static makeBytes(u){let i=[];for(const a of u)n(a,8,i);return new fe(fe.Mode.BYTE,u.length,i)}static makeNumeric(u){if(!fe.isNumeric(u))throw new RangeError("String contains non-numeric characters");let i=[];for(let a=0;a<u.length;){const f=Math.min(u.length-a,3);n(parseInt(u.substring(a,a+f),10),f*3+1,i),a+=f}return new fe(fe.Mode.NUMERIC,u.length,i)}static makeAlphanumeric(u){if(!fe.isAlphanumeric(u))throw new RangeError("String contains unencodable characters in alphanumeric mode");let i=[],a;for(a=0;a+2<=u.length;a+=2){let f=fe.ALPHANUMERIC_CHARSET.indexOf(u.charAt(a))*45;f+=fe.ALPHANUMERIC_CHARSET.indexOf(u.charAt(a+1)),n(f,11,i)}return a<u.length&&n(fe.ALPHANUMERIC_CHARSET.indexOf(u.charAt(a)),6,i),new fe(fe.Mode.ALPHANUMERIC,u.length,i)}static makeSegments(u){return u==""?[]:fe.isNumeric(u)?[fe.makeNumeric(u)]:fe.isAlphanumeric(u)?[fe.makeAlphanumeric(u)]:[fe.makeBytes(fe.toUtf8ByteArray(u))]}static makeEci(u){let i=[];if(u<0)throw new RangeError("ECI assignment value out of range");if(u<128)n(u,8,i);else if(u<16384)n(2,2,i),n(u,14,i);else if(u<1e6)n(6,3,i),n(u,21,i);else throw new RangeError("ECI assignment value out of range");return new fe(fe.Mode.ECI,0,i)}static isNumeric(u){return fe.NUMERIC_REGEX.test(u)}static isAlphanumeric(u){return fe.ALPHANUMERIC_REGEX.test(u)}getData(){return this.bitData.slice()}static getTotalBits(u,i){let a=0;for(const f of u){const d=f.mode.numCharCountBits(i);if(f.numChars>=1<<d)return 1/0;a+=4+d+f.bitData.length}return a}static toUtf8ByteArray(u){u=encodeURI(u);let i=[];for(let a=0;a<u.length;a++)u.charAt(a)!="%"?i.push(u.charCodeAt(a)):(i.push(parseInt(u.substring(a+1,a+3),16)),a+=2);return i}};s.NUMERIC_REGEX=/^[0-9]*$/,s.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,s.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let c=s;e.QrSegment=s})(Pt||(Pt={}));(e=>{(t=>{const n=class{constructor(o,s){this.ordinal=o,this.formatBits=s}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(Pt||(Pt={}));(e=>{(t=>{const n=class{constructor(o,s){this.modeBits=o,this.numBitsCharCount=s}numCharCountBits(o){return this.numBitsCharCount[Math.floor((o+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(Pt||(Pt={}));var Ht=Pt;/**
|
|
118
88
|
* @license qrcode.react
|
|
119
89
|
* Copyright (c) Paul O'Shannessy
|
|
120
90
|
* SPDX-License-Identifier: ISC
|
|
121
|
-
*/var FO={L:fn.QrCode.Ecc.LOW,M:fn.QrCode.Ecc.MEDIUM,Q:fn.QrCode.Ecc.QUARTILE,H:fn.QrCode.Ecc.HIGH},oy=128,iy="L",sy="#FFFFFF",ay="#000000",cy=!1,ly=1,VO=4,BO=0,$O=.1;function uy(e,t=0){const n=[];return e.forEach(function(r,o){let i=null;r.forEach(function(c,u){if(!c&&i!==null){n.push(`M${i+t} ${o+t}h${u-i}v1H${i+t}z`),i=null;return}if(u===r.length-1){if(!c)return;i===null?n.push(`M${u+t},${o+t} h1v1H${u+t}z`):n.push(`M${i+t},${o+t} h${u+1-i}v1H${i+t}z`);return}c&&i===null&&(i=u)})}),n.join("")}function fy(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((o,i)=>i<t.x||i>=t.x+t.w?o:!1))}function UO(e,t,n,r){if(r==null)return null;const o=e.length+n*2,i=Math.floor(t*$O),c=o/t,u=(r.width||i)*c,l=(r.height||i)*c,s=r.x==null?e.length/2-u/2:r.x*c,a=r.y==null?e.length/2-l/2:r.y*c,f=r.opacity==null?1:r.opacity;let d=null;if(r.excavate){let m=Math.floor(s),p=Math.floor(a),v=Math.ceil(u+s-m),x=Math.ceil(l+a-p);d={x:m,y:p,w:v,h:x}}const h=r.crossOrigin;return{x:s,y:a,h:l,w:u,excavation:d,opacity:f,crossOrigin:h}}function GO(e,t){return t!=null?Math.max(Math.floor(t),0):e?VO:BO}function dy({value:e,level:t,minVersion:n,includeMargin:r,marginSize:o,imageSettings:i,size:c,boostLevel:u}){let l=_.useMemo(()=>{const m=(Array.isArray(e)?e:[e]).reduce((p,v)=>(p.push(...fn.QrSegment.makeSegments(v)),p),[]);return fn.QrCode.encodeSegments(m,FO[t],n,void 0,void 0,u)},[e,t,n,u]);const{cells:s,margin:a,numCells:f,calculatedImageSettings:d}=_.useMemo(()=>{let h=l.getModules();const m=GO(r,o),p=h.length+m*2,v=UO(h,c,m,i);return{cells:h,margin:m,numCells:p,calculatedImageSettings:v}},[l,c,i,r,o]);return{qrcode:l,margin:a,cells:s,numCells:f,calculatedImageSettings:d}}var HO=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),zO=_.forwardRef(function(t,n){const r=t,{value:o,size:i=oy,level:c=iy,bgColor:u=sy,fgColor:l=ay,includeMargin:s=cy,minVersion:a=ly,boostLevel:f,marginSize:d,imageSettings:h}=r,p=ya(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:v}=p,x=ya(p,["style"]),b=h==null?void 0:h.src,w=_.useRef(null),S=_.useRef(null),E=_.useCallback($=>{w.current=$,typeof n=="function"?n($):n&&(n.current=$)},[n]),[A,R]=_.useState(!1),{margin:T,cells:I,numCells:P,calculatedImageSettings:M}=dy({value:o,level:c,minVersion:a,boostLevel:f,includeMargin:s,marginSize:d,imageSettings:h,size:i});_.useEffect(()=>{if(w.current!=null){const $=w.current,K=$.getContext("2d");if(!K)return;let G=I;const H=S.current,U=M!=null&&H!==null&&H.complete&&H.naturalHeight!==0&&H.naturalWidth!==0;U&&M.excavation!=null&&(G=fy(I,M.excavation));const L=window.devicePixelRatio||1;$.height=$.width=i*L;const O=i/P*L;K.scale(O,O),K.fillStyle=u,K.fillRect(0,0,P,P),K.fillStyle=l,HO?K.fill(new Path2D(uy(G,T))):I.forEach(function(k,ee){k.forEach(function(ne,X){ne&&K.fillRect(X+T,ee+T,1,1)})}),M&&(K.globalAlpha=M.opacity),U&&K.drawImage(H,M.x+T,M.y+T,M.w,M.h)}}),_.useEffect(()=>{R(!1)},[b]);const j=va({height:i,width:i},v);let V=null;return b!=null&&(V=_.createElement("img",{src:b,key:b,style:{display:"none"},onLoad:()=>{R(!0)},ref:S,crossOrigin:M==null?void 0:M.crossOrigin})),_.createElement(_.Fragment,null,_.createElement("canvas",va({style:j,height:i,width:i,ref:E,role:"img"},x)),V)});zO.displayName="QRCodeCanvas";var hy=_.forwardRef(function(t,n){const r=t,{value:o,size:i=oy,level:c=iy,bgColor:u=sy,fgColor:l=ay,includeMargin:s=cy,minVersion:a=ly,boostLevel:f,title:d,marginSize:h,imageSettings:m}=r,p=ya(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:v,cells:x,numCells:b,calculatedImageSettings:w}=dy({value:o,level:c,minVersion:a,boostLevel:f,includeMargin:s,marginSize:h,imageSettings:m,size:i});let S=x,E=null;m!=null&&w!=null&&(w.excavation!=null&&(S=fy(x,w.excavation)),E=_.createElement("image",{href:m.src,height:w.h,width:w.w,x:w.x+v,y:w.y+v,preserveAspectRatio:"none",opacity:w.opacity,crossOrigin:w.crossOrigin}));const A=uy(S,v);return _.createElement("svg",va({height:i,width:i,viewBox:`0 0 ${b} ${b}`,ref:n,role:"img"},p),!!d&&_.createElement("title",null,d),_.createElement("path",{fill:u,d:`M0,0 h${b}v${b}H0z`,shapeRendering:"crispEdges"}),_.createElement("path",{fill:l,d:A,shapeRendering:"crispEdges"}),E)});hy.displayName="QRCodeSVG";const WO=e=>{const{value:t,className:n="",size:r=200,bgColor:o="#FFFFFF",fgColor:i="#000000",level:c="M",marginSize:u=4,imageSettings:l,...s}=e,a=N.classNames("flex items-center justify-center",n);return g.jsx("div",{className:a,...s,children:g.jsx(hy,{value:t,size:r,bgColor:o,fgColor:i,level:c,marginSize:u,imageSettings:l})})};var Wr={},kn={},qr={},Xu;function Be(){if(Xu)return qr;Xu=1,Object.defineProperty(qr,"__esModule",{value:!0});function e(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}var t=function n(r,o){e(this,n),this.data=r,this.text=o.text||r,this.options=o};return qr.default=t,qr}var Zu;function qO(){if(Zu)return kn;Zu=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.CODE39=void 0;var e=(function(){function p(v,x){for(var b=0;b<x.length;b++){var w=x[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,x,b){return x&&p(v.prototype,x),b&&p(v,b),v}})(),t=Be(),n=r(t);function r(p){return p&&p.__esModule?p:{default:p}}function o(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function i(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function c(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var u=(function(p){c(v,p);function v(x,b){return o(this,v),x=x.toUpperCase(),b.mod43&&(x+=d(m(x))),i(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,x,b))}return e(v,[{key:"encode",value:function(){for(var b=a("*"),w=0;w<this.data.length;w++)b+=a(this.data[w])+"0";return b+=a("*"),{data:b,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),v})(n.default),l=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],s=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function a(p){return f(h(p))}function f(p){return s[p].toString(2)}function d(p){return l[p]}function h(p){return l.indexOf(p)}function m(p){for(var v=0,x=0;x<p.length;x++)v+=h(p[x]);return v=v%43,v}return kn.CODE39=u,kn}var Ke={},Kr={},Yr={},ye={},Qu;function Rr(){if(Qu)return ye;Qu=1,Object.defineProperty(ye,"__esModule",{value:!0});var e;function t(l,s,a){return s in l?Object.defineProperty(l,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[s]=a,l}var n=ye.SET_A=0,r=ye.SET_B=1,o=ye.SET_C=2;ye.SHIFT=98;var i=ye.START_A=103,c=ye.START_B=104,u=ye.START_C=105;return ye.MODULO=103,ye.STOP=106,ye.FNC1=207,ye.SET_BY_CODE=(e={},t(e,i,n),t(e,c,r),t(e,u,o),e),ye.SWAP={101:n,100:r,99:o},ye.A_START_CHAR="Ð",ye.B_START_CHAR="Ñ",ye.C_START_CHAR="Ò",ye.A_CHARS="[\0-_È-Ï]",ye.B_CHARS="[ -È-Ï]",ye.C_CHARS="(Ï*[0-9]{2}Ï*)",ye.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011],ye}var Ju;function Vi(){if(Ju)return Yr;Ju=1,Object.defineProperty(Yr,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=Be(),n=o(t),r=Rr();function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function u(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){u(a,s);function a(f,d){i(this,a);var h=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f.substring(1),d));return h.bytes=f.split("").map(function(m){return m.charCodeAt(0)}),h}return e(a,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var d=this.bytes,h=d.shift()-105,m=r.SET_BY_CODE[h];if(m===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&d.unshift(r.FNC1);var p=a.next(d,1,m);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:a.getBar(h)+p.result+a.getBar((p.checksum+h)%r.MODULO)+a.getBar(r.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var d=this.options.ean128||!1;return typeof d=="string"&&(d=d.toLowerCase()==="true"),d}}],[{key:"getBar",value:function(d){return r.BARS[d]?r.BARS[d].toString():""}},{key:"correctIndex",value:function(d,h){if(h===r.SET_A){var m=d.shift();return m<32?m+64:m-32}else return h===r.SET_B?d.shift()-32:(d.shift()-48)*10+d.shift()-48}},{key:"next",value:function(d,h,m){if(!d.length)return{result:"",checksum:0};var p=void 0,v=void 0;if(d[0]>=200){v=d.shift()-105;var x=r.SWAP[v];x!==void 0?p=a.next(d,h+1,x):((m===r.SET_A||m===r.SET_B)&&v===r.SHIFT&&(d[0]=m===r.SET_A?d[0]>95?d[0]-96:d[0]:d[0]<32?d[0]+96:d[0]),p=a.next(d,h+1,m))}else v=a.correctIndex(d,m),p=a.next(d,h+1,m);var b=a.getBar(v),w=v*h;return{result:b+p.result,checksum:w+p.checksum}}}]),a})(n.default);return Yr.default=l,Yr}var Xr={},ef;function KO(){if(ef)return Xr;ef=1,Object.defineProperty(Xr,"__esModule",{value:!0});var e=Rr(),t=function(u){return u.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},n=function(u){return u.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},r=function(u){return u.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function o(c,u){var l=u?e.A_CHARS:e.B_CHARS,s=c.match(new RegExp("^("+l+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(s)return s[1]+"Ì"+i(c.substring(s[1].length));var a=c.match(new RegExp("^"+l+"+"))[0];return a.length===c.length?c:a+String.fromCharCode(u?205:206)+o(c.substring(a.length),!u)}function i(c){var u=r(c),l=u.length;if(l===c.length)return c;c=c.substring(l);var s=t(c)>=n(c);return u+String.fromCharCode(s?206:205)+o(c,s)}return Xr.default=function(c){var u=void 0,l=r(c).length;if(l>=2)u=e.C_START_CHAR+i(c);else{var s=t(c)>n(c);u=(s?e.A_START_CHAR:e.B_START_CHAR)+o(c,s)}return u.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(a,f){return"Ë"+f})},Xr}var tf;function YO(){if(tf)return Kr;tf=1,Object.defineProperty(Kr,"__esModule",{value:!0});var e=Vi(),t=o(e),n=KO(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function u(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){u(a,s);function a(f,d){if(i(this,a),/^[\x00-\x7F\xC8-\xD3]+$/.test(f))var h=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,(0,r.default)(f),d));else var h=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d));return c(h)}return a})(t.default);return Kr.default=l,Kr}var Zr={},nf;function XO(){if(nf)return Zr;nf=1,Object.defineProperty(Zr,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=Vi(),n=o(t),r=Rr();function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function u(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){u(a,s);function a(f,d){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.A_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.A_CHARS+"+$").test(this.data)}}]),a})(n.default);return Zr.default=l,Zr}var Qr={},rf;function ZO(){if(rf)return Qr;rf=1,Object.defineProperty(Qr,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=Vi(),n=o(t),r=Rr();function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function u(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){u(a,s);function a(f,d){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.B_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.B_CHARS+"+$").test(this.data)}}]),a})(n.default);return Qr.default=l,Qr}var Jr={},of;function QO(){if(of)return Jr;of=1,Object.defineProperty(Jr,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=Vi(),n=o(t),r=Rr();function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function u(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){u(a,s);function a(f,d){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.C_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.C_CHARS+"+$").test(this.data)}}]),a})(n.default);return Jr.default=l,Jr}var sf;function JO(){if(sf)return Ke;sf=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.CODE128C=Ke.CODE128B=Ke.CODE128A=Ke.CODE128=void 0;var e=YO(),t=l(e),n=XO(),r=l(n),o=ZO(),i=l(o),c=QO(),u=l(c);function l(s){return s&&s.__esModule?s:{default:s}}return Ke.CODE128=t.default,Ke.CODE128A=r.default,Ke.CODE128B=i.default,Ke.CODE128C=u.default,Ke}var Oe={},eo={},dt={},af;function Tr(){return af||(af=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.SIDE_BIN="101",dt.MIDDLE_BIN="01010",dt.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},dt.EAN2_STRUCTURE=["LL","LG","GL","GG"],dt.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],dt.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]),dt}var to={},no={},cf;function Pr(){if(cf)return no;cf=1,Object.defineProperty(no,"__esModule",{value:!0});var e=Tr(),t=function(r,o,i){var c=r.split("").map(function(l,s){return e.BINARIES[o[s]]}).map(function(l,s){return l?l[r[s]]:""});if(i){var u=r.length-1;c=c.map(function(l,s){return s<u?l+i:l})}return c.join("")};return no.default=t,no}var lf;function py(){if(lf)return to;lf=1,Object.defineProperty(to,"__esModule",{value:!0});var e=(function(){function f(d,h){for(var m=0;m<h.length;m++){var p=h[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(d,p.key,p)}}return function(d,h,m){return h&&f(d.prototype,h),m&&f(d,m),d}})(),t=Tr(),n=Pr(),r=c(n),o=Be(),i=c(o);function c(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function l(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function s(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var a=(function(f){s(d,f);function d(h,m){u(this,d);var p=l(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h,m));return p.fontSize=!m.flat&&m.fontSize>m.width*10?m.width*10:m.fontSize,p.guardHeight=m.height+p.fontSize/2+m.textMargin,p}return e(d,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(m,p){return this.text.substr(m,p)}},{key:"leftEncode",value:function(m,p){return(0,r.default)(m,p)}},{key:"rightText",value:function(m,p){return this.text.substr(m,p)}},{key:"rightEncode",value:function(m,p){return(0,r.default)(m,p)}},{key:"encodeGuarded",value:function(){var m={fontSize:this.fontSize},p={height:this.guardHeight};return[{data:t.SIDE_BIN,options:p},{data:this.leftEncode(),text:this.leftText(),options:m},{data:t.MIDDLE_BIN,options:p},{data:this.rightEncode(),text:this.rightText(),options:m},{data:t.SIDE_BIN,options:p}]}},{key:"encodeFlat",value:function(){var m=[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN];return{data:m.join(""),text:this.text}}}]),d})(i.default);return to.default=a,to}var uf;function eM(){if(uf)return eo;uf=1,Object.defineProperty(eo,"__esModule",{value:!0});var e=(function(){function f(d,h){for(var m=0;m<h.length;m++){var p=h[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(d,p.key,p)}}return function(d,h,m){return h&&f(d.prototype,h),m&&f(d,m),d}})(),t=function f(d,h,m){d===null&&(d=Function.prototype);var p=Object.getOwnPropertyDescriptor(d,h);if(p===void 0){var v=Object.getPrototypeOf(d);return v===null?void 0:f(v,h,m)}else{if("value"in p)return p.value;var x=p.get;return x===void 0?void 0:x.call(m)}},n=Tr(),r=py(),o=i(r);function i(f){return f&&f.__esModule?f:{default:f}}function c(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function u(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function l(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var s=function(d){var h=d.substr(0,12).split("").map(function(m){return+m}).reduce(function(m,p,v){return v%2?m+p*3:m+p},0);return(10-h%10)%10},a=(function(f){l(d,f);function d(h,m){c(this,d),h.search(/^[0-9]{12}$/)!==-1&&(h+=s(h));var p=u(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h,m));return p.lastChar=m.lastChar,p}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===s(this.data)}},{key:"leftText",value:function(){return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var m=this.data.substr(1,6),p=n.EAN13_STRUCTURE[this.data[0]];return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftEncode",this).call(this,m,p)}},{key:"rightText",value:function(){return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var m=this.data.substr(7,6);return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightEncode",this).call(this,m,"RRRRRR")}},{key:"encodeGuarded",value:function(){var m=t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(m.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(m.push({data:"00"}),m.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),m}}]),d})(o.default);return eo.default=a,eo}var ro={},ff;function tM(){if(ff)return ro;ff=1,Object.defineProperty(ro,"__esModule",{value:!0});var e=(function(){function a(f,d){for(var h=0;h<d.length;h++){var m=d[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(f,m.key,m)}}return function(f,d,h){return d&&a(f.prototype,d),h&&a(f,h),f}})(),t=function a(f,d,h){f===null&&(f=Function.prototype);var m=Object.getOwnPropertyDescriptor(f,d);if(m===void 0){var p=Object.getPrototypeOf(f);return p===null?void 0:a(p,d,h)}else{if("value"in m)return m.value;var v=m.get;return v===void 0?void 0:v.call(h)}},n=py(),r=o(n);function o(a){return a&&a.__esModule?a:{default:a}}function i(a,f){if(!(a instanceof f))throw new TypeError("Cannot call a class as a function")}function c(a,f){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:a}function u(a,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);a.prototype=Object.create(f&&f.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(a,f):a.__proto__=f)}var l=function(f){var d=f.substr(0,7).split("").map(function(h){return+h}).reduce(function(h,m,p){return p%2?h+m:h+m*3},0);return(10-d%10)%10},s=(function(a){u(f,a);function f(d,h){return i(this,f),d.search(/^[0-9]{7}$/)!==-1&&(d+=l(d)),c(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,d,h))}return e(f,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===l(this.data)}},{key:"leftText",value:function(){return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var h=this.data.substr(0,4);return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftEncode",this).call(this,h,"LLLL")}},{key:"rightText",value:function(){return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var h=this.data.substr(4,4);return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightEncode",this).call(this,h,"RRRR")}}]),f})(r.default);return ro.default=s,ro}var oo={},df;function nM(){if(df)return oo;df=1,Object.defineProperty(oo,"__esModule",{value:!0});var e=(function(){function d(h,m){for(var p=0;p<m.length;p++){var v=m[p];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(h,v.key,v)}}return function(h,m,p){return m&&d(h.prototype,m),p&&d(h,p),h}})(),t=Tr(),n=Pr(),r=c(n),o=Be(),i=c(o);function c(d){return d&&d.__esModule?d:{default:d}}function u(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}function l(d,h){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:d}function s(d,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);d.prototype=Object.create(h&&h.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(d,h):d.__proto__=h)}var a=function(h){var m=h.split("").map(function(p){return+p}).reduce(function(p,v,x){return x%2?p+v*9:p+v*3},0);return m%10},f=(function(d){s(h,d);function h(m,p){return u(this,h),l(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,m,p))}return e(h,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var p=t.EAN5_STRUCTURE[a(this.data)];return{data:"1011"+(0,r.default)(this.data,p,"01"),text:this.text}}}]),h})(i.default);return oo.default=f,oo}var io={},hf;function rM(){if(hf)return io;hf=1,Object.defineProperty(io,"__esModule",{value:!0});var e=(function(){function f(d,h){for(var m=0;m<h.length;m++){var p=h[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(d,p.key,p)}}return function(d,h,m){return h&&f(d.prototype,h),m&&f(d,m),d}})(),t=Tr(),n=Pr(),r=c(n),o=Be(),i=c(o);function c(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function l(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function s(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var a=(function(f){s(d,f);function d(h,m){return u(this,d),l(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h,m))}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var m=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,r.default)(this.data,m,"01"),text:this.text}}}]),d})(i.default);return io.default=a,io}var Ln={},pf;function my(){if(pf)return Ln;pf=1,Object.defineProperty(Ln,"__esModule",{value:!0});var e=(function(){function f(d,h){for(var m=0;m<h.length;m++){var p=h[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(d,p.key,p)}}return function(d,h,m){return h&&f(d.prototype,h),m&&f(d,m),d}})();Ln.checksum=a;var t=Pr(),n=i(t),r=Be(),o=i(r);function i(f){return f&&f.__esModule?f:{default:f}}function c(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function u(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function l(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var s=(function(f){l(d,f);function d(h,m){c(this,d),h.search(/^[0-9]{11}$/)!==-1&&(h+=a(h));var p=u(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h,m));return p.displayValue=m.displayValue,m.fontSize>m.width*10?p.fontSize=m.width*10:p.fontSize=m.fontSize,p.guardHeight=m.height+p.fontSize/2+m.textMargin,p}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==a(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var m="";return m+="101",m+=(0,n.default)(this.data.substr(0,6),"LLLLLL"),m+="01010",m+=(0,n.default)(this.data.substr(6,6),"RRRRRR"),m+="101",{data:m,text:this.text}}},{key:"guardedEncoding",value:function(){var m=[];return this.displayValue&&m.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),m.push({data:"101"+(0,n.default)(this.data[0],"L"),options:{height:this.guardHeight}}),m.push({data:(0,n.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),m.push({data:"01010",options:{height:this.guardHeight}}),m.push({data:(0,n.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),m.push({data:(0,n.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&m.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),m}}]),d})(o.default);function a(f){var d=0,h;for(h=1;h<11;h+=2)d+=parseInt(f[h]);for(h=0;h<11;h+=2)d+=parseInt(f[h])*3;return(10-d%10)%10}return Ln.default=s,Ln}var so={},mf;function oM(){if(mf)return so;mf=1,Object.defineProperty(so,"__esModule",{value:!0});var e=(function(){function m(p,v){for(var x=0;x<v.length;x++){var b=v[x];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,v,x){return v&&m(p.prototype,v),x&&m(p,x),p}})(),t=Pr(),n=c(t),r=Be(),o=c(r),i=my();function c(m){return m&&m.__esModule?m:{default:m}}function u(m,p){if(!(m instanceof p))throw new TypeError("Cannot call a class as a function")}function l(m,p){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:m}function s(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(m,p):m.__proto__=p)}var a=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],f=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],d=(function(m){s(p,m);function p(v,x){u(this,p);var b=l(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,v,x));if(b.isValid=!1,v.search(/^[0-9]{6}$/)!==-1)b.middleDigits=v,b.upcA=h(v,"0"),b.text=x.text||""+b.upcA[0]+v+b.upcA[b.upcA.length-1],b.isValid=!0;else if(v.search(/^[01][0-9]{7}$/)!==-1)if(b.middleDigits=v.substring(1,v.length-1),b.upcA=h(b.middleDigits,v[0]),b.upcA[b.upcA.length-1]===v[v.length-1])b.isValid=!0;else return l(b);else return l(b);return b.displayValue=x.displayValue,x.fontSize>x.width*10?b.fontSize=x.width*10:b.fontSize=x.fontSize,b.guardHeight=x.height+b.fontSize/2+x.textMargin,b}return e(p,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var x="";return x+="101",x+=this.encodeMiddleDigits(),x+="010101",{data:x,text:this.text}}},{key:"guardedEncoding",value:function(){var x=[];return this.displayValue&&x.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),x.push({data:"101",options:{height:this.guardHeight}}),x.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),x.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&x.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),x}},{key:"encodeMiddleDigits",value:function(){var x=this.upcA[0],b=this.upcA[this.upcA.length-1],w=f[parseInt(b)][parseInt(x)];return(0,n.default)(this.middleDigits,w)}}]),p})(o.default);function h(m,p){for(var v=parseInt(m[m.length-1]),x=a[v],b="",w=0,S=0;S<x.length;S++){var E=x[S];E==="X"?b+=m[w++]:b+=E}return b=""+p+b,""+b+(0,i.checksum)(b)}return so.default=d,so}var gf;function iM(){if(gf)return Oe;gf=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.UPCE=Oe.UPC=Oe.EAN2=Oe.EAN5=Oe.EAN8=Oe.EAN13=void 0;var e=eM(),t=d(e),n=tM(),r=d(n),o=nM(),i=d(o),c=rM(),u=d(c),l=my(),s=d(l),a=oM(),f=d(a);function d(h){return h&&h.__esModule?h:{default:h}}return Oe.EAN13=t.default,Oe.EAN8=r.default,Oe.EAN5=i.default,Oe.EAN2=u.default,Oe.UPC=s.default,Oe.UPCE=f.default,Oe}var kt={},ao={},nn={},vf;function sM(){return vf||(vf=1,Object.defineProperty(nn,"__esModule",{value:!0}),nn.START_BIN="1010",nn.END_BIN="11101",nn.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]),nn}var yf;function gy(){if(yf)return ao;yf=1,Object.defineProperty(ao,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=sM(),n=Be(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function u(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){u(a,s);function a(){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return e(a,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var d=this,h=this.data.match(/.{2}/g).map(function(m){return d.encodePair(m)}).join("");return{data:t.START_BIN+h+t.END_BIN,text:this.text}}},{key:"encodePair",value:function(d){var h=t.BINARIES[d[1]];return t.BINARIES[d[0]].split("").map(function(m,p){return(m==="1"?"111":"1")+(h[p]==="1"?"000":"0")}).join("")}}]),a})(r.default);return ao.default=l,ao}var co={},xf;function aM(){if(xf)return co;xf=1,Object.defineProperty(co,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=gy(),n=r(t);function r(s){return s&&s.__esModule?s:{default:s}}function o(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function i(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function c(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var u=function(a){var f=a.substr(0,13).split("").map(function(d){return parseInt(d,10)}).reduce(function(d,h,m){return d+h*(3-m%2*2)},0);return Math.ceil(f/10)*10-f},l=(function(s){c(a,s);function a(f,d){return o(this,a),f.search(/^[0-9]{13}$/)!==-1&&(f+=u(f)),i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===u(this.data)}}]),a})(n.default);return co.default=l,co}var bf;function cM(){if(bf)return kt;bf=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.ITF14=kt.ITF=void 0;var e=gy(),t=o(e),n=aM(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}return kt.ITF=t.default,kt.ITF14=r.default,kt}var ke={},lo={},wf;function Ar(){if(wf)return lo;wf=1,Object.defineProperty(lo,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=Be(),n=r(t);function r(s){return s&&s.__esModule?s:{default:s}}function o(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function i(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function c(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var u=(function(s){c(a,s);function a(f,d){return o(this,a),i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"encode",value:function(){for(var d="110",h=0;h<this.data.length;h++){var m=parseInt(this.data[h]),p=m.toString(2);p=l(p,4-p.length);for(var v=0;v<p.length;v++)d+=p[v]=="0"?"100":"110"}return d+="1001",{data:d,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),a})(n.default);function l(s,a){for(var f=0;f<a;f++)s="0"+s;return s}return lo.default=u,lo}var uo={},Fn={},Ef;function Bi(){if(Ef)return Fn;Ef=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.mod10=e,Fn.mod11=t;function e(n){for(var r=0,o=0;o<n.length;o++){var i=parseInt(n[o]);(o+n.length)%2===0?r+=i:r+=i*2%10+Math.floor(i*2/10)}return(10-r%10)%10}function t(n){for(var r=0,o=[2,3,4,5,6,7],i=0;i<n.length;i++){var c=parseInt(n[n.length-1-i]);r+=o[i%o.length]*c}return(11-r%11)%11}return Fn}var Sf;function lM(){if(Sf)return uo;Sf=1,Object.defineProperty(uo,"__esModule",{value:!0});var e=Ar(),t=r(e),n=Bi();function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){return o(this,s),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a+(0,n.mod10)(a),f))}return s})(t.default);return uo.default=u,uo}var fo={},Cf;function uM(){if(Cf)return fo;Cf=1,Object.defineProperty(fo,"__esModule",{value:!0});var e=Ar(),t=r(e),n=Bi();function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){return o(this,s),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a+(0,n.mod11)(a),f))}return s})(t.default);return fo.default=u,fo}var ho={},_f;function fM(){if(_f)return ho;_f=1,Object.defineProperty(ho,"__esModule",{value:!0});var e=Ar(),t=r(e),n=Bi();function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){return o(this,s),a+=(0,n.mod10)(a),a+=(0,n.mod10)(a),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,f))}return s})(t.default);return ho.default=u,ho}var po={},Rf;function dM(){if(Rf)return po;Rf=1,Object.defineProperty(po,"__esModule",{value:!0});var e=Ar(),t=r(e),n=Bi();function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){return o(this,s),a+=(0,n.mod11)(a),a+=(0,n.mod10)(a),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,f))}return s})(t.default);return po.default=u,po}var Tf;function hM(){if(Tf)return ke;Tf=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.MSI1110=ke.MSI1010=ke.MSI11=ke.MSI10=ke.MSI=void 0;var e=Ar(),t=a(e),n=lM(),r=a(n),o=uM(),i=a(o),c=fM(),u=a(c),l=dM(),s=a(l);function a(f){return f&&f.__esModule?f:{default:f}}return ke.MSI=t.default,ke.MSI10=r.default,ke.MSI11=i.default,ke.MSI1010=u.default,ke.MSI1110=s.default,ke}var Vn={},Pf;function pM(){if(Pf)return Vn;Pf=1,Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.pharmacode=void 0;var e=(function(){function l(s,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(s,d.key,d)}}return function(s,a,f){return a&&l(s.prototype,a),f&&l(s,f),s}})(),t=Be(),n=r(t);function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){o(this,s);var d=i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,f));return d.number=parseInt(a,10),d}return e(s,[{key:"encode",value:function(){for(var f=this.number,d="";!isNaN(f)&&f!=0;)f%2===0?(d="11100"+d,f=(f-2)/2):(d="100"+d,f=(f-1)/2);return d=d.slice(0,-2),{data:d,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),s})(n.default);return Vn.pharmacode=u,Vn}var Bn={},Af;function mM(){if(Af)return Bn;Af=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.codabar=void 0;var e=(function(){function l(s,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(s,d.key,d)}}return function(s,a,f){return a&&l(s.prototype,a),f&&l(s,f),s}})(),t=Be(),n=r(t);function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){o(this,s),a.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(a="A"+a+"A");var d=i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a.toUpperCase(),f));return d.text=d.options.text||d.text.replace(/[A-D]/g,""),d}return e(s,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var f=[],d=this.getEncodings(),h=0;h<this.data.length;h++)f.push(d[this.data.charAt(h)]),h!==this.data.length-1&&f.push("0");return{text:this.text,data:f.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),s})(n.default);return Bn.codabar=u,Bn}var Lt={},mo={},rn={},Of;function gM(){return Of||(Of=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.SYMBOLS=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],rn.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],rn.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"\x07":["($)","G"],"\b":["($)","H"]," ":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"\x1B":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]}),rn}var Mf;function vy(){if(Mf)return mo;Mf=1,Object.defineProperty(mo,"__esModule",{value:!0});var e=(function(){function s(a,f){for(var d=0;d<f.length;d++){var h=f[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(a,h.key,h)}}return function(a,f,d){return f&&s(a.prototype,f),d&&s(a,d),a}})(),t=gM(),n=Be(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function u(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){u(a,s);function a(f,d){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var d=this.data.split("").flatMap(function(v){return t.MULTI_SYMBOLS[v]||v}),h=d.map(function(v){return a.getEncoding(v)}).join(""),m=a.checksum(d,20),p=a.checksum(d.concat(m),15);return{text:this.text,data:a.getEncoding("ÿ")+h+a.getEncoding(m)+a.getEncoding(p)+a.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(d){return t.BINARIES[a.symbolValue(d)]}},{key:"getSymbol",value:function(d){return t.SYMBOLS[d]}},{key:"symbolValue",value:function(d){return t.SYMBOLS.indexOf(d)}},{key:"checksum",value:function(d,h){var m=d.slice().reverse().reduce(function(p,v,x){var b=x%h+1;return p+a.symbolValue(v)*b},0);return a.getSymbol(m%47)}}]),a})(r.default);return mo.default=l,mo}var go={},If;function vM(){if(If)return go;If=1,Object.defineProperty(go,"__esModule",{value:!0});var e=(function(){function l(s,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(s,d.key,d)}}return function(s,a,f){return a&&l(s.prototype,a),f&&l(s,f),s}})(),t=vy(),n=r(t);function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){return o(this,s),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,f))}return e(s,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),s})(n.default);return go.default=u,go}var Nf;function yM(){if(Nf)return Lt;Nf=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.CODE93FullASCII=Lt.CODE93=void 0;var e=vy(),t=o(e),n=vM(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}return Lt.CODE93=t.default,Lt.CODE93FullASCII=r.default,Lt}var $n={},jf;function xM(){if(jf)return $n;jf=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.GenericBarcode=void 0;var e=(function(){function l(s,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(s,d.key,d)}}return function(s,a,f){return a&&l(s.prototype,a),f&&l(s,f),s}})(),t=Be(),n=r(t);function r(l){return l&&l.__esModule?l:{default:l}}function o(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}function i(l,s){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:l}function c(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(l,s):l.__proto__=s)}var u=(function(l){c(s,l);function s(a,f){return o(this,s),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,f))}return e(s,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),s})(n.default);return $n.GenericBarcode=u,$n}var Df;function bM(){if(Df)return Wr;Df=1,Object.defineProperty(Wr,"__esModule",{value:!0});var e=qO(),t=JO(),n=iM(),r=cM(),o=hM(),i=pM(),c=mM(),u=yM(),l=xM();return Wr.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:o.MSI,MSI10:o.MSI10,MSI11:o.MSI11,MSI1010:o.MSI1010,MSI1110:o.MSI1110,pharmacode:i.pharmacode,codabar:c.codabar,CODE93:u.CODE93,CODE93FullASCII:u.CODE93FullASCII,GenericBarcode:l.GenericBarcode},Wr}var vo={},kf;function $i(){if(kf)return vo;kf=1,Object.defineProperty(vo,"__esModule",{value:!0});var e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t};return vo.default=function(t,n){return e({},t,n)},vo}var yo={},Lf;function wM(){if(Lf)return yo;Lf=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.default=e;function e(t){var n=[];function r(o){if(Array.isArray(o))for(var i=0;i<o.length;i++)r(o[i]);else o.text=o.text||"",o.data=o.data||"",n.push(o)}return r(t),n}return yo}var xo={},Ff;function EM(){if(Ff)return xo;Ff=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.default=e;function e(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}return xo}var bo={},wo={},Eo={},Vf;function yy(){if(Vf)return Eo;Vf=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.default=e;function e(t){var n=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var r in n)n.hasOwnProperty(r)&&(r=n[r],typeof t[r]=="string"&&(t[r]=parseInt(t[r],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}return Eo}var So={},Bf;function xy(){if(Bf)return So;Bf=1,Object.defineProperty(So,"__esModule",{value:!0});var e={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};return So.default=e,So}var $f;function SM(){if($f)return wo;$f=1,Object.defineProperty(wo,"__esModule",{value:!0});var e=yy(),t=o(e),n=xy(),r=o(n);function o(c){return c&&c.__esModule?c:{default:c}}function i(c){var u={};for(var l in r.default)r.default.hasOwnProperty(l)&&(c.hasAttribute("jsbarcode-"+l.toLowerCase())&&(u[l]=c.getAttribute("jsbarcode-"+l.toLowerCase())),c.hasAttribute("data-"+l.toLowerCase())&&(u[l]=c.getAttribute("data-"+l.toLowerCase())));return u.value=c.getAttribute("jsbarcode-value")||c.getAttribute("data-value"),u=(0,t.default)(u),u}return wo.default=i,wo}var Co={},_o={},Le={},Uf;function by(){if(Uf)return Le;Uf=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.getTotalWidthOfEncodings=Le.calculateEncodingAttributes=Le.getBarcodePadding=Le.getEncodingHeight=Le.getMaximumHeightOfEncodings=void 0;var e=$i(),t=n(e);function n(s){return s&&s.__esModule?s:{default:s}}function r(s,a){return a.height+(a.displayValue&&s.text.length>0?a.fontSize+a.textMargin:0)+a.marginTop+a.marginBottom}function o(s,a,f){if(f.displayValue&&a<s){if(f.textAlign=="center")return Math.floor((s-a)/2);if(f.textAlign=="left")return 0;if(f.textAlign=="right")return Math.floor(s-a)}return 0}function i(s,a,f){for(var d=0;d<s.length;d++){var h=s[d],m=(0,t.default)(a,h.options),p;m.displayValue?p=l(h.text,m,f):p=0;var v=h.data.length*m.width;h.width=Math.ceil(Math.max(p,v)),h.height=r(h,m),h.barcodePadding=o(p,v,m)}}function c(s){for(var a=0,f=0;f<s.length;f++)a+=s[f].width;return a}function u(s){for(var a=0,f=0;f<s.length;f++)s[f].height>a&&(a=s[f].height);return a}function l(s,a,f){var d;if(f)d=f;else if(typeof document<"u")d=document.createElement("canvas").getContext("2d");else return 0;d.font=a.fontOptions+" "+a.fontSize+"px "+a.font;var h=d.measureText(s);if(!h)return 0;var m=h.width;return m}return Le.getMaximumHeightOfEncodings=u,Le.getEncodingHeight=r,Le.getBarcodePadding=o,Le.calculateEncodingAttributes=i,Le.getTotalWidthOfEncodings=c,Le}var Gf;function CM(){if(Gf)return _o;Gf=1,Object.defineProperty(_o,"__esModule",{value:!0});var e=(function(){function u(l,s){for(var a=0;a<s.length;a++){var f=s[a];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(l,f.key,f)}}return function(l,s,a){return s&&u(l.prototype,s),a&&u(l,a),l}})(),t=$i(),n=o(t),r=by();function o(u){return u&&u.__esModule?u:{default:u}}function i(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}var c=(function(){function u(l,s,a){i(this,u),this.canvas=l,this.encodings=s,this.options=a}return e(u,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var s=0;s<this.encodings.length;s++){var a=(0,n.default)(this.options,this.encodings[s].options);this.drawCanvasBarcode(a,this.encodings[s]),this.drawCanvasText(a,this.encodings[s]),this.moveCanvasDrawing(this.encodings[s])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var s=this.canvas.getContext("2d");s.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,s);var a=(0,r.getTotalWidthOfEncodings)(this.encodings),f=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=a+this.options.marginLeft+this.options.marginRight,this.canvas.height=f,s.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(s.fillStyle=this.options.background,s.fillRect(0,0,this.canvas.width,this.canvas.height)),s.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(s,a){var f=this.canvas.getContext("2d"),d=a.data,h;s.textPosition=="top"?h=s.marginTop+s.fontSize+s.textMargin:h=s.marginTop,f.fillStyle=s.lineColor;for(var m=0;m<d.length;m++){var p=m*s.width+a.barcodePadding;d[m]==="1"?f.fillRect(p,h,s.width,s.height):d[m]&&f.fillRect(p,h,s.width,s.height*d[m])}}},{key:"drawCanvasText",value:function(s,a){var f=this.canvas.getContext("2d"),d=s.fontOptions+" "+s.fontSize+"px "+s.font;if(s.displayValue){var h,m;s.textPosition=="top"?m=s.marginTop+s.fontSize-s.textMargin:m=s.height+s.textMargin+s.marginTop+s.fontSize,f.font=d,s.textAlign=="left"||a.barcodePadding>0?(h=0,f.textAlign="left"):s.textAlign=="right"?(h=a.width-1,f.textAlign="right"):(h=a.width/2,f.textAlign="center"),f.fillText(a.text,h,m)}}},{key:"moveCanvasDrawing",value:function(s){var a=this.canvas.getContext("2d");a.translate(s.width,0)}},{key:"restoreCanvas",value:function(){var s=this.canvas.getContext("2d");s.restore()}}]),u})();return _o.default=c,_o}var Ro={},Hf;function _M(){if(Hf)return Ro;Hf=1,Object.defineProperty(Ro,"__esModule",{value:!0});var e=(function(){function l(s,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(s,d.key,d)}}return function(s,a,f){return a&&l(s.prototype,a),f&&l(s,f),s}})(),t=$i(),n=o(t),r=by();function o(l){return l&&l.__esModule?l:{default:l}}function i(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}var c="http://www.w3.org/2000/svg",u=(function(){function l(s,a,f){i(this,l),this.svg=s,this.encodings=a,this.options=f,this.document=f.xmlDocument||document}return e(l,[{key:"render",value:function(){var a=this.options.marginLeft;this.prepareSVG();for(var f=0;f<this.encodings.length;f++){var d=this.encodings[f],h=(0,n.default)(this.options,d.options),m=this.createGroup(a,h.marginTop,this.svg);this.setGroupOptions(m,h),this.drawSvgBarcode(m,h,d),this.drawSVGText(m,h,d),a+=d.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var a=(0,r.getTotalWidthOfEncodings)(this.encodings),f=(0,r.getMaximumHeightOfEncodings)(this.encodings),d=a+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(d,f),this.options.background&&this.drawRect(0,0,d,f,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(a,f,d){var h=d.data,m;f.textPosition=="top"?m=f.fontSize+f.textMargin:m=0;for(var p=0,v=0,x=0;x<h.length;x++)v=x*f.width+d.barcodePadding,h[x]==="1"?p++:p>0&&(this.drawRect(v-f.width*p,m,f.width*p,f.height,a),p=0);p>0&&this.drawRect(v-f.width*(p-1),m,f.width*p,f.height,a)}},{key:"drawSVGText",value:function(a,f,d){var h=this.document.createElementNS(c,"text");if(f.displayValue){var m,p;h.setAttribute("font-family",f.font),h.setAttribute("font-size",f.fontSize),f.fontOptions.includes("bold")&&h.setAttribute("font-weight","bold"),f.fontOptions.includes("italic")&&h.setAttribute("font-style","italic"),f.textPosition=="top"?p=f.fontSize-f.textMargin:p=f.height+f.textMargin+f.fontSize,f.textAlign=="left"||d.barcodePadding>0?(m=0,h.setAttribute("text-anchor","start")):f.textAlign=="right"?(m=d.width-1,h.setAttribute("text-anchor","end")):(m=d.width/2,h.setAttribute("text-anchor","middle")),h.setAttribute("x",m),h.setAttribute("y",p),h.appendChild(this.document.createTextNode(d.text)),a.appendChild(h)}}},{key:"setSvgAttributes",value:function(a,f){var d=this.svg;d.setAttribute("width",a+"px"),d.setAttribute("height",f+"px"),d.setAttribute("x","0px"),d.setAttribute("y","0px"),d.setAttribute("viewBox","0 0 "+a+" "+f),d.setAttribute("xmlns",c),d.setAttribute("version","1.1")}},{key:"createGroup",value:function(a,f,d){var h=this.document.createElementNS(c,"g");return h.setAttribute("transform","translate("+a+", "+f+")"),d.appendChild(h),h}},{key:"setGroupOptions",value:function(a,f){a.setAttribute("fill",f.lineColor)}},{key:"drawRect",value:function(a,f,d,h,m){var p=this.document.createElementNS(c,"rect");return p.setAttribute("x",a),p.setAttribute("y",f),p.setAttribute("width",d),p.setAttribute("height",h),m.appendChild(p),p}}]),l})();return Ro.default=u,Ro}var To={},zf;function RM(){if(zf)return To;zf=1,Object.defineProperty(To,"__esModule",{value:!0});var e=(function(){function r(o,i){for(var c=0;c<i.length;c++){var u=i[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,u.key,u)}}return function(o,i,c){return i&&r(o.prototype,i),c&&r(o,c),o}})();function t(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(o,i,c){t(this,r),this.object=o,this.encodings=i,this.options=c}return e(r,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),r})();return To.default=n,To}var Wf;function TM(){if(Wf)return Co;Wf=1,Object.defineProperty(Co,"__esModule",{value:!0});var e=CM(),t=c(e),n=_M(),r=c(n),o=RM(),i=c(o);function c(u){return u&&u.__esModule?u:{default:u}}return Co.default={CanvasRenderer:t.default,SVGRenderer:r.default,ObjectRenderer:i.default},Co}var on={},qf;function wy(){if(qf)return on;qf=1,Object.defineProperty(on,"__esModule",{value:!0});function e(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function t(c,u){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:c}function n(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);c.prototype=Object.create(u&&u.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(c,u):c.__proto__=u)}var r=(function(c){n(u,c);function u(l,s){e(this,u);var a=t(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return a.name="InvalidInputException",a.symbology=l,a.input=s,a.message='"'+a.input+'" is not a valid input for '+a.symbology,a}return u})(Error),o=(function(c){n(u,c);function u(){e(this,u);var l=t(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return l.name="InvalidElementException",l.message="Not supported type to render on",l}return u})(Error),i=(function(c){n(u,c);function u(){e(this,u);var l=t(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return l.name="NoElementException",l.message="No element to render on.",l}return u})(Error);return on.InvalidInputException=r,on.InvalidElementException=o,on.NoElementException=i,on}var Kf;function PM(){if(Kf)return bo;Kf=1,Object.defineProperty(bo,"__esModule",{value:!0});var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t=SM(),n=c(t),r=TM(),o=c(r),i=wy();function c(a){return a&&a.__esModule?a:{default:a}}function u(a){if(typeof a=="string")return l(a);if(Array.isArray(a)){for(var f=[],d=0;d<a.length;d++)f.push(u(a[d]));return f}else{if(typeof HTMLCanvasElement<"u"&&a instanceof HTMLImageElement)return s(a);if(a&&a.nodeName&&a.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&a instanceof SVGElement)return{element:a,options:(0,n.default)(a),renderer:o.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&a instanceof HTMLCanvasElement)return{element:a,options:(0,n.default)(a),renderer:o.default.CanvasRenderer};if(a&&a.getContext)return{element:a,renderer:o.default.CanvasRenderer};if(a&&(typeof a>"u"?"undefined":e(a))==="object"&&!a.nodeName)return{element:a,renderer:o.default.ObjectRenderer};throw new i.InvalidElementException}}function l(a){var f=document.querySelectorAll(a);if(f.length!==0){for(var d=[],h=0;h<f.length;h++)d.push(u(f[h]));return d}}function s(a){var f=document.createElement("canvas");return{element:f,options:(0,n.default)(a),renderer:o.default.CanvasRenderer,afterRender:function(){a.setAttribute("src",f.toDataURL())}}}return bo.default=u,bo}var Po={},Yf;function AM(){if(Yf)return Po;Yf=1,Object.defineProperty(Po,"__esModule",{value:!0});var e=(function(){function r(o,i){for(var c=0;c<i.length;c++){var u=i[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,u.key,u)}}return function(o,i,c){return i&&r(o.prototype,i),c&&r(o,c),o}})();function t(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(o){t(this,r),this.api=o}return e(r,[{key:"handleCatch",value:function(i){if(i.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw i.message;else throw i;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(i){try{var c=i.apply(void 0,arguments);return this.api._options.valid(!0),c}catch(u){return this.handleCatch(u),this.api}}}]),r})();return Po.default=n,Po}var ys,Xf;function OM(){if(Xf)return ys;Xf=1;var e=bM(),t=x(e),n=$i(),r=x(n),o=wM(),i=x(o),c=EM(),u=x(c),l=PM(),s=x(l),a=yy(),f=x(a),d=AM(),h=x(d),m=wy(),p=xy(),v=x(p);function x(I){return I&&I.__esModule?I:{default:I}}var b=function(){},w=function(P,M,j){var V=new b;if(typeof P>"u")throw Error("No element to render on was provided.");return V._renderProperties=(0,s.default)(P),V._encodings=[],V._options=v.default,V._errorHandler=new h.default(V),typeof M<"u"&&(j=j||{},j.format||(j.format=R()),V.options(j)[j.format](M,j).render()),V};w.getModule=function(I){return t.default[I]};for(var S in t.default)t.default.hasOwnProperty(S)&&E(t.default,S);function E(I,P){b.prototype[P]=b.prototype[P.toUpperCase()]=b.prototype[P.toLowerCase()]=function(M,j){var V=this;return V._errorHandler.wrapBarcodeCall(function(){j.text=typeof j.text>"u"?void 0:""+j.text;var $=(0,r.default)(V._options,j);$=(0,f.default)($);var K=I[P],G=A(M,K,$);return V._encodings.push(G),V})}}function A(I,P,M){I=""+I;var j=new P(I,M);if(!j.valid())throw new m.InvalidInputException(j.constructor.name,I);var V=j.encode();V=(0,i.default)(V);for(var $=0;$<V.length;$++)V[$].options=(0,r.default)(M,V[$].options);return V}function R(){return t.default.CODE128?"CODE128":Object.keys(t.default)[0]}b.prototype.options=function(I){return this._options=(0,r.default)(this._options,I),this},b.prototype.blank=function(I){var P=new Array(I+1).join("0");return this._encodings.push({data:P}),this},b.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var I;for(var P in this._renderProperties){I=this._renderProperties[P];var M=(0,r.default)(this._options,I.options);M.format=="auto"&&(M.format=R()),this._errorHandler.wrapBarcodeCall(function(){var j=M.value,V=t.default[M.format.toUpperCase()],$=A(j,V,M);T(I,$,M)})}}},b.prototype.render=function(){if(!this._renderProperties)throw new m.NoElementException;if(Array.isArray(this._renderProperties))for(var I=0;I<this._renderProperties.length;I++)T(this._renderProperties[I],this._encodings,this._options);else T(this._renderProperties,this._encodings,this._options);return this},b.prototype._defaults=v.default;function T(I,P,M){P=(0,i.default)(P);for(var j=0;j<P.length;j++)P[j].options=(0,r.default)(M,P[j].options),(0,u.default)(P[j].options);(0,u.default)(M);var V=I.renderer,$=new V(I.element,P,M);$.render(),I.afterRender&&I.afterRender()}return typeof window<"u"&&(window.JsBarcode=w),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(I,P){var M=[];return jQuery(this).each(function(){M.push(this)}),w(M,I,P)}),ys=w,ys}var Ao={exports:{}},Oo={exports:{}},fe={};/** @license React v16.13.1
|
|
91
|
+
*/var YT={L:Ht.QrCode.Ecc.LOW,M:Ht.QrCode.Ecc.MEDIUM,Q:Ht.QrCode.Ecc.QUARTILE,H:Ht.QrCode.Ecc.HIGH},Cx=128,_x="L",jx="#FFFFFF",Px="#000000",Tx=!1,Ax=1,ZT=4,QT=0,JT=.1;function Ox(e,t=0){const n=[];return e.forEach(function(r,o){let s=null;r.forEach(function(c,l){if(!c&&s!==null){n.push(`M${s+t} ${o+t}h${l-s}v1H${s+t}z`),s=null;return}if(l===r.length-1){if(!c)return;s===null?n.push(`M${l+t},${o+t} h1v1H${l+t}z`):n.push(`M${s+t},${o+t} h${l+1-s}v1H${s+t}z`);return}c&&s===null&&(s=l)})}),n.join("")}function Mx(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((o,s)=>s<t.x||s>=t.x+t.w?o:!1))}function eA(e,t,n,r){if(r==null)return null;const o=e.length+n*2,s=Math.floor(t*JT),c=o/t,l=(r.width||s)*c,u=(r.height||s)*c,i=r.x==null?e.length/2-l/2:r.x*c,a=r.y==null?e.length/2-u/2:r.y*c,f=r.opacity==null?1:r.opacity;let d=null;if(r.excavate){let g=Math.floor(i),m=Math.floor(a),x=Math.ceil(l+i-g),y=Math.ceil(u+a-m);d={x:g,y:m,w:x,h:y}}const p=r.crossOrigin;return{x:i,y:a,h:u,w:l,excavation:d,opacity:f,crossOrigin:p}}function tA(e,t){return t!=null?Math.max(Math.floor(t),0):e?ZT:QT}function Ix({value:e,level:t,minVersion:n,includeMargin:r,marginSize:o,imageSettings:s,size:c,boostLevel:l}){let u=S.useMemo(()=>{const g=(Array.isArray(e)?e:[e]).reduce((m,x)=>(m.push(...Ht.QrSegment.makeSegments(x)),m),[]);return Ht.QrCode.encodeSegments(g,YT[t],n,void 0,void 0,l)},[e,t,n,l]);const{cells:i,margin:a,numCells:f,calculatedImageSettings:d}=S.useMemo(()=>{let p=u.getModules();const g=tA(r,o),m=p.length+g*2,x=eA(p,c,g,s);return{cells:p,margin:g,numCells:m,calculatedImageSettings:x}},[u,c,s,r,o]);return{qrcode:u,margin:a,cells:i,numCells:f,calculatedImageSettings:d}}var nA=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),rA=S.forwardRef(function(t,n){const r=t,{value:o,size:s=Cx,level:c=_x,bgColor:l=jx,fgColor:u=Px,includeMargin:i=Tx,minVersion:a=Ax,boostLevel:f,marginSize:d,imageSettings:p}=r,m=Ws(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:x}=m,y=Ws(m,["style"]),E=p==null?void 0:p.src,b=S.useRef(null),R=S.useRef(null),w=S.useCallback(B=>{b.current=B,typeof n=="function"?n(B):n&&(n.current=B)},[n]),[P,C]=S.useState(!1),{margin:_,cells:M,numCells:j,calculatedImageSettings:A}=Ix({value:o,level:c,minVersion:a,boostLevel:f,includeMargin:i,marginSize:d,imageSettings:p,size:s});S.useEffect(()=>{if(b.current!=null){const B=b.current,q=B.getContext("2d");if(!q)return;let U=M;const G=R.current,$=A!=null&&G!==null&&G.complete&&G.naturalHeight!==0&&G.naturalWidth!==0;$&&A.excavation!=null&&(U=Mx(M,A.excavation));const V=window.devicePixelRatio||1;B.height=B.width=s*V;const T=s/j*V;q.scale(T,T),q.fillStyle=l,q.fillRect(0,0,j,j),q.fillStyle=u,nA?q.fill(new Path2D(Ox(U,_))):M.forEach(function(L,Y){L.forEach(function(Q,X){Q&&q.fillRect(X+_,Y+_,1,1)})}),A&&(q.globalAlpha=A.opacity),$&&q.drawImage(G,A.x+_,A.y+_,A.w,A.h)}}),S.useEffect(()=>{C(!1)},[E]);const I=zs({height:s,width:s},x);let F=null;return E!=null&&(F=S.createElement("img",{src:E,key:E,style:{display:"none"},onLoad:()=>{C(!0)},ref:R,crossOrigin:A==null?void 0:A.crossOrigin})),S.createElement(S.Fragment,null,S.createElement("canvas",zs({style:I,height:s,width:s,ref:w,role:"img"},y)),F)});rA.displayName="QRCodeCanvas";var Dx=S.forwardRef(function(t,n){const r=t,{value:o,size:s=Cx,level:c=_x,bgColor:l=jx,fgColor:u=Px,includeMargin:i=Tx,minVersion:a=Ax,boostLevel:f,title:d,marginSize:p,imageSettings:g}=r,m=Ws(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:x,cells:y,numCells:E,calculatedImageSettings:b}=Ix({value:o,level:c,minVersion:a,boostLevel:f,includeMargin:i,marginSize:p,imageSettings:g,size:s});let R=y,w=null;g!=null&&b!=null&&(b.excavation!=null&&(R=Mx(y,b.excavation)),w=S.createElement("image",{href:g.src,height:b.h,width:b.w,x:b.x+x,y:b.y+x,preserveAspectRatio:"none",opacity:b.opacity,crossOrigin:b.crossOrigin}));const P=Ox(R,x);return S.createElement("svg",zs({height:s,width:s,viewBox:`0 0 ${E} ${E}`,ref:n,role:"img"},m),!!d&&S.createElement("title",null,d),S.createElement("path",{fill:l,d:`M0,0 h${E}v${E}H0z`,shapeRendering:"crispEdges"}),S.createElement("path",{fill:u,d:P,shapeRendering:"crispEdges"}),w)});Dx.displayName="QRCodeSVG";const oA=e=>{const{value:t,className:n="",size:r=200,bgColor:o="#FFFFFF",fgColor:s="#000000",level:c="M",marginSize:l=4,imageSettings:u,...i}=e,a=O.classNames("flex items-center justify-center",n);return h.jsxRuntimeExports.jsx("div",{className:a,...i,children:h.jsxRuntimeExports.jsx(Dx,{value:t,size:r,bgColor:o,fgColor:s,level:c,marginSize:l,imageSettings:u})})};var wr={},mn={},Rr={},yl;function Te(){if(yl)return Rr;yl=1,Object.defineProperty(Rr,"__esModule",{value:!0});function e(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}var t=function n(r,o){e(this,n),this.data=r,this.text=o.text||r,this.options=o};return Rr.default=t,Rr}var El;function iA(){if(El)return mn;El=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.CODE39=void 0;var e=(function(){function m(x,y){for(var E=0;E<y.length;E++){var b=y[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,y,E){return y&&m(x.prototype,y),E&&m(x,E),x}})(),t=Te(),n=r(t);function r(m){return m&&m.__esModule?m:{default:m}}function o(m,x){if(!(m instanceof x))throw new TypeError("Cannot call a class as a function")}function s(m,x){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:m}function c(m,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);m.prototype=Object.create(x&&x.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(m,x):m.__proto__=x)}var l=(function(m){c(x,m);function x(y,E){return o(this,x),y=y.toUpperCase(),E.mod43&&(y+=d(g(y))),s(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,y,E))}return e(x,[{key:"encode",value:function(){for(var E=a("*"),b=0;b<this.data.length;b++)E+=a(this.data[b])+"0";return E+=a("*"),{data:E,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),x})(n.default),u=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],i=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function a(m){return f(p(m))}function f(m){return i[m].toString(2)}function d(m){return u[m]}function p(m){return u.indexOf(m)}function g(m){for(var x=0,y=0;y<m.length;y++)x+=p(m[y]);return x=x%43,x}return mn.CODE39=l,mn}var ke={},Sr={},Cr={},le={},bl;function or(){if(bl)return le;bl=1,Object.defineProperty(le,"__esModule",{value:!0});var e;function t(u,i,a){return i in u?Object.defineProperty(u,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):u[i]=a,u}var n=le.SET_A=0,r=le.SET_B=1,o=le.SET_C=2;le.SHIFT=98;var s=le.START_A=103,c=le.START_B=104,l=le.START_C=105;return le.MODULO=103,le.STOP=106,le.FNC1=207,le.SET_BY_CODE=(e={},t(e,s,n),t(e,c,r),t(e,l,o),e),le.SWAP={101:n,100:r,99:o},le.A_START_CHAR="Ð",le.B_START_CHAR="Ñ",le.C_START_CHAR="Ò",le.A_CHARS="[\0-_È-Ï]",le.B_CHARS="[ -È-Ï]",le.C_CHARS="(Ï*[0-9]{2}Ï*)",le.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011],le}var wl;function hi(){if(wl)return Cr;wl=1,Object.defineProperty(Cr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=Te(),n=o(t),r=or();function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function l(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){l(a,i);function a(f,d){s(this,a);var p=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f.substring(1),d));return p.bytes=f.split("").map(function(g){return g.charCodeAt(0)}),p}return e(a,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var d=this.bytes,p=d.shift()-105,g=r.SET_BY_CODE[p];if(g===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&d.unshift(r.FNC1);var m=a.next(d,1,g);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:a.getBar(p)+m.result+a.getBar((m.checksum+p)%r.MODULO)+a.getBar(r.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var d=this.options.ean128||!1;return typeof d=="string"&&(d=d.toLowerCase()==="true"),d}}],[{key:"getBar",value:function(d){return r.BARS[d]?r.BARS[d].toString():""}},{key:"correctIndex",value:function(d,p){if(p===r.SET_A){var g=d.shift();return g<32?g+64:g-32}else return p===r.SET_B?d.shift()-32:(d.shift()-48)*10+d.shift()-48}},{key:"next",value:function(d,p,g){if(!d.length)return{result:"",checksum:0};var m=void 0,x=void 0;if(d[0]>=200){x=d.shift()-105;var y=r.SWAP[x];y!==void 0?m=a.next(d,p+1,y):((g===r.SET_A||g===r.SET_B)&&x===r.SHIFT&&(d[0]=g===r.SET_A?d[0]>95?d[0]-96:d[0]:d[0]<32?d[0]+96:d[0]),m=a.next(d,p+1,g))}else x=a.correctIndex(d,g),m=a.next(d,p+1,g);var E=a.getBar(x),b=x*p;return{result:E+m.result,checksum:b+m.checksum}}}]),a})(n.default);return Cr.default=u,Cr}var _r={},Rl;function sA(){if(Rl)return _r;Rl=1,Object.defineProperty(_r,"__esModule",{value:!0});var e=or(),t=function(l){return l.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},n=function(l){return l.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},r=function(l){return l.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function o(c,l){var u=l?e.A_CHARS:e.B_CHARS,i=c.match(new RegExp("^("+u+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(i)return i[1]+"Ì"+s(c.substring(i[1].length));var a=c.match(new RegExp("^"+u+"+"))[0];return a.length===c.length?c:a+String.fromCharCode(l?205:206)+o(c.substring(a.length),!l)}function s(c){var l=r(c),u=l.length;if(u===c.length)return c;c=c.substring(u);var i=t(c)>=n(c);return l+String.fromCharCode(i?206:205)+o(c,i)}return _r.default=function(c){var l=void 0,u=r(c).length;if(u>=2)l=e.C_START_CHAR+s(c);else{var i=t(c)>n(c);l=(i?e.A_START_CHAR:e.B_START_CHAR)+o(c,i)}return l.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(a,f){return"Ë"+f})},_r}var Sl;function aA(){if(Sl)return Sr;Sl=1,Object.defineProperty(Sr,"__esModule",{value:!0});var e=hi(),t=o(e),n=sA(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function l(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){l(a,i);function a(f,d){if(s(this,a),/^[\x00-\x7F\xC8-\xD3]+$/.test(f))var p=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,(0,r.default)(f),d));else var p=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d));return c(p)}return a})(t.default);return Sr.default=u,Sr}var jr={},Cl;function cA(){if(Cl)return jr;Cl=1,Object.defineProperty(jr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=hi(),n=o(t),r=or();function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function l(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){l(a,i);function a(f,d){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.A_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.A_CHARS+"+$").test(this.data)}}]),a})(n.default);return jr.default=u,jr}var Pr={},_l;function uA(){if(_l)return Pr;_l=1,Object.defineProperty(Pr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=hi(),n=o(t),r=or();function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function l(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){l(a,i);function a(f,d){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.B_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.B_CHARS+"+$").test(this.data)}}]),a})(n.default);return Pr.default=u,Pr}var Tr={},jl;function lA(){if(jl)return Tr;jl=1,Object.defineProperty(Tr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=hi(),n=o(t),r=or();function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function l(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){l(a,i);function a(f,d){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.C_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.C_CHARS+"+$").test(this.data)}}]),a})(n.default);return Tr.default=u,Tr}var Pl;function fA(){if(Pl)return ke;Pl=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.CODE128C=ke.CODE128B=ke.CODE128A=ke.CODE128=void 0;var e=aA(),t=u(e),n=cA(),r=u(n),o=uA(),s=u(o),c=lA(),l=u(c);function u(i){return i&&i.__esModule?i:{default:i}}return ke.CODE128=t.default,ke.CODE128A=r.default,ke.CODE128B=s.default,ke.CODE128C=l.default,ke}var ye={},Ar={},Qe={},Tl;function ir(){return Tl||(Tl=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.SIDE_BIN="101",Qe.MIDDLE_BIN="01010",Qe.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},Qe.EAN2_STRUCTURE=["LL","LG","GL","GG"],Qe.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],Qe.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]),Qe}var Or={},Mr={},Al;function sr(){if(Al)return Mr;Al=1,Object.defineProperty(Mr,"__esModule",{value:!0});var e=ir(),t=function(r,o,s){var c=r.split("").map(function(u,i){return e.BINARIES[o[i]]}).map(function(u,i){return u?u[r[i]]:""});if(s){var l=r.length-1;c=c.map(function(u,i){return i<l?u+s:u})}return c.join("")};return Mr.default=t,Mr}var Ol;function Nx(){if(Ol)return Or;Ol=1,Object.defineProperty(Or,"__esModule",{value:!0});var e=(function(){function f(d,p){for(var g=0;g<p.length;g++){var m=p[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}return function(d,p,g){return p&&f(d.prototype,p),g&&f(d,g),d}})(),t=ir(),n=sr(),r=c(n),o=Te(),s=c(o);function c(f){return f&&f.__esModule?f:{default:f}}function l(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function u(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function i(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var a=(function(f){i(d,f);function d(p,g){l(this,d);var m=u(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,p,g));return m.fontSize=!g.flat&&g.fontSize>g.width*10?g.width*10:g.fontSize,m.guardHeight=g.height+m.fontSize/2+g.textMargin,m}return e(d,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(g,m){return this.text.substr(g,m)}},{key:"leftEncode",value:function(g,m){return(0,r.default)(g,m)}},{key:"rightText",value:function(g,m){return this.text.substr(g,m)}},{key:"rightEncode",value:function(g,m){return(0,r.default)(g,m)}},{key:"encodeGuarded",value:function(){var g={fontSize:this.fontSize},m={height:this.guardHeight};return[{data:t.SIDE_BIN,options:m},{data:this.leftEncode(),text:this.leftText(),options:g},{data:t.MIDDLE_BIN,options:m},{data:this.rightEncode(),text:this.rightText(),options:g},{data:t.SIDE_BIN,options:m}]}},{key:"encodeFlat",value:function(){var g=[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN];return{data:g.join(""),text:this.text}}}]),d})(s.default);return Or.default=a,Or}var Ml;function dA(){if(Ml)return Ar;Ml=1,Object.defineProperty(Ar,"__esModule",{value:!0});var e=(function(){function f(d,p){for(var g=0;g<p.length;g++){var m=p[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}return function(d,p,g){return p&&f(d.prototype,p),g&&f(d,g),d}})(),t=function f(d,p,g){d===null&&(d=Function.prototype);var m=Object.getOwnPropertyDescriptor(d,p);if(m===void 0){var x=Object.getPrototypeOf(d);return x===null?void 0:f(x,p,g)}else{if("value"in m)return m.value;var y=m.get;return y===void 0?void 0:y.call(g)}},n=ir(),r=Nx(),o=s(r);function s(f){return f&&f.__esModule?f:{default:f}}function c(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function l(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function u(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var i=function(d){var p=d.substr(0,12).split("").map(function(g){return+g}).reduce(function(g,m,x){return x%2?g+m*3:g+m},0);return(10-p%10)%10},a=(function(f){u(d,f);function d(p,g){c(this,d),p.search(/^[0-9]{12}$/)!==-1&&(p+=i(p));var m=l(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,p,g));return m.lastChar=g.lastChar,m}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===i(this.data)}},{key:"leftText",value:function(){return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var g=this.data.substr(1,6),m=n.EAN13_STRUCTURE[this.data[0]];return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftEncode",this).call(this,g,m)}},{key:"rightText",value:function(){return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var g=this.data.substr(7,6);return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightEncode",this).call(this,g,"RRRRRR")}},{key:"encodeGuarded",value:function(){var g=t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(g.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(g.push({data:"00"}),g.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),g}}]),d})(o.default);return Ar.default=a,Ar}var Ir={},Il;function hA(){if(Il)return Ir;Il=1,Object.defineProperty(Ir,"__esModule",{value:!0});var e=(function(){function a(f,d){for(var p=0;p<d.length;p++){var g=d[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(f,g.key,g)}}return function(f,d,p){return d&&a(f.prototype,d),p&&a(f,p),f}})(),t=function a(f,d,p){f===null&&(f=Function.prototype);var g=Object.getOwnPropertyDescriptor(f,d);if(g===void 0){var m=Object.getPrototypeOf(f);return m===null?void 0:a(m,d,p)}else{if("value"in g)return g.value;var x=g.get;return x===void 0?void 0:x.call(p)}},n=Nx(),r=o(n);function o(a){return a&&a.__esModule?a:{default:a}}function s(a,f){if(!(a instanceof f))throw new TypeError("Cannot call a class as a function")}function c(a,f){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:a}function l(a,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);a.prototype=Object.create(f&&f.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(a,f):a.__proto__=f)}var u=function(f){var d=f.substr(0,7).split("").map(function(p){return+p}).reduce(function(p,g,m){return m%2?p+g:p+g*3},0);return(10-d%10)%10},i=(function(a){l(f,a);function f(d,p){return s(this,f),d.search(/^[0-9]{7}$/)!==-1&&(d+=u(d)),c(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,d,p))}return e(f,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===u(this.data)}},{key:"leftText",value:function(){return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var p=this.data.substr(0,4);return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftEncode",this).call(this,p,"LLLL")}},{key:"rightText",value:function(){return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var p=this.data.substr(4,4);return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightEncode",this).call(this,p,"RRRR")}}]),f})(r.default);return Ir.default=i,Ir}var Dr={},Dl;function pA(){if(Dl)return Dr;Dl=1,Object.defineProperty(Dr,"__esModule",{value:!0});var e=(function(){function d(p,g){for(var m=0;m<g.length;m++){var x=g[m];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(p,x.key,x)}}return function(p,g,m){return g&&d(p.prototype,g),m&&d(p,m),p}})(),t=ir(),n=sr(),r=c(n),o=Te(),s=c(o);function c(d){return d&&d.__esModule?d:{default:d}}function l(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function u(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function i(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var a=function(p){var g=p.split("").map(function(m){return+m}).reduce(function(m,x,y){return y%2?m+x*9:m+x*3},0);return g%10},f=(function(d){i(p,d);function p(g,m){return l(this,p),u(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,g,m))}return e(p,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var m=t.EAN5_STRUCTURE[a(this.data)];return{data:"1011"+(0,r.default)(this.data,m,"01"),text:this.text}}}]),p})(s.default);return Dr.default=f,Dr}var Nr={},Nl;function mA(){if(Nl)return Nr;Nl=1,Object.defineProperty(Nr,"__esModule",{value:!0});var e=(function(){function f(d,p){for(var g=0;g<p.length;g++){var m=p[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}return function(d,p,g){return p&&f(d.prototype,p),g&&f(d,g),d}})(),t=ir(),n=sr(),r=c(n),o=Te(),s=c(o);function c(f){return f&&f.__esModule?f:{default:f}}function l(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function u(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function i(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var a=(function(f){i(d,f);function d(p,g){return l(this,d),u(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,p,g))}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var g=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,r.default)(this.data,g,"01"),text:this.text}}}]),d})(s.default);return Nr.default=a,Nr}var gn={},kl;function kx(){if(kl)return gn;kl=1,Object.defineProperty(gn,"__esModule",{value:!0});var e=(function(){function f(d,p){for(var g=0;g<p.length;g++){var m=p[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}return function(d,p,g){return p&&f(d.prototype,p),g&&f(d,g),d}})();gn.checksum=a;var t=sr(),n=s(t),r=Te(),o=s(r);function s(f){return f&&f.__esModule?f:{default:f}}function c(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function l(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function u(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var i=(function(f){u(d,f);function d(p,g){c(this,d),p.search(/^[0-9]{11}$/)!==-1&&(p+=a(p));var m=l(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,p,g));return m.displayValue=g.displayValue,g.fontSize>g.width*10?m.fontSize=g.width*10:m.fontSize=g.fontSize,m.guardHeight=g.height+m.fontSize/2+g.textMargin,m}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==a(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var g="";return g+="101",g+=(0,n.default)(this.data.substr(0,6),"LLLLLL"),g+="01010",g+=(0,n.default)(this.data.substr(6,6),"RRRRRR"),g+="101",{data:g,text:this.text}}},{key:"guardedEncoding",value:function(){var g=[];return this.displayValue&&g.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),g.push({data:"101"+(0,n.default)(this.data[0],"L"),options:{height:this.guardHeight}}),g.push({data:(0,n.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),g.push({data:"01010",options:{height:this.guardHeight}}),g.push({data:(0,n.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),g.push({data:(0,n.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&g.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),g}}]),d})(o.default);function a(f){var d=0,p;for(p=1;p<11;p+=2)d+=parseInt(f[p]);for(p=0;p<11;p+=2)d+=parseInt(f[p])*3;return(10-d%10)%10}return gn.default=i,gn}var kr={},Ll;function gA(){if(Ll)return kr;Ll=1,Object.defineProperty(kr,"__esModule",{value:!0});var e=(function(){function g(m,x){for(var y=0;y<x.length;y++){var E=x[y];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(m,E.key,E)}}return function(m,x,y){return x&&g(m.prototype,x),y&&g(m,y),m}})(),t=sr(),n=c(t),r=Te(),o=c(r),s=kx();function c(g){return g&&g.__esModule?g:{default:g}}function l(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function u(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function i(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var a=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],f=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],d=(function(g){i(m,g);function m(x,y){l(this,m);var E=u(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,x,y));if(E.isValid=!1,x.search(/^[0-9]{6}$/)!==-1)E.middleDigits=x,E.upcA=p(x,"0"),E.text=y.text||""+E.upcA[0]+x+E.upcA[E.upcA.length-1],E.isValid=!0;else if(x.search(/^[01][0-9]{7}$/)!==-1)if(E.middleDigits=x.substring(1,x.length-1),E.upcA=p(E.middleDigits,x[0]),E.upcA[E.upcA.length-1]===x[x.length-1])E.isValid=!0;else return u(E);else return u(E);return E.displayValue=y.displayValue,y.fontSize>y.width*10?E.fontSize=y.width*10:E.fontSize=y.fontSize,E.guardHeight=y.height+E.fontSize/2+y.textMargin,E}return e(m,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var y="";return y+="101",y+=this.encodeMiddleDigits(),y+="010101",{data:y,text:this.text}}},{key:"guardedEncoding",value:function(){var y=[];return this.displayValue&&y.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),y.push({data:"101",options:{height:this.guardHeight}}),y.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),y.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&y.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),y}},{key:"encodeMiddleDigits",value:function(){var y=this.upcA[0],E=this.upcA[this.upcA.length-1],b=f[parseInt(E)][parseInt(y)];return(0,n.default)(this.middleDigits,b)}}]),m})(o.default);function p(g,m){for(var x=parseInt(g[g.length-1]),y=a[x],E="",b=0,R=0;R<y.length;R++){var w=y[R];w==="X"?E+=g[b++]:E+=w}return E=""+m+E,""+E+(0,s.checksum)(E)}return kr.default=d,kr}var Fl;function xA(){if(Fl)return ye;Fl=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.UPCE=ye.UPC=ye.EAN2=ye.EAN5=ye.EAN8=ye.EAN13=void 0;var e=dA(),t=d(e),n=hA(),r=d(n),o=pA(),s=d(o),c=mA(),l=d(c),u=kx(),i=d(u),a=gA(),f=d(a);function d(p){return p&&p.__esModule?p:{default:p}}return ye.EAN13=t.default,ye.EAN8=r.default,ye.EAN5=s.default,ye.EAN2=l.default,ye.UPC=i.default,ye.UPCE=f.default,ye}var xt={},Lr={},kt={},Vl;function vA(){return Vl||(Vl=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.START_BIN="1010",kt.END_BIN="11101",kt.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]),kt}var Bl;function Lx(){if(Bl)return Lr;Bl=1,Object.defineProperty(Lr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=vA(),n=Te(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function l(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){l(a,i);function a(){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return e(a,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var d=this,p=this.data.match(/.{2}/g).map(function(g){return d.encodePair(g)}).join("");return{data:t.START_BIN+p+t.END_BIN,text:this.text}}},{key:"encodePair",value:function(d){var p=t.BINARIES[d[1]];return t.BINARIES[d[0]].split("").map(function(g,m){return(g==="1"?"111":"1")+(p[m]==="1"?"000":"0")}).join("")}}]),a})(r.default);return Lr.default=u,Lr}var Fr={},$l;function yA(){if($l)return Fr;$l=1,Object.defineProperty(Fr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=Lx(),n=r(t);function r(i){return i&&i.__esModule?i:{default:i}}function o(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function s(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function c(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var l=function(a){var f=a.substr(0,13).split("").map(function(d){return parseInt(d,10)}).reduce(function(d,p,g){return d+p*(3-g%2*2)},0);return Math.ceil(f/10)*10-f},u=(function(i){c(a,i);function a(f,d){return o(this,a),f.search(/^[0-9]{13}$/)!==-1&&(f+=l(f)),s(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===l(this.data)}}]),a})(n.default);return Fr.default=u,Fr}var Ul;function EA(){if(Ul)return xt;Ul=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.ITF14=xt.ITF=void 0;var e=Lx(),t=o(e),n=yA(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}return xt.ITF=t.default,xt.ITF14=r.default,xt}var Ce={},Vr={},Gl;function ar(){if(Gl)return Vr;Gl=1,Object.defineProperty(Vr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=Te(),n=r(t);function r(i){return i&&i.__esModule?i:{default:i}}function o(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function s(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function c(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var l=(function(i){c(a,i);function a(f,d){return o(this,a),s(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"encode",value:function(){for(var d="110",p=0;p<this.data.length;p++){var g=parseInt(this.data[p]),m=g.toString(2);m=u(m,4-m.length);for(var x=0;x<m.length;x++)d+=m[x]=="0"?"100":"110"}return d+="1001",{data:d,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),a})(n.default);function u(i,a){for(var f=0;f<a;f++)i="0"+i;return i}return Vr.default=l,Vr}var Br={},xn={},Hl;function pi(){if(Hl)return xn;Hl=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.mod10=e,xn.mod11=t;function e(n){for(var r=0,o=0;o<n.length;o++){var s=parseInt(n[o]);(o+n.length)%2===0?r+=s:r+=s*2%10+Math.floor(s*2/10)}return(10-r%10)%10}function t(n){for(var r=0,o=[2,3,4,5,6,7],s=0;s<n.length;s++){var c=parseInt(n[n.length-1-s]);r+=o[s%o.length]*c}return(11-r%11)%11}return xn}var zl;function bA(){if(zl)return Br;zl=1,Object.defineProperty(Br,"__esModule",{value:!0});var e=ar(),t=r(e),n=pi();function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a+(0,n.mod10)(a),f))}return i})(t.default);return Br.default=l,Br}var $r={},Wl;function wA(){if(Wl)return $r;Wl=1,Object.defineProperty($r,"__esModule",{value:!0});var e=ar(),t=r(e),n=pi();function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a+(0,n.mod11)(a),f))}return i})(t.default);return $r.default=l,$r}var Ur={},ql;function RA(){if(ql)return Ur;ql=1,Object.defineProperty(Ur,"__esModule",{value:!0});var e=ar(),t=r(e),n=pi();function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){return o(this,i),a+=(0,n.mod10)(a),a+=(0,n.mod10)(a),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f))}return i})(t.default);return Ur.default=l,Ur}var Gr={},Kl;function SA(){if(Kl)return Gr;Kl=1,Object.defineProperty(Gr,"__esModule",{value:!0});var e=ar(),t=r(e),n=pi();function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){return o(this,i),a+=(0,n.mod11)(a),a+=(0,n.mod10)(a),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f))}return i})(t.default);return Gr.default=l,Gr}var Xl;function CA(){if(Xl)return Ce;Xl=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.MSI1110=Ce.MSI1010=Ce.MSI11=Ce.MSI10=Ce.MSI=void 0;var e=ar(),t=a(e),n=bA(),r=a(n),o=wA(),s=a(o),c=RA(),l=a(c),u=SA(),i=a(u);function a(f){return f&&f.__esModule?f:{default:f}}return Ce.MSI=t.default,Ce.MSI10=r.default,Ce.MSI11=s.default,Ce.MSI1010=l.default,Ce.MSI1110=i.default,Ce}var vn={},Yl;function _A(){if(Yl)return vn;Yl=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.pharmacode=void 0;var e=(function(){function u(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&u(i.prototype,a),f&&u(i,f),i}})(),t=Te(),n=r(t);function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){o(this,i);var d=s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f));return d.number=parseInt(a,10),d}return e(i,[{key:"encode",value:function(){for(var f=this.number,d="";!isNaN(f)&&f!=0;)f%2===0?(d="11100"+d,f=(f-2)/2):(d="100"+d,f=(f-1)/2);return d=d.slice(0,-2),{data:d,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),i})(n.default);return vn.pharmacode=l,vn}var yn={},Zl;function jA(){if(Zl)return yn;Zl=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.codabar=void 0;var e=(function(){function u(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&u(i.prototype,a),f&&u(i,f),i}})(),t=Te(),n=r(t);function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){o(this,i),a.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(a="A"+a+"A");var d=s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a.toUpperCase(),f));return d.text=d.options.text||d.text.replace(/[A-D]/g,""),d}return e(i,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var f=[],d=this.getEncodings(),p=0;p<this.data.length;p++)f.push(d[this.data.charAt(p)]),p!==this.data.length-1&&f.push("0");return{text:this.text,data:f.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),i})(n.default);return yn.codabar=l,yn}var vt={},Hr={},Lt={},Ql;function PA(){return Ql||(Ql=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.SYMBOLS=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],Lt.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],Lt.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"\x07":["($)","G"],"\b":["($)","H"]," ":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"\x1B":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]}),Lt}var Jl;function Fx(){if(Jl)return Hr;Jl=1,Object.defineProperty(Hr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=PA(),n=Te(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function l(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){l(a,i);function a(f,d){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var d=this.data.split("").flatMap(function(x){return t.MULTI_SYMBOLS[x]||x}),p=d.map(function(x){return a.getEncoding(x)}).join(""),g=a.checksum(d,20),m=a.checksum(d.concat(g),15);return{text:this.text,data:a.getEncoding("ÿ")+p+a.getEncoding(g)+a.getEncoding(m)+a.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(d){return t.BINARIES[a.symbolValue(d)]}},{key:"getSymbol",value:function(d){return t.SYMBOLS[d]}},{key:"symbolValue",value:function(d){return t.SYMBOLS.indexOf(d)}},{key:"checksum",value:function(d,p){var g=d.slice().reverse().reduce(function(m,x,y){var E=y%p+1;return m+a.symbolValue(x)*E},0);return a.getSymbol(g%47)}}]),a})(r.default);return Hr.default=u,Hr}var zr={},ef;function TA(){if(ef)return zr;ef=1,Object.defineProperty(zr,"__esModule",{value:!0});var e=(function(){function u(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&u(i.prototype,a),f&&u(i,f),i}})(),t=Fx(),n=r(t);function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f))}return e(i,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),i})(n.default);return zr.default=l,zr}var tf;function AA(){if(tf)return vt;tf=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.CODE93FullASCII=vt.CODE93=void 0;var e=Fx(),t=o(e),n=TA(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}return vt.CODE93=t.default,vt.CODE93FullASCII=r.default,vt}var En={},nf;function OA(){if(nf)return En;nf=1,Object.defineProperty(En,"__esModule",{value:!0}),En.GenericBarcode=void 0;var e=(function(){function u(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&u(i.prototype,a),f&&u(i,f),i}})(),t=Te(),n=r(t);function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f))}return e(i,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),i})(n.default);return En.GenericBarcode=l,En}var rf;function MA(){if(rf)return wr;rf=1,Object.defineProperty(wr,"__esModule",{value:!0});var e=iA(),t=fA(),n=xA(),r=EA(),o=CA(),s=_A(),c=jA(),l=AA(),u=OA();return wr.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:o.MSI,MSI10:o.MSI10,MSI11:o.MSI11,MSI1010:o.MSI1010,MSI1110:o.MSI1110,pharmacode:s.pharmacode,codabar:c.codabar,CODE93:l.CODE93,CODE93FullASCII:l.CODE93FullASCII,GenericBarcode:u.GenericBarcode},wr}var Wr={},of;function mi(){if(of)return Wr;of=1,Object.defineProperty(Wr,"__esModule",{value:!0});var e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t};return Wr.default=function(t,n){return e({},t,n)},Wr}var qr={},sf;function IA(){if(sf)return qr;sf=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.default=e;function e(t){var n=[];function r(o){if(Array.isArray(o))for(var s=0;s<o.length;s++)r(o[s]);else o.text=o.text||"",o.data=o.data||"",n.push(o)}return r(t),n}return qr}var Kr={},af;function DA(){if(af)return Kr;af=1,Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.default=e;function e(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}return Kr}var Xr={},Yr={},Zr={},cf;function Vx(){if(cf)return Zr;cf=1,Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.default=e;function e(t){var n=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var r in n)n.hasOwnProperty(r)&&(r=n[r],typeof t[r]=="string"&&(t[r]=parseInt(t[r],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}return Zr}var Qr={},uf;function Bx(){if(uf)return Qr;uf=1,Object.defineProperty(Qr,"__esModule",{value:!0});var e={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};return Qr.default=e,Qr}var lf;function NA(){if(lf)return Yr;lf=1,Object.defineProperty(Yr,"__esModule",{value:!0});var e=Vx(),t=o(e),n=Bx(),r=o(n);function o(c){return c&&c.__esModule?c:{default:c}}function s(c){var l={};for(var u in r.default)r.default.hasOwnProperty(u)&&(c.hasAttribute("jsbarcode-"+u.toLowerCase())&&(l[u]=c.getAttribute("jsbarcode-"+u.toLowerCase())),c.hasAttribute("data-"+u.toLowerCase())&&(l[u]=c.getAttribute("data-"+u.toLowerCase())));return l.value=c.getAttribute("jsbarcode-value")||c.getAttribute("data-value"),l=(0,t.default)(l),l}return Yr.default=s,Yr}var Jr={},eo={},_e={},ff;function $x(){if(ff)return _e;ff=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.getTotalWidthOfEncodings=_e.calculateEncodingAttributes=_e.getBarcodePadding=_e.getEncodingHeight=_e.getMaximumHeightOfEncodings=void 0;var e=mi(),t=n(e);function n(i){return i&&i.__esModule?i:{default:i}}function r(i,a){return a.height+(a.displayValue&&i.text.length>0?a.fontSize+a.textMargin:0)+a.marginTop+a.marginBottom}function o(i,a,f){if(f.displayValue&&a<i){if(f.textAlign=="center")return Math.floor((i-a)/2);if(f.textAlign=="left")return 0;if(f.textAlign=="right")return Math.floor(i-a)}return 0}function s(i,a,f){for(var d=0;d<i.length;d++){var p=i[d],g=(0,t.default)(a,p.options),m;g.displayValue?m=u(p.text,g,f):m=0;var x=p.data.length*g.width;p.width=Math.ceil(Math.max(m,x)),p.height=r(p,g),p.barcodePadding=o(m,x,g)}}function c(i){for(var a=0,f=0;f<i.length;f++)a+=i[f].width;return a}function l(i){for(var a=0,f=0;f<i.length;f++)i[f].height>a&&(a=i[f].height);return a}function u(i,a,f){var d;if(f)d=f;else if(typeof document<"u")d=document.createElement("canvas").getContext("2d");else return 0;d.font=a.fontOptions+" "+a.fontSize+"px "+a.font;var p=d.measureText(i);if(!p)return 0;var g=p.width;return g}return _e.getMaximumHeightOfEncodings=l,_e.getEncodingHeight=r,_e.getBarcodePadding=o,_e.calculateEncodingAttributes=s,_e.getTotalWidthOfEncodings=c,_e}var df;function kA(){if(df)return eo;df=1,Object.defineProperty(eo,"__esModule",{value:!0});var e=(function(){function l(u,i){for(var a=0;a<i.length;a++){var f=i[a];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(u,f.key,f)}}return function(u,i,a){return i&&l(u.prototype,i),a&&l(u,a),u}})(),t=mi(),n=o(t),r=$x();function o(l){return l&&l.__esModule?l:{default:l}}function s(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}var c=(function(){function l(u,i,a){s(this,l),this.canvas=u,this.encodings=i,this.options=a}return e(l,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var i=0;i<this.encodings.length;i++){var a=(0,n.default)(this.options,this.encodings[i].options);this.drawCanvasBarcode(a,this.encodings[i]),this.drawCanvasText(a,this.encodings[i]),this.moveCanvasDrawing(this.encodings[i])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var i=this.canvas.getContext("2d");i.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,i);var a=(0,r.getTotalWidthOfEncodings)(this.encodings),f=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=a+this.options.marginLeft+this.options.marginRight,this.canvas.height=f,i.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(i.fillStyle=this.options.background,i.fillRect(0,0,this.canvas.width,this.canvas.height)),i.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(i,a){var f=this.canvas.getContext("2d"),d=a.data,p;i.textPosition=="top"?p=i.marginTop+i.fontSize+i.textMargin:p=i.marginTop,f.fillStyle=i.lineColor;for(var g=0;g<d.length;g++){var m=g*i.width+a.barcodePadding;d[g]==="1"?f.fillRect(m,p,i.width,i.height):d[g]&&f.fillRect(m,p,i.width,i.height*d[g])}}},{key:"drawCanvasText",value:function(i,a){var f=this.canvas.getContext("2d"),d=i.fontOptions+" "+i.fontSize+"px "+i.font;if(i.displayValue){var p,g;i.textPosition=="top"?g=i.marginTop+i.fontSize-i.textMargin:g=i.height+i.textMargin+i.marginTop+i.fontSize,f.font=d,i.textAlign=="left"||a.barcodePadding>0?(p=0,f.textAlign="left"):i.textAlign=="right"?(p=a.width-1,f.textAlign="right"):(p=a.width/2,f.textAlign="center"),f.fillText(a.text,p,g)}}},{key:"moveCanvasDrawing",value:function(i){var a=this.canvas.getContext("2d");a.translate(i.width,0)}},{key:"restoreCanvas",value:function(){var i=this.canvas.getContext("2d");i.restore()}}]),l})();return eo.default=c,eo}var to={},hf;function LA(){if(hf)return to;hf=1,Object.defineProperty(to,"__esModule",{value:!0});var e=(function(){function u(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&u(i.prototype,a),f&&u(i,f),i}})(),t=mi(),n=o(t),r=$x();function o(u){return u&&u.__esModule?u:{default:u}}function s(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}var c="http://www.w3.org/2000/svg",l=(function(){function u(i,a,f){s(this,u),this.svg=i,this.encodings=a,this.options=f,this.document=f.xmlDocument||document}return e(u,[{key:"render",value:function(){var a=this.options.marginLeft;this.prepareSVG();for(var f=0;f<this.encodings.length;f++){var d=this.encodings[f],p=(0,n.default)(this.options,d.options),g=this.createGroup(a,p.marginTop,this.svg);this.setGroupOptions(g,p),this.drawSvgBarcode(g,p,d),this.drawSVGText(g,p,d),a+=d.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var a=(0,r.getTotalWidthOfEncodings)(this.encodings),f=(0,r.getMaximumHeightOfEncodings)(this.encodings),d=a+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(d,f),this.options.background&&this.drawRect(0,0,d,f,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(a,f,d){var p=d.data,g;f.textPosition=="top"?g=f.fontSize+f.textMargin:g=0;for(var m=0,x=0,y=0;y<p.length;y++)x=y*f.width+d.barcodePadding,p[y]==="1"?m++:m>0&&(this.drawRect(x-f.width*m,g,f.width*m,f.height,a),m=0);m>0&&this.drawRect(x-f.width*(m-1),g,f.width*m,f.height,a)}},{key:"drawSVGText",value:function(a,f,d){var p=this.document.createElementNS(c,"text");if(f.displayValue){var g,m;p.setAttribute("font-family",f.font),p.setAttribute("font-size",f.fontSize),f.fontOptions.includes("bold")&&p.setAttribute("font-weight","bold"),f.fontOptions.includes("italic")&&p.setAttribute("font-style","italic"),f.textPosition=="top"?m=f.fontSize-f.textMargin:m=f.height+f.textMargin+f.fontSize,f.textAlign=="left"||d.barcodePadding>0?(g=0,p.setAttribute("text-anchor","start")):f.textAlign=="right"?(g=d.width-1,p.setAttribute("text-anchor","end")):(g=d.width/2,p.setAttribute("text-anchor","middle")),p.setAttribute("x",g),p.setAttribute("y",m),p.appendChild(this.document.createTextNode(d.text)),a.appendChild(p)}}},{key:"setSvgAttributes",value:function(a,f){var d=this.svg;d.setAttribute("width",a+"px"),d.setAttribute("height",f+"px"),d.setAttribute("x","0px"),d.setAttribute("y","0px"),d.setAttribute("viewBox","0 0 "+a+" "+f),d.setAttribute("xmlns",c),d.setAttribute("version","1.1")}},{key:"createGroup",value:function(a,f,d){var p=this.document.createElementNS(c,"g");return p.setAttribute("transform","translate("+a+", "+f+")"),d.appendChild(p),p}},{key:"setGroupOptions",value:function(a,f){a.setAttribute("fill",f.lineColor)}},{key:"drawRect",value:function(a,f,d,p,g){var m=this.document.createElementNS(c,"rect");return m.setAttribute("x",a),m.setAttribute("y",f),m.setAttribute("width",d),m.setAttribute("height",p),g.appendChild(m),m}}]),u})();return to.default=l,to}var no={},pf;function FA(){if(pf)return no;pf=1,Object.defineProperty(no,"__esModule",{value:!0});var e=(function(){function r(o,s){for(var c=0;c<s.length;c++){var l=s[c];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,s,c){return s&&r(o.prototype,s),c&&r(o,c),o}})();function t(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(o,s,c){t(this,r),this.object=o,this.encodings=s,this.options=c}return e(r,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),r})();return no.default=n,no}var mf;function VA(){if(mf)return Jr;mf=1,Object.defineProperty(Jr,"__esModule",{value:!0});var e=kA(),t=c(e),n=LA(),r=c(n),o=FA(),s=c(o);function c(l){return l&&l.__esModule?l:{default:l}}return Jr.default={CanvasRenderer:t.default,SVGRenderer:r.default,ObjectRenderer:s.default},Jr}var Ft={},gf;function Ux(){if(gf)return Ft;gf=1,Object.defineProperty(Ft,"__esModule",{value:!0});function e(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")}function t(c,l){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:c}function n(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(c,l):c.__proto__=l)}var r=(function(c){n(l,c);function l(u,i){e(this,l);var a=t(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return a.name="InvalidInputException",a.symbology=u,a.input=i,a.message='"'+a.input+'" is not a valid input for '+a.symbology,a}return l})(Error),o=(function(c){n(l,c);function l(){e(this,l);var u=t(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return u.name="InvalidElementException",u.message="Not supported type to render on",u}return l})(Error),s=(function(c){n(l,c);function l(){e(this,l);var u=t(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return u.name="NoElementException",u.message="No element to render on.",u}return l})(Error);return Ft.InvalidInputException=r,Ft.InvalidElementException=o,Ft.NoElementException=s,Ft}var xf;function BA(){if(xf)return Xr;xf=1,Object.defineProperty(Xr,"__esModule",{value:!0});var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t=NA(),n=c(t),r=VA(),o=c(r),s=Ux();function c(a){return a&&a.__esModule?a:{default:a}}function l(a){if(typeof a=="string")return u(a);if(Array.isArray(a)){for(var f=[],d=0;d<a.length;d++)f.push(l(a[d]));return f}else{if(typeof HTMLCanvasElement<"u"&&a instanceof HTMLImageElement)return i(a);if(a&&a.nodeName&&a.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&a instanceof SVGElement)return{element:a,options:(0,n.default)(a),renderer:o.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&a instanceof HTMLCanvasElement)return{element:a,options:(0,n.default)(a),renderer:o.default.CanvasRenderer};if(a&&a.getContext)return{element:a,renderer:o.default.CanvasRenderer};if(a&&(typeof a>"u"?"undefined":e(a))==="object"&&!a.nodeName)return{element:a,renderer:o.default.ObjectRenderer};throw new s.InvalidElementException}}function u(a){var f=document.querySelectorAll(a);if(f.length!==0){for(var d=[],p=0;p<f.length;p++)d.push(l(f[p]));return d}}function i(a){var f=document.createElement("canvas");return{element:f,options:(0,n.default)(a),renderer:o.default.CanvasRenderer,afterRender:function(){a.setAttribute("src",f.toDataURL())}}}return Xr.default=l,Xr}var ro={},vf;function $A(){if(vf)return ro;vf=1,Object.defineProperty(ro,"__esModule",{value:!0});var e=(function(){function r(o,s){for(var c=0;c<s.length;c++){var l=s[c];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,s,c){return s&&r(o.prototype,s),c&&r(o,c),o}})();function t(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(o){t(this,r),this.api=o}return e(r,[{key:"handleCatch",value:function(s){if(s.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw s.message;else throw s;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(s){try{var c=s.apply(void 0,arguments);return this.api._options.valid(!0),c}catch(l){return this.handleCatch(l),this.api}}}]),r})();return ro.default=n,ro}var Wi,yf;function UA(){if(yf)return Wi;yf=1;var e=MA(),t=y(e),n=mi(),r=y(n),o=IA(),s=y(o),c=DA(),l=y(c),u=BA(),i=y(u),a=Vx(),f=y(a),d=$A(),p=y(d),g=Ux(),m=Bx(),x=y(m);function y(M){return M&&M.__esModule?M:{default:M}}var E=function(){},b=function(j,A,I){var F=new E;if(typeof j>"u")throw Error("No element to render on was provided.");return F._renderProperties=(0,i.default)(j),F._encodings=[],F._options=x.default,F._errorHandler=new p.default(F),typeof A<"u"&&(I=I||{},I.format||(I.format=C()),F.options(I)[I.format](A,I).render()),F};b.getModule=function(M){return t.default[M]};for(var R in t.default)t.default.hasOwnProperty(R)&&w(t.default,R);function w(M,j){E.prototype[j]=E.prototype[j.toUpperCase()]=E.prototype[j.toLowerCase()]=function(A,I){var F=this;return F._errorHandler.wrapBarcodeCall(function(){I.text=typeof I.text>"u"?void 0:""+I.text;var B=(0,r.default)(F._options,I);B=(0,f.default)(B);var q=M[j],U=P(A,q,B);return F._encodings.push(U),F})}}function P(M,j,A){M=""+M;var I=new j(M,A);if(!I.valid())throw new g.InvalidInputException(I.constructor.name,M);var F=I.encode();F=(0,s.default)(F);for(var B=0;B<F.length;B++)F[B].options=(0,r.default)(A,F[B].options);return F}function C(){return t.default.CODE128?"CODE128":Object.keys(t.default)[0]}E.prototype.options=function(M){return this._options=(0,r.default)(this._options,M),this},E.prototype.blank=function(M){var j=new Array(M+1).join("0");return this._encodings.push({data:j}),this},E.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var M;for(var j in this._renderProperties){M=this._renderProperties[j];var A=(0,r.default)(this._options,M.options);A.format=="auto"&&(A.format=C()),this._errorHandler.wrapBarcodeCall(function(){var I=A.value,F=t.default[A.format.toUpperCase()],B=P(I,F,A);_(M,B,A)})}}},E.prototype.render=function(){if(!this._renderProperties)throw new g.NoElementException;if(Array.isArray(this._renderProperties))for(var M=0;M<this._renderProperties.length;M++)_(this._renderProperties[M],this._encodings,this._options);else _(this._renderProperties,this._encodings,this._options);return this},E.prototype._defaults=x.default;function _(M,j,A){j=(0,s.default)(j);for(var I=0;I<j.length;I++)j[I].options=(0,r.default)(A,j[I].options),(0,l.default)(j[I].options);(0,l.default)(A);var F=M.renderer,B=new F(M.element,j,A);B.render(),M.afterRender&&M.afterRender()}return typeof window<"u"&&(window.JsBarcode=b),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(M,j){var A=[];return jQuery(this).each(function(){A.push(this)}),b(A,M,j)}),Wi=b,Wi}var oo={exports:{}},io={exports:{}},oe={};/** @license React v16.13.1
|
|
122
92
|
* react-is.production.min.js
|
|
123
93
|
*
|
|
124
94
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
125
95
|
*
|
|
126
96
|
* This source code is licensed under the MIT license found in the
|
|
127
97
|
* LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/var
|
|
98
|
+
*/var Ef;function GA(){if(Ef)return oe;Ef=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,i=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function b(w){if(typeof w=="object"&&w!==null){var P=w.$$typeof;switch(P){case t:switch(w=w.type,w){case u:case i:case r:case s:case o:case f:return w;default:switch(w=w&&w.$$typeof,w){case l:case a:case g:case p:case c:return w;default:return P}}case n:return P}}}function R(w){return b(w)===i}return oe.AsyncMode=u,oe.ConcurrentMode=i,oe.ContextConsumer=l,oe.ContextProvider=c,oe.Element=t,oe.ForwardRef=a,oe.Fragment=r,oe.Lazy=g,oe.Memo=p,oe.Portal=n,oe.Profiler=s,oe.StrictMode=o,oe.Suspense=f,oe.isAsyncMode=function(w){return R(w)||b(w)===u},oe.isConcurrentMode=R,oe.isContextConsumer=function(w){return b(w)===l},oe.isContextProvider=function(w){return b(w)===c},oe.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},oe.isForwardRef=function(w){return b(w)===a},oe.isFragment=function(w){return b(w)===r},oe.isLazy=function(w){return b(w)===g},oe.isMemo=function(w){return b(w)===p},oe.isPortal=function(w){return b(w)===n},oe.isProfiler=function(w){return b(w)===s},oe.isStrictMode=function(w){return b(w)===o},oe.isSuspense=function(w){return b(w)===f},oe.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===i||w===s||w===o||w===f||w===d||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===c||w.$$typeof===l||w.$$typeof===a||w.$$typeof===x||w.$$typeof===y||w.$$typeof===E||w.$$typeof===m)},oe.typeOf=b,oe}var ie={};/** @license React v16.13.1
|
|
129
99
|
* react-is.development.js
|
|
130
100
|
*
|
|
131
101
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
132
102
|
*
|
|
133
103
|
* This source code is licensed under the MIT license found in the
|
|
134
104
|
* LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/var
|
|
105
|
+
*/var bf;function HA(){return bf||(bf=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,i=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function b(D){return typeof D=="string"||typeof D=="function"||D===r||D===i||D===s||D===o||D===f||D===d||typeof D=="object"&&D!==null&&(D.$$typeof===g||D.$$typeof===p||D.$$typeof===c||D.$$typeof===l||D.$$typeof===a||D.$$typeof===x||D.$$typeof===y||D.$$typeof===E||D.$$typeof===m)}function R(D){if(typeof D=="object"&&D!==null){var ae=D.$$typeof;switch(ae){case t:var ve=D.type;switch(ve){case u:case i:case r:case s:case o:case f:return ve;default:var rt=ve&&ve.$$typeof;switch(rt){case l:case a:case g:case p:case c:return rt;default:return ae}}case n:return ae}}}var w=u,P=i,C=l,_=c,M=t,j=a,A=r,I=g,F=p,B=n,q=s,U=o,G=f,$=!1;function V(D){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),T(D)||R(D)===u}function T(D){return R(D)===i}function L(D){return R(D)===l}function Y(D){return R(D)===c}function Q(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function X(D){return R(D)===a}function ee(D){return R(D)===r}function Z(D){return R(D)===g}function k(D){return R(D)===p}function W(D){return R(D)===n}function K(D){return R(D)===s}function z(D){return R(D)===o}function J(D){return R(D)===f}ie.AsyncMode=w,ie.ConcurrentMode=P,ie.ContextConsumer=C,ie.ContextProvider=_,ie.Element=M,ie.ForwardRef=j,ie.Fragment=A,ie.Lazy=I,ie.Memo=F,ie.Portal=B,ie.Profiler=q,ie.StrictMode=U,ie.Suspense=G,ie.isAsyncMode=V,ie.isConcurrentMode=T,ie.isContextConsumer=L,ie.isContextProvider=Y,ie.isElement=Q,ie.isForwardRef=X,ie.isFragment=ee,ie.isLazy=Z,ie.isMemo=k,ie.isPortal=W,ie.isProfiler=K,ie.isStrictMode=z,ie.isSuspense=J,ie.isValidElementType=b,ie.typeOf=R})()),ie}var wf;function Gx(){return wf||(wf=1,process.env.NODE_ENV==="production"?io.exports=GA():io.exports=HA()),io.exports}/*
|
|
136
106
|
object-assign
|
|
137
107
|
(c) Sindre Sorhus
|
|
138
108
|
@license MIT
|
|
139
|
-
*/var
|
|
140
|
-
Valid keys: `+JSON.stringify(Object.keys(O),null," "));var D=oe(F,q,X,ie,te+"."+q,n);if(D)return D}return null}return v(k)}function $(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every($);if(O===null||u(O))return!0;var k=f(O);if(k){var ee=k.call(O),ne;if(k!==O.entries){for(;!(ne=ee.next()).done;)if(!$(ne.value))return!1}else for(;!(ne=ee.next()).done;){var X=ne.value;if(X&&!$(X[1]))return!1}}else return!1;return!0;default:return!1}}function K(O,k){return O==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function G(O){var k=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":K(k,O)?"symbol":k}function H(O){if(typeof O>"u"||O===null)return""+O;var k=G(O);if(k==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return k}function U(O){var k=H(O);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function L(O){return!O.constructor||!O.constructor.name?d:O.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Ss}var Cs,id;function kM(){if(id)return Cs;id=1;var e=Gc();function t(){}function n(){}return n.resetWarningCache=t,Cs=function(){function r(c,u,l,s,a,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Cs}var sd;function LM(){if(sd)return Ao.exports;if(sd=1,process.env.NODE_ENV!=="production"){var e=Ey(),t=!0;Ao.exports=DM()(e.isElement,t)}else Ao.exports=kM()();return Ao.exports}var _s,ad;function FM(){if(ad)return _s;ad=1;function e(v){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(b){return typeof b}:e=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},e(v)}var t=o(_),n=o(OM()),r=o(LM());function o(v){return v&&v.__esModule?v:{default:v}}function i(v,x){if(!(v instanceof x))throw new TypeError("Cannot call a class as a function")}function c(v,x){for(var b=0;b<x.length;b++){var w=x[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}function u(v,x,b){return x&&c(v.prototype,x),v}function l(v,x){return x&&(e(x)==="object"||typeof x=="function")?x:a(v)}function s(v){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},s(v)}function a(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function f(v,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(x&&x.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),x&&d(v,x)}function d(v,x){return d=Object.setPrototypeOf||function(w,S){return w.__proto__=S,w},d(v,x)}var h,m=t.default.version.split(/[.-]/);m[0]==="0"&&(m[1]==="13"||m[1]==="12")?h=function(x){return x.getDOMNode()}:h=function(x){return x};var p=(function(v){f(x,v);function x(b){var w;return i(this,x),w=l(this,s(x).call(this,b)),w.renderElementRef=t.default.createRef(),w.update=w.update.bind(a(w)),w}return u(x,[{key:"shouldComponentUpdate",value:function(w){var S=this;return Object.keys(x.propTypes).some(function(E){return S.props[E]!==w[E]})}},{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var w=h(this.renderElementRef.current);try{new n.default(w,this.props.value,Object.assign({text:this.props.text||this.props.value},this.props))}catch(S){window.console.error(S)}}},{key:"render",value:function(){var w=this.props,S=w.id,E=w.className;if(this.props.renderer==="svg")return t.default.createElement("svg",{ref:this.renderElementRef,id:S,className:E});if(this.props.renderer==="canvas")return t.default.createElement("canvas",{ref:this.renderElementRef,id:S,className:E});if(this.props.renderer==="img")return t.default.createElement("img",{ref:this.renderElementRef,id:S,className:E})}}]),x})(t.default.Component);return p.propTypes={value:r.default.string.isRequired,text:r.default.string,renderer:r.default.string,format:r.default.string,width:r.default.number,height:r.default.number,displayValue:r.default.bool,fontOptions:r.default.string,font:r.default.string,textAlign:r.default.string,textPosition:r.default.string,textMargin:r.default.number,fontSize:r.default.number,background:r.default.string,lineColor:r.default.string,margin:r.default.number,marginTop:r.default.number,marginBottom:r.default.number,marginLeft:r.default.number,marginRight:r.default.number,id:r.default.string,className:r.default.string,ean128:r.default.bool},p.defaultProps={format:"CODE128",renderer:"svg",width:2,height:100,displayValue:!0,fontOptions:"",font:"monospace",textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,className:"",ean128:!1},_s=p,_s}var VM=FM();const BM=pd(VM),$M=e=>{const{value:t,className:n="",format:r="CODE128",width:o=2,height:i=100,displayValue:c=!0,fontSize:u=20,background:l="#FFFFFF",lineColor:s="#000000",margin:a=10,...f}=e,d=N.classNames("flex items-center justify-center",n);return g.jsx("div",{className:d,...f,children:g.jsx(BM,{value:t,format:r,width:o,height:i,displayValue:c,fontSize:u,background:l,lineColor:s,margin:a})})},UM=e=>{const{variant:t}=e;return t==="qr"?g.jsx(WO,{...e}):t==="barcode"?g.jsx($M,{...e}):null},GM=({classNames:e,group:t=[],defaultValue:n="",ariaLabel:r="",onValueChange:o,...i})=>g.jsx(VE,{className:"flex flex-row gap-4",defaultValue:n,"aria-label":r,onValueChange:o,...i,children:t==null?void 0:t.map(({id:c,label:u,value:l,checked:s,disabled:a})=>g.jsxs("div",{className:"flex items-center",children:[g.jsx(BE,{className:N.classNames("size-4 cursor-pointer rounded-full bg-white outline-1 hover:outline-primary-blue focus:outline-primary-blue data-[state=checked]:outline-1 data-[state=checked]:outline-primary-blue outline-neutral-3",{"cursor-not-allowed outline-gray-5 bg-gray-3 hover:outline-neutral-3 data-[state=checked]:outline-neutral-3":a},e==null?void 0:e.item),disabled:a,defaultChecked:s,value:l,id:c,children:g.jsx($E,{className:N.classNames("relative flex size-full items-center justify-center after:block after:size-2 after:rounded-full after:bg-primary-blue",{"after:bg-black/25":a},e==null?void 0:e.indicator)})}),g.jsx("label",{className:N.classNames("pl-2 text-[15px] leading-none text-black cursor-pointer",{"cursor-not-allowed text-black/25":a},e==null?void 0:e.label),htmlFor:c,children:u})]},c))}),HM="relative flex bg-gray-100 rounded-xl p-1 md:w-fit",zM="relative text-grays-Macropay-07 z-10 inline-flex items-center gap-1 text-sm font-medium transition-colors duration-200 justify-center flex-1 whitespace-nowrap",WM="cursor-not-allowed bg-gray-3 text-gray-6 opacity-50",qM="text-primary-blue",KM="flex-col",YM={sm:"h-6 rounded-md",md:"h-8",lg:"h-10 rounded-lg",xl:"h-12 rounded-lg"},XM={sm:"w-6 rounded-md",md:"w-8",lg:"w-10 rounded-lg",xl:"w-12 rounded-lg"},ZM={sm:"px-3 py-[3px]",md:"px-3 py-[3px]",lg:"px-3 py-[3px]",xl:"px-3 py-[3px]"},QM=(e,t=!1)=>(t?XM:YM)[e]||"",JM=(e,t,n,r)=>N.classNames(HM,QM(e,t),t&&KM,n&&"opacity-50 cursor-not-allowed",r),eI=(e,t,n)=>(r,o)=>{e||r.disabled||(t(o),n==null||n(r.value))},tI=(e,t)=>e??t,nI=e=>e.map(t=>typeof t=="string"||typeof t=="number"?{label:t,value:t}:t),rI=(e,t)=>{const[n,r]=_.useState(0),o=_.useMemo(()=>nI(e),[e]);return _.useEffect(()=>{const i=o.findIndex(c=>c.value===t);i!==-1&&r(i)},[t,o]),{activeIndex:n,setActiveIndex:r,normalizedOptions:o}},oI=(e,t,n,r)=>{const[o,i]=_.useState({width:0,height:0,x:0,y:0}),c=_.useCallback(()=>{if(e.current){const u=e.current.children[t+1];if(u){const l=e.current.getBoundingClientRect(),s=u.getBoundingClientRect();i({width:s.width,height:s.height,x:s.left-l.left,y:s.top-l.top})}}},[e,t]);return _.useEffect(()=>{c()},[c,n,r]),_.useEffect(()=>{if(!e.current)return;const u=new ResizeObserver(()=>{c()});return u.observe(e.current),()=>{u.disconnect()}},[c]),o},iI={sm:"rounded-md",lg:"rounded-lg",xl:"rounded-lg"},sI=({indicatorStyle:e,vertical:t,size:n})=>{const r=iI[n]||"rounded-lg";return g.jsx(le.div,{className:N.classNames("absolute bg-white shadow-md",r,t?"left-1 right-1":"top-1 bottom-1"),animate:{left:t?4:e.x,top:t?e.y:4,width:t?"calc(100% - 8px)":e.width,height:t?e.height:"calc(100% - 8px)"},transition:{type:"spring",stiffness:500,damping:30}})},aI=(e,t,n)=>N.classNames(zM,ZM[e],t&&WM,n?"w-full":"flex-shrink-0"),cI=({option:e,index:t,isActive:n,disabled:r,vertical:o,size:i,onClick:c})=>{const u=aI(i,e.disabled||r,o);return g.jsxs("button",{type:"button",className:N.classNames(u,n&&qM),onClick:()=>c(e,t),disabled:r||e.disabled,children:[e.icon&&g.jsx("span",{className:"text-base",children:e.icon}),e.label]},`${e.value}-${t}`)},lI={initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.3,ease:"easeOut"}},uI=({options:e,value:t,defaultValue:n,onChange:r,size:o="md",disabled:i=!1,vertical:c=!1,className:u,...l})=>{const s=_.useId(),a=_.useRef(null),{activeIndex:f,setActiveIndex:d,normalizedOptions:h}=rI(e,tI(t,n)),m=oI(a,f,o,c),p=eI(i,d,r),v=JM(o,c,i,u);return g.jsxs(le.div,{ref:a,id:`${s}-segmented`,className:v,...lI,...l,children:[g.jsx(sI,{indicatorStyle:m,vertical:c,size:o}),h.map((x,b)=>g.jsx(cI,{option:x,index:b,isActive:b===f,disabled:i,vertical:c,size:o,onClick:p},`${x.value}-${b}`))]})},fI={sm:"h-6 text-sm py-px rounded-sm",md:"h-8 text-base py-[5px] rounded-md",lg:"h-10 text-lg py-2 rounded-lg",xl:"h-12 text-lg p-3 rounded-lg"},dI=({size:e,disabled:t,className:n,triggerRef:r,placeholder:o})=>g.jsxs(mS,{ref:r,disabled:t,className:N.classNames("outline-1 outline-gray-7 px-3 py-[5px] bg-white flex justify-between items-center cursor-pointer h-auto!",n,fI[e],{"bg-gray-3 text-gray-6 outline-gray-5 cursor-not-allowed":t}),children:[g.jsx(gS,{className:N.classNames("text-black truncate flex-1",{"text-gray-6":t}),placeholder:o}),g.jsx(vS,{className:"flex items-center",children:g.jsx(ce.SvgChevronLeft,{className:N.classNames("-rotate-90",{"text-gray-6":t})})})]}),Cy=_.forwardRef(({children:e,className:t,disabled:n,...r},o)=>g.jsx(wS,{ref:o,disabled:n,className:N.classNames("w-full h-auto outline-0 hover:bg-gray-3 px-4 py-[5px] cursor-pointer",{"text-gray-6 cursor-not-allowed":n},t),...r,children:g.jsx(ES,{className:"whitespace-nowrap",children:e})}));Cy.displayName="SelectItem";const hI=({message:e="No hay elementos disponibles."})=>g.jsx("div",{className:"w-full h-24 flex justify-center items-center text-gray-6 text-sm",children:e}),_y=_.forwardRef(({value:e,onChange:t,placeholder:n="Buscar...",disabled:r},o)=>g.jsx("div",{className:"px-2 py-2 border-b border-gray-4 bg-white sticky top-0",onPointerDown:i=>{i.stopPropagation()},children:g.jsx("input",{ref:o,type:"text",value:e,onChange:t,placeholder:n,disabled:r,autoComplete:"off",autoFocus:!0,className:N.classNames("w-full px-3 py-1.5 text-sm border border-gray-4 rounded outline-none","focus:border-primary-blue focus:ring-1 focus:ring-primary-blue","disabled:bg-gray-3 disabled:cursor-not-allowed"),onKeyDown:i=>{i.stopPropagation()},onMouseDown:i=>{i.stopPropagation()},onPointerDown:i=>{i.stopPropagation()}})}));_y.displayName="SearchInput";const pI=({width:e,allItems:t,filteredItems:n,currentValue:r,emptyMessage:o,showSearch:i,searchValue:c="",onSearchChange:u,searchPlaceholder:l,disabled:s,notFoundContent:a,inputRef:f})=>{const d=(n==null?void 0:n.length)===0&&!r;let h;return c&&a?h=a:c?h="No results found":h=o||"No elements available.",g.jsxs(xS,{position:"popper",sideOffset:5,className:N.classNames("overflow-hidden rounded-lg bg-white shadow-lg border border-gray-4 min-w-[200px] max-w-[350px] w-auto"),style:e?{width:e}:{},children:[i&&u&&g.jsx(_y,{ref:f,value:c,onChange:u,placeholder:l,disabled:s}),g.jsx(bS,{className:"space-y-1",children:d?g.jsx(hI,{message:h}):g.jsx(g.Fragment,{children:t==null?void 0:t.map(m=>{const p=n.some(v=>v.value===m.value);return g.jsx(Cy,{value:m.value,disabled:m==null?void 0:m.disabled,className:p?"":"hidden",children:m.children},m.value)})})})]})},mI=e=>{const[t,n]=_.useState(0),r=_.useRef(null);return _.useEffect(()=>{r.current&&n(r.current.offsetWidth)},[e]),{triggerWidth:t,triggerRef:r}},gI=({showSearch:e,items:t,filterOption:n,onSearch:r})=>{const[o,i]=_.useState(""),[c,u]=_.useState(!1),l=_.useRef(null);_.useEffect(()=>{c||i("")},[c]),_.useEffect(()=>{c&&e&&l.current&&requestAnimationFrame(()=>{var d;(d=l.current)==null||d.focus()})},[c,e,o]);const s=(d,h)=>{if(!d)return!0;const m=d.toLowerCase(),p=typeof h.children=="string"?h.children.toLowerCase():"",v=h.value.toLowerCase();return p.includes(m)||v.includes(m)},a=e?t.filter(d=>(n||s)(o,d)):t;return{searchValue:o,open:c,setOpen:u,filteredItems:a,handleSearchChange:d=>{const h=d.target.value;i(h),r==null||r(h)},inputRef:l}},vI=({value:e,defaultValue:t,onValueChange:n})=>{const[r,o]=_.useState(t);return _.useEffect(()=>{e!==void 0&&o(e)},[e]),{currentValue:e??r,handleValueChange:u=>{e===void 0&&o(u),n==null||n(u)}}},yI=({disabled:e,className:t,value:n,defaultValue:r,size:o="md",items:i=[],placeholder:c="Selecciona un elemento...",emptyMessage:u="No hay elementos disponibles.",onValueChange:l,showSearch:s=!1,searchPlaceholder:a="Buscar...",onSearch:f,filterOption:d,notFoundContent:h})=>{const{currentValue:m,handleValueChange:p}=vI({value:n,defaultValue:r,onValueChange:l}),{triggerWidth:v,triggerRef:x}=mI(t),{searchValue:b,open:w,setOpen:S,filteredItems:E,handleSearchChange:A,inputRef:R}=gI({showSearch:s,items:i,filterOption:d,onSearch:f});return g.jsxs(pS,{value:m,onValueChange:p,open:w,onOpenChange:S,children:[g.jsx(dI,{size:o,disabled:e,className:t,triggerRef:x,placeholder:c}),g.jsx(yS,{children:g.jsx(pI,{width:v,allItems:i,filteredItems:E,currentValue:m,emptyMessage:u,showSearch:s,searchValue:b,onSearchChange:A,searchPlaceholder:a,disabled:e,notFoundContent:h,inputRef:R})})]})},xI=()=>g.jsxs("div",{role:"status",className:"animate-pulse",children:[g.jsxs("div",{className:"flex items-center justify-center mt-4",children:[g.jsx(ce.SvgSkeletonAvatar,{}),g.jsxs("div",{className:"flex flex-col space-y-2",children:[g.jsx("div",{className:"w-20 h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 me-3"}),g.jsx("div",{className:"w-24 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]})]}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),Ry=()=>g.jsxs("div",{role:"status","aria-hidden":!0,className:"animate-pulse",children:[g.jsx("div",{className:"h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 "}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),bI=()=>g.jsxs("div",{role:"status",className:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center",children:[g.jsx("div",{className:"flex items-center justify-center w-full h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700",children:g.jsx(ce.SvgSkeletonImage,{})}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),wI=()=>g.jsxs("div",{role:"status",className:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center",children:[g.jsx("div",{className:"flex items-center justify-center w-full h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700",children:g.jsx(ce.SvgSkeletonImage,{})}),g.jsxs("div",{className:"w-full",children:[g.jsx("div",{className:"h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[480px] mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[440px] mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[360px]"})]}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),EI=()=>g.jsxs("div",{role:"status",className:"p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded shadow animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsxs("div",{className:"flex items-center justify-between pt-4",children:[g.jsxs("div",{children:[g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),g.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),g.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),g.jsx("span",{className:"sr-only",children:"Loading..."})]}),SI={default:Ry,avatar:xI,image:bI,"image-description":wI,list:EI},CI=({type:e="default"})=>{const t=SI[e]??Ry;return g.jsx(t,{})},_I={sm:"h-1",md:"h-2",lg:"h-3",xl:"h-4"},RI={primary:"bg-primary-blue",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500",info:"bg-blue-400"},TI={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},PI=({classNames:e,rangeColor:t="primary",customRangeClass:n,size:r="md",showLabels:o=!1,formatLabel:i,min:c=0,max:u=100,...l})=>{const s=a=>i?i(a):a.toString();return g.jsxs("div",{className:"w-full",children:[g.jsxs(FS,{className:N.classNames("relative flex items-center select-none touch-none w-full",e==null?void 0:e.root),min:c,max:u,...l,children:[g.jsx(VS,{className:N.classNames("relative grow rounded-full bg-gray-200",_I[r],e==null?void 0:e.track),children:g.jsx(BS,{className:N.classNames("absolute rounded-full h-full",n||RI[t],e==null?void 0:e.range)})}),g.jsx($S,{className:N.classNames("block rounded-full bg-white border-2 border-primary-blue shadow-md hover:shadow-lg","focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2","transition-shadow cursor-pointer",TI[r],e==null?void 0:e.thumb)})]}),o&&g.jsxs("div",{className:N.classNames("flex justify-between mt-2 text-sm text-gray-600",e==null?void 0:e.labels),children:[g.jsx("span",{className:e==null?void 0:e.startLabelClass,children:s(c)}),g.jsx("span",{className:e==null?void 0:e.endLabelClass,children:s(u)})]})]})},AI={sm:"size-6",md:"size-8",lg:"size-10",xl:"size-12"},OI={sm:"size-5",md:"size-6",lg:"size-7",xl:"size-8"},Rs={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},MI={sm:"size-6",md:"size-8",lg:"size-10",xl:"size-12"},II={sm:2,md:4,lg:6,xl:8},cd=({disabled:e,onClick:t,arrow:n,size:r})=>{const o=`${e?"text-gray-6":"text-primary-blue"}`,i={right:g.jsx(ce.SvgRight,{className:o}),left:g.jsx(ce.SvgLeft,{className:o})},c=N.classNames("flex items-center justify-center rounded-md border disabled:border-zinc-300 disabled:bg-neutral-100 disabled:text-stone-300 shadow-none transition-colors duration-300 ease-linear bg-white border-gray-5 text-gray-4 transitions-all easy-out hover:text-blue-900 hover:border-blue-900",AI[r]);return g.jsx("button",{"aria-label":`stepButton-${n}`,type:"button",className:c,disabled:e,onClick:t,children:i[n]})},NI=({id:e,name:t,status:n,href:r,size:o="md"})=>{const i=N.classNames("flex items-center justify-center rounded-full",OI[o],{"border border-primary-blue":n==="COMPLETE","bg-primary-blue":n==="CURRENT","border border-gray-6":n==="PENDING"}),c=N.classNames("font-medium",Rs[o],{"text-primary-blue":n==="CURRENT","text-gray-6":n==="PENDING"}),u=N.classNames("font-medium",Rs[o],{"text-white":n==="CURRENT","text-gray-6":n==="PENDING"});return g.jsxs("a",{href:r,className:N.classNames("flex gap-2 font-medium items-center",Rs[o]),children:[g.jsx("span",{className:i,children:n==="COMPLETE"?g.jsx(ce.SvgDone,{className:N.classNames("text-primary-blue",MI[o]),"aria-hidden":"true"}):g.jsx("span",{className:u,children:e})}),g.jsx("span",{className:c,children:t})]})},jI=({visibleSteps:e,size:t})=>{const n=II[t];return g.jsx(We,{gap:n,justify:"center",children:e.map((r,o)=>g.jsxs(We,{gap:n,align:"center",children:[g.jsx(NI,{...r,size:t}),o+1!==e.length&&g.jsx(ce.SvgRight,{className:"text-gray-5"})]},crypto.randomUUID()))})},Ts=(e,t,n,r)=>e?4:t?3:n?2:r?1:3,DI=e=>{const t=e.find(n=>n.status==="CURRENT");return t?Number(t.id)-1:0},kI=e=>e===0,LI=(e,t,n)=>e>=t-n,FI=e=>e-1,VI=e=>e+1,BI=({steps:e,size:t="md",className:n=""})=>{const{xs:r,sm:o,md:i,lg:c}=dd.useBreakpoint(),[u,l]=_.useState(()=>Ts(c,i,o,r)),s=DI(e),[a,f]=_.useState(()=>{const b=Ts(c,i,o,r),w=Math.max(0,e.length-b);return Math.min(s,w)}),[d,h]=_.useState([]);_.useEffect(()=>{l(Ts(c,i,o,r))},[r,o,i,c]),_.useEffect(()=>{const b=Math.min(a+u,e.length);h(e.slice(a,b))},[a,e,u]);const m=()=>f(FI(a)),p=()=>f(VI(a)),v=kI(a),x=LI(a,e.length,u);return g.jsxs("div",{className:N.classNames("flex flex-row items-center w-full justify-between gap-4",{[n]:n}),children:[g.jsx(cd,{arrow:"left",disabled:v,onClick:m,size:t}),g.jsx(jI,{visibleSteps:d,size:t}),g.jsx(cd,{arrow:"right",disabled:x,onClick:p,size:t})]})},Hc={md:{root:"h-[22px] w-11",thumb:"size-[18px]",children:"h-4 w-4 text-xs"},sm:{root:"h-4 w-7",thumb:"size-3",children:"h-3 w-3 text-[10px]"}},Yn={root:"relative peer focus-visible:border-ring focus-visible:ring-ring/50 flex px-px shrink-0 items-center justify-start rounded-full border border-transparent shadow-xs outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-gray-6 dark:data-[state=unchecked]:bg-input/80 data-[state=checked]:justify-end transition-colors duration-200",thumb:"relative z-10 bg-white pointer-events-none block rounded-full ring-0 shadow-sm",children:"absolute flex items-center justify-center text-white/80 transition-opacity duration-200",unCheckedChildren:"left-1 data-[state=checked]:opacity-0 data-[state=checked]:invisible",checkedChildren:"right-1 data-[state=unchecked]:opacity-0 data-[state=unchecked]:invisible"},$I={default:"data-[state=checked]:bg-[#0047BA]",success:"data-[state=checked]:bg-green-500",danger:"data-[state=checked]:bg-red-500"},UI=(e,t,n,r)=>N.classNames(Yn.root,$I[e],Hc[t].root,n&&"cursor-not-allowed",r),ld=(e,t)=>{const n=t?Yn.checkedChildren:Yn.unCheckedChildren;return N.classNames(Yn.children,n,Hc[e].children)},GI=e=>{const t=typeof e=="string"?e:e.text,n=typeof e=="string"?"right":e.position;return{labelText:t,labelPosition:n}},ud=e=>N.classNames("text-sm text-foreground",e&&"opacity-50"),HI=e=>N.classNames("flex items-center gap-2",e&&"cursor-not-allowed"),zI={type:"spring",stiffness:500,damping:30,mass:1},WI=({className:e,label:t,type:n="default",size:r="md",checked:o,defaultChecked:i=!1,disabled:c=!1,onCheckedChange:u,checkedChildren:l,unCheckedChildren:s,...a})=>{const f=Hc[r],d=g.jsxs(WS,{className:UI(n,r,c,e),checked:o,defaultChecked:i,disabled:c,onCheckedChange:u,...a,children:[s&&g.jsx("div",{className:ld(r,!1),children:s}),g.jsx(qS,{asChild:!0,children:g.jsx(le.div,{className:N.classNames(Yn.thumb,f.thumb),layout:!0,transition:zI,whileTap:{scale:.95}})}),l&&g.jsx("div",{className:ld(r,!0),children:l})]});if(t){const{labelText:h,labelPosition:m}=GI(t);return g.jsxs("div",{className:HI(c),children:[m==="left"&&g.jsx("span",{className:ud(c),children:h}),d,m==="right"&&g.jsx("span",{className:ud(c),children:h})]})}return d},qI={success:{icon:g.jsx(ce.SvgIconCheckCircle,{width:16,height:16}),bgColor:"bg-green-1",textColor:"text-green-6",borderColor:"border-green-3",closeButtonColor:"hover:bg-green-2"},info:{icon:g.jsx(ce.SvgIconInfoCircle,{width:16,height:16}),bgColor:"bg-blue-1",textColor:"text-blue-6",borderColor:"border-blue-3",closeButtonColor:"hover:bg-blue-2"},warning:{icon:g.jsx(ce.SvgIconWarningCircle,{width:16,height:16}),bgColor:"bg-gold-1",textColor:"text-gold-6",borderColor:"border-gold-3",closeButtonColor:"hover:bg-gold-2"},error:{icon:g.jsx(ce.SvgIconErrorCircle,{width:16,height:16}),bgColor:"bg-red-1",textColor:"text-red-6",borderColor:"border-red-3",closeButtonColor:"hover:bg-red-2"}},KI=({children:e,type:t="info",showIcon:n=!1,closable:r=!1,onClose:o,className:i="",icon:c,bgColor:u,textColor:l,borderColor:s,...a})=>{const f=!!(u||l||s),d=qI[t],h=c||(n?d.icon:null),m=N.classNames("inline-flex items-center gap-2 px-2 py-2 rounded border text-sm font-medium leading-none rounded-sm",{[d.bgColor]:!f,[d.textColor]:!f,[d.borderColor]:!f,[i]:i}),p=f?{backgroundColor:u,color:l,borderColor:s}:void 0,v=N.classNames("rounded transition-colors cursor-pointer text-black/[0.45]",{[d.closeButtonColor]:!f});return g.jsxs("span",{className:m,style:p,...a,children:[h&&g.jsx("span",{className:"inline-flex shrink-0",children:h}),g.jsx("span",{className:"inline-flex items-center",children:e}),r&&g.jsx("button",{onClick:o,className:v,"aria-label":"Remove tag",type:"button",children:g.jsx(ce.SvgClose,{width:16,height:16})})]})},YI={initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},XI=({type:e,items:t,currentActiveKey:n,contentClassName:r})=>{var o;if(e==="segmented"){const i=(o=t.find(c=>c.key===n))==null?void 0:o.content;return g.jsx(Tl,{value:n,forceMount:!0,asChild:!0,children:g.jsx(Wt,{mode:"wait",initial:!1,children:g.jsx(le.div,{className:N.classNames("min-w-full",r),variants:YI,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.25,ease:"easeInOut"},children:i},n)})})}return g.jsx(g.Fragment,{children:t.map(i=>g.jsx(Tl,{value:i.key,className:N.classNames("min-w-full",r),children:i.content},i.key))})},ZI=(e,t)=>N.classNames({"text-sm font-normal":e==="default"||e==="underline"||e==="pills","border-b border-gray-200":e==="underline","border-b border-gray-200 text-lg font-semibold":e==="with-icon","bg-gray-100 rounded-xl p-1 text-lg text-grays-Macropay-07 font-normal":e==="segmented"},t),QI=e=>N.classNames("select-none",{"flex flex-wrap text-center text-gray-500 border-b border-gray-200 font-normal":e==="default"||e==="pills","-mb-px":e==="underline","flex flex-wrap -mb-px font-normal text-sm text-center text-gray-500":e==="with-icon","grid grid-flow-col justify-stretch items-center text-lg font-normal text-center text-lg sm:w-full":e==="segmented"}),JI=e=>N.classNames({"inline-block p-3 py-3 rounded-t-lg active:text-gray-500 active:bg-gray-50":e==="default"||e==="pills","inline-block p-3 py-3 border-b-2 rounded-t-lg active:border-primary-blue":e==="underline","inline-flex items-center justify-center p-3 border-b-2 rounded-t-lg active:border-gray-300":e==="with-icon","md:inline-block px-2 py-3 rounded-lg min-w-full h-full items-center text-center flex justify-center text-sm":e==="segmented"}),eN=(e,t)=>N.classNames({[`font-bold text-${t} bg-white`]:e==="default"||e==="pills",[`text-${t} border-b-2 border-primary-blue`]:e==="underline"||e==="with-icon",[`font-bold text-${t} active:text-${t}`]:e==="segmented"}),tN=({type:e,items:t,currentActiveKey:n,activeColorTabs:r,className:o})=>g.jsx("div",{className:ZI(e,o),children:g.jsx(ZS,{className:QI(e),children:t.map(({key:i,label:c,disabled:u})=>g.jsxs(QS,{value:i,disabled:u,className:N.classNames("h-full relative",JI(e),i===n&&eN(e,r),u&&"text-gray-300 cursor-not-allowed"),children:[e==="segmented"&&i===n&&g.jsx(le.div,{layoutId:"segmented-indicator",className:"absolute inset-0 bg-white rounded-lg z-0","data-testid":"tab-indicator",initial:!1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}}),g.jsx("span",{className:"relative z-10",children:c})]},i))})}),nN=({currentActiveKey:e,type:t="default",items:n,onChange:r,className:o,contentClassName:i,activeColorTabs:c="primary-blue"})=>g.jsxs(XS,{value:e,onValueChange:r,className:"flex flex-col gap-4",children:[g.jsx(tN,{type:t,items:n,currentActiveKey:e,activeColorTabs:c,className:o}),g.jsx(XI,{type:t,items:n,currentActiveKey:e,contentClassName:i})]}),rN=({name:e,label:t,children:n})=>g.jsxs(iE,{name:e,children:[t&&g.jsx(sE,{children:t}),n]}),oN=({type:e,error:t,disabled:n,readOnly:r,inputSize:o,className:i="",classesNames:c})=>N.classNames("block w-full p-2 focus:outline-none text-black rounded-lg h-[150px] transition duration-200 ease-in-out",{"border border-gray-7 focus:border-tints-Blue-30 focus:shadow-[0px_0px_0px_2px_#E6EDF8]":e==="normal"&&!n&&!t,"bg-transparent border-b border-gray-7 rounded-none focus:border-b-tints-Blue-30":e==="underline"&&!t&&!n,"border-red-400 focus:shadow-[0px_0px_0px_2px_#FFCCC7]":t&&e!=="underline","border-b border-red-400 rounded-none":t&&e==="underline","cursor-not-allowed bg-gray-3 text-gray-6":n&&e==="normal","cursor-not-allowed text-gray-6":n&&e==="underline","cursor-not-allowed font-semibold text-primary-blue":r,"h-8 text-sm":o==="sm","h-9 text-base":o==="md","h-10 text-base":o==="lg","h-12 text-base":o==="xl",[i]:i,[(c==null?void 0:c.input)??""]:c==null?void 0:c.input}),iN=({type:e="normal",inputSize:t="xl",className:n,classesNames:r,clearOnFocus:o,onFocus:i,...c})=>g.jsx(aE,{asChild:!0,children:g.jsx("textarea",{...c,className:oN({type:e,inputSize:t,className:n,classesNames:r,disabled:c.disabled,readOnly:c.readOnly}),onFocus:u=>{o&&(u.currentTarget.value=""),i==null||i(u)}})}),sN=({footer:e,current:t=0,max:n})=>g.jsxs("div",{className:"flex justify-between pt-1 text-sm text-gray-7",children:[g.jsx("span",{children:e}),n&&g.jsx("span",{children:`${t} / ${n}`})]}),aN=({name:e,label:t,labelFooter:n,error:r,maxLength:o,minLength:i,defaultValue:c="",classesNames:u,...l})=>{const[s,a]=_.useState(c);return g.jsx(oE,{children:g.jsxs(le.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:u==null?void 0:u.container,children:[g.jsx(rN,{name:e,label:t,children:g.jsx(iN,{...l,maxLength:o,minLength:i,value:s,onChange:f=>{var d;a(f.target.value),(d=l.onChange)==null||d.call(l,f)}})}),g.jsx(sN,{footer:n??`${i} caracteres requeridos`,current:s.length,max:o}),r&&g.jsx(cE,{className:u==null?void 0:u.messageError,children:r})]})})},cN=({className:e,content:t,children:n,...r})=>{const o=typeof t=="string";return g.jsx(pC,{children:g.jsxs(mC,{children:[g.jsx(gC,{asChild:!0,children:n}),g.jsx(vC,{children:g.jsx(yC,{className:e,asChild:!0,...r,children:g.jsxs(le.div,{className:N.classNames({"bg-gray-800 text-white rounded shadow-lg select-none px-4 py-2 outline-none border-0":o&&!e}),initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},children:[t,g.jsx(xC,{className:"w-4 h-2"})]})})})]})})};var zc=(e=>(e.cols="grid-cols",e.rows="grid-rows",e.gap="gap",e.justifyItems="justify-items",e.alignContent="content",e.span="col-span",e.start="col-start",e.end="col-end",e.justifySelf="justify-self",e.alignSelf="self",e))(zc||{});const{cols:lN,gap:uN,justifyItems:fN,alignContent:dN}=zc,hN=({cols:e,align:t,gap:n,justify:r,className:o="",...i})=>g.jsx(le.div,{className:N.classNames("grid",{[o]:o},N.generateClasses(lN,e),N.generateClasses(uN,n),N.generateClasses(fN,r),N.generateClasses(dN,t)),...i}),{span:pN,start:mN,end:gN,justifySelf:vN,alignSelf:yN}=zc,xN=({align:e,end:t,justify:n,span:r,start:o,className:i="",...c})=>g.jsx(le.div,{...c,className:N.classNames({[i]:i},N.generateClasses(pN,r),N.generateClasses(mN,o),N.generateClasses(gN,t),N.generateClasses(vN,n),N.generateClasses(yN,e))});exports.Accordion=oA;exports.Alert=lA;exports.Avatar=fA;exports.Button=ga;exports.Card=vA;exports.Checkbox=Kv;exports.Col=xN;exports.Divider=CA;exports.Drawer=TA;exports.Dropdown=jA;exports.Empty=DA;exports.Flex=We;exports.Input=qA;exports.List=lO;exports.Modal=gO;exports.Notification=CO;exports.Pagination=ty;exports.Popover=NO;exports.Portal=Yv;exports.Progress=kO;exports.QRBarcode=UM;exports.RadioGroup=GM;exports.Row=hN;exports.Segmented=uI;exports.Select=yI;exports.Skeleton=CI;exports.Slider=PI;exports.Spinner=Oy;exports.SpinnerSizeMap=md;exports.Steps=BI;exports.Switch=WI;exports.Tabs=nN;exports.Tag=KI;exports.TextArea=aN;exports.Tooltip=cN;exports.Typography=An;
|
|
109
|
+
*/var qi,Rf;function zA(){if(Rf)return qi;Rf=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var c={},l=0;l<10;l++)c["_"+String.fromCharCode(l)]=l;var u=Object.getOwnPropertyNames(c).map(function(a){return c[a]});if(u.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(a){i[a]=a}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return qi=o()?Object.assign:function(s,c){for(var l,u=r(s),i,a=1;a<arguments.length;a++){l=Object(arguments[a]);for(var f in l)t.call(l,f)&&(u[f]=l[f]);if(e){i=e(l);for(var d=0;d<i.length;d++)n.call(l,i[d])&&(u[i[d]]=l[i[d]])}}return u},qi}var Ki,Sf;function xc(){if(Sf)return Ki;Sf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ki=e,Ki}var Xi,Cf;function Hx(){return Cf||(Cf=1,Xi=Function.call.bind(Object.prototype.hasOwnProperty)),Xi}var Yi,_f;function WA(){if(_f)return Yi;_f=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=xc(),n={},r=Hx();e=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}}}function o(s,c,l,u,i){if(process.env.NODE_ENV!=="production"){for(var a in s)if(r(s,a)){var f;try{if(typeof s[a]!="function"){var d=Error((u||"React class")+": "+l+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=s[a](c,a,u,l,null,t)}catch(g){f=g}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+l+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var p=i?i():"";e("Failed "+l+" type: "+f.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Yi=o,Yi}var Zi,jf;function qA(){if(jf)return Zi;jf=1;var e=Gx(),t=zA(),n=xc(),r=Hx(),o=WA(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(l){var u="Warning: "+l;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function c(){return null}return Zi=function(l,u){var i=typeof Symbol=="function"&&Symbol.iterator,a="@@iterator";function f(T){var L=T&&(i&&T[i]||T[a]);if(typeof L=="function")return L}var d="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:E(),arrayOf:b,element:R(),elementType:w(),instanceOf:P,node:j(),objectOf:_,oneOf:C,oneOfType:M,shape:I,exact:F};function g(T,L){return T===L?T!==0||1/T===1/L:T!==T&&L!==L}function m(T,L){this.message=T,this.data=L&&typeof L=="object"?L:{},this.stack=""}m.prototype=Error.prototype;function x(T){if(process.env.NODE_ENV!=="production")var L={},Y=0;function Q(ee,Z,k,W,K,z,J){if(W=W||d,z=z||k,J!==n){if(u){var D=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw D.name="Invariant Violation",D}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=W+":"+k;!L[ae]&&Y<3&&(s("You are manually calling a React.PropTypes validation function for the `"+z+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[ae]=!0,Y++)}}return Z[k]==null?ee?Z[k]===null?new m("The "+K+" `"+z+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+K+" `"+z+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:T(Z,k,W,K,z)}var X=Q.bind(null,!1);return X.isRequired=Q.bind(null,!0),X}function y(T){function L(Y,Q,X,ee,Z,k){var W=Y[Q],K=U(W);if(K!==T){var z=G(W);return new m("Invalid "+ee+" `"+Z+"` of type "+("`"+z+"` supplied to `"+X+"`, expected ")+("`"+T+"`."),{expectedType:T})}return null}return x(L)}function E(){return x(c)}function b(T){function L(Y,Q,X,ee,Z){if(typeof T!="function")return new m("Property `"+Z+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var k=Y[Q];if(!Array.isArray(k)){var W=U(k);return new m("Invalid "+ee+" `"+Z+"` of type "+("`"+W+"` supplied to `"+X+"`, expected an array."))}for(var K=0;K<k.length;K++){var z=T(k,K,X,ee,Z+"["+K+"]",n);if(z instanceof Error)return z}return null}return x(L)}function R(){function T(L,Y,Q,X,ee){var Z=L[Y];if(!l(Z)){var k=U(Z);return new m("Invalid "+X+" `"+ee+"` of type "+("`"+k+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return x(T)}function w(){function T(L,Y,Q,X,ee){var Z=L[Y];if(!e.isValidElementType(Z)){var k=U(Z);return new m("Invalid "+X+" `"+ee+"` of type "+("`"+k+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return x(T)}function P(T){function L(Y,Q,X,ee,Z){if(!(Y[Q]instanceof T)){var k=T.name||d,W=V(Y[Q]);return new m("Invalid "+ee+" `"+Z+"` of type "+("`"+W+"` supplied to `"+X+"`, expected ")+("instance of `"+k+"`."))}return null}return x(L)}function C(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),c;function L(Y,Q,X,ee,Z){for(var k=Y[Q],W=0;W<T.length;W++)if(g(k,T[W]))return null;var K=JSON.stringify(T,function(J,D){var ae=G(D);return ae==="symbol"?String(D):D});return new m("Invalid "+ee+" `"+Z+"` of value `"+String(k)+"` "+("supplied to `"+X+"`, expected one of "+K+"."))}return x(L)}function _(T){function L(Y,Q,X,ee,Z){if(typeof T!="function")return new m("Property `"+Z+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var k=Y[Q],W=U(k);if(W!=="object")return new m("Invalid "+ee+" `"+Z+"` of type "+("`"+W+"` supplied to `"+X+"`, expected an object."));for(var K in k)if(r(k,K)){var z=T(k,K,X,ee,Z+"."+K,n);if(z instanceof Error)return z}return null}return x(L)}function M(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var L=0;L<T.length;L++){var Y=T[L];if(typeof Y!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$(Y)+" at index "+L+"."),c}function Q(X,ee,Z,k,W){for(var K=[],z=0;z<T.length;z++){var J=T[z],D=J(X,ee,Z,k,W,n);if(D==null)return null;D.data&&r(D.data,"expectedType")&&K.push(D.data.expectedType)}var ae=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new m("Invalid "+k+" `"+W+"` supplied to "+("`"+Z+"`"+ae+"."))}return x(Q)}function j(){function T(L,Y,Q,X,ee){return B(L[Y])?null:new m("Invalid "+X+" `"+ee+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return x(T)}function A(T,L,Y,Q,X){return new m((T||"React class")+": "+L+" type `"+Y+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function I(T){function L(Y,Q,X,ee,Z){var k=Y[Q],W=U(k);if(W!=="object")return new m("Invalid "+ee+" `"+Z+"` of type `"+W+"` "+("supplied to `"+X+"`, expected `object`."));for(var K in T){var z=T[K];if(typeof z!="function")return A(X,ee,Z,K,G(z));var J=z(k,K,X,ee,Z+"."+K,n);if(J)return J}return null}return x(L)}function F(T){function L(Y,Q,X,ee,Z){var k=Y[Q],W=U(k);if(W!=="object")return new m("Invalid "+ee+" `"+Z+"` of type `"+W+"` "+("supplied to `"+X+"`, expected `object`."));var K=t({},Y[Q],T);for(var z in K){var J=T[z];if(r(T,z)&&typeof J!="function")return A(X,ee,Z,z,G(J));if(!J)return new m("Invalid "+ee+" `"+Z+"` key `"+z+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(Y[Q],null," ")+`
|
|
110
|
+
Valid keys: `+JSON.stringify(Object.keys(T),null," "));var D=J(k,z,X,ee,Z+"."+z,n);if(D)return D}return null}return x(L)}function B(T){switch(typeof T){case"number":case"string":case"undefined":return!0;case"boolean":return!T;case"object":if(Array.isArray(T))return T.every(B);if(T===null||l(T))return!0;var L=f(T);if(L){var Y=L.call(T),Q;if(L!==T.entries){for(;!(Q=Y.next()).done;)if(!B(Q.value))return!1}else for(;!(Q=Y.next()).done;){var X=Q.value;if(X&&!B(X[1]))return!1}}else return!1;return!0;default:return!1}}function q(T,L){return T==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function U(T){var L=typeof T;return Array.isArray(T)?"array":T instanceof RegExp?"object":q(L,T)?"symbol":L}function G(T){if(typeof T>"u"||T===null)return""+T;var L=U(T);if(L==="object"){if(T instanceof Date)return"date";if(T instanceof RegExp)return"regexp"}return L}function $(T){var L=G(T);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function V(T){return!T.constructor||!T.constructor.name?d:T.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},Zi}var Qi,Pf;function KA(){if(Pf)return Qi;Pf=1;var e=xc();function t(){}function n(){}return n.resetWarningCache=t,Qi=function(){function r(c,l,u,i,a,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Qi}var Tf;function XA(){if(Tf)return oo.exports;if(Tf=1,process.env.NODE_ENV!=="production"){var e=Gx(),t=!0;oo.exports=qA()(e.isElement,t)}else oo.exports=KA()();return oo.exports}var Ji,Af;function YA(){if(Af)return Ji;Af=1;function e(x){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(E){return typeof E}:e=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},e(x)}var t=o(S),n=o(UA()),r=o(XA());function o(x){return x&&x.__esModule?x:{default:x}}function s(x,y){if(!(x instanceof y))throw new TypeError("Cannot call a class as a function")}function c(x,y){for(var E=0;E<y.length;E++){var b=y[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}function l(x,y,E){return y&&c(x.prototype,y),x}function u(x,y){return y&&(e(y)==="object"||typeof y=="function")?y:a(x)}function i(x){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},i(x)}function a(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function f(x,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(y&&y.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),y&&d(x,y)}function d(x,y){return d=Object.setPrototypeOf||function(b,R){return b.__proto__=R,b},d(x,y)}var p,g=t.default.version.split(/[.-]/);g[0]==="0"&&(g[1]==="13"||g[1]==="12")?p=function(y){return y.getDOMNode()}:p=function(y){return y};var m=(function(x){f(y,x);function y(E){var b;return s(this,y),b=u(this,i(y).call(this,E)),b.renderElementRef=t.default.createRef(),b.update=b.update.bind(a(b)),b}return l(y,[{key:"shouldComponentUpdate",value:function(b){var R=this;return Object.keys(y.propTypes).some(function(w){return R.props[w]!==b[w]})}},{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var b=p(this.renderElementRef.current);try{new n.default(b,this.props.value,Object.assign({text:this.props.text||this.props.value},this.props))}catch(R){window.console.error(R)}}},{key:"render",value:function(){var b=this.props,R=b.id,w=b.className;if(this.props.renderer==="svg")return t.default.createElement("svg",{ref:this.renderElementRef,id:R,className:w});if(this.props.renderer==="canvas")return t.default.createElement("canvas",{ref:this.renderElementRef,id:R,className:w});if(this.props.renderer==="img")return t.default.createElement("img",{ref:this.renderElementRef,id:R,className:w})}}]),y})(t.default.Component);return m.propTypes={value:r.default.string.isRequired,text:r.default.string,renderer:r.default.string,format:r.default.string,width:r.default.number,height:r.default.number,displayValue:r.default.bool,fontOptions:r.default.string,font:r.default.string,textAlign:r.default.string,textPosition:r.default.string,textMargin:r.default.number,fontSize:r.default.number,background:r.default.string,lineColor:r.default.string,margin:r.default.number,marginTop:r.default.number,marginBottom:r.default.number,marginLeft:r.default.number,marginRight:r.default.number,id:r.default.string,className:r.default.string,ean128:r.default.bool},m.defaultProps={format:"CODE128",renderer:"svg",width:2,height:100,displayValue:!0,fontOptions:"",font:"monospace",textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,className:"",ean128:!1},Ji=m,Ji}var ZA=YA();const QA=Ff(ZA),JA=e=>{const{value:t,className:n="",format:r="CODE128",width:o=2,height:s=100,displayValue:c=!0,fontSize:l=20,background:u="#FFFFFF",lineColor:i="#000000",margin:a=10,...f}=e,d=O.classNames("flex items-center justify-center",n);return h.jsxRuntimeExports.jsx("div",{className:d,...f,children:h.jsxRuntimeExports.jsx(QA,{value:t,format:r,width:o,height:s,displayValue:c,fontSize:l,background:u,lineColor:i,margin:a})})},eO=e=>{const{variant:t}=e;return t==="qr"?h.jsxRuntimeExports.jsx(oA,{...e}):t==="barcode"?h.jsxRuntimeExports.jsx(JA,{...e}):null},tO=({classNames:e,group:t=[],defaultValue:n="",ariaLabel:r="",onValueChange:o,...s})=>h.jsxRuntimeExports.jsx(Zb,{className:"flex flex-row gap-4",defaultValue:n,"aria-label":r,onValueChange:o,...s,children:t==null?void 0:t.map(({id:c,label:l,value:u,checked:i,disabled:a})=>h.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[h.jsxRuntimeExports.jsx(Qb,{className:O.classNames("size-4 cursor-pointer rounded-full bg-white outline-1 hover:outline-primary-blue focus:outline-primary-blue data-[state=checked]:outline-1 data-[state=checked]:outline-primary-blue outline-neutral-3",{"cursor-not-allowed outline-gray-5 bg-gray-3 hover:outline-neutral-3 data-[state=checked]:outline-neutral-3":a},e==null?void 0:e.item),disabled:a,defaultChecked:i,value:u,id:c,children:h.jsxRuntimeExports.jsx(Jb,{className:O.classNames("relative flex size-full items-center justify-center after:block after:size-2 after:rounded-full after:bg-primary-blue",{"after:bg-black/25":a},e==null?void 0:e.indicator)})}),h.jsxRuntimeExports.jsx("label",{className:O.classNames("pl-2 text-[15px] leading-none text-black cursor-pointer",{"cursor-not-allowed text-black/25":a},e==null?void 0:e.label),htmlFor:c,children:l})]},c))}),nO="relative flex bg-gray-100 rounded-xl p-1 md:w-fit",rO="relative text-grays-Macropay-07 z-10 inline-flex items-center gap-1 text-sm font-medium transition-colors duration-200 justify-center flex-1 whitespace-nowrap",oO="cursor-not-allowed bg-gray-3 text-gray-6 opacity-50",iO="text-primary-blue",sO="flex-col",aO={sm:"h-6 rounded-md",md:"h-8",lg:"h-10 rounded-lg",xl:"h-12 rounded-lg"},cO={sm:"w-6 rounded-md",md:"w-8",lg:"w-10 rounded-lg",xl:"w-12 rounded-lg"},uO={sm:"px-3 py-[3px]",md:"px-3 py-[3px]",lg:"px-3 py-[3px]",xl:"px-3 py-[3px]"},lO=(e,t=!1)=>(t?cO:aO)[e]||"",fO=(e,t,n,r)=>O.classNames(nO,lO(e,t),t&&sO,n&&"opacity-50 cursor-not-allowed",r),dO=(e,t,n)=>(r,o)=>{e||r.disabled||(t(o),n==null||n(r.value))},hO=(e,t)=>e??t,pO=e=>e.map(t=>typeof t=="string"||typeof t=="number"?{label:t,value:t}:t),mO=(e,t)=>{const[n,r]=S.useState(0),o=S.useMemo(()=>pO(e),[e]);return S.useEffect(()=>{const s=o.findIndex(c=>c.value===t);s!==-1&&r(s)},[t,o]),{activeIndex:n,setActiveIndex:r,normalizedOptions:o}},gO=(e,t,n,r)=>{const[o,s]=S.useState({width:0,height:0,x:0,y:0}),c=S.useCallback(()=>{if(e.current){const l=e.current.children[t+1];if(l){const u=e.current.getBoundingClientRect(),i=l.getBoundingClientRect();s({width:i.width,height:i.height,x:i.left-u.left,y:i.top-u.top})}}},[e,t]);return S.useEffect(()=>{c()},[c,n,r]),S.useEffect(()=>{if(!e.current)return;const l=new ResizeObserver(()=>{c()});return l.observe(e.current),()=>{l.disconnect()}},[c]),o},xO={sm:"rounded-md",lg:"rounded-lg",xl:"rounded-lg"},vO=({indicatorStyle:e,vertical:t,size:n})=>{const r=xO[n]||"rounded-lg";return h.jsxRuntimeExports.jsx(re.div,{className:O.classNames("absolute bg-white shadow-md",r,t?"left-1 right-1":"top-1 bottom-1"),animate:{left:t?4:e.x,top:t?e.y:4,width:t?"calc(100% - 8px)":e.width,height:t?e.height:"calc(100% - 8px)"},transition:{type:"spring",stiffness:500,damping:30}})},yO=(e,t,n)=>O.classNames(rO,uO[e],t&&oO,n?"w-full":"flex-shrink-0"),EO=({option:e,index:t,isActive:n,disabled:r,vertical:o,size:s,onClick:c})=>{const l=yO(s,e.disabled||r,o);return h.jsxRuntimeExports.jsxs("button",{type:"button",className:O.classNames(l,n&&iO),onClick:()=>c(e,t),disabled:r||e.disabled,children:[e.icon&&h.jsxRuntimeExports.jsx("span",{className:"text-base",children:e.icon}),e.label]},`${e.value}-${t}`)},bO={initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.3,ease:"easeOut"}},wO=({options:e,value:t,defaultValue:n,onChange:r,size:o="md",disabled:s=!1,vertical:c=!1,className:l,...u})=>{const i=S.useId(),a=S.useRef(null),{activeIndex:f,setActiveIndex:d,normalizedOptions:p}=mO(e,hO(t,n)),g=gO(a,f,o,c),m=dO(s,d,r),x=fO(o,c,s,l);return h.jsxRuntimeExports.jsxs(re.div,{ref:a,id:`${i}-segmented`,className:x,...bO,...u,children:[h.jsxRuntimeExports.jsx(vO,{indicatorStyle:g,vertical:c,size:o}),p.map((y,E)=>h.jsxRuntimeExports.jsx(EO,{option:y,index:E,isActive:E===f,disabled:s,vertical:c,size:o,onClick:m},`${y.value}-${E}`))]})},RO={sm:"h-6 text-sm py-px rounded-sm",md:"h-8 text-base py-[5px] rounded-md",lg:"h-10 text-lg py-2 rounded-lg",xl:"h-12 text-lg p-3 rounded-lg"},SO=({size:e,disabled:t,className:n,triggerRef:r,placeholder:o})=>h.jsxRuntimeExports.jsxs(jw,{ref:r,disabled:t,className:O.classNames("outline-1 outline-gray-7 px-3 py-[5px] bg-white flex justify-between items-center cursor-pointer h-auto!",n,RO[e],{"bg-gray-3 text-gray-6 outline-gray-5 cursor-not-allowed":t}),children:[h.jsxRuntimeExports.jsx(Pw,{className:O.classNames("text-black truncate flex-1",{"text-gray-6":t}),placeholder:o}),h.jsxRuntimeExports.jsx(Tw,{className:"flex items-center",children:h.jsxRuntimeExports.jsx(ne.SvgChevronLeft,{className:O.classNames("-rotate-90",{"text-gray-6":t})})})]}),zx=S.forwardRef(({children:e,className:t,disabled:n,...r},o)=>h.jsxRuntimeExports.jsx(Iw,{ref:o,disabled:n,className:O.classNames("w-full h-auto outline-0 hover:bg-gray-3 px-4 py-[5px] cursor-pointer",{"text-gray-6 cursor-not-allowed":n},t),...r,children:h.jsxRuntimeExports.jsx(Dw,{className:"whitespace-nowrap",children:e})}));zx.displayName="SelectItem";const CO=({message:e="No hay elementos disponibles."})=>h.jsxRuntimeExports.jsx("div",{className:"w-full h-24 flex justify-center items-center text-gray-6 text-sm",children:e}),Wx=S.forwardRef(({value:e,onChange:t,placeholder:n="Buscar...",disabled:r},o)=>h.jsxRuntimeExports.jsx("div",{className:"px-2 py-2 border-b border-gray-4 bg-white sticky top-0",onPointerDown:s=>{s.stopPropagation()},children:h.jsxRuntimeExports.jsx("input",{ref:o,type:"text",value:e,onChange:t,placeholder:n,disabled:r,autoComplete:"off",autoFocus:!0,className:O.classNames("w-full px-3 py-1.5 text-sm border border-gray-4 rounded outline-none","focus:border-primary-blue focus:ring-1 focus:ring-primary-blue","disabled:bg-gray-3 disabled:cursor-not-allowed"),onKeyDown:s=>{s.stopPropagation()},onMouseDown:s=>{s.stopPropagation()},onPointerDown:s=>{s.stopPropagation()}})}));Wx.displayName="SearchInput";const _O=({width:e,allItems:t,filteredItems:n,currentValue:r,emptyMessage:o,showSearch:s,searchValue:c="",onSearchChange:l,searchPlaceholder:u,disabled:i,notFoundContent:a,inputRef:f})=>{const d=(n==null?void 0:n.length)===0&&!r;let p;return c&&a?p=a:c?p="No results found":p=o||"No elements available.",h.jsxRuntimeExports.jsxs(Ow,{position:"popper",sideOffset:5,className:O.classNames("overflow-hidden rounded-lg bg-white shadow-lg border border-gray-4 min-w-[200px] max-w-[350px] w-auto"),style:e?{width:e}:{},children:[s&&l&&h.jsxRuntimeExports.jsx(Wx,{ref:f,value:c,onChange:l,placeholder:u,disabled:i}),h.jsxRuntimeExports.jsx(Mw,{className:"space-y-1",children:d?h.jsxRuntimeExports.jsx(CO,{message:p}):h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:t==null?void 0:t.map(g=>{const m=n.some(x=>x.value===g.value);return h.jsxRuntimeExports.jsx(zx,{value:g.value,disabled:g==null?void 0:g.disabled,className:m?"":"hidden",children:g.children},g.value)})})})]})},jO=e=>{const[t,n]=S.useState(0),r=S.useRef(null);return S.useEffect(()=>{r.current&&n(r.current.offsetWidth)},[e]),{triggerWidth:t,triggerRef:r}},PO=({showSearch:e,items:t,filterOption:n,onSearch:r})=>{const[o,s]=S.useState(""),[c,l]=S.useState(!1),u=S.useRef(null);S.useEffect(()=>{c||s("")},[c]),S.useEffect(()=>{c&&e&&u.current&&requestAnimationFrame(()=>{var d;(d=u.current)==null||d.focus()})},[c,e,o]);const i=(d,p)=>{if(!d)return!0;const g=d.toLowerCase(),m=typeof p.children=="string"?p.children.toLowerCase():"",x=p.value.toLowerCase();return m.includes(g)||x.includes(g)},a=e?t.filter(d=>(n||i)(o,d)):t;return{searchValue:o,open:c,setOpen:l,filteredItems:a,handleSearchChange:d=>{const p=d.target.value;s(p),r==null||r(p)},inputRef:u}},TO=({value:e,defaultValue:t,onValueChange:n})=>{const[r,o]=S.useState(t);return S.useEffect(()=>{e!==void 0&&o(e)},[e]),{currentValue:e??r,handleValueChange:l=>{e===void 0&&o(l),n==null||n(l)}}},AO=({disabled:e,className:t,value:n,defaultValue:r,size:o="md",items:s=[],placeholder:c="Selecciona un elemento...",emptyMessage:l="No hay elementos disponibles.",onValueChange:u,showSearch:i=!1,searchPlaceholder:a="Buscar...",onSearch:f,filterOption:d,notFoundContent:p})=>{const{currentValue:g,handleValueChange:m}=TO({value:n,defaultValue:r,onValueChange:u}),{triggerWidth:x,triggerRef:y}=jO(t),{searchValue:E,open:b,setOpen:R,filteredItems:w,handleSearchChange:P,inputRef:C}=PO({showSearch:i,items:s,filterOption:d,onSearch:f});return h.jsxRuntimeExports.jsxs(_w,{value:g,onValueChange:m,open:b,onOpenChange:R,children:[h.jsxRuntimeExports.jsx(SO,{size:o,disabled:e,className:t,triggerRef:y,placeholder:c}),h.jsxRuntimeExports.jsx(Aw,{children:h.jsxRuntimeExports.jsx(_O,{width:x,allItems:s,filteredItems:w,currentValue:g,emptyMessage:l,showSearch:i,searchValue:E,onSearchChange:P,searchPlaceholder:a,disabled:e,notFoundContent:p,inputRef:C})})]})},OO=()=>h.jsxRuntimeExports.jsxs("div",{role:"status",className:"animate-pulse",children:[h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-center mt-4",children:[h.jsxRuntimeExports.jsx(ne.SvgSkeletonAvatar,{}),h.jsxRuntimeExports.jsxs("div",{className:"flex flex-col space-y-2",children:[h.jsxRuntimeExports.jsx("div",{className:"w-20 h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 me-3"}),h.jsxRuntimeExports.jsx("div",{className:"w-24 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]})]}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),qx=()=>h.jsxRuntimeExports.jsxs("div",{role:"status","aria-hidden":!0,className:"animate-pulse",children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 "}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),MO=()=>h.jsxRuntimeExports.jsxs("div",{role:"status",className:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center",children:[h.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center w-full h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700",children:h.jsxRuntimeExports.jsx(ne.SvgSkeletonImage,{})}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),IO=()=>h.jsxRuntimeExports.jsxs("div",{role:"status",className:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center",children:[h.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center w-full h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700",children:h.jsxRuntimeExports.jsx(ne.SvgSkeletonImage,{})}),h.jsxRuntimeExports.jsxs("div",{className:"w-full",children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[480px] mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[440px] mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[360px]"})]}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),DO=()=>h.jsxRuntimeExports.jsxs("div",{role:"status",className:"p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded shadow animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700",children:[h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between pt-4",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between pt-4",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between pt-4",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between pt-4",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),NO={default:qx,avatar:OO,image:MO,"image-description":IO,list:DO},kO=({type:e="default"})=>{const t=NO[e]??qx;return h.jsxRuntimeExports.jsx(t,{})},LO={sm:"h-1",md:"h-2",lg:"h-3",xl:"h-4"},FO={primary:"bg-primary-blue",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500",info:"bg-blue-400"},VO={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},BO=({classNames:e,rangeColor:t="primary",customRangeClass:n,size:r="md",showLabels:o=!1,formatLabel:s,min:c=0,max:l=100,...u})=>{const i=a=>s?s(a):a.toString();return h.jsxRuntimeExports.jsxs("div",{className:"w-full",children:[h.jsxRuntimeExports.jsxs(Yw,{className:O.classNames("relative flex items-center select-none touch-none w-full",e==null?void 0:e.root),min:c,max:l,...u,children:[h.jsxRuntimeExports.jsx(Zw,{className:O.classNames("relative grow rounded-full bg-gray-200",LO[r],e==null?void 0:e.track),children:h.jsxRuntimeExports.jsx(Qw,{className:O.classNames("absolute rounded-full h-full",n||FO[t],e==null?void 0:e.range)})}),h.jsxRuntimeExports.jsx(Jw,{className:O.classNames("block rounded-full bg-white border-2 border-primary-blue shadow-md hover:shadow-lg","focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2","transition-shadow cursor-pointer",VO[r],e==null?void 0:e.thumb)})]}),o&&h.jsxRuntimeExports.jsxs("div",{className:O.classNames("flex justify-between mt-2 text-sm text-gray-600",e==null?void 0:e.labels),children:[h.jsxRuntimeExports.jsx("span",{className:e==null?void 0:e.startLabelClass,children:i(c)}),h.jsxRuntimeExports.jsx("span",{className:e==null?void 0:e.endLabelClass,children:i(l)})]})]})},$O={sm:"size-6",md:"size-8",lg:"size-10",xl:"size-12"},UO={sm:"size-5",md:"size-6",lg:"size-7",xl:"size-8"},es={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},GO={sm:"size-6",md:"size-8",lg:"size-10",xl:"size-12"},HO={sm:2,md:4,lg:6,xl:8},Of=({disabled:e,onClick:t,arrow:n,size:r})=>{const o=`${e?"text-gray-6":"text-primary-blue"}`,s={right:h.jsxRuntimeExports.jsx(ne.SvgRight,{className:o}),left:h.jsxRuntimeExports.jsx(ne.SvgLeft,{className:o})},c=O.classNames("flex items-center justify-center rounded-md border disabled:border-zinc-300 disabled:bg-neutral-100 disabled:text-stone-300 shadow-none transition-colors duration-300 ease-linear bg-white border-gray-5 text-gray-4 transitions-all easy-out hover:text-blue-900 hover:border-blue-900",$O[r]);return h.jsxRuntimeExports.jsx("button",{"aria-label":`stepButton-${n}`,type:"button",className:c,disabled:e,onClick:t,children:s[n]})},zO=({id:e,name:t,status:n,href:r,size:o="md"})=>{const s=O.classNames("flex items-center justify-center rounded-full",UO[o],{"border border-primary-blue":n==="COMPLETE","bg-primary-blue":n==="CURRENT","border border-gray-6":n==="PENDING"}),c=O.classNames("font-medium",es[o],{"text-primary-blue":n==="CURRENT","text-gray-6":n==="PENDING"}),l=O.classNames("font-medium",es[o],{"text-white":n==="CURRENT","text-gray-6":n==="PENDING"});return h.jsxRuntimeExports.jsxs("a",{href:r,className:O.classNames("flex gap-2 font-medium items-center",es[o]),children:[h.jsxRuntimeExports.jsx("span",{className:s,children:n==="COMPLETE"?h.jsxRuntimeExports.jsx(ne.SvgDone,{className:O.classNames("text-primary-blue",GO[o]),"aria-hidden":"true"}):h.jsxRuntimeExports.jsx("span",{className:l,children:e})}),h.jsxRuntimeExports.jsx("span",{className:c,children:t})]})},WO=({visibleSteps:e,size:t})=>{const n=HO[t];return h.jsxRuntimeExports.jsx(De,{gap:n,justify:"center",children:e.map((r,o)=>h.jsxRuntimeExports.jsxs(De,{gap:n,align:"center",children:[h.jsxRuntimeExports.jsx(zO,{...r,size:t}),o+1!==e.length&&h.jsxRuntimeExports.jsx(ne.SvgRight,{className:"text-gray-5"})]},crypto.randomUUID()))})},ts=(e,t,n,r)=>e?4:t?3:n?2:r?1:3,qO=e=>{const t=e.find(n=>n.status==="CURRENT");return t?Number(t.id)-1:0},KO=e=>e===0,XO=(e,t,n)=>e>=t-n,YO=e=>e-1,ZO=e=>e+1,QO=({steps:e,size:t="md",className:n=""})=>{const{xs:r,sm:o,md:s,lg:c}=kf.useBreakpoint(),[l,u]=S.useState(()=>ts(c,s,o,r)),i=qO(e),[a,f]=S.useState(()=>{const E=ts(c,s,o,r),b=Math.max(0,e.length-E);return Math.min(i,b)}),[d,p]=S.useState([]);S.useEffect(()=>{u(ts(c,s,o,r))},[r,o,s,c]),S.useEffect(()=>{const E=Math.min(a+l,e.length);p(e.slice(a,E))},[a,e,l]);const g=()=>f(YO(a)),m=()=>f(ZO(a)),x=KO(a),y=XO(a,e.length,l);return h.jsxRuntimeExports.jsxs("div",{className:O.classNames("flex flex-row items-center w-full justify-between gap-4",{[n]:n}),children:[h.jsxRuntimeExports.jsx(Of,{arrow:"left",disabled:x,onClick:g,size:t}),h.jsxRuntimeExports.jsx(WO,{visibleSteps:d,size:t}),h.jsxRuntimeExports.jsx(Of,{arrow:"right",disabled:y,onClick:m,size:t})]})},vc={md:{root:"h-[22px] w-11",thumb:"size-[18px]",children:"h-4 w-4 text-xs"},sm:{root:"h-4 w-7",thumb:"size-3",children:"h-3 w-3 text-[10px]"}},Pn={root:"relative peer focus-visible:border-ring focus-visible:ring-ring/50 flex px-px shrink-0 items-center justify-start rounded-full border border-transparent shadow-xs outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-gray-6 dark:data-[state=unchecked]:bg-input/80 data-[state=checked]:justify-end transition-colors duration-200",thumb:"relative z-10 bg-white pointer-events-none block rounded-full ring-0 shadow-sm",children:"absolute flex items-center justify-center text-white/80 transition-opacity duration-200",unCheckedChildren:"left-1 data-[state=checked]:opacity-0 data-[state=checked]:invisible",checkedChildren:"right-1 data-[state=unchecked]:opacity-0 data-[state=unchecked]:invisible"},JO={default:"data-[state=checked]:bg-[#0047BA]",success:"data-[state=checked]:bg-green-500",danger:"data-[state=checked]:bg-red-500"},eM=(e,t,n,r)=>O.classNames(Pn.root,JO[e],vc[t].root,n&&"cursor-not-allowed",r),Mf=(e,t)=>{const n=t?Pn.checkedChildren:Pn.unCheckedChildren;return O.classNames(Pn.children,n,vc[e].children)},tM=e=>{const t=typeof e=="string"?e:e.text,n=typeof e=="string"?"right":e.position;return{labelText:t,labelPosition:n}},If=e=>O.classNames("text-sm text-foreground",e&&"opacity-50"),nM=e=>O.classNames("flex items-center gap-2",e&&"cursor-not-allowed"),rM={type:"spring",stiffness:500,damping:30,mass:1},oM=({className:e,label:t,type:n="default",size:r="md",checked:o,defaultChecked:s=!1,disabled:c=!1,onCheckedChange:l,checkedChildren:u,unCheckedChildren:i,...a})=>{const f=vc[r],d=h.jsxRuntimeExports.jsxs(oR,{className:eM(n,r,c,e),checked:o,defaultChecked:s,disabled:c,onCheckedChange:l,...a,children:[i&&h.jsxRuntimeExports.jsx("div",{className:Mf(r,!1),children:i}),h.jsxRuntimeExports.jsx(iR,{asChild:!0,children:h.jsxRuntimeExports.jsx(re.div,{className:O.classNames(Pn.thumb,f.thumb),layout:!0,transition:rM,whileTap:{scale:.95}})}),u&&h.jsxRuntimeExports.jsx("div",{className:Mf(r,!0),children:u})]});if(t){const{labelText:p,labelPosition:g}=tM(t);return h.jsxRuntimeExports.jsxs("div",{className:nM(c),children:[g==="left"&&h.jsxRuntimeExports.jsx("span",{className:If(c),children:p}),d,g==="right"&&h.jsxRuntimeExports.jsx("span",{className:If(c),children:p})]})}return d},iM={success:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconCheckCircle,{width:16,height:16}),bgColor:"bg-green-1",textColor:"text-green-6",borderColor:"border-green-3",closeButtonColor:"hover:bg-green-2"},info:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconInfoCircle,{width:16,height:16}),bgColor:"bg-blue-1",textColor:"text-blue-6",borderColor:"border-blue-3",closeButtonColor:"hover:bg-blue-2"},warning:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconWarningCircle,{width:16,height:16}),bgColor:"bg-gold-1",textColor:"text-gold-6",borderColor:"border-gold-3",closeButtonColor:"hover:bg-gold-2"},error:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconErrorCircle,{width:16,height:16}),bgColor:"bg-red-1",textColor:"text-red-6",borderColor:"border-red-3",closeButtonColor:"hover:bg-red-2"}},sM=({children:e,type:t="info",showIcon:n=!1,closable:r=!1,onClose:o,className:s="",icon:c,bgColor:l,textColor:u,borderColor:i,...a})=>{const f=!!(l||u||i),d=iM[t],p=c||(n?d.icon:null),g=O.classNames("inline-flex items-center gap-2 px-2 py-2 rounded border text-sm font-medium leading-none rounded-sm",{[d.bgColor]:!f,[d.textColor]:!f,[d.borderColor]:!f,[s]:s}),m=f?{backgroundColor:l,color:u,borderColor:i}:void 0,x=O.classNames("rounded transition-colors cursor-pointer text-black/[0.45]",{[d.closeButtonColor]:!f});return h.jsxRuntimeExports.jsxs("span",{className:g,style:m,...a,children:[p&&h.jsxRuntimeExports.jsx("span",{className:"inline-flex shrink-0",children:p}),h.jsxRuntimeExports.jsx("span",{className:"inline-flex items-center",children:e}),r&&h.jsxRuntimeExports.jsx("button",{onClick:o,className:x,"aria-label":"Remove tag",type:"button",children:h.jsxRuntimeExports.jsx(ne.SvgClose,{width:16,height:16})})]})},aM={initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},cM=({type:e,items:t,currentActiveKey:n,contentClassName:r})=>{var o;if(e==="segmented"){const s=(o=t.find(c=>c.key===n))==null?void 0:o.content;return h.jsxRuntimeExports.jsx(Yc,{value:n,forceMount:!0,asChild:!0,children:h.jsxRuntimeExports.jsx(jt,{mode:"wait",initial:!1,children:h.jsxRuntimeExports.jsx(re.div,{className:O.classNames("min-w-full",r),variants:aM,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.25,ease:"easeInOut"},children:s},n)})})}return h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:t.map(s=>h.jsxRuntimeExports.jsx(Yc,{value:s.key,className:O.classNames("min-w-full",r),children:s.content},s.key))})},uM=(e,t)=>O.classNames({"text-sm font-normal":e==="default"||e==="underline"||e==="pills","border-b border-gray-200":e==="underline","border-b border-gray-200 text-lg font-semibold":e==="with-icon","bg-gray-100 rounded-xl p-1 text-lg text-grays-Macropay-07 font-normal":e==="segmented"},t),lM=e=>O.classNames("select-none",{"flex flex-wrap text-center text-gray-500 border-b border-gray-200 font-normal":e==="default"||e==="pills","-mb-px":e==="underline","flex flex-wrap -mb-px font-normal text-sm text-center text-gray-500":e==="with-icon","grid grid-flow-col justify-stretch items-center text-lg font-normal text-center text-lg sm:w-full":e==="segmented"}),fM=e=>O.classNames({"inline-block p-3 py-3 rounded-t-lg active:text-gray-500 active:bg-gray-50":e==="default"||e==="pills","inline-block p-3 py-3 border-b-2 rounded-t-lg active:border-primary-blue":e==="underline","inline-flex items-center justify-center p-3 border-b-2 rounded-t-lg active:border-gray-300":e==="with-icon","md:inline-block px-2 py-3 rounded-lg min-w-full h-full items-center text-center flex justify-center text-sm":e==="segmented"}),dM=(e,t)=>O.classNames({[`font-bold text-${t} bg-white`]:e==="default"||e==="pills",[`text-${t} border-b-2 border-primary-blue`]:e==="underline"||e==="with-icon",[`font-bold text-${t} active:text-${t}`]:e==="segmented"}),hM=({type:e,items:t,currentActiveKey:n,activeColorTabs:r,className:o})=>h.jsxRuntimeExports.jsx("div",{className:uM(e,o),children:h.jsxRuntimeExports.jsx(uR,{className:lM(e),children:t.map(({key:s,label:c,disabled:l})=>h.jsxRuntimeExports.jsxs(lR,{value:s,disabled:l,className:O.classNames("h-full relative",fM(e),s===n&&dM(e,r),l&&"text-gray-300 cursor-not-allowed"),children:[e==="segmented"&&s===n&&h.jsxRuntimeExports.jsx(re.div,{layoutId:"segmented-indicator",className:"absolute inset-0 bg-white rounded-lg z-0","data-testid":"tab-indicator",initial:!1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}}),h.jsxRuntimeExports.jsx("span",{className:"relative z-10",children:c})]},s))})}),pM=({currentActiveKey:e,type:t="default",items:n,onChange:r,className:o,contentClassName:s,activeColorTabs:c="primary-blue"})=>h.jsxRuntimeExports.jsxs(cR,{value:e,onValueChange:r,className:"flex flex-col gap-4",children:[h.jsxRuntimeExports.jsx(hM,{type:t,items:n,currentActiveKey:e,activeColorTabs:c,className:o}),h.jsxRuntimeExports.jsx(cM,{type:t,items:n,currentActiveKey:e,contentClassName:s})]}),mM=({name:e,label:t,children:n})=>h.jsxRuntimeExports.jsxs(xb,{name:e,children:[t&&h.jsxRuntimeExports.jsx(vb,{children:t}),n]}),gM=({type:e,error:t,disabled:n,readOnly:r,inputSize:o,className:s="",classesNames:c})=>O.classNames("block w-full p-2 focus:outline-none text-black rounded-lg h-[150px] transition duration-200 ease-in-out",{"border border-gray-7 focus:border-tints-Blue-30 focus:shadow-[0px_0px_0px_2px_#E6EDF8]":e==="normal"&&!n&&!t,"bg-transparent border-b border-gray-7 rounded-none focus:border-b-tints-Blue-30":e==="underline"&&!t&&!n,"border-red-400 focus:shadow-[0px_0px_0px_2px_#FFCCC7]":t&&e!=="underline","border-b border-red-400 rounded-none":t&&e==="underline","cursor-not-allowed bg-gray-3 text-gray-6":n&&e==="normal","cursor-not-allowed text-gray-6":n&&e==="underline","cursor-not-allowed font-semibold text-primary-blue":r,"h-8 text-sm":o==="sm","h-9 text-base":o==="md","h-10 text-base":o==="lg","h-12 text-base":o==="xl",[s]:s,[(c==null?void 0:c.input)??""]:c==null?void 0:c.input}),xM=({type:e="normal",inputSize:t="xl",className:n,classesNames:r,clearOnFocus:o,onFocus:s,...c})=>h.jsxRuntimeExports.jsx(yb,{asChild:!0,children:h.jsxRuntimeExports.jsx("textarea",{...c,className:gM({type:e,inputSize:t,className:n,classesNames:r,disabled:c.disabled,readOnly:c.readOnly}),onFocus:l=>{o&&(l.currentTarget.value=""),s==null||s(l)}})}),vM=({footer:e,current:t=0,max:n})=>h.jsxRuntimeExports.jsxs("div",{className:"flex justify-between pt-1 text-sm text-gray-7",children:[h.jsxRuntimeExports.jsx("span",{children:e}),n&&h.jsxRuntimeExports.jsx("span",{children:`${t} / ${n}`})]}),yM=({name:e,label:t,labelFooter:n,error:r,maxLength:o,minLength:s,defaultValue:c="",classesNames:l,...u})=>{const[i,a]=S.useState(c);return h.jsxRuntimeExports.jsx(gb,{children:h.jsxRuntimeExports.jsxs(re.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:l==null?void 0:l.container,children:[h.jsxRuntimeExports.jsx(mM,{name:e,label:t,children:h.jsxRuntimeExports.jsx(xM,{...u,maxLength:o,minLength:s,value:i,onChange:f=>{var d;a(f.target.value),(d=u.onChange)==null||d.call(u,f)}})}),h.jsxRuntimeExports.jsx(vM,{footer:n??`${s} caracteres requeridos`,current:i.length,max:o}),r&&h.jsxRuntimeExports.jsx(Eb,{className:l==null?void 0:l.messageError,children:r})]})})},EM=({className:e,content:t,children:n,...r})=>{const o=typeof t=="string";return h.jsxRuntimeExports.jsx(_R,{children:h.jsxRuntimeExports.jsxs(jR,{children:[h.jsxRuntimeExports.jsx(PR,{asChild:!0,children:n}),h.jsxRuntimeExports.jsx(TR,{children:h.jsxRuntimeExports.jsx(AR,{className:e,asChild:!0,...r,children:h.jsxRuntimeExports.jsxs(re.div,{className:O.classNames({"bg-gray-800 text-white rounded shadow-lg select-none px-4 py-2 outline-none border-0":o&&!e}),initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},children:[t,h.jsxRuntimeExports.jsx(OR,{className:"w-4 h-2"})]})})})]})})};var yc=(e=>(e.cols="grid-cols",e.rows="grid-rows",e.gap="gap",e.justifyItems="justify-items",e.alignContent="content",e.span="col-span",e.start="col-start",e.end="col-end",e.justifySelf="justify-self",e.alignSelf="self",e))(yc||{});const{cols:bM,gap:wM,justifyItems:RM,alignContent:SM}=yc,CM=({cols:e,align:t,gap:n,justify:r,className:o="",...s})=>h.jsxRuntimeExports.jsx(re.div,{className:O.classNames("grid",{[o]:o},O.generateClasses(bM,e),O.generateClasses(wM,n),O.generateClasses(RM,r),O.generateClasses(SM,t)),...s}),{span:_M,start:jM,end:PM,justifySelf:TM,alignSelf:AM}=yc,OM=({align:e,end:t,justify:n,span:r,start:o,className:s="",...c})=>h.jsxRuntimeExports.jsx(re.div,{...c,className:O.classNames({[s]:s},O.generateClasses(_M,r),O.generateClasses(jM,o),O.generateClasses(PM,t),O.generateClasses(TM,n),O.generateClasses(AM,e))});exports.Accordion=gP;exports.Alert=bP;exports.Avatar=RP;exports.Button=Hs;exports.Card=TP;exports.Checkbox=mx;exports.Col=OM;exports.Divider=kP;exports.Drawer=VP;exports.Dropdown=WP;exports.Empty=qP;exports.Flex=De;exports.Input=iT;exports.List=bT;exports.Modal=PT;exports.Notification=kT;exports.Pagination=wx;exports.Popover=zT;exports.Portal=gx;exports.Progress=KT;exports.QRBarcode=eO;exports.RadioGroup=tO;exports.Row=CM;exports.Segmented=wO;exports.Select=AO;exports.Skeleton=kO;exports.Slider=BO;exports.Spinner=Xx;exports.SpinnerSizeMap=Vf;exports.Steps=QO;exports.Switch=oM;exports.Tabs=pM;exports.Tag=sM;exports.TextArea=yM;exports.Tooltip=EM;exports.Typography=un;
|