@ctlyst.id/voila-ui 1.61.2 → 1.61.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -9
- package/dist/index.mjs +156 -153
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ Check the render method of \``+_+"`."}return""}}function an(_){{if(_!==void 0){v
|
|
|
24
24
|
|
|
25
25
|
Check your code at `+V+":"+Q+"."}return""}}var Mn={};function Rn(_){{var V=kn();if(!V){var Q=typeof _=="string"?_:_.displayName||_.name;Q&&(V=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+Q+">.")}return V}}function en(_,V){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var Q=Rn(V);if(Mn[Q])return;Mn[Q]=!0;var fe="";_&&_._owner&&_._owner!==ze.current&&(fe=" It was passed a child from "+h(_._owner.type)+"."),_t(_),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),_t(null)}}function tn(_,V){{if(typeof _!="object")return;if(Et(_))for(var Q=0;Q<_.length;Q++){var fe=_[Q];Jt(fe)&&en(fe,V)}else if(Jt(_))_._store&&(_._store.validated=!0);else if(_){var Se=$(_);if(typeof Se=="function"&&Se!==_.entries)for(var Pe=Se.call(_),_e;!(_e=Pe.next()).done;)Jt(_e.value)&&en(_e.value,V)}}}function nn(_){{var V=_.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===d))Q=V.propTypes;else return;if(Q){var fe=h(V);at(Q,_.props,"prop",fe,_)}else if(V.PropTypes!==void 0&&!Qt){Qt=!0;var Se=h(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Se||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function En(_){{for(var V=Object.keys(_.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){_t(_),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),_t(null);break}}_.ref!==null&&(_t(_),v("Invalid attribute `ref` supplied to `React.Fragment`."),_t(null))}}function fn(_,V,Q,fe,Se,Pe){{var _e=B(_);if(!_e){var we="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(we+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ot=an(Se);ot?we+=ot:we+=kn();var Fe;_===null?Fe="null":Et(_)?Fe="array":_!==void 0&&_.$$typeof===t?(Fe="<"+(h(_.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof _,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,we)}var Be=ve(_,V,Q,Se,Pe);if(Be==null)return Be;if(_e){var Ze=V.children;if(Ze!==void 0)if(fe)if(Et(Ze)){for(var Kt=0;Kt<Ze.length;Kt++)tn(Ze[Kt],_);Object.freeze&&Object.freeze(Ze)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else tn(Ze,_)}return _===r?En(Be):nn(Be),Be}}function Wt(_,V,Q){return fn(_,V,Q,!0)}function nr(_,V,Q){return fn(_,V,Q,!1)}var zt=nr,rr=Wt;To.Fragment=r,To.jsx=zt,To.jsxs=rr}()),To}process.env.NODE_ENV==="production"?Ec.exports=zy():Ec.exports=Uy();var M=Ec.exports;function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ae.apply(this,arguments)}function bn(e,t=[]){let n=[];function r(i,a){const s=l.createContext(a),c=n.length;n=[...n,a];function u(d){const{scope:m,children:p,...b}=d,y=(m==null?void 0:m[e][c])||s,$=l.useMemo(()=>b,Object.values(b));return l.createElement(y.Provider,{value:$},p)}function f(d,m){const p=(m==null?void 0:m[e][c])||s,b=l.useContext(p);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=n.map(a=>l.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return l.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,Yy(o,...t)]}function Yy(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:u})=>{const d=c(i)[`__scope${u}`];return{...s,...d}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ky(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function yh(...e){return t=>e.forEach(n=>Ky(n,t))}function ut(...e){return l.useCallback(yh(...e),e)}const lo=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),i=o.find(qy);if(i){const a=i.props.children,s=o.map(c=>c===i?l.Children.count(a)>1?l.Children.only(null):l.isValidElement(a)?a.props.children:null:c);return l.createElement(xc,ae({},r,{ref:t}),l.isValidElement(a)?l.cloneElement(a,void 0,s):null)}return l.createElement(xc,ae({},r,{ref:t}),n)});lo.displayName="Slot";const xc=l.forwardRef((e,t)=>{const{children:n,...r}=e;return l.isValidElement(n)?l.cloneElement(n,{...Xy(r,n.props),ref:t?yh(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});xc.displayName="SlotClone";const bh=({children:e})=>l.createElement(l.Fragment,null,e);function qy(e){return l.isValidElement(e)&&e.type===bh}function Xy(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Qa(e){const t=e+"CollectionProvider",[n,r]=bn(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:b,children:y}=p,$=l.useRef(null),E=l.useRef(new Map).current;return l.createElement(o,{scope:b,itemMap:E,collectionRef:$},y)},s=e+"CollectionSlot",c=l.forwardRef((p,b)=>{const{scope:y,children:$}=p,E=i(s,y),v=ut(b,E.collectionRef);return l.createElement(lo,{ref:v},$)}),u=e+"CollectionItemSlot",f="data-radix-collection-item",d=l.forwardRef((p,b)=>{const{scope:y,children:$,...E}=p,v=l.useRef(null),w=ut(b,v),T=i(u,y);return l.useEffect(()=>(T.itemMap.set(v,{ref:v,...E}),()=>void T.itemMap.delete(v))),l.createElement(lo,{[f]:"",ref:w},$)});function m(p){const b=i(e+"CollectionConsumer",p);return l.useCallback(()=>{const $=b.collectionRef.current;if(!$)return[];const E=Array.from($.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((T,I)=>E.indexOf(T.ref.current)-E.indexOf(I.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:c,ItemSlot:d},m,r]}function Ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function un(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Tn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Gy({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=un(n),c=l.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[a,c]}function Gy({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,o=l.useRef(r),i=un(t);return l.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Zy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ue=Zy.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?lo:t;return l.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),l.createElement(s,ae({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function wh(e,t){e&&mn.flushSync(()=>e.dispatchEvent(t))}const Gt=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{};function Qy(e,t){return l.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const yr=e=>{const{present:t,children:n}=e,r=Jy(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),i=ut(r.ref,o.ref);return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:i}):null};yr.displayName="Presence";function Jy(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),i=l.useRef("none"),a=e?"mounted":"unmounted",[s,c]=Qy(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Fi(r.current);i.current=s==="mounted"?u:"none"},[s]),Gt(()=>{const u=r.current,f=o.current;if(f!==e){const m=i.current,p=Fi(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Gt(()=>{if(t){const u=d=>{const p=Fi(r.current).includes(d.animationName);d.target===t&&p&&mn.flushSync(()=>c("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=Fi(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Fi(e){return(e==null?void 0:e.animationName)||"none"}const eb=Oe["useId".toString()]||(()=>{});let tb=0;function Gn(e){const[t,n]=Oe.useState(eb());return Gt(()=>{e||n(r=>r??String(tb++))},[e]),e||(t?`radix-${t}`:"")}const Eh="Collapsible",[nb,xh]=bn(Eh),[rb,fu]=nb(Eh),ob=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,u]=Tn({prop:r,defaultProp:o,onChange:a});return l.createElement(rb,{scope:n,disabled:i,contentId:Gn(),open:c,onOpenToggle:l.useCallback(()=>u(f=>!f),[u])},l.createElement(Ue.div,ae({"data-state":pu(c),"data-disabled":i?"":void 0},s,{ref:t})))}),ib="CollapsibleTrigger",ab=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=fu(ib,n);return l.createElement(Ue.button,ae({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":pu(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ne(e.onClick,o.onOpenToggle)}))}),_h="CollapsibleContent",sb=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=fu(_h,e.__scopeCollapsible);return l.createElement(yr,{present:n||o.open},({present:i})=>l.createElement(cb,ae({},r,{ref:t,present:i})))}),cb=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=fu(_h,n),[s,c]=l.useState(r),u=l.useRef(null),f=ut(t,u),d=l.useRef(0),m=d.current,p=l.useRef(0),b=p.current,y=a.open||s,$=l.useRef(y),E=l.useRef();return l.useEffect(()=>{const v=requestAnimationFrame(()=>$.current=!1);return()=>cancelAnimationFrame(v)},[]),Gt(()=>{const v=u.current;if(v){E.current=E.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const w=v.getBoundingClientRect();d.current=w.height,p.current=w.width,$.current||(v.style.transitionDuration=E.current.transitionDuration,v.style.animationName=E.current.animationName),c(r)}},[a.open,r]),l.createElement(Ue.div,ae({"data-state":pu(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!y},i,{ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style}}),y&&o)});function pu(e){return e?"open":"closed"}const ub=ob,lb=ab,db=sb,fb=l.createContext(void 0);function Ja(e){const t=l.useContext(fb);return e||t||"ltr"}const br="Accordion",pb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[hu,hb,vb]=Qa(br),[es,kP]=bn(br,[vb,xh]),vu=xh(),Sh=l.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return l.createElement(hu.Provider,{scope:e.__scopeAccordion},n==="multiple"?l.createElement(bb,ae({},i,{ref:t})):l.createElement(yb,ae({},o,{ref:t})))});Sh.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[Ch,mb]=es(br),[$h,gb]=es(br,{collapsible:!1}),yb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[s,c]=Tn({prop:n,defaultProp:r,onChange:o});return l.createElement(Ch,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:l.useCallback(()=>i&&c(""),[i,c])},l.createElement($h,{scope:e.__scopeAccordion,collapsible:i},l.createElement(Th,ae({},a,{ref:t}))))}),bb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],s]=Tn({prop:n,defaultProp:r,onChange:o}),c=l.useCallback(f=>s((d=[])=>[...d,f]),[s]),u=l.useCallback(f=>s((d=[])=>d.filter(m=>m!==f)),[s]);return l.createElement(Ch,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u},l.createElement($h,{scope:e.__scopeAccordion,collapsible:!0},l.createElement(Th,ae({},i,{ref:t}))))}),[wb,ts]=es(br),Th=l.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...a}=e,s=l.useRef(null),c=ut(s,t),u=hb(n),d=Ja(o)==="ltr",m=Ne(e.onKeyDown,p=>{var b;if(!pb.includes(p.key))return;const y=p.target,$=u().filter(k=>{var B;return!((B=k.ref.current)!==null&&B!==void 0&&B.disabled)}),E=$.findIndex(k=>k.ref.current===y),v=$.length;if(E===-1)return;p.preventDefault();let w=E;const T=0,I=v-1,D=()=>{w=E+1,w>I&&(w=T)},A=()=>{w=E-1,w<T&&(w=I)};switch(p.key){case"Home":w=T;break;case"End":w=I;break;case"ArrowRight":i==="horizontal"&&(d?D():A());break;case"ArrowDown":i==="vertical"&&D();break;case"ArrowLeft":i==="horizontal"&&(d?A():D());break;case"ArrowUp":i==="vertical"&&A();break}const F=w%v;(b=$[F].ref.current)===null||b===void 0||b.focus()});return l.createElement(wb,{scope:n,disabled:r,direction:o,orientation:i},l.createElement(hu.Slot,{scope:n},l.createElement(Ue.div,ae({},a,{"data-orientation":i,ref:c,onKeyDown:r?void 0:m}))))}),_c="AccordionItem",[Eb,mu]=es(_c),xb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=ts(_c,n),a=mb(_c,n),s=vu(n),c=Gn(),u=r&&a.value.includes(r)||!1,f=i.disabled||e.disabled;return l.createElement(Eb,{scope:n,open:u,disabled:f,triggerId:c},l.createElement(ub,ae({"data-orientation":i.orientation,"data-state":Ih(u)},s,o,{ref:t,disabled:f,open:u,onOpenChange:d=>{d?a.onItemOpen(r):a.onItemClose(r)}})))}),_b="AccordionHeader",Sb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=mu(_b,n);return l.createElement(Ue.h3,ae({"data-orientation":o.orientation,"data-state":Ih(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),Nd="AccordionTrigger",Cb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=mu(Nd,n),a=gb(Nd,n),s=vu(n);return l.createElement(hu.ItemSlot,{scope:n},l.createElement(lb,ae({"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId},s,r,{ref:t})))}),$b="AccordionContent",Tb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=mu($b,n),a=vu(n);return l.createElement(db,ae({role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation},a,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function Ih(e){return e?"open":"closed"}const Ib=Sh,Rb=xb,Ob=Sb,Pb=Cb,Ab=Tb;function Rh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Rh(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function $e(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Rh(e))&&(r&&(r+=" "),r+=t);return r}const Db=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ib,{id:"vds-accordion-root",className:$e("accordion-root",t),...n,ref:r,children:e})),Bs=(e,t)=>{const n=Object.values(e).map(r=>r[t]);return n.every(r=>typeof r=="string")?n.join(" ").trim():n.reduce((r,o)=>Object.assign(r,o),{})},Nb=(e,t)=>{const r=Object.keys(e).map(i=>e[i].properties).reduce((i,a)=>new Set([...Array.from(i),...Array.from(a)]),new Set),o={};return Object.keys(t).forEach(i=>{r.has(i)||(o[i]=t[i])}),o},ns=(e,t,n)=>{const o=[...Object.keys(e).map(u=>e[u](t)),...n??[]],i=Bs(o,"className"),a=Bs(o,"otherProps"),s=Bs(o,"style");return{otherProps:Nb(e,a),className:i,style:s}},{backgroundAtoms:kb,borderAtoms:Mb,commonAtoms:kd,flexAtoms:Md,positionAtoms:jb,radiiAtoms:Lb,shadowAtoms:Fb,sizesAtoms:Vb,spaceAtoms:Bb,typographyAtoms:Hb}=Pt.atoms,rt=l.forwardRef(({as:e,children:t,className:n,isDisabled:r,isColumn:o,...i},a)=>{const s=e||"div",c=kd({display:o?"flex":i.display}),u=Md({flexWrap:o?"wrap":i.flexWrap}),{className:f,otherProps:d,style:m}=ns({commonAtoms:kd,flexAtoms:Md,positionAtoms:jb,spaceAtoms:Bb,sizesAtoms:Vb,borderAtoms:Mb,typographyAtoms:Hb,radiiAtoms:Lb,backgroundAtoms:kb,shadowAtoms:Fb},i,[c,u]);return M.jsx(s,{ref:a,className:$e(f,n),disabled:r,style:m,...d,children:t})});rt.displayName="Box";rt.defaultProps={id:"base",as:"div",className:void 0,isDisabled:void 0,"data-test-id":void 0,isColumn:!1};const gu=({children:e,withShadow:t,bgColor:n,...r})=>M.jsx(rt,{boxShadow:t?"$raised":"$none",bgColor:"$white",...r,children:e});gu.displayName="Card";gu.defaultProps={withShadow:!1};var Wb="ifvo3u0";const{sizesAtoms:jd,spaceAtoms:Ld,commonAtoms:Fd,flexAtoms:zb}=Pt.atoms,yu=({children:e,isFluid:t,className:n,display:r,...o})=>{const a=jd({width:"$full",maxW:t?"$full":"$lg"}),s=Ld({mx:"$auto",my:"$0"}),c=Fd({display:r}),{className:u,style:f}=ns({flexAtoms:zb,sizesAtoms:jd,spaceAtoms:Ld,commonAtoms:Fd},o,[a,s,c]);return M.jsx("div",{className:$e("vds-container",!t&&Wb,u,n),style:f,...o,children:e})};yu.displayName="Container";yu.defaultProps={display:"block",children:null,isFluid:!1,className:void 0};const{commonAtoms:Vd,spaceAtoms:Ub,sizesAtoms:Yb,radiiAtoms:Kb,flexAtoms:qb,backgroundAtoms:Xb}=Pt.atoms,Bt=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Vd({display:"flex"}),{className:s,otherProps:c,style:u}=ns({flexAtoms:qb,commonAtoms:Vd,spaceAtoms:Ub,sizesAtoms:Yb,radiiAtoms:Kb,backgroundAtoms:Xb},r,[a]);return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:$e(s,n),style:u,...c,children:t})});Bt.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};Bt.displayName="Flex";const{gridAtoms:Gb,commonAtoms:Zb,spaceAtoms:Qb,sizesAtoms:Jb,radiiAtoms:e0}=Pt.atoms,bu=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Pt.atoms.commonAtoms({display:"grid"}),{className:s,otherProps:c,style:u}=ns({gridAtoms:Gb,commonAtoms:Zb,spaceAtoms:Qb,sizesAtoms:Jb,radiiAtoms:e0},r,[a]);return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:$e(s,n),style:u,...c,children:t})});bu.displayName="Grid";bu.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};const t0={horizontal:"row",vertical:"column",horizontalReverse:"row-reverse",verticalReverse:"column-reverse"},n0=e=>e?t0[e]:void 0,Bd={1:"wrap",0:"nowrap"},r0=e=>e?typeof e=="boolean"?Bd[1]:Bd[0]:void 0,Ar=l.forwardRef(({as:e="div",alignItems:t,children:n,justifyContent:r,direction:o,gap:i,wrap:a=!0,content:s,...c},u)=>{const f=n0(o),d=r0(a);return M.jsx(Bt,{ref:u,"data-test-id":c["data-test-id"],alignItems:t,display:"flex",as:e,direction:f,wrap:d,gap:i,justifyContent:r,...c,children:n})});Ar.defaultProps={as:"div",alignItems:void 0,direction:"vertical",justifyContent:void 0,gap:"4",wrap:!0,"data-test-id":void 0};Ar.displayName="Stack";function o0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Wd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hd(Object(n),!0).forEach(function(r){o0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var i0=(e,t,n)=>{for(var r of Object.keys(e)){var o;if(e[r]!==((o=t[r])!==null&&o!==void 0?o:n[r]))return!1}return!0},Ke=e=>t=>{var n=e.defaultClassName,r=Wd(Wd({},e.defaultVariants),t);for(var o in r){var i,a=(i=r[o])!==null&&i!==void 0?i:e.defaultVariants[o];if(a!=null){var s=a;typeof s=="boolean"&&(s=s===!0?"true":"false");var c=e.variantClassNames[o][s];c&&(n+=" "+c)}}for(var[u,f]of e.compoundVariants)i0(u,r,e.defaultVariants)&&(n+=" "+f);return n},a0=Ke({defaultClassName:"",variantClassNames:{textStyle:{heading1:"_1ccbe2w0",heading2:"_1ccbe2w1",heading3:"_1ccbe2w2",heading4:"_1ccbe2w3",heading5:"_1ccbe2w4",heading6:"_1ccbe2w5",subheading1:"_1ccbe2w6",subheading2:"_1ccbe2w7",subtitle1:"_1ccbe2w8",subtitle2:"_1ccbe2w9",body1:"_1ccbe2wa",body2:"_1ccbe2wb",caption:"_1ccbe2wc",footer:"_1ccbe2wd"},isStrikethrough:{true:"_1ccbe2we"}},defaultVariants:{},compoundVariants:[]});const Xt=l.forwardRef(({as:e="p",children:t,textStyle:n,isStrikethrough:r,className:o,...i},a)=>M.jsx(rt,{as:e,ref:a,className:$e(a0({textStyle:n,isStrikethrough:r}),o),...i,children:t}));Xt.displayName="Text";Xt.defaultProps={as:"p"};var s0="_13vyt6x7",c0="_13vyt6x5",u0="_13vyt6x6",l0="_13vyt6x2",d0="_13vyt6x3",f0="_13vyt6x4";const p0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ab,{id:"vds-accordion-content",className:$e(c0,t),...n,ref:r,children:M.jsx(rt,{className:u0,children:e})})),h0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Rb,{id:"vds-accordion-item",className:$e(l0,t),...n,ref:r,children:e}));var Sc={exports:{}},Io={};/**
|
|
27
|
+
Check the top-level render call using <`+Q+">.")}return V}}function en(_,V){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var Q=Rn(V);if(Mn[Q])return;Mn[Q]=!0;var fe="";_&&_._owner&&_._owner!==ze.current&&(fe=" It was passed a child from "+h(_._owner.type)+"."),_t(_),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),_t(null)}}function tn(_,V){{if(typeof _!="object")return;if(Et(_))for(var Q=0;Q<_.length;Q++){var fe=_[Q];Jt(fe)&&en(fe,V)}else if(Jt(_))_._store&&(_._store.validated=!0);else if(_){var Se=$(_);if(typeof Se=="function"&&Se!==_.entries)for(var Pe=Se.call(_),_e;!(_e=Pe.next()).done;)Jt(_e.value)&&en(_e.value,V)}}}function nn(_){{var V=_.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===d))Q=V.propTypes;else return;if(Q){var fe=h(V);at(Q,_.props,"prop",fe,_)}else if(V.PropTypes!==void 0&&!Qt){Qt=!0;var Se=h(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Se||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function En(_){{for(var V=Object.keys(_.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){_t(_),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),_t(null);break}}_.ref!==null&&(_t(_),v("Invalid attribute `ref` supplied to `React.Fragment`."),_t(null))}}function fn(_,V,Q,fe,Se,Pe){{var _e=B(_);if(!_e){var we="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(we+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ot=an(Se);ot?we+=ot:we+=kn();var Fe;_===null?Fe="null":Et(_)?Fe="array":_!==void 0&&_.$$typeof===t?(Fe="<"+(h(_.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof _,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,we)}var Be=ve(_,V,Q,Se,Pe);if(Be==null)return Be;if(_e){var Ze=V.children;if(Ze!==void 0)if(fe)if(Et(Ze)){for(var Kt=0;Kt<Ze.length;Kt++)tn(Ze[Kt],_);Object.freeze&&Object.freeze(Ze)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else tn(Ze,_)}return _===r?En(Be):nn(Be),Be}}function Wt(_,V,Q){return fn(_,V,Q,!0)}function nr(_,V,Q){return fn(_,V,Q,!1)}var zt=nr,rr=Wt;To.Fragment=r,To.jsx=zt,To.jsxs=rr}()),To}process.env.NODE_ENV==="production"?Ec.exports=zy():Ec.exports=Uy();var M=Ec.exports;function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ae.apply(this,arguments)}function bn(e,t=[]){let n=[];function r(i,a){const s=l.createContext(a),c=n.length;n=[...n,a];function u(d){const{scope:m,children:p,...b}=d,y=(m==null?void 0:m[e][c])||s,$=l.useMemo(()=>b,Object.values(b));return l.createElement(y.Provider,{value:$},p)}function f(d,m){const p=(m==null?void 0:m[e][c])||s,b=l.useContext(p);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=n.map(a=>l.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return l.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,Yy(o,...t)]}function Yy(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:u})=>{const d=c(i)[`__scope${u}`];return{...s,...d}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ky(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function yh(...e){return t=>e.forEach(n=>Ky(n,t))}function lt(...e){return l.useCallback(yh(...e),e)}const lo=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),i=o.find(qy);if(i){const a=i.props.children,s=o.map(c=>c===i?l.Children.count(a)>1?l.Children.only(null):l.isValidElement(a)?a.props.children:null:c);return l.createElement(xc,ae({},r,{ref:t}),l.isValidElement(a)?l.cloneElement(a,void 0,s):null)}return l.createElement(xc,ae({},r,{ref:t}),n)});lo.displayName="Slot";const xc=l.forwardRef((e,t)=>{const{children:n,...r}=e;return l.isValidElement(n)?l.cloneElement(n,{...Xy(r,n.props),ref:t?yh(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});xc.displayName="SlotClone";const bh=({children:e})=>l.createElement(l.Fragment,null,e);function qy(e){return l.isValidElement(e)&&e.type===bh}function Xy(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Qa(e){const t=e+"CollectionProvider",[n,r]=bn(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:b,children:y}=p,$=l.useRef(null),E=l.useRef(new Map).current;return l.createElement(o,{scope:b,itemMap:E,collectionRef:$},y)},s=e+"CollectionSlot",c=l.forwardRef((p,b)=>{const{scope:y,children:$}=p,E=i(s,y),v=lt(b,E.collectionRef);return l.createElement(lo,{ref:v},$)}),u=e+"CollectionItemSlot",f="data-radix-collection-item",d=l.forwardRef((p,b)=>{const{scope:y,children:$,...E}=p,v=l.useRef(null),w=lt(b,v),T=i(u,y);return l.useEffect(()=>(T.itemMap.set(v,{ref:v,...E}),()=>void T.itemMap.delete(v))),l.createElement(lo,{[f]:"",ref:w},$)});function m(p){const b=i(e+"CollectionConsumer",p);return l.useCallback(()=>{const $=b.collectionRef.current;if(!$)return[];const E=Array.from($.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((T,I)=>E.indexOf(T.ref.current)-E.indexOf(I.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:c,ItemSlot:d},m,r]}function Ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function un(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Tn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Gy({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=un(n),c=l.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[a,c]}function Gy({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,o=l.useRef(r),i=un(t);return l.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Zy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ue=Zy.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?lo:t;return l.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),l.createElement(s,ae({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function wh(e,t){e&&mn.flushSync(()=>e.dispatchEvent(t))}const Gt=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{};function Qy(e,t){return l.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const yr=e=>{const{present:t,children:n}=e,r=Jy(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),i=lt(r.ref,o.ref);return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:i}):null};yr.displayName="Presence";function Jy(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),i=l.useRef("none"),a=e?"mounted":"unmounted",[s,c]=Qy(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Fi(r.current);i.current=s==="mounted"?u:"none"},[s]),Gt(()=>{const u=r.current,f=o.current;if(f!==e){const m=i.current,p=Fi(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Gt(()=>{if(t){const u=d=>{const p=Fi(r.current).includes(d.animationName);d.target===t&&p&&mn.flushSync(()=>c("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=Fi(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Fi(e){return(e==null?void 0:e.animationName)||"none"}const eb=Oe["useId".toString()]||(()=>{});let tb=0;function Gn(e){const[t,n]=Oe.useState(eb());return Gt(()=>{e||n(r=>r??String(tb++))},[e]),e||(t?`radix-${t}`:"")}const Eh="Collapsible",[nb,xh]=bn(Eh),[rb,fu]=nb(Eh),ob=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,u]=Tn({prop:r,defaultProp:o,onChange:a});return l.createElement(rb,{scope:n,disabled:i,contentId:Gn(),open:c,onOpenToggle:l.useCallback(()=>u(f=>!f),[u])},l.createElement(Ue.div,ae({"data-state":pu(c),"data-disabled":i?"":void 0},s,{ref:t})))}),ib="CollapsibleTrigger",ab=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=fu(ib,n);return l.createElement(Ue.button,ae({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":pu(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ne(e.onClick,o.onOpenToggle)}))}),_h="CollapsibleContent",sb=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=fu(_h,e.__scopeCollapsible);return l.createElement(yr,{present:n||o.open},({present:i})=>l.createElement(cb,ae({},r,{ref:t,present:i})))}),cb=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=fu(_h,n),[s,c]=l.useState(r),u=l.useRef(null),f=lt(t,u),d=l.useRef(0),m=d.current,p=l.useRef(0),b=p.current,y=a.open||s,$=l.useRef(y),E=l.useRef();return l.useEffect(()=>{const v=requestAnimationFrame(()=>$.current=!1);return()=>cancelAnimationFrame(v)},[]),Gt(()=>{const v=u.current;if(v){E.current=E.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const w=v.getBoundingClientRect();d.current=w.height,p.current=w.width,$.current||(v.style.transitionDuration=E.current.transitionDuration,v.style.animationName=E.current.animationName),c(r)}},[a.open,r]),l.createElement(Ue.div,ae({"data-state":pu(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!y},i,{ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style}}),y&&o)});function pu(e){return e?"open":"closed"}const ub=ob,lb=ab,db=sb,fb=l.createContext(void 0);function Ja(e){const t=l.useContext(fb);return e||t||"ltr"}const br="Accordion",pb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[hu,hb,vb]=Qa(br),[es,kP]=bn(br,[vb,xh]),vu=xh(),Sh=l.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return l.createElement(hu.Provider,{scope:e.__scopeAccordion},n==="multiple"?l.createElement(bb,ae({},i,{ref:t})):l.createElement(yb,ae({},o,{ref:t})))});Sh.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[Ch,mb]=es(br),[$h,gb]=es(br,{collapsible:!1}),yb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[s,c]=Tn({prop:n,defaultProp:r,onChange:o});return l.createElement(Ch,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:l.useCallback(()=>i&&c(""),[i,c])},l.createElement($h,{scope:e.__scopeAccordion,collapsible:i},l.createElement(Th,ae({},a,{ref:t}))))}),bb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],s]=Tn({prop:n,defaultProp:r,onChange:o}),c=l.useCallback(f=>s((d=[])=>[...d,f]),[s]),u=l.useCallback(f=>s((d=[])=>d.filter(m=>m!==f)),[s]);return l.createElement(Ch,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u},l.createElement($h,{scope:e.__scopeAccordion,collapsible:!0},l.createElement(Th,ae({},i,{ref:t}))))}),[wb,ts]=es(br),Th=l.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...a}=e,s=l.useRef(null),c=lt(s,t),u=hb(n),d=Ja(o)==="ltr",m=Ne(e.onKeyDown,p=>{var b;if(!pb.includes(p.key))return;const y=p.target,$=u().filter(k=>{var B;return!((B=k.ref.current)!==null&&B!==void 0&&B.disabled)}),E=$.findIndex(k=>k.ref.current===y),v=$.length;if(E===-1)return;p.preventDefault();let w=E;const T=0,I=v-1,D=()=>{w=E+1,w>I&&(w=T)},A=()=>{w=E-1,w<T&&(w=I)};switch(p.key){case"Home":w=T;break;case"End":w=I;break;case"ArrowRight":i==="horizontal"&&(d?D():A());break;case"ArrowDown":i==="vertical"&&D();break;case"ArrowLeft":i==="horizontal"&&(d?A():D());break;case"ArrowUp":i==="vertical"&&A();break}const F=w%v;(b=$[F].ref.current)===null||b===void 0||b.focus()});return l.createElement(wb,{scope:n,disabled:r,direction:o,orientation:i},l.createElement(hu.Slot,{scope:n},l.createElement(Ue.div,ae({},a,{"data-orientation":i,ref:c,onKeyDown:r?void 0:m}))))}),_c="AccordionItem",[Eb,mu]=es(_c),xb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=ts(_c,n),a=mb(_c,n),s=vu(n),c=Gn(),u=r&&a.value.includes(r)||!1,f=i.disabled||e.disabled;return l.createElement(Eb,{scope:n,open:u,disabled:f,triggerId:c},l.createElement(ub,ae({"data-orientation":i.orientation,"data-state":Ih(u)},s,o,{ref:t,disabled:f,open:u,onOpenChange:d=>{d?a.onItemOpen(r):a.onItemClose(r)}})))}),_b="AccordionHeader",Sb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=mu(_b,n);return l.createElement(Ue.h3,ae({"data-orientation":o.orientation,"data-state":Ih(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),Nd="AccordionTrigger",Cb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=mu(Nd,n),a=gb(Nd,n),s=vu(n);return l.createElement(hu.ItemSlot,{scope:n},l.createElement(lb,ae({"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId},s,r,{ref:t})))}),$b="AccordionContent",Tb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=mu($b,n),a=vu(n);return l.createElement(db,ae({role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation},a,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function Ih(e){return e?"open":"closed"}const Ib=Sh,Rb=xb,Ob=Sb,Pb=Cb,Ab=Tb;function Rh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Rh(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function $e(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Rh(e))&&(r&&(r+=" "),r+=t);return r}const Db=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ib,{id:"vds-accordion-root",className:$e("accordion-root",t),...n,ref:r,children:e})),Bs=(e,t)=>{const n=Object.values(e).map(r=>r[t]);return n.every(r=>typeof r=="string")?n.join(" ").trim():n.reduce((r,o)=>Object.assign(r,o),{})},Nb=(e,t)=>{const r=Object.keys(e).map(i=>e[i].properties).reduce((i,a)=>new Set([...Array.from(i),...Array.from(a)]),new Set),o={};return Object.keys(t).forEach(i=>{r.has(i)||(o[i]=t[i])}),o},ns=(e,t,n)=>{const o=[...Object.keys(e).map(u=>e[u](t)),...n??[]],i=Bs(o,"className"),a=Bs(o,"otherProps"),s=Bs(o,"style");return{otherProps:Nb(e,a),className:i,style:s}},{backgroundAtoms:kb,borderAtoms:Mb,commonAtoms:kd,flexAtoms:Md,positionAtoms:jb,radiiAtoms:Lb,shadowAtoms:Fb,sizesAtoms:Vb,spaceAtoms:Bb,typographyAtoms:Hb}=Pt.atoms,rt=l.forwardRef(({as:e,children:t,className:n,isDisabled:r,isColumn:o,...i},a)=>{const s=e||"div",c=kd({display:o?"flex":i.display}),u=Md({flexWrap:o?"wrap":i.flexWrap}),{className:f,otherProps:d,style:m}=ns({commonAtoms:kd,flexAtoms:Md,positionAtoms:jb,spaceAtoms:Bb,sizesAtoms:Vb,borderAtoms:Mb,typographyAtoms:Hb,radiiAtoms:Lb,backgroundAtoms:kb,shadowAtoms:Fb},i,[c,u]);return M.jsx(s,{ref:a,className:$e(f,n),disabled:r,style:m,...d,children:t})});rt.displayName="Box";rt.defaultProps={id:"base",as:"div",className:void 0,isDisabled:void 0,"data-test-id":void 0,isColumn:!1};const gu=({children:e,withShadow:t,bgColor:n,...r})=>M.jsx(rt,{boxShadow:t?"$raised":"$none",bgColor:"$white",...r,children:e});gu.displayName="Card";gu.defaultProps={withShadow:!1};var Wb="ifvo3u0";const{sizesAtoms:jd,spaceAtoms:Ld,commonAtoms:Fd,flexAtoms:zb}=Pt.atoms,yu=({children:e,isFluid:t,className:n,display:r,...o})=>{const a=jd({width:"$full",maxW:t?"$full":"$lg"}),s=Ld({mx:"$auto",my:"$0"}),c=Fd({display:r}),{className:u,style:f}=ns({flexAtoms:zb,sizesAtoms:jd,spaceAtoms:Ld,commonAtoms:Fd},o,[a,s,c]);return M.jsx("div",{className:$e("vds-container",!t&&Wb,u,n),style:f,...o,children:e})};yu.displayName="Container";yu.defaultProps={display:"block",children:null,isFluid:!1,className:void 0};const{commonAtoms:Vd,spaceAtoms:Ub,sizesAtoms:Yb,radiiAtoms:Kb,flexAtoms:qb,backgroundAtoms:Xb}=Pt.atoms,Bt=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Vd({display:"flex"}),{className:s,otherProps:c,style:u}=ns({flexAtoms:qb,commonAtoms:Vd,spaceAtoms:Ub,sizesAtoms:Yb,radiiAtoms:Kb,backgroundAtoms:Xb},r,[a]);return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:$e(s,n),style:u,...c,children:t})});Bt.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};Bt.displayName="Flex";const{gridAtoms:Gb,commonAtoms:Zb,spaceAtoms:Qb,sizesAtoms:Jb,radiiAtoms:e0}=Pt.atoms,bu=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Pt.atoms.commonAtoms({display:"grid"}),{className:s,otherProps:c,style:u}=ns({gridAtoms:Gb,commonAtoms:Zb,spaceAtoms:Qb,sizesAtoms:Jb,radiiAtoms:e0},r,[a]);return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:$e(s,n),style:u,...c,children:t})});bu.displayName="Grid";bu.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};const t0={horizontal:"row",vertical:"column",horizontalReverse:"row-reverse",verticalReverse:"column-reverse"},n0=e=>e?t0[e]:void 0,Bd={1:"wrap",0:"nowrap"},r0=e=>e?typeof e=="boolean"?Bd[1]:Bd[0]:void 0,Ar=l.forwardRef(({as:e="div",alignItems:t,children:n,justifyContent:r,direction:o,gap:i,wrap:a=!0,content:s,...c},u)=>{const f=n0(o),d=r0(a);return M.jsx(Bt,{ref:u,"data-test-id":c["data-test-id"],alignItems:t,display:"flex",as:e,direction:f,wrap:d,gap:i,justifyContent:r,...c,children:n})});Ar.defaultProps={as:"div",alignItems:void 0,direction:"vertical",justifyContent:void 0,gap:"4",wrap:!0,"data-test-id":void 0};Ar.displayName="Stack";function o0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Wd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hd(Object(n),!0).forEach(function(r){o0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var i0=(e,t,n)=>{for(var r of Object.keys(e)){var o;if(e[r]!==((o=t[r])!==null&&o!==void 0?o:n[r]))return!1}return!0},Ke=e=>t=>{var n=e.defaultClassName,r=Wd(Wd({},e.defaultVariants),t);for(var o in r){var i,a=(i=r[o])!==null&&i!==void 0?i:e.defaultVariants[o];if(a!=null){var s=a;typeof s=="boolean"&&(s=s===!0?"true":"false");var c=e.variantClassNames[o][s];c&&(n+=" "+c)}}for(var[u,f]of e.compoundVariants)i0(u,r,e.defaultVariants)&&(n+=" "+f);return n},a0=Ke({defaultClassName:"",variantClassNames:{textStyle:{heading1:"_1ccbe2w0",heading2:"_1ccbe2w1",heading3:"_1ccbe2w2",heading4:"_1ccbe2w3",heading5:"_1ccbe2w4",heading6:"_1ccbe2w5",subheading1:"_1ccbe2w6",subheading2:"_1ccbe2w7",subtitle1:"_1ccbe2w8",subtitle2:"_1ccbe2w9",body1:"_1ccbe2wa",body2:"_1ccbe2wb",caption:"_1ccbe2wc",footer:"_1ccbe2wd"},isStrikethrough:{true:"_1ccbe2we"}},defaultVariants:{},compoundVariants:[]});const Xt=l.forwardRef(({as:e="p",children:t,textStyle:n,isStrikethrough:r,className:o,...i},a)=>M.jsx(rt,{as:e,ref:a,className:$e(a0({textStyle:n,isStrikethrough:r}),o),...i,children:t}));Xt.displayName="Text";Xt.defaultProps={as:"p"};var s0="_13vyt6x7",c0="_13vyt6x5",u0="_13vyt6x6",l0="_13vyt6x2",d0="_13vyt6x3",f0="_13vyt6x4";const p0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ab,{id:"vds-accordion-content",className:$e(c0,t),...n,ref:r,children:M.jsx(rt,{className:u0,children:e})})),h0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Rb,{id:"vds-accordion-item",className:$e(l0,t),...n,ref:r,children:e}));var Sc={exports:{}},Io={};/**
|
|
28
28
|
* @license React
|
|
29
29
|
* react-jsx-runtime.production.min.js
|
|
30
30
|
*
|
|
@@ -50,7 +50,7 @@ Check the render method of \``+_+"`."}return""}}function an(_){{if(_!==void 0){v
|
|
|
50
50
|
|
|
51
51
|
Check your code at `+V+":"+Q+"."}return""}}var Mn={};function Rn(_){{var V=kn();if(!V){var Q=typeof _=="string"?_:_.displayName||_.name;Q&&(V=`
|
|
52
52
|
|
|
53
|
-
Check the top-level render call using <`+Q+">.")}return V}}function en(_,V){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var Q=Rn(V);if(Mn[Q])return;Mn[Q]=!0;var fe="";_&&_._owner&&_._owner!==ze.current&&(fe=" It was passed a child from "+h(_._owner.type)+"."),_t(_),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),_t(null)}}function tn(_,V){{if(typeof _!="object")return;if(Et(_))for(var Q=0;Q<_.length;Q++){var fe=_[Q];Jt(fe)&&en(fe,V)}else if(Jt(_))_._store&&(_._store.validated=!0);else if(_){var Se=$(_);if(typeof Se=="function"&&Se!==_.entries)for(var Pe=Se.call(_),_e;!(_e=Pe.next()).done;)Jt(_e.value)&&en(_e.value,V)}}}function nn(_){{var V=_.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===d))Q=V.propTypes;else return;if(Q){var fe=h(V);at(Q,_.props,"prop",fe,_)}else if(V.PropTypes!==void 0&&!Qt){Qt=!0;var Se=h(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Se||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function En(_){{for(var V=Object.keys(_.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){_t(_),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),_t(null);break}}_.ref!==null&&(_t(_),v("Invalid attribute `ref` supplied to `React.Fragment`."),_t(null))}}function fn(_,V,Q,fe,Se,Pe){{var _e=B(_);if(!_e){var we="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(we+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ot=an(Se);ot?we+=ot:we+=kn();var Fe;_===null?Fe="null":Et(_)?Fe="array":_!==void 0&&_.$$typeof===t?(Fe="<"+(h(_.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof _,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,we)}var Be=ve(_,V,Q,Se,Pe);if(Be==null)return Be;if(_e){var Ze=V.children;if(Ze!==void 0)if(fe)if(Et(Ze)){for(var Kt=0;Kt<Ze.length;Kt++)tn(Ze[Kt],_);Object.freeze&&Object.freeze(Ze)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else tn(Ze,_)}return _===r?En(Be):nn(Be),Be}}function Wt(_,V,Q){return fn(_,V,Q,!0)}function nr(_,V,Q){return fn(_,V,Q,!1)}var zt=nr,rr=Wt;Vi.Fragment=r,Vi.jsx=zt,Vi.jsxs=rr}()),Vi}process.env.NODE_ENV==="production"?Sc.exports=v0():Sc.exports=m0();var ft=Sc.exports;const g0=e=>{const t="currentColor";return{...e,color:(()=>e.color?Pt.theme.colors[e.color]?Pt.theme.colors[e.color]:e.color:"inherit")(),fill:(e==null?void 0:e.fill)||t,width:(e==null?void 0:e.size)||24,height:(e==null?void 0:e.size)||24}},ln=g0,y0=e=>{const{color:t,...n}=ln(e);return ft.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ft.jsx("path",{d:"m19.02 6.96-8.62 8.9-5.28-5.27L3 12.71l7.43 7.43 10.74-11.1-2.15-2.08Z",fill:t})})},wu=y0,b0=e=>{const{color:t,...n}=ln(e);return ft.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ft.jsx("path",{d:"m21.59 9.03-2.12-2.12-6.94 6.94-6.94-6.94-2.12 2.12 9.06 9.06 9.06-9.06Z",fill:t})})},Ca=b0,w0=e=>{const{color:t,...n}=ln(e);return ft.jsx("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:ft.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.0304 16.1531C12.7375 16.446 12.2626 16.446 11.9697 16.1531L4.72421 8.90756C4.43132 8.61466 4.43132 8.13979 4.72421 7.8469C5.0171 7.554 5.49198 7.554 5.78487 7.8469L12.5001 14.5621L19.2153 7.8469C19.5082 7.554 19.983 7.554 20.2759 7.8469C20.5688 8.13979 20.5688 8.61467 20.2759 8.90756L13.0304 16.1531Z",fill:t})})},E0=w0,x0=e=>{const{color:t,...n}=ln(e);return ft.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ft.jsx("path",{d:"m16 21.56 2.12-2.12-6.94-6.94 6.94-6.94L16 3.44 6.94 12.5 16 21.56Z",fill:t})})},_0=x0,S0=e=>{const{color:t,...n}=ln(e);return ft.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ft.jsx("path",{d:"m3.47 15.97 2.12 2.12 6.94-6.94 6.94 6.94 2.12-2.12-9.06-9.06-9.06 9.06Z",fill:t})})},Oh=S0,C0=e=>{const{color:t,...n}=ln(e);return ft.jsx("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:ft.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.6685 7.8469C11.9614 7.554 12.4362 7.55401 12.7291 7.8469L19.9746 15.0924C20.2675 15.3853 20.2675 15.8602 19.9746 16.1531C19.6818 16.446 19.2069 16.446 18.914 16.1531L12.1988 9.43789L5.48358 16.1531C5.19068 16.446 4.71581 16.446 4.42292 16.1531C4.13002 15.8602 4.13002 15.3853 4.42292 15.0924L11.6685 7.8469Z",fill:t})})},$0=C0,T0=e=>{const{color:t,...n}=ln(e);return ft.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ft.jsx("path",{d:"m21.06 19.44-6.98-6.98 6.9-6.9-2.12-2.12-6.9 6.9-6.82-6.82-2.12 2.12 6.82 6.82-6.9 6.9 2.12 2.12 6.9-6.9 6.98 6.98 2.12-2.12Z",fill:t})})},Eu=T0,I0=e=>{const{color:t,...n}=ln(e);return ft.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:ft.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.7793 5.28155C20.0722 4.98866 20.0722 4.51378 19.7793 4.22089C19.4864 3.928 19.0115 3.928 18.7186 4.22089L11.9939 10.9456L5.26926 4.22095C4.97637 3.92806 4.50149 3.92806 4.2086 4.22095C3.91571 4.51385 3.91571 4.98872 4.2086 5.28161L10.9333 12.0063L4.20856 18.731C3.91567 19.0239 3.91567 19.4988 4.20856 19.7917C4.50146 20.0846 4.97633 20.0846 5.26922 19.7917L11.9939 13.0669L18.7187 19.7917C19.0116 20.0846 19.4865 20.0846 19.7794 19.7917C20.0723 19.4988 20.0723 19.0239 19.7794 18.731L13.0546 12.0063L19.7793 5.28155Z",fill:t})})},R0=I0,O0=e=>{const{color:t,...n}=ln(e);return ft.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:[ft.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z",fill:t}),ft.jsx("path",{d:"m16.67 9.21-1.42-1.42-3.27 3.28-3.23-3.24-1.42 1.42 3.24 3.23-3.28 3.27 1.42 1.42 3.27-3.28 3.31 3.32 1.42-1.42-3.32-3.31 3.28-3.27Z",fill:t})]})},P0=O0,A0=e=>{const{color:t,...n}=ln(e);return ft.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:[ft.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z",fill:t}),ft.jsx("path",{d:"M12 9.62a1.12 1.12 0 1 0 0-2.24 1.12 1.12 0 0 0 0 2.24ZM13 11.5h-2v6h2v-6Z",fill:t})]})},D0=A0,N0=e=>{const{color:t,...n}=ln(e);return ft.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ft.jsx("path",{d:"M21 11H3v3h18v-3Z",fill:t})})},k0=N0,M0=e=>{const{color:t,...n}=ln(e);return ft.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ft.jsx("path",{d:"m22 21.67-4.86-4.86a8.474 8.474 0 0 0 1.86-5.3c0-4.69-3.81-8.5-8.5-8.5-4.69 0-8.5 3.81-8.5 8.5 0 4.69 3.81 8.5 8.5 8.5 2.01 0 3.85-.7 5.3-1.86l4.86 4.86 1.33-1.33.01-.01ZM10.5 18C6.92 18 4 15.08 4 11.5S6.92 5 10.5 5 17 7.92 17 11.5 14.08 18 10.5 18Z",fill:t})})},j0=M0,L0=e=>{const{color:t,...n}=ln(e);return ft.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:[ft.jsx("path",{d:"M13 11h-2v4h2v-4ZM12 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",fill:t}),ft.jsx("path",{d:"M12 3 2 21h20L12 3Zm0 4.12L18.6 19H5.4L12 7.12Z",fill:t})]})},F0=L0,V0=e=>{const{color:t,...n}=ln(e);return ft.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ft.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm0 16c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1Zm1.37-4.24c-.22.08-.37.27-.37.47v.77h-2v-.77c0-1.06.66-1.98 1.68-2.35.78-.29 1.48-1.15 1.28-2.25-.14-.79-.81-1.46-1.6-1.6a2.003 2.003 0 0 0-2.37 1.97h-2c0-1.18.52-2.3 1.43-3.06.91-.76 2.1-1.08 3.29-.87 1.61.28 2.94 1.61 3.22 3.22.34 1.93-.74 3.81-2.57 4.48l.01-.01Z",fill:t})})},B0=V0,H0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ob,{className:"accordion-header",id:"vds-accordion-header",children:M.jsxs(Pb,{id:"vds-accordion-trigger",className:$e(d0,t),...n,ref:r,children:[M.jsx(rt,{className:f0,children:e}),M.jsx(Ca,{className:s0,size:24,color:Pt.theme.colors.black})]})}));var W0="_7q2fqh7",z0={info:"var(--_1qe00b2y)",warning:"var(--_1qe00b211)",neutral:"var(--_1qe00b2c)",error:"var(--_1qe00b214)"},U0=Ke({defaultClassName:"_7q2fqh0",variantClassNames:{variant:{info:"_7q2fqh1",warning:"_7q2fqh2",neutral:"_7q2fqh3",error:"_7q2fqh4"},size:{full:"_7q2fqh5",default:"_7q2fqh6"}},defaultVariants:{variant:"neutral",size:"default"},compoundVariants:[]});const Y0=16,Ph=l.forwardRef(({className:e,title:t,children:n,withClose:r,variant:o,size:i,onClose:a,...s},c)=>{const u="div",f=l.useRef(null),[d,m]=l.useState(null),b=(()=>{switch(o){case"error":return P0;case"warning":return F0;default:return D0}})(),y=l.useCallback($=>{$.forEach(E=>{const{height:v}=E.contentRect;m(v>Y0)})},[]);return l.useEffect(()=>{const $=f.current;if(!$)return;const E=new ResizeObserver(y);return E.observe($),()=>E.disconnect()},[y]),M.jsxs(u,{ref:c,className:$e(U0({variant:o,size:i}),e),"data-test-id":s["data-test-id"],...s,children:[M.jsxs(Bt,{gap:"$12",alignItems:d?"flex-start":"center",visibility:d===null?"hidden":"visible",children:[M.jsx(rt,{display:"flex",w:Pt.theme.space[24],children:M.jsx(b,{size:24,color:z0[o||"neutral"]})}),M.jsxs(Ar,{gap:"$4",children:[t&&M.jsx(Xt,{textStyle:"caption",as:"span",fontWeight:"$medium",children:t}),M.jsx(rt,{ref:f,className:W0,children:n})]})]}),r&&M.jsx(Bt,{children:M.jsx(Eu,{"data-test-id":"CT_Component-Alert-Close",onClick:a,cursor:"pointer",color:Pt.theme.colors.black,size:16})})]})});Ph.defaultProps={"data-test-id":void 0,title:void 0,withClose:void 0,onClose:void 0};const K0=l.forwardRef((e,t)=>{const{ratio:n=1,style:r,...o}=e;return l.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":""},l.createElement(Ue.div,ae({},o,{ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})))}),xu=({children:e,...t})=>M.jsx(K0,{...t,children:e});xu.defaultProps={children:void 0};xu.displayName="AspectRatio";var q0=Ke({defaultClassName:"_1er7sj40",variantClassNames:{colorScheme:{primary:"_1er7sj41",disabled:"_1er7sj42",yellow:"_1er7sj43",red:"_1er7sj44",blue:"_1er7sj45",neutral:"_1er7sj46"},size:{large:"_1er7sj47 _15r4f4d1oz _15r4f4d1il _15r4f4d15j _15r4f4d1bx",medium:"_1er7sj48 _15r4f4d1op _15r4f4d1ib _15r4f4d15e _15r4f4d1bs",small:"_1er7sj49 _15r4f4d1op _15r4f4d1ib _15r4f4d154 _15r4f4d1bi"},isRounded:{true:"_1er7sj4a",false:"_1er7sj4b"},variant:{primary:"_1er7sj4c",secondary:"_1er7sj4d"}},defaultVariants:{colorScheme:"primary",size:"large",variant:"primary",isRounded:!1},compoundVariants:[[{colorScheme:"primary",variant:"secondary"},"_1er7sj4e"],[{colorScheme:"disabled",variant:"secondary"},"_1er7sj4f"],[{colorScheme:"yellow",variant:"secondary"},"_1er7sj4g"],[{colorScheme:"red",variant:"secondary"},"_1er7sj4h"],[{colorScheme:"blue",variant:"secondary"},"_1er7sj4i"]]});const _u=l.forwardRef(({as:e,children:t,colorScheme:n,size:r,variant:o,isRounded:i,className:a,style:s,...c},u)=>{const f=e||"span";return M.jsx(f,{ref:u,"data-test-id":c["data-test-id"],className:$e(q0({colorScheme:n,variant:o,size:r,isRounded:i}),a),style:s,...c,children:t})});_u.defaultProps={as:"span",colorScheme:"primary",size:"large",children:void 0,"data-test-id":void 0};_u.displayName="Badge";function Yd(e,[t,n]){return Math.min(n,Math.max(t,e))}function X0(e,t=globalThis==null?void 0:globalThis.document){const n=un(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Cc="dismissableLayer.update",G0="dismissableLayer.pointerDownOutside",Z0="dismissableLayer.focusOutside";let Kd;const Ah=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),rs=l.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...u}=e,f=l.useContext(Ah),[d,m]=l.useState(null),p=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=l.useState({}),y=ut(t,F=>m(F)),$=Array.from(f.layers),[E]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),v=$.indexOf(E),w=d?$.indexOf(d):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,I=w>=v,D=J0(F=>{const k=F.target,B=[...f.branches].some(R=>R.contains(k));!I||B||(i==null||i(F),s==null||s(F),F.defaultPrevented||c==null||c())},p),A=ew(F=>{const k=F.target;[...f.branches].some(R=>R.contains(k))||(a==null||a(F),s==null||s(F),F.defaultPrevented||c==null||c())},p);return X0(F=>{w===f.layers.size-1&&(o==null||o(F),!F.defaultPrevented&&c&&(F.preventDefault(),c()))},p),l.useEffect(()=>{if(d)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Kd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),qd(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Kd)}},[d,p,r,f]),l.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),qd())},[d,f]),l.useEffect(()=>{const F=()=>b({});return document.addEventListener(Cc,F),()=>document.removeEventListener(Cc,F)},[]),l.createElement(Ue.div,ae({},u,{ref:y,style:{pointerEvents:T?I?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,D.onPointerDownCapture)}))}),Q0=l.forwardRef((e,t)=>{const n=l.useContext(Ah),r=l.useRef(null),o=ut(t,r);return l.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.createElement(Ue.div,ae({},e,{ref:o}))});function J0(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Dh(G0,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ew(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=l.useRef(!1);return l.useEffect(()=>{const o=i=>{i.target&&!r.current&&Dh(Z0,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function qd(){const e=new CustomEvent(Cc);document.dispatchEvent(e)}function Dh(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?wh(o,i):o.dispatchEvent(i)}const tw=rs,nw=Q0;let Hs=0;function Nh(){l.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Xd()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Xd()),Hs++,()=>{Hs===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Hs--}},[])}function Xd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Ws="focusScope.autoFocusOnMount",zs="focusScope.autoFocusOnUnmount",Gd={bubbles:!1,cancelable:!0},kh=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=l.useState(null),u=un(o),f=un(i),d=l.useRef(null),m=ut(t,y=>c(y)),p=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let y=function(w){if(p.paused||!s)return;const T=w.target;s.contains(T)?d.current=T:ar(d.current,{select:!0})},$=function(w){if(p.paused||!s)return;const T=w.relatedTarget;T!==null&&(s.contains(T)||ar(d.current,{select:!0}))},E=function(w){const T=document.activeElement;for(const I of w)I.removedNodes.length>0&&(s!=null&&s.contains(T)||ar(s))};document.addEventListener("focusin",y),document.addEventListener("focusout",$);const v=new MutationObserver(E);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",$),v.disconnect()}}},[r,s,p.paused]),l.useEffect(()=>{if(s){Qd.add(p);const y=document.activeElement;if(!s.contains(y)){const E=new CustomEvent(Ws,Gd);s.addEventListener(Ws,u),s.dispatchEvent(E),E.defaultPrevented||(rw(cw(Mh(s)),{select:!0}),document.activeElement===y&&ar(s))}return()=>{s.removeEventListener(Ws,u),setTimeout(()=>{const E=new CustomEvent(zs,Gd);s.addEventListener(zs,f),s.dispatchEvent(E),E.defaultPrevented||ar(y??document.body,{select:!0}),s.removeEventListener(zs,f),Qd.remove(p)},0)}}},[s,u,f,p]);const b=l.useCallback(y=>{if(!n&&!r||p.paused)return;const $=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,E=document.activeElement;if($&&E){const v=y.currentTarget,[w,T]=ow(v);w&&T?!y.shiftKey&&E===T?(y.preventDefault(),n&&ar(w,{select:!0})):y.shiftKey&&E===w&&(y.preventDefault(),n&&ar(T,{select:!0})):E===v&&y.preventDefault()}},[n,r,p.paused]);return l.createElement(Ue.div,ae({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function rw(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ar(r,{select:t}),document.activeElement!==n)return}function ow(e){const t=Mh(e),n=Zd(t,e),r=Zd(t.reverse(),e);return[n,r]}function Mh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zd(e,t){for(const n of e)if(!iw(n,{upTo:t}))return n}function iw(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 aw(e){return e instanceof HTMLInputElement&&"select"in e}function ar(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&aw(e)&&t&&e.select()}}const Qd=sw();function sw(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Jd(e,t),e.unshift(t)},remove(t){var n;e=Jd(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Jd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function cw(e){return e.filter(t=>t.tagName!=="A")}const uw=["top","right","bottom","left"],vr=Math.min,vn=Math.max,$a=Math.round,Bi=Math.floor,mr=e=>({x:e,y:e}),lw={left:"right",right:"left",bottom:"top",top:"bottom"},dw={start:"end",end:"start"};function $c(e,t,n){return vn(e,vr(t,n))}function Zn(e,t){return typeof e=="function"?e(t):e}function Qn(e){return e.split("-")[0]}function go(e){return e.split("-")[1]}function Su(e){return e==="x"?"y":"x"}function Cu(e){return e==="y"?"height":"width"}function yo(e){return["top","bottom"].includes(Qn(e))?"y":"x"}function $u(e){return Su(yo(e))}function fw(e,t,n){n===void 0&&(n=!1);const r=go(e),o=$u(e),i=Cu(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ta(a)),[a,Ta(a)]}function pw(e){const t=Ta(e);return[Tc(e),t,Tc(t)]}function Tc(e){return e.replace(/start|end/g,t=>dw[t])}function hw(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function vw(e,t,n,r){const o=go(e);let i=hw(Qn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Tc)))),i}function Ta(e){return e.replace(/left|right|bottom|top/g,t=>lw[t])}function mw(e){return{top:0,right:0,bottom:0,left:0,...e}}function jh(e){return typeof e!="number"?mw(e):{top:e,right:e,bottom:e,left:e}}function Ia(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ef(e,t,n){let{reference:r,floating:o}=e;const i=yo(t),a=$u(t),s=Cu(a),c=Qn(t),u=i==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[s]/2-o[s]/2;let p;switch(c){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(go(t)){case"start":p[a]-=m*(n&&u?-1:1);break;case"end":p[a]+=m*(n&&u?-1:1);break}return p}const gw=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=ef(u,r,c),m=r,p={},b=0;for(let y=0;y<s.length;y++){const{name:$,fn:E}=s[y],{x:v,y:w,data:T,reset:I}=await E({x:f,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});if(f=v??f,d=w??d,p={...p,[$]:{...p[$],...T}},I&&b<=50){b++,typeof I=="object"&&(I.placement&&(m=I.placement),I.rects&&(u=I.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:f,y:d}=ef(u,m,c)),y=-1;continue}}return{x:f,y:d,placement:m,strategy:o,middlewareData:p}};async function si(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=Zn(t,e),b=jh(p),$=s[m?d==="floating"?"reference":"floating":d],E=Ia(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement($)))==null||n?$:$.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:c})),v=d==="floating"?{...a.floating,x:r,y:o}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},I=Ia(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:w,strategy:c}):v);return{top:(E.top-I.top+b.top)/T.y,bottom:(I.bottom-E.bottom+b.bottom)/T.y,left:(E.left-I.left+b.left)/T.x,right:(I.right-E.right+b.right)/T.x}}const tf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s}=t,{element:c,padding:u=0}=Zn(e,t)||{};if(c==null)return{};const f=jh(u),d={x:n,y:r},m=$u(o),p=Cu(m),b=await a.getDimensions(c),y=m==="y",$=y?"top":"left",E=y?"bottom":"right",v=y?"clientHeight":"clientWidth",w=i.reference[p]+i.reference[m]-d[m]-i.floating[p],T=d[m]-i.reference[m],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let D=I?I[v]:0;(!D||!await(a.isElement==null?void 0:a.isElement(I)))&&(D=s.floating[v]||i.floating[p]);const A=w/2-T/2,F=D/2-b[p]/2-1,k=vr(f[$],F),B=vr(f[E],F),R=k,x=D-b[p]-B,h=D/2-b[p]/2+A,C=$c(R,h,x),j=go(o)!=null&&h!=C&&i.reference[p]/2-(h<R?k:B)-b[p]/2<0?h<R?R-h:x-h:0;return{[m]:d[m]-j,data:{[m]:C,centerOffset:h-C+j}}}}),yw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...y}=Zn(e,t),$=Qn(r),E=Qn(a)===a,v=await(s.isRTL==null?void 0:s.isRTL(c.floating)),w=d||(E||!b?[Ta(a)]:pw(a));!d&&p!=="none"&&w.push(...vw(a,b,p,v));const T=[a,...w],I=await si(t,y),D=[];let A=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&D.push(I[$]),f){const R=fw(r,i,v);D.push(I[R[0]],I[R[1]])}if(A=[...A,{placement:r,overflows:D}],!D.every(R=>R<=0)){var F,k;const R=(((F=o.flip)==null?void 0:F.index)||0)+1,x=T[R];if(x)return{data:{index:R,overflows:A},reset:{placement:x}};let h=(k=A.filter(C=>C.overflows[0]<=0).sort((C,P)=>C.overflows[1]-P.overflows[1])[0])==null?void 0:k.placement;if(!h)switch(m){case"bestFit":{var B;const C=(B=A.map(P=>[P.placement,P.overflows.filter(j=>j>0).reduce((j,H)=>j+H,0)]).sort((P,j)=>P[1]-j[1])[0])==null?void 0:B[0];C&&(h=C);break}case"initialPlacement":h=a;break}if(r!==h)return{reset:{placement:h}}}return{}}}};function nf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rf(e){return uw.some(t=>e[t]>=0)}const bw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Zn(e,t);switch(r){case"referenceHidden":{const i=await si(t,{...o,elementContext:"reference"}),a=nf(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:rf(a)}}}case"escaped":{const i=await si(t,{...o,altBoundary:!0}),a=nf(i,n.floating);return{data:{escapedOffsets:a,escaped:rf(a)}}}default:return{}}}}};async function ww(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Qn(n),s=go(n),c=yo(n)==="y",u=["left","top"].includes(a)?-1:1,f=i&&c?-1:1,d=Zn(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof b=="number"&&(p=s==="end"?b*-1:b),c?{x:p*f,y:m*u}:{x:m*u,y:p*f}}const Ew=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await ww(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},xw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:$=>{let{x:E,y:v}=$;return{x:E,y:v}}},...c}=Zn(e,t),u={x:n,y:r},f=await si(t,c),d=yo(Qn(o)),m=Su(d);let p=u[m],b=u[d];if(i){const $=m==="y"?"top":"left",E=m==="y"?"bottom":"right",v=p+f[$],w=p-f[E];p=$c(v,p,w)}if(a){const $=d==="y"?"top":"left",E=d==="y"?"bottom":"right",v=b+f[$],w=b-f[E];b=$c(v,b,w)}const y=s.fn({...t,[m]:p,[d]:b});return{...y,data:{x:y.x-n,y:y.y-r}}}}},_w=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Zn(e,t),f={x:n,y:r},d=yo(o),m=Su(d);let p=f[m],b=f[d];const y=Zn(s,t),$=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const w=m==="y"?"height":"width",T=i.reference[m]-i.floating[w]+$.mainAxis,I=i.reference[m]+i.reference[w]-$.mainAxis;p<T?p=T:p>I&&(p=I)}if(u){var E,v;const w=m==="y"?"width":"height",T=["top","left"].includes(Qn(o)),I=i.reference[d]-i.floating[w]+(T&&((E=a.offset)==null?void 0:E[d])||0)+(T?0:$.crossAxis),D=i.reference[d]+i.reference[w]+(T?0:((v=a.offset)==null?void 0:v[d])||0)-(T?$.crossAxis:0);b<I?b=I:b>D&&(b=D)}return{[m]:p,[d]:b}}}},Sw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Zn(e,t),c=await si(t,s),u=Qn(n),f=go(n),d=yo(n)==="y",{width:m,height:p}=r.floating;let b,y;u==="top"||u==="bottom"?(b=u,y=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,b=f==="end"?"top":"bottom");const $=p-c[b],E=m-c[y],v=!t.middlewareData.shift;let w=$,T=E;if(d){const D=m-c.left-c.right;T=f||v?vr(E,D):D}else{const D=p-c.top-c.bottom;w=f||v?vr($,D):D}if(v&&!f){const D=vn(c.left,0),A=vn(c.right,0),F=vn(c.top,0),k=vn(c.bottom,0);d?T=m-2*(D!==0||A!==0?D+A:vn(c.left,c.right)):w=p-2*(F!==0||k!==0?F+k:vn(c.top,c.bottom))}await a({...t,availableWidth:T,availableHeight:w});const I=await o.getDimensions(i.floating);return m!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function gr(e){return Lh(e)?(e.nodeName||"").toLowerCase():"#document"}function yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function er(e){var t;return(t=(Lh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lh(e){return e instanceof Node||e instanceof yn(e).Node}function Jn(e){return e instanceof Element||e instanceof yn(e).Element}function Bn(e){return e instanceof HTMLElement||e instanceof yn(e).HTMLElement}function of(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yn(e).ShadowRoot}function Ci(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=In(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Cw(e){return["table","td","th"].includes(gr(e))}function Tu(e){const t=Iu(),n=In(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function $w(e){let t=fo(e);for(;Bn(t)&&!os(t);){if(Tu(t))return t;t=fo(t)}return null}function Iu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function os(e){return["html","body","#document"].includes(gr(e))}function In(e){return yn(e).getComputedStyle(e)}function is(e){return Jn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function fo(e){if(gr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||of(e)&&e.host||er(e);return of(t)?t.host:t}function Fh(e){const t=fo(e);return os(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bn(t)&&Ci(t)?t:Fh(t)}function Ra(e,t){var n;t===void 0&&(t=[]);const r=Fh(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=yn(r);return o?t.concat(i,i.visualViewport||[],Ci(r)?r:[]):t.concat(r,Ra(r))}function Vh(e){const t=In(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Bn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=$a(n)!==i||$a(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ru(e){return Jn(e)?e:e.contextElement}function oo(e){const t=Ru(e);if(!Bn(t))return mr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Vh(t);let a=(i?$a(n.width):n.width)/r,s=(i?$a(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Tw=mr(0);function Bh(e){const t=yn(e);return!Iu()||!t.visualViewport?Tw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Iw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yn(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ru(e);let a=mr(1);t&&(r?Jn(r)&&(a=oo(r)):a=oo(e));const s=Iw(i,n,r)?Bh(i):mr(0);let c=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(i){const m=yn(i),p=r&&Jn(r)?yn(r):r;let b=m.frameElement;for(;b&&r&&p!==m;){const y=oo(b),$=b.getBoundingClientRect(),E=In(b),v=$.left+(b.clientLeft+parseFloat(E.paddingLeft))*y.x,w=$.top+(b.clientTop+parseFloat(E.paddingTop))*y.y;c*=y.x,u*=y.y,f*=y.x,d*=y.y,c+=v,u+=w,b=yn(b).frameElement}}return Ia({width:f,height:d,x:c,y:u})}function Rw(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Bn(n),i=er(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=mr(1);const c=mr(0);if((o||!o&&r!=="fixed")&&((gr(n)!=="body"||Ci(i))&&(a=is(n)),Bn(n))){const u=Mr(n);s=oo(n),c.x=u.x+n.clientLeft,c.y=u.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function Ow(e){return Array.from(e.getClientRects())}function Hh(e){return Mr(er(e)).left+is(e).scrollLeft}function Pw(e){const t=er(e),n=is(e),r=e.ownerDocument.body,o=vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Hh(e);const s=-n.scrollTop;return In(r).direction==="rtl"&&(a+=vn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Aw(e,t){const n=yn(e),r=er(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const u=Iu();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function Dw(e,t){const n=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Bn(e)?oo(e):mr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,u=r*i.y;return{width:a,height:s,x:c,y:u}}function af(e,t,n){let r;if(t==="viewport")r=Aw(e,n);else if(t==="document")r=Pw(er(e));else if(Jn(t))r=Dw(t,n);else{const o=Bh(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ia(r)}function Wh(e,t){const n=fo(e);return n===t||!Jn(n)||os(n)?!1:In(n).position==="fixed"||Wh(n,t)}function Nw(e,t){const n=t.get(e);if(n)return n;let r=Ra(e).filter(s=>Jn(s)&&gr(s)!=="body"),o=null;const i=In(e).position==="fixed";let a=i?fo(e):e;for(;Jn(a)&&!os(a);){const s=In(a),c=Tu(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ci(a)&&!c&&Wh(e,a))?r=r.filter(f=>f!==a):o=s,a=fo(a)}return t.set(e,r),r}function kw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Nw(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((u,f)=>{const d=af(t,f,o);return u.top=vn(d.top,u.top),u.right=vr(d.right,u.right),u.bottom=vr(d.bottom,u.bottom),u.left=vn(d.left,u.left),u},af(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Mw(e){return Vh(e)}function jw(e,t,n){const r=Bn(t),o=er(t),i=n==="fixed",a=Mr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=mr(0);if(r||!r&&!i)if((gr(t)!=="body"||Ci(o))&&(s=is(t)),r){const u=Mr(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=Hh(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function sf(e,t){return!Bn(e)||In(e).position==="fixed"?null:t?t(e):e.offsetParent}function zh(e,t){const n=yn(e);if(!Bn(e))return n;let r=sf(e,t);for(;r&&Cw(r)&&In(r).position==="static";)r=sf(r,t);return r&&(gr(r)==="html"||gr(r)==="body"&&In(r).position==="static"&&!Tu(r))?n:r||$w(e)||n}const Lw=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||zh,i=this.getDimensions;return{reference:jw(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Fw(e){return In(e).direction==="rtl"}const Vw={convertOffsetParentRelativeRectToViewportRelativeRect:Rw,getDocumentElement:er,getClippingRect:kw,getOffsetParent:zh,getElementRects:Lw,getClientRects:Ow,getDimensions:Mw,getScale:oo,isElement:Jn,isRTL:Fw};function Bw(e,t){let n=null,r;const o=er(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:u,top:f,width:d,height:m}=e.getBoundingClientRect();if(s||t(),!d||!m)return;const p=Bi(f),b=Bi(o.clientWidth-(u+d)),y=Bi(o.clientHeight-(f+m)),$=Bi(u),v={rootMargin:-p+"px "+-b+"px "+-y+"px "+-$+"px",threshold:vn(0,vr(1,c))||1};let w=!0;function T(I){const D=I[0].intersectionRatio;if(D!==c){if(!w)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(T,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,v)}n.observe(e)}return a(!0),i}function Hw(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Ru(e),f=o||i?[...u?Ra(u):[],...Ra(t)]:[];f.forEach(E=>{o&&E.addEventListener("scroll",n,{passive:!0}),i&&E.addEventListener("resize",n)});const d=u&&s?Bw(u,n):null;let m=-1,p=null;a&&(p=new ResizeObserver(E=>{let[v]=E;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let b,y=c?Mr(e):null;c&&$();function $(){const E=Mr(e);y&&(E.x!==y.x||E.y!==y.y||E.width!==y.width||E.height!==y.height)&&n(),y=E,b=requestAnimationFrame($)}return n(),()=>{f.forEach(E=>{o&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),d&&d(),p&&p.disconnect(),p=null,c&&cancelAnimationFrame(b)}}const Ww=(e,t,n)=>{const r=new Map,o={platform:Vw,...n},i={...o.platform,_c:r};return gw(e,t,{...o,platform:i})},zw=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?tf({element:r.current,padding:o}).fn(n):{}:r?tf({element:r,padding:o}).fn(n):{}}}};var la=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Oa(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Oa(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Oa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Uh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cf(e,t){const n=Uh(e);return Math.round(t*n)/n}function uf(e){const t=Oe.useRef(e);return la(()=>{t.current=e}),t}function Uw(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,d]=Oe.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=Oe.useState(r);Oa(m,r)||p(r);const[b,y]=Oe.useState(null),[$,E]=Oe.useState(null),v=Oe.useCallback(j=>{j!=D.current&&(D.current=j,y(j))},[y]),w=Oe.useCallback(j=>{j!==A.current&&(A.current=j,E(j))},[E]),T=i||b,I=a||$,D=Oe.useRef(null),A=Oe.useRef(null),F=Oe.useRef(f),k=uf(c),B=uf(o),R=Oe.useCallback(()=>{if(!D.current||!A.current)return;const j={placement:t,strategy:n,middleware:m};B.current&&(j.platform=B.current),Ww(D.current,A.current,j).then(H=>{const U={...H,isPositioned:!0};x.current&&!Oa(F.current,U)&&(F.current=U,Hy.flushSync(()=>{d(U)}))})},[m,t,n,B]);la(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[u]);const x=Oe.useRef(!1);la(()=>(x.current=!0,()=>{x.current=!1}),[]),la(()=>{if(T&&(D.current=T),I&&(A.current=I),T&&I){if(k.current)return k.current(T,I,R);R()}},[T,I,R,k]);const h=Oe.useMemo(()=>({reference:D,floating:A,setReference:v,setFloating:w}),[v,w]),C=Oe.useMemo(()=>({reference:T,floating:I}),[T,I]),P=Oe.useMemo(()=>{const j={position:n,left:0,top:0};if(!C.floating)return j;const H=cf(C.floating,f.x),U=cf(C.floating,f.y);return s?{...j,transform:"translate("+H+"px, "+U+"px)",...Uh(C.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:U}},[n,s,C.floating,f.x,f.y]);return Oe.useMemo(()=>({...f,update:R,refs:h,elements:C,floatingStyles:P}),[f,R,h,C,P])}const Yw=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return l.createElement(Ue.svg,ae({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:l.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Kw=Yw;function as(e){const[t,n]=l.useState(void 0);return Gt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Yh="Popper",[Kh,ss]=bn(Yh),[qw,qh]=Kh(Yh),Xw=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return l.createElement(qw,{scope:t,anchor:r,onAnchorChange:o},n)},Gw="PopperAnchor",Zw=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=qh(Gw,n),a=l.useRef(null),s=ut(t,a);return l.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:l.createElement(Ue.div,ae({},o,{ref:s}))}),Xh="PopperContent",[Qw,Jw]=Kh(Xh),e1=l.forwardRef((e,t)=>{var n,r,o,i,a,s,c,u;const{__scopePopper:f,side:d="bottom",sideOffset:m=0,align:p="center",alignOffset:b=0,arrowPadding:y=0,collisionBoundary:$=[],collisionPadding:E=0,sticky:v="partial",hideWhenDetached:w=!1,avoidCollisions:T=!0,onPlaced:I,...D}=e,A=qh(Xh,f),[F,k]=l.useState(null),B=ut(t,xe=>k(xe)),[R,x]=l.useState(null),h=as(R),C=(n=h==null?void 0:h.width)!==null&&n!==void 0?n:0,P=(r=h==null?void 0:h.height)!==null&&r!==void 0?r:0,j=d+(p!=="center"?"-"+p:""),H=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},U=Array.isArray($)?$:[$],re=U.length>0,W={padding:H,boundary:U.filter(o1),altBoundary:re},{refs:L,floatingStyles:J,placement:Y,isPositioned:K,middlewareData:Z}=Uw({strategy:"fixed",placement:j,whileElementsMounted:Hw,elements:{reference:A.anchor},middleware:[Ew({mainAxis:m+P,alignmentAxis:b}),T&&xw({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?_w():void 0,...W}),T&&yw({...W}),Sw({...W,apply:({elements:xe,rects:Ee,availableWidth:Ae,availableHeight:Ie})=>{const{width:Le,height:ke}=Ee.reference,at=xe.floating.style;at.setProperty("--radix-popper-available-width",`${Ae}px`),at.setProperty("--radix-popper-available-height",`${Ie}px`),at.setProperty("--radix-popper-anchor-width",`${Le}px`),at.setProperty("--radix-popper-anchor-height",`${ke}px`)}}),R&&zw({element:R,padding:y}),i1({arrowWidth:C,arrowHeight:P}),w&&bw({strategy:"referenceHidden"})]}),[ce,z]=Gh(Y),G=un(I);Gt(()=>{K&&(G==null||G())},[K,G]);const oe=(o=Z.arrow)===null||o===void 0?void 0:o.x,ne=(i=Z.arrow)===null||i===void 0?void 0:i.y,ie=((a=Z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[ee,pe]=l.useState();return Gt(()=>{F&&pe(window.getComputedStyle(F).zIndex)},[F]),l.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:K?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(s=Z.transformOrigin)===null||s===void 0?void 0:s.x,(c=Z.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},l.createElement(Qw,{scope:f,placedSide:ce,onArrowChange:x,arrowX:oe,arrowY:ne,shouldHideArrow:ie},l.createElement(Ue.div,ae({"data-side":ce,"data-align":z},D,{ref:B,style:{...D.style,animation:K?void 0:"none",opacity:(u=Z.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),t1="PopperArrow",n1={top:"bottom",right:"left",bottom:"top",left:"right"},r1=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Jw(t1,r),a=n1[i.placedSide];return l.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},l.createElement(Kw,ae({},o,{ref:n,style:{...o.style,display:"block"}})))});function o1(e){return e!==null}const i1=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:c,middlewareData:u}=t,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=d?0:e.arrowWidth,p=d?0:e.arrowHeight,[b,y]=Gh(s),$={start:"0%",center:"50%",end:"100%"}[y],E=((r=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+m/2,v=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+p/2;let w="",T="";return b==="bottom"?(w=d?$:`${E}px`,T=`${-p}px`):b==="top"?(w=d?$:`${E}px`,T=`${c.floating.height+p}px`):b==="right"?(w=`${-p}px`,T=d?$:`${v}px`):b==="left"&&(w=`${c.floating.width+p}px`,T=d?$:`${v}px`),{data:{x:w,y:T}}}});function Gh(e){const[t,n="center"]=e.split("-");return[t,n]}const Zh=Xw,Qh=Zw,Jh=e1,a1=r1,ev=l.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?mn.createPortal(l.createElement(Ue.div,ae({},o,{ref:t})),r):null}),s1=ev;function cs(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const us=l.forwardRef((e,t)=>l.createElement(Ue.span,ae({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),c1=us;var u1=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ur=new WeakMap,Hi=new WeakMap,Wi={},Us=0,tv=function(e){return e&&(e.host||tv(e.parentNode))},l1=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=tv(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})},d1=function(e,t,n,r){var o=l1(t,Array.isArray(e)?e:[e]);Wi[n]||(Wi[n]=new WeakMap);var i=Wi[n],a=[],s=new Set,c=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(m){if(s.has(m))f(m);else{var p=m.getAttribute(r),b=p!==null&&p!=="false",y=(Ur.get(m)||0)+1,$=(i.get(m)||0)+1;Ur.set(m,y),i.set(m,$),a.push(m),y===1&&b&&Hi.set(m,!0),$===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return f(t),s.clear(),Us++,function(){a.forEach(function(d){var m=Ur.get(d)-1,p=i.get(d)-1;Ur.set(d,m),i.set(d,p),m||(Hi.has(d)||d.removeAttribute(r),Hi.delete(d)),p||d.removeAttribute(n)}),Us--,Us||(Ur=new WeakMap,Ur=new WeakMap,Hi=new WeakMap,Wi={})}},nv=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||u1(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),d1(r,o,n,"aria-hidden")):function(){return null}},Cn=function(){return Cn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Cn.apply(this,arguments)};function rv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function f1(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var da="right-scroll-bar-position",fa="width-before-scroll-bar",p1="with-scroll-bars-hidden",h1="--removed-body-scroll-bar-size";function v1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function m1(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function g1(e,t){return m1(t||null,function(n){return e.forEach(function(r){return v1(r,n)})})}function y1(e){return e}function b1(e,t){t===void 0&&(t=y1);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),n}}}};return o}function w1(e){e===void 0&&(e={});var t=b1(null);return t.options=Cn({async:!0,ssr:!1},e),t}var ov=function(e){var t=e.sideCar,n=rv(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 Oe.createElement(r,Cn({},n))};ov.isSideCarExport=!0;function E1(e,t){return e.useMedium(t),ov}var iv=w1(),Ys=function(){},ls=Oe.forwardRef(function(e,t){var n=Oe.useRef(null),r=Oe.useState({onScrollCapture:Ys,onWheelCapture:Ys,onTouchMoveCapture:Ys}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,m=e.sideCar,p=e.noIsolation,b=e.inert,y=e.allowPinchZoom,$=e.as,E=$===void 0?"div":$,v=rv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=m,T=g1([n,t]),I=Cn(Cn({},v),o);return Oe.createElement(Oe.Fragment,null,f&&Oe.createElement(w,{sideCar:iv,removeScrollBar:u,shards:d,noIsolation:p,inert:b,setCallbacks:i,allowPinchZoom:!!y,lockRef:n}),a?Oe.cloneElement(Oe.Children.only(s),Cn(Cn({},I),{ref:T})):Oe.createElement(E,Cn({},I,{className:c,ref:T}),s))});ls.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ls.classNames={fullWidth:fa,zeroRight:da};var lf,x1=function(){if(lf)return lf;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _1(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=x1();return t&&e.setAttribute("nonce",t),e}function S1(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function C1(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $1=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_1())&&(S1(t,n),C1(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},T1=function(){var e=$1();return function(t,n){Oe.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},av=function(){var e=T1(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},I1={left:0,top:0,right:0,gap:0},Ks=function(e){return parseInt(e||"",10)||0},R1=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ks(n),Ks(r),Ks(o)]},O1=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return I1;var t=R1(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])}},P1=av(),A1=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
53
|
+
Check the top-level render call using <`+Q+">.")}return V}}function en(_,V){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var Q=Rn(V);if(Mn[Q])return;Mn[Q]=!0;var fe="";_&&_._owner&&_._owner!==ze.current&&(fe=" It was passed a child from "+h(_._owner.type)+"."),_t(_),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),_t(null)}}function tn(_,V){{if(typeof _!="object")return;if(Et(_))for(var Q=0;Q<_.length;Q++){var fe=_[Q];Jt(fe)&&en(fe,V)}else if(Jt(_))_._store&&(_._store.validated=!0);else if(_){var Se=$(_);if(typeof Se=="function"&&Se!==_.entries)for(var Pe=Se.call(_),_e;!(_e=Pe.next()).done;)Jt(_e.value)&&en(_e.value,V)}}}function nn(_){{var V=_.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===d))Q=V.propTypes;else return;if(Q){var fe=h(V);at(Q,_.props,"prop",fe,_)}else if(V.PropTypes!==void 0&&!Qt){Qt=!0;var Se=h(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Se||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function En(_){{for(var V=Object.keys(_.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){_t(_),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),_t(null);break}}_.ref!==null&&(_t(_),v("Invalid attribute `ref` supplied to `React.Fragment`."),_t(null))}}function fn(_,V,Q,fe,Se,Pe){{var _e=B(_);if(!_e){var we="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(we+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ot=an(Se);ot?we+=ot:we+=kn();var Fe;_===null?Fe="null":Et(_)?Fe="array":_!==void 0&&_.$$typeof===t?(Fe="<"+(h(_.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof _,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,we)}var Be=ve(_,V,Q,Se,Pe);if(Be==null)return Be;if(_e){var Ze=V.children;if(Ze!==void 0)if(fe)if(Et(Ze)){for(var Kt=0;Kt<Ze.length;Kt++)tn(Ze[Kt],_);Object.freeze&&Object.freeze(Ze)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else tn(Ze,_)}return _===r?En(Be):nn(Be),Be}}function Wt(_,V,Q){return fn(_,V,Q,!0)}function nr(_,V,Q){return fn(_,V,Q,!1)}var zt=nr,rr=Wt;Vi.Fragment=r,Vi.jsx=zt,Vi.jsxs=rr}()),Vi}process.env.NODE_ENV==="production"?Sc.exports=v0():Sc.exports=m0();var ut=Sc.exports;const g0=e=>{const t="currentColor";return{...e,color:(()=>e.color?Pt.theme.colors[e.color]?Pt.theme.colors[e.color]:e.color:"inherit")(),fill:(e==null?void 0:e.fill)||t,width:(e==null?void 0:e.size)||24,height:(e==null?void 0:e.size)||24}},ln=g0,y0=e=>{const{color:t,...n}=ln(e);return ut.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ut.jsx("path",{d:"m19.02 6.96-8.62 8.9-5.28-5.27L3 12.71l7.43 7.43 10.74-11.1-2.15-2.08Z",fill:t})})},wu=y0,b0=e=>{const{color:t,...n}=ln(e);return ut.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ut.jsx("path",{d:"m21.59 9.03-2.12-2.12-6.94 6.94-6.94-6.94-2.12 2.12 9.06 9.06 9.06-9.06Z",fill:t})})},Ca=b0,w0=e=>{const{color:t,...n}=ln(e);return ut.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ut.jsx("path",{d:"M13.1364 16.2592C12.7849 16.6106 12.215 16.6106 11.8636 16.2592L4.61805 9.01365C4.26657 8.66217 4.26657 8.09233 4.61805 7.74085C4.96952 7.38938 5.53937 7.38938 5.89084 7.74085L12.5 14.35L19.1091 7.74085C19.4606 7.38938 20.0304 7.38938 20.3819 7.74086C20.7334 8.09233 20.7334 8.66218 20.3819 9.01365L13.1364 16.2592Z",fill:t})})},E0=w0,x0=e=>{const{color:t,...n}=ln(e);return ut.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ut.jsx("path",{d:"m16 21.56 2.12-2.12-6.94-6.94 6.94-6.94L16 3.44 6.94 12.5 16 21.56Z",fill:t})})},_0=x0,S0=e=>{const{color:t,...n}=ln(e);return ut.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ut.jsx("path",{d:"m3.47 15.97 2.12 2.12 6.94-6.94 6.94 6.94 2.12-2.12-9.06-9.06-9.06 9.06Z",fill:t})})},Oh=S0,C0=e=>{const{color:t,...n}=ln(e);return ut.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ut.jsx("path",{d:"M11.8636 7.74084C12.2151 7.38937 12.785 7.38937 13.1364 7.74084L20.382 14.9864C20.7334 15.3378 20.7334 15.9077 20.382 16.2591C20.0305 16.6106 19.4606 16.6106 19.1092 16.2591L12.5 9.65002L5.89089 16.2591C5.53941 16.6106 4.96957 16.6106 4.61809 16.2591C4.26662 15.9077 4.26662 15.3378 4.6181 14.9864L11.8636 7.74084Z",fill:t})})},$0=C0,T0=e=>{const{color:t,...n}=ln(e);return ut.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ut.jsx("path",{d:"m21.06 19.44-6.98-6.98 6.9-6.9-2.12-2.12-6.9 6.9-6.82-6.82-2.12 2.12 6.82 6.82-6.9 6.9 2.12 2.12 6.9-6.9 6.98 6.98 2.12-2.12Z",fill:t})})},Eu=T0,I0=e=>{const{color:t,...n}=ln(e);return ut.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:[ut.jsx("path",{d:"M4.60857 4.11486C4.96004 3.76339 5.52989 3.76339 5.88136 4.11486L20.3915 18.6249C20.743 18.9764 20.743 19.5462 20.3915 19.8977C20.04 20.2492 19.4702 20.2492 19.1187 19.8977L4.60858 5.38766C4.2571 5.03618 4.2571 4.46634 4.60857 4.11486Z",fill:t}),ut.jsx("path",{d:"M20.3914 4.1148C20.7429 4.46627 20.7429 5.03612 20.3914 5.38759L5.88138 19.8977C5.52991 20.2492 4.96006 20.2492 4.60859 19.8977C4.25711 19.5463 4.25711 18.9764 4.60858 18.6249L19.1186 4.1148C19.4701 3.76333 20.04 3.76333 20.3914 4.1148Z",fill:t})]})},R0=I0,O0=e=>{const{color:t,...n}=ln(e);return ut.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:[ut.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z",fill:t}),ut.jsx("path",{d:"m16.67 9.21-1.42-1.42-3.27 3.28-3.23-3.24-1.42 1.42 3.24 3.23-3.28 3.27 1.42 1.42 3.27-3.28 3.31 3.32 1.42-1.42-3.32-3.31 3.28-3.27Z",fill:t})]})},P0=O0,A0=e=>{const{color:t,...n}=ln(e);return ut.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:[ut.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z",fill:t}),ut.jsx("path",{d:"M12 9.62a1.12 1.12 0 1 0 0-2.24 1.12 1.12 0 0 0 0 2.24ZM13 11.5h-2v6h2v-6Z",fill:t})]})},D0=A0,N0=e=>{const{color:t,...n}=ln(e);return ut.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ut.jsx("path",{d:"M21 11H3v3h18v-3Z",fill:t})})},k0=N0,M0=e=>{const{color:t,...n}=ln(e);return ut.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ut.jsx("path",{d:"m22 21.67-4.86-4.86a8.474 8.474 0 0 0 1.86-5.3c0-4.69-3.81-8.5-8.5-8.5-4.69 0-8.5 3.81-8.5 8.5 0 4.69 3.81 8.5 8.5 8.5 2.01 0 3.85-.7 5.3-1.86l4.86 4.86 1.33-1.33.01-.01ZM10.5 18C6.92 18 4 15.08 4 11.5S6.92 5 10.5 5 17 7.92 17 11.5 14.08 18 10.5 18Z",fill:t})})},j0=M0,L0=e=>{const{color:t,...n}=ln(e);return ut.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:[ut.jsx("path",{d:"M13 11h-2v4h2v-4ZM12 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",fill:t}),ut.jsx("path",{d:"M12 3 2 21h20L12 3Zm0 4.12L18.6 19H5.4L12 7.12Z",fill:t})]})},F0=L0,V0=e=>{const{color:t,...n}=ln(e);return ut.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ut.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm0 16c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1Zm1.37-4.24c-.22.08-.37.27-.37.47v.77h-2v-.77c0-1.06.66-1.98 1.68-2.35.78-.29 1.48-1.15 1.28-2.25-.14-.79-.81-1.46-1.6-1.6a2.003 2.003 0 0 0-2.37 1.97h-2c0-1.18.52-2.3 1.43-3.06.91-.76 2.1-1.08 3.29-.87 1.61.28 2.94 1.61 3.22 3.22.34 1.93-.74 3.81-2.57 4.48l.01-.01Z",fill:t})})},B0=V0,H0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ob,{className:"accordion-header",id:"vds-accordion-header",children:M.jsxs(Pb,{id:"vds-accordion-trigger",className:$e(d0,t),...n,ref:r,children:[M.jsx(rt,{className:f0,children:e}),M.jsx(Ca,{className:s0,size:24,color:Pt.theme.colors.black})]})}));var W0="_7q2fqh7",z0={info:"var(--_1qe00b2y)",warning:"var(--_1qe00b211)",neutral:"var(--_1qe00b2c)",error:"var(--_1qe00b214)"},U0=Ke({defaultClassName:"_7q2fqh0",variantClassNames:{variant:{info:"_7q2fqh1",warning:"_7q2fqh2",neutral:"_7q2fqh3",error:"_7q2fqh4"},size:{full:"_7q2fqh5",default:"_7q2fqh6"}},defaultVariants:{variant:"neutral",size:"default"},compoundVariants:[]});const Y0=16,Ph=l.forwardRef(({className:e,title:t,children:n,withClose:r,variant:o,size:i,onClose:a,...s},c)=>{const u="div",f=l.useRef(null),[d,m]=l.useState(null),b=(()=>{switch(o){case"error":return P0;case"warning":return F0;default:return D0}})(),y=l.useCallback($=>{$.forEach(E=>{const{height:v}=E.contentRect;m(v>Y0)})},[]);return l.useEffect(()=>{const $=f.current;if(!$)return;const E=new ResizeObserver(y);return E.observe($),()=>E.disconnect()},[y]),M.jsxs(u,{ref:c,className:$e(U0({variant:o,size:i}),e),"data-test-id":s["data-test-id"],...s,children:[M.jsxs(Bt,{gap:"$12",alignItems:d?"flex-start":"center",visibility:d===null?"hidden":"visible",children:[M.jsx(rt,{display:"flex",w:Pt.theme.space[24],children:M.jsx(b,{size:24,color:z0[o||"neutral"]})}),M.jsxs(Ar,{gap:"$4",children:[t&&M.jsx(Xt,{textStyle:"caption",as:"span",fontWeight:"$medium",children:t}),M.jsx(rt,{ref:f,className:W0,children:n})]})]}),r&&M.jsx(Bt,{children:M.jsx(Eu,{"data-test-id":"CT_Component-Alert-Close",onClick:a,cursor:"pointer",color:Pt.theme.colors.black,size:16})})]})});Ph.defaultProps={"data-test-id":void 0,title:void 0,withClose:void 0,onClose:void 0};const K0=l.forwardRef((e,t)=>{const{ratio:n=1,style:r,...o}=e;return l.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":""},l.createElement(Ue.div,ae({},o,{ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})))}),xu=({children:e,...t})=>M.jsx(K0,{...t,children:e});xu.defaultProps={children:void 0};xu.displayName="AspectRatio";var q0=Ke({defaultClassName:"_1er7sj40",variantClassNames:{colorScheme:{primary:"_1er7sj41",disabled:"_1er7sj42",yellow:"_1er7sj43",red:"_1er7sj44",blue:"_1er7sj45",neutral:"_1er7sj46"},size:{large:"_1er7sj47 _15r4f4d1oz _15r4f4d1il _15r4f4d15j _15r4f4d1bx",medium:"_1er7sj48 _15r4f4d1op _15r4f4d1ib _15r4f4d15e _15r4f4d1bs",small:"_1er7sj49 _15r4f4d1op _15r4f4d1ib _15r4f4d154 _15r4f4d1bi"},isRounded:{true:"_1er7sj4a",false:"_1er7sj4b"},variant:{primary:"_1er7sj4c",secondary:"_1er7sj4d"}},defaultVariants:{colorScheme:"primary",size:"large",variant:"primary",isRounded:!1},compoundVariants:[[{colorScheme:"primary",variant:"secondary"},"_1er7sj4e"],[{colorScheme:"disabled",variant:"secondary"},"_1er7sj4f"],[{colorScheme:"yellow",variant:"secondary"},"_1er7sj4g"],[{colorScheme:"red",variant:"secondary"},"_1er7sj4h"],[{colorScheme:"blue",variant:"secondary"},"_1er7sj4i"]]});const _u=l.forwardRef(({as:e,children:t,colorScheme:n,size:r,variant:o,isRounded:i,className:a,style:s,...c},u)=>{const f=e||"span";return M.jsx(f,{ref:u,"data-test-id":c["data-test-id"],className:$e(q0({colorScheme:n,variant:o,size:r,isRounded:i}),a),style:s,...c,children:t})});_u.defaultProps={as:"span",colorScheme:"primary",size:"large",children:void 0,"data-test-id":void 0};_u.displayName="Badge";function Yd(e,[t,n]){return Math.min(n,Math.max(t,e))}function X0(e,t=globalThis==null?void 0:globalThis.document){const n=un(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Cc="dismissableLayer.update",G0="dismissableLayer.pointerDownOutside",Z0="dismissableLayer.focusOutside";let Kd;const Ah=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),rs=l.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...u}=e,f=l.useContext(Ah),[d,m]=l.useState(null),p=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=l.useState({}),y=lt(t,F=>m(F)),$=Array.from(f.layers),[E]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),v=$.indexOf(E),w=d?$.indexOf(d):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,I=w>=v,D=J0(F=>{const k=F.target,B=[...f.branches].some(R=>R.contains(k));!I||B||(i==null||i(F),s==null||s(F),F.defaultPrevented||c==null||c())},p),A=ew(F=>{const k=F.target;[...f.branches].some(R=>R.contains(k))||(a==null||a(F),s==null||s(F),F.defaultPrevented||c==null||c())},p);return X0(F=>{w===f.layers.size-1&&(o==null||o(F),!F.defaultPrevented&&c&&(F.preventDefault(),c()))},p),l.useEffect(()=>{if(d)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Kd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),qd(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Kd)}},[d,p,r,f]),l.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),qd())},[d,f]),l.useEffect(()=>{const F=()=>b({});return document.addEventListener(Cc,F),()=>document.removeEventListener(Cc,F)},[]),l.createElement(Ue.div,ae({},u,{ref:y,style:{pointerEvents:T?I?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,D.onPointerDownCapture)}))}),Q0=l.forwardRef((e,t)=>{const n=l.useContext(Ah),r=l.useRef(null),o=lt(t,r);return l.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.createElement(Ue.div,ae({},e,{ref:o}))});function J0(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Dh(G0,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ew(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=l.useRef(!1);return l.useEffect(()=>{const o=i=>{i.target&&!r.current&&Dh(Z0,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function qd(){const e=new CustomEvent(Cc);document.dispatchEvent(e)}function Dh(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?wh(o,i):o.dispatchEvent(i)}const tw=rs,nw=Q0;let Hs=0;function Nh(){l.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Xd()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Xd()),Hs++,()=>{Hs===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Hs--}},[])}function Xd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Ws="focusScope.autoFocusOnMount",zs="focusScope.autoFocusOnUnmount",Gd={bubbles:!1,cancelable:!0},kh=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=l.useState(null),u=un(o),f=un(i),d=l.useRef(null),m=lt(t,y=>c(y)),p=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let y=function(w){if(p.paused||!s)return;const T=w.target;s.contains(T)?d.current=T:ar(d.current,{select:!0})},$=function(w){if(p.paused||!s)return;const T=w.relatedTarget;T!==null&&(s.contains(T)||ar(d.current,{select:!0}))},E=function(w){const T=document.activeElement;for(const I of w)I.removedNodes.length>0&&(s!=null&&s.contains(T)||ar(s))};document.addEventListener("focusin",y),document.addEventListener("focusout",$);const v=new MutationObserver(E);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",$),v.disconnect()}}},[r,s,p.paused]),l.useEffect(()=>{if(s){Qd.add(p);const y=document.activeElement;if(!s.contains(y)){const E=new CustomEvent(Ws,Gd);s.addEventListener(Ws,u),s.dispatchEvent(E),E.defaultPrevented||(rw(cw(Mh(s)),{select:!0}),document.activeElement===y&&ar(s))}return()=>{s.removeEventListener(Ws,u),setTimeout(()=>{const E=new CustomEvent(zs,Gd);s.addEventListener(zs,f),s.dispatchEvent(E),E.defaultPrevented||ar(y??document.body,{select:!0}),s.removeEventListener(zs,f),Qd.remove(p)},0)}}},[s,u,f,p]);const b=l.useCallback(y=>{if(!n&&!r||p.paused)return;const $=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,E=document.activeElement;if($&&E){const v=y.currentTarget,[w,T]=ow(v);w&&T?!y.shiftKey&&E===T?(y.preventDefault(),n&&ar(w,{select:!0})):y.shiftKey&&E===w&&(y.preventDefault(),n&&ar(T,{select:!0})):E===v&&y.preventDefault()}},[n,r,p.paused]);return l.createElement(Ue.div,ae({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function rw(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ar(r,{select:t}),document.activeElement!==n)return}function ow(e){const t=Mh(e),n=Zd(t,e),r=Zd(t.reverse(),e);return[n,r]}function Mh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zd(e,t){for(const n of e)if(!iw(n,{upTo:t}))return n}function iw(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 aw(e){return e instanceof HTMLInputElement&&"select"in e}function ar(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&aw(e)&&t&&e.select()}}const Qd=sw();function sw(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Jd(e,t),e.unshift(t)},remove(t){var n;e=Jd(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Jd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function cw(e){return e.filter(t=>t.tagName!=="A")}const uw=["top","right","bottom","left"],vr=Math.min,vn=Math.max,$a=Math.round,Bi=Math.floor,mr=e=>({x:e,y:e}),lw={left:"right",right:"left",bottom:"top",top:"bottom"},dw={start:"end",end:"start"};function $c(e,t,n){return vn(e,vr(t,n))}function Zn(e,t){return typeof e=="function"?e(t):e}function Qn(e){return e.split("-")[0]}function go(e){return e.split("-")[1]}function Su(e){return e==="x"?"y":"x"}function Cu(e){return e==="y"?"height":"width"}function yo(e){return["top","bottom"].includes(Qn(e))?"y":"x"}function $u(e){return Su(yo(e))}function fw(e,t,n){n===void 0&&(n=!1);const r=go(e),o=$u(e),i=Cu(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ta(a)),[a,Ta(a)]}function pw(e){const t=Ta(e);return[Tc(e),t,Tc(t)]}function Tc(e){return e.replace(/start|end/g,t=>dw[t])}function hw(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function vw(e,t,n,r){const o=go(e);let i=hw(Qn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Tc)))),i}function Ta(e){return e.replace(/left|right|bottom|top/g,t=>lw[t])}function mw(e){return{top:0,right:0,bottom:0,left:0,...e}}function jh(e){return typeof e!="number"?mw(e):{top:e,right:e,bottom:e,left:e}}function Ia(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ef(e,t,n){let{reference:r,floating:o}=e;const i=yo(t),a=$u(t),s=Cu(a),c=Qn(t),u=i==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[s]/2-o[s]/2;let p;switch(c){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(go(t)){case"start":p[a]-=m*(n&&u?-1:1);break;case"end":p[a]+=m*(n&&u?-1:1);break}return p}const gw=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=ef(u,r,c),m=r,p={},b=0;for(let y=0;y<s.length;y++){const{name:$,fn:E}=s[y],{x:v,y:w,data:T,reset:I}=await E({x:f,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});if(f=v??f,d=w??d,p={...p,[$]:{...p[$],...T}},I&&b<=50){b++,typeof I=="object"&&(I.placement&&(m=I.placement),I.rects&&(u=I.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:f,y:d}=ef(u,m,c)),y=-1;continue}}return{x:f,y:d,placement:m,strategy:o,middlewareData:p}};async function si(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=Zn(t,e),b=jh(p),$=s[m?d==="floating"?"reference":"floating":d],E=Ia(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement($)))==null||n?$:$.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:c})),v=d==="floating"?{...a.floating,x:r,y:o}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},I=Ia(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:w,strategy:c}):v);return{top:(E.top-I.top+b.top)/T.y,bottom:(I.bottom-E.bottom+b.bottom)/T.y,left:(E.left-I.left+b.left)/T.x,right:(I.right-E.right+b.right)/T.x}}const tf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s}=t,{element:c,padding:u=0}=Zn(e,t)||{};if(c==null)return{};const f=jh(u),d={x:n,y:r},m=$u(o),p=Cu(m),b=await a.getDimensions(c),y=m==="y",$=y?"top":"left",E=y?"bottom":"right",v=y?"clientHeight":"clientWidth",w=i.reference[p]+i.reference[m]-d[m]-i.floating[p],T=d[m]-i.reference[m],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let D=I?I[v]:0;(!D||!await(a.isElement==null?void 0:a.isElement(I)))&&(D=s.floating[v]||i.floating[p]);const A=w/2-T/2,F=D/2-b[p]/2-1,k=vr(f[$],F),B=vr(f[E],F),R=k,x=D-b[p]-B,h=D/2-b[p]/2+A,C=$c(R,h,x),j=go(o)!=null&&h!=C&&i.reference[p]/2-(h<R?k:B)-b[p]/2<0?h<R?R-h:x-h:0;return{[m]:d[m]-j,data:{[m]:C,centerOffset:h-C+j}}}}),yw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...y}=Zn(e,t),$=Qn(r),E=Qn(a)===a,v=await(s.isRTL==null?void 0:s.isRTL(c.floating)),w=d||(E||!b?[Ta(a)]:pw(a));!d&&p!=="none"&&w.push(...vw(a,b,p,v));const T=[a,...w],I=await si(t,y),D=[];let A=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&D.push(I[$]),f){const R=fw(r,i,v);D.push(I[R[0]],I[R[1]])}if(A=[...A,{placement:r,overflows:D}],!D.every(R=>R<=0)){var F,k;const R=(((F=o.flip)==null?void 0:F.index)||0)+1,x=T[R];if(x)return{data:{index:R,overflows:A},reset:{placement:x}};let h=(k=A.filter(C=>C.overflows[0]<=0).sort((C,P)=>C.overflows[1]-P.overflows[1])[0])==null?void 0:k.placement;if(!h)switch(m){case"bestFit":{var B;const C=(B=A.map(P=>[P.placement,P.overflows.filter(j=>j>0).reduce((j,H)=>j+H,0)]).sort((P,j)=>P[1]-j[1])[0])==null?void 0:B[0];C&&(h=C);break}case"initialPlacement":h=a;break}if(r!==h)return{reset:{placement:h}}}return{}}}};function nf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rf(e){return uw.some(t=>e[t]>=0)}const bw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Zn(e,t);switch(r){case"referenceHidden":{const i=await si(t,{...o,elementContext:"reference"}),a=nf(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:rf(a)}}}case"escaped":{const i=await si(t,{...o,altBoundary:!0}),a=nf(i,n.floating);return{data:{escapedOffsets:a,escaped:rf(a)}}}default:return{}}}}};async function ww(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Qn(n),s=go(n),c=yo(n)==="y",u=["left","top"].includes(a)?-1:1,f=i&&c?-1:1,d=Zn(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof b=="number"&&(p=s==="end"?b*-1:b),c?{x:p*f,y:m*u}:{x:m*u,y:p*f}}const Ew=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await ww(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},xw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:$=>{let{x:E,y:v}=$;return{x:E,y:v}}},...c}=Zn(e,t),u={x:n,y:r},f=await si(t,c),d=yo(Qn(o)),m=Su(d);let p=u[m],b=u[d];if(i){const $=m==="y"?"top":"left",E=m==="y"?"bottom":"right",v=p+f[$],w=p-f[E];p=$c(v,p,w)}if(a){const $=d==="y"?"top":"left",E=d==="y"?"bottom":"right",v=b+f[$],w=b-f[E];b=$c(v,b,w)}const y=s.fn({...t,[m]:p,[d]:b});return{...y,data:{x:y.x-n,y:y.y-r}}}}},_w=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Zn(e,t),f={x:n,y:r},d=yo(o),m=Su(d);let p=f[m],b=f[d];const y=Zn(s,t),$=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const w=m==="y"?"height":"width",T=i.reference[m]-i.floating[w]+$.mainAxis,I=i.reference[m]+i.reference[w]-$.mainAxis;p<T?p=T:p>I&&(p=I)}if(u){var E,v;const w=m==="y"?"width":"height",T=["top","left"].includes(Qn(o)),I=i.reference[d]-i.floating[w]+(T&&((E=a.offset)==null?void 0:E[d])||0)+(T?0:$.crossAxis),D=i.reference[d]+i.reference[w]+(T?0:((v=a.offset)==null?void 0:v[d])||0)-(T?$.crossAxis:0);b<I?b=I:b>D&&(b=D)}return{[m]:p,[d]:b}}}},Sw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Zn(e,t),c=await si(t,s),u=Qn(n),f=go(n),d=yo(n)==="y",{width:m,height:p}=r.floating;let b,y;u==="top"||u==="bottom"?(b=u,y=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,b=f==="end"?"top":"bottom");const $=p-c[b],E=m-c[y],v=!t.middlewareData.shift;let w=$,T=E;if(d){const D=m-c.left-c.right;T=f||v?vr(E,D):D}else{const D=p-c.top-c.bottom;w=f||v?vr($,D):D}if(v&&!f){const D=vn(c.left,0),A=vn(c.right,0),F=vn(c.top,0),k=vn(c.bottom,0);d?T=m-2*(D!==0||A!==0?D+A:vn(c.left,c.right)):w=p-2*(F!==0||k!==0?F+k:vn(c.top,c.bottom))}await a({...t,availableWidth:T,availableHeight:w});const I=await o.getDimensions(i.floating);return m!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function gr(e){return Lh(e)?(e.nodeName||"").toLowerCase():"#document"}function yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function er(e){var t;return(t=(Lh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lh(e){return e instanceof Node||e instanceof yn(e).Node}function Jn(e){return e instanceof Element||e instanceof yn(e).Element}function Bn(e){return e instanceof HTMLElement||e instanceof yn(e).HTMLElement}function of(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yn(e).ShadowRoot}function Ci(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=In(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Cw(e){return["table","td","th"].includes(gr(e))}function Tu(e){const t=Iu(),n=In(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function $w(e){let t=fo(e);for(;Bn(t)&&!os(t);){if(Tu(t))return t;t=fo(t)}return null}function Iu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function os(e){return["html","body","#document"].includes(gr(e))}function In(e){return yn(e).getComputedStyle(e)}function is(e){return Jn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function fo(e){if(gr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||of(e)&&e.host||er(e);return of(t)?t.host:t}function Fh(e){const t=fo(e);return os(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bn(t)&&Ci(t)?t:Fh(t)}function Ra(e,t){var n;t===void 0&&(t=[]);const r=Fh(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=yn(r);return o?t.concat(i,i.visualViewport||[],Ci(r)?r:[]):t.concat(r,Ra(r))}function Vh(e){const t=In(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Bn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=$a(n)!==i||$a(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ru(e){return Jn(e)?e:e.contextElement}function oo(e){const t=Ru(e);if(!Bn(t))return mr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Vh(t);let a=(i?$a(n.width):n.width)/r,s=(i?$a(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Tw=mr(0);function Bh(e){const t=yn(e);return!Iu()||!t.visualViewport?Tw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Iw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yn(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ru(e);let a=mr(1);t&&(r?Jn(r)&&(a=oo(r)):a=oo(e));const s=Iw(i,n,r)?Bh(i):mr(0);let c=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(i){const m=yn(i),p=r&&Jn(r)?yn(r):r;let b=m.frameElement;for(;b&&r&&p!==m;){const y=oo(b),$=b.getBoundingClientRect(),E=In(b),v=$.left+(b.clientLeft+parseFloat(E.paddingLeft))*y.x,w=$.top+(b.clientTop+parseFloat(E.paddingTop))*y.y;c*=y.x,u*=y.y,f*=y.x,d*=y.y,c+=v,u+=w,b=yn(b).frameElement}}return Ia({width:f,height:d,x:c,y:u})}function Rw(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Bn(n),i=er(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=mr(1);const c=mr(0);if((o||!o&&r!=="fixed")&&((gr(n)!=="body"||Ci(i))&&(a=is(n)),Bn(n))){const u=Mr(n);s=oo(n),c.x=u.x+n.clientLeft,c.y=u.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function Ow(e){return Array.from(e.getClientRects())}function Hh(e){return Mr(er(e)).left+is(e).scrollLeft}function Pw(e){const t=er(e),n=is(e),r=e.ownerDocument.body,o=vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Hh(e);const s=-n.scrollTop;return In(r).direction==="rtl"&&(a+=vn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Aw(e,t){const n=yn(e),r=er(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const u=Iu();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function Dw(e,t){const n=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Bn(e)?oo(e):mr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,u=r*i.y;return{width:a,height:s,x:c,y:u}}function af(e,t,n){let r;if(t==="viewport")r=Aw(e,n);else if(t==="document")r=Pw(er(e));else if(Jn(t))r=Dw(t,n);else{const o=Bh(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ia(r)}function Wh(e,t){const n=fo(e);return n===t||!Jn(n)||os(n)?!1:In(n).position==="fixed"||Wh(n,t)}function Nw(e,t){const n=t.get(e);if(n)return n;let r=Ra(e).filter(s=>Jn(s)&&gr(s)!=="body"),o=null;const i=In(e).position==="fixed";let a=i?fo(e):e;for(;Jn(a)&&!os(a);){const s=In(a),c=Tu(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ci(a)&&!c&&Wh(e,a))?r=r.filter(f=>f!==a):o=s,a=fo(a)}return t.set(e,r),r}function kw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Nw(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((u,f)=>{const d=af(t,f,o);return u.top=vn(d.top,u.top),u.right=vr(d.right,u.right),u.bottom=vr(d.bottom,u.bottom),u.left=vn(d.left,u.left),u},af(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Mw(e){return Vh(e)}function jw(e,t,n){const r=Bn(t),o=er(t),i=n==="fixed",a=Mr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=mr(0);if(r||!r&&!i)if((gr(t)!=="body"||Ci(o))&&(s=is(t)),r){const u=Mr(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=Hh(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function sf(e,t){return!Bn(e)||In(e).position==="fixed"?null:t?t(e):e.offsetParent}function zh(e,t){const n=yn(e);if(!Bn(e))return n;let r=sf(e,t);for(;r&&Cw(r)&&In(r).position==="static";)r=sf(r,t);return r&&(gr(r)==="html"||gr(r)==="body"&&In(r).position==="static"&&!Tu(r))?n:r||$w(e)||n}const Lw=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||zh,i=this.getDimensions;return{reference:jw(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Fw(e){return In(e).direction==="rtl"}const Vw={convertOffsetParentRelativeRectToViewportRelativeRect:Rw,getDocumentElement:er,getClippingRect:kw,getOffsetParent:zh,getElementRects:Lw,getClientRects:Ow,getDimensions:Mw,getScale:oo,isElement:Jn,isRTL:Fw};function Bw(e,t){let n=null,r;const o=er(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:u,top:f,width:d,height:m}=e.getBoundingClientRect();if(s||t(),!d||!m)return;const p=Bi(f),b=Bi(o.clientWidth-(u+d)),y=Bi(o.clientHeight-(f+m)),$=Bi(u),v={rootMargin:-p+"px "+-b+"px "+-y+"px "+-$+"px",threshold:vn(0,vr(1,c))||1};let w=!0;function T(I){const D=I[0].intersectionRatio;if(D!==c){if(!w)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(T,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,v)}n.observe(e)}return a(!0),i}function Hw(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Ru(e),f=o||i?[...u?Ra(u):[],...Ra(t)]:[];f.forEach(E=>{o&&E.addEventListener("scroll",n,{passive:!0}),i&&E.addEventListener("resize",n)});const d=u&&s?Bw(u,n):null;let m=-1,p=null;a&&(p=new ResizeObserver(E=>{let[v]=E;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let b,y=c?Mr(e):null;c&&$();function $(){const E=Mr(e);y&&(E.x!==y.x||E.y!==y.y||E.width!==y.width||E.height!==y.height)&&n(),y=E,b=requestAnimationFrame($)}return n(),()=>{f.forEach(E=>{o&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),d&&d(),p&&p.disconnect(),p=null,c&&cancelAnimationFrame(b)}}const Ww=(e,t,n)=>{const r=new Map,o={platform:Vw,...n},i={...o.platform,_c:r};return gw(e,t,{...o,platform:i})},zw=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?tf({element:r.current,padding:o}).fn(n):{}:r?tf({element:r,padding:o}).fn(n):{}}}};var la=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Oa(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Oa(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Oa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Uh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cf(e,t){const n=Uh(e);return Math.round(t*n)/n}function uf(e){const t=Oe.useRef(e);return la(()=>{t.current=e}),t}function Uw(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,d]=Oe.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=Oe.useState(r);Oa(m,r)||p(r);const[b,y]=Oe.useState(null),[$,E]=Oe.useState(null),v=Oe.useCallback(j=>{j!=D.current&&(D.current=j,y(j))},[y]),w=Oe.useCallback(j=>{j!==A.current&&(A.current=j,E(j))},[E]),T=i||b,I=a||$,D=Oe.useRef(null),A=Oe.useRef(null),F=Oe.useRef(f),k=uf(c),B=uf(o),R=Oe.useCallback(()=>{if(!D.current||!A.current)return;const j={placement:t,strategy:n,middleware:m};B.current&&(j.platform=B.current),Ww(D.current,A.current,j).then(H=>{const U={...H,isPositioned:!0};x.current&&!Oa(F.current,U)&&(F.current=U,Hy.flushSync(()=>{d(U)}))})},[m,t,n,B]);la(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[u]);const x=Oe.useRef(!1);la(()=>(x.current=!0,()=>{x.current=!1}),[]),la(()=>{if(T&&(D.current=T),I&&(A.current=I),T&&I){if(k.current)return k.current(T,I,R);R()}},[T,I,R,k]);const h=Oe.useMemo(()=>({reference:D,floating:A,setReference:v,setFloating:w}),[v,w]),C=Oe.useMemo(()=>({reference:T,floating:I}),[T,I]),P=Oe.useMemo(()=>{const j={position:n,left:0,top:0};if(!C.floating)return j;const H=cf(C.floating,f.x),U=cf(C.floating,f.y);return s?{...j,transform:"translate("+H+"px, "+U+"px)",...Uh(C.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:U}},[n,s,C.floating,f.x,f.y]);return Oe.useMemo(()=>({...f,update:R,refs:h,elements:C,floatingStyles:P}),[f,R,h,C,P])}const Yw=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return l.createElement(Ue.svg,ae({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:l.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Kw=Yw;function as(e){const[t,n]=l.useState(void 0);return Gt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Yh="Popper",[Kh,ss]=bn(Yh),[qw,qh]=Kh(Yh),Xw=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return l.createElement(qw,{scope:t,anchor:r,onAnchorChange:o},n)},Gw="PopperAnchor",Zw=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=qh(Gw,n),a=l.useRef(null),s=lt(t,a);return l.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:l.createElement(Ue.div,ae({},o,{ref:s}))}),Xh="PopperContent",[Qw,Jw]=Kh(Xh),e1=l.forwardRef((e,t)=>{var n,r,o,i,a,s,c,u;const{__scopePopper:f,side:d="bottom",sideOffset:m=0,align:p="center",alignOffset:b=0,arrowPadding:y=0,collisionBoundary:$=[],collisionPadding:E=0,sticky:v="partial",hideWhenDetached:w=!1,avoidCollisions:T=!0,onPlaced:I,...D}=e,A=qh(Xh,f),[F,k]=l.useState(null),B=lt(t,xe=>k(xe)),[R,x]=l.useState(null),h=as(R),C=(n=h==null?void 0:h.width)!==null&&n!==void 0?n:0,P=(r=h==null?void 0:h.height)!==null&&r!==void 0?r:0,j=d+(p!=="center"?"-"+p:""),H=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},U=Array.isArray($)?$:[$],re=U.length>0,W={padding:H,boundary:U.filter(o1),altBoundary:re},{refs:L,floatingStyles:J,placement:Y,isPositioned:K,middlewareData:Z}=Uw({strategy:"fixed",placement:j,whileElementsMounted:Hw,elements:{reference:A.anchor},middleware:[Ew({mainAxis:m+P,alignmentAxis:b}),T&&xw({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?_w():void 0,...W}),T&&yw({...W}),Sw({...W,apply:({elements:xe,rects:Ee,availableWidth:Ae,availableHeight:Ie})=>{const{width:Le,height:ke}=Ee.reference,at=xe.floating.style;at.setProperty("--radix-popper-available-width",`${Ae}px`),at.setProperty("--radix-popper-available-height",`${Ie}px`),at.setProperty("--radix-popper-anchor-width",`${Le}px`),at.setProperty("--radix-popper-anchor-height",`${ke}px`)}}),R&&zw({element:R,padding:y}),i1({arrowWidth:C,arrowHeight:P}),w&&bw({strategy:"referenceHidden"})]}),[ce,z]=Gh(Y),G=un(I);Gt(()=>{K&&(G==null||G())},[K,G]);const oe=(o=Z.arrow)===null||o===void 0?void 0:o.x,ne=(i=Z.arrow)===null||i===void 0?void 0:i.y,ie=((a=Z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[ee,pe]=l.useState();return Gt(()=>{F&&pe(window.getComputedStyle(F).zIndex)},[F]),l.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:K?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(s=Z.transformOrigin)===null||s===void 0?void 0:s.x,(c=Z.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},l.createElement(Qw,{scope:f,placedSide:ce,onArrowChange:x,arrowX:oe,arrowY:ne,shouldHideArrow:ie},l.createElement(Ue.div,ae({"data-side":ce,"data-align":z},D,{ref:B,style:{...D.style,animation:K?void 0:"none",opacity:(u=Z.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),t1="PopperArrow",n1={top:"bottom",right:"left",bottom:"top",left:"right"},r1=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Jw(t1,r),a=n1[i.placedSide];return l.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},l.createElement(Kw,ae({},o,{ref:n,style:{...o.style,display:"block"}})))});function o1(e){return e!==null}const i1=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:c,middlewareData:u}=t,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=d?0:e.arrowWidth,p=d?0:e.arrowHeight,[b,y]=Gh(s),$={start:"0%",center:"50%",end:"100%"}[y],E=((r=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+m/2,v=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+p/2;let w="",T="";return b==="bottom"?(w=d?$:`${E}px`,T=`${-p}px`):b==="top"?(w=d?$:`${E}px`,T=`${c.floating.height+p}px`):b==="right"?(w=`${-p}px`,T=d?$:`${v}px`):b==="left"&&(w=`${c.floating.width+p}px`,T=d?$:`${v}px`),{data:{x:w,y:T}}}});function Gh(e){const[t,n="center"]=e.split("-");return[t,n]}const Zh=Xw,Qh=Zw,Jh=e1,a1=r1,ev=l.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?mn.createPortal(l.createElement(Ue.div,ae({},o,{ref:t})),r):null}),s1=ev;function cs(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const us=l.forwardRef((e,t)=>l.createElement(Ue.span,ae({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),c1=us;var u1=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ur=new WeakMap,Hi=new WeakMap,Wi={},Us=0,tv=function(e){return e&&(e.host||tv(e.parentNode))},l1=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=tv(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})},d1=function(e,t,n,r){var o=l1(t,Array.isArray(e)?e:[e]);Wi[n]||(Wi[n]=new WeakMap);var i=Wi[n],a=[],s=new Set,c=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(m){if(s.has(m))f(m);else{var p=m.getAttribute(r),b=p!==null&&p!=="false",y=(Ur.get(m)||0)+1,$=(i.get(m)||0)+1;Ur.set(m,y),i.set(m,$),a.push(m),y===1&&b&&Hi.set(m,!0),$===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return f(t),s.clear(),Us++,function(){a.forEach(function(d){var m=Ur.get(d)-1,p=i.get(d)-1;Ur.set(d,m),i.set(d,p),m||(Hi.has(d)||d.removeAttribute(r),Hi.delete(d)),p||d.removeAttribute(n)}),Us--,Us||(Ur=new WeakMap,Ur=new WeakMap,Hi=new WeakMap,Wi={})}},nv=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||u1(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),d1(r,o,n,"aria-hidden")):function(){return null}},Cn=function(){return Cn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Cn.apply(this,arguments)};function rv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function f1(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var da="right-scroll-bar-position",fa="width-before-scroll-bar",p1="with-scroll-bars-hidden",h1="--removed-body-scroll-bar-size";function v1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function m1(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function g1(e,t){return m1(t||null,function(n){return e.forEach(function(r){return v1(r,n)})})}function y1(e){return e}function b1(e,t){t===void 0&&(t=y1);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),n}}}};return o}function w1(e){e===void 0&&(e={});var t=b1(null);return t.options=Cn({async:!0,ssr:!1},e),t}var ov=function(e){var t=e.sideCar,n=rv(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 Oe.createElement(r,Cn({},n))};ov.isSideCarExport=!0;function E1(e,t){return e.useMedium(t),ov}var iv=w1(),Ys=function(){},ls=Oe.forwardRef(function(e,t){var n=Oe.useRef(null),r=Oe.useState({onScrollCapture:Ys,onWheelCapture:Ys,onTouchMoveCapture:Ys}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,m=e.sideCar,p=e.noIsolation,b=e.inert,y=e.allowPinchZoom,$=e.as,E=$===void 0?"div":$,v=rv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=m,T=g1([n,t]),I=Cn(Cn({},v),o);return Oe.createElement(Oe.Fragment,null,f&&Oe.createElement(w,{sideCar:iv,removeScrollBar:u,shards:d,noIsolation:p,inert:b,setCallbacks:i,allowPinchZoom:!!y,lockRef:n}),a?Oe.cloneElement(Oe.Children.only(s),Cn(Cn({},I),{ref:T})):Oe.createElement(E,Cn({},I,{className:c,ref:T}),s))});ls.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ls.classNames={fullWidth:fa,zeroRight:da};var lf,x1=function(){if(lf)return lf;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _1(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=x1();return t&&e.setAttribute("nonce",t),e}function S1(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function C1(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $1=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_1())&&(S1(t,n),C1(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},T1=function(){var e=$1();return function(t,n){Oe.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},av=function(){var e=T1(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},I1={left:0,top:0,right:0,gap:0},Ks=function(e){return parseInt(e||"",10)||0},R1=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ks(n),Ks(r),Ks(o)]},O1=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return I1;var t=R1(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])}},P1=av(),A1=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
54
54
|
.`.concat(p1,` {
|
|
55
55
|
overflow: hidden `).concat(r,`;
|
|
56
56
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
@@ -90,7 +90,7 @@ Check the top-level render call using <`+Q+">.")}return V}}function en(_,V){{if(
|
|
|
90
90
|
`)},D1=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=Oe.useMemo(function(){return O1(o)},[o]);return Oe.createElement(P1,{styles:A1(i,!t,o,n?"":"!important")})},Ic=!1;if(typeof window<"u")try{var zi=Object.defineProperty({},"passive",{get:function(){return Ic=!0,!0}});window.addEventListener("test",zi,zi),window.removeEventListener("test",zi,zi)}catch{Ic=!1}var Yr=Ic?{passive:!1}:!1,N1=function(e){return e.tagName==="TEXTAREA"},sv=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!N1(e)&&n[t]==="visible")},k1=function(e){return sv(e,"overflowY")},M1=function(e){return sv(e,"overflowX")},df=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=cv(e,n);if(r){var o=uv(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},j1=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},L1=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cv=function(e,t){return e==="v"?k1(t):M1(t)},uv=function(e,t){return e==="v"?j1(t):L1(t)},F1=function(e,t){return e==="h"&&t==="rtl"?-1:1},V1=function(e,t,n,r,o){var i=F1(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,c=t.contains(s),u=!1,f=a>0,d=0,m=0;do{var p=uv(e,s),b=p[0],y=p[1],$=p[2],E=y-$-i*b;(b||E)&&cv(e,s)&&(d+=E,m+=b),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(f&&(o&&d===0||!o&&a>d)||!f&&(o&&m===0||!o&&-a>m))&&(u=!0),u},Ui=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ff=function(e){return[e.deltaX,e.deltaY]},pf=function(e){return e&&"current"in e?e.current:e},B1=function(e,t){return e[0]===t[0]&&e[1]===t[1]},H1=function(e){return`
|
|
91
91
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
92
92
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
93
|
-
`)},W1=0,Kr=[];function z1(e){var t=Oe.useRef([]),n=Oe.useRef([0,0]),r=Oe.useRef(),o=Oe.useState(W1++)[0],i=Oe.useState(function(){return av()})[0],a=Oe.useRef(e);Oe.useEffect(function(){a.current=e},[e]),Oe.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=f1([e.lockRef.current],(e.shards||[]).map(pf),!0).filter(Boolean);return y.forEach(function($){return $.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function($){return $.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=Oe.useCallback(function(y,$){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var E=Ui(y),v=n.current,w="deltaX"in y?y.deltaX:v[0]-E[0],T="deltaY"in y?y.deltaY:v[1]-E[1],I,D=y.target,A=Math.abs(w)>Math.abs(T)?"h":"v";if("touches"in y&&A==="h"&&D.type==="range")return!1;var F=df(A,D);if(!F)return!0;if(F?I=A:(I=A==="v"?"h":"v",F=df(A,D)),!F)return!1;if(!r.current&&"changedTouches"in y&&(w||T)&&(r.current=I),!I)return!0;var k=r.current||I;return V1(k,$,y,k==="h"?w:T,!0)},[]),c=Oe.useCallback(function(y){var $=y;if(!(!Kr.length||Kr[Kr.length-1]!==i)){var E="deltaY"in $?ff($):Ui($),v=t.current.filter(function(I){return I.name===$.type&&I.target===$.target&&B1(I.delta,E)})[0];if(v&&v.should){$.cancelable&&$.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(pf).filter(Boolean).filter(function(I){return I.contains($.target)}),T=w.length>0?s($,w[0]):!a.current.noIsolation;T&&$.cancelable&&$.preventDefault()}}},[]),u=Oe.useCallback(function(y,$,E,v){var w={name:y,delta:$,target:E,should:v};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(T){return T!==w})},1)},[]),f=Oe.useCallback(function(y){n.current=Ui(y),r.current=void 0},[]),d=Oe.useCallback(function(y){u(y.type,ff(y),y.target,s(y,e.lockRef.current))},[]),m=Oe.useCallback(function(y){u(y.type,Ui(y),y.target,s(y,e.lockRef.current))},[]);Oe.useEffect(function(){return Kr.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Yr),document.addEventListener("touchmove",c,Yr),document.addEventListener("touchstart",f,Yr),function(){Kr=Kr.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Yr),document.removeEventListener("touchmove",c,Yr),document.removeEventListener("touchstart",f,Yr)}},[]);var p=e.removeScrollBar,b=e.inert;return Oe.createElement(Oe.Fragment,null,b?Oe.createElement(i,{styles:H1(o)}):null,p?Oe.createElement(D1,{gapMode:"margin"}):null)}const U1=E1(iv,z1);var lv=Oe.forwardRef(function(e,t){return Oe.createElement(ls,Cn({},e,{ref:t,sideCar:U1}))});lv.classNames=ls.classNames;const dv=lv,Y1=[" ","Enter","ArrowUp","ArrowDown"],K1=[" ","Enter"],ds="Select",[fs,ps,q1]=Qa(ds),[bo,MP]=bn(ds,[q1,ss]),Ou=ss(),[X1,Br]=bo(ds),[G1,Z1]=bo(ds),Q1=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:m,required:p}=e,b=Ou(t),[y,$]=l.useState(null),[E,v]=l.useState(null),[w,T]=l.useState(!1),I=Ja(u),[D=!1,A]=Tn({prop:r,defaultProp:o,onChange:i}),[F,k]=Tn({prop:a,defaultProp:s,onChange:c}),B=l.useRef(null),R=y?!!y.closest("form"):!0,[x,h]=l.useState(new Set),C=Array.from(x).map(P=>P.props.value).join(";");return l.createElement(Zh,b,l.createElement(X1,{required:p,scope:t,trigger:y,onTriggerChange:$,valueNode:E,onValueNodeChange:v,valueNodeHasChildren:w,onValueNodeHasChildrenChange:T,contentId:Gn(),value:F,onValueChange:k,open:D,onOpenChange:A,dir:I,triggerPointerDownPosRef:B,disabled:m},l.createElement(fs.Provider,{scope:t},l.createElement(G1,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(P=>{h(j=>new Set(j).add(P))},[]),onNativeOptionRemove:l.useCallback(P=>{h(j=>{const H=new Set(j);return H.delete(P),H})},[])},n)),R?l.createElement(hv,{key:C,"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:d,value:F,onChange:P=>k(P.target.value),disabled:m},F===void 0?l.createElement("option",{value:""}):null,Array.from(x)):null))},J1="SelectTrigger",eE=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Ou(n),a=Br(J1,n),s=a.disabled||r,c=ut(t,a.onTriggerChange),u=ps(n),[f,d,m]=vv(b=>{const y=u().filter(v=>!v.disabled),$=y.find(v=>v.value===a.value),E=mv(y,b,$);E!==void 0&&a.onValueChange(E.value)}),p=()=>{s||(a.onOpenChange(!0),m())};return l.createElement(Qh,ae({asChild:!0},i),l.createElement(Ue.button,ae({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":a.value===void 0?"":void 0},o,{ref:c,onClick:Ne(o.onClick,b=>{b.currentTarget.focus()}),onPointerDown:Ne(o.onPointerDown,b=>{const y=b.target;y.hasPointerCapture(b.pointerId)&&y.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(p(),a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)},b.preventDefault())}),onKeyDown:Ne(o.onKeyDown,b=>{const y=f.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&d(b.key),!(y&&b.key===" ")&&Y1.includes(b.key)&&(p(),b.preventDefault())})})))}),tE="SelectValue",nE=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,c=Br(tE,n),{onValueNodeHasChildrenChange:u}=c,f=i!==void 0,d=ut(t,c.onValueNodeChange);return Gt(()=>{u(f)},[u,f]),l.createElement(Ue.span,ae({},s,{ref:d,style:{pointerEvents:"none"}}),c.value===void 0&&a!==void 0?a:i)}),rE=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.createElement(Ue.span,ae({"aria-hidden":!0},o,{ref:t}),r||"▼")}),po="SelectContent",oE=l.forwardRef((e,t)=>{const n=Br(po,e.__scopeSelect),[r,o]=l.useState();if(Gt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?mn.createPortal(l.createElement(fv,{scope:e.__scopeSelect},l.createElement(fs.Slot,{scope:e.__scopeSelect},l.createElement("div",null,e.children))),i):null}return l.createElement(iE,ae({},e,{ref:t}))}),Kn=10,[fv,Hr]=bo(po),iE=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:p,sticky:b,hideWhenDetached:y,avoidCollisions:$,...E}=e,v=Br(po,n),[w,T]=l.useState(null),[I,D]=l.useState(null),A=ut(t,z=>T(z)),[F,k]=l.useState(null),[B,R]=l.useState(null),x=ps(n),[h,C]=l.useState(!1),P=l.useRef(!1);l.useEffect(()=>{if(w)return nv(w)},[w]),Nh();const j=l.useCallback(z=>{const[G,...oe]=x().map(ee=>ee.ref.current),[ne]=oe.slice(-1),ie=document.activeElement;for(const ee of z)if(ee===ie||(ee==null||ee.scrollIntoView({block:"nearest"}),ee===G&&I&&(I.scrollTop=0),ee===ne&&I&&(I.scrollTop=I.scrollHeight),ee==null||ee.focus(),document.activeElement!==ie))return},[x,I]),H=l.useCallback(()=>j([F,w]),[j,F,w]);l.useEffect(()=>{h&&H()},[h,H]);const{onOpenChange:U,triggerPointerDownPosRef:re}=v;l.useEffect(()=>{if(w){let z={x:0,y:0};const G=ne=>{var ie,ee,pe,xe;z={x:Math.abs(Math.round(ne.pageX)-((ie=(ee=re.current)===null||ee===void 0?void 0:ee.x)!==null&&ie!==void 0?ie:0)),y:Math.abs(Math.round(ne.pageY)-((pe=(xe=re.current)===null||xe===void 0?void 0:xe.y)!==null&&pe!==void 0?pe:0))}},oe=ne=>{z.x<=10&&z.y<=10?ne.preventDefault():w.contains(ne.target)||U(!1),document.removeEventListener("pointermove",G),re.current=null};return re.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",oe,{capture:!0})}}},[w,U,re]),l.useEffect(()=>{const z=()=>U(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[U]);const[W,L]=vv(z=>{const G=x().filter(ie=>!ie.disabled),oe=G.find(ie=>ie.ref.current===document.activeElement),ne=mv(G,z,oe);ne&&setTimeout(()=>ne.ref.current.focus())}),J=l.useCallback((z,G,oe)=>{const ne=!P.current&&!oe;(v.value!==void 0&&v.value===G||ne)&&(k(z),ne&&(P.current=!0))},[v.value]),Y=l.useCallback(()=>w==null?void 0:w.focus(),[w]),K=l.useCallback((z,G,oe)=>{const ne=!P.current&&!oe;(v.value!==void 0&&v.value===G||ne)&&R(z)},[v.value]),Z=r==="popper"?hf:aE,ce=Z===hf?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:p,sticky:b,hideWhenDetached:y,avoidCollisions:$}:{};return l.createElement(fv,{scope:n,content:w,viewport:I,onViewportChange:D,itemRefCallback:J,selectedItem:F,onItemLeave:Y,itemTextRefCallback:K,focusSelectedItem:H,selectedItemText:B,position:r,isPositioned:h,searchRef:W},l.createElement(dv,{as:lo,allowPinchZoom:!0},l.createElement(kh,{asChild:!0,trapped:v.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Ne(o,z=>{var G;(G=v.trigger)===null||G===void 0||G.focus({preventScroll:!0}),z.preventDefault()})},l.createElement(rs,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>v.onOpenChange(!1)},l.createElement(Z,ae({role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:z=>z.preventDefault()},E,ce,{onPlaced:()=>C(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Ne(E.onKeyDown,z=>{const G=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!G&&z.key.length===1&&L(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let ne=x().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(z.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const ie=z.target,ee=ne.indexOf(ie);ne=ne.slice(ee+1)}setTimeout(()=>j(ne)),z.preventDefault()}})}))))))}),aE=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Br(po,n),a=Hr(po,n),[s,c]=l.useState(null),[u,f]=l.useState(null),d=ut(t,A=>f(A)),m=ps(n),p=l.useRef(!1),b=l.useRef(!0),{viewport:y,selectedItem:$,selectedItemText:E,focusSelectedItem:v}=a,w=l.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&y&&$&&E){const A=i.trigger.getBoundingClientRect(),F=u.getBoundingClientRect(),k=i.valueNode.getBoundingClientRect(),B=E.getBoundingClientRect();if(i.dir!=="rtl"){const ie=B.left-F.left,ee=k.left-ie,pe=A.left-ee,xe=A.width+pe,Ee=Math.max(xe,F.width),Ae=window.innerWidth-Kn,Ie=Yd(ee,[Kn,Ae-Ee]);s.style.minWidth=xe+"px",s.style.left=Ie+"px"}else{const ie=F.right-B.right,ee=window.innerWidth-k.right-ie,pe=window.innerWidth-A.right-ee,xe=A.width+pe,Ee=Math.max(xe,F.width),Ae=window.innerWidth-Kn,Ie=Yd(ee,[Kn,Ae-Ee]);s.style.minWidth=xe+"px",s.style.right=Ie+"px"}const R=m(),x=window.innerHeight-Kn*2,h=y.scrollHeight,C=window.getComputedStyle(u),P=parseInt(C.borderTopWidth,10),j=parseInt(C.paddingTop,10),H=parseInt(C.borderBottomWidth,10),U=parseInt(C.paddingBottom,10),re=P+j+h+U+H,W=Math.min($.offsetHeight*5,re),L=window.getComputedStyle(y),J=parseInt(L.paddingTop,10),Y=parseInt(L.paddingBottom,10),K=A.top+A.height/2-Kn,Z=x-K,ce=$.offsetHeight/2,z=$.offsetTop+ce,G=P+j+z,oe=re-G;if(G<=K){const ie=$===R[R.length-1].ref.current;s.style.bottom="0px";const ee=u.clientHeight-y.offsetTop-y.offsetHeight,pe=Math.max(Z,ce+(ie?Y:0)+ee+H),xe=G+pe;s.style.height=xe+"px"}else{const ie=$===R[0].ref.current;s.style.top="0px";const pe=Math.max(K,P+y.offsetTop+(ie?J:0)+ce)+oe;s.style.height=pe+"px",y.scrollTop=G-K+y.offsetTop}s.style.margin=`${Kn}px 0`,s.style.minHeight=W+"px",s.style.maxHeight=x+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[m,i.trigger,i.valueNode,s,u,y,$,E,i.dir,r]);Gt(()=>w(),[w]);const[T,I]=l.useState();Gt(()=>{u&&I(window.getComputedStyle(u).zIndex)},[u]);const D=l.useCallback(A=>{A&&b.current===!0&&(w(),v==null||v(),b.current=!1)},[w,v]);return l.createElement(sE,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:D},l.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T}},l.createElement(Ue.div,ae({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),hf=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Kn,...i}=e,a=Ou(n);return l.createElement(Jh,ae({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[sE,Pu]=bo(po,{}),vf="SelectViewport",cE=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hr(vf,n),i=Pu(vf,n),a=ut(t,o.onViewportChange),s=l.useRef(0);return l.createElement(l.Fragment,null,l.createElement("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}"}}),l.createElement(fs.Slot,{scope:n},l.createElement(Ue.div,ae({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Ne(r.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=i;if(d!=null&&d.current&&f){const m=Math.abs(s.current-u.scrollTop);if(m>0){const p=window.innerHeight-Kn*2,b=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),$=Math.max(b,y);if($<p){const E=$+m,v=Math.min(p,E),w=E-v;f.style.height=v+"px",f.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,f.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),uE="SelectGroup";bo(uE);const Rc="SelectItem",[lE,dE]=bo(Rc),fE=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Br(Rc,n),c=Hr(Rc,n),u=s.value===r,[f,d]=l.useState(i??""),[m,p]=l.useState(!1),b=ut(t,E=>{var v;return(v=c.itemRefCallback)===null||v===void 0?void 0:v.call(c,E,r,o)}),y=Gn(),$=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};return l.createElement(lE,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:l.useCallback(E=>{d(v=>{var w;return v||((w=E==null?void 0:E.textContent)!==null&&w!==void 0?w:"").trim()})},[])},l.createElement(fs.ItemSlot,{scope:n,value:r,disabled:o,textValue:f},l.createElement(Ue.div,ae({role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:b,onFocus:Ne(a.onFocus,()=>p(!0)),onBlur:Ne(a.onBlur,()=>p(!1)),onPointerUp:Ne(a.onPointerUp,$),onPointerMove:Ne(a.onPointerMove,E=>{if(o){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}else E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ne(a.onPointerLeave,E=>{if(E.currentTarget===document.activeElement){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}}),onKeyDown:Ne(a.onKeyDown,E=>{var v;((v=c.searchRef)===null||v===void 0?void 0:v.current)!==""&&E.key===" "||(K1.includes(E.key)&&$(),E.key===" "&&E.preventDefault())})}))))}),Yi="SelectItemText",pE=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Br(Yi,n),s=Hr(Yi,n),c=dE(Yi,n),u=Z1(Yi,n),[f,d]=l.useState(null),m=ut(t,E=>d(E),c.onItemTextChange,E=>{var v;return(v=s.itemTextRefCallback)===null||v===void 0?void 0:v.call(s,E,c.value,c.disabled)}),p=f==null?void 0:f.textContent,b=l.useMemo(()=>l.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},p),[c.disabled,c.value,p]),{onNativeOptionAdd:y,onNativeOptionRemove:$}=u;return Gt(()=>(y(b),()=>$(b)),[y,$,b]),l.createElement(l.Fragment,null,l.createElement(Ue.span,ae({id:c.textId},i,{ref:m})),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?mn.createPortal(i.children,a.valueNode):null)}),mf="SelectScrollUpButton",hE=l.forwardRef((e,t)=>{const n=Hr(mf,e.__scopeSelect),r=Pu(mf,e.__scopeSelect),[o,i]=l.useState(!1),a=ut(t,r.onScrollButtonChange);return Gt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=s.scrollTop>0;i(u)};const s=n.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?l.createElement(pv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}})):null}),gf="SelectScrollDownButton",vE=l.forwardRef((e,t)=>{const n=Hr(gf,e.__scopeSelect),r=Pu(gf,e.__scopeSelect),[o,i]=l.useState(!1),a=ut(t,r.onScrollButtonChange);return Gt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=s.scrollHeight-s.clientHeight,f=Math.ceil(s.scrollTop)<u;i(f)};const s=n.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?l.createElement(pv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}})):null}),pv=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Hr("SelectScrollButton",n),a=l.useRef(null),s=ps(n),c=l.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),Gt(()=>{var u;const f=s().find(d=>d.ref.current===document.activeElement);f==null||(u=f.ref.current)===null||u===void 0||u.scrollIntoView({block:"nearest"})},[s]),l.createElement(Ue.div,ae({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ne(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ne(o.onPointerMove,()=>{var u;(u=i.onItemLeave)===null||u===void 0||u.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ne(o.onPointerLeave,()=>{c()})}))}),hv=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=l.useRef(null),i=ut(t,o),a=cs(n);return l.useEffect(()=>{const s=o.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&f){const d=new Event("change",{bubbles:!0});f.call(s,n),s.dispatchEvent(d)}},[a,n]),l.createElement(us,{asChild:!0},l.createElement("select",ae({},r,{ref:i,defaultValue:n})))});hv.displayName="BubbleSelect";function vv(e){const t=un(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(a=>{const s=n.current+a;t(s),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),i=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function mv(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=mE(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function mE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const gE=Q1,yE=eE,bE=nE,wE=rE,EE=oE,xE=cE,_E=fE,SE=pE,CE=hE,$E=vE;var TE=Ke({defaultClassName:"_1639370",variantClassNames:{place:{left:"_1639371",right:"_1639372"},state:{default:"_1639373",error:"_1639374",valid:"_1639375",disabled:"_1639376"}},defaultVariants:{state:"default"},compoundVariants:[]});var IE=Ke({defaultClassName:"qormpv0",variantClassNames:{isDisabled:{true:"qormpv1"}},defaultVariants:{isDisabled:!1},compoundVariants:[]});var RE=Ke({defaultClassName:"_1kg30951",variantClassNames:{state:{default:"_1kg30952",error:"_1kg30953",valid:"_1kg30954",disabled:"_1kg30955"}},defaultVariants:{state:"default"},compoundVariants:[]}),OE="_1kg30950";var PE="ldkv8w2",AE="ldkv8w1",DE="ldkv8w0",NE="ldkv8w3";var kE="yihd6a0",ME=Ke({defaultClassName:"yihd6a6",variantClassNames:{state:{default:"yihd6a1",error:"yihd6a2",valid:"yihd6a3",disabled:"yihd6aa yihd6a4"},isTextarea:{true:"yihd6ab"}},defaultVariants:{state:"default",isTextarea:!1},compoundVariants:[[{isTextarea:!0},"yihd6a5"]]}),jE="_18kp58y0";const Oc=({formState:e,place:t,children:n})=>M.jsx("div",{className:$e(TE({state:e,place:t})),children:M.jsx(Xt,{textStyle:"body2",children:n})});Oc.displayName="Addon";const Au=({isError:e,isDisabled:t,isValid:n})=>t?"disabled":e?"error":n?"valid":"default",wo=({children:e,helperTextLeft:t,helperTextRight:n,addonRight:r,addonLeft:o,elementLeft:i,elementRight:a,errorMessage:s,isError:c,isDisabled:u,isValid:f,className:d,inputAreaClassName:m,onClick:p})=>{const b=!!t,y=!!n,$=!b&&y,E=b||y,v=!!o,w=!!r,T=!!i,I=!!a,D=!!s,A=Au({isError:c,isDisabled:u,isValid:f}),F=l.useCallback(()=>A==="disabled"?"$blackTypoMedium":A==="error"?"$redAccent1":A==="valid"?"$greenAccent1":"$blackTypoMedium",[A]),k=()=>c&&D?M.jsx(Xt,{textStyle:"caption",color:F(),children:s}):b&&typeof t=="string"?M.jsx(Xt,{textStyle:"caption",children:t}):b?t:null;return M.jsxs("div",{"data-test-id":"CT_Field_Container",className:$e(OE),onClick:p,children:[M.jsx("div",{className:$e(RE({state:A}),d),children:M.jsxs(Bt,{justifyContent:"space-between",alignItems:"stretch",wrap:"nowrap",children:[v&&M.jsx(Oc,{formState:A,place:"left",children:o}),T&&i,M.jsx("div",{className:$e(kE,m),children:e}),I&&a,w&&M.jsx(Oc,{formState:A,place:"right",children:r})]})}),(E||D)&&M.jsxs(Bt,{justifyContent:$?"flex-end":"space-between",alignItems:"center",mt:"$6",children:[k(),y&&typeof n=="string"?M.jsx(Xt,{textStyle:"caption",children:n}):n]})]})};wo.displayName="Field";wo.defaultProps={helperTextLeft:void 0,helperTextRight:void 0,addonRight:void 0,addonLeft:void 0,elementRight:void 0,elementLeft:void 0,errorMessage:void 0,isError:void 0,isDisabled:void 0,isValid:void 0,className:void 0,inputAreaClassName:void 0,onClick:void 0};function cn(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Pc(e,t){return Pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Pc(e,t)}function Du(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Pc(e,t)}var Ac={exports:{}},Ki={exports:{}},ht={};/** @license React v16.13.1
|
|
93
|
+
`)},W1=0,Kr=[];function z1(e){var t=Oe.useRef([]),n=Oe.useRef([0,0]),r=Oe.useRef(),o=Oe.useState(W1++)[0],i=Oe.useState(function(){return av()})[0],a=Oe.useRef(e);Oe.useEffect(function(){a.current=e},[e]),Oe.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=f1([e.lockRef.current],(e.shards||[]).map(pf),!0).filter(Boolean);return y.forEach(function($){return $.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function($){return $.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=Oe.useCallback(function(y,$){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var E=Ui(y),v=n.current,w="deltaX"in y?y.deltaX:v[0]-E[0],T="deltaY"in y?y.deltaY:v[1]-E[1],I,D=y.target,A=Math.abs(w)>Math.abs(T)?"h":"v";if("touches"in y&&A==="h"&&D.type==="range")return!1;var F=df(A,D);if(!F)return!0;if(F?I=A:(I=A==="v"?"h":"v",F=df(A,D)),!F)return!1;if(!r.current&&"changedTouches"in y&&(w||T)&&(r.current=I),!I)return!0;var k=r.current||I;return V1(k,$,y,k==="h"?w:T,!0)},[]),c=Oe.useCallback(function(y){var $=y;if(!(!Kr.length||Kr[Kr.length-1]!==i)){var E="deltaY"in $?ff($):Ui($),v=t.current.filter(function(I){return I.name===$.type&&I.target===$.target&&B1(I.delta,E)})[0];if(v&&v.should){$.cancelable&&$.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(pf).filter(Boolean).filter(function(I){return I.contains($.target)}),T=w.length>0?s($,w[0]):!a.current.noIsolation;T&&$.cancelable&&$.preventDefault()}}},[]),u=Oe.useCallback(function(y,$,E,v){var w={name:y,delta:$,target:E,should:v};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(T){return T!==w})},1)},[]),f=Oe.useCallback(function(y){n.current=Ui(y),r.current=void 0},[]),d=Oe.useCallback(function(y){u(y.type,ff(y),y.target,s(y,e.lockRef.current))},[]),m=Oe.useCallback(function(y){u(y.type,Ui(y),y.target,s(y,e.lockRef.current))},[]);Oe.useEffect(function(){return Kr.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Yr),document.addEventListener("touchmove",c,Yr),document.addEventListener("touchstart",f,Yr),function(){Kr=Kr.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Yr),document.removeEventListener("touchmove",c,Yr),document.removeEventListener("touchstart",f,Yr)}},[]);var p=e.removeScrollBar,b=e.inert;return Oe.createElement(Oe.Fragment,null,b?Oe.createElement(i,{styles:H1(o)}):null,p?Oe.createElement(D1,{gapMode:"margin"}):null)}const U1=E1(iv,z1);var lv=Oe.forwardRef(function(e,t){return Oe.createElement(ls,Cn({},e,{ref:t,sideCar:U1}))});lv.classNames=ls.classNames;const dv=lv,Y1=[" ","Enter","ArrowUp","ArrowDown"],K1=[" ","Enter"],ds="Select",[fs,ps,q1]=Qa(ds),[bo,MP]=bn(ds,[q1,ss]),Ou=ss(),[X1,Br]=bo(ds),[G1,Z1]=bo(ds),Q1=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:m,required:p}=e,b=Ou(t),[y,$]=l.useState(null),[E,v]=l.useState(null),[w,T]=l.useState(!1),I=Ja(u),[D=!1,A]=Tn({prop:r,defaultProp:o,onChange:i}),[F,k]=Tn({prop:a,defaultProp:s,onChange:c}),B=l.useRef(null),R=y?!!y.closest("form"):!0,[x,h]=l.useState(new Set),C=Array.from(x).map(P=>P.props.value).join(";");return l.createElement(Zh,b,l.createElement(X1,{required:p,scope:t,trigger:y,onTriggerChange:$,valueNode:E,onValueNodeChange:v,valueNodeHasChildren:w,onValueNodeHasChildrenChange:T,contentId:Gn(),value:F,onValueChange:k,open:D,onOpenChange:A,dir:I,triggerPointerDownPosRef:B,disabled:m},l.createElement(fs.Provider,{scope:t},l.createElement(G1,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(P=>{h(j=>new Set(j).add(P))},[]),onNativeOptionRemove:l.useCallback(P=>{h(j=>{const H=new Set(j);return H.delete(P),H})},[])},n)),R?l.createElement(hv,{key:C,"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:d,value:F,onChange:P=>k(P.target.value),disabled:m},F===void 0?l.createElement("option",{value:""}):null,Array.from(x)):null))},J1="SelectTrigger",eE=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Ou(n),a=Br(J1,n),s=a.disabled||r,c=lt(t,a.onTriggerChange),u=ps(n),[f,d,m]=vv(b=>{const y=u().filter(v=>!v.disabled),$=y.find(v=>v.value===a.value),E=mv(y,b,$);E!==void 0&&a.onValueChange(E.value)}),p=()=>{s||(a.onOpenChange(!0),m())};return l.createElement(Qh,ae({asChild:!0},i),l.createElement(Ue.button,ae({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":a.value===void 0?"":void 0},o,{ref:c,onClick:Ne(o.onClick,b=>{b.currentTarget.focus()}),onPointerDown:Ne(o.onPointerDown,b=>{const y=b.target;y.hasPointerCapture(b.pointerId)&&y.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(p(),a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)},b.preventDefault())}),onKeyDown:Ne(o.onKeyDown,b=>{const y=f.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&d(b.key),!(y&&b.key===" ")&&Y1.includes(b.key)&&(p(),b.preventDefault())})})))}),tE="SelectValue",nE=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,c=Br(tE,n),{onValueNodeHasChildrenChange:u}=c,f=i!==void 0,d=lt(t,c.onValueNodeChange);return Gt(()=>{u(f)},[u,f]),l.createElement(Ue.span,ae({},s,{ref:d,style:{pointerEvents:"none"}}),c.value===void 0&&a!==void 0?a:i)}),rE=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.createElement(Ue.span,ae({"aria-hidden":!0},o,{ref:t}),r||"▼")}),po="SelectContent",oE=l.forwardRef((e,t)=>{const n=Br(po,e.__scopeSelect),[r,o]=l.useState();if(Gt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?mn.createPortal(l.createElement(fv,{scope:e.__scopeSelect},l.createElement(fs.Slot,{scope:e.__scopeSelect},l.createElement("div",null,e.children))),i):null}return l.createElement(iE,ae({},e,{ref:t}))}),Kn=10,[fv,Hr]=bo(po),iE=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:p,sticky:b,hideWhenDetached:y,avoidCollisions:$,...E}=e,v=Br(po,n),[w,T]=l.useState(null),[I,D]=l.useState(null),A=lt(t,z=>T(z)),[F,k]=l.useState(null),[B,R]=l.useState(null),x=ps(n),[h,C]=l.useState(!1),P=l.useRef(!1);l.useEffect(()=>{if(w)return nv(w)},[w]),Nh();const j=l.useCallback(z=>{const[G,...oe]=x().map(ee=>ee.ref.current),[ne]=oe.slice(-1),ie=document.activeElement;for(const ee of z)if(ee===ie||(ee==null||ee.scrollIntoView({block:"nearest"}),ee===G&&I&&(I.scrollTop=0),ee===ne&&I&&(I.scrollTop=I.scrollHeight),ee==null||ee.focus(),document.activeElement!==ie))return},[x,I]),H=l.useCallback(()=>j([F,w]),[j,F,w]);l.useEffect(()=>{h&&H()},[h,H]);const{onOpenChange:U,triggerPointerDownPosRef:re}=v;l.useEffect(()=>{if(w){let z={x:0,y:0};const G=ne=>{var ie,ee,pe,xe;z={x:Math.abs(Math.round(ne.pageX)-((ie=(ee=re.current)===null||ee===void 0?void 0:ee.x)!==null&&ie!==void 0?ie:0)),y:Math.abs(Math.round(ne.pageY)-((pe=(xe=re.current)===null||xe===void 0?void 0:xe.y)!==null&&pe!==void 0?pe:0))}},oe=ne=>{z.x<=10&&z.y<=10?ne.preventDefault():w.contains(ne.target)||U(!1),document.removeEventListener("pointermove",G),re.current=null};return re.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",oe,{capture:!0})}}},[w,U,re]),l.useEffect(()=>{const z=()=>U(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[U]);const[W,L]=vv(z=>{const G=x().filter(ie=>!ie.disabled),oe=G.find(ie=>ie.ref.current===document.activeElement),ne=mv(G,z,oe);ne&&setTimeout(()=>ne.ref.current.focus())}),J=l.useCallback((z,G,oe)=>{const ne=!P.current&&!oe;(v.value!==void 0&&v.value===G||ne)&&(k(z),ne&&(P.current=!0))},[v.value]),Y=l.useCallback(()=>w==null?void 0:w.focus(),[w]),K=l.useCallback((z,G,oe)=>{const ne=!P.current&&!oe;(v.value!==void 0&&v.value===G||ne)&&R(z)},[v.value]),Z=r==="popper"?hf:aE,ce=Z===hf?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:p,sticky:b,hideWhenDetached:y,avoidCollisions:$}:{};return l.createElement(fv,{scope:n,content:w,viewport:I,onViewportChange:D,itemRefCallback:J,selectedItem:F,onItemLeave:Y,itemTextRefCallback:K,focusSelectedItem:H,selectedItemText:B,position:r,isPositioned:h,searchRef:W},l.createElement(dv,{as:lo,allowPinchZoom:!0},l.createElement(kh,{asChild:!0,trapped:v.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Ne(o,z=>{var G;(G=v.trigger)===null||G===void 0||G.focus({preventScroll:!0}),z.preventDefault()})},l.createElement(rs,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>v.onOpenChange(!1)},l.createElement(Z,ae({role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:z=>z.preventDefault()},E,ce,{onPlaced:()=>C(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Ne(E.onKeyDown,z=>{const G=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!G&&z.key.length===1&&L(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let ne=x().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(z.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const ie=z.target,ee=ne.indexOf(ie);ne=ne.slice(ee+1)}setTimeout(()=>j(ne)),z.preventDefault()}})}))))))}),aE=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Br(po,n),a=Hr(po,n),[s,c]=l.useState(null),[u,f]=l.useState(null),d=lt(t,A=>f(A)),m=ps(n),p=l.useRef(!1),b=l.useRef(!0),{viewport:y,selectedItem:$,selectedItemText:E,focusSelectedItem:v}=a,w=l.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&y&&$&&E){const A=i.trigger.getBoundingClientRect(),F=u.getBoundingClientRect(),k=i.valueNode.getBoundingClientRect(),B=E.getBoundingClientRect();if(i.dir!=="rtl"){const ie=B.left-F.left,ee=k.left-ie,pe=A.left-ee,xe=A.width+pe,Ee=Math.max(xe,F.width),Ae=window.innerWidth-Kn,Ie=Yd(ee,[Kn,Ae-Ee]);s.style.minWidth=xe+"px",s.style.left=Ie+"px"}else{const ie=F.right-B.right,ee=window.innerWidth-k.right-ie,pe=window.innerWidth-A.right-ee,xe=A.width+pe,Ee=Math.max(xe,F.width),Ae=window.innerWidth-Kn,Ie=Yd(ee,[Kn,Ae-Ee]);s.style.minWidth=xe+"px",s.style.right=Ie+"px"}const R=m(),x=window.innerHeight-Kn*2,h=y.scrollHeight,C=window.getComputedStyle(u),P=parseInt(C.borderTopWidth,10),j=parseInt(C.paddingTop,10),H=parseInt(C.borderBottomWidth,10),U=parseInt(C.paddingBottom,10),re=P+j+h+U+H,W=Math.min($.offsetHeight*5,re),L=window.getComputedStyle(y),J=parseInt(L.paddingTop,10),Y=parseInt(L.paddingBottom,10),K=A.top+A.height/2-Kn,Z=x-K,ce=$.offsetHeight/2,z=$.offsetTop+ce,G=P+j+z,oe=re-G;if(G<=K){const ie=$===R[R.length-1].ref.current;s.style.bottom="0px";const ee=u.clientHeight-y.offsetTop-y.offsetHeight,pe=Math.max(Z,ce+(ie?Y:0)+ee+H),xe=G+pe;s.style.height=xe+"px"}else{const ie=$===R[0].ref.current;s.style.top="0px";const pe=Math.max(K,P+y.offsetTop+(ie?J:0)+ce)+oe;s.style.height=pe+"px",y.scrollTop=G-K+y.offsetTop}s.style.margin=`${Kn}px 0`,s.style.minHeight=W+"px",s.style.maxHeight=x+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[m,i.trigger,i.valueNode,s,u,y,$,E,i.dir,r]);Gt(()=>w(),[w]);const[T,I]=l.useState();Gt(()=>{u&&I(window.getComputedStyle(u).zIndex)},[u]);const D=l.useCallback(A=>{A&&b.current===!0&&(w(),v==null||v(),b.current=!1)},[w,v]);return l.createElement(sE,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:D},l.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T}},l.createElement(Ue.div,ae({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),hf=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Kn,...i}=e,a=Ou(n);return l.createElement(Jh,ae({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[sE,Pu]=bo(po,{}),vf="SelectViewport",cE=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hr(vf,n),i=Pu(vf,n),a=lt(t,o.onViewportChange),s=l.useRef(0);return l.createElement(l.Fragment,null,l.createElement("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}"}}),l.createElement(fs.Slot,{scope:n},l.createElement(Ue.div,ae({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Ne(r.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=i;if(d!=null&&d.current&&f){const m=Math.abs(s.current-u.scrollTop);if(m>0){const p=window.innerHeight-Kn*2,b=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),$=Math.max(b,y);if($<p){const E=$+m,v=Math.min(p,E),w=E-v;f.style.height=v+"px",f.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,f.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),uE="SelectGroup";bo(uE);const Rc="SelectItem",[lE,dE]=bo(Rc),fE=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Br(Rc,n),c=Hr(Rc,n),u=s.value===r,[f,d]=l.useState(i??""),[m,p]=l.useState(!1),b=lt(t,E=>{var v;return(v=c.itemRefCallback)===null||v===void 0?void 0:v.call(c,E,r,o)}),y=Gn(),$=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};return l.createElement(lE,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:l.useCallback(E=>{d(v=>{var w;return v||((w=E==null?void 0:E.textContent)!==null&&w!==void 0?w:"").trim()})},[])},l.createElement(fs.ItemSlot,{scope:n,value:r,disabled:o,textValue:f},l.createElement(Ue.div,ae({role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:b,onFocus:Ne(a.onFocus,()=>p(!0)),onBlur:Ne(a.onBlur,()=>p(!1)),onPointerUp:Ne(a.onPointerUp,$),onPointerMove:Ne(a.onPointerMove,E=>{if(o){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}else E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ne(a.onPointerLeave,E=>{if(E.currentTarget===document.activeElement){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}}),onKeyDown:Ne(a.onKeyDown,E=>{var v;((v=c.searchRef)===null||v===void 0?void 0:v.current)!==""&&E.key===" "||(K1.includes(E.key)&&$(),E.key===" "&&E.preventDefault())})}))))}),Yi="SelectItemText",pE=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Br(Yi,n),s=Hr(Yi,n),c=dE(Yi,n),u=Z1(Yi,n),[f,d]=l.useState(null),m=lt(t,E=>d(E),c.onItemTextChange,E=>{var v;return(v=s.itemTextRefCallback)===null||v===void 0?void 0:v.call(s,E,c.value,c.disabled)}),p=f==null?void 0:f.textContent,b=l.useMemo(()=>l.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},p),[c.disabled,c.value,p]),{onNativeOptionAdd:y,onNativeOptionRemove:$}=u;return Gt(()=>(y(b),()=>$(b)),[y,$,b]),l.createElement(l.Fragment,null,l.createElement(Ue.span,ae({id:c.textId},i,{ref:m})),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?mn.createPortal(i.children,a.valueNode):null)}),mf="SelectScrollUpButton",hE=l.forwardRef((e,t)=>{const n=Hr(mf,e.__scopeSelect),r=Pu(mf,e.__scopeSelect),[o,i]=l.useState(!1),a=lt(t,r.onScrollButtonChange);return Gt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=s.scrollTop>0;i(u)};const s=n.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?l.createElement(pv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}})):null}),gf="SelectScrollDownButton",vE=l.forwardRef((e,t)=>{const n=Hr(gf,e.__scopeSelect),r=Pu(gf,e.__scopeSelect),[o,i]=l.useState(!1),a=lt(t,r.onScrollButtonChange);return Gt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=s.scrollHeight-s.clientHeight,f=Math.ceil(s.scrollTop)<u;i(f)};const s=n.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?l.createElement(pv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}})):null}),pv=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Hr("SelectScrollButton",n),a=l.useRef(null),s=ps(n),c=l.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),Gt(()=>{var u;const f=s().find(d=>d.ref.current===document.activeElement);f==null||(u=f.ref.current)===null||u===void 0||u.scrollIntoView({block:"nearest"})},[s]),l.createElement(Ue.div,ae({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ne(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ne(o.onPointerMove,()=>{var u;(u=i.onItemLeave)===null||u===void 0||u.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ne(o.onPointerLeave,()=>{c()})}))}),hv=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=l.useRef(null),i=lt(t,o),a=cs(n);return l.useEffect(()=>{const s=o.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&f){const d=new Event("change",{bubbles:!0});f.call(s,n),s.dispatchEvent(d)}},[a,n]),l.createElement(us,{asChild:!0},l.createElement("select",ae({},r,{ref:i,defaultValue:n})))});hv.displayName="BubbleSelect";function vv(e){const t=un(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(a=>{const s=n.current+a;t(s),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),i=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function mv(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=mE(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function mE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const gE=Q1,yE=eE,bE=nE,wE=rE,EE=oE,xE=cE,_E=fE,SE=pE,CE=hE,$E=vE;var TE=Ke({defaultClassName:"_1639370",variantClassNames:{place:{left:"_1639371",right:"_1639372"},state:{default:"_1639373",error:"_1639374",valid:"_1639375",disabled:"_1639376"}},defaultVariants:{state:"default"},compoundVariants:[]});var IE=Ke({defaultClassName:"qormpv0",variantClassNames:{isDisabled:{true:"qormpv1"}},defaultVariants:{isDisabled:!1},compoundVariants:[]});var RE=Ke({defaultClassName:"_1kg30951",variantClassNames:{state:{default:"_1kg30952",error:"_1kg30953",valid:"_1kg30954",disabled:"_1kg30955"}},defaultVariants:{state:"default"},compoundVariants:[]}),OE="_1kg30950";var PE="ldkv8w2",AE="ldkv8w1",DE="ldkv8w0",NE="ldkv8w3";var kE="yihd6a0",ME=Ke({defaultClassName:"yihd6a6",variantClassNames:{state:{default:"yihd6a1",error:"yihd6a2",valid:"yihd6a3",disabled:"yihd6aa yihd6a4"},isTextarea:{true:"yihd6ab"}},defaultVariants:{state:"default",isTextarea:!1},compoundVariants:[[{isTextarea:!0},"yihd6a5"]]}),jE="_18kp58y0";const Oc=({formState:e,place:t,children:n})=>M.jsx("div",{className:$e(TE({state:e,place:t})),children:M.jsx(Xt,{textStyle:"body2",children:n})});Oc.displayName="Addon";const Au=({isError:e,isDisabled:t,isValid:n})=>t?"disabled":e?"error":n?"valid":"default",wo=({children:e,helperTextLeft:t,helperTextRight:n,addonRight:r,addonLeft:o,elementLeft:i,elementRight:a,errorMessage:s,isError:c,isDisabled:u,isValid:f,className:d,inputAreaClassName:m,onClick:p})=>{const b=!!t,y=!!n,$=!b&&y,E=b||y,v=!!o,w=!!r,T=!!i,I=!!a,D=!!s,A=Au({isError:c,isDisabled:u,isValid:f}),F=l.useCallback(()=>A==="disabled"?"$blackTypoMedium":A==="error"?"$redAccent1":A==="valid"?"$greenAccent1":"$blackTypoMedium",[A]),k=()=>c&&D?M.jsx(Xt,{textStyle:"caption",color:F(),children:s}):b&&typeof t=="string"?M.jsx(Xt,{textStyle:"caption",children:t}):b?t:null;return M.jsxs("div",{"data-test-id":"CT_Field_Container",className:$e(OE),onClick:p,children:[M.jsx("div",{className:$e(RE({state:A}),d),children:M.jsxs(Bt,{justifyContent:"space-between",alignItems:"stretch",wrap:"nowrap",children:[v&&M.jsx(Oc,{formState:A,place:"left",children:o}),T&&i,M.jsx("div",{className:$e(kE,m),children:e}),I&&a,w&&M.jsx(Oc,{formState:A,place:"right",children:r})]})}),(E||D)&&M.jsxs(Bt,{justifyContent:$?"flex-end":"space-between",alignItems:"center",mt:"$6",children:[k(),y&&typeof n=="string"?M.jsx(Xt,{textStyle:"caption",children:n}):n]})]})};wo.displayName="Field";wo.defaultProps={helperTextLeft:void 0,helperTextRight:void 0,addonRight:void 0,addonLeft:void 0,elementRight:void 0,elementLeft:void 0,errorMessage:void 0,isError:void 0,isDisabled:void 0,isValid:void 0,className:void 0,inputAreaClassName:void 0,onClick:void 0};function cn(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Pc(e,t){return Pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Pc(e,t)}function Du(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Pc(e,t)}var Ac={exports:{}},Ki={exports:{}},ht={};/** @license React v16.13.1
|
|
94
94
|
* react-is.production.min.js
|
|
95
95
|
*
|
|
96
96
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -131,10 +131,10 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
131
131
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
132
132
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
133
133
|
PERFORMANCE OF THIS SOFTWARE.
|
|
134
|
-
***************************************************************************** */var be=function(){return be=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},be.apply(this,arguments)};function ju(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Qe(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function st(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function St(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var wt;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(wt||(wt={}));var ho;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(ho||(ho={}));var Nc=wt.Start,Lu=wt.Stop,$i=wt.Raise,vs=wt.Send,Sv=wt.Cancel,cx=wt.NullEvent,Fu=wt.Assign;wt.After;wt.DoneState;var Cv=wt.Log,ux=wt.Init,kc=wt.Invoke;wt.ErrorExecution;var Of=wt.ErrorPlatform,lx=wt.ErrorCustom,$v=wt.Update,dx=wt.Choose,fx=wt.Pure,Tv=".",Pf={},Mc="xstate.guard",px="",jt=process.env.NODE_ENV==="production",Xi;function Vu(e,t,n){n===void 0&&(n=Tv);var r=Uo(e,n),o=Uo(t,n);return ct(o)?ct(r)?o===r:!1:ct(r)?r in o:Object.keys(r).every(function(i){return i in o?Vu(r[i],o[i]):!1})}function Iv(e){try{return ct(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function jc(e,t){try{return Eo(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function hx(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function Uo(e,t){if(hx(e))return e.value;if(Eo(e))return Pa(e);if(typeof e!="string")return e;var n=jc(e,t);return Pa(n)}function Pa(e){if(e.length===1)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function Lo(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function Af(e,t,n){var r,o,i={};try{for(var a=Qe(Object.keys(e)),s=a.next();!s.done;s=a.next()){var c=s.value,u=e[c];n(u)&&(i[c]=t(u,c,e))}}catch(f){r={error:f}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}var vx=function(e){return function(t){var n,r,o=t;try{for(var i=Qe(e),a=i.next();!a.done;a=i.next()){var s=a.value;o=o[s]}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function mx(e,t){return function(n){var r,o,i=n;try{for(var a=Qe(e),s=a.next();!s.done;s=a.next()){var c=s.value;i=i[t][c]}}catch(u){r={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}}function pa(e){if(!e)return[[]];if(ct(e))return[[e]];var t=Rt(Object.keys(e).map(function(n){var r=e[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:pa(e[n]).map(function(o){return[n].concat(o)})}));return t}function Rt(e){var t;return(t=[]).concat.apply(t,St([],st(e),!1))}function Rv(e){return Eo(e)?e:[e]}function On(e){return e===void 0?[]:Rv(e)}function Aa(e,t,n){var r,o;if(dt(e))return e(t,n.data);var i={};try{for(var a=Qe(Object.keys(e)),s=a.next();!s.done;s=a.next()){var c=s.value,u=e[c];dt(u)?i[c]=u(t,n.data):i[c]=u}}catch(f){r={error:f}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function gx(e){return/^(done|error)\./.test(e)}function Df(e){return!!(e instanceof Promise||e!==null&&(dt(e)||typeof e=="object")&&dt(e.then))}function yx(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function bx(e,t){var n,r,o=st([[],[]],2),i=o[0],a=o[1];try{for(var s=Qe(e),c=s.next();!c.done;c=s.next()){var u=c.value;t(u)?i.push(u):a.push(u)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[i,a]}function Ov(e,t){return Lo(e.states,function(n,r){if(n){var o=(ct(t)?void 0:t[r])||(n?n.current:void 0);if(o)return{current:o,states:Ov(n,o)}}})}function wx(e,t){return{current:t,states:Ov(e,t)}}function Nf(e,t,n,r){jt||Yt(!!e,"Attempting to update undefined context");var o=e&&n.reduce(function(i,a){var s,c,u=a.assignment,f={state:r,action:a,_event:t},d={};if(dt(u))d=u(i,t.data,f);else try{for(var m=Qe(Object.keys(u)),p=m.next();!p.done;p=m.next()){var b=p.value,y=u[b];d[b]=dt(y)?y(i,t.data,f):y}}catch($){s={error:$}}finally{try{p&&!p.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}return Object.assign({},i,d)},e);return o}var Yt=function(){};jt||(Yt=function(e,t){var n=e instanceof Error?e:void 0;if(!(!n&&e)&&console!==void 0){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});function Eo(e){return Array.isArray(e)}function dt(e){return typeof e=="function"}function ct(e){return typeof e=="string"}function Pv(e,t){if(e)return ct(e)?{type:Mc,name:e,predicate:t?t[e]:void 0}:dt(e)?{type:Mc,name:e.name,predicate:e}:e}function Ex(e){try{return"subscribe"in e&&dt(e.subscribe)}catch{return!1}}var sr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();Xi={},Xi[sr]=function(){return this},Xi[Symbol.observable]=function(){return this};function jr(e){return!!e&&"__xstatenode"in e}function xx(e){return!!e&&typeof e.send=="function"}function ms(e,t){return ct(e)||typeof e=="number"?be({type:e},t):e}function Ut(e,t){if(!ct(e)&&"$$type"in e&&e.$$type==="scxml")return e;var n=ms(e);return be({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function Xr(e,t){var n=Rv(t).map(function(r){return typeof r>"u"||typeof r=="string"||jr(r)?{target:r,event:e}:be(be({},r),{event:e})});return n}function _x(e){if(!(e===void 0||e===px))return On(e)}function Sx(e,t,n){if(!jt){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}function Av(e,t,n,r,o){var i=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===Mc)return((i==null?void 0:i[t.name])||t.predicate)(n,r.data,a);var s=i==null?void 0:i[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,r.data,a)}function Dv(e){return typeof e=="string"?{type:e}:e}function ha(e,t,n){var r=function(){},o=typeof e=="object",i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function Gi(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Lc(e){return(e.type===$i||e.type===vs&&e.to===ho.Internal)&&typeof e.delay!="number"}var io=Ut({type:ux});function Fc(e,t){return t&&t[e]||void 0}function ci(e,t){var n;if(ct(e)||typeof e=="number"){var r=Fc(e,t);dt(r)?n={type:e,exec:r}:r?n=r:n={type:e,exec:void 0}}else if(dt(e))n={type:e.name||e.toString(),exec:e};else{var r=Fc(e.type,t);if(dt(r))n=be(be({},e),{exec:r});else if(r){var o=r.type||e.type;n=be(be(be({},r),e),{type:o})}else n=e}return n}var cr=function(e,t){if(!e)return[];var n=Eo(e)?e:[e];return n.map(function(r){return ci(r,t)})};function Bu(e){var t=ci(e);return be(be({id:ct(e)?e:t.id},t),{type:t.type})}function Cx(e,t){return{type:$i,event:typeof e=="function"?e:ms(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function $x(e,t,n,r){var o={_event:n},i=Ut(dt(e.event)?e.event(t,n.data,o):e.event),a;if(ct(e.delay)){var s=r&&r[e.delay];a=dt(s)?s(t,n.data,o):s}else a=dt(e.delay)?e.delay(t,n.data,o):e.delay;return be(be({},e),{type:$i,_event:i,delay:a})}function Tx(e,t){return{to:t?t.to:void 0,type:vs,event:dt(e)?e:ms(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:dt(e)?e.name:Iv(e)}}function Ix(e,t,n,r){var o={_event:n},i=Ut(dt(e.event)?e.event(t,n.data,o):e.event),a;if(ct(e.delay)){var s=r&&r[e.delay];a=dt(s)?s(t,n.data,o):s}else a=dt(e.delay)?e.delay(t,n.data,o):e.delay;var c=dt(e.to)?e.to(t,n.data,o):e.to;return be(be({},e),{to:c,_event:i,event:i.data,delay:a})}var Rx=function(e,t,n){return be(be({},e),{value:ct(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},Ox=function(e){return{type:Sv,sendId:e}};function Px(e){var t=Bu(e);return{type:wt.Start,activity:t,exec:void 0}}function Ax(e){var t=dt(e)?e:Bu(e);return{type:wt.Stop,activity:t,exec:void 0}}function Dx(e,t,n){var r=dt(e.activity)?e.activity(t,n.data):e.activity,o=typeof r=="string"?{id:r}:r,i={type:wt.Stop,activity:o};return i}var Nx=function(e){return{type:Fu,assignment:e}};function kx(e,t){var n=t?"#".concat(t):"";return"".concat(wt.After,"(").concat(e,")").concat(n)}function Zi(e,t){var n="".concat(wt.DoneState,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function va(e,t){var n="".concat(wt.DoneInvoke,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function Fo(e,t){var n="".concat(wt.ErrorPlatform,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}var Mx=function(e){var t,n,r=[];try{for(var o=Qe(e),i=o.next();!i.done;i=o.next())for(var a=i.value,s=0;s<a.actions.length;){if(a.actions[s].type===Fu){r.push(a.actions[s]),a.actions.splice(s,1);continue}s++}}catch(c){t={error:c}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r};function Da(e,t,n,r,o,i,a){a===void 0&&(a=!1);var s=a?[]:Mx(o),c=s.length?Nf(n,r,s,t):n,u=a?[n]:void 0,f=[];function d(b,y){var $;switch(y.type){case $i:{var E=$x(y,c,r,e.options.delays);return i&&typeof E.delay=="number"&&i(E,c,r),E}case vs:var v=Ix(y,c,r,e.options.delays);if(!jt){var w=y.delay;Yt(!ct(w)||typeof v.delay=="number","No delay reference for delay expression '".concat(w,"' was found on machine '").concat(e.id,"'"))}return i&&v.to!==ho.Internal&&(b==="entry"?f.push(v):i(v,c,r)),v;case Cv:{var T=Rx(y,c,r);return i==null||i(T,c,r),T}case dx:{var I=y,D=($=I.conds.find(function(H){var U=Pv(H.cond,e.options.guards);return!U||Av(e,U,c,r,i?void 0:t)}))===null||$===void 0?void 0:$.actions;if(!D)return[];var A=st(Da(e,t,c,r,[{type:b,actions:cr(On(D),e.options.actions)}],i,a),2),F=A[0],k=A[1];return c=k,u==null||u.push(c),F}case fx:{var D=y.get(c,r.data);if(!D)return[];var B=st(Da(e,t,c,r,[{type:b,actions:cr(On(D),e.options.actions)}],i,a),2),R=B[0],x=B[1];return c=x,u==null||u.push(c),R}case Lu:{var T=Dx(y,c,r);return i==null||i(T,n,r),T}case Fu:{c=Nf(c,r,[y],i?void 0:t),u==null||u.push(c);break}default:var h=ci(y,e.options.actions),C=h.exec;if(i)i(h,c,r);else if(C&&u){var P=u.length-1,j=be(be({},h),{exec:function(H){for(var U=[],re=1;re<arguments.length;re++)U[re-1]=arguments[re];C.apply(void 0,St([u[P]],st(U),!1))}});h=j}return h}}function m(b){var y,$,E=[];try{for(var v=Qe(b.actions),w=v.next();!w.done;w=v.next()){var T=w.value,I=d(b.type,T);I&&(E=E.concat(I))}}catch(D){y={error:D}}finally{try{w&&!w.done&&($=v.return)&&$.call(v)}finally{if(y)throw y.error}}return f.forEach(function(D){i(D,c,r)}),f.length=0,E}var p=Rt(o.map(m));return[p,c]}var kf=[],no=function(e,t){kf.push(e);var n=t(e);return kf.pop(),n};function Nv(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[sr]=function(){return this},t}function jx(e,t,n,r){var o,i=Dv(e.src),a=(o=t==null?void 0:t.options.services)===null||o===void 0?void 0:o[i.type],s=e.data?Aa(e.data,n,r):void 0,c=a?kv(a,e.id,s):Nv(e.id);return c.meta=e,c}function kv(e,t,n){var r=Nv(t);if(r.deferred=!0,jr(e)){var o=r.state=no(void 0,function(){return(n?e.withContext(n):e).initialState});r.getSnapshot=function(){return o}}return r}function Lx(e){try{return typeof e.send=="function"}catch{return!1}}function Fx(e){return Lx(e)&&"id"in e}function Vx(e){var t;return be((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[sr]=function(){return this},t),e)}var Na=function(e){return e.type==="atomic"||e.type==="final"};function Mv(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function ui(e){return Mv(e).filter(function(t){return t.type!=="history"})}function jv(e){var t=[e];return Na(e)?t:t.concat(Rt(ui(e).map(jv)))}function Vo(e,t){var n,r,o,i,a,s,c,u,f=new Set(e),d=Vc(f),m=new Set(t);try{for(var p=Qe(m),b=p.next();!b.done;b=p.next())for(var y=b.value,$=y.parent;$&&!m.has($);)m.add($),$=$.parent}catch(k){n={error:k}}finally{try{b&&!b.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var E=Vc(m);try{for(var v=Qe(m),w=v.next();!w.done;w=v.next()){var y=w.value;if(y.type==="compound"&&(!E.get(y)||!E.get(y).length))d.get(y)?d.get(y).forEach(function(B){return m.add(B)}):y.initialStateNodes.forEach(function(B){return m.add(B)});else if(y.type==="parallel")try{for(var T=(a=void 0,Qe(ui(y))),I=T.next();!I.done;I=T.next()){var D=I.value;m.has(D)||(m.add(D),d.get(D)?d.get(D).forEach(function(B){return m.add(B)}):D.initialStateNodes.forEach(function(B){return m.add(B)}))}}catch(B){a={error:B}}finally{try{I&&!I.done&&(s=T.return)&&s.call(T)}finally{if(a)throw a.error}}}}catch(k){o={error:k}}finally{try{w&&!w.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}try{for(var A=Qe(m),F=A.next();!F.done;F=A.next())for(var y=F.value,$=y.parent;$&&!m.has($);)m.add($),$=$.parent}catch(k){c={error:k}}finally{try{F&&!F.done&&(u=A.return)&&u.call(A)}finally{if(c)throw c.error}}return m}function Lv(e,t){var n=t.get(e);if(!n)return{};if(e.type==="compound"){var r=n[0];if(r){if(Na(r))return r.key}else return{}}var o={};return n.forEach(function(i){o[i.key]=Lv(i,t)}),o}function Vc(e){var t,n,r=new Map;try{for(var o=Qe(e),i=o.next();!i.done;i=o.next()){var a=i.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function Bx(e,t){var n=Vo([e],t);return Lv(e,Vc(n))}function Bo(e,t){return Array.isArray(e)?e.some(function(n){return n===t}):e instanceof Set?e.has(t):!1}function Hx(e){return St([],st(new Set(Rt(St([],st(e.map(function(t){return t.ownEvents})),!1)))),!1)}function ma(e,t){return t.type==="compound"?ui(t).some(function(n){return n.type==="final"&&Bo(e,n)}):t.type==="parallel"?ui(t).every(function(n){return ma(e,n)}):!1}function Wx(e){return e===void 0&&(e=[]),e.reduce(function(t,n){return n.meta!==void 0&&(t[n.id]=n.meta),t},{})}function Mf(e){return new Set(Rt(e.map(function(t){return t.tags})))}function Fv(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(ct(e)||ct(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(o){return Fv(e[o],t[o])})}function zx(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function Ux(e,t){var n=e.exec,r=be(be({},e),{exec:n!==void 0?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return r}var _n=function(){function e(t){var n=this,r;this.actions=[],this.activities=Pf,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||Pf,this.meta=Wx(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(r=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&r!==void 0?r:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return Hx(n.configuration)}})}return e.from=function(t,n){if(t instanceof e)return t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t;var r=io;return new e({value:t,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=io;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(t,n){var r=this;if(t===void 0&&(t=this.value),n===void 0&&(n="."),ct(t))return[t];var o=Object.keys(t);return o.concat.apply(o,St([],st(o.map(function(i){return r.toStrings(t[i],n).map(function(a){return i+n+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var n=t.tags;t.machine;var r=ju(t,["configuration","transitions","tags","machine"]);return be(be({},r),{tags:Array.from(n)})},e.prototype.matches=function(t){return Vu(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var n;jt&&Yt(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,t);return!!(r!=null&&r.transitions.length)&&r.transitions.some(function(o){return o.target!==void 0||o.actions.length})},e}(),Yx={deferEvents:!1},jf=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=be(be({},Yx),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},e}(),tc=new Map,Kx=0,Ro={bookId:function(){return"x:".concat(Kx++)},register:function(e,t){return tc.set(e,t),e},get:function(e){return tc.get(e)},free:function(e){tc.delete(e)}};function Hu(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;jt||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function qx(){var e=Hu();if(e&&"__xstate__"in e)return e.__xstate__}function Xx(e){if(Hu()){var t=qx();t&&t.register(e)}}function Gx(e,t){t===void 0&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,a=function(){if(!i){for(i=!0;o.length>0;){var u=o.shift();n=e.transition(n,u,c),r.forEach(function(f){return f.next(n)})}i=!1}},s=Vx({id:t.id,send:function(u){o.push(u),a()},getSnapshot:function(){return n},subscribe:function(u,f,d){var m=ha(u,f,d);return r.add(m),m.next(n),{unsubscribe:function(){r.delete(m)}}}}),c={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(c):n,s}var Zx={sync:!1,autoForward:!1},Vt;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Vt||(Vt={}));var Qx=function(){function e(t,n){n===void 0&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Vt.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(Eo(f))return r.batch(f),r.state;var m=Ut(ms(f,d));if(r.status===Vt.Stopped)return jt||Yt(!1,'Event "'.concat(m.name,'" was sent to stopped service "').concat(r.machine.id,`". This service has already reached its final state, and will not transition.
|
|
134
|
+
***************************************************************************** */var be=function(){return be=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},be.apply(this,arguments)};function ju(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Qe(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function st(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function St(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var wt;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(wt||(wt={}));var ho;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(ho||(ho={}));var Nc=wt.Start,Lu=wt.Stop,$i=wt.Raise,vs=wt.Send,Sv=wt.Cancel,cx=wt.NullEvent,Fu=wt.Assign;wt.After;wt.DoneState;var Cv=wt.Log,ux=wt.Init,kc=wt.Invoke;wt.ErrorExecution;var Of=wt.ErrorPlatform,lx=wt.ErrorCustom,$v=wt.Update,dx=wt.Choose,fx=wt.Pure,Tv=".",Pf={},Mc="xstate.guard",px="",jt=process.env.NODE_ENV==="production",Xi;function Vu(e,t,n){n===void 0&&(n=Tv);var r=Uo(e,n),o=Uo(t,n);return ct(o)?ct(r)?o===r:!1:ct(r)?r in o:Object.keys(r).every(function(i){return i in o?Vu(r[i],o[i]):!1})}function Iv(e){try{return ct(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function jc(e,t){try{return Eo(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function hx(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function Uo(e,t){if(hx(e))return e.value;if(Eo(e))return Pa(e);if(typeof e!="string")return e;var n=jc(e,t);return Pa(n)}function Pa(e){if(e.length===1)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function Lo(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function Af(e,t,n){var r,o,i={};try{for(var a=Qe(Object.keys(e)),s=a.next();!s.done;s=a.next()){var c=s.value,u=e[c];n(u)&&(i[c]=t(u,c,e))}}catch(f){r={error:f}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}var vx=function(e){return function(t){var n,r,o=t;try{for(var i=Qe(e),a=i.next();!a.done;a=i.next()){var s=a.value;o=o[s]}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function mx(e,t){return function(n){var r,o,i=n;try{for(var a=Qe(e),s=a.next();!s.done;s=a.next()){var c=s.value;i=i[t][c]}}catch(u){r={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}}function pa(e){if(!e)return[[]];if(ct(e))return[[e]];var t=Rt(Object.keys(e).map(function(n){var r=e[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:pa(e[n]).map(function(o){return[n].concat(o)})}));return t}function Rt(e){var t;return(t=[]).concat.apply(t,St([],st(e),!1))}function Rv(e){return Eo(e)?e:[e]}function On(e){return e===void 0?[]:Rv(e)}function Aa(e,t,n){var r,o;if(ft(e))return e(t,n.data);var i={};try{for(var a=Qe(Object.keys(e)),s=a.next();!s.done;s=a.next()){var c=s.value,u=e[c];ft(u)?i[c]=u(t,n.data):i[c]=u}}catch(f){r={error:f}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function gx(e){return/^(done|error)\./.test(e)}function Df(e){return!!(e instanceof Promise||e!==null&&(ft(e)||typeof e=="object")&&ft(e.then))}function yx(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function bx(e,t){var n,r,o=st([[],[]],2),i=o[0],a=o[1];try{for(var s=Qe(e),c=s.next();!c.done;c=s.next()){var u=c.value;t(u)?i.push(u):a.push(u)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[i,a]}function Ov(e,t){return Lo(e.states,function(n,r){if(n){var o=(ct(t)?void 0:t[r])||(n?n.current:void 0);if(o)return{current:o,states:Ov(n,o)}}})}function wx(e,t){return{current:t,states:Ov(e,t)}}function Nf(e,t,n,r){jt||Yt(!!e,"Attempting to update undefined context");var o=e&&n.reduce(function(i,a){var s,c,u=a.assignment,f={state:r,action:a,_event:t},d={};if(ft(u))d=u(i,t.data,f);else try{for(var m=Qe(Object.keys(u)),p=m.next();!p.done;p=m.next()){var b=p.value,y=u[b];d[b]=ft(y)?y(i,t.data,f):y}}catch($){s={error:$}}finally{try{p&&!p.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}return Object.assign({},i,d)},e);return o}var Yt=function(){};jt||(Yt=function(e,t){var n=e instanceof Error?e:void 0;if(!(!n&&e)&&console!==void 0){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});function Eo(e){return Array.isArray(e)}function ft(e){return typeof e=="function"}function ct(e){return typeof e=="string"}function Pv(e,t){if(e)return ct(e)?{type:Mc,name:e,predicate:t?t[e]:void 0}:ft(e)?{type:Mc,name:e.name,predicate:e}:e}function Ex(e){try{return"subscribe"in e&&ft(e.subscribe)}catch{return!1}}var sr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();Xi={},Xi[sr]=function(){return this},Xi[Symbol.observable]=function(){return this};function jr(e){return!!e&&"__xstatenode"in e}function xx(e){return!!e&&typeof e.send=="function"}function ms(e,t){return ct(e)||typeof e=="number"?be({type:e},t):e}function Ut(e,t){if(!ct(e)&&"$$type"in e&&e.$$type==="scxml")return e;var n=ms(e);return be({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function Xr(e,t){var n=Rv(t).map(function(r){return typeof r>"u"||typeof r=="string"||jr(r)?{target:r,event:e}:be(be({},r),{event:e})});return n}function _x(e){if(!(e===void 0||e===px))return On(e)}function Sx(e,t,n){if(!jt){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}function Av(e,t,n,r,o){var i=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===Mc)return((i==null?void 0:i[t.name])||t.predicate)(n,r.data,a);var s=i==null?void 0:i[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,r.data,a)}function Dv(e){return typeof e=="string"?{type:e}:e}function ha(e,t,n){var r=function(){},o=typeof e=="object",i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function Gi(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Lc(e){return(e.type===$i||e.type===vs&&e.to===ho.Internal)&&typeof e.delay!="number"}var io=Ut({type:ux});function Fc(e,t){return t&&t[e]||void 0}function ci(e,t){var n;if(ct(e)||typeof e=="number"){var r=Fc(e,t);ft(r)?n={type:e,exec:r}:r?n=r:n={type:e,exec:void 0}}else if(ft(e))n={type:e.name||e.toString(),exec:e};else{var r=Fc(e.type,t);if(ft(r))n=be(be({},e),{exec:r});else if(r){var o=r.type||e.type;n=be(be(be({},r),e),{type:o})}else n=e}return n}var cr=function(e,t){if(!e)return[];var n=Eo(e)?e:[e];return n.map(function(r){return ci(r,t)})};function Bu(e){var t=ci(e);return be(be({id:ct(e)?e:t.id},t),{type:t.type})}function Cx(e,t){return{type:$i,event:typeof e=="function"?e:ms(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function $x(e,t,n,r){var o={_event:n},i=Ut(ft(e.event)?e.event(t,n.data,o):e.event),a;if(ct(e.delay)){var s=r&&r[e.delay];a=ft(s)?s(t,n.data,o):s}else a=ft(e.delay)?e.delay(t,n.data,o):e.delay;return be(be({},e),{type:$i,_event:i,delay:a})}function Tx(e,t){return{to:t?t.to:void 0,type:vs,event:ft(e)?e:ms(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:ft(e)?e.name:Iv(e)}}function Ix(e,t,n,r){var o={_event:n},i=Ut(ft(e.event)?e.event(t,n.data,o):e.event),a;if(ct(e.delay)){var s=r&&r[e.delay];a=ft(s)?s(t,n.data,o):s}else a=ft(e.delay)?e.delay(t,n.data,o):e.delay;var c=ft(e.to)?e.to(t,n.data,o):e.to;return be(be({},e),{to:c,_event:i,event:i.data,delay:a})}var Rx=function(e,t,n){return be(be({},e),{value:ct(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},Ox=function(e){return{type:Sv,sendId:e}};function Px(e){var t=Bu(e);return{type:wt.Start,activity:t,exec:void 0}}function Ax(e){var t=ft(e)?e:Bu(e);return{type:wt.Stop,activity:t,exec:void 0}}function Dx(e,t,n){var r=ft(e.activity)?e.activity(t,n.data):e.activity,o=typeof r=="string"?{id:r}:r,i={type:wt.Stop,activity:o};return i}var Nx=function(e){return{type:Fu,assignment:e}};function kx(e,t){var n=t?"#".concat(t):"";return"".concat(wt.After,"(").concat(e,")").concat(n)}function Zi(e,t){var n="".concat(wt.DoneState,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function va(e,t){var n="".concat(wt.DoneInvoke,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function Fo(e,t){var n="".concat(wt.ErrorPlatform,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}var Mx=function(e){var t,n,r=[];try{for(var o=Qe(e),i=o.next();!i.done;i=o.next())for(var a=i.value,s=0;s<a.actions.length;){if(a.actions[s].type===Fu){r.push(a.actions[s]),a.actions.splice(s,1);continue}s++}}catch(c){t={error:c}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r};function Da(e,t,n,r,o,i,a){a===void 0&&(a=!1);var s=a?[]:Mx(o),c=s.length?Nf(n,r,s,t):n,u=a?[n]:void 0,f=[];function d(b,y){var $;switch(y.type){case $i:{var E=$x(y,c,r,e.options.delays);return i&&typeof E.delay=="number"&&i(E,c,r),E}case vs:var v=Ix(y,c,r,e.options.delays);if(!jt){var w=y.delay;Yt(!ct(w)||typeof v.delay=="number","No delay reference for delay expression '".concat(w,"' was found on machine '").concat(e.id,"'"))}return i&&v.to!==ho.Internal&&(b==="entry"?f.push(v):i(v,c,r)),v;case Cv:{var T=Rx(y,c,r);return i==null||i(T,c,r),T}case dx:{var I=y,D=($=I.conds.find(function(H){var U=Pv(H.cond,e.options.guards);return!U||Av(e,U,c,r,i?void 0:t)}))===null||$===void 0?void 0:$.actions;if(!D)return[];var A=st(Da(e,t,c,r,[{type:b,actions:cr(On(D),e.options.actions)}],i,a),2),F=A[0],k=A[1];return c=k,u==null||u.push(c),F}case fx:{var D=y.get(c,r.data);if(!D)return[];var B=st(Da(e,t,c,r,[{type:b,actions:cr(On(D),e.options.actions)}],i,a),2),R=B[0],x=B[1];return c=x,u==null||u.push(c),R}case Lu:{var T=Dx(y,c,r);return i==null||i(T,n,r),T}case Fu:{c=Nf(c,r,[y],i?void 0:t),u==null||u.push(c);break}default:var h=ci(y,e.options.actions),C=h.exec;if(i)i(h,c,r);else if(C&&u){var P=u.length-1,j=be(be({},h),{exec:function(H){for(var U=[],re=1;re<arguments.length;re++)U[re-1]=arguments[re];C.apply(void 0,St([u[P]],st(U),!1))}});h=j}return h}}function m(b){var y,$,E=[];try{for(var v=Qe(b.actions),w=v.next();!w.done;w=v.next()){var T=w.value,I=d(b.type,T);I&&(E=E.concat(I))}}catch(D){y={error:D}}finally{try{w&&!w.done&&($=v.return)&&$.call(v)}finally{if(y)throw y.error}}return f.forEach(function(D){i(D,c,r)}),f.length=0,E}var p=Rt(o.map(m));return[p,c]}var kf=[],no=function(e,t){kf.push(e);var n=t(e);return kf.pop(),n};function Nv(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[sr]=function(){return this},t}function jx(e,t,n,r){var o,i=Dv(e.src),a=(o=t==null?void 0:t.options.services)===null||o===void 0?void 0:o[i.type],s=e.data?Aa(e.data,n,r):void 0,c=a?kv(a,e.id,s):Nv(e.id);return c.meta=e,c}function kv(e,t,n){var r=Nv(t);if(r.deferred=!0,jr(e)){var o=r.state=no(void 0,function(){return(n?e.withContext(n):e).initialState});r.getSnapshot=function(){return o}}return r}function Lx(e){try{return typeof e.send=="function"}catch{return!1}}function Fx(e){return Lx(e)&&"id"in e}function Vx(e){var t;return be((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[sr]=function(){return this},t),e)}var Na=function(e){return e.type==="atomic"||e.type==="final"};function Mv(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function ui(e){return Mv(e).filter(function(t){return t.type!=="history"})}function jv(e){var t=[e];return Na(e)?t:t.concat(Rt(ui(e).map(jv)))}function Vo(e,t){var n,r,o,i,a,s,c,u,f=new Set(e),d=Vc(f),m=new Set(t);try{for(var p=Qe(m),b=p.next();!b.done;b=p.next())for(var y=b.value,$=y.parent;$&&!m.has($);)m.add($),$=$.parent}catch(k){n={error:k}}finally{try{b&&!b.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var E=Vc(m);try{for(var v=Qe(m),w=v.next();!w.done;w=v.next()){var y=w.value;if(y.type==="compound"&&(!E.get(y)||!E.get(y).length))d.get(y)?d.get(y).forEach(function(B){return m.add(B)}):y.initialStateNodes.forEach(function(B){return m.add(B)});else if(y.type==="parallel")try{for(var T=(a=void 0,Qe(ui(y))),I=T.next();!I.done;I=T.next()){var D=I.value;m.has(D)||(m.add(D),d.get(D)?d.get(D).forEach(function(B){return m.add(B)}):D.initialStateNodes.forEach(function(B){return m.add(B)}))}}catch(B){a={error:B}}finally{try{I&&!I.done&&(s=T.return)&&s.call(T)}finally{if(a)throw a.error}}}}catch(k){o={error:k}}finally{try{w&&!w.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}try{for(var A=Qe(m),F=A.next();!F.done;F=A.next())for(var y=F.value,$=y.parent;$&&!m.has($);)m.add($),$=$.parent}catch(k){c={error:k}}finally{try{F&&!F.done&&(u=A.return)&&u.call(A)}finally{if(c)throw c.error}}return m}function Lv(e,t){var n=t.get(e);if(!n)return{};if(e.type==="compound"){var r=n[0];if(r){if(Na(r))return r.key}else return{}}var o={};return n.forEach(function(i){o[i.key]=Lv(i,t)}),o}function Vc(e){var t,n,r=new Map;try{for(var o=Qe(e),i=o.next();!i.done;i=o.next()){var a=i.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function Bx(e,t){var n=Vo([e],t);return Lv(e,Vc(n))}function Bo(e,t){return Array.isArray(e)?e.some(function(n){return n===t}):e instanceof Set?e.has(t):!1}function Hx(e){return St([],st(new Set(Rt(St([],st(e.map(function(t){return t.ownEvents})),!1)))),!1)}function ma(e,t){return t.type==="compound"?ui(t).some(function(n){return n.type==="final"&&Bo(e,n)}):t.type==="parallel"?ui(t).every(function(n){return ma(e,n)}):!1}function Wx(e){return e===void 0&&(e=[]),e.reduce(function(t,n){return n.meta!==void 0&&(t[n.id]=n.meta),t},{})}function Mf(e){return new Set(Rt(e.map(function(t){return t.tags})))}function Fv(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(ct(e)||ct(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(o){return Fv(e[o],t[o])})}function zx(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function Ux(e,t){var n=e.exec,r=be(be({},e),{exec:n!==void 0?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return r}var _n=function(){function e(t){var n=this,r;this.actions=[],this.activities=Pf,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||Pf,this.meta=Wx(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(r=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&r!==void 0?r:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return Hx(n.configuration)}})}return e.from=function(t,n){if(t instanceof e)return t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t;var r=io;return new e({value:t,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=io;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(t,n){var r=this;if(t===void 0&&(t=this.value),n===void 0&&(n="."),ct(t))return[t];var o=Object.keys(t);return o.concat.apply(o,St([],st(o.map(function(i){return r.toStrings(t[i],n).map(function(a){return i+n+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var n=t.tags;t.machine;var r=ju(t,["configuration","transitions","tags","machine"]);return be(be({},r),{tags:Array.from(n)})},e.prototype.matches=function(t){return Vu(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var n;jt&&Yt(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,t);return!!(r!=null&&r.transitions.length)&&r.transitions.some(function(o){return o.target!==void 0||o.actions.length})},e}(),Yx={deferEvents:!1},jf=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=be(be({},Yx),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},e}(),tc=new Map,Kx=0,Ro={bookId:function(){return"x:".concat(Kx++)},register:function(e,t){return tc.set(e,t),e},get:function(e){return tc.get(e)},free:function(e){tc.delete(e)}};function Hu(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;jt||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function qx(){var e=Hu();if(e&&"__xstate__"in e)return e.__xstate__}function Xx(e){if(Hu()){var t=qx();t&&t.register(e)}}function Gx(e,t){t===void 0&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,a=function(){if(!i){for(i=!0;o.length>0;){var u=o.shift();n=e.transition(n,u,c),r.forEach(function(f){return f.next(n)})}i=!1}},s=Vx({id:t.id,send:function(u){o.push(u),a()},getSnapshot:function(){return n},subscribe:function(u,f,d){var m=ha(u,f,d);return r.add(m),m.next(n),{unsubscribe:function(){r.delete(m)}}}}),c={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(c):n,s}var Zx={sync:!1,autoForward:!1},Vt;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Vt||(Vt={}));var Qx=function(){function e(t,n){n===void 0&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Vt.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(Eo(f))return r.batch(f),r.state;var m=Ut(ms(f,d));if(r.status===Vt.Stopped)return jt||Yt(!1,'Event "'.concat(m.name,'" was sent to stopped service "').concat(r.machine.id,`". This service has already reached its final state, and will not transition.
|
|
135
135
|
Event: `).concat(JSON.stringify(m.data))),r.state;if(r.status!==Vt.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(m.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
|
|
136
|
-
Event: `).concat(JSON.stringify(m.data)));return r.scheduler.schedule(function(){r.forward(m);var p=r._nextState(m);r.update(p,m)}),r._state},this.sendTo=function(f,d,m){var p=r.parent&&(d===ho.Parent||r.parent.id===d),b=p?r.parent:ct(d)?d===ho.Internal?r:r.children.get(d)||Ro.get(d):xx(d)?d:void 0;if(!b){if(!p)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(r.id,"'."));jt||Yt(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(f.type));return}if("machine"in b){if(r.status!==Vt.Stopped||r.parent!==b||r.state.done){var y=be(be({},f),{name:f.name===lx?"".concat(Fo(r.id)):f.name,origin:r.sessionId});!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([b,y]):b.send(y)}}else!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([b,f.data]):b.send(f.data)},this._exec=function(f,d,m,p){p===void 0&&(p=r.machine.options.actions);var b=f.exec||Fc(f.type,p),y=
|
|
137
|
-
Event: `).concat(JSON.stringify(event)));else if(this.status!==Vt.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(t.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var o,i,a=n.state,s=!1,c=[],u=function(p){var b=Ut(p);n.forward(b),a=no(n,function(){return n.machine.transition(a,b,void 0,r||void 0)}),c.push.apply(c,St([],st(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(y){return Ux(y,a)})),!1)),s=s||!!a.changed};try{for(var f=Qe(t),d=f.next();!d.done;d=f.next()){var m=d.value;u(m)}}catch(p){o={error:p}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}a.changed=s,a.actions=c,n.update(a,Ut(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var o=Ut(t);if(o.name.indexOf(Of)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Of)===0}))throw o.data.data;var i=no(this,function(){return r.machine.transition(r.state,o,void 0,n||void 0)});return i},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var n,r;try{for(var o=Qe(this.forwardTo),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.children.get(a);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));s.send(t)}}catch(c){n={error:c}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.defer=function(t){var n=this,r=this.clock.setTimeout(function(){"to"in t&&t.to?n.sendTo(t._event,t.to,!0):n.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=r)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(t,n.context,n._event,r)},e.prototype.removeChild=function(t){var n;this.children.delete(t),this.forwardTo.delete(t),(n=this.state)===null||n===void 0||delete n.children[t]},e.prototype.stopChild=function(t){var n=this.children.get(t);n&&(this.removeChild(t),dt(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,r){if(this.status!==Vt.Running)return kv(t,n);if(Df(t))return this.spawnPromise(Promise.resolve(t),n);if(dt(t))return this.spawnCallback(t,n);if(Fx(t))return this.spawnActor(t,n);if(Ex(t))return this.spawnObservable(t,n);if(jr(t))return this.spawnMachine(t,be(be({},r),{id:n}));if(yx(t))return this.spawnBehavior(t,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,n){var r=this;n===void 0&&(n={});var o=new e(t,be(be({},this.options),{parent:this,id:n.id||t.id})),i=be(be({},Zx),n);i.sync&&o.onTransition(function(s){r.send($v,{state:s,id:o.id})});var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone(function(s){r.removeChild(o.id),r.send(Ut(s,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,n){var r=Gx(t,{id:n,parent:this});return this.children.set(n,r),r},e.prototype.spawnPromise=function(t,n){var r,o=this,i=!1,a;t.then(function(c){i||(a=c,o.removeChild(n),o.send(Ut(va(n,c),{origin:n})))},function(c){if(!i){o.removeChild(n);var u=Fo(n,c);try{o.send(Ut(u,{origin:n}))}catch(f){Sx(c,f,n),o.devTools&&o.devTools.send(u,o.state),o.machine.strict&&o.stop()}}});var s=(r={id:n,send:function(){},subscribe:function(c,u,f){var d=ha(c,u,f),m=!1;return t.then(function(p){m||(d.next(p),!m&&d.complete())},function(p){m||d.error(p)}),{unsubscribe:function(){return m=!0}}},stop:function(){i=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return a}},r[sr]=function(){return this},r);return this.children.set(n,s),s},e.prototype.spawnCallback=function(t,n){var r,o=this,i=!1,a=new Set,s=new Set,c,u=function(m){c=m,s.forEach(function(p){return p(m)}),!i&&o.send(Ut(m,{origin:n}))},f;try{f=t(u,function(m){a.add(m)})}catch(m){this.send(Fo(n,m))}if(Df(f))return this.spawnPromise(f,n);var d=(r={id:n,send:function(m){return a.forEach(function(p){return p(m)})},subscribe:function(m){var p=ha(m);return s.add(p.next),{unsubscribe:function(){s.delete(p.next)}}},stop:function(){i=!0,dt(f)&&f()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[sr]=function(){return this},r);return this.children.set(n,d),d},e.prototype.spawnObservable=function(t,n){var r,o=this,i,a=t.subscribe(function(c){i=c,o.send(Ut(c,{origin:n}))},function(c){o.removeChild(n),o.send(Ut(Fo(n,c),{origin:n}))},function(){o.removeChild(n),o.send(Ut(va(n),{origin:n}))}),s=(r={id:n,send:function(){},subscribe:function(c,u,f){return t.subscribe(c,u,f)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return i},toJSON:function(){return{id:n}}},r[sr]=function(){return this},r);return this.children.set(n,s),s},e.prototype.spawnActor=function(t,n){return this.children.set(n,t),t},e.prototype.spawnActivity=function(t){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!n){jt||Yt(!1,"No implementation found for activity '".concat(t.type,"'"));return}var r=n(this.state.context,t);this.spawnEffect(t.id,r)},e.prototype.spawnEffect=function(t,n){var r;this.children.set(t,(r={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},r[sr]=function(){return this},r))},e.prototype.attachDev=function(){var t=Hu();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(be(be({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:be({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}Xx(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[sr]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Vt.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,n){return setTimeout(t,n)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=Vv,e}();function Vv(e,t){var n=new Qx(e,t);return n}function Jx(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function Qi(e){return be(be({type:kc},e),{toJSON:function(){e.onDone,e.onError;var t=ju(e,["onDone","onError"]);return be(be({},t),{type:kc,src:Jx(e.src)})}})}var ro="",Bc="#",Oo="*",Gr={},Zr=function(e){return e[0]===Bc},e_=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},t_=function(e,t,n){var r=n.slice(0,-1).some(function(i){return!("cond"in i)&&!("in"in i)&&(ct(i.target)||jr(i.target))}),o=t===ro?"the transient event":"event '".concat(t,"'");Yt(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},n_=function(){function e(t,n,r,o){r===void 0&&(r="context"in t?t.context:void 0);var i=this,a;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(e_(),n),this.parent=o==null?void 0:o.parent,this.key=this.config.key||(o==null?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:Tv),this.id=this.config.id||St([this.machine.key],st(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,jt||Yt(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Lo(this.config.states,function(u,f){var d,m=new e(u,{},void 0,{parent:i,key:f});return Object.assign(i.idMap,be((d={},d[m.id]=m,d),m.idMap)),m}):Gr;var s=0;function c(u){var f,d;u.order=s++;try{for(var m=Qe(Mv(u)),p=m.next();!p.done;p=m.next()){var b=p.value;c(b)}}catch(y){f={error:y}}finally{try{p&&!p.done&&(d=m.return)&&d.call(m)}finally{if(f)throw f.error}}}c(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(u){var f=u.event;return f===ro}):ro in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=On(this.config.entry||this.config.onEntry).map(function(u){return ci(u)}),this.onExit=On(this.config.exit||this.config.onExit).map(function(u){return ci(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=On(this.config.invoke).map(function(u,f){var d,m;if(jr(u)){var p=Gi(i.id,f);return i.machine.options.services=be((d={},d[p]=u,d),i.machine.options.services),Qi({src:p,id:p})}else if(ct(u.src)){var p=u.id||Gi(i.id,f);return Qi(be(be({},u),{id:p,src:u.src}))}else if(jr(u.src)||dt(u.src)){var p=u.id||Gi(i.id,f);return i.machine.options.services=be((m={},m[p]=u.src,m),i.machine.options.services),Qi(be(be({id:p},u),{src:p}))}else{var b=u.src;return Qi(be(be({id:Gi(i.id,f)},u),{src:b}))}}),this.activities=On(this.config.activities).concat(this.invoke).map(function(u){return Bu(u)}),this.transition=this.transition.bind(this),this.tags=On(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||jv(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,a=r.guards,s=r.services,c=r.delays;return new e(this.config,{actions:be(be({},o),t.actions),activities:be(be({},i),t.activities),guards:be(be({},a),t.guards),services:be(be({},s),t.services),delays:be(be({},c),t.delays)},n??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return dt(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Lo(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var n=t===ro,r=this.transitions.filter(function(o){var i=o.eventType===t;return n?i:i||o.eventType===Oo});return this.__cache.candidates[t]=r,r},e.prototype.getDelayedTransitions=function(){var t=this,n=this.config.after;if(!n)return[];var r=function(i,a){var s=dt(i)?"".concat(t.id,":delay[").concat(a,"]"):i,c=kx(s,t.id);return t.onEntry.push(Tx(c,{delay:i})),t.onExit.push(Ox(c)),c},o=Eo(n)?n.map(function(i,a){var s=r(i.delay,a);return be(be({},i),{event:s})}):Rt(Object.keys(n).map(function(i,a){var s=n[i],c=ct(s)?{target:s}:s,u=isNaN(+i)?i:+i,f=r(u,a);return On(c).map(function(d){return be(be({},d),{event:f,delay:u})})}));return o.map(function(i){var a=i.delay;return be(be({},t.formatTransition(i)),{delay:a})})},e.prototype.getStateNodes=function(t){var n,r=this;if(!t)return[];var o=t instanceof _n?t.value:Uo(t,this.delimiter);if(ct(o)){var i=this.getStateNode(o).initial;return i!==void 0?this.getStateNodes((n={},n[o]=i,n)):[this,this.states[o]]}var a=Object.keys(o),s=[this];return s.push.apply(s,St([],st(Rt(a.map(function(c){return r.getStateNode(c).getStateNodes(o[c])}))),!1)),s},e.prototype.handles=function(t){var n=Iv(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof _n?t:_n.create(t),r=Array.from(Vo([],this.getStateNodes(n.value)));return new _n(be(be({},n),{value:this.resolve(n.value),configuration:r,done:ma(r,this),tags:Mf(r),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,n,r){var o=this.getStateNode(t),i=o.next(n,r);return!i||!i.transitions.length?this.next(n,r):i},e.prototype.transitionCompoundNode=function(t,n,r){var o=Object.keys(t),i=this.getStateNode(o[0]),a=i._transition(t[o[0]],n,r);return!a||!a.transitions.length?this.next(n,r):a},e.prototype.transitionParallelNode=function(t,n,r){var o,i,a={};try{for(var s=Qe(Object.keys(t)),c=s.next();!c.done;c=s.next()){var u=c.value,f=t[u];if(f){var d=this.getStateNode(u),m=d._transition(f,n,r);m&&(a[u]=m)}}}catch(E){o={error:E}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}var p=Object.keys(a).map(function(E){return a[E]}),b=Rt(p.map(function(E){return E.transitions})),y=p.some(function(E){return E.transitions.length>0});if(!y)return this.next(n,r);var $=Rt(Object.keys(a).map(function(E){return a[E].configuration}));return{transitions:b,exitSet:Rt(p.map(function(E){return E.exitSet})),configuration:$,source:n,actions:Rt(Object.keys(a).map(function(E){return a[E].actions}))}},e.prototype._transition=function(t,n,r){return ct(t)?this.transitionLeafNode(t,n,r):Object.keys(t).length===1?this.transitionCompoundNode(t,n,r):this.transitionParallelNode(t,n,r)},e.prototype.getTransitionData=function(t,n){return this._transition(t.value,t,Ut(n))},e.prototype.next=function(t,n){var r,o,i=this,a=n.name,s=[],c=[],u;try{for(var f=Qe(this.getCandidates(a)),d=f.next();!d.done;d=f.next()){var m=d.value,p=m.cond,b=m.in,y=t.context,$=b?ct(b)&&Zr(b)?t.matches(Uo(this.getStateNodeById(b).path,this.delimiter)):Vu(Uo(b,this.delimiter),vx(this.path.slice(0,-2))(t.value)):!0,E=!1;try{E=!p||Av(this.machine,p,y,n,t)}catch(T){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
|
|
136
|
+
Event: `).concat(JSON.stringify(m.data)));return r.scheduler.schedule(function(){r.forward(m);var p=r._nextState(m);r.update(p,m)}),r._state},this.sendTo=function(f,d,m){var p=r.parent&&(d===ho.Parent||r.parent.id===d),b=p?r.parent:ct(d)?d===ho.Internal?r:r.children.get(d)||Ro.get(d):xx(d)?d:void 0;if(!b){if(!p)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(r.id,"'."));jt||Yt(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(f.type));return}if("machine"in b){if(r.status!==Vt.Stopped||r.parent!==b||r.state.done){var y=be(be({},f),{name:f.name===lx?"".concat(Fo(r.id)):f.name,origin:r.sessionId});!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([b,y]):b.send(y)}}else!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([b,f.data]):b.send(f.data)},this._exec=function(f,d,m,p){p===void 0&&(p=r.machine.options.actions);var b=f.exec||Fc(f.type,p),y=ft(b)?b:b?b.exec:f.exec;if(y)try{return y(d,m.data,r.machine.config.predictableActionArguments?{action:f,_event:m}:{action:f,state:r.state,_event:m})}catch(C){throw r.parent&&r.parent.send({type:"xstate.error",data:C}),C}switch(f.type){case $i:{var $=f;r.defer($);break}case vs:var E=f;if(typeof E.delay=="number"){r.defer(E);return}else E.to?r.sendTo(E._event,E.to,m===io):r.send(E._event);break;case Sv:r.cancel(f.sendId);break;case Nc:{if(r.status!==Vt.Running)return;var v=f.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[v.id||v.type])break;if(v.type===wt.Invoke){var w=Dv(v.src),T=r.machine.options.services?r.machine.options.services[w.type]:void 0,I=v.id,D=v.data;jt||Yt(!("forward"in v),"`forward` property is deprecated (found in invocation of '".concat(v.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var A="autoForward"in v?v.autoForward:!!v.forward;if(!T){jt||Yt(!1,"No service found for invocation '".concat(v.src,"' in machine '").concat(r.machine.id,"'."));return}var F=D?Aa(D,d,m):void 0;if(typeof T=="string")return;var k=ft(T)?T(d,m.data,{data:F,src:w,meta:v.meta}):T;if(!k)return;var B=void 0;jr(k)&&(k=F?k.withContext(F):k,B={autoForward:A}),r.spawn(k,I,B)}else r.spawnActivity(v);break}case Lu:{r.stopChild(f.activity.id);break}case Cv:var R=f,x=R.label,h=R.value;x?r.logger(x,h):r.logger(h);break;default:jt||Yt(!1,"No implementation found for action type '".concat(f.type,"'"));break}};var o=be(be({},e.defaultOptions),n),i=o.clock,a=o.logger,s=o.parent,c=o.id,u=c!==void 0?c:t.id;this.id=u,this.logger=a,this.clock=i,this.parent=s,this.options=o,this.scheduler=new jf({deferEvents:this.options.deferEvents}),this.sessionId=Ro.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:no(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return jt||Yt(this.status!==Vt.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,n){var r,o;try{for(var i=Qe(t.actions),a=i.next();!a.done;a=i.next()){var s=a.value;this.exec(s,t,n)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},e.prototype.update=function(t,n){var r,o,i,a,s,c,u,f,d=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||n===io)&&this.options.execute)this.execute(this.state);else for(var m=void 0;m=this._outgoingQueue.shift();)m[0].send(m[1]);if(this.children.forEach(function(k){d.state.children[k.id]=k}),this.devTools&&this.devTools.send(n.data,t),t.event)try{for(var p=Qe(this.eventListeners),b=p.next();!b.done;b=p.next()){var y=b.value;y(t.event)}}catch(k){r={error:k}}finally{try{b&&!b.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}try{for(var $=Qe(this.listeners),E=$.next();!E.done;E=$.next()){var y=E.value;y(t,t.event)}}catch(k){i={error:k}}finally{try{E&&!E.done&&(a=$.return)&&a.call($)}finally{if(i)throw i.error}}try{for(var v=Qe(this.contextListeners),w=v.next();!w.done;w=v.next()){var T=w.value;T(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(k){s={error:k}}finally{try{w&&!w.done&&(c=v.return)&&c.call(v)}finally{if(s)throw s.error}}if(this.state.done){var I=t.configuration.find(function(k){return k.type==="final"&&k.parent===d.machine}),D=I&&I.doneData?Aa(I.doneData,t.context,n):void 0;this._doneEvent=va(this.id,D);try{for(var A=Qe(this.doneListeners),F=A.next();!F.done;F=A.next()){var y=F.value;y(this._doneEvent)}}catch(k){u={error:k}}finally{try{F&&!F.done&&(f=A.return)&&f.call(A)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),Ro.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===Vt.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,n,r){var o=this,i=ha(t,n,r);this.listeners.add(i.next),this.status!==Vt.NotStarted&&i.next(this.state);var a=function(){o.doneListeners.delete(a),o.stopListeners.delete(a),i.complete()};return this.status===Vt.Stopped?i.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){o.listeners.delete(i.next),o.doneListeners.delete(a),o.stopListeners.delete(a)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===Vt.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var n=this;if(this.status===Vt.Running)return this;this.machine._init(),Ro.register(this.sessionId,this),this.initialized=!0,this.status=Vt.Running;var r=t===void 0?this.initialState:no(this,function(){return zx(t)?n.machine.resolveState(t):n.machine.resolveState(_n.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,io)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){ft(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,n,r,o,i,a,s,c,u,f;try{for(var d=Qe(this.listeners),m=d.next();!m.done;m=d.next()){var p=m.value;this.listeners.delete(p)}}catch(A){t={error:A}}finally{try{m&&!m.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}try{for(var b=Qe(this.stopListeners),y=b.next();!y.done;y=b.next()){var p=y.value;p(),this.stopListeners.delete(p)}}catch(A){r={error:A}}finally{try{y&&!y.done&&(o=b.return)&&o.call(b)}finally{if(r)throw r.error}}try{for(var $=Qe(this.contextListeners),E=$.next();!E.done;E=$.next()){var p=E.value;this.contextListeners.delete(p)}}catch(A){i={error:A}}finally{try{E&&!E.done&&(a=$.return)&&a.call($)}finally{if(i)throw i.error}}try{for(var v=Qe(this.doneListeners),w=v.next();!w.done;w=v.next()){var p=w.value;this.doneListeners.delete(p)}}catch(A){s={error:A}}finally{try{w&&!w.done&&(c=v.return)&&c.call(v)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Vt.Stopped,this._initialState=void 0;try{for(var T=Qe(Object.keys(this.delayedEventsMap)),I=T.next();!I.done;I=T.next()){var D=I.value;this.clock.clearTimeout(this.delayedEventsMap[D])}}catch(A){u={error:A}}finally{try{I&&!I.done&&(f=T.return)&&f.call(T)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new jf({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r=Ut({type:"xstate.stop"}),o=no(t,function(){var i=Rt(St([],st(t.state.configuration),!1).sort(function(f,d){return d.order-f.order}).map(function(f){return cr(f.onExit,t.machine.options.actions)})),a=st(Da(t.machine,t.state,t.state.context,r,[{type:"exit",actions:i}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),s=a[0],c=a[1],u=new _n({value:t.state.value,context:c,_event:r,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:s.filter(function(f){return!Lc(f)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return u.changed=!0,u});t.update(o,r),t._stopChildren(),Ro.free(t.sessionId)}),this},e.prototype.batch=function(t){var n=this;if(this.status===Vt.NotStarted&&this.options.deferEvents)jt||Yt(!1,"".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,`" and are deferred. Make sure .start() is called for this service.
|
|
137
|
+
Event: `).concat(JSON.stringify(event)));else if(this.status!==Vt.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(t.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var o,i,a=n.state,s=!1,c=[],u=function(p){var b=Ut(p);n.forward(b),a=no(n,function(){return n.machine.transition(a,b,void 0,r||void 0)}),c.push.apply(c,St([],st(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(y){return Ux(y,a)})),!1)),s=s||!!a.changed};try{for(var f=Qe(t),d=f.next();!d.done;d=f.next()){var m=d.value;u(m)}}catch(p){o={error:p}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}a.changed=s,a.actions=c,n.update(a,Ut(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var o=Ut(t);if(o.name.indexOf(Of)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Of)===0}))throw o.data.data;var i=no(this,function(){return r.machine.transition(r.state,o,void 0,n||void 0)});return i},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var n,r;try{for(var o=Qe(this.forwardTo),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.children.get(a);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));s.send(t)}}catch(c){n={error:c}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.defer=function(t){var n=this,r=this.clock.setTimeout(function(){"to"in t&&t.to?n.sendTo(t._event,t.to,!0):n.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=r)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(t,n.context,n._event,r)},e.prototype.removeChild=function(t){var n;this.children.delete(t),this.forwardTo.delete(t),(n=this.state)===null||n===void 0||delete n.children[t]},e.prototype.stopChild=function(t){var n=this.children.get(t);n&&(this.removeChild(t),ft(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,r){if(this.status!==Vt.Running)return kv(t,n);if(Df(t))return this.spawnPromise(Promise.resolve(t),n);if(ft(t))return this.spawnCallback(t,n);if(Fx(t))return this.spawnActor(t,n);if(Ex(t))return this.spawnObservable(t,n);if(jr(t))return this.spawnMachine(t,be(be({},r),{id:n}));if(yx(t))return this.spawnBehavior(t,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,n){var r=this;n===void 0&&(n={});var o=new e(t,be(be({},this.options),{parent:this,id:n.id||t.id})),i=be(be({},Zx),n);i.sync&&o.onTransition(function(s){r.send($v,{state:s,id:o.id})});var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone(function(s){r.removeChild(o.id),r.send(Ut(s,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,n){var r=Gx(t,{id:n,parent:this});return this.children.set(n,r),r},e.prototype.spawnPromise=function(t,n){var r,o=this,i=!1,a;t.then(function(c){i||(a=c,o.removeChild(n),o.send(Ut(va(n,c),{origin:n})))},function(c){if(!i){o.removeChild(n);var u=Fo(n,c);try{o.send(Ut(u,{origin:n}))}catch(f){Sx(c,f,n),o.devTools&&o.devTools.send(u,o.state),o.machine.strict&&o.stop()}}});var s=(r={id:n,send:function(){},subscribe:function(c,u,f){var d=ha(c,u,f),m=!1;return t.then(function(p){m||(d.next(p),!m&&d.complete())},function(p){m||d.error(p)}),{unsubscribe:function(){return m=!0}}},stop:function(){i=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return a}},r[sr]=function(){return this},r);return this.children.set(n,s),s},e.prototype.spawnCallback=function(t,n){var r,o=this,i=!1,a=new Set,s=new Set,c,u=function(m){c=m,s.forEach(function(p){return p(m)}),!i&&o.send(Ut(m,{origin:n}))},f;try{f=t(u,function(m){a.add(m)})}catch(m){this.send(Fo(n,m))}if(Df(f))return this.spawnPromise(f,n);var d=(r={id:n,send:function(m){return a.forEach(function(p){return p(m)})},subscribe:function(m){var p=ha(m);return s.add(p.next),{unsubscribe:function(){s.delete(p.next)}}},stop:function(){i=!0,ft(f)&&f()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[sr]=function(){return this},r);return this.children.set(n,d),d},e.prototype.spawnObservable=function(t,n){var r,o=this,i,a=t.subscribe(function(c){i=c,o.send(Ut(c,{origin:n}))},function(c){o.removeChild(n),o.send(Ut(Fo(n,c),{origin:n}))},function(){o.removeChild(n),o.send(Ut(va(n),{origin:n}))}),s=(r={id:n,send:function(){},subscribe:function(c,u,f){return t.subscribe(c,u,f)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return i},toJSON:function(){return{id:n}}},r[sr]=function(){return this},r);return this.children.set(n,s),s},e.prototype.spawnActor=function(t,n){return this.children.set(n,t),t},e.prototype.spawnActivity=function(t){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!n){jt||Yt(!1,"No implementation found for activity '".concat(t.type,"'"));return}var r=n(this.state.context,t);this.spawnEffect(t.id,r)},e.prototype.spawnEffect=function(t,n){var r;this.children.set(t,(r={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},r[sr]=function(){return this},r))},e.prototype.attachDev=function(){var t=Hu();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(be(be({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:be({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}Xx(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[sr]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Vt.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,n){return setTimeout(t,n)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=Vv,e}();function Vv(e,t){var n=new Qx(e,t);return n}function Jx(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function Qi(e){return be(be({type:kc},e),{toJSON:function(){e.onDone,e.onError;var t=ju(e,["onDone","onError"]);return be(be({},t),{type:kc,src:Jx(e.src)})}})}var ro="",Bc="#",Oo="*",Gr={},Zr=function(e){return e[0]===Bc},e_=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},t_=function(e,t,n){var r=n.slice(0,-1).some(function(i){return!("cond"in i)&&!("in"in i)&&(ct(i.target)||jr(i.target))}),o=t===ro?"the transient event":"event '".concat(t,"'");Yt(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},n_=function(){function e(t,n,r,o){r===void 0&&(r="context"in t?t.context:void 0);var i=this,a;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(e_(),n),this.parent=o==null?void 0:o.parent,this.key=this.config.key||(o==null?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:Tv),this.id=this.config.id||St([this.machine.key],st(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,jt||Yt(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Lo(this.config.states,function(u,f){var d,m=new e(u,{},void 0,{parent:i,key:f});return Object.assign(i.idMap,be((d={},d[m.id]=m,d),m.idMap)),m}):Gr;var s=0;function c(u){var f,d;u.order=s++;try{for(var m=Qe(Mv(u)),p=m.next();!p.done;p=m.next()){var b=p.value;c(b)}}catch(y){f={error:y}}finally{try{p&&!p.done&&(d=m.return)&&d.call(m)}finally{if(f)throw f.error}}}c(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(u){var f=u.event;return f===ro}):ro in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=On(this.config.entry||this.config.onEntry).map(function(u){return ci(u)}),this.onExit=On(this.config.exit||this.config.onExit).map(function(u){return ci(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=On(this.config.invoke).map(function(u,f){var d,m;if(jr(u)){var p=Gi(i.id,f);return i.machine.options.services=be((d={},d[p]=u,d),i.machine.options.services),Qi({src:p,id:p})}else if(ct(u.src)){var p=u.id||Gi(i.id,f);return Qi(be(be({},u),{id:p,src:u.src}))}else if(jr(u.src)||ft(u.src)){var p=u.id||Gi(i.id,f);return i.machine.options.services=be((m={},m[p]=u.src,m),i.machine.options.services),Qi(be(be({id:p},u),{src:p}))}else{var b=u.src;return Qi(be(be({id:Gi(i.id,f)},u),{src:b}))}}),this.activities=On(this.config.activities).concat(this.invoke).map(function(u){return Bu(u)}),this.transition=this.transition.bind(this),this.tags=On(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||jv(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,a=r.guards,s=r.services,c=r.delays;return new e(this.config,{actions:be(be({},o),t.actions),activities:be(be({},i),t.activities),guards:be(be({},a),t.guards),services:be(be({},s),t.services),delays:be(be({},c),t.delays)},n??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return ft(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Lo(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var n=t===ro,r=this.transitions.filter(function(o){var i=o.eventType===t;return n?i:i||o.eventType===Oo});return this.__cache.candidates[t]=r,r},e.prototype.getDelayedTransitions=function(){var t=this,n=this.config.after;if(!n)return[];var r=function(i,a){var s=ft(i)?"".concat(t.id,":delay[").concat(a,"]"):i,c=kx(s,t.id);return t.onEntry.push(Tx(c,{delay:i})),t.onExit.push(Ox(c)),c},o=Eo(n)?n.map(function(i,a){var s=r(i.delay,a);return be(be({},i),{event:s})}):Rt(Object.keys(n).map(function(i,a){var s=n[i],c=ct(s)?{target:s}:s,u=isNaN(+i)?i:+i,f=r(u,a);return On(c).map(function(d){return be(be({},d),{event:f,delay:u})})}));return o.map(function(i){var a=i.delay;return be(be({},t.formatTransition(i)),{delay:a})})},e.prototype.getStateNodes=function(t){var n,r=this;if(!t)return[];var o=t instanceof _n?t.value:Uo(t,this.delimiter);if(ct(o)){var i=this.getStateNode(o).initial;return i!==void 0?this.getStateNodes((n={},n[o]=i,n)):[this,this.states[o]]}var a=Object.keys(o),s=[this];return s.push.apply(s,St([],st(Rt(a.map(function(c){return r.getStateNode(c).getStateNodes(o[c])}))),!1)),s},e.prototype.handles=function(t){var n=Iv(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof _n?t:_n.create(t),r=Array.from(Vo([],this.getStateNodes(n.value)));return new _n(be(be({},n),{value:this.resolve(n.value),configuration:r,done:ma(r,this),tags:Mf(r),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,n,r){var o=this.getStateNode(t),i=o.next(n,r);return!i||!i.transitions.length?this.next(n,r):i},e.prototype.transitionCompoundNode=function(t,n,r){var o=Object.keys(t),i=this.getStateNode(o[0]),a=i._transition(t[o[0]],n,r);return!a||!a.transitions.length?this.next(n,r):a},e.prototype.transitionParallelNode=function(t,n,r){var o,i,a={};try{for(var s=Qe(Object.keys(t)),c=s.next();!c.done;c=s.next()){var u=c.value,f=t[u];if(f){var d=this.getStateNode(u),m=d._transition(f,n,r);m&&(a[u]=m)}}}catch(E){o={error:E}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}var p=Object.keys(a).map(function(E){return a[E]}),b=Rt(p.map(function(E){return E.transitions})),y=p.some(function(E){return E.transitions.length>0});if(!y)return this.next(n,r);var $=Rt(Object.keys(a).map(function(E){return a[E].configuration}));return{transitions:b,exitSet:Rt(p.map(function(E){return E.exitSet})),configuration:$,source:n,actions:Rt(Object.keys(a).map(function(E){return a[E].actions}))}},e.prototype._transition=function(t,n,r){return ct(t)?this.transitionLeafNode(t,n,r):Object.keys(t).length===1?this.transitionCompoundNode(t,n,r):this.transitionParallelNode(t,n,r)},e.prototype.getTransitionData=function(t,n){return this._transition(t.value,t,Ut(n))},e.prototype.next=function(t,n){var r,o,i=this,a=n.name,s=[],c=[],u;try{for(var f=Qe(this.getCandidates(a)),d=f.next();!d.done;d=f.next()){var m=d.value,p=m.cond,b=m.in,y=t.context,$=b?ct(b)&&Zr(b)?t.matches(Uo(this.getStateNodeById(b).path,this.delimiter)):Vu(Uo(b,this.delimiter),vx(this.path.slice(0,-2))(t.value)):!0,E=!1;try{E=!p||Av(this.machine,p,y,n,t)}catch(T){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
|
|
138
138
|
`).concat(T.message))}if(E&&$){m.target!==void 0&&(c=m.target),s.push.apply(s,St([],st(m.actions),!1)),u=m;break}}}catch(T){r={error:T}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}if(u){if(!c.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var v=Rt(c.map(function(T){return i.getRelativeStateNodes(T,t.historyValue)})),w=!!u.internal;return{transitions:[u],exitSet:w?[]:Rt(c.map(function(T){return i.getPotentiallyReenteringNodes(T)})),configuration:v,source:t,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var n=[],r=this,o=t;r&&r!==o;)n.push(r),r=r.parent;return r!==o?[]:(n.push(o),n)},e.prototype.getActions=function(t,n,r,o,i,a,s){var c,u,f,d,m=this,p=a?Vo([],this.getStateNodes(a.value)):[],b=new Set;try{for(var y=Qe(Array.from(t).sort(function(R,x){return R.order-x.order})),$=y.next();!$.done;$=y.next()){var E=$.value;(!Bo(p,E)||Bo(r.exitSet,E)||E.parent&&b.has(E.parent))&&b.add(E)}}catch(R){c={error:R}}finally{try{$&&!$.done&&(u=y.return)&&u.call(y)}finally{if(c)throw c.error}}try{for(var v=Qe(p),w=v.next();!w.done;w=v.next()){var E=w.value;(!Bo(t,E)||Bo(r.exitSet,E.parent))&&r.exitSet.push(E)}}catch(R){f={error:R}}finally{try{w&&!w.done&&(d=v.return)&&d.call(v)}finally{if(f)throw f.error}}r.exitSet.sort(function(R,x){return x.order-R.order});var T=Array.from(b).sort(function(R,x){return R.order-x.order}),I=new Set(r.exitSet),D=Rt(T.map(function(R){var x=[];if(R.type!=="final")return x;var h=R.parent;if(!h.parent)return x;x.push(Zi(R.id,R.doneData),Zi(h.id,R.doneData?Aa(R.doneData,o,i):void 0));var C=h.parent;return C.type==="parallel"&&ui(C).every(function(P){return ma(r.configuration,P)})&&x.push(Zi(C.id)),x})),A=T.map(function(R){var x=R.onEntry,h=R.activities.map(function(C){return Px(C)});return{type:"entry",actions:cr(s?St(St([],st(x),!1),st(h),!1):St(St([],st(h),!1),st(x),!1),m.machine.options.actions)}}).concat({type:"state_done",actions:D.map(function(R){return Cx(R)})}),F=Array.from(I).map(function(R){return{type:"exit",actions:cr(St(St([],st(R.onExit),!1),st(R.activities.map(function(x){return Ax(x)})),!1),m.machine.options.actions)}}),k=F.concat({type:"transition",actions:cr(r.actions,this.machine.options.actions)}).concat(A);if(n){var B=cr(Rt(St([],st(t),!1).sort(function(R,x){return x.order-R.order}).map(function(R){return R.onExit})),this.machine.options.actions).filter(function(R){return!Lc(R)});return k.concat({type:"stop",actions:B})}return k},e.prototype.transition=function(t,n,r,o){t===void 0&&(t=this.initialState);var i=Ut(n),a;if(t instanceof _n)a=r===void 0?t:this.resolveState(_n.from(t,r));else{var s=ct(t)?this.resolve(Pa(this.getResolvedPath(t))):this.resolve(t),c=r??this.machine.context;a=this.resolveState(_n.from(s,c))}if(!jt&&i.name===Oo)throw new Error("An event cannot have the wildcard type ('".concat(Oo,"')"));if(this.strict&&!this.events.includes(i.name)&&!gx(i.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(i.name,"'"));var u=this._transition(a.value,a,i)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},f=Vo([],this.getStateNodes(a.value)),d=u.configuration.length?Vo(f,u.configuration):f;return u.configuration=St([],st(d),!1),this.resolveTransition(u,a,a.context,o,i)},e.prototype.resolveRaisedTransition=function(t,n,r,o){var i,a=t.actions;return t=this.transition(t,n,void 0,o),t._event=r,t.event=r.data,(i=t.actions).unshift.apply(i,St([],st(a),!1)),t},e.prototype.resolveTransition=function(t,n,r,o,i){var a,s,c,u,f=this;i===void 0&&(i=io);var d=t.configuration,m=!n||t.transitions.length>0,p=m?t.configuration:n?n.configuration:[],b=ma(p,this),y=m?Bx(this.machine,d):void 0,$=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,E=this.getActions(new Set(p),b,t,r,i,n,o),v=n?be({},n.activities):{};try{for(var w=Qe(E),T=w.next();!T.done;T=w.next()){var I=T.value;try{for(var D=(c=void 0,Qe(I.actions)),A=D.next();!A.done;A=D.next()){var F=A.value;F.type===Nc?v[F.activity.id||F.activity.type]=F:F.type===Lu&&(v[F.activity.id||F.activity.type]=!1)}}catch(K){c={error:K}}finally{try{A&&!A.done&&(u=D.return)&&u.call(D)}finally{if(c)throw c.error}}}}catch(K){a={error:K}}finally{try{T&&!T.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}var k=st(Da(this,n,r,i,E,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),B=k[0],R=k[1],x=st(bx(B,Lc),2),h=x[0],C=x[1],P=B.filter(function(K){var Z;return K.type===Nc&&((Z=K.activity)===null||Z===void 0?void 0:Z.type)===kc}),j=P.reduce(function(K,Z){return K[Z.activity.id]=jx(Z.activity,f.machine,R,i),K},n?be({},n.children):{}),H=new _n({value:y||n.value,context:R,_event:i,_sessionid:n?n._sessionid:null,historyValue:y?$?wx($,y):void 0:n?n.historyValue:void 0,history:!y||t.source?n:void 0,actions:y?C:[],activities:y?v:n?n.activities:{},events:[],configuration:p,transitions:t.transitions,children:j,done:b,tags:Mf(p),machine:this}),U=r!==R;H.changed=i.name===$v||U;var re=H.history;re&&delete re.history;var W=!b&&(this._transient||d.some(function(K){return K._transient}));if(!m&&(!W||i.name===ro))return H;var L=H;if(!b)for(W&&(L=this.resolveRaisedTransition(L,{type:cx},i,o));h.length;){var J=h.shift();L=this.resolveRaisedTransition(L,J._event,i,o)}var Y=L.changed||(re?!!L.actions.length||U||typeof re.value!=typeof L.value||!Fv(L.value,re.value):void 0);return L.changed=Y,L.history=re,L},e.prototype.getStateNode=function(t){if(Zr(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[t];if(!n)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return n},e.prototype.getStateNodeById=function(t){var n=Zr(t)?t.slice(Bc.length):t;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&Zr(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var n=jc(t,this.delimiter).slice(),r=this;n.length;){var o=n.shift();if(!o.length)break;r=r.getStateNode(o)}return r},e.prototype.resolve=function(t){var n,r=this;if(!t)return this.initialStateValue||Gr;switch(this.type){case"parallel":return Lo(this.initialStateValue,function(i,a){return i?r.getStateNode(a).resolve(t[a]||i):Gr});case"compound":if(ct(t)){var o=this.getStateNode(t);return o.type==="parallel"||o.type==="compound"?(n={},n[t]=o.initialStateValue,n):t}return Object.keys(t).length?Lo(t,function(i,a){return i?r.getStateNode(a).resolve(i):Gr}):this.initialStateValue||{};default:return t||Gr}},e.prototype.getResolvedPath=function(t){if(Zr(t)){var n=this.machine.idMap[t.slice(Bc.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return jc(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Af(this.states,function(r){return r.initialStateValue||Gr},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=Na(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,n){this._init();var r=this.getStateNodes(t);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var n=this.config;ct(n.target)?t=Zr(n.target)?Pa(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:t=n.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,n,r){return r===void 0&&(r=!0),r?t.type==="history"?t.resolveHistory(n):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(Na(this))return[this];if(this.type==="compound"&&!this.initial)return jt||Yt(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var n=pa(this.initialStateValue);return Rt(n.map(function(r){return t.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var n=st(t),r=n[0],o=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var i=this.getStateNode(r);if(i.type==="history")return i.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(o)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:Af(this.states,function(n,r){if(!t)return n.historyValue();var o=ct(t)?void 0:t[r];return n.historyValue(o||n.initialStateValue)},function(n){return!n.history})}},e.prototype.resolveHistory=function(t){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!t){var o=this.target;return o?Rt(pa(o).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var i=mx(r.path,"states")(t).current;return ct(i)?[r.getStateNode(i)]:Rt(pa(i).map(function(a){return n.history==="deep"?r.getFromRelativePath(a):[r.states[a[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,n=Rt(Object.keys(this.states).map(function(r){return t.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,n,r,o;if(this.__cache.events)return this.__cache.events;var i=this.states,a=new Set(this.ownEvents);if(i)try{for(var s=Qe(Object.keys(i)),c=s.next();!c.done;c=s.next()){var u=c.value,f=i[u];if(f.states)try{for(var d=(r=void 0,Qe(f.events)),m=d.next();!m.done;m=d.next()){var p=m.value;a.add("".concat(p))}}catch(b){r={error:b}}finally{try{m&&!m.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}}}catch(b){t={error:b}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var n=this;if(t!==void 0)return t.map(function(r){if(!ct(r))return r;var o=r[0]===n.delimiter;if(o&&!n.parent)return n.getStateNodeByPath(r.slice(1));var i=o?n.key+r:r;if(n.parent)try{var a=n.parent.getStateNodeByPath(i);return a}catch(s){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
|
|
139
139
|
`).concat(s.message))}else return n.getStateNodeByPath(i)})},e.prototype.formatTransition=function(t){var n=this,r=_x(t.target),o="internal"in t?t.internal:r?r.some(function(c){return ct(c)&&c[0]===n.delimiter}):!0,i=this.machine.options.guards,a=this.resolveTarget(r),s=be(be({},t),{actions:cr(On(t.actions)),cond:Pv(t.cond,i),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return be(be({},s),{target:s.target?s.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(n.id)})}});return s},e.prototype.formatTransitions=function(){var t,n,r=this,o;if(!this.config.on)o=[];else if(Array.isArray(this.config.on))o=this.config.on;else{var i=this.config.on,a=Oo,s=i[a],c=s===void 0?[]:s,u=ju(i,[typeof a=="symbol"?a:a+""]);o=Rt(Object.keys(u).map(function(v){!jt&&v===ro&&Yt(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var w=Xr(v,u[v]);return jt||t_(r,v,w),w}).concat(Xr(Oo,c)))}var f=this.config.always?Xr("",this.config.always):[],d=this.config.onDone?Xr(String(Zi(this.id)),this.config.onDone):[];jt||Yt(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var m=Rt(this.invoke.map(function(v){var w=[];return v.onDone&&w.push.apply(w,St([],st(Xr(String(va(v.id)),v.onDone)),!1)),v.onError&&w.push.apply(w,St([],st(Xr(String(Fo(v.id)),v.onError)),!1)),w})),p=this.after,b=Rt(St(St(St(St([],st(d),!1),st(m),!1),st(o),!1),st(f),!1).map(function(v){return On(v).map(function(w){return r.formatTransition(w)})}));try{for(var y=Qe(p),$=y.next();!$.done;$=y.next()){var E=$.value;b.push(E)}}catch(v){t={error:v}}finally{try{$&&!$.done&&(n=y.return)&&n.call(y)}finally{if(t)throw t.error}}return b},e}();function r_(e,t,n){return n===void 0&&(n=e.context),new n_(e,t,n)}var o_=Nx,Hc;(function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"})(Hc||(Hc={}));var Yo=l.useLayoutEffect;function Lf(e){var t=Oe.useRef();return t.current||(t.current={v:e()}),t.current.v}var i_=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},a_=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function s_(e,t){var n,r,o=i_([[],[]],2),i=o[0],a=o[1];try{for(var s=a_(e),c=s.next();!c.done;c=s.next()){var u=c.value;t(u)?i.push(u):a.push(u)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[i,a]}var Po=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},Ff=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};function Vf(e,t){var n=e.exec,r=n(t.context,t._event.data,{action:e,state:t,_event:t._event});r()}function c_(e){var t=l.useRef([]),n=l.useRef([]);Yo(function(){var r=e.subscribe(function(o){var i,a;if(o.actions.length){var s=o.actions.filter(function(d){return typeof d.exec=="function"&&"__effect"in d.exec}),c=Po(s_(s,function(d){return d.exec.__effect===Hc.Effect}),2),u=c[0],f=c[1];(i=t.current).push.apply(i,Ff([],Po(u.map(function(d){return[d,o]})),!1)),(a=n.current).push.apply(a,Ff([],Po(f.map(function(d){return[d,o]})),!1))}});return function(){r.unsubscribe()}},[]),Yo(function(){for(;n.current.length;){var r=Po(n.current.shift(),2),o=r[0],i=r[1];Vf(o,i)}}),l.useEffect(function(){for(;t.current.length;){var r=Po(t.current.shift(),2),o=r[0],i=r[1];Vf(o,i)}})}var Ko=globalThis&&globalThis.__assign||function(){return Ko=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ko.apply(this,arguments)},u_=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},l_=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};function d_(e,t,n){if(typeof e=="object")return e;var r=function(){};return{next:e,error:t||r,complete:n||r}}function f_(e,t,n){t===void 0&&(t={});var r=Lf(function(){return typeof e=="function"?e():e});if(process.env.NODE_ENV!=="production"&&typeof e!="function"){var o=l_(l.useState(r),1),i=o[0];e!==i&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var a=t.context,s=t.guards,c=t.actions,u=t.activities,f=t.services,d=t.delays,m=t.state,p=u_(t,["context","guards","actions","activities","services","delays","state"]),b=Lf(function(){var y={context:a,guards:s,actions:c,activities:u,services:f,delays:d},$=r.withConfig(y,function(){return Ko(Ko({},r.context),a)});return Vv($,Ko({deferEvents:!0},p))});return Yo(function(){var y;return n&&(y=b.subscribe(d_(n))),function(){y==null||y.unsubscribe()}},[n]),Yo(function(){return b.start(m?_n.create(m):void 0),function(){b.stop()}},[]),Yo(function(){Object.assign(b.machine.options.actions,c),Object.assign(b.machine.options.guards,s),Object.assign(b.machine.options.activities,u),Object.assign(b.machine.options.services,f),Object.assign(b.machine.options.delays,d)},[c,s,u,f,d]),c_(b),b}var p_=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};globalThis&&globalThis.__spreadArray;function h_(e,t){t===void 0&&(t={});var n=l.useCallback(function(s){var c=s.changed===void 0&&Object.keys(s.children).length;(s.changed||c)&&a(s)},[]),r=f_(e,t,n),o=p_(l.useState(function(){var s=r.machine.initialState;return t.state?_n.create(t.state):s}),2),i=o[0],a=o[1];return[i,r.send,r]}var v_=Object.defineProperty,m_=(e,t)=>{for(var n in t)v_(e,n,{get:t[n],enumerable:!0})},Nn={};m_(Nn,{assign:()=>b_,colors:()=>hr,createStringInterpolator:()=>Xu,skipAnimation:()=>Kv,to:()=>Yv,willAdvance:()=>Gu});var Wu=Ii(),He=e=>Ti(e,Wu),zu=Ii();He.write=e=>Ti(e,zu);var gs=Ii();He.onStart=e=>Ti(e,gs);var Uu=Ii();He.onFrame=e=>Ti(e,Uu);var Yu=Ii();He.onFinish=e=>Ti(e,Yu);var ao=[];He.setTimeout=(e,t)=>{const n=He.now()+t,r=()=>{const i=ao.findIndex(a=>a.cancel==r);~i&&ao.splice(i,1),dr-=~i?1:0},o={time:n,handler:e,cancel:r};return ao.splice(Bv(n),0,o),dr+=1,Hv(),o};var Bv=e=>~(~ao.findIndex(t=>t.time>e)||~ao.length);He.cancel=e=>{gs.delete(e),Uu.delete(e),Yu.delete(e),Wu.delete(e),zu.delete(e)};He.sync=e=>{Wc=!0,He.batchedUpdates(e),Wc=!1};He.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...o){t=o,He.onStart(n)}return r.handler=e,r.cancel=()=>{gs.delete(n),t=null},r};var Ku=typeof window<"u"?window.requestAnimationFrame:()=>{};He.use=e=>Ku=e;He.now=typeof performance<"u"?()=>performance.now():Date.now;He.batchedUpdates=e=>e();He.catch=console.error;He.frameLoop="always";He.advance=()=>{He.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):zv()};var lr=-1,dr=0,Wc=!1;function Ti(e,t){Wc?(t.delete(e),e(0)):(t.add(e),Hv())}function Hv(){lr<0&&(lr=0,He.frameLoop!=="demand"&&Ku(Wv))}function g_(){lr=-1}function Wv(){~lr&&(Ku(Wv),He.batchedUpdates(zv))}function zv(){const e=lr;lr=He.now();const t=Bv(lr);if(t&&(Uv(ao.splice(0,t),n=>n.handler()),dr-=t),!dr){g_();return}gs.flush(),Wu.flush(e?Math.min(64,lr-e):16.667),Uu.flush(),zu.flush(),Yu.flush()}function Ii(){let e=new Set,t=e;return{add(n){dr+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return dr-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,dr-=t.size,Uv(t,r=>r(n)&&e.add(r)),dr+=e.size,t=e)}}}function Uv(e,t){e.forEach(n=>{try{t(n)}catch(r){He.catch(r)}})}function zc(){}var y_=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),me={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function qn(e,t){if(me.arr(e)){if(!me.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Je=(e,t)=>e.forEach(t);function Hn(e,t,n){if(me.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var gn=e=>me.und(e)?[]:me.arr(e)?e:[e];function qo(e,t){if(e.size){const n=Array.from(e);e.clear(),Je(n,t)}}var Ho=(e,...t)=>qo(e,n=>n(...t)),qu=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Xu,Yv,hr=null,Kv=!1,Gu=zc,b_=e=>{e.to&&(Yv=e.to),e.now&&(He.now=e.now),e.colors!==void 0&&(hr=e.colors),e.skipAnimation!=null&&(Kv=e.skipAnimation),e.createStringInterpolator&&(Xu=e.createStringInterpolator),e.requestAnimationFrame&&He.use(e.requestAnimationFrame),e.batchedUpdates&&(He.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Gu=e.willAdvance),e.frameLoop&&(He.frameLoop=e.frameLoop)},Xo=new Set,$n=[],nc=[],ka=0,ys={get idle(){return!Xo.size&&!$n.length},start(e){ka>e.priority?(Xo.add(e),He.onStart(w_)):(qv(e),He(Uc))},advance:Uc,sort(e){if(ka)He.onFrame(()=>ys.sort(e));else{const t=$n.indexOf(e);~t&&($n.splice(t,1),Xv(e))}},clear(){$n=[],Xo.clear()}};function w_(){Xo.forEach(qv),Xo.clear(),He(Uc)}function qv(e){$n.includes(e)||Xv(e)}function Xv(e){$n.splice(E_($n,t=>t.priority>e.priority),0,e)}function Uc(e){const t=nc;for(let n=0;n<$n.length;n++){const r=$n[n];ka=r.priority,r.idle||(Gu(r),r.advance(e),r.idle||t.push(r))}return ka=0,nc=$n,nc.length=0,$n=t,$n.length>0}function E_(e,t){const n=e.findIndex(t);return n<0?e.length:n}var x_=(e,t,n)=>Math.min(Math.max(n,e),t),__={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},An="[-+]?\\d*\\.?\\d+",Ma=An+"%";function bs(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var S_=new RegExp("rgb"+bs(An,An,An)),C_=new RegExp("rgba"+bs(An,An,An,An)),$_=new RegExp("hsl"+bs(An,Ma,Ma)),T_=new RegExp("hsla"+bs(An,Ma,Ma,An)),I_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,R_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,O_=/^#([0-9a-fA-F]{6})$/,P_=/^#([0-9a-fA-F]{8})$/;function A_(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=O_.exec(e))?parseInt(t[1]+"ff",16)>>>0:hr&&hr[e]!==void 0?hr[e]:(t=S_.exec(e))?(Qr(t[1])<<24|Qr(t[2])<<16|Qr(t[3])<<8|255)>>>0:(t=C_.exec(e))?(Qr(t[1])<<24|Qr(t[2])<<16|Qr(t[3])<<8|Wf(t[4]))>>>0:(t=I_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=P_.exec(e))?parseInt(t[1],16)>>>0:(t=R_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=$_.exec(e))?(Bf(Hf(t[1]),Ji(t[2]),Ji(t[3]))|255)>>>0:(t=T_.exec(e))?(Bf(Hf(t[1]),Ji(t[2]),Ji(t[3]))|Wf(t[4]))>>>0:null}function rc(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Bf(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=rc(o,r,e+1/3),a=rc(o,r,e),s=rc(o,r,e-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(s*255)<<8}function Qr(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Hf(e){return(parseFloat(e)%360+360)%360/360}function Wf(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Ji(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function zf(e){let t=A_(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,o=(t&65280)>>>8,i=(t&255)/255;return`rgba(${n}, ${r}, ${o}, ${i})`}var li=(e,t,n)=>{if(me.fun(e))return e;if(me.arr(e))return li({range:e,output:t,extrapolate:n});if(me.str(e.output[0]))return Xu(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{const f=N_(u,i);return D_(u,i[f],i[f+1],o[f],o[f+1],c,a,s,r.map)}};function D_(e,t,n,r,o,i,a,s,c){let u=c?c(e):e;if(u<t){if(a==="identity")return u;a==="clamp"&&(u=t)}if(u>n){if(s==="identity")return u;s==="clamp"&&(u=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=i(u),r===-1/0?u=-u:o===1/0?u=u+r:u=u*(o-r)+r,u)}function N_(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var k_=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,o=t==="end"?Math.floor(r):Math.ceil(r);return x_(0,1,o/e)},ja=1.70158,ea=ja*1.525,Uf=ja+1,Yf=2*Math.PI/3,Kf=2*Math.PI/4.5,ta=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,M_={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Uf*e*e*e-ja*e*e,easeOutBack:e=>1+Uf*Math.pow(e-1,3)+ja*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((ea+1)*2*e-ea)/2:(Math.pow(2*e-2,2)*((ea+1)*(e*2-2)+ea)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Yf),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Yf)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Kf))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Kf)/2+1,easeInBounce:e=>1-ta(1-e),easeOutBounce:ta,easeInOutBounce:e=>e<.5?(1-ta(1-2*e))/2:(1+ta(2*e-1))/2,steps:k_},di=Symbol.for("FluidValue.get"),vo=Symbol.for("FluidValue.observers"),Sn=e=>!!(e&&e[di]),sn=e=>e&&e[di]?e[di]():e,qf=e=>e[vo]||null;function j_(e,t){e.eventObserved?e.eventObserved(t):e(t)}function fi(e,t){const n=e[vo];n&&n.forEach(r=>{j_(r,t)})}var Gv=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");L_(this,e)}},L_=(e,t)=>Zv(e,di,t);function xo(e,t){if(e[di]){let n=e[vo];n||Zv(e,vo,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function pi(e,t){const n=e[vo];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[vo]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Zv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ga=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,F_=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Xf=new RegExp(`(${ga.source})(%|[a-z]+)`,"i"),V_=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ws=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Qv=e=>{const[t,n]=B_(e);if(!t||qu())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||e}else{if(n&&ws.test(n))return Qv(n);if(n)return n}return e},B_=e=>{const t=ws.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},oc,H_=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Jv=e=>{oc||(oc=hr?new RegExp(`(${Object.keys(hr).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>sn(i).replace(ws,Qv).replace(F_,zf).replace(oc,zf)),n=t.map(i=>i.match(ga).map(Number)),o=n[0].map((i,a)=>n.map(s=>{if(!(a in s))throw Error('The arity of each "output" value must be equal');return s[a]})).map(i=>li({...e,output:i}));return i=>{var c;const a=!Xf.test(t[0])&&((c=t.find(u=>Xf.test(u)))==null?void 0:c.replace(ga,""));let s=0;return t[0].replace(ga,()=>`${o[s++](i)}${a||""}`).replace(V_,H_)}},Zu="react-spring: ",em=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Zu}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},W_=em(console.warn);function z_(){W_(`${Zu}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var U_=em(console.warn);function Y_(){U_(`${Zu}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Es(e){return me.str(e)&&(e[0]=="#"||/\d/.test(e)||!qu()&&ws.test(e)||e in(hr||{}))}var Qu=qu()?l.useEffect:l.useLayoutEffect,K_=()=>{const e=l.useRef(!1);return Qu(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function tm(){const e=l.useState()[1],t=K_();return()=>{t.current&&e(Math.random())}}function q_(e,t){const[n]=l.useState(()=>({inputs:t,result:e()})),r=l.useRef(),o=r.current;let i=o;return i?t&&i.inputs&&X_(t,i.inputs)||(i={inputs:t,result:e()}):i=n,l.useEffect(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}function X_(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var nm=e=>l.useEffect(e,G_),G_=[];function Gf(e){const t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var hi=Symbol.for("Animated:node"),Z_=e=>!!e&&e[hi]===e,Vn=e=>e&&e[hi],Ju=(e,t)=>y_(e,hi,t),xs=e=>e&&e[hi]&&e[hi].getPayload(),rm=class{constructor(){Ju(this,this)}getPayload(){return this.payload||[]}},Ri=class extends rm{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,me.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Ri(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return me.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,me.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},vi=class extends Ri{constructor(e){super(0),this._string=null,this._toString=li({output:[e,e]})}static create(e){return new vi(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(me.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=li({output:[this.getValue(),e]})),this._value=0,super.reset()}},La={dependencies:null},_s=class extends rm{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Hn(this.source,(n,r)=>{Z_(n)?t[r]=n.getValue(e):Sn(n)?t[r]=sn(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Je(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Hn(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){La.dependencies&&Sn(e)&&La.dependencies.add(e);const t=xs(e);t&&Je(t,n=>this.add(n))}},om=class extends _s{constructor(e){super(e)}static create(e){return new om(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(Q_)),!0)}};function Q_(e){return(Es(e)?vi:Ri).create(e)}function Yc(e){const t=Vn(e);return t?t.constructor:me.arr(e)?om:Es(e)?vi:Ri}var Zf=(e,t)=>{const n=!me.fun(e)||e.prototype&&e.prototype.isReactComponent;return l.forwardRef((r,o)=>{const i=l.useRef(null),a=n&&l.useCallback(b=>{i.current=tS(o,b)},[o]),[s,c]=eS(r,t),u=tm(),f=()=>{const b=i.current;if(n&&!b)return;(b?t.applyAnimatedValues(b,s.getValue(!0)):!1)===!1&&u()},d=new J_(f,c),m=l.useRef();Qu(()=>(m.current=d,Je(c,b=>xo(b,d)),()=>{m.current&&(Je(m.current.deps,b=>pi(b,m.current)),He.cancel(m.current.update))})),l.useEffect(f,[]),nm(()=>()=>{const b=m.current;Je(b.deps,y=>pi(y,b))});const p=t.getComponentProps(s.getValue());return Oe.createElement(e,{...p,ref:a})})},J_=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&He.write(this.update)}};function eS(e,t){const n=new Set;return La.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new _s(e),La.dependencies=null,[e,n]}function tS(e,t){return e&&(me.fun(e)?e(t):e.current=t),t}var Qf=Symbol.for("AnimatedComponent"),nS=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new _s(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=a=>{const s=Jf(a)||"Anonymous";return me.str(a)?a=i[a]||(i[a]=Zf(a,o)):a=a[Qf]||(a[Qf]=Zf(a,o)),a.displayName=`Animated(${s})`,a};return Hn(e,(a,s)=>{me.arr(e)&&(s=Jf(a)),i[s]=i(a)}),{animated:i}},Jf=e=>me.str(e)?e:e&&me.str(e.displayName)?e.displayName:me.fun(e)&&e.name||null;function Ir(e,...t){return me.fun(e)?e(...t):e}var Go=(e,t)=>e===!0||!!(t&&e&&(me.fun(e)?e(t):gn(e).includes(t))),im=(e,t)=>me.obj(e)?t&&e[t]:e,am=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,rS=e=>e,el=(e,t=rS)=>{let n=oS;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const i=t(e[o],o);me.und(i)||(r[o]=i)}return r},oS=["config","onProps","onStart","onChange","onPause","onResume","onRest"],iS={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function aS(e){const t={};let n=0;if(Hn(e,(r,o)=>{iS[o]||(t[o]=r,n++)}),n)return t}function sm(e){const t=aS(e);if(t){const n={to:t};return Hn(e,(r,o)=>o in t||(n[o]=r)),n}return{...e}}function mi(e){return e=sn(e),me.arr(e)?e.map(mi):Es(e)?Nn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function sS(e){for(const t in e)return!0;return!1}function Kc(e){return me.fun(e)||me.arr(e)&&me.obj(e[0])}function cS(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function uS(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var cm={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},qc={...cm.default,mass:1,damping:1,easing:M_.linear,clamp:!1},lS=class{constructor(){this.velocity=0,Object.assign(this,qc)}};function dS(e,t,n){n&&(n={...n},ep(n,t),t={...n,...t}),ep(e,t),Object.assign(e,t);for(const a in qc)e[a]==null&&(e[a]=qc[a]);let{frequency:r,damping:o}=e;const{mass:i}=e;return me.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r),e}function ep(e,t){if(!me.und(t.decay))e.duration=void 0;else{const n=!me.und(t.tension)||!me.und(t.friction);(n||!me.und(t.frequency)||!me.und(t.damping)||!me.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var tp=[],fS=class{constructor(){this.changed=!1,this.values=tp,this.toValues=null,this.fromValues=tp,this.config=new lS,this.immediate=!1}};function um(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise((a,s)=>{let c,u,f=Go(n.cancel??(r==null?void 0:r.cancel),t);if(f)p();else{me.und(n.pause)||(o.paused=Go(n.pause,t));let b=r==null?void 0:r.pause;b!==!0&&(b=o.paused||Go(b,t)),c=Ir(n.delay||0,t),b?(o.resumeQueue.add(m),i.pause()):(i.resume(),m())}function d(){o.resumeQueue.add(m),o.timeouts.delete(u),u.cancel(),c=u.time-He.now()}function m(){c>0&&!Nn.skipAnimation?(o.delayed=!0,u=He.setTimeout(p,c),o.pauseQueue.add(d),o.timeouts.add(u)):p()}function p(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(d),o.timeouts.delete(u),e<=(o.cancelId||0)&&(f=!0);try{i.start({...n,callId:e,cancel:f},a)}catch(b){s(b)}}})}var tl=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?so(e.get()):t.every(n=>n.noop)?lm(e.get()):Pn(e.get(),t.every(n=>n.finished)),lm=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Pn=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),so=e=>({value:e,cancelled:!0,finished:!1});function dm(e,t,n,r){const{callId:o,parentId:i,onRest:a}=t,{asyncTo:s,promise:c}=n;return!i&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const u=el(t,($,E)=>E==="onRest"?void 0:$);let f,d;const m=new Promise(($,E)=>(f=$,d=E)),p=$=>{const E=o<=(n.cancelId||0)&&so(r)||o!==n.asyncId&&Pn(r,!1);if(E)throw $.result=E,d($),$},b=($,E)=>{const v=new np,w=new rp;return(async()=>{if(Nn.skipAnimation)throw gi(n),w.result=Pn(r,!1),d(w),w;p(v);const T=me.obj($)?{...$}:{...E,to:$};T.parentId=o,Hn(u,(D,A)=>{me.und(T[A])&&(T[A]=D)});const I=await r.start(T);return p(v),n.paused&&await new Promise(D=>{n.resumeQueue.add(D)}),I})()};let y;if(Nn.skipAnimation)return gi(n),Pn(r,!1);try{let $;me.arr(e)?$=(async E=>{for(const v of E)await b(v)})(e):$=Promise.resolve(e(b,r.stop.bind(r))),await Promise.all([$.then(f),m]),y=Pn(r.get(),!0,!1)}catch($){if($ instanceof np)y=$.result;else if($ instanceof rp)y=$.result;else throw $}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?s:void 0,n.promise=i?c:void 0)}return me.fun(a)&&He.batchedUpdates(()=>{a(y,r,r.item)}),y})()}function gi(e,t){qo(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var np=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},rp=class extends Error{constructor(){super("SkipAnimationSignal")}},Xc=e=>e instanceof nl,pS=1,nl=class extends Gv{constructor(){super(...arguments),this.id=pS++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Vn(this);return e&&e.getValue()}to(...e){return Nn.to(this,e)}interpolate(...e){return z_(),Nn.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){fi(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||ys.sort(this),fi(this,{type:"priority",parent:this,priority:e})}},Lr=Symbol.for("SpringPhase"),fm=1,Gc=2,Zc=4,ic=e=>(e[Lr]&fm)>0,ir=e=>(e[Lr]&Gc)>0,Ao=e=>(e[Lr]&Zc)>0,op=(e,t)=>t?e[Lr]|=Gc|fm:e[Lr]&=~Gc,ip=(e,t)=>t?e[Lr]|=Zc:e[Lr]&=~Zc,hS=class extends nl{constructor(e,t){if(super(),this.animation=new fS,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!me.und(e)||!me.und(t)){const n=me.obj(e)?{...e}:{...t,from:e};me.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ir(this)||this._state.asyncTo)||Ao(this)}get goal(){return sn(this.animation.to)}get velocity(){const e=Vn(this);return e instanceof Ri?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ic(this)}get isAnimating(){return ir(this)}get isPaused(){return Ao(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,a=xs(r.to);!a&&Sn(r.to)&&(o=gn(sn(r.to))),r.values.forEach((u,f)=>{if(u.done)return;const d=u.constructor==vi?1:a?a[f].lastPosition:o[f];let m=r.immediate,p=d;if(!m){if(p=u.lastPosition,i.tension<=0){u.done=!0;return}let b=u.elapsedTime+=e;const y=r.fromValues[f],$=u.v0!=null?u.v0:u.v0=me.arr(i.velocity)?i.velocity[f]:i.velocity;let E;const v=i.precision||(y==d?.005:Math.min(1,Math.abs(d-y)*.001));if(me.und(i.duration))if(i.decay){const w=i.decay===!0?.998:i.decay,T=Math.exp(-(1-w)*b);p=y+$/(1-w)*(1-T),m=Math.abs(u.lastPosition-p)<=v,E=$*T}else{E=u.lastVelocity==null?$:u.lastVelocity;const w=i.restVelocity||v/10,T=i.clamp?0:i.bounce,I=!me.und(T),D=y==d?u.v0>0:y<d;let A,F=!1;const k=1,B=Math.ceil(e/k);for(let R=0;R<B&&(A=Math.abs(E)>w,!(!A&&(m=Math.abs(d-p)<=v,m)));++R){I&&(F=p==d||p>d==D,F&&(E=-E*T,p=d));const x=-i.tension*1e-6*(p-d),h=-i.friction*.001*E,C=(x+h)/i.mass;E=E+C*k,p=p+E*k}}else{let w=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,u.durationProgress>0&&(u.elapsedTime=i.duration*u.durationProgress,b=u.elapsedTime+=e)),w=(i.progress||0)+b/this._memoizedDuration,w=w>1?1:w<0?0:w,u.durationProgress=w),p=y+i.easing(w)*(d-y),E=(p-u.lastPosition)/e,m=w==1}u.lastVelocity=E,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),m=!0)}a&&!a[f].done&&(m=!1),m?u.done=!0:t=!1,u.setValue(p,i.round)&&(n=!0)});const s=Vn(this),c=s.getValue();if(t){const u=sn(r.to);(c!==u||n)&&!i.decay?(s.setValue(u),this._onChange(u)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return He.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ir(this)){const{to:e,config:t}=this.animation;He.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return me.und(e)?(n=this.queue||[],this.queue=[]):n=[me.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>tl(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),gi(this._state,e&&this._lastCallId),He.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=me.obj(n)?n[t]:n,(n==null||Kc(n))&&(n=void 0),r=me.obj(r)?r[t]:r,r==null&&(r=void 0);const o={to:n,from:r};return ic(this)||(e.reverse&&([n,r]=[r,n]),r=sn(r),me.und(r)?Vn(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,el(e,(a,s)=>/^on/.test(s)?im(a,n):a)),sp(this,e,"onProps"),No(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return um(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Ao(this)||(ip(this,!0),Ho(i.pauseQueue),No(this,"onPause",Pn(this,Do(this,this.animation.to)),this))},resume:()=>{Ao(this)&&(ip(this,!1),ir(this)&&this._resume(),Ho(i.resumeQueue),No(this,"onResume",Pn(this,Do(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const s=pm(e);if(s)return this._update(s,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(so(this));const r=!me.und(e.to),o=!me.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(so(this));const{key:i,defaultProps:a,animation:s}=this,{to:c,from:u}=s;let{to:f=c,from:d=u}=e;o&&!r&&(!t.default||me.und(f))&&(f=d),t.reverse&&([f,d]=[d,f]);const m=!qn(d,u);m&&(s.from=d),d=sn(d);const p=!qn(f,c);p&&this._focus(f);const b=Kc(t.to),{config:y}=s,{decay:$,velocity:E}=y;(r||o)&&(y.velocity=0),t.config&&!b&&dS(y,Ir(t.config,i),t.config!==a.config?Ir(a.config,i):void 0);let v=Vn(this);if(!v||me.und(f))return n(Pn(this,!0));const w=me.und(t.reset)?o&&!t.default:!me.und(d)&&Go(t.reset,i),T=w?d:this.get(),I=mi(f),D=me.num(I)||me.arr(I)||Es(I),A=!b&&(!D||Go(a.immediate||t.immediate,i));if(p){const R=Yc(f);if(R!==v.constructor)if(A)v=this._set(I);else throw Error(`Cannot animate between ${v.constructor.name} and ${R.name}, as the "to" prop suggests`)}const F=v.constructor;let k=Sn(f),B=!1;if(!k){const R=w||!ic(this)&&m;(p||R)&&(B=qn(mi(T),I),k=!B),(!qn(s.immediate,A)&&!A||!qn(y.decay,$)||!qn(y.velocity,E))&&(k=!0)}if(B&&ir(this)&&(s.changed&&!w?k=!0:k||this._stop(c)),!b&&((k||Sn(c))&&(s.values=v.getPayload(),s.toValues=Sn(f)?null:F==vi?[1]:gn(I)),s.immediate!=A&&(s.immediate=A,!A&&!w&&this._set(c)),k)){const{onRest:R}=s;Je(mS,h=>sp(this,t,h));const x=Pn(this,Do(this,c));Ho(this._pendingCalls,x),this._pendingCalls.add(n),s.changed&&He.batchedUpdates(()=>{var h;s.changed=!w,R==null||R(x,this),w?Ir(a.onRest,x):(h=s.onStart)==null||h.call(s,x,this)})}w&&this._set(T),b?n(dm(t.to,t,this._state,this)):k?this._start():ir(this)&&!p?this._pendingCalls.add(n):n(lm(T))}_focus(e){const t=this.animation;e!==t.to&&(qf(this)&&this._detach(),t.to=e,qf(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Sn(t)&&(xo(t,this),Xc(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Sn(e)&&pi(e,this)}_set(e,t=!0){const n=sn(e);if(!me.und(n)){const r=Vn(this);if(!r||!qn(n,r.getValue())){const o=Yc(n);!r||r.constructor!=o?Ju(this,o.create(n)):r.setValue(n),r&&He.batchedUpdates(()=>{this._onChange(n,t)})}}return Vn(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,No(this,"onStart",Pn(this,Do(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ir(this.animation.onChange,e,this)),Ir(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Vn(this).reset(sn(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ir(this)||(op(this,!0),Ao(this)||this._resume())}_resume(){Nn.skipAnimation?this.finish():ys.start(this)}_stop(e,t){if(ir(this)){op(this,!1);const n=this.animation;Je(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),fi(this,{type:"idle",parent:this});const r=t?so(this.get()):Pn(this.get(),Do(this,e??n.to));Ho(this._pendingCalls,r),n.changed&&(n.changed=!1,No(this,"onRest",r,this))}}};function Do(e,t){const n=mi(t),r=mi(e.get());return qn(r,n)}function pm(e,t=e.loop,n=e.to){const r=Ir(t);if(r){const o=r!==!0&&sm(r),i=(o||e).reverse,a=!o||o.reset;return yi({...e,loop:t,default:!1,pause:void 0,to:!i||Kc(n)?n:void 0,from:a?e.from:void 0,reset:a,...o})}}function yi(e){const{to:t,from:n}=e=sm(e),r=new Set;return me.obj(t)&&ap(t,r),me.obj(n)&&ap(n,r),e.keys=r.size?Array.from(r):null,e}function vS(e){const t=yi(e);return me.und(t.default)&&(t.default=el(t)),t}function ap(e,t){Hn(e,(n,r)=>n!=null&&t.add(r))}var mS=["onStart","onRest","onChange","onPause","onResume"];function sp(e,t,n){e.animation[n]=t[n]!==am(t,n)?im(t[n],e.key):void 0}function No(e,t,...n){var r,o,i,a;(o=(r=e.animation)[t])==null||o.call(r,...n),(a=(i=e.defaultProps)[t])==null||a.call(i,...n)}var gS=["onStart","onChange","onRest"],yS=1,bS=class{constructor(t,n){this.id=yS++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),n&&(this._flush=n),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((n,r)=>t[r]=n.get()),t}set(t){for(const n in t){const r=t[n];me.und(r)||this.springs[n].set(r)}}update(t){return t&&this.queue.push(yi(t)),this}start(t){let{queue:n}=this;return t?n=gn(t).map(yi):this.queue=[],this._flush?this._flush(this,n):(ym(this,n),Qc(this,n))}stop(t,n){if(t!==!!t&&(n=t),n){const r=this.springs;Je(gn(n),o=>r[o].stop(!!t))}else gi(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(me.und(t))this.start({pause:!0});else{const n=this.springs;Je(gn(t),r=>n[r].pause())}return this}resume(t){if(me.und(t))this.start({pause:!1});else{const n=this.springs;Je(gn(t),r=>n[r].resume())}return this}each(t){Hn(this.springs,t)}_onFrame(){const{onStart:t,onChange:n,onRest:r}=this._events,o=this._active.size>0,i=this._changed.size>0;(o&&!this._started||i&&!this._started)&&(this._started=!0,qo(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));const a=!o&&this._started,s=i||a&&r.size?this.get():null;i&&n.size&&qo(n,([c,u])=>{u.value=s,c(u,this,this._item)}),a&&(this._started=!1,qo(r,([c,u])=>{u.value=s,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;He.onFrame(this._onFrame)}};function Qc(e,t){return Promise.all(t.map(n=>hm(e,n))).then(n=>tl(e,n))}async function hm(e,t,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:c}=t,u=me.obj(t.default)&&t.default;a&&(t.loop=!1),o===!1&&(t.to=null),i===!1&&(t.from=null);const f=me.arr(o)||me.fun(o)?o:void 0;f?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Je(gS,y=>{const $=t[y];if(me.fun($)){const E=e._events[y];t[y]=({finished:v,cancelled:w})=>{const T=E.get($);T?(v||(T.finished=!1),w&&(T.cancelled=!0)):E.set($,{value:null,finished:v||!1,cancelled:w||!1})},u&&(u[y]=t[y])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Ho(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const m=(r||Object.keys(e.springs)).map(y=>e.springs[y].start(t)),p=t.cancel===!0||am(t,"cancel")===!0;(f||p&&d.asyncId)&&m.push(um(++e._lastAsyncId,{props:t,state:d,actions:{pause:zc,resume:zc,start(y,$){p?(gi(d,e._lastAsyncId),$(so(e))):(y.onRest=s,$(dm(f,y,d,e)))}}})),d.paused&&await new Promise(y=>{d.resumeQueue.add(y)});const b=tl(e,await Promise.all(m));if(a&&b.finished&&!(n&&b.noop)){const y=pm(t,a,o);if(y)return ym(e,[y]),hm(e,y,!0)}return c&&He.batchedUpdates(()=>c(b,e,e.item)),b}function cp(e,t){const n={...e.springs};return t&&Je(gn(t),r=>{me.und(r.keys)&&(r=yi(r)),me.obj(r.to)||(r={...r,to:void 0}),gm(n,r,o=>mm(o))}),vm(e,n),n}function vm(e,t){Hn(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,xo(n,e))})}function mm(e,t){const n=new hS;return n.key=e,t&&xo(n,t),n}function gm(e,t,n){t.keys&&Je(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function ym(e,t){Je(t,n=>{gm(e.springs,n,r=>mm(r,e))})}var Ss=({children:e,...t})=>{const n=l.useContext(Fa),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=q_(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=Fa;return Oe.createElement(i,{value:t},e)},Fa=wS(Ss,{});Ss.Provider=Fa.Provider;Ss.Consumer=Fa.Consumer;function wS(e,t){return Object.assign(e,Oe.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var ES=()=>{const e=[],t=function(r){Y_();const o=[];return Je(e,(i,a)=>{if(me.und(r))o.push(i.start());else{const s=n(r,i,a);s&&o.push(i.start(s))}}),o};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const o=e.indexOf(r);~o&&e.splice(o,1)},t.pause=function(){return Je(e,r=>r.pause(...arguments)),this},t.resume=function(){return Je(e,r=>r.resume(...arguments)),this},t.set=function(r){Je(e,(o,i)=>{const a=me.fun(r)?r(i,o):r;a&&o.set(a)})},t.start=function(r){const o=[];return Je(e,(i,a)=>{if(me.und(r))o.push(i.start());else{const s=this._getProps(r,i,a);s&&o.push(i.start(s))}}),o},t.stop=function(){return Je(e,r=>r.stop(...arguments)),this},t.update=function(r){return Je(e,(o,i)=>o.update(this._getProps(r,o,i))),this};const n=function(r,o,i){return me.fun(r)?r(i,o):r};return t._getProps=n,t};function xS(e,t,n){const r=me.fun(t)&&t;r&&!n&&(n=[]);const o=l.useMemo(()=>r||arguments.length==3?ES():void 0,[]),i=l.useRef(0),a=tm(),s=l.useMemo(()=>({ctrls:[],queue:[],flush(E,v){const w=cp(E,v);return i.current>0&&!s.queue.length&&!Object.keys(w).some(I=>!E.springs[I])?Qc(E,v):new Promise(I=>{vm(E,w),s.queue.push(()=>{I(Qc(E,v))}),a()})}}),[]),c=l.useRef([...s.ctrls]),u=[],f=Gf(e)||0;l.useMemo(()=>{Je(c.current.slice(e,f),E=>{cS(E,o),E.stop(!0)}),c.current.length=e,d(f,e)},[e]),l.useMemo(()=>{d(0,Math.min(f,e))},n);function d(E,v){for(let w=E;w<v;w++){const T=c.current[w]||(c.current[w]=new bS(null,s.flush)),I=r?r(w,T):t[w];I&&(u[w]=vS(I))}}const m=c.current.map((E,v)=>cp(E,u[v])),p=l.useContext(Ss),b=Gf(p),y=p!==b&&sS(p);Qu(()=>{i.current++,s.ctrls=c.current;const{queue:E}=s;E.length&&(s.queue=[],Je(E,v=>v())),Je(c.current,(v,w)=>{o==null||o.add(v),y&&v.start({default:p});const T=u[w];T&&(uS(v,T.ref),v.ref?v.queue.push(T):v.start(T))})}),nm(()=>()=>{Je(s.ctrls,E=>E.stop(!0))});const $=m.map(E=>({...E}));return o?[$,o]:$}function _S(e,t){const n=me.fun(e),[[r],o]=xS(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,o]:r}var bm=class extends nl{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=li(...t);const n=this._get(),r=Yc(n);Ju(this,r.create(n))}advance(e){const t=this._get(),n=this.get();qn(t,n)||(Vn(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&up(this._active)&&ac(this)}_get(){const e=me.arr(this.source)?this.source.map(sn):gn(sn(this.source));return this.calc(...e)}_start(){this.idle&&!up(this._active)&&(this.idle=!1,Je(xs(this),e=>{e.done=!1}),Nn.skipAnimation?(He.batchedUpdates(()=>this.advance()),ac(this)):ys.start(this))}_attach(){let e=1;Je(gn(this.source),t=>{Sn(t)&&xo(t,this),Xc(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Je(gn(this.source),e=>{Sn(e)&&pi(e,this)}),this._active.clear(),ac(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=gn(this.source).reduce((t,n)=>Math.max(t,(Xc(n)?n.priority:0)+1),0))}};function SS(e){return e.idle!==!1}function up(e){return!e.size||Array.from(e).every(SS)}function ac(e){e.idle||(e.idle=!0,Je(xs(e),t=>{t.done=!0}),fi(e,{type:"idle",parent:e}))}var Jr=(e,...t)=>new bm(e,t);Nn.assign({createStringInterpolator:Jv,to:(e,t)=>new bm(e,t)});var wm=/^--/;function CS(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!wm.test(e)&&!(Zo.hasOwnProperty(e)&&Zo[e])?t+"px":(""+t).trim()}var lp={};function $S(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:i,scrollLeft:a,viewBox:s,...c}=t,u=Object.values(c),f=Object.keys(c).map(d=>n||e.hasAttribute(d)?d:lp[d]||(lp[d]=d.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));o!==void 0&&(e.textContent=o);for(const d in r)if(r.hasOwnProperty(d)){const m=CS(d,r[d]);wm.test(d)?e.style.setProperty(d,m):e.style[d]=m}f.forEach((d,m)=>{e.setAttribute(d,u[m])}),i!==void 0&&(e.scrollTop=i),a!==void 0&&(e.scrollLeft=a),s!==void 0&&e.setAttribute("viewBox",s)}var Zo={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},TS=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),IS=["Webkit","Ms","Moz","O"];Zo=Object.keys(Zo).reduce((e,t)=>(IS.forEach(n=>e[TS(n,t)]=e[t]),e),Zo);var RS=/^(matrix|translate|scale|rotate|skew)/,OS=/^(translate)/,PS=/^(rotate|skew)/,sc=(e,t)=>me.num(e)&&e!==0?e+t:e,ya=(e,t)=>me.arr(e)?e.every(n=>ya(n,t)):me.num(e)?e===t:parseFloat(e)===t,AS=class extends _s{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push(a=>[`translate3d(${a.map(s=>sc(s,"px")).join(",")})`,ya(a,0)])),Hn(r,(a,s)=>{if(s==="transform")o.push([a||""]),i.push(c=>[c,c===""]);else if(RS.test(s)){if(delete r[s],me.und(a))return;const c=OS.test(s)?"px":PS.test(s)?"deg":"";o.push(gn(a)),i.push(s==="rotate3d"?([u,f,d,m])=>[`rotate3d(${u},${f},${d},${sc(m,c)})`,ya(m,0)]:u=>[`${s}(${u.map(f=>sc(f,c)).join(",")})`,ya(u,s.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new DS(o,i)),super(r)}},DS=class extends Gv{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Je(this.inputs,(n,r)=>{const o=sn(n[0]),[i,a]=this.transforms[r](me.arr(o)?o:n.map(sn));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){e==1&&Je(this.inputs,t=>Je(t,n=>Sn(n)&&xo(n,this)))}observerRemoved(e){e==0&&Je(this.inputs,t=>Je(t,n=>Sn(n)&&pi(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),fi(this,e)}},NS=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];Nn.assign({batchedUpdates:mn.unstable_batchedUpdates,createStringInterpolator:Jv,colors:__});var kS=nS(NS,{applyAnimatedValues:$S,createAnimatedStyle:e=>new AS(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),MS=kS.animated;function Jc(e,t){return e.map(function(n,r){return n+t[r]})}function rl(e,t){return e.map(function(n,r){return n-t[r]})}function eu(e){return Math.hypot.apply(Math,e)}function jS(e,t,n){var r=eu(t),o=r===0?0:1/r,i=n===0?0:1/n,a=i*r,s=t.map(function(f){return i*f}),c=t.map(function(f){return o*f}),u=eu(e);return{velocities:s,velocity:a,distance:u,direction:c}}function tu(e){return Math.sign?Math.sign(e):+(e>0)-+(e<0)||+e}function LS(e,t,n){return Math.max(t,Math.min(e,n))}function FS(e,t){return Math.pow(e,t*5)}function dp(e,t,n){return t===0||Math.abs(t)===1/0?FS(e,n):e*t*n/(t+n*e)}function Qo(e,t,n,r){return r===void 0&&(r=.15),r===0?LS(e,t,n):e<t?-dp(t-e,n-t,r)+t:e>n?+dp(e-n,n-t,r)+n:e}function fp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function VS(e,t,n){return t&&fp(e.prototype,t),n&&fp(e,n),e}function rn(){return rn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rn.apply(this,arguments)}function Em(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function BS(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Yn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HS(e,t){if(e){if(typeof e=="string")return pp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pp(e,t)}}function pp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cs(e,t){var n;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=HS(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
140
140
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=e[Symbol.iterator](),n.next.bind(n)}function xm(){}function _m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?xm:t.length===1?t[0]:function(){for(var r,o=Cs(t),i;!(i=o()).done;){var a=i.value;r=a.apply(this,arguments)||r}return r}}function ur(e,t){if(e===void 0){if(t===void 0)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function hp(e){if(typeof e=="function"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}else return e}function ol(e,t){e===void 0&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],s=i[1];switch(typeof s){case"function":n[a]=s.call(n,e[a],a,e);break;case"object":n[a]=ol(e[a],s);break;case"boolean":s&&(n[a]=e[a]);break}}return n}function WS(){try{return"constructor"in GestureEvent}catch{return!1}}function Sm(){return typeof window<"u"&&"ontouchstart"in window}function zS(){return typeof window<"u"&&"onpointerdown"in window}function Cm(e){return"pointerId"in e?null:e.type==="touchend"?e.changedTouches:e.targetTouches}function $m(e){return Array.from(Cm(e)).map(function(t){return t.identifier})}function vp(e){var t="buttons"in e?e.buttons:0,n=e.shiftKey,r=e.altKey,o=e.metaKey,i=e.ctrlKey;return{buttons:t,shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}}var US=function(t){return t};function mp(e,t){t===void 0&&(t=US);var n=Cm(e),r=n?n[0]:e,o=r.clientX,i=r.clientY;return t([o,i])}var YS=180,KS=.15,qS=.5,XS=50,GS=250,ZS={threshold:function(t){return t===void 0&&(t=0),ur(t)},rubberband:function(t){switch(t===void 0&&(t=0),t){case!0:return ur(KS);case!1:return ur(0);default:return ur(t)}},enabled:function(t){return t===void 0&&(t=!0),t},triggerAllEvents:function(t){return t===void 0&&(t=!1),t},initial:function(t){return t===void 0&&(t=0),typeof t=="function"?t:ur(t)},transform:!0},Tm=rn({},ZS,{axis:!0,lockDirection:function(t){return t===void 0&&(t=!1),t},bounds:function(t){if(t===void 0&&(t={}),typeof t=="function")return function(d){return Tm.bounds(t(d))};var n=t,r=n.left,o=r===void 0?-1/0:r,i=n.right,a=i===void 0?1/0:i,s=n.top,c=s===void 0?-1/0:s,u=n.bottom,f=u===void 0?1/0:u;return[[o,a],[c,f]]}}),QS=typeof window<"u"&&window.document&&window.document.createElement,JS={enabled:function(t){return t===void 0&&(t=!0),t},domTarget:!0,window:function(e){function t(n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return e===void 0&&(e=QS?window:void 0),e}),eventOptions:function(t){var n=t===void 0?{}:t,r=n.passive,o=r===void 0?!0:r,i=n.capture,a=i===void 0?!1:i;return{passive:o,capture:a}},transform:!0},eC=rn({},Tm,{useTouch:function(t){t===void 0&&(t=!1);var n=Sm(),r=zS();return!!(t&&n||n&&!r)},experimental_preventWindowScrollY:function(t){return t===void 0&&(t=!1),t},threshold:function(t,n,r){var o=r.filterTaps,i=o===void 0?!1:o,a=r.lockDirection,s=a===void 0?!1:a,c=r.axis,u=c===void 0?void 0:c,f=ur(t,i?3:s||u?1:0);return this.filterTaps=i,f},swipeVelocity:function(t){return t===void 0&&(t=qS),ur(t)},swipeDistance:function(t){return t===void 0&&(t=XS),ur(t)},swipeDuration:function(t){return t===void 0&&(t=GS),t},delay:function(t){switch(t===void 0&&(t=0),t){case!0:return YS;case!1:return 0;default:return t}}});function tC(e){return e===void 0&&(e={}),ol(e,JS)}function nC(e){return e===void 0&&(e={}),ol(e,eC)}function rC(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=BS(e,["domTarget","eventOptions","window","enabled"]),a=tC({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=nC(i),a}function ko(e){return rn({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_threshold:[0,0],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:xm,canceled:!1,memo:void 0,args:void 0},e)}function Im(){var e={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},t=ko({_pointerId:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),n=ko({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:e,drag:t,pinch:n,wheel:r,move:o,scroll:i}}var Tr=new Map,oC=function(t){return t},iC=function(){function e(n,r){var o=this;r===void 0&&(r=[]),this.controller=n,this.args=r,this.debounced=!0,this.setTimeout=function(i,a){var s;a===void 0&&(a=140),clearTimeout(o.controller.timeouts[o.stateKey]);for(var c=arguments.length,u=new Array(c>2?c-2:0),f=2;f<c;f++)u[f-2]=arguments[f];o.controller.timeouts[o.stateKey]=(s=window).setTimeout.apply(s,[i,a].concat(u))},this.clearTimeout=function(){clearTimeout(o.controller.timeouts[o.stateKey])},this.fireGestureHandler=function(i){if(i===void 0&&(i=!1),o.state._blocked)return o.debounced||(o.state._active=!1,o.clean()),null;if(!i&&!o.state.intentional&&!o.config.triggerAllEvents)return null;if(o.state.intentional){var a=o.state.active,s=o.state._active;o.state.active=s,o.state.first=s&&!a,o.state.last=a&&!s,o.controller.state.shared[o.ingKey]=s}var c=o.controller.pointerIds.size||o.controller.touchIds.size,u=o.controller.state.shared.buttons>0||c>0,f=rn({},o.controller.state.shared,o.state,o.mapStateValues(o.state),{locked:!!document.pointerLockElement,touches:c,down:u}),d=o.handler(f);return o.state.memo=d!==void 0?d:o.state.memo,f},this.controller=n,this.args=r}var t=e.prototype;return t.updateSharedState=function(r){Object.assign(this.controller.state.shared,r)},t.updateGestureState=function(r){Object.assign(this.state,r)},t.checkIntentionality=function(r,o){return{_intentional:r,_blocked:!1}},t.getMovement=function(r){var o=this.config.rubberband,i=this.state,a=i._bounds,s=i._initial,c=i._active,u=i._intentional,f=i.lastOffset,d=i.movement,m=i._threshold,p=this.getInternalMovement(r,this.state),b=u[0]===!1?gp(p[0],m[0]):u[0],y=u[1]===!1?gp(p[1],m[1]):u[1],$=this.checkIntentionality([b,y],p);if($._blocked)return rn({},$,{_movement:p,delta:[0,0]});var E=$._intentional,v=p,w=[E[0]!==!1?p[0]-E[0]:0,E[1]!==!1?p[1]-E[1]:0],T=Jc(w,f),I=c?o:[0,0];return w=yp(a,Jc(w,s),I),rn({},$,{intentional:E[0]!==!1||E[1]!==!1,_initial:s,_movement:v,movement:w,values:r,offset:yp(a,T,I),delta:rl(w,d)})},t.clean=function(){this.clearTimeout()},VS(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}},{key:"transform",get:function(){return this.config.transform||this.controller.config.transform||oC}}]),e}();function gp(e,t){return Math.abs(e)>=t?tu(e)*t:!1}function yp(e,t,n){var r=t[0],o=t[1],i=n[0],a=n[1],s=e[0],c=s[0],u=s[1],f=e[1],d=f[0],m=f[1];return[Qo(r,c,u,i),Qo(o,d,m,a)]}function cc(e,t,n){var r=e.state,o=t.timeStamp,i=t.type,a=r.values,s=n?0:o-r.startTime;return{_lastEventType:i,event:t,timeStamp:o,elapsedTime:s,previous:a}}function aC(e,t,n,r){var o=e.state,i=e.config,a=e.stateKey,s=e.args,c=e.transform,u=o.offset,f=n.timeStamp,d=i.initial,m=i.bounds,p=i.threshold,b=rl(c(p),c([0,0])).map(Math.abs),y=rn({},Im()[a],{_active:!0,args:s,values:t,initial:r??t,_threshold:b,offset:u,lastOffset:u,startTime:f});return rn({},y,{_initial:hp(d,y),_bounds:hp(m,y)})}var sC=function(t){var n=this;this.classes=t,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=Sm(),this.supportsGestureEvents=WS(),this.bind=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];for(var a={},s=Cs(n.classes),c;!(c=s()).done;){var u=c.value;new u(n,o).addBindings(a)}var f=function(p){Fn(a,p,function(b){return n.nativeRefs[p](rn({},n.state.shared,{event:b,args:o}))})};for(var d in n.nativeRefs)f(d);return n.config.domTarget?pC(n,a):hC(n,a)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=Om(n.config),o=n.config.eventOptions;r&&Oi(r,Rm(n.domListeners),o),Object.values(n.timeouts).forEach(clearTimeout),lC(n)},this.classes=t,this.state=Im(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function cC(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set($m(t))}function uC(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):$m(t).forEach(function(n){return e.touchIds.delete(n)})}function lC(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(n){for(var i in o){var a=o[i];Oi(n,a,r)}e.windowListeners={}}}function dC(e,t,n){var r=e.config,o=e.windowListeners;n===void 0&&(n=r.eventOptions),r.window&&(Oi(r.window,o[t],n),delete o[t])}function fC(e,t,n,r){var o=e.config,i=e.windowListeners;n===void 0&&(n=[]),r===void 0&&(r=o.eventOptions),o.window&&(Oi(o.window,i[t],r),Pm(o.window,i[t]=n,r))}function pC(e,t){var n=e.config,r=e.domListeners,o=Om(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;Oi(o,Rm(r),i);for(var a=0,s=Object.entries(t);a<s.length;a++){var c=s[a],u=c[0],f=c[1],d=u.slice(2).toLowerCase();r.push([d,_m.apply(void 0,f)])}Pm(o,r,i)}function hC(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,a=Object.entries(t);i<a.length;i++){var s=a[i],c=s[0],u=s[1],f=Array.isArray(u)?u:[u],d=c+o;r[d]=_m.apply(void 0,f)}return r}function Rm(e){return e===void 0&&(e=[]),e.splice(0,e.length)}function Om(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function Fn(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function Pm(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={});for(var r=Cs(t),o;!(o=r()).done;){var i=o.value,a=i[0],s=i[1];e.addEventListener(a,s,n)}}function Oi(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={});for(var r=Cs(t),o;!(o=r()).done;){var i=o.value,a=i[0],s=i[1];e.removeEventListener(a,s,n)}}function vC(e,t,n){n===void 0&&(n={});var r=gC(e),o=l.useMemo(function(){return new sC(r)},[]);return o.config=t,o.handlers=e,o.nativeRefs=n,l.useEffect(o.effect,[]),o.config.domTarget?mC:o.bind}function mC(){process.env.NODE_ENV==="development"&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}function gC(e){var t=new Set;return e.drag&&t.add(Tr.get("drag")),e.wheel&&t.add(Tr.get("wheel")),e.scroll&&t.add(Tr.get("scroll")),e.move&&t.add(Tr.get("move")),e.pinch&&t.add(Tr.get("pinch")),e.hover&&t.add(Tr.get("hover")),t}var yC=function(e){Em(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.getInternalMovement=function(o,i){return rl(o,i.initial)},n.checkIntentionality=function(o,i){if(o[0]===!1&&o[1]===!1)return{_intentional:o,axis:this.state.axis};var a=i.map(Math.abs),s=a[0],c=a[1],u=this.state.axis||(s>c?"x":s<c?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:o,_blocked:!1,axis:u}:u?this.config.axis&&u!==this.config.axis?{_intentional:o,_blocked:!0,axis:u}:(o[u==="x"?1:0]=!1,{_intentional:o,_blocked:!1,axis:u}):{_intentional:[!1,!1],_blocked:!1,axis:u}},n.getKinematics=function(o,i){var a=this.getMovement(o);if(!a._blocked){var s=i.timeStamp-this.state.timeStamp;Object.assign(a,jS(a.movement,a.delta,s))}return a},n.mapStateValues=function(o){return{xy:o.values,vxvy:o.velocities}},t}(iC),bC=3;function bp(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}var wC=function(e){Em(t,e);function t(){var r;return r=e.apply(this,arguments)||this,r.ingKey="dragging",r.stateKey="drag",r.setPointerCapture=function(o){if(!(r.config.useTouch||document.pointerLockElement)){var i=o.target,a=o.pointerId;i&&"setPointerCapture"in i&&i.setPointerCapture(a),r.updateGestureState({_dragTarget:i,_dragPointerId:a})}},r.releasePointerCapture=function(){if(!(r.config.useTouch||document.pointerLockElement)){var o=r.state,i=o._dragTarget,a=o._dragPointerId;if(a&&i&&"releasePointerCapture"in i&&(!("hasPointerCapture"in i)||i.hasPointerCapture(a)))try{i.releasePointerCapture(a)}catch{}}},r.preventScroll=function(o){r.state._dragPreventScroll&&o.cancelable&&o.preventDefault()},r.getEventId=function(o){return r.config.useTouch?o.changedTouches[0].identifier:o.pointerId},r.isValidEvent=function(o){return r.state._pointerId===r.getEventId(o)},r.shouldPreventWindowScrollY=r.config.experimental_preventWindowScrollY&&r.controller.supportsTouchEvents,r.setUpWindowScrollDetection=function(o){bp(o),fC(r.controller,r.stateKey,[["touchmove",r.preventScroll],["touchend",r.clean.bind(Yn(r))],["touchcancel",r.clean.bind(Yn(r))]],{passive:!1}),r.setTimeout(r.startDrag.bind(Yn(r)),250,o)},r.setUpDelayedDragTrigger=function(o){r.state._dragDelayed=!0,bp(o),r.setTimeout(r.startDrag.bind(Yn(r)),r.config.delay,o)},r.setStartState=function(o){var i=mp(o,r.transform);r.updateSharedState(vp(o)),r.updateGestureState(rn({},aC(Yn(r),i,o),cc(Yn(r),o,!0),{_pointerId:r.getEventId(o)})),r.updateGestureState(r.getMovement(i))},r.onDragStart=function(o){cC(r.controller,o),!(!r.enabled||r.state._active)&&(r.setStartState(o),r.setPointerCapture(o),r.shouldPreventWindowScrollY?r.setUpWindowScrollDetection(o):r.config.delay>0?r.setUpDelayedDragTrigger(o):r.startDrag(o,!0))},r.onDragChange=function(o){if(!(r.state.canceled||!r.state._active||!r.isValidEvent(o)||r.state._lastEventType===o.type&&o.timeStamp===r.state.timeStamp)){var i;if(document.pointerLockElement){var a=o.movementX,s=o.movementY;i=Jc(r.transform([a,s]),r.state.values)}else i=mp(o,r.transform);var c=r.getKinematics(i,o);if(!r.state._dragStarted){if(r.state._dragDelayed){r.startDrag(o);return}if(r.shouldPreventWindowScrollY)if(!r.state._dragPreventScroll&&c.axis)if(c.axis==="x")r.startDrag(o);else{r.state._active=!1;return}else return;else return}var u=vp(o);r.updateSharedState(u);var f=cc(Yn(r),o),d=eu(c._movement),m=r.state._dragIsTap;m&&d>=bC&&(m=!1),r.updateGestureState(rn({},f,c,{_dragIsTap:m})),r.fireGestureHandler()}},r.onDragEnd=function(o){if(uC(r.controller,o),!!r.isValidEvent(o)&&(r.clean(),!!r.state._active)){r.state._active=!1;var i=r.state._dragIsTap,a=r.state.velocities,s=a[0],c=a[1],u=r.state.movement,f=u[0],d=u[1],m=r.state._intentional,p=m[0],b=m[1],y=r.config.swipeVelocity,$=y[0],E=y[1],v=r.config.swipeDistance,w=v[0],T=v[1],I=r.config.swipeDuration,D=rn({},cc(Yn(r),o),r.getMovement(r.state.values)),A=[0,0];D.elapsedTime<I&&(p!==!1&&Math.abs(s)>$&&Math.abs(f)>w&&(A[0]=tu(s)),b!==!1&&Math.abs(c)>E&&Math.abs(d)>T&&(A[1]=tu(c))),r.updateSharedState({buttons:0}),r.updateGestureState(rn({},D,{tap:i,swipe:A})),r.fireGestureHandler(r.config.filterTaps&&i===!0)}},r.clean=function(){e.prototype.clean.call(Yn(r)),r.state._dragStarted=!1,r.releasePointerCapture(),dC(r.controller,r.stateKey)},r.onCancel=function(){r.state.canceled||(r.updateGestureState({canceled:!0,_active:!1}),r.updateSharedState({buttons:0}),setTimeout(function(){return r.fireGestureHandler()},0))},r.onClick=function(o){r.state._dragIsTap||o.stopPropagation()},r}var n=t.prototype;return n.startDrag=function(o,i){i===void 0&&(i=!1),!(!this.state._active||this.state._dragStarted)&&(i||this.setStartState(o),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearTimeout(),this.fireGestureHandler())},n.addBindings=function(o){if(this.config.useTouch?(Fn(o,"onTouchStart",this.onDragStart),Fn(o,"onTouchMove",this.onDragChange),Fn(o,"onTouchEnd",this.onDragEnd),Fn(o,"onTouchCancel",this.onDragEnd)):(Fn(o,"onPointerDown",this.onDragStart),Fn(o,"onPointerMove",this.onDragChange),Fn(o,"onPointerUp",this.onDragEnd),Fn(o,"onPointerCancel",this.onDragEnd)),this.config.filterTaps){var i=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Fn(o,i,this.onClick)}},t}(yC);function EC(e,t){var n,r=[],o,i=!1;function a(){for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];return i&&n===this&&t(c,r)||(o=e.apply(this,c),i=!0,n=this,r=c),o}return a}function ba(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,o;if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ba(e[r],t[r]))return!1;return!0}var i;if(typeof Map=="function"&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!ba(r.value[1],t.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(typeof Element<"u"&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!(o[r]==="_owner"&&e.$$typeof)&&!ba(e[o[r]],t[o[r]]))return!1;return!0}return e!==e&&t!==t}function xC(e,t){try{return ba(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}function _C(e,t){t===void 0&&(t={}),Tr.set("drag",wC);var n=l.useRef();return n.current||(n.current=EC(rC,xC)),vC({drag:e},n.current(t))}var SC=Ke({defaultClassName:"aglyib0",variantClassNames:{variant:{small:"aglyib1",large:"aglyib2"}},defaultVariants:{},compoundVariants:[]});const Wr=l.forwardRef(({as:e,children:t,className:n,style:r,isDisabled:o,variant:i,...a},s)=>{const c=e||"button",u=i==="large"?16:8;return M.jsx(c,{ref:s,as:e,"data-test-id":a["data-test-id"],className:$e(SC({variant:i}),n),disabled:o,style:r,...a,children:M.jsx(rt,{display:"inline-flex",children:M.jsx(Eu,{size:u,color:o?Pt.theme.colors.grey1:Pt.theme.colors.black})})})});Wr.displayName="Button";Wr.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,variant:"large"};const Am=l.forwardRef(({header:e,onBack:t,onClose:n,showBack:r,showClose:o,title:i,bind:a,hasHandleBar:s,style:c},u)=>e!==!1?l.createElement(rt,{...c?{style:c}:{},key:"header","data-rsbs-header":!0,"data-rsbs-header-handle-bar":s,ref:u,...s?a==null?void 0:a():{}},e||M.jsxs(Bt,{alignItems:"center",justifyContent:"space-between",pt:s?"$16":"$8",pb:"$8",gap:"$16",children:[M.jsxs(Bt,{alignItems:"center",gap:"$16",children:[r&&M.jsx(_0,{cursor:"pointer",onClick:t,size:18,color:Pt.theme.colors.grey1,"data-test-id":"vds-BS-back-btn"}),i&&M.jsx(Xt,{fontWeight:"$bold",textStyle:"subtitle2",m:"$0",children:i})]}),o&&M.jsx(Wr,{variant:"large",onClick:n,"data-test-id":"vds-BS-close-btn"})]})):M.jsx(rt,{"data-rsbs-header":!0,ref:u,...a==null?void 0:a()},"header"));Am.defaultProps={title:void 0,header:void 0,showBack:void 0,showClose:!0,hasHandleBar:!0,bind:void 0,onBack:void 0,onClose:void 0,style:void 0};function CC({targetRef:e,enabled:t}){const n=l.useRef({activate:()=>{throw new TypeError("Tried to activate aria hider too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){n.current.deactivate(),n.current={activate:()=>{},deactivate:()=>{}};return}const r=e.current;let o=!1,i=[],a=[];n.current={activate:()=>{if(o)return;o=!0;const{parentNode:s}=r;document.querySelectorAll("body > *").forEach(c=>{if(c===s)return;const u=c.getAttribute("aria-hidden");u!==null&&u!=="false"||(i.push(u),a.push(c),c.setAttribute("aria-hidden","true"))})},deactivate:()=>{o&&(o=!1,a.forEach((s,c)=>{const u=i[c];u===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",u)}),i=[],a=[])}}},[e,t]),n}/*!
|
|
@@ -143,7 +143,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
143
143
|
*/var Dm=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Va=Dm.join(","),Nm=typeof Element>"u",Fr=Nm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ba=!Nm&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Ha=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},$C=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},km=function(t,n,r){if(Ha(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Va));return n&&Fr.call(t,Va)&&o.unshift(t),o=o.filter(r),o},Mm=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ha(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,u=e(c,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else{var f=Fr.call(a,Va);f&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!Ha(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&m){var p=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},jm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Rr=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||$C(t))&&!jm(t)?0:t.tabIndex},TC=function(t,n){var r=Rr(t);return r<0&&n&&!jm(t)?0:r},IC=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Lm=function(t){return t.tagName==="INPUT"},RC=function(t){return Lm(t)&&t.type==="hidden"},OC=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},PC=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},AC=function(t){if(!t.name)return!0;var n=t.form||Ba(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=PC(o,t.form);return!i||i===t},DC=function(t){return Lm(t)&&t.type==="radio"},NC=function(t){return DC(t)&&!AC(t)},kC=function(t){var n,r=t&&Ba(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var u,f,d;r=Ba(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((f=o)!==null&&f!==void 0&&(d=f.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},wp=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},MC=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Fr.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Fr.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,u=Ba(t);if(c&&!c.shadowRoot&&o(c)===!0)return wp(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=s}if(kC(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return wp(t);return!1},jC=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Fr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Wa=function(t,n){return!(n.disabled||Ha(n)||RC(n)||MC(n,t)||OC(n)||jC(n))},nu=function(t,n){return!(NC(n)||Rr(n)<0||!Wa(t,n))},LC=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},FC=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=TC(s,a),u=a?e(o.candidates):s;c===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:u})}),r.sort(IC).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},VC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Mm([t],n.includeContainer,{filter:nu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:LC}):r=km(t,n.includeContainer,nu.bind(null,n)),FC(r)},BC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Mm([t],n.includeContainer,{filter:Wa.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=km(t,n.includeContainer,Wa.bind(null,n)),r},eo=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Fr.call(t,Va)===!1?!1:nu(n,t)},HC=Dm.concat("iframe").join(","),uc=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Fr.call(t,HC)===!1?!1:Wa(n,t)};/*!
|
|
144
144
|
* focus-trap 7.5.2
|
|
145
145
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
146
|
-
*/function Ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ep(Object(n),!0).forEach(function(r){WC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ep(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WC(e,t,n){return t=UC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zC(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UC(e){var t=zC(e,"string");return typeof t=="symbol"?t:String(t)}var _p={activateTrap:function(t,n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var o=t.indexOf(n);o===-1||t.splice(o,1),t.push(n)},deactivateTrap:function(t,n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}},YC=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},KC=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},Jo=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},qC=function(t){return Jo(t)&&!t.shiftKey},XC=function(t){return Jo(t)&&t.shiftKey},Sp=function(t){return setTimeout(t,0)},Cp=function(t,n){var r=-1;return t.every(function(o,i){return n(o)?(r=i,!1):!0}),r},Mo=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,r):t},na=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},GC=[],ZC=function(t,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||GC,i=xp({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:qC,isKeyBackward:XC},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(R,x,h){return R&&R[x]!==void 0?R[x]:i[h||x]},u=function(R,x){var h=typeof(x==null?void 0:x.composedPath)=="function"?x.composedPath():void 0;return a.containerGroups.findIndex(function(C){var P=C.container,j=C.tabbableNodes;return P.contains(R)||(h==null?void 0:h.includes(P))||j.find(function(H){return H===R})})},f=function(R){var x=i[R];if(typeof x=="function"){for(var h=arguments.length,C=new Array(h>1?h-1:0),P=1;P<h;P++)C[P-1]=arguments[P];x=x.apply(void 0,C)}if(x===!0&&(x=void 0),!x){if(x===void 0||x===!1)return x;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var j=x;if(typeof x=="string"&&(j=r.querySelector(x),!j))throw new Error("`".concat(R,"` as selector refers to no known node"));return j},d=function(){var R=f("initialFocus");if(R===!1)return!1;if(R===void 0||!uc(R,i.tabbableOptions))if(u(r.activeElement)>=0)R=r.activeElement;else{var x=a.tabbableGroups[0],h=x&&x.firstTabbableNode;R=h||f("fallbackFocus")}if(!R)throw new Error("Your focus-trap needs to have at least one focusable element");return R},m=function(){if(a.containerGroups=a.containers.map(function(R){var x=VC(R,i.tabbableOptions),h=BC(R,i.tabbableOptions),C=x.length>0?x[0]:void 0,P=x.length>0?x[x.length-1]:void 0,j=h.find(function(re){return eo(re)}),H=h.slice().reverse().find(function(re){return eo(re)}),U=!!x.find(function(re){return Rr(re)>0});return{container:R,tabbableNodes:x,focusableNodes:h,posTabIndexesFound:U,firstTabbableNode:C,lastTabbableNode:P,firstDomTabbableNode:j,lastDomTabbableNode:H,nextTabbableNode:function(W){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,J=x.indexOf(W);return J<0?L?h.slice(h.indexOf(W)+1).find(function(Y){return eo(Y)}):h.slice(0,h.indexOf(W)).reverse().find(function(Y){return eo(Y)}):x[J+(L?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(R){return R.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!f("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(R){return R.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},p=function B(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){B(d());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,YC(R)&&R.select()}},b=function(R){var x=f("setReturnFocus",R);return x||(x===!1?!1:R)},y=function(R){var x=R.target,h=R.event,C=R.isBackward,P=C===void 0?!1:C;x=x||na(h),m();var j=null;if(a.tabbableGroups.length>0){var H=u(x,h),U=H>=0?a.containerGroups[H]:void 0;if(H<0)P?j=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:j=a.tabbableGroups[0].firstTabbableNode;else if(P){var re=Cp(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return x===ce});if(re<0&&(U.container===x||uc(x,i.tabbableOptions)&&!eo(x,i.tabbableOptions)&&!U.nextTabbableNode(x,!1))&&(re=H),re>=0){var W=re===0?a.tabbableGroups.length-1:re-1,L=a.tabbableGroups[W];j=Rr(x)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(h)||(j=U.nextTabbableNode(x,!1))}else{var J=Cp(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return x===ce});if(J<0&&(U.container===x||uc(x,i.tabbableOptions)&&!eo(x,i.tabbableOptions)&&!U.nextTabbableNode(x))&&(J=H),J>=0){var Y=J===a.tabbableGroups.length-1?0:J+1,K=a.tabbableGroups[Y];j=Rr(x)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else Jo(h)||(j=U.nextTabbableNode(x))}}else j=f("fallbackFocus");return j},$=function(R){var x=na(R);if(!(u(x,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},E=function(R){var x=na(R),h=u(x,R)>=0;if(h||x instanceof Document)h&&(a.mostRecentlyFocusedNode=x);else{R.stopImmediatePropagation();var C,P=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var j=u(a.mostRecentlyFocusedNode),H=a.containerGroups[j].tabbableNodes;if(H.length>0){var U=H.findIndex(function(re){return re===a.mostRecentlyFocusedNode});U>=0&&(i.isKeyForward(a.recentNavEvent)?U+1<H.length&&(C=H[U+1],P=!1):U-1>=0&&(C=H[U-1],P=!1))}}else a.containerGroups.some(function(re){return re.tabbableNodes.some(function(W){return Rr(W)>0})})||(P=!1);else P=!1;P&&(C=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),p(C||a.mostRecentlyFocusedNode||d())}a.recentNavEvent=void 0},v=function(R){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var h=y({event:R,isBackward:x});h&&(Jo(R)&&R.preventDefault(),p(h))},w=function(R){if(KC(R)&&Mo(i.escapeDeactivates,R)!==!1){R.preventDefault(),s.deactivate();return}(i.isKeyForward(R)||i.isKeyBackward(R))&&v(R,i.isKeyBackward(R))},T=function(R){var x=na(R);u(x,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return _p.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?Sp(function(){p(d())}):p(d()),r.addEventListener("focusin",E,!0),r.addEventListener("mousedown",$,{capture:!0,passive:!1}),r.addEventListener("touchstart",$,{capture:!0,passive:!1}),r.addEventListener("click",T,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},D=function(){if(a.active)return r.removeEventListener("focusin",E,!0),r.removeEventListener("mousedown",$,!0),r.removeEventListener("touchstart",$,!0),r.removeEventListener("click",T,!0),r.removeEventListener("keydown",w,!0),s},A=function(R){var x=R.some(function(h){var C=Array.from(h.removedNodes);return C.some(function(P){return P===a.mostRecentlyFocusedNode})});x&&p(d())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(A):void 0,k=function(){F&&(F.disconnect(),a.active&&!a.paused&&a.containers.map(function(R){F.observe(R,{subtree:!0,childList:!0})}))};return s={get active(){return a.active},get paused(){return a.paused},activate:function(R){if(a.active)return this;var x=c(R,"onActivate"),h=c(R,"onPostActivate"),C=c(R,"checkCanFocusTrap");C||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,x==null||x();var P=function(){C&&m(),I(),k(),h==null||h()};return C?(C(a.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(R){if(!a.active)return this;var x=xp({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},R);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,D(),a.active=!1,a.paused=!1,k(),_p.deactivateTrap(o,s);var h=c(x,"onDeactivate"),C=c(x,"onPostDeactivate"),P=c(x,"checkCanReturnFocus"),j=c(x,"returnFocus","returnFocusOnDeactivate");h==null||h();var H=function(){Sp(function(){j&&p(b(a.nodeFocusedBeforeActivation)),C==null||C()})};return j&&P?(P(b(a.nodeFocusedBeforeActivation)).then(H,H),this):(H(),this)},pause:function(R){if(a.paused||!a.active)return this;var x=c(R,"onPause"),h=c(R,"onPostPause");return a.paused=!0,x==null||x(),D(),k(),h==null||h(),this},unpause:function(R){if(!a.paused||!a.active)return this;var x=c(R,"onUnpause"),h=c(R,"onPostUnpause");return a.paused=!1,x==null||x(),m(),I(),k(),h==null||h(),this},updateContainerElements:function(R){var x=[].concat(R).filter(Boolean);return a.containers=x.map(function(h){return typeof h=="string"?r.querySelector(h):h}),a.active&&m(),k(),this}},s.updateContainerElements(t),s};function QC({targetRef:e,fallbackRef:t,initialFocusRef:n,enabled:r}){const o=l.useRef({activate:()=>{throw new TypeError("Tried to activate focus trap too early")},deactivate:()=>{}});return l.useDebugValue(r?"Enabled":"Disabled"),l.useEffect(()=>{if(!r){o.current.deactivate(),o.current={activate:()=>{},deactivate:()=>{}};return}const i=t.current,a=ZC(e.current,{onActivate:process.env.NODE_ENV!=="production"?()=>{console.log("focus activate")}:void 0,initialFocus:n?()=>(n==null?void 0:n.current)||i:void 0,fallbackFocus:i,escapeDeactivates:!1,clickOutsideDeactivates:!1});let s=!1;o.current={activate:async()=>{s||(s=!0,await a.activate(),await new Promise(c=>setTimeout(()=>c(1),0)))},deactivate:()=>{s&&(s=!1,a.deactivate())}}},[r,t,n,e]),o}const bi=typeof window<"u"?l.useLayoutEffect:l.useEffect;function JC(){const[e,t]=l.useState(!1),[n,r]=l.useState({}),o=l.useCallback(i=>(console.count(`registerReady:${i}`),r(a=>({...a,[i]:!1})),()=>{console.count(`setReady:${i}`),r(a=>({...a,[i]:!0}))}),[]);return l.useEffect(()=>{const i=Object.values(n);if(i.length===0){console.log("nope nothing registered yet");return}const a=i.every(Boolean);console.log("check if we are rready",n,a),a&&(console.warn("ready!"),t(!0))},[n]),{ready:e,registerReady:o}}function e$(){const e=l.useMemo(()=>typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,[]),t=l.useRef(e==null?void 0:e.matches);return l.useDebugValue(t.current?"reduce":"no-preference"),l.useEffect(()=>{const n=r=>{t.current=r.matches};return e==null||e.addListener(n),()=>e==null?void 0:e.removeListener(n)},[e]),t}function t$(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var il=!1;if(typeof window<"u"){var $p={get passive(){il=!0}};window.addEventListener("testPassive",null,$p),window.removeEventListener("testPassive",null,$p)}var Fm=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),fr=[],za=!1,Vm=-1,ei=void 0,ti=void 0,Bm=function(t){return fr.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Ua=function(t){var n=t||window.event;return Bm(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},n$=function(t){if(ti===void 0){var n=!!t&&t.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(ti=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}ei===void 0&&(ei=document.body.style.overflow,document.body.style.overflow="hidden")},r$=function(){ti!==void 0&&(document.body.style.paddingRight=ti,ti=void 0),ei!==void 0&&(document.body.style.overflow=ei,ei=void 0)},o$=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},i$=function(t,n){var r=t.targetTouches[0].clientY-Vm;return Bm(t.target)?!1:n&&n.scrollTop===0&&r>0||o$(n)&&r<0?Ua(t):(t.stopPropagation(),!0)},a$=function(t,n){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!fr.some(function(o){return o.targetElement===t})){var r={targetElement:t,options:n||{}};fr=[].concat(t$(fr),[r]),Fm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Vm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&i$(o,t)},za||(document.addEventListener("touchmove",Ua,il?{passive:!1}:void 0),za=!0)):n$(n)}},s$=function(t){if(!t){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}fr=fr.filter(function(n){return n.targetElement!==t}),Fm?(t.ontouchstart=null,t.ontouchmove=null,za&&fr.length===0&&(document.removeEventListener("touchmove",Ua,il?{passive:!1}:void 0),za=!1)):fr.length||r$()};function c$({targetRef:e,enabled:t,reserveScrollBarGap:n}){const r=l.useRef({activate:()=>{throw new TypeError("Tried to activate scroll lock too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){r.current.deactivate(),r.current={activate:()=>{},deactivate:()=>{}};return}const o=e.current;let i=!1;r.current={activate:()=>{i||(i=!0,a$(o,{allowTouchMove:a=>a.closest("[data-body-scroll-lock-ignore]"),reserveScrollBarGap:n}))},deactivate:()=>{i&&(i=!1,s$(o))}}},[t,e,n]),r}var Dr=[],u$=function(){return Dr.some(function(e){return e.activeTargets.length>0})},l$=function(){return Dr.some(function(e){return e.skippedTargets.length>0})},Tp="ResizeObserver loop completed with undelivered notifications.",d$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Tp}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Tp),window.dispatchEvent(e)},wi;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(wi||(wi={}));var Nr=function(e){return Object.freeze(e)},f$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Nr(this)}return e}(),Hm=function(){function e(t,n,r,o){return this.x=t,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Nr(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,o=t.top,i=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:n,y:r,top:o,right:i,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),al=function(e){return e instanceof SVGElement&&"getBBox"in e},Wm=function(e){if(al(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Ip=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},p$=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ni=typeof window<"u"?window:{},ra=new WeakMap,Rp=/auto|scroll/,h$=/^tb|vertical/,v$=/msie|trident/i.test(ni.navigator&&ni.navigator.userAgent),Ln=function(e){return parseFloat(e||"0")},co=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new f$((n?t:e)||0,(n?e:t)||0)},Op=Nr({devicePixelContentBoxSize:co(),borderBoxSize:co(),contentBoxSize:co(),contentRect:new Hm(0,0,0,0)}),zm=function(e,t){if(t===void 0&&(t=!1),ra.has(e)&&!t)return ra.get(e);if(Wm(e))return ra.set(e,Op),Op;var n=getComputedStyle(e),r=al(e)&&e.ownerSVGElement&&e.getBBox(),o=!v$&&n.boxSizing==="border-box",i=h$.test(n.writingMode||""),a=!r&&Rp.test(n.overflowY||""),s=!r&&Rp.test(n.overflowX||""),c=r?0:Ln(n.paddingTop),u=r?0:Ln(n.paddingRight),f=r?0:Ln(n.paddingBottom),d=r?0:Ln(n.paddingLeft),m=r?0:Ln(n.borderTopWidth),p=r?0:Ln(n.borderRightWidth),b=r?0:Ln(n.borderBottomWidth),y=r?0:Ln(n.borderLeftWidth),$=d+u,E=c+f,v=y+p,w=m+b,T=s?e.offsetHeight-w-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?$+v:0,A=o?E+w:0,F=r?r.width:Ln(n.width)-D-I,k=r?r.height:Ln(n.height)-A-T,B=F+$+I+v,R=k+E+T+w,x=Nr({devicePixelContentBoxSize:co(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:co(B,R,i),contentBoxSize:co(F,k,i),contentRect:new Hm(d,c,F,k)});return ra.set(e,x),x},Um=function(e,t,n){var r=zm(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case wi.DEVICE_PIXEL_CONTENT_BOX:return a;case wi.BORDER_BOX:return o;default:return i}},m$=function(){function e(t){var n=zm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Nr([n.borderBoxSize]),this.contentBoxSize=Nr([n.contentBoxSize]),this.devicePixelContentBoxSize=Nr([n.devicePixelContentBoxSize])}return e}(),Ym=function(e){if(Wm(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},g$=function(){var e=1/0,t=[];Dr.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var f=new m$(u.target),d=Ym(u.target);s.push(f),u.lastReportedSize=Um(u.target,u.observedBox),d<e&&(e=d)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var o=r[n];o()}return e},Pp=function(e){Dr.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(Ym(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},y$=function(){var e=0;for(Pp(e);u$();)e=g$(),Pp(e);return l$()&&d$(),e>0},lc,Km=[],b$=function(){return Km.splice(0).forEach(function(e){return e()})},w$=function(e){if(!lc){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return b$()}).observe(n,r),lc=function(){n.textContent="".concat(t?t--:t++)}}Km.push(e),lc()},E$=function(e){w$(function(){requestAnimationFrame(e)})},wa=0,x$=function(){return!!wa},_$=250,S$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ap=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Dp=function(e){return e===void 0&&(e=0),Date.now()+e},dc=!1,C$=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=_$),!dc){dc=!0;var r=Dp(t);E$(function(){var o=!1;try{o=y$()}finally{if(dc=!1,t=r-Dp(),!x$())return;o?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,S$)};document.body?n():ni.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ap.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ap.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ru=new C$,Np=function(e){!wa&&e>0&&ru.start(),wa+=e,!wa&&ru.stop()},$$=function(e){return!al(e)&&!p$(e)&&getComputedStyle(e).display==="inline"},T$=function(){function e(t,n){this.target=t,this.observedBox=n||wi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Um(this.target,this.observedBox,!0);return $$(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),I$=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),oa=new WeakMap,kp=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},ia=function(){function e(){}return e.connect=function(t,n){var r=new I$(t,n);oa.set(t,r)},e.observe=function(t,n,r){var o=oa.get(t),i=o.observationTargets.length===0;kp(o.observationTargets,n)<0&&(i&&Dr.push(o),o.observationTargets.push(new T$(n,r&&r.box)),Np(1),ru.schedule())},e.unobserve=function(t,n){var r=oa.get(t),o=kp(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Dr.splice(Dr.indexOf(r),1),r.observationTargets.splice(o,1),Np(-1))},e.disconnect=function(t){var n=this,r=oa.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),R$=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ia.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ip(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ia.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ip(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ia.unobserve(this,t)},e.prototype.disconnect=function(){ia.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Wo(e,t,n){return e=+e,t=+t,n=+n,t=t===t?t:0,n=n===n?n:0,e===e&&(e=e<=n?e:n,e=e>=t?e:t),e}function Ya(e){const t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}function O$(e,t){const r=[].concat(e).map(Ya).reduce((s,c)=>(s.add(Wo(c,0,t)),s),new Set),o=Array.from(r),i=Math.min(...o);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");const a=Math.max(...o);if(Number.isNaN(a))throw new TypeError("maxSnap is NaN");return{snapPoints:o,minSnap:i,maxSnap:a}}const P$=process.env.NODE_ENV==="development"&&typeof window<"u"?window.location.search==="?debug":!1,A$={box:"border-box"};function fc(e,{label:t,enabled:n,resizeSourceRef:r}){const[o,i]=l.useState(0);l.useDebugValue(`${t}: ${o}`);const a=l.useCallback(s=>{i(s[0].borderBoxSize[0].blockSize),r.current="element"},[r]);return bi(()=>{if(!e.current||!n)return;const s=new R$(a);return s.observe(e.current,A$),()=>s.disconnect()},[e,a,n]),n?o:0}function D$(e,t,n){const r=l.useMemo(()=>t("maxHeight"),[t]),o=window.innerHeight*.75,[i,a]=l.useState(()=>Ya(e)||typeof window<"u"?o:0),s=i>0,c=l.useRef(0);return l.useDebugValue(e?"controlled":"auto"),l.useEffect(()=>{s&&r()},[s,r]),bi(()=>{if(e){a(Ya(e)),n.current="maxheightprop";return}const u=()=>{c.current||(c.current=requestAnimationFrame(()=>{a(o),n.current="window",c.current=0}))};return window.addEventListener("resize",u),a(o),n.current="window",r(),()=>{window.removeEventListener("resize",u),cancelAnimationFrame(c.current)}},[e,r,n,o]),i}function N$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:o,headerRef:i,registerReady:a,resizeSourceRef:s,conditions:c}){const u=l.useMemo(()=>a("contentHeight"),[a]),f=D$(t,a,s),d=fc(i,{label:"headerHeight",enabled:o,resizeSourceRef:s}),m=fc(e,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),p=fc(r,{label:"footerHeight",enabled:n,resizeSourceRef:s}),b=c!=null&&c.hasPaddingY?16:0,y=c!=null&&c.hasHeader?0:20,$=c!=null&&c.hasCustomHeader?16:0,E=Math.min(f-d-p,m+b)+(d+y+$)+p;l.useDebugValue(`minHeight: ${E}`);const v=m>0;return l.useEffect(()=>{v&&u()},[v,u]),{maxHeight:f,minHeight:E,headerHeight:d,footerHeight:p}}function k$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,getSnapPoints:o,headerEnabled:i,headerRef:a,heightRef:s,lastSnapRef:c,ready:u,registerReady:f,resizeSourceRef:d,conditions:m}){const{maxHeight:p,minHeight:b,headerHeight:y,footerHeight:$}=N$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:f,resizeSourceRef:d,conditions:m}),{snapPoints:E,minSnap:v,maxSnap:w}=O$(u?o({height:s.current,footerHeight:$,headerHeight:y,minHeight:b,maxHeight:p}):[0],p);function T(I){let D;typeof I=="function"?D=I({footerHeight:$,headerHeight:y,height:s.current,minHeight:b,maxHeight:p,snapPoints:E,lastSnap:c.current}):D=I;const A=Ya(D);return E.reduce((F,k)=>Math.abs(k-A)<Math.abs(F-A)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${w}`),{minSnap:v,maxSnap:w,findSnap:T,maxHeight:p}}function M$(){return _S(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function j$({spring:e}){const t=Jr([e.y,e.maxHeight],(s,c)=>`${Math.round(Wo(c-s,0,16))}px`),n=Jr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>`${Wo(s,c,u)}px`),r=Jr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>s<c?`${c-s}px`:s>u?`${u-s}px`:"0px"),o=Jr([e.y,e.maxSnap],(s,c)=>s>=c?Math.ceil(s-c):0),i=Jr([e.y,e.minSnap],(s,c)=>{if(!c)return 0;const u=Math.max(c/2-45,0),f=Math.min(c/2+45,c),d=0,p=(1-d)/(f-u),b=(s-u)*(p+d);return Wo(b,0,1)}),a=Jr([e.y,e.minSnap],(s,c)=>c?Wo(s/c,0,1):0);return{"--rsbs-content-opacity":i,"--rsbs-backdrop-opacity":a,"--rsbs-antigap-scale-y":o,"--rsbs-overlay-translate-y":r,"--rsbs-overlay-rounded":t,"--rsbs-overlay-h":n}}function qt(e=1e3){return new Promise(t=>setTimeout(t,e))}const L$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},Mp={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},jp={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},F$=({initialState:e})=>e==="OPEN",V$=({initialState:e})=>e==="CLOSED",B$=r_({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:{...Mp,...jp}}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:{...Mp,...jp}}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{...L$},onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[o_({y:(e,{payload:{y:t}})=>t,velocity:(e,{payload:{velocity:t}})=>t,snapSource:(e,{payload:{source:t="custom"}})=>t})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapCancel:(e,t)=>{console.log("onSnapCancel",{context:e,event:t})},onResizeCancel:(e,t)=>{console.log("onResizeCancel",{context:e,event:t})},onCloseCancel:(e,t)=>{console.log("onCloseCancel",{context:e,event:t})},onOpenEnd:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapEnd:(e,t)=>{console.log("onSnapEnd",{context:e,event:t})},onRezizeEnd:(e,t)=>{console.log("onRezizeEnd",{context:e,event:t})}},services:{onSnapStart:async()=>{await qt()},onOpenStart:async()=>{await qt()},onCloseStart:async()=>{await qt()},onResizeStart:async()=>{await qt()},onSnapEnd:async()=>{await qt()},onOpenEnd:async()=>{await qt()},onCloseEnd:async()=>{await qt()},onResizeEnd:async()=>{await qt()},renderVisuallyHidden:async(e,t)=>{console.group("renderVisuallyHidden"),console.log({context:e,event:t}),await qt(),console.groupEnd()},activate:async(e,t)=>{console.group("activate"),console.log({context:e,event:t}),await qt(),console.groupEnd()},deactivate:async(e,t)=>{console.group("deactivate"),console.log({context:e,event:t}),await qt(),console.groupEnd()},openSmoothly:async(e,t)=>{console.group("openSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()},openImmediately:async(e,t)=>{console.group("openImmediately"),console.log({context:e,event:t}),await qt(),console.groupEnd()},snapSmoothly:async(e,t)=>{console.group("snapSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()},resizeSmoothly:async(e,t)=>{console.group("resizeSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()},closeSmoothly:async(e,t)=>{console.group("closeSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()}},guards:{initiallyClosed:V$,initiallyOpen:F$}}),{tension:H$,friction:aa}=cm.default,W$=["closed","opening","open","closing","dragging","snapping","resizing"];function z$({snapPoints:e,lastSnap:t}){return t??Math.min(...e)}function U$({minHeight:e}){return e}const Y$=l.forwardRef(function({children:t,sibling:n,className:r,footer:o,header:i,isOpen:a,initialState:s,lastSnapRef:c,initialFocusRef:u,onClose:f,maxHeight:d,defaultSnap:m=z$,snapPoints:p=U$,blocking:b=!0,scrollLocking:y=!0,style:$,onSpringStart:E,onSpringCancel:v,onSpringEnd:w,reserveScrollBarGap:T=b,expandOnContentDrag:I=!1,title:D,showClose:A,showBack:F,onBack:k,onCloseWhenClickOutside:B=!0,hasHandleBar:R=!0,"data-test-id":x,padding:h,styles:C,refs:P,...j},H){const{ready:U,registerReady:re}=JC(),W=l.useRef(!1),L=l.useRef(E),J=l.useRef(v),Y=l.useRef(w);l.useEffect(()=>{L.current=E,J.current=v,Y.current=w},[v,E,w]);const[K,Z]=M$(),ce=l.useRef(null),z=l.useRef(null),G=l.useRef(null),oe=l.useRef(null),ne=l.useRef(null),ie=l.useRef(null);l.useImperativeHandle(P==null?void 0:P.body,()=>z.current),l.useImperativeHandle(P==null?void 0:P.content,()=>G.current),l.useImperativeHandle(P==null?void 0:P.header,()=>oe.current),l.useImperativeHandle(P==null?void 0:P.footer,()=>ne.current),l.useImperativeHandle(P==null?void 0:P.overlay,()=>ie.current);const ee=l.useRef(0),pe=l.useRef(),xe=l.useRef(!1),Ee=e$(),{x:Ae="default",y:Ie="default"}=h??{},Le=Ae==="default",ke=Ie==="default",at=c$({targetRef:z,enabled:U&&y,reserveScrollBarGap:T}),We=CC({targetRef:ce,enabled:U&&b}),Et=QC({targetRef:ce,fallbackRef:ie,initialFocusRef:u||void 0,enabled:U&&b&&u!==!1}),{minSnap:Xe,maxSnap:At,maxHeight:Te,findSnap:$t}=k$({contentRef:G,controlledMaxHeight:d,footerEnabled:!!o,footerRef:ne,getSnapPoints:p,headerEnabled:i!==!1,headerRef:oe,heightRef:ee,lastSnapRef:c,ready:U,registerReady:re,resizeSourceRef:pe,conditions:{hasPaddingY:ke,hasHeader:i!==!1,hasCustomHeader:!!i}}),Ge=l.useRef(Te),Tt=l.useRef(Xe),et=l.useRef(At),Dt=l.useRef($t),De=l.useRef(0);bi(()=>{Ge.current=Te,et.current=At,Tt.current=Xe,Dt.current=$t,De.current=$t(m)},[$t,m,Te,At,Xe]);const tt=l.useCallback(({onRest:ve,config:{velocity:ze=1,...Ct}={},..._t})=>new Promise(Qt=>Z({..._t,config:{velocity:ze,...Ct,mass:1,tension:H$,friction:Math.max(aa,aa+(aa-aa*ze))},onRest:(...Jt)=>{Qt(...Jt),ve==null||ve(...Jt)}})),[Z]),[Zt,Lt]=h_(B$,{devTools:P$,actions:{onOpenCancel:l.useCallback(()=>{var ve;return(ve=J.current)==null?void 0:ve.call(J,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(ve=>{var ze;return(ze=J.current)==null?void 0:ze.call(J,{type:"SNAP",source:ve.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var ve;return(ve=J.current)==null?void 0:ve.call(J,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var ve;return(ve=J.current)==null?void 0:ve.call(J,{type:"RESIZE",source:pe.current})},[]),onOpenEnd:l.useCallback(()=>{var ve;return(ve=Y.current)==null?void 0:ve.call(Y,{type:"OPEN"})},[]),onSnapEnd:l.useCallback(ve=>{var ze;return(ze=Y.current)==null?void 0:ze.call(Y,{type:"SNAP",source:ve.snapSource})},[]),onResizeEnd:l.useCallback(()=>{var ve;return(ve=Y.current)==null?void 0:ve.call(Y,{type:"RESIZE",source:pe.current})},[])},context:{initialState:s},services:{onSnapStart:l.useCallback(async(ve,ze)=>{var Ct;return(Ct=L.current)==null?void 0:Ct.call(L,{type:"SNAP",source:ze.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var ve;return(ve=L.current)==null?void 0:ve.call(L,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var ve;return(ve=L.current)==null?void 0:ve.call(L,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var ve;return(ve=L.current)==null?void 0:ve.call(L,{type:"RESIZE",source:pe.current})},[]),onSnapEnd:l.useCallback(async ve=>{var ze;return(ze=Y.current)==null?void 0:ze.call(Y,{type:"SNAP",source:ve.snapSource})},[]),onOpenEnd:l.useCallback(async()=>{var ve;return(ve=Y.current)==null?void 0:ve.call(Y,{type:"OPEN"})},[]),onCloseEnd:l.useCallback(async()=>{var ve;return(ve=Y.current)==null?void 0:ve.call(Y,{type:"CLOSE"})},[]),onResizeEnd:l.useCallback(async()=>{var ve;return(ve=Y.current)==null?void 0:ve.call(Y,{type:"RESIZE",source:pe.current})},[]),renderVisuallyHidden:l.useCallback(async()=>{await tt({y:De.current,ready:0,maxHeight:Ge.current,maxSnap:et.current,minSnap:De.current,immediate:!0})},[tt]),activate:l.useCallback(async()=>{W.current=!0,await Promise.all([at.current.activate(),Et.current.activate(),We.current.activate()])},[We,Et,at]),deactivate:l.useCallback(async()=>{at.current.deactivate(),Et.current.deactivate(),We.current.deactivate(),W.current=!1},[We,Et,at]),openImmediately:l.useCallback(async()=>{ee.current=De.current,await tt({y:De.current,ready:1,maxHeight:Ge.current,maxSnap:et.current,minSnap:De.current,immediate:!0})},[tt]),openSmoothly:l.useCallback(async()=>{await tt({y:0,ready:1,maxHeight:Ge.current,maxSnap:et.current,minSnap:De.current,immediate:!0}),ee.current=De.current,await tt({y:De.current,ready:1,maxHeight:Ge.current,maxSnap:et.current,minSnap:De.current,immediate:Ee.current})},[tt,Ee]),snapSmoothly:l.useCallback(async ve=>{const ze=Dt.current(ve.y);ee.current=ze,c.current=ze,await tt({y:ze,ready:1,maxHeight:Ge.current,maxSnap:et.current,minSnap:Tt.current,immediate:Ee.current,config:{velocity:ve.velocity}})},[tt,c,Ee]),resizeSmoothly:l.useCallback(async()=>{const ve=Dt.current(ee.current);ee.current=ve,c.current=ve,await tt({y:ve,ready:1,maxHeight:Ge.current,maxSnap:et.current,minSnap:Tt.current,immediate:pe.current==="element"?Ee.current:!0})},[tt,c,Ee]),closeSmoothly:l.useCallback(async()=>{tt({minSnap:ee.current,immediate:!0}),ee.current=0,await tt({y:0,maxHeight:Ge.current,maxSnap:et.current,immediate:Ee.current}),await tt({ready:0,immediate:!0})},[tt,Ee])}});l.useEffect(()=>{U&&Lt(a?"OPEN":"CLOSE")},[a,Lt,U]),bi(()=>{(Te||At||Xe)&&Lt("RESIZE")},[Te,At,Xe,Lt]),l.useEffect(()=>()=>{at.current.deactivate(),Et.current.deactivate(),We.current.deactivate()},[We,Et,at]),l.useImperativeHandle(H,()=>({snapTo:(ve,{velocity:ze=1,source:Ct="custom"}={})=>{Lt("SNAP",{payload:{y:Dt.current(ve),velocity:ze,source:Ct}})},get height(){return ee.current}}),[Lt]),l.useEffect(()=>{const ve=z.current,ze=_t=>{xe.current&&_t.preventDefault()},Ct=_t=>{ve&&ve.scrollTop<0&&(requestAnimationFrame(()=>{ve.style.overflow="hidden",ve.scrollTop=0,ve.style.removeProperty("overflow")}),_t.preventDefault())};return I&&(ve==null||ve.addEventListener("scroll",ze),ve==null||ve.addEventListener("touchmove",ze),ve==null||ve.addEventListener("touchstart",Ct)),()=>{ve==null||ve.removeEventListener("scroll",ze),ve==null||ve.removeEventListener("touchmove",ze),ve==null||ve.removeEventListener("touchstart",Ct)}},[I,z]);const wn=_C(({args:[{closeOnTap:ve=!1,isContentDragging:ze=!1}={}]=[],cancel:Ct,direction:[,_t],down:Qt,first:Jt,last:kn,memo:an=K.y.get(),movement:[,Mn],tap:Rn,velocity:en})=>{const tn=Mn*-1;if(!W.current)return Ct(),an;if(f&&ve&&Rn)return Ct(),setTimeout(()=>f(),0),an;if(Rn)return an;const nn=an+tn,En=tn*en,fn=Math.max(Tt.current,Math.min(et.current,nn+En*2));if(!Qt&&f&&_t>0&&nn+En<Tt.current/2)return Ct(),f(),an;let Wt=Qt?!f&&Tt.current===et.current?nn<Tt.current?Qo(nn,Tt.current,et.current*2,.55):Qo(nn,Tt.current/2,et.current,.55):Qo(nn,f?0:Tt.current,et.current,.55):fn;return I&&ze?(Wt>=et.current&&(Wt=et.current),an===et.current&&z.current&&z.current.scrollTop>0&&(Wt=et.current),xe.current=Wt<et.current):xe.current=!1,Jt&&Lt("DRAG"),kn?(Lt("SNAP",{payload:{y:Wt,velocity:en>.05?en:1,source:"dragging"}}),an):(Z({y:Wt,ready:1,maxHeight:Ge.current,maxSnap:et.current,minSnap:Tt.current,immediate:!0,config:{velocity:en}}),an)},{filterTaps:!0});if(Number.isNaN(et.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(Tt.current))throw new TypeError("minSnapRef is NaN!!");const dn=j$({spring:K});return M.jsxs(MS.div,{...j,"data-rsbs-root":!0,"data-rsbs-state":W$.find(Zt.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!f,"data-rsbs-has-header":!!i,"data-rsbs-has-footer":!!o,className:r,ref:ce,style:{...dn,...$,opacity:K.ready},"data-test-id":x,children:[n,b&&M.jsx(rt,{"data-rsbs-backdrop":!0,...B?wn({closeOnTap:B}):{}},"backdrop"),l.createElement(rt,{...C!=null&&C.overlay?{style:C.overlay}:{},"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Le,"data-rsbs-overlay-has-padding-y":ke,"data-test-id":"CT-BottomSheet-Overlay",key:"overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:ie,onKeyDown:ve=>{ve.key==="Escape"&&(ve.stopPropagation(),f&&f())}},M.jsx(Am,{ref:oe,title:D,header:i,showBack:F,showClose:A,bind:wn,hasHandleBar:R,onBack:k,onClose:f,style:C==null?void 0:C.header}),l.createElement(rt,{...C!=null&&C.body?{style:C.body}:{},key:"scroll","data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Le,"data-rsbs-scroll-has-padding-y":ke,ref:z,...I?wn({isContentDragging:!0}):{}},M.jsx(rt,{...C!=null&&C.content?{style:C.content}:{},"data-rsbs-content":!0,ref:G,children:t})),o&&l.createElement(rt,{...C!=null&&C.footer?{style:C.footer}:{},key:"footer",ref:ne,"data-rsbs-footer":!0,...wn()},o))]})}),K$=l.forwardRef(function({onSpringStart:t,onSpringEnd:n,skipInitialTransition:r,...o},i){const[a,s]=l.useState(!1),c=l.useRef(),u=l.useRef(null),f=l.useRef(r&&o.isOpen?"OPEN":"CLOSED");bi(()=>o.isOpen?(cancelAnimationFrame(c.current),s(!0),()=>{f.current="CLOSED"}):()=>{f.current="CLOSED"},[o.isOpen]);const d=l.useCallback(async function(b){await(t==null?void 0:t(b)),b.type==="OPEN"&&cancelAnimationFrame(c.current)},[t]),m=l.useCallback(async function(b){await(n==null?void 0:n(b)),b.type==="CLOSE"&&(c.current=requestAnimationFrame(()=>s(!1)))},[n]);return a?M.jsx(_v,{"data-rsbs-portal":!0,children:M.jsx(Y$,{...o,lastSnapRef:u,ref:i,initialState:f.current,onSpringStart:d,onSpringEnd:m})}):null}),_o=({size:e,color:t="inherit",thickness:n=3,...r})=>M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",xmlSpace:"preserve",width:e,height:e,...r,children:M.jsx("path",{fill:t,stroke:t,strokeWidth:n,d:"M73 50c0-12.7-10.3-23-23-23S27 37.3 27 50m3.9 0c0-10.5 8.5-19.1 19.1-19.1S69.1 39.5 69.1 50",children:M.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})})});_o.displayName="Spinner";_o.defaultProps={size:24,thickness:3};const q$=({value:e,delay:t=500})=>{const[n,r]=l.useState(e);return l.useEffect(()=>{const o=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(o)}},[JSON.stringify(e),t]),n},X$=q$;process.env.NODE_ENV;var G$=Ke({defaultClassName:"_920fuu5",variantClassNames:{colorScheme:{primary:"_920fuu6",neutral:"_920fuu7",danger:"_920fuu8",warning:"_920fuu9",info:"_920fuua"},variant:{solid:"_920fuub",outline:"_920fuuc",ghost:"_920fuud"},size:{small:"_920fuue",medium:"_920fuuf",large:"_920fuug"},unstyled:{true:"_920fuuh"},isFluid:{true:"_920fuui"}},defaultVariants:{size:"medium",variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_920fuuj"],[{colorScheme:"neutral",variant:"outline"},"_920fuuk"],[{colorScheme:"danger",variant:"outline"},"_920fuul"],[{colorScheme:"warning",variant:"outline"},"_920fuum"],[{colorScheme:"info",variant:"outline"},"_920fuun"],[{size:"small",variant:"outline"},"_920fuuo"],[{size:"large",variant:"outline"},"_920fuup"]]}),Z$={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},Q$={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},Lp={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var J$="p9dczu0";const sl=({ref:e,colorScheme:t="primary"})=>{const[n,r]=l.useState([]),o=X$({value:n,delay:1e3});return l.useEffect(()=>{if(e.current){const i=e.current,a=s=>{const c=i.getBoundingClientRect(),u=s.clientX-c.left,f=s.clientY-c.top,d=i.clientHeight,m=i.clientWidth,p=Math.max(m,d);r([...n,{top:f-p/2,left:u-p/2,height:Math.max(m,d),width:Math.max(m,d),backgroundColor:t==="primary"?Pt.theme.colors.primary:Z$[t]}])};return i.addEventListener("click",a),()=>{i.removeEventListener("click",a)}}return()=>!1},[e,n]),l.useEffect(()=>{o.length&&r([])},[o.length]),n==null?void 0:n.map((i,a)=>M.jsx("span",{className:J$,style:{...i}},a))},mo=l.forwardRef(({as:e,children:t,className:n,colorScheme:r,size:o,isLoading:i,variant:a,style:s,isDisabled:c,isFluid:u,unstyled:f,noRipple:d,...m},p)=>{const b=l.useRef(null),y=sl({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(p,()=>b.current);const $=e||"button";return M.jsx($,{ref:b,as:e,"data-test-id":m["data-test-id"],className:$e(G$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:f}),a==="ghost"?Q$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?M.jsx(_o,{color:a==="outline"||a==="ghost"?Lp[r||"primary"]:Lp.white}):M.jsxs(M.Fragment,{children:[t,!d&&y]})})});mo.displayName="Button";mo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const qm="Checkbox",[eT,LP]=bn(qm),[tT,nT]=eT(qm),rT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...f}=e,[d,m]=l.useState(null),p=ut(t,w=>m(w)),b=l.useRef(!1),y=d?!!d.closest("form"):!0,[$=!1,E]=Tn({prop:o,defaultProp:i,onChange:u}),v=l.useRef($);return l.useEffect(()=>{const w=d==null?void 0:d.form;if(w){const T=()=>E(v.current);return w.addEventListener("reset",T),()=>w.removeEventListener("reset",T)}},[d,E]),l.createElement(tT,{scope:n,state:$,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"checkbox","aria-checked":kr($)?"mixed":$,"aria-required":a,"data-state":Xm($),"data-disabled":s?"":void 0,disabled:s,value:c},f,{ref:p,onKeyDown:Ne(e.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ne(e.onClick,w=>{E(T=>kr(T)?!0:!T),y&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})})),y&&l.createElement(aT,{control:d,bubbles:!b.current,name:r,value:c,checked:$,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),oT="CheckboxIndicator",iT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=nT(oT,n);return l.createElement(yr,{present:r||kr(i.state)||i.state===!0},l.createElement(Ue.span,ae({"data-state":Xm(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),aT=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=cs(n),s=as(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});c.indeterminate=kr(n),d.call(c,kr(n)?!1:n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:kr(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function kr(e){return e==="indeterminate"}function Xm(e){return kr(e)?"indeterminate":e?"checked":"unchecked"}const sT=rT,cT=iT;var uT="glci2q0",Fp="glci2q3",lT="glci2q4",Vp={disabled:"glci2q1",enabled:"glci2q2"},dT=Ke({defaultClassName:"glci2q5",variantClassNames:{checked:{true:"glci2q6",false:"glci2q7",indeterminate:"glci2q8"},disabled:{true:"glci2q9"}},defaultVariants:{checked:!1,disabled:!1},compoundVariants:[[{checked:!1,disabled:!0},"glci2qa"]]});const Gm=l.forwardRef(({children:e,"data-test-id":t,checked:n=!1,onCheckedChange:r,disabled:o,value:i,...a},s)=>{const c=`vds-checkbox-${l.useId()}`,[u,f]=l.useState(n);return l.useEffect(()=>{f(n)},[n]),M.jsxs("div",{className:uT,children:[M.jsx(sT,{id:c,disabled:o,"data-test-id":t,ref:s,value:u?"on":"off",checked:u,className:dT({checked:u,disabled:o}),onCheckedChange:d=>{typeof d=="boolean"&&(r?r(d):f(d))},...a,children:M.jsxs(cT,{className:lT,children:[u==="indeterminate"&&M.jsx(k0,{color:"white",className:Fp}),u===!0&&M.jsx(wu,{color:"white",className:Fp})]})}),e&&M.jsx("label",{htmlFor:c,className:o?Vp.disabled:Vp.enabled,children:e})]})});Gm.defaultProps={"data-test-id":"base"};const fT=e=>l.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var pT=Ke({defaultClassName:"_10le3lp0",variantClassNames:{variant:{filled:"_10le3lp1",outline:"_10le3lp2"},size:{small:"_10le3lp3",medium:"_10le3lp4"},isActive:{true:"_10le3lp5"}},defaultVariants:{variant:"filled",isActive:!1,size:"medium"},compoundVariants:[[{variant:"outline",isActive:!0},"_10le3lp6"],[{variant:"filled",isActive:!0},"_10le3lp7"]]});const cl=l.forwardRef(({as:e,children:t,variant:n,isActive:r,prefixIcon:o,withCloseButton:i,className:a,disabled:s,style:c,onClose:u,size:f,...d},m)=>{const p=e||"button";return M.jsxs(p,{ref:m,as:e,"data-test-id":d["data-test-id"],className:$e(pT({variant:n,isActive:r,size:f}),a),disabled:s,style:c,...d,children:[o&&o,M.jsx(Xt,{textAlign:"left",textStyle:f==="small"?"caption":"body2",children:t}),i&&M.jsx(Wr,{as:"div","data-test-id":"chips-close-button",variant:"small",isDisabled:s,onClick:u})]})});cl.defaultProps={as:"button",children:void 0,isActive:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0,onClose:void 0};cl.displayName="Chip";const Zm="Dialog",[Qm,FP]=bn(Zm),[hT,wr]=Qm(Zm),vT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=l.useRef(null),c=l.useRef(null),[u=!1,f]=Tn({prop:r,defaultProp:o,onChange:i});return l.createElement(hT,{scope:t,triggerRef:s,contentRef:c,contentId:Gn(),titleId:Gn(),descriptionId:Gn(),open:u,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(d=>!d),[f]),modal:a},n)},mT="DialogTrigger",gT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(mT,n),i=ut(t,o.triggerRef);return l.createElement(Ue.button,ae({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ul(o.open)},r,{ref:i,onClick:Ne(e.onClick,o.onOpenToggle)}))}),yT="DialogPortal",[VP,Jm]=Qm(yT,{forceMount:void 0}),ou="DialogOverlay",bT=l.forwardRef((e,t)=>{const n=Jm(ou,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(ou,e.__scopeDialog);return i.modal?l.createElement(yr,{present:r||i.open},l.createElement(wT,ae({},o,{ref:t}))):null}),wT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(ou,n);return l.createElement(dv,{as:lo,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(Ue.div,ae({"data-state":ul(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Ei="DialogContent",ET=l.forwardRef((e,t)=>{const n=Jm(Ei,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(Ei,e.__scopeDialog);return l.createElement(yr,{present:r||i.open},i.modal?l.createElement(xT,ae({},o,{ref:t})):l.createElement(_T,ae({},o,{ref:t})))}),xT=l.forwardRef((e,t)=>{const n=wr(Ei,e.__scopeDialog),r=l.useRef(null),o=ut(t,n.contentRef,r);return l.useEffect(()=>{const i=r.current;if(i)return nv(i)},[]),l.createElement(eg,ae({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ne(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ne(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ne(e.onFocusOutside,i=>i.preventDefault())}))}),_T=l.forwardRef((e,t)=>{const n=wr(Ei,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return l.createElement(eg,ae({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),eg=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=wr(Ei,n),c=l.useRef(null),u=ut(t,c);return Nh(),l.createElement(l.Fragment,null,l.createElement(kh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},l.createElement(rs,ae({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ul(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),ST="DialogClose",CT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(ST,n);return l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ne(e.onClick,()=>o.onOpenChange(!1))}))});function ul(e){return e?"open":"closed"}const $T=vT,TT=gT,IT=bT,RT=ET,OT=CT;var PT="_1jc0z8o4",AT="_1jc0z8o0",DT=Ke({defaultClassName:"_1jc0z8o7",variantClassNames:{size:{full:"_1jc0z8o8",small:"_1jc0z8o9",medium:"_1jc0z8oa",large:"_1jc0z8ob"},noPadding:{true:"_1jc0z8oc"},colorScheme:{primary:"_1jc0z8od",neutral:"_1jc0z8oe",danger:"_1jc0z8of",warning:"_1jc0z8og",info:"_1jc0z8oh",white:"_1jc0z8oi"}},defaultVariants:{size:"medium",noPadding:!1,colorScheme:"white"},compoundVariants:[]}),NT="_1jc0z8o1",kT=Ke({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),MT=Ke({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const tg=l.forwardRef(({children:e,className:t,"data-test-id":n,...r},o)=>M.jsx(RT,{"data-test-id":n,className:t,ref:o,...r,children:e}));tg.defaultProps={"data-test-id":void 0};const jT=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(IT,{className:t,ref:r,...n,children:e})),LT=({children:e,className:t,...n})=>M.jsx(hs,{className:t,...n,children:e}),FT=({children:e,...t})=>M.jsx($T,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(TT,{className:t,...n,ref:r,children:e}));const Pi=l.forwardRef(({children:e,"data-test-id":t,isOpen:n,onClose:r,size:o,destroyOnClose:i,noPadding:a,colorScheme:s,closeOnOverlayClick:c,closeIcon:u,classNameBody:f,isCloseWhenEscape:d,...m},p)=>!n&&i?null:M.jsx(FT,{open:n,onOpenChange:r,children:M.jsxs(LT,{children:[M.jsx(jT,{className:$e(MT())}),M.jsxs(tg,{"data-test-id":t,onInteractOutside:b=>!c&&b.preventDefault(),className:$e(DT({colorScheme:s,size:o,noPadding:a}),f),...m,onEscapeKeyDown:b=>d?r==null?void 0:r():b.preventDefault(),ref:p,children:[r&&!u&&M.jsx(OT,{asChild:!0,"aria-label":"Close",children:M.jsx(Wr,{className:PT,"data-test-id":"close-modal"})}),r&&u&&u,e]})]})}));Pi.displayName="Modal";Pi.defaultProps={children:void 0,"data-test-id":void 0,size:"medium",onClose:void 0,destroyOnClose:!1,noPadding:!1,colorScheme:"white",closeOnOverlayClick:!0,closeIcon:void 0,classNameBody:void 0,isCloseWhenEscape:!0,onOpenAutoFocus:void 0,onCloseAutoFocus:void 0};const $s=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,ref:o,className:AT,...r,children:t})});$s.displayName="modalBody";$s.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Ts=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,className:NT,ref:o,...r,children:t})});Ts.displayName="modalFooter";Ts.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Is=l.forwardRef(({as:e,bold:t,children:n,"data-test-id":r,...o},i)=>{const a=e||"div";return M.jsx(a,{"data-test-id":r,as:e,ref:i,className:kT({bold:t}),...o,children:M.jsx(Xt,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Is.displayName="modalHeader";Is.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};var VT="ayjm8u0";const ll=({isOpen:e,onConfirm:t,onCancel:n,message:r,title:o,confirmTestId:i,isLoading:a,confirmText:s="Confirm",cancelText:c="Cancel",closeOnOverlayClick:u,size:f,classNameBody:d,actionDirection:m})=>M.jsxs(Pi,{classNameBody:d,size:f,isOpen:e,closeOnOverlayClick:u,onClose:n,closeIcon:M.jsx(rt,{display:"none"}),children:[M.jsx(Is,{children:o}),M.jsx($s,{children:M.jsx(Xt,{mt:"$8",mb:"$24",color:"$blackTypoMedium",textStyle:"body2",className:VT,children:r})}),M.jsx(Ts,{style:{maxHeight:"none"},children:M.jsxs(Bt,{gap:"$16",justifyContent:"space-between",flexWrap:m==="horizontal"?"nowrap":"wrap",children:[M.jsx(mo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),M.jsx(mo,{"data-test-id":i,onClick:t,isLoading:a,isFluid:!0,children:s})]})})]});ll.defaultProps={message:void 0,cancelText:void 0,confirmText:void 0,confirmTestId:void 0,isLoading:void 0,closeOnOverlayClick:!0,size:"small",classNameBody:void 0,actionDirection:"horizontal"};const dl=l.createContext({}),BT=({children:e})=>{const[t,n]=l.useState(!1),[r,o]=l.useState(void 0),i=()=>{n(!1),o(void 0)},a=()=>{i(),r!=null&&r.actionCallback(!0)},s=()=>{i(),r!=null&&r.actionCallback(!1)},c=l.useMemo(()=>({openDialog:({...f})=>{n(!0),o(f)}}),[n,o]);return M.jsxs(dl.Provider,{value:c,children:[M.jsx(ll,{isOpen:t,title:(r==null?void 0:r.title)??"",onConfirm:a,onCancel:s,...r}),e]})},HT=()=>{const{openDialog:e}=l.useContext(dl);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}};var WT=Ke({defaultClassName:"_1nya5n80",variantClassNames:{variant:{medium:"_1nya5n81",thin:"_1nya5n82"}},defaultVariants:{variant:"thin"},compoundVariants:[]});const{sizesAtoms:zT}=Pt.atoms,fl=l.forwardRef(({children:e,as:t,variant:n,className:r,style:o,width:i,...a},s)=>{const c=t||"div",{className:u}=zT({width:i??"$full",...a});return M.jsx(c,{ref:s,"data-test-id":a["data-test-id"],className:$e(WT({variant:n}),u,r),style:o,...a,children:e})});fl.defaultProps={variant:"thin",as:"div",children:void 0,"data-test-id":void 0};fl.displayName="Divider";const pl=({children:e,isDisabled:t,className:n})=>M.jsx("div",{className:$e(IE({isDisabled:t}),n),children:e});pl.displayName="ActionIcon";pl.defaultProps={isDisabled:!1,className:void 0};const Ai=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o,className:i},a)=>M.jsxs("label",{ref:a,className:$e(ME({state:Au({isError:e,isDisabled:t}),isTextarea:r}),i),children:[o,n&&"*"]}));Ai.displayName="Label";Ai.defaultProps={isTextarea:!1,className:""};const hl=l.forwardRef(({value:e,type:t,label:n,onClear:r,onBlur:o,isLoading:i,icon:a,isClearable:s=!0,required:c,containerStyles:u,inputAreaClassName:f,onClickIcon:d,...m},p)=>{const{addonLeft:b,addonRight:y,helperTextLeft:$,helperTextRight:E,isError:v,errorMessage:w,isDisabled:T,isValid:I,elementLeft:D,elementRight:A,className:F,...k}=m,B=!!a,R=l.useRef(null);l.useImperativeHandle(p,()=>R.current);const[x,h]=l.useState(!1),[C,P]=l.useState(!1),j=U=>{if(x){const re=R.current;re&&re.focus(),C&&(h(!1),P(!1))}else o==null||o(U)},H=()=>{d==null||d();const U=R.current;U&&U.focus(),C&&(h(!1),P(!1))};return l.useEffect(()=>{C&&h(!0)},[C]),M.jsxs(wo,{addonLeft:b,addonRight:y,elementLeft:D,elementRight:A,helperTextLeft:$,helperTextRight:E,isError:v,errorMessage:w,isDisabled:T,isValid:I,className:u,inputAreaClassName:$e(DE,f),children:[M.jsx("input",{ref:R,type:t,className:$e(AE,F),value:e,disabled:T,"data-test-id":m["data-test-id"],required:c,onBlur:j,...k}),M.jsx(Ai,{isError:v,isDisabled:T,required:c,children:n}),M.jsx("div",{className:$e(NE),"data-test-id":"icon-input-area",onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onTouchStart:()=>P(!0),onClick:()=>{H()},"aria-hidden":"true",children:M.jsxs(pl,{isDisabled:T,className:$e(s&&!i&&!B&&PE),children:[B&&!i&&a,s&&!i&&!B&&M.jsx(R0,{size:24,"data-test-id":`clear-input-${m["data-test-id"]}`,onClick:r}),i&&M.jsx(_o,{color:Pt.theme.colors.green1})]})})]})});hl.displayName="Input";hl.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0,inputAreaClassName:void 0,onClickIcon:void 0};const vl=l.forwardRef(({value:e,label:t,rows:n=4,required:r,containerStyles:o,...i},a)=>{const{helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:f,isDisabled:d,isValid:m,...p}=i,b=l.useRef(null);l.useImperativeHandle(a,()=>b.current);const y=()=>{var $;($=b.current)==null||$.focus()};return M.jsxs(wo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:f,isDisabled:d,isValid:m,className:$e(o),onClick:y,children:[M.jsx("textarea",{ref:b,className:$e(jE),value:e,rows:n,disabled:d,"data-test-id":i["data-test-id"],required:r,...p}),M.jsx(Ai,{isTextarea:!0,isError:u,isDisabled:d,required:r,children:t})]})});vl.displayName="Textarea";vl.defaultProps={containerStyles:void 0,"data-test-id":void 0};var UT=Ke({defaultClassName:"_1n7m27n0",variantClassNames:{colorScheme:{primary:"_1n7m27n1",neutral:"_1n7m27n2",danger:"_1n7m27n3",warning:"_1n7m27n4",info:"_1n7m27n5"},variant:{solid:"_1n7m27n6",outline:"_1n7m27n7"},unstyled:{true:"_1n7m27n8"}},defaultVariants:{variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_1n7m27n9"],[{colorScheme:"neutral",variant:"outline"},"_1n7m27na"],[{colorScheme:"danger",variant:"outline"},"_1n7m27nb"],[{colorScheme:"warning",variant:"outline"},"_1n7m27nc"],[{colorScheme:"info",variant:"outline"},"_1n7m27nd"]]}),Bp={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const ml=l.forwardRef(({as:e,className:t,style:n,colorScheme:r,icon:o,unstyled:i,variant:a,isDisabled:s,isLoading:c,...u},f)=>{const d=l.useRef(null),m=sl({ref:d,colorScheme:r,variant:a});l.useImperativeHandle(f,()=>d.current);const p=e||"button";return M.jsx(p,{ref:d,as:e,"data-test-id":u["data-test-id"],className:$e(UT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?M.jsx(_o,{color:a==="outline"?Bp[r||"primary"]:Bp.white}):M.jsxs(M.Fragment,{children:[m,o]})})});ml.displayName="Button";ml.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var YT=Ke({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const KT=({width:e=140,height:t=140,viewBox:n="0 0 140 140",...r})=>M.jsx("svg",{"data-test-id":"illustration-fallback-image",width:e,height:t,viewBox:n,fill:"none",...r,children:M.jsx("path",{d:"M85.604 0H0V140H130V43.7197L85.604 0ZM119.088 129.24H10.9305V93.2855L23.0998 101.606L48.3128 71.9816L70.6656 103.991L83.7094 86.5608L106.062 92.0123L87.2618 70.7801L71.7769 89.1789L50.5353 52.3812L22.8812 79.3877L10.9305 68.1798V10.7596H80.9767V48.0594H118.96L119.07 48.167V129.24H119.088Z",fill:"#EEEEEE"})}),gl=l.forwardRef(({as:e,src:t,fit:n,width:r,height:o,loading:i,isLoading:a,fallback:s,onLoad:c,onError:u,className:f,"data-test-id":d,...m},p)=>{const b=e||"img",y=l.useMemo(()=>`${parseInt(`${r??0}`,10)}px`,[r]),$=l.useMemo(()=>`${parseInt(`${o??0}`,10)}px`,[o]),[E,v]=l.useState(!1),[w,T]=l.useState(n),I=A=>{T("fill"),v(!0),u==null||u(A)},D=A=>{v(!1),c==null||c(A)};return a&&!E?M.jsx(rt,{bgColor:"$grey2",width:y,height:$}):E?s||M.jsx(KT,{width:y,height:$}):M.jsx(b,{"data-test-id":d,as:"img",width:y,height:$,src:t,loading:i,onLoad:D,onError:I,ref:p,className:$e(YT({fit:w})),...m})});gl.displayName="Image";gl.defaultProps={as:"img","data-test-id":void 0,fallback:void 0,width:void 0,height:void 0,loading:void 0,isLoading:void 0,onLoad:void 0,onError:void 0,fit:void 0};var ng=Ke({defaultClassName:"_5y0pl50",variantClassNames:{textStyle:{heading1:"_5y0pl51",heading2:"_5y0pl52",heading3:"_5y0pl53",heading4:"_5y0pl54",heading5:"_5y0pl55",heading6:"_5y0pl56",subtitle1:"_5y0pl57",subtitle2:"_5y0pl58",body1:"_5y0pl59",body2:"_5y0pl5a",caption:"_5y0pl5b",footer:"_5y0pl5c"},isDisabled:{true:"_5y0pl5d"},isStandalone:{true:"_5y0pl5e",false:"_5y0pl5f"},isBold:{true:"_5y0pl5g"}},defaultVariants:{isStandalone:!1,isDisabled:!1,isBold:!1,textStyle:"body1"},compoundVariants:[]});const rg=({children:e,className:t,isStandalone:n,textStyle:r="body2",isDisabled:o,isBold:i,...a})=>M.jsx("a",{className:$e(t,ng({isDisabled:o,textStyle:r,isBold:i,isStandalone:n})),"data-disabled":o,...a,children:e});var qT="_1cq2k9i0";const yl=l.forwardRef(({children:e,as:t,className:n,variant:r,...o},i)=>{const a=t||"ul";return M.jsx(a,{"data-test-id":o["data-test-id"],ref:i,className:$e(qT,n),...o,children:l.Children.map(e,s=>l.cloneElement(s,{variant:r}))})});yl.displayName="List";yl.defaultProps={"data-test-id":void 0,as:"ul",variant:"default"};var XT="xw6nfa0",GT="xw6nfa1",ZT=Ke({defaultClassName:"xw6nfa2",variantClassNames:{variant:{small:"xw6nfa3",default:"xw6nfa4"}},defaultVariants:{variant:"default"},compoundVariants:[]});const bl=l.forwardRef(({children:e,leftIcon:t,rightIcon:n,href:r,target:o,as:i,className:a,variant:s,...c},u)=>{const f=i||"li",d=r?"a":rt;return M.jsx(f,{"data-test-id":c["data-test-id"],className:$e(XT,a),...c,ref:u,children:M.jsxs(d,{href:r,target:o,className:ZT({variant:s}),children:[t,M.jsx("div",{className:GT,children:e}),n]})})});bl.displayName="ListItem";bl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li",variant:void 0};var og={},ig={exports:{}};(function(e,t){(function(r,o){e.exports=o()})(Wy,()=>(()=>{var n=[,(a,s,c)=>{c.r(s),c.d(s,{default:()=>f});var u=(()=>{var d=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(m={}){var p=m,b,y;p.ready=new Promise((S,g)=>{b=S,y=g});function $(){function S(ue){const se=N;O=g=0,N=new Map,se.forEach(de=>{try{de(ue)}catch(le){console.error(le)}}),this.Qa(),q&&q.nb()}let g=0,O=0,N=new Map,q=null,te=null;this.requestAnimationFrame=function(ue){g||(g=requestAnimationFrame(S.bind(this)));const se=++O;return N.set(se,ue),se},this.cancelAnimationFrame=function(ue){N.delete(ue),g&&N.size==0&&(cancelAnimationFrame(g),g=0)},this.lb=function(ue){te&&(document.body.remove(te),te=null),ue||(te=document.createElement("div"),te.style.backgroundColor="black",te.style.position="fixed",te.style.right=0,te.style.top=0,te.style.color="white",te.style.padding="4px",te.innerHTML="RIVE FPS",ue=function(se){te.innerHTML="RIVE FPS "+se.toFixed(1)},document.body.appendChild(te)),q=new function(){let se=0,de=0;this.nb=function(){var le=performance.now();de?(++se,le-=de,1e3<le&&(ue(1e3*se/le),se=de=0)):(de=le,se=0)}}},this.ib=function(){te&&(document.body.remove(te),te=null),q=null},this.Qa=function(){}}function E(S){console.assert(!0);const g=new Map;let O=-1/0;this.push=function(N){return N=N+((1<<S)-1)>>S,g.has(N)&&clearTimeout(g.get(N)),g.set(N,setTimeout(function(){g.delete(N),g.length==0?O=-1/0:N==O&&(O=Math.max(...g.keys()),console.assert(O<N))},1e3)),O=Math.max(N,O),O<<S}}const v=new function(){function S(){if(!g){let xt=function(Nt,Ve,Ye){if(Ve=ye.createShader(Ve),ye.shaderSource(Ve,Ye),ye.compileShader(Ve),Ye=ye.getShaderInfoLog(Ve),0<Ye.length)throw Ye;ye.attachShader(Nt,Ve)};var Re=document.createElement("canvas"),je={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ye=Re.getContext("webgl2",je);if(ye)O=2;else if(ye=Re.getContext("webgl",je))O=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(N=Math.min(ye.getParameter(ye.MAX_RENDERBUFFER_SIZE),ye.getParameter(ye.MAX_TEXTURE_SIZE)),Re=ye.createProgram(),xt(Re,ye.VERTEX_SHADER,`attribute vec2 vertex;
|
|
146
|
+
*/function Ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ep(Object(n),!0).forEach(function(r){WC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ep(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WC(e,t,n){return t=UC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zC(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UC(e){var t=zC(e,"string");return typeof t=="symbol"?t:String(t)}var _p={activateTrap:function(t,n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var o=t.indexOf(n);o===-1||t.splice(o,1),t.push(n)},deactivateTrap:function(t,n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}},YC=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},KC=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},Jo=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},qC=function(t){return Jo(t)&&!t.shiftKey},XC=function(t){return Jo(t)&&t.shiftKey},Sp=function(t){return setTimeout(t,0)},Cp=function(t,n){var r=-1;return t.every(function(o,i){return n(o)?(r=i,!1):!0}),r},Mo=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,r):t},na=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},GC=[],ZC=function(t,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||GC,i=xp({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:qC,isKeyBackward:XC},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(R,x,h){return R&&R[x]!==void 0?R[x]:i[h||x]},u=function(R,x){var h=typeof(x==null?void 0:x.composedPath)=="function"?x.composedPath():void 0;return a.containerGroups.findIndex(function(C){var P=C.container,j=C.tabbableNodes;return P.contains(R)||(h==null?void 0:h.includes(P))||j.find(function(H){return H===R})})},f=function(R){var x=i[R];if(typeof x=="function"){for(var h=arguments.length,C=new Array(h>1?h-1:0),P=1;P<h;P++)C[P-1]=arguments[P];x=x.apply(void 0,C)}if(x===!0&&(x=void 0),!x){if(x===void 0||x===!1)return x;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var j=x;if(typeof x=="string"&&(j=r.querySelector(x),!j))throw new Error("`".concat(R,"` as selector refers to no known node"));return j},d=function(){var R=f("initialFocus");if(R===!1)return!1;if(R===void 0||!uc(R,i.tabbableOptions))if(u(r.activeElement)>=0)R=r.activeElement;else{var x=a.tabbableGroups[0],h=x&&x.firstTabbableNode;R=h||f("fallbackFocus")}if(!R)throw new Error("Your focus-trap needs to have at least one focusable element");return R},m=function(){if(a.containerGroups=a.containers.map(function(R){var x=VC(R,i.tabbableOptions),h=BC(R,i.tabbableOptions),C=x.length>0?x[0]:void 0,P=x.length>0?x[x.length-1]:void 0,j=h.find(function(re){return eo(re)}),H=h.slice().reverse().find(function(re){return eo(re)}),U=!!x.find(function(re){return Rr(re)>0});return{container:R,tabbableNodes:x,focusableNodes:h,posTabIndexesFound:U,firstTabbableNode:C,lastTabbableNode:P,firstDomTabbableNode:j,lastDomTabbableNode:H,nextTabbableNode:function(W){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,J=x.indexOf(W);return J<0?L?h.slice(h.indexOf(W)+1).find(function(Y){return eo(Y)}):h.slice(0,h.indexOf(W)).reverse().find(function(Y){return eo(Y)}):x[J+(L?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(R){return R.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!f("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(R){return R.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},p=function B(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){B(d());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,YC(R)&&R.select()}},b=function(R){var x=f("setReturnFocus",R);return x||(x===!1?!1:R)},y=function(R){var x=R.target,h=R.event,C=R.isBackward,P=C===void 0?!1:C;x=x||na(h),m();var j=null;if(a.tabbableGroups.length>0){var H=u(x,h),U=H>=0?a.containerGroups[H]:void 0;if(H<0)P?j=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:j=a.tabbableGroups[0].firstTabbableNode;else if(P){var re=Cp(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return x===ce});if(re<0&&(U.container===x||uc(x,i.tabbableOptions)&&!eo(x,i.tabbableOptions)&&!U.nextTabbableNode(x,!1))&&(re=H),re>=0){var W=re===0?a.tabbableGroups.length-1:re-1,L=a.tabbableGroups[W];j=Rr(x)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(h)||(j=U.nextTabbableNode(x,!1))}else{var J=Cp(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return x===ce});if(J<0&&(U.container===x||uc(x,i.tabbableOptions)&&!eo(x,i.tabbableOptions)&&!U.nextTabbableNode(x))&&(J=H),J>=0){var Y=J===a.tabbableGroups.length-1?0:J+1,K=a.tabbableGroups[Y];j=Rr(x)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else Jo(h)||(j=U.nextTabbableNode(x))}}else j=f("fallbackFocus");return j},$=function(R){var x=na(R);if(!(u(x,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},E=function(R){var x=na(R),h=u(x,R)>=0;if(h||x instanceof Document)h&&(a.mostRecentlyFocusedNode=x);else{R.stopImmediatePropagation();var C,P=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var j=u(a.mostRecentlyFocusedNode),H=a.containerGroups[j].tabbableNodes;if(H.length>0){var U=H.findIndex(function(re){return re===a.mostRecentlyFocusedNode});U>=0&&(i.isKeyForward(a.recentNavEvent)?U+1<H.length&&(C=H[U+1],P=!1):U-1>=0&&(C=H[U-1],P=!1))}}else a.containerGroups.some(function(re){return re.tabbableNodes.some(function(W){return Rr(W)>0})})||(P=!1);else P=!1;P&&(C=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),p(C||a.mostRecentlyFocusedNode||d())}a.recentNavEvent=void 0},v=function(R){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var h=y({event:R,isBackward:x});h&&(Jo(R)&&R.preventDefault(),p(h))},w=function(R){if(KC(R)&&Mo(i.escapeDeactivates,R)!==!1){R.preventDefault(),s.deactivate();return}(i.isKeyForward(R)||i.isKeyBackward(R))&&v(R,i.isKeyBackward(R))},T=function(R){var x=na(R);u(x,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return _p.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?Sp(function(){p(d())}):p(d()),r.addEventListener("focusin",E,!0),r.addEventListener("mousedown",$,{capture:!0,passive:!1}),r.addEventListener("touchstart",$,{capture:!0,passive:!1}),r.addEventListener("click",T,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},D=function(){if(a.active)return r.removeEventListener("focusin",E,!0),r.removeEventListener("mousedown",$,!0),r.removeEventListener("touchstart",$,!0),r.removeEventListener("click",T,!0),r.removeEventListener("keydown",w,!0),s},A=function(R){var x=R.some(function(h){var C=Array.from(h.removedNodes);return C.some(function(P){return P===a.mostRecentlyFocusedNode})});x&&p(d())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(A):void 0,k=function(){F&&(F.disconnect(),a.active&&!a.paused&&a.containers.map(function(R){F.observe(R,{subtree:!0,childList:!0})}))};return s={get active(){return a.active},get paused(){return a.paused},activate:function(R){if(a.active)return this;var x=c(R,"onActivate"),h=c(R,"onPostActivate"),C=c(R,"checkCanFocusTrap");C||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,x==null||x();var P=function(){C&&m(),I(),k(),h==null||h()};return C?(C(a.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(R){if(!a.active)return this;var x=xp({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},R);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,D(),a.active=!1,a.paused=!1,k(),_p.deactivateTrap(o,s);var h=c(x,"onDeactivate"),C=c(x,"onPostDeactivate"),P=c(x,"checkCanReturnFocus"),j=c(x,"returnFocus","returnFocusOnDeactivate");h==null||h();var H=function(){Sp(function(){j&&p(b(a.nodeFocusedBeforeActivation)),C==null||C()})};return j&&P?(P(b(a.nodeFocusedBeforeActivation)).then(H,H),this):(H(),this)},pause:function(R){if(a.paused||!a.active)return this;var x=c(R,"onPause"),h=c(R,"onPostPause");return a.paused=!0,x==null||x(),D(),k(),h==null||h(),this},unpause:function(R){if(!a.paused||!a.active)return this;var x=c(R,"onUnpause"),h=c(R,"onPostUnpause");return a.paused=!1,x==null||x(),m(),I(),k(),h==null||h(),this},updateContainerElements:function(R){var x=[].concat(R).filter(Boolean);return a.containers=x.map(function(h){return typeof h=="string"?r.querySelector(h):h}),a.active&&m(),k(),this}},s.updateContainerElements(t),s};function QC({targetRef:e,fallbackRef:t,initialFocusRef:n,enabled:r}){const o=l.useRef({activate:()=>{throw new TypeError("Tried to activate focus trap too early")},deactivate:()=>{}});return l.useDebugValue(r?"Enabled":"Disabled"),l.useEffect(()=>{if(!r){o.current.deactivate(),o.current={activate:()=>{},deactivate:()=>{}};return}const i=t.current,a=ZC(e.current,{onActivate:process.env.NODE_ENV!=="production"?()=>{console.log("focus activate")}:void 0,initialFocus:n?()=>(n==null?void 0:n.current)||i:void 0,fallbackFocus:i,escapeDeactivates:!1,clickOutsideDeactivates:!1});let s=!1;o.current={activate:async()=>{s||(s=!0,await a.activate(),await new Promise(c=>setTimeout(()=>c(1),0)))},deactivate:()=>{s&&(s=!1,a.deactivate())}}},[r,t,n,e]),o}const bi=typeof window<"u"?l.useLayoutEffect:l.useEffect;function JC(){const[e,t]=l.useState(!1),[n,r]=l.useState({}),o=l.useCallback(i=>(console.count(`registerReady:${i}`),r(a=>({...a,[i]:!1})),()=>{console.count(`setReady:${i}`),r(a=>({...a,[i]:!0}))}),[]);return l.useEffect(()=>{const i=Object.values(n);if(i.length===0){console.log("nope nothing registered yet");return}const a=i.every(Boolean);console.log("check if we are rready",n,a),a&&(console.warn("ready!"),t(!0))},[n]),{ready:e,registerReady:o}}function e$(){const e=l.useMemo(()=>typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,[]),t=l.useRef(e==null?void 0:e.matches);return l.useDebugValue(t.current?"reduce":"no-preference"),l.useEffect(()=>{const n=r=>{t.current=r.matches};return e==null||e.addListener(n),()=>e==null?void 0:e.removeListener(n)},[e]),t}function t$(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var il=!1;if(typeof window<"u"){var $p={get passive(){il=!0}};window.addEventListener("testPassive",null,$p),window.removeEventListener("testPassive",null,$p)}var Fm=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),fr=[],za=!1,Vm=-1,ei=void 0,ti=void 0,Bm=function(t){return fr.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Ua=function(t){var n=t||window.event;return Bm(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},n$=function(t){if(ti===void 0){var n=!!t&&t.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(ti=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}ei===void 0&&(ei=document.body.style.overflow,document.body.style.overflow="hidden")},r$=function(){ti!==void 0&&(document.body.style.paddingRight=ti,ti=void 0),ei!==void 0&&(document.body.style.overflow=ei,ei=void 0)},o$=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},i$=function(t,n){var r=t.targetTouches[0].clientY-Vm;return Bm(t.target)?!1:n&&n.scrollTop===0&&r>0||o$(n)&&r<0?Ua(t):(t.stopPropagation(),!0)},a$=function(t,n){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!fr.some(function(o){return o.targetElement===t})){var r={targetElement:t,options:n||{}};fr=[].concat(t$(fr),[r]),Fm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Vm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&i$(o,t)},za||(document.addEventListener("touchmove",Ua,il?{passive:!1}:void 0),za=!0)):n$(n)}},s$=function(t){if(!t){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}fr=fr.filter(function(n){return n.targetElement!==t}),Fm?(t.ontouchstart=null,t.ontouchmove=null,za&&fr.length===0&&(document.removeEventListener("touchmove",Ua,il?{passive:!1}:void 0),za=!1)):fr.length||r$()};function c$({targetRef:e,enabled:t,reserveScrollBarGap:n}){const r=l.useRef({activate:()=>{throw new TypeError("Tried to activate scroll lock too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){r.current.deactivate(),r.current={activate:()=>{},deactivate:()=>{}};return}const o=e.current;let i=!1;r.current={activate:()=>{i||(i=!0,a$(o,{allowTouchMove:a=>a.closest("[data-body-scroll-lock-ignore]"),reserveScrollBarGap:n}))},deactivate:()=>{i&&(i=!1,s$(o))}}},[t,e,n]),r}var Dr=[],u$=function(){return Dr.some(function(e){return e.activeTargets.length>0})},l$=function(){return Dr.some(function(e){return e.skippedTargets.length>0})},Tp="ResizeObserver loop completed with undelivered notifications.",d$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Tp}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Tp),window.dispatchEvent(e)},wi;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(wi||(wi={}));var Nr=function(e){return Object.freeze(e)},f$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Nr(this)}return e}(),Hm=function(){function e(t,n,r,o){return this.x=t,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Nr(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,o=t.top,i=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:n,y:r,top:o,right:i,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),al=function(e){return e instanceof SVGElement&&"getBBox"in e},Wm=function(e){if(al(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Ip=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},p$=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ni=typeof window<"u"?window:{},ra=new WeakMap,Rp=/auto|scroll/,h$=/^tb|vertical/,v$=/msie|trident/i.test(ni.navigator&&ni.navigator.userAgent),Ln=function(e){return parseFloat(e||"0")},co=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new f$((n?t:e)||0,(n?e:t)||0)},Op=Nr({devicePixelContentBoxSize:co(),borderBoxSize:co(),contentBoxSize:co(),contentRect:new Hm(0,0,0,0)}),zm=function(e,t){if(t===void 0&&(t=!1),ra.has(e)&&!t)return ra.get(e);if(Wm(e))return ra.set(e,Op),Op;var n=getComputedStyle(e),r=al(e)&&e.ownerSVGElement&&e.getBBox(),o=!v$&&n.boxSizing==="border-box",i=h$.test(n.writingMode||""),a=!r&&Rp.test(n.overflowY||""),s=!r&&Rp.test(n.overflowX||""),c=r?0:Ln(n.paddingTop),u=r?0:Ln(n.paddingRight),f=r?0:Ln(n.paddingBottom),d=r?0:Ln(n.paddingLeft),m=r?0:Ln(n.borderTopWidth),p=r?0:Ln(n.borderRightWidth),b=r?0:Ln(n.borderBottomWidth),y=r?0:Ln(n.borderLeftWidth),$=d+u,E=c+f,v=y+p,w=m+b,T=s?e.offsetHeight-w-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?$+v:0,A=o?E+w:0,F=r?r.width:Ln(n.width)-D-I,k=r?r.height:Ln(n.height)-A-T,B=F+$+I+v,R=k+E+T+w,x=Nr({devicePixelContentBoxSize:co(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:co(B,R,i),contentBoxSize:co(F,k,i),contentRect:new Hm(d,c,F,k)});return ra.set(e,x),x},Um=function(e,t,n){var r=zm(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case wi.DEVICE_PIXEL_CONTENT_BOX:return a;case wi.BORDER_BOX:return o;default:return i}},m$=function(){function e(t){var n=zm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Nr([n.borderBoxSize]),this.contentBoxSize=Nr([n.contentBoxSize]),this.devicePixelContentBoxSize=Nr([n.devicePixelContentBoxSize])}return e}(),Ym=function(e){if(Wm(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},g$=function(){var e=1/0,t=[];Dr.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var f=new m$(u.target),d=Ym(u.target);s.push(f),u.lastReportedSize=Um(u.target,u.observedBox),d<e&&(e=d)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var o=r[n];o()}return e},Pp=function(e){Dr.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(Ym(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},y$=function(){var e=0;for(Pp(e);u$();)e=g$(),Pp(e);return l$()&&d$(),e>0},lc,Km=[],b$=function(){return Km.splice(0).forEach(function(e){return e()})},w$=function(e){if(!lc){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return b$()}).observe(n,r),lc=function(){n.textContent="".concat(t?t--:t++)}}Km.push(e),lc()},E$=function(e){w$(function(){requestAnimationFrame(e)})},wa=0,x$=function(){return!!wa},_$=250,S$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ap=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Dp=function(e){return e===void 0&&(e=0),Date.now()+e},dc=!1,C$=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=_$),!dc){dc=!0;var r=Dp(t);E$(function(){var o=!1;try{o=y$()}finally{if(dc=!1,t=r-Dp(),!x$())return;o?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,S$)};document.body?n():ni.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ap.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ap.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ru=new C$,Np=function(e){!wa&&e>0&&ru.start(),wa+=e,!wa&&ru.stop()},$$=function(e){return!al(e)&&!p$(e)&&getComputedStyle(e).display==="inline"},T$=function(){function e(t,n){this.target=t,this.observedBox=n||wi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Um(this.target,this.observedBox,!0);return $$(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),I$=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),oa=new WeakMap,kp=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},ia=function(){function e(){}return e.connect=function(t,n){var r=new I$(t,n);oa.set(t,r)},e.observe=function(t,n,r){var o=oa.get(t),i=o.observationTargets.length===0;kp(o.observationTargets,n)<0&&(i&&Dr.push(o),o.observationTargets.push(new T$(n,r&&r.box)),Np(1),ru.schedule())},e.unobserve=function(t,n){var r=oa.get(t),o=kp(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Dr.splice(Dr.indexOf(r),1),r.observationTargets.splice(o,1),Np(-1))},e.disconnect=function(t){var n=this,r=oa.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),R$=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ia.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ip(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ia.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ip(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ia.unobserve(this,t)},e.prototype.disconnect=function(){ia.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Wo(e,t,n){return e=+e,t=+t,n=+n,t=t===t?t:0,n=n===n?n:0,e===e&&(e=e<=n?e:n,e=e>=t?e:t),e}function Ya(e){const t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}function O$(e,t){const r=[].concat(e).map(Ya).reduce((s,c)=>(s.add(Wo(c,0,t)),s),new Set),o=Array.from(r),i=Math.min(...o);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");const a=Math.max(...o);if(Number.isNaN(a))throw new TypeError("maxSnap is NaN");return{snapPoints:o,minSnap:i,maxSnap:a}}const P$=process.env.NODE_ENV==="development"&&typeof window<"u"?window.location.search==="?debug":!1,A$={box:"border-box"};function fc(e,{label:t,enabled:n,resizeSourceRef:r}){const[o,i]=l.useState(0);l.useDebugValue(`${t}: ${o}`);const a=l.useCallback(s=>{i(s[0].borderBoxSize[0].blockSize),r.current="element"},[r]);return bi(()=>{if(!e.current||!n)return;const s=new R$(a);return s.observe(e.current,A$),()=>s.disconnect()},[e,a,n]),n?o:0}function D$(e,t,n){const r=l.useMemo(()=>t("maxHeight"),[t]),o=window.innerHeight*.75,[i,a]=l.useState(()=>Ya(e)||typeof window<"u"?o:0),s=i>0,c=l.useRef(0);return l.useDebugValue(e?"controlled":"auto"),l.useEffect(()=>{s&&r()},[s,r]),bi(()=>{if(e){a(Ya(e)),n.current="maxheightprop";return}const u=()=>{c.current||(c.current=requestAnimationFrame(()=>{a(o),n.current="window",c.current=0}))};return window.addEventListener("resize",u),a(o),n.current="window",r(),()=>{window.removeEventListener("resize",u),cancelAnimationFrame(c.current)}},[e,r,n,o]),i}function N$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:o,headerRef:i,registerReady:a,resizeSourceRef:s,conditions:c}){const u=l.useMemo(()=>a("contentHeight"),[a]),f=D$(t,a,s),d=fc(i,{label:"headerHeight",enabled:o,resizeSourceRef:s}),m=fc(e,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),p=fc(r,{label:"footerHeight",enabled:n,resizeSourceRef:s}),b=c!=null&&c.hasPaddingY?16:0,y=c!=null&&c.hasHeader?0:20,$=c!=null&&c.hasCustomHeader?16:0,E=Math.min(f-d-p,m+b)+(d+y+$)+p;l.useDebugValue(`minHeight: ${E}`);const v=m>0;return l.useEffect(()=>{v&&u()},[v,u]),{maxHeight:f,minHeight:E,headerHeight:d,footerHeight:p}}function k$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,getSnapPoints:o,headerEnabled:i,headerRef:a,heightRef:s,lastSnapRef:c,ready:u,registerReady:f,resizeSourceRef:d,conditions:m}){const{maxHeight:p,minHeight:b,headerHeight:y,footerHeight:$}=N$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:f,resizeSourceRef:d,conditions:m}),{snapPoints:E,minSnap:v,maxSnap:w}=O$(u?o({height:s.current,footerHeight:$,headerHeight:y,minHeight:b,maxHeight:p}):[0],p);function T(I){let D;typeof I=="function"?D=I({footerHeight:$,headerHeight:y,height:s.current,minHeight:b,maxHeight:p,snapPoints:E,lastSnap:c.current}):D=I;const A=Ya(D);return E.reduce((F,k)=>Math.abs(k-A)<Math.abs(F-A)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${w}`),{minSnap:v,maxSnap:w,findSnap:T,maxHeight:p}}function M$(){return _S(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function j$({spring:e}){const t=Jr([e.y,e.maxHeight],(s,c)=>`${Math.round(Wo(c-s,0,16))}px`),n=Jr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>`${Wo(s,c,u)}px`),r=Jr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>s<c?`${c-s}px`:s>u?`${u-s}px`:"0px"),o=Jr([e.y,e.maxSnap],(s,c)=>s>=c?Math.ceil(s-c):0),i=Jr([e.y,e.minSnap],(s,c)=>{if(!c)return 0;const u=Math.max(c/2-45,0),f=Math.min(c/2+45,c),d=0,p=(1-d)/(f-u),b=(s-u)*(p+d);return Wo(b,0,1)}),a=Jr([e.y,e.minSnap],(s,c)=>c?Wo(s/c,0,1):0);return{"--rsbs-content-opacity":i,"--rsbs-backdrop-opacity":a,"--rsbs-antigap-scale-y":o,"--rsbs-overlay-translate-y":r,"--rsbs-overlay-rounded":t,"--rsbs-overlay-h":n}}function qt(e=1e3){return new Promise(t=>setTimeout(t,e))}const L$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},Mp={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},jp={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},F$=({initialState:e})=>e==="OPEN",V$=({initialState:e})=>e==="CLOSED",B$=r_({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:{...Mp,...jp}}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:{...Mp,...jp}}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{...L$},onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[o_({y:(e,{payload:{y:t}})=>t,velocity:(e,{payload:{velocity:t}})=>t,snapSource:(e,{payload:{source:t="custom"}})=>t})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapCancel:(e,t)=>{console.log("onSnapCancel",{context:e,event:t})},onResizeCancel:(e,t)=>{console.log("onResizeCancel",{context:e,event:t})},onCloseCancel:(e,t)=>{console.log("onCloseCancel",{context:e,event:t})},onOpenEnd:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapEnd:(e,t)=>{console.log("onSnapEnd",{context:e,event:t})},onRezizeEnd:(e,t)=>{console.log("onRezizeEnd",{context:e,event:t})}},services:{onSnapStart:async()=>{await qt()},onOpenStart:async()=>{await qt()},onCloseStart:async()=>{await qt()},onResizeStart:async()=>{await qt()},onSnapEnd:async()=>{await qt()},onOpenEnd:async()=>{await qt()},onCloseEnd:async()=>{await qt()},onResizeEnd:async()=>{await qt()},renderVisuallyHidden:async(e,t)=>{console.group("renderVisuallyHidden"),console.log({context:e,event:t}),await qt(),console.groupEnd()},activate:async(e,t)=>{console.group("activate"),console.log({context:e,event:t}),await qt(),console.groupEnd()},deactivate:async(e,t)=>{console.group("deactivate"),console.log({context:e,event:t}),await qt(),console.groupEnd()},openSmoothly:async(e,t)=>{console.group("openSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()},openImmediately:async(e,t)=>{console.group("openImmediately"),console.log({context:e,event:t}),await qt(),console.groupEnd()},snapSmoothly:async(e,t)=>{console.group("snapSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()},resizeSmoothly:async(e,t)=>{console.group("resizeSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()},closeSmoothly:async(e,t)=>{console.group("closeSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()}},guards:{initiallyClosed:V$,initiallyOpen:F$}}),{tension:H$,friction:aa}=cm.default,W$=["closed","opening","open","closing","dragging","snapping","resizing"];function z$({snapPoints:e,lastSnap:t}){return t??Math.min(...e)}function U$({minHeight:e}){return e}const Y$=l.forwardRef(function({children:t,sibling:n,className:r,footer:o,header:i,isOpen:a,initialState:s,lastSnapRef:c,initialFocusRef:u,onClose:f,maxHeight:d,defaultSnap:m=z$,snapPoints:p=U$,blocking:b=!0,scrollLocking:y=!0,style:$,onSpringStart:E,onSpringCancel:v,onSpringEnd:w,reserveScrollBarGap:T=b,expandOnContentDrag:I=!1,title:D,showClose:A,showBack:F,onBack:k,onCloseWhenClickOutside:B=!0,hasHandleBar:R=!0,"data-test-id":x,padding:h,styles:C,refs:P,...j},H){const{ready:U,registerReady:re}=JC(),W=l.useRef(!1),L=l.useRef(E),J=l.useRef(v),Y=l.useRef(w);l.useEffect(()=>{L.current=E,J.current=v,Y.current=w},[v,E,w]);const[K,Z]=M$(),ce=l.useRef(null),z=l.useRef(null),G=l.useRef(null),oe=l.useRef(null),ne=l.useRef(null),ie=l.useRef(null);l.useImperativeHandle(P==null?void 0:P.body,()=>z.current),l.useImperativeHandle(P==null?void 0:P.content,()=>G.current),l.useImperativeHandle(P==null?void 0:P.header,()=>oe.current),l.useImperativeHandle(P==null?void 0:P.footer,()=>ne.current),l.useImperativeHandle(P==null?void 0:P.overlay,()=>ie.current);const ee=l.useRef(0),pe=l.useRef(),xe=l.useRef(!1),Ee=e$(),{x:Ae="default",y:Ie="default"}=h??{},Le=Ae==="default",ke=Ie==="default",at=c$({targetRef:z,enabled:U&&y,reserveScrollBarGap:T}),We=CC({targetRef:ce,enabled:U&&b}),Et=QC({targetRef:ce,fallbackRef:ie,initialFocusRef:u||void 0,enabled:U&&b&&u!==!1}),{minSnap:Xe,maxSnap:At,maxHeight:Te,findSnap:$t}=k$({contentRef:G,controlledMaxHeight:d,footerEnabled:!!o,footerRef:ne,getSnapPoints:p,headerEnabled:i!==!1,headerRef:oe,heightRef:ee,lastSnapRef:c,ready:U,registerReady:re,resizeSourceRef:pe,conditions:{hasPaddingY:ke,hasHeader:i!==!1,hasCustomHeader:!!i}}),Ge=l.useRef(Te),Tt=l.useRef(Xe),et=l.useRef(At),Dt=l.useRef($t),De=l.useRef(0);bi(()=>{Ge.current=Te,et.current=At,Tt.current=Xe,Dt.current=$t,De.current=$t(m)},[$t,m,Te,At,Xe]);const tt=l.useCallback(({onRest:ve,config:{velocity:ze=1,...Ct}={},..._t})=>new Promise(Qt=>Z({..._t,config:{velocity:ze,...Ct,mass:1,tension:H$,friction:Math.max(aa,aa+(aa-aa*ze))},onRest:(...Jt)=>{Qt(...Jt),ve==null||ve(...Jt)}})),[Z]),[Zt,Lt]=h_(B$,{devTools:P$,actions:{onOpenCancel:l.useCallback(()=>{var ve;return(ve=J.current)==null?void 0:ve.call(J,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(ve=>{var ze;return(ze=J.current)==null?void 0:ze.call(J,{type:"SNAP",source:ve.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var ve;return(ve=J.current)==null?void 0:ve.call(J,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var ve;return(ve=J.current)==null?void 0:ve.call(J,{type:"RESIZE",source:pe.current})},[]),onOpenEnd:l.useCallback(()=>{var ve;return(ve=Y.current)==null?void 0:ve.call(Y,{type:"OPEN"})},[]),onSnapEnd:l.useCallback(ve=>{var ze;return(ze=Y.current)==null?void 0:ze.call(Y,{type:"SNAP",source:ve.snapSource})},[]),onResizeEnd:l.useCallback(()=>{var ve;return(ve=Y.current)==null?void 0:ve.call(Y,{type:"RESIZE",source:pe.current})},[])},context:{initialState:s},services:{onSnapStart:l.useCallback(async(ve,ze)=>{var Ct;return(Ct=L.current)==null?void 0:Ct.call(L,{type:"SNAP",source:ze.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var ve;return(ve=L.current)==null?void 0:ve.call(L,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var ve;return(ve=L.current)==null?void 0:ve.call(L,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var ve;return(ve=L.current)==null?void 0:ve.call(L,{type:"RESIZE",source:pe.current})},[]),onSnapEnd:l.useCallback(async ve=>{var ze;return(ze=Y.current)==null?void 0:ze.call(Y,{type:"SNAP",source:ve.snapSource})},[]),onOpenEnd:l.useCallback(async()=>{var ve;return(ve=Y.current)==null?void 0:ve.call(Y,{type:"OPEN"})},[]),onCloseEnd:l.useCallback(async()=>{var ve;return(ve=Y.current)==null?void 0:ve.call(Y,{type:"CLOSE"})},[]),onResizeEnd:l.useCallback(async()=>{var ve;return(ve=Y.current)==null?void 0:ve.call(Y,{type:"RESIZE",source:pe.current})},[]),renderVisuallyHidden:l.useCallback(async()=>{await tt({y:De.current,ready:0,maxHeight:Ge.current,maxSnap:et.current,minSnap:De.current,immediate:!0})},[tt]),activate:l.useCallback(async()=>{W.current=!0,await Promise.all([at.current.activate(),Et.current.activate(),We.current.activate()])},[We,Et,at]),deactivate:l.useCallback(async()=>{at.current.deactivate(),Et.current.deactivate(),We.current.deactivate(),W.current=!1},[We,Et,at]),openImmediately:l.useCallback(async()=>{ee.current=De.current,await tt({y:De.current,ready:1,maxHeight:Ge.current,maxSnap:et.current,minSnap:De.current,immediate:!0})},[tt]),openSmoothly:l.useCallback(async()=>{await tt({y:0,ready:1,maxHeight:Ge.current,maxSnap:et.current,minSnap:De.current,immediate:!0}),ee.current=De.current,await tt({y:De.current,ready:1,maxHeight:Ge.current,maxSnap:et.current,minSnap:De.current,immediate:Ee.current})},[tt,Ee]),snapSmoothly:l.useCallback(async ve=>{const ze=Dt.current(ve.y);ee.current=ze,c.current=ze,await tt({y:ze,ready:1,maxHeight:Ge.current,maxSnap:et.current,minSnap:Tt.current,immediate:Ee.current,config:{velocity:ve.velocity}})},[tt,c,Ee]),resizeSmoothly:l.useCallback(async()=>{const ve=Dt.current(ee.current);ee.current=ve,c.current=ve,await tt({y:ve,ready:1,maxHeight:Ge.current,maxSnap:et.current,minSnap:Tt.current,immediate:pe.current==="element"?Ee.current:!0})},[tt,c,Ee]),closeSmoothly:l.useCallback(async()=>{tt({minSnap:ee.current,immediate:!0}),ee.current=0,await tt({y:0,maxHeight:Ge.current,maxSnap:et.current,immediate:Ee.current}),await tt({ready:0,immediate:!0})},[tt,Ee])}});l.useEffect(()=>{U&&Lt(a?"OPEN":"CLOSE")},[a,Lt,U]),bi(()=>{(Te||At||Xe)&&Lt("RESIZE")},[Te,At,Xe,Lt]),l.useEffect(()=>()=>{at.current.deactivate(),Et.current.deactivate(),We.current.deactivate()},[We,Et,at]),l.useImperativeHandle(H,()=>({snapTo:(ve,{velocity:ze=1,source:Ct="custom"}={})=>{Lt("SNAP",{payload:{y:Dt.current(ve),velocity:ze,source:Ct}})},get height(){return ee.current}}),[Lt]),l.useEffect(()=>{const ve=z.current,ze=_t=>{xe.current&&_t.preventDefault()},Ct=_t=>{ve&&ve.scrollTop<0&&(requestAnimationFrame(()=>{ve.style.overflow="hidden",ve.scrollTop=0,ve.style.removeProperty("overflow")}),_t.preventDefault())};return I&&(ve==null||ve.addEventListener("scroll",ze),ve==null||ve.addEventListener("touchmove",ze),ve==null||ve.addEventListener("touchstart",Ct)),()=>{ve==null||ve.removeEventListener("scroll",ze),ve==null||ve.removeEventListener("touchmove",ze),ve==null||ve.removeEventListener("touchstart",Ct)}},[I,z]);const wn=_C(({args:[{closeOnTap:ve=!1,isContentDragging:ze=!1}={}]=[],cancel:Ct,direction:[,_t],down:Qt,first:Jt,last:kn,memo:an=K.y.get(),movement:[,Mn],tap:Rn,velocity:en})=>{const tn=Mn*-1;if(!W.current)return Ct(),an;if(f&&ve&&Rn)return Ct(),setTimeout(()=>f(),0),an;if(Rn)return an;const nn=an+tn,En=tn*en,fn=Math.max(Tt.current,Math.min(et.current,nn+En*2));if(!Qt&&f&&_t>0&&nn+En<Tt.current/2)return Ct(),f(),an;let Wt=Qt?!f&&Tt.current===et.current?nn<Tt.current?Qo(nn,Tt.current,et.current*2,.55):Qo(nn,Tt.current/2,et.current,.55):Qo(nn,f?0:Tt.current,et.current,.55):fn;return I&&ze?(Wt>=et.current&&(Wt=et.current),an===et.current&&z.current&&z.current.scrollTop>0&&(Wt=et.current),xe.current=Wt<et.current):xe.current=!1,Jt&&Lt("DRAG"),kn?(Lt("SNAP",{payload:{y:Wt,velocity:en>.05?en:1,source:"dragging"}}),an):(Z({y:Wt,ready:1,maxHeight:Ge.current,maxSnap:et.current,minSnap:Tt.current,immediate:!0,config:{velocity:en}}),an)},{filterTaps:!0});if(Number.isNaN(et.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(Tt.current))throw new TypeError("minSnapRef is NaN!!");const dn=j$({spring:K});return M.jsxs(MS.div,{...j,"data-rsbs-root":!0,"data-rsbs-state":W$.find(Zt.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!f,"data-rsbs-has-header":!!i,"data-rsbs-has-footer":!!o,className:r,ref:ce,style:{...dn,...$,opacity:K.ready},"data-test-id":x,children:[n,b&&M.jsx(rt,{"data-rsbs-backdrop":!0,...B?wn({closeOnTap:B}):{}},"backdrop"),l.createElement(rt,{...C!=null&&C.overlay?{style:C.overlay}:{},"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Le,"data-rsbs-overlay-has-padding-y":ke,"data-test-id":"CT-BottomSheet-Overlay",key:"overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:ie,onKeyDown:ve=>{ve.key==="Escape"&&(ve.stopPropagation(),f&&f())}},M.jsx(Am,{ref:oe,title:D,header:i,showBack:F,showClose:A,bind:wn,hasHandleBar:R,onBack:k,onClose:f,style:C==null?void 0:C.header}),l.createElement(rt,{...C!=null&&C.body?{style:C.body}:{},key:"scroll","data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Le,"data-rsbs-scroll-has-padding-y":ke,ref:z,...I?wn({isContentDragging:!0}):{}},M.jsx(rt,{...C!=null&&C.content?{style:C.content}:{},"data-rsbs-content":!0,ref:G,children:t})),o&&l.createElement(rt,{...C!=null&&C.footer?{style:C.footer}:{},key:"footer",ref:ne,"data-rsbs-footer":!0,...wn()},o))]})}),K$=l.forwardRef(function({onSpringStart:t,onSpringEnd:n,skipInitialTransition:r,...o},i){const[a,s]=l.useState(!1),c=l.useRef(),u=l.useRef(null),f=l.useRef(r&&o.isOpen?"OPEN":"CLOSED");bi(()=>o.isOpen?(cancelAnimationFrame(c.current),s(!0),()=>{f.current="CLOSED"}):()=>{f.current="CLOSED"},[o.isOpen]);const d=l.useCallback(async function(b){await(t==null?void 0:t(b)),b.type==="OPEN"&&cancelAnimationFrame(c.current)},[t]),m=l.useCallback(async function(b){await(n==null?void 0:n(b)),b.type==="CLOSE"&&(c.current=requestAnimationFrame(()=>s(!1)))},[n]);return a?M.jsx(_v,{"data-rsbs-portal":!0,children:M.jsx(Y$,{...o,lastSnapRef:u,ref:i,initialState:f.current,onSpringStart:d,onSpringEnd:m})}):null}),_o=({size:e,color:t="inherit",thickness:n=3,...r})=>M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",xmlSpace:"preserve",width:e,height:e,...r,children:M.jsx("path",{fill:t,stroke:t,strokeWidth:n,d:"M73 50c0-12.7-10.3-23-23-23S27 37.3 27 50m3.9 0c0-10.5 8.5-19.1 19.1-19.1S69.1 39.5 69.1 50",children:M.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})})});_o.displayName="Spinner";_o.defaultProps={size:24,thickness:3};const q$=({value:e,delay:t=500})=>{const[n,r]=l.useState(e);return l.useEffect(()=>{const o=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(o)}},[JSON.stringify(e),t]),n},X$=q$;process.env.NODE_ENV;var G$=Ke({defaultClassName:"_920fuu5",variantClassNames:{colorScheme:{primary:"_920fuu6",neutral:"_920fuu7",danger:"_920fuu8",warning:"_920fuu9",info:"_920fuua"},variant:{solid:"_920fuub",outline:"_920fuuc",ghost:"_920fuud"},size:{small:"_920fuue",medium:"_920fuuf",large:"_920fuug"},unstyled:{true:"_920fuuh"},isFluid:{true:"_920fuui"}},defaultVariants:{size:"medium",variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_920fuuj"],[{colorScheme:"neutral",variant:"outline"},"_920fuuk"],[{colorScheme:"danger",variant:"outline"},"_920fuul"],[{colorScheme:"warning",variant:"outline"},"_920fuum"],[{colorScheme:"info",variant:"outline"},"_920fuun"],[{size:"small",variant:"outline"},"_920fuuo"],[{size:"large",variant:"outline"},"_920fuup"]]}),Z$={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},Q$={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},Lp={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var J$="p9dczu0";const sl=({ref:e,colorScheme:t="primary"})=>{const[n,r]=l.useState([]),o=X$({value:n,delay:1e3});return l.useEffect(()=>{if(e.current){const i=e.current,a=s=>{const c=i.getBoundingClientRect(),u=s.clientX-c.left,f=s.clientY-c.top,d=i.clientHeight,m=i.clientWidth,p=Math.max(m,d);r([...n,{top:f-p/2,left:u-p/2,height:Math.max(m,d),width:Math.max(m,d),backgroundColor:t==="primary"?Pt.theme.colors.primary:Z$[t]}])};return i.addEventListener("click",a),()=>{i.removeEventListener("click",a)}}return()=>!1},[e,n]),l.useEffect(()=>{o.length&&r([])},[o.length]),n==null?void 0:n.map((i,a)=>M.jsx("span",{className:J$,style:{...i}},a))},mo=l.forwardRef(({as:e,children:t,className:n,colorScheme:r,size:o,isLoading:i,variant:a,style:s,isDisabled:c,isFluid:u,unstyled:f,noRipple:d,...m},p)=>{const b=l.useRef(null),y=sl({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(p,()=>b.current);const $=e||"button";return M.jsx($,{ref:b,as:e,"data-test-id":m["data-test-id"],className:$e(G$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:f}),a==="ghost"?Q$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?M.jsx(_o,{color:a==="outline"||a==="ghost"?Lp[r||"primary"]:Lp.white}):M.jsxs(M.Fragment,{children:[t,!d&&y]})})});mo.displayName="Button";mo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const qm="Checkbox",[eT,LP]=bn(qm),[tT,nT]=eT(qm),rT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...f}=e,[d,m]=l.useState(null),p=lt(t,w=>m(w)),b=l.useRef(!1),y=d?!!d.closest("form"):!0,[$=!1,E]=Tn({prop:o,defaultProp:i,onChange:u}),v=l.useRef($);return l.useEffect(()=>{const w=d==null?void 0:d.form;if(w){const T=()=>E(v.current);return w.addEventListener("reset",T),()=>w.removeEventListener("reset",T)}},[d,E]),l.createElement(tT,{scope:n,state:$,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"checkbox","aria-checked":kr($)?"mixed":$,"aria-required":a,"data-state":Xm($),"data-disabled":s?"":void 0,disabled:s,value:c},f,{ref:p,onKeyDown:Ne(e.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ne(e.onClick,w=>{E(T=>kr(T)?!0:!T),y&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})})),y&&l.createElement(aT,{control:d,bubbles:!b.current,name:r,value:c,checked:$,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),oT="CheckboxIndicator",iT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=nT(oT,n);return l.createElement(yr,{present:r||kr(i.state)||i.state===!0},l.createElement(Ue.span,ae({"data-state":Xm(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),aT=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=cs(n),s=as(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});c.indeterminate=kr(n),d.call(c,kr(n)?!1:n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:kr(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function kr(e){return e==="indeterminate"}function Xm(e){return kr(e)?"indeterminate":e?"checked":"unchecked"}const sT=rT,cT=iT;var uT="glci2q0",Fp="glci2q3",lT="glci2q4",Vp={disabled:"glci2q1",enabled:"glci2q2"},dT=Ke({defaultClassName:"glci2q5",variantClassNames:{checked:{true:"glci2q6",false:"glci2q7",indeterminate:"glci2q8"},disabled:{true:"glci2q9"}},defaultVariants:{checked:!1,disabled:!1},compoundVariants:[[{checked:!1,disabled:!0},"glci2qa"]]});const Gm=l.forwardRef(({children:e,"data-test-id":t,checked:n=!1,onCheckedChange:r,disabled:o,value:i,...a},s)=>{const c=`vds-checkbox-${l.useId()}`,[u,f]=l.useState(n);return l.useEffect(()=>{f(n)},[n]),M.jsxs("div",{className:uT,children:[M.jsx(sT,{id:c,disabled:o,"data-test-id":t,ref:s,value:u?"on":"off",checked:u,className:dT({checked:u,disabled:o}),onCheckedChange:d=>{typeof d=="boolean"&&(r?r(d):f(d))},...a,children:M.jsxs(cT,{className:lT,children:[u==="indeterminate"&&M.jsx(k0,{color:"white",className:Fp}),u===!0&&M.jsx(wu,{color:"white",className:Fp})]})}),e&&M.jsx("label",{htmlFor:c,className:o?Vp.disabled:Vp.enabled,children:e})]})});Gm.defaultProps={"data-test-id":"base"};const fT=e=>l.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var pT=Ke({defaultClassName:"_10le3lp0",variantClassNames:{variant:{filled:"_10le3lp1",outline:"_10le3lp2"},size:{small:"_10le3lp3",medium:"_10le3lp4"},isActive:{true:"_10le3lp5"}},defaultVariants:{variant:"filled",isActive:!1,size:"medium"},compoundVariants:[[{variant:"outline",isActive:!0},"_10le3lp6"],[{variant:"filled",isActive:!0},"_10le3lp7"]]});const cl=l.forwardRef(({as:e,children:t,variant:n,isActive:r,prefixIcon:o,withCloseButton:i,className:a,disabled:s,style:c,onClose:u,size:f,...d},m)=>{const p=e||"button";return M.jsxs(p,{ref:m,as:e,"data-test-id":d["data-test-id"],className:$e(pT({variant:n,isActive:r,size:f}),a),disabled:s,style:c,...d,children:[o&&o,M.jsx(Xt,{textAlign:"left",textStyle:f==="small"?"caption":"body2",children:t}),i&&M.jsx(Wr,{as:"div","data-test-id":"chips-close-button",variant:"small",isDisabled:s,onClick:u})]})});cl.defaultProps={as:"button",children:void 0,isActive:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0,onClose:void 0};cl.displayName="Chip";const Zm="Dialog",[Qm,FP]=bn(Zm),[hT,wr]=Qm(Zm),vT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=l.useRef(null),c=l.useRef(null),[u=!1,f]=Tn({prop:r,defaultProp:o,onChange:i});return l.createElement(hT,{scope:t,triggerRef:s,contentRef:c,contentId:Gn(),titleId:Gn(),descriptionId:Gn(),open:u,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(d=>!d),[f]),modal:a},n)},mT="DialogTrigger",gT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(mT,n),i=lt(t,o.triggerRef);return l.createElement(Ue.button,ae({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ul(o.open)},r,{ref:i,onClick:Ne(e.onClick,o.onOpenToggle)}))}),yT="DialogPortal",[VP,Jm]=Qm(yT,{forceMount:void 0}),ou="DialogOverlay",bT=l.forwardRef((e,t)=>{const n=Jm(ou,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(ou,e.__scopeDialog);return i.modal?l.createElement(yr,{present:r||i.open},l.createElement(wT,ae({},o,{ref:t}))):null}),wT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(ou,n);return l.createElement(dv,{as:lo,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(Ue.div,ae({"data-state":ul(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Ei="DialogContent",ET=l.forwardRef((e,t)=>{const n=Jm(Ei,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(Ei,e.__scopeDialog);return l.createElement(yr,{present:r||i.open},i.modal?l.createElement(xT,ae({},o,{ref:t})):l.createElement(_T,ae({},o,{ref:t})))}),xT=l.forwardRef((e,t)=>{const n=wr(Ei,e.__scopeDialog),r=l.useRef(null),o=lt(t,n.contentRef,r);return l.useEffect(()=>{const i=r.current;if(i)return nv(i)},[]),l.createElement(eg,ae({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ne(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ne(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ne(e.onFocusOutside,i=>i.preventDefault())}))}),_T=l.forwardRef((e,t)=>{const n=wr(Ei,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return l.createElement(eg,ae({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),eg=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=wr(Ei,n),c=l.useRef(null),u=lt(t,c);return Nh(),l.createElement(l.Fragment,null,l.createElement(kh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},l.createElement(rs,ae({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ul(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),ST="DialogClose",CT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(ST,n);return l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ne(e.onClick,()=>o.onOpenChange(!1))}))});function ul(e){return e?"open":"closed"}const $T=vT,TT=gT,IT=bT,RT=ET,OT=CT;var PT="_1jc0z8o4",AT="_1jc0z8o0",DT=Ke({defaultClassName:"_1jc0z8o7",variantClassNames:{size:{full:"_1jc0z8o8",small:"_1jc0z8o9",medium:"_1jc0z8oa",large:"_1jc0z8ob"},noPadding:{true:"_1jc0z8oc"},colorScheme:{primary:"_1jc0z8od",neutral:"_1jc0z8oe",danger:"_1jc0z8of",warning:"_1jc0z8og",info:"_1jc0z8oh",white:"_1jc0z8oi"}},defaultVariants:{size:"medium",noPadding:!1,colorScheme:"white"},compoundVariants:[]}),NT="_1jc0z8o1",kT=Ke({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),MT=Ke({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const tg=l.forwardRef(({children:e,className:t,"data-test-id":n,...r},o)=>M.jsx(RT,{"data-test-id":n,className:t,ref:o,...r,children:e}));tg.defaultProps={"data-test-id":void 0};const jT=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(IT,{className:t,ref:r,...n,children:e})),LT=({children:e,className:t,...n})=>M.jsx(hs,{className:t,...n,children:e}),FT=({children:e,...t})=>M.jsx($T,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(TT,{className:t,...n,ref:r,children:e}));const Pi=l.forwardRef(({children:e,"data-test-id":t,isOpen:n,onClose:r,size:o,destroyOnClose:i,noPadding:a,colorScheme:s,closeOnOverlayClick:c,closeIcon:u,classNameBody:f,isCloseWhenEscape:d,...m},p)=>!n&&i?null:M.jsx(FT,{open:n,onOpenChange:r,children:M.jsxs(LT,{children:[M.jsx(jT,{className:$e(MT())}),M.jsxs(tg,{"data-test-id":t,onInteractOutside:b=>!c&&b.preventDefault(),className:$e(DT({colorScheme:s,size:o,noPadding:a}),f),...m,onEscapeKeyDown:b=>d?r==null?void 0:r():b.preventDefault(),ref:p,children:[r&&!u&&M.jsx(OT,{asChild:!0,"aria-label":"Close",children:M.jsx(Wr,{className:PT,"data-test-id":"close-modal"})}),r&&u&&u,e]})]})}));Pi.displayName="Modal";Pi.defaultProps={children:void 0,"data-test-id":void 0,size:"medium",onClose:void 0,destroyOnClose:!1,noPadding:!1,colorScheme:"white",closeOnOverlayClick:!0,closeIcon:void 0,classNameBody:void 0,isCloseWhenEscape:!0,onOpenAutoFocus:void 0,onCloseAutoFocus:void 0};const $s=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,ref:o,className:AT,...r,children:t})});$s.displayName="modalBody";$s.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Ts=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,className:NT,ref:o,...r,children:t})});Ts.displayName="modalFooter";Ts.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Is=l.forwardRef(({as:e,bold:t,children:n,"data-test-id":r,...o},i)=>{const a=e||"div";return M.jsx(a,{"data-test-id":r,as:e,ref:i,className:kT({bold:t}),...o,children:M.jsx(Xt,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Is.displayName="modalHeader";Is.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};var VT="ayjm8u0";const ll=({isOpen:e,onConfirm:t,onCancel:n,message:r,title:o,confirmTestId:i,isLoading:a,confirmText:s="Confirm",cancelText:c="Cancel",closeOnOverlayClick:u,size:f,classNameBody:d,actionDirection:m})=>M.jsxs(Pi,{classNameBody:d,size:f,isOpen:e,closeOnOverlayClick:u,onClose:n,closeIcon:M.jsx(rt,{display:"none"}),children:[M.jsx(Is,{children:o}),M.jsx($s,{children:M.jsx(Xt,{mt:"$8",mb:"$24",color:"$blackTypoMedium",textStyle:"body2",className:VT,children:r})}),M.jsx(Ts,{style:{maxHeight:"none"},children:M.jsxs(Bt,{gap:"$16",justifyContent:"space-between",flexWrap:m==="horizontal"?"nowrap":"wrap",children:[M.jsx(mo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),M.jsx(mo,{"data-test-id":i,onClick:t,isLoading:a,isFluid:!0,children:s})]})})]});ll.defaultProps={message:void 0,cancelText:void 0,confirmText:void 0,confirmTestId:void 0,isLoading:void 0,closeOnOverlayClick:!0,size:"small",classNameBody:void 0,actionDirection:"horizontal"};const dl=l.createContext({}),BT=({children:e})=>{const[t,n]=l.useState(!1),[r,o]=l.useState(void 0),i=()=>{n(!1),o(void 0)},a=()=>{i(),r!=null&&r.actionCallback(!0)},s=()=>{i(),r!=null&&r.actionCallback(!1)},c=l.useMemo(()=>({openDialog:({...f})=>{n(!0),o(f)}}),[n,o]);return M.jsxs(dl.Provider,{value:c,children:[M.jsx(ll,{isOpen:t,title:(r==null?void 0:r.title)??"",onConfirm:a,onCancel:s,...r}),e]})},HT=()=>{const{openDialog:e}=l.useContext(dl);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}};var WT=Ke({defaultClassName:"_1nya5n80",variantClassNames:{variant:{medium:"_1nya5n81",thin:"_1nya5n82"}},defaultVariants:{variant:"thin"},compoundVariants:[]});const{sizesAtoms:zT}=Pt.atoms,fl=l.forwardRef(({children:e,as:t,variant:n,className:r,style:o,width:i,...a},s)=>{const c=t||"div",{className:u}=zT({width:i??"$full",...a});return M.jsx(c,{ref:s,"data-test-id":a["data-test-id"],className:$e(WT({variant:n}),u,r),style:o,...a,children:e})});fl.defaultProps={variant:"thin",as:"div",children:void 0,"data-test-id":void 0};fl.displayName="Divider";const pl=({children:e,isDisabled:t,className:n})=>M.jsx("div",{className:$e(IE({isDisabled:t}),n),children:e});pl.displayName="ActionIcon";pl.defaultProps={isDisabled:!1,className:void 0};const Ai=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o,className:i},a)=>M.jsxs("label",{ref:a,className:$e(ME({state:Au({isError:e,isDisabled:t}),isTextarea:r}),i),children:[o,n&&"*"]}));Ai.displayName="Label";Ai.defaultProps={isTextarea:!1,className:""};const hl=l.forwardRef(({value:e,type:t,label:n,onClear:r,onBlur:o,isLoading:i,icon:a,isClearable:s=!0,required:c,containerStyles:u,inputAreaClassName:f,onClickIcon:d,...m},p)=>{const{addonLeft:b,addonRight:y,helperTextLeft:$,helperTextRight:E,isError:v,errorMessage:w,isDisabled:T,isValid:I,elementLeft:D,elementRight:A,className:F,...k}=m,B=!!a,R=l.useRef(null);l.useImperativeHandle(p,()=>R.current);const[x,h]=l.useState(!1),[C,P]=l.useState(!1),j=U=>{if(x){const re=R.current;re&&re.focus(),C&&(h(!1),P(!1))}else o==null||o(U)},H=()=>{d==null||d();const U=R.current;U&&U.focus(),C&&(h(!1),P(!1))};return l.useEffect(()=>{C&&h(!0)},[C]),M.jsxs(wo,{addonLeft:b,addonRight:y,elementLeft:D,elementRight:A,helperTextLeft:$,helperTextRight:E,isError:v,errorMessage:w,isDisabled:T,isValid:I,className:u,inputAreaClassName:$e(DE,f),children:[M.jsx("input",{ref:R,type:t,className:$e(AE,F),value:e,disabled:T,"data-test-id":m["data-test-id"],required:c,onBlur:j,...k}),M.jsx(Ai,{isError:v,isDisabled:T,required:c,children:n}),M.jsx("div",{className:$e(NE),"data-test-id":"icon-input-area",onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onTouchStart:()=>P(!0),onClick:()=>{H()},"aria-hidden":"true",children:M.jsxs(pl,{isDisabled:T,className:$e(s&&!i&&!B&&PE),children:[B&&!i&&a,s&&!i&&!B&&M.jsx(R0,{size:24,"data-test-id":`clear-input-${m["data-test-id"]}`,onClick:r}),i&&M.jsx(_o,{color:Pt.theme.colors.green1})]})})]})});hl.displayName="Input";hl.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0,inputAreaClassName:void 0,onClickIcon:void 0};const vl=l.forwardRef(({value:e,label:t,rows:n=4,required:r,containerStyles:o,...i},a)=>{const{helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:f,isDisabled:d,isValid:m,...p}=i,b=l.useRef(null);l.useImperativeHandle(a,()=>b.current);const y=()=>{var $;($=b.current)==null||$.focus()};return M.jsxs(wo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:f,isDisabled:d,isValid:m,className:$e(o),onClick:y,children:[M.jsx("textarea",{ref:b,className:$e(jE),value:e,rows:n,disabled:d,"data-test-id":i["data-test-id"],required:r,...p}),M.jsx(Ai,{isTextarea:!0,isError:u,isDisabled:d,required:r,children:t})]})});vl.displayName="Textarea";vl.defaultProps={containerStyles:void 0,"data-test-id":void 0};var UT=Ke({defaultClassName:"_1n7m27n0",variantClassNames:{colorScheme:{primary:"_1n7m27n1",neutral:"_1n7m27n2",danger:"_1n7m27n3",warning:"_1n7m27n4",info:"_1n7m27n5"},variant:{solid:"_1n7m27n6",outline:"_1n7m27n7"},unstyled:{true:"_1n7m27n8"}},defaultVariants:{variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_1n7m27n9"],[{colorScheme:"neutral",variant:"outline"},"_1n7m27na"],[{colorScheme:"danger",variant:"outline"},"_1n7m27nb"],[{colorScheme:"warning",variant:"outline"},"_1n7m27nc"],[{colorScheme:"info",variant:"outline"},"_1n7m27nd"]]}),Bp={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const ml=l.forwardRef(({as:e,className:t,style:n,colorScheme:r,icon:o,unstyled:i,variant:a,isDisabled:s,isLoading:c,...u},f)=>{const d=l.useRef(null),m=sl({ref:d,colorScheme:r,variant:a});l.useImperativeHandle(f,()=>d.current);const p=e||"button";return M.jsx(p,{ref:d,as:e,"data-test-id":u["data-test-id"],className:$e(UT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?M.jsx(_o,{color:a==="outline"?Bp[r||"primary"]:Bp.white}):M.jsxs(M.Fragment,{children:[m,o]})})});ml.displayName="Button";ml.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var YT=Ke({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const KT=({width:e=140,height:t=140,viewBox:n="0 0 140 140",...r})=>M.jsx("svg",{"data-test-id":"illustration-fallback-image",width:e,height:t,viewBox:n,fill:"none",...r,children:M.jsx("path",{d:"M85.604 0H0V140H130V43.7197L85.604 0ZM119.088 129.24H10.9305V93.2855L23.0998 101.606L48.3128 71.9816L70.6656 103.991L83.7094 86.5608L106.062 92.0123L87.2618 70.7801L71.7769 89.1789L50.5353 52.3812L22.8812 79.3877L10.9305 68.1798V10.7596H80.9767V48.0594H118.96L119.07 48.167V129.24H119.088Z",fill:"#EEEEEE"})}),gl=l.forwardRef(({as:e,src:t,fit:n,width:r,height:o,loading:i,isLoading:a,fallback:s,onLoad:c,onError:u,className:f,"data-test-id":d,...m},p)=>{const b=e||"img",y=l.useMemo(()=>`${parseInt(`${r??0}`,10)}px`,[r]),$=l.useMemo(()=>`${parseInt(`${o??0}`,10)}px`,[o]),[E,v]=l.useState(!1),[w,T]=l.useState(n),I=A=>{T("fill"),v(!0),u==null||u(A)},D=A=>{v(!1),c==null||c(A)};return a&&!E?M.jsx(rt,{bgColor:"$grey2",width:y,height:$}):E?s||M.jsx(KT,{width:y,height:$}):M.jsx(b,{"data-test-id":d,as:"img",width:y,height:$,src:t,loading:i,onLoad:D,onError:I,ref:p,className:$e(YT({fit:w})),...m})});gl.displayName="Image";gl.defaultProps={as:"img","data-test-id":void 0,fallback:void 0,width:void 0,height:void 0,loading:void 0,isLoading:void 0,onLoad:void 0,onError:void 0,fit:void 0};var ng=Ke({defaultClassName:"_5y0pl50",variantClassNames:{textStyle:{heading1:"_5y0pl51",heading2:"_5y0pl52",heading3:"_5y0pl53",heading4:"_5y0pl54",heading5:"_5y0pl55",heading6:"_5y0pl56",subtitle1:"_5y0pl57",subtitle2:"_5y0pl58",body1:"_5y0pl59",body2:"_5y0pl5a",caption:"_5y0pl5b",footer:"_5y0pl5c"},isDisabled:{true:"_5y0pl5d"},isStandalone:{true:"_5y0pl5e",false:"_5y0pl5f"},isBold:{true:"_5y0pl5g"}},defaultVariants:{isStandalone:!1,isDisabled:!1,isBold:!1,textStyle:"body1"},compoundVariants:[]});const rg=({children:e,className:t,isStandalone:n,textStyle:r="body2",isDisabled:o,isBold:i,...a})=>M.jsx("a",{className:$e(t,ng({isDisabled:o,textStyle:r,isBold:i,isStandalone:n})),"data-disabled":o,...a,children:e});var qT="_1cq2k9i0";const yl=l.forwardRef(({children:e,as:t,className:n,variant:r,...o},i)=>{const a=t||"ul";return M.jsx(a,{"data-test-id":o["data-test-id"],ref:i,className:$e(qT,n),...o,children:l.Children.map(e,s=>l.cloneElement(s,{variant:r}))})});yl.displayName="List";yl.defaultProps={"data-test-id":void 0,as:"ul",variant:"default"};var XT="xw6nfa0",GT="xw6nfa1",ZT=Ke({defaultClassName:"xw6nfa2",variantClassNames:{variant:{small:"xw6nfa3",default:"xw6nfa4"}},defaultVariants:{variant:"default"},compoundVariants:[]});const bl=l.forwardRef(({children:e,leftIcon:t,rightIcon:n,href:r,target:o,as:i,className:a,variant:s,...c},u)=>{const f=i||"li",d=r?"a":rt;return M.jsx(f,{"data-test-id":c["data-test-id"],className:$e(XT,a),...c,ref:u,children:M.jsxs(d,{href:r,target:o,className:ZT({variant:s}),children:[t,M.jsx("div",{className:GT,children:e}),n]})})});bl.displayName="ListItem";bl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li",variant:void 0};var og={},ig={exports:{}};(function(e,t){(function(r,o){e.exports=o()})(Wy,()=>(()=>{var n=[,(a,s,c)=>{c.r(s),c.d(s,{default:()=>f});var u=(()=>{var d=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(m={}){var p=m,b,y;p.ready=new Promise((S,g)=>{b=S,y=g});function $(){function S(ue){const se=N;O=g=0,N=new Map,se.forEach(de=>{try{de(ue)}catch(le){console.error(le)}}),this.Qa(),q&&q.nb()}let g=0,O=0,N=new Map,q=null,te=null;this.requestAnimationFrame=function(ue){g||(g=requestAnimationFrame(S.bind(this)));const se=++O;return N.set(se,ue),se},this.cancelAnimationFrame=function(ue){N.delete(ue),g&&N.size==0&&(cancelAnimationFrame(g),g=0)},this.lb=function(ue){te&&(document.body.remove(te),te=null),ue||(te=document.createElement("div"),te.style.backgroundColor="black",te.style.position="fixed",te.style.right=0,te.style.top=0,te.style.color="white",te.style.padding="4px",te.innerHTML="RIVE FPS",ue=function(se){te.innerHTML="RIVE FPS "+se.toFixed(1)},document.body.appendChild(te)),q=new function(){let se=0,de=0;this.nb=function(){var le=performance.now();de?(++se,le-=de,1e3<le&&(ue(1e3*se/le),se=de=0)):(de=le,se=0)}}},this.ib=function(){te&&(document.body.remove(te),te=null),q=null},this.Qa=function(){}}function E(S){console.assert(!0);const g=new Map;let O=-1/0;this.push=function(N){return N=N+((1<<S)-1)>>S,g.has(N)&&clearTimeout(g.get(N)),g.set(N,setTimeout(function(){g.delete(N),g.length==0?O=-1/0:N==O&&(O=Math.max(...g.keys()),console.assert(O<N))},1e3)),O=Math.max(N,O),O<<S}}const v=new function(){function S(){if(!g){let xt=function(Nt,Ve,Ye){if(Ve=ye.createShader(Ve),ye.shaderSource(Ve,Ye),ye.compileShader(Ve),Ye=ye.getShaderInfoLog(Ve),0<Ye.length)throw Ye;ye.attachShader(Nt,Ve)};var Re=document.createElement("canvas"),je={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ye=Re.getContext("webgl2",je);if(ye)O=2;else if(ye=Re.getContext("webgl",je))O=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(N=Math.min(ye.getParameter(ye.MAX_RENDERBUFFER_SIZE),ye.getParameter(ye.MAX_TEXTURE_SIZE)),Re=ye.createProgram(),xt(Re,ye.VERTEX_SHADER,`attribute vec2 vertex;
|
|
147
147
|
attribute vec2 uv;
|
|
148
148
|
uniform vec4 mat;
|
|
149
149
|
uniform vec2 translate;
|
|
@@ -156,7 +156,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
156
156
|
varying vec2 st;
|
|
157
157
|
void main() {
|
|
158
158
|
gl_FragColor = texture2D(image, st);
|
|
159
|
-
}`),ye.bindAttribLocation(Re,0,"vertex"),ye.bindAttribLocation(Re,1,"uv"),ye.linkProgram(Re),je=ye.getProgramInfoLog(Re),0<je.trim().length)throw je;q=ye.getUniformLocation(Re,"mat"),te=ye.getUniformLocation(Re,"translate"),ye.useProgram(Re),ye.bindBuffer(ye.ARRAY_BUFFER,ye.createBuffer()),ye.enableVertexAttribArray(0),ye.enableVertexAttribArray(1),ye.bindBuffer(ye.ELEMENT_ARRAY_BUFFER,ye.createBuffer()),ye.uniform1i(ye.getUniformLocation(Re,"image"),0),ye.pixelStorei(ye.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),g=ye}return!0}let g=null,O=0,N=0,q=null,te=null,ue=0,se=0;this.wb=function(){return S(),N},this.gb=function(Re){if(!S())return null;const je=g.createTexture();return g.bindTexture(g.TEXTURE_2D,je),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,Re),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.LINEAR),O==2?(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR_MIPMAP_LINEAR),g.generateMipmap(g.TEXTURE_2D)):g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR),je};const de=new E(8),le=new E(8),ge=new E(10),Ce=new E(10);this.kb=function(Re,je,ye,xt,Nt){if(S()){var Ve=de.push(Re),Ye=le.push(je);(g.canvas.width!=Ve||g.canvas.height!=Ye)&&(g.canvas.width=Ve,g.canvas.height=Ye),g.viewport(0,Ye-je,Re,je),g.disable(g.SCISSOR_TEST),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),g.enable(g.SCISSOR_TEST),ye.sort((nt,or)=>or.Ua-nt.Ua),Ve=ge.push(xt),ue!=Ve&&(g.bufferData(g.ARRAY_BUFFER,8*Ve,g.DYNAMIC_DRAW),ue=Ve),Ve=0;for(var kt of ye)g.bufferSubData(g.ARRAY_BUFFER,Ve,kt.Da),Ve+=4*kt.Da.length;console.assert(Ve==4*xt);for(var pn of ye)g.bufferSubData(g.ARRAY_BUFFER,Ve,pn.Xa),Ve+=4*pn.Xa.length;console.assert(Ve==8*xt),Ve=Ce.push(Nt),se!=Ve&&(g.bufferData(g.ELEMENT_ARRAY_BUFFER,2*Ve,g.DYNAMIC_DRAW),se=Ve),kt=0;for(var Un of ye)g.bufferSubData(g.ELEMENT_ARRAY_BUFFER,kt,Un.indices),kt+=2*Un.indices.length;console.assert(kt==2*Nt),Un=0,pn=!0,Ve=kt=0;for(const nt of ye){nt.image.za!=Un&&(g.bindTexture(g.TEXTURE_2D,nt.image.cb||null),Un=nt.image.za),nt.zb?(g.scissor(nt.Ia,Ye-nt.Ja-nt.Pa,nt.Gb,nt.Pa),pn=!0):pn&&(g.scissor(0,Ye-je,Re,je),pn=!1),ye=2/Re;const or=-2/je;g.uniform4f(q,nt.oa[0]*ye*nt.va,nt.oa[1]*or*nt.wa,nt.oa[2]*ye*nt.va,nt.oa[3]*or*nt.wa),g.uniform2f(te,nt.oa[4]*ye*nt.va+ye*(nt.Ia-nt.xb*nt.va)-1,nt.oa[5]*or*nt.wa+or*(nt.Ja-nt.yb*nt.wa)+1),g.vertexAttribPointer(0,2,g.FLOAT,!1,0,Ve),g.vertexAttribPointer(1,2,g.FLOAT,!1,0,Ve+4*xt),g.drawElements(g.TRIANGLES,nt.indices.length,g.UNSIGNED_SHORT,kt),Ve+=4*nt.Da.length,kt+=2*nt.indices.length}console.assert(Ve==4*xt),console.assert(kt==2*Nt)}},this.canvas=function(){return S()&&g.canvas}};p.onRuntimeInitialized=function(){function S(he){switch(he){case le.srcOver:return"source-over";case le.screen:return"screen";case le.overlay:return"overlay";case le.darken:return"darken";case le.lighten:return"lighten";case le.colorDodge:return"color-dodge";case le.colorBurn:return"color-burn";case le.hardLight:return"hard-light";case le.softLight:return"soft-light";case le.difference:return"difference";case le.exclusion:return"exclusion";case le.multiply:return"multiply";case le.hue:return"hue";case le.saturation:return"saturation";case le.color:return"color";case le.luminosity:return"luminosity"}}function g(he){return"rgba("+((16711680&he)>>>16)+","+((65280&he)>>>8)+","+((255&he)>>>0)+","+((4278190080&he)>>>24)/255+")"}function O(){0<kt.length&&(v.kb(Ye.drawWidth(),Ye.drawHeight(),kt,pn,Un),kt=[],Un=pn=0,Ye.reset(512,512));for(const he of Ve){for(const Me of he.da)Me();he.da=[]}Ve.clear()}var N=p.RenderPaintStyle;const q=p.RenderPath,te=p.RenderPaint,ue=p.Renderer,se=p.StrokeCap,de=p.StrokeJoin,le=p.BlendMode,ge=N.fill,Ce=N.stroke,Re=p.FillRule.evenOdd;let je=1;var ye=p.RenderImage.extend("CanvasRenderImage",{__construct:function(){this.__parent.__construct.call(this),this.za=je,je=je+1&2147483647||1},decode:function(he){let Me=Vs;Me.total++;var mt=this,lt=new Image;lt.src=URL.createObjectURL(new Blob([he],{type:"image/png"})),lt.onload=function(){if(mt.ab=lt,mt.cb=v.gb(lt),mt.size(lt.width,lt.height),Me.loaded++,Me.loaded===Me.total){const gt=Me.ready;gt&&(gt(),Me.ready=null)}}}}),xt=q.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.ia=new Path2D},rewind:function(){this.ia=new Path2D},addPath:function(he,Me,mt,lt,gt,It,it){var pt=this.ia,xn=pt.addPath;he=he.ia;const Ft=new DOMMatrix;Ft.a=Me,Ft.b=mt,Ft.c=lt,Ft.d=gt,Ft.e=It,Ft.f=it,xn.call(pt,he,Ft)},fillRule:function(he){this.Ga=he},moveTo:function(he,Me){this.ia.moveTo(he,Me)},lineTo:function(he,Me){this.ia.lineTo(he,Me)},cubicTo:function(he,Me,mt,lt,gt,It){this.ia.bezierCurveTo(he,Me,mt,lt,gt,It)},close:function(){this.ia.closePath()}}),Nt=te.extend("CanvasRenderPaint",{color:function(he){this.Ha=g(he)},thickness:function(he){this.eb=he},join:function(he){switch(he){case de.miter:this.ya="miter";break;case de.round:this.ya="round";break;case de.bevel:this.ya="bevel"}},cap:function(he){switch(he){case se.butt:this.xa="butt";break;case se.round:this.xa="round";break;case se.square:this.xa="square"}},style:function(he){this.bb=he},blendMode:function(he){this.$a=S(he)},clearGradient:function(){this.qa=null},linearGradient:function(he,Me,mt,lt){this.qa={Va:he,Wa:Me,La:mt,Ma:lt,Ca:[]}},radialGradient:function(he,Me,mt,lt){this.qa={Va:he,Wa:Me,La:mt,Ma:lt,Ca:[],ub:!0}},addStop:function(he,Me){this.qa.Ca.push({color:he,stop:Me})},completeGradient:function(){},draw:function(he,Me,mt){let lt=this.bb;var gt=this.Ha,It=this.qa;if(he.globalCompositeOperation=this.$a,It!=null){gt=It.Va;var it=It.Wa;const xn=It.La;var pt=It.Ma;const Ft=It.Ca;It.ub?(It=xn-gt,pt-=it,gt=he.createRadialGradient(gt,it,0,gt,it,Math.sqrt(It*It+pt*pt))):gt=he.createLinearGradient(gt,it,xn,pt);for(let jn=0,Ht=Ft.length;jn<Ht;jn++)it=Ft[jn],gt.addColorStop(it.stop,g(it.color));this.Ha=gt,this.qa=null}switch(lt){case Ce:he.strokeStyle=gt,he.lineWidth=this.eb,he.lineCap=this.xa,he.lineJoin=this.ya,he.stroke(Me);break;case ge:he.fillStyle=gt,he.fill(Me,mt)}}});const Ve=new Set;let Ye=null,kt=[],pn=0,Un=0;var nt=p.CanvasRenderer=ue.extend("Renderer",{__construct:function(he){this.__parent.__construct.call(this),this.ha=[1,0,0,1,0,0],this.ba=he.getContext("2d"),this.Fa=he,this.da=[]},save:function(){this.ha.push(...this.ha.slice(this.ha.length-6)),this.da.push(this.ba.save.bind(this.ba))},restore:function(){const he=this.ha.length-6;if(6>he)throw"restore() called without matching save().";this.ha.splice(he),this.da.push(this.ba.restore.bind(this.ba))},transform:function(he,Me,mt,lt,gt,It){const it=this.ha,pt=it.length-6;it.splice(pt,6,it[pt]*he+it[pt+2]*Me,it[pt+1]*he+it[pt+3]*Me,it[pt]*mt+it[pt+2]*lt,it[pt+1]*mt+it[pt+3]*lt,it[pt]*gt+it[pt+2]*It+it[pt+4],it[pt+1]*gt+it[pt+3]*It+it[pt+5]),this.da.push(this.ba.transform.bind(this.ba,he,Me,mt,lt,gt,It))},rotate:function(he){const Me=Math.sin(he);he=Math.cos(he),this.transform(he,Me,-Me,he,0,0)},_drawPath:function(he,Me){this.da.push(Me.draw.bind(Me,this.ba,he.ia,he.Ga===Re?"evenodd":"nonzero"))},drawImage:function(he,...Me){var mt=this.ba;this.da.push(function(){mt.drawImage(he,...Me)})},_drawRiveImage:function(he,Me,mt){var lt=he.ab;if(lt){var gt=this.ba,It=S(Me);this.da.push(function(){gt.globalCompositeOperation=It,gt.globalAlpha=mt,gt.drawImage(lt,0,0),gt.globalAlpha=1})}},_getMatrix:function(he){const Me=this.ha,mt=Me.length-6;for(let lt=0;6>lt;++lt)he[lt]=Me[mt+lt]},_drawImageMesh:function(he,Me,mt,lt,gt,It,it,pt,xn,Ft){var jn=this.ba.canvas.width,Ht=this.ba.canvas.height;const Id=xn-it,Rd=Ft-pt;it=Math.max(it,0),pt=Math.max(pt,0),xn=Math.min(xn,jn),Ft=Math.min(Ft,Ht);const So=xn-it,Co=Ft-pt;if(console.assert(So<=Math.min(Id,jn)),console.assert(Co<=Math.min(Rd,Ht)),!(0>=So||0>=Co)){xn=So<Id||Co<Rd,jn=Ft=1;var xr=Math.ceil(So*Ft),_r=Math.ceil(Co*jn);Ht=v.wb(),xr>Ht&&(Ft*=Ht/xr,xr=Ht),_r>Ht&&(jn*=Ht/_r,_r=Ht),Ye||(Ye=new p.DynamicRectanizer(Ht),Ye.reset(512,512)),Ht=Ye.addRect(xr,_r),0>Ht&&(O(),Ve.add(this),Ht=Ye.addRect(xr,_r),console.assert(0<=Ht));var Od=Ht&65535,Pd=Ht>>16;kt.push({oa:this.ha.slice(this.ha.length-6),image:he,Ia:Od,Ja:Pd,xb:it,yb:pt,Gb:xr,Pa:_r,va:Ft,wa:jn,Da:new Float32Array(lt),Xa:new Float32Array(gt),indices:new Uint16Array(It),zb:xn,Ua:he.za<<1|(xn?1:0)}),pn+=lt.length,Un+=It.length;var zr=this.ba,By=S(Me);this.da.push(function(){zr.save(),zr.resetTransform(),zr.globalCompositeOperation=By,zr.globalAlpha=mt,zr.drawImage(v.canvas(),Od,Pd,xr,_r,it,pt,So,Co),zr.restore()})}},_clipPath:function(he){this.da.push(this.ba.clip.bind(this.ba,he.ia,he.Ga===Re?"evenodd":"nonzero"))},clear:function(){Ve.add(this),this.da.push(this.ba.clearRect.bind(this.ba,0,0,this.Fa.width,this.Fa.height))},flush:function(){},translate:function(he,Me){this.transform(1,0,0,1,he,Me)}});p.makeRenderer=function(he){return new nt(he)},p.renderFactory={makeRenderPaint:function(){return new Nt},makeRenderPath:function(){return new xt},makeRenderImage:function(){return new ye}};let or=p.load,Vs=null;p.load=function(he){return new Promise(function(Me){let mt=null;Vs={total:0,loaded:0,ready:function(){Me(mt)}},mt=or(he),Vs.total==0&&Me(mt)})},N=new $,p.requestAnimationFrame=N.requestAnimationFrame.bind(N),p.cancelAnimationFrame=N.cancelAnimationFrame.bind(N),p.enableFPSCounter=N.lb.bind(N),p.disableFPSCounter=N.ib,N.Qa=O,p.cleanup=function(){Ye&&Ye.delete()}};var w=Object.assign({},p),T="./this.program",I=typeof window=="object",D=typeof importScripts=="function",A="",F,k;(I||D)&&(D?A=self.location.href:typeof document<"u"&&document.currentScript&&(A=document.currentScript.src),d&&(A=d),A.indexOf("blob:")!==0?A=A.substr(0,A.replace(/[?#].*/,"").lastIndexOf("/")+1):A="",D&&(k=S=>{var g=new XMLHttpRequest;return g.open("GET",S,!1),g.responseType="arraybuffer",g.send(null),new Uint8Array(g.response)}),F=(S,g,O)=>{var N=new XMLHttpRequest;N.open("GET",S,!0),N.responseType="arraybuffer",N.onload=()=>{N.status==200||N.status==0&&N.response?g(N.response):O()},N.onerror=O,N.send(null)});var B=p.print||console.log.bind(console),R=p.printErr||console.error.bind(console);Object.assign(p,w),w=null,p.thisProgram&&(T=p.thisProgram);var x;p.wasmBinary&&(x=p.wasmBinary),p.noExitRuntime,typeof WebAssembly!="object"&&ie("no native wasm support detected");var h,C=!1,P,j,H,U,re,W,L,J;function Y(){var S=h.buffer;p.HEAP8=P=new Int8Array(S),p.HEAP16=H=new Int16Array(S),p.HEAP32=re=new Int32Array(S),p.HEAPU8=j=new Uint8Array(S),p.HEAPU16=U=new Uint16Array(S),p.HEAPU32=W=new Uint32Array(S),p.HEAPF32=L=new Float32Array(S),p.HEAPF64=J=new Float64Array(S)}var K,Z=[],ce=[],z=[];function G(){var S=p.preRun.shift();Z.unshift(S)}var oe=0,ne=null;function ie(S){throw p.onAbort&&p.onAbort(S),S="Aborted("+S+")",R(S),C=!0,S=new WebAssembly.RuntimeError(S+". Build with -sASSERTIONS for more info."),y(S),S}function ee(S){return S.startsWith("data:application/octet-stream;base64,")}var pe;if(pe="canvas_advanced.wasm",!ee(pe)){var xe=pe;pe=p.locateFile?p.locateFile(xe,A):A+xe}function Ee(S){if(S==pe&&x)return new Uint8Array(x);if(k)return k(S);throw"both async and sync fetching of the wasm failed"}function Ae(S){if(!x&&(I||D)){if(typeof fetch=="function"&&!S.startsWith("file://"))return fetch(S,{credentials:"same-origin"}).then(g=>{if(!g.ok)throw"failed to load wasm binary file at '"+S+"'";return g.arrayBuffer()}).catch(()=>Ee(S));if(F)return new Promise((g,O)=>{F(S,N=>g(new Uint8Array(N)),O)})}return Promise.resolve().then(()=>Ee(S))}function Ie(S,g,O){return Ae(S).then(N=>WebAssembly.instantiate(N,g)).then(N=>N).then(O,N=>{R("failed to asynchronously prepare wasm: "+N),ie(N)})}function Le(S,g){var O=pe;return x||typeof WebAssembly.instantiateStreaming!="function"||ee(O)||O.startsWith("file://")||typeof fetch!="function"?Ie(O,S,g):fetch(O,{credentials:"same-origin"}).then(N=>WebAssembly.instantiateStreaming(N,S).then(g,function(q){return R("wasm streaming compile failed: "+q),R("falling back to ArrayBuffer instantiation"),Ie(O,S,g)}))}var ke=S=>{for(;0<S.length;)S.shift()(p)};function at(S){if(S===void 0)return"_unknown";S=S.replace(/[^a-zA-Z0-9_]/g,"$");var g=S.charCodeAt(0);return 48<=g&&57>=g?`_${S}`:S}function We(S,g){return S=at(S),{[S]:function(){return g.apply(this,arguments)}}[S]}function Et(){this.ja=[void 0],this.Oa=[]}var Xe=new Et,At=void 0;function Te(S){throw new At(S)}var $t=S=>(S||Te("Cannot use deleted val. handle = "+S),Xe.get(S).value),Ge=S=>{switch(S){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Xe.Ya({Ta:1,value:S})}};function Tt(S){var g=Error,O=We(S,function(N){this.name=S,this.message=N,N=Error(N).stack,N!==void 0&&(this.stack=this.toString()+`
|
|
159
|
+
}`),ye.bindAttribLocation(Re,0,"vertex"),ye.bindAttribLocation(Re,1,"uv"),ye.linkProgram(Re),je=ye.getProgramInfoLog(Re),0<je.trim().length)throw je;q=ye.getUniformLocation(Re,"mat"),te=ye.getUniformLocation(Re,"translate"),ye.useProgram(Re),ye.bindBuffer(ye.ARRAY_BUFFER,ye.createBuffer()),ye.enableVertexAttribArray(0),ye.enableVertexAttribArray(1),ye.bindBuffer(ye.ELEMENT_ARRAY_BUFFER,ye.createBuffer()),ye.uniform1i(ye.getUniformLocation(Re,"image"),0),ye.pixelStorei(ye.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),g=ye}return!0}let g=null,O=0,N=0,q=null,te=null,ue=0,se=0;this.wb=function(){return S(),N},this.gb=function(Re){if(!S())return null;const je=g.createTexture();return g.bindTexture(g.TEXTURE_2D,je),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,Re),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.LINEAR),O==2?(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR_MIPMAP_LINEAR),g.generateMipmap(g.TEXTURE_2D)):g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR),je};const de=new E(8),le=new E(8),ge=new E(10),Ce=new E(10);this.kb=function(Re,je,ye,xt,Nt){if(S()){var Ve=de.push(Re),Ye=le.push(je);(g.canvas.width!=Ve||g.canvas.height!=Ye)&&(g.canvas.width=Ve,g.canvas.height=Ye),g.viewport(0,Ye-je,Re,je),g.disable(g.SCISSOR_TEST),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),g.enable(g.SCISSOR_TEST),ye.sort((nt,or)=>or.Ua-nt.Ua),Ve=ge.push(xt),ue!=Ve&&(g.bufferData(g.ARRAY_BUFFER,8*Ve,g.DYNAMIC_DRAW),ue=Ve),Ve=0;for(var kt of ye)g.bufferSubData(g.ARRAY_BUFFER,Ve,kt.Da),Ve+=4*kt.Da.length;console.assert(Ve==4*xt);for(var pn of ye)g.bufferSubData(g.ARRAY_BUFFER,Ve,pn.Xa),Ve+=4*pn.Xa.length;console.assert(Ve==8*xt),Ve=Ce.push(Nt),se!=Ve&&(g.bufferData(g.ELEMENT_ARRAY_BUFFER,2*Ve,g.DYNAMIC_DRAW),se=Ve),kt=0;for(var Un of ye)g.bufferSubData(g.ELEMENT_ARRAY_BUFFER,kt,Un.indices),kt+=2*Un.indices.length;console.assert(kt==2*Nt),Un=0,pn=!0,Ve=kt=0;for(const nt of ye){nt.image.za!=Un&&(g.bindTexture(g.TEXTURE_2D,nt.image.cb||null),Un=nt.image.za),nt.zb?(g.scissor(nt.Ia,Ye-nt.Ja-nt.Pa,nt.Gb,nt.Pa),pn=!0):pn&&(g.scissor(0,Ye-je,Re,je),pn=!1),ye=2/Re;const or=-2/je;g.uniform4f(q,nt.oa[0]*ye*nt.va,nt.oa[1]*or*nt.wa,nt.oa[2]*ye*nt.va,nt.oa[3]*or*nt.wa),g.uniform2f(te,nt.oa[4]*ye*nt.va+ye*(nt.Ia-nt.xb*nt.va)-1,nt.oa[5]*or*nt.wa+or*(nt.Ja-nt.yb*nt.wa)+1),g.vertexAttribPointer(0,2,g.FLOAT,!1,0,Ve),g.vertexAttribPointer(1,2,g.FLOAT,!1,0,Ve+4*xt),g.drawElements(g.TRIANGLES,nt.indices.length,g.UNSIGNED_SHORT,kt),Ve+=4*nt.Da.length,kt+=2*nt.indices.length}console.assert(Ve==4*xt),console.assert(kt==2*Nt)}},this.canvas=function(){return S()&&g.canvas}};p.onRuntimeInitialized=function(){function S(he){switch(he){case le.srcOver:return"source-over";case le.screen:return"screen";case le.overlay:return"overlay";case le.darken:return"darken";case le.lighten:return"lighten";case le.colorDodge:return"color-dodge";case le.colorBurn:return"color-burn";case le.hardLight:return"hard-light";case le.softLight:return"soft-light";case le.difference:return"difference";case le.exclusion:return"exclusion";case le.multiply:return"multiply";case le.hue:return"hue";case le.saturation:return"saturation";case le.color:return"color";case le.luminosity:return"luminosity"}}function g(he){return"rgba("+((16711680&he)>>>16)+","+((65280&he)>>>8)+","+((255&he)>>>0)+","+((4278190080&he)>>>24)/255+")"}function O(){0<kt.length&&(v.kb(Ye.drawWidth(),Ye.drawHeight(),kt,pn,Un),kt=[],Un=pn=0,Ye.reset(512,512));for(const he of Ve){for(const Me of he.da)Me();he.da=[]}Ve.clear()}var N=p.RenderPaintStyle;const q=p.RenderPath,te=p.RenderPaint,ue=p.Renderer,se=p.StrokeCap,de=p.StrokeJoin,le=p.BlendMode,ge=N.fill,Ce=N.stroke,Re=p.FillRule.evenOdd;let je=1;var ye=p.RenderImage.extend("CanvasRenderImage",{__construct:function(){this.__parent.__construct.call(this),this.za=je,je=je+1&2147483647||1},decode:function(he){let Me=Vs;Me.total++;var mt=this,dt=new Image;dt.src=URL.createObjectURL(new Blob([he],{type:"image/png"})),dt.onload=function(){if(mt.ab=dt,mt.cb=v.gb(dt),mt.size(dt.width,dt.height),Me.loaded++,Me.loaded===Me.total){const gt=Me.ready;gt&&(gt(),Me.ready=null)}}}}),xt=q.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.ia=new Path2D},rewind:function(){this.ia=new Path2D},addPath:function(he,Me,mt,dt,gt,It,it){var pt=this.ia,xn=pt.addPath;he=he.ia;const Ft=new DOMMatrix;Ft.a=Me,Ft.b=mt,Ft.c=dt,Ft.d=gt,Ft.e=It,Ft.f=it,xn.call(pt,he,Ft)},fillRule:function(he){this.Ga=he},moveTo:function(he,Me){this.ia.moveTo(he,Me)},lineTo:function(he,Me){this.ia.lineTo(he,Me)},cubicTo:function(he,Me,mt,dt,gt,It){this.ia.bezierCurveTo(he,Me,mt,dt,gt,It)},close:function(){this.ia.closePath()}}),Nt=te.extend("CanvasRenderPaint",{color:function(he){this.Ha=g(he)},thickness:function(he){this.eb=he},join:function(he){switch(he){case de.miter:this.ya="miter";break;case de.round:this.ya="round";break;case de.bevel:this.ya="bevel"}},cap:function(he){switch(he){case se.butt:this.xa="butt";break;case se.round:this.xa="round";break;case se.square:this.xa="square"}},style:function(he){this.bb=he},blendMode:function(he){this.$a=S(he)},clearGradient:function(){this.qa=null},linearGradient:function(he,Me,mt,dt){this.qa={Va:he,Wa:Me,La:mt,Ma:dt,Ca:[]}},radialGradient:function(he,Me,mt,dt){this.qa={Va:he,Wa:Me,La:mt,Ma:dt,Ca:[],ub:!0}},addStop:function(he,Me){this.qa.Ca.push({color:he,stop:Me})},completeGradient:function(){},draw:function(he,Me,mt){let dt=this.bb;var gt=this.Ha,It=this.qa;if(he.globalCompositeOperation=this.$a,It!=null){gt=It.Va;var it=It.Wa;const xn=It.La;var pt=It.Ma;const Ft=It.Ca;It.ub?(It=xn-gt,pt-=it,gt=he.createRadialGradient(gt,it,0,gt,it,Math.sqrt(It*It+pt*pt))):gt=he.createLinearGradient(gt,it,xn,pt);for(let jn=0,Ht=Ft.length;jn<Ht;jn++)it=Ft[jn],gt.addColorStop(it.stop,g(it.color));this.Ha=gt,this.qa=null}switch(dt){case Ce:he.strokeStyle=gt,he.lineWidth=this.eb,he.lineCap=this.xa,he.lineJoin=this.ya,he.stroke(Me);break;case ge:he.fillStyle=gt,he.fill(Me,mt)}}});const Ve=new Set;let Ye=null,kt=[],pn=0,Un=0;var nt=p.CanvasRenderer=ue.extend("Renderer",{__construct:function(he){this.__parent.__construct.call(this),this.ha=[1,0,0,1,0,0],this.ba=he.getContext("2d"),this.Fa=he,this.da=[]},save:function(){this.ha.push(...this.ha.slice(this.ha.length-6)),this.da.push(this.ba.save.bind(this.ba))},restore:function(){const he=this.ha.length-6;if(6>he)throw"restore() called without matching save().";this.ha.splice(he),this.da.push(this.ba.restore.bind(this.ba))},transform:function(he,Me,mt,dt,gt,It){const it=this.ha,pt=it.length-6;it.splice(pt,6,it[pt]*he+it[pt+2]*Me,it[pt+1]*he+it[pt+3]*Me,it[pt]*mt+it[pt+2]*dt,it[pt+1]*mt+it[pt+3]*dt,it[pt]*gt+it[pt+2]*It+it[pt+4],it[pt+1]*gt+it[pt+3]*It+it[pt+5]),this.da.push(this.ba.transform.bind(this.ba,he,Me,mt,dt,gt,It))},rotate:function(he){const Me=Math.sin(he);he=Math.cos(he),this.transform(he,Me,-Me,he,0,0)},_drawPath:function(he,Me){this.da.push(Me.draw.bind(Me,this.ba,he.ia,he.Ga===Re?"evenodd":"nonzero"))},drawImage:function(he,...Me){var mt=this.ba;this.da.push(function(){mt.drawImage(he,...Me)})},_drawRiveImage:function(he,Me,mt){var dt=he.ab;if(dt){var gt=this.ba,It=S(Me);this.da.push(function(){gt.globalCompositeOperation=It,gt.globalAlpha=mt,gt.drawImage(dt,0,0),gt.globalAlpha=1})}},_getMatrix:function(he){const Me=this.ha,mt=Me.length-6;for(let dt=0;6>dt;++dt)he[dt]=Me[mt+dt]},_drawImageMesh:function(he,Me,mt,dt,gt,It,it,pt,xn,Ft){var jn=this.ba.canvas.width,Ht=this.ba.canvas.height;const Id=xn-it,Rd=Ft-pt;it=Math.max(it,0),pt=Math.max(pt,0),xn=Math.min(xn,jn),Ft=Math.min(Ft,Ht);const So=xn-it,Co=Ft-pt;if(console.assert(So<=Math.min(Id,jn)),console.assert(Co<=Math.min(Rd,Ht)),!(0>=So||0>=Co)){xn=So<Id||Co<Rd,jn=Ft=1;var xr=Math.ceil(So*Ft),_r=Math.ceil(Co*jn);Ht=v.wb(),xr>Ht&&(Ft*=Ht/xr,xr=Ht),_r>Ht&&(jn*=Ht/_r,_r=Ht),Ye||(Ye=new p.DynamicRectanizer(Ht),Ye.reset(512,512)),Ht=Ye.addRect(xr,_r),0>Ht&&(O(),Ve.add(this),Ht=Ye.addRect(xr,_r),console.assert(0<=Ht));var Od=Ht&65535,Pd=Ht>>16;kt.push({oa:this.ha.slice(this.ha.length-6),image:he,Ia:Od,Ja:Pd,xb:it,yb:pt,Gb:xr,Pa:_r,va:Ft,wa:jn,Da:new Float32Array(dt),Xa:new Float32Array(gt),indices:new Uint16Array(It),zb:xn,Ua:he.za<<1|(xn?1:0)}),pn+=dt.length,Un+=It.length;var zr=this.ba,By=S(Me);this.da.push(function(){zr.save(),zr.resetTransform(),zr.globalCompositeOperation=By,zr.globalAlpha=mt,zr.drawImage(v.canvas(),Od,Pd,xr,_r,it,pt,So,Co),zr.restore()})}},_clipPath:function(he){this.da.push(this.ba.clip.bind(this.ba,he.ia,he.Ga===Re?"evenodd":"nonzero"))},clear:function(){Ve.add(this),this.da.push(this.ba.clearRect.bind(this.ba,0,0,this.Fa.width,this.Fa.height))},flush:function(){},translate:function(he,Me){this.transform(1,0,0,1,he,Me)}});p.makeRenderer=function(he){return new nt(he)},p.renderFactory={makeRenderPaint:function(){return new Nt},makeRenderPath:function(){return new xt},makeRenderImage:function(){return new ye}};let or=p.load,Vs=null;p.load=function(he){return new Promise(function(Me){let mt=null;Vs={total:0,loaded:0,ready:function(){Me(mt)}},mt=or(he),Vs.total==0&&Me(mt)})},N=new $,p.requestAnimationFrame=N.requestAnimationFrame.bind(N),p.cancelAnimationFrame=N.cancelAnimationFrame.bind(N),p.enableFPSCounter=N.lb.bind(N),p.disableFPSCounter=N.ib,N.Qa=O,p.cleanup=function(){Ye&&Ye.delete()}};var w=Object.assign({},p),T="./this.program",I=typeof window=="object",D=typeof importScripts=="function",A="",F,k;(I||D)&&(D?A=self.location.href:typeof document<"u"&&document.currentScript&&(A=document.currentScript.src),d&&(A=d),A.indexOf("blob:")!==0?A=A.substr(0,A.replace(/[?#].*/,"").lastIndexOf("/")+1):A="",D&&(k=S=>{var g=new XMLHttpRequest;return g.open("GET",S,!1),g.responseType="arraybuffer",g.send(null),new Uint8Array(g.response)}),F=(S,g,O)=>{var N=new XMLHttpRequest;N.open("GET",S,!0),N.responseType="arraybuffer",N.onload=()=>{N.status==200||N.status==0&&N.response?g(N.response):O()},N.onerror=O,N.send(null)});var B=p.print||console.log.bind(console),R=p.printErr||console.error.bind(console);Object.assign(p,w),w=null,p.thisProgram&&(T=p.thisProgram);var x;p.wasmBinary&&(x=p.wasmBinary),p.noExitRuntime,typeof WebAssembly!="object"&&ie("no native wasm support detected");var h,C=!1,P,j,H,U,re,W,L,J;function Y(){var S=h.buffer;p.HEAP8=P=new Int8Array(S),p.HEAP16=H=new Int16Array(S),p.HEAP32=re=new Int32Array(S),p.HEAPU8=j=new Uint8Array(S),p.HEAPU16=U=new Uint16Array(S),p.HEAPU32=W=new Uint32Array(S),p.HEAPF32=L=new Float32Array(S),p.HEAPF64=J=new Float64Array(S)}var K,Z=[],ce=[],z=[];function G(){var S=p.preRun.shift();Z.unshift(S)}var oe=0,ne=null;function ie(S){throw p.onAbort&&p.onAbort(S),S="Aborted("+S+")",R(S),C=!0,S=new WebAssembly.RuntimeError(S+". Build with -sASSERTIONS for more info."),y(S),S}function ee(S){return S.startsWith("data:application/octet-stream;base64,")}var pe;if(pe="canvas_advanced.wasm",!ee(pe)){var xe=pe;pe=p.locateFile?p.locateFile(xe,A):A+xe}function Ee(S){if(S==pe&&x)return new Uint8Array(x);if(k)return k(S);throw"both async and sync fetching of the wasm failed"}function Ae(S){if(!x&&(I||D)){if(typeof fetch=="function"&&!S.startsWith("file://"))return fetch(S,{credentials:"same-origin"}).then(g=>{if(!g.ok)throw"failed to load wasm binary file at '"+S+"'";return g.arrayBuffer()}).catch(()=>Ee(S));if(F)return new Promise((g,O)=>{F(S,N=>g(new Uint8Array(N)),O)})}return Promise.resolve().then(()=>Ee(S))}function Ie(S,g,O){return Ae(S).then(N=>WebAssembly.instantiate(N,g)).then(N=>N).then(O,N=>{R("failed to asynchronously prepare wasm: "+N),ie(N)})}function Le(S,g){var O=pe;return x||typeof WebAssembly.instantiateStreaming!="function"||ee(O)||O.startsWith("file://")||typeof fetch!="function"?Ie(O,S,g):fetch(O,{credentials:"same-origin"}).then(N=>WebAssembly.instantiateStreaming(N,S).then(g,function(q){return R("wasm streaming compile failed: "+q),R("falling back to ArrayBuffer instantiation"),Ie(O,S,g)}))}var ke=S=>{for(;0<S.length;)S.shift()(p)};function at(S){if(S===void 0)return"_unknown";S=S.replace(/[^a-zA-Z0-9_]/g,"$");var g=S.charCodeAt(0);return 48<=g&&57>=g?`_${S}`:S}function We(S,g){return S=at(S),{[S]:function(){return g.apply(this,arguments)}}[S]}function Et(){this.ja=[void 0],this.Oa=[]}var Xe=new Et,At=void 0;function Te(S){throw new At(S)}var $t=S=>(S||Te("Cannot use deleted val. handle = "+S),Xe.get(S).value),Ge=S=>{switch(S){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Xe.Ya({Ta:1,value:S})}};function Tt(S){var g=Error,O=We(S,function(N){this.name=S,this.message=N,N=Error(N).stack,N!==void 0&&(this.stack=this.toString()+`
|
|
160
160
|
`+N.replace(/^Error(:[^\n]*)?\n/,""))});return O.prototype=Object.create(g.prototype),O.prototype.constructor=O,O.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},O}var et=void 0,Dt=void 0;function De(S){for(var g="";j[S];)g+=Dt[j[S++]];return g}var tt=[];function Zt(){for(;tt.length;){var S=tt.pop();S.W.na=!1,S.delete()}}var Lt=void 0,on={};function wn(S,g){for(g===void 0&&Te("ptr should not be undefined");S.$;)g=S.ra(g),S=S.$;return g}var dn={};function ve(S){S=$d(S);var g=De(S);return zn(S),g}function ze(S,g){var O=dn[S];return O===void 0&&Te(g+" has unknown type "+ve(S)),O}function Ct(){}var _t=!1;function Qt(S){--S.count.value,S.count.value===0&&(S.ca?S.fa.ka(S.ca):S.Z.X.ka(S.Y))}function Jt(S,g,O){return g===O?S:O.$===void 0?null:(S=Jt(S,g,O.$),S===null?null:O.jb(S))}var kn={};function an(S,g){return g=wn(S,g),on[g]}var Mn=void 0;function Rn(S){throw new Mn(S)}function en(S,g){return g.Z&&g.Y||Rn("makeClassHandle requires ptr and ptrType"),!!g.fa!=!!g.ca&&Rn("Both smartPtrType and smartPtr must be specified"),g.count={value:1},tn(Object.create(S,{W:{value:g}}))}function tn(S){return typeof FinalizationRegistry>"u"?(tn=g=>g,S):(_t=new FinalizationRegistry(g=>{Qt(g.W)}),tn=g=>{var O=g.W;return O.ca&&_t.register(g,{W:O},g),g},Ct=g=>{_t.unregister(g)},tn(S))}var nn={};function En(S){for(;S.length;){var g=S.pop();S.pop()(g)}}function fn(S){return this.fromWireType(re[S>>2])}var Wt={},nr={};function zt(S,g,O){function N(se){se=O(se),se.length!==S.length&&Rn("Mismatched type converter count");for(var de=0;de<S.length;++de)V(S[de],se[de])}S.forEach(function(se){nr[se]=g});var q=Array(g.length),te=[],ue=0;g.forEach((se,de)=>{dn.hasOwnProperty(se)?q[de]=dn[se]:(te.push(se),Wt.hasOwnProperty(se)||(Wt[se]=[]),Wt[se].push(()=>{q[de]=dn[se],++ue,ue===te.length&&N(q)}))}),te.length===0&&N(q)}function rr(S){switch(S){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${S}`)}}function _(S,g,O={}){var N=g.name;if(S||Te(`type "${N}" must have a positive integer typeid pointer`),dn.hasOwnProperty(S)){if(O.tb)return;Te(`Cannot register type '${N}' twice`)}dn[S]=g,delete nr[S],Wt.hasOwnProperty(S)&&(g=Wt[S],delete Wt[S],g.forEach(q=>q()))}function V(S,g,O={}){if(!("argPackAdvance"in g))throw new TypeError("registerType registeredInstance requires argPackAdvance");_(S,g,O)}function Q(S){Te(S.W.Z.X.name+" instance already deleted")}function fe(){}function Se(S,g,O){if(S[g].aa===void 0){var N=S[g];S[g]=function(){return S[g].aa.hasOwnProperty(arguments.length)||Te(`Function '${O}' called with an invalid number of arguments (${arguments.length}) - expects one of (${S[g].aa})!`),S[g].aa[arguments.length].apply(this,arguments)},S[g].aa=[],S[g].aa[N.ma]=N}}function Pe(S,g,O){p.hasOwnProperty(S)?((O===void 0||p[S].aa!==void 0&&p[S].aa[O]!==void 0)&&Te(`Cannot register public name '${S}' twice`),Se(p,S,S),p.hasOwnProperty(O)&&Te(`Cannot register multiple overloads of a function with the same number of arguments (${O})!`),p[S].aa[O]=g):(p[S]=g,O!==void 0&&(p[S].Hb=O))}function _e(S,g,O,N,q,te,ue,se){this.name=S,this.constructor=g,this.ga=O,this.ka=N,this.$=q,this.ob=te,this.ra=ue,this.jb=se,this.Ra=[]}function we(S,g,O){for(;g!==O;)g.ra||Te(`Expected null or instance of ${O.name}, got an instance of ${g.name}`),S=g.ra(S),g=g.$;return S}function ot(S,g){return g===null?(this.Aa&&Te(`null is not a valid ${this.name}`),0):(g.W||Te(`Cannot pass "${Ms(g)}" as a ${this.name}`),g.W.Y||Te(`Cannot pass deleted object as a pointer of type ${this.name}`),we(g.W.Y,g.W.Z.X,this.X))}function Fe(S,g){if(g===null){if(this.Aa&&Te(`null is not a valid ${this.name}`),this.ua){var O=this.Ba();return S!==null&&S.push(this.ka,O),O}return 0}if(g.W||Te(`Cannot pass "${Ms(g)}" as a ${this.name}`),g.W.Y||Te(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.ta&&g.W.Z.ta&&Te(`Cannot convert argument of type ${g.W.fa?g.W.fa.name:g.W.Z.name} to parameter type ${this.name}`),O=we(g.W.Y,g.W.Z.X,this.X),this.ua)switch(g.W.ca===void 0&&Te("Passing raw pointer to smart pointer is illegal"),this.Fb){case 0:g.W.fa===this?O=g.W.ca:Te(`Cannot convert argument of type ${g.W.fa?g.W.fa.name:g.W.Z.name} to parameter type ${this.name}`);break;case 1:O=g.W.ca;break;case 2:if(g.W.fa===this)O=g.W.ca;else{var N=g.clone();O=this.Bb(O,Ge(function(){N.delete()})),S!==null&&S.push(this.ka,O)}break;default:Te("Unsupporting sharing policy")}return O}function Be(S,g){return g===null?(this.Aa&&Te(`null is not a valid ${this.name}`),0):(g.W||Te(`Cannot pass "${Ms(g)}" as a ${this.name}`),g.W.Y||Te(`Cannot pass deleted object as a pointer of type ${this.name}`),g.W.Z.ta&&Te(`Cannot convert argument of type ${g.W.Z.name} to parameter type ${this.name}`),we(g.W.Y,g.W.Z.X,this.X))}function Ze(S,g,O,N){this.name=S,this.X=g,this.Aa=O,this.ta=N,this.ua=!1,this.ka=this.Bb=this.Ba=this.Sa=this.Fb=this.Ab=void 0,g.$!==void 0?this.toWireType=Fe:(this.toWireType=N?ot:Be,this.ea=null)}function Kt(S,g,O){p.hasOwnProperty(S)||Rn("Replacing nonexistant public symbol"),p[S].aa!==void 0&&O!==void 0?p[S].aa[O]=g:(p[S]=g,p[S].ma=O)}var Er=(S,g)=>{var O=[];return function(){if(O.length=0,Object.assign(O,arguments),S.includes("j")){var N=p["dynCall_"+S];N=O&&O.length?N.apply(null,[g].concat(O)):N.call(null,g)}else N=K.get(g).apply(null,O);return N}};function qe(S,g){S=De(S);var O=S.includes("j")?Er(S,g):K.get(g);return typeof O!="function"&&Te(`unknown function pointer with signature ${S}: ${g}`),O}var yd=void 0;function Wn(S,g){function O(te){q[te]||dn[te]||(nr[te]?nr[te].forEach(O):(N.push(te),q[te]=!0))}var N=[],q={};throw g.forEach(O),new yd(`${S}: `+N.map(ve).join([", "]))}function Di(S,g,O,N,q){var te=g.length;2>te&&Te("argTypes array size mismatch! Must at least get return value and 'this' types!");var ue=g[1]!==null&&O!==null,se=!1;for(O=1;O<g.length;++O)if(g[O]!==null&&g[O].ea===void 0){se=!0;break}var de=g[0].name!=="void",le=te-2,ge=Array(le),Ce=[],Re=[];return function(){if(arguments.length!==le&&Te(`function ${S} called with ${arguments.length} arguments, expected ${le} args!`),Re.length=0,Ce.length=ue?2:1,Ce[0]=q,ue){var je=g[1].toWireType(Re,this);Ce[1]=je}for(var ye=0;ye<le;++ye)ge[ye]=g[ye+2].toWireType(Re,arguments[ye]),Ce.push(ge[ye]);if(ye=N.apply(null,Ce),se)En(Re);else for(var xt=ue?1:2;xt<g.length;xt++){var Nt=xt===1?je:ge[xt-2];g[xt].ea!==null&&g[xt].ea(Nt)}return je=de?g[0].fromWireType(ye):void 0,je}}function Ni(S,g){for(var O=[],N=0;N<S;N++)O.push(W[g+4*N>>2]);return O}function bd(S,g,O){return S instanceof Object||Te(`${O} with invalid "this": ${S}`),S instanceof g.X.constructor||Te(`${O} incompatible with "this" of type ${S.constructor.name}`),S.W.Y||Te(`cannot call emscripten binding method ${O} on deleted object`),we(S.W.Y,S.W.Z.X,g.X)}function ks(S){S>=Xe.Ea&&--Xe.get(S).Ta===0&&Xe.Za(S)}function Ty(S,g,O){switch(g){case 0:return function(N){return this.fromWireType((O?P:j)[N])};case 1:return function(N){return this.fromWireType((O?H:U)[N>>1])};case 2:return function(N){return this.fromWireType((O?re:W)[N>>2])};default:throw new TypeError("Unknown integer type: "+S)}}function Ms(S){if(S===null)return"null";var g=typeof S;return g==="object"||g==="array"||g==="function"?S.toString():""+S}function Iy(S,g){switch(g){case 2:return function(O){return this.fromWireType(L[O>>2])};case 3:return function(O){return this.fromWireType(J[O>>3])};default:throw new TypeError("Unknown float type: "+S)}}function Ry(S,g,O){switch(g){case 0:return O?function(N){return P[N]}:function(N){return j[N]};case 1:return O?function(N){return H[N>>1]}:function(N){return U[N>>1]};case 2:return O?function(N){return re[N>>2]}:function(N){return W[N>>2]};default:throw new TypeError("Unknown integer type: "+S)}}var wd=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Ed=(S,g,O)=>{var N=g+O;for(O=g;S[O]&&!(O>=N);)++O;if(16<O-g&&S.buffer&&wd)return wd.decode(S.subarray(g,O));for(N="";g<O;){var q=S[g++];if(q&128){var te=S[g++]&63;if((q&224)==192)N+=String.fromCharCode((q&31)<<6|te);else{var ue=S[g++]&63;q=(q&240)==224?(q&15)<<12|te<<6|ue:(q&7)<<18|te<<12|ue<<6|S[g++]&63,65536>q?N+=String.fromCharCode(q):(q-=65536,N+=String.fromCharCode(55296|q>>10,56320|q&1023))}}else N+=String.fromCharCode(q)}return N},xd=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Oy=(S,g)=>{for(var O=S>>1,N=O+g/2;!(O>=N)&&U[O];)++O;if(O<<=1,32<O-S&&xd)return xd.decode(j.subarray(S,O));for(O="",N=0;!(N>=g/2);++N){var q=H[S+2*N>>1];if(q==0)break;O+=String.fromCharCode(q)}return O},Py=(S,g,O)=>{if(O===void 0&&(O=2147483647),2>O)return 0;O-=2;var N=g;O=O<2*S.length?O/2:S.length;for(var q=0;q<O;++q)H[g>>1]=S.charCodeAt(q),g+=2;return H[g>>1]=0,g-N},Ay=S=>2*S.length,Dy=(S,g)=>{for(var O=0,N="";!(O>=g/4);){var q=re[S+4*O>>2];if(q==0)break;++O,65536<=q?(q-=65536,N+=String.fromCharCode(55296|q>>10,56320|q&1023)):N+=String.fromCharCode(q)}return N},Ny=(S,g,O)=>{if(O===void 0&&(O=2147483647),4>O)return 0;var N=g;O=N+O-4;for(var q=0;q<S.length;++q){var te=S.charCodeAt(q);if(55296<=te&&57343>=te){var ue=S.charCodeAt(++q);te=65536+((te&1023)<<10)|ue&1023}if(re[g>>2]=te,g+=4,g+4>O)break}return re[g>>2]=0,g-N},ky=S=>{for(var g=0,O=0;O<S.length;++O){var N=S.charCodeAt(O);55296<=N&&57343>=N&&++O,g+=4}return g},My={};function ki(S){var g=My[S];return g===void 0?De(S):g}var Mi=[];function jy(S){var g=Mi.length;return Mi.push(S),g}function Ly(S,g){for(var O=Array(S),N=0;N<S;++N)O[N]=ze(W[g+4*N>>2],"parameter "+N);return O}var _d=[],js={},Sd=()=>{if(!Ls){var S={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:T||"./this.program"},g;for(g in js)js[g]===void 0?delete S[g]:S[g]=js[g];var O=[];for(g in S)O.push(`${g}=${S[g]}`);Ls=O}return Ls},Ls,Fy=[null,[],[]];Object.assign(Et.prototype,{get(S){return this.ja[S]},has(S){return this.ja[S]!==void 0},Ya(S){var g=this.Oa.pop()||this.ja.length;return this.ja[g]=S,g},Za(S){this.ja[S]=void 0,this.Oa.push(S)}}),At=p.BindingError=class extends Error{constructor(S){super(S),this.name="BindingError"}},Xe.ja.push({value:void 0},{value:null},{value:!0},{value:!1}),Xe.Ea=Xe.ja.length,p.count_emval_handles=function(){for(var S=0,g=Xe.Ea;g<Xe.ja.length;++g)Xe.ja[g]!==void 0&&++S;return S},et=p.PureVirtualError=Tt("PureVirtualError");for(var Cd=Array(256),ji=0;256>ji;++ji)Cd[ji]=String.fromCharCode(ji);Dt=Cd,p.getInheritedInstanceCount=function(){return Object.keys(on).length},p.getLiveInheritedInstances=function(){var S=[],g;for(g in on)on.hasOwnProperty(g)&&S.push(on[g]);return S},p.flushPendingDeletes=Zt,p.setDelayFunction=function(S){Lt=S,tt.length&&Lt&&Lt(Zt)},Mn=p.InternalError=class extends Error{constructor(S){super(S),this.name="InternalError"}},fe.prototype.isAliasOf=function(S){if(!(this instanceof fe&&S instanceof fe))return!1;var g=this.W.Z.X,O=this.W.Y,N=S.W.Z.X;for(S=S.W.Y;g.$;)O=g.ra(O),g=g.$;for(;N.$;)S=N.ra(S),N=N.$;return g===N&&O===S},fe.prototype.clone=function(){if(this.W.Y||Q(this),this.W.pa)return this.W.count.value+=1,this;var S=tn,g=Object,O=g.create,N=Object.getPrototypeOf(this),q=this.W;return S=S(O.call(g,N,{W:{value:{count:q.count,na:q.na,pa:q.pa,Y:q.Y,Z:q.Z,ca:q.ca,fa:q.fa}}})),S.W.count.value+=1,S.W.na=!1,S},fe.prototype.delete=function(){this.W.Y||Q(this),this.W.na&&!this.W.pa&&Te("Object already scheduled for deletion"),Ct(this),Qt(this.W),this.W.pa||(this.W.ca=void 0,this.W.Y=void 0)},fe.prototype.isDeleted=function(){return!this.W.Y},fe.prototype.deleteLater=function(){return this.W.Y||Q(this),this.W.na&&!this.W.pa&&Te("Object already scheduled for deletion"),tt.push(this),tt.length===1&&Lt&&Lt(Zt),this.W.na=!0,this},Ze.prototype.pb=function(S){return this.Sa&&(S=this.Sa(S)),S},Ze.prototype.Ka=function(S){this.ka&&this.ka(S)},Ze.prototype.argPackAdvance=8,Ze.prototype.readValueFromPointer=fn,Ze.prototype.deleteObject=function(S){S!==null&&S.delete()},Ze.prototype.fromWireType=function(S){function g(){return this.ua?en(this.X.ga,{Z:this.Ab,Y:O,fa:this,ca:S}):en(this.X.ga,{Z:this,Y:S})}var O=this.pb(S);if(!O)return this.Ka(S),null;var N=an(this.X,O);if(N!==void 0)return N.W.count.value===0?(N.W.Y=O,N.W.ca=S,N.clone()):(N=N.clone(),this.Ka(S),N);if(N=this.X.ob(O),N=kn[N],!N)return g.call(this);N=this.ta?N.fb:N.pointerType;var q=Jt(O,this.X,N.X);return q===null?g.call(this):this.ua?en(N.X.ga,{Z:N,Y:q,fa:this,ca:S}):en(N.X.ga,{Z:N,Y:q})},yd=p.UnboundTypeError=Tt("UnboundTypeError");var Vy={I:function(S,g,O){S=De(S),g=ze(g,"wrapper"),O=$t(O);var N=[].slice,q=g.X,te=q.ga,ue=q.$.ga,se=q.$.constructor;S=We(S,function(){q.$.Ra.forEach((function(le){if(this[le]===ue[le])throw new et(`Pure virtual function ${le} must be implemented in JavaScript`)}).bind(this)),Object.defineProperty(this,"__parent",{value:te}),this.__construct.apply(this,N.call(arguments))}),te.__construct=function(){this===te&&Te("Pass correct 'this' to __construct");var le=se.implement.apply(void 0,[this].concat(N.call(arguments)));Ct(le);var ge=le.W;le.notifyOnDestruction(),ge.pa=!0,Object.defineProperties(this,{W:{value:ge}}),tn(this),le=ge.Y,le=wn(q,le),on.hasOwnProperty(le)?Te(`Tried to register registered instance: ${le}`):on[le]=this},te.__destruct=function(){this===te&&Te("Pass correct 'this' to __destruct"),Ct(this);var le=this.W.Y;le=wn(q,le),on.hasOwnProperty(le)?delete on[le]:Te(`Tried to unregister unregistered instance: ${le}`)},S.prototype=Object.create(te);for(var de in O)S.prototype[de]=O[de];return Ge(S)},L:function(S){var g=nn[S];delete nn[S];var O=g.Ba,N=g.ka,q=g.Na,te=q.map(ue=>ue.sb).concat(q.map(ue=>ue.Db));zt([S],te,ue=>{var se={};return q.forEach((de,le)=>{var ge=ue[le],Ce=de.qb,Re=de.rb,je=ue[le+q.length],ye=de.Cb,xt=de.Eb;se[de.mb]={read:Nt=>ge.fromWireType(Ce(Re,Nt)),write:(Nt,Ve)=>{var Ye=[];ye(xt,Nt,je.toWireType(Ye,Ve)),En(Ye)}}}),[{name:g.name,fromWireType:function(de){var le={},ge;for(ge in se)le[ge]=se[ge].read(de);return N(de),le},toWireType:function(de,le){for(var ge in se)if(!(ge in le))throw new TypeError(`Missing field: "${ge}"`);var Ce=O();for(ge in se)se[ge].write(Ce,le[ge]);return de!==null&&de.push(N,Ce),Ce},argPackAdvance:8,readValueFromPointer:fn,ea:N}]})},z:function(){},G:function(S,g,O,N,q){var te=rr(O);g=De(g),V(S,{name:g,fromWireType:function(ue){return!!ue},toWireType:function(ue,se){return se?N:q},argPackAdvance:8,readValueFromPointer:function(ue){if(O===1)var se=P;else if(O===2)se=H;else if(O===4)se=re;else throw new TypeError("Unknown boolean type size: "+g);return this.fromWireType(se[ue>>te])},ea:null})},e:function(S,g,O,N,q,te,ue,se,de,le,ge,Ce,Re){ge=De(ge),te=qe(q,te),se&&(se=qe(ue,se)),le&&(le=qe(de,le)),Re=qe(Ce,Re);var je=at(ge);Pe(je,function(){Wn(`Cannot construct ${ge} due to unbound types`,[N])}),zt([S,g,O],N?[N]:[],function(ye){if(ye=ye[0],N)var xt=ye.X,Nt=xt.ga;else Nt=fe.prototype;ye=We(je,function(){if(Object.getPrototypeOf(this)!==Ve)throw new At("Use 'new' to construct "+ge);if(Ye.la===void 0)throw new At(ge+" has no accessible constructor");var pn=Ye.la[arguments.length];if(pn===void 0)throw new At(`Tried to invoke ctor of ${ge} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(Ye.la).toString()}) parameters instead!`);return pn.apply(this,arguments)});var Ve=Object.create(Nt,{constructor:{value:ye}});ye.prototype=Ve;var Ye=new _e(ge,ye,Ve,Re,xt,te,se,le);Ye.$&&(Ye.$.sa===void 0&&(Ye.$.sa=[]),Ye.$.sa.push(Ye)),xt=new Ze(ge,Ye,!0,!1),Nt=new Ze(ge+"*",Ye,!1,!1);var kt=new Ze(ge+" const*",Ye,!1,!0);return kn[S]={pointerType:Nt,fb:kt},Kt(je,ye),[xt,Nt,kt]})},k:function(S,g,O,N,q,te,ue){var se=Ni(O,N);g=De(g),te=qe(q,te),zt([],[S],function(de){function le(){Wn(`Cannot call ${ge} due to unbound types`,se)}de=de[0];var ge=`${de.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]);var Ce=de.X.constructor;return Ce[g]===void 0?(le.ma=O-1,Ce[g]=le):(Se(Ce,g,ge),Ce[g].aa[O-1]=le),zt([],se,function(Re){if(Re=Di(ge,[Re[0],null].concat(Re.slice(1)),null,te,ue),Ce[g].aa===void 0?(Re.ma=O-1,Ce[g]=Re):Ce[g].aa[O-1]=Re,de.X.sa)for(const je of de.X.sa)je.constructor.hasOwnProperty(g)||(je.constructor[g]=Re);return[]}),[]})},s:function(S,g,O,N,q,te,ue,se){g=De(g),te=qe(q,te),zt([],[S],function(de){de=de[0];var le=`${de.name}.${g}`,ge={get(){Wn(`Cannot access ${le} due to unbound types`,[O])},enumerable:!0,configurable:!0};return ge.set=se?()=>{Wn(`Cannot access ${le} due to unbound types`,[O])}:()=>{Te(`${le} is a read-only property`)},Object.defineProperty(de.X.constructor,g,ge),zt([],[O],function(Ce){Ce=Ce[0];var Re={get(){return Ce.fromWireType(te(N))},enumerable:!0};return se&&(se=qe(ue,se),Re.set=je=>{var ye=[];se(N,Ce.toWireType(ye,je)),En(ye)}),Object.defineProperty(de.X.constructor,g,Re),[]}),[]})},o:function(S,g,O,N,q,te){var ue=Ni(g,O);q=qe(N,q),zt([],[S],function(se){se=se[0];var de=`constructor ${se.name}`;if(se.X.la===void 0&&(se.X.la=[]),se.X.la[g-1]!==void 0)throw new At(`Cannot register multiple constructors with identical number of parameters (${g-1}) for class '${se.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return se.X.la[g-1]=()=>{Wn(`Cannot construct ${se.name} due to unbound types`,ue)},zt([],ue,function(le){return le.splice(1,0,null),se.X.la[g-1]=Di(de,le,null,q,te),[]}),[]})},a:function(S,g,O,N,q,te,ue,se){var de=Ni(O,N);g=De(g),te=qe(q,te),zt([],[S],function(le){function ge(){Wn(`Cannot call ${Ce} due to unbound types`,de)}le=le[0];var Ce=`${le.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]),se&&le.X.Ra.push(g);var Re=le.X.ga,je=Re[g];return je===void 0||je.aa===void 0&&je.className!==le.name&&je.ma===O-2?(ge.ma=O-2,ge.className=le.name,Re[g]=ge):(Se(Re,g,Ce),Re[g].aa[O-2]=ge),zt([],de,function(ye){return ye=Di(Ce,ye,le,te,ue),Re[g].aa===void 0?(ye.ma=O-2,Re[g]=ye):Re[g].aa[O-2]=ye,[]}),[]})},d:function(S,g,O,N,q,te,ue,se,de,le){g=De(g),q=qe(N,q),zt([],[S],function(ge){ge=ge[0];var Ce=`${ge.name}.${g}`,Re={get(){Wn(`Cannot access ${Ce} due to unbound types`,[O,ue])},enumerable:!0,configurable:!0};return Re.set=de?()=>{Wn(`Cannot access ${Ce} due to unbound types`,[O,ue])}:()=>{Te(Ce+" is a read-only property")},Object.defineProperty(ge.X.ga,g,Re),zt([],de?[O,ue]:[O],function(je){var ye=je[0],xt={get(){var Ve=bd(this,ge,Ce+" getter");return ye.fromWireType(q(te,Ve))},enumerable:!0};if(de){de=qe(se,de);var Nt=je[1];xt.set=function(Ve){var Ye=bd(this,ge,Ce+" setter"),kt=[];de(le,Ye,Nt.toWireType(kt,Ve)),En(kt)}}return Object.defineProperty(ge.X.ga,g,xt),[]}),[]})},F:function(S,g){g=De(g),V(S,{name:g,fromWireType:function(O){var N=$t(O);return ks(O),N},toWireType:function(O,N){return Ge(N)},argPackAdvance:8,readValueFromPointer:fn,ea:null})},l:function(S,g,O,N){function q(){}O=rr(O),g=De(g),q.values={},V(S,{name:g,constructor:q,fromWireType:function(te){return this.constructor.values[te]},toWireType:function(te,ue){return ue.value},argPackAdvance:8,readValueFromPointer:Ty(g,O,N),ea:null}),Pe(g,q)},c:function(S,g,O){var N=ze(S,"enum");g=De(g),S=N.constructor,N=Object.create(N.constructor.prototype,{value:{value:O},constructor:{value:We(`${N.name}_${g}`,function(){})}}),S.values[O]=N,S[g]=N},u:function(S,g,O){O=rr(O),g=De(g),V(S,{name:g,fromWireType:function(N){return N},toWireType:function(N,q){return q},argPackAdvance:8,readValueFromPointer:Iy(g,O),ea:null})},q:function(S,g,O,N,q,te){var ue=Ni(g,O);S=De(S),q=qe(N,q),Pe(S,function(){Wn(`Cannot call ${S} due to unbound types`,ue)},g-1),zt([],ue,function(se){return Kt(S,Di(S,[se[0],null].concat(se.slice(1)),null,q,te),g-1),[]})},j:function(S,g,O,N,q){g=De(g),q===-1&&(q=4294967295),q=rr(O);var te=se=>se;if(N===0){var ue=32-8*O;te=se=>se<<ue>>>ue}O=g.includes("unsigned")?function(se,de){return de>>>0}:function(se,de){return de},V(S,{name:g,fromWireType:te,toWireType:O,argPackAdvance:8,readValueFromPointer:Ry(g,q,N!==0),ea:null})},g:function(S,g,O){function N(te){te>>=2;var ue=W;return new q(ue.buffer,ue[te+1],ue[te])}var q=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][g];O=De(O),V(S,{name:O,fromWireType:N,argPackAdvance:8,readValueFromPointer:N},{tb:!0})},v:function(S,g){g=De(g);var O=g==="std::string";V(S,{name:g,fromWireType:function(N){var q=W[N>>2],te=N+4;if(O)for(var ue=te,se=0;se<=q;++se){var de=te+se;if(se==q||j[de]==0){if(ue=ue?Ed(j,ue,de-ue):"",le===void 0)var le=ue;else le+=String.fromCharCode(0),le+=ue;ue=de+1}}else{for(le=Array(q),se=0;se<q;++se)le[se]=String.fromCharCode(j[te+se]);le=le.join("")}return zn(N),le},toWireType:function(N,q){q instanceof ArrayBuffer&&(q=new Uint8Array(q));var te,ue=typeof q=="string";ue||q instanceof Uint8Array||q instanceof Uint8ClampedArray||q instanceof Int8Array||Te("Cannot pass non-string to std::string");var se;if(O&&ue)for(te=se=0;te<q.length;++te){var de=q.charCodeAt(te);127>=de?se++:2047>=de?se+=2:55296<=de&&57343>=de?(se+=4,++te):se+=3}else se=q.length;if(te=se,se=Fs(4+te+1),de=se+4,W[se>>2]=te,O&&ue){if(ue=de,de=te+1,te=j,0<de){de=ue+de-1;for(var le=0;le<q.length;++le){var ge=q.charCodeAt(le);if(55296<=ge&&57343>=ge){var Ce=q.charCodeAt(++le);ge=65536+((ge&1023)<<10)|Ce&1023}if(127>=ge){if(ue>=de)break;te[ue++]=ge}else{if(2047>=ge){if(ue+1>=de)break;te[ue++]=192|ge>>6}else{if(65535>=ge){if(ue+2>=de)break;te[ue++]=224|ge>>12}else{if(ue+3>=de)break;te[ue++]=240|ge>>18,te[ue++]=128|ge>>12&63}te[ue++]=128|ge>>6&63}te[ue++]=128|ge&63}}te[ue]=0}}else if(ue)for(ue=0;ue<te;++ue)le=q.charCodeAt(ue),255<le&&(zn(de),Te("String has UTF-16 code units that do not fit in 8 bits")),j[de+ue]=le;else for(ue=0;ue<te;++ue)j[de+ue]=q[ue];return N!==null&&N.push(zn,se),se},argPackAdvance:8,readValueFromPointer:fn,ea:function(N){zn(N)}})},t:function(S,g,O){if(O=De(O),g===2)var N=Oy,q=Py,te=Ay,ue=()=>U,se=1;else g===4&&(N=Dy,q=Ny,te=ky,ue=()=>W,se=2);V(S,{name:O,fromWireType:function(de){for(var le=W[de>>2],ge=ue(),Ce,Re=de+4,je=0;je<=le;++je){var ye=de+4+je*g;(je==le||ge[ye>>se]==0)&&(Re=N(Re,ye-Re),Ce===void 0?Ce=Re:(Ce+=String.fromCharCode(0),Ce+=Re),Re=ye+g)}return zn(de),Ce},toWireType:function(de,le){typeof le!="string"&&Te(`Cannot pass non-string to C++ string type ${O}`);var ge=te(le),Ce=Fs(4+ge+g);return W[Ce>>2]=ge>>se,q(le,Ce+4,ge+g),de!==null&&de.push(zn,Ce),Ce},argPackAdvance:8,readValueFromPointer:fn,ea:function(de){zn(de)}})},N:function(S,g,O,N,q,te){nn[S]={name:De(g),Ba:qe(O,N),ka:qe(q,te),Na:[]}},M:function(S,g,O,N,q,te,ue,se,de,le){nn[S].Na.push({mb:De(g),sb:O,qb:qe(N,q),rb:te,Db:ue,Cb:qe(se,de),Eb:le})},H:function(S,g){g=De(g),V(S,{vb:!0,name:g,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},r:function(S,g,O){S=$t(S),g=ze(g,"emval::as");var N=[],q=Ge(N);return W[O>>2]=q,g.toWireType(N,S)},w:function(S,g,O,N,q){S=Mi[S],g=$t(g),O=ki(O);var te=[];return W[N>>2]=Ge(te),S(g,O,te,q)},i:function(S,g,O,N){S=Mi[S],g=$t(g),O=ki(O),S(g,O,null,N)},f:ks,h:function(S,g){var O=Ly(S,g),N=O[0];g=N.name+"_$"+O.slice(1).map(function(ue){return ue.name}).join("_")+"$";var q=_d[g];if(q!==void 0)return q;var te=Array(S-1);return q=jy((ue,se,de,le)=>{for(var ge=0,Ce=0;Ce<S-1;++Ce)te[Ce]=O[Ce+1].readValueFromPointer(le+ge),ge+=O[Ce+1].argPackAdvance;for(ue=ue[se].apply(ue,te),Ce=0;Ce<S-1;++Ce)O[Ce+1].hb&&O[Ce+1].hb(te[Ce]);if(!N.vb)return N.toWireType(de,ue)}),_d[g]=q},p:function(S){return S=ki(S),Ge(p[S])},K:function(S,g){return S=$t(S),g=$t(g),Ge(S[g])},m:function(S){4<S&&(Xe.get(S).Ta+=1)},J:function(S){return Ge(ki(S))},n:function(S){var g=$t(S);En(g),ks(S)},x:function(S,g){return S=ze(S,"_emval_take_value"),S=S.readValueFromPointer(g),Ge(S)},b:()=>{ie("")},A:S=>{var g=j.length;if(S>>>=0,2147483648<S)return!1;for(var O=1;4>=O;O*=2){var N=g*(1+.2/O);N=Math.min(N,S+100663296);var q=Math;N=Math.max(S,N);e:{q=q.min.call(q,2147483648,N+(65536-N%65536)%65536)-h.buffer.byteLength+65535>>>16;try{h.grow(q),Y();var te=1;break e}catch{}te=void 0}if(te)return!0}return!1},B:(S,g)=>{var O=0;return Sd().forEach(function(N,q){var te=g+O;for(q=W[S+4*q>>2]=te,te=0;te<N.length;++te)P[q++>>0]=N.charCodeAt(te);P[q>>0]=0,O+=N.length+1}),0},C:(S,g)=>{var O=Sd();W[S>>2]=O.length;var N=0;return O.forEach(function(q){N+=q.length+1}),W[g>>2]=N,0},D:()=>52,y:function(){return 70},E:(S,g,O,N)=>{for(var q=0,te=0;te<O;te++){var ue=W[g>>2],se=W[g+4>>2];g+=8;for(var de=0;de<se;de++){var le=j[ue+de],ge=Fy[S];le===0||le===10?((S===1?B:R)(Ed(ge,0)),ge.length=0):ge.push(le)}q+=se}return W[N>>2]=q,0}};(function(){function S(O){if(O=O.exports,p.asm=O,h=p.asm.O,Y(),K=p.asm.U,ce.unshift(p.asm.P),oe--,p.monitorRunDependencies&&p.monitorRunDependencies(oe),oe==0&&ne){var N=ne;ne=null,N()}return O}var g={a:Vy};if(oe++,p.monitorRunDependencies&&p.monitorRunDependencies(oe),p.instantiateWasm)try{return p.instantiateWasm(g,S)}catch(O){R("Module.instantiateWasm callback failed with error: "+O),y(O)}return Le(g,function(O){S(O.instance)}).catch(y),{}})();function zn(){return(zn=p.asm.Q).apply(null,arguments)}function Fs(){return(Fs=p.asm.R).apply(null,arguments)}function $d(){return($d=p.asm.S).apply(null,arguments)}p.__embind_initialize_bindings=function(){return(p.__embind_initialize_bindings=p.asm.T).apply(null,arguments)},p.dynCall_jiji=function(){return(p.dynCall_jiji=p.asm.V).apply(null,arguments)};var Li;ne=function S(){Li||Td(),Li||(ne=S)};function Td(){function S(){if(!Li&&(Li=!0,p.calledRun=!0,!C)){if(ke(ce),b(p),p.onRuntimeInitialized&&p.onRuntimeInitialized(),p.postRun)for(typeof p.postRun=="function"&&(p.postRun=[p.postRun]);p.postRun.length;){var g=p.postRun.shift();z.unshift(g)}ke(z)}}if(!(0<oe)){if(p.preRun)for(typeof p.preRun=="function"&&(p.preRun=[p.preRun]);p.preRun.length;)G();ke(Z),0<oe||(p.setStatus?(p.setStatus("Running..."),setTimeout(function(){setTimeout(function(){p.setStatus("")},1),S()},1)):S())}}if(p.preInit)for(typeof p.preInit=="function"&&(p.preInit=[p.preInit]);0<p.preInit.length;)p.preInit.pop()();return Td(),m.ready}})();const f=u},a=>{a.exports=JSON.parse(`{"name":"@rive-app/canvas","version":"1.2.4","description":"Rive's canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}`)},(a,s,c)=>{c.r(s),c.d(s,{registerTouchInteractions:()=>u.registerTouchInteractions});var u=c(4)},(a,s,c)=>{c.r(s),c.d(s,{registerTouchInteractions:()=>d});var u=void 0,f=function(m){var p,b;return["touchstart","touchmove"].indexOf(m.type)>-1&&(!((p=m.touches)===null||p===void 0)&&p.length)?(m.preventDefault(),{clientX:m.touches[0].clientX,clientY:m.touches[0].clientY}):m.type==="touchend"&&(!((b=m.changedTouches)===null||b===void 0)&&b.length)?{clientX:m.changedTouches[0].clientX,clientY:m.changedTouches[0].clientY}:{clientX:m.clientX,clientY:m.clientY}},d=function(m){var p=m.canvas,b=m.artboard,y=m.stateMachines,$=y===void 0?[]:y,E=m.renderer,v=m.rive,w=m.fit,T=m.alignment;if(!p||!$.length||!E||!v||!b||typeof window>"u")return null;var I=function(A){var F=A.currentTarget.getBoundingClientRect(),k=f(A),B=k.clientX,R=k.clientY;if(!(!B&&!R)){var x=B-F.left,h=R-F.top,C=v.computeAlignment(w,T,{minX:0,minY:0,maxX:F.width,maxY:F.height},b.bounds),P=new v.Mat2D;C.invert(P);var j=new v.Vec2D(x,h),H=v.mapXY(P,j),U=H.x(),re=H.y();switch(H.delete(),P.delete(),j.delete(),C.delete(),A.type){case"touchmove":case"mouseover":case"mouseout":case"mousemove":{for(var W=0,L=$;W<L.length;W++){var J=L[W];J.pointerMove(U,re)}break}case"touchstart":case"mousedown":{for(var Y=0,K=$;Y<K.length;Y++){var J=K[Y];J.pointerDown(U,re)}break}case"touchend":case"mouseup":{for(var Z=0,ce=$;Z<ce.length;Z++){var J=ce[Z];J.pointerUp(U,re)}break}}}},D=I.bind(u);return p.addEventListener("mouseover",D),p.addEventListener("mouseout",D),p.addEventListener("mousemove",D),p.addEventListener("mousedown",D),p.addEventListener("mouseup",D),p.addEventListener("touchmove",D),p.addEventListener("touchstart",D),p.addEventListener("touchend",D),function(){p.removeEventListener("mouseover",D),p.removeEventListener("mouseout",D),p.removeEventListener("mousemove",D),p.removeEventListener("mousedown",D),p.removeEventListener("mouseup",D),p.removeEventListener("touchmove",D),p.removeEventListener("touchstart",D),p.removeEventListener("touchend",D)}}}],r={};function o(a){var s=r[a];if(s!==void 0)return s.exports;var c=r[a]={exports:{}};return n[a](c,c.exports,o),c.exports}o.d=(a,s)=>{for(var c in s)o.o(s,c)&&!o.o(a,c)&&Object.defineProperty(a,c,{enumerable:!0,get:s[c]})},o.o=(a,s)=>Object.prototype.hasOwnProperty.call(a,s),o.r=a=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var i={};return(()=>{o.r(i),o.d(i,{Alignment:()=>m,EventType:()=>T,Fit:()=>d,Layout:()=>p,LoopType:()=>I,Rive:()=>F,RuntimeLoader:()=>b,StateMachineInput:()=>E,StateMachineInputType:()=>$,Testing:()=>R});var a=o(1),s=o(2),c=o(3),u=function(x,h,C,P){function j(H){return H instanceof C?H:new C(function(U){U(H)})}return new(C||(C=Promise))(function(H,U){function re(J){try{L(P.next(J))}catch(Y){U(Y)}}function W(J){try{L(P.throw(J))}catch(Y){U(Y)}}function L(J){J.done?H(J.value):j(J.value).then(re,W)}L((P=P.apply(x,h||[])).next())})},f=function(x,h){var C={label:0,sent:function(){if(H[0]&1)throw H[1];return H[1]},trys:[],ops:[]},P,j,H,U;return U={next:re(0),throw:re(1),return:re(2)},typeof Symbol=="function"&&(U[Symbol.iterator]=function(){return this}),U;function re(L){return function(J){return W([L,J])}}function W(L){if(P)throw new TypeError("Generator is already executing.");for(;U&&(U=0,L[0]&&(C=0)),C;)try{if(P=1,j&&(H=L[0]&2?j.return:L[0]?j.throw||((H=j.return)&&H.call(j),0):j.next)&&!(H=H.call(j,L[1])).done)return H;switch(j=0,H&&(L=[L[0]&2,H.value]),L[0]){case 0:case 1:H=L;break;case 4:return C.label++,{value:L[1],done:!1};case 5:C.label++,j=L[1],L=[0];continue;case 7:L=C.ops.pop(),C.trys.pop();continue;default:if(H=C.trys,!(H=H.length>0&&H[H.length-1])&&(L[0]===6||L[0]===2)){C=0;continue}if(L[0]===3&&(!H||L[1]>H[0]&&L[1]<H[3])){C.label=L[1];break}if(L[0]===6&&C.label<H[1]){C.label=H[1],H=L;break}if(H&&C.label<H[2]){C.label=H[2],C.ops.push(L);break}H[2]&&C.ops.pop(),C.trys.pop();continue}L=h.call(x,C)}catch(J){L=[6,J],j=0}finally{P=H=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},d;(function(x){x.Cover="cover",x.Contain="contain",x.Fill="fill",x.FitWidth="fitWidth",x.FitHeight="fitHeight",x.None="none",x.ScaleDown="scaleDown"})(d||(d={}));var m;(function(x){x.Center="center",x.TopLeft="topLeft",x.TopCenter="topCenter",x.TopRight="topRight",x.CenterLeft="centerLeft",x.CenterRight="centerRight",x.BottomLeft="bottomLeft",x.BottomCenter="bottomCenter",x.BottomRight="bottomRight"})(m||(m={}));var p=function(){function x(h){var C,P,j,H,U,re;this.fit=(C=h==null?void 0:h.fit)!==null&&C!==void 0?C:d.Contain,this.alignment=(P=h==null?void 0:h.alignment)!==null&&P!==void 0?P:m.Center,this.minX=(j=h==null?void 0:h.minX)!==null&&j!==void 0?j:0,this.minY=(H=h==null?void 0:h.minY)!==null&&H!==void 0?H:0,this.maxX=(U=h==null?void 0:h.maxX)!==null&&U!==void 0?U:0,this.maxY=(re=h==null?void 0:h.maxY)!==null&&re!==void 0?re:0}return x.new=function(h){var C=h.fit,P=h.alignment,j=h.minX,H=h.minY,U=h.maxX,re=h.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new x({fit:C,alignment:P,minX:j,minY:H,maxX:U,maxY:re})},x.prototype.copyWith=function(h){var C=h.fit,P=h.alignment,j=h.minX,H=h.minY,U=h.maxX,re=h.maxY;return new x({fit:C??this.fit,alignment:P??this.alignment,minX:j??this.minX,minY:H??this.minY,maxX:U??this.maxX,maxY:re??this.maxY})},x.prototype.runtimeFit=function(h){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var C;return this.fit===d.Cover?C=h.Fit.cover:this.fit===d.Contain?C=h.Fit.contain:this.fit===d.Fill?C=h.Fit.fill:this.fit===d.FitWidth?C=h.Fit.fitWidth:this.fit===d.FitHeight?C=h.Fit.fitHeight:this.fit===d.ScaleDown?C=h.Fit.scaleDown:C=h.Fit.none,this.cachedRuntimeFit=C,C},x.prototype.runtimeAlignment=function(h){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var C;return this.alignment===m.TopLeft?C=h.Alignment.topLeft:this.alignment===m.TopCenter?C=h.Alignment.topCenter:this.alignment===m.TopRight?C=h.Alignment.topRight:this.alignment===m.CenterLeft?C=h.Alignment.centerLeft:this.alignment===m.CenterRight?C=h.Alignment.centerRight:this.alignment===m.BottomLeft?C=h.Alignment.bottomLeft:this.alignment===m.BottomCenter?C=h.Alignment.bottomCenter:this.alignment===m.BottomRight?C=h.Alignment.bottomRight:C=h.Alignment.center,this.cachedRuntimeAlignment=C,C},x}(),b=function(){function x(){}return x.loadRuntime=function(){a.default({locateFile:function(){return x.wasmURL}}).then(function(h){var C;for(x.runtime=h;x.callBackQueue.length>0;)(C=x.callBackQueue.shift())===null||C===void 0||C(x.runtime)})},x.getInstance=function(h){x.isLoading||(x.isLoading=!0,x.loadRuntime()),x.runtime?h(x.runtime):x.callBackQueue.push(h)},x.awaitInstance=function(){return new Promise(function(h){return x.getInstance(function(C){return h(C)})})},x.setWasmUrl=function(h){x.wasmURL=h},x.isLoading=!1,x.callBackQueue=[],x.wasmURL="https://unpkg.com/".concat(s.name,"@").concat(s.version,"/rive.wasm"),x}(),y=function(){function x(h,C,P,j){this.animation=h,this.artboard=C,this.playing=j,this.loopCount=0,this.scrubTo=null,this.instance=new P.LinearAnimationInstance(h,C)}return Object.defineProperty(x.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"time",{get:function(){return this.instance.time},set:function(h){this.instance.time=h},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),x.prototype.advance=function(h){this.scrubTo===null?this.instance.advance(h):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},x.prototype.apply=function(h){this.instance.apply(h)},Object.defineProperty(x.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),x.prototype.cleanup=function(){this.instance.delete()},x}(),$;(function(x){x[x.Number=56]="Number",x[x.Trigger=58]="Trigger",x[x.Boolean=59]="Boolean"})($||($={}));var E=function(){function x(h,C){this.type=h,this.runtimeInput=C}return Object.defineProperty(x.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(h){this.runtimeInput.value=h},enumerable:!1,configurable:!0}),x.prototype.fire=function(){this.type===$.Trigger&&this.runtimeInput.fire()},x}(),v=function(){function x(h,C,P,j){this.stateMachine=h,this.playing=P,this.artboard=j,this.inputs=[],this.instance=new C.StateMachineInstance(h,j),this.initInputs(C)}return Object.defineProperty(x.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"statesChanged",{get:function(){for(var h=[],C=0;C<this.instance.stateChangedCount();C++)h.push(this.instance.stateChangedNameByIndex(C));return h},enumerable:!1,configurable:!0}),x.prototype.advance=function(h){this.instance.advance(h)},x.prototype.initInputs=function(h){for(var C=0;C<this.instance.inputCount();C++){var P=this.instance.input(C);this.inputs.push(this.mapRuntimeInput(P,h))}},x.prototype.mapRuntimeInput=function(h,C){if(h.type===C.SMIInput.bool)return new E($.Boolean,h.asBool());if(h.type===C.SMIInput.number)return new E($.Number,h.asNumber());if(h.type===C.SMIInput.trigger)return new E($.Trigger,h.asTrigger())},x.prototype.cleanup=function(){this.instance.delete()},x}(),w=function(){function x(h,C,P,j,H){j===void 0&&(j=[]),H===void 0&&(H=[]),this.runtime=h,this.artboard=C,this.eventManager=P,this.animations=j,this.stateMachines=H}return x.prototype.add=function(h,C,P){if(P===void 0&&(P=!0),h=B(h),h.length===0)this.animations.forEach(function(Z){return Z.playing=C}),this.stateMachines.forEach(function(Z){return Z.playing=C});else for(var j=this.animations.map(function(Z){return Z.name}),H=this.stateMachines.map(function(Z){return Z.name}),U=0;U<h.length;U++){var re=j.indexOf(h[U]),W=H.indexOf(h[U]);if(re>=0||W>=0)re>=0?this.animations[re].playing=C:this.stateMachines[W].playing=C;else{var L=this.artboard.animationByName(h[U]);if(L){var J=new y(L,this.artboard,this.runtime,C);J.advance(0),J.apply(1),this.animations.push(J)}else{var Y=this.artboard.stateMachineByName(h[U]);if(Y){var K=new v(Y,this.runtime,C,this.artboard);this.stateMachines.push(K)}}}}return P&&(C?this.eventManager.fire({type:T.Play,data:this.playing}):this.eventManager.fire({type:T.Pause,data:this.paused})),C?this.playing:this.paused},x.prototype.play=function(h){return this.add(h,!0)},x.prototype.pause=function(h){return this.add(h,!1)},x.prototype.scrub=function(h,C){var P=this.animations.filter(function(j){return h.includes(j.name)});return P.forEach(function(j){return j.scrubTo=C}),P.map(function(j){return j.name})},Object.defineProperty(x.prototype,"playing",{get:function(){return this.animations.filter(function(h){return h.playing}).map(function(h){return h.name}).concat(this.stateMachines.filter(function(h){return h.playing}).map(function(h){return h.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"paused",{get:function(){return this.animations.filter(function(h){return!h.playing}).map(function(h){return h.name}).concat(this.stateMachines.filter(function(h){return!h.playing}).map(function(h){return h.name}))},enumerable:!1,configurable:!0}),x.prototype.stop=function(h){var C=this;h=B(h);var P=[];if(h.length===0)P=this.animations.map(function(U){return U.name}).concat(this.stateMachines.map(function(U){return U.name})),this.animations.forEach(function(U){return U.cleanup()}),this.stateMachines.forEach(function(U){return U.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var j=this.animations.filter(function(U){return h.includes(U.name)});j.forEach(function(U){U.cleanup(),C.animations.splice(C.animations.indexOf(U),1)});var H=this.stateMachines.filter(function(U){return h.includes(U.name)});H.forEach(function(U){U.cleanup(),C.stateMachines.splice(C.stateMachines.indexOf(U),1)}),P=j.map(function(U){return U.name}).concat(H.map(function(U){return U.name}))}return this.eventManager.fire({type:T.Stop,data:P}),P},Object.defineProperty(x.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(h,C){return h||C.playing},!1)||this.stateMachines.reduce(function(h,C){return h||C.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),x.prototype.atLeastOne=function(h,C){C===void 0&&(C=!0);var P;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([P=this.artboard.animationByIndex(0).name],h,C):this.artboard.stateMachineCount()>0&&this.add([P=this.artboard.stateMachineByIndex(0).name],h,C)),P},x.prototype.handleLooping=function(){for(var h=0,C=this.animations.filter(function(j){return j.playing});h<C.length;h++){var P=C[h];P.loopValue===0&&P.loopCount?(P.loopCount=0,this.stop(P.name)):P.loopValue===1&&P.loopCount?(this.eventManager.fire({type:T.Loop,data:{animation:P.name,type:I.Loop}}),P.loopCount=0):P.loopValue===2&&P.loopCount>1&&(this.eventManager.fire({type:T.Loop,data:{animation:P.name,type:I.PingPong}}),P.loopCount=0)}},x.prototype.handleStateChanges=function(){for(var h=[],C=0,P=this.stateMachines.filter(function(H){return H.playing});C<P.length;C++){var j=P[C];h.push.apply(h,j.statesChanged)}h.length>0&&this.eventManager.fire({type:T.StateChange,data:h})},x.prototype.handleAdvancing=function(h){this.eventManager.fire({type:T.Advance,data:h})},x}(),T;(function(x){x.Load="load",x.LoadError="loaderror",x.Play="play",x.Pause="pause",x.Stop="stop",x.Loop="loop",x.Draw="draw",x.Advance="advance",x.StateChange="statechange"})(T||(T={}));var I;(function(x){x.OneShot="oneshot",x.Loop="loop",x.PingPong="pingpong"})(I||(I={}));var D=function(){function x(h){h===void 0&&(h=[]),this.listeners=h}return x.prototype.getListeners=function(h){return this.listeners.filter(function(C){return C.type===h})},x.prototype.add=function(h){this.listeners.includes(h)||this.listeners.push(h)},x.prototype.remove=function(h){for(var C=0;C<this.listeners.length;C++){var P=this.listeners[C];if(P.type===h.type&&P.callback===h.callback){this.listeners.splice(C,1);break}}},x.prototype.removeAll=function(h){var C=this;h?this.listeners.filter(function(P){return P.type===h}).forEach(function(P){return C.remove(P)}):this.listeners.splice(0,this.listeners.length)},x.prototype.fire=function(h){var C=this.getListeners(h.type);C.forEach(function(P){return P.callback(h)})},x}(),A=function(){function x(h){this.eventManager=h,this.queue=[]}return x.prototype.add=function(h){this.queue.push(h)},x.prototype.process=function(){for(;this.queue.length>0;){var h=this.queue.shift();h!=null&&h.action&&h.action(),h!=null&&h.event&&this.eventManager.fire(h.event)}},x}(),F=function(){function x(h){var C;this.loaded=!1,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.durations=[],this.frameTimes=[],this.frameCount=0,this.renderSecondTimer=0,this.canvas=h.canvas,this.src=h.src,this.buffer=h.buffer,this.layout=(C=h.layout)!==null&&C!==void 0?C:new p,this.shouldDisableRiveListeners=!!h.shouldDisableRiveListeners,this.eventManager=new D,h.onLoad&&this.on(T.Load,h.onLoad),h.onLoadError&&this.on(T.LoadError,h.onLoadError),h.onPlay&&this.on(T.Play,h.onPlay),h.onPause&&this.on(T.Pause,h.onPause),h.onStop&&this.on(T.Stop,h.onStop),h.onLoop&&this.on(T.Loop,h.onLoop),h.onStateChange&&this.on(T.StateChange,h.onStateChange),h.onAdvance&&this.on(T.Advance,h.onAdvance),h.onload&&!h.onLoad&&this.on(T.Load,h.onload),h.onloaderror&&!h.onLoadError&&this.on(T.LoadError,h.onloaderror),h.onplay&&!h.onPlay&&this.on(T.Play,h.onplay),h.onpause&&!h.onPause&&this.on(T.Pause,h.onpause),h.onstop&&!h.onStop&&this.on(T.Stop,h.onstop),h.onloop&&!h.onLoop&&this.on(T.Loop,h.onloop),h.onstatechange&&!h.onStateChange&&this.on(T.StateChange,h.onstatechange),this.taskQueue=new A(this.eventManager),this.init({src:this.src,buffer:this.buffer,autoplay:h.autoplay,animations:h.animations,stateMachines:h.stateMachines,artboard:h.artboard,useOffscreenRenderer:h.useOffscreenRenderer})}return x.new=function(h){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new x(h)},x.prototype.init=function(h){var C=this,P=h.src,j=h.buffer,H=h.animations,U=h.stateMachines,re=h.artboard,W=h.autoplay,L=W===void 0?!1:W,J=h.useOffscreenRenderer,Y=J===void 0?!1:J;if(this.src=P,this.buffer=j,!this.src&&!this.buffer)throw new Error(x.missingErrorMessage);var K=B(H),Z=B(U);this.loaded=!1,this.readyForPlaying=!1,b.awaitInstance().then(function(ce){C.runtime=ce,C.renderer=C.runtime.makeRenderer(C.canvas,Y),C.canvas.width||C.canvas.height||C.resizeDrawingSurfaceToCanvas(),C.initData(re,K,Z,L).then(function(){return C.setupRiveListeners()}).catch(function(z){console.error(z)})}).catch(function(ce){console.error(ce)})},x.prototype.setupRiveListeners=function(){var h=this;if(!this.shouldDisableRiveListeners){var C=(this.animator.stateMachines||[]).filter(function(P){return P.playing&&h.runtime.hasListeners(P.instance)}).map(function(P){return P.instance});this.eventCleanup=(0,c.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:C,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime)})}},x.prototype.initData=function(h,C,P,j){var H;return u(this,void 0,void 0,function(){var U,re,W;return f(this,function(L){switch(L.label){case 0:return this.src?(U=this,[4,k(this.src)]):[3,2];case 1:U.buffer=L.sent(),L.label=2;case 2:return re=this,[4,this.runtime.load(new Uint8Array(this.buffer))];case 3:return re.file=L.sent(),this.file?(this.initArtboard(h,C,P,j),this.loaded=!0,this.eventManager.fire({type:T.Load,data:(H=this.src)!==null&&H!==void 0?H:"buffer"}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,Promise.resolve()]):(W="Problem loading file; may be corrupt!",console.warn(W),this.eventManager.fire({type:T.LoadError,data:W}),[2,Promise.reject(W)])}})})},x.prototype.initArtboard=function(h,C,P,j){var H=h?this.file.artboardByName(h):this.file.defaultArtboard();if(!H){var U="Invalid artboard name or no default artboard";console.warn(U),this.eventManager.fire({type:T.LoadError,data:U});return}if(this.artboard=H,this.artboard.animationCount()<1){var U="Artboard has no animations";throw this.eventManager.fire({type:T.LoadError,data:U}),U}this.animator=new w(this.runtime,this.artboard,this.eventManager);var re;C.length>0||P.length>0?(re=C.concat(P),this.animator.add(re,j,!1)):re=[this.animator.atLeastOne(j,!1)],this.taskQueue.add({event:{type:j?T.Play:T.Pause,data:re}})},x.prototype.drawFrame=function(){this.startRendering()},x.prototype.draw=function(h,C){var P=performance.now();this.frameRequestId=null,this.lastRenderTime||(this.lastRenderTime=h),this.renderSecondTimer+=h-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,C==null||C());var j=(h-this.lastRenderTime)/1e3;this.lastRenderTime=h;for(var H=this.animator.animations.filter(function(z){return z.playing||z.needsScrub}).sort(function(z){return z.needsScrub?-1:1}),U=0,re=H;U<re.length;U++){var W=re[U];W.advance(j),W.instance.didLoop&&(W.loopCount+=1),W.apply(1)}for(var L=this.animator.stateMachines.filter(function(z){return z.playing}),J=0,Y=L;J<Y.length;J++){var K=Y[J];K.advance(j)}this.artboard.advance(j);var Z=this.renderer;Z.clear(),Z.save(),this.alignRenderer(),this.artboard.draw(Z),Z.restore(),Z.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(j),this.frameCount++;var ce=performance.now();for(this.frameTimes.push(ce),this.durations.push(ce-P);this.frameTimes[0]<=ce-1e3;)this.frameTimes.shift(),this.durations.shift();this.animator.isPlaying?this.startRendering():this.animator.isPaused?this.lastRenderTime=0:this.animator.isStopped&&(this.lastRenderTime=0)},x.prototype.alignRenderer=function(){var h=this,C=h.renderer,P=h.runtime,j=h._layout,H=h.artboard;C.align(j.runtimeFit(P),j.runtimeAlignment(P),{minX:j.minX,minY:j.minY,maxX:j.maxX,maxY:j.maxY},H.bounds)},Object.defineProperty(x.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(h,C){return h+C},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),x.prototype.cleanup=function(){var h,C;this.stopRendering(),this.cleanupInstances(),(h=this.renderer)===null||h===void 0||h.delete(),this.renderer=null,(C=this.file)===null||C===void 0||C.delete(),this.file=null},x.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},x.prototype.play=function(h,C){var P=this;if(h=B(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return P.play(h,C)}});return}this.animator.play(h),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},x.prototype.pause=function(h){var C=this;if(h=B(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return C.pause(h)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(h)},x.prototype.scrub=function(h,C){var P=this;if(h=B(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return P.scrub(h,C)}});return}this.animator.scrub(h,C||0),this.drawFrame()},x.prototype.stop=function(h){var C=this;if(h=B(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return C.stop(h)}});return}this.animator.stop(h),this.eventCleanup&&this.eventCleanup()},x.prototype.reset=function(h){var C,P=h==null?void 0:h.artboard,j=B(h==null?void 0:h.animations),H=B(h==null?void 0:h.stateMachines),U=(C=h==null?void 0:h.autoplay)!==null&&C!==void 0?C:!1;this.cleanupInstances(),this.initArtboard(P,j,H,U),this.taskQueue.process()},x.prototype.load=function(h){this.stop(),this.init(h)},Object.defineProperty(x.prototype,"layout",{get:function(){return this._layout},set:function(h){this._layout=h,(!h.maxX||!h.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),x.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},x.prototype.resizeDrawingSurfaceToCanvas=function(){if(this.canvas instanceof HTMLCanvasElement&&window){var h=this.canvas.getBoundingClientRect(),C=h.width,P=h.height,j=window.devicePixelRatio||1;this.canvas.width=j*C,this.canvas.height=j*P,this.startRendering(),this.resizeToCanvas()}},Object.defineProperty(x.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"animationNames",{get:function(){if(!this.loaded)return[];for(var h=[],C=0;C<this.artboard.animationCount();C++)h.push(this.artboard.animationByIndex(C).name);return h},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"stateMachineNames",{get:function(){if(!this.loaded)return[];for(var h=[],C=0;C<this.artboard.stateMachineCount();C++)h.push(this.artboard.stateMachineByIndex(C).name);return h},enumerable:!1,configurable:!0}),x.prototype.stateMachineInputs=function(h){if(this.loaded){var C=this.animator.stateMachines.find(function(P){return P.name===h});return C==null?void 0:C.inputs}},Object.defineProperty(x.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(h){return h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(h){return h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(h){return!h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(h){return!h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),x.prototype.on=function(h,C){this.eventManager.add({type:h,callback:C})},x.prototype.off=function(h,C){this.eventManager.remove({type:h,callback:C})},x.prototype.unsubscribe=function(h,C){console.warn("This function is deprecated: please use `off()` instead."),this.off(h,C)},x.prototype.removeAllRiveEventListeners=function(h){this.eventManager.removeAll(h)},x.prototype.unsubscribeAll=function(h){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(h)},x.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},x.prototype.startRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this.draw.bind(this)):this.frameRequestId=requestAnimationFrame(this.draw.bind(this)))},x.prototype.enableFPSCounter=function(h){this.runtime.enableFPSCounter(h)},x.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(x.prototype,"contents",{get:function(){if(this.loaded){for(var h={artboards:[]},C=0;C<this.file.artboardCount();C++){for(var P=this.file.artboardByIndex(C),j={name:P.name,animations:[],stateMachines:[]},H=0;H<P.animationCount();H++){var U=P.animationByIndex(H);j.animations.push(U.name)}for(var re=0;re<P.stateMachineCount();re++){for(var W=P.stateMachineByIndex(re),L=W.name,J=new this.runtime.StateMachineInstance(W,P),Y=[],K=0;K<J.inputCount();K++){var Z=J.input(K);Y.push({name:Z.name,type:Z.type})}j.stateMachines.push({name:L,inputs:Y})}h.artboards.push(j)}return h}},enumerable:!1,configurable:!0}),x.missingErrorMessage="Rive source file or data buffer required",x}(),k=function(x){return u(void 0,void 0,void 0,function(){var h,C,P;return f(this,function(j){switch(j.label){case 0:return h=new Request(x),[4,fetch(h)];case 1:return C=j.sent(),[4,C.arrayBuffer()];case 2:return P=j.sent(),[2,P]}})})},B=function(x){return typeof x=="string"?[x]:x instanceof Array?x:[]},R={EventManager:D,TaskQueueManager:A}})(),i})())})(ig);var QT=ig.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=l,n=QT;function r(v){return v&&typeof v=="object"&&"default"in v?v:{default:v}}var o=r(t),i=function(){return i=Object.assign||function(v){for(var w,T=1,I=arguments.length;T<I;T++)for(var D in w=arguments[T])Object.prototype.hasOwnProperty.call(w,D)&&(v[D]=w[D]);return v},i.apply(this,arguments)};function a(v,w){var T={};for(var I in v)Object.prototype.hasOwnProperty.call(v,I)&&w.indexOf(I)<0&&(T[I]=v[I]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function"){var D=0;for(I=Object.getOwnPropertySymbols(v);D<I.length;D++)w.indexOf(I[D])<0&&Object.prototype.propertyIsEnumerable.call(v,I[D])&&(T[I[D]]=v[I[D]])}return T}function s(){var v=typeof window<"u"&&typeof window.devicePixelRatio=="number"?window.devicePixelRatio:1;return Math.min(Math.max(1,v),3)}typeof SuppressedError=="function"&&SuppressedError;var c=function(){function v(){}return v.prototype.observe=function(){},v.prototype.unobserve=function(){},v.prototype.disconnect=function(){},v}(),u=globalThis.ResizeObserver||c,f=globalThis.ResizeObserver!==void 0,d=!f;function m(v,w){w===void 0&&(w=!0);var T=t.useState({width:0,height:0}),I=T[0],D=T[1];t.useEffect(function(){if(typeof window<"u"&&w){var R=function(){D({width:window.innerWidth,height:window.innerHeight})};return d&&(R(),window.addEventListener("resize",R)),function(){return window.removeEventListener("resize",R)}}},[]);var A,F,k,B=t.useRef(new u((A=function(R){f&&D({width:R[R.length-1].contentRect.width,height:R[R.length-1].contentRect.height})},F=0,k=0,function(){for(var R=this,x=[],h=0;h<arguments.length;h++)x[h]=arguments[h];clearTimeout(k),k=window.setTimeout(function(){return A.apply(R,x)},F)})));return t.useEffect(function(){var R=B.current;if(w){var x=v.current;return v.current&&f&&R.observe(v.current),function(){R.disconnect(),x&&f&&R.unobserve(x)}}R.disconnect()},[v,B]),I}var p={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function b(v){return Object.assign({},p,v)}function y(v){var w=v.riveLoaded,T=w!==void 0&&w,I=v.canvasRef,D=v.containerRef,A=v.options,F=A===void 0?{}:A,k=v.onCanvasHasResized,B=v.artboardBounds,R=b(F),x=t.useState({height:0,width:0}),h=x[0],C=h.height,P=h.width,j=x[1],H=t.useState({height:0,width:0}),U=H[0],re=U.height,W=U.width,L=H[1],J=t.useState(!0),Y=J[0],K=J[1],Z=R.fitCanvasToArtboardHeight,ce=R.shouldResizeCanvasToContainer,z=R.useDevicePixelRatio,G=m(D,ce),oe=function(){var xe=s(),Ee=t.useState(xe),Ae=Ee[0],Ie=Ee[1];return t.useEffect(function(){if(typeof window<"u"&&"matchMedia"in window){var Le=function(){var at=s();Ie(at)},ke=window.matchMedia("screen and (resolution: ".concat(Ae,"dppx)"));return ke.hasOwnProperty("addEventListener")?ke.addEventListener("change",Le):ke.addListener(Le),function(){ke.hasOwnProperty("removeEventListener")?ke.removeEventListener("change",Le):ke.removeListener(Le)}}},[Ae]),Ae}(),ne=B??{},ie=ne.maxX,ee=ne.maxY,pe=t.useCallback(function(){var xe,Ee,Ae,Ie,Le=(Ee=(xe=D.current)===null||xe===void 0?void 0:xe.clientWidth)!==null&&Ee!==void 0?Ee:0,ke=(Ie=(Ae=D.current)===null||Ae===void 0?void 0:Ae.clientHeight)!==null&&Ie!==void 0?Ie:0;return Z&&B?{width:Le,height:Le*(B.maxY/B.maxX)}:{width:Le,height:ke}},[D,Z,ie,ee]);t.useEffect(function(){if(ce&&D.current&&T){var xe=pe(),Ee=xe.width,Ae=xe.height,Ie=!1;if(I.current){var Le=Ee!==P||Ae!==C;if(R.fitCanvasToArtboardHeight&&Le&&(D.current.style.height=Ae+"px",Ie=!0),R.useDevicePixelRatio){if(Le||Ee*oe!==W||Ae*oe!==re){var ke=oe*Ee,at=oe*Ae;I.current.width=ke,I.current.height=at,I.current.style.width=Ee+"px",I.current.style.height=Ae+"px",L({width:ke,height:at}),Ie=!0}}else Le&&(I.current.width=Ee,I.current.height=Ae,L({width:Ee,height:Ae}),Ie=!0);j({width:Ee,height:Ae})}k&&(Y||Ie)&&k&&k(),Y&&K(!1)}},[I,D,G,oe,pe,Y,K,re,W,C,P,k,ce,Z,z,T])}function $(v){var w=v.setContainerRef,T=v.setCanvasRef,I=v.className,D=I===void 0?"":I,A=v.style,F=v.children,k=a(v,["setContainerRef","setCanvasRef","className","style","children"]),B=i({width:"100%",height:"100%"},A);return o.default.createElement("div",i({ref:w,className:D},!D&&{style:B}),o.default.createElement("canvas",i({ref:T,style:{verticalAlign:"top",width:0,height:0}},k),F))}function E(v,w){w===void 0&&(w={});var T=t.useRef(null),I=t.useRef(null),D=t.useState(null),A=D[0],F=D[1],k=!!v,B=b(w),R=t.useCallback(function(){A&&(A.startRendering(),A.resizeToCanvas())},[A]);y({riveLoaded:!!A,canvasRef:T,containerRef:I,options:B,onCanvasHasResized:R,artboardBounds:A==null?void 0:A.bounds});var x=t.useCallback(function(j){if(j&&v&&k){var H=B.useOffscreenRenderer,U=new n.Rive(i(i({useOffscreenRenderer:H},v),{canvas:j}));U.on(n.EventType.Load,function(){T.current?F(U):U.cleanup()})}else j===null&&T.current&&(T.current.height=0,T.current.width=0);T.current=j},[k]),h=t.useCallback(function(j){I.current=j},[]);t.useEffect(function(){var j=new IntersectionObserver(function(H){H[0].isIntersecting?A&&A.startRendering():A&&A.stopRendering()});return T.current&&j.observe(T.current),function(){j.disconnect()}},[A]),t.useEffect(function(){return function(){A&&(A.cleanup(),F(null))}},[A]);var C=v==null?void 0:v.animations;t.useEffect(function(){A&&C&&(A.isPlaying?(A.stop(A.animationNames),A.play(C)):A.isPaused&&(A.stop(A.animationNames),A.pause(C)))},[C,A]);var P=t.useCallback(function(j){return o.default.createElement($,i({setContainerRef:h,setCanvasRef:x},j))},[x,h]);return{canvas:T.current,container:I.current,setCanvasRef:x,setContainerRef:h,rive:A,RiveComponent:P}}e.default=function(v){var w=v.src,T=v.artboard,I=v.animations,D=v.stateMachines,A=v.layout,F=v.useOffscreenRenderer,k=F===void 0||F,B=v.shouldDisableRiveListeners,R=B!==void 0&&B,x=v.shouldResizeCanvasToContainer,h=x===void 0||x,C=v.children,P=a(v,["src","artboard","animations","stateMachines","layout","useOffscreenRenderer","shouldDisableRiveListeners","shouldResizeCanvasToContainer","children"]),j=E({src:w,artboard:T,animations:I,layout:A,stateMachines:D,autoplay:!0,shouldDisableRiveListeners:R},{useOffscreenRenderer:k,shouldResizeCanvasToContainer:h}).RiveComponent;return o.default.createElement(j,i({},P),C)},e.useResizeCanvas=y,e.useRive=E,e.useStateMachineInput=function(v,w,T,I){var D=t.useState(null),A=D[0],F=D[1];return t.useEffect(function(){function k(){if(v&&w&&T||F(null),v&&w&&T){var B=v.stateMachineInputs(w);if(B){var R=B.find(function(x){return x.name===T});I!==void 0&&R&&(R.value=I),F(R||null)}}else F(null)}k(),v&&v.on(n.EventType.Play,function(){k()})},[v]),A},Object.keys(n).forEach(function(v){v==="default"||e.hasOwnProperty(v)||Object.defineProperty(e,v,{enumerable:!0,get:function(){return n[v]}})})})(og);const JT=gh(og),wl=({src:e="https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:t,height:n,style:r,...o})=>M.jsx(rt,{width:t,height:n,style:r,children:M.jsx(JT,{src:e,...o})});wl.defaultProps={src:"https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:"300px",height:"300px",style:{}};const ag=({isLoading:e,className:t,width:n,height:r,onClose:o,src:i,noScroll:a="noscroll",...s})=>(l.useEffect(()=>(e?document.body.classList.add(a):document.body.classList.remove(a),()=>{document.body.classList.remove(a)}),[e,a]),e?M.jsx(rt,{className:t,"data-test-id":s["data-testid-backdrop"],onClick:o,position:"fixed",left:"$0",top:"$0",width:"$full",height:"$full",cursor:"progress",style:{backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:9999},children:M.jsx(rt,{"data-test-id":s["data-testid-loader"],position:"absolute",left:"50%",top:"50%",width:n,height:r,children:M.jsx(wl,{src:i,width:n,height:r,style:{transform:"translate(-50%, -50%)"}})})}):null);ag.defaultProps={onClose:()=>{},className:"",src:void 0,noScroll:"noscroll","data-testid-backdrop":"full-loader-backdrop","data-testid-loader":"full-loader-loader"};var eI=Ke({defaultClassName:"_1a8lrjn1 j1jih79l j1jih7ak",variantClassNames:{color:{primary:"_1a8lrjn2",white:"_1a8lrjn3"},size:{small:"_1a8lrjn4",medium:"_1a8lrjn5",large:"_1a8lrjn6"}},defaultVariants:{color:"primary",size:"medium"},compoundVariants:[]});const tI=({color:e,size:t,...n})=>M.jsx(rt,{...n,className:$e(eI({color:e,size:t}))});function nI(e){return class extends l.Component{constructor(){super(...arguments),this.getValue=()=>{const{children:n,selectedValue:r}=this.props;return r&&r.length?r:n?l.Children.map(n,o=>{const i=l.Children.toArray(o.children||o.props.children);return i&&i[0]&&i[0].props.value}):[]},this.onChange=(n,r,o)=>{const i=this.getValue().concat();i[n]=r,o&&o(i,n)},this.onValueChange=(n,r)=>{this.onChange(n,r,this.props.onValueChange)},this.onScrollChange=(n,r)=>{this.onChange(n,r,this.props.onScrollChange)}}render(){return M.jsx(e,{...this.props,getValue:this.getValue,onValueChange:this.onValueChange,onScrollChange:this.props.onScrollChange&&this.onScrollChange})}}}var rI="_1ypj0tt5",oI="_1ypj0tt4",iI="_1ypj0tt3",Hp="_1ypj0tt1",aI="_1ypj0tt0",sI="_1ypj0tt2";const cI=({className:e,children:t,getValue:n,onScrollChange:r,onValueChange:o})=>{const i=n==null?void 0:n(),a=l.Children.map(t,(s,c)=>l.cloneElement(s,{selectedValue:i==null?void 0:i[c],onValueChange:(...u)=>o==null?void 0:o(c,...u),onScrollChange:(...u)=>r==null?void 0:r(c,...u)}));return M.jsx(rt,{className:$e(rI,e),children:a})},sg=nI(cI),uI=e=>null;function lI(e){var t;const n=(r,o,i)=>{const a=Math.round(r/o);return Math.min(a,i-1)};return t=class extends l.Component{constructor(){super(...arguments),this.selectByIndex=(r,o,i)=>{r<0||r>=l.Children.count(this.props.children)||!o||i(r*o)},this.doScrollingComplete=(r,o,i)=>{const a=l.Children.toArray(this.props.children),s=n(r,o,a.length),c=a[s];c?i(c.props.value):console.warn&&console.warn("child not found",a,s)},this.select=(r,o,i)=>{const a=l.Children.toArray(this.props.children);for(let s=0,c=a.length;s<c;s+=1)if(a[s].props.value===r){this.selectByIndex(s,o,i);return}this.selectByIndex(0,o,i)}}render(){return M.jsx(e,{...this.props,doScrollingComplete:this.doScrollingComplete,computeChildIndex:n,select:this.select})}},t.Item=uI,t}const dI=e=>{const{children:t,selectedValue:n,defaultSelectedValue:r,select:o,doScrollingComplete:i,onValueChange:a,computeChildIndex:s,disabled:c,className:u}=e,f=l.useRef(null),d=l.useRef(null),m=l.useRef(null),p=l.useRef(0),b=l.useRef(0),y=l.useMemo(()=>{if(n||r)return n||r;const k=l.Children.toArray(t);return k&&k[0]&&k[0].props.value},[t,r,n]),[$,E]=l.useState(y),v=(()=>{let k=-1,B=0,R=0,x=!1,h=!1;const C=(L,J)=>{L.transform=J},P=(L,J)=>{L.transition=J},j=(L,J,Y=.3)=>{var K,Z;k!==J&&(k=J,P((K=d.current)==null?void 0:K.style,`cubic-bezier(0,0,0.2,1.15) ${Y}s`),C((Z=d.current)==null?void 0:Z.style,`translate3d(0,${-J}px,0)`),setTimeout(()=>{A(),d.current&&P(d.current.style,"")},+Y*1e3))},H=((L=30,J=100)=>{let Y=0,K=0,Z=0;const ce={record:z=>{const G=+new Date;Z=(z-K)/(G-Y),G-Y>=L&&(Z=G-Y<=J?Z:0,K=z,Y=G)},getVelocity:z=>(z!==K&&ce.record(z),Z)};return ce})(),U=()=>{h=!1;let L=k;const J=(t.length-1)*p.current;let Y=.3;const K=H.getVelocity(L)*4;K&&(L=K*40+L,Y=Math.abs(K)*.1),L%p.current!==0&&(L=Math.round(L/p.current)*p.current),L<0?L=0:L>J&&(L=J),j(0,L,Y<.3?.3:Y),D()},re=L=>{x||(h=!0,R=L,B=k)},W=L=>{var J;x||!h||(k=B-L+R,H.record(k),D(),C((J=d.current)==null?void 0:J.style,`translate3d(0,${-k}px,0)`))};return{touchstart:L=>re(L.touches[0].pageY),mousedown:L=>re(L.pageY),touchmove:L=>{L.preventDefault(),W(L.touches[0].pageY)},mousemove:L=>{L.preventDefault(),W(L.pageY)},touchend:()=>U(),touchcancel:()=>U(),mouseup:()=>U(),getValue:()=>k,scrollTo:j,setDisabled:(L=!1)=>{x=L}}})(),w=l.useCallback(k=>{v.scrollTo(0,k)},[v]),T=l.useCallback(k=>{v.scrollTo(0,k,0)},[v]),I=k=>{k!==$&&("selectedValue"in e||E(k),a&&a(k))},D=()=>{const k=v.getValue();if(k>=0){const B=l.Children.toArray(t),R=s(k,p.current,B.length);if(b.current!==R){b.current=R;const x=B[R];x&&e.onScrollChange?e.onScrollChange(x.props.value):!B&&console.warn&&console.warn("child not found",t,R)}}},A=()=>{const k=v.getValue();k>=0&&i(k,p.current,I)},F=()=>{const k=`${Hp} ${sI}`,B=x=>{const{className:h="",style:C,value:P}=x.props,j=$===P;return M.jsx("div",{style:{...C},"data-selected":j?"true":void 0,className:`${j?k:Hp} ${h}`,children:x.props.children},P)};return l.Children?l.Children.map(t,B):[].concat(t).map(B)};return l.useEffect(()=>{var x,h,C;const k=((x=f.current)==null?void 0:x.getBoundingClientRect().height)??0,B=((h=m.current)==null?void 0:h.getBoundingClientRect().height)??0;p.current=((C=m.current)==null?void 0:C.getBoundingClientRect().height)??0;let R=Math.floor(k/B);return R%2===0&&(R-=1),R-=1,R/=2,d.current.style.padding=`${B*R}px 0`,m.current.style.top=`${B*R}px`,v.setDisabled(c),o($,p.current,w),Object.keys(v).forEach(P=>{var j;if(P.indexOf("touch")===0||P.indexOf("mouse")===0){const H=P.indexOf("move")>=0?{passive:!1}:{passive:!0};(j=f.current)==null||j.addEventListener(P,v[P],H)}}),()=>{Object.keys(v).forEach(P=>{var j;(P.indexOf("touch")===0||P.indexOf("mouse")===0)&&((j=f.current)==null||j.removeEventListener(P,v[P]))})}},[c,v,w,o,$]),l.useEffect(()=>{"selectedValue"in e&&$!==n&&E(n),v.setDisabled(c)},[n,$,e,v,c]),l.useEffect(()=>{o($,p.current,T)},[T,o,$]),M.jsxs("div",{className:$e(aI,u),ref:f,children:[M.jsx("div",{className:$e(iI,u),ref:m}),M.jsx("div",{className:oI,ref:d,children:F()})]})},iu=lI(dI);var Mt=(e=>(e.DATE="date",e.MONTH="month",e.YEAR="year",e.DATE_TIME="datetime",e.TIME="time",e))(Mt||{});const Ka=24*60*60*1e3,fI={am:"AM",pm:"PM"},cg=e=>new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),pc=e=>e<10?`0${e}`:`${e}`,Sr=e=>new Date(+e),pI=(e,t)=>{e.setDate(Math.min(e.getDate(),cg(new Date(e.getFullYear(),t)))),e.setMonth(t)},Wp=(e,t,n)=>{if(n){const r=e.getHours();let o=t;o=r>=12?t+12:t,o=o>=24?0:o,e.setHours(o)}else e.setHours(t)},zp=(e,t)=>{t===0?e.setTime(+e-Ka/2):e.setTime(+e+Ka/2)},Up=(e,t)=>(t&&(e===0&&(e=12),e>12&&(e-=12)),e),hI=e=>["January","February","March","April","May","June","July","August","September","October","November","December"][e],vI=e=>{const{date:t,defaultDate:n=new Date(2e3,0,1),locale:r=fI,mode:o="date",disabled:i=!1,className:a,minuteStep:s=1,use12Hours:c=!1,minDate:u,maxDate:f,formatDay:d,formatMonth:m}=e,[p,b]=l.useState(t||n),y=l.useRef(new Date(-1)),$=l.useRef(new Date);l.useEffect(()=>{"date"in e&&b(t||n)},[t,n,e]);const E=()=>C(p||y.current),v=()=>x().getFullYear(),w=()=>h().getFullYear(),T=()=>x().getMonth(),I=()=>h().getMonth(),D=()=>x().getDate(),A=()=>h().getDate(),F=()=>x().getHours(),k=()=>h().getHours(),B=()=>x().getMinutes(),R=()=>h().getMinutes(),x=()=>u||y.current,h=()=>f||$.current,C=Y=>{const K=x(),Z=h();if(o===Mt.DATE_TIME){if(Y<K)return Sr(K);if(Y>Z)return Sr(Z)}else if(o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH){if(+Y+Ka<=K)return Sr(K);if(Y>=+Z+Ka)return Sr(Z)}else if(o===Mt.TIME){const ce=Z.getHours(),z=Z.getMinutes(),G=K.getHours(),oe=K.getMinutes(),ne=Y.getHours(),ie=Y.getMinutes();if(ne<G||ne===G&&ie<oe)return Sr(K);if(ne>ce||ne===ce&&ie>z)return Sr(Z)}return Y},P=(Y,K)=>{const Z=parseInt(Y[K],10),ce=Sr(E());if(o===Mt.DATE_TIME||o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH)switch(K){case 0:ce.setDate(Z);break;case 1:pI(ce,Z);break;case 2:ce.setFullYear(Z);break;case 3:Wp(ce,Z);break;case 4:ce.setMinutes(Z);break;case 5:zp(ce,Z);break}else if(o===Mt.TIME)switch(K){case 0:Wp(ce,Z);break;case 1:ce.setMinutes(Z);break;case 2:zp(ce,Z);break}return C(ce)},j=(Y,K)=>{const Z=P(Y,K);"date"in e||b(Z),e.onDateChange&&e.onDateChange(Z),e.onValueChange&&e.onValueChange(Y,K)},H=(Y,K)=>{if(e.onScrollChange){const Z=P(Y,K);e.onScrollChange(Z,Y,K)}},U=()=>{const Y=E(),K=Y.getFullYear(),Z=Y.getMonth(),ce=v(),z=w(),G=T(),oe=I(),ne=D(),ie=A(),ee=[];for(let We=ce;We<=z;We+=1)ee.push({value:`${We}`,label:`${We}`});const pe={key:"year",props:{children:ee}};if(o===Mt.YEAR)return[pe];const xe=[];let Ee=0,Ae=11;ce===K&&(Ee=G),z===K&&(Ae=oe);for(let We=Ee;We<=Ae;We+=1){const Et=m?m(We,Y):hI(We);xe.push({value:`${We}`,label:Et})}const Ie={key:"month",props:{children:xe}};if(o===Mt.MONTH)return[Ie,pe];const Le=[];let ke=1,at=cg(Y);ce===K&&G===Z&&(ke=ne),z===K&&oe===Z&&(at=ie);for(let We=ke;We<=at;We+=1){const Et=d?d(We,Y):`${We}`;Le.push({value:`${We}`,label:Et})}return[{key:"day",props:{children:Le}},Ie,pe]},re=Y=>{let{minHour:K=0,maxHour:Z=23,minMinute:ce=0,maxMinute:z=59}=e;const G=B(),oe=R(),ne=F(),ie=k(),ee=Y.getHours();if(o===Mt.DATE_TIME){const Ie=Y.getFullYear(),Le=Y.getMonth(),ke=Y.getDate(),at=v(),We=w(),Et=T(),Xe=I(),At=D(),Te=A();at===Ie&&Et===Le&&At===ke&&(K=ne,ne===ee&&(ce=G)),We===Ie&&Xe===Le&&Te===ke&&(Z=ie,ie===ee&&(z=oe))}else K=ne,ne===ee&&(ce=G),Z=ie,ie===ee&&(z=oe);const pe=[];K===0&&Z===0||K!==0&&Z!==0?K=Up(K):K===0&&c&&(K=1,pe.push({value:"0",label:"12"})),Z=Up(Z);for(let Ie=K;Ie<=Z;Ie+=1)pe.push({value:`${Ie}`,label:pc(Ie)});const xe=[],Ee=Y.getMinutes();for(let Ie=ce;Ie<=z;Ie+=s)xe.push({value:`${Ie}`,label:pc(Ie)}),Ee>Ie&&Ee<Ie+s&&xe.push({value:`${Ee}`,label:pc(Ee)});return{cols:[{key:"hours",props:{children:pe}},{key:"minutes",props:{children:xe}}].concat(c?[{key:"ampm",props:{children:[{value:"0",label:r.am},{value:"1",label:r.pm}]}}]:[]),selMinute:Ee}},W=()=>{const Y=E();let K=[],Z=[];if(o===Mt.YEAR)return{cols:U(),value:[`${Y.getFullYear()}`]};if(o===Mt.MONTH)return{cols:U(),value:[`${Y.getMonth()}`,`${Y.getFullYear()}`]};if((o===Mt.DATE_TIME||o===Mt.DATE)&&(K=U(),Z=[`${Y.getDate()}`,`${Y.getMonth()}`,`${Y.getFullYear()}`]),o===Mt.DATE_TIME||o===Mt.TIME){const ce=re(Y);K=K.concat(ce.cols);const z=Y.getHours();let G=[`${z}`,`${ce.selMinute}`],oe=z;c&&(oe=z>12?z-12:z,G=[`${oe}`,`${ce.selMinute}`,`${z>=12?1:0}`]),Z=Z.concat(G)}return{value:Z,cols:K}},{value:L,cols:J}=W();return M.jsx(sg,{className:a,selectedValue:L,onValueChange:j,onScrollChange:H,children:J.map(Y=>M.jsx(iu,{disabled:i,className:`picker-item-${Y.key}`,children:Y.props.children.map(K=>M.jsx(iu.Item,{value:K.value,children:K.label},K.value))},Y.key))})};var au={exports:{}},yt={};/** @license React v17.0.2
|
|
161
161
|
* react-is.production.min.js
|
|
162
162
|
*
|
|
@@ -171,4 +171,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
171
171
|
*
|
|
172
172
|
* This source code is licensed under the MIT license found in the
|
|
173
173
|
* LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/var Kp;function gI(){return Kp||(Kp=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,o=60114,i=60109,a=60110,s=60112,c=60113,u=60120,f=60115,d=60116,m=60121,p=60122,b=60117,y=60129,$=60131;if(typeof Symbol=="function"&&Symbol.for){var E=Symbol.for;e=E("react.element"),t=E("react.portal"),n=E("react.fragment"),r=E("react.strict_mode"),o=E("react.profiler"),i=E("react.provider"),a=E("react.context"),s=E("react.forward_ref"),c=E("react.suspense"),u=E("react.suspense_list"),f=E("react.memo"),d=E("react.lazy"),m=E("react.block"),p=E("react.server.block"),b=E("react.fundamental"),E("react.scope"),E("react.opaque.id"),y=E("react.debug_trace_mode"),E("react.offscreen"),$=E("react.legacy_hidden")}var v=!1;function w(ie){return!!(typeof ie=="string"||typeof ie=="function"||ie===n||ie===o||ie===y||ie===r||ie===c||ie===u||ie===$||v||typeof ie=="object"&&ie!==null&&(ie.$$typeof===d||ie.$$typeof===f||ie.$$typeof===i||ie.$$typeof===a||ie.$$typeof===s||ie.$$typeof===b||ie.$$typeof===m||ie[0]===p))}function T(ie){if(typeof ie=="object"&&ie!==null){var ee=ie.$$typeof;switch(ee){case e:var pe=ie.type;switch(pe){case n:case o:case r:case c:case u:return pe;default:var xe=pe&&pe.$$typeof;switch(xe){case a:case s:case d:case f:case i:return xe;default:return ee}}case t:return ee}}}var I=a,D=i,A=e,F=s,k=n,B=d,R=f,x=t,h=o,C=r,P=c,j=!1,H=!1;function U(ie){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function re(ie){return H||(H=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(ie){return T(ie)===a}function L(ie){return T(ie)===i}function J(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===e}function Y(ie){return T(ie)===s}function K(ie){return T(ie)===n}function Z(ie){return T(ie)===d}function ce(ie){return T(ie)===f}function z(ie){return T(ie)===t}function G(ie){return T(ie)===o}function oe(ie){return T(ie)===r}function ne(ie){return T(ie)===c}bt.ContextConsumer=I,bt.ContextProvider=D,bt.Element=A,bt.ForwardRef=F,bt.Fragment=k,bt.Lazy=B,bt.Memo=R,bt.Portal=x,bt.Profiler=h,bt.StrictMode=C,bt.Suspense=P,bt.isAsyncMode=U,bt.isConcurrentMode=re,bt.isContextConsumer=W,bt.isContextProvider=L,bt.isElement=J,bt.isForwardRef=Y,bt.isFragment=K,bt.isLazy=Z,bt.isMemo=ce,bt.isPortal=z,bt.isProfiler=G,bt.isStrictMode=oe,bt.isSuspense=ne,bt.isValidElementType=w,bt.typeOf=T}()),bt}process.env.NODE_ENV==="production"?au.exports=mI():au.exports=gI();var qp=au.exports;let Xp=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Gp=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",hc=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return Gp(n.overflowY,t)||Gp(n.overflowX,t)||(r=>{let o=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)})(e)}return!1},sa=(e,t,n,r,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0,yI=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var bI=(e,t)=>{var n,r,o,i,a,s;if(typeof document>"u")return[];let{scrollMode:c,block:u,inline:f,boundary:d,skipOverflowHiddenElements:m}=t,p=typeof d=="function"?d:C=>C!==d;if(!Xp(e))throw new TypeError("Invalid target");let b=document.scrollingElement||document.documentElement,y=[],$=e;for(;Xp($)&&p($);){if($=yI($),$===b){y.push($);break}$!=null&&$===document.body&&hc($)&&!hc(document.documentElement)||$!=null&&hc($,m)&&y.push($)}let E=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,v=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,w=(a=window.scrollX)!=null?a:pageXOffset,T=(s=window.scrollY)!=null?s:pageYOffset,{height:I,width:D,top:A,right:F,bottom:k,left:B}=e.getBoundingClientRect(),R=u==="start"||u==="nearest"?A:u==="end"?k:A+I/2,x=f==="center"?B+D/2:f==="end"?F:B,h=[];for(let C=0;C<y.length;C++){let P=y[C],{height:j,width:H,top:U,right:re,bottom:W,left:L}=P.getBoundingClientRect();if(c==="if-needed"&&A>=0&&B>=0&&k<=v&&F<=E&&A>=U&&k<=W&&B>=L&&F<=re)return h;let J=getComputedStyle(P),Y=parseInt(J.borderLeftWidth,10),K=parseInt(J.borderTopWidth,10),Z=parseInt(J.borderRightWidth,10),ce=parseInt(J.borderBottomWidth,10),z=0,G=0,oe="offsetWidth"in P?P.offsetWidth-P.clientWidth-Y-Z:0,ne="offsetHeight"in P?P.offsetHeight-P.clientHeight-K-ce:0,ie="offsetWidth"in P?P.offsetWidth===0?0:H/P.offsetWidth:0,ee="offsetHeight"in P?P.offsetHeight===0?0:j/P.offsetHeight:0;if(b===P)z=u==="start"?R:u==="end"?R-v:u==="nearest"?sa(T,T+v,v,K,ce,T+R,T+R+I,I):R-v/2,G=f==="start"?x:f==="center"?x-E/2:f==="end"?x-E:sa(w,w+E,E,Y,Z,w+x,w+x+D,D),z=Math.max(0,z+T),G=Math.max(0,G+w);else{z=u==="start"?R-U-K:u==="end"?R-W+ce+ne:u==="nearest"?sa(U,W,j,K,ce+ne,R,R+I,I):R-(U+j/2)+ne/2,G=f==="start"?x-L-Y:f==="center"?x-(L+H/2)+oe/2:f==="end"?x-re+Z+oe:sa(L,re,H,Y,Z+oe,x,x+D,D);let{scrollLeft:pe,scrollTop:xe}=P;z=Math.max(0,Math.min(xe+z/ee,P.scrollHeight-j/ee+ne)),G=Math.max(0,Math.min(pe+G/ie,P.scrollWidth-H/ie+oe)),R+=xe-z,x+=pe-G}h.push({el:P,top:z,left:G})}return h},wI=0;function Zp(e){return typeof e=="function"?e:hn}function hn(){}function ug(e,t){if(e){var n=bI(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(function(r){var o=r.el,i=r.top,a=r.left;o.scrollTop=i,o.scrollLeft=a})}}function Qp(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function El(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];r(),n=setTimeout(function(){n=null,e.apply(void 0,a)},t)}return o.cancel=r,o}function Ot(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return s&&s.apply(void 0,[r].concat(i)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function pr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(o){typeof o=="function"?o(r):o&&(o.current=r)})}}function lg(){return String(wI++)}function dg(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function Jp(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function fg(e){return typeof e.type=="string"}function pg(e){return e.props}function EI(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var xI=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function ca(e){e===void 0&&(e={});var t={};return xI.forEach(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function xi(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=qa(t,r)?t[r]:e[r],n},{})}function qa(e,t){return e[t]!==void 0}function _i(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function _I(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pr(e,t,n,r,o){if(o===void 0&&(o=!0),n===0)return-1;var i=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:i+1);var a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);var s=Vr(e,a,n,r,o);return s===-1?t>=n?-1:t:s}function Vr(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a<n;a++)if(!r(a).hasAttribute("disabled"))return a}else for(var s=t-1;s>=0;s--)if(!r(s).hasAttribute("disabled"))return s;return o?e>0?Vr(1,0,n,r,!1):Vr(-1,n-1,n,r,!1):-1}function Xa(e,t,n,r){return r===void 0&&(r=!0),t.some(function(o){return o&&(Qp(o,e,n)||r&&Qp(o,n.document.activeElement,n))})}var xl=hn;process.env.NODE_ENV!=="production"&&(xl=function(t,n,r){var o="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(t).forEach(function(i){n[i]!==void 0&&r[i]===void 0?console.error('downshift: A component has changed the controlled prop "'+i+'" to be uncontrolled. '+o):n[i]===void 0&&r[i]!==void 0&&console.error('downshift: A component has changed the uncontrolled prop "'+i+'" to be controlled. '+o)})});var SI=El(function(e){hg(e).textContent=""},500);function _l(e,t){var n=hg(t);e&&(n.textContent=e,SI(t))}function hg(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var vg=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,mg=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,gg=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,Ea=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,xa=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,yg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,bg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,wg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Eg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,xg=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,_g=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,Sg=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,Cg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,su=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,$g=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Tg=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,Ig=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,CI=Object.freeze({__proto__:null,unknown:vg,mouseUp:mg,itemMouseEnter:gg,keyDownArrowUp:Ea,keyDownArrowDown:xa,keyDownEscape:yg,keyDownEnter:bg,keyDownHome:wg,keyDownEnd:Eg,clickItem:xg,blurInput:_g,changeInput:Sg,keyDownSpaceButton:Cg,clickButton:su,blurButton:$g,controlledPropUpdatedSelectedItem:Tg,touchEnd:Ig}),$I=["refKey","ref"],TI=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],II=["onKeyDown","onBlur","onChange","onInput","onChangeText"],RI=["refKey","ref"],OI=["onMouseMove","onMouseDown","onClick","onPress","index","item"],PI=function(){var e=function(t){Du(n,t);function n(o){var i;i=t.call(this,o)||this,i.id=i.props.id||"downshift-"+lg(),i.menuId=i.props.menuId||i.id+"-menu",i.labelId=i.props.labelId||i.id+"-label",i.inputId=i.props.inputId||i.id+"-input",i.getItemId=i.props.getItemId||function(v){return i.id+"-item-"+v},i.input=null,i.items=[],i.itemCount=null,i.previousResultCount=0,i.timeoutIds=[],i.internalSetTimeout=function(v,w){var T=setTimeout(function(){i.timeoutIds=i.timeoutIds.filter(function(I){return I!==T}),v()},w);i.timeoutIds.push(T)},i.setItemCount=function(v){i.itemCount=v},i.unsetItemCount=function(){i.itemCount=null},i.setHighlightedIndex=function(v,w){v===void 0&&(v=i.props.defaultHighlightedIndex),w===void 0&&(w={}),w=ca(w),i.internalSetState(ae({highlightedIndex:v},w))},i.clearSelection=function(v){i.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},v)},i.selectItem=function(v,w,T){w=ca(w),i.internalSetState(ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:v,inputValue:i.props.itemToString(v)},w),T)},i.selectItemAtIndex=function(v,w,T){var I=i.items[v];I!=null&&i.selectItem(I,w,T)},i.selectHighlightedItem=function(v,w){return i.selectItemAtIndex(i.getState().highlightedIndex,v,w)},i.internalSetState=function(v,w){var T,I,D={},A=typeof v=="function";return!A&&v.hasOwnProperty("inputValue")&&i.props.onInputValueChange(v.inputValue,ae({},i.getStateAndHelpers(),v)),i.setState(function(F){F=i.getState(F);var k=A?v(F):v;k=i.props.stateReducer(F,k),T=k.hasOwnProperty("selectedItem");var B={};return T&&k.selectedItem!==F.selectedItem&&(I=k.selectedItem),k.type=k.type||vg,Object.keys(k).forEach(function(R){F[R]!==k[R]&&(D[R]=k[R]),R!=="type"&&(k[R],qa(i.props,R)||(B[R]=k[R]))}),A&&k.hasOwnProperty("inputValue")&&i.props.onInputValueChange(k.inputValue,ae({},i.getStateAndHelpers(),k)),B},function(){Zp(w)();var F=Object.keys(D).length>1;F&&i.props.onStateChange(D,i.getStateAndHelpers()),T&&i.props.onSelect(v.selectedItem,i.getStateAndHelpers()),I!==void 0&&i.props.onChange(I,i.getStateAndHelpers()),i.props.onUserAction(D,i.getStateAndHelpers())})},i.rootRef=function(v){return i._rootNode=v},i.getRootProps=function(v,w){var T,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=cn(I,$I),B=w===void 0?{}:w,R=B.suppressRefError,x=R===void 0?!1:R;i.getRootProps.called=!0,i.getRootProps.refKey=A,i.getRootProps.suppressRefError=x;var h=i.getState(),C=h.isOpen;return ae((T={},T[A]=pr(F,i.rootRef),T.role="combobox",T["aria-expanded"]=C,T["aria-haspopup"]="listbox",T["aria-owns"]=C?i.menuId:null,T["aria-labelledby"]=i.labelId,T),k)},i.keyDownHandlers={ArrowDown:function(w){var T=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?5:1;this.moveHighlightedIndex(I,{type:xa})}else this.internalSetState({isOpen:!0,type:xa},function(){var D=T.getItemCount();if(D>0){var A=T.getState(),F=A.highlightedIndex,k=Pr(1,F,D,function(B){return T.getItemNodeFromIndex(B)});T.setHighlightedIndex(k,{type:xa})}})},ArrowUp:function(w){var T=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?-5:-1;this.moveHighlightedIndex(I,{type:Ea})}else this.internalSetState({isOpen:!0,type:Ea},function(){var D=T.getItemCount();if(D>0){var A=T.getState(),F=A.highlightedIndex,k=Pr(-1,F,D,function(B){return T.getItemNodeFromIndex(B)});T.setHighlightedIndex(k,{type:Ea})}})},Enter:function(w){if(w.which!==229){var T=this.getState(),I=T.isOpen,D=T.highlightedIndex;if(I&&D!=null){w.preventDefault();var A=this.items[D],F=this.getItemNodeFromIndex(D);if(A==null||F&&F.hasAttribute("disabled"))return;this.selectHighlightedItem({type:bg})}}},Escape:function(w){w.preventDefault(),this.reset(ae({type:yg},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},i.buttonKeyDownHandlers=ae({},i.keyDownHandlers,{" ":function(w){w.preventDefault(),this.toggleMenu({type:Cg})}}),i.inputKeyDownHandlers=ae({},i.keyDownHandlers,{Home:function(w){var T=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Vr(1,0,A,function(k){return T.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:wg})}}},End:function(w){var T=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Vr(-1,A-1,A,function(k){return T.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:Eg})}}}}),i.getToggleButtonProps=function(v){var w=v===void 0?{}:v,T=w.onClick;w.onPress;var I=w.onKeyDown,D=w.onKeyUp,A=w.onBlur,F=cn(w,TI),k=i.getState(),B=k.isOpen,R={onClick:Ot(T,i.buttonHandleClick),onKeyDown:Ot(I,i.buttonHandleKeyDown),onKeyUp:Ot(D,i.buttonHandleKeyUp),onBlur:Ot(A,i.buttonHandleBlur)},x=F.disabled?{}:R;return ae({type:"button",role:"button","aria-label":B?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},x,F)},i.buttonHandleKeyUp=function(v){v.preventDefault()},i.buttonHandleKeyDown=function(v){var w=_i(v);i.buttonKeyDownHandlers[w]&&i.buttonKeyDownHandlers[w].call(Rf(i),v)},i.buttonHandleClick=function(v){v.preventDefault(),i.props.environment.document.activeElement===i.props.environment.document.body&&v.target.focus(),process.env.NODE_ENV==="test"?i.toggleMenu({type:su}):i.internalSetTimeout(function(){return i.toggleMenu({type:su})})},i.buttonHandleBlur=function(v){var w=v.target;i.internalSetTimeout(function(){!i.isMouseDown&&(i.props.environment.document.activeElement==null||i.props.environment.document.activeElement.id!==i.inputId)&&i.props.environment.document.activeElement!==w&&i.reset({type:$g})})},i.getLabelProps=function(v){return ae({htmlFor:i.inputId,id:i.labelId},v)},i.getInputProps=function(v){var w=v===void 0?{}:v,T=w.onKeyDown,I=w.onBlur,D=w.onChange,A=w.onInput;w.onChangeText;var F=cn(w,II),k,B={};k="onChange";var R=i.getState(),x=R.inputValue,h=R.isOpen,C=R.highlightedIndex;if(!F.disabled){var P;B=(P={},P[k]=Ot(D,A,i.inputHandleChange),P.onKeyDown=Ot(T,i.inputHandleKeyDown),P.onBlur=Ot(I,i.inputHandleBlur),P)}return ae({"aria-autocomplete":"list","aria-activedescendant":h&&typeof C=="number"&&C>=0?i.getItemId(C):null,"aria-controls":h?i.menuId:null,"aria-labelledby":F&&F["aria-label"]?void 0:i.labelId,autoComplete:"off",value:x,id:i.inputId},B,F)},i.inputHandleKeyDown=function(v){var w=_i(v);w&&i.inputKeyDownHandlers[w]&&i.inputKeyDownHandlers[w].call(Rf(i),v)},i.inputHandleChange=function(v){i.internalSetState({type:Sg,isOpen:!0,inputValue:v.target.value,highlightedIndex:i.props.defaultHighlightedIndex})},i.inputHandleBlur=function(){i.internalSetTimeout(function(){var v=i.props.environment.document&&!!i.props.environment.document.activeElement&&!!i.props.environment.document.activeElement.dataset&&i.props.environment.document.activeElement.dataset.toggle&&i._rootNode&&i._rootNode.contains(i.props.environment.document.activeElement);!i.isMouseDown&&!v&&i.reset({type:_g})})},i.menuRef=function(v){i._menuNode=v},i.getMenuProps=function(v,w){var T,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=cn(I,RI),B=w===void 0?{}:w,R=B.suppressRefError,x=R===void 0?!1:R;return i.getMenuProps.called=!0,i.getMenuProps.refKey=A,i.getMenuProps.suppressRefError=x,ae((T={},T[A]=pr(F,i.menuRef),T.role="listbox",T["aria-labelledby"]=k&&k["aria-label"]?null:i.labelId,T.id=i.menuId,T),k)},i.getItemProps=function(v){var w,T=v===void 0?{}:v,I=T.onMouseMove,D=T.onMouseDown,A=T.onClick;T.onPress;var F=T.index,k=T.item,B=k===void 0?process.env.NODE_ENV==="production"?void 0:EI("getItemProps","item"):k,R=cn(T,OI);F===void 0?(i.items.push(B),F=i.items.indexOf(B)):i.items[F]=B;var x="onClick",h=A,C=(w={onMouseMove:Ot(I,function(){F!==i.getState().highlightedIndex&&(i.setHighlightedIndex(F,{type:gg}),i.avoidScrolling=!0,i.internalSetTimeout(function(){return i.avoidScrolling=!1},250))}),onMouseDown:Ot(D,function(j){j.preventDefault()})},w[x]=Ot(h,function(){i.selectItemAtIndex(F,{type:xg})}),w),P=R.disabled?{onMouseDown:C.onMouseDown}:C;return ae({id:i.getItemId(F),role:"option","aria-selected":i.getState().highlightedIndex===F},P,R)},i.clearItems=function(){i.items=[]},i.reset=function(v,w){v===void 0&&(v={}),v=ca(v),i.internalSetState(function(T){var I=T.selectedItem;return ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,inputValue:i.props.itemToString(I)},v)},w)},i.toggleMenu=function(v,w){v===void 0&&(v={}),v=ca(v),i.internalSetState(function(T){var I=T.isOpen;return ae({isOpen:!I},I&&{highlightedIndex:i.props.defaultHighlightedIndex},v)},function(){var T=i.getState(),I=T.isOpen,D=T.highlightedIndex;I&&i.getItemCount()>0&&typeof D=="number"&&i.setHighlightedIndex(D,v),Zp(w)()})},i.openMenu=function(v){i.internalSetState({isOpen:!0},v)},i.closeMenu=function(v){i.internalSetState({isOpen:!1},v)},i.updateStatus=El(function(){var v=i.getState(),w=i.items[v.highlightedIndex],T=i.getItemCount(),I=i.props.getA11yStatusMessage(ae({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:T,highlightedItem:w},v));i.previousResultCount=T,_l(I,i.props.environment.document)},200);var a=i.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,u=c===void 0?s:c,f=a.defaultIsOpen,d=a.initialIsOpen,m=d===void 0?f:d,p=a.initialInputValue,b=p===void 0?"":p,y=a.initialSelectedItem,$=y===void 0?null:y,E=i.getState({highlightedIndex:u,isOpen:m,inputValue:b,selectedItem:$});return E.selectedItem!=null&&i.props.initialInputValue===void 0&&(E.inputValue=i.props.itemToString(E.selectedItem)),i.state=E,i}var r=n.prototype;return r.internalClearTimeouts=function(){this.timeoutIds.forEach(function(i){clearTimeout(i)}),this.timeoutIds=[]},r.getState=function(i){return i===void 0&&(i=this.state),xi(i,this.props)},r.getItemCount=function(){var i=this.items.length;return this.itemCount!=null?i=this.itemCount:this.props.itemCount!==void 0&&(i=this.props.itemCount),i},r.getItemNodeFromIndex=function(i){return this.props.environment.document.getElementById(this.getItemId(i))},r.scrollHighlightedItemIntoView=function(){{var i=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(i,this._menuNode)}},r.moveHighlightedIndex=function(i,a){var s=this,c=this.getItemCount(),u=this.getState(),f=u.highlightedIndex;if(c>0){var d=Pr(i,f,c,function(m){return s.getItemNodeFromIndex(m)});this.setHighlightedIndex(d,a)}},r.getStateAndHelpers=function(){var i=this.getState(),a=i.highlightedIndex,s=i.inputValue,c=i.selectedItem,u=i.isOpen,f=this.props.itemToString,d=this.id,m=this.getRootProps,p=this.getToggleButtonProps,b=this.getLabelProps,y=this.getMenuProps,$=this.getInputProps,E=this.getItemProps,v=this.openMenu,w=this.closeMenu,T=this.toggleMenu,I=this.selectItem,D=this.selectItemAtIndex,A=this.selectHighlightedItem,F=this.setHighlightedIndex,k=this.clearSelection,B=this.clearItems,R=this.reset,x=this.setItemCount,h=this.unsetItemCount,C=this.internalSetState;return{getRootProps:m,getToggleButtonProps:p,getLabelProps:b,getMenuProps:y,getInputProps:$,getItemProps:E,reset:R,openMenu:v,closeMenu:w,toggleMenu:T,selectItem:I,selectItemAtIndex:D,selectHighlightedItem:A,setHighlightedIndex:F,clearSelection:k,clearItems:B,setItemCount:x,unsetItemCount:h,setState:C,itemToString:f,id:d,highlightedIndex:a,inputValue:s,isOpen:u,selectedItem:c}},r.componentDidMount=function(){var i=this;process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&eh(this._menuNode,this.getMenuProps);{var a=function(){i.isMouseDown=!0},s=function(p){i.isMouseDown=!1;var b=Xa(p.target,[i._rootNode,i._menuNode],i.props.environment);!b&&i.getState().isOpen&&i.reset({type:mg},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},c=function(){i.isTouchMove=!1},u=function(){i.isTouchMove=!0},f=function(p){var b=Xa(p.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!b&&i.getState().isOpen&&i.reset({type:Ig},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},d=this.props.environment;d.addEventListener("mousedown",a),d.addEventListener("mouseup",s),d.addEventListener("touchstart",c),d.addEventListener("touchmove",u),d.addEventListener("touchend",f),this.cleanup=function(){i.internalClearTimeouts(),i.updateStatus.cancel(),d.removeEventListener("mousedown",a),d.removeEventListener("mouseup",s),d.removeEventListener("touchstart",c),d.removeEventListener("touchmove",u),d.removeEventListener("touchend",f)}}},r.shouldScroll=function(i,a){var s=this.props.highlightedIndex===void 0?this.getState():this.props,c=s.highlightedIndex,u=a.highlightedIndex===void 0?i:a,f=u.highlightedIndex,d=c&&this.getState().isOpen&&!i.isOpen,m=c!==f;return d||m},r.componentDidUpdate=function(i,a){process.env.NODE_ENV!=="production"&&(xl(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&eh(this._menuNode,this.getMenuProps)),qa(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Tg,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(a,i)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},r.componentWillUnmount=function(){this.cleanup()},r.render=function(){var i=Jp(this.props.children,hn);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var a=Jp(i(this.getStateAndHelpers()));if(!a)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&AI(a,this.getRootProps),a;if(fg(a))return l.cloneElement(a,this.getRootProps(pg(a)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},n}(l.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:dg,itemToString:function(n){return n==null?"":(process.env.NODE_ENV!=="production"&&_I(n)&&!n.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",n),String(n))},onStateChange:hn,onInputValueChange:hn,onUserAction:hn,onChange:hn,onSelect:hn,onOuterClick:hn,selectedItemChanged:function(n,r){return n!==r},environment:typeof window>"u"?{}:window,stateReducer:function(n,r){return r},suppressRefError:!1,scrollIntoView:ug},e.stateChangeTypes=CI,e}();process.env.NODE_ENV!=="production"&&(PI.propTypes={children:X.func,defaultHighlightedIndex:X.number,defaultIsOpen:X.bool,initialHighlightedIndex:X.number,initialSelectedItem:X.any,initialInputValue:X.string,initialIsOpen:X.bool,getA11yStatusMessage:X.func,itemToString:X.func,onChange:X.func,onSelect:X.func,onStateChange:X.func,onInputValueChange:X.func,onUserAction:X.func,onOuterClick:X.func,selectedItemChanged:X.func,stateReducer:X.func,itemCount:X.number,id:X.string,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})}),suppressRefError:X.bool,scrollIntoView:X.func,selectedItem:X.any,isOpen:X.bool,inputValue:X.string,highlightedIndex:X.number,labelId:X.string,inputId:X.string,menuId:X.string,getItemId:X.func});function eh(e,t){var n=t.refKey;e||console.error('downshift: The ref prop "'+n+'" from getMenuProps was not applied correctly on your menu element.')}function AI(e,t){var n=t.refKey,r=n!=="ref",o=!fg(e);o&&!r&&!qp.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!o&&r&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+n+'"'),!qp.isForwardRef(e)&&!pg(e)[n]&&console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}var DI=["isInitialMount","highlightedIndex","items","environment"],Rg={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function NI(e,t,n){var r=e.props,o=e.type,i={};Object.keys(t).forEach(function(a){kI(a,e,t,n),n[a]!==t[a]&&(i[a]=n[a])}),r.onStateChange&&Object.keys(i).length&&r.onStateChange(ae({type:o},i))}function kI(e,t,n,r){var o=t.props,i=t.type,a="on"+Sl(e)+"Change";o[a]&&r[e]!==void 0&&r[e]!==n[e]&&o[a](ae({type:i},r))}function MI(e,t){return t.changes}function jI(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var LI=El(function(e,t){_l(e(),t)},200),FI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?l.useLayoutEffect:l.useEffect;function VI(e){var t=e.id,n=t===void 0?"downshift-"+lg():t,r=e.labelId,o=e.menuId,i=e.getItemId,a=e.toggleButtonId,s=e.inputId,c=l.useRef({labelId:r||n+"-label",menuId:o||n+"-menu",getItemId:i||function(u){return n+"-item-"+u},toggleButtonId:a||n+"-toggle-button",inputId:s||n+"-input"});return c.current}function Og(e,t,n,r){var o,i;if(e===void 0){if(t===void 0)throw new Error(r);o=n[t],i=t}else i=t===void 0?n.indexOf(e):t,o=e;return[o,i]}function BI(e){return e?String(e):""}function Sl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Cl(e){var t=l.useRef(e);return t.current=e,t}function Pg(e,t,n){var r=l.useRef(),o=l.useRef(),i=l.useCallback(function(m,p){o.current=p,m=xi(m,p.props);var b=e(m,p),y=p.props.stateReducer(m,ae({},p,{changes:b}));return y},[e]),a=l.useReducer(i,t),s=a[0],c=a[1],u=Cl(n),f=l.useCallback(function(m){return c(ae({props:u.current},m))},[u]),d=o.current;return l.useEffect(function(){d&&r.current&&r.current!==s&&NI(d,xi(r.current,d.props),s),r.current=s},[s,n,d]),[s,f]}function HI(e,t,n){var r=Pg(e,t,n),o=r[0],i=r[1];return[xi(o,n),i]}var ri={itemToString:BI,stateReducer:MI,getA11ySelectionMessage:jI,scrollIntoView:ug,environment:typeof window>"u"?{}:window};function Dn(e,t,n){n===void 0&&(n=Rg);var r=e["default"+Sl(t)];return r!==void 0?r:n[t]}function zo(e,t,n){n===void 0&&(n=Rg);var r=e[t];if(r!==void 0)return r;var o=e["initial"+Sl(t)];return o!==void 0?o:Dn(e,t,n)}function WI(e){var t=zo(e,"selectedItem"),n=zo(e,"isOpen"),r=zo(e,"highlightedIndex"),o=zo(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function oi(e,t,n){var r=e.items,o=e.initialHighlightedIndex,i=e.defaultHighlightedIndex,a=t.selectedItem,s=t.highlightedIndex;return r.length===0?-1:o!==void 0&&s===o?o:i!==void 0?i:a?r.indexOf(a):n===0?-1:n<0?r.length-1:0}function zI(e,t,n,r){var o=l.useRef({isMouseDown:!1,isTouchMove:!1});return l.useEffect(function(){if((n==null?void 0:n.addEventListener)!=null){var i=function(){o.current.isMouseDown=!0},a=function(d){o.current.isMouseDown=!1,e&&!Xa(d.target,t.map(function(m){return m.current}),n)&&r()},s=function(){o.current.isTouchMove=!1},c=function(){o.current.isTouchMove=!0},u=function(d){e&&!o.current.isTouchMove&&!Xa(d.target,t.map(function(m){return m.current}),n,!1)&&r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",a),n.addEventListener("touchstart",s),n.addEventListener("touchmove",c),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",u)}}},[e,n]),o}var $l=function(){return hn};process.env.NODE_ENV!=="production"&&($l=function(){for(var t=l.useRef(!0),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=l.useRef(r.reduce(function(s,c){return s[c]={},s},{}));l.useEffect(function(){Object.keys(i.current).forEach(function(s){var c=i.current[s];if(t.current&&!Object.keys(c).length){console.error("downshift: You forgot to call the "+s+" getter function on your component / element.");return}var u=c.suppressRefError,f=c.refKey,d=c.elementRef;(!d||!d.current)&&!u&&console.error('downshift: The ref prop "'+f+'" from '+s+" was not applied correctly on your element.")}),t.current=!1});var a=l.useCallback(function(s,c,u,f){i.current[s]={suppressRefError:c,refKey:u,elementRef:f}},[]);return a});function th(e,t,n){var r=n.isInitialMount,o=n.highlightedIndex,i=n.items,a=n.environment,s=cn(n,DI);l.useEffect(function(){r||LI(function(){return e(ae({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length},s))},a.document)},t)}function UI(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,o=e.getItemNodeFromIndex,i=e.menuElement,a=e.scrollIntoView,s=l.useRef(!0);return FI(function(){t<0||!n||!Object.keys(r.current).length||(s.current===!1?s.current=!0:a(o(t),i))},[t]),s}var Tl=hn;process.env.NODE_ENV!=="production"&&(Tl=function(t){var n=t.isInitialMount,r=t.props,o=t.state,i=l.useRef(r);l.useEffect(function(){n||(xl(o,i.current,r),i.current=r)},[o,r,n])});function nh(e,t,n){var r;n===void 0&&(n=!0);var o=((r=e.items)==null?void 0:r.length)&&t>=0;return ae({isOpen:!1,highlightedIndex:-1},o&&ae({selectedItem:e.items[t],isOpen:Dn(e,"isOpen"),highlightedIndex:Dn(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function YI(e,t,n){var r=t.type,o=t.props,i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:oi(o,e,0)};break;case n.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case n.FunctionCloseMenu:i={isOpen:!1};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:Dn(o,"highlightedIndex"),isOpen:Dn(o,"isOpen"),selectedItem:Dn(o,"selectedItem"),inputValue:Dn(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,i)}X.array.isRequired,X.func,X.func,X.func,X.number,X.number,X.number,X.bool,X.bool,X.bool,X.any,X.any,X.any,X.string,X.string,X.string,X.func,X.string,X.func,X.func,X.func,X.func,X.func,X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})});function KI(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}Cn(Cn({},ri),{getA11yStatusMessage:KI});process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;var Il=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,Rl=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Ol=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,Pl=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,Al=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,Dl=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,Nl=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,kl=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,Ml=process.env.NODE_ENV!=="production"?"__input_change__":8,Ga=process.env.NODE_ENV!=="production"?"__input_blur__":9,jl=process.env.NODE_ENV!=="production"?"__input_focus__":10,Ag=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,Dg=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,Ll=process.env.NODE_ENV!=="production"?"__item_click__":13,Ng=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,kg=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,Mg=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,jg=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,Lg=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,Fl=process.env.NODE_ENV!=="production"?"__function_select_item__":19,Fg=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,Vg=process.env.NODE_ENV!=="production"?"__function_reset__":21,Vl=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,Bg=Object.freeze({__proto__:null,InputKeyDownArrowDown:Il,InputKeyDownArrowUp:Rl,InputKeyDownEscape:Ol,InputKeyDownHome:Pl,InputKeyDownEnd:Al,InputKeyDownPageUp:Dl,InputKeyDownPageDown:Nl,InputKeyDownEnter:kl,InputChange:Ml,InputBlur:Ga,InputFocus:jl,MenuMouseLeave:Ag,ItemMouseMove:Dg,ItemClick:Ll,ToggleButtonClick:Ng,FunctionToggleMenu:kg,FunctionOpenMenu:Mg,FunctionCloseMenu:jg,FunctionSetHighlightedIndex:Lg,FunctionSelectItem:Fl,FunctionSetInputValue:Fg,FunctionReset:Vg,ControlledPropUpdatedSelectedItem:Vl});function qI(e){var t=WI(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),ae({},t,{inputValue:r})}var XI={items:X.array.isRequired,itemToString:X.func,selectedItemChanged:X.func,getA11yStatusMessage:X.func,getA11ySelectionMessage:X.func,highlightedIndex:X.number,defaultHighlightedIndex:X.number,initialHighlightedIndex:X.number,isOpen:X.bool,defaultIsOpen:X.bool,initialIsOpen:X.bool,selectedItem:X.any,initialSelectedItem:X.any,defaultSelectedItem:X.any,inputValue:X.string,defaultInputValue:X.string,initialInputValue:X.string,id:X.string,labelId:X.string,menuId:X.string,getItemId:X.func,inputId:X.string,toggleButtonId:X.string,stateReducer:X.func,onSelectedItemChange:X.func,onHighlightedIndexChange:X.func,onStateChange:X.func,onIsOpenChange:X.func,onInputValueChange:X.func,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})})};function GI(e,t,n){var r=l.useRef(),o=Pg(e,t,n),i=o[0],a=o[1];return l.useEffect(function(){qa(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&a({type:Vl,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)},[i.selectedItem,n.selectedItem]),[xi(i,n),a]}var Hg=hn;process.env.NODE_ENV!=="production"&&(Hg=function(t,n){X.checkPropTypes(XI,t,"prop",n.name)});var ZI=ae({},ri,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:dg});function QI(e,t){var n,r=t.type,o=t.props,i=t.altKey,a;switch(r){case Ll:a={isOpen:Dn(o,"isOpen"),highlightedIndex:Dn(o,"highlightedIndex"),selectedItem:o.items[t.index],inputValue:o.itemToString(o.items[t.index])};break;case Il:e.isOpen?a={highlightedIndex:Pr(1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:i&&e.selectedItem==null?-1:oi(o,e,1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case Rl:e.isOpen?i?a=nh(o,e.highlightedIndex):a={highlightedIndex:Pr(-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:oi(o,e,-1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case kl:a=nh(o,e.highlightedIndex);break;case Ol:a=ae({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Dl:a={highlightedIndex:Pr(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Nl:a={highlightedIndex:Pr(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Pl:a={highlightedIndex:Vr(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case Al:a={highlightedIndex:Vr(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case Ga:a=ae({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=o.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:o.items[e.highlightedIndex],inputValue:o.itemToString(o.items[e.highlightedIndex])});break;case Ml:a={isOpen:!0,highlightedIndex:Dn(o,"highlightedIndex"),inputValue:t.inputValue};break;case jl:a={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case Fl:a={selectedItem:t.selectedItem,inputValue:o.itemToString(t.selectedItem)};break;case Vl:a={inputValue:t.inputValue};break;default:return YI(e,t,Bg)}return ae({},e,a)}var JI=["onMouseLeave","refKey","ref"],eR=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],tR=["onClick","onPress","refKey","ref"],nR=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];Or.stateChangeTypes=Bg;function Or(e){e===void 0&&(e={}),Hg(e,Or);var t=ae({},ZI,e),n=t.initialIsOpen,r=t.defaultIsOpen,o=t.items,i=t.scrollIntoView,a=t.environment,s=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,u=t.itemToString,f=qI(t),d=GI(QI,f,t),m=d[0],p=d[1],b=m.isOpen,y=m.highlightedIndex,$=m.selectedItem,E=m.inputValue,v=l.useRef(null),w=l.useRef({}),T=l.useRef(null),I=l.useRef(null),D=l.useRef(!0),A=VI(t),F=l.useRef(),k=Cl({state:m,props:t}),B=l.useCallback(function(z){return w.current[A.getItemId(z)]},[A]);th(s,[b,y,E,o],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m)),th(c,[$],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m));var R=UI({menuElement:v.current,highlightedIndex:y,isOpen:b,itemRefs:w,scrollIntoView:i,getItemNodeFromIndex:B});Tl({isInitialMount:D.current,props:t,state:m}),l.useEffect(function(){var z=n||r||b;z&&T.current&&T.current.focus()},[]),l.useEffect(function(){D.current||(F.current=o.length)});var x=zI(b,[T,v,I],a,function(){p({type:Ga,selectItem:!1})}),h=$l("getInputProps","getMenuProps");l.useEffect(function(){return D.current=!1,function(){D.current=!0}},[]),l.useEffect(function(){var z;if(!b)w.current={};else if(((z=a.document)==null?void 0:z.activeElement)!==T.current){var G;T==null||(G=T.current)==null||G.focus()}},[b,a]);var C=l.useMemo(function(){return{ArrowDown:function(G){G.preventDefault(),p({type:Il,altKey:G.altKey,getItemNodeFromIndex:B})},ArrowUp:function(G){G.preventDefault(),p({type:Rl,altKey:G.altKey,getItemNodeFromIndex:B})},Home:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:Pl,getItemNodeFromIndex:B}))},End:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:Al,getItemNodeFromIndex:B}))},Escape:function(G){var oe=k.current.state;(oe.isOpen||oe.inputValue||oe.selectedItem||oe.highlightedIndex>-1)&&(G.preventDefault(),p({type:Ol}))},Enter:function(G){var oe=k.current.state;!oe.isOpen||G.which===229||(G.preventDefault(),p({type:kl,getItemNodeFromIndex:B}))},PageUp:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:Dl,getItemNodeFromIndex:B}))},PageDown:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:Nl,getItemNodeFromIndex:B}))}}},[p,k,B]),P=l.useCallback(function(z){return ae({id:A.labelId,htmlFor:A.inputId},z)},[A]),j=l.useCallback(function(z,G){var oe,ne=z===void 0?{}:z,ie=ne.onMouseLeave,ee=ne.refKey,pe=ee===void 0?"ref":ee,xe=ne.ref,Ee=cn(ne,JI),Ae=G===void 0?{}:G,Ie=Ae.suppressRefError,Le=Ie===void 0?!1:Ie;return h("getMenuProps",Le,pe,v),ae((oe={},oe[pe]=pr(xe,function(ke){v.current=ke}),oe.id=A.menuId,oe.role="listbox",oe["aria-labelledby"]=Ee&&Ee["aria-label"]?void 0:""+A.labelId,oe.onMouseLeave=Ot(ie,function(){p({type:Ag})}),oe),Ee)},[p,h,A]),H=l.useCallback(function(z){var G,oe,ne=z===void 0?{}:z,ie=ne.item,ee=ne.index,pe=ne.refKey,xe=pe===void 0?"ref":pe,Ee=ne.ref,Ae=ne.onMouseMove,Ie=ne.onMouseDown,Le=ne.onClick;ne.onPress;var ke=ne.disabled,at=cn(ne,eR),We=k.current,Et=We.props,Xe=We.state,At=Og(ie,ee,Et.items,"Pass either item or index to getItemProps!"),Te=At[1],$t="onClick",Ge=Le,Tt=function(){Te!==Xe.highlightedIndex&&(R.current=!1,p({type:Dg,index:Te,disabled:ke}))},et=function(){p({type:Ll,index:Te})},Dt=function(tt){return tt.preventDefault()};return ae((G={},G[xe]=pr(Ee,function(De){De&&(w.current[A.getItemId(Te)]=De)}),G.disabled=ke,G.role="option",G["aria-selected"]=""+(Te===Xe.highlightedIndex),G.id=A.getItemId(Te),G),!ke&&(oe={},oe[$t]=Ot(Ge,et),oe),{onMouseMove:Ot(Ae,Tt),onMouseDown:Ot(Ie,Dt)},at)},[p,k,R,A]),U=l.useCallback(function(z){var G,oe=z===void 0?{}:z,ne=oe.onClick;oe.onPress;var ie=oe.refKey,ee=ie===void 0?"ref":ie,pe=oe.ref,xe=cn(oe,tR),Ee=k.current.state,Ae=function(){p({type:Ng})};return ae((G={},G[ee]=pr(pe,function(Ie){I.current=Ie}),G["aria-controls"]=A.menuId,G["aria-expanded"]=Ee.isOpen,G.id=A.toggleButtonId,G.tabIndex=-1,G),!xe.disabled&&ae({},{onClick:Ot(ne,Ae)}),xe)},[p,k,A]),re=l.useCallback(function(z,G){var oe,ne=z===void 0?{}:z,ie=ne.onKeyDown,ee=ne.onChange,pe=ne.onInput,xe=ne.onFocus,Ee=ne.onBlur;ne.onChangeText;var Ae=ne.refKey,Ie=Ae===void 0?"ref":Ae,Le=ne.ref,ke=cn(ne,nR),at=G===void 0?{}:G,We=at.suppressRefError,Et=We===void 0?!1:We;h("getInputProps",Et,Ie,T);var Xe=k.current.state,At=function(tt){var Zt=_i(tt);Zt&&C[Zt]&&C[Zt](tt)},Te=function(tt){p({type:Ml,inputValue:tt.target.value})},$t=function(tt){if(Xe.isOpen&&!x.current.isMouseDown){var Zt=tt.relatedTarget===null&&a.document.activeElement!==a.document.body;p({type:Ga,selectItem:!Zt})}},Ge=function(){Xe.isOpen||p({type:jl})},Tt="onChange",et={};if(!ke.disabled){var Dt;et=(Dt={},Dt[Tt]=Ot(ee,pe,Te),Dt.onKeyDown=Ot(ie,At),Dt.onBlur=Ot(Ee,$t),Dt.onFocus=Ot(xe,Ge),Dt)}return ae((oe={},oe[Ie]=pr(Le,function(De){T.current=De}),oe["aria-activedescendant"]=Xe.isOpen&&Xe.highlightedIndex>-1?A.getItemId(Xe.highlightedIndex):"",oe["aria-autocomplete"]="list",oe["aria-controls"]=A.menuId,oe["aria-expanded"]=Xe.isOpen,oe["aria-labelledby"]=ke&&ke["aria-label"]?void 0:""+A.labelId,oe.autoComplete="off",oe.id=A.inputId,oe.role="combobox",oe.value=Xe.inputValue,oe),et,ke)},[h,k,A,C,p,x,a]),W=l.useCallback(function(){p({type:kg})},[p]),L=l.useCallback(function(){p({type:jg})},[p]),J=l.useCallback(function(){p({type:Mg})},[p]),Y=l.useCallback(function(z){p({type:Lg,highlightedIndex:z})},[p]),K=l.useCallback(function(z){p({type:Fl,selectedItem:z})},[p]),Z=l.useCallback(function(z){p({type:Fg,inputValue:z})},[p]),ce=l.useCallback(function(){p({type:Vg})},[p]);return{getItemProps:H,getLabelProps:P,getMenuProps:j,getInputProps:re,getToggleButtonProps:U,toggleMenu:W,openMenu:J,closeMenu:L,setHighlightedIndex:Y,setInputValue:Z,selectItem:K,reset:ce,highlightedIndex:y,isOpen:b,selectedItem:$,inputValue:E}}var Wg={activeIndex:-1,selectedItems:[]};function rh(e,t){return zo(e,t,Wg)}function oh(e,t){return Dn(e,t,Wg)}function rR(e){var t=rh(e,"activeIndex"),n=rh(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function ih(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function oR(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}var iR={selectedItems:X.array,initialSelectedItems:X.array,defaultSelectedItems:X.array,itemToString:X.func,getA11yRemovalMessage:X.func,stateReducer:X.func,activeIndex:X.number,initialActiveIndex:X.number,defaultActiveIndex:X.number,onActiveIndexChange:X.func,onSelectedItemsChange:X.func,keyNavigationNext:X.string,keyNavigationPrevious:X.string,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})})},aR={itemToString:ri.itemToString,stateReducer:ri.stateReducer,environment:ri.environment,getA11yRemovalMessage:oR,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},zg=hn;process.env.NODE_ENV!=="production"&&(zg=function(t,n){X.checkPropTypes(iR,t,"prop",n.name)});var Bl=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,Hl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,Wl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,zl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,Ul=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,Yl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,Kl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,ql=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,Xl=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,Gl=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,Zl=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,Ql=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,Jl=process.env.NODE_ENV!=="production"?"__function_reset__":12,sR=Object.freeze({__proto__:null,SelectedItemClick:Bl,SelectedItemKeyDownDelete:Hl,SelectedItemKeyDownBackspace:Wl,SelectedItemKeyDownNavigationNext:zl,SelectedItemKeyDownNavigationPrevious:Ul,DropdownKeyDownNavigationPrevious:Yl,DropdownKeyDownBackspace:Kl,DropdownClick:ql,FunctionAddSelectedItem:Xl,FunctionRemoveSelectedItem:Gl,FunctionSetSelectedItems:Zl,FunctionSetActiveIndex:Ql,FunctionReset:Jl});function cR(e,t){var n=t.type,r=t.index,o=t.props,i=t.selectedItem,a=e.activeIndex,s=e.selectedItems,c;switch(n){case Bl:c={activeIndex:r};break;case Ul:c={activeIndex:a-1<0?0:a-1};break;case zl:c={activeIndex:a+1>=s.length?-1:a+1};break;case Wl:case Hl:{if(a<0)break;var u=a;s.length===1?u=-1:a===s.length-1&&(u=s.length-2),c=ae({selectedItems:[].concat(s.slice(0,a),s.slice(a+1))},{activeIndex:u});break}case Yl:c={activeIndex:s.length-1};break;case Kl:c={selectedItems:s.slice(0,s.length-1)};break;case Xl:c={selectedItems:[].concat(s,[i])};break;case ql:c={activeIndex:-1};break;case Gl:{var f=a,d=s.indexOf(i);if(d<0)break;s.length===1?f=-1:d===s.length-1&&(f=s.length-2),c={selectedItems:[].concat(s.slice(0,d),s.slice(d+1)),activeIndex:f};break}case Zl:{var m=t.selectedItems;c={selectedItems:m};break}case Ql:{var p=t.activeIndex;c={activeIndex:p};break}case Jl:c={activeIndex:oh(o,"activeIndex"),selectedItems:oh(o,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,c)}var uR=["refKey","ref","onClick","onKeyDown","selectedItem","index"],lR=["refKey","ref","onKeyDown","onClick","preventKeyAction"];ed.stateChangeTypes=sR;function ed(e){e===void 0&&(e={}),zg(e,ed);var t=ae({},aR,e),n=t.getA11yRemovalMessage,r=t.itemToString,o=t.environment,i=t.keyNavigationNext,a=t.keyNavigationPrevious,s=HI(cR,rR(t),t),c=s[0],u=s[1],f=c.activeIndex,d=c.selectedItems,m=l.useRef(!0),p=l.useRef(null),b=l.useRef(d),y=l.useRef();y.current=[];var $=Cl({state:c,props:t});l.useEffect(function(){if(!m.current){if(d.length<b.current.length){var R=b.current.find(function(x){return d.indexOf(x)<0});_l(n({itemToString:r,resultCount:d.length,removedSelectedItem:R,activeIndex:f,activeSelectedItem:d[f]}),o.document)}b.current=d}},[d.length]),l.useEffect(function(){m.current||(f===-1&&p.current?p.current.focus():y.current[f]&&y.current[f].focus())},[f]),Tl({isInitialMount:m.current,props:t,state:c});var E=$l("getDropdownProps");l.useEffect(function(){return m.current=!1,function(){m.current=!0}},[]);var v=l.useMemo(function(){var R;return R={},R[a]=function(){u({type:Ul})},R[i]=function(){u({type:zl})},R.Delete=function(){u({type:Hl})},R.Backspace=function(){u({type:Wl})},R},[u,i,a]),w=l.useMemo(function(){var R;return R={},R[a]=function(x){ih(x)&&u({type:Yl})},R.Backspace=function(h){ih(h)&&u({type:Kl})},R},[u,a]),T=l.useCallback(function(R){var x,h=R===void 0?{}:R,C=h.refKey,P=C===void 0?"ref":C,j=h.ref,H=h.onClick,U=h.onKeyDown,re=h.selectedItem,W=h.index,L=cn(h,uR),J=$.current.state,Y=Og(re,W,J.selectedItems,"Pass either item or index to getSelectedItemProps!"),K=Y[1],Z=K>-1&&K===J.activeIndex,ce=function(){u({type:Bl,index:K})},z=function(oe){var ne=_i(oe);ne&&v[ne]&&v[ne](oe)};return ae((x={},x[P]=pr(j,function(G){G&&y.current.push(G)}),x.tabIndex=Z?0:-1,x.onClick=Ot(H,ce),x.onKeyDown=Ot(U,z),x),L)},[u,$,v]),I=l.useCallback(function(R,x){var h,C=R===void 0?{}:R,P=C.refKey,j=P===void 0?"ref":P,H=C.ref,U=C.onKeyDown,re=C.onClick,W=C.preventKeyAction,L=W===void 0?!1:W,J=cn(C,lR),Y=x===void 0?{}:x,K=Y.suppressRefError,Z=K===void 0?!1:K;E("getDropdownProps",Z,j,p);var ce=function(oe){var ne=_i(oe);ne&&w[ne]&&w[ne](oe)},z=function(){u({type:ql})};return ae((h={},h[j]=pr(H,function(G){G&&(p.current=G)}),h),!L&&{onKeyDown:Ot(U,ce),onClick:Ot(re,z)},J)},[u,w,E]),D=l.useCallback(function(R){u({type:Xl,selectedItem:R})},[u]),A=l.useCallback(function(R){u({type:Gl,selectedItem:R})},[u]),F=l.useCallback(function(R){u({type:Zl,selectedItems:R})},[u]),k=l.useCallback(function(R){u({type:Ql,activeIndex:R})},[u]),B=l.useCallback(function(){u({type:Jl})},[u]);return{getSelectedItemProps:T,getDropdownProps:I,addSelectedItem:D,removeSelectedItem:A,setSelectedItems:F,setActiveIndex:k,reset:B,selectedItems:d,activeIndex:f}}var dR="jbnkvn0",ah=Ke({defaultClassName:"jbnkvng",variantClassNames:{isDropdown:{true:"jbnkvnh"},highlighted:{true:"jbnkvni"},selected:{true:"jbnkvnj"},multiSelected:{true:"jbnkvnk"},isDisabled:{true:"jbnkvnl"}},defaultVariants:{},compoundVariants:[[{isDropdown:!0,highlighted:!0},"jbnkvnm"],[{isDropdown:!0,selected:!0},"jbnkvnn"],[{isDropdown:!0,isDisabled:!0},"jbnkvno"]]}),sh=Ke({defaultClassName:"jbnkvnd",variantClassNames:{isDropdown:{true:"jbnkvne",false:"jbnkvnf"}},defaultVariants:{},compoundVariants:[]}),fR="jbnkvn6",vc=Ke({defaultClassName:"",variantClassNames:{isRounded:{true:"jbnkvn1",false:"jbnkvn2"},isDisabled:{true:"jbnkvn3",false:"jbnkvn4"}},defaultVariants:{isRounded:!1},compoundVariants:[[{isRounded:!0,isDisabled:!1},"jbnkvn5"]]}),pR=Ke({defaultClassName:"jbnkvn7",variantClassNames:{isMobile:{true:"jbnkvn8",false:"jbnkvn9"},isDropdown:{true:"jbnkvna"},isReadOnly:{true:"jbnkvnb"}},defaultVariants:{isMobile:!0},compoundVariants:[]}),hR="jbnkvnc",ch="jbnkvnp";const Ug=l.createContext(void 0),vR=({children:e,contextValue:t})=>M.jsx(Ug.Provider,{value:t,children:e}),td=()=>{const e=l.useContext(Ug);if(e===void 0)throw new Error("useSelectProvider must be used within a SelectProvider");return e},Yg=({children:e,renderer:t})=>{const{getMenuProps:n,isDropdown:r}=td();return t?t({children:e,defaultClassName:sh,innerProps:n()}):M.jsx("div",{className:sh({isDropdown:!!r}),...n(),children:e})};Yg.defaultProps={renderer:void 0};const Kg=({renderer:e,item:t,itemIndex:n})=>{const{isMulti:r,selectedItem:o,multipleSelectedItems:i,highlightedIndex:a,getItemProps:s,onClickItem:c,isDropdown:u}=td(),f=a===n,d=(o==null?void 0:o.value)===t.value&&!r,m=r&&i.includes(t)||!1,p=s({item:t,index:n,disabled:t.isDisabled,onClick:c});return e?e({defaultClassName:ah({highlighted:a===n,selected:o===t&&!r,multiSelected:i.includes(t),isDisabled:t.isDisabled}),innerProps:p,isMulti:r,item:t,itemIndex:n,isHighlighted:f,isSelected:d,isChecked:m}):M.jsxs("div",{className:ah({highlighted:f,selected:d,multiSelected:m,isDisabled:t.isDisabled,isDropdown:u}),...p,children:[M.jsx("span",{children:t.label}),r&&i.includes(t)&&M.jsx(wu,{size:16,color:Pt.theme.colors.greenAccent1,"data-test-id":""})]},t.value)};Kg.defaultProps={renderer:void 0};const qg=({renderer:e,...t})=>{const{isOpen:n,getToggleButtonProps:r,isDisabled:o}=td();if(e)return e({innerProps:r(),defaultClassName:ch,isOpen:n});const i=Pt.theme.colors.grey1;return M.jsx("div",{className:ch,"data-test-id":t["data-test-id"],"data-disabled":o,children:n?M.jsx($0,{color:i,size:24}):M.jsx(E0,{color:i,size:24})})};qg.defaultProps={renderer:void 0,"data-test-id":"CT_Component_IconChev"};const uo=l.forwardRef(({options:e,value:t,label:n,onChange:r,isLoading:o,components:i,required:a,containerStyles:s,isMulti:c,isReadOnly:u,isMobile:f,onClickItem:d,isDropdown:m,...p},b)=>{const{addonLeft:y,addonRight:$,helperTextLeft:E,helperTextRight:v,isError:w,errorMessage:T,isDisabled:I,isValid:D,isRounded:A,className:F}=p,[k,B]=l.useState(e),R=Au({isError:w,isDisabled:I,isValid:D}),x=l.useRef(null),h=u||m,C=A||m,{removeSelectedItem:P,selectedItems:j,addSelectedItem:H,getDropdownProps:U}=ed({initialSelectedItems:c&&t?t:[],onSelectedItemsChange(pe){c&&r(pe.selectedItems)}}),re=l.useMemo(()=>j.length,[j]),W=l.useCallback(pe=>{let xe=pe;(c&&!f||h)&&(xe="");const Ee=new RegExp(xe.toLowerCase());return e.filter(Ae=>Ee.test(Ae.label.toLowerCase()))},[e]),{isOpen:L,getToggleButtonProps:J,getLabelProps:Y,getMenuProps:K,getInputProps:Z,highlightedIndex:ce,getItemProps:z,selectedItem:G,openMenu:oe,closeMenu:ne,setHighlightedIndex:ie}=Or({items:k,initialSelectedItem:c?void 0:t,onInputValueChange:({inputValue:pe})=>{B(W(pe||""))},onIsOpenChange:pe=>{var xe;if(pe.isOpen&&pe.selectedItem){const Ee=k.findIndex(Ae=>{var Ie;return Ae.value===((Ie=pe.selectedItem)==null?void 0:Ie.value)});ie(Ee)}else pe.isOpen||((xe=x.current)==null||xe.blur(),ie(-1))},itemToString(pe){return pe?pe.label:""},onSelectedItemChange(pe){var xe;c||(r(pe.selectedItem),h&&((xe=x.current)==null||xe.blur()),ne())},stateReducer:(pe,xe)=>{const{changes:Ee,type:Ae}=xe,Ie=k.find((Le,ke)=>ke===pe.highlightedIndex);switch(Ae){case Or.stateChangeTypes.InputKeyDownEnter:case Or.stateChangeTypes.ItemClick:if(c){let Le=re;return j.includes(Ie)?(Le-=1,P(Ie)):(Le+=1,H(Ie)),{...Ee,isOpen:!0,highlightedIndex:pe.highlightedIndex,inputValue:!f&&Le>0?`${Le} items selected`:""}}return{...Ee,isOpen:!1,highlightedIndex:pe.highlightedIndex,inputValue:Ee.inputValue};case Or.stateChangeTypes.InputFocus:return{...Ee,highlightedIndex:-1,isOpen:pe.isOpen};case Or.stateChangeTypes.InputBlur:{let Le=Ee.inputValue;return c&&!f&&(re>0?Le=`${re} items selected`:Le=""),{...Ee,inputValue:Le}}default:return Ee}}});l.useImperativeHandle(b,()=>x.current);const ee={isOpen:L,formState:R,selectedItem:G,multipleSelectedItems:j,isMulti:c,isDisabled:I,totalSelected:re,highlightedIndex:ce,getMenuProps:K,getItemProps:z,getToggleButtonProps:J,onClickItem:d,isDropdown:m,openMenu:oe,closeMenu:ne};return M.jsx(vR,{contextValue:ee,children:M.jsxs(rt,{position:"relative",w:"$full",className:F,...J({disabled:!!I}),children:[M.jsxs(wo,{addonLeft:y,addonRight:$,helperTextLeft:E,helperTextRight:v,isError:w,errorMessage:T,isDisabled:I,isValid:D,inputAreaClassName:$e(dR,vc({isRounded:C})),className:vc({isRounded:C,isDisabled:!!I}),children:[M.jsxs("div",{className:fR,children:[M.jsx("input",{"data-test-id":p["data-test-id"],...Z(U({preventKeyAction:L,ref:x,placeholder:n,readOnly:h,disabled:I,className:pR({isMobile:f,isReadOnly:h,isDropdown:m})}))}),f&&c&&M.jsx("div",{className:hR,children:re>0?`${re} items selected`:""}),f&&M.jsx(Ai,{isSelect:!0,isError:w,isDisabled:I,required:a,className:vc({isRounded:C}),...Y(),children:n})]}),M.jsx(qg,{renderer:i==null?void 0:i.Toggle})]}),L&&M.jsx(Yg,{renderer:i==null?void 0:i.List,children:k.map((pe,xe)=>M.jsx(Kg,{renderer:i==null?void 0:i.ListItem,itemIndex:xe,item:pe}))})]})})});uo.displayName="Select";uo.defaultProps={required:!1,isLoading:!1,isMulti:void 0,isReadOnly:!1,isMobile:!1,containerStyles:void 0,components:void 0,onClickItem:void 0,"data-test-id":void 0,isRounded:!1};const Xg=e=>{const t=`0${e}`;return t.substring(t.length-2,t.length)},mR=Array.from({length:31},(e,t)=>({label:Xg(t+1),value:String(t+1),isDisabled:!1})),Za=["January","February","March","April","May","June","July","August","September","October","November","December"],gR=Za.map(e=>({label:e,value:e,isDisabled:!1})),yR=e=>{const t=e?new Date(e).getFullYear():new Date().getFullYear();return Array.from({length:101},(n,r)=>({label:String(t-r),value:String(t-r),isDisabled:!1}))},mc=(e,t)=>{if(t){const n=new Date(t);if(e==="date")return{label:Xg(n.getDate()),value:n.getDate().toString(),isDisabled:!1};if(e==="month")return{label:Za[n.getMonth()],value:Za[n.getMonth()],isDisabled:!1};if(e==="year"){const r=n.getFullYear().toString();return{label:r,value:r,isDisabled:!1}}}},ii=e=>Za.findIndex(t=>t===e),uh=(e,t)=>new Date(e,ii(t)+1,0).getDate(),bR=({date:e,month:t,year:n,maxDate:r})=>{const o=r?new Date(r):new Date;return o.setHours(0,0,0,0),e&&t&&n&&e<=uh(n,t)&&o>new Date(n,ii(t),e,0,0,0,0)?!0:e&&t&&!n?ii(t)===1?e<=29:e<=uh(0,t):!e&&t&&n?n===o.getFullYear()?ii(t)<=o.getMonth():!0:e&&!t&&n?o.getMonth()===0&&n===o.getFullYear()?e<o.getDate():!0:!1},Gg=({title:e,maxDate:t,isMobile:n,defaultDate:r,onSaveDate:o,onClose:i,isOpen:a,buttonText:s,errorMessage:c,...u})=>{const[f,d]=l.useState(),[m,p]=l.useState(),[b,y]=l.useState(),$=()=>{d(void 0),p(void 0),y(void 0)},E=l.useMemo(()=>{if(a){if(f)return f;if(r)return mc("date",r)}},[r,f,a]),v=l.useMemo(()=>{if(a){if(m)return m;if(r)return mc("month",r)}},[r,m,a]),w=l.useMemo(()=>{if(a){if(b)return b;if(r)return mc("year",r)}},[r,b,a]),T=l.useMemo(()=>E||v||w?bR({date:E?Number(E==null?void 0:E.value):0,month:v?v.value:"",year:w?Number(w.value):0,maxDate:t}):!1,[E,v,w,t]),I=E&&v&&!w&&!T,D=E&&!v&&w&&!T,A=!E&&v&&w&&!T,F=E&&v&&w&&!T;return M.jsx(Pi,{...u,isOpen:a,onClose:()=>{i==null||i(),$()},onCloseAutoFocus:k=>{k.preventDefault()},onOpenAutoFocus:k=>{k.preventDefault()},noPadding:!0,closeIcon:M.jsx(rt,{}),children:M.jsxs(Ar,{gap:"$8",children:[M.jsxs(Bt,{p:"$16",justifyContent:"space-between",gap:"$16",alignItems:"center",children:[M.jsx(Xt,{fontWeight:"$bold",textStyle:"subtitle2",children:e}),M.jsx(Wr,{onClick:i,"data-test-id":"CT_Component_closeSelectPicker"})]}),M.jsxs(Ar,{gap:"$16",px:"$24",pb:"$24",children:[M.jsxs(Ar,{children:[M.jsxs(Bt,{gap:"$12",px:"$2",mb:"$4",children:[M.jsx(uo,{isDropdown:!0,name:"date",label:"Date",value:E,isMobile:n,options:mR,onChange:d,isError:I||D||F,"data-test-id":"CT_Component_SelectPicker_dateField"}),M.jsx(uo,{isDropdown:!0,name:"month",label:"Month",value:v,isMobile:n,options:gR,onChange:p,isError:A||I||F,"data-test-id":"CT_Component_SelectPicker_monthField"}),M.jsx(uo,{isDropdown:!0,name:"year",label:"Year",value:w,isMobile:n,options:yR(t),onChange:y,isError:A||D||F,"data-test-id":"CT_Component_SelectPicker_yearField"})]}),(F||A||D||I)&&M.jsx(Xt,{px:"$2",color:"$redAccent1",fontSize:"$caption",lineHeight:"$16",fontWeight:"$medium",children:c})]}),M.jsx(mo,{onClick:()=>{o(new Date(Number(w==null?void 0:w.value),ii(v==null?void 0:v.value),Number(E==null?void 0:E.value))),$()},isDisabled:!w||!v||!E||!T,"data-test-id":"CT_Component_SelectPicker_buttonSave",type:"button",children:s})]})]})})};Gg.defaultProps={title:"Date of birth",isMobile:!1,defaultDate:void 0,maxDate:void 0,buttonText:"Confirm",errorMessage:"Invalid date of birth"};var wR=Ke({defaultClassName:"_1uehowr0",variantClassNames:{isActive:{true:"_1uehowr1",false:"_1uehowr2"},variant:{solid:"_1uehowr3",outline:"_1uehowr4"}},defaultVariants:{isActive:!1,variant:"solid"},compoundVariants:[[{variant:"solid",isActive:!0},"_1uehowr5"],[{variant:"solid",isActive:!1},"_1uehowr6"],[{variant:"outline",isActive:!0},"_1uehowr7"],[{variant:"outline",isActive:!1},"_1uehowr8"]]});const Zg=l.forwardRef(({isActive:e,variant:t,className:n,children:r,as:o,...i},a)=>{const s=o||"span";return M.jsx(s,{ref:a,as:"span",className:$e(wR({isActive:e,variant:t}),n),"data-test-id":i["data-test-id"],...i,children:r})});Zg.defaultProps={as:"span","data-test-id":void 0};const gc="rovingFocusGroup.onEntryFocus",ER={bubbles:!1,cancelable:!0},nd="RovingFocusGroup",[cu,Qg,xR]=Qa(nd),[_R,Jg]=bn(nd,[xR]),[SR,CR]=_R(nd),$R=l.forwardRef((e,t)=>l.createElement(cu.Provider,{scope:e.__scopeRovingFocusGroup},l.createElement(cu.Slot,{scope:e.__scopeRovingFocusGroup},l.createElement(TR,ae({},e,{ref:t}))))),TR=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,...f}=e,d=l.useRef(null),m=ut(t,d),p=Ja(i),[b=null,y]=Tn({prop:a,defaultProp:s,onChange:c}),[$,E]=l.useState(!1),v=un(u),w=Qg(n),T=l.useRef(!1),[I,D]=l.useState(0);return l.useEffect(()=>{const A=d.current;if(A)return A.addEventListener(gc,v),()=>A.removeEventListener(gc,v)},[v]),l.createElement(SR,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:b,onItemFocus:l.useCallback(A=>y(A),[y]),onItemShiftTab:l.useCallback(()=>E(!0),[]),onFocusableItemAdd:l.useCallback(()=>D(A=>A+1),[]),onFocusableItemRemove:l.useCallback(()=>D(A=>A-1),[])},l.createElement(Ue.div,ae({tabIndex:$||I===0?-1:0,"data-orientation":r},f,{ref:m,style:{outline:"none",...e.style},onMouseDown:Ne(e.onMouseDown,()=>{T.current=!0}),onFocus:Ne(e.onFocus,A=>{const F=!T.current;if(A.target===A.currentTarget&&F&&!$){const k=new CustomEvent(gc,ER);if(A.currentTarget.dispatchEvent(k),!k.defaultPrevented){const B=w().filter(P=>P.focusable),R=B.find(P=>P.active),x=B.find(P=>P.id===b),C=[R,x,...B].filter(Boolean).map(P=>P.ref.current);ey(C)}}T.current=!1}),onBlur:Ne(e.onBlur,()=>E(!1))})))}),IR="RovingFocusGroupItem",RR=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Gn(),c=i||s,u=CR(IR,n),f=u.currentTabStopId===c,d=Qg(n),{onFocusableItemAdd:m,onFocusableItemRemove:p}=u;return l.useEffect(()=>{if(r)return m(),()=>p()},[r,m,p]),l.createElement(cu.ItemSlot,{scope:n,id:c,focusable:r,active:o},l.createElement(Ue.span,ae({tabIndex:f?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:Ne(e.onMouseDown,b=>{r?u.onItemFocus(c):b.preventDefault()}),onFocus:Ne(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Ne(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=AR(b,u.orientation,u.dir);if(y!==void 0){b.preventDefault();let E=d().filter(v=>v.focusable).map(v=>v.ref.current);if(y==="last")E.reverse();else if(y==="prev"||y==="next"){y==="prev"&&E.reverse();const v=E.indexOf(b.currentTarget);E=u.loop?DR(E,v+1):E.slice(v+1)}setTimeout(()=>ey(E))}})})))}),OR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function PR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function AR(e,t,n){const r=PR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return OR[r]}function ey(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function DR(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const NR=$R,kR=RR,ty="Radio",[MR,ny]=bn(ty),[jR,LR]=MR(ty),FR=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:c,...u}=e,[f,d]=l.useState(null),m=ut(t,y=>d(y)),p=l.useRef(!1),b=f?!!f.closest("form"):!0;return l.createElement(jR,{scope:n,checked:o,disabled:a},l.createElement(Ue.button,ae({type:"button",role:"radio","aria-checked":o,"data-state":ry(o),"data-disabled":a?"":void 0,disabled:a,value:s},u,{ref:m,onClick:Ne(e.onClick,y=>{o||c==null||c(),b&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})),b&&l.createElement(HR,{control:f,bubbles:!p.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))}),VR="RadioIndicator",BR=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=LR(VR,n);return l.createElement(yr,{present:r||i.checked},l.createElement(Ue.span,ae({"data-state":ry(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))}),HR=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=cs(n),s=as(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});d.call(c,n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ry(e){return e?"checked":"unchecked"}const WR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],oy="RadioGroup",[zR,HP]=bn(oy,[Jg,ny]),iy=Jg(),ay=ny(),[UR,YR]=zR(oy),KR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:c,dir:u,loop:f=!0,onValueChange:d,...m}=e,p=iy(n),b=Ja(u),[y,$]=Tn({prop:i,defaultProp:o,onChange:d});return l.createElement(UR,{scope:n,name:r,required:a,disabled:s,value:y,onValueChange:$},l.createElement(NR,ae({asChild:!0},p,{orientation:c,dir:b,loop:f}),l.createElement(Ue.div,ae({role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":s?"":void 0,dir:b},m,{ref:t}))))}),qR="RadioGroupItem",XR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=YR(qR,n),a=i.disabled||r,s=iy(n),c=ay(n),u=l.useRef(null),f=ut(t,u),d=i.value===o.value,m=l.useRef(!1);return l.useEffect(()=>{const p=y=>{WR.includes(y.key)&&(m.current=!0)},b=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",b)}},[]),l.createElement(kR,ae({asChild:!0},s,{focusable:!a,active:d}),l.createElement(FR,ae({disabled:a,required:i.required,checked:d},c,o,{name:i.name,ref:f,onCheck:()=>i.onValueChange(o.value),onKeyDown:Ne(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Ne(o.onFocus,()=>{var p;m.current&&((p=u.current)===null||p===void 0||p.click())})})))}),GR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=ay(n);return l.createElement(BR,ae({},o,r,{ref:t}))}),ZR=KR,QR=XR,JR=GR;var eO=Ke({defaultClassName:"d6umgr4",variantClassNames:{disabled:{true:"d6umgr5"}},defaultVariants:{},compoundVariants:[]}),tO="d6umgr1",nO=Ke({defaultClassName:"d6umgr2",variantClassNames:{disabled:{true:"d6umgr3"}},defaultVariants:{},compoundVariants:[]}),rO="d6umgr0";const sy=({children:e,className:t,disabled:n,...r})=>{const o=l.useId();return M.jsxs(Bt,{alignItems:"center",children:[M.jsx(Bt,{alignItems:"center",justifyContent:"center",children:M.jsx(QR,{...r,disabled:n,className:$e(t,rO),id:o,children:M.jsx(JR,{className:$e("radio-indicator",nO({disabled:n}))})})}),e&&M.jsx("label",{className:$e("radio-label",eO({disabled:n})),htmlFor:o,children:e})]})};sy.defaultProps={children:void 0};const oO=({className:e,children:t,...n})=>M.jsx(ZR,{...n,className:$e(e,tO),children:t});var iO="_846x3h2",aO="_846x3h0",sO="_846x3h1",cO=Ke({defaultClassName:"_846x3h3",variantClassNames:{size:{small:"_846x3h4",medium:"_846x3h5",large:"_846x3h6"},isHasIcon:{true:"_846x3h7"},isDisabled:{true:"_846x3h8"}},defaultVariants:{size:"small"},compoundVariants:[]});const rd=l.forwardRef(({value:e,size:t,isDisabled:n,icon:r,onClear:o,onFocus:i,onBlur:a,withIcon:s,className:c,...u},f)=>{const[d,m]=l.useState(!1),p=E=>{i==null||i(E),m(!0)},b=E=>{a==null||a(E),m(!1)},y=()=>{o==null||o(),m(!1)},$=l.useMemo(()=>!!(s&&(r||e&&d)),[s,d,e,r]);return M.jsxs(rt,{position:"relative",children:[M.jsx(rt,{className:$e(aO),children:M.jsx(j0,{size:24})}),M.jsx("input",{className:$e(cO({size:t,isHasIcon:$,isDisabled:n}),c),ref:f,value:e,"data-test-id":u["data-test-id"],onFocus:p,onBlur:b,disabled:n,...u}),$&&M.jsx(rt,{className:$e(sO),children:r&&(!d||d&&!e)?r:M.jsx(rt,{className:$e(iO),onMouseDown:y,children:M.jsx(Eu,{"data-test-id":"icon-close-search",onMouseDown:y,cursor:"pointer",size:24})})})]})});rd.displayName="Search";rd.defaultProps={icon:void 0,isDisabled:void 0,onClear:void 0,withIcon:!0,"data-test-id":void 0};const cy="Switch",[uO,WP]=bn(cy),[lO,dO]=uO(cy),fO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...f}=e,[d,m]=l.useState(null),p=ut(t,v=>m(v)),b=l.useRef(!1),y=d?!!d.closest("form"):!0,[$=!1,E]=Tn({prop:o,defaultProp:i,onChange:u});return l.createElement(lO,{scope:n,checked:$,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"switch","aria-checked":$,"aria-required":a,"data-state":uy($),"data-disabled":s?"":void 0,disabled:s,value:c},f,{ref:p,onClick:Ne(e.onClick,v=>{E(w=>!w),y&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})})),y&&l.createElement(vO,{control:d,bubbles:!b.current,name:r,value:c,checked:$,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),pO="SwitchThumb",hO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=dO(pO,n);return l.createElement(Ue.span,ae({"data-state":uy(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),vO=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=cs(n),s=as(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});d.call(c,n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function uy(e){return e?"checked":"unchecked"}const mO=fO,gO=hO;var yO="b7c0j16",bO=Ke({defaultClassName:"b7c0j10",variantClassNames:{variant:{normal:"b7c0j11",small:"b7c0j12"}},defaultVariants:{variant:"normal"},compoundVariants:[]}),wO=Ke({defaultClassName:"b7c0j13",variantClassNames:{variant:{normal:"b7c0j14",small:"b7c0j15"}},defaultVariants:{variant:"normal"},compoundVariants:[]});const EO={normal:16,small:12},od=l.forwardRef((e,t)=>{const{size:n="normal"}=e;return M.jsx(mO,{ref:t,className:$e(bO({variant:n})),...e,children:M.jsx(gO,{className:$e(wO({variant:n})),children:M.jsx(wu,{className:yO,size:EO[n]})})})});od.displayName="Switch";od.defaultProps={size:"normal"};const ly=({accessor:e,sortColumn:t,sortable:n,"data-test-id":r})=>{const o=t.by===e,i=t.order==="DESC",a=t.order==="ASC";return n?M.jsxs(Bt,{flexDirection:"column","data-test-id":r,children:[M.jsx(Oh,{size:10,color:o&&i?"white":"grey"}),M.jsx(Ca,{size:10,color:o&&a?"white":"grey"})]}):null};ly.defaultProps={sortable:!1,"data-test-id":""};var xO=Ke({defaultClassName:"",variantClassNames:{variant:{simple:"_94c6vs1",default:"_94c6vs2"}},defaultVariants:{},compoundVariants:[]}),_O=Ke({defaultClassName:"_94c6vs6",variantClassNames:{variant:{simple:"_94c6vs7",default:"_94c6vs8"}},defaultVariants:{},compoundVariants:[]}),lh=Ke({defaultClassName:"_94c6vs3",variantClassNames:{variant:{simple:"_94c6vs4",default:"_94c6vs5"}},defaultVariants:{},compoundVariants:[]}),SO="_94c6vs0";const dy=({data:e,columns:t})=>{const[n,r]=l.useState([]),[o,i]=l.useState([]),[a,s]=l.useState({by:"",order:""}),c=d=>{const{accessor:m}=d,p=d.sortable,b=a.by===m;return p?b&&a.order==="ASC"?s({by:m,order:"DESC"}):b&&a.order==="DESC"?s({by:"",order:""}):s({by:m,order:"ASC"}):null},u=d=>typeof d=="object"?"":d,f=l.useCallback((d,m)=>{const p=[...d];return m.order==="ASC"?p.sort((y,$)=>String($[m.by]).localeCompare(String(y[m.by]))):m.order==="DESC"?p.sort((y,$)=>String(y[m.by]).localeCompare(String($[m.by]))):[...d]},[]);return l.useEffect(()=>{const d=t.map(b=>({...b,sortable:b.sortable??!1}));r(d);const p=f(e,{by:a.by,order:a.order}).map(b=>d.map(y=>({accessor:y.accessor,sortable:y.sortable??!1,value:u(b[y.accessor]),...y.cellRenderer&&{CellRenderer:y.cellRenderer({origin:b,value:b[y.accessor]})}})));i(p)},[t,e,f,a.by,a.order]),{headers:n,rows:o,handleHeaderClick:c,sortColumn:a}},fy=l.forwardRef(({columns:e,as:t,"data-test-id":n,data:r,variant:o,onSort:i,...a},s)=>{const c=t||"table",{rows:u,headers:f,handleHeaderClick:d,sortColumn:m}=dy({data:r,columns:e});return l.useEffect(()=>{i&&i(m)},[i,m]),M.jsxs(c,{ref:s,as:t,className:SO,"data-test-id":n,...a,children:[M.jsx("thead",{children:M.jsx("tr",{className:_O({variant:o}),children:f.filter(p=>!!p.label).map(p=>M.jsx("th",{"data-test-id":"",className:lh({variant:o}),onClick:()=>d(p),children:M.jsxs(Bt,{alignItems:"center",gap:"$8",justifyContent:"center",px:"$16",children:[M.jsx(rt,{fontWeight:"$bold",color:o==="default"?"$whiteTypoHigh":"$blackTypoHigh",fontSize:"$body2",lineHeight:"$20",children:p.label}),M.jsx(ly,{accessor:p.accessor,sortable:p.sortable,sortColumn:m,"data-test-id":`table-sort-${p.label}`})]})},p.accessor))})}),M.jsx("tbody",{children:u.map((p,b)=>M.jsx("tr",{className:xO({variant:o}),children:p.map((y,$)=>M.jsx(rt,{as:"td","data-test-id":`table-${n}-row${b}-col${$}`,className:lh({variant:o}),children:y.CellRenderer??y.value}))}))})]})});fy.defaultProps={variant:"default",as:"table","data-test-id":"base",onSort:void 0};var CO=Ke({defaultClassName:"_5wiwut0",variantClassNames:{isActive:{true:"_5wiwut1"}},defaultVariants:{isActive:!1},compoundVariants:[]});var $O=Ke({defaultClassName:"_1p5zdvr0",variantClassNames:{withShadow:{true:"_1p5zdvr1"},align:{left:"_1p5zdvr2",center:"_1p5zdvr3",right:"_1p5zdvr4"}},defaultVariants:{withShadow:!1,align:"left"},compoundVariants:[]});const id=l.createContext({index:0,setIndex:()=>null}),ad=l.forwardRef(({as:e,children:t,withShadow:n,index:r,defaultIndex:o,align:i,onChange:a,className:s,...c},u)=>{const[f,d]=l.useState(o??0),m=l.useMemo(()=>l.Children.map(t,(y,$)=>l.cloneElement(y,{"data-index":$})),[t]);l.useEffect(()=>d(r??0),[r]);const p=l.useMemo(()=>({index:f,setIndex:$=>{d($),a==null||a($)}}),[f,a]),b=e||"ul";return M.jsx(b,{"data-test-id":c["data-test-id"],as:e,ref:u,className:$e($O({withShadow:n,align:i}),s),...c,children:M.jsx(id.Provider,{value:p,children:m})})});ad.displayName="Tabs";ad.defaultProps={as:"ul",defaultIndex:0,index:0,align:"left",withShadow:!1,children:void 0,onChange:()=>null,"data-test-id":void 0,className:void 0};const sd=l.forwardRef(({as:e,children:t,...n},r)=>{const{index:o,setIndex:i}=l.useContext(id),a=l.useCallback(u=>{i==null||i(u)},[i]),s=n["data-index"]===o,c=e||"li";return M.jsx(c,{"data-test-id":n["data-test-id"],as:e,ref:r,onClick:()=>a(n["data-index"]||0),className:$e(CO({isActive:s})),...n,children:M.jsx(Xt,{as:"span",textStyle:"body2",children:t})})});sd.displayName="TabItem";sd.defaultProps={as:"li","data-index":void 0,"data-test-id":void 0};const py="ToastProvider",[cd,TO,IO]=Qa("Toast"),[hy,zP]=bn("Toast",[IO]),[RO,Rs]=hy(py),vy=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,c]=l.useState(null),[u,f]=l.useState(0),d=l.useRef(!1),m=l.useRef(!1);return l.createElement(cd.Provider,{scope:t},l.createElement(RO,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:s,onViewportChange:c,onToastAdd:l.useCallback(()=>f(p=>p+1),[]),onToastRemove:l.useCallback(()=>f(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:m},a))};vy.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){const t=`Invalid prop \`label\` supplied to \`${py}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const OO="ToastViewport",PO=["F8"],uu="toast.viewportPause",lu="toast.viewportResume",AO=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=PO,label:o="Notifications ({hotkey})",...i}=e,a=Rs(OO,n),s=TO(n),c=l.useRef(null),u=l.useRef(null),f=l.useRef(null),d=l.useRef(null),m=ut(t,d,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;l.useEffect(()=>{const $=E=>{var v;r.every(T=>E[T]||E.code===T)&&((v=d.current)===null||v===void 0||v.focus())};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[r]),l.useEffect(()=>{const $=c.current,E=d.current;if(b&&$&&E){const v=()=>{if(!a.isClosePausedRef.current){const D=new CustomEvent(uu);E.dispatchEvent(D),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const D=new CustomEvent(lu);E.dispatchEvent(D),a.isClosePausedRef.current=!1}},T=D=>{!$.contains(D.relatedTarget)&&w()},I=()=>{$.contains(document.activeElement)||w()};return $.addEventListener("focusin",v),$.addEventListener("focusout",T),$.addEventListener("pointermove",v),$.addEventListener("pointerleave",I),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{$.removeEventListener("focusin",v),$.removeEventListener("focusout",T),$.removeEventListener("pointermove",v),$.removeEventListener("pointerleave",I),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[b,a.isClosePausedRef]);const y=l.useCallback(({tabbingDirection:$})=>{const v=s().map(w=>{const T=w.ref.current,I=[T,...KO(T)];return $==="forwards"?I:I.reverse()});return($==="forwards"?v.reverse():v).flat()},[s]);return l.useEffect(()=>{const $=d.current;if($){const E=v=>{const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const F=document.activeElement,k=v.shiftKey;if(v.target===$&&k){var I;(I=u.current)===null||I===void 0||I.focus();return}const x=y({tabbingDirection:k?"backwards":"forwards"}),h=x.findIndex(C=>C===F);if(yc(x.slice(h+1)))v.preventDefault();else{var D,A;k?(D=u.current)===null||D===void 0||D.focus():(A=f.current)===null||A===void 0||A.focus()}}};return $.addEventListener("keydown",E),()=>$.removeEventListener("keydown",E)}},[s,y]),l.createElement(nw,{ref:c,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:b?void 0:"none"}},b&&l.createElement(dh,{ref:u,onFocusFromOutsideViewport:()=>{const $=y({tabbingDirection:"forwards"});yc($)}}),l.createElement(cd.Slot,{scope:n},l.createElement(Ue.ol,ae({tabIndex:-1},i,{ref:m}))),b&&l.createElement(dh,{ref:f,onFocusFromOutsideViewport:()=>{const $=y({tabbingDirection:"backwards"});yc($)}}))}),DO="ToastFocusProxy",dh=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Rs(DO,n);return l.createElement(us,ae({"aria-hidden":!0,tabIndex:0},o,{ref:t,style:{position:"fixed"},onFocus:a=>{var s;const c=a.relatedTarget;!((s=i.viewport)!==null&&s!==void 0&&s.contains(c))&&r()}}))}),Os="Toast",NO="toast.swipeStart",kO="toast.swipeMove",MO="toast.swipeCancel",jO="toast.swipeEnd",LO=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,c]=Tn({prop:r,defaultProp:o,onChange:i});return l.createElement(yr,{present:n||s},l.createElement(my,ae({open:s},a,{ref:t,onClose:()=>c(!1),onPause:un(e.onPause),onResume:un(e.onResume),onSwipeStart:Ne(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ne(e.onSwipeMove,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Ne(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ne(e.onSwipeEnd,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),c(!1)})})))}),[FO,VO]=hy(Os,{onClose(){}}),my=l.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:c,onResume:u,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:m,onSwipeEnd:p,...b}=e,y=Rs(Os,n),[$,E]=l.useState(null),v=ut(t,C=>E(C)),w=l.useRef(null),T=l.useRef(null),I=o||y.duration,D=l.useRef(0),A=l.useRef(I),F=l.useRef(0),{onToastAdd:k,onToastRemove:B}=y,R=un(()=>{var C;($==null?void 0:$.contains(document.activeElement))&&((C=y.viewport)===null||C===void 0||C.focus()),a()}),x=l.useCallback(C=>{!C||C===1/0||(window.clearTimeout(F.current),D.current=new Date().getTime(),F.current=window.setTimeout(R,C))},[R]);l.useEffect(()=>{const C=y.viewport;if(C){const P=()=>{x(A.current),u==null||u()},j=()=>{const H=new Date().getTime()-D.current;A.current=A.current-H,window.clearTimeout(F.current),c==null||c()};return C.addEventListener(uu,j),C.addEventListener(lu,P),()=>{C.removeEventListener(uu,j),C.removeEventListener(lu,P)}}},[y.viewport,I,c,u,x]),l.useEffect(()=>{i&&!y.isClosePausedRef.current&&x(I)},[i,I,y.isClosePausedRef,x]),l.useEffect(()=>(k(),()=>B()),[k,B]);const h=l.useMemo(()=>$?yy($):null,[$]);return y.viewport?l.createElement(l.Fragment,null,h&&l.createElement(BO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},h),l.createElement(FO,{scope:n,onClose:R},mn.createPortal(l.createElement(cd.ItemSlot,{scope:n},l.createElement(tw,{asChild:!0,onEscapeKeyDown:Ne(s,()=>{y.isFocusedToastEscapeKeyDownRef.current||R(),y.isFocusedToastEscapeKeyDownRef.current=!1})},l.createElement(Ue.li,ae({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},b,{ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ne(e.onKeyDown,C=>{C.key==="Escape"&&(s==null||s(C.nativeEvent),C.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:Ne(e.onPointerDown,C=>{C.button===0&&(w.current={x:C.clientX,y:C.clientY})}),onPointerMove:Ne(e.onPointerMove,C=>{if(!w.current)return;const P=C.clientX-w.current.x,j=C.clientY-w.current.y,H=!!T.current,U=["left","right"].includes(y.swipeDirection),re=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,W=U?re(0,P):0,L=U?0:re(0,j),J=C.pointerType==="touch"?10:2,Y={x:W,y:L},K={originalEvent:C,delta:Y};H?(T.current=Y,ua(kO,d,K,{discrete:!1})):fh(Y,y.swipeDirection,J)?(T.current=Y,ua(NO,f,K,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(P)>J||Math.abs(j)>J)&&(w.current=null)}),onPointerUp:Ne(e.onPointerUp,C=>{const P=T.current,j=C.target;if(j.hasPointerCapture(C.pointerId)&&j.releasePointerCapture(C.pointerId),T.current=null,w.current=null,P){const H=C.currentTarget,U={originalEvent:C,delta:P};fh(P,y.swipeDirection,y.swipeThreshold)?ua(jO,p,U,{discrete:!0}):ua(MO,m,U,{discrete:!0}),H.addEventListener("click",re=>re.preventDefault(),{once:!0})}})})))),y.viewport))):null});my.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){const t=`Invalid prop \`type\` supplied to \`${Os}\`. Expected \`foreground | background\`.`;return new Error(t)}return null}};const BO=e=>{const{__scopeToast:t,children:n,...r}=e,o=Rs(Os,t),[i,a]=l.useState(!1),[s,c]=l.useState(!1);return UO(()=>a(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:l.createElement(ev,{asChild:!0},l.createElement(us,r,i&&l.createElement(l.Fragment,null,o.label," ",n)))},HO="ToastAction",ud=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?l.createElement(gy,{altText:n,asChild:!0},l.createElement(zO,ae({},r,{ref:t}))):null});ud.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${HO}\``)}};const WO="ToastClose",zO=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=VO(WO,n);return l.createElement(gy,{asChild:!0},l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ne(e.onClick,o.onClose)})))}),gy=l.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return l.createElement(Ue.div,ae({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0},o,{ref:t}))});function yy(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),YO(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...yy(r))}}),t}function ua(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?wh(o,i):o.dispatchEvent(i)}const fh=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function UO(e=()=>{}){const t=un(e);Gt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function YO(e){return e.nodeType===e.ELEMENT_NODE}function KO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}const qO=vy,by=AO,wy=LO,XO=ud;var GO="_10z4js29",ZO="_10z4js2c",QO=Ke({defaultClassName:"_10z4js25",variantClassNames:{color:{neutral:"_10z4js26",negative:"_10z4js27"}},defaultVariants:{color:"neutral"},compoundVariants:[]}),JO="_10z4js28",eP="_10z4js2a";const Ey=qO,ld=l.forwardRef(({className:e,...t},n)=>M.jsx(by,{ref:n,className:$e(eP,e),...t}));ld.displayName=by.displayName;const Ps=l.forwardRef(({className:e,color:t="neutral",...n},r)=>M.jsx(wy,{ref:r,className:$e(QO({color:t}),e),...n}));Ps.displayName=wy.displayName;Ps.defaultProps={viewPort:void 0,actionClassName:void 0};const dd=l.forwardRef(({className:e,...t},n)=>M.jsx(ud,{ref:n,className:$e(e),...t}));dd.displayName=XO.displayName;const tP=1,nP=1e6,Xn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let bc=0;function rP(){return bc=(bc+1)%Number.MAX_VALUE,bc.toString()}const wc=new Map,ph=e=>{if(wc.has(e))return;const t=setTimeout(()=>{wc.delete(e),ai({type:Xn.REMOVE_TOAST,toastId:e})},nP);wc.set(e,t)};function xy(e,t){switch(t.type){case Xn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,tP)};case Xn.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case Xn.DISMISS_TOAST:{const{toastId:n}=t;return n?ph(n):e.toasts.forEach(r=>{ph(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case Xn.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)};default:return e}}const _a=[];let Sa={toasts:[]};function ai(e){Sa=xy(Sa,e),_a.forEach(t=>{t(Sa)})}function _y({...e}){const t=rP(),n=o=>ai({type:Xn.UPDATE_TOAST,toast:{...o,id:t}}),r=()=>ai({type:Xn.DISMISS_TOAST,toastId:t});return ai({type:Xn.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function Sy(){const[e,t]=l.useState(Sa);return l.useEffect(()=>(_a.push(t),()=>{const n=_a.indexOf(t);n>-1&&_a.splice(n,1)}),[e]),{...e,toast:_y,dismiss:n=>ai({type:Xn.DISMISS_TOAST,toastId:n})}}const fd=l.forwardRef((e,t)=>{const{toasts:n,dismiss:r}=Sy();return M.jsx(Ey,{children:n.map(({id:o,description:i,action:a,actionText:s,actionClick:c,duration:u=3e3,type:f="foreground",color:d="neutral",viewPort:m,actionClassName:p,isDismissable:b=!0,preventSwipe:y=!1,container:$,forceHideWhenClose:E,...v})=>M.jsxs("div",{id:"CT_Container_Toast","data-test-id":"CT_Container_Toast",className:$e({[ZO]:E&&!v.open}),...$==null?void 0:$.elementProps,onClick:()=>{var w;(w=$==null?void 0:$.onCLick)==null||w.call($),b&&r(o)},children:[M.jsxs(Ps,{ref:t,color:d,duration:u,type:f,"data-test-id":`toast-${v["data-test-id"]??""}`,...y&&{onSwipeEnd:w=>{w.preventDefault()},onSwipeMove:w=>{w.preventDefault()}},...v,children:[M.jsx(rt,{"data-test-id":`toast-${v["data-test-id"]??""}`,flexGrow:1,pl:"$16",py:"$16",pr:c?"$0":"$16",maxW:"$full",minW:"$0",cursor:b?"pointer":"auto",onClick:()=>{b&&r(o)},children:M.jsx(Xt,{textStyle:"body2",fontWeight:"$reguler",textOverflow:"ellipsis",overflow:"hidden",className:JO,children:i})}),!a&&c&&s?M.jsx(dd,{altText:s,asChild:!0,children:M.jsx(rg,{"data-test-id":`action-toast-${v["data-test-id"]??""}`,onClick:c,isStandalone:!0,className:$e(GO,p),children:s})}):a]},o),M.jsx(ld,{...m})]},o))})});fd.displayName="Toaster";const[As,UP]=bn("Tooltip",[ss]),Ds=ss(),oP="TooltipProvider",iP=700,du="tooltip.open",[aP,pd]=As(oP),sP=e=>{const{__scopeTooltip:t,delayDuration:n=iP,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=l.useState(!0),c=l.useRef(!1),u=l.useRef(0);return l.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),l.createElement(aP,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:l.useCallback(f=>{c.current=f},[]),disableHoverableContent:o},i)},hd="Tooltip",[cP,Ns]=As(hd),uP=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,c=pd(hd,e.__scopeTooltip),u=Ds(t),[f,d]=l.useState(null),m=Gn(),p=l.useRef(0),b=a??c.disableHoverableContent,y=s??c.delayDuration,$=l.useRef(!1),[E=!1,v]=Tn({prop:r,defaultProp:o,onChange:A=>{A?(c.onOpen(),document.dispatchEvent(new CustomEvent(du))):c.onClose(),i==null||i(A)}}),w=l.useMemo(()=>E?$.current?"delayed-open":"instant-open":"closed",[E]),T=l.useCallback(()=>{window.clearTimeout(p.current),$.current=!1,v(!0)},[v]),I=l.useCallback(()=>{window.clearTimeout(p.current),v(!1)},[v]),D=l.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{$.current=!0,v(!0)},y)},[y,v]);return l.useEffect(()=>()=>window.clearTimeout(p.current),[]),l.createElement(Zh,u,l.createElement(cP,{scope:t,contentId:m,open:E,stateAttribute:w,trigger:f,onTriggerChange:d,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?D():T()},[c.isOpenDelayed,D,T]),onTriggerLeave:l.useCallback(()=>{b?I():window.clearTimeout(p.current)},[I,b]),onOpen:T,onClose:I,disableHoverableContent:b},n))},hh="TooltipTrigger",lP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ns(hh,n),i=pd(hh,n),a=Ds(n),s=l.useRef(null),c=ut(t,s,o.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),d=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),l.createElement(Qh,ae({asChild:!0},a),l.createElement(Ue.button,ae({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:c,onPointerMove:Ne(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:Ne(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:Ne(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ne(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Ne(e.onBlur,o.onClose),onClick:Ne(e.onClick,o.onClose)})))}),dP="TooltipPortal",[YP,fP]=As(dP,{forceMount:void 0}),Si="TooltipContent",pP=l.forwardRef((e,t)=>{const n=fP(Si,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Ns(Si,e.__scopeTooltip);return l.createElement(yr,{present:r||a.open},a.disableHoverableContent?l.createElement(Cy,ae({side:o},i,{ref:t})):l.createElement(hP,ae({side:o},i,{ref:t})))}),hP=l.forwardRef((e,t)=>{const n=Ns(Si,e.__scopeTooltip),r=pd(Si,e.__scopeTooltip),o=l.useRef(null),i=ut(t,o),[a,s]=l.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:d}=r,m=l.useCallback(()=>{s(null),d(!1)},[d]),p=l.useCallback((b,y)=>{const $=b.currentTarget,E={x:b.clientX,y:b.clientY},v=bP(E,$.getBoundingClientRect()),w=wP(E,v),T=EP(y.getBoundingClientRect()),I=_P([...w,...T]);s(I),d(!0)},[d]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(c&&f){const b=$=>p($,f),y=$=>p($,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",y)}}},[c,f,p,m]),l.useEffect(()=>{if(a){const b=y=>{const $=y.target,E={x:y.clientX,y:y.clientY},v=(c==null?void 0:c.contains($))||(f==null?void 0:f.contains($)),w=!xP(E,a);v?m():w&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,a,u,m]),l.createElement(Cy,ae({},e,{ref:i}))}),[vP,mP]=As(hd,{isInside:!1}),Cy=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,c=Ns(Si,n),u=Ds(n),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(du,f),()=>document.removeEventListener(du,f)),[f]),l.useEffect(()=>{if(c.trigger){const d=m=>{const p=m.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),l.createElement(rs,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f},l.createElement(Jh,ae({"data-state":c.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),l.createElement(bh,null,r),l.createElement(vP,{scope:n,isInside:!0},l.createElement(c1,{id:c.contentId,role:"tooltip"},o||r))))}),gP="TooltipArrow",yP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ds(n);return mP(gP,n).isInside?null:l.createElement(a1,ae({},o,r,{ref:t}))});function bP(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function wP(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function EP(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function xP(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,c=t[i].y,u=t[a].x,f=t[a].y;c>r!=f>r&&n<(u-s)*(r-c)/(f-c)+s&&(o=!o)}return o}function _P(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),SP(t)}function SP(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const CP=sP,$P=uP,TP=lP,IP=pP,RP=yP;function vh(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function OP(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}function $y(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=e.constructor();for(var o in e){var i=e[o],a=[...n,o];typeof i=="string"||typeof i=="number"||i==null?r[o]=t(i,a):typeof i=="object"&&!Array.isArray(i)?r[o]=$y(i,t,a):console.warn('Skipping invalid key "'.concat(a.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return r}function PP(e,t){var n={};if(typeof t=="object"){var r=e;$y(t,(a,s)=>{var c=OP(r,s);n[vh(c)]=String(a)})}else{var o=e;for(var i in o)n[vh(i)]=o[i]}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(s=>"".concat(s,":").concat(this[s])).join(";")},writable:!1}),n}var AP="var(--_4goys34)",DP="_4goys35",NP="_4goys36";const vd=l.forwardRef(({align:e,alignOffset:t,children:n,color:r,bgColor:o,content:i,defaultOpen:a,delayDuration:s=700,disableHoverableContent:c,onOpenChange:u,open:f,position:d,positionOffset:m,withIcon:p,...b},y)=>{const $=Pt.atoms.commonAtoms({color:r,bgColor:o}).className,E=Pt.atoms.borderAtoms({borderColor:o}).className,w=o.replace("$","");return M.jsxs($P,{defaultOpen:a,delayDuration:s,disableHoverableContent:c,onOpenChange:u,open:f,children:[M.jsx(TP,{asChild:!0,ref:y,children:n}),M.jsx(hs,{children:M.jsxs(IP,{align:e,alignOffset:t,side:d,sideOffset:m,...b,className:$e(NP,$,E),children:[M.jsxs(Bt,{gap:"$6",children:[p&&M.jsx(Bt,{width:"$24",children:M.jsx(B0,{size:24})}),i]}),M.jsx(RP,{className:DP,style:PP({[AP]:Pt.theme.colors[w]})})]})})]})});vd.displayName="Tooltip";vd.defaultProps={align:void 0,alignOffset:void 0,defaultOpen:void 0,delayDuration:300,disableHoverableContent:!1,onOpenChange:void 0,open:void 0,position:void 0,positionOffset:void 0,withIcon:void 0,bgColor:"$blackTypoHigh",color:"$white"};const md=({children:e})=>M.jsxs(CP,{children:[e,M.jsx(fd,{})]});md.displayName="RadixProvider";const gd=({children:e,withScrollStyles:t})=>M.jsx("div",{id:"voila-ui",style:{fontFamily:Pt.theme.fonts.poppins},className:$e(t??Pt.scrollbarStyle),children:M.jsx(md,{children:e})});gd.displayName="Provider";gd.defaultProps={withScrollStyles:!1};exports.Accordion=Db;exports.AccordionContent=p0;exports.AccordionItem=h0;exports.AccordionTrigger=H0;exports.Alert=Ph;exports.AspectRatio=xu;exports.Badge=_u;exports.BaseSelect=Mu;exports.BottomSheet=K$;exports.Box=rt;exports.Button=mo;exports.Card=gu;exports.Checkbox=Gm;exports.Chip=cl;exports.CloseButton=Wr;exports.ConfirmDialogContext=dl;exports.ConfirmDialogProvider=BT;exports.Container=yu;exports.DatePicker=vI;exports.Dialog=ll;exports.Divider=fl;exports.Flex=Bt;exports.FullLoader=ag;exports.Grid=bu;exports.IconButton=ml;exports.Image=gl;exports.Input=hl;exports.Link=rg;exports.List=yl;exports.ListItem=bl;exports.Loader=tI;exports.LoaderAnimated=wl;exports.Modal=Pi;exports.ModalBody=$s;exports.ModalFooter=Ts;exports.ModalHeader=Is;exports.MultiPicker=sg;exports.Overlay=ex;exports.Picker=iu;exports.Pills=Zg;exports.Portal=hs;exports.Provider=gd;exports.Radio=sy;exports.RadioGroup=oO;exports.RadixProvider=md;exports.Search=rd;exports.Select=uo;exports.SelectPicker=Gg;exports.Spinner=_o;exports.Stack=Ar;exports.Switch=od;exports.TabItem=sd;exports.Table=fy;exports.Tabs=ad;exports.TabsContext=id;exports.Text=Xt;exports.Textarea=vl;exports.Toast=Ps;exports.ToastAction=dd;exports.ToastProvider=Ey;exports.ToastViewport=ld;exports.Toaster=fd;exports.Tooltip=vd;exports.linkRecipe=ng;exports.reducer=xy;exports.toast=_y;exports.useDialog=HT;exports.useIndeterminate=fT;exports.useOnMount=xv;exports.useRipple=sl;exports.useTableRenderer=dy;exports.useToast=Sy;
|
|
174
|
+
*/var Kp;function gI(){return Kp||(Kp=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,o=60114,i=60109,a=60110,s=60112,c=60113,u=60120,f=60115,d=60116,m=60121,p=60122,b=60117,y=60129,$=60131;if(typeof Symbol=="function"&&Symbol.for){var E=Symbol.for;e=E("react.element"),t=E("react.portal"),n=E("react.fragment"),r=E("react.strict_mode"),o=E("react.profiler"),i=E("react.provider"),a=E("react.context"),s=E("react.forward_ref"),c=E("react.suspense"),u=E("react.suspense_list"),f=E("react.memo"),d=E("react.lazy"),m=E("react.block"),p=E("react.server.block"),b=E("react.fundamental"),E("react.scope"),E("react.opaque.id"),y=E("react.debug_trace_mode"),E("react.offscreen"),$=E("react.legacy_hidden")}var v=!1;function w(ie){return!!(typeof ie=="string"||typeof ie=="function"||ie===n||ie===o||ie===y||ie===r||ie===c||ie===u||ie===$||v||typeof ie=="object"&&ie!==null&&(ie.$$typeof===d||ie.$$typeof===f||ie.$$typeof===i||ie.$$typeof===a||ie.$$typeof===s||ie.$$typeof===b||ie.$$typeof===m||ie[0]===p))}function T(ie){if(typeof ie=="object"&&ie!==null){var ee=ie.$$typeof;switch(ee){case e:var pe=ie.type;switch(pe){case n:case o:case r:case c:case u:return pe;default:var xe=pe&&pe.$$typeof;switch(xe){case a:case s:case d:case f:case i:return xe;default:return ee}}case t:return ee}}}var I=a,D=i,A=e,F=s,k=n,B=d,R=f,x=t,h=o,C=r,P=c,j=!1,H=!1;function U(ie){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function re(ie){return H||(H=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(ie){return T(ie)===a}function L(ie){return T(ie)===i}function J(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===e}function Y(ie){return T(ie)===s}function K(ie){return T(ie)===n}function Z(ie){return T(ie)===d}function ce(ie){return T(ie)===f}function z(ie){return T(ie)===t}function G(ie){return T(ie)===o}function oe(ie){return T(ie)===r}function ne(ie){return T(ie)===c}bt.ContextConsumer=I,bt.ContextProvider=D,bt.Element=A,bt.ForwardRef=F,bt.Fragment=k,bt.Lazy=B,bt.Memo=R,bt.Portal=x,bt.Profiler=h,bt.StrictMode=C,bt.Suspense=P,bt.isAsyncMode=U,bt.isConcurrentMode=re,bt.isContextConsumer=W,bt.isContextProvider=L,bt.isElement=J,bt.isForwardRef=Y,bt.isFragment=K,bt.isLazy=Z,bt.isMemo=ce,bt.isPortal=z,bt.isProfiler=G,bt.isStrictMode=oe,bt.isSuspense=ne,bt.isValidElementType=w,bt.typeOf=T}()),bt}process.env.NODE_ENV==="production"?au.exports=mI():au.exports=gI();var qp=au.exports;let Xp=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Gp=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",hc=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return Gp(n.overflowY,t)||Gp(n.overflowX,t)||(r=>{let o=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)})(e)}return!1},sa=(e,t,n,r,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0,yI=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var bI=(e,t)=>{var n,r,o,i,a,s;if(typeof document>"u")return[];let{scrollMode:c,block:u,inline:f,boundary:d,skipOverflowHiddenElements:m}=t,p=typeof d=="function"?d:C=>C!==d;if(!Xp(e))throw new TypeError("Invalid target");let b=document.scrollingElement||document.documentElement,y=[],$=e;for(;Xp($)&&p($);){if($=yI($),$===b){y.push($);break}$!=null&&$===document.body&&hc($)&&!hc(document.documentElement)||$!=null&&hc($,m)&&y.push($)}let E=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,v=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,w=(a=window.scrollX)!=null?a:pageXOffset,T=(s=window.scrollY)!=null?s:pageYOffset,{height:I,width:D,top:A,right:F,bottom:k,left:B}=e.getBoundingClientRect(),R=u==="start"||u==="nearest"?A:u==="end"?k:A+I/2,x=f==="center"?B+D/2:f==="end"?F:B,h=[];for(let C=0;C<y.length;C++){let P=y[C],{height:j,width:H,top:U,right:re,bottom:W,left:L}=P.getBoundingClientRect();if(c==="if-needed"&&A>=0&&B>=0&&k<=v&&F<=E&&A>=U&&k<=W&&B>=L&&F<=re)return h;let J=getComputedStyle(P),Y=parseInt(J.borderLeftWidth,10),K=parseInt(J.borderTopWidth,10),Z=parseInt(J.borderRightWidth,10),ce=parseInt(J.borderBottomWidth,10),z=0,G=0,oe="offsetWidth"in P?P.offsetWidth-P.clientWidth-Y-Z:0,ne="offsetHeight"in P?P.offsetHeight-P.clientHeight-K-ce:0,ie="offsetWidth"in P?P.offsetWidth===0?0:H/P.offsetWidth:0,ee="offsetHeight"in P?P.offsetHeight===0?0:j/P.offsetHeight:0;if(b===P)z=u==="start"?R:u==="end"?R-v:u==="nearest"?sa(T,T+v,v,K,ce,T+R,T+R+I,I):R-v/2,G=f==="start"?x:f==="center"?x-E/2:f==="end"?x-E:sa(w,w+E,E,Y,Z,w+x,w+x+D,D),z=Math.max(0,z+T),G=Math.max(0,G+w);else{z=u==="start"?R-U-K:u==="end"?R-W+ce+ne:u==="nearest"?sa(U,W,j,K,ce+ne,R,R+I,I):R-(U+j/2)+ne/2,G=f==="start"?x-L-Y:f==="center"?x-(L+H/2)+oe/2:f==="end"?x-re+Z+oe:sa(L,re,H,Y,Z+oe,x,x+D,D);let{scrollLeft:pe,scrollTop:xe}=P;z=Math.max(0,Math.min(xe+z/ee,P.scrollHeight-j/ee+ne)),G=Math.max(0,Math.min(pe+G/ie,P.scrollWidth-H/ie+oe)),R+=xe-z,x+=pe-G}h.push({el:P,top:z,left:G})}return h},wI=0;function Zp(e){return typeof e=="function"?e:hn}function hn(){}function ug(e,t){if(e){var n=bI(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(function(r){var o=r.el,i=r.top,a=r.left;o.scrollTop=i,o.scrollLeft=a})}}function Qp(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function El(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];r(),n=setTimeout(function(){n=null,e.apply(void 0,a)},t)}return o.cancel=r,o}function Ot(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return s&&s.apply(void 0,[r].concat(i)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function pr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(o){typeof o=="function"?o(r):o&&(o.current=r)})}}function lg(){return String(wI++)}function dg(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function Jp(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function fg(e){return typeof e.type=="string"}function pg(e){return e.props}function EI(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var xI=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function ca(e){e===void 0&&(e={});var t={};return xI.forEach(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function xi(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=qa(t,r)?t[r]:e[r],n},{})}function qa(e,t){return e[t]!==void 0}function _i(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function _I(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pr(e,t,n,r,o){if(o===void 0&&(o=!0),n===0)return-1;var i=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:i+1);var a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);var s=Vr(e,a,n,r,o);return s===-1?t>=n?-1:t:s}function Vr(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a<n;a++)if(!r(a).hasAttribute("disabled"))return a}else for(var s=t-1;s>=0;s--)if(!r(s).hasAttribute("disabled"))return s;return o?e>0?Vr(1,0,n,r,!1):Vr(-1,n-1,n,r,!1):-1}function Xa(e,t,n,r){return r===void 0&&(r=!0),t.some(function(o){return o&&(Qp(o,e,n)||r&&Qp(o,n.document.activeElement,n))})}var xl=hn;process.env.NODE_ENV!=="production"&&(xl=function(t,n,r){var o="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(t).forEach(function(i){n[i]!==void 0&&r[i]===void 0?console.error('downshift: A component has changed the controlled prop "'+i+'" to be uncontrolled. '+o):n[i]===void 0&&r[i]!==void 0&&console.error('downshift: A component has changed the uncontrolled prop "'+i+'" to be controlled. '+o)})});var SI=El(function(e){hg(e).textContent=""},500);function _l(e,t){var n=hg(t);e&&(n.textContent=e,SI(t))}function hg(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var vg=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,mg=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,gg=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,Ea=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,xa=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,yg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,bg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,wg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Eg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,xg=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,_g=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,Sg=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,Cg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,su=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,$g=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Tg=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,Ig=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,CI=Object.freeze({__proto__:null,unknown:vg,mouseUp:mg,itemMouseEnter:gg,keyDownArrowUp:Ea,keyDownArrowDown:xa,keyDownEscape:yg,keyDownEnter:bg,keyDownHome:wg,keyDownEnd:Eg,clickItem:xg,blurInput:_g,changeInput:Sg,keyDownSpaceButton:Cg,clickButton:su,blurButton:$g,controlledPropUpdatedSelectedItem:Tg,touchEnd:Ig}),$I=["refKey","ref"],TI=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],II=["onKeyDown","onBlur","onChange","onInput","onChangeText"],RI=["refKey","ref"],OI=["onMouseMove","onMouseDown","onClick","onPress","index","item"],PI=function(){var e=function(t){Du(n,t);function n(o){var i;i=t.call(this,o)||this,i.id=i.props.id||"downshift-"+lg(),i.menuId=i.props.menuId||i.id+"-menu",i.labelId=i.props.labelId||i.id+"-label",i.inputId=i.props.inputId||i.id+"-input",i.getItemId=i.props.getItemId||function(v){return i.id+"-item-"+v},i.input=null,i.items=[],i.itemCount=null,i.previousResultCount=0,i.timeoutIds=[],i.internalSetTimeout=function(v,w){var T=setTimeout(function(){i.timeoutIds=i.timeoutIds.filter(function(I){return I!==T}),v()},w);i.timeoutIds.push(T)},i.setItemCount=function(v){i.itemCount=v},i.unsetItemCount=function(){i.itemCount=null},i.setHighlightedIndex=function(v,w){v===void 0&&(v=i.props.defaultHighlightedIndex),w===void 0&&(w={}),w=ca(w),i.internalSetState(ae({highlightedIndex:v},w))},i.clearSelection=function(v){i.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},v)},i.selectItem=function(v,w,T){w=ca(w),i.internalSetState(ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:v,inputValue:i.props.itemToString(v)},w),T)},i.selectItemAtIndex=function(v,w,T){var I=i.items[v];I!=null&&i.selectItem(I,w,T)},i.selectHighlightedItem=function(v,w){return i.selectItemAtIndex(i.getState().highlightedIndex,v,w)},i.internalSetState=function(v,w){var T,I,D={},A=typeof v=="function";return!A&&v.hasOwnProperty("inputValue")&&i.props.onInputValueChange(v.inputValue,ae({},i.getStateAndHelpers(),v)),i.setState(function(F){F=i.getState(F);var k=A?v(F):v;k=i.props.stateReducer(F,k),T=k.hasOwnProperty("selectedItem");var B={};return T&&k.selectedItem!==F.selectedItem&&(I=k.selectedItem),k.type=k.type||vg,Object.keys(k).forEach(function(R){F[R]!==k[R]&&(D[R]=k[R]),R!=="type"&&(k[R],qa(i.props,R)||(B[R]=k[R]))}),A&&k.hasOwnProperty("inputValue")&&i.props.onInputValueChange(k.inputValue,ae({},i.getStateAndHelpers(),k)),B},function(){Zp(w)();var F=Object.keys(D).length>1;F&&i.props.onStateChange(D,i.getStateAndHelpers()),T&&i.props.onSelect(v.selectedItem,i.getStateAndHelpers()),I!==void 0&&i.props.onChange(I,i.getStateAndHelpers()),i.props.onUserAction(D,i.getStateAndHelpers())})},i.rootRef=function(v){return i._rootNode=v},i.getRootProps=function(v,w){var T,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=cn(I,$I),B=w===void 0?{}:w,R=B.suppressRefError,x=R===void 0?!1:R;i.getRootProps.called=!0,i.getRootProps.refKey=A,i.getRootProps.suppressRefError=x;var h=i.getState(),C=h.isOpen;return ae((T={},T[A]=pr(F,i.rootRef),T.role="combobox",T["aria-expanded"]=C,T["aria-haspopup"]="listbox",T["aria-owns"]=C?i.menuId:null,T["aria-labelledby"]=i.labelId,T),k)},i.keyDownHandlers={ArrowDown:function(w){var T=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?5:1;this.moveHighlightedIndex(I,{type:xa})}else this.internalSetState({isOpen:!0,type:xa},function(){var D=T.getItemCount();if(D>0){var A=T.getState(),F=A.highlightedIndex,k=Pr(1,F,D,function(B){return T.getItemNodeFromIndex(B)});T.setHighlightedIndex(k,{type:xa})}})},ArrowUp:function(w){var T=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?-5:-1;this.moveHighlightedIndex(I,{type:Ea})}else this.internalSetState({isOpen:!0,type:Ea},function(){var D=T.getItemCount();if(D>0){var A=T.getState(),F=A.highlightedIndex,k=Pr(-1,F,D,function(B){return T.getItemNodeFromIndex(B)});T.setHighlightedIndex(k,{type:Ea})}})},Enter:function(w){if(w.which!==229){var T=this.getState(),I=T.isOpen,D=T.highlightedIndex;if(I&&D!=null){w.preventDefault();var A=this.items[D],F=this.getItemNodeFromIndex(D);if(A==null||F&&F.hasAttribute("disabled"))return;this.selectHighlightedItem({type:bg})}}},Escape:function(w){w.preventDefault(),this.reset(ae({type:yg},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},i.buttonKeyDownHandlers=ae({},i.keyDownHandlers,{" ":function(w){w.preventDefault(),this.toggleMenu({type:Cg})}}),i.inputKeyDownHandlers=ae({},i.keyDownHandlers,{Home:function(w){var T=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Vr(1,0,A,function(k){return T.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:wg})}}},End:function(w){var T=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Vr(-1,A-1,A,function(k){return T.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:Eg})}}}}),i.getToggleButtonProps=function(v){var w=v===void 0?{}:v,T=w.onClick;w.onPress;var I=w.onKeyDown,D=w.onKeyUp,A=w.onBlur,F=cn(w,TI),k=i.getState(),B=k.isOpen,R={onClick:Ot(T,i.buttonHandleClick),onKeyDown:Ot(I,i.buttonHandleKeyDown),onKeyUp:Ot(D,i.buttonHandleKeyUp),onBlur:Ot(A,i.buttonHandleBlur)},x=F.disabled?{}:R;return ae({type:"button",role:"button","aria-label":B?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},x,F)},i.buttonHandleKeyUp=function(v){v.preventDefault()},i.buttonHandleKeyDown=function(v){var w=_i(v);i.buttonKeyDownHandlers[w]&&i.buttonKeyDownHandlers[w].call(Rf(i),v)},i.buttonHandleClick=function(v){v.preventDefault(),i.props.environment.document.activeElement===i.props.environment.document.body&&v.target.focus(),process.env.NODE_ENV==="test"?i.toggleMenu({type:su}):i.internalSetTimeout(function(){return i.toggleMenu({type:su})})},i.buttonHandleBlur=function(v){var w=v.target;i.internalSetTimeout(function(){!i.isMouseDown&&(i.props.environment.document.activeElement==null||i.props.environment.document.activeElement.id!==i.inputId)&&i.props.environment.document.activeElement!==w&&i.reset({type:$g})})},i.getLabelProps=function(v){return ae({htmlFor:i.inputId,id:i.labelId},v)},i.getInputProps=function(v){var w=v===void 0?{}:v,T=w.onKeyDown,I=w.onBlur,D=w.onChange,A=w.onInput;w.onChangeText;var F=cn(w,II),k,B={};k="onChange";var R=i.getState(),x=R.inputValue,h=R.isOpen,C=R.highlightedIndex;if(!F.disabled){var P;B=(P={},P[k]=Ot(D,A,i.inputHandleChange),P.onKeyDown=Ot(T,i.inputHandleKeyDown),P.onBlur=Ot(I,i.inputHandleBlur),P)}return ae({"aria-autocomplete":"list","aria-activedescendant":h&&typeof C=="number"&&C>=0?i.getItemId(C):null,"aria-controls":h?i.menuId:null,"aria-labelledby":F&&F["aria-label"]?void 0:i.labelId,autoComplete:"off",value:x,id:i.inputId},B,F)},i.inputHandleKeyDown=function(v){var w=_i(v);w&&i.inputKeyDownHandlers[w]&&i.inputKeyDownHandlers[w].call(Rf(i),v)},i.inputHandleChange=function(v){i.internalSetState({type:Sg,isOpen:!0,inputValue:v.target.value,highlightedIndex:i.props.defaultHighlightedIndex})},i.inputHandleBlur=function(){i.internalSetTimeout(function(){var v=i.props.environment.document&&!!i.props.environment.document.activeElement&&!!i.props.environment.document.activeElement.dataset&&i.props.environment.document.activeElement.dataset.toggle&&i._rootNode&&i._rootNode.contains(i.props.environment.document.activeElement);!i.isMouseDown&&!v&&i.reset({type:_g})})},i.menuRef=function(v){i._menuNode=v},i.getMenuProps=function(v,w){var T,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=cn(I,RI),B=w===void 0?{}:w,R=B.suppressRefError,x=R===void 0?!1:R;return i.getMenuProps.called=!0,i.getMenuProps.refKey=A,i.getMenuProps.suppressRefError=x,ae((T={},T[A]=pr(F,i.menuRef),T.role="listbox",T["aria-labelledby"]=k&&k["aria-label"]?null:i.labelId,T.id=i.menuId,T),k)},i.getItemProps=function(v){var w,T=v===void 0?{}:v,I=T.onMouseMove,D=T.onMouseDown,A=T.onClick;T.onPress;var F=T.index,k=T.item,B=k===void 0?process.env.NODE_ENV==="production"?void 0:EI("getItemProps","item"):k,R=cn(T,OI);F===void 0?(i.items.push(B),F=i.items.indexOf(B)):i.items[F]=B;var x="onClick",h=A,C=(w={onMouseMove:Ot(I,function(){F!==i.getState().highlightedIndex&&(i.setHighlightedIndex(F,{type:gg}),i.avoidScrolling=!0,i.internalSetTimeout(function(){return i.avoidScrolling=!1},250))}),onMouseDown:Ot(D,function(j){j.preventDefault()})},w[x]=Ot(h,function(){i.selectItemAtIndex(F,{type:xg})}),w),P=R.disabled?{onMouseDown:C.onMouseDown}:C;return ae({id:i.getItemId(F),role:"option","aria-selected":i.getState().highlightedIndex===F},P,R)},i.clearItems=function(){i.items=[]},i.reset=function(v,w){v===void 0&&(v={}),v=ca(v),i.internalSetState(function(T){var I=T.selectedItem;return ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,inputValue:i.props.itemToString(I)},v)},w)},i.toggleMenu=function(v,w){v===void 0&&(v={}),v=ca(v),i.internalSetState(function(T){var I=T.isOpen;return ae({isOpen:!I},I&&{highlightedIndex:i.props.defaultHighlightedIndex},v)},function(){var T=i.getState(),I=T.isOpen,D=T.highlightedIndex;I&&i.getItemCount()>0&&typeof D=="number"&&i.setHighlightedIndex(D,v),Zp(w)()})},i.openMenu=function(v){i.internalSetState({isOpen:!0},v)},i.closeMenu=function(v){i.internalSetState({isOpen:!1},v)},i.updateStatus=El(function(){var v=i.getState(),w=i.items[v.highlightedIndex],T=i.getItemCount(),I=i.props.getA11yStatusMessage(ae({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:T,highlightedItem:w},v));i.previousResultCount=T,_l(I,i.props.environment.document)},200);var a=i.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,u=c===void 0?s:c,f=a.defaultIsOpen,d=a.initialIsOpen,m=d===void 0?f:d,p=a.initialInputValue,b=p===void 0?"":p,y=a.initialSelectedItem,$=y===void 0?null:y,E=i.getState({highlightedIndex:u,isOpen:m,inputValue:b,selectedItem:$});return E.selectedItem!=null&&i.props.initialInputValue===void 0&&(E.inputValue=i.props.itemToString(E.selectedItem)),i.state=E,i}var r=n.prototype;return r.internalClearTimeouts=function(){this.timeoutIds.forEach(function(i){clearTimeout(i)}),this.timeoutIds=[]},r.getState=function(i){return i===void 0&&(i=this.state),xi(i,this.props)},r.getItemCount=function(){var i=this.items.length;return this.itemCount!=null?i=this.itemCount:this.props.itemCount!==void 0&&(i=this.props.itemCount),i},r.getItemNodeFromIndex=function(i){return this.props.environment.document.getElementById(this.getItemId(i))},r.scrollHighlightedItemIntoView=function(){{var i=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(i,this._menuNode)}},r.moveHighlightedIndex=function(i,a){var s=this,c=this.getItemCount(),u=this.getState(),f=u.highlightedIndex;if(c>0){var d=Pr(i,f,c,function(m){return s.getItemNodeFromIndex(m)});this.setHighlightedIndex(d,a)}},r.getStateAndHelpers=function(){var i=this.getState(),a=i.highlightedIndex,s=i.inputValue,c=i.selectedItem,u=i.isOpen,f=this.props.itemToString,d=this.id,m=this.getRootProps,p=this.getToggleButtonProps,b=this.getLabelProps,y=this.getMenuProps,$=this.getInputProps,E=this.getItemProps,v=this.openMenu,w=this.closeMenu,T=this.toggleMenu,I=this.selectItem,D=this.selectItemAtIndex,A=this.selectHighlightedItem,F=this.setHighlightedIndex,k=this.clearSelection,B=this.clearItems,R=this.reset,x=this.setItemCount,h=this.unsetItemCount,C=this.internalSetState;return{getRootProps:m,getToggleButtonProps:p,getLabelProps:b,getMenuProps:y,getInputProps:$,getItemProps:E,reset:R,openMenu:v,closeMenu:w,toggleMenu:T,selectItem:I,selectItemAtIndex:D,selectHighlightedItem:A,setHighlightedIndex:F,clearSelection:k,clearItems:B,setItemCount:x,unsetItemCount:h,setState:C,itemToString:f,id:d,highlightedIndex:a,inputValue:s,isOpen:u,selectedItem:c}},r.componentDidMount=function(){var i=this;process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&eh(this._menuNode,this.getMenuProps);{var a=function(){i.isMouseDown=!0},s=function(p){i.isMouseDown=!1;var b=Xa(p.target,[i._rootNode,i._menuNode],i.props.environment);!b&&i.getState().isOpen&&i.reset({type:mg},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},c=function(){i.isTouchMove=!1},u=function(){i.isTouchMove=!0},f=function(p){var b=Xa(p.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!b&&i.getState().isOpen&&i.reset({type:Ig},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},d=this.props.environment;d.addEventListener("mousedown",a),d.addEventListener("mouseup",s),d.addEventListener("touchstart",c),d.addEventListener("touchmove",u),d.addEventListener("touchend",f),this.cleanup=function(){i.internalClearTimeouts(),i.updateStatus.cancel(),d.removeEventListener("mousedown",a),d.removeEventListener("mouseup",s),d.removeEventListener("touchstart",c),d.removeEventListener("touchmove",u),d.removeEventListener("touchend",f)}}},r.shouldScroll=function(i,a){var s=this.props.highlightedIndex===void 0?this.getState():this.props,c=s.highlightedIndex,u=a.highlightedIndex===void 0?i:a,f=u.highlightedIndex,d=c&&this.getState().isOpen&&!i.isOpen,m=c!==f;return d||m},r.componentDidUpdate=function(i,a){process.env.NODE_ENV!=="production"&&(xl(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&eh(this._menuNode,this.getMenuProps)),qa(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Tg,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(a,i)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},r.componentWillUnmount=function(){this.cleanup()},r.render=function(){var i=Jp(this.props.children,hn);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var a=Jp(i(this.getStateAndHelpers()));if(!a)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&AI(a,this.getRootProps),a;if(fg(a))return l.cloneElement(a,this.getRootProps(pg(a)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},n}(l.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:dg,itemToString:function(n){return n==null?"":(process.env.NODE_ENV!=="production"&&_I(n)&&!n.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",n),String(n))},onStateChange:hn,onInputValueChange:hn,onUserAction:hn,onChange:hn,onSelect:hn,onOuterClick:hn,selectedItemChanged:function(n,r){return n!==r},environment:typeof window>"u"?{}:window,stateReducer:function(n,r){return r},suppressRefError:!1,scrollIntoView:ug},e.stateChangeTypes=CI,e}();process.env.NODE_ENV!=="production"&&(PI.propTypes={children:X.func,defaultHighlightedIndex:X.number,defaultIsOpen:X.bool,initialHighlightedIndex:X.number,initialSelectedItem:X.any,initialInputValue:X.string,initialIsOpen:X.bool,getA11yStatusMessage:X.func,itemToString:X.func,onChange:X.func,onSelect:X.func,onStateChange:X.func,onInputValueChange:X.func,onUserAction:X.func,onOuterClick:X.func,selectedItemChanged:X.func,stateReducer:X.func,itemCount:X.number,id:X.string,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})}),suppressRefError:X.bool,scrollIntoView:X.func,selectedItem:X.any,isOpen:X.bool,inputValue:X.string,highlightedIndex:X.number,labelId:X.string,inputId:X.string,menuId:X.string,getItemId:X.func});function eh(e,t){var n=t.refKey;e||console.error('downshift: The ref prop "'+n+'" from getMenuProps was not applied correctly on your menu element.')}function AI(e,t){var n=t.refKey,r=n!=="ref",o=!fg(e);o&&!r&&!qp.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!o&&r&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+n+'"'),!qp.isForwardRef(e)&&!pg(e)[n]&&console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}var DI=["isInitialMount","highlightedIndex","items","environment"],Rg={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function NI(e,t,n){var r=e.props,o=e.type,i={};Object.keys(t).forEach(function(a){kI(a,e,t,n),n[a]!==t[a]&&(i[a]=n[a])}),r.onStateChange&&Object.keys(i).length&&r.onStateChange(ae({type:o},i))}function kI(e,t,n,r){var o=t.props,i=t.type,a="on"+Sl(e)+"Change";o[a]&&r[e]!==void 0&&r[e]!==n[e]&&o[a](ae({type:i},r))}function MI(e,t){return t.changes}function jI(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var LI=El(function(e,t){_l(e(),t)},200),FI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?l.useLayoutEffect:l.useEffect;function VI(e){var t=e.id,n=t===void 0?"downshift-"+lg():t,r=e.labelId,o=e.menuId,i=e.getItemId,a=e.toggleButtonId,s=e.inputId,c=l.useRef({labelId:r||n+"-label",menuId:o||n+"-menu",getItemId:i||function(u){return n+"-item-"+u},toggleButtonId:a||n+"-toggle-button",inputId:s||n+"-input"});return c.current}function Og(e,t,n,r){var o,i;if(e===void 0){if(t===void 0)throw new Error(r);o=n[t],i=t}else i=t===void 0?n.indexOf(e):t,o=e;return[o,i]}function BI(e){return e?String(e):""}function Sl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Cl(e){var t=l.useRef(e);return t.current=e,t}function Pg(e,t,n){var r=l.useRef(),o=l.useRef(),i=l.useCallback(function(m,p){o.current=p,m=xi(m,p.props);var b=e(m,p),y=p.props.stateReducer(m,ae({},p,{changes:b}));return y},[e]),a=l.useReducer(i,t),s=a[0],c=a[1],u=Cl(n),f=l.useCallback(function(m){return c(ae({props:u.current},m))},[u]),d=o.current;return l.useEffect(function(){d&&r.current&&r.current!==s&&NI(d,xi(r.current,d.props),s),r.current=s},[s,n,d]),[s,f]}function HI(e,t,n){var r=Pg(e,t,n),o=r[0],i=r[1];return[xi(o,n),i]}var ri={itemToString:BI,stateReducer:MI,getA11ySelectionMessage:jI,scrollIntoView:ug,environment:typeof window>"u"?{}:window};function Dn(e,t,n){n===void 0&&(n=Rg);var r=e["default"+Sl(t)];return r!==void 0?r:n[t]}function zo(e,t,n){n===void 0&&(n=Rg);var r=e[t];if(r!==void 0)return r;var o=e["initial"+Sl(t)];return o!==void 0?o:Dn(e,t,n)}function WI(e){var t=zo(e,"selectedItem"),n=zo(e,"isOpen"),r=zo(e,"highlightedIndex"),o=zo(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function oi(e,t,n){var r=e.items,o=e.initialHighlightedIndex,i=e.defaultHighlightedIndex,a=t.selectedItem,s=t.highlightedIndex;return r.length===0?-1:o!==void 0&&s===o?o:i!==void 0?i:a?r.indexOf(a):n===0?-1:n<0?r.length-1:0}function zI(e,t,n,r){var o=l.useRef({isMouseDown:!1,isTouchMove:!1});return l.useEffect(function(){if((n==null?void 0:n.addEventListener)!=null){var i=function(){o.current.isMouseDown=!0},a=function(d){o.current.isMouseDown=!1,e&&!Xa(d.target,t.map(function(m){return m.current}),n)&&r()},s=function(){o.current.isTouchMove=!1},c=function(){o.current.isTouchMove=!0},u=function(d){e&&!o.current.isTouchMove&&!Xa(d.target,t.map(function(m){return m.current}),n,!1)&&r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",a),n.addEventListener("touchstart",s),n.addEventListener("touchmove",c),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",u)}}},[e,n]),o}var $l=function(){return hn};process.env.NODE_ENV!=="production"&&($l=function(){for(var t=l.useRef(!0),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=l.useRef(r.reduce(function(s,c){return s[c]={},s},{}));l.useEffect(function(){Object.keys(i.current).forEach(function(s){var c=i.current[s];if(t.current&&!Object.keys(c).length){console.error("downshift: You forgot to call the "+s+" getter function on your component / element.");return}var u=c.suppressRefError,f=c.refKey,d=c.elementRef;(!d||!d.current)&&!u&&console.error('downshift: The ref prop "'+f+'" from '+s+" was not applied correctly on your element.")}),t.current=!1});var a=l.useCallback(function(s,c,u,f){i.current[s]={suppressRefError:c,refKey:u,elementRef:f}},[]);return a});function th(e,t,n){var r=n.isInitialMount,o=n.highlightedIndex,i=n.items,a=n.environment,s=cn(n,DI);l.useEffect(function(){r||LI(function(){return e(ae({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length},s))},a.document)},t)}function UI(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,o=e.getItemNodeFromIndex,i=e.menuElement,a=e.scrollIntoView,s=l.useRef(!0);return FI(function(){t<0||!n||!Object.keys(r.current).length||(s.current===!1?s.current=!0:a(o(t),i))},[t]),s}var Tl=hn;process.env.NODE_ENV!=="production"&&(Tl=function(t){var n=t.isInitialMount,r=t.props,o=t.state,i=l.useRef(r);l.useEffect(function(){n||(xl(o,i.current,r),i.current=r)},[o,r,n])});function nh(e,t,n){var r;n===void 0&&(n=!0);var o=((r=e.items)==null?void 0:r.length)&&t>=0;return ae({isOpen:!1,highlightedIndex:-1},o&&ae({selectedItem:e.items[t],isOpen:Dn(e,"isOpen"),highlightedIndex:Dn(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function YI(e,t,n){var r=t.type,o=t.props,i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:oi(o,e,0)};break;case n.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case n.FunctionCloseMenu:i={isOpen:!1};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:Dn(o,"highlightedIndex"),isOpen:Dn(o,"isOpen"),selectedItem:Dn(o,"selectedItem"),inputValue:Dn(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,i)}X.array.isRequired,X.func,X.func,X.func,X.number,X.number,X.number,X.bool,X.bool,X.bool,X.any,X.any,X.any,X.string,X.string,X.string,X.func,X.string,X.func,X.func,X.func,X.func,X.func,X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})});function KI(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}Cn(Cn({},ri),{getA11yStatusMessage:KI});process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;var Il=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,Rl=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Ol=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,Pl=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,Al=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,Dl=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,Nl=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,kl=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,Ml=process.env.NODE_ENV!=="production"?"__input_change__":8,Ga=process.env.NODE_ENV!=="production"?"__input_blur__":9,jl=process.env.NODE_ENV!=="production"?"__input_focus__":10,Ag=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,Dg=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,Ll=process.env.NODE_ENV!=="production"?"__item_click__":13,Ng=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,kg=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,Mg=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,jg=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,Lg=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,Fl=process.env.NODE_ENV!=="production"?"__function_select_item__":19,Fg=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,Vg=process.env.NODE_ENV!=="production"?"__function_reset__":21,Vl=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,Bg=Object.freeze({__proto__:null,InputKeyDownArrowDown:Il,InputKeyDownArrowUp:Rl,InputKeyDownEscape:Ol,InputKeyDownHome:Pl,InputKeyDownEnd:Al,InputKeyDownPageUp:Dl,InputKeyDownPageDown:Nl,InputKeyDownEnter:kl,InputChange:Ml,InputBlur:Ga,InputFocus:jl,MenuMouseLeave:Ag,ItemMouseMove:Dg,ItemClick:Ll,ToggleButtonClick:Ng,FunctionToggleMenu:kg,FunctionOpenMenu:Mg,FunctionCloseMenu:jg,FunctionSetHighlightedIndex:Lg,FunctionSelectItem:Fl,FunctionSetInputValue:Fg,FunctionReset:Vg,ControlledPropUpdatedSelectedItem:Vl});function qI(e){var t=WI(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),ae({},t,{inputValue:r})}var XI={items:X.array.isRequired,itemToString:X.func,selectedItemChanged:X.func,getA11yStatusMessage:X.func,getA11ySelectionMessage:X.func,highlightedIndex:X.number,defaultHighlightedIndex:X.number,initialHighlightedIndex:X.number,isOpen:X.bool,defaultIsOpen:X.bool,initialIsOpen:X.bool,selectedItem:X.any,initialSelectedItem:X.any,defaultSelectedItem:X.any,inputValue:X.string,defaultInputValue:X.string,initialInputValue:X.string,id:X.string,labelId:X.string,menuId:X.string,getItemId:X.func,inputId:X.string,toggleButtonId:X.string,stateReducer:X.func,onSelectedItemChange:X.func,onHighlightedIndexChange:X.func,onStateChange:X.func,onIsOpenChange:X.func,onInputValueChange:X.func,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})})};function GI(e,t,n){var r=l.useRef(),o=Pg(e,t,n),i=o[0],a=o[1];return l.useEffect(function(){qa(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&a({type:Vl,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)},[i.selectedItem,n.selectedItem]),[xi(i,n),a]}var Hg=hn;process.env.NODE_ENV!=="production"&&(Hg=function(t,n){X.checkPropTypes(XI,t,"prop",n.name)});var ZI=ae({},ri,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:dg});function QI(e,t){var n,r=t.type,o=t.props,i=t.altKey,a;switch(r){case Ll:a={isOpen:Dn(o,"isOpen"),highlightedIndex:Dn(o,"highlightedIndex"),selectedItem:o.items[t.index],inputValue:o.itemToString(o.items[t.index])};break;case Il:e.isOpen?a={highlightedIndex:Pr(1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:i&&e.selectedItem==null?-1:oi(o,e,1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case Rl:e.isOpen?i?a=nh(o,e.highlightedIndex):a={highlightedIndex:Pr(-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:oi(o,e,-1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case kl:a=nh(o,e.highlightedIndex);break;case Ol:a=ae({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Dl:a={highlightedIndex:Pr(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Nl:a={highlightedIndex:Pr(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Pl:a={highlightedIndex:Vr(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case Al:a={highlightedIndex:Vr(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case Ga:a=ae({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=o.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:o.items[e.highlightedIndex],inputValue:o.itemToString(o.items[e.highlightedIndex])});break;case Ml:a={isOpen:!0,highlightedIndex:Dn(o,"highlightedIndex"),inputValue:t.inputValue};break;case jl:a={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case Fl:a={selectedItem:t.selectedItem,inputValue:o.itemToString(t.selectedItem)};break;case Vl:a={inputValue:t.inputValue};break;default:return YI(e,t,Bg)}return ae({},e,a)}var JI=["onMouseLeave","refKey","ref"],eR=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],tR=["onClick","onPress","refKey","ref"],nR=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];Or.stateChangeTypes=Bg;function Or(e){e===void 0&&(e={}),Hg(e,Or);var t=ae({},ZI,e),n=t.initialIsOpen,r=t.defaultIsOpen,o=t.items,i=t.scrollIntoView,a=t.environment,s=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,u=t.itemToString,f=qI(t),d=GI(QI,f,t),m=d[0],p=d[1],b=m.isOpen,y=m.highlightedIndex,$=m.selectedItem,E=m.inputValue,v=l.useRef(null),w=l.useRef({}),T=l.useRef(null),I=l.useRef(null),D=l.useRef(!0),A=VI(t),F=l.useRef(),k=Cl({state:m,props:t}),B=l.useCallback(function(z){return w.current[A.getItemId(z)]},[A]);th(s,[b,y,E,o],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m)),th(c,[$],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m));var R=UI({menuElement:v.current,highlightedIndex:y,isOpen:b,itemRefs:w,scrollIntoView:i,getItemNodeFromIndex:B});Tl({isInitialMount:D.current,props:t,state:m}),l.useEffect(function(){var z=n||r||b;z&&T.current&&T.current.focus()},[]),l.useEffect(function(){D.current||(F.current=o.length)});var x=zI(b,[T,v,I],a,function(){p({type:Ga,selectItem:!1})}),h=$l("getInputProps","getMenuProps");l.useEffect(function(){return D.current=!1,function(){D.current=!0}},[]),l.useEffect(function(){var z;if(!b)w.current={};else if(((z=a.document)==null?void 0:z.activeElement)!==T.current){var G;T==null||(G=T.current)==null||G.focus()}},[b,a]);var C=l.useMemo(function(){return{ArrowDown:function(G){G.preventDefault(),p({type:Il,altKey:G.altKey,getItemNodeFromIndex:B})},ArrowUp:function(G){G.preventDefault(),p({type:Rl,altKey:G.altKey,getItemNodeFromIndex:B})},Home:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:Pl,getItemNodeFromIndex:B}))},End:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:Al,getItemNodeFromIndex:B}))},Escape:function(G){var oe=k.current.state;(oe.isOpen||oe.inputValue||oe.selectedItem||oe.highlightedIndex>-1)&&(G.preventDefault(),p({type:Ol}))},Enter:function(G){var oe=k.current.state;!oe.isOpen||G.which===229||(G.preventDefault(),p({type:kl,getItemNodeFromIndex:B}))},PageUp:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:Dl,getItemNodeFromIndex:B}))},PageDown:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:Nl,getItemNodeFromIndex:B}))}}},[p,k,B]),P=l.useCallback(function(z){return ae({id:A.labelId,htmlFor:A.inputId},z)},[A]),j=l.useCallback(function(z,G){var oe,ne=z===void 0?{}:z,ie=ne.onMouseLeave,ee=ne.refKey,pe=ee===void 0?"ref":ee,xe=ne.ref,Ee=cn(ne,JI),Ae=G===void 0?{}:G,Ie=Ae.suppressRefError,Le=Ie===void 0?!1:Ie;return h("getMenuProps",Le,pe,v),ae((oe={},oe[pe]=pr(xe,function(ke){v.current=ke}),oe.id=A.menuId,oe.role="listbox",oe["aria-labelledby"]=Ee&&Ee["aria-label"]?void 0:""+A.labelId,oe.onMouseLeave=Ot(ie,function(){p({type:Ag})}),oe),Ee)},[p,h,A]),H=l.useCallback(function(z){var G,oe,ne=z===void 0?{}:z,ie=ne.item,ee=ne.index,pe=ne.refKey,xe=pe===void 0?"ref":pe,Ee=ne.ref,Ae=ne.onMouseMove,Ie=ne.onMouseDown,Le=ne.onClick;ne.onPress;var ke=ne.disabled,at=cn(ne,eR),We=k.current,Et=We.props,Xe=We.state,At=Og(ie,ee,Et.items,"Pass either item or index to getItemProps!"),Te=At[1],$t="onClick",Ge=Le,Tt=function(){Te!==Xe.highlightedIndex&&(R.current=!1,p({type:Dg,index:Te,disabled:ke}))},et=function(){p({type:Ll,index:Te})},Dt=function(tt){return tt.preventDefault()};return ae((G={},G[xe]=pr(Ee,function(De){De&&(w.current[A.getItemId(Te)]=De)}),G.disabled=ke,G.role="option",G["aria-selected"]=""+(Te===Xe.highlightedIndex),G.id=A.getItemId(Te),G),!ke&&(oe={},oe[$t]=Ot(Ge,et),oe),{onMouseMove:Ot(Ae,Tt),onMouseDown:Ot(Ie,Dt)},at)},[p,k,R,A]),U=l.useCallback(function(z){var G,oe=z===void 0?{}:z,ne=oe.onClick;oe.onPress;var ie=oe.refKey,ee=ie===void 0?"ref":ie,pe=oe.ref,xe=cn(oe,tR),Ee=k.current.state,Ae=function(){p({type:Ng})};return ae((G={},G[ee]=pr(pe,function(Ie){I.current=Ie}),G["aria-controls"]=A.menuId,G["aria-expanded"]=Ee.isOpen,G.id=A.toggleButtonId,G.tabIndex=-1,G),!xe.disabled&&ae({},{onClick:Ot(ne,Ae)}),xe)},[p,k,A]),re=l.useCallback(function(z,G){var oe,ne=z===void 0?{}:z,ie=ne.onKeyDown,ee=ne.onChange,pe=ne.onInput,xe=ne.onFocus,Ee=ne.onBlur;ne.onChangeText;var Ae=ne.refKey,Ie=Ae===void 0?"ref":Ae,Le=ne.ref,ke=cn(ne,nR),at=G===void 0?{}:G,We=at.suppressRefError,Et=We===void 0?!1:We;h("getInputProps",Et,Ie,T);var Xe=k.current.state,At=function(tt){var Zt=_i(tt);Zt&&C[Zt]&&C[Zt](tt)},Te=function(tt){p({type:Ml,inputValue:tt.target.value})},$t=function(tt){if(Xe.isOpen&&!x.current.isMouseDown){var Zt=tt.relatedTarget===null&&a.document.activeElement!==a.document.body;p({type:Ga,selectItem:!Zt})}},Ge=function(){Xe.isOpen||p({type:jl})},Tt="onChange",et={};if(!ke.disabled){var Dt;et=(Dt={},Dt[Tt]=Ot(ee,pe,Te),Dt.onKeyDown=Ot(ie,At),Dt.onBlur=Ot(Ee,$t),Dt.onFocus=Ot(xe,Ge),Dt)}return ae((oe={},oe[Ie]=pr(Le,function(De){T.current=De}),oe["aria-activedescendant"]=Xe.isOpen&&Xe.highlightedIndex>-1?A.getItemId(Xe.highlightedIndex):"",oe["aria-autocomplete"]="list",oe["aria-controls"]=A.menuId,oe["aria-expanded"]=Xe.isOpen,oe["aria-labelledby"]=ke&&ke["aria-label"]?void 0:""+A.labelId,oe.autoComplete="off",oe.id=A.inputId,oe.role="combobox",oe.value=Xe.inputValue,oe),et,ke)},[h,k,A,C,p,x,a]),W=l.useCallback(function(){p({type:kg})},[p]),L=l.useCallback(function(){p({type:jg})},[p]),J=l.useCallback(function(){p({type:Mg})},[p]),Y=l.useCallback(function(z){p({type:Lg,highlightedIndex:z})},[p]),K=l.useCallback(function(z){p({type:Fl,selectedItem:z})},[p]),Z=l.useCallback(function(z){p({type:Fg,inputValue:z})},[p]),ce=l.useCallback(function(){p({type:Vg})},[p]);return{getItemProps:H,getLabelProps:P,getMenuProps:j,getInputProps:re,getToggleButtonProps:U,toggleMenu:W,openMenu:J,closeMenu:L,setHighlightedIndex:Y,setInputValue:Z,selectItem:K,reset:ce,highlightedIndex:y,isOpen:b,selectedItem:$,inputValue:E}}var Wg={activeIndex:-1,selectedItems:[]};function rh(e,t){return zo(e,t,Wg)}function oh(e,t){return Dn(e,t,Wg)}function rR(e){var t=rh(e,"activeIndex"),n=rh(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function ih(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function oR(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}var iR={selectedItems:X.array,initialSelectedItems:X.array,defaultSelectedItems:X.array,itemToString:X.func,getA11yRemovalMessage:X.func,stateReducer:X.func,activeIndex:X.number,initialActiveIndex:X.number,defaultActiveIndex:X.number,onActiveIndexChange:X.func,onSelectedItemsChange:X.func,keyNavigationNext:X.string,keyNavigationPrevious:X.string,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})})},aR={itemToString:ri.itemToString,stateReducer:ri.stateReducer,environment:ri.environment,getA11yRemovalMessage:oR,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},zg=hn;process.env.NODE_ENV!=="production"&&(zg=function(t,n){X.checkPropTypes(iR,t,"prop",n.name)});var Bl=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,Hl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,Wl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,zl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,Ul=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,Yl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,Kl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,ql=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,Xl=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,Gl=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,Zl=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,Ql=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,Jl=process.env.NODE_ENV!=="production"?"__function_reset__":12,sR=Object.freeze({__proto__:null,SelectedItemClick:Bl,SelectedItemKeyDownDelete:Hl,SelectedItemKeyDownBackspace:Wl,SelectedItemKeyDownNavigationNext:zl,SelectedItemKeyDownNavigationPrevious:Ul,DropdownKeyDownNavigationPrevious:Yl,DropdownKeyDownBackspace:Kl,DropdownClick:ql,FunctionAddSelectedItem:Xl,FunctionRemoveSelectedItem:Gl,FunctionSetSelectedItems:Zl,FunctionSetActiveIndex:Ql,FunctionReset:Jl});function cR(e,t){var n=t.type,r=t.index,o=t.props,i=t.selectedItem,a=e.activeIndex,s=e.selectedItems,c;switch(n){case Bl:c={activeIndex:r};break;case Ul:c={activeIndex:a-1<0?0:a-1};break;case zl:c={activeIndex:a+1>=s.length?-1:a+1};break;case Wl:case Hl:{if(a<0)break;var u=a;s.length===1?u=-1:a===s.length-1&&(u=s.length-2),c=ae({selectedItems:[].concat(s.slice(0,a),s.slice(a+1))},{activeIndex:u});break}case Yl:c={activeIndex:s.length-1};break;case Kl:c={selectedItems:s.slice(0,s.length-1)};break;case Xl:c={selectedItems:[].concat(s,[i])};break;case ql:c={activeIndex:-1};break;case Gl:{var f=a,d=s.indexOf(i);if(d<0)break;s.length===1?f=-1:d===s.length-1&&(f=s.length-2),c={selectedItems:[].concat(s.slice(0,d),s.slice(d+1)),activeIndex:f};break}case Zl:{var m=t.selectedItems;c={selectedItems:m};break}case Ql:{var p=t.activeIndex;c={activeIndex:p};break}case Jl:c={activeIndex:oh(o,"activeIndex"),selectedItems:oh(o,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,c)}var uR=["refKey","ref","onClick","onKeyDown","selectedItem","index"],lR=["refKey","ref","onKeyDown","onClick","preventKeyAction"];ed.stateChangeTypes=sR;function ed(e){e===void 0&&(e={}),zg(e,ed);var t=ae({},aR,e),n=t.getA11yRemovalMessage,r=t.itemToString,o=t.environment,i=t.keyNavigationNext,a=t.keyNavigationPrevious,s=HI(cR,rR(t),t),c=s[0],u=s[1],f=c.activeIndex,d=c.selectedItems,m=l.useRef(!0),p=l.useRef(null),b=l.useRef(d),y=l.useRef();y.current=[];var $=Cl({state:c,props:t});l.useEffect(function(){if(!m.current){if(d.length<b.current.length){var R=b.current.find(function(x){return d.indexOf(x)<0});_l(n({itemToString:r,resultCount:d.length,removedSelectedItem:R,activeIndex:f,activeSelectedItem:d[f]}),o.document)}b.current=d}},[d.length]),l.useEffect(function(){m.current||(f===-1&&p.current?p.current.focus():y.current[f]&&y.current[f].focus())},[f]),Tl({isInitialMount:m.current,props:t,state:c});var E=$l("getDropdownProps");l.useEffect(function(){return m.current=!1,function(){m.current=!0}},[]);var v=l.useMemo(function(){var R;return R={},R[a]=function(){u({type:Ul})},R[i]=function(){u({type:zl})},R.Delete=function(){u({type:Hl})},R.Backspace=function(){u({type:Wl})},R},[u,i,a]),w=l.useMemo(function(){var R;return R={},R[a]=function(x){ih(x)&&u({type:Yl})},R.Backspace=function(h){ih(h)&&u({type:Kl})},R},[u,a]),T=l.useCallback(function(R){var x,h=R===void 0?{}:R,C=h.refKey,P=C===void 0?"ref":C,j=h.ref,H=h.onClick,U=h.onKeyDown,re=h.selectedItem,W=h.index,L=cn(h,uR),J=$.current.state,Y=Og(re,W,J.selectedItems,"Pass either item or index to getSelectedItemProps!"),K=Y[1],Z=K>-1&&K===J.activeIndex,ce=function(){u({type:Bl,index:K})},z=function(oe){var ne=_i(oe);ne&&v[ne]&&v[ne](oe)};return ae((x={},x[P]=pr(j,function(G){G&&y.current.push(G)}),x.tabIndex=Z?0:-1,x.onClick=Ot(H,ce),x.onKeyDown=Ot(U,z),x),L)},[u,$,v]),I=l.useCallback(function(R,x){var h,C=R===void 0?{}:R,P=C.refKey,j=P===void 0?"ref":P,H=C.ref,U=C.onKeyDown,re=C.onClick,W=C.preventKeyAction,L=W===void 0?!1:W,J=cn(C,lR),Y=x===void 0?{}:x,K=Y.suppressRefError,Z=K===void 0?!1:K;E("getDropdownProps",Z,j,p);var ce=function(oe){var ne=_i(oe);ne&&w[ne]&&w[ne](oe)},z=function(){u({type:ql})};return ae((h={},h[j]=pr(H,function(G){G&&(p.current=G)}),h),!L&&{onKeyDown:Ot(U,ce),onClick:Ot(re,z)},J)},[u,w,E]),D=l.useCallback(function(R){u({type:Xl,selectedItem:R})},[u]),A=l.useCallback(function(R){u({type:Gl,selectedItem:R})},[u]),F=l.useCallback(function(R){u({type:Zl,selectedItems:R})},[u]),k=l.useCallback(function(R){u({type:Ql,activeIndex:R})},[u]),B=l.useCallback(function(){u({type:Jl})},[u]);return{getSelectedItemProps:T,getDropdownProps:I,addSelectedItem:D,removeSelectedItem:A,setSelectedItems:F,setActiveIndex:k,reset:B,selectedItems:d,activeIndex:f}}var dR="jbnkvn0",ah=Ke({defaultClassName:"jbnkvng",variantClassNames:{isDropdown:{true:"jbnkvnh"},highlighted:{true:"jbnkvni"},selected:{true:"jbnkvnj"},multiSelected:{true:"jbnkvnk"},isDisabled:{true:"jbnkvnl"}},defaultVariants:{},compoundVariants:[[{isDropdown:!0,highlighted:!0},"jbnkvnm"],[{isDropdown:!0,selected:!0},"jbnkvnn"],[{isDropdown:!0,isDisabled:!0},"jbnkvno"]]}),sh=Ke({defaultClassName:"jbnkvnd",variantClassNames:{isDropdown:{true:"jbnkvne",false:"jbnkvnf"}},defaultVariants:{},compoundVariants:[]}),fR="jbnkvn6",vc=Ke({defaultClassName:"",variantClassNames:{isRounded:{true:"jbnkvn1",false:"jbnkvn2"},isDisabled:{true:"jbnkvn3",false:"jbnkvn4"}},defaultVariants:{isRounded:!1},compoundVariants:[[{isRounded:!0,isDisabled:!1},"jbnkvn5"]]}),pR=Ke({defaultClassName:"jbnkvn7",variantClassNames:{isMobile:{true:"jbnkvn8",false:"jbnkvn9"},isDropdown:{true:"jbnkvna"},isReadOnly:{true:"jbnkvnb"}},defaultVariants:{isMobile:!0},compoundVariants:[]}),hR="jbnkvnc",ch="jbnkvnp";const Ug=l.createContext(void 0),vR=({children:e,contextValue:t})=>M.jsx(Ug.Provider,{value:t,children:e}),td=()=>{const e=l.useContext(Ug);if(e===void 0)throw new Error("useSelectProvider must be used within a SelectProvider");return e},Yg=({children:e,renderer:t})=>{const{getMenuProps:n,isDropdown:r}=td();return t?t({children:e,defaultClassName:sh,innerProps:n()}):M.jsx("div",{className:sh({isDropdown:!!r}),...n(),children:e})};Yg.defaultProps={renderer:void 0};const Kg=({renderer:e,item:t,itemIndex:n})=>{const{isMulti:r,selectedItem:o,multipleSelectedItems:i,highlightedIndex:a,getItemProps:s,onClickItem:c,isDropdown:u}=td(),f=a===n,d=(o==null?void 0:o.value)===t.value&&!r,m=r&&i.includes(t)||!1,p=s({item:t,index:n,disabled:t.isDisabled,onClick:c});return e?e({defaultClassName:ah({highlighted:a===n,selected:o===t&&!r,multiSelected:i.includes(t),isDisabled:t.isDisabled}),innerProps:p,isMulti:r,item:t,itemIndex:n,isHighlighted:f,isSelected:d,isChecked:m}):M.jsxs("div",{className:ah({highlighted:f,selected:d,multiSelected:m,isDisabled:t.isDisabled,isDropdown:u}),...p,children:[M.jsx("span",{children:t.label}),r&&i.includes(t)&&M.jsx(wu,{size:16,color:Pt.theme.colors.greenAccent1,"data-test-id":""})]},t.value)};Kg.defaultProps={renderer:void 0};const qg=({renderer:e,...t})=>{const{isOpen:n,getToggleButtonProps:r,isDisabled:o}=td();if(e)return e({innerProps:r(),defaultClassName:ch,isOpen:n});const i=Pt.theme.colors.grey1;return M.jsx("div",{className:ch,"data-test-id":t["data-test-id"],"data-disabled":o,children:n?M.jsx($0,{color:i,size:24}):M.jsx(E0,{color:i,size:24})})};qg.defaultProps={renderer:void 0,"data-test-id":"CT_Component_IconChev"};const uo=l.forwardRef(({options:e,value:t,label:n,onChange:r,isLoading:o,components:i,required:a,containerStyles:s,isMulti:c,isReadOnly:u,isMobile:f,onClickItem:d,isDropdown:m,...p},b)=>{const{addonLeft:y,addonRight:$,helperTextLeft:E,helperTextRight:v,isError:w,errorMessage:T,isDisabled:I,isValid:D,isRounded:A,className:F}=p,[k,B]=l.useState(e),R=Au({isError:w,isDisabled:I,isValid:D}),x=l.useRef(null),h=u||m,C=A||m,{removeSelectedItem:P,selectedItems:j,addSelectedItem:H,getDropdownProps:U}=ed({initialSelectedItems:c&&t?t:[],onSelectedItemsChange(pe){c&&r(pe.selectedItems)}}),re=l.useMemo(()=>j.length,[j]),W=l.useCallback(pe=>{let xe=pe;(c&&!f||h)&&(xe="");const Ee=new RegExp(xe.toLowerCase());return e.filter(Ae=>Ee.test(Ae.label.toLowerCase()))},[e]),{isOpen:L,getToggleButtonProps:J,getLabelProps:Y,getMenuProps:K,getInputProps:Z,highlightedIndex:ce,getItemProps:z,selectedItem:G,openMenu:oe,closeMenu:ne,setHighlightedIndex:ie}=Or({items:k,initialSelectedItem:c?void 0:t,onInputValueChange:({inputValue:pe})=>{B(W(pe||""))},onIsOpenChange:pe=>{var xe;if(pe.isOpen&&pe.selectedItem){const Ee=k.findIndex(Ae=>{var Ie;return Ae.value===((Ie=pe.selectedItem)==null?void 0:Ie.value)});ie(Ee)}else pe.isOpen||((xe=x.current)==null||xe.blur(),ie(-1))},itemToString(pe){return pe?pe.label:""},onSelectedItemChange(pe){var xe;c||(r(pe.selectedItem),h&&((xe=x.current)==null||xe.blur()),ne())},stateReducer:(pe,xe)=>{const{changes:Ee,type:Ae}=xe,Ie=k.find((Le,ke)=>ke===pe.highlightedIndex);switch(Ae){case Or.stateChangeTypes.InputKeyDownEnter:case Or.stateChangeTypes.ItemClick:if(c){let Le=re;return j.includes(Ie)?(Le-=1,P(Ie)):(Le+=1,H(Ie)),{...Ee,isOpen:!0,highlightedIndex:pe.highlightedIndex,inputValue:!f&&Le>0?`${Le} items selected`:""}}return{...Ee,isOpen:!1,highlightedIndex:pe.highlightedIndex,inputValue:Ee.inputValue};case Or.stateChangeTypes.InputFocus:return{...Ee,highlightedIndex:-1,isOpen:pe.isOpen};case Or.stateChangeTypes.InputBlur:{let Le=Ee.inputValue;return c&&!f&&(re>0?Le=`${re} items selected`:Le=""),{...Ee,inputValue:Le}}default:return Ee}}});l.useImperativeHandle(b,()=>x.current);const ee={isOpen:L,formState:R,selectedItem:G,multipleSelectedItems:j,isMulti:c,isDisabled:I,totalSelected:re,highlightedIndex:ce,getMenuProps:K,getItemProps:z,getToggleButtonProps:J,onClickItem:d,isDropdown:m,openMenu:oe,closeMenu:ne};return M.jsx(vR,{contextValue:ee,children:M.jsxs(rt,{position:"relative",w:"$full",className:F,...J({disabled:!!I}),children:[M.jsxs(wo,{addonLeft:y,addonRight:$,helperTextLeft:E,helperTextRight:v,isError:w,errorMessage:T,isDisabled:I,isValid:D,inputAreaClassName:$e(dR,vc({isRounded:C})),className:vc({isRounded:C,isDisabled:!!I}),children:[M.jsxs("div",{className:fR,children:[M.jsx("input",{"data-test-id":p["data-test-id"],...Z(U({preventKeyAction:L,ref:x,placeholder:n,readOnly:h,disabled:I,className:pR({isMobile:f,isReadOnly:h,isDropdown:m})}))}),f&&c&&M.jsx("div",{className:hR,children:re>0?`${re} items selected`:""}),f&&M.jsx(Ai,{isSelect:!0,isError:w,isDisabled:I,required:a,className:vc({isRounded:C}),...Y(),children:n})]}),M.jsx(qg,{renderer:i==null?void 0:i.Toggle})]}),L&&M.jsx(Yg,{renderer:i==null?void 0:i.List,children:k.map((pe,xe)=>M.jsx(Kg,{renderer:i==null?void 0:i.ListItem,itemIndex:xe,item:pe}))})]})})});uo.displayName="Select";uo.defaultProps={required:!1,isLoading:!1,isMulti:void 0,isReadOnly:!1,isMobile:!1,containerStyles:void 0,components:void 0,onClickItem:void 0,"data-test-id":void 0,isRounded:!1};const Xg=e=>{const t=`0${e}`;return t.substring(t.length-2,t.length)},mR=Array.from({length:31},(e,t)=>({label:Xg(t+1),value:String(t+1),isDisabled:!1})),Za=["January","February","March","April","May","June","July","August","September","October","November","December"],gR=Za.map(e=>({label:e,value:e,isDisabled:!1})),yR=e=>{const t=e?new Date(e).getFullYear():new Date().getFullYear();return Array.from({length:101},(n,r)=>({label:String(t-r),value:String(t-r),isDisabled:!1}))},mc=(e,t)=>{if(t){const n=new Date(t);if(e==="date")return{label:Xg(n.getDate()),value:n.getDate().toString(),isDisabled:!1};if(e==="month")return{label:Za[n.getMonth()],value:Za[n.getMonth()],isDisabled:!1};if(e==="year"){const r=n.getFullYear().toString();return{label:r,value:r,isDisabled:!1}}}},ii=e=>Za.findIndex(t=>t===e),uh=(e,t)=>new Date(e,ii(t)+1,0).getDate(),bR=({date:e,month:t,year:n,maxDate:r})=>{const o=r?new Date(r):new Date;return o.setHours(0,0,0,0),e&&t&&n&&e<=uh(n,t)&&o>new Date(n,ii(t),e,0,0,0,0)?!0:e&&t&&!n?ii(t)===1?e<=29:e<=uh(0,t):!e&&t&&n?n===o.getFullYear()?ii(t)<=o.getMonth():!0:e&&!t&&n?o.getMonth()===0&&n===o.getFullYear()?e<o.getDate():!0:!1},Gg=({title:e,maxDate:t,isMobile:n,defaultDate:r,onSaveDate:o,onClose:i,isOpen:a,buttonText:s,errorMessage:c,...u})=>{const[f,d]=l.useState(),[m,p]=l.useState(),[b,y]=l.useState(),$=()=>{d(void 0),p(void 0),y(void 0)},E=l.useMemo(()=>{if(a){if(f)return f;if(r)return mc("date",r)}},[r,f,a]),v=l.useMemo(()=>{if(a){if(m)return m;if(r)return mc("month",r)}},[r,m,a]),w=l.useMemo(()=>{if(a){if(b)return b;if(r)return mc("year",r)}},[r,b,a]),T=l.useMemo(()=>E||v||w?bR({date:E?Number(E==null?void 0:E.value):0,month:v?v.value:"",year:w?Number(w.value):0,maxDate:t}):!1,[E,v,w,t]),I=E&&v&&!w&&!T,D=E&&!v&&w&&!T,A=!E&&v&&w&&!T,F=E&&v&&w&&!T;return M.jsx(Pi,{...u,isOpen:a,onClose:()=>{i==null||i(),$()},onCloseAutoFocus:k=>{k.preventDefault()},onOpenAutoFocus:k=>{k.preventDefault()},noPadding:!0,closeIcon:M.jsx(rt,{}),children:M.jsxs(Ar,{gap:"$8",children:[M.jsxs(Bt,{p:"$16",justifyContent:"space-between",gap:"$16",alignItems:"center",children:[M.jsx(Xt,{fontWeight:"$bold",textStyle:"subtitle2",children:e}),M.jsx(Wr,{onClick:i,"data-test-id":"CT_Component_closeSelectPicker"})]}),M.jsxs(Ar,{gap:"$16",px:"$24",pb:"$24",children:[M.jsxs(Ar,{children:[M.jsxs(Bt,{gap:"$12",px:"$2",mb:"$4",children:[M.jsx(uo,{isDropdown:!0,name:"date",label:"Date",value:E,isMobile:n,options:mR,onChange:d,isError:I||D||F,"data-test-id":"CT_Component_SelectPicker_dateField"}),M.jsx(uo,{isDropdown:!0,name:"month",label:"Month",value:v,isMobile:n,options:gR,onChange:p,isError:A||I||F,"data-test-id":"CT_Component_SelectPicker_monthField"}),M.jsx(uo,{isDropdown:!0,name:"year",label:"Year",value:w,isMobile:n,options:yR(t),onChange:y,isError:A||D||F,"data-test-id":"CT_Component_SelectPicker_yearField"})]}),(F||A||D||I)&&M.jsx(Xt,{px:"$2",color:"$redAccent1",fontSize:"$caption",lineHeight:"$16",fontWeight:"$medium",children:c})]}),M.jsx(mo,{onClick:()=>{o(new Date(Number(w==null?void 0:w.value),ii(v==null?void 0:v.value),Number(E==null?void 0:E.value))),$()},isDisabled:!w||!v||!E||!T,"data-test-id":"CT_Component_SelectPicker_buttonSave",type:"button",children:s})]})]})})};Gg.defaultProps={title:"Date of birth",isMobile:!1,defaultDate:void 0,maxDate:void 0,buttonText:"Confirm",errorMessage:"Invalid date of birth"};var wR=Ke({defaultClassName:"_1uehowr0",variantClassNames:{isActive:{true:"_1uehowr1",false:"_1uehowr2"},variant:{solid:"_1uehowr3",outline:"_1uehowr4"}},defaultVariants:{isActive:!1,variant:"solid"},compoundVariants:[[{variant:"solid",isActive:!0},"_1uehowr5"],[{variant:"solid",isActive:!1},"_1uehowr6"],[{variant:"outline",isActive:!0},"_1uehowr7"],[{variant:"outline",isActive:!1},"_1uehowr8"]]});const Zg=l.forwardRef(({isActive:e,variant:t,className:n,children:r,as:o,...i},a)=>{const s=o||"span";return M.jsx(s,{ref:a,as:"span",className:$e(wR({isActive:e,variant:t}),n),"data-test-id":i["data-test-id"],...i,children:r})});Zg.defaultProps={as:"span","data-test-id":void 0};const gc="rovingFocusGroup.onEntryFocus",ER={bubbles:!1,cancelable:!0},nd="RovingFocusGroup",[cu,Qg,xR]=Qa(nd),[_R,Jg]=bn(nd,[xR]),[SR,CR]=_R(nd),$R=l.forwardRef((e,t)=>l.createElement(cu.Provider,{scope:e.__scopeRovingFocusGroup},l.createElement(cu.Slot,{scope:e.__scopeRovingFocusGroup},l.createElement(TR,ae({},e,{ref:t}))))),TR=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,...f}=e,d=l.useRef(null),m=lt(t,d),p=Ja(i),[b=null,y]=Tn({prop:a,defaultProp:s,onChange:c}),[$,E]=l.useState(!1),v=un(u),w=Qg(n),T=l.useRef(!1),[I,D]=l.useState(0);return l.useEffect(()=>{const A=d.current;if(A)return A.addEventListener(gc,v),()=>A.removeEventListener(gc,v)},[v]),l.createElement(SR,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:b,onItemFocus:l.useCallback(A=>y(A),[y]),onItemShiftTab:l.useCallback(()=>E(!0),[]),onFocusableItemAdd:l.useCallback(()=>D(A=>A+1),[]),onFocusableItemRemove:l.useCallback(()=>D(A=>A-1),[])},l.createElement(Ue.div,ae({tabIndex:$||I===0?-1:0,"data-orientation":r},f,{ref:m,style:{outline:"none",...e.style},onMouseDown:Ne(e.onMouseDown,()=>{T.current=!0}),onFocus:Ne(e.onFocus,A=>{const F=!T.current;if(A.target===A.currentTarget&&F&&!$){const k=new CustomEvent(gc,ER);if(A.currentTarget.dispatchEvent(k),!k.defaultPrevented){const B=w().filter(P=>P.focusable),R=B.find(P=>P.active),x=B.find(P=>P.id===b),C=[R,x,...B].filter(Boolean).map(P=>P.ref.current);ey(C)}}T.current=!1}),onBlur:Ne(e.onBlur,()=>E(!1))})))}),IR="RovingFocusGroupItem",RR=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Gn(),c=i||s,u=CR(IR,n),f=u.currentTabStopId===c,d=Qg(n),{onFocusableItemAdd:m,onFocusableItemRemove:p}=u;return l.useEffect(()=>{if(r)return m(),()=>p()},[r,m,p]),l.createElement(cu.ItemSlot,{scope:n,id:c,focusable:r,active:o},l.createElement(Ue.span,ae({tabIndex:f?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:Ne(e.onMouseDown,b=>{r?u.onItemFocus(c):b.preventDefault()}),onFocus:Ne(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Ne(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=AR(b,u.orientation,u.dir);if(y!==void 0){b.preventDefault();let E=d().filter(v=>v.focusable).map(v=>v.ref.current);if(y==="last")E.reverse();else if(y==="prev"||y==="next"){y==="prev"&&E.reverse();const v=E.indexOf(b.currentTarget);E=u.loop?DR(E,v+1):E.slice(v+1)}setTimeout(()=>ey(E))}})})))}),OR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function PR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function AR(e,t,n){const r=PR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return OR[r]}function ey(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function DR(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const NR=$R,kR=RR,ty="Radio",[MR,ny]=bn(ty),[jR,LR]=MR(ty),FR=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:c,...u}=e,[f,d]=l.useState(null),m=lt(t,y=>d(y)),p=l.useRef(!1),b=f?!!f.closest("form"):!0;return l.createElement(jR,{scope:n,checked:o,disabled:a},l.createElement(Ue.button,ae({type:"button",role:"radio","aria-checked":o,"data-state":ry(o),"data-disabled":a?"":void 0,disabled:a,value:s},u,{ref:m,onClick:Ne(e.onClick,y=>{o||c==null||c(),b&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})),b&&l.createElement(HR,{control:f,bubbles:!p.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))}),VR="RadioIndicator",BR=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=LR(VR,n);return l.createElement(yr,{present:r||i.checked},l.createElement(Ue.span,ae({"data-state":ry(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))}),HR=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=cs(n),s=as(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});d.call(c,n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ry(e){return e?"checked":"unchecked"}const WR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],oy="RadioGroup",[zR,HP]=bn(oy,[Jg,ny]),iy=Jg(),ay=ny(),[UR,YR]=zR(oy),KR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:c,dir:u,loop:f=!0,onValueChange:d,...m}=e,p=iy(n),b=Ja(u),[y,$]=Tn({prop:i,defaultProp:o,onChange:d});return l.createElement(UR,{scope:n,name:r,required:a,disabled:s,value:y,onValueChange:$},l.createElement(NR,ae({asChild:!0},p,{orientation:c,dir:b,loop:f}),l.createElement(Ue.div,ae({role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":s?"":void 0,dir:b},m,{ref:t}))))}),qR="RadioGroupItem",XR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=YR(qR,n),a=i.disabled||r,s=iy(n),c=ay(n),u=l.useRef(null),f=lt(t,u),d=i.value===o.value,m=l.useRef(!1);return l.useEffect(()=>{const p=y=>{WR.includes(y.key)&&(m.current=!0)},b=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",b)}},[]),l.createElement(kR,ae({asChild:!0},s,{focusable:!a,active:d}),l.createElement(FR,ae({disabled:a,required:i.required,checked:d},c,o,{name:i.name,ref:f,onCheck:()=>i.onValueChange(o.value),onKeyDown:Ne(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Ne(o.onFocus,()=>{var p;m.current&&((p=u.current)===null||p===void 0||p.click())})})))}),GR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=ay(n);return l.createElement(BR,ae({},o,r,{ref:t}))}),ZR=KR,QR=XR,JR=GR;var eO=Ke({defaultClassName:"d6umgr4",variantClassNames:{disabled:{true:"d6umgr5"}},defaultVariants:{},compoundVariants:[]}),tO="d6umgr1",nO=Ke({defaultClassName:"d6umgr2",variantClassNames:{disabled:{true:"d6umgr3"}},defaultVariants:{},compoundVariants:[]}),rO="d6umgr0";const sy=({children:e,className:t,disabled:n,...r})=>{const o=l.useId();return M.jsxs(Bt,{alignItems:"center",children:[M.jsx(Bt,{alignItems:"center",justifyContent:"center",children:M.jsx(QR,{...r,disabled:n,className:$e(t,rO),id:o,children:M.jsx(JR,{className:$e("radio-indicator",nO({disabled:n}))})})}),e&&M.jsx("label",{className:$e("radio-label",eO({disabled:n})),htmlFor:o,children:e})]})};sy.defaultProps={children:void 0};const oO=({className:e,children:t,...n})=>M.jsx(ZR,{...n,className:$e(e,tO),children:t});var iO="_846x3h2",aO="_846x3h0",sO="_846x3h1",cO=Ke({defaultClassName:"_846x3h3",variantClassNames:{size:{small:"_846x3h4",medium:"_846x3h5",large:"_846x3h6"},isHasIcon:{true:"_846x3h7"},isDisabled:{true:"_846x3h8"}},defaultVariants:{size:"small"},compoundVariants:[]});const rd=l.forwardRef(({value:e,size:t,isDisabled:n,icon:r,onClear:o,onFocus:i,onBlur:a,withIcon:s,className:c,...u},f)=>{const[d,m]=l.useState(!1),p=E=>{i==null||i(E),m(!0)},b=E=>{a==null||a(E),m(!1)},y=()=>{o==null||o(),m(!1)},$=l.useMemo(()=>!!(s&&(r||e&&d)),[s,d,e,r]);return M.jsxs(rt,{position:"relative",children:[M.jsx(rt,{className:$e(aO),children:M.jsx(j0,{size:24})}),M.jsx("input",{className:$e(cO({size:t,isHasIcon:$,isDisabled:n}),c),ref:f,value:e,"data-test-id":u["data-test-id"],onFocus:p,onBlur:b,disabled:n,...u}),$&&M.jsx(rt,{className:$e(sO),children:r&&(!d||d&&!e)?r:M.jsx(rt,{className:$e(iO),onMouseDown:y,children:M.jsx(Eu,{"data-test-id":"icon-close-search",onMouseDown:y,cursor:"pointer",size:24})})})]})});rd.displayName="Search";rd.defaultProps={icon:void 0,isDisabled:void 0,onClear:void 0,withIcon:!0,"data-test-id":void 0};const cy="Switch",[uO,WP]=bn(cy),[lO,dO]=uO(cy),fO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...f}=e,[d,m]=l.useState(null),p=lt(t,v=>m(v)),b=l.useRef(!1),y=d?!!d.closest("form"):!0,[$=!1,E]=Tn({prop:o,defaultProp:i,onChange:u});return l.createElement(lO,{scope:n,checked:$,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"switch","aria-checked":$,"aria-required":a,"data-state":uy($),"data-disabled":s?"":void 0,disabled:s,value:c},f,{ref:p,onClick:Ne(e.onClick,v=>{E(w=>!w),y&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})})),y&&l.createElement(vO,{control:d,bubbles:!b.current,name:r,value:c,checked:$,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),pO="SwitchThumb",hO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=dO(pO,n);return l.createElement(Ue.span,ae({"data-state":uy(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),vO=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=cs(n),s=as(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});d.call(c,n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function uy(e){return e?"checked":"unchecked"}const mO=fO,gO=hO;var yO="b7c0j16",bO=Ke({defaultClassName:"b7c0j10",variantClassNames:{variant:{normal:"b7c0j11",small:"b7c0j12"}},defaultVariants:{variant:"normal"},compoundVariants:[]}),wO=Ke({defaultClassName:"b7c0j13",variantClassNames:{variant:{normal:"b7c0j14",small:"b7c0j15"}},defaultVariants:{variant:"normal"},compoundVariants:[]});const EO={normal:16,small:12},od=l.forwardRef((e,t)=>{const{size:n="normal"}=e;return M.jsx(mO,{ref:t,className:$e(bO({variant:n})),...e,children:M.jsx(gO,{className:$e(wO({variant:n})),children:M.jsx(wu,{className:yO,size:EO[n]})})})});od.displayName="Switch";od.defaultProps={size:"normal"};const ly=({accessor:e,sortColumn:t,sortable:n,"data-test-id":r})=>{const o=t.by===e,i=t.order==="DESC",a=t.order==="ASC";return n?M.jsxs(Bt,{flexDirection:"column","data-test-id":r,children:[M.jsx(Oh,{size:10,color:o&&i?"white":"grey"}),M.jsx(Ca,{size:10,color:o&&a?"white":"grey"})]}):null};ly.defaultProps={sortable:!1,"data-test-id":""};var xO=Ke({defaultClassName:"",variantClassNames:{variant:{simple:"_94c6vs1",default:"_94c6vs2"}},defaultVariants:{},compoundVariants:[]}),_O=Ke({defaultClassName:"_94c6vs6",variantClassNames:{variant:{simple:"_94c6vs7",default:"_94c6vs8"}},defaultVariants:{},compoundVariants:[]}),lh=Ke({defaultClassName:"_94c6vs3",variantClassNames:{variant:{simple:"_94c6vs4",default:"_94c6vs5"}},defaultVariants:{},compoundVariants:[]}),SO="_94c6vs0";const dy=({data:e,columns:t})=>{const[n,r]=l.useState([]),[o,i]=l.useState([]),[a,s]=l.useState({by:"",order:""}),c=d=>{const{accessor:m}=d,p=d.sortable,b=a.by===m;return p?b&&a.order==="ASC"?s({by:m,order:"DESC"}):b&&a.order==="DESC"?s({by:"",order:""}):s({by:m,order:"ASC"}):null},u=d=>typeof d=="object"?"":d,f=l.useCallback((d,m)=>{const p=[...d];return m.order==="ASC"?p.sort((y,$)=>String($[m.by]).localeCompare(String(y[m.by]))):m.order==="DESC"?p.sort((y,$)=>String(y[m.by]).localeCompare(String($[m.by]))):[...d]},[]);return l.useEffect(()=>{const d=t.map(b=>({...b,sortable:b.sortable??!1}));r(d);const p=f(e,{by:a.by,order:a.order}).map(b=>d.map(y=>({accessor:y.accessor,sortable:y.sortable??!1,value:u(b[y.accessor]),...y.cellRenderer&&{CellRenderer:y.cellRenderer({origin:b,value:b[y.accessor]})}})));i(p)},[t,e,f,a.by,a.order]),{headers:n,rows:o,handleHeaderClick:c,sortColumn:a}},fy=l.forwardRef(({columns:e,as:t,"data-test-id":n,data:r,variant:o,onSort:i,...a},s)=>{const c=t||"table",{rows:u,headers:f,handleHeaderClick:d,sortColumn:m}=dy({data:r,columns:e});return l.useEffect(()=>{i&&i(m)},[i,m]),M.jsxs(c,{ref:s,as:t,className:SO,"data-test-id":n,...a,children:[M.jsx("thead",{children:M.jsx("tr",{className:_O({variant:o}),children:f.filter(p=>!!p.label).map(p=>M.jsx("th",{"data-test-id":"",className:lh({variant:o}),onClick:()=>d(p),children:M.jsxs(Bt,{alignItems:"center",gap:"$8",justifyContent:"center",px:"$16",children:[M.jsx(rt,{fontWeight:"$bold",color:o==="default"?"$whiteTypoHigh":"$blackTypoHigh",fontSize:"$body2",lineHeight:"$20",children:p.label}),M.jsx(ly,{accessor:p.accessor,sortable:p.sortable,sortColumn:m,"data-test-id":`table-sort-${p.label}`})]})},p.accessor))})}),M.jsx("tbody",{children:u.map((p,b)=>M.jsx("tr",{className:xO({variant:o}),children:p.map((y,$)=>M.jsx(rt,{as:"td","data-test-id":`table-${n}-row${b}-col${$}`,className:lh({variant:o}),children:y.CellRenderer??y.value}))}))})]})});fy.defaultProps={variant:"default",as:"table","data-test-id":"base",onSort:void 0};var CO=Ke({defaultClassName:"_5wiwut0",variantClassNames:{isActive:{true:"_5wiwut1"}},defaultVariants:{isActive:!1},compoundVariants:[]});var $O=Ke({defaultClassName:"_1p5zdvr0",variantClassNames:{withShadow:{true:"_1p5zdvr1"},align:{left:"_1p5zdvr2",center:"_1p5zdvr3",right:"_1p5zdvr4"}},defaultVariants:{withShadow:!1,align:"left"},compoundVariants:[]});const id=l.createContext({index:0,setIndex:()=>null}),ad=l.forwardRef(({as:e,children:t,withShadow:n,index:r,defaultIndex:o,align:i,onChange:a,className:s,...c},u)=>{const[f,d]=l.useState(o??0),m=l.useMemo(()=>l.Children.map(t,(y,$)=>l.cloneElement(y,{"data-index":$})),[t]);l.useEffect(()=>d(r??0),[r]);const p=l.useMemo(()=>({index:f,setIndex:$=>{d($),a==null||a($)}}),[f,a]),b=e||"ul";return M.jsx(b,{"data-test-id":c["data-test-id"],as:e,ref:u,className:$e($O({withShadow:n,align:i}),s),...c,children:M.jsx(id.Provider,{value:p,children:m})})});ad.displayName="Tabs";ad.defaultProps={as:"ul",defaultIndex:0,index:0,align:"left",withShadow:!1,children:void 0,onChange:()=>null,"data-test-id":void 0,className:void 0};const sd=l.forwardRef(({as:e,children:t,...n},r)=>{const{index:o,setIndex:i}=l.useContext(id),a=l.useCallback(u=>{i==null||i(u)},[i]),s=n["data-index"]===o,c=e||"li";return M.jsx(c,{"data-test-id":n["data-test-id"],as:e,ref:r,onClick:()=>a(n["data-index"]||0),className:$e(CO({isActive:s})),...n,children:M.jsx(Xt,{as:"span",textStyle:"body2",children:t})})});sd.displayName="TabItem";sd.defaultProps={as:"li","data-index":void 0,"data-test-id":void 0};const py="ToastProvider",[cd,TO,IO]=Qa("Toast"),[hy,zP]=bn("Toast",[IO]),[RO,Rs]=hy(py),vy=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,c]=l.useState(null),[u,f]=l.useState(0),d=l.useRef(!1),m=l.useRef(!1);return l.createElement(cd.Provider,{scope:t},l.createElement(RO,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:s,onViewportChange:c,onToastAdd:l.useCallback(()=>f(p=>p+1),[]),onToastRemove:l.useCallback(()=>f(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:m},a))};vy.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){const t=`Invalid prop \`label\` supplied to \`${py}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const OO="ToastViewport",PO=["F8"],uu="toast.viewportPause",lu="toast.viewportResume",AO=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=PO,label:o="Notifications ({hotkey})",...i}=e,a=Rs(OO,n),s=TO(n),c=l.useRef(null),u=l.useRef(null),f=l.useRef(null),d=l.useRef(null),m=lt(t,d,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;l.useEffect(()=>{const $=E=>{var v;r.every(T=>E[T]||E.code===T)&&((v=d.current)===null||v===void 0||v.focus())};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[r]),l.useEffect(()=>{const $=c.current,E=d.current;if(b&&$&&E){const v=()=>{if(!a.isClosePausedRef.current){const D=new CustomEvent(uu);E.dispatchEvent(D),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const D=new CustomEvent(lu);E.dispatchEvent(D),a.isClosePausedRef.current=!1}},T=D=>{!$.contains(D.relatedTarget)&&w()},I=()=>{$.contains(document.activeElement)||w()};return $.addEventListener("focusin",v),$.addEventListener("focusout",T),$.addEventListener("pointermove",v),$.addEventListener("pointerleave",I),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{$.removeEventListener("focusin",v),$.removeEventListener("focusout",T),$.removeEventListener("pointermove",v),$.removeEventListener("pointerleave",I),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[b,a.isClosePausedRef]);const y=l.useCallback(({tabbingDirection:$})=>{const v=s().map(w=>{const T=w.ref.current,I=[T,...KO(T)];return $==="forwards"?I:I.reverse()});return($==="forwards"?v.reverse():v).flat()},[s]);return l.useEffect(()=>{const $=d.current;if($){const E=v=>{const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const F=document.activeElement,k=v.shiftKey;if(v.target===$&&k){var I;(I=u.current)===null||I===void 0||I.focus();return}const x=y({tabbingDirection:k?"backwards":"forwards"}),h=x.findIndex(C=>C===F);if(yc(x.slice(h+1)))v.preventDefault();else{var D,A;k?(D=u.current)===null||D===void 0||D.focus():(A=f.current)===null||A===void 0||A.focus()}}};return $.addEventListener("keydown",E),()=>$.removeEventListener("keydown",E)}},[s,y]),l.createElement(nw,{ref:c,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:b?void 0:"none"}},b&&l.createElement(dh,{ref:u,onFocusFromOutsideViewport:()=>{const $=y({tabbingDirection:"forwards"});yc($)}}),l.createElement(cd.Slot,{scope:n},l.createElement(Ue.ol,ae({tabIndex:-1},i,{ref:m}))),b&&l.createElement(dh,{ref:f,onFocusFromOutsideViewport:()=>{const $=y({tabbingDirection:"backwards"});yc($)}}))}),DO="ToastFocusProxy",dh=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Rs(DO,n);return l.createElement(us,ae({"aria-hidden":!0,tabIndex:0},o,{ref:t,style:{position:"fixed"},onFocus:a=>{var s;const c=a.relatedTarget;!((s=i.viewport)!==null&&s!==void 0&&s.contains(c))&&r()}}))}),Os="Toast",NO="toast.swipeStart",kO="toast.swipeMove",MO="toast.swipeCancel",jO="toast.swipeEnd",LO=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,c]=Tn({prop:r,defaultProp:o,onChange:i});return l.createElement(yr,{present:n||s},l.createElement(my,ae({open:s},a,{ref:t,onClose:()=>c(!1),onPause:un(e.onPause),onResume:un(e.onResume),onSwipeStart:Ne(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ne(e.onSwipeMove,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Ne(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ne(e.onSwipeEnd,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),c(!1)})})))}),[FO,VO]=hy(Os,{onClose(){}}),my=l.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:c,onResume:u,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:m,onSwipeEnd:p,...b}=e,y=Rs(Os,n),[$,E]=l.useState(null),v=lt(t,C=>E(C)),w=l.useRef(null),T=l.useRef(null),I=o||y.duration,D=l.useRef(0),A=l.useRef(I),F=l.useRef(0),{onToastAdd:k,onToastRemove:B}=y,R=un(()=>{var C;($==null?void 0:$.contains(document.activeElement))&&((C=y.viewport)===null||C===void 0||C.focus()),a()}),x=l.useCallback(C=>{!C||C===1/0||(window.clearTimeout(F.current),D.current=new Date().getTime(),F.current=window.setTimeout(R,C))},[R]);l.useEffect(()=>{const C=y.viewport;if(C){const P=()=>{x(A.current),u==null||u()},j=()=>{const H=new Date().getTime()-D.current;A.current=A.current-H,window.clearTimeout(F.current),c==null||c()};return C.addEventListener(uu,j),C.addEventListener(lu,P),()=>{C.removeEventListener(uu,j),C.removeEventListener(lu,P)}}},[y.viewport,I,c,u,x]),l.useEffect(()=>{i&&!y.isClosePausedRef.current&&x(I)},[i,I,y.isClosePausedRef,x]),l.useEffect(()=>(k(),()=>B()),[k,B]);const h=l.useMemo(()=>$?yy($):null,[$]);return y.viewport?l.createElement(l.Fragment,null,h&&l.createElement(BO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},h),l.createElement(FO,{scope:n,onClose:R},mn.createPortal(l.createElement(cd.ItemSlot,{scope:n},l.createElement(tw,{asChild:!0,onEscapeKeyDown:Ne(s,()=>{y.isFocusedToastEscapeKeyDownRef.current||R(),y.isFocusedToastEscapeKeyDownRef.current=!1})},l.createElement(Ue.li,ae({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},b,{ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ne(e.onKeyDown,C=>{C.key==="Escape"&&(s==null||s(C.nativeEvent),C.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:Ne(e.onPointerDown,C=>{C.button===0&&(w.current={x:C.clientX,y:C.clientY})}),onPointerMove:Ne(e.onPointerMove,C=>{if(!w.current)return;const P=C.clientX-w.current.x,j=C.clientY-w.current.y,H=!!T.current,U=["left","right"].includes(y.swipeDirection),re=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,W=U?re(0,P):0,L=U?0:re(0,j),J=C.pointerType==="touch"?10:2,Y={x:W,y:L},K={originalEvent:C,delta:Y};H?(T.current=Y,ua(kO,d,K,{discrete:!1})):fh(Y,y.swipeDirection,J)?(T.current=Y,ua(NO,f,K,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(P)>J||Math.abs(j)>J)&&(w.current=null)}),onPointerUp:Ne(e.onPointerUp,C=>{const P=T.current,j=C.target;if(j.hasPointerCapture(C.pointerId)&&j.releasePointerCapture(C.pointerId),T.current=null,w.current=null,P){const H=C.currentTarget,U={originalEvent:C,delta:P};fh(P,y.swipeDirection,y.swipeThreshold)?ua(jO,p,U,{discrete:!0}):ua(MO,m,U,{discrete:!0}),H.addEventListener("click",re=>re.preventDefault(),{once:!0})}})})))),y.viewport))):null});my.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){const t=`Invalid prop \`type\` supplied to \`${Os}\`. Expected \`foreground | background\`.`;return new Error(t)}return null}};const BO=e=>{const{__scopeToast:t,children:n,...r}=e,o=Rs(Os,t),[i,a]=l.useState(!1),[s,c]=l.useState(!1);return UO(()=>a(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:l.createElement(ev,{asChild:!0},l.createElement(us,r,i&&l.createElement(l.Fragment,null,o.label," ",n)))},HO="ToastAction",ud=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?l.createElement(gy,{altText:n,asChild:!0},l.createElement(zO,ae({},r,{ref:t}))):null});ud.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${HO}\``)}};const WO="ToastClose",zO=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=VO(WO,n);return l.createElement(gy,{asChild:!0},l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ne(e.onClick,o.onClose)})))}),gy=l.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return l.createElement(Ue.div,ae({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0},o,{ref:t}))});function yy(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),YO(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...yy(r))}}),t}function ua(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?wh(o,i):o.dispatchEvent(i)}const fh=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function UO(e=()=>{}){const t=un(e);Gt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function YO(e){return e.nodeType===e.ELEMENT_NODE}function KO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}const qO=vy,by=AO,wy=LO,XO=ud;var GO="_10z4js29",ZO="_10z4js2c",QO=Ke({defaultClassName:"_10z4js25",variantClassNames:{color:{neutral:"_10z4js26",negative:"_10z4js27"}},defaultVariants:{color:"neutral"},compoundVariants:[]}),JO="_10z4js28",eP="_10z4js2a";const Ey=qO,ld=l.forwardRef(({className:e,...t},n)=>M.jsx(by,{ref:n,className:$e(eP,e),...t}));ld.displayName=by.displayName;const Ps=l.forwardRef(({className:e,color:t="neutral",...n},r)=>M.jsx(wy,{ref:r,className:$e(QO({color:t}),e),...n}));Ps.displayName=wy.displayName;Ps.defaultProps={viewPort:void 0,actionClassName:void 0};const dd=l.forwardRef(({className:e,...t},n)=>M.jsx(ud,{ref:n,className:$e(e),...t}));dd.displayName=XO.displayName;const tP=1,nP=1e6,Xn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let bc=0;function rP(){return bc=(bc+1)%Number.MAX_VALUE,bc.toString()}const wc=new Map,ph=e=>{if(wc.has(e))return;const t=setTimeout(()=>{wc.delete(e),ai({type:Xn.REMOVE_TOAST,toastId:e})},nP);wc.set(e,t)};function xy(e,t){switch(t.type){case Xn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,tP)};case Xn.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case Xn.DISMISS_TOAST:{const{toastId:n}=t;return n?ph(n):e.toasts.forEach(r=>{ph(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case Xn.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)};default:return e}}const _a=[];let Sa={toasts:[]};function ai(e){Sa=xy(Sa,e),_a.forEach(t=>{t(Sa)})}function _y({...e}){const t=rP(),n=o=>ai({type:Xn.UPDATE_TOAST,toast:{...o,id:t}}),r=()=>ai({type:Xn.DISMISS_TOAST,toastId:t});return ai({type:Xn.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function Sy(){const[e,t]=l.useState(Sa);return l.useEffect(()=>(_a.push(t),()=>{const n=_a.indexOf(t);n>-1&&_a.splice(n,1)}),[e]),{...e,toast:_y,dismiss:n=>ai({type:Xn.DISMISS_TOAST,toastId:n})}}const fd=l.forwardRef((e,t)=>{const{toasts:n,dismiss:r}=Sy();return M.jsx(Ey,{children:n.map(({id:o,description:i,action:a,actionText:s,actionClick:c,duration:u=3e3,type:f="foreground",color:d="neutral",viewPort:m,actionClassName:p,isDismissable:b=!0,preventSwipe:y=!1,container:$,forceHideWhenClose:E,...v})=>M.jsxs("div",{id:"CT_Container_Toast","data-test-id":"CT_Container_Toast",className:$e({[ZO]:E&&!v.open}),...$==null?void 0:$.elementProps,onClick:()=>{var w;(w=$==null?void 0:$.onCLick)==null||w.call($),b&&r(o)},children:[M.jsxs(Ps,{ref:t,color:d,duration:u,type:f,"data-test-id":`toast-${v["data-test-id"]??""}`,...y&&{onSwipeEnd:w=>{w.preventDefault()},onSwipeMove:w=>{w.preventDefault()}},...v,children:[M.jsx(rt,{"data-test-id":`toast-${v["data-test-id"]??""}`,flexGrow:1,pl:"$16",py:"$16",pr:c?"$0":"$16",maxW:"$full",minW:"$0",cursor:b?"pointer":"auto",onClick:()=>{b&&r(o)},children:M.jsx(Xt,{textStyle:"body2",fontWeight:"$reguler",textOverflow:"ellipsis",overflow:"hidden",className:JO,children:i})}),!a&&c&&s?M.jsx(dd,{altText:s,asChild:!0,children:M.jsx(rg,{"data-test-id":`action-toast-${v["data-test-id"]??""}`,onClick:c,isStandalone:!0,className:$e(GO,p),children:s})}):a]},o),M.jsx(ld,{...m})]},o))})});fd.displayName="Toaster";const[As,UP]=bn("Tooltip",[ss]),Ds=ss(),oP="TooltipProvider",iP=700,du="tooltip.open",[aP,pd]=As(oP),sP=e=>{const{__scopeTooltip:t,delayDuration:n=iP,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=l.useState(!0),c=l.useRef(!1),u=l.useRef(0);return l.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),l.createElement(aP,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:l.useCallback(f=>{c.current=f},[]),disableHoverableContent:o},i)},hd="Tooltip",[cP,Ns]=As(hd),uP=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,c=pd(hd,e.__scopeTooltip),u=Ds(t),[f,d]=l.useState(null),m=Gn(),p=l.useRef(0),b=a??c.disableHoverableContent,y=s??c.delayDuration,$=l.useRef(!1),[E=!1,v]=Tn({prop:r,defaultProp:o,onChange:A=>{A?(c.onOpen(),document.dispatchEvent(new CustomEvent(du))):c.onClose(),i==null||i(A)}}),w=l.useMemo(()=>E?$.current?"delayed-open":"instant-open":"closed",[E]),T=l.useCallback(()=>{window.clearTimeout(p.current),$.current=!1,v(!0)},[v]),I=l.useCallback(()=>{window.clearTimeout(p.current),v(!1)},[v]),D=l.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{$.current=!0,v(!0)},y)},[y,v]);return l.useEffect(()=>()=>window.clearTimeout(p.current),[]),l.createElement(Zh,u,l.createElement(cP,{scope:t,contentId:m,open:E,stateAttribute:w,trigger:f,onTriggerChange:d,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?D():T()},[c.isOpenDelayed,D,T]),onTriggerLeave:l.useCallback(()=>{b?I():window.clearTimeout(p.current)},[I,b]),onOpen:T,onClose:I,disableHoverableContent:b},n))},hh="TooltipTrigger",lP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ns(hh,n),i=pd(hh,n),a=Ds(n),s=l.useRef(null),c=lt(t,s,o.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),d=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),l.createElement(Qh,ae({asChild:!0},a),l.createElement(Ue.button,ae({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:c,onPointerMove:Ne(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:Ne(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:Ne(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ne(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Ne(e.onBlur,o.onClose),onClick:Ne(e.onClick,o.onClose)})))}),dP="TooltipPortal",[YP,fP]=As(dP,{forceMount:void 0}),Si="TooltipContent",pP=l.forwardRef((e,t)=>{const n=fP(Si,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Ns(Si,e.__scopeTooltip);return l.createElement(yr,{present:r||a.open},a.disableHoverableContent?l.createElement(Cy,ae({side:o},i,{ref:t})):l.createElement(hP,ae({side:o},i,{ref:t})))}),hP=l.forwardRef((e,t)=>{const n=Ns(Si,e.__scopeTooltip),r=pd(Si,e.__scopeTooltip),o=l.useRef(null),i=lt(t,o),[a,s]=l.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:d}=r,m=l.useCallback(()=>{s(null),d(!1)},[d]),p=l.useCallback((b,y)=>{const $=b.currentTarget,E={x:b.clientX,y:b.clientY},v=bP(E,$.getBoundingClientRect()),w=wP(E,v),T=EP(y.getBoundingClientRect()),I=_P([...w,...T]);s(I),d(!0)},[d]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(c&&f){const b=$=>p($,f),y=$=>p($,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",y)}}},[c,f,p,m]),l.useEffect(()=>{if(a){const b=y=>{const $=y.target,E={x:y.clientX,y:y.clientY},v=(c==null?void 0:c.contains($))||(f==null?void 0:f.contains($)),w=!xP(E,a);v?m():w&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,a,u,m]),l.createElement(Cy,ae({},e,{ref:i}))}),[vP,mP]=As(hd,{isInside:!1}),Cy=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,c=Ns(Si,n),u=Ds(n),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(du,f),()=>document.removeEventListener(du,f)),[f]),l.useEffect(()=>{if(c.trigger){const d=m=>{const p=m.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),l.createElement(rs,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f},l.createElement(Jh,ae({"data-state":c.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),l.createElement(bh,null,r),l.createElement(vP,{scope:n,isInside:!0},l.createElement(c1,{id:c.contentId,role:"tooltip"},o||r))))}),gP="TooltipArrow",yP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ds(n);return mP(gP,n).isInside?null:l.createElement(a1,ae({},o,r,{ref:t}))});function bP(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function wP(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function EP(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function xP(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,c=t[i].y,u=t[a].x,f=t[a].y;c>r!=f>r&&n<(u-s)*(r-c)/(f-c)+s&&(o=!o)}return o}function _P(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),SP(t)}function SP(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const CP=sP,$P=uP,TP=lP,IP=pP,RP=yP;function vh(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function OP(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}function $y(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=e.constructor();for(var o in e){var i=e[o],a=[...n,o];typeof i=="string"||typeof i=="number"||i==null?r[o]=t(i,a):typeof i=="object"&&!Array.isArray(i)?r[o]=$y(i,t,a):console.warn('Skipping invalid key "'.concat(a.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return r}function PP(e,t){var n={};if(typeof t=="object"){var r=e;$y(t,(a,s)=>{var c=OP(r,s);n[vh(c)]=String(a)})}else{var o=e;for(var i in o)n[vh(i)]=o[i]}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(s=>"".concat(s,":").concat(this[s])).join(";")},writable:!1}),n}var AP="var(--_4goys34)",DP="_4goys35",NP="_4goys36";const vd=l.forwardRef(({align:e,alignOffset:t,children:n,color:r,bgColor:o,content:i,defaultOpen:a,delayDuration:s=700,disableHoverableContent:c,onOpenChange:u,open:f,position:d,positionOffset:m,withIcon:p,...b},y)=>{const $=Pt.atoms.commonAtoms({color:r,bgColor:o}).className,E=Pt.atoms.borderAtoms({borderColor:o}).className,w=o.replace("$","");return M.jsxs($P,{defaultOpen:a,delayDuration:s,disableHoverableContent:c,onOpenChange:u,open:f,children:[M.jsx(TP,{asChild:!0,ref:y,children:n}),M.jsx(hs,{children:M.jsxs(IP,{align:e,alignOffset:t,side:d,sideOffset:m,...b,className:$e(NP,$,E),children:[M.jsxs(Bt,{gap:"$6",children:[p&&M.jsx(Bt,{width:"$24",children:M.jsx(B0,{size:24})}),i]}),M.jsx(RP,{className:DP,style:PP({[AP]:Pt.theme.colors[w]})})]})})]})});vd.displayName="Tooltip";vd.defaultProps={align:void 0,alignOffset:void 0,defaultOpen:void 0,delayDuration:300,disableHoverableContent:!1,onOpenChange:void 0,open:void 0,position:void 0,positionOffset:void 0,withIcon:void 0,bgColor:"$blackTypoHigh",color:"$white"};const md=({children:e})=>M.jsxs(CP,{children:[e,M.jsx(fd,{})]});md.displayName="RadixProvider";const gd=({children:e,withScrollStyles:t})=>M.jsx("div",{id:"voila-ui",style:{fontFamily:Pt.theme.fonts.poppins},className:$e(t??Pt.scrollbarStyle),children:M.jsx(md,{children:e})});gd.displayName="Provider";gd.defaultProps={withScrollStyles:!1};exports.Accordion=Db;exports.AccordionContent=p0;exports.AccordionItem=h0;exports.AccordionTrigger=H0;exports.Alert=Ph;exports.AspectRatio=xu;exports.Badge=_u;exports.BaseSelect=Mu;exports.BottomSheet=K$;exports.Box=rt;exports.Button=mo;exports.Card=gu;exports.Checkbox=Gm;exports.Chip=cl;exports.CloseButton=Wr;exports.ConfirmDialogContext=dl;exports.ConfirmDialogProvider=BT;exports.Container=yu;exports.DatePicker=vI;exports.Dialog=ll;exports.Divider=fl;exports.Flex=Bt;exports.FullLoader=ag;exports.Grid=bu;exports.IconButton=ml;exports.Image=gl;exports.Input=hl;exports.Link=rg;exports.List=yl;exports.ListItem=bl;exports.Loader=tI;exports.LoaderAnimated=wl;exports.Modal=Pi;exports.ModalBody=$s;exports.ModalFooter=Ts;exports.ModalHeader=Is;exports.MultiPicker=sg;exports.Overlay=ex;exports.Picker=iu;exports.Pills=Zg;exports.Portal=hs;exports.Provider=gd;exports.Radio=sy;exports.RadioGroup=oO;exports.RadixProvider=md;exports.Search=rd;exports.Select=uo;exports.SelectPicker=Gg;exports.Spinner=_o;exports.Stack=Ar;exports.Switch=od;exports.TabItem=sd;exports.Table=fy;exports.Tabs=ad;exports.TabsContext=id;exports.Text=Xt;exports.Textarea=vl;exports.Toast=Ps;exports.ToastAction=dd;exports.ToastProvider=Ey;exports.ToastViewport=ld;exports.Toaster=fd;exports.Tooltip=vd;exports.linkRecipe=ng;exports.reducer=xy;exports.toast=_y;exports.useDialog=HT;exports.useIndeterminate=fT;exports.useOnMount=xv;exports.useRipple=sl;exports.useTableRenderer=dy;exports.useToast=Sy;
|