@mp-front/components 0.0.1-next-7 → 0.0.1-next-9
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/{classNames-EUcv3dqx.js → classNames-BiTpavcN.js} +2 -2
- package/dist/components/animation/count-up/count-up.component.d.ts +3 -0
- package/dist/components/animation/count-up/count-up.component.d.ts.map +1 -0
- package/dist/components/animation/count-up/count-up.stories.d.ts +15 -0
- package/dist/components/animation/count-up/count-up.stories.d.ts.map +1 -0
- package/dist/components/animation/count-up/count-up.test.d.ts +2 -0
- package/dist/components/animation/count-up/count-up.test.d.ts.map +1 -0
- package/dist/components/animation/count-up/count-up.types.d.ts +11 -0
- package/dist/components/animation/count-up/count-up.types.d.ts.map +1 -0
- package/dist/components/animation/index.d.ts +2 -0
- package/dist/components/animation/index.d.ts.map +1 -0
- package/dist/components/dropdown/dropdown.types.d.ts +1 -0
- package/dist/components/dropdown/dropdown.types.d.ts.map +1 -1
- package/dist/components/input/number/useInputNumber.d.ts +3 -2
- package/dist/components/input/number/useInputNumber.d.ts.map +1 -1
- package/dist/components/modal/dialog.overlay.d.ts +17 -0
- package/dist/components/modal/dialog.overlay.d.ts.map +1 -0
- package/dist/components/modal/dialog.types.d.ts +5 -0
- package/dist/components/modal/dialog.types.d.ts.map +1 -0
- package/dist/components/modal/modal.component.d.ts +29 -1
- package/dist/components/modal/modal.component.d.ts.map +1 -1
- package/dist/indeterminate-C7JUOCP0.cjs +1 -0
- package/dist/indeterminate-CSEeEKiJ.js +25 -0
- package/dist/index-DGDeDoym.cjs +17 -0
- package/dist/index-q_fyr_Rn.js +156 -0
- package/dist/interfaces/modal/index.d.ts +2 -0
- package/dist/interfaces/modal/index.d.ts.map +1 -1
- package/dist/layout/header/right-side.component.d.ts.map +1 -1
- package/dist/layout/header/store.component.d.ts.map +1 -1
- package/dist/layout/header/user.component.d.ts.map +1 -1
- package/dist/proxy-2cglvzJh.cjs +31 -0
- package/dist/proxy-uRb7Bek8.js +5497 -0
- package/dist/skeleton-avatar-8uHbPAra.cjs +1 -0
- package/dist/skeleton-avatar-Cp8o0kUa.js +20 -0
- package/dist/styles.css +2 -2
- package/dist/toggle-group.component-Cs7zS-s6.js +11256 -0
- package/dist/toggle-group.component-DOQKWhkg.cjs +80 -0
- package/dist/ui-components-animation.cjs +1 -0
- package/dist/ui-components-animation.js +416 -0
- package/dist/ui-components-hooks.cjs +1 -1
- package/dist/ui-components-hooks.js +16 -15
- package/dist/ui-components-icons.cjs +1 -1
- package/dist/ui-components-icons.js +24 -23
- package/dist/ui-components-index.cjs +3 -103
- package/dist/ui-components-index.js +3211 -19256
- package/dist/ui-components-layout.cjs +1 -131
- package/dist/ui-components-layout.js +1146 -21133
- package/dist/ui-components-utils.js +2 -2
- package/dist/use-controlled-state-CNjWcDSI.js +19 -0
- package/dist/use-controlled-state-Ci1ztv5B.cjs +1 -0
- package/dist/useTranslation-2Dz5dMlm.cjs +1 -0
- package/dist/useTranslation-B0fSob9I.js +189 -0
- package/package.json +3 -3
- package/dist/components/modal/modal.overlay.d.ts +0 -3
- package/dist/components/modal/modal.overlay.d.ts.map +0 -1
- package/dist/index-BP9HuXkV.cjs +0 -31
- package/dist/index-C0ENqrRs.js +0 -570
- package/dist/interfaces/animation/check-icon.d.ts +0 -5
- package/dist/interfaces/animation/check-icon.d.ts.map +0 -1
- package/dist/interfaces/animation/count-up.d.ts +0 -12
- package/dist/interfaces/animation/count-up.d.ts.map +0 -1
- package/dist/interfaces/animation/index.d.ts +0 -6
- package/dist/interfaces/animation/index.d.ts.map +0 -1
- package/dist/interfaces/animation/text-effect.d.ts +0 -25
- package/dist/interfaces/animation/text-effect.d.ts.map +0 -1
- package/dist/interfaces/animation/text-morph.d.ts +0 -10
- package/dist/interfaces/animation/text-morph.d.ts.map +0 -1
- package/dist/interfaces/animation/text-scramble.d.ts +0 -14
- package/dist/interfaces/animation/text-scramble.d.ts.map +0 -1
- package/dist/skeleton-avatar-BzklbqjK.js +0 -41
- package/dist/skeleton-avatar-Ce_osCsT.cjs +0 -1
- package/dist/use-controlled-state-FlR7N58L.js +0 -51
- package/dist/use-controlled-state-H7oMYjxi.cjs +0 -1
- package/dist/useTranslation-QicPQnlv.cjs +0 -1
- package/dist/useTranslation-tTfk6apO.js +0 -157
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";const x=require("./proxy-2cglvzJh.cjs"),S=require("react"),al=require("./index-DGDeDoym.cjs"),Ee=require("./indeterminate-C7JUOCP0.cjs"),ee=require("./classNames-CN12fVA7.cjs"),ao=require("react-dom"),ye=require("./index-CFlnP8Em.cjs");function $a(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 g=$a(S),tr=$a(ao);function sl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Wo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nr(...e){return t=>{let n=!1;const r=e.map(a=>{const u=Wo(a,t);return!n&&typeof u=="function"&&(n=!0),u});if(n)return()=>{for(let a=0;a<r.length;a++){const u=r[a];typeof u=="function"?u():Wo(e[a],null)}}}}function ne(...e){return g.useCallback(nr(...e),e)}function Ue(e){const t=cl(e),n=g.forwardRef((r,a)=>{const{children:u,...d}=r,f=g.Children.toArray(u),c=f.find(ll);if(c){const o=c.props.children,i=f.map(s=>s===c?g.Children.count(o)>1?g.Children.only(null):g.isValidElement(o)?o.props.children:null:s);return x.jsxRuntimeExports.jsx(t,{...d,ref:a,children:g.isValidElement(o)?g.cloneElement(o,void 0,i):null})}return x.jsxRuntimeExports.jsx(t,{...d,ref:a,children:u})});return n.displayName=`${e}.Slot`,n}var Fa=Ue("Slot");function cl(e){const t=g.forwardRef((n,r)=>{const{children:a,...u}=n;if(g.isValidElement(a)){const d=dl(a),f=fl(u,a.props);return a.type!==g.Fragment&&(f.ref=r?nr(r,d):d),g.cloneElement(a,f)}return g.Children.count(a)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ba=Symbol("radix.slottable");function ul(e){const t=({children:n})=>x.jsxRuntimeExports.jsx(x.jsxRuntimeExports.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ba,t}function ll(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ba}function fl(e,t){const n={...t};for(const r in t){const a=e[r],u=t[r];/^on[A-Z]/.test(r)?a&&u?n[r]=(...f)=>{const c=u(...f);return a(...f),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...u}:r==="className"&&(n[r]=[a,u].filter(Boolean).join(" "))}return{...e,...n}}function dl(e){var r,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],K=pl.reduce((e,t)=>{const n=Ue(`Primitive.${t}`),r=g.forwardRef((a,u)=>{const{asChild:d,...f}=a,c=d?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsxRuntimeExports.jsx(c,{...f,ref:u})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ga(e,t){e&&tr.flushSync(()=>e.dispatchEvent(t))}var Ua=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"}),hl="VisuallyHidden",za=g.forwardRef((e,t)=>x.jsxRuntimeExports.jsx(K.span,{...e,ref:t,style:{...Ua,...e.style}}));za.displayName=hl;var vl=za;function ml(e,t){const n=g.createContext(t),r=u=>{const{children:d,...f}=u,c=g.useMemo(()=>f,Object.values(f));return x.jsxRuntimeExports.jsx(n.Provider,{value:c,children:d})};r.displayName=e+"Provider";function a(u){const d=g.useContext(n);if(d)return d;if(t!==void 0)return t;throw new Error(`\`${u}\` must be used within \`${e}\``)}return[r,a]}function ge(e,t=[]){let n=[];function r(u,d){const f=g.createContext(d),c=n.length;n=[...n,d];const o=s=>{var y;const{scope:l,children:p,...v}=s,h=((y=l==null?void 0:l[e])==null?void 0:y[c])||f,m=g.useMemo(()=>v,Object.values(v));return x.jsxRuntimeExports.jsx(h.Provider,{value:m,children:p})};o.displayName=u+"Provider";function i(s,l){var h;const p=((h=l==null?void 0:l[e])==null?void 0:h[c])||f,v=g.useContext(p);if(v)return v;if(d!==void 0)return d;throw new Error(`\`${s}\` must be used within \`${u}\``)}return[o,i]}const a=()=>{const u=n.map(d=>g.createContext(d));return function(f){const c=(f==null?void 0:f[e])||u;return g.useMemo(()=>({[`__scope${e}`]:{...f,[e]:c}}),[f,c])}};return a.scopeName=e,[r,gl(a,...t)]}function gl(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(u){const d=r.reduce((f,{useScope:c,scopeName:o})=>{const s=c(u)[`__scope${o}`];return{...f,...s}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return n.scopeName=t.scopeName,n}function It(e){const t=e+"CollectionProvider",[n,r]=ge(t),[a,u]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=h=>{const{scope:m,children:y}=h,E=S.useRef(null),b=S.useRef(new Map).current;return x.jsxRuntimeExports.jsx(a,{scope:m,itemMap:b,collectionRef:E,children:y})};d.displayName=t;const f=e+"CollectionSlot",c=Ue(f),o=S.forwardRef((h,m)=>{const{scope:y,children:E}=h,b=u(f,y),_=ne(m,b.collectionRef);return x.jsxRuntimeExports.jsx(c,{ref:_,children:E})});o.displayName=f;const i=e+"CollectionItemSlot",s="data-radix-collection-item",l=Ue(i),p=S.forwardRef((h,m)=>{const{scope:y,children:E,...b}=h,_=S.useRef(null),w=ne(m,_),P=u(i,y);return S.useEffect(()=>(P.itemMap.set(_,{ref:_,...b}),()=>void P.itemMap.delete(_))),x.jsxRuntimeExports.jsx(l,{[s]:"",ref:w,children:E})});p.displayName=i;function v(h){const m=u(e+"CollectionConsumer",h);return S.useCallback(()=>{const E=m.collectionRef.current;if(!E)return[];const b=Array.from(E.querySelectorAll(`[${s}]`));return Array.from(m.itemMap.values()).sort((P,O)=>b.indexOf(P.ref.current)-b.indexOf(O.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:d,Slot:o,ItemSlot:p},v,r]}function G(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}var ce=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},xl=g[" useInsertionEffect ".trim().toString()]||ce;function me({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,u,d]=yl({defaultProp:t,onChange:n}),f=e!==void 0,c=f?e:a;{const i=g.useRef(e!==void 0);g.useEffect(()=>{const s=i.current;s!==f&&console.warn(`${r} is changing from ${s?"controlled":"uncontrolled"} to ${f?"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.`),i.current=f},[f,r])}const o=g.useCallback(i=>{var s;if(f){const l=El(i)?i(e):i;l!==e&&((s=d.current)==null||s.call(d,l))}else u(i)},[f,e,u,d]);return[c,o]}function yl({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),a=g.useRef(n),u=g.useRef(t);return xl(()=>{u.current=t},[t]),g.useEffect(()=>{var d;a.current!==n&&((d=u.current)==null||d.call(u,n),a.current=n)},[n,a]),[n,r,u]}function El(e){return typeof e=="function"}function bl(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var Pe=e=>{const{present:t,children:n}=e,r=wl(t),a=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),u=ne(r.ref,_l(a));return typeof n=="function"||r.isPresent?g.cloneElement(a,{ref:u}):null};Pe.displayName="Presence";function wl(e){const[t,n]=g.useState(),r=g.useRef(null),a=g.useRef(e),u=g.useRef("none"),d=e?"mounted":"unmounted",[f,c]=bl(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const o=Kt(r.current);u.current=f==="mounted"?o:"none"},[f]),ce(()=>{const o=r.current,i=a.current;if(i!==e){const l=u.current,p=Kt(o);e?c("MOUNT"):p==="none"||(o==null?void 0:o.display)==="none"?c("UNMOUNT"):c(i&&l!==p?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),ce(()=>{if(t){let o;const i=t.ownerDocument.defaultView??window,s=p=>{const h=Kt(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(c("ANIMATION_END"),!a.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",o=i.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},l=p=>{p.target===t&&(u.current=Kt(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",s),t.addEventListener("animationend",s),()=>{i.clearTimeout(o),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",s),t.removeEventListener("animationend",s)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:g.useCallback(o=>{r.current=o?getComputedStyle(o):null,n(o)},[])}}function Kt(e){return(e==null?void 0:e.animationName)||"none"}function _l(e){var r,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Rl=g[" useId ".trim().toString()]||(()=>{}),Sl=0;function be(e){const[t,n]=g.useState(Rl());return ce(()=>{n(r=>r??String(Sl++))},[e]),t?`radix-${t}`:""}var rr="Collapsible",[Cl,Va]=ge(rr),[Ol,so]=Cl(rr),qa=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:u,onOpenChange:d,...f}=e,[c,o]=me({prop:r,defaultProp:a??!1,onChange:d,caller:rr});return x.jsxRuntimeExports.jsx(Ol,{scope:n,disabled:u,contentId:be(),open:c,onOpenToggle:g.useCallback(()=>o(i=>!i),[o]),children:x.jsxRuntimeExports.jsx(K.div,{"data-state":uo(c),"data-disabled":u?"":void 0,...f,ref:t})})});qa.displayName=rr;var Ha="CollapsibleTrigger",Wa=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,a=so(Ha,n);return x.jsxRuntimeExports.jsx(K.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":uo(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:G(e.onClick,a.onOpenToggle)})});Wa.displayName=Ha;var co="CollapsibleContent",Xa=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=so(co,e.__scopeCollapsible);return x.jsxRuntimeExports.jsx(Pe,{present:n||a.open,children:({present:u})=>x.jsxRuntimeExports.jsx(Pl,{...r,ref:t,present:u})})});Xa.displayName=co;var Pl=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:a,...u}=e,d=so(co,n),[f,c]=g.useState(r),o=g.useRef(null),i=ne(t,o),s=g.useRef(0),l=s.current,p=g.useRef(0),v=p.current,h=d.open||f,m=g.useRef(h),y=g.useRef(void 0);return g.useEffect(()=>{const E=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(E)},[]),ce(()=>{const E=o.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();s.current=b.height,p.current=b.width,m.current||(E.style.transitionDuration=y.current.transitionDuration,E.style.animationName=y.current.animationName),c(r)}},[d.open,r]),x.jsxRuntimeExports.jsx(K.div,{"data-state":uo(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!h,...u,ref:i,style:{"--radix-collapsible-content-height":l?`${l}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:h&&a})});function uo(e){return e?"open":"closed"}var Al=qa,jl=Wa,Ml=Xa,Tl=g.createContext(void 0);function ht(e){const t=g.useContext(Tl);return e||t||"ltr"}var Ae="Accordion",Il=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[lo,Nl,Dl]=It(Ae),[or]=ge(Ae,[Dl,Va]),fo=Va(),Ka=S.forwardRef((e,t)=>{const{type:n,...r}=e,a=r,u=r;return x.jsxRuntimeExports.jsx(lo.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?x.jsxRuntimeExports.jsx(Fl,{...u,ref:t}):x.jsxRuntimeExports.jsx($l,{...a,ref:t})})});Ka.displayName=Ae;var[Ya,kl]=or(Ae),[Qa,Ll]=or(Ae,{collapsible:!1}),$l=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},collapsible:u=!1,...d}=e,[f,c]=me({prop:n,defaultProp:r??"",onChange:a,caller:Ae});return x.jsxRuntimeExports.jsx(Ya,{scope:e.__scopeAccordion,value:S.useMemo(()=>f?[f]:[],[f]),onItemOpen:c,onItemClose:S.useCallback(()=>u&&c(""),[u,c]),children:x.jsxRuntimeExports.jsx(Qa,{scope:e.__scopeAccordion,collapsible:u,children:x.jsxRuntimeExports.jsx(Za,{...d,ref:t})})})}),Fl=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},...u}=e,[d,f]=me({prop:n,defaultProp:r??[],onChange:a,caller:Ae}),c=S.useCallback(i=>f((s=[])=>[...s,i]),[f]),o=S.useCallback(i=>f((s=[])=>s.filter(l=>l!==i)),[f]);return x.jsxRuntimeExports.jsx(Ya,{scope:e.__scopeAccordion,value:d,onItemOpen:c,onItemClose:o,children:x.jsxRuntimeExports.jsx(Qa,{scope:e.__scopeAccordion,collapsible:!0,children:x.jsxRuntimeExports.jsx(Za,{...u,ref:t})})})}),[Bl,ir]=or(Ae),Za=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:a,orientation:u="vertical",...d}=e,f=S.useRef(null),c=ne(f,t),o=Nl(n),s=ht(a)==="ltr",l=G(e.onKeyDown,p=>{var M;if(!Il.includes(p.key))return;const v=p.target,h=o().filter(C=>{var I;return!((I=C.ref.current)!=null&&I.disabled)}),m=h.findIndex(C=>C.ref.current===v),y=h.length;if(m===-1)return;p.preventDefault();let E=m;const b=0,_=y-1,w=()=>{E=m+1,E>_&&(E=b)},P=()=>{E=m-1,E<b&&(E=_)};switch(p.key){case"Home":E=b;break;case"End":E=_;break;case"ArrowRight":u==="horizontal"&&(s?w():P());break;case"ArrowDown":u==="vertical"&&w();break;case"ArrowLeft":u==="horizontal"&&(s?P():w());break;case"ArrowUp":u==="vertical"&&P();break}const O=E%y;(M=h[O].ref.current)==null||M.focus()});return x.jsxRuntimeExports.jsx(Bl,{scope:n,disabled:r,direction:a,orientation:u,children:x.jsxRuntimeExports.jsx(lo.Slot,{scope:n,children:x.jsxRuntimeExports.jsx(K.div,{...d,"data-orientation":u,ref:c,onKeyDown:r?void 0:l})})})}),Vn="AccordionItem",[Gl,po]=or(Vn),Ja=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...a}=e,u=ir(Vn,n),d=kl(Vn,n),f=fo(n),c=be(),o=r&&d.value.includes(r)||!1,i=u.disabled||e.disabled;return x.jsxRuntimeExports.jsx(Gl,{scope:n,open:o,disabled:i,triggerId:c,children:x.jsxRuntimeExports.jsx(Al,{"data-orientation":u.orientation,"data-state":is(o),...f,...a,ref:t,disabled:i,open:o,onOpenChange:s=>{s?d.onItemOpen(r):d.onItemClose(r)}})})});Ja.displayName=Vn;var es="AccordionHeader",ts=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,a=ir(Ae,n),u=po(es,n);return x.jsxRuntimeExports.jsx(K.h3,{"data-orientation":a.orientation,"data-state":is(u.open),"data-disabled":u.disabled?"":void 0,...r,ref:t})});ts.displayName=es;var zr="AccordionTrigger",ns=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,a=ir(Ae,n),u=po(zr,n),d=Ll(zr,n),f=fo(n);return x.jsxRuntimeExports.jsx(lo.ItemSlot,{scope:n,children:x.jsxRuntimeExports.jsx(jl,{"aria-disabled":u.open&&!d.collapsible||void 0,"data-orientation":a.orientation,id:u.triggerId,...f,...r,ref:t})})});ns.displayName=zr;var rs="AccordionContent",os=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,a=ir(Ae,n),u=po(rs,n),d=fo(n);return x.jsxRuntimeExports.jsx(Ml,{role:"region","aria-labelledby":u.triggerId,"data-orientation":a.orientation,...d,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});os.displayName=rs;function is(e){return e?"open":"closed"}var Ul=Ka,zl=Ja,Vl=ts,ql=ns,Hl=os;function Se(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Wl(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e);g.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Xl="DismissableLayer",Vr="dismissableLayer.update",Kl="dismissableLayer.pointerDownOutside",Yl="dismissableLayer.focusOutside",Xo,as=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nt=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:d,onDismiss:f,...c}=e,o=g.useContext(as),[i,s]=g.useState(null),l=(i==null?void 0:i.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=g.useState({}),v=ne(t,O=>s(O)),h=Array.from(o.layers),[m]=[...o.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(m),E=i?h.indexOf(i):-1,b=o.layersWithOutsidePointerEventsDisabled.size>0,_=E>=y,w=Jl(O=>{const M=O.target,C=[...o.branches].some(I=>I.contains(M));!_||C||(a==null||a(O),d==null||d(O),O.defaultPrevented||f==null||f())},l),P=ef(O=>{const M=O.target;[...o.branches].some(I=>I.contains(M))||(u==null||u(O),d==null||d(O),O.defaultPrevented||f==null||f())},l);return Wl(O=>{E===o.layers.size-1&&(r==null||r(O),!O.defaultPrevented&&f&&(O.preventDefault(),f()))},l),g.useEffect(()=>{if(i)return n&&(o.layersWithOutsidePointerEventsDisabled.size===0&&(Xo=l.body.style.pointerEvents,l.body.style.pointerEvents="none"),o.layersWithOutsidePointerEventsDisabled.add(i)),o.layers.add(i),Ko(),()=>{n&&o.layersWithOutsidePointerEventsDisabled.size===1&&(l.body.style.pointerEvents=Xo)}},[i,l,n,o]),g.useEffect(()=>()=>{i&&(o.layers.delete(i),o.layersWithOutsidePointerEventsDisabled.delete(i),Ko())},[i,o]),g.useEffect(()=>{const O=()=>p({});return document.addEventListener(Vr,O),()=>document.removeEventListener(Vr,O)},[]),x.jsxRuntimeExports.jsx(K.div,{...c,ref:v,style:{pointerEvents:b?_?"auto":"none":void 0,...e.style},onFocusCapture:G(e.onFocusCapture,P.onFocusCapture),onBlurCapture:G(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,w.onPointerDownCapture)})});Nt.displayName=Xl;var Ql="DismissableLayerBranch",Zl=g.forwardRef((e,t)=>{const n=g.useContext(as),r=g.useRef(null),a=ne(t,r);return g.useEffect(()=>{const u=r.current;if(u)return n.branches.add(u),()=>{n.branches.delete(u)}},[n.branches]),x.jsxRuntimeExports.jsx(K.div,{...e,ref:a})});Zl.displayName=Ql;function Jl(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=g.useRef(!1),a=g.useRef(()=>{});return g.useEffect(()=>{const u=f=>{if(f.target&&!r.current){let c=function(){ss(Kl,n,o,{discrete:!0})};const o={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);r.current=!1},d=window.setTimeout(()=>{t.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),t.removeEventListener("pointerdown",u),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ef(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=g.useRef(!1);return g.useEffect(()=>{const a=u=>{u.target&&!r.current&&ss(Yl,n,{originalEvent:u},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ko(){const e=new CustomEvent(Vr);document.dispatchEvent(e)}function ss(e,t,n,{discrete:r}){const a=n.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Ga(a,u):a.dispatchEvent(u)}var Sr="focusScope.autoFocusOnMount",Cr="focusScope.autoFocusOnUnmount",Yo={bubbles:!1,cancelable:!0},tf="FocusScope",Dt=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:u,...d}=e,[f,c]=g.useState(null),o=Se(a),i=Se(u),s=g.useRef(null),l=ne(t,h=>c(h)),p=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let h=function(b){if(p.paused||!f)return;const _=b.target;f.contains(_)?s.current=_:Be(s.current,{select:!0})},m=function(b){if(p.paused||!f)return;const _=b.relatedTarget;_!==null&&(f.contains(_)||Be(s.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const w of b)w.removedNodes.length>0&&Be(f)};document.addEventListener("focusin",h),document.addEventListener("focusout",m);const E=new MutationObserver(y);return f&&E.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",m),E.disconnect()}}},[r,f,p.paused]),g.useEffect(()=>{if(f){Zo.add(p);const h=document.activeElement;if(!f.contains(h)){const y=new CustomEvent(Sr,Yo);f.addEventListener(Sr,o),f.dispatchEvent(y),y.defaultPrevented||(nf(cf(cs(f)),{select:!0}),document.activeElement===h&&Be(f))}return()=>{f.removeEventListener(Sr,o),setTimeout(()=>{const y=new CustomEvent(Cr,Yo);f.addEventListener(Cr,i),f.dispatchEvent(y),y.defaultPrevented||Be(h??document.body,{select:!0}),f.removeEventListener(Cr,i),Zo.remove(p)},0)}}},[f,o,i,p]);const v=g.useCallback(h=>{if(!n&&!r||p.paused)return;const m=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(m&&y){const E=h.currentTarget,[b,_]=rf(E);b&&_?!h.shiftKey&&y===_?(h.preventDefault(),n&&Be(b,{select:!0})):h.shiftKey&&y===b&&(h.preventDefault(),n&&Be(_,{select:!0})):y===E&&h.preventDefault()}},[n,r,p.paused]);return x.jsxRuntimeExports.jsx(K.div,{tabIndex:-1,...d,ref:l,onKeyDown:v})});Dt.displayName=tf;function nf(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Be(r,{select:t}),document.activeElement!==n)return}function rf(e){const t=cs(e),n=Qo(t,e),r=Qo(t.reverse(),e);return[n,r]}function cs(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Qo(e,t){for(const n of e)if(!of(n,{upTo:t}))return n}function of(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 af(e){return e instanceof HTMLInputElement&&"select"in e}function Be(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&af(e)&&t&&e.select()}}var Zo=sf();function sf(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Jo(e,t),e.unshift(t)},remove(t){var n;e=Jo(e,t),(n=e[0])==null||n.resume()}}}function Jo(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function cf(e){return e.filter(t=>t.tagName!=="A")}var uf="Portal",vt=g.forwardRef((e,t)=>{var f;const{container:n,...r}=e,[a,u]=g.useState(!1);ce(()=>u(!0),[]);const d=n||a&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return d?ao.createPortal(x.jsxRuntimeExports.jsx(K.div,{...r,ref:t}),d):null});vt.displayName=uf;var lf=vt,Or=0;function ar(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ei()),document.body.insertAdjacentElement("beforeend",e[1]??ei()),Or++,()=>{Or===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Or--}},[])}function ei(){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 Me=function(){return Me=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(t[u]=n[u])}return t},Me.apply(this,arguments)};function us(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 a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function ff(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,u;r<a;r++)(u||!(r in t))&&(u||(u=Array.prototype.slice.call(t,0,r)),u[r]=t[r]);return e.concat(u||Array.prototype.slice.call(t))}var Gn="right-scroll-bar-position",Un="width-before-scroll-bar",df="with-scroll-bars-hidden",pf="--removed-body-scroll-bar-size";function Pr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function hf(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var vf=typeof window<"u"?g.useLayoutEffect:g.useEffect,ti=new WeakMap;function mf(e,t){var n=hf(null,function(r){return e.forEach(function(a){return Pr(a,r)})});return vf(function(){var r=ti.get(n);if(r){var a=new Set(r),u=new Set(e),d=n.current;a.forEach(function(f){u.has(f)||Pr(f,null)}),u.forEach(function(f){a.has(f)||Pr(f,d)})}ti.set(n,e)},[e]),n}function gf(e){return e}function xf(e,t){t===void 0&&(t=gf);var n=[],r=!1,a={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(u){var d=t(u,r);return n.push(d),function(){n=n.filter(function(f){return f!==d})}},assignSyncMedium:function(u){for(r=!0;n.length;){var d=n;n=[],d.forEach(u)}n={push:function(f){return u(f)},filter:function(){return n}}},assignMedium:function(u){r=!0;var d=[];if(n.length){var f=n;n=[],f.forEach(u),d=n}var c=function(){var i=d;d=[],i.forEach(u)},o=function(){return Promise.resolve().then(c)};o(),n={push:function(i){d.push(i),o()},filter:function(i){return d=d.filter(i),n}}}};return a}function yf(e){e===void 0&&(e={});var t=xf(null);return t.options=Me({async:!0,ssr:!1},e),t}var ls=function(e){var t=e.sideCar,n=us(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 g.createElement(r,Me({},n))};ls.isSideCarExport=!0;function Ef(e,t){return e.useMedium(t),ls}var fs=yf(),Ar=function(){},sr=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:Ar,onWheelCapture:Ar,onTouchMoveCapture:Ar}),a=r[0],u=r[1],d=e.forwardProps,f=e.children,c=e.className,o=e.removeScrollBar,i=e.enabled,s=e.shards,l=e.sideCar,p=e.noRelative,v=e.noIsolation,h=e.inert,m=e.allowPinchZoom,y=e.as,E=y===void 0?"div":y,b=e.gapMode,_=us(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=l,P=mf([n,t]),O=Me(Me({},_),a);return g.createElement(g.Fragment,null,i&&g.createElement(w,{sideCar:fs,removeScrollBar:o,shards:s,noRelative:p,noIsolation:v,inert:h,setCallbacks:u,allowPinchZoom:!!m,lockRef:n,gapMode:b}),d?g.cloneElement(g.Children.only(f),Me(Me({},O),{ref:P})):g.createElement(E,Me({},O,{className:c,ref:P}),f))});sr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};sr.classNames={fullWidth:Un,zeroRight:Gn};var bf=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=bf();return t&&e.setAttribute("nonce",t),e}function _f(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Rf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Sf=function(){var e=0,t=null;return{add:function(n){e==0&&(t=wf())&&(_f(t,n),Rf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Cf=function(){var e=Sf();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ds=function(){var e=Cf(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},Of={left:0,top:0,right:0,gap:0},jr=function(e){return parseInt(e||"",10)||0},Pf=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[jr(n),jr(r),jr(a)]},Af=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Of;var t=Pf(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])}},jf=ds(),ft="data-scroll-locked",Mf=function(e,t,n,r){var a=e.left,u=e.top,d=e.right,f=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(df,` {
|
|
3
|
+
overflow: hidden `).concat(r,`;
|
|
4
|
+
padding-right: `).concat(f,"px ").concat(r,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(ft,`] {
|
|
7
|
+
overflow: hidden `).concat(r,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(a,`px;
|
|
11
|
+
padding-top: `).concat(u,`px;
|
|
12
|
+
padding-right: `).concat(d,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(f,"px ").concat(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(f,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(Gn,` {
|
|
20
|
+
right: `).concat(f,"px ").concat(r,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(Un,` {
|
|
24
|
+
margin-right: `).concat(f,"px ").concat(r,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(Gn," .").concat(Gn,` {
|
|
28
|
+
right: 0 `).concat(r,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(Un," .").concat(Un,` {
|
|
32
|
+
margin-right: 0 `).concat(r,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(ft,`] {
|
|
36
|
+
`).concat(pf,": ").concat(f,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},ni=function(){var e=parseInt(document.body.getAttribute(ft)||"0",10);return isFinite(e)?e:0},Tf=function(){g.useEffect(function(){return document.body.setAttribute(ft,(ni()+1).toString()),function(){var e=ni()-1;e<=0?document.body.removeAttribute(ft):document.body.setAttribute(ft,e.toString())}},[])},If=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;Tf();var u=g.useMemo(function(){return Af(a)},[a]);return g.createElement(jf,{styles:Mf(u,!t,a,n?"":"!important")})},qr=!1;if(typeof window<"u")try{var Yt=Object.defineProperty({},"passive",{get:function(){return qr=!0,!0}});window.addEventListener("test",Yt,Yt),window.removeEventListener("test",Yt,Yt)}catch{qr=!1}var ot=qr?{passive:!1}:!1,Nf=function(e){return e.tagName==="TEXTAREA"},ps=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Nf(e)&&n[t]==="visible")},Df=function(e){return ps(e,"overflowY")},kf=function(e){return ps(e,"overflowX")},ri=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=hs(e,r);if(a){var u=vs(e,r),d=u[1],f=u[2];if(d>f)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Lf=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},$f=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},hs=function(e,t){return e==="v"?Df(t):kf(t)},vs=function(e,t){return e==="v"?Lf(t):$f(t)},Ff=function(e,t){return e==="h"&&t==="rtl"?-1:1},Bf=function(e,t,n,r,a){var u=Ff(e,window.getComputedStyle(t).direction),d=u*r,f=n.target,c=t.contains(f),o=!1,i=d>0,s=0,l=0;do{if(!f)break;var p=vs(e,f),v=p[0],h=p[1],m=p[2],y=h-m-u*v;(v||y)&&hs(e,f)&&(s+=y,l+=v);var E=f.parentNode;f=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!c&&f!==document.body||c&&(t.contains(f)||t===f));return(i&&Math.abs(s)<1||!i&&Math.abs(l)<1)&&(o=!0),o},Qt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oi=function(e){return[e.deltaX,e.deltaY]},ii=function(e){return e&&"current"in e?e.current:e},Gf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Uf=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},zf=0,it=[];function Vf(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),a=g.useState(zf++)[0],u=g.useState(ds)[0],d=g.useRef(e);g.useEffect(function(){d.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var h=ff([e.lockRef.current],(e.shards||[]).map(ii),!0).filter(Boolean);return h.forEach(function(m){return m.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),h.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var f=g.useCallback(function(h,m){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!d.current.allowPinchZoom;var y=Qt(h),E=n.current,b="deltaX"in h?h.deltaX:E[0]-y[0],_="deltaY"in h?h.deltaY:E[1]-y[1],w,P=h.target,O=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in h&&O==="h"&&P.type==="range")return!1;var M=window.getSelection(),C=M&&M.anchorNode,I=C?C===P||C.contains(P):!1;if(I)return!1;var N=ri(O,P);if(!N)return!0;if(N?w=O:(w=O==="v"?"h":"v",N=ri(O,P)),!N)return!1;if(!r.current&&"changedTouches"in h&&(b||_)&&(r.current=w),!w)return!0;var L=r.current||w;return Bf(L,m,h,L==="h"?b:_)},[]),c=g.useCallback(function(h){var m=h;if(!(!it.length||it[it.length-1]!==u)){var y="deltaY"in m?oi(m):Qt(m),E=t.current.filter(function(w){return w.name===m.type&&(w.target===m.target||m.target===w.shadowParent)&&Gf(w.delta,y)})[0];if(E&&E.should){m.cancelable&&m.preventDefault();return}if(!E){var b=(d.current.shards||[]).map(ii).filter(Boolean).filter(function(w){return w.contains(m.target)}),_=b.length>0?f(m,b[0]):!d.current.noIsolation;_&&m.cancelable&&m.preventDefault()}}},[]),o=g.useCallback(function(h,m,y,E){var b={name:h,delta:m,target:y,should:E,shadowParent:qf(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(_){return _!==b})},1)},[]),i=g.useCallback(function(h){n.current=Qt(h),r.current=void 0},[]),s=g.useCallback(function(h){o(h.type,oi(h),h.target,f(h,e.lockRef.current))},[]),l=g.useCallback(function(h){o(h.type,Qt(h),h.target,f(h,e.lockRef.current))},[]);g.useEffect(function(){return it.push(u),e.setCallbacks({onScrollCapture:s,onWheelCapture:s,onTouchMoveCapture:l}),document.addEventListener("wheel",c,ot),document.addEventListener("touchmove",c,ot),document.addEventListener("touchstart",i,ot),function(){it=it.filter(function(h){return h!==u}),document.removeEventListener("wheel",c,ot),document.removeEventListener("touchmove",c,ot),document.removeEventListener("touchstart",i,ot)}},[]);var p=e.removeScrollBar,v=e.inert;return g.createElement(g.Fragment,null,v?g.createElement(u,{styles:Uf(a)}):null,p?g.createElement(If,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function qf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Hf=Ef(fs,Vf);var kt=g.forwardRef(function(e,t){return g.createElement(sr,Me({},e,{ref:t,sideCar:Hf}))});kt.classNames=sr.classNames;var Wf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},at=new WeakMap,Zt=new WeakMap,Jt={},Mr=0,ms=function(e){return e&&(e.host||ms(e.parentNode))},Xf=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ms(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})},Kf=function(e,t,n,r){var a=Xf(t,Array.isArray(e)?e:[e]);Jt[n]||(Jt[n]=new WeakMap);var u=Jt[n],d=[],f=new Set,c=new Set(a),o=function(s){!s||f.has(s)||(f.add(s),o(s.parentNode))};a.forEach(o);var i=function(s){!s||c.has(s)||Array.prototype.forEach.call(s.children,function(l){if(f.has(l))i(l);else try{var p=l.getAttribute(r),v=p!==null&&p!=="false",h=(at.get(l)||0)+1,m=(u.get(l)||0)+1;at.set(l,h),u.set(l,m),d.push(l),h===1&&v&&Zt.set(l,!0),m===1&&l.setAttribute(n,"true"),v||l.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",l,y)}})};return i(t),f.clear(),Mr++,function(){d.forEach(function(s){var l=at.get(s)-1,p=u.get(s)-1;at.set(s,l),u.set(s,p),l||(Zt.has(s)||s.removeAttribute(r),Zt.delete(s)),p||s.removeAttribute(n)}),Mr--,Mr||(at=new WeakMap,at=new WeakMap,Zt=new WeakMap,Jt={})}},cr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=Wf(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),Kf(r,a,n,"aria-hidden")):function(){return null}},ur="Dialog",[gs]=ge(ur),[Yf,je]=gs(ur),xs=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:u,modal:d=!0}=e,f=g.useRef(null),c=g.useRef(null),[o,i]=me({prop:r,defaultProp:a??!1,onChange:u,caller:ur});return x.jsxRuntimeExports.jsx(Yf,{scope:t,triggerRef:f,contentRef:c,contentId:be(),titleId:be(),descriptionId:be(),open:o,onOpenChange:i,onOpenToggle:g.useCallback(()=>i(s=>!s),[i]),modal:d,children:n})};xs.displayName=ur;var ys="DialogTrigger",Qf=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=je(ys,n),u=ne(t,a.triggerRef);return x.jsxRuntimeExports.jsx(K.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":mo(a.open),...r,ref:u,onClick:G(e.onClick,a.onOpenToggle)})});Qf.displayName=ys;var ho="DialogPortal",[Zf,Es]=gs(ho,{forceMount:void 0}),bs=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,u=je(ho,t);return x.jsxRuntimeExports.jsx(Zf,{scope:t,forceMount:n,children:g.Children.map(r,d=>x.jsxRuntimeExports.jsx(Pe,{present:n||u.open,children:x.jsxRuntimeExports.jsx(vt,{asChild:!0,container:a,children:d})}))})};bs.displayName=ho;var qn="DialogOverlay",ws=g.forwardRef((e,t)=>{const n=Es(qn,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,u=je(qn,e.__scopeDialog);return u.modal?x.jsxRuntimeExports.jsx(Pe,{present:r||u.open,children:x.jsxRuntimeExports.jsx(ed,{...a,ref:t})}):null});ws.displayName=qn;var Jf=Ue("DialogOverlay.RemoveScroll"),ed=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=je(qn,n);return x.jsxRuntimeExports.jsx(kt,{as:Jf,allowPinchZoom:!0,shards:[a.contentRef],children:x.jsxRuntimeExports.jsx(K.div,{"data-state":mo(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Qe="DialogContent",_s=g.forwardRef((e,t)=>{const n=Es(Qe,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,u=je(Qe,e.__scopeDialog);return x.jsxRuntimeExports.jsx(Pe,{present:r||u.open,children:u.modal?x.jsxRuntimeExports.jsx(td,{...a,ref:t}):x.jsxRuntimeExports.jsx(nd,{...a,ref:t})})});_s.displayName=Qe;var td=g.forwardRef((e,t)=>{const n=je(Qe,e.__scopeDialog),r=g.useRef(null),a=ne(t,n.contentRef,r);return g.useEffect(()=>{const u=r.current;if(u)return cr(u)},[]),x.jsxRuntimeExports.jsx(Rs,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,u=>{var d;u.preventDefault(),(d=n.triggerRef.current)==null||d.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,u=>{const d=u.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0;(d.button===2||f)&&u.preventDefault()}),onFocusOutside:G(e.onFocusOutside,u=>u.preventDefault())})}),nd=g.forwardRef((e,t)=>{const n=je(Qe,e.__scopeDialog),r=g.useRef(!1),a=g.useRef(!1);return x.jsxRuntimeExports.jsx(Rs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var d,f;(d=e.onCloseAutoFocus)==null||d.call(e,u),u.defaultPrevented||(r.current||(f=n.triggerRef.current)==null||f.focus(),u.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:u=>{var c,o;(c=e.onInteractOutside)==null||c.call(e,u),u.defaultPrevented||(r.current=!0,u.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const d=u.target;((o=n.triggerRef.current)==null?void 0:o.contains(d))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&a.current&&u.preventDefault()}})}),Rs=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:u,...d}=e,f=je(Qe,n),c=g.useRef(null),o=ne(t,c);return ar(),x.jsxRuntimeExports.jsxs(x.jsxRuntimeExports.Fragment,{children:[x.jsxRuntimeExports.jsx(Dt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:u,children:x.jsxRuntimeExports.jsx(Nt,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":mo(f.open),...d,ref:o,onDismiss:()=>f.onOpenChange(!1)})}),x.jsxRuntimeExports.jsxs(x.jsxRuntimeExports.Fragment,{children:[x.jsxRuntimeExports.jsx(od,{titleId:f.titleId}),x.jsxRuntimeExports.jsx(ad,{contentRef:c,descriptionId:f.descriptionId})]})]})}),vo="DialogTitle",Ss=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=je(vo,n);return x.jsxRuntimeExports.jsx(K.h2,{id:a.titleId,...r,ref:t})});Ss.displayName=vo;var Cs="DialogDescription",Os=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=je(Cs,n);return x.jsxRuntimeExports.jsx(K.p,{id:a.descriptionId,...r,ref:t})});Os.displayName=Cs;var Ps="DialogClose",rd=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=je(Ps,n);return x.jsxRuntimeExports.jsx(K.button,{type:"button",...r,ref:t,onClick:G(e.onClick,()=>a.onOpenChange(!1))})});rd.displayName=Ps;function mo(e){return e?"open":"closed"}var As="DialogTitleWarning",[Rg,js]=ml(As,{contentName:Qe,titleName:vo,docsSlug:"dialog"}),od=({titleId:e})=>{const t=js(As),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
+
|
|
43
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
+
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},id="DialogDescriptionWarning",ad=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${js(id).contentName}}.`;return g.useEffect(()=>{var u;const a=(u=e.current)==null?void 0:u.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},sd=xs,cd=bs,ud=ws,ld=_s,fd=Ss,dd=Os;function pd(){return al.shimExports.useSyncExternalStore(hd,()=>!0,()=>!1)}function hd(){return()=>{}}var go="Avatar",[vd]=ge(go),[md,Ms]=vd(go),Ts=g.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,u]=g.useState("idle");return x.jsxRuntimeExports.jsx(md,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:u,children:x.jsxRuntimeExports.jsx(K.span,{...r,ref:t})})});Ts.displayName=go;var Is="AvatarImage",Ns=g.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...u}=e,d=Ms(Is,n),f=gd(r,u),c=Se(o=>{a(o),d.onImageLoadingStatusChange(o)});return ce(()=>{f!=="idle"&&c(f)},[f,c]),f==="loaded"?x.jsxRuntimeExports.jsx(K.img,{...u,ref:t,src:r}):null});Ns.displayName=Is;var Ds="AvatarFallback",ks=g.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,u=Ms(Ds,n),[d,f]=g.useState(r===void 0);return g.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>f(!0),r);return()=>window.clearTimeout(c)}},[r]),d&&u.imageLoadingStatus!=="loaded"?x.jsxRuntimeExports.jsx(K.span,{...a,ref:t}):null});ks.displayName=Ds;function ai(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function gd(e,{referrerPolicy:t,crossOrigin:n}){const r=pd(),a=g.useRef(null),u=r?(a.current||(a.current=new window.Image),a.current):null,[d,f]=g.useState(()=>ai(u,e));return ce(()=>{f(ai(u,e))},[u,e]),ce(()=>{const c=s=>()=>{f(s)};if(!u)return;const o=c("loaded"),i=c("error");return u.addEventListener("load",o),u.addEventListener("error",i),t&&(u.referrerPolicy=t),typeof n=="string"&&(u.crossOrigin=n),()=>{u.removeEventListener("load",o),u.removeEventListener("error",i)}},[u,n,t]),d}var xd=Ts,yd=Ns,Ed=ks;function xo(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function yo(e){const[t,n]=g.useState(void 0);return ce(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const u=a[0];let d,f;if("borderBoxSize"in u){const c=u.borderBoxSize,o=Array.isArray(c)?c[0]:c;d=o.inlineSize,f=o.blockSize}else d=e.offsetWidth,f=e.offsetHeight;n({width:d,height:f})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var lr="Checkbox",[bd]=ge(lr),[wd,Eo]=bd(lr);function _d(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:u,form:d,name:f,onCheckedChange:c,required:o,value:i="on",internal_do_not_use_render:s}=e,[l,p]=me({prop:n,defaultProp:a??!1,onChange:c,caller:lr}),[v,h]=g.useState(null),[m,y]=g.useState(null),E=g.useRef(!1),b=v?!!d||!!v.closest("form"):!0,_={checked:l,disabled:u,setChecked:p,control:v,setControl:h,name:f,form:d,value:i,hasConsumerStoppedPropagationRef:E,required:o,defaultChecked:Ge(a)?!1:a,isFormControl:b,bubbleInput:m,setBubbleInput:y};return x.jsxRuntimeExports.jsx(wd,{scope:t,..._,children:Sd(s)?s(_):r})}var Ls="CheckboxTrigger",$s=g.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{const{control:u,value:d,disabled:f,checked:c,required:o,setControl:i,setChecked:s,hasConsumerStoppedPropagationRef:l,isFormControl:p,bubbleInput:v}=Eo(Ls,e),h=ne(a,i),m=g.useRef(c);return g.useEffect(()=>{const y=u==null?void 0:u.form;if(y){const E=()=>s(m.current);return y.addEventListener("reset",E),()=>y.removeEventListener("reset",E)}},[u,s]),x.jsxRuntimeExports.jsx(K.button,{type:"button",role:"checkbox","aria-checked":Ge(c)?"mixed":c,"aria-required":o,"data-state":zs(c),"data-disabled":f?"":void 0,disabled:f,value:d,...r,ref:h,onKeyDown:G(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:G(n,y=>{s(E=>Ge(E)?!0:!E),v&&p&&(l.current=y.isPropagationStopped(),l.current||y.stopPropagation())})})});$s.displayName=Ls;var Fs=g.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:u,required:d,disabled:f,value:c,onCheckedChange:o,form:i,...s}=e;return x.jsxRuntimeExports.jsx(_d,{__scopeCheckbox:n,checked:a,defaultChecked:u,disabled:f,required:d,onCheckedChange:o,name:r,form:i,value:c,internal_do_not_use_render:({isFormControl:l})=>x.jsxRuntimeExports.jsxs(x.jsxRuntimeExports.Fragment,{children:[x.jsxRuntimeExports.jsx($s,{...s,ref:t,__scopeCheckbox:n}),l&&x.jsxRuntimeExports.jsx(Us,{__scopeCheckbox:n})]})})});Fs.displayName=lr;var Bs="CheckboxIndicator",Rd=g.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,u=Eo(Bs,n);return x.jsxRuntimeExports.jsx(Pe,{present:r||Ge(u.checked)||u.checked===!0,children:x.jsxRuntimeExports.jsx(K.span,{"data-state":zs(u.checked),"data-disabled":u.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});Rd.displayName=Bs;var Gs="CheckboxBubbleInput",Us=g.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:u,defaultChecked:d,required:f,disabled:c,name:o,value:i,form:s,bubbleInput:l,setBubbleInput:p}=Eo(Gs,e),v=ne(n,p),h=xo(u),m=yo(r);g.useEffect(()=>{const E=l;if(!E)return;const b=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(b,"checked").set,P=!a.current;if(h!==u&&w){const O=new Event("click",{bubbles:P});E.indeterminate=Ge(u),w.call(E,Ge(u)?!1:u),E.dispatchEvent(O)}},[l,h,u,a]);const y=g.useRef(Ge(u)?!1:u);return x.jsxRuntimeExports.jsx(K.input,{type:"checkbox","aria-hidden":!0,defaultChecked:d??y.current,required:f,disabled:c,name:o,value:i,form:s,...t,tabIndex:-1,ref:v,style:{...t.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Us.displayName=Gs;function Sd(e){return typeof e=="function"}function Ge(e){return e==="indeterminate"}function zs(e){return Ge(e)?"indeterminate":e?"checked":"unchecked"}const Cd=["top","right","bottom","left"],ze=Math.min,he=Math.max,Hn=Math.round,en=Math.floor,Ie=e=>({x:e,y:e}),Od={left:"right",right:"left",bottom:"top",top:"bottom"},Pd={start:"end",end:"start"};function Hr(e,t,n){return he(e,ze(t,n))}function Le(e,t){return typeof e=="function"?e(t):e}function $e(e){return e.split("-")[0]}function mt(e){return e.split("-")[1]}function bo(e){return e==="x"?"y":"x"}function wo(e){return e==="y"?"height":"width"}const Ad=new Set(["top","bottom"]);function Te(e){return Ad.has($e(e))?"y":"x"}function _o(e){return bo(Te(e))}function jd(e,t,n){n===void 0&&(n=!1);const r=mt(e),a=_o(e),u=wo(a);let d=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[u]>t.floating[u]&&(d=Wn(d)),[d,Wn(d)]}function Md(e){const t=Wn(e);return[Wr(e),t,Wr(t)]}function Wr(e){return e.replace(/start|end/g,t=>Pd[t])}const si=["left","right"],ci=["right","left"],Td=["top","bottom"],Id=["bottom","top"];function Nd(e,t,n){switch(e){case"top":case"bottom":return n?t?ci:si:t?si:ci;case"left":case"right":return t?Td:Id;default:return[]}}function Dd(e,t,n,r){const a=mt(e);let u=Nd($e(e),n==="start",r);return a&&(u=u.map(d=>d+"-"+a),t&&(u=u.concat(u.map(Wr)))),u}function Wn(e){return e.replace(/left|right|bottom|top/g,t=>Od[t])}function kd(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vs(e){return typeof e!="number"?kd(e):{top:e,right:e,bottom:e,left:e}}function Xn(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function ui(e,t,n){let{reference:r,floating:a}=e;const u=Te(t),d=_o(t),f=wo(d),c=$e(t),o=u==="y",i=r.x+r.width/2-a.width/2,s=r.y+r.height/2-a.height/2,l=r[f]/2-a[f]/2;let p;switch(c){case"top":p={x:i,y:r.y-a.height};break;case"bottom":p={x:i,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:s};break;case"left":p={x:r.x-a.width,y:s};break;default:p={x:r.x,y:r.y}}switch(mt(t)){case"start":p[d]-=l*(n&&o?-1:1);break;case"end":p[d]+=l*(n&&o?-1:1);break}return p}async function Ld(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:u,rects:d,elements:f,strategy:c}=e,{boundary:o="clippingAncestors",rootBoundary:i="viewport",elementContext:s="floating",altBoundary:l=!1,padding:p=0}=Le(t,e),v=Vs(p),m=f[l?s==="floating"?"reference":"floating":s],y=Xn(await u.getClippingRect({element:(n=await(u.isElement==null?void 0:u.isElement(m)))==null||n?m:m.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(f.floating)),boundary:o,rootBoundary:i,strategy:c})),E=s==="floating"?{x:r,y:a,width:d.floating.width,height:d.floating.height}:d.reference,b=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),_=await(u.isElement==null?void 0:u.isElement(b))?await(u.getScale==null?void 0:u.getScale(b))||{x:1,y:1}:{x:1,y:1},w=Xn(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:E,offsetParent:b,strategy:c}):E);return{top:(y.top-w.top+v.top)/_.y,bottom:(w.bottom-y.bottom+v.bottom)/_.y,left:(y.left-w.left+v.left)/_.x,right:(w.right-y.right+v.right)/_.x}}const $d=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:u=[],platform:d}=n,f=u.filter(Boolean),c=await(d.isRTL==null?void 0:d.isRTL(t));let o=await d.getElementRects({reference:e,floating:t,strategy:a}),{x:i,y:s}=ui(o,r,c),l=r,p={},v=0;for(let m=0;m<f.length;m++){var h;const{name:y,fn:E}=f[m],{x:b,y:_,data:w,reset:P}=await E({x:i,y:s,initialPlacement:r,placement:l,strategy:a,middlewareData:p,rects:o,platform:{...d,detectOverflow:(h=d.detectOverflow)!=null?h:Ld},elements:{reference:e,floating:t}});i=b??i,s=_??s,p={...p,[y]:{...p[y],...w}},P&&v<=50&&(v++,typeof P=="object"&&(P.placement&&(l=P.placement),P.rects&&(o=P.rects===!0?await d.getElementRects({reference:e,floating:t,strategy:a}):P.rects),{x:i,y:s}=ui(o,l,c)),m=-1)}return{x:i,y:s,placement:l,strategy:a,middlewareData:p}},Fd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:u,platform:d,elements:f,middlewareData:c}=t,{element:o,padding:i=0}=Le(e,t)||{};if(o==null)return{};const s=Vs(i),l={x:n,y:r},p=_o(a),v=wo(p),h=await d.getDimensions(o),m=p==="y",y=m?"top":"left",E=m?"bottom":"right",b=m?"clientHeight":"clientWidth",_=u.reference[v]+u.reference[p]-l[p]-u.floating[v],w=l[p]-u.reference[p],P=await(d.getOffsetParent==null?void 0:d.getOffsetParent(o));let O=P?P[b]:0;(!O||!await(d.isElement==null?void 0:d.isElement(P)))&&(O=f.floating[b]||u.floating[v]);const M=_/2-w/2,C=O/2-h[v]/2-1,I=ze(s[y],C),N=ze(s[E],C),L=I,$=O-h[v]-N,D=O/2-h[v]/2+M,H=Hr(L,D,$),F=!c.arrow&&mt(a)!=null&&D!==H&&u.reference[v]/2-(D<L?I:N)-h[v]/2<0,Q=F?D<L?D-L:D-$:0;return{[p]:l[p]+Q,data:{[p]:H,centerOffset:D-H-Q,...F&&{alignmentOffset:Q}},reset:F}}}),Bd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:u,rects:d,initialPlacement:f,platform:c,elements:o}=t,{mainAxis:i=!0,crossAxis:s=!0,fallbackPlacements:l,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...m}=Le(e,t);if((n=u.arrow)!=null&&n.alignmentOffset)return{};const y=$e(a),E=Te(f),b=$e(f)===f,_=await(c.isRTL==null?void 0:c.isRTL(o.floating)),w=l||(b||!h?[Wn(f)]:Md(f)),P=v!=="none";!l&&P&&w.push(...Dd(f,h,v,_));const O=[f,...w],M=await c.detectOverflow(t,m),C=[];let I=((r=u.flip)==null?void 0:r.overflows)||[];if(i&&C.push(M[y]),s){const D=jd(a,d,_);C.push(M[D[0]],M[D[1]])}if(I=[...I,{placement:a,overflows:C}],!C.every(D=>D<=0)){var N,L;const D=(((N=u.flip)==null?void 0:N.index)||0)+1,H=O[D];if(H&&(!(s==="alignment"?E!==Te(H):!1)||I.every(z=>Te(z.placement)===E?z.overflows[0]>0:!0)))return{data:{index:D,overflows:I},reset:{placement:H}};let F=(L=I.filter(Q=>Q.overflows[0]<=0).sort((Q,z)=>Q.overflows[1]-z.overflows[1])[0])==null?void 0:L.placement;if(!F)switch(p){case"bestFit":{var $;const Q=($=I.filter(z=>{if(P){const k=Te(z.placement);return k===E||k==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(k=>k>0).reduce((k,R)=>k+R,0)]).sort((z,k)=>z[1]-k[1])[0])==null?void 0:$[0];Q&&(F=Q);break}case"initialPlacement":F=f;break}if(a!==F)return{reset:{placement:F}}}return{}}}};function li(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fi(e){return Cd.some(t=>e[t]>=0)}const Gd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...u}=Le(e,t);switch(a){case"referenceHidden":{const d=await r.detectOverflow(t,{...u,elementContext:"reference"}),f=li(d,n.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:fi(f)}}}case"escaped":{const d=await r.detectOverflow(t,{...u,altBoundary:!0}),f=li(d,n.floating);return{data:{escapedOffsets:f,escaped:fi(f)}}}default:return{}}}}},qs=new Set(["left","top"]);async function Ud(e,t){const{placement:n,platform:r,elements:a}=e,u=await(r.isRTL==null?void 0:r.isRTL(a.floating)),d=$e(n),f=mt(n),c=Te(n)==="y",o=qs.has(d)?-1:1,i=u&&c?-1:1,s=Le(t,e);let{mainAxis:l,crossAxis:p,alignmentAxis:v}=typeof s=="number"?{mainAxis:s,crossAxis:0,alignmentAxis:null}:{mainAxis:s.mainAxis||0,crossAxis:s.crossAxis||0,alignmentAxis:s.alignmentAxis};return f&&typeof v=="number"&&(p=f==="end"?v*-1:v),c?{x:p*i,y:l*o}:{x:l*o,y:p*i}}const zd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:u,placement:d,middlewareData:f}=t,c=await Ud(t,e);return d===((n=f.offset)==null?void 0:n.placement)&&(r=f.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:u+c.y,data:{...c,placement:d}}}}},Vd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:u}=t,{mainAxis:d=!0,crossAxis:f=!1,limiter:c={fn:y=>{let{x:E,y:b}=y;return{x:E,y:b}}},...o}=Le(e,t),i={x:n,y:r},s=await u.detectOverflow(t,o),l=Te($e(a)),p=bo(l);let v=i[p],h=i[l];if(d){const y=p==="y"?"top":"left",E=p==="y"?"bottom":"right",b=v+s[y],_=v-s[E];v=Hr(b,v,_)}if(f){const y=l==="y"?"top":"left",E=l==="y"?"bottom":"right",b=h+s[y],_=h-s[E];h=Hr(b,h,_)}const m=c.fn({...t,[p]:v,[l]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:d,[l]:f}}}}}},qd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:u,middlewareData:d}=t,{offset:f=0,mainAxis:c=!0,crossAxis:o=!0}=Le(e,t),i={x:n,y:r},s=Te(a),l=bo(s);let p=i[l],v=i[s];const h=Le(f,t),m=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const b=l==="y"?"height":"width",_=u.reference[l]-u.floating[b]+m.mainAxis,w=u.reference[l]+u.reference[b]-m.mainAxis;p<_?p=_:p>w&&(p=w)}if(o){var y,E;const b=l==="y"?"width":"height",_=qs.has($e(a)),w=u.reference[s]-u.floating[b]+(_&&((y=d.offset)==null?void 0:y[s])||0)+(_?0:m.crossAxis),P=u.reference[s]+u.reference[b]+(_?0:((E=d.offset)==null?void 0:E[s])||0)-(_?m.crossAxis:0);v<w?v=w:v>P&&(v=P)}return{[l]:p,[s]:v}}}},Hd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:u,platform:d,elements:f}=t,{apply:c=()=>{},...o}=Le(e,t),i=await d.detectOverflow(t,o),s=$e(a),l=mt(a),p=Te(a)==="y",{width:v,height:h}=u.floating;let m,y;s==="top"||s==="bottom"?(m=s,y=l===(await(d.isRTL==null?void 0:d.isRTL(f.floating))?"start":"end")?"left":"right"):(y=s,m=l==="end"?"top":"bottom");const E=h-i.top-i.bottom,b=v-i.left-i.right,_=ze(h-i[m],E),w=ze(v-i[y],b),P=!t.middlewareData.shift;let O=_,M=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=E),P&&!l){const I=he(i.left,0),N=he(i.right,0),L=he(i.top,0),$=he(i.bottom,0);p?M=v-2*(I!==0||N!==0?I+N:he(i.left,i.right)):O=h-2*(L!==0||$!==0?L+$:he(i.top,i.bottom))}await c({...t,availableWidth:M,availableHeight:O});const C=await d.getDimensions(f.floating);return v!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function fr(){return typeof window<"u"}function gt(e){return Hs(e)?(e.nodeName||"").toLowerCase():"#document"}function ve(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function De(e){var t;return(t=(Hs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hs(e){return fr()?e instanceof Node||e instanceof ve(e).Node:!1}function Ce(e){return fr()?e instanceof Element||e instanceof ve(e).Element:!1}function Ne(e){return fr()?e instanceof HTMLElement||e instanceof ve(e).HTMLElement:!1}function di(e){return!fr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ve(e).ShadowRoot}const Wd=new Set(["inline","contents"]);function Lt(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Oe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Wd.has(a)}const Xd=new Set(["table","td","th"]);function Kd(e){return Xd.has(gt(e))}const Yd=[":popover-open",":modal"];function dr(e){return Yd.some(t=>{try{return e.matches(t)}catch{return!1}})}const Qd=["transform","translate","scale","rotate","perspective"],Zd=["transform","translate","scale","rotate","perspective","filter"],Jd=["paint","layout","strict","content"];function Ro(e){const t=So(),n=Ce(e)?Oe(e):e;return Qd.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)||Zd.some(r=>(n.willChange||"").includes(r))||Jd.some(r=>(n.contain||"").includes(r))}function ep(e){let t=Ve(e);for(;Ne(t)&&!pt(t);){if(Ro(t))return t;if(dr(t))return null;t=Ve(t)}return null}function So(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const tp=new Set(["html","body","#document"]);function pt(e){return tp.has(gt(e))}function Oe(e){return ve(e).getComputedStyle(e)}function pr(e){return Ce(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ve(e){if(gt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||di(e)&&e.host||De(e);return di(t)?t.host:t}function Ws(e){const t=Ve(e);return pt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ne(t)&&Lt(t)?t:Ws(t)}function At(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=Ws(e),u=a===((r=e.ownerDocument)==null?void 0:r.body),d=ve(a);if(u){const f=Xr(d);return t.concat(d,d.visualViewport||[],Lt(a)?a:[],f&&n?At(f):[])}return t.concat(a,At(a,[],n))}function Xr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xs(e){const t=Oe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Ne(e),u=a?e.offsetWidth:n,d=a?e.offsetHeight:r,f=Hn(n)!==u||Hn(r)!==d;return f&&(n=u,r=d),{width:n,height:r,$:f}}function Co(e){return Ce(e)?e:e.contextElement}function dt(e){const t=Co(e);if(!Ne(t))return Ie(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:u}=Xs(t);let d=(u?Hn(n.width):n.width)/r,f=(u?Hn(n.height):n.height)/a;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const np=Ie(0);function Ks(e){const t=ve(e);return!So()||!t.visualViewport?np:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ve(e)?!1:t}function Ze(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),u=Co(e);let d=Ie(1);t&&(r?Ce(r)&&(d=dt(r)):d=dt(e));const f=rp(u,n,r)?Ks(u):Ie(0);let c=(a.left+f.x)/d.x,o=(a.top+f.y)/d.y,i=a.width/d.x,s=a.height/d.y;if(u){const l=ve(u),p=r&&Ce(r)?ve(r):r;let v=l,h=Xr(v);for(;h&&r&&p!==v;){const m=dt(h),y=h.getBoundingClientRect(),E=Oe(h),b=y.left+(h.clientLeft+parseFloat(E.paddingLeft))*m.x,_=y.top+(h.clientTop+parseFloat(E.paddingTop))*m.y;c*=m.x,o*=m.y,i*=m.x,s*=m.y,c+=b,o+=_,v=ve(h),h=Xr(v)}}return Xn({width:i,height:s,x:c,y:o})}function hr(e,t){const n=pr(e).scrollLeft;return t?t.left+n:Ze(De(e)).left+n}function Ys(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-hr(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function op(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const u=a==="fixed",d=De(r),f=t?dr(t.floating):!1;if(r===d||f&&u)return n;let c={scrollLeft:0,scrollTop:0},o=Ie(1);const i=Ie(0),s=Ne(r);if((s||!s&&!u)&&((gt(r)!=="body"||Lt(d))&&(c=pr(r)),Ne(r))){const p=Ze(r);o=dt(r),i.x=p.x+r.clientLeft,i.y=p.y+r.clientTop}const l=d&&!s&&!u?Ys(d,c):Ie(0);return{width:n.width*o.x,height:n.height*o.y,x:n.x*o.x-c.scrollLeft*o.x+i.x+l.x,y:n.y*o.y-c.scrollTop*o.y+i.y+l.y}}function ip(e){return Array.from(e.getClientRects())}function ap(e){const t=De(e),n=pr(e),r=e.ownerDocument.body,a=he(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),u=he(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let d=-n.scrollLeft+hr(e);const f=-n.scrollTop;return Oe(r).direction==="rtl"&&(d+=he(t.clientWidth,r.clientWidth)-a),{width:a,height:u,x:d,y:f}}const pi=25;function sp(e,t){const n=ve(e),r=De(e),a=n.visualViewport;let u=r.clientWidth,d=r.clientHeight,f=0,c=0;if(a){u=a.width,d=a.height;const i=So();(!i||i&&t==="fixed")&&(f=a.offsetLeft,c=a.offsetTop)}const o=hr(r);if(o<=0){const i=r.ownerDocument,s=i.body,l=getComputedStyle(s),p=i.compatMode==="CSS1Compat"&&parseFloat(l.marginLeft)+parseFloat(l.marginRight)||0,v=Math.abs(r.clientWidth-s.clientWidth-p);v<=pi&&(u-=v)}else o<=pi&&(u+=o);return{width:u,height:d,x:f,y:c}}const cp=new Set(["absolute","fixed"]);function up(e,t){const n=Ze(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,u=Ne(e)?dt(e):Ie(1),d=e.clientWidth*u.x,f=e.clientHeight*u.y,c=a*u.x,o=r*u.y;return{width:d,height:f,x:c,y:o}}function hi(e,t,n){let r;if(t==="viewport")r=sp(e,n);else if(t==="document")r=ap(De(e));else if(Ce(t))r=up(t,n);else{const a=Ks(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Xn(r)}function Qs(e,t){const n=Ve(e);return n===t||!Ce(n)||pt(n)?!1:Oe(n).position==="fixed"||Qs(n,t)}function lp(e,t){const n=t.get(e);if(n)return n;let r=At(e,[],!1).filter(f=>Ce(f)&>(f)!=="body"),a=null;const u=Oe(e).position==="fixed";let d=u?Ve(e):e;for(;Ce(d)&&!pt(d);){const f=Oe(d),c=Ro(d);!c&&f.position==="fixed"&&(a=null),(u?!c&&!a:!c&&f.position==="static"&&!!a&&cp.has(a.position)||Lt(d)&&!c&&Qs(e,d))?r=r.filter(i=>i!==d):a=f,d=Ve(d)}return t.set(e,r),r}function fp(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const d=[...n==="clippingAncestors"?dr(t)?[]:lp(t,this._c):[].concat(n),r],f=d[0],c=d.reduce((o,i)=>{const s=hi(t,i,a);return o.top=he(s.top,o.top),o.right=ze(s.right,o.right),o.bottom=ze(s.bottom,o.bottom),o.left=he(s.left,o.left),o},hi(t,f,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function dp(e){const{width:t,height:n}=Xs(e);return{width:t,height:n}}function pp(e,t,n){const r=Ne(t),a=De(t),u=n==="fixed",d=Ze(e,!0,u,t);let f={scrollLeft:0,scrollTop:0};const c=Ie(0);function o(){c.x=hr(a)}if(r||!r&&!u)if((gt(t)!=="body"||Lt(a))&&(f=pr(t)),r){const p=Ze(t,!0,u,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else a&&o();u&&!r&&a&&o();const i=a&&!r&&!u?Ys(a,f):Ie(0),s=d.left+f.scrollLeft-c.x-i.x,l=d.top+f.scrollTop-c.y-i.y;return{x:s,y:l,width:d.width,height:d.height}}function Tr(e){return Oe(e).position==="static"}function vi(e,t){if(!Ne(e)||Oe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return De(e)===n&&(n=n.ownerDocument.body),n}function Zs(e,t){const n=ve(e);if(dr(e))return n;if(!Ne(e)){let a=Ve(e);for(;a&&!pt(a);){if(Ce(a)&&!Tr(a))return a;a=Ve(a)}return n}let r=vi(e,t);for(;r&&Kd(r)&&Tr(r);)r=vi(r,t);return r&&pt(r)&&Tr(r)&&!Ro(r)?n:r||ep(e)||n}const hp=async function(e){const t=this.getOffsetParent||Zs,n=this.getDimensions,r=await n(e.floating);return{reference:pp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vp(e){return Oe(e).direction==="rtl"}const mp={convertOffsetParentRelativeRectToViewportRelativeRect:op,getDocumentElement:De,getClippingRect:fp,getOffsetParent:Zs,getElementRects:hp,getClientRects:ip,getDimensions:dp,getScale:dt,isElement:Ce,isRTL:vp};function Js(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gp(e,t){let n=null,r;const a=De(e);function u(){var f;clearTimeout(r),(f=n)==null||f.disconnect(),n=null}function d(f,c){f===void 0&&(f=!1),c===void 0&&(c=1),u();const o=e.getBoundingClientRect(),{left:i,top:s,width:l,height:p}=o;if(f||t(),!l||!p)return;const v=en(s),h=en(a.clientWidth-(i+l)),m=en(a.clientHeight-(s+p)),y=en(i),b={rootMargin:-v+"px "+-h+"px "+-m+"px "+-y+"px",threshold:he(0,ze(1,c))||1};let _=!0;function w(P){const O=P[0].intersectionRatio;if(O!==c){if(!_)return d();O?d(!1,O):r=setTimeout(()=>{d(!1,1e-7)},1e3)}O===1&&!Js(o,e.getBoundingClientRect())&&d(),_=!1}try{n=new IntersectionObserver(w,{...b,root:a.ownerDocument})}catch{n=new IntersectionObserver(w,b)}n.observe(e)}return d(!0),u}function xp(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,o=Co(e),i=a||u?[...o?At(o):[],...At(t)]:[];i.forEach(y=>{a&&y.addEventListener("scroll",n,{passive:!0}),u&&y.addEventListener("resize",n)});const s=o&&f?gp(o,n):null;let l=-1,p=null;d&&(p=new ResizeObserver(y=>{let[E]=y;E&&E.target===o&&p&&(p.unobserve(t),cancelAnimationFrame(l),l=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),o&&!c&&p.observe(o),p.observe(t));let v,h=c?Ze(e):null;c&&m();function m(){const y=Ze(e);h&&!Js(h,y)&&n(),h=y,v=requestAnimationFrame(m)}return n(),()=>{var y;i.forEach(E=>{a&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),s==null||s(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const yp=zd,Ep=Vd,bp=Bd,wp=Hd,_p=Gd,mi=Fd,Rp=qd,Sp=(e,t,n)=>{const r=new Map,a={platform:mp,...n},u={...a.platform,_c:r};return $d(e,t,{...a,platform:u})};var Cp=typeof document<"u",Op=function(){},zn=Cp?S.useLayoutEffect:Op;function Kn(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,a;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(!Kn(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const u=a[r];if(!(u==="_owner"&&e.$$typeof)&&!Kn(e[u],t[u]))return!1}return!0}return e!==e&&t!==t}function ec(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gi(e,t){const n=ec(e);return Math.round(t*n)/n}function Ir(e){const t=g.useRef(e);return zn(()=>{t.current=e}),t}function Pp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:u,floating:d}={},transform:f=!0,whileElementsMounted:c,open:o}=e,[i,s]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[l,p]=g.useState(r);Kn(l,r)||p(r);const[v,h]=g.useState(null),[m,y]=g.useState(null),E=g.useCallback(z=>{z!==P.current&&(P.current=z,h(z))},[]),b=g.useCallback(z=>{z!==O.current&&(O.current=z,y(z))},[]),_=u||v,w=d||m,P=g.useRef(null),O=g.useRef(null),M=g.useRef(i),C=c!=null,I=Ir(c),N=Ir(a),L=Ir(o),$=g.useCallback(()=>{if(!P.current||!O.current)return;const z={placement:t,strategy:n,middleware:l};N.current&&(z.platform=N.current),Sp(P.current,O.current,z).then(k=>{const R={...k,isPositioned:L.current!==!1};D.current&&!Kn(M.current,R)&&(M.current=R,tr.flushSync(()=>{s(R)}))})},[l,t,n,N,L]);zn(()=>{o===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,s(z=>({...z,isPositioned:!1})))},[o]);const D=g.useRef(!1);zn(()=>(D.current=!0,()=>{D.current=!1}),[]),zn(()=>{if(_&&(P.current=_),w&&(O.current=w),_&&w){if(I.current)return I.current(_,w,$);$()}},[_,w,$,I,C]);const H=g.useMemo(()=>({reference:P,floating:O,setReference:E,setFloating:b}),[E,b]),F=g.useMemo(()=>({reference:_,floating:w}),[_,w]),Q=g.useMemo(()=>{const z={position:n,left:0,top:0};if(!F.floating)return z;const k=gi(F.floating,i.x),R=gi(F.floating,i.y);return f?{...z,transform:"translate("+k+"px, "+R+"px)",...ec(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:R}},[n,f,F.floating,i.x,i.y]);return g.useMemo(()=>({...i,update:$,refs:H,elements:F,floatingStyles:Q}),[i,$,H,F,Q])}const Ap=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?mi({element:r.current,padding:a}).fn(n):{}:r?mi({element:r,padding:a}).fn(n):{}}}},jp=(e,t)=>({...yp(e),options:[e,t]}),Mp=(e,t)=>({...Ep(e),options:[e,t]}),Tp=(e,t)=>({...Rp(e),options:[e,t]}),Ip=(e,t)=>({...bp(e),options:[e,t]}),Np=(e,t)=>({...wp(e),options:[e,t]}),Dp=(e,t)=>({..._p(e),options:[e,t]}),kp=(e,t)=>({...Ap(e),options:[e,t]});var Lp="Arrow",tc=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...u}=e;return x.jsxRuntimeExports.jsx(K.svg,{...u,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});tc.displayName=Lp;var $p=tc,Oo="Popper",[nc,$t]=ge(Oo),[Fp,rc]=nc(Oo),oc=e=>{const{__scopePopper:t,children:n}=e,[r,a]=g.useState(null);return x.jsxRuntimeExports.jsx(Fp,{scope:t,anchor:r,onAnchorChange:a,children:n})};oc.displayName=Oo;var ic="PopperAnchor",ac=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,u=rc(ic,n),d=g.useRef(null),f=ne(t,d),c=g.useRef(null);return g.useEffect(()=>{const o=c.current;c.current=(r==null?void 0:r.current)||d.current,o!==c.current&&u.onAnchorChange(c.current)}),r?null:x.jsxRuntimeExports.jsx(K.div,{...a,ref:f})});ac.displayName=ic;var Po="PopperContent",[Bp,Gp]=nc(Po),sc=g.forwardRef((e,t)=>{var j,U,V,B,Z,A;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:u="center",alignOffset:d=0,arrowPadding:f=0,avoidCollisions:c=!0,collisionBoundary:o=[],collisionPadding:i=0,sticky:s="partial",hideWhenDetached:l=!1,updatePositionStrategy:p="optimized",onPlaced:v,...h}=e,m=rc(Po,n),[y,E]=g.useState(null),b=ne(t,ie=>E(ie)),[_,w]=g.useState(null),P=yo(_),O=(P==null?void 0:P.width)??0,M=(P==null?void 0:P.height)??0,C=r+(u!=="center"?"-"+u:""),I=typeof i=="number"?i:{top:0,right:0,bottom:0,left:0,...i},N=Array.isArray(o)?o:[o],L=N.length>0,$={padding:I,boundary:N.filter(zp),altBoundary:L},{refs:D,floatingStyles:H,placement:F,isPositioned:Q,middlewareData:z}=Pp({strategy:"fixed",placement:C,whileElementsMounted:(...ie)=>xp(...ie,{animationFrame:p==="always"}),elements:{reference:m.anchor},middleware:[jp({mainAxis:a+M,alignmentAxis:d}),c&&Mp({mainAxis:!0,crossAxis:!1,limiter:s==="partial"?Tp():void 0,...$}),c&&Ip({...$}),Np({...$,apply:({elements:ie,rects:ue,availableWidth:Fe,availableHeight:yt})=>{const{width:Et,height:il}=ue.reference,Xt=ie.floating.style;Xt.setProperty("--radix-popper-available-width",`${Fe}px`),Xt.setProperty("--radix-popper-available-height",`${yt}px`),Xt.setProperty("--radix-popper-anchor-width",`${Et}px`),Xt.setProperty("--radix-popper-anchor-height",`${il}px`)}}),_&&kp({element:_,padding:f}),Vp({arrowWidth:O,arrowHeight:M}),l&&Dp({strategy:"referenceHidden",...$})]}),[k,R]=lc(F),T=Se(v);ce(()=>{Q&&(T==null||T())},[Q,T]);const W=(j=z.arrow)==null?void 0:j.x,Y=(U=z.arrow)==null?void 0:U.y,q=((V=z.arrow)==null?void 0:V.centerOffset)!==0,[J,X]=g.useState();return ce(()=>{y&&X(window.getComputedStyle(y).zIndex)},[y]),x.jsxRuntimeExports.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:Q?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[(B=z.transformOrigin)==null?void 0:B.x,(Z=z.transformOrigin)==null?void 0:Z.y].join(" "),...((A=z.hide)==null?void 0:A.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsxRuntimeExports.jsx(Bp,{scope:n,placedSide:k,onArrowChange:w,arrowX:W,arrowY:Y,shouldHideArrow:q,children:x.jsxRuntimeExports.jsx(K.div,{"data-side":k,"data-align":R,...h,ref:b,style:{...h.style,animation:Q?void 0:"none"}})})})});sc.displayName=Po;var cc="PopperArrow",Up={top:"bottom",right:"left",bottom:"top",left:"right"},uc=g.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,u=Gp(cc,r),d=Up[u.placedSide];return x.jsxRuntimeExports.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:x.jsxRuntimeExports.jsx($p,{...a,ref:n,style:{...a.style,display:"block"}})})});uc.displayName=cc;function zp(e){return e!==null}var Vp=e=>({name:"transformOrigin",options:e,fn(t){var m,y,E;const{placement:n,rects:r,middlewareData:a}=t,d=((m=a.arrow)==null?void 0:m.centerOffset)!==0,f=d?0:e.arrowWidth,c=d?0:e.arrowHeight,[o,i]=lc(n),s={start:"0%",center:"50%",end:"100%"}[i],l=(((y=a.arrow)==null?void 0:y.x)??0)+f/2,p=(((E=a.arrow)==null?void 0:E.y)??0)+c/2;let v="",h="";return o==="bottom"?(v=d?s:`${l}px`,h=`${-c}px`):o==="top"?(v=d?s:`${l}px`,h=`${r.floating.height+c}px`):o==="right"?(v=`${-c}px`,h=d?s:`${p}px`):o==="left"&&(v=`${r.floating.width+c}px`,h=d?s:`${p}px`),{data:{x:v,y:h}}}});function lc(e){const[t,n="center"]=e.split("-");return[t,n]}var Ao=oc,jo=ac,Mo=sc,To=uc,Nr="rovingFocusGroup.onEntryFocus",qp={bubbles:!1,cancelable:!0},Ft="RovingFocusGroup",[Kr,fc,Hp]=It(Ft),[Wp,Bt]=ge(Ft,[Hp]),[Xp,Kp]=Wp(Ft),dc=g.forwardRef((e,t)=>x.jsxRuntimeExports.jsx(Kr.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsxRuntimeExports.jsx(Kr.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsxRuntimeExports.jsx(Yp,{...e,ref:t})})}));dc.displayName=Ft;var Yp=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:u,currentTabStopId:d,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:c,onEntryFocus:o,preventScrollOnEntryFocus:i=!1,...s}=e,l=g.useRef(null),p=ne(t,l),v=ht(u),[h,m]=me({prop:d,defaultProp:f??null,onChange:c,caller:Ft}),[y,E]=g.useState(!1),b=Se(o),_=fc(n),w=g.useRef(!1),[P,O]=g.useState(0);return g.useEffect(()=>{const M=l.current;if(M)return M.addEventListener(Nr,b),()=>M.removeEventListener(Nr,b)},[b]),x.jsxRuntimeExports.jsx(Xp,{scope:n,orientation:r,dir:v,loop:a,currentTabStopId:h,onItemFocus:g.useCallback(M=>m(M),[m]),onItemShiftTab:g.useCallback(()=>E(!0),[]),onFocusableItemAdd:g.useCallback(()=>O(M=>M+1),[]),onFocusableItemRemove:g.useCallback(()=>O(M=>M-1),[]),children:x.jsxRuntimeExports.jsx(K.div,{tabIndex:y||P===0?-1:0,"data-orientation":r,...s,ref:p,style:{outline:"none",...e.style},onMouseDown:G(e.onMouseDown,()=>{w.current=!0}),onFocus:G(e.onFocus,M=>{const C=!w.current;if(M.target===M.currentTarget&&C&&!y){const I=new CustomEvent(Nr,qp);if(M.currentTarget.dispatchEvent(I),!I.defaultPrevented){const N=_().filter(F=>F.focusable),L=N.find(F=>F.active),$=N.find(F=>F.id===h),H=[L,$,...N].filter(Boolean).map(F=>F.ref.current);vc(H,i)}}w.current=!1}),onBlur:G(e.onBlur,()=>E(!1))})})}),pc="RovingFocusGroupItem",hc=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:u,children:d,...f}=e,c=be(),o=u||c,i=Kp(pc,n),s=i.currentTabStopId===o,l=fc(n),{onFocusableItemAdd:p,onFocusableItemRemove:v,currentTabStopId:h}=i;return g.useEffect(()=>{if(r)return p(),()=>v()},[r,p,v]),x.jsxRuntimeExports.jsx(Kr.ItemSlot,{scope:n,id:o,focusable:r,active:a,children:x.jsxRuntimeExports.jsx(K.span,{tabIndex:s?0:-1,"data-orientation":i.orientation,...f,ref:t,onMouseDown:G(e.onMouseDown,m=>{r?i.onItemFocus(o):m.preventDefault()}),onFocus:G(e.onFocus,()=>i.onItemFocus(o)),onKeyDown:G(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){i.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const y=Jp(m,i.orientation,i.dir);if(y!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let b=l().filter(_=>_.focusable).map(_=>_.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const _=b.indexOf(m.currentTarget);b=i.loop?eh(b,_+1):b.slice(_+1)}setTimeout(()=>vc(b))}}),children:typeof d=="function"?d({isCurrentTabStop:s,hasTabStop:h!=null}):d})})});hc.displayName=pc;var Qp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Zp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Jp(e,t,n){const r=Zp(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Qp[r]}function vc(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function eh(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Io=dc,No=hc,Yr=["Enter"," "],th=["ArrowDown","PageUp","Home"],mc=["ArrowUp","PageDown","End"],nh=[...th,...mc],rh={ltr:[...Yr,"ArrowRight"],rtl:[...Yr,"ArrowLeft"]},oh={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Gt="Menu",[jt,ih,ah]=It(Gt),[nt,gc]=ge(Gt,[ah,$t,Bt]),vr=$t(),xc=Bt(),[sh,rt]=nt(Gt),[ch,Ut]=nt(Gt),yc=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:u,modal:d=!0}=e,f=vr(t),[c,o]=g.useState(null),i=g.useRef(!1),s=Se(u),l=ht(a);return g.useEffect(()=>{const p=()=>{i.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>i.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),x.jsxRuntimeExports.jsx(Ao,{...f,children:x.jsxRuntimeExports.jsx(sh,{scope:t,open:n,onOpenChange:s,content:c,onContentChange:o,children:x.jsxRuntimeExports.jsx(ch,{scope:t,onClose:g.useCallback(()=>s(!1),[s]),isUsingKeyboardRef:i,dir:l,modal:d,children:r})})})};yc.displayName=Gt;var uh="MenuAnchor",Do=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=vr(n);return x.jsxRuntimeExports.jsx(jo,{...a,...r,ref:t})});Do.displayName=uh;var ko="MenuPortal",[lh,Ec]=nt(ko,{forceMount:void 0}),bc=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,u=rt(ko,t);return x.jsxRuntimeExports.jsx(lh,{scope:t,forceMount:n,children:x.jsxRuntimeExports.jsx(Pe,{present:n||u.open,children:x.jsxRuntimeExports.jsx(vt,{asChild:!0,container:a,children:r})})})};bc.displayName=ko;var we="MenuContent",[fh,Lo]=nt(we),wc=g.forwardRef((e,t)=>{const n=Ec(we,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,u=rt(we,e.__scopeMenu),d=Ut(we,e.__scopeMenu);return x.jsxRuntimeExports.jsx(jt.Provider,{scope:e.__scopeMenu,children:x.jsxRuntimeExports.jsx(Pe,{present:r||u.open,children:x.jsxRuntimeExports.jsx(jt.Slot,{scope:e.__scopeMenu,children:d.modal?x.jsxRuntimeExports.jsx(dh,{...a,ref:t}):x.jsxRuntimeExports.jsx(ph,{...a,ref:t})})})})}),dh=g.forwardRef((e,t)=>{const n=rt(we,e.__scopeMenu),r=g.useRef(null),a=ne(t,r);return g.useEffect(()=>{const u=r.current;if(u)return cr(u)},[]),x.jsxRuntimeExports.jsx($o,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:G(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ph=g.forwardRef((e,t)=>{const n=rt(we,e.__scopeMenu);return x.jsxRuntimeExports.jsx($o,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),hh=Ue("MenuContent.ScrollLock"),$o=g.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEntryFocus:c,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:p,disableOutsideScroll:v,...h}=e,m=rt(we,n),y=Ut(we,n),E=vr(n),b=xc(n),_=ih(n),[w,P]=g.useState(null),O=g.useRef(null),M=ne(t,O,m.onContentChange),C=g.useRef(0),I=g.useRef(""),N=g.useRef(0),L=g.useRef(null),$=g.useRef("right"),D=g.useRef(0),H=v?kt:g.Fragment,F=v?{as:hh,allowPinchZoom:!0}:void 0,Q=k=>{var j,U;const R=I.current+k,T=_().filter(V=>!V.disabled),W=document.activeElement,Y=(j=T.find(V=>V.ref.current===W))==null?void 0:j.textValue,q=T.map(V=>V.textValue),J=Ch(q,R,Y),X=(U=T.find(V=>V.textValue===J))==null?void 0:U.ref.current;(function V(B){I.current=B,window.clearTimeout(C.current),B!==""&&(C.current=window.setTimeout(()=>V(""),1e3))})(R),X&&setTimeout(()=>X.focus())};g.useEffect(()=>()=>window.clearTimeout(C.current),[]),ar();const z=g.useCallback(k=>{var T,W;return $.current===((T=L.current)==null?void 0:T.side)&&Ph(k,(W=L.current)==null?void 0:W.area)},[]);return x.jsxRuntimeExports.jsx(fh,{scope:n,searchRef:I,onItemEnter:g.useCallback(k=>{z(k)&&k.preventDefault()},[z]),onItemLeave:g.useCallback(k=>{var R;z(k)||((R=O.current)==null||R.focus(),P(null))},[z]),onTriggerLeave:g.useCallback(k=>{z(k)&&k.preventDefault()},[z]),pointerGraceTimerRef:N,onPointerGraceIntentChange:g.useCallback(k=>{L.current=k},[]),children:x.jsxRuntimeExports.jsx(H,{...F,children:x.jsxRuntimeExports.jsx(Dt,{asChild:!0,trapped:a,onMountAutoFocus:G(u,k=>{var R;k.preventDefault(),(R=O.current)==null||R.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:x.jsxRuntimeExports.jsx(Nt,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:p,children:x.jsxRuntimeExports.jsx(Io,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:w,onCurrentTabStopIdChange:P,onEntryFocus:G(c,k=>{y.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:x.jsxRuntimeExports.jsx(Mo,{role:"menu","aria-orientation":"vertical","data-state":$c(m.open),"data-radix-menu-content":"",dir:y.dir,...E,...h,ref:M,style:{outline:"none",...h.style},onKeyDown:G(h.onKeyDown,k=>{const T=k.target.closest("[data-radix-menu-content]")===k.currentTarget,W=k.ctrlKey||k.altKey||k.metaKey,Y=k.key.length===1;T&&(k.key==="Tab"&&k.preventDefault(),!W&&Y&&Q(k.key));const q=O.current;if(k.target!==q||!nh.includes(k.key))return;k.preventDefault();const X=_().filter(j=>!j.disabled).map(j=>j.ref.current);mc.includes(k.key)&&X.reverse(),Rh(X)}),onBlur:G(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(C.current),I.current="")}),onPointerMove:G(e.onPointerMove,Mt(k=>{const R=k.target,T=D.current!==k.clientX;if(k.currentTarget.contains(R)&&T){const W=k.clientX>D.current?"right":"left";$.current=W,D.current=k.clientX}}))})})})})})})});wc.displayName=we;var vh="MenuGroup",Fo=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsxRuntimeExports.jsx(K.div,{role:"group",...r,ref:t})});Fo.displayName=vh;var mh="MenuLabel",_c=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsxRuntimeExports.jsx(K.div,{...r,ref:t})});_c.displayName=mh;var Yn="MenuItem",xi="menu.itemSelect",mr=g.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,u=g.useRef(null),d=Ut(Yn,e.__scopeMenu),f=Lo(Yn,e.__scopeMenu),c=ne(t,u),o=g.useRef(!1),i=()=>{const s=u.current;if(!n&&s){const l=new CustomEvent(xi,{bubbles:!0,cancelable:!0});s.addEventListener(xi,p=>r==null?void 0:r(p),{once:!0}),Ga(s,l),l.defaultPrevented?o.current=!1:d.onClose()}};return x.jsxRuntimeExports.jsx(Rc,{...a,ref:c,disabled:n,onClick:G(e.onClick,i),onPointerDown:s=>{var l;(l=e.onPointerDown)==null||l.call(e,s),o.current=!0},onPointerUp:G(e.onPointerUp,s=>{var l;o.current||(l=s.currentTarget)==null||l.click()}),onKeyDown:G(e.onKeyDown,s=>{const l=f.searchRef.current!=="";n||l&&s.key===" "||Yr.includes(s.key)&&(s.currentTarget.click(),s.preventDefault())})})});mr.displayName=Yn;var Rc=g.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...u}=e,d=Lo(Yn,n),f=xc(n),c=g.useRef(null),o=ne(t,c),[i,s]=g.useState(!1),[l,p]=g.useState("");return g.useEffect(()=>{const v=c.current;v&&p((v.textContent??"").trim())},[u.children]),x.jsxRuntimeExports.jsx(jt.ItemSlot,{scope:n,disabled:r,textValue:a??l,children:x.jsxRuntimeExports.jsx(No,{asChild:!0,...f,focusable:!r,children:x.jsxRuntimeExports.jsx(K.div,{role:"menuitem","data-highlighted":i?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...u,ref:o,onPointerMove:G(e.onPointerMove,Mt(v=>{r?d.onItemLeave(v):(d.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:G(e.onPointerLeave,Mt(v=>d.onItemLeave(v))),onFocus:G(e.onFocus,()=>s(!0)),onBlur:G(e.onBlur,()=>s(!1))})})})}),gh="MenuCheckboxItem",Sc=g.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return x.jsxRuntimeExports.jsx(jc,{scope:e.__scopeMenu,checked:n,children:x.jsxRuntimeExports.jsx(mr,{role:"menuitemcheckbox","aria-checked":Qn(n)?"mixed":n,...a,ref:t,"data-state":Go(n),onSelect:G(a.onSelect,()=>r==null?void 0:r(Qn(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Sc.displayName=gh;var Cc="MenuRadioGroup",[xh,yh]=nt(Cc,{value:void 0,onValueChange:()=>{}}),Oc=g.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,u=Se(r);return x.jsxRuntimeExports.jsx(xh,{scope:e.__scopeMenu,value:n,onValueChange:u,children:x.jsxRuntimeExports.jsx(Fo,{...a,ref:t})})});Oc.displayName=Cc;var Pc="MenuRadioItem",Ac=g.forwardRef((e,t)=>{const{value:n,...r}=e,a=yh(Pc,e.__scopeMenu),u=n===a.value;return x.jsxRuntimeExports.jsx(jc,{scope:e.__scopeMenu,checked:u,children:x.jsxRuntimeExports.jsx(mr,{role:"menuitemradio","aria-checked":u,...r,ref:t,"data-state":Go(u),onSelect:G(r.onSelect,()=>{var d;return(d=a.onValueChange)==null?void 0:d.call(a,n)},{checkForDefaultPrevented:!1})})})});Ac.displayName=Pc;var Bo="MenuItemIndicator",[jc,Eh]=nt(Bo,{checked:!1}),Mc=g.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,u=Eh(Bo,n);return x.jsxRuntimeExports.jsx(Pe,{present:r||Qn(u.checked)||u.checked===!0,children:x.jsxRuntimeExports.jsx(K.span,{...a,ref:t,"data-state":Go(u.checked)})})});Mc.displayName=Bo;var bh="MenuSeparator",Tc=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsxRuntimeExports.jsx(K.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Tc.displayName=bh;var wh="MenuArrow",Ic=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=vr(n);return x.jsxRuntimeExports.jsx(To,{...a,...r,ref:t})});Ic.displayName=wh;var _h="MenuSub",[Sg,Nc]=nt(_h),Ot="MenuSubTrigger",Dc=g.forwardRef((e,t)=>{const n=rt(Ot,e.__scopeMenu),r=Ut(Ot,e.__scopeMenu),a=Nc(Ot,e.__scopeMenu),u=Lo(Ot,e.__scopeMenu),d=g.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:c}=u,o={__scopeMenu:e.__scopeMenu},i=g.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return g.useEffect(()=>i,[i]),g.useEffect(()=>{const s=f.current;return()=>{window.clearTimeout(s),c(null)}},[f,c]),x.jsxRuntimeExports.jsx(Do,{asChild:!0,...o,children:x.jsxRuntimeExports.jsx(Rc,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":$c(n.open),...e,ref:nr(t,a.onTriggerChange),onClick:s=>{var l;(l=e.onClick)==null||l.call(e,s),!(e.disabled||s.defaultPrevented)&&(s.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:G(e.onPointerMove,Mt(s=>{u.onItemEnter(s),!s.defaultPrevented&&!e.disabled&&!n.open&&!d.current&&(u.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{n.onOpenChange(!0),i()},100))})),onPointerLeave:G(e.onPointerLeave,Mt(s=>{var p,v;i();const l=(p=n.content)==null?void 0:p.getBoundingClientRect();if(l){const h=(v=n.content)==null?void 0:v.dataset.side,m=h==="right",y=m?-5:5,E=l[m?"left":"right"],b=l[m?"right":"left"];u.onPointerGraceIntentChange({area:[{x:s.clientX+y,y:s.clientY},{x:E,y:l.top},{x:b,y:l.top},{x:b,y:l.bottom},{x:E,y:l.bottom}],side:h}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(s),s.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:G(e.onKeyDown,s=>{var p;const l=u.searchRef.current!=="";e.disabled||l&&s.key===" "||rh[r.dir].includes(s.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),s.preventDefault())})})})});Dc.displayName=Ot;var kc="MenuSubContent",Lc=g.forwardRef((e,t)=>{const n=Ec(we,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,u=rt(we,e.__scopeMenu),d=Ut(we,e.__scopeMenu),f=Nc(kc,e.__scopeMenu),c=g.useRef(null),o=ne(t,c);return x.jsxRuntimeExports.jsx(jt.Provider,{scope:e.__scopeMenu,children:x.jsxRuntimeExports.jsx(Pe,{present:r||u.open,children:x.jsxRuntimeExports.jsx(jt.Slot,{scope:e.__scopeMenu,children:x.jsxRuntimeExports.jsx($o,{id:f.contentId,"aria-labelledby":f.triggerId,...a,ref:o,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:i=>{var s;d.isUsingKeyboardRef.current&&((s=c.current)==null||s.focus()),i.preventDefault()},onCloseAutoFocus:i=>i.preventDefault(),onFocusOutside:G(e.onFocusOutside,i=>{i.target!==f.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:G(e.onEscapeKeyDown,i=>{d.onClose(),i.preventDefault()}),onKeyDown:G(e.onKeyDown,i=>{var p;const s=i.currentTarget.contains(i.target),l=oh[d.dir].includes(i.key);s&&l&&(u.onOpenChange(!1),(p=f.trigger)==null||p.focus(),i.preventDefault())})})})})})});Lc.displayName=kc;function $c(e){return e?"open":"closed"}function Qn(e){return e==="indeterminate"}function Go(e){return Qn(e)?"indeterminate":e?"checked":"unchecked"}function Rh(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Sh(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Ch(e,t,n){const a=t.length>1&&Array.from(t).every(o=>o===t[0])?t[0]:t,u=n?e.indexOf(n):-1;let d=Sh(e,Math.max(u,0));a.length===1&&(d=d.filter(o=>o!==n));const c=d.find(o=>o.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function Oh(e,t){const{x:n,y:r}=e;let a=!1;for(let u=0,d=t.length-1;u<t.length;d=u++){const f=t[u],c=t[d],o=f.x,i=f.y,s=c.x,l=c.y;i>r!=l>r&&n<(s-o)*(r-i)/(l-i)+o&&(a=!a)}return a}function Ph(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Oh(n,t)}function Mt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Ah=yc,jh=Do,Mh=bc,Th=wc,Ih=Fo,Nh=_c,Dh=mr,kh=Sc,Lh=Oc,$h=Ac,Fh=Mc,Bh=Tc,Gh=Ic,Uh=Dc,zh=Lc,gr="DropdownMenu",[Vh]=ge(gr,[gc]),fe=gc(),[qh,Fc]=Vh(gr),Bc=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:u,onOpenChange:d,modal:f=!0}=e,c=fe(t),o=g.useRef(null),[i,s]=me({prop:a,defaultProp:u??!1,onChange:d,caller:gr});return x.jsxRuntimeExports.jsx(qh,{scope:t,triggerId:be(),triggerRef:o,contentId:be(),open:i,onOpenChange:s,onOpenToggle:g.useCallback(()=>s(l=>!l),[s]),modal:f,children:x.jsxRuntimeExports.jsx(Ah,{...c,open:i,onOpenChange:s,dir:r,modal:f,children:n})})};Bc.displayName=gr;var Gc="DropdownMenuTrigger",Uc=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,u=Fc(Gc,n),d=fe(n);return x.jsxRuntimeExports.jsx(jh,{asChild:!0,...d,children:x.jsxRuntimeExports.jsx(K.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:nr(t,u.triggerRef),onPointerDown:G(e.onPointerDown,f=>{!r&&f.button===0&&f.ctrlKey===!1&&(u.onOpenToggle(),u.open||f.preventDefault())}),onKeyDown:G(e.onKeyDown,f=>{r||(["Enter"," "].includes(f.key)&&u.onOpenToggle(),f.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});Uc.displayName=Gc;var Hh="DropdownMenuPortal",zc=e=>{const{__scopeDropdownMenu:t,...n}=e,r=fe(t);return x.jsxRuntimeExports.jsx(Mh,{...r,...n})};zc.displayName=Hh;var Vc="DropdownMenuContent",qc=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Fc(Vc,n),u=fe(n),d=g.useRef(!1);return x.jsxRuntimeExports.jsx(Th,{id:a.contentId,"aria-labelledby":a.triggerId,...u,...r,ref:t,onCloseAutoFocus:G(e.onCloseAutoFocus,f=>{var c;d.current||(c=a.triggerRef.current)==null||c.focus(),d.current=!1,f.preventDefault()}),onInteractOutside:G(e.onInteractOutside,f=>{const c=f.detail.originalEvent,o=c.button===0&&c.ctrlKey===!0,i=c.button===2||o;(!a.modal||i)&&(d.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)"}})});qc.displayName=Vc;var Wh="DropdownMenuGroup",Xh=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fe(n);return x.jsxRuntimeExports.jsx(Ih,{...a,...r,ref:t})});Xh.displayName=Wh;var Kh="DropdownMenuLabel",Hc=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fe(n);return x.jsxRuntimeExports.jsx(Nh,{...a,...r,ref:t})});Hc.displayName=Kh;var Yh="DropdownMenuItem",Wc=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fe(n);return x.jsxRuntimeExports.jsx(Dh,{...a,...r,ref:t})});Wc.displayName=Yh;var Qh="DropdownMenuCheckboxItem",Zh=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fe(n);return x.jsxRuntimeExports.jsx(kh,{...a,...r,ref:t})});Zh.displayName=Qh;var Jh="DropdownMenuRadioGroup",ev=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fe(n);return x.jsxRuntimeExports.jsx(Lh,{...a,...r,ref:t})});ev.displayName=Jh;var tv="DropdownMenuRadioItem",nv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fe(n);return x.jsxRuntimeExports.jsx($h,{...a,...r,ref:t})});nv.displayName=tv;var rv="DropdownMenuItemIndicator",ov=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fe(n);return x.jsxRuntimeExports.jsx(Fh,{...a,...r,ref:t})});ov.displayName=rv;var iv="DropdownMenuSeparator",Xc=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fe(n);return x.jsxRuntimeExports.jsx(Bh,{...a,...r,ref:t})});Xc.displayName=iv;var av="DropdownMenuArrow",sv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fe(n);return x.jsxRuntimeExports.jsx(Gh,{...a,...r,ref:t})});sv.displayName=av;var cv="DropdownMenuSubTrigger",uv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fe(n);return x.jsxRuntimeExports.jsx(Uh,{...a,...r,ref:t})});uv.displayName=cv;var lv="DropdownMenuSubContent",fv=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=fe(n);return x.jsxRuntimeExports.jsx(zh,{...a,...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)"}})});fv.displayName=lv;var dv=Bc,pv=Uc,hv=zc,vv=qc,mv=Hc,gv=Wc,xv=Xc;function Qr(e,[t,n]){return Math.min(n,Math.max(t,e))}var yv=[" ","Enter","ArrowUp","ArrowDown"],Ev=[" ","Enter"],Je="Select",[xr,yr,bv]=It(Je),[xt]=ge(Je,[bv,$t]),Er=$t(),[wv,qe]=xt(Je),[_v,Rv]=xt(Je),Kc=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:u,value:d,defaultValue:f,onValueChange:c,dir:o,name:i,autoComplete:s,disabled:l,required:p,form:v}=e,h=Er(t),[m,y]=g.useState(null),[E,b]=g.useState(null),[_,w]=g.useState(!1),P=ht(o),[O,M]=me({prop:r,defaultProp:a??!1,onChange:u,caller:Je}),[C,I]=me({prop:d,defaultProp:f,onChange:c,caller:Je}),N=g.useRef(null),L=m?v||!!m.closest("form"):!0,[$,D]=g.useState(new Set),H=Array.from($).map(F=>F.props.value).join(";");return x.jsxRuntimeExports.jsx(Ao,{...h,children:x.jsxRuntimeExports.jsxs(wv,{required:p,scope:t,trigger:m,onTriggerChange:y,valueNode:E,onValueNodeChange:b,valueNodeHasChildren:_,onValueNodeHasChildrenChange:w,contentId:be(),value:C,onValueChange:I,open:O,onOpenChange:M,dir:P,triggerPointerDownPosRef:N,disabled:l,children:[x.jsxRuntimeExports.jsx(xr.Provider,{scope:t,children:x.jsxRuntimeExports.jsx(_v,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(F=>{D(Q=>new Set(Q).add(F))},[]),onNativeOptionRemove:g.useCallback(F=>{D(Q=>{const z=new Set(Q);return z.delete(F),z})},[]),children:n})}),L?x.jsxRuntimeExports.jsxs(hu,{"aria-hidden":!0,required:p,tabIndex:-1,name:i,autoComplete:s,value:C,onChange:F=>I(F.target.value),disabled:l,form:v,children:[C===void 0?x.jsxRuntimeExports.jsx("option",{value:""}):null,Array.from($)]},H):null]})})};Kc.displayName=Je;var Yc="SelectTrigger",Qc=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,u=Er(n),d=qe(Yc,n),f=d.disabled||r,c=ne(t,d.onTriggerChange),o=yr(n),i=g.useRef("touch"),[s,l,p]=mu(h=>{const m=o().filter(b=>!b.disabled),y=m.find(b=>b.value===d.value),E=gu(m,h,y);E!==void 0&&d.onValueChange(E.value)}),v=h=>{f||(d.onOpenChange(!0),p()),h&&(d.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return x.jsxRuntimeExports.jsx(jo,{asChild:!0,...u,children:x.jsxRuntimeExports.jsx(K.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":vu(d.value)?"":void 0,...a,ref:c,onClick:G(a.onClick,h=>{h.currentTarget.focus(),i.current!=="mouse"&&v(h)}),onPointerDown:G(a.onPointerDown,h=>{i.current=h.pointerType;const m=h.target;m.hasPointerCapture(h.pointerId)&&m.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(v(h),h.preventDefault())}),onKeyDown:G(a.onKeyDown,h=>{const m=s.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&l(h.key),!(m&&h.key===" ")&&yv.includes(h.key)&&(v(),h.preventDefault())})})})});Qc.displayName=Yc;var Zc="SelectValue",Jc=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:u,placeholder:d="",...f}=e,c=qe(Zc,n),{onValueNodeHasChildrenChange:o}=c,i=u!==void 0,s=ne(t,c.onValueNodeChange);return ce(()=>{o(i)},[o,i]),x.jsxRuntimeExports.jsx(K.span,{...f,ref:s,style:{pointerEvents:"none"},children:vu(c.value)?x.jsxRuntimeExports.jsx(x.jsxRuntimeExports.Fragment,{children:d}):u})});Jc.displayName=Zc;var Sv="SelectIcon",eu=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return x.jsxRuntimeExports.jsx(K.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});eu.displayName=Sv;var Cv="SelectPortal",tu=e=>x.jsxRuntimeExports.jsx(vt,{asChild:!0,...e});tu.displayName=Cv;var et="SelectContent",nu=g.forwardRef((e,t)=>{const n=qe(et,e.__scopeSelect),[r,a]=g.useState();if(ce(()=>{a(new DocumentFragment)},[]),!n.open){const u=r;return u?tr.createPortal(x.jsxRuntimeExports.jsx(ru,{scope:e.__scopeSelect,children:x.jsxRuntimeExports.jsx(xr.Slot,{scope:e.__scopeSelect,children:x.jsxRuntimeExports.jsx("div",{children:e.children})})}),u):null}return x.jsxRuntimeExports.jsx(ou,{...e,ref:t})});nu.displayName=et;var Re=10,[ru,He]=xt(et),Ov="SelectContentImpl",Pv=Ue("SelectContent.RemoveScroll"),ou=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:u,onPointerDownOutside:d,side:f,sideOffset:c,align:o,alignOffset:i,arrowPadding:s,collisionBoundary:l,collisionPadding:p,sticky:v,hideWhenDetached:h,avoidCollisions:m,...y}=e,E=qe(et,n),[b,_]=g.useState(null),[w,P]=g.useState(null),O=ne(t,j=>_(j)),[M,C]=g.useState(null),[I,N]=g.useState(null),L=yr(n),[$,D]=g.useState(!1),H=g.useRef(!1);g.useEffect(()=>{if(b)return cr(b)},[b]),ar();const F=g.useCallback(j=>{const[U,...V]=L().map(A=>A.ref.current),[B]=V.slice(-1),Z=document.activeElement;for(const A of j)if(A===Z||(A==null||A.scrollIntoView({block:"nearest"}),A===U&&w&&(w.scrollTop=0),A===B&&w&&(w.scrollTop=w.scrollHeight),A==null||A.focus(),document.activeElement!==Z))return},[L,w]),Q=g.useCallback(()=>F([M,b]),[F,M,b]);g.useEffect(()=>{$&&Q()},[$,Q]);const{onOpenChange:z,triggerPointerDownPosRef:k}=E;g.useEffect(()=>{if(b){let j={x:0,y:0};const U=B=>{var Z,A;j={x:Math.abs(Math.round(B.pageX)-(((Z=k.current)==null?void 0:Z.x)??0)),y:Math.abs(Math.round(B.pageY)-(((A=k.current)==null?void 0:A.y)??0))}},V=B=>{j.x<=10&&j.y<=10?B.preventDefault():b.contains(B.target)||z(!1),document.removeEventListener("pointermove",U),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",V,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",V,{capture:!0})}}},[b,z,k]),g.useEffect(()=>{const j=()=>z(!1);return window.addEventListener("blur",j),window.addEventListener("resize",j),()=>{window.removeEventListener("blur",j),window.removeEventListener("resize",j)}},[z]);const[R,T]=mu(j=>{const U=L().filter(Z=>!Z.disabled),V=U.find(Z=>Z.ref.current===document.activeElement),B=gu(U,j,V);B&&setTimeout(()=>B.ref.current.focus())}),W=g.useCallback((j,U,V)=>{const B=!H.current&&!V;(E.value!==void 0&&E.value===U||B)&&(C(j),B&&(H.current=!0))},[E.value]),Y=g.useCallback(()=>b==null?void 0:b.focus(),[b]),q=g.useCallback((j,U,V)=>{const B=!H.current&&!V;(E.value!==void 0&&E.value===U||B)&&N(j)},[E.value]),J=r==="popper"?Zr:iu,X=J===Zr?{side:f,sideOffset:c,align:o,alignOffset:i,arrowPadding:s,collisionBoundary:l,collisionPadding:p,sticky:v,hideWhenDetached:h,avoidCollisions:m}:{};return x.jsxRuntimeExports.jsx(ru,{scope:n,content:b,viewport:w,onViewportChange:P,itemRefCallback:W,selectedItem:M,onItemLeave:Y,itemTextRefCallback:q,focusSelectedItem:Q,selectedItemText:I,position:r,isPositioned:$,searchRef:R,children:x.jsxRuntimeExports.jsx(kt,{as:Pv,allowPinchZoom:!0,children:x.jsxRuntimeExports.jsx(Dt,{asChild:!0,trapped:E.open,onMountAutoFocus:j=>{j.preventDefault()},onUnmountAutoFocus:G(a,j=>{var U;(U=E.trigger)==null||U.focus({preventScroll:!0}),j.preventDefault()}),children:x.jsxRuntimeExports.jsx(Nt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:j=>j.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:x.jsxRuntimeExports.jsx(J,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:j=>j.preventDefault(),...y,...X,onPlaced:()=>D(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:G(y.onKeyDown,j=>{const U=j.ctrlKey||j.altKey||j.metaKey;if(j.key==="Tab"&&j.preventDefault(),!U&&j.key.length===1&&T(j.key),["ArrowUp","ArrowDown","Home","End"].includes(j.key)){let B=L().filter(Z=>!Z.disabled).map(Z=>Z.ref.current);if(["ArrowUp","End"].includes(j.key)&&(B=B.slice().reverse()),["ArrowUp","ArrowDown"].includes(j.key)){const Z=j.target,A=B.indexOf(Z);B=B.slice(A+1)}setTimeout(()=>F(B)),j.preventDefault()}})})})})})})});ou.displayName=Ov;var Av="SelectItemAlignedPosition",iu=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,u=qe(et,n),d=He(et,n),[f,c]=g.useState(null),[o,i]=g.useState(null),s=ne(t,O=>i(O)),l=yr(n),p=g.useRef(!1),v=g.useRef(!0),{viewport:h,selectedItem:m,selectedItemText:y,focusSelectedItem:E}=d,b=g.useCallback(()=>{if(u.trigger&&u.valueNode&&f&&o&&h&&m&&y){const O=u.trigger.getBoundingClientRect(),M=o.getBoundingClientRect(),C=u.valueNode.getBoundingClientRect(),I=y.getBoundingClientRect();if(u.dir!=="rtl"){const Z=I.left-M.left,A=C.left-Z,ie=O.left-A,ue=O.width+ie,Fe=Math.max(ue,M.width),yt=window.innerWidth-Re,Et=Qr(A,[Re,Math.max(Re,yt-Fe)]);f.style.minWidth=ue+"px",f.style.left=Et+"px"}else{const Z=M.right-I.right,A=window.innerWidth-C.right-Z,ie=window.innerWidth-O.right-A,ue=O.width+ie,Fe=Math.max(ue,M.width),yt=window.innerWidth-Re,Et=Qr(A,[Re,Math.max(Re,yt-Fe)]);f.style.minWidth=ue+"px",f.style.right=Et+"px"}const N=l(),L=window.innerHeight-Re*2,$=h.scrollHeight,D=window.getComputedStyle(o),H=parseInt(D.borderTopWidth,10),F=parseInt(D.paddingTop,10),Q=parseInt(D.borderBottomWidth,10),z=parseInt(D.paddingBottom,10),k=H+F+$+z+Q,R=Math.min(m.offsetHeight*5,k),T=window.getComputedStyle(h),W=parseInt(T.paddingTop,10),Y=parseInt(T.paddingBottom,10),q=O.top+O.height/2-Re,J=L-q,X=m.offsetHeight/2,j=m.offsetTop+X,U=H+F+j,V=k-U;if(U<=q){const Z=N.length>0&&m===N[N.length-1].ref.current;f.style.bottom="0px";const A=o.clientHeight-h.offsetTop-h.offsetHeight,ie=Math.max(J,X+(Z?Y:0)+A+Q),ue=U+ie;f.style.height=ue+"px"}else{const Z=N.length>0&&m===N[0].ref.current;f.style.top="0px";const ie=Math.max(q,H+h.offsetTop+(Z?W:0)+X)+V;f.style.height=ie+"px",h.scrollTop=U-q+h.offsetTop}f.style.margin=`${Re}px 0`,f.style.minHeight=R+"px",f.style.maxHeight=L+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[l,u.trigger,u.valueNode,f,o,h,m,y,u.dir,r]);ce(()=>b(),[b]);const[_,w]=g.useState();ce(()=>{o&&w(window.getComputedStyle(o).zIndex)},[o]);const P=g.useCallback(O=>{O&&v.current===!0&&(b(),E==null||E(),v.current=!1)},[b,E]);return x.jsxRuntimeExports.jsx(Mv,{scope:n,contentWrapper:f,shouldExpandOnScrollRef:p,onScrollButtonChange:P,children:x.jsxRuntimeExports.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:x.jsxRuntimeExports.jsx(K.div,{...a,ref:s,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});iu.displayName=Av;var jv="SelectPopperPosition",Zr=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=Re,...u}=e,d=Er(n);return x.jsxRuntimeExports.jsx(Mo,{...d,...u,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...u.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)"}})});Zr.displayName=jv;var[Mv,Uo]=xt(et,{}),Jr="SelectViewport",au=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,u=He(Jr,n),d=Uo(Jr,n),f=ne(t,u.onViewportChange),c=g.useRef(0);return x.jsxRuntimeExports.jsxs(x.jsxRuntimeExports.Fragment,{children:[x.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}),x.jsxRuntimeExports.jsx(xr.Slot,{scope:n,children:x.jsxRuntimeExports.jsx(K.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:G(a.onScroll,o=>{const i=o.currentTarget,{contentWrapper:s,shouldExpandOnScrollRef:l}=d;if(l!=null&&l.current&&s){const p=Math.abs(c.current-i.scrollTop);if(p>0){const v=window.innerHeight-Re*2,h=parseFloat(s.style.minHeight),m=parseFloat(s.style.height),y=Math.max(h,m);if(y<v){const E=y+p,b=Math.min(v,E),_=E-b;s.style.height=b+"px",s.style.bottom==="0px"&&(i.scrollTop=_>0?_:0,s.style.justifyContent="flex-end")}}}c.current=i.scrollTop})})})]})});au.displayName=Jr;var su="SelectGroup",[Tv,Iv]=xt(su),Nv=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=be();return x.jsxRuntimeExports.jsx(Tv,{scope:n,id:a,children:x.jsxRuntimeExports.jsx(K.div,{role:"group","aria-labelledby":a,...r,ref:t})})});Nv.displayName=su;var cu="SelectLabel",Dv=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Iv(cu,n);return x.jsxRuntimeExports.jsx(K.div,{id:a.id,...r,ref:t})});Dv.displayName=cu;var Zn="SelectItem",[kv,uu]=xt(Zn),lu=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:u,...d}=e,f=qe(Zn,n),c=He(Zn,n),o=f.value===r,[i,s]=g.useState(u??""),[l,p]=g.useState(!1),v=ne(t,E=>{var b;return(b=c.itemRefCallback)==null?void 0:b.call(c,E,r,a)}),h=be(),m=g.useRef("touch"),y=()=>{a||(f.onValueChange(r),f.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 x.jsxRuntimeExports.jsx(kv,{scope:n,value:r,disabled:a,textId:h,isSelected:o,onItemTextChange:g.useCallback(E=>{s(b=>b||((E==null?void 0:E.textContent)??"").trim())},[]),children:x.jsxRuntimeExports.jsx(xr.ItemSlot,{scope:n,value:r,disabled:a,textValue:i,children:x.jsxRuntimeExports.jsx(K.div,{role:"option","aria-labelledby":h,"data-highlighted":l?"":void 0,"aria-selected":o&&l,"data-state":o?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...d,ref:v,onFocus:G(d.onFocus,()=>p(!0)),onBlur:G(d.onBlur,()=>p(!1)),onClick:G(d.onClick,()=>{m.current!=="mouse"&&y()}),onPointerUp:G(d.onPointerUp,()=>{m.current==="mouse"&&y()}),onPointerDown:G(d.onPointerDown,E=>{m.current=E.pointerType}),onPointerMove:G(d.onPointerMove,E=>{var b;m.current=E.pointerType,a?(b=c.onItemLeave)==null||b.call(c):m.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:G(d.onPointerLeave,E=>{var b;E.currentTarget===document.activeElement&&((b=c.onItemLeave)==null||b.call(c))}),onKeyDown:G(d.onKeyDown,E=>{var _;((_=c.searchRef)==null?void 0:_.current)!==""&&E.key===" "||(Ev.includes(E.key)&&y(),E.key===" "&&E.preventDefault())})})})})});lu.displayName=Zn;var Pt="SelectItemText",fu=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...u}=e,d=qe(Pt,n),f=He(Pt,n),c=uu(Pt,n),o=Rv(Pt,n),[i,s]=g.useState(null),l=ne(t,y=>s(y),c.onItemTextChange,y=>{var E;return(E=f.itemTextRefCallback)==null?void 0:E.call(f,y,c.value,c.disabled)}),p=i==null?void 0:i.textContent,v=g.useMemo(()=>x.jsxRuntimeExports.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:m}=o;return ce(()=>(h(v),()=>m(v)),[h,m,v]),x.jsxRuntimeExports.jsxs(x.jsxRuntimeExports.Fragment,{children:[x.jsxRuntimeExports.jsx(K.span,{id:c.textId,...u,ref:l}),c.isSelected&&d.valueNode&&!d.valueNodeHasChildren?tr.createPortal(u.children,d.valueNode):null]})});fu.displayName=Pt;var du="SelectItemIndicator",Lv=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return uu(du,n).isSelected?x.jsxRuntimeExports.jsx(K.span,{"aria-hidden":!0,...r,ref:t}):null});Lv.displayName=du;var eo="SelectScrollUpButton",$v=g.forwardRef((e,t)=>{const n=He(eo,e.__scopeSelect),r=Uo(eo,e.__scopeSelect),[a,u]=g.useState(!1),d=ne(t,r.onScrollButtonChange);return ce(()=>{if(n.viewport&&n.isPositioned){let f=function(){const o=c.scrollTop>0;u(o)};const c=n.viewport;return f(),c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[n.viewport,n.isPositioned]),a?x.jsxRuntimeExports.jsx(pu,{...e,ref:d,onAutoScroll:()=>{const{viewport:f,selectedItem:c}=n;f&&c&&(f.scrollTop=f.scrollTop-c.offsetHeight)}}):null});$v.displayName=eo;var to="SelectScrollDownButton",Fv=g.forwardRef((e,t)=>{const n=He(to,e.__scopeSelect),r=Uo(to,e.__scopeSelect),[a,u]=g.useState(!1),d=ne(t,r.onScrollButtonChange);return ce(()=>{if(n.viewport&&n.isPositioned){let f=function(){const o=c.scrollHeight-c.clientHeight,i=Math.ceil(c.scrollTop)<o;u(i)};const c=n.viewport;return f(),c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[n.viewport,n.isPositioned]),a?x.jsxRuntimeExports.jsx(pu,{...e,ref:d,onAutoScroll:()=>{const{viewport:f,selectedItem:c}=n;f&&c&&(f.scrollTop=f.scrollTop+c.offsetHeight)}}):null});Fv.displayName=to;var pu=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,u=He("SelectScrollButton",n),d=g.useRef(null),f=yr(n),c=g.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return g.useEffect(()=>()=>c(),[c]),ce(()=>{var i;const o=f().find(s=>s.ref.current===document.activeElement);(i=o==null?void 0:o.ref.current)==null||i.scrollIntoView({block:"nearest"})},[f]),x.jsxRuntimeExports.jsx(K.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:G(a.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(r,50))}),onPointerMove:G(a.onPointerMove,()=>{var o;(o=u.onItemLeave)==null||o.call(u),d.current===null&&(d.current=window.setInterval(r,50))}),onPointerLeave:G(a.onPointerLeave,()=>{c()})})}),Bv="SelectSeparator",Gv=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return x.jsxRuntimeExports.jsx(K.div,{"aria-hidden":!0,...r,ref:t})});Gv.displayName=Bv;var no="SelectArrow",Uv=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Er(n),u=qe(no,n),d=He(no,n);return u.open&&d.position==="popper"?x.jsxRuntimeExports.jsx(To,{...a,...r,ref:t}):null});Uv.displayName=no;var zv="SelectBubbleInput",hu=g.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=g.useRef(null),u=ne(r,a),d=xo(t);return g.useEffect(()=>{const f=a.current;if(!f)return;const c=window.HTMLSelectElement.prototype,i=Object.getOwnPropertyDescriptor(c,"value").set;if(d!==t&&i){const s=new Event("change",{bubbles:!0});i.call(f,t),f.dispatchEvent(s)}},[d,t]),x.jsxRuntimeExports.jsx(K.select,{...n,style:{...Ua,...n.style},ref:u,defaultValue:t})});hu.displayName=zv;function vu(e){return e===""||e===void 0}function mu(e){const t=Se(e),n=g.useRef(""),r=g.useRef(0),a=g.useCallback(d=>{const f=n.current+d;t(f),(function c(o){n.current=o,window.clearTimeout(r.current),o!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(f)},[t]),u=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,u]}function gu(e,t,n){const a=t.length>1&&Array.from(t).every(o=>o===t[0])?t[0]:t,u=n?e.indexOf(n):-1;let d=Vv(e,Math.max(u,0));a.length===1&&(d=d.filter(o=>o!==n));const c=d.find(o=>o.textValue.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function Vv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var qv=Kc,Hv=Qc,Wv=Jc,Xv=eu,Kv=tu,Yv=nu,Qv=au,Zv=lu,Jv=fu,xu="Toggle",zo=g.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:a,...u}=e,[d,f]=me({prop:n,onChange:a,defaultProp:r??!1,caller:xu});return x.jsxRuntimeExports.jsx(K.button,{type:"button","aria-pressed":d,"data-state":d?"on":"off","data-disabled":e.disabled?"":void 0,...u,ref:t,onClick:G(e.onClick,()=>{e.disabled||f(!d)})})});zo.displayName=xu;var em=zo,We="ToggleGroup",[yu]=ge(We,[Bt]),Eu=Bt(),Vo=S.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const a=r;return x.jsxRuntimeExports.jsx(tm,{...a,ref:t})}if(n==="multiple"){const a=r;return x.jsxRuntimeExports.jsx(nm,{...a,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${We}\``)});Vo.displayName=We;var[bu,wu]=yu(We),tm=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},...u}=e,[d,f]=me({prop:n,defaultProp:r??"",onChange:a,caller:We});return x.jsxRuntimeExports.jsx(bu,{scope:e.__scopeToggleGroup,type:"single",value:S.useMemo(()=>d?[d]:[],[d]),onItemActivate:f,onItemDeactivate:S.useCallback(()=>f(""),[f]),children:x.jsxRuntimeExports.jsx(_u,{...u,ref:t})})}),nm=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},...u}=e,[d,f]=me({prop:n,defaultProp:r??[],onChange:a,caller:We}),c=S.useCallback(i=>f((s=[])=>[...s,i]),[f]),o=S.useCallback(i=>f((s=[])=>s.filter(l=>l!==i)),[f]);return x.jsxRuntimeExports.jsx(bu,{scope:e.__scopeToggleGroup,type:"multiple",value:d,onItemActivate:c,onItemDeactivate:o,children:x.jsxRuntimeExports.jsx(_u,{...u,ref:t})})});Vo.displayName=We;var[rm,om]=yu(We),_u=S.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:a=!0,orientation:u,dir:d,loop:f=!0,...c}=e,o=Eu(n),i=ht(d),s={role:"group",dir:i,...c};return x.jsxRuntimeExports.jsx(rm,{scope:n,rovingFocus:a,disabled:r,children:a?x.jsxRuntimeExports.jsx(Io,{asChild:!0,...o,orientation:u,dir:i,loop:f,children:x.jsxRuntimeExports.jsx(K.div,{...s,ref:t})}):x.jsxRuntimeExports.jsx(K.div,{...s,ref:t})})}),Jn="ToggleGroupItem",Ru=S.forwardRef((e,t)=>{const n=wu(Jn,e.__scopeToggleGroup),r=om(Jn,e.__scopeToggleGroup),a=Eu(e.__scopeToggleGroup),u=n.value.includes(e.value),d=r.disabled||e.disabled,f={...e,pressed:u,disabled:d},c=S.useRef(null);return r.rovingFocus?x.jsxRuntimeExports.jsx(No,{asChild:!0,...a,focusable:!d,active:u,ref:c,children:x.jsxRuntimeExports.jsx(yi,{...f,ref:t})}):x.jsxRuntimeExports.jsx(yi,{...f,ref:t})});Ru.displayName=Jn;var yi=S.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...a}=e,u=wu(Jn,n),d={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},f=u.type==="single"?d:void 0;return x.jsxRuntimeExports.jsx(zo,{...f,...a,ref:t,onPressedChange:c=>{c?u.onItemActivate(r):u.onItemDeactivate(r)}})}),im=Vo,am=Ru;const sm=S.forwardRef(({children:e,className:t,...n},r)=>x.jsxRuntimeExports.jsx(zl,{className:ee.classNames("overflow-hidden rounded-xl shadow-(--box-shadow-accordion)",t),ref:r,...n,children:e})),cm=S.forwardRef(({children:e,className:t,triggerIcon:n,...r},a)=>x.jsxRuntimeExports.jsx(Vl,{className:"flex",children:x.jsxRuntimeExports.jsxs(ql,{className:ee.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:a,...r,children:[e,n??x.jsxRuntimeExports.jsx(Ee.SvgArrowMp,{className:"size-3 shrink-0 transition-transform duration-300 ease-in-out group-data-[state=open]:rotate-180 fill-primary-blue"})]})}));function Ei(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function um(...e){return t=>{let n=!1;const r=e.map(a=>{const u=Ei(a,t);return!n&&typeof u=="function"&&(n=!0),u});if(n)return()=>{for(let a=0;a<r.length;a++){const u=r[a];typeof u=="function"?u():Ei(e[a],null)}}}}function lm(...e){return g.useCallback(um(...e),e)}class fm extends g.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,a=x.isHTMLElement(r)&&r.offsetWidth||0,u=x.isHTMLElement(r)&&r.offsetHeight||0,d=this.props.sizeRef.current;d.height=n.offsetHeight||0,d.width=n.offsetWidth||0,d.top=n.offsetTop,d.left=n.offsetLeft,d.right=a-d.width-d.left,d.bottom=u-d.height-d.top}return null}componentDidUpdate(){}render(){return this.props.children}}function dm({children:e,isPresent:t,anchorX:n,anchorY:r,root:a,pop:u}){var l;const d=S.useId(),f=S.useRef(null),c=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:o}=S.useContext(x.MotionConfigContext),i=((l=e.props)==null?void 0:l.ref)??(e==null?void 0:e.ref),s=lm(f,i);return S.useInsertionEffect(()=>{const{width:p,height:v,top:h,left:m,right:y,bottom:E}=c.current;if(t||u===!1||!f.current||!p||!v)return;const b=n==="left"?`left: ${m}`:`right: ${y}`,_=r==="bottom"?`bottom: ${E}`:`top: ${h}`;f.current.dataset.motionPopId=d;const w=document.createElement("style");o&&(w.nonce=o);const P=a??document.head;return P.appendChild(w),w.sheet&&w.sheet.insertRule(`
|
|
46
|
+
[data-motion-pop-id="${d}"] {
|
|
47
|
+
position: absolute !important;
|
|
48
|
+
width: ${p}px !important;
|
|
49
|
+
height: ${v}px !important;
|
|
50
|
+
${b}px !important;
|
|
51
|
+
${_}px !important;
|
|
52
|
+
}
|
|
53
|
+
`),()=>{P.contains(w)&&P.removeChild(w)}},[t]),x.jsxRuntimeExports.jsx(fm,{isPresent:t,childRef:f,sizeRef:c,pop:u,children:u===!1?e:g.cloneElement(e,{ref:s})})}const pm=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:u,mode:d,anchorX:f,anchorY:c,root:o})=>{const i=x.useConstant(hm),s=S.useId();let l=!0,p=S.useMemo(()=>(l=!1,{id:s,initial:t,isPresent:n,custom:a,onExitComplete:v=>{i.set(v,!0);for(const h of i.values())if(!h)return;r&&r()},register:v=>(i.set(v,!1),()=>i.delete(v))}),[n,i,r]);return u&&l&&(p={...p}),S.useMemo(()=>{i.forEach((v,h)=>i.set(h,!1))},[n]),g.useEffect(()=>{!n&&!i.size&&r&&r()},[n]),e=x.jsxRuntimeExports.jsx(dm,{pop:d==="popLayout",isPresent:n,anchorX:f,anchorY:c,root:o,children:e}),x.jsxRuntimeExports.jsx(x.PresenceContext.Provider,{value:p,children:e})};function hm(){return new Map}const tn=e=>e.key||"";function bi(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Tt=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:u="sync",propagate:d=!1,anchorX:f="left",anchorY:c="top",root:o})=>{const[i,s]=x.usePresence(d),l=S.useMemo(()=>bi(e),[e]),p=d&&!i?[]:l.map(tn),v=S.useRef(!0),h=S.useRef(l),m=x.useConstant(()=>new Map),y=S.useRef(new Set),[E,b]=S.useState(l),[_,w]=S.useState(l);x.useIsomorphicLayoutEffect(()=>{v.current=!1,h.current=l;for(let M=0;M<_.length;M++){const C=tn(_[M]);p.includes(C)?(m.delete(C),y.current.delete(C)):m.get(C)!==!0&&m.set(C,!1)}},[_,p.length,p.join("-")]);const P=[];if(l!==E){let M=[...l];for(let C=0;C<_.length;C++){const I=_[C],N=tn(I);p.includes(N)||(M.splice(C,0,I),P.push(I))}return u==="wait"&&P.length&&(M=P),w(bi(M)),b(l),null}process.env.NODE_ENV!=="production"&&u==="wait"&&_.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:O}=S.useContext(x.LayoutGroupContext);return x.jsxRuntimeExports.jsx(x.jsxRuntimeExports.Fragment,{children:_.map(M=>{const C=tn(M),I=d&&!i?!1:l===_||p.includes(C),N=()=>{if(y.current.has(C))return;if(y.current.add(C),m.has(C))m.set(C,!0);else return;let L=!0;m.forEach($=>{$||(L=!1)}),L&&(O==null||O(),w(h.current),d&&(s==null||s()),r&&r())};return x.jsxRuntimeExports.jsx(pm,{isPresent:I,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:a,mode:u,root:o,onExitComplete:I?void 0:N,anchorX:f,anchorY:c,children:M},C)})})},vm=S.forwardRef(({children:e,className:t,dividerClassName:n,showDivider:r=!0,...a},u)=>x.jsxRuntimeExports.jsx(Hl,{...a,className:ee.classNames("overflow-hidden bg-white",t),ref:u,asChild:!0,children:x.jsxRuntimeExports.jsxs(x.motion.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&&x.jsxRuntimeExports.jsx("hr",{className:ee.classNames("bg-primary-blue h-0.5 border-0",n)}),x.jsxRuntimeExports.jsx("div",{className:"px-5 py-[15px]",children:e})]})})),mm={sm:"size-8 text-[1.3rem]",md:"size-10 text-[1.4rem]",lg:"size-12 text-[2.1rem]",xl:"size-14 text-[2.5rem]"},gm=({size:e="md",src:t,alt:n="avatar",icon:r=x.jsxRuntimeExports.jsx(Ee.SvgUser,{}),bgClassName:a="bg-[#A1ADC0]",colorClassName:u="text-white",className:d="",onClick:f,style:c})=>x.jsxRuntimeExports.jsxs(xd,{className:ee.classNames("inline-flex shrink-0 overflow-hidden rounded-full",mm[e],d),onClick:f,style:c,children:[t&&x.jsxRuntimeExports.jsx(yd,{src:t,alt:n,className:"h-full w-full object-cover"}),x.jsxRuntimeExports.jsx(Ed,{delayMs:0,className:ee.classNames("flex h-full w-full items-center justify-center rounded-full",u,a),children:r})]}),xm={default:ee.classNames("bg-primary-blue border-primary-blue text-white","hover:bg-darks-blue-Macropay-30 hover:border-darks-blue-Macropay-30"),primary:ee.classNames("bg-primary-yellow border-primary-yellow text-primary-blue","hover:bg-shades-yellow-10 hover:border-shades-yellow-10"),secondary:ee.classNames("bg-white text-primary-blue border-primary-blue","hover:border-darks-blue-Macropay-30 hover:text-darks-blue-Macropay-30"),text:ee.classNames("bg-transparent text-primary-blue border-transparent shadow-none","hover:text-darks-blue-Macropay-30","disabled:bg-transparent disabled:border-transparent"),danger:ee.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"},ym={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"},wi=["sm","md","lg","xl"],Em=e=>{const t=wi.indexOf(e);return t===-1?"":ee.classNames(wi.slice(0,t+1).map(n=>ym[n]))},bm={pointer:"cursor-pointer",default:"cursor-default","not-allowed":"cursor-not-allowed",wait:"cursor-wait",text:"cursor-text"},wm=e=>ee.classNames("flex items-center justify-center gap-2 border active:scale-95",bm[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"),ro=({icon:e,children:t,leftIcon:n,rightIcon:r,type:a="button",variant:u="default",size:d="md",className:f="",isLoading:c=!1,positionLoading:o="left",cursor:i="pointer",...s})=>{const l=S.useId(),p=wm(i),{isLeftLoading:v,isRightLoading:h}=S.useMemo(()=>({isLeftLoading:o==="left"&&c,isRightLoading:o==="right"&&c}),[c,o]),m=S.useMemo(()=>["primary","secondary","text","withoutColor"].includes(u)?x.jsxRuntimeExports.jsx(Ee.SvgLoaderAnimBlue,{className:"animate-spin"}):x.jsxRuntimeExports.jsx(Ee.SvgLoaderAnimWhite,{className:"animate-spin"}),[u]),y=S.useMemo(()=>e??n,[e,n]);return x.jsxRuntimeExports.jsxs(x.motion.button,{id:`${l}-button`,className:ee.classNames(p,xm[u],Em(d),f),type:a,...s,children:[x.jsxRuntimeExports.jsx(Tt,{mode:"wait",children:(v||y)&&x.jsxRuntimeExports.jsx(x.motion.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.2},children:v?m:y},"leftIcon")}),typeof t=="string"||typeof t=="number"?x.jsxRuntimeExports.jsx("span",{className:"whitespace-normal",children:t}):t,x.jsxRuntimeExports.jsx(Tt,{mode:"wait",children:(h||r)&&x.jsxRuntimeExports.jsx(x.motion.div,{initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:8},transition:{duration:.2},children:h?m:r},"rightIcon")})]})},_m={sm:"h-4 w-4",md:"h-6 w-6"},Rm={sm:"h-3 w-3",md:"h-4 w-4"},Sm={sm:"h-2 w-2",md:"h-4 w-4"},Cm={sm:"text-sm",md:"text-base"},Om=({size:e,disabled:t})=>({checked:x.jsxRuntimeExports.jsx(Ee.SvgCheckv2,{className:ee.classNames(Rm[e],t?"text-stone-300 fill-stone-300":"text-white")}),indeterminate:x.jsxRuntimeExports.jsx(Ee.SvgIndeterminate,{className:ee.classNames(Sm[e],t?"text-stone-300 fill-stone-300":"text-blue-800")})}),Pm=({size:e,disabled:t,children:n,checkboxId:r})=>n?x.jsxRuntimeExports.jsx("label",{htmlFor:r,className:ee.classNames(Cm[e],t&&"text-gray-400","cursor-pointer"),children:n}):null,Su=S.forwardRef(({size:e="md",checked:t,indeterminate:n=!1,disabled:r=!1,onCheckedChange:a,className:u,children:d,...f},c)=>{const o=S.useId(),i=n?"indeterminate":t?"checked":"none",s=l=>{r||a==null||a(l===!0)};return x.jsxRuntimeExports.jsxs("div",{className:ee.classNames("flex gap-2 items-start sm:items-center select-none",r?"pointer-events-none":"cursor-pointer",u),children:[x.jsxRuntimeExports.jsx(Fs,{id:o,ref:c,checked:t,"aria-checked":n?"mixed":t,disabled:r,onCheckedChange:s,className:ee.classNames("flex justify-center items-center rounded-sm border relative transition-[background-color] cursor-pointer",_m[e],{"bg-white border-gray-300 hover:border-blue-800":!t&&!r,"bg-blue-800 border-blue-800":t&&!n&&!r||n&&!r,"bg-neutral-100 border-stone-300":r}),...f,children:i!=="none"&&Om({size:e,disabled:r})[i]}),x.jsxRuntimeExports.jsx(Pm,{size:e,disabled:r,children:d,checkboxId:o})]})});Su.displayName="Checkbox";const Am=({children:e,id:t,className:n=""})=>{const r=S.useRef(null),[a,u]=S.useState(!1);return S.useEffect(()=>{const d=document.getElementById(t)||document.createElement("div");return r.current=d,r.current.id=t,n&&(r.current.className=n),document.body.appendChild(r.current),u(!0),()=>{r.current.parentElement&&r.current.parentElement.removeChild(r.current)}},[t]),a?ao.createPortal(e,r.current):null},jm=S.memo(Am),Mm=S.forwardRef(({children:e,className:t,...n},r)=>x.jsxRuntimeExports.jsx(pv,{className:ee.classNames("inline-flex items-center justify-center rounded px-4 py-2 text-sm font-medium","bg-white text-gray-12","hover:bg-gray-1 focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2 outline-none","disabled:cursor-not-allowed disabled:opacity-50","transition-colors",t),ref:r,...n,children:e})),Tm=S.forwardRef(({children:e,className:t,...n},r)=>x.jsxRuntimeExports.jsx(hv,{children:x.jsxRuntimeExports.jsx(vv,{...n,className:ee.classNames("min-w-[220px] rounded-lg bg-white shadow-(--box-shadow-accordion) border border-gray-2","overflow-hidden",t),ref:r,asChild:!0,children:x.jsxRuntimeExports.jsx(x.motion.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:x.jsxRuntimeExports.jsx("div",{className:"p-1",children:e})})})})),Im=S.forwardRef(({children:e,className:t,icon:n,shortcut:r,...a},u)=>x.jsxRuntimeExports.jsxs(gv,{className:ee.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:u,...a,children:[x.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[n&&x.jsxRuntimeExports.jsx("span",{className:"inline-flex shrink-0",children:n}),x.jsxRuntimeExports.jsx("span",{children:e})]}),r&&x.jsxRuntimeExports.jsx("span",{className:"ml-auto pl-4 text-xs text-gray-6 group-hover:text-blue-6",children:r})]})),Nm=S.forwardRef(({className:e,...t},n)=>x.jsxRuntimeExports.jsx(xv,{className:ee.classNames("my-1 h-px bg-gray-3",e),ref:n,...t})),Dm=S.forwardRef(({children:e,className:t,...n},r)=>x.jsxRuntimeExports.jsx(mv,{className:ee.classNames("px-3 py-2 text-xs font-semibold text-gray-6",t),ref:r,...n,children:e})),km=(e,t)=>{const n={separator:()=>x.jsxRuntimeExports.jsx(Nm,{className:t==null?void 0:t.separator},e.id),label:()=>x.jsxRuntimeExports.jsx(Dm,{className:t==null?void 0:t.label,children:e.label},e.id),default:()=>x.jsxRuntimeExports.jsx(Im,{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)()},Lm=({trigger:e,items:t=[],align:n="start",sideOffset:r=4,classNames:a})=>x.jsxRuntimeExports.jsxs(dv,{children:[x.jsxRuntimeExports.jsx(Mm,{className:a==null?void 0:a.trigger,children:e}),x.jsxRuntimeExports.jsx(Tm,{align:n,sideOffset:r,className:a==null?void 0:a.content,children:t.map(u=>x.jsxRuntimeExports.jsx("div",{children:km(u,a)},u.id))})]});var Cu=(e=>(e.justify="justify",e.align="items",e.gap="gap",e))(Cu||{});const{align:$m,justify:Fm,gap:Bm}=Cu,Gm={horizontal:"flex-row",vertical:"flex-col"},Um={horizontal:"flex-row-reverse",vertical:"flex-col-reverse"},Ye=({children:e,justify:t,align:n,gap:r,direction:a="horizontal",isReverse:u=!1,style:d,className:f="",onClick:c,wrap:o,...i})=>x.jsxRuntimeExports.jsx(x.motion.div,{"aria-hidden":!0,className:ee.classNames(`flex ${u?Um[a]:Gm[a]}`,ye.generateClasses(Bm,r),ye.generateClasses(Fm,t),ye.generateClasses($m,n),{[f]:f,"flex-wrap":o}),onClick:c,style:d,children:e,...i}),zm={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"},Ou=(e,t,n,r,a)=>{const u=["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"],d=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"],f={"pl-8":a,[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:zm[t],stateStyles:f,baseStyles:u,variantStyles:d}},Pu=({onClick:e,disabled:t})=>x.jsxRuntimeExports.jsx(x.motion.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:x.jsxRuntimeExports.jsx(Ee.SvgCloseCircle,{})},"clear-button"),Vm=({num:e,format:t,useGrouping:n,minFractionDigits:r,maxFractionDigits:a,mode:u,currency:d,currencyDisplay:f,locale:c,prefix:o="",suffix:i=""})=>{if(e==null||!t)return(e==null?void 0:e.toString())??"";const s={useGrouping:n,minimumFractionDigits:r,maximumFractionDigits:a,...u==="currency"&&{style:"currency",currency:d,currencyDisplay:f}},l=new Intl.NumberFormat(c,s).format(e);return`${o} ${l} ${i}`.trim()},qm=(e,t="",n="",r=!0)=>{if(!e)return r?null:0;const a=e.replace(t,"").replace(n,"").replaceAll(/[^\d.-]/g,""),u=Number.parseFloat(a);return Number.isNaN(u)?null:u},Hm=(e,t,n)=>e==null||(t==null||e>=t)&&(n==null||e<=n),Wm=e=>{const{onChange:t,onValueChange:n,format:r=!0,locale:a="es-MX",mode:u="decimal",currency:d="MXN",currencyDisplay:f="symbol",useGrouping:c=!0,minFractionDigits:o,maxFractionDigits:i,min:s,max:l,allowEmpty:p=!0,prefix:v,suffix:h,...m}=e,[y,E]=S.useState(Number((m==null?void 0:m.value)??null)),[b,_]=S.useState(""),[w,P]=S.useState(!1),O=S.useMemo(()=>({format:r,useGrouping:c,minFractionDigits:o,maxFractionDigits:i,mode:u,currency:d,currencyDisplay:f,locale:a,prefix:v,suffix:h}),[r,c,o,i,u,d,f,a,v,h]),M=S.useCallback(D=>Vm({num:D,...O}),[O]),C=S.useCallback(D=>qm(D,v,h,p),[v,h,p]);S.useEffect(()=>{w||_(M(y))},[y,M,w]);const I=S.useCallback(D=>{const H=D.target.value;_(H);const F=C(H);Hm(F,s,l)&&(E(F),t==null||t(F),n==null||n({originalEvent:D.nativeEvent,value:F}))},[C,s,l,t,n]),N=S.useCallback(D=>{var H;P(!0),y!=null&&_(y.toString()),(H=m.onFocus)==null||H.call(m,D)},[y,m]),L=S.useCallback(D=>{var H;P(!1),_(M(y)),(H=m.onBlur)==null||H.call(m,D)},[M,y,m]),$=S.useCallback(()=>{_(""),E(null),t==null||t(null)},[t]);return{displayValue:b,handleChange:I,handleFocus:N,handleBlur:L,handleClear:$,...m}},Au=S.forwardRef((e,t)=>{const{error:n,size:r="md",check:a,icon:u,leftIcon:d,clear:f=!0,disabled:c=!1,variant:o="default",className:i,displayValue:s,handleChange:l,handleFocus:p,handleBlur:v,handleClear:h,...m}=Wm(e),{baseStyles:y,variantStyles:E,sizeStyles:b,stateStyles:_}=Ou(o,r,n,a,!!u),w=S.useMemo(()=>f&&s?x.jsxRuntimeExports.jsx(Pu,{disabled:c,onClick:h}):d?x.jsxRuntimeExports.jsx("div",{className:ee.classNames("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:d}):null,[f,s,d,c,h]);return x.jsxRuntimeExports.jsxs("div",{className:ee.classNames("relative",i),children:[u&&x.jsxRuntimeExports.jsx("div",{className:ee.classNames("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:u}),x.jsxRuntimeExports.jsx(x.motion.input,{...m,ref:t,type:"text",value:s,disabled:c,onChange:l,onFocus:p,onBlur:v,className:ee.classNames(...y,...E,b,_,i)}),x.jsxRuntimeExports.jsx(Tt,{children:w})]})});Au.displayName="InputNumber";const _i=(e,t)=>`${e}-${t}`,br=S.forwardRef(({children:e,as:t,asChild:n=!1,className:r,italic:a=!1,size:u="base",weight:d="normal",...f},c)=>{if(!e)return null;const o=_i("text",u),i=_i("font",d),s=n?Fa:t??"p";return x.jsxRuntimeExports.jsx(s,{ref:c,className:ee.classNames("text-grays-Macropay-10",o,i,r,{italic:a}),...f,children:e})});br.displayName="Typography";const Xm=({children:e,as:t="p",className:n,...r})=>x.jsxRuntimeExports.jsx(br,{as:t,className:n,...r,children:e}),Km={1:"text-4xl",2:"text-3xl",3:"text-2xl",4:"text-xl",5:"text-lg",6:"text-base"},Ym={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},Qm=({children:e,className:t="",level:n=1,...r})=>{const a=Ym[n];return x.jsxRuntimeExports.jsx(br,{as:a,weight:"bold",className:`${Km[n]} ${t}`,...r,children:e})},zt=br;zt.Text=Xm;zt.Title=Qm;const Zm={hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},Jm={hidden:{opacity:0,scale:.95,y:8},visible:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:8}},ju=({blur:e=!0,className:t})=>x.jsxRuntimeExports.jsx(ud,{asChild:!0,children:x.jsxRuntimeExports.jsx(x.motion.div,{className:ee.cn("fixed inset-0 z-10 bg-opacity-75 transition-opacity",{className:t,"backdrop-blur-sm backdrop-filter":e}),variants:Zm,initial:"hidden",animate:"visible",exit:"exit",onClick:n=>n.stopPropagation()})}),e0=({children:e,panelClassName:t,isCloseAble:n,onClose:r})=>x.jsxRuntimeExports.jsx("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:x.jsxRuntimeExports.jsx(Ye,{align:"center",justify:"center",className:"min-h-full p-4 text-center items-center",children:x.jsxRuntimeExports.jsx(ld,{asChild:!0,children:x.jsxRuntimeExports.jsx(x.motion.div,{variants:Jm,initial:"hidden",animate:"visible",exit:"exit",transition:{duration:.2,ease:"easeOut"},className:ee.cn("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),children:x.jsxRuntimeExports.jsxs(Ye,{className:"relative gap-6",direction:"vertical",align:"center",children:[n&&x.jsxRuntimeExports.jsx("button",{className:"absolute -right-4 -top-4 md:-right-5 w-auto h-auto",onClick:r,children:x.jsxRuntimeExports.jsx(Ee.SvgClose,{className:"cursor-pointer text-gray-7 text-2xl"})}),e]})})})})}),t0=({type:e="default",title:t,message:n,titleAlign:r="left",children:a})=>!t&&!n?null:x.jsxRuntimeExports.jsxs(Ye,{gap:4,className:ee.classNames("w-full",{hidden:!t&&!n}),children:[e!=="default"&&x.jsxRuntimeExports.jsxs(Ye,{align:"center",justify:"center",className:ee.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"&&x.jsxRuntimeExports.jsx(Ee.SvgClose,{}),e==="success"&&x.jsxRuntimeExports.jsx(Ee.SvgDone,{}),e==="warning"&&x.jsxRuntimeExports.jsx(Ee.SvgExclamation,{}),e==="info"&&x.jsxRuntimeExports.jsx(Ee.SvgInfo,{})]}),x.jsxRuntimeExports.jsxs(Ye,{direction:"vertical",gap:2,className:"w-full",children:[typeof t!="string"?t:x.jsxRuntimeExports.jsx(fd,{asChild:!0,children:x.jsxRuntimeExports.jsx(zt.Title,{weight:"semibold",level:4,...typeof t!="string"?t:{},className:ee.classNames("inline-block",{[`text-${r}`]:r}),children:typeof t=="string"?t:a})}),n&&x.jsxRuntimeExports.jsx(dd,{asChild:!0,children:x.jsxRuntimeExports.jsx("span",{className:"text-base font-normal text-black text-opacity-85",children:n})})]})]}),n0=({buttonCancel:e,buttonOk:t})=>!e&&!t?null:x.jsxRuntimeExports.jsxs("div",{className:"w-full max-[400px]:grid grid-cols-1 flex flex-wrap justify-end gap-4",children:[t&&x.jsxRuntimeExports.jsx(ro,{className:"outline-none inline-flex max-[400px]:order-1 order-2",variant:"primary",size:"xl",...t}),e&&x.jsxRuntimeExports.jsx(ro,{className:"outline-none inline-flex max-[400px]:order-2 order-1",variant:"secondary",size:"xl",...e})]}),Mu=({isOpen:e,onClose:t=()=>{},children:n,header:r,title:a,message:u,type:d,titleAlign:f,buttonOk:c,buttonCancel:o,isCloseAble:i,overlay:s,className:l="",blur:p=!0})=>x.jsxRuntimeExports.jsx(sd,{open:e,children:x.jsxRuntimeExports.jsx(Tt,{children:e&&x.jsxRuntimeExports.jsxs(cd,{forceMount:!0,children:[s??x.jsxRuntimeExports.jsx(ju,{blur:p}),x.jsxRuntimeExports.jsxs(e0,{panelClassName:l,isCloseAble:i,onClose:t,children:[r,x.jsxRuntimeExports.jsx(t0,{type:d,title:a,message:u,titleAlign:f,children:n}),n&&x.jsxRuntimeExports.jsx("div",{children:n,className:"w-full"}),x.jsxRuntimeExports.jsx(n0,{buttonOk:c,buttonCancel:o})]})]})})});Mu.Overlay=ju;const{Title:r0,Text:o0}=zt,i0=({title:e,message:t,children:n})=>x.jsxRuntimeExports.jsxs(Ye,{gap:2,direction:"vertical",justify:"center",className:"w-full",children:[e&&x.jsxRuntimeExports.jsx(r0,{level:6,weight:"medium",children:e}),t&&x.jsxRuntimeExports.jsx(o0,{className:"leading-5",size:"sm",children:t}),n]}),a0=e=>{const t=S.createContext(void 0);return[({value:a,children:u})=>x.jsxRuntimeExports.jsx(t.Provider,{value:a,children:u}),()=>{const a=S.useContext(t);if(a===void 0)throw new Error(`useContext must be used within a ${e}Provider`);return a}]},[s0]=a0("PopoverContext");var c0=Object.defineProperty,er=Object.getOwnPropertySymbols,Tu=Object.prototype.hasOwnProperty,Iu=Object.prototype.propertyIsEnumerable,Ri=(e,t,n)=>t in e?c0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oo=(e,t)=>{for(var n in t||(t={}))Tu.call(t,n)&&Ri(e,n,t[n]);if(er)for(var n of er(t))Iu.call(t,n)&&Ri(e,n,t[n]);return e},io=(e,t)=>{var n={};for(var r in e)Tu.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&er)for(var r of er(e))t.indexOf(r)<0&&Iu.call(e,r)&&(n[r]=e[r]);return n};/**
|
|
54
|
+
* @license QR Code generator library (TypeScript)
|
|
55
|
+
* Copyright (c) Project Nayuki.
|
|
56
|
+
* SPDX-License-Identifier: MIT
|
|
57
|
+
*/var tt;(e=>{const t=class te{constructor(c,o,i,s){if(this.version=c,this.errorCorrectionLevel=o,this.modules=[],this.isFunction=[],c<te.MIN_VERSION||c>te.MAX_VERSION)throw new RangeError("Version value out of range");if(s<-1||s>7)throw new RangeError("Mask value out of range");this.size=c*4+17;let l=[];for(let v=0;v<this.size;v++)l.push(!1);for(let v=0;v<this.size;v++)this.modules.push(l.slice()),this.isFunction.push(l.slice());this.drawFunctionPatterns();const p=this.addEccAndInterleave(i);if(this.drawCodewords(p),s==-1){let v=1e9;for(let h=0;h<8;h++){this.applyMask(h),this.drawFormatBits(h);const m=this.getPenaltyScore();m<v&&(s=h,v=m),this.applyMask(h)}}a(0<=s&&s<=7),this.mask=s,this.applyMask(s),this.drawFormatBits(s),this.isFunction=[]}static encodeText(c,o){const i=e.QrSegment.makeSegments(c);return te.encodeSegments(i,o)}static encodeBinary(c,o){const i=e.QrSegment.makeBytes(c);return te.encodeSegments([i],o)}static encodeSegments(c,o,i=1,s=40,l=-1,p=!0){if(!(te.MIN_VERSION<=i&&i<=s&&s<=te.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let v,h;for(v=i;;v++){const b=te.getNumDataCodewords(v,o)*8,_=d.getTotalBits(c,v);if(_<=b){h=_;break}if(v>=s)throw new RangeError("Data too long")}for(const b of[te.Ecc.MEDIUM,te.Ecc.QUARTILE,te.Ecc.HIGH])p&&h<=te.getNumDataCodewords(v,b)*8&&(o=b);let m=[];for(const b of c){n(b.mode.modeBits,4,m),n(b.numChars,b.mode.numCharCountBits(v),m);for(const _ of b.getData())m.push(_)}a(m.length==h);const y=te.getNumDataCodewords(v,o)*8;a(m.length<=y),n(0,Math.min(4,y-m.length),m),n(0,(8-m.length%8)%8,m),a(m.length%8==0);for(let b=236;m.length<y;b^=253)n(b,8,m);let E=[];for(;E.length*8<m.length;)E.push(0);return m.forEach((b,_)=>E[_>>>3]|=b<<7-(_&7)),new te(v,o,E,l)}getModule(c,o){return 0<=c&&c<this.size&&0<=o&&o<this.size&&this.modules[o][c]}getModules(){return this.modules}drawFunctionPatterns(){for(let i=0;i<this.size;i++)this.setFunctionModule(6,i,i%2==0),this.setFunctionModule(i,6,i%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const c=this.getAlignmentPatternPositions(),o=c.length;for(let i=0;i<o;i++)for(let s=0;s<o;s++)i==0&&s==0||i==0&&s==o-1||i==o-1&&s==0||this.drawAlignmentPattern(c[i],c[s]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(c){const o=this.errorCorrectionLevel.formatBits<<3|c;let i=o;for(let l=0;l<10;l++)i=i<<1^(i>>>9)*1335;const s=(o<<10|i)^21522;a(s>>>15==0);for(let l=0;l<=5;l++)this.setFunctionModule(8,l,r(s,l));this.setFunctionModule(8,7,r(s,6)),this.setFunctionModule(8,8,r(s,7)),this.setFunctionModule(7,8,r(s,8));for(let l=9;l<15;l++)this.setFunctionModule(14-l,8,r(s,l));for(let l=0;l<8;l++)this.setFunctionModule(this.size-1-l,8,r(s,l));for(let l=8;l<15;l++)this.setFunctionModule(8,this.size-15+l,r(s,l));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let c=this.version;for(let i=0;i<12;i++)c=c<<1^(c>>>11)*7973;const o=this.version<<12|c;a(o>>>18==0);for(let i=0;i<18;i++){const s=r(o,i),l=this.size-11+i%3,p=Math.floor(i/3);this.setFunctionModule(l,p,s),this.setFunctionModule(p,l,s)}}drawFinderPattern(c,o){for(let i=-4;i<=4;i++)for(let s=-4;s<=4;s++){const l=Math.max(Math.abs(s),Math.abs(i)),p=c+s,v=o+i;0<=p&&p<this.size&&0<=v&&v<this.size&&this.setFunctionModule(p,v,l!=2&&l!=4)}}drawAlignmentPattern(c,o){for(let i=-2;i<=2;i++)for(let s=-2;s<=2;s++)this.setFunctionModule(c+s,o+i,Math.max(Math.abs(s),Math.abs(i))!=1)}setFunctionModule(c,o,i){this.modules[o][c]=i,this.isFunction[o][c]=!0}addEccAndInterleave(c){const o=this.version,i=this.errorCorrectionLevel;if(c.length!=te.getNumDataCodewords(o,i))throw new RangeError("Invalid argument");const s=te.NUM_ERROR_CORRECTION_BLOCKS[i.ordinal][o],l=te.ECC_CODEWORDS_PER_BLOCK[i.ordinal][o],p=Math.floor(te.getNumRawDataModules(o)/8),v=s-p%s,h=Math.floor(p/s);let m=[];const y=te.reedSolomonComputeDivisor(l);for(let b=0,_=0;b<s;b++){let w=c.slice(_,_+h-l+(b<v?0:1));_+=w.length;const P=te.reedSolomonComputeRemainder(w,y);b<v&&w.push(0),m.push(w.concat(P))}let E=[];for(let b=0;b<m[0].length;b++)m.forEach((_,w)=>{(b!=h-l||w>=v)&&E.push(_[b])});return a(E.length==p),E}drawCodewords(c){if(c.length!=Math.floor(te.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let o=0;for(let i=this.size-1;i>=1;i-=2){i==6&&(i=5);for(let s=0;s<this.size;s++)for(let l=0;l<2;l++){const p=i-l,h=(i+1&2)==0?this.size-1-s:s;!this.isFunction[h][p]&&o<c.length*8&&(this.modules[h][p]=r(c[o>>>3],7-(o&7)),o++)}}a(o==c.length*8)}applyMask(c){if(c<0||c>7)throw new RangeError("Mask value out of range");for(let o=0;o<this.size;o++)for(let i=0;i<this.size;i++){let s;switch(c){case 0:s=(i+o)%2==0;break;case 1:s=o%2==0;break;case 2:s=i%3==0;break;case 3:s=(i+o)%3==0;break;case 4:s=(Math.floor(i/3)+Math.floor(o/2))%2==0;break;case 5:s=i*o%2+i*o%3==0;break;case 6:s=(i*o%2+i*o%3)%2==0;break;case 7:s=((i+o)%2+i*o%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[o][i]&&s&&(this.modules[o][i]=!this.modules[o][i])}}getPenaltyScore(){let c=0;for(let l=0;l<this.size;l++){let p=!1,v=0,h=[0,0,0,0,0,0,0];for(let m=0;m<this.size;m++)this.modules[l][m]==p?(v++,v==5?c+=te.PENALTY_N1:v>5&&c++):(this.finderPenaltyAddHistory(v,h),p||(c+=this.finderPenaltyCountPatterns(h)*te.PENALTY_N3),p=this.modules[l][m],v=1);c+=this.finderPenaltyTerminateAndCount(p,v,h)*te.PENALTY_N3}for(let l=0;l<this.size;l++){let p=!1,v=0,h=[0,0,0,0,0,0,0];for(let m=0;m<this.size;m++)this.modules[m][l]==p?(v++,v==5?c+=te.PENALTY_N1:v>5&&c++):(this.finderPenaltyAddHistory(v,h),p||(c+=this.finderPenaltyCountPatterns(h)*te.PENALTY_N3),p=this.modules[m][l],v=1);c+=this.finderPenaltyTerminateAndCount(p,v,h)*te.PENALTY_N3}for(let l=0;l<this.size-1;l++)for(let p=0;p<this.size-1;p++){const v=this.modules[l][p];v==this.modules[l][p+1]&&v==this.modules[l+1][p]&&v==this.modules[l+1][p+1]&&(c+=te.PENALTY_N2)}let o=0;for(const l of this.modules)o=l.reduce((p,v)=>p+(v?1:0),o);const i=this.size*this.size,s=Math.ceil(Math.abs(o*20-i*10)/i)-1;return a(0<=s&&s<=9),c+=s*te.PENALTY_N4,a(0<=c&&c<=2568888),c}getAlignmentPatternPositions(){if(this.version==1)return[];{const c=Math.floor(this.version/7)+2,o=this.version==32?26:Math.ceil((this.version*4+4)/(c*2-2))*2;let i=[6];for(let s=this.size-7;i.length<c;s-=o)i.splice(1,0,s);return i}}static getNumRawDataModules(c){if(c<te.MIN_VERSION||c>te.MAX_VERSION)throw new RangeError("Version number out of range");let o=(16*c+128)*c+64;if(c>=2){const i=Math.floor(c/7)+2;o-=(25*i-10)*i-55,c>=7&&(o-=36)}return a(208<=o&&o<=29648),o}static getNumDataCodewords(c,o){return Math.floor(te.getNumRawDataModules(c)/8)-te.ECC_CODEWORDS_PER_BLOCK[o.ordinal][c]*te.NUM_ERROR_CORRECTION_BLOCKS[o.ordinal][c]}static reedSolomonComputeDivisor(c){if(c<1||c>255)throw new RangeError("Degree out of range");let o=[];for(let s=0;s<c-1;s++)o.push(0);o.push(1);let i=1;for(let s=0;s<c;s++){for(let l=0;l<o.length;l++)o[l]=te.reedSolomonMultiply(o[l],i),l+1<o.length&&(o[l]^=o[l+1]);i=te.reedSolomonMultiply(i,2)}return o}static reedSolomonComputeRemainder(c,o){let i=o.map(s=>0);for(const s of c){const l=s^i.shift();i.push(0),o.forEach((p,v)=>i[v]^=te.reedSolomonMultiply(p,l))}return i}static reedSolomonMultiply(c,o){if(c>>>8||o>>>8)throw new RangeError("Byte out of range");let i=0;for(let s=7;s>=0;s--)i=i<<1^(i>>>7)*285,i^=(o>>>s&1)*c;return a(i>>>8==0),i}finderPenaltyCountPatterns(c){const o=c[1];a(o<=this.size*3);const i=o>0&&c[2]==o&&c[3]==o*3&&c[4]==o&&c[5]==o;return(i&&c[0]>=o*4&&c[6]>=o?1:0)+(i&&c[6]>=o*4&&c[0]>=o?1:0)}finderPenaltyTerminateAndCount(c,o,i){return c&&(this.finderPenaltyAddHistory(o,i),o=0),o+=this.size,this.finderPenaltyAddHistory(o,i),this.finderPenaltyCountPatterns(i)}finderPenaltyAddHistory(c,o){o[0]==0&&(c+=this.size),o.pop(),o.unshift(c)}};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(f,c,o){if(c<0||c>31||f>>>c)throw new RangeError("Value out of range");for(let i=c-1;i>=0;i--)o.push(f>>>i&1)}function r(f,c){return(f>>>c&1)!=0}function a(f){if(!f)throw new Error("Assertion error")}const u=class se{constructor(c,o,i){if(this.mode=c,this.numChars=o,this.bitData=i,o<0)throw new RangeError("Invalid argument");this.bitData=i.slice()}static makeBytes(c){let o=[];for(const i of c)n(i,8,o);return new se(se.Mode.BYTE,c.length,o)}static makeNumeric(c){if(!se.isNumeric(c))throw new RangeError("String contains non-numeric characters");let o=[];for(let i=0;i<c.length;){const s=Math.min(c.length-i,3);n(parseInt(c.substring(i,i+s),10),s*3+1,o),i+=s}return new se(se.Mode.NUMERIC,c.length,o)}static makeAlphanumeric(c){if(!se.isAlphanumeric(c))throw new RangeError("String contains unencodable characters in alphanumeric mode");let o=[],i;for(i=0;i+2<=c.length;i+=2){let s=se.ALPHANUMERIC_CHARSET.indexOf(c.charAt(i))*45;s+=se.ALPHANUMERIC_CHARSET.indexOf(c.charAt(i+1)),n(s,11,o)}return i<c.length&&n(se.ALPHANUMERIC_CHARSET.indexOf(c.charAt(i)),6,o),new se(se.Mode.ALPHANUMERIC,c.length,o)}static makeSegments(c){return c==""?[]:se.isNumeric(c)?[se.makeNumeric(c)]:se.isAlphanumeric(c)?[se.makeAlphanumeric(c)]:[se.makeBytes(se.toUtf8ByteArray(c))]}static makeEci(c){let o=[];if(c<0)throw new RangeError("ECI assignment value out of range");if(c<128)n(c,8,o);else if(c<16384)n(2,2,o),n(c,14,o);else if(c<1e6)n(6,3,o),n(c,21,o);else throw new RangeError("ECI assignment value out of range");return new se(se.Mode.ECI,0,o)}static isNumeric(c){return se.NUMERIC_REGEX.test(c)}static isAlphanumeric(c){return se.ALPHANUMERIC_REGEX.test(c)}getData(){return this.bitData.slice()}static getTotalBits(c,o){let i=0;for(const s of c){const l=s.mode.numCharCountBits(o);if(s.numChars>=1<<l)return 1/0;i+=4+l+s.bitData.length}return i}static toUtf8ByteArray(c){c=encodeURI(c);let o=[];for(let i=0;i<c.length;i++)c.charAt(i)!="%"?o.push(c.charCodeAt(i)):(o.push(parseInt(c.substring(i+1,i+3),16)),i+=2);return o}};u.NUMERIC_REGEX=/^[0-9]*$/,u.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,u.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let d=u;e.QrSegment=u})(tt||(tt={}));(e=>{(t=>{const n=class{constructor(a,u){this.ordinal=a,this.formatBits=u}};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={}))})(tt||(tt={}));(e=>{(t=>{const n=class{constructor(a,u){this.modeBits=a,this.numBitsCharCount=u}numCharCountBits(a){return this.numBitsCharCount[Math.floor((a+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={}))})(tt||(tt={}));var lt=tt;/**
|
|
58
|
+
* @license qrcode.react
|
|
59
|
+
* Copyright (c) Paul O'Shannessy
|
|
60
|
+
* SPDX-License-Identifier: ISC
|
|
61
|
+
*/var u0={L:lt.QrCode.Ecc.LOW,M:lt.QrCode.Ecc.MEDIUM,Q:lt.QrCode.Ecc.QUARTILE,H:lt.QrCode.Ecc.HIGH},Nu=128,Du="L",ku="#FFFFFF",Lu="#000000",$u=!1,Fu=1,l0=4,f0=0,d0=.1;function Bu(e,t=0){const n=[];return e.forEach(function(r,a){let u=null;r.forEach(function(d,f){if(!d&&u!==null){n.push(`M${u+t} ${a+t}h${f-u}v1H${u+t}z`),u=null;return}if(f===r.length-1){if(!d)return;u===null?n.push(`M${f+t},${a+t} h1v1H${f+t}z`):n.push(`M${u+t},${a+t} h${f+1-u}v1H${u+t}z`);return}d&&u===null&&(u=f)})}),n.join("")}function Gu(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((a,u)=>u<t.x||u>=t.x+t.w?a:!1))}function p0(e,t,n,r){if(r==null)return null;const a=e.length+n*2,u=Math.floor(t*d0),d=a/t,f=(r.width||u)*d,c=(r.height||u)*d,o=r.x==null?e.length/2-f/2:r.x*d,i=r.y==null?e.length/2-c/2:r.y*d,s=r.opacity==null?1:r.opacity;let l=null;if(r.excavate){let v=Math.floor(o),h=Math.floor(i),m=Math.ceil(f+o-v),y=Math.ceil(c+i-h);l={x:v,y:h,w:m,h:y}}const p=r.crossOrigin;return{x:o,y:i,h:c,w:f,excavation:l,opacity:s,crossOrigin:p}}function h0(e,t){return t!=null?Math.max(Math.floor(t),0):e?l0:f0}function Uu({value:e,level:t,minVersion:n,includeMargin:r,marginSize:a,imageSettings:u,size:d,boostLevel:f}){let c=S.useMemo(()=>{const v=(Array.isArray(e)?e:[e]).reduce((h,m)=>(h.push(...lt.QrSegment.makeSegments(m)),h),[]);return lt.QrCode.encodeSegments(v,u0[t],n,void 0,void 0,f)},[e,t,n,f]);const{cells:o,margin:i,numCells:s,calculatedImageSettings:l}=S.useMemo(()=>{let p=c.getModules();const v=h0(r,a),h=p.length+v*2,m=p0(p,d,v,u);return{cells:p,margin:v,numCells:h,calculatedImageSettings:m}},[c,d,u,r,a]);return{qrcode:c,margin:i,cells:o,numCells:s,calculatedImageSettings:l}}var v0=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),m0=S.forwardRef(function(t,n){const r=t,{value:a,size:u=Nu,level:d=Du,bgColor:f=ku,fgColor:c=Lu,includeMargin:o=$u,minVersion:i=Fu,boostLevel:s,marginSize:l,imageSettings:p}=r,h=io(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:m}=h,y=io(h,["style"]),E=p==null?void 0:p.src,b=S.useRef(null),_=S.useRef(null),w=S.useCallback(D=>{b.current=D,typeof n=="function"?n(D):n&&(n.current=D)},[n]),[P,O]=S.useState(!1),{margin:M,cells:C,numCells:I,calculatedImageSettings:N}=Uu({value:a,level:d,minVersion:i,boostLevel:s,includeMargin:o,marginSize:l,imageSettings:p,size:u});S.useEffect(()=>{if(b.current!=null){const D=b.current,H=D.getContext("2d");if(!H)return;let F=C;const Q=_.current,z=N!=null&&Q!==null&&Q.complete&&Q.naturalHeight!==0&&Q.naturalWidth!==0;z&&N.excavation!=null&&(F=Gu(C,N.excavation));const k=window.devicePixelRatio||1;D.height=D.width=u*k;const R=u/I*k;H.scale(R,R),H.fillStyle=f,H.fillRect(0,0,I,I),H.fillStyle=c,v0?H.fill(new Path2D(Bu(F,M))):C.forEach(function(T,W){T.forEach(function(Y,q){Y&&H.fillRect(q+M,W+M,1,1)})}),N&&(H.globalAlpha=N.opacity),z&&H.drawImage(Q,N.x+M,N.y+M,N.w,N.h)}}),S.useEffect(()=>{O(!1)},[E]);const L=oo({height:u,width:u},m);let $=null;return E!=null&&($=S.createElement("img",{src:E,key:E,style:{display:"none"},onLoad:()=>{O(!0)},ref:_,crossOrigin:N==null?void 0:N.crossOrigin})),S.createElement(S.Fragment,null,S.createElement("canvas",oo({style:L,height:u,width:u,ref:w,role:"img"},y)),$)});m0.displayName="QRCodeCanvas";var zu=S.forwardRef(function(t,n){const r=t,{value:a,size:u=Nu,level:d=Du,bgColor:f=ku,fgColor:c=Lu,includeMargin:o=$u,minVersion:i=Fu,boostLevel:s,title:l,marginSize:p,imageSettings:v}=r,h=io(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:m,cells:y,numCells:E,calculatedImageSettings:b}=Uu({value:a,level:d,minVersion:i,boostLevel:s,includeMargin:o,marginSize:p,imageSettings:v,size:u});let _=y,w=null;v!=null&&b!=null&&(b.excavation!=null&&(_=Gu(y,b.excavation)),w=S.createElement("image",{href:v.src,height:b.h,width:b.w,x:b.x+m,y:b.y+m,preserveAspectRatio:"none",opacity:b.opacity,crossOrigin:b.crossOrigin}));const P=Bu(_,m);return S.createElement("svg",oo({height:u,width:u,viewBox:`0 0 ${E} ${E}`,ref:n,role:"img"},h),!!l&&S.createElement("title",null,l),S.createElement("path",{fill:f,d:`M0,0 h${E}v${E}H0z`,shapeRendering:"crispEdges"}),S.createElement("path",{fill:c,d:P,shapeRendering:"crispEdges"}),w)});zu.displayName="QRCodeSVG";var nn={},bt={},rn={},Si;function xe(){if(Si)return rn;Si=1,Object.defineProperty(rn,"__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,a){e(this,n),this.data=r,this.text=a.text||r,this.options=a};return rn.default=t,rn}var Ci;function g0(){if(Ci)return bt;Ci=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.CODE39=void 0;var e=(function(){function h(m,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(m,b.key,b)}}return function(m,y,E){return y&&h(m.prototype,y),E&&h(m,E),m}})(),t=xe(),n=r(t);function r(h){return h&&h.__esModule?h:{default:h}}function a(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")}function u(h,m){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:h}function d(h,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);h.prototype=Object.create(m&&m.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(h,m):h.__proto__=m)}var f=(function(h){d(m,h);function m(y,E){return a(this,m),y=y.toUpperCase(),E.mod43&&(y+=l(v(y))),u(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,y,E))}return e(m,[{key:"encode",value:function(){for(var E=i("*"),b=0;b<this.data.length;b++)E+=i(this.data[b])+"0";return E+=i("*"),{data:E,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),m})(n.default),c=["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","-","."," ","$","/","+","%","*"],o=[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 i(h){return s(p(h))}function s(h){return o[h].toString(2)}function l(h){return c[h]}function p(h){return c.indexOf(h)}function v(h){for(var m=0,y=0;y<h.length;y++)m+=p(h[y]);return m=m%43,m}return bt.CODE39=f,bt}var _e={},on={},an={},ae={},Oi;function Vt(){if(Oi)return ae;Oi=1,Object.defineProperty(ae,"__esModule",{value:!0});var e;function t(c,o,i){return o in c?Object.defineProperty(c,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):c[o]=i,c}var n=ae.SET_A=0,r=ae.SET_B=1,a=ae.SET_C=2;ae.SHIFT=98;var u=ae.START_A=103,d=ae.START_B=104,f=ae.START_C=105;return ae.MODULO=103,ae.STOP=106,ae.FNC1=207,ae.SET_BY_CODE=(e={},t(e,u,n),t(e,d,r),t(e,f,a),e),ae.SWAP={101:n,100:r,99:a},ae.A_START_CHAR="Ð",ae.B_START_CHAR="Ñ",ae.C_START_CHAR="Ò",ae.A_CHARS="[\0-_È-Ï]",ae.B_CHARS="[ -È-Ï]",ae.C_CHARS="(Ï*[0-9]{2}Ï*)",ae.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],ae}var Pi;function wr(){if(Pi)return an;Pi=1,Object.defineProperty(an,"__esModule",{value:!0});var e=(function(){function o(i,s){for(var l=0;l<s.length;l++){var p=s[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,s,l){return s&&o(i.prototype,s),l&&o(i,l),i}})(),t=xe(),n=a(t),r=Vt();function a(o){return o&&o.__esModule?o:{default:o}}function u(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function d(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function f(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var c=(function(o){f(i,o);function i(s,l){u(this,i);var p=d(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,s.substring(1),l));return p.bytes=s.split("").map(function(v){return v.charCodeAt(0)}),p}return e(i,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var l=this.bytes,p=l.shift()-105,v=r.SET_BY_CODE[p];if(v===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&l.unshift(r.FNC1);var h=i.next(l,1,v);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:i.getBar(p)+h.result+i.getBar((h.checksum+p)%r.MODULO)+i.getBar(r.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var l=this.options.ean128||!1;return typeof l=="string"&&(l=l.toLowerCase()==="true"),l}}],[{key:"getBar",value:function(l){return r.BARS[l]?r.BARS[l].toString():""}},{key:"correctIndex",value:function(l,p){if(p===r.SET_A){var v=l.shift();return v<32?v+64:v-32}else return p===r.SET_B?l.shift()-32:(l.shift()-48)*10+l.shift()-48}},{key:"next",value:function(l,p,v){if(!l.length)return{result:"",checksum:0};var h=void 0,m=void 0;if(l[0]>=200){m=l.shift()-105;var y=r.SWAP[m];y!==void 0?h=i.next(l,p+1,y):((v===r.SET_A||v===r.SET_B)&&m===r.SHIFT&&(l[0]=v===r.SET_A?l[0]>95?l[0]-96:l[0]:l[0]<32?l[0]+96:l[0]),h=i.next(l,p+1,v))}else m=i.correctIndex(l,v),h=i.next(l,p+1,v);var E=i.getBar(m),b=m*p;return{result:E+h.result,checksum:b+h.checksum}}}]),i})(n.default);return an.default=c,an}var sn={},Ai;function x0(){if(Ai)return sn;Ai=1,Object.defineProperty(sn,"__esModule",{value:!0});var e=Vt(),t=function(f){return f.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},n=function(f){return f.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},r=function(f){return f.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function a(d,f){var c=f?e.A_CHARS:e.B_CHARS,o=d.match(new RegExp("^("+c+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(o)return o[1]+"Ì"+u(d.substring(o[1].length));var i=d.match(new RegExp("^"+c+"+"))[0];return i.length===d.length?d:i+String.fromCharCode(f?205:206)+a(d.substring(i.length),!f)}function u(d){var f=r(d),c=f.length;if(c===d.length)return d;d=d.substring(c);var o=t(d)>=n(d);return f+String.fromCharCode(o?206:205)+a(d,o)}return sn.default=function(d){var f=void 0,c=r(d).length;if(c>=2)f=e.C_START_CHAR+u(d);else{var o=t(d)>n(d);f=(o?e.A_START_CHAR:e.B_START_CHAR)+a(d,o)}return f.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(i,s){return"Ë"+s})},sn}var ji;function y0(){if(ji)return on;ji=1,Object.defineProperty(on,"__esModule",{value:!0});var e=wr(),t=a(e),n=x0(),r=a(n);function a(o){return o&&o.__esModule?o:{default:o}}function u(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function d(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function f(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var c=(function(o){f(i,o);function i(s,l){if(u(this,i),/^[\x00-\x7F\xC8-\xD3]+$/.test(s))var p=d(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,(0,r.default)(s),l));else var p=d(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,s,l));return d(p)}return i})(t.default);return on.default=c,on}var cn={},Mi;function E0(){if(Mi)return cn;Mi=1,Object.defineProperty(cn,"__esModule",{value:!0});var e=(function(){function o(i,s){for(var l=0;l<s.length;l++){var p=s[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,s,l){return s&&o(i.prototype,s),l&&o(i,l),i}})(),t=wr(),n=a(t),r=Vt();function a(o){return o&&o.__esModule?o:{default:o}}function u(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function d(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function f(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var c=(function(o){f(i,o);function i(s,l){return u(this,i),d(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,r.A_START_CHAR+s,l))}return e(i,[{key:"valid",value:function(){return new RegExp("^"+r.A_CHARS+"+$").test(this.data)}}]),i})(n.default);return cn.default=c,cn}var un={},Ti;function b0(){if(Ti)return un;Ti=1,Object.defineProperty(un,"__esModule",{value:!0});var e=(function(){function o(i,s){for(var l=0;l<s.length;l++){var p=s[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,s,l){return s&&o(i.prototype,s),l&&o(i,l),i}})(),t=wr(),n=a(t),r=Vt();function a(o){return o&&o.__esModule?o:{default:o}}function u(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function d(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function f(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var c=(function(o){f(i,o);function i(s,l){return u(this,i),d(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,r.B_START_CHAR+s,l))}return e(i,[{key:"valid",value:function(){return new RegExp("^"+r.B_CHARS+"+$").test(this.data)}}]),i})(n.default);return un.default=c,un}var ln={},Ii;function w0(){if(Ii)return ln;Ii=1,Object.defineProperty(ln,"__esModule",{value:!0});var e=(function(){function o(i,s){for(var l=0;l<s.length;l++){var p=s[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,s,l){return s&&o(i.prototype,s),l&&o(i,l),i}})(),t=wr(),n=a(t),r=Vt();function a(o){return o&&o.__esModule?o:{default:o}}function u(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function d(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function f(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var c=(function(o){f(i,o);function i(s,l){return u(this,i),d(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,r.C_START_CHAR+s,l))}return e(i,[{key:"valid",value:function(){return new RegExp("^"+r.C_CHARS+"+$").test(this.data)}}]),i})(n.default);return ln.default=c,ln}var Ni;function _0(){if(Ni)return _e;Ni=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.CODE128C=_e.CODE128B=_e.CODE128A=_e.CODE128=void 0;var e=y0(),t=c(e),n=E0(),r=c(n),a=b0(),u=c(a),d=w0(),f=c(d);function c(o){return o&&o.__esModule?o:{default:o}}return _e.CODE128=t.default,_e.CODE128A=r.default,_e.CODE128B=u.default,_e.CODE128C=f.default,_e}var le={},fn={},ke={},Di;function qt(){return Di||(Di=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.SIDE_BIN="101",ke.MIDDLE_BIN="01010",ke.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"]},ke.EAN2_STRUCTURE=["LL","LG","GL","GG"],ke.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],ke.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]),ke}var dn={},pn={},ki;function Ht(){if(ki)return pn;ki=1,Object.defineProperty(pn,"__esModule",{value:!0});var e=qt(),t=function(r,a,u){var d=r.split("").map(function(c,o){return e.BINARIES[a[o]]}).map(function(c,o){return c?c[r[o]]:""});if(u){var f=r.length-1;d=d.map(function(c,o){return o<f?c+u:c})}return d.join("")};return pn.default=t,pn}var Li;function Vu(){if(Li)return dn;Li=1,Object.defineProperty(dn,"__esModule",{value:!0});var e=(function(){function s(l,p){for(var v=0;v<p.length;v++){var h=p[v];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(l,h.key,h)}}return function(l,p,v){return p&&s(l.prototype,p),v&&s(l,v),l}})(),t=qt(),n=Ht(),r=d(n),a=xe(),u=d(a);function d(s){return s&&s.__esModule?s:{default:s}}function f(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")}function c(s,l){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:s}function o(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);s.prototype=Object.create(l&&l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(s,l):s.__proto__=l)}var i=(function(s){o(l,s);function l(p,v){f(this,l);var h=c(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,p,v));return h.fontSize=!v.flat&&v.fontSize>v.width*10?v.width*10:v.fontSize,h.guardHeight=v.height+h.fontSize/2+v.textMargin,h}return e(l,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(v,h){return this.text.substr(v,h)}},{key:"leftEncode",value:function(v,h){return(0,r.default)(v,h)}},{key:"rightText",value:function(v,h){return this.text.substr(v,h)}},{key:"rightEncode",value:function(v,h){return(0,r.default)(v,h)}},{key:"encodeGuarded",value:function(){var v={fontSize:this.fontSize},h={height:this.guardHeight};return[{data:t.SIDE_BIN,options:h},{data:this.leftEncode(),text:this.leftText(),options:v},{data:t.MIDDLE_BIN,options:h},{data:this.rightEncode(),text:this.rightText(),options:v},{data:t.SIDE_BIN,options:h}]}},{key:"encodeFlat",value:function(){var v=[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN];return{data:v.join(""),text:this.text}}}]),l})(u.default);return dn.default=i,dn}var $i;function R0(){if($i)return fn;$i=1,Object.defineProperty(fn,"__esModule",{value:!0});var e=(function(){function s(l,p){for(var v=0;v<p.length;v++){var h=p[v];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(l,h.key,h)}}return function(l,p,v){return p&&s(l.prototype,p),v&&s(l,v),l}})(),t=function s(l,p,v){l===null&&(l=Function.prototype);var h=Object.getOwnPropertyDescriptor(l,p);if(h===void 0){var m=Object.getPrototypeOf(l);return m===null?void 0:s(m,p,v)}else{if("value"in h)return h.value;var y=h.get;return y===void 0?void 0:y.call(v)}},n=qt(),r=Vu(),a=u(r);function u(s){return s&&s.__esModule?s:{default:s}}function d(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")}function f(s,l){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:s}function c(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);s.prototype=Object.create(l&&l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(s,l):s.__proto__=l)}var o=function(l){var p=l.substr(0,12).split("").map(function(v){return+v}).reduce(function(v,h,m){return m%2?v+h*3:v+h},0);return(10-p%10)%10},i=(function(s){c(l,s);function l(p,v){d(this,l),p.search(/^[0-9]{12}$/)!==-1&&(p+=o(p));var h=f(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,p,v));return h.lastChar=v.lastChar,h}return e(l,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===o(this.data)}},{key:"leftText",value:function(){return t(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var v=this.data.substr(1,6),h=n.EAN13_STRUCTURE[this.data[0]];return t(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"leftEncode",this).call(this,v,h)}},{key:"rightText",value:function(){return t(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var v=this.data.substr(7,6);return t(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"rightEncode",this).call(this,v,"RRRRRR")}},{key:"encodeGuarded",value:function(){var v=t(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(v.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(v.push({data:"00"}),v.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),v}}]),l})(a.default);return fn.default=i,fn}var hn={},Fi;function S0(){if(Fi)return hn;Fi=1,Object.defineProperty(hn,"__esModule",{value:!0});var e=(function(){function i(s,l){for(var p=0;p<l.length;p++){var v=l[p];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(s,v.key,v)}}return function(s,l,p){return l&&i(s.prototype,l),p&&i(s,p),s}})(),t=function i(s,l,p){s===null&&(s=Function.prototype);var v=Object.getOwnPropertyDescriptor(s,l);if(v===void 0){var h=Object.getPrototypeOf(s);return h===null?void 0:i(h,l,p)}else{if("value"in v)return v.value;var m=v.get;return m===void 0?void 0:m.call(p)}},n=Vu(),r=a(n);function a(i){return i&&i.__esModule?i:{default:i}}function u(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")}function d(i,s){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:i}function f(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(i,s):i.__proto__=s)}var c=function(s){var l=s.substr(0,7).split("").map(function(p){return+p}).reduce(function(p,v,h){return h%2?p+v:p+v*3},0);return(10-l%10)%10},o=(function(i){f(s,i);function s(l,p){return u(this,s),l.search(/^[0-9]{7}$/)!==-1&&(l+=c(l)),d(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,l,p))}return e(s,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===c(this.data)}},{key:"leftText",value:function(){return t(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var p=this.data.substr(0,4);return t(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"leftEncode",this).call(this,p,"LLLL")}},{key:"rightText",value:function(){return t(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var p=this.data.substr(4,4);return t(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"rightEncode",this).call(this,p,"RRRR")}}]),s})(r.default);return hn.default=o,hn}var vn={},Bi;function C0(){if(Bi)return vn;Bi=1,Object.defineProperty(vn,"__esModule",{value:!0});var e=(function(){function l(p,v){for(var h=0;h<v.length;h++){var m=v[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,v,h){return v&&l(p.prototype,v),h&&l(p,h),p}})(),t=qt(),n=Ht(),r=d(n),a=xe(),u=d(a);function d(l){return l&&l.__esModule?l:{default:l}}function f(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}function c(l,p){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:l}function o(l,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);l.prototype=Object.create(p&&p.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(l,p):l.__proto__=p)}var i=function(p){var v=p.split("").map(function(h){return+h}).reduce(function(h,m,y){return y%2?h+m*9:h+m*3},0);return v%10},s=(function(l){o(p,l);function p(v,h){return f(this,p),c(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,v,h))}return e(p,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var h=t.EAN5_STRUCTURE[i(this.data)];return{data:"1011"+(0,r.default)(this.data,h,"01"),text:this.text}}}]),p})(u.default);return vn.default=s,vn}var mn={},Gi;function O0(){if(Gi)return mn;Gi=1,Object.defineProperty(mn,"__esModule",{value:!0});var e=(function(){function s(l,p){for(var v=0;v<p.length;v++){var h=p[v];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(l,h.key,h)}}return function(l,p,v){return p&&s(l.prototype,p),v&&s(l,v),l}})(),t=qt(),n=Ht(),r=d(n),a=xe(),u=d(a);function d(s){return s&&s.__esModule?s:{default:s}}function f(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")}function c(s,l){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:s}function o(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);s.prototype=Object.create(l&&l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(s,l):s.__proto__=l)}var i=(function(s){o(l,s);function l(p,v){return f(this,l),c(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,p,v))}return e(l,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var v=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,r.default)(this.data,v,"01"),text:this.text}}}]),l})(u.default);return mn.default=i,mn}var wt={},Ui;function qu(){if(Ui)return wt;Ui=1,Object.defineProperty(wt,"__esModule",{value:!0});var e=(function(){function s(l,p){for(var v=0;v<p.length;v++){var h=p[v];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(l,h.key,h)}}return function(l,p,v){return p&&s(l.prototype,p),v&&s(l,v),l}})();wt.checksum=i;var t=Ht(),n=u(t),r=xe(),a=u(r);function u(s){return s&&s.__esModule?s:{default:s}}function d(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")}function f(s,l){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:s}function c(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);s.prototype=Object.create(l&&l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(s,l):s.__proto__=l)}var o=(function(s){c(l,s);function l(p,v){d(this,l),p.search(/^[0-9]{11}$/)!==-1&&(p+=i(p));var h=f(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,p,v));return h.displayValue=v.displayValue,v.fontSize>v.width*10?h.fontSize=v.width*10:h.fontSize=v.fontSize,h.guardHeight=v.height+h.fontSize/2+v.textMargin,h}return e(l,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==i(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var v="";return v+="101",v+=(0,n.default)(this.data.substr(0,6),"LLLLLL"),v+="01010",v+=(0,n.default)(this.data.substr(6,6),"RRRRRR"),v+="101",{data:v,text:this.text}}},{key:"guardedEncoding",value:function(){var v=[];return this.displayValue&&v.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),v.push({data:"101"+(0,n.default)(this.data[0],"L"),options:{height:this.guardHeight}}),v.push({data:(0,n.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),v.push({data:"01010",options:{height:this.guardHeight}}),v.push({data:(0,n.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),v.push({data:(0,n.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&v.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),v}}]),l})(a.default);function i(s){var l=0,p;for(p=1;p<11;p+=2)l+=parseInt(s[p]);for(p=0;p<11;p+=2)l+=parseInt(s[p])*3;return(10-l%10)%10}return wt.default=o,wt}var gn={},zi;function P0(){if(zi)return gn;zi=1,Object.defineProperty(gn,"__esModule",{value:!0});var e=(function(){function v(h,m){for(var y=0;y<m.length;y++){var E=m[y];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(h,E.key,E)}}return function(h,m,y){return m&&v(h.prototype,m),y&&v(h,y),h}})(),t=Ht(),n=d(t),r=xe(),a=d(r),u=qu();function d(v){return v&&v.__esModule?v:{default:v}}function f(v,h){if(!(v instanceof h))throw new TypeError("Cannot call a class as a function")}function c(v,h){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:v}function o(v,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);v.prototype=Object.create(h&&h.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(v,h):v.__proto__=h)}var i=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],s=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],l=(function(v){o(h,v);function h(m,y){f(this,h);var E=c(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,m,y));if(E.isValid=!1,m.search(/^[0-9]{6}$/)!==-1)E.middleDigits=m,E.upcA=p(m,"0"),E.text=y.text||""+E.upcA[0]+m+E.upcA[E.upcA.length-1],E.isValid=!0;else if(m.search(/^[01][0-9]{7}$/)!==-1)if(E.middleDigits=m.substring(1,m.length-1),E.upcA=p(E.middleDigits,m[0]),E.upcA[E.upcA.length-1]===m[m.length-1])E.isValid=!0;else return c(E);else return c(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(h,[{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=s[parseInt(E)][parseInt(y)];return(0,n.default)(this.middleDigits,b)}}]),h})(a.default);function p(v,h){for(var m=parseInt(v[v.length-1]),y=i[m],E="",b=0,_=0;_<y.length;_++){var w=y[_];w==="X"?E+=v[b++]:E+=w}return E=""+h+E,""+E+(0,u.checksum)(E)}return gn.default=l,gn}var Vi;function A0(){if(Vi)return le;Vi=1,Object.defineProperty(le,"__esModule",{value:!0}),le.UPCE=le.UPC=le.EAN2=le.EAN5=le.EAN8=le.EAN13=void 0;var e=R0(),t=l(e),n=S0(),r=l(n),a=C0(),u=l(a),d=O0(),f=l(d),c=qu(),o=l(c),i=P0(),s=l(i);function l(p){return p&&p.__esModule?p:{default:p}}return le.EAN13=t.default,le.EAN8=r.default,le.EAN5=u.default,le.EAN2=f.default,le.UPC=o.default,le.UPCE=s.default,le}var Xe={},xn={},st={},qi;function j0(){return qi||(qi=1,Object.defineProperty(st,"__esModule",{value:!0}),st.START_BIN="1010",st.END_BIN="11101",st.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]),st}var Hi;function Hu(){if(Hi)return xn;Hi=1,Object.defineProperty(xn,"__esModule",{value:!0});var e=(function(){function o(i,s){for(var l=0;l<s.length;l++){var p=s[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,s,l){return s&&o(i.prototype,s),l&&o(i,l),i}})(),t=j0(),n=xe(),r=a(n);function a(o){return o&&o.__esModule?o:{default:o}}function u(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function d(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function f(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var c=(function(o){f(i,o);function i(){return u(this,i),d(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return e(i,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var l=this,p=this.data.match(/.{2}/g).map(function(v){return l.encodePair(v)}).join("");return{data:t.START_BIN+p+t.END_BIN,text:this.text}}},{key:"encodePair",value:function(l){var p=t.BINARIES[l[1]];return t.BINARIES[l[0]].split("").map(function(v,h){return(v==="1"?"111":"1")+(p[h]==="1"?"000":"0")}).join("")}}]),i})(r.default);return xn.default=c,xn}var yn={},Wi;function M0(){if(Wi)return yn;Wi=1,Object.defineProperty(yn,"__esModule",{value:!0});var e=(function(){function o(i,s){for(var l=0;l<s.length;l++){var p=s[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,s,l){return s&&o(i.prototype,s),l&&o(i,l),i}})(),t=Hu(),n=r(t);function r(o){return o&&o.__esModule?o:{default:o}}function a(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function u(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function d(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var f=function(i){var s=i.substr(0,13).split("").map(function(l){return parseInt(l,10)}).reduce(function(l,p,v){return l+p*(3-v%2*2)},0);return Math.ceil(s/10)*10-s},c=(function(o){d(i,o);function i(s,l){return a(this,i),s.search(/^[0-9]{13}$/)!==-1&&(s+=f(s)),u(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,s,l))}return e(i,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===f(this.data)}}]),i})(n.default);return yn.default=c,yn}var Xi;function T0(){if(Xi)return Xe;Xi=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.ITF14=Xe.ITF=void 0;var e=Hu(),t=a(e),n=M0(),r=a(n);function a(u){return u&&u.__esModule?u:{default:u}}return Xe.ITF=t.default,Xe.ITF14=r.default,Xe}var de={},En={},Ki;function Wt(){if(Ki)return En;Ki=1,Object.defineProperty(En,"__esModule",{value:!0});var e=(function(){function o(i,s){for(var l=0;l<s.length;l++){var p=s[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,s,l){return s&&o(i.prototype,s),l&&o(i,l),i}})(),t=xe(),n=r(t);function r(o){return o&&o.__esModule?o:{default:o}}function a(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function u(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function d(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var f=(function(o){d(i,o);function i(s,l){return a(this,i),u(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,s,l))}return e(i,[{key:"encode",value:function(){for(var l="110",p=0;p<this.data.length;p++){var v=parseInt(this.data[p]),h=v.toString(2);h=c(h,4-h.length);for(var m=0;m<h.length;m++)l+=h[m]=="0"?"100":"110"}return l+="1001",{data:l,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),i})(n.default);function c(o,i){for(var s=0;s<i;s++)o="0"+o;return o}return En.default=f,En}var bn={},_t={},Yi;function _r(){if(Yi)return _t;Yi=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.mod10=e,_t.mod11=t;function e(n){for(var r=0,a=0;a<n.length;a++){var u=parseInt(n[a]);(a+n.length)%2===0?r+=u:r+=u*2%10+Math.floor(u*2/10)}return(10-r%10)%10}function t(n){for(var r=0,a=[2,3,4,5,6,7],u=0;u<n.length;u++){var d=parseInt(n[n.length-1-u]);r+=a[u%a.length]*d}return(11-r%11)%11}return _t}var Qi;function I0(){if(Qi)return bn;Qi=1,Object.defineProperty(bn,"__esModule",{value:!0});var e=Wt(),t=r(e),n=_r();function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function u(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function d(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var f=(function(c){d(o,c);function o(i,s){return a(this,o),u(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i+(0,n.mod10)(i),s))}return o})(t.default);return bn.default=f,bn}var wn={},Zi;function N0(){if(Zi)return wn;Zi=1,Object.defineProperty(wn,"__esModule",{value:!0});var e=Wt(),t=r(e),n=_r();function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function u(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function d(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var f=(function(c){d(o,c);function o(i,s){return a(this,o),u(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i+(0,n.mod11)(i),s))}return o})(t.default);return wn.default=f,wn}var _n={},Ji;function D0(){if(Ji)return _n;Ji=1,Object.defineProperty(_n,"__esModule",{value:!0});var e=Wt(),t=r(e),n=_r();function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function u(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function d(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var f=(function(c){d(o,c);function o(i,s){return a(this,o),i+=(0,n.mod10)(i),i+=(0,n.mod10)(i),u(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i,s))}return o})(t.default);return _n.default=f,_n}var Rn={},ea;function k0(){if(ea)return Rn;ea=1,Object.defineProperty(Rn,"__esModule",{value:!0});var e=Wt(),t=r(e),n=_r();function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function u(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function d(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var f=(function(c){d(o,c);function o(i,s){return a(this,o),i+=(0,n.mod11)(i),i+=(0,n.mod10)(i),u(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i,s))}return o})(t.default);return Rn.default=f,Rn}var ta;function L0(){if(ta)return de;ta=1,Object.defineProperty(de,"__esModule",{value:!0}),de.MSI1110=de.MSI1010=de.MSI11=de.MSI10=de.MSI=void 0;var e=Wt(),t=i(e),n=I0(),r=i(n),a=N0(),u=i(a),d=D0(),f=i(d),c=k0(),o=i(c);function i(s){return s&&s.__esModule?s:{default:s}}return de.MSI=t.default,de.MSI10=r.default,de.MSI11=u.default,de.MSI1010=f.default,de.MSI1110=o.default,de}var Rt={},na;function $0(){if(na)return Rt;na=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.pharmacode=void 0;var e=(function(){function c(o,i){for(var s=0;s<i.length;s++){var l=i[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,i,s){return i&&c(o.prototype,i),s&&c(o,s),o}})(),t=xe(),n=r(t);function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function u(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function d(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var f=(function(c){d(o,c);function o(i,s){a(this,o);var l=u(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i,s));return l.number=parseInt(i,10),l}return e(o,[{key:"encode",value:function(){for(var s=this.number,l="";!isNaN(s)&&s!=0;)s%2===0?(l="11100"+l,s=(s-2)/2):(l="100"+l,s=(s-1)/2);return l=l.slice(0,-2),{data:l,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),o})(n.default);return Rt.pharmacode=f,Rt}var St={},ra;function F0(){if(ra)return St;ra=1,Object.defineProperty(St,"__esModule",{value:!0}),St.codabar=void 0;var e=(function(){function c(o,i){for(var s=0;s<i.length;s++){var l=i[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,i,s){return i&&c(o.prototype,i),s&&c(o,s),o}})(),t=xe(),n=r(t);function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function u(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function d(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var f=(function(c){d(o,c);function o(i,s){a(this,o),i.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(i="A"+i+"A");var l=u(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i.toUpperCase(),s));return l.text=l.options.text||l.text.replace(/[A-D]/g,""),l}return e(o,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var s=[],l=this.getEncodings(),p=0;p<this.data.length;p++)s.push(l[this.data.charAt(p)]),p!==this.data.length-1&&s.push("0");return{text:this.text,data:s.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"}}}]),o})(n.default);return St.codabar=f,St}var Ke={},Sn={},ct={},oa;function B0(){return oa||(oa=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.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","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],ct.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"],ct.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"]}),ct}var ia;function Wu(){if(ia)return Sn;ia=1,Object.defineProperty(Sn,"__esModule",{value:!0});var e=(function(){function o(i,s){for(var l=0;l<s.length;l++){var p=s[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}return function(i,s,l){return s&&o(i.prototype,s),l&&o(i,l),i}})(),t=B0(),n=xe(),r=a(n);function a(o){return o&&o.__esModule?o:{default:o}}function u(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function d(o,i){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:o}function f(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(o,i):o.__proto__=i)}var c=(function(o){f(i,o);function i(s,l){return u(this,i),d(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,s,l))}return e(i,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var l=this.data.split("").flatMap(function(m){return t.MULTI_SYMBOLS[m]||m}),p=l.map(function(m){return i.getEncoding(m)}).join(""),v=i.checksum(l,20),h=i.checksum(l.concat(v),15);return{text:this.text,data:i.getEncoding("ÿ")+p+i.getEncoding(v)+i.getEncoding(h)+i.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(l){return t.BINARIES[i.symbolValue(l)]}},{key:"getSymbol",value:function(l){return t.SYMBOLS[l]}},{key:"symbolValue",value:function(l){return t.SYMBOLS.indexOf(l)}},{key:"checksum",value:function(l,p){var v=l.slice().reverse().reduce(function(h,m,y){var E=y%p+1;return h+i.symbolValue(m)*E},0);return i.getSymbol(v%47)}}]),i})(r.default);return Sn.default=c,Sn}var Cn={},aa;function G0(){if(aa)return Cn;aa=1,Object.defineProperty(Cn,"__esModule",{value:!0});var e=(function(){function c(o,i){for(var s=0;s<i.length;s++){var l=i[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,i,s){return i&&c(o.prototype,i),s&&c(o,s),o}})(),t=Wu(),n=r(t);function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function u(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function d(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var f=(function(c){d(o,c);function o(i,s){return a(this,o),u(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i,s))}return e(o,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),o})(n.default);return Cn.default=f,Cn}var sa;function U0(){if(sa)return Ke;sa=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.CODE93FullASCII=Ke.CODE93=void 0;var e=Wu(),t=a(e),n=G0(),r=a(n);function a(u){return u&&u.__esModule?u:{default:u}}return Ke.CODE93=t.default,Ke.CODE93FullASCII=r.default,Ke}var Ct={},ca;function z0(){if(ca)return Ct;ca=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.GenericBarcode=void 0;var e=(function(){function c(o,i){for(var s=0;s<i.length;s++){var l=i[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,i,s){return i&&c(o.prototype,i),s&&c(o,s),o}})(),t=xe(),n=r(t);function r(c){return c&&c.__esModule?c:{default:c}}function a(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function u(c,o){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:c}function d(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);c.prototype=Object.create(o&&o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(c,o):c.__proto__=o)}var f=(function(c){d(o,c);function o(i,s){return a(this,o),u(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i,s))}return e(o,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),o})(n.default);return Ct.GenericBarcode=f,Ct}var ua;function V0(){if(ua)return nn;ua=1,Object.defineProperty(nn,"__esModule",{value:!0});var e=g0(),t=_0(),n=A0(),r=T0(),a=L0(),u=$0(),d=F0(),f=U0(),c=z0();return nn.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:a.MSI,MSI10:a.MSI10,MSI11:a.MSI11,MSI1010:a.MSI1010,MSI1110:a.MSI1110,pharmacode:u.pharmacode,codabar:d.codabar,CODE93:f.CODE93,CODE93FullASCII:f.CODE93FullASCII,GenericBarcode:c.GenericBarcode},nn}var On={},la;function Rr(){if(la)return On;la=1,Object.defineProperty(On,"__esModule",{value:!0});var e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t};return On.default=function(t,n){return e({},t,n)},On}var Pn={},fa;function q0(){if(fa)return Pn;fa=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.default=e;function e(t){var n=[];function r(a){if(Array.isArray(a))for(var u=0;u<a.length;u++)r(a[u]);else a.text=a.text||"",a.data=a.data||"",n.push(a)}return r(t),n}return Pn}var An={},da;function H0(){if(da)return An;da=1,Object.defineProperty(An,"__esModule",{value:!0}),An.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 An}var jn={},Mn={},Tn={},pa;function Xu(){if(pa)return Tn;pa=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.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 Tn}var In={},ha;function Ku(){if(ha)return In;ha=1,Object.defineProperty(In,"__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 In.default=e,In}var va;function W0(){if(va)return Mn;va=1,Object.defineProperty(Mn,"__esModule",{value:!0});var e=Xu(),t=a(e),n=Ku(),r=a(n);function a(d){return d&&d.__esModule?d:{default:d}}function u(d){var f={};for(var c in r.default)r.default.hasOwnProperty(c)&&(d.hasAttribute("jsbarcode-"+c.toLowerCase())&&(f[c]=d.getAttribute("jsbarcode-"+c.toLowerCase())),d.hasAttribute("data-"+c.toLowerCase())&&(f[c]=d.getAttribute("data-"+c.toLowerCase())));return f.value=d.getAttribute("jsbarcode-value")||d.getAttribute("data-value"),f=(0,t.default)(f),f}return Mn.default=u,Mn}var Nn={},Dn={},pe={},ma;function Yu(){if(ma)return pe;ma=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.getTotalWidthOfEncodings=pe.calculateEncodingAttributes=pe.getBarcodePadding=pe.getEncodingHeight=pe.getMaximumHeightOfEncodings=void 0;var e=Rr(),t=n(e);function n(o){return o&&o.__esModule?o:{default:o}}function r(o,i){return i.height+(i.displayValue&&o.text.length>0?i.fontSize+i.textMargin:0)+i.marginTop+i.marginBottom}function a(o,i,s){if(s.displayValue&&i<o){if(s.textAlign=="center")return Math.floor((o-i)/2);if(s.textAlign=="left")return 0;if(s.textAlign=="right")return Math.floor(o-i)}return 0}function u(o,i,s){for(var l=0;l<o.length;l++){var p=o[l],v=(0,t.default)(i,p.options),h;v.displayValue?h=c(p.text,v,s):h=0;var m=p.data.length*v.width;p.width=Math.ceil(Math.max(h,m)),p.height=r(p,v),p.barcodePadding=a(h,m,v)}}function d(o){for(var i=0,s=0;s<o.length;s++)i+=o[s].width;return i}function f(o){for(var i=0,s=0;s<o.length;s++)o[s].height>i&&(i=o[s].height);return i}function c(o,i,s){var l;if(s)l=s;else if(typeof document<"u")l=document.createElement("canvas").getContext("2d");else return 0;l.font=i.fontOptions+" "+i.fontSize+"px "+i.font;var p=l.measureText(o);if(!p)return 0;var v=p.width;return v}return pe.getMaximumHeightOfEncodings=f,pe.getEncodingHeight=r,pe.getBarcodePadding=a,pe.calculateEncodingAttributes=u,pe.getTotalWidthOfEncodings=d,pe}var ga;function X0(){if(ga)return Dn;ga=1,Object.defineProperty(Dn,"__esModule",{value:!0});var e=(function(){function f(c,o){for(var i=0;i<o.length;i++){var s=o[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(c,s.key,s)}}return function(c,o,i){return o&&f(c.prototype,o),i&&f(c,i),c}})(),t=Rr(),n=a(t),r=Yu();function a(f){return f&&f.__esModule?f:{default:f}}function u(f,c){if(!(f instanceof c))throw new TypeError("Cannot call a class as a function")}var d=(function(){function f(c,o,i){u(this,f),this.canvas=c,this.encodings=o,this.options=i}return e(f,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var o=0;o<this.encodings.length;o++){var i=(0,n.default)(this.options,this.encodings[o].options);this.drawCanvasBarcode(i,this.encodings[o]),this.drawCanvasText(i,this.encodings[o]),this.moveCanvasDrawing(this.encodings[o])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var o=this.canvas.getContext("2d");o.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,o);var i=(0,r.getTotalWidthOfEncodings)(this.encodings),s=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=i+this.options.marginLeft+this.options.marginRight,this.canvas.height=s,o.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(o.fillStyle=this.options.background,o.fillRect(0,0,this.canvas.width,this.canvas.height)),o.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(o,i){var s=this.canvas.getContext("2d"),l=i.data,p;o.textPosition=="top"?p=o.marginTop+o.fontSize+o.textMargin:p=o.marginTop,s.fillStyle=o.lineColor;for(var v=0;v<l.length;v++){var h=v*o.width+i.barcodePadding;l[v]==="1"?s.fillRect(h,p,o.width,o.height):l[v]&&s.fillRect(h,p,o.width,o.height*l[v])}}},{key:"drawCanvasText",value:function(o,i){var s=this.canvas.getContext("2d"),l=o.fontOptions+" "+o.fontSize+"px "+o.font;if(o.displayValue){var p,v;o.textPosition=="top"?v=o.marginTop+o.fontSize-o.textMargin:v=o.height+o.textMargin+o.marginTop+o.fontSize,s.font=l,o.textAlign=="left"||i.barcodePadding>0?(p=0,s.textAlign="left"):o.textAlign=="right"?(p=i.width-1,s.textAlign="right"):(p=i.width/2,s.textAlign="center"),s.fillText(i.text,p,v)}}},{key:"moveCanvasDrawing",value:function(o){var i=this.canvas.getContext("2d");i.translate(o.width,0)}},{key:"restoreCanvas",value:function(){var o=this.canvas.getContext("2d");o.restore()}}]),f})();return Dn.default=d,Dn}var kn={},xa;function K0(){if(xa)return kn;xa=1,Object.defineProperty(kn,"__esModule",{value:!0});var e=(function(){function c(o,i){for(var s=0;s<i.length;s++){var l=i[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,i,s){return i&&c(o.prototype,i),s&&c(o,s),o}})(),t=Rr(),n=a(t),r=Yu();function a(c){return c&&c.__esModule?c:{default:c}}function u(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}var d="http://www.w3.org/2000/svg",f=(function(){function c(o,i,s){u(this,c),this.svg=o,this.encodings=i,this.options=s,this.document=s.xmlDocument||document}return e(c,[{key:"render",value:function(){var i=this.options.marginLeft;this.prepareSVG();for(var s=0;s<this.encodings.length;s++){var l=this.encodings[s],p=(0,n.default)(this.options,l.options),v=this.createGroup(i,p.marginTop,this.svg);this.setGroupOptions(v,p),this.drawSvgBarcode(v,p,l),this.drawSVGText(v,p,l),i+=l.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var i=(0,r.getTotalWidthOfEncodings)(this.encodings),s=(0,r.getMaximumHeightOfEncodings)(this.encodings),l=i+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(l,s),this.options.background&&this.drawRect(0,0,l,s,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(i,s,l){var p=l.data,v;s.textPosition=="top"?v=s.fontSize+s.textMargin:v=0;for(var h=0,m=0,y=0;y<p.length;y++)m=y*s.width+l.barcodePadding,p[y]==="1"?h++:h>0&&(this.drawRect(m-s.width*h,v,s.width*h,s.height,i),h=0);h>0&&this.drawRect(m-s.width*(h-1),v,s.width*h,s.height,i)}},{key:"drawSVGText",value:function(i,s,l){var p=this.document.createElementNS(d,"text");if(s.displayValue){var v,h;p.setAttribute("font-family",s.font),p.setAttribute("font-size",s.fontSize),s.fontOptions.includes("bold")&&p.setAttribute("font-weight","bold"),s.fontOptions.includes("italic")&&p.setAttribute("font-style","italic"),s.textPosition=="top"?h=s.fontSize-s.textMargin:h=s.height+s.textMargin+s.fontSize,s.textAlign=="left"||l.barcodePadding>0?(v=0,p.setAttribute("text-anchor","start")):s.textAlign=="right"?(v=l.width-1,p.setAttribute("text-anchor","end")):(v=l.width/2,p.setAttribute("text-anchor","middle")),p.setAttribute("x",v),p.setAttribute("y",h),p.appendChild(this.document.createTextNode(l.text)),i.appendChild(p)}}},{key:"setSvgAttributes",value:function(i,s){var l=this.svg;l.setAttribute("width",i+"px"),l.setAttribute("height",s+"px"),l.setAttribute("x","0px"),l.setAttribute("y","0px"),l.setAttribute("viewBox","0 0 "+i+" "+s),l.setAttribute("xmlns",d),l.setAttribute("version","1.1")}},{key:"createGroup",value:function(i,s,l){var p=this.document.createElementNS(d,"g");return p.setAttribute("transform","translate("+i+", "+s+")"),l.appendChild(p),p}},{key:"setGroupOptions",value:function(i,s){i.setAttribute("fill",s.lineColor)}},{key:"drawRect",value:function(i,s,l,p,v){var h=this.document.createElementNS(d,"rect");return h.setAttribute("x",i),h.setAttribute("y",s),h.setAttribute("width",l),h.setAttribute("height",p),v.appendChild(h),h}}]),c})();return kn.default=f,kn}var Ln={},ya;function Y0(){if(ya)return Ln;ya=1,Object.defineProperty(Ln,"__esModule",{value:!0});var e=(function(){function r(a,u){for(var d=0;d<u.length;d++){var f=u[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(a,f.key,f)}}return function(a,u,d){return u&&r(a.prototype,u),d&&r(a,d),a}})();function t(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(a,u,d){t(this,r),this.object=a,this.encodings=u,this.options=d}return e(r,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),r})();return Ln.default=n,Ln}var Ea;function Q0(){if(Ea)return Nn;Ea=1,Object.defineProperty(Nn,"__esModule",{value:!0});var e=X0(),t=d(e),n=K0(),r=d(n),a=Y0(),u=d(a);function d(f){return f&&f.__esModule?f:{default:f}}return Nn.default={CanvasRenderer:t.default,SVGRenderer:r.default,ObjectRenderer:u.default},Nn}var ut={},ba;function Qu(){if(ba)return ut;ba=1,Object.defineProperty(ut,"__esModule",{value:!0});function e(d,f){if(!(d instanceof f))throw new TypeError("Cannot call a class as a function")}function t(d,f){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:d}function n(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);d.prototype=Object.create(f&&f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(d,f):d.__proto__=f)}var r=(function(d){n(f,d);function f(c,o){e(this,f);var i=t(this,(f.__proto__||Object.getPrototypeOf(f)).call(this));return i.name="InvalidInputException",i.symbology=c,i.input=o,i.message='"'+i.input+'" is not a valid input for '+i.symbology,i}return f})(Error),a=(function(d){n(f,d);function f(){e(this,f);var c=t(this,(f.__proto__||Object.getPrototypeOf(f)).call(this));return c.name="InvalidElementException",c.message="Not supported type to render on",c}return f})(Error),u=(function(d){n(f,d);function f(){e(this,f);var c=t(this,(f.__proto__||Object.getPrototypeOf(f)).call(this));return c.name="NoElementException",c.message="No element to render on.",c}return f})(Error);return ut.InvalidInputException=r,ut.InvalidElementException=a,ut.NoElementException=u,ut}var wa;function Z0(){if(wa)return jn;wa=1,Object.defineProperty(jn,"__esModule",{value:!0});var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t=W0(),n=d(t),r=Q0(),a=d(r),u=Qu();function d(i){return i&&i.__esModule?i:{default:i}}function f(i){if(typeof i=="string")return c(i);if(Array.isArray(i)){for(var s=[],l=0;l<i.length;l++)s.push(f(i[l]));return s}else{if(typeof HTMLCanvasElement<"u"&&i instanceof HTMLImageElement)return o(i);if(i&&i.nodeName&&i.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&i instanceof SVGElement)return{element:i,options:(0,n.default)(i),renderer:a.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement)return{element:i,options:(0,n.default)(i),renderer:a.default.CanvasRenderer};if(i&&i.getContext)return{element:i,renderer:a.default.CanvasRenderer};if(i&&(typeof i>"u"?"undefined":e(i))==="object"&&!i.nodeName)return{element:i,renderer:a.default.ObjectRenderer};throw new u.InvalidElementException}}function c(i){var s=document.querySelectorAll(i);if(s.length!==0){for(var l=[],p=0;p<s.length;p++)l.push(f(s[p]));return l}}function o(i){var s=document.createElement("canvas");return{element:s,options:(0,n.default)(i),renderer:a.default.CanvasRenderer,afterRender:function(){i.setAttribute("src",s.toDataURL())}}}return jn.default=f,jn}var $n={},_a;function J0(){if(_a)return $n;_a=1,Object.defineProperty($n,"__esModule",{value:!0});var e=(function(){function r(a,u){for(var d=0;d<u.length;d++){var f=u[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(a,f.key,f)}}return function(a,u,d){return u&&r(a.prototype,u),d&&r(a,d),a}})();function t(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(a){t(this,r),this.api=a}return e(r,[{key:"handleCatch",value:function(u){if(u.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw u.message;else throw u;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(u){try{var d=u.apply(void 0,arguments);return this.api._options.valid(!0),d}catch(f){return this.handleCatch(f),this.api}}}]),r})();return $n.default=n,$n}var Dr,Ra;function eg(){if(Ra)return Dr;Ra=1;var e=V0(),t=y(e),n=Rr(),r=y(n),a=q0(),u=y(a),d=H0(),f=y(d),c=Z0(),o=y(c),i=Xu(),s=y(i),l=J0(),p=y(l),v=Qu(),h=Ku(),m=y(h);function y(C){return C&&C.__esModule?C:{default:C}}var E=function(){},b=function(I,N,L){var $=new E;if(typeof I>"u")throw Error("No element to render on was provided.");return $._renderProperties=(0,o.default)(I),$._encodings=[],$._options=m.default,$._errorHandler=new p.default($),typeof N<"u"&&(L=L||{},L.format||(L.format=O()),$.options(L)[L.format](N,L).render()),$};b.getModule=function(C){return t.default[C]};for(var _ in t.default)t.default.hasOwnProperty(_)&&w(t.default,_);function w(C,I){E.prototype[I]=E.prototype[I.toUpperCase()]=E.prototype[I.toLowerCase()]=function(N,L){var $=this;return $._errorHandler.wrapBarcodeCall(function(){L.text=typeof L.text>"u"?void 0:""+L.text;var D=(0,r.default)($._options,L);D=(0,s.default)(D);var H=C[I],F=P(N,H,D);return $._encodings.push(F),$})}}function P(C,I,N){C=""+C;var L=new I(C,N);if(!L.valid())throw new v.InvalidInputException(L.constructor.name,C);var $=L.encode();$=(0,u.default)($);for(var D=0;D<$.length;D++)$[D].options=(0,r.default)(N,$[D].options);return $}function O(){return t.default.CODE128?"CODE128":Object.keys(t.default)[0]}E.prototype.options=function(C){return this._options=(0,r.default)(this._options,C),this},E.prototype.blank=function(C){var I=new Array(C+1).join("0");return this._encodings.push({data:I}),this},E.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var C;for(var I in this._renderProperties){C=this._renderProperties[I];var N=(0,r.default)(this._options,C.options);N.format=="auto"&&(N.format=O()),this._errorHandler.wrapBarcodeCall(function(){var L=N.value,$=t.default[N.format.toUpperCase()],D=P(L,$,N);M(C,D,N)})}}},E.prototype.render=function(){if(!this._renderProperties)throw new v.NoElementException;if(Array.isArray(this._renderProperties))for(var C=0;C<this._renderProperties.length;C++)M(this._renderProperties[C],this._encodings,this._options);else M(this._renderProperties,this._encodings,this._options);return this},E.prototype._defaults=m.default;function M(C,I,N){I=(0,u.default)(I);for(var L=0;L<I.length;L++)I[L].options=(0,r.default)(N,I[L].options),(0,f.default)(I[L].options);(0,f.default)(N);var $=C.renderer,D=new $(C.element,I,N);D.render(),C.afterRender&&C.afterRender()}return typeof window<"u"&&(window.JsBarcode=b),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(C,I){var N=[];return jQuery(this).each(function(){N.push(this)}),b(N,C,I)}),Dr=b,Dr}var Fn={exports:{}},Bn={exports:{}},re={};/** @license React v16.13.1
|
|
62
|
+
* react-is.production.min.js
|
|
63
|
+
*
|
|
64
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
65
|
+
*
|
|
66
|
+
* This source code is licensed under the MIT license found in the
|
|
67
|
+
* LICENSE file in the root directory of this source tree.
|
|
68
|
+
*/var Sa;function tg(){if(Sa)return re;Sa=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,a=e?Symbol.for("react.strict_mode"):60108,u=e?Symbol.for("react.profiler"):60114,d=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,o=e?Symbol.for("react.concurrent_mode"):60111,i=e?Symbol.for("react.forward_ref"):60112,s=e?Symbol.for("react.suspense"):60113,l=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=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 c:case o:case r:case u:case a:case s:return w;default:switch(w=w&&w.$$typeof,w){case f:case i:case v:case p:case d:return w;default:return P}}case n:return P}}}function _(w){return b(w)===o}return re.AsyncMode=c,re.ConcurrentMode=o,re.ContextConsumer=f,re.ContextProvider=d,re.Element=t,re.ForwardRef=i,re.Fragment=r,re.Lazy=v,re.Memo=p,re.Portal=n,re.Profiler=u,re.StrictMode=a,re.Suspense=s,re.isAsyncMode=function(w){return _(w)||b(w)===c},re.isConcurrentMode=_,re.isContextConsumer=function(w){return b(w)===f},re.isContextProvider=function(w){return b(w)===d},re.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},re.isForwardRef=function(w){return b(w)===i},re.isFragment=function(w){return b(w)===r},re.isLazy=function(w){return b(w)===v},re.isMemo=function(w){return b(w)===p},re.isPortal=function(w){return b(w)===n},re.isProfiler=function(w){return b(w)===u},re.isStrictMode=function(w){return b(w)===a},re.isSuspense=function(w){return b(w)===s},re.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===o||w===u||w===a||w===s||w===l||typeof w=="object"&&w!==null&&(w.$$typeof===v||w.$$typeof===p||w.$$typeof===d||w.$$typeof===f||w.$$typeof===i||w.$$typeof===m||w.$$typeof===y||w.$$typeof===E||w.$$typeof===h)},re.typeOf=b,re}var oe={};/** @license React v16.13.1
|
|
69
|
+
* react-is.development.js
|
|
70
|
+
*
|
|
71
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the MIT license found in the
|
|
74
|
+
* LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/var Ca;function ng(){return Ca||(Ca=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,a=e?Symbol.for("react.strict_mode"):60108,u=e?Symbol.for("react.profiler"):60114,d=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,o=e?Symbol.for("react.concurrent_mode"):60111,i=e?Symbol.for("react.forward_ref"):60112,s=e?Symbol.for("react.suspense"):60113,l=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function b(A){return typeof A=="string"||typeof A=="function"||A===r||A===o||A===u||A===a||A===s||A===l||typeof A=="object"&&A!==null&&(A.$$typeof===v||A.$$typeof===p||A.$$typeof===d||A.$$typeof===f||A.$$typeof===i||A.$$typeof===m||A.$$typeof===y||A.$$typeof===E||A.$$typeof===h)}function _(A){if(typeof A=="object"&&A!==null){var ie=A.$$typeof;switch(ie){case t:var ue=A.type;switch(ue){case c:case o:case r:case u:case a:case s:return ue;default:var Fe=ue&&ue.$$typeof;switch(Fe){case f:case i:case v:case p:case d:return Fe;default:return ie}}case n:return ie}}}var w=c,P=o,O=f,M=d,C=t,I=i,N=r,L=v,$=p,D=n,H=u,F=a,Q=s,z=!1;function k(A){return z||(z=!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.")),R(A)||_(A)===c}function R(A){return _(A)===o}function T(A){return _(A)===f}function W(A){return _(A)===d}function Y(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function q(A){return _(A)===i}function J(A){return _(A)===r}function X(A){return _(A)===v}function j(A){return _(A)===p}function U(A){return _(A)===n}function V(A){return _(A)===u}function B(A){return _(A)===a}function Z(A){return _(A)===s}oe.AsyncMode=w,oe.ConcurrentMode=P,oe.ContextConsumer=O,oe.ContextProvider=M,oe.Element=C,oe.ForwardRef=I,oe.Fragment=N,oe.Lazy=L,oe.Memo=$,oe.Portal=D,oe.Profiler=H,oe.StrictMode=F,oe.Suspense=Q,oe.isAsyncMode=k,oe.isConcurrentMode=R,oe.isContextConsumer=T,oe.isContextProvider=W,oe.isElement=Y,oe.isForwardRef=q,oe.isFragment=J,oe.isLazy=X,oe.isMemo=j,oe.isPortal=U,oe.isProfiler=V,oe.isStrictMode=B,oe.isSuspense=Z,oe.isValidElementType=b,oe.typeOf=_})()),oe}var Oa;function Zu(){return Oa||(Oa=1,process.env.NODE_ENV==="production"?Bn.exports=tg():Bn.exports=ng()),Bn.exports}/*
|
|
76
|
+
object-assign
|
|
77
|
+
(c) Sindre Sorhus
|
|
78
|
+
@license MIT
|
|
79
|
+
*/var kr,Pa;function rg(){if(Pa)return kr;Pa=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(u){if(u==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(u)}function a(){try{if(!Object.assign)return!1;var u=new String("abc");if(u[5]="de",Object.getOwnPropertyNames(u)[0]==="5")return!1;for(var d={},f=0;f<10;f++)d["_"+String.fromCharCode(f)]=f;var c=Object.getOwnPropertyNames(d).map(function(i){return d[i]});if(c.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return kr=a()?Object.assign:function(u,d){for(var f,c=r(u),o,i=1;i<arguments.length;i++){f=Object(arguments[i]);for(var s in f)t.call(f,s)&&(c[s]=f[s]);if(e){o=e(f);for(var l=0;l<o.length;l++)n.call(f,o[l])&&(c[o[l]]=f[o[l]])}}return c},kr}var Lr,Aa;function qo(){if(Aa)return Lr;Aa=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Lr=e,Lr}var $r,ja;function Ju(){return ja||(ja=1,$r=Function.call.bind(Object.prototype.hasOwnProperty)),$r}var Fr,Ma;function og(){if(Ma)return Fr;Ma=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=qo(),n={},r=Ju();e=function(u){var d="Warning: "+u;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}}}function a(u,d,f,c,o){if(process.env.NODE_ENV!=="production"){for(var i in u)if(r(u,i)){var s;try{if(typeof u[i]!="function"){var l=Error((c||"React class")+": "+f+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof u[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}s=u[i](d,i,c,f,null,t)}catch(v){s=v}if(s&&!(s instanceof Error)&&e((c||"React class")+": type specification of "+f+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in n)){n[s.message]=!0;var p=o?o():"";e("Failed "+f+" type: "+s.message+(p??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Fr=a,Fr}var Br,Ta;function ig(){if(Ta)return Br;Ta=1;var e=Zu(),t=rg(),n=qo(),r=Ju(),a=og(),u=function(){};process.env.NODE_ENV!=="production"&&(u=function(f){var c="Warning: "+f;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function d(){return null}return Br=function(f,c){var o=typeof Symbol=="function"&&Symbol.iterator,i="@@iterator";function s(R){var T=R&&(o&&R[o]||R[i]);if(typeof T=="function")return T}var l="<<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:_(),elementType:w(),instanceOf:P,node:I(),objectOf:M,oneOf:O,oneOfType:C,shape:L,exact:$};function v(R,T){return R===T?R!==0||1/R===1/T:R!==R&&T!==T}function h(R,T){this.message=R,this.data=T&&typeof T=="object"?T:{},this.stack=""}h.prototype=Error.prototype;function m(R){if(process.env.NODE_ENV!=="production")var T={},W=0;function Y(J,X,j,U,V,B,Z){if(U=U||l,B=B||j,Z!==n){if(c){var A=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 A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ie=U+":"+j;!T[ie]&&W<3&&(u("You are manually calling a React.PropTypes validation function for the `"+B+"` prop on `"+U+"`. 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."),T[ie]=!0,W++)}}return X[j]==null?J?X[j]===null?new h("The "+V+" `"+B+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new h("The "+V+" `"+B+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:R(X,j,U,V,B)}var q=Y.bind(null,!1);return q.isRequired=Y.bind(null,!0),q}function y(R){function T(W,Y,q,J,X,j){var U=W[Y],V=F(U);if(V!==R){var B=Q(U);return new h("Invalid "+J+" `"+X+"` of type "+("`"+B+"` supplied to `"+q+"`, expected ")+("`"+R+"`."),{expectedType:R})}return null}return m(T)}function E(){return m(d)}function b(R){function T(W,Y,q,J,X){if(typeof R!="function")return new h("Property `"+X+"` of component `"+q+"` has invalid PropType notation inside arrayOf.");var j=W[Y];if(!Array.isArray(j)){var U=F(j);return new h("Invalid "+J+" `"+X+"` of type "+("`"+U+"` supplied to `"+q+"`, expected an array."))}for(var V=0;V<j.length;V++){var B=R(j,V,q,J,X+"["+V+"]",n);if(B instanceof Error)return B}return null}return m(T)}function _(){function R(T,W,Y,q,J){var X=T[W];if(!f(X)){var j=F(X);return new h("Invalid "+q+" `"+J+"` of type "+("`"+j+"` supplied to `"+Y+"`, expected a single ReactElement."))}return null}return m(R)}function w(){function R(T,W,Y,q,J){var X=T[W];if(!e.isValidElementType(X)){var j=F(X);return new h("Invalid "+q+" `"+J+"` of type "+("`"+j+"` supplied to `"+Y+"`, expected a single ReactElement type."))}return null}return m(R)}function P(R){function T(W,Y,q,J,X){if(!(W[Y]instanceof R)){var j=R.name||l,U=k(W[Y]);return new h("Invalid "+J+" `"+X+"` of type "+("`"+U+"` supplied to `"+q+"`, expected ")+("instance of `"+j+"`."))}return null}return m(T)}function O(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&(arguments.length>1?u("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])."):u("Invalid argument supplied to oneOf, expected an array.")),d;function T(W,Y,q,J,X){for(var j=W[Y],U=0;U<R.length;U++)if(v(j,R[U]))return null;var V=JSON.stringify(R,function(Z,A){var ie=Q(A);return ie==="symbol"?String(A):A});return new h("Invalid "+J+" `"+X+"` of value `"+String(j)+"` "+("supplied to `"+q+"`, expected one of "+V+"."))}return m(T)}function M(R){function T(W,Y,q,J,X){if(typeof R!="function")return new h("Property `"+X+"` of component `"+q+"` has invalid PropType notation inside objectOf.");var j=W[Y],U=F(j);if(U!=="object")return new h("Invalid "+J+" `"+X+"` of type "+("`"+U+"` supplied to `"+q+"`, expected an object."));for(var V in j)if(r(j,V)){var B=R(j,V,q,J,X+"."+V,n);if(B instanceof Error)return B}return null}return m(T)}function C(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&u("Invalid argument supplied to oneOfType, expected an instance of array."),d;for(var T=0;T<R.length;T++){var W=R[T];if(typeof W!="function")return u("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(W)+" at index "+T+"."),d}function Y(q,J,X,j,U){for(var V=[],B=0;B<R.length;B++){var Z=R[B],A=Z(q,J,X,j,U,n);if(A==null)return null;A.data&&r(A.data,"expectedType")&&V.push(A.data.expectedType)}var ie=V.length>0?", expected one of type ["+V.join(", ")+"]":"";return new h("Invalid "+j+" `"+U+"` supplied to "+("`"+X+"`"+ie+"."))}return m(Y)}function I(){function R(T,W,Y,q,J){return D(T[W])?null:new h("Invalid "+q+" `"+J+"` supplied to "+("`"+Y+"`, expected a ReactNode."))}return m(R)}function N(R,T,W,Y,q){return new h((R||"React class")+": "+T+" type `"+W+"."+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+q+"`.")}function L(R){function T(W,Y,q,J,X){var j=W[Y],U=F(j);if(U!=="object")return new h("Invalid "+J+" `"+X+"` of type `"+U+"` "+("supplied to `"+q+"`, expected `object`."));for(var V in R){var B=R[V];if(typeof B!="function")return N(q,J,X,V,Q(B));var Z=B(j,V,q,J,X+"."+V,n);if(Z)return Z}return null}return m(T)}function $(R){function T(W,Y,q,J,X){var j=W[Y],U=F(j);if(U!=="object")return new h("Invalid "+J+" `"+X+"` of type `"+U+"` "+("supplied to `"+q+"`, expected `object`."));var V=t({},W[Y],R);for(var B in V){var Z=R[B];if(r(R,B)&&typeof Z!="function")return N(q,J,X,B,Q(Z));if(!Z)return new h("Invalid "+J+" `"+X+"` key `"+B+"` supplied to `"+q+"`.\nBad object: "+JSON.stringify(W[Y],null," ")+`
|
|
80
|
+
Valid keys: `+JSON.stringify(Object.keys(R),null," "));var A=Z(j,B,q,J,X+"."+B,n);if(A)return A}return null}return m(T)}function D(R){switch(typeof R){case"number":case"string":case"undefined":return!0;case"boolean":return!R;case"object":if(Array.isArray(R))return R.every(D);if(R===null||f(R))return!0;var T=s(R);if(T){var W=T.call(R),Y;if(T!==R.entries){for(;!(Y=W.next()).done;)if(!D(Y.value))return!1}else for(;!(Y=W.next()).done;){var q=Y.value;if(q&&!D(q[1]))return!1}}else return!1;return!0;default:return!1}}function H(R,T){return R==="symbol"?!0:T?T["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&T instanceof Symbol:!1}function F(R){var T=typeof R;return Array.isArray(R)?"array":R instanceof RegExp?"object":H(T,R)?"symbol":T}function Q(R){if(typeof R>"u"||R===null)return""+R;var T=F(R);if(T==="object"){if(R instanceof Date)return"date";if(R instanceof RegExp)return"regexp"}return T}function z(R){var T=Q(R);switch(T){case"array":case"object":return"an "+T;case"boolean":case"date":case"regexp":return"a "+T;default:return T}}function k(R){return!R.constructor||!R.constructor.name?l:R.constructor.name}return p.checkPropTypes=a,p.resetWarningCache=a.resetWarningCache,p.PropTypes=p,p},Br}var Gr,Ia;function ag(){if(Ia)return Gr;Ia=1;var e=qo();function t(){}function n(){}return n.resetWarningCache=t,Gr=function(){function r(d,f,c,o,i,s){if(s!==e){var l=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 l.name="Invariant Violation",l}}r.isRequired=r;function a(){return r}var u={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return u.PropTypes=u,u},Gr}var Na;function sg(){if(Na)return Fn.exports;if(Na=1,process.env.NODE_ENV!=="production"){var e=Zu(),t=!0;Fn.exports=ig()(e.isElement,t)}else Fn.exports=ag()();return Fn.exports}var Ur,Da;function cg(){if(Da)return Ur;Da=1;function e(m){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(m)}var t=a(S),n=a(eg()),r=a(sg());function a(m){return m&&m.__esModule?m:{default:m}}function u(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function d(m,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(m,b.key,b)}}function f(m,y,E){return y&&d(m.prototype,y),m}function c(m,y){return y&&(e(y)==="object"||typeof y=="function")?y:i(m)}function o(m){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},o(m)}function i(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function s(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),y&&l(m,y)}function l(m,y){return l=Object.setPrototypeOf||function(b,_){return b.__proto__=_,b},l(m,y)}var p,v=t.default.version.split(/[.-]/);v[0]==="0"&&(v[1]==="13"||v[1]==="12")?p=function(y){return y.getDOMNode()}:p=function(y){return y};var h=(function(m){s(y,m);function y(E){var b;return u(this,y),b=c(this,o(y).call(this,E)),b.renderElementRef=t.default.createRef(),b.update=b.update.bind(i(b)),b}return f(y,[{key:"shouldComponentUpdate",value:function(b){var _=this;return Object.keys(y.propTypes).some(function(w){return _.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(_){window.console.error(_)}}},{key:"render",value:function(){var b=this.props,_=b.id,w=b.className;if(this.props.renderer==="svg")return t.default.createElement("svg",{ref:this.renderElementRef,id:_,className:w});if(this.props.renderer==="canvas")return t.default.createElement("canvas",{ref:this.renderElementRef,id:_,className:w});if(this.props.renderer==="img")return t.default.createElement("img",{ref:this.renderElementRef,id:_,className:w})}}]),y})(t.default.Component);return h.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},h.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},Ur=h,Ur}var ug=cg();const lg=sl(ug),el=S.forwardRef(({children:e,className:t,disabled:n,...r},a)=>x.jsxRuntimeExports.jsx(Zv,{ref:a,disabled:n,className:ee.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:x.jsxRuntimeExports.jsx(Jv,{className:"whitespace-nowrap",children:e})}));el.displayName="SelectItem";const tl=S.forwardRef(({value:e,onChange:t,placeholder:n="Buscar...",disabled:r},a)=>x.jsxRuntimeExports.jsx("div",{className:"px-2 py-2 border-b border-gray-4 bg-white sticky top-0",onPointerDown:u=>{u.stopPropagation()},children:x.jsxRuntimeExports.jsx("input",{ref:a,type:"text",value:e,onChange:t,placeholder:n,disabled:r,autoComplete:"off",autoFocus:!0,className:ee.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:u=>{u.stopPropagation()},onMouseDown:u=>{u.stopPropagation()},onPointerDown:u=>{u.stopPropagation()}})}));tl.displayName="SearchInput";var Ho=(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))(Ho||{});const{cols:fg,gap:dg,justifyItems:pg,alignContent:hg}=Ho,vg=({cols:e,align:t,gap:n,justify:r,className:a="",...u})=>x.jsxRuntimeExports.jsx(x.motion.div,{className:ee.classNames("grid",{[a]:a},ye.generateClasses(fg,e),ye.generateClasses(dg,n),ye.generateClasses(pg,r),ye.generateClasses(hg,t)),...u}),{span:mg,start:gg,end:xg,justifySelf:yg,alignSelf:Eg}=Ho,bg=({align:e,end:t,justify:n,span:r,start:a,className:u="",...d})=>x.jsxRuntimeExports.jsx(x.motion.div,{...d,className:ee.classNames({[u]:u},ye.generateClasses(mg,r),ye.generateClasses(gg,a),ye.generateClasses(xg,t),ye.generateClasses(yg,n),ye.generateClasses(Eg,e))}),ka=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,La=ee.clsx,wg=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return La(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:u}=t,d=Object.keys(a).map(o=>{const i=n==null?void 0:n[o],s=u==null?void 0:u[o];if(i===null)return null;const l=ka(i)||ka(s);return a[o][l]}),f=n&&Object.entries(n).reduce((o,i)=>{let[s,l]=i;return l===void 0||(o[s]=l),o},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((o,i)=>{let{class:s,className:l,...p}=i;return Object.entries(p).every(v=>{let[h,m]=v;return Array.isArray(m)?m.includes({...u,...f}[h]):{...u,...f}[h]===m})?[...o,s,l]:o},[]);return La(e,d,c,n==null?void 0:n.class,n==null?void 0:n.className)},nl=wg("hover:text-white cursor-pointer aria-pressed:bg-primary-blue data-[state=on]:text-white focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-primary-blue gap-1 rounded-lg text-sm font-medium transition-all [&_svg:not([class*='size-'])]:size-4 group/toggle hover:bg-primary-blue inline-flex items-center justify-center whitespace-nowrap outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border-gray-5 hover:bg-primary-blue border bg-transparent"},size:{default:"h-8 min-w-8 px-2",sm:"h-7 min-w-7 rounded-md px-1.5 text-[0.8rem]",lg:"h-9 min-w-9 px-2.5"}},defaultVariants:{variant:"default",size:"default"}}),rl=S.createContext({size:"default",variant:"default",spacing:0,orientation:"horizontal"}),_g=({className:e,children:t,variant:n="default",size:r="default",...a})=>{const u=S.useContext(rl);return x.jsxRuntimeExports.jsx(am,{"data-slot":"toggle-group-item","data-variant":u.variant||n,"data-size":u.size||r,"data-spacing":u.spacing,className:ee.cn("group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg shrink-0 focus:z-10 focus-visible:z-10 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",nl({variant:u.variant||n,size:u.size||r}),e),...a,children:t})},ol=({className:e,variant:t,size:n,spacing:r=0,orientation:a="horizontal",children:u,...d})=>x.jsxRuntimeExports.jsx(im,{"data-slot":"toggle-group","data-variant":t,"data-size":n,"data-spacing":r,"data-orientation":a,style:{"--gap":r},className:ee.cn("rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch",e),...d,children:x.jsxRuntimeExports.jsx(rl.Provider,{value:{variant:t,size:n,spacing:r,orientation:a},children:u})});ol.Item=_g;exports.Anchor=jo;exports.AnimatePresence=Tt;exports.Arrow=To;exports.Avatar=gm;exports.Barcode=lg;exports.Button=ro;exports.Checkbox=Su;exports.ClearButton=Pu;exports.Col=bg;exports.Content=Mo;exports.Content$1=vm;exports.Content2=Yv;exports.DismissableLayer=Nt;exports.Dropdown=Lm;exports.Flex=Ye;exports.FocusScope=Dt;exports.Icon=Xv;exports.InputNumber=Au;exports.Item=No;exports.Item$1=sm;exports.Item$2=el;exports.Modal=Mu;exports.NotificationContent=i0;exports.PopoverProvider=s0;exports.Portal=vt;exports.Portal$1=jm;exports.Portal$2=Kv;exports.Presence=Pe;exports.Primitive=K;exports.QRCodeSVG=zu;exports.ReactRemoveScroll=kt;exports.Root=Io;exports.Root$1=vl;exports.Root$2=em;exports.Root$3=lf;exports.Root2=Ao;exports.Root2$1=Ul;exports.Root2$2=qv;exports.Row=vg;exports.SearchInput=tl;exports.Slot=Fa;exports.ToggleGroup=ol;exports.Trigger=cm;exports.Trigger$1=Hv;exports.Typography=zt;exports.Value=Wv;exports.Viewport=Qv;exports.clamp=Qr;exports.composeEventHandlers=G;exports.createCollection=It;exports.createContextScope=ge;exports.createPopperScope=$t;exports.createRovingFocusGroupScope=Bt;exports.createSlot=Ue;exports.createSlottable=ul;exports.getInputStyles=Ou;exports.hideOthers=cr;exports.toggleVariants=nl;exports.useComposedRefs=ne;exports.useControllableState=me;exports.useDirection=ht;exports.useFocusGuards=ar;exports.useId=be;exports.usePrevious=xo;exports.useSize=yo;
|