5)return o;var s=xd.createTransformer(e),u="number"!=typeof l[0]?1:0,c=n.x.scale*r.x,d=n.y.scale*r.y;l[0+u]/=c,l[1+u]/=d;var f=xc(c,d,.5);"number"==typeof l[2+u]&&(l[2+u]/=f),"number"==typeof l[3+u]&&(l[3+u]/=f);var A=s(l);if(a){var p=0;A=A.replace(Ym,(function(){var e=i[p];return p++,e}))}return A}},Zm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Hu(t,e),t.prototype.componentDidMount=function(){var e,t=this,r=this.props,n=r.visualElement,o=r.layoutGroup,a=r.switchLayoutGroup,i=r.layoutId,l=n.projection;e=Km,Object.assign(RA,e),l&&((null==o?void 0:o.group)&&o.group.add(l),(null==a?void 0:a.register)&&i&&a.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",(function(){t.safeToRemove()})),l.setOptions(Qu(Qu({},l.options),{onExitComplete:function(){return t.safeToRemove()}}))),rp.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(e){var t=this,r=this.props,n=r.layoutDependency,o=r.visualElement,a=r.drag,i=r.isPresent,l=o.projection;return l?(l.isPresent=i,a||e.layoutDependency!==n||void 0===n?l.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?l.promote():l.relegate()||wc.postRender((function(){var e;(null===(e=l.getStack())||void 0===e?void 0:e.members.length)||t.safeToRemove()}))),null):null},t.prototype.componentDidUpdate=function(){var e=this.props.visualElement.projection;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.visualElement,r=e.layoutGroup,n=e.switchLayoutGroup,o=t.projection;o&&(o.scheduleCheckAfterUnmount(),(null==r?void 0:r.group)&&r.group.remove(o),(null==n?void 0:n.deregister)&&n.deregister(o))},t.prototype.safeToRemove=function(){var e=this.props.safeToRemove;null==e||e()},t.prototype.render=function(){return null},t}(e.Component),Km={borderRadius:Qu(Qu({},Rm),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Rm,borderTopRightRadius:Rm,borderBottomLeftRadius:Rm,borderBottomRightRadius:Rm,boxShadow:Wm},Um={measureLayout:function(t){var r=Nu(zu(),2),n=r[0],o=r[1],a=(0,e.useContext)(xp);return e.createElement(Zm,Qu({},t,{layoutGroup:a,switchLayoutGroup:(0,e.useContext)(Bp),isPresent:n,safeToRemove:o}))}},Jm=np({attachResizeListener:function(e,t){return e.addEventListener("resize",t,{passive:!0}),function(){return e.removeEventListener("resize",t)}},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}}}),Vm={current:void 0},Xm=np({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!Vm.current){var e=new Jm(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Vm.current=e}return Vm.current},resetTransform:function(e,t){e.style.transform=null!=t?t:"none"}}),_m=Qu(Qu(Qu(Qu({},tm),Hh),ym),Um),$m=Dp((function(e,t){return function(e,t,r,n,o){var a=t.forwardMotionProps,i=void 0!==a&&a,l=Mp(e)?ah:ih;return Qu(Qu({},l),{preloadedFeatures:r,useRender:Zp(i),createVisualElement:n,projectionNodeConstructor:o,Component:e})}(e,t,_m,Gm,Xm)})),eg=new Set([...zr,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),tg=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function rg(e){return tg.has(e)||!eg.has(e)}var ng,og=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ag=de((function(e){return og.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),ig=function(e){return"theme"!==e},lg=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?ag:ig},sg=function(e,t,r){var n;if(t){var o=t.shouldForwardProp;n=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},ug=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return se(t,r,n),Ce((function(){return ue(t,r,n)})),null},cg=function t(r,n){var o,a,i=r.__emotion_real===r,l=i&&r.__emotion_base||r;void 0!==n&&(o=n.label,a=n.target);var s=sg(r,n,i),u=s||lg(l),c=!u("as");return function(){var d=arguments,f=i&&void 0!==r.__emotion_styles?r.__emotion_styles.slice(0):[];if(void 0!==o&&f.push("label:"+o+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{var A=d[0];f.push(A[0]);for(var p=d.length,h=1;ht=>{const{theme:r,css:n,__css:o,sx:a,...i}=t,l=Tr(i,((e,t)=>Ir(t))),s=function(e,...t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");const r={...e};for(const e of t)if(null!=e)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(t in r&&delete r[t],r[t]=e[t]);return r}({},o,Yr(e,t),Rr(l),a),u=Hr(s)(t.theme);return n?[u,n]:u})({baseStyle:n}),i=dg(t,o)(a);return e.forwardRef((function(t,r){const{colorMode:n,forced:o}=Ve();return e.createElement(i,{ref:r,"data-theme":o?n:void 0,...t})}))}var Ag=function(){const e=new Map;return new Proxy(fg,{apply:(e,t,r)=>fg(...r),get:(t,r)=>(e.has(r)||e.set(r,fg(r)),e.get(r))})}(),pg={initial:e=>{const{position:t}=e,r=["top","bottom"].includes(t)?"y":"x";let n=["top-right","bottom-right"].includes(t)?1:-1;return"bottom"===t&&(n=1),{opacity:0,[r]:24*n}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},hg=(0,e.memo)((t=>{const{id:r,message:n,onCloseComplete:o,onRequestRemove:a,requestClose:i=!1,position:l="bottom",duration:s=5e3,containerStyle:u,motionVariants:c=pg,toastSpacing:d="0.5rem"}=t,[f,A]=(0,e.useState)(s),p=null===(h=(0,e.useContext)(Su))||h.isPresent;var h;Pu((()=>{p||null==o||o()}),[p]),Pu((()=>{A(s)}),[s]);const m=()=>{p&&a()};(0,e.useEffect)((()=>{p&&i&&a()}),[p,i,a]),function(t,r){const n=Mu(t);(0,e.useEffect)((()=>{if(null==r)return;let e=null;return e=window.setTimeout((()=>{n()}),r),()=>{e&&window.clearTimeout(e)}}),[r,n])}(m,f);const g=(0,e.useMemo)((()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:d,...u})),[u,d]),v=(0,e.useMemo)((()=>function(e){let t="center";return e.includes("right")&&(t="flex-end"),e.includes("left")&&(t="flex-start"),{display:"flex",flexDirection:"column",alignItems:t}}(l)),[l]);return(0,Ne.jsx)($m.div,{layout:!0,className:"chakra-toast",variants:c,initial:"initial",animate:"animate",exit:"exit",onHoverStart:()=>A(null),onHoverEnd:()=>A(s),custom:{position:l},style:v,children:(0,Ne.jsx)(Ag.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:g,children:et(n,{id:r,onClose:m})})})}));function mg(e,t){var r;const n=null!=e?e:"bottom",o={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return null!=(r=null==o?void 0:o[t])?r:n}function gg(t){return(0,e.forwardRef)(t)}function vg(){const t=(0,e.useContext)(Pe);if(!t)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return t}function yg(){return{...Ve(),theme:vg()}}function bg(e,t,r){const n=Array.isArray(t)?t:[t],o=Array.isArray(r)?r:[r];return r=>{const a=o.filter(Boolean),i=n.map(((t,n)=>{var o,i;return"breakpoints"===e?function(e,t,r){var n,o;if(null==t)return t;const a=t=>{var r,n;return null==(n=null==(r=e.__breakpoints)?void 0:r.asArray)?void 0:n[t]};return null!=(o=null!=(n=a(t))?n:a(r))?o:r}(r,t,null!=(o=a[n])?o:t):function(e,t,r){var n,o;if(null==t)return t;const a=t=>{var r,n;return null==(n=null==(r=e.__cssMap)?void 0:r[t])?void 0:n.value};return null!=(o=null!=(n=a(t))?n:a(r))?o:r}(r,`${e}.${t}`,null!=(i=a[n])?i:t)}));return Array.isArray(t)?i:i[0]}}hg.displayName="ToastComponent";var wg=i(115);function xg(t,r={}){var n;const{styleConfig:o,...a}=r,{theme:i,colorMode:l}=yg(),s=t?Gr(i,`components.${t}`):void 0,u=o||s,c=it({theme:i,colorMode:l},null!=(n=null==u?void 0:u.defaultProps)?n:{},Rr(function(e,t){const r={};return Object.keys(e).forEach((n=>{t.includes(n)||(r[n]=e[n])})),r}(a,["children"]))),d=(0,e.useRef)({});if(u){const e=function(e){return t=>{var r;const{variant:n,size:o,theme:a}=t,i=function(e){const t=e.__breakpoints;return function(e,r,n,o){var a,i;if(!t)return;const l={},s=function(e,t){return Array.isArray(e)?e:_e(e)?t(e):null!=e?[e]:void 0}(n,t.toArrayValue);if(!s)return l;const u=s.length,c=1===u,d=!!e.parts;for(let n=0;n{it(l,{[e]:c?p[e]:{[A]:p[e]}})})):d?l[A]=p:c?it(l,p):l[A]=p)}return l}}(a);return it({},et(null!=(r=e.baseStyle)?r:{},t),i(e,"sizes",o,t),i(e,"variants",n,t))}}(u),t=e(c);wg(d.current,t)||(d.current=t)}return d.current}function Bg(e,t={}){return xg(e,t)}function Eg(e,t={}){return xg(e,t)}var Cg={path:(0,Ne.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",children:[(0,Ne.jsx)("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),(0,Ne.jsx)("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),(0,Ne.jsx)("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Dg=gg(((e,t)=>{const{as:r,viewBox:n,color:o="currentColor",focusable:a=!1,children:i,className:l,__css:s,...u}=e,c={ref:t,focusable:a,className:Xe("chakra-icon",l),__css:{w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...s,...Bg("Icon",e)}},d=null!=n?n:Cg.viewBox;if(r&&"string"!=typeof r)return(0,Ne.jsx)(Ag.svg,{as:r,...c,...u});const f=null!=i?i:Cg.path;return(0,Ne.jsx)(Ag.svg,{verticalAlign:"middle",viewBox:d,...c,...u,children:f})}));function kg(e){return(0,Ne.jsx)(Dg,{viewBox:"0 0 24 24",...e,children:(0,Ne.jsx)("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}Dg.displayName="Icon";var Mg=Fe({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Pg=gg(((e,t)=>{const r=Bg("Spinner",e),{label:n="Loading...",thickness:o="2px",speed:a="0.45s",emptyColor:i="transparent",className:l,...s}=Nr(e),u=Xe("chakra-spinner",l),c={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:o,borderBottomColor:i,borderLeftColor:i,animation:`${Mg} ${a} linear infinite`,...r};return(0,Ne.jsx)(Ag.div,{ref:t,__css:c,className:u,...s,children:n&&(0,Ne.jsx)(Ag.span,{srOnly:!0,children:n})})}));Pg.displayName="Spinner";var[Sg,Og]=We({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[zg,Lg]=We({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Ig={info:{icon:function(e){return(0,Ne.jsx)(Dg,{viewBox:"0 0 24 24",...e,children:(0,Ne.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})},colorScheme:"blue"},warning:{icon:kg,colorScheme:"orange"},success:{icon:function(e){return(0,Ne.jsx)(Dg,{viewBox:"0 0 24 24",...e,children:(0,Ne.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})},colorScheme:"green"},error:{icon:kg,colorScheme:"red"},loading:{icon:Pg,colorScheme:"blue"}},jg=gg((function(e,t){var r;const{status:n="info",addRole:o=!0,...a}=Nr(e),i=null!=(r=e.colorScheme)?r:function(e){return Ig[e].colorScheme}(n),l=Eg("Alert",{...e,colorScheme:i}),s={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...l.container};return(0,Ne.jsx)(Sg,{value:{status:n},children:(0,Ne.jsx)(zg,{value:l,children:(0,Ne.jsx)(Ag.div,{"data-status":n,role:o?"alert":void 0,ref:t,...a,className:Xe("chakra-alert",e.className),__css:s})})})}));function qg(e){const{status:t}=Og(),r=function(e){return Ig[e].icon}(t),n=Lg(),o="loading"===t?n.spinner:n.icon;return(0,Ne.jsx)(Ag.span,{display:"inherit","data-status":t,...e,className:Xe("chakra-alert__icon",e.className),__css:o,children:e.children||(0,Ne.jsx)(r,{h:"100%",w:"100%"})})}jg.displayName="Alert",qg.displayName="AlertIcon";var Hg=gg((function(e,t){const r=Lg(),{status:n}=Og();return(0,Ne.jsx)(Ag.div,{ref:t,"data-status":n,...e,className:Xe("chakra-alert__title",e.className),__css:r.title})}));Hg.displayName="AlertTitle";var Qg=gg((function(e,t){const r=Lg(),{status:n}=Og(),o={display:"inline",...r.description};return(0,Ne.jsx)(Ag.div,{ref:t,"data-status":n,...e,className:Xe("chakra-alert__desc",e.className),__css:o})}));function Fg(e){return(0,Ne.jsx)(Dg,{focusable:"false","aria-hidden":!0,...e,children:(0,Ne.jsx)("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}Qg.displayName="AlertDescription";var Ng=gg((function(e,t){const r=Bg("CloseButton",e),{children:n,isDisabled:o,__css:a,...i}=Nr(e);return(0,Ne.jsx)(Ag.button,{type:"button","aria-label":"Close",ref:t,disabled:o,__css:{outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,...r,...a},...i,children:n||(0,Ne.jsx)(Fg,{width:"1em",height:"1em"})})}));Ng.displayName="CloseButton";var Gg=function(e){let t=e;const r=new Set,n=e=>{t=e(t),r.forEach((e=>e()))};return{getState:()=>t,subscribe:t=>(r.add(t),()=>{n((()=>e)),r.delete(t)}),removeToast:(e,t)=>{n((r=>({...r,[t]:r[t].filter((t=>t.id!=e))})))},notify:(e,t)=>{const r=function(e,t={}){var r,n;Tg+=1;const o=null!=(r=t.id)?r:Tg,a=null!=(n=t.position)?n:"bottom";return{id:o,message:e,position:a,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Gg.removeToast(String(o),a),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}(e,t),{position:o,id:a}=r;return n((e=>{var t,n;const a=o.includes("top")?[r,...null!=(t=e[o])?t:[]]:[...null!=(n=e[o])?n:[],r];return{...e,[o]:a}})),a},update:(e,t)=>{e&&n((r=>{const n={...r},{position:o,index:a}=Cu(n,e);return o&&-1!==a&&(n[o][a]={...n[o][a],...t,message:Yg(t)}),n}))},closeAll:({positions:e}={})=>{n((t=>(null!=e?e:["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce(((e,r)=>(e[r]=t[r].map((e=>({...e,requestClose:!0}))),e)),{...t})))},close:e=>{n((t=>{const r=Du(t,e);return r?{...t,[r]:t[r].map((t=>t.id==e?{...t,requestClose:!0}:t))}:t}))},isActive:e=>Boolean(Cu(Gg.getState(),e).position)}}({top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]}),Tg=0,Rg=e=>{const{status:t,variant:r="solid",id:n,title:o,isClosable:a,onClose:i,description:l,colorScheme:s,icon:u}=e,c=n?{root:`toast-${n}`,title:`toast-${n}-title`,description:`toast-${n}-description`}:void 0;return(0,Ne.jsxs)(jg,{addRole:!1,status:t,variant:r,id:null==c?void 0:c.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:s,children:[(0,Ne.jsx)(qg,{children:u}),(0,Ne.jsxs)(Ag.div,{flex:"1",maxWidth:"100%",children:[o&&(0,Ne.jsx)(Hg,{id:null==c?void 0:c.title,children:o}),l&&(0,Ne.jsx)(Qg,{id:null==c?void 0:c.description,display:"block",children:l})]}),a&&(0,Ne.jsx)(Ng,{size:"sm",onClick:i,position:"absolute",insetEnd:1,top:1})]})};function Yg(e={}){const{render:t,toastComponent:r=Rg}=e;return n=>"function"==typeof t?t({...n,...e}):(0,Ne.jsx)(r,{...n,...e})}var Wg=0;function Zg(){var e=Wg;return Wg++,e}var Kg=function(t){var r=t.children,n=t.initial,o=t.isPresent,a=t.onExitComplete,i=t.custom,l=t.presenceAffectsLayout,s=Ou(Ug),u=Ou(Zg),c=(0,e.useMemo)((function(){return{id:u,initial:n,isPresent:o,custom:i,onExitComplete:function(e){var t,r;s.set(e,!0);try{for(var n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(s.values()),o=n.next();!o.done;o=n.next())if(!o.value)return}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}null==a||a()},register:function(e){return s.set(e,!1),function(){return s.delete(e)}}}}),l?void 0:[o]);return(0,e.useMemo)((function(){s.forEach((function(e,t){return s.set(t,!1)}))}),[o]),e.useEffect((function(){!o&&!s.size&&(null==a||a())}),[o]),e.createElement(Su.Provider,{value:c},r)};function Ug(){return new Map}function Jg(e){return e.key||""}var Vg=function(t){var r=t.children,n=t.custom,o=t.initial,a=void 0===o||o,i=t.onExitComplete,l=t.exitBeforeEnter,s=t.presenceAffectsLayout,u=void 0===s||s,c=Nu(function(){var t=(0,e.useRef)(!1),r=Nu((0,e.useState)(0),2),n=r[0],o=r[1];Mh((function(){return t.current=!0}));var a=(0,e.useCallback)((function(){!t.current&&o(n+1)}),[n]);return[(0,e.useCallback)((function(){return wc.postRender(a)}),[a]),n]}(),1),d=c[0],f=(0,e.useContext)(xp).forceRender;f&&(d=f);var A=(0,e.useRef)(!0),p=(0,e.useRef)(!0);(0,e.useEffect)((function(){return function(){p.current=!1}}),[]);var h=function(t){var r=[];return e.Children.forEach(t,(function(t){(0,e.isValidElement)(t)&&r.push(t)})),r}(r),m=(0,e.useRef)(h),g=(0,e.useRef)(new Map).current,v=(0,e.useRef)(new Set).current;if(function(e,t){e.forEach((function(e){var r=Jg(e);t.set(r,e)}))}(h,g),A.current)return A.current=!1,e.createElement(e.Fragment,null,h.map((function(t){return e.createElement(Kg,{key:Jg(t),isPresent:!0,initial:!!a&&void 0,presenceAffectsLayout:u},t)})));for(var y=Gu([],Nu(h),!1),b=m.current.map(Jg),w=h.map(Jg),x=b.length,B=0;B(0,Ne.jsx)("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),nv=t=>{const{appendToParentPortal:r,children:n}=t,[o,a]=(0,e.useState)(null),i=(0,e.useRef)(null),[,l]=(0,e.useState)({});(0,e.useEffect)((()=>l({})),[]);const s=ev(),u=Ke();rn((()=>{if(!o)return;const e=o.ownerDocument,t=r&&null!=s?s:e.body;if(!t)return;i.current=e.createElement("div"),i.current.className=tv,t.appendChild(i.current),l({});const n=i.current;return()=>{t.contains(n)&&t.removeChild(n)}}),[o]);const c=(null==u?void 0:u.zIndex)?(0,Ne.jsx)(rv,{zIndex:null==u?void 0:u.zIndex,children:n}):n;return i.current?(0,Xg.createPortal)((0,Ne.jsx)($g,{value:i.current,children:c}),i.current):(0,Ne.jsx)("span",{ref:e=>{e&&a(e)}})},ov=t=>{const{children:r,containerRef:n,appendToParentPortal:o}=t,a=n.current,i=null!=a?a:"undefined"!=typeof window?document.body:void 0,l=(0,e.useMemo)((()=>{const e=null==a?void 0:a.ownerDocument.createElement("div");return e&&(e.className=tv),e}),[a]),[,s]=(0,e.useState)({});return rn((()=>s({})),[]),rn((()=>{if(l&&i)return i.appendChild(l),()=>{i.removeChild(l)}}),[l,i]),i&&l?(0,Xg.createPortal)((0,Ne.jsx)($g,{value:o?l:null,children:r}),l):null};function av(e){const t={appendToParentPortal:!0,...e},{containerRef:r,...n}=t;return r?(0,Ne.jsx)(ov,{containerRef:r,...n}):(0,Ne.jsx)(nv,{...n})}av.className=tv,av.selector=".chakra-portal",av.displayName="Portal";var iv,[lv,sv]=We({name:"ToastOptionsContext",strict:!1}),uv=t=>{const r=(0,e.useSyncExternalStore)(Gg.subscribe,Gg.getState,Gg.getState),{motionVariants:n,component:o=hg,portalProps:a}=t,i=Object.keys(r).map((e=>{const t=r[e];return(0,Ne.jsx)("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${e}`,id:`chakra-toast-manager-${e}`,style:ku(e),children:(0,Ne.jsx)(Vg,{initial:!1,children:t.map((e=>(0,Ne.jsx)(o,{motionVariants:n,...e},e.id)))})},e)}));return(0,Ne.jsx)(av,{...a,children:i})},cv=e=>function({children:t,theme:r=e,toastOptions:n,...o}){return(0,Ne.jsxs)(un,{theme:r,...o,children:[(0,Ne.jsx)(lv,{value:null==n?void 0:n.defaultOptions,children:t}),(0,Ne.jsx)(uv,{...n})]})},dv=cv(xu),fv=(cv(Bu),gg((function(e,t){const{className:r,centerContent:n,...o}=Nr(e),a=Bg("Container",e);return(0,Ne.jsx)(Ag.div,{ref:t,className:Xe("chakra-container",r),...o,__css:{...a,...n&&{display:"flex",flexDirection:"column",alignItems:"center"}}})})));function Av(){return Av=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}var wv;function xv(e,t,r){return void 0===r&&(r="/"),function(e,t,r,n){let o=qv(("string"==typeof t?bv(t):t).pathname||"/",r);if(null==o)return null;let a=Bv(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let i=null;for(let e=0;null==i&&e{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(hv(i.relativePath.startsWith(n),'Absolute route path "'+i.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(n.length));let l=Nv([n,i.relativePath]),s=r.concat(i);e.children&&e.children.length>0&&(hv(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),Bv(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:zv(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of Ev(e.path))o(e,t,r);else o(e,t)})),t}function Ev(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===n.length)return o?[a,""]:[a];let i=Ev(n.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(wv||(wv={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const Cv=/^:[\w-]+$/,Dv=3,kv=2,Mv=1,Pv=10,Sv=-2,Ov=e=>"*"===e;function zv(e,t){let r=e.split("/"),n=r.length;return r.some(Ov)&&(n+=Sv),t&&(n+=kv),r.filter((e=>!Ov(e))).reduce(((e,t)=>e+(Cv.test(t)?Dv:""===t?Mv:Pv)),n)}function Lv(e,t,r){void 0===r&&(r=!1);let{routesMeta:n}=e,o={},a="/",i=[];for(let e=0;e(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));return e.endsWith("*")?(n.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1),s=n.reduce(((e,t,r)=>{let{paramName:n,isOptional:o}=t;if("*"===n){let e=l[r]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const s=l[r];return e[n]=o&&!s?void 0:(s||"").replace(/%2F/g,"/"),e}),{});return{params:s,pathname:a,pathnameBase:i,pattern:e}}function jv(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return mv(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function qv(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function Hv(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function Qv(e,t){let r=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?r.map(((e,t)=>t===r.length-1?e.pathname:e.pathnameBase)):r.map((e=>e.pathnameBase))}function Fv(e,t,r,n){let o;void 0===n&&(n=!1),"string"==typeof e?o=bv(e):(o=Av({},e),hv(!o.pathname||!o.pathname.includes("?"),Hv("?","pathname","search",o)),hv(!o.pathname||!o.pathname.includes("#"),Hv("#","pathname","hash",o)),hv(!o.search||!o.search.includes("#"),Hv("#","search","hash",o)));let a,i=""===e||""===o.pathname,l=i?"/":o.pathname;if(null==l)a=r;else{let e=t.length-1;if(!n&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:r,search:n="",hash:o=""}="string"==typeof e?bv(e):e,a=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:a,search:Tv(n),hash:Rv(o)}}(o,a),u=l&&"/"!==l&&l.endsWith("/"),c=(i||"."===l)&&r.endsWith("/");return s.pathname.endsWith("/")||!u&&!c||(s.pathname+="/"),s}const Nv=e=>e.join("/").replace(/\/\/+/g,"/"),Gv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Tv=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Rv=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const Yv=["post","put","patch","delete"],Wv=(new Set(Yv),["get",...Yv]);function Zv(){return Zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0}));let o=e.useCallback((function(e,o){void 0===o&&(o={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,Zv({fromRouteId:r},o)))}),[t,r]);return o}():function(){$v()||hv(!1);let t=e.useContext(Kv),{basename:r,future:n,navigator:o}=e.useContext(Jv),{matches:a}=e.useContext(Xv),{pathname:i}=ey(),l=JSON.stringify(Qv(a,n.v7_relativeSplatPath)),s=e.useRef(!1);ty((()=>{s.current=!0}));let u=e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void o.go(e);let a=Fv(e,JSON.parse(l),i,"path"===n.relative);null==t&&"/"!==r&&(a.pathname="/"===a.pathname?r:Nv([r,a.pathname])),(n.replace?o.replace:o.push)(a,n.state,n)}),[r,o,l,i,t]);return u}()}function ny(t,r){let{relative:n}=void 0===r?{}:r,{future:o}=e.useContext(Jv),{matches:a}=e.useContext(Xv),{pathname:i}=ey(),l=JSON.stringify(Qv(a,o.v7_relativeSplatPath));return e.useMemo((()=>Fv(t,JSON.parse(l),i,"path"===n)),[t,l,i,n])}function oy(t,r,n,o){$v()||hv(!1);let{navigator:a,static:i}=e.useContext(Jv),{matches:l}=e.useContext(Xv),s=l[l.length-1],u=s?s.params:{},c=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let d,f=ey();if(r){var A;let e="string"==typeof r?bv(r):r;"/"===c||(null==(A=e.pathname)?void 0:A.startsWith(c))||hv(!1),d=e}else d=f;let p=d.pathname||"/",h=p;if("/"!==c){let e=c.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=!i&&n&&n.matches&&n.matches.length>0?n.matches:xv(t,{pathname:h}),g=function(t,r,n,o){var a;if(void 0===r&&(r=[]),void 0===n&&(n=null),void 0===o&&(o=null),null==t){var i;if(!n)return null;if(n.errors)t=n.matches;else{if(!(null!=(i=o)&&i.v7_partialHydration&&0===r.length&&!n.initialized&&n.matches.length>0))return null;t=n.matches}}let l=t,s=null==(a=n)?void 0:a.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||hv(!1),l=l.slice(0,Math.min(l.length,e+1))}let u=!1,c=-1;if(n&&o&&o.v7_partialHydration)for(let e=0;e=0?l.slice(0,c+1):[l[0]];break}}}return l.reduceRight(((t,o,a)=>{let i,d=!1,f=null,A=null;n&&(i=s&&o.route.id?s[o.route.id]:void 0,f=o.route.errorElement||iy,u&&(c<0&&0===a?(function(e){!1||fy[e]||(fy[e]=!0)}("route-fallback"),d=!0,A=null):c===a&&(d=!0,A=o.route.hydrateFallbackElement||null)));let p=r.concat(l.slice(0,a+1)),h=()=>{let r;return r=i?f:d?A:o.route.Component?e.createElement(o.route.Component,null):o.route.element?o.route.element:t,e.createElement(sy,{match:o,routeContext:{outlet:t,matches:p,isDataRoute:null!=n},children:r})};return n&&(o.route.ErrorBoundary||o.route.errorElement||0===a)?e.createElement(ly,{location:n.location,revalidation:n.revalidation,component:f,error:i,children:h(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):h()}),null)}(m&&m.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:Nv([c,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:Nv([c,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,n,o);return r&&g?e.createElement(Vv.Provider,{value:{location:Zv({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:iv.Pop}},g):g}function ay(){let t=function(){var t;let r=e.useContext(_v),n=function(){let t=e.useContext(Uv);return t||hv(!1),t}(cy.UseRouteError),o=dy(cy.UseRouteError);return void 0!==r?r:null==(t=n.errors)?void 0:t[o]}(),r=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},r),n?e.createElement("pre",{style:o},n):null,null)}const iy=e.createElement(ay,null);class ly extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?e.createElement(Xv.Provider,{value:this.props.routeContext},e.createElement(_v.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function sy(t){let{routeContext:r,match:n,children:o}=t,a=e.useContext(Kv);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(Xv.Provider,{value:r},o)}var uy=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(uy||{}),cy=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(cy||{});function dy(t){let r=function(){let t=e.useContext(Xv);return t||hv(!1),t}(),n=r.matches[r.matches.length-1];return n.route.id||hv(!1),n.route.id}const fy={};function Ay(e){hv(!1)}function py(t){let{basename:r="/",children:n=null,location:o,navigationType:a=iv.Pop,navigator:i,static:l=!1,future:s}=t;$v()&&hv(!1);let u=r.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:u,navigator:i,static:l,future:Zv({v7_relativeSplatPath:!1},s)})),[u,s,i,l]);"string"==typeof o&&(o=bv(o));let{pathname:d="/",search:f="",hash:A="",state:p=null,key:h="default"}=o,m=e.useMemo((()=>{let e=qv(d,u);return null==e?null:{location:{pathname:e,search:f,hash:A,state:p,key:h},navigationType:a}}),[u,d,f,A,p,h,a]);return null==m?null:e.createElement(Jv.Provider,{value:c},e.createElement(Vv.Provider,{children:n,value:m}))}function hy(e){let{children:t,location:r}=e;return oy(my(t),r)}function my(t,r){void 0===r&&(r=[]);let n=[];return e.Children.forEach(t,((t,o)=>{if(!e.isValidElement(t))return;let a=[...r,o];if(t.type===e.Fragment)return void n.push.apply(n,my(t.props.children,a));t.type!==Ay&&hv(!1),t.props.index&&t.props.children&&hv(!1);let i={id:t.props.id||a.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(i.children=my(t.props.children,a)),n.push(i)})),n}function gy(){return gy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[r]=e[r]);return o}e.startTransition,new Promise((()=>{})),e.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const yy=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],by=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"];try{window.__reactRouterVersion="6"}catch(e){}const wy=e.createContext({isTransitioning:!1});new Map;const xy=e.startTransition;function By(t){let{basename:r,children:n,future:o,window:a}=t,i=e.useRef();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),function(e,t,r,n){void 0===n&&(n={});let{window:o=document.defaultView,v5Compat:a=!1}=n,i=o.history,l=iv.Pop,s=null,u=c();function c(){return(i.state||{idx:null}).idx}function d(){l=iv.Pop;let e=c(),t=null==e?null:e-u;u=e,s&&s({action:l,location:A.location,delta:t})}function f(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,r="string"==typeof e?e:yv(e);return r=r.replace(/ $/,"%20"),hv(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==u&&(u=0,i.replaceState(Av({},i.state,{idx:u}),""));let A={get action(){return l},get location(){return e(o,i)},listen(e){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(pv,d),s=e,()=>{o.removeEventListener(pv,d),s=null}},createHref:e=>t(o,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l=iv.Push;let n=vv(A.location,e,t);r&&r(n,e),u=c()+1;let d=gv(n,u),f=A.createHref(n);try{i.pushState(d,"",f)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(f)}a&&s&&s({action:l,location:A.location,delta:1})},replace:function(e,t){l=iv.Replace;let n=vv(A.location,e,t);r&&r(n,e),u=c();let o=gv(n,u),d=A.createHref(n);i.replaceState(o,"",d),a&&s&&s({action:l,location:A.location,delta:0})},go:e=>i.go(e)};return A}((function(e,t){let{pathname:r="/",search:n="",hash:o=""}=bv(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),vv("",{pathname:r,search:n,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:yv(t))}),(function(e,t){mv("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:a,v5Compat:!0}));let l=i.current,[s,u]=e.useState({action:l.action,location:l.location}),{v7_startTransition:c}=o||{},d=e.useCallback((e=>{c&&xy?xy((()=>u(e))):u(e)}),[u,c]);return e.useLayoutEffect((()=>l.listen(d)),[l,d]),e.useEffect((()=>{return null==(e=o)||e.v7_startTransition,void 0!==(null==e?void 0:e.v7_relativeSplatPath)||t&&t.v7_relativeSplatPath,void(t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation));var e,t}),[o]),e.createElement(py,{basename:r,children:n,location:s.location,navigationType:s.action,navigator:l,future:o})}_g.flushSync,e.useId;const Ey="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Cy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dy=e.forwardRef((function(t,r){let n,{onClick:o,relative:a,reloadDocument:i,replace:l,state:s,target:u,to:c,preventScrollReset:d,viewTransition:f}=t,A=vy(t,yy),{basename:p}=e.useContext(Jv),h=!1;if("string"==typeof c&&Cy.test(c)&&(n=c,Ey))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),r=qv(t.pathname,p);t.origin===e.origin&&null!=r?c=r+t.search+t.hash:h=!0}catch(e){}let m=function(t,r){let{relative:n}=void 0===r?{}:r;$v()||hv(!1);let{basename:o,navigator:a}=e.useContext(Jv),{hash:i,pathname:l,search:s}=ny(t,{relative:n}),u=l;return"/"!==o&&(u="/"===l?o:Nv([o,l])),a.createHref({pathname:u,search:s,hash:i})}(c,{relative:a}),g=function(t,r){let{target:n,replace:o,state:a,preventScrollReset:i,relative:l,viewTransition:s}=void 0===r?{}:r,u=ry(),c=ey(),d=ny(t,{relative:l});return e.useCallback((e=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(e,n)){e.preventDefault();let r=void 0!==o?o:yv(c)===yv(d);u(t,{replace:r,state:a,preventScrollReset:i,relative:l,viewTransition:s})}}),[c,u,d,o,a,n,t,i,l,s])}(c,{replace:l,state:s,target:u,preventScrollReset:d,relative:a,viewTransition:f});return e.createElement("a",gy({},A,{href:n||m,onClick:h||i?o:function(e){o&&o(e),e.defaultPrevented||g(e)},ref:r,target:u}))})),ky=e.forwardRef((function(t,r){let{"aria-current":n="page",caseSensitive:o=!1,className:a="",end:i=!1,style:l,to:s,viewTransition:u,children:c}=t,d=vy(t,by),f=ny(s,{relative:d.relative}),A=ey(),p=e.useContext(Uv),{navigator:h,basename:m}=e.useContext(Jv),g=null!=p&&function(t,r){void 0===r&&(r={});let n=e.useContext(wy);null==n&&hv(!1);let{basename:o}=function(){let t=e.useContext(Kv);return t||hv(!1),t}(My.useViewTransitionState),a=ny(t,{relative:r.relative});if(!n.isTransitioning)return!1;let i=qv(n.currentLocation.pathname,o)||n.currentLocation.pathname,l=qv(n.nextLocation.pathname,o)||n.nextLocation.pathname;return null!=Iv(a.pathname,l)||null!=Iv(a.pathname,i)}(f)&&!0===u,v=h.encodeLocation?h.encodeLocation(f).pathname:f.pathname,y=A.pathname,b=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;o||(y=y.toLowerCase(),b=b?b.toLowerCase():null,v=v.toLowerCase()),b&&m&&(b=qv(b,m)||b);const w="/"!==v&&v.endsWith("/")?v.length-1:v.length;let x,B=y===v||!i&&y.startsWith(v)&&"/"===y.charAt(w),E=null!=b&&(b===v||!i&&b.startsWith(v)&&"/"===b.charAt(v.length)),C={isActive:B,isPending:E,isTransitioning:g},D=B?n:void 0;x="function"==typeof a?a(C):[a,B?"active":null,E?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let k="function"==typeof l?l(C):l;return e.createElement(Dy,gy({},d,{"aria-current":D,className:x,ref:r,style:k,to:s,viewTransition:u}),"function"==typeof c?c(C):c)}));var My,Py;function Sy(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(My||(My={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Py||(Py={}));var Oy=Sy()?e.useLayoutEffect:e.useEffect;function zy(t,r=[]){const n=(0,e.useRef)(t);return Oy((()=>{n.current=t})),(0,e.useCallback)(((...e)=>{var t;return null==(t=n.current)?void 0:t.call(n,...e)}),r)}function Ly(t={}){const{onClose:r,onOpen:n,isOpen:o,id:a}=t,i=zy(n),l=zy(r),[s,u]=(0,e.useState)(t.defaultIsOpen||!1),[c,d]=function(e,t){const r=void 0!==e;return[r,r&&void 0!==e?e:t]}(o,s),f=function(t,r){const n=(0,e.useId)();return(0,e.useMemo)((()=>t||[r,n].filter(Boolean).join("-")),[t,r,n])}(a,"disclosure"),A=(0,e.useCallback)((()=>{c||u(!1),null==l||l()}),[c,l]),p=(0,e.useCallback)((()=>{c||u(!0),null==i||i()}),[c,i]),h=(0,e.useCallback)((()=>{(d?A:p)()}),[d,p,A]);return{isOpen:!!d,onOpen:p,onClose:A,onToggle:h,isControlled:c,getButtonProps:(e={})=>({...e,"aria-expanded":d,"aria-controls":f,onClick:Wr(e.onClick,h)}),getDisclosureProps:(e={})=>({...e,hidden:!d,id:f})}}var Iy=Ag("div");Iy.displayName="Box";var jy=gg((function(e,t){const{size:r,centerContent:n=!0,...o}=e,a=n?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return(0,Ne.jsx)(Iy,{ref:t,boxSize:r,__css:{...a,flexShrink:0,flexGrow:0},...o})}));jy.displayName="Square";var qy=gg((function(e,t){const{size:r,...n}=e;return(0,Ne.jsx)(jy,{size:r,ref:t,borderRadius:"9999px",...n})}));qy.displayName="Circle";var Hy=e=>(0,Ne.jsx)(Ag.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Hy.displayName="StackItem";var Qy=Object.freeze(["base","sm","md","lg","xl","2xl"]);function Fy(e,t){return Array.isArray(e)?e.map((e=>null===e?null:t(e))):_e(e)?Object.keys(e).reduce(((r,n)=>(r[n]=t(e[n]),r)),{}):null!=e?t(e):null}function Ny(t){return e.Children.toArray(t).filter((t=>(0,e.isValidElement)(t)))}var Gy=gg(((t,r)=>{const{isInline:n,direction:o,align:a,justify:i,spacing:l="0.5rem",wrap:s,children:u,divider:c,className:d,shouldWrapChildren:f,...A}=t,p=n?"row":null!=o?o:"column",h=(0,e.useMemo)((()=>function(e){const{spacing:t,direction:r}=e,n={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":Fy(r,(e=>n[e]))}}({spacing:l,direction:p})),[l,p]),m=!!c,g=!f&&!m,v=(0,e.useMemo)((()=>{const t=Ny(u);return g?t:t.map(((r,n)=>{const o=void 0!==r.key?r.key:n,a=n+1===t.length,i=f?(0,Ne.jsx)(Hy,{children:r},o):r;if(!m)return i;const l=(0,e.cloneElement)(c,{__css:h}),s=a?null:l;return(0,Ne.jsxs)(e.Fragment,{children:[i,s]},o)}))}),[c,h,m,g,f,u]),y=Xe("chakra-stack",d);return(0,Ne.jsx)(Ag.div,{ref:r,display:"flex",alignItems:a,justifyContent:i,flexDirection:p,flexWrap:s,gap:m?void 0:l,className:y,...A,children:v})}));Gy.displayName="Stack";var Ty=gg((function(e,t){const r=Bg("Link",e),{className:n,isExternal:o,...a}=Nr(e);return(0,Ne.jsx)(Ag.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:t,className:Xe("chakra-link",n),...a,__css:r})}));Ty.displayName="Link";var Ry={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Yy(e){return null!=e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Wy(e){var t;return!!Yy(e)&&e instanceof(null!=(t=e.ownerDocument.defaultView)?t:window).HTMLElement}function Zy(e){return Yy(e)?e.ownerDocument:document}function Ky(e){return["html","body","#document"].includes(e.localName)?e.ownerDocument.body:Wy(e)&&function(e){const t=e.ownerDocument.defaultView||window,{overflow:r,overflowX:n,overflowY:o}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(r+o+n)}(e)?e:Ky(function(e){return"html"===e.localName?e:e.assignedSlot||e.parentElement||e.ownerDocument.documentElement}(e))}var Uy=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Jy={arrowShadowColor:Uy("--popper-arrow-shadow-color"),arrowSize:Uy("--popper-arrow-size","8px"),arrowSizeHalf:Uy("--popper-arrow-size-half"),arrowBg:Uy("--popper-arrow-bg"),transformOrigin:Uy("--popper-transform-origin"),arrowOffset:Uy("--popper-arrow-offset")},Vy={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Xy={scroll:!0,resize:!0};function _y(e){let t;return t="object"==typeof e?{enabled:!0,options:{...Xy,...e}}:{enabled:e,options:Xy},t}var $y={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},eb={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{tb(e)},effect:({state:e})=>()=>{tb(e)}},tb=e=>{var t;e.elements.popper.style.setProperty(Jy.transformOrigin.var,(t=e.placement,Vy[t]))},rb={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{nb(e)}},nb=e=>{var t;if(!e.placement)return;const r=ob(e.placement);if((null==(t=e.elements)?void 0:t.arrow)&&r){Object.assign(e.elements.arrow.style,{[r.property]:r.value,width:Jy.arrowSize.varRef,height:Jy.arrowSize.varRef,zIndex:-1});const t={[Jy.arrowSizeHalf.var]:`calc(${Jy.arrowSize.varRef} / 2 - 1px)`,[Jy.arrowOffset.var]:`calc(${Jy.arrowSizeHalf.varRef} * -1)`};for(const r in t)e.elements.arrow.style.setProperty(r,t[r])}},ob=e=>e.startsWith("top")?{property:"bottom",value:Jy.arrowOffset.varRef}:e.startsWith("bottom")?{property:"top",value:Jy.arrowOffset.varRef}:e.startsWith("left")?{property:"right",value:Jy.arrowOffset.varRef}:e.startsWith("right")?{property:"left",value:Jy.arrowOffset.varRef}:void 0,ab={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{ib(e)},effect:({state:e})=>()=>{ib(e)}},ib=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const r=(n=e.placement).includes("top")?"1px 1px 0px 0 var(--popper-arrow-shadow-color)":n.includes("bottom")?"-1px -1px 0px 0 var(--popper-arrow-shadow-color)":n.includes("right")?"-1px 1px 0px 0 var(--popper-arrow-shadow-color)":n.includes("left")?"1px -1px 0px 0 var(--popper-arrow-shadow-color)":void 0;var n;r&&t.style.setProperty("--popper-arrow-default-shadow",r),Object.assign(t.style,{transform:"rotate(45deg)",background:Jy.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},lb={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},sb={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function ub(...e){return t=>{e.forEach((e=>{!function(e,t){if(null!=e)if("function"!=typeof e)try{e.current=t}catch(r){throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}else e(t)}(e,t)}))}}function cb(...t){return(0,e.useMemo)((()=>ub(...t)),t)}function db(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function fb(e){return e instanceof db(e).Element||e instanceof Element}function Ab(e){return e instanceof db(e).HTMLElement||e instanceof HTMLElement}function pb(e){return"undefined"!=typeof ShadowRoot&&(e instanceof db(e).ShadowRoot||e instanceof ShadowRoot)}var hb=Math.max,mb=Math.min,gb=Math.round;function vb(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function yb(){return!/^((?!chrome|android).)*safari/i.test(vb())}function bb(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,a=1;t&&Ab(e)&&(o=e.offsetWidth>0&&gb(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&gb(n.height)/e.offsetHeight||1);var i=(fb(e)?db(e):window).visualViewport,l=!yb()&&r,s=(n.left+(l&&i?i.offsetLeft:0))/o,u=(n.top+(l&&i?i.offsetTop:0))/a,c=n.width/o,d=n.height/a;return{width:c,height:d,top:u,right:s+c,bottom:u+d,left:s,x:s,y:u}}function wb(e){var t=db(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function xb(e){return e?(e.nodeName||"").toLowerCase():null}function Bb(e){return((fb(e)?e.ownerDocument:e.document)||window.document).documentElement}function Eb(e){return bb(Bb(e)).left+wb(e).scrollLeft}function Cb(e){return db(e).getComputedStyle(e)}function Db(e){var t=Cb(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function kb(e,t,r){void 0===r&&(r=!1);var n=Ab(t),o=Ab(t)&&function(e){var t=e.getBoundingClientRect(),r=gb(t.width)/e.offsetWidth||1,n=gb(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),a=Bb(t),i=bb(e,o,r),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(n||!n&&!r)&&(("body"!==xb(t)||Db(a))&&(l=function(e){return e!==db(e)&&Ab(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:wb(e);var t}(t)),Ab(t)?((s=bb(t,!0)).x+=t.clientLeft,s.y+=t.clientTop):a&&(s.x=Eb(a))),{x:i.left+l.scrollLeft-s.x,y:i.top+l.scrollTop-s.y,width:i.width,height:i.height}}function Mb(e){var t=bb(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function Pb(e){return"html"===xb(e)?e:e.assignedSlot||e.parentNode||(pb(e)?e.host:null)||Bb(e)}function Sb(e){return["html","body","#document"].indexOf(xb(e))>=0?e.ownerDocument.body:Ab(e)&&Db(e)?e:Sb(Pb(e))}function Ob(e,t){var r;void 0===t&&(t=[]);var n=Sb(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),a=db(n),i=o?[a].concat(a.visualViewport||[],Db(n)?n:[]):n,l=t.concat(i);return o?l:l.concat(Ob(Pb(i)))}function zb(e){return["table","td","th"].indexOf(xb(e))>=0}function Lb(e){return Ab(e)&&"fixed"!==Cb(e).position?e.offsetParent:null}function Ib(e){for(var t=db(e),r=Lb(e);r&&zb(r)&&"static"===Cb(r).position;)r=Lb(r);return r&&("html"===xb(r)||"body"===xb(r)&&"static"===Cb(r).position)?t:r||function(e){var t=/firefox/i.test(vb());if(/Trident/i.test(vb())&&Ab(e)&&"fixed"===Cb(e).position)return null;var r=Pb(e);for(pb(r)&&(r=r.host);Ab(r)&&["html","body"].indexOf(xb(r))<0;){var n=Cb(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var jb="top",qb="bottom",Hb="right",Qb="left",Fb="auto",Nb=[jb,qb,Hb,Qb],Gb="start",Tb="end",Rb="viewport",Yb="popper",Wb=Nb.reduce((function(e,t){return e.concat([t+"-"+Gb,t+"-"+Tb])}),[]),Zb=[].concat(Nb,[Fb]).reduce((function(e,t){return e.concat([t,t+"-"+Gb,t+"-"+Tb])}),[]),Kb=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Ub(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||o(e)})),n}var Jb={placement:"bottom",modifiers:[],strategy:"absolute"};function Vb(){for(var e=arguments.length,t=new Array(e),r=0;r=0?"x":"y"}function nw(e){var t,r=e.reference,n=e.element,o=e.placement,a=o?ew(o):null,i=o?tw(o):null,l=r.x+r.width/2-n.width/2,s=r.y+r.height/2-n.height/2;switch(a){case jb:t={x:l,y:r.y-n.height};break;case qb:t={x:l,y:r.y+r.height};break;case Hb:t={x:r.x+r.width,y:s};break;case Qb:t={x:r.x-n.width,y:s};break;default:t={x:r.x,y:r.y}}var u=a?rw(a):null;if(null!=u){var c="y"===u?"height":"width";switch(i){case Gb:t[u]=t[u]-(r[c]/2-n[c]/2);break;case Tb:t[u]=t[u]+(r[c]/2-n[c]/2)}}return t}const ow={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=nw({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var aw={top:"auto",right:"auto",bottom:"auto",left:"auto"};function iw(e){var t,r=e.popper,n=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,l=e.position,s=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=i.x,A=void 0===f?0:f,p=i.y,h=void 0===p?0:p,m="function"==typeof c?c({x:A,y:h}):{x:A,y:h};A=m.x,h=m.y;var g=i.hasOwnProperty("x"),v=i.hasOwnProperty("y"),y=Qb,b=jb,w=window;if(u){var x=Ib(r),B="clientHeight",E="clientWidth";x===db(r)&&"static"!==Cb(x=Bb(r)).position&&"absolute"===l&&(B="scrollHeight",E="scrollWidth"),(o===jb||(o===Qb||o===Hb)&&a===Tb)&&(b=qb,h-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[B])-n.height,h*=s?1:-1),o!==Qb&&(o!==jb&&o!==qb||a!==Tb)||(y=Hb,A-=(d&&x===w&&w.visualViewport?w.visualViewport.width:x[E])-n.width,A*=s?1:-1)}var C,D=Object.assign({position:l},u&&aw),k=!0===c?function(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:gb(r*o)/o||0,y:gb(n*o)/o||0}}({x:A,y:h},db(r)):{x:A,y:h};return A=k.x,h=k.y,s?Object.assign({},D,((C={})[b]=v?"0":"",C[y]=g?"0":"",C.transform=(w.devicePixelRatio||1)<=1?"translate("+A+"px, "+h+"px)":"translate3d("+A+"px, "+h+"px, 0)",C)):Object.assign({},D,((t={})[b]=v?h+"px":"",t[y]=g?A+"px":"",t.transform="",t))}const lw={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,a=r.adaptive,i=void 0===a||a,l=r.roundOffsets,s=void 0===l||l,u={placement:ew(t.placement),variation:tw(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,iw(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,iw(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},sw={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];Ab(o)&&xb(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});Ab(n)&&xb(n)&&(Object.assign(n.style,a),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]},uw={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,a=void 0===o?[0,0]:o,i=Zb.reduce((function(e,r){return e[r]=function(e,t,r){var n=ew(e),o=[Qb,jb].indexOf(n)>=0?-1:1,a="function"==typeof r?r(Object.assign({},t,{placement:e})):r,i=a[0],l=a[1];return i=i||0,l=(l||0)*o,[Qb,Hb].indexOf(n)>=0?{x:l,y:i}:{x:i,y:l}}(r,t.rects,a),e}),{}),l=i[t.placement],s=l.x,u=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=i}};var cw={left:"right",right:"left",bottom:"top",top:"bottom"};function dw(e){return e.replace(/left|right|bottom|top/g,(function(e){return cw[e]}))}var fw={start:"end",end:"start"};function Aw(e){return e.replace(/start|end/g,(function(e){return fw[e]}))}function pw(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&pb(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function hw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function mw(e,t,r){return t===Rb?hw(function(e,t){var r=db(e),n=Bb(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;var u=yb();(u||!u&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:a,height:i,x:l+Eb(e),y:s}}(e,r)):fb(t)?function(e,t){var r=bb(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):hw(function(e){var t,r=Bb(e),n=wb(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=hb(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=hb(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-n.scrollLeft+Eb(e),s=-n.scrollTop;return"rtl"===Cb(o||r).direction&&(l+=hb(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:s}}(Bb(e)))}function gw(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function vw(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}function yw(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,a=r.strategy,i=void 0===a?e.strategy:a,l=r.boundary,s=void 0===l?"clippingParents":l,u=r.rootBoundary,c=void 0===u?Rb:u,d=r.elementContext,f=void 0===d?Yb:d,A=r.altBoundary,p=void 0!==A&&A,h=r.padding,m=void 0===h?0:h,g=gw("number"!=typeof m?m:vw(m,Nb)),v=f===Yb?"reference":Yb,y=e.rects.popper,b=e.elements[p?v:f],w=function(e,t,r,n){var o="clippingParents"===t?function(e){var t=Ob(Pb(e)),r=["absolute","fixed"].indexOf(Cb(e).position)>=0&&Ab(e)?Ib(e):e;return fb(r)?t.filter((function(e){return fb(e)&&pw(e,r)&&"body"!==xb(e)})):[]}(e):[].concat(t),a=[].concat(o,[r]),i=a[0],l=a.reduce((function(t,r){var o=mw(e,r,n);return t.top=hb(o.top,t.top),t.right=mb(o.right,t.right),t.bottom=mb(o.bottom,t.bottom),t.left=hb(o.left,t.left),t}),mw(e,i,n));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}(fb(b)?b:b.contextElement||Bb(e.elements.popper),s,c,i),x=bb(e.elements.reference),B=nw({reference:x,element:y,strategy:"absolute",placement:o}),E=hw(Object.assign({},y,B)),C=f===Yb?E:x,D={top:w.top-C.top+g.top,bottom:C.bottom-w.bottom+g.bottom,left:w.left-C.left+g.left,right:C.right-w.right+g.right},k=e.modifiersData.offset;if(f===Yb&&k){var M=k[o];Object.keys(D).forEach((function(e){var t=[Hb,qb].indexOf(e)>=0?1:-1,r=[jb,qb].indexOf(e)>=0?"y":"x";D[e]+=M[r]*t}))}return D}const bw={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,a=void 0===o||o,i=r.altAxis,l=void 0===i||i,s=r.fallbackPlacements,u=r.padding,c=r.boundary,d=r.rootBoundary,f=r.altBoundary,A=r.flipVariations,p=void 0===A||A,h=r.allowedAutoPlacements,m=t.options.placement,g=ew(m),v=s||(g!==m&&p?function(e){if(ew(e)===Fb)return[];var t=dw(e);return[Aw(e),t,Aw(t)]}(m):[dw(m)]),y=[m].concat(v).reduce((function(e,r){return e.concat(ew(r)===Fb?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,a=r.rootBoundary,i=r.padding,l=r.flipVariations,s=r.allowedAutoPlacements,u=void 0===s?Zb:s,c=tw(n),d=c?l?Wb:Wb.filter((function(e){return tw(e)===c})):Nb,f=d.filter((function(e){return u.indexOf(e)>=0}));0===f.length&&(f=d);var A=f.reduce((function(t,r){return t[r]=yw(e,{placement:r,boundary:o,rootBoundary:a,padding:i})[ew(r)],t}),{});return Object.keys(A).sort((function(e,t){return A[e]-A[t]}))}(t,{placement:r,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:h}):r)}),[]),b=t.rects.reference,w=t.rects.popper,x=new Map,B=!0,E=y[0],C=0;C=0,S=P?"width":"height",O=yw(t,{placement:D,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),z=P?M?Hb:Qb:M?qb:jb;b[S]>w[S]&&(z=dw(z));var L=dw(z),I=[];if(a&&I.push(O[k]<=0),l&&I.push(O[z]<=0,O[L]<=0),I.every((function(e){return e}))){E=D,B=!1;break}x.set(D,I)}if(B)for(var j=function(e){var t=y.find((function(t){var r=x.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},q=p?3:1;q>0&&"break"!==j(q);q--);t.placement!==E&&(t.modifiersData[n]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ww(e,t,r){return hb(e,mb(t,r))}const xw={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,a=void 0===o||o,i=r.altAxis,l=void 0!==i&&i,s=r.boundary,u=r.rootBoundary,c=r.altBoundary,d=r.padding,f=r.tether,A=void 0===f||f,p=r.tetherOffset,h=void 0===p?0:p,m=yw(t,{boundary:s,rootBoundary:u,padding:d,altBoundary:c}),g=ew(t.placement),v=tw(t.placement),y=!v,b=rw(g),w="x"===b?"y":"x",x=t.modifiersData.popperOffsets,B=t.rects.reference,E=t.rects.popper,C="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,D="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(x){if(a){var P,S="y"===b?jb:Qb,O="y"===b?qb:Hb,z="y"===b?"height":"width",L=x[b],I=L+m[S],j=L-m[O],q=A?-E[z]/2:0,H=v===Gb?B[z]:E[z],Q=v===Gb?-E[z]:-B[z],F=t.elements.arrow,N=A&&F?Mb(F):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},T=G[S],R=G[O],Y=ww(0,B[z],N[z]),W=y?B[z]/2-q-Y-T-D.mainAxis:H-Y-T-D.mainAxis,Z=y?-B[z]/2+q+Y+R+D.mainAxis:Q+Y+R+D.mainAxis,K=t.elements.arrow&&Ib(t.elements.arrow),U=K?"y"===b?K.clientTop||0:K.clientLeft||0:0,J=null!=(P=null==k?void 0:k[b])?P:0,V=L+Z-J,X=ww(A?mb(I,L+W-J-U):I,L,A?hb(j,V):j);x[b]=X,M[b]=X-L}if(l){var _,$="x"===b?jb:Qb,ee="x"===b?qb:Hb,te=x[w],re="y"===w?"height":"width",ne=te+m[$],oe=te-m[ee],ae=-1!==[jb,Qb].indexOf(g),ie=null!=(_=null==k?void 0:k[w])?_:0,le=ae?ne:te-B[re]-E[re]-ie+D.altAxis,se=ae?te+B[re]+E[re]-ie-D.altAxis:oe,ue=A&&ae?function(e,t,r){var n=ww(e,t,r);return n>r?r:n}(le,te,se):ww(A?le:ne,te,A?se:oe);x[w]=ue,M[w]=ue-te}t.modifiersData[n]=M}},requiresIfExists:["offset"]},Bw={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,a=r.elements.arrow,i=r.modifiersData.popperOffsets,l=ew(r.placement),s=rw(l),u=[Qb,Hb].indexOf(l)>=0?"height":"width";if(a&&i){var c=function(e,t){return gw("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:vw(e,Nb))}(o.padding,r),d=Mb(a),f="y"===s?jb:Qb,A="y"===s?qb:Hb,p=r.rects.reference[u]+r.rects.reference[s]-i[s]-r.rects.popper[u],h=i[s]-r.rects.reference[s],m=Ib(a),g=m?"y"===s?m.clientHeight||0:m.clientWidth||0:0,v=p/2-h/2,y=c[f],b=g-d[u]-c[A],w=g/2-d[u]/2+v,x=ww(y,w,b),B=s;r.modifiersData[n]=((t={})[B]=x,t.centerOffset=x-w,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&pw(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ew(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Cw(e){return[jb,Hb,qb,Qb].some((function(t){return e[t]>=0}))}const Dw={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=yw(t,{elementContext:"reference"}),l=yw(t,{altBoundary:!0}),s=Ew(i,n),u=Ew(l,o,a),c=Cw(s),d=Cw(u);t.modifiersData[r]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}};var kw=Xb({defaultModifiers:[$b,ow,lw,sw,uw,bw,xw,Bw,Dw]});function Mw(t={}){const{enabled:r=!0,modifiers:n,placement:o="bottom",strategy:a="absolute",arrowPadding:i=8,eventListeners:l=!0,offset:s,gutter:u=8,flip:c=!0,boundary:d="clippingParents",preventOverflow:f=!0,matchWidth:A,direction:p="ltr"}=t,h=(0,e.useRef)(null),m=(0,e.useRef)(null),g=(0,e.useRef)(null),v=function(e,t="ltr"){var r,n;const o=(null==(r=lb[e])?void 0:r[t])||e;return"ltr"===t?o:null!=(n=sb[e])?n:o}(o,p),y=(0,e.useRef)((()=>{})),b=(0,e.useCallback)((()=>{var e;r&&h.current&&m.current&&(null==(e=y.current)||e.call(y),g.current=kw(h.current,m.current,{placement:v,modifiers:[ab,rb,eb,{...$y,enabled:!!A},{name:"eventListeners",..._y(l)},{name:"arrow",options:{padding:i}},{name:"offset",options:{offset:null!=s?s:[0,u]}},{name:"flip",enabled:!!c,options:{padding:8}},{name:"preventOverflow",enabled:!!f,options:{boundary:d}},...null!=n?n:[]],strategy:a}),g.current.forceUpdate(),y.current=g.current.destroy)}),[v,r,n,A,l,i,s,u,c,f,d,a]);(0,e.useEffect)((()=>()=>{var e;h.current||m.current||(null==(e=g.current)||e.destroy(),g.current=null)}),[]);const w=(0,e.useCallback)((e=>{h.current=e,b()}),[b]),x=(0,e.useCallback)(((e={},t=null)=>({...e,ref:ub(w,t)})),[w]),B=(0,e.useCallback)((e=>{m.current=e,b()}),[b]),E=(0,e.useCallback)(((e={},t=null)=>({...e,ref:ub(B,t),style:{...e.style,position:a,minWidth:A?void 0:"max-content",inset:"0 auto auto 0"}})),[a,B,A]),C=(0,e.useCallback)(((e={},t=null)=>{const{size:r,shadowColor:n,bg:o,style:a,...i}=e;return{...i,ref:t,"data-popper-arrow":"",style:Pw(e)}}),[]),D=(0,e.useCallback)(((e={},t=null)=>({...e,ref:t,"data-popper-arrow-inner":""})),[]);return{update(){var e;null==(e=g.current)||e.update()},forceUpdate(){var e;null==(e=g.current)||e.forceUpdate()},transformOrigin:Jy.transformOrigin.varRef,referenceRef:w,popperRef:B,getPopperProps:E,getArrowProps:C,getArrowInnerProps:D,getReferenceProps:x}}function Pw(e){const{size:t,shadowColor:r,bg:n,style:o}=e,a={...o,position:"absolute"};return t&&(a["--popper-arrow-size"]=t),r&&(a["--popper-arrow-shadow-color"]=r),n&&(a["--popper-arrow-bg"]=n),a}function Sw(t={}){const{onClose:r,onOpen:n,isOpen:o,id:a}=t,i=Mu(n),l=Mu(r),[s,u]=(0,e.useState)(t.defaultIsOpen||!1),c=void 0!==o?o:s,d=void 0!==o,f=(0,e.useId)(),A=null!=a?a:`disclosure-${f}`,p=(0,e.useCallback)((()=>{d||u(!1),null==l||l()}),[d,l]),h=(0,e.useCallback)((()=>{d||u(!0),null==i||i()}),[d,i]),m=(0,e.useCallback)((()=>{c?p():h()}),[c,h,p]);return{isOpen:c,onOpen:h,onClose:p,onToggle:m,isControlled:d,getButtonProps:function(e={}){return{...e,"aria-expanded":c,"aria-controls":A,onClick(t){var r;null==(r=e.onClick)||r.call(e,t),m()}}},getDisclosureProps:function(e={}){return{...e,hidden:!c,id:A}}}}function Ow(t,r,n,o){const a=Mu(n);return(0,e.useEffect)((()=>{const e="function"==typeof t?t():null!=t?t:document;if(n&&e)return e.addEventListener(r,a,o),()=>{e.removeEventListener(r,a,o)}}),[r,t,o,a,n]),()=>{const e="function"==typeof t?t():null!=t?t:document;null==e||e.removeEventListener(r,a,o)}}var zw=e=>{var t;return(null==(t=e.current)?void 0:t.ownerDocument)||document},Lw=e=>{var t,r;return(null==(r=null==(t=e.current)?void 0:t.ownerDocument)?void 0:r.defaultView)||window};function Iw(t={}){const{openDelay:r=0,closeDelay:n=0,closeOnClick:o=!0,closeOnMouseDown:a,closeOnScroll:i,closeOnPointerDown:l=a,closeOnEsc:s=!0,onOpen:u,onClose:c,placement:d,id:f,isOpen:A,defaultIsOpen:p,arrowSize:h=10,arrowShadowColor:m,arrowPadding:g,modifiers:v,isDisabled:y,gutter:b,offset:w,direction:x,...B}=t,{isOpen:E,onOpen:C,onClose:D}=Sw({isOpen:A,defaultIsOpen:p,onOpen:u,onClose:c}),{referenceRef:k,getPopperProps:M,getArrowInnerProps:P,getArrowProps:S}=Mw({enabled:E,placement:d,arrowPadding:g,modifiers:v,gutter:b,offset:w,direction:x}),O=(0,e.useId)(),z=`tooltip-${null!=f?f:O}`,L=(0,e.useRef)(null),I=(0,e.useRef)(),j=(0,e.useCallback)((()=>{I.current&&(clearTimeout(I.current),I.current=void 0)}),[]),q=(0,e.useRef)(),H=(0,e.useCallback)((()=>{q.current&&(clearTimeout(q.current),q.current=void 0)}),[]),Q=(0,e.useCallback)((()=>{H(),D()}),[D,H]),F=function(t,r){return(0,e.useEffect)((()=>{const e=zw(t);return e.addEventListener(jw,r),()=>e.removeEventListener(jw,r)}),[r,t]),()=>{const e=zw(t),r=Lw(t);e.dispatchEvent(new r.CustomEvent(jw))}}(L,Q),N=(0,e.useCallback)((()=>{if(!y&&!I.current){E&&F();const e=Lw(L);I.current=e.setTimeout(C,r)}}),[F,y,E,C,r]),G=(0,e.useCallback)((()=>{j();const e=Lw(L);q.current=e.setTimeout(Q,n)}),[n,Q,j]),T=(0,e.useCallback)((()=>{E&&o&&G()}),[o,G,E]),R=(0,e.useCallback)((()=>{E&&l&&G()}),[l,G,E]),Y=(0,e.useCallback)((e=>{E&&"Escape"===e.key&&G()}),[E,G]);Ow((()=>zw(L)),"keydown",s?Y:void 0),Ow((()=>{if(!i)return null;const e=L.current;if(!e)return null;const t=Ky(e);return"body"===t.localName?Lw(L):t}),"scroll",(()=>{E&&i&&Q()}),{passive:!0,capture:!0}),(0,e.useEffect)((()=>{y&&(j(),E&&D())}),[y,E,D,j]),(0,e.useEffect)((()=>()=>{j(),H()}),[j,H]),Ow((()=>L.current),"pointerleave",G);const W=(0,e.useCallback)(((e={},t=null)=>({...e,ref:ub(L,t,k),onPointerEnter:ot(e.onPointerEnter,(e=>{"touch"!==e.pointerType&&N()})),onClick:ot(e.onClick,T),onPointerDown:ot(e.onPointerDown,R),onFocus:ot(e.onFocus,N),onBlur:ot(e.onBlur,G),"aria-describedby":E?z:void 0})),[N,G,R,E,z,T,k]),Z=(0,e.useCallback)(((e={},t=null)=>M({...e,style:{...e.style,[Jy.arrowSize.var]:h?`${h}px`:void 0,[Jy.arrowShadowColor.var]:m}},t)),[M,h,m]),K=(0,e.useCallback)(((e={},t=null)=>{const r={...e.style,position:"relative",transformOrigin:Jy.transformOrigin.varRef};return{ref:t,...B,...e,id:z,role:"tooltip",style:r}}),[B,z]);return{isOpen:E,show:N,hide:G,getTriggerProps:W,getTooltipProps:K,getTooltipPositionerProps:Z,getArrowProps:S,getArrowInnerProps:P}}var jw="chakra-ui:close-tooltip",qw=Ag($m.div),Hw=gg(((t,r)=>{var n,o;const a=Bg("Tooltip",t),i=Nr(t),l=vg(),{children:s,label:u,shouldWrapChildren:c,"aria-label":d,hasArrow:f,bg:A,portalProps:p,background:h,backgroundColor:m,bgColor:g,motionProps:v,...y}=i,b=null!=(o=null!=(n=null!=h?h:m)?n:A)?o:g;if(b){a.bg=b;const e=function(e,t,r){var n,o,a;return null!=(a=null==(o=null==(n=e.__cssMap)?void 0:n[`colors.${r}`])?void 0:o.varRef)?a:r}(l,0,b);a[Jy.arrowBg.var]=e}const w=Iw({...y,direction:l.direction});let x;if("string"==typeof s||c)x=(0,Ne.jsx)(Ag.span,{display:"inline-block",tabIndex:0,...w.getTriggerProps(),children:s});else{const t=e.Children.only(s);x=(0,e.cloneElement)(t,w.getTriggerProps(t.props,t.ref))}const B=!!d,E=w.getTooltipProps({},r),C=B?function(e,t=[]){const r=Object.assign({},e);for(const e of t)e in r&&delete r[e];return r}(E,["role","id"]):E,D=function(e){const t={};for(const r of["role","id"])r in e&&(t[r]=e[r]);return t}(E);return u?(0,Ne.jsxs)(Ne.Fragment,{children:[x,(0,Ne.jsx)(Vg,{children:w.isOpen&&(0,Ne.jsx)(av,{...p,children:(0,Ne.jsx)(Ag.div,{...w.getTooltipPositionerProps(),__css:{zIndex:a.zIndex,pointerEvents:"none"},children:(0,Ne.jsxs)(qw,{variants:Ry,initial:"exit",animate:"enter",exit:"exit",...v,...C,__css:a,children:[u,B&&(0,Ne.jsx)(Ag.span,{srOnly:!0,...D,children:d}),f&&(0,Ne.jsx)(Ag.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:(0,Ne.jsx)(Ag.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:a.bg}})})]})})})})]}):(0,Ne.jsx)(Ne.Fragment,{children:s})}));Hw.displayName="Tooltip";var[Qw,Fw]=We({name:"TagStylesContext",errorMessage:"useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),Nw=gg(((e,t)=>{const r=Eg("Tag",e),n=Nr(e),o={display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%",...r.container};return(0,Ne.jsx)(Qw,{value:r,children:(0,Ne.jsx)(Ag.span,{ref:t,...n,__css:o})})}));Nw.displayName="Tag";var Gw=gg(((e,t)=>{const r=Fw();return(0,Ne.jsx)(Ag.span,{ref:t,noOfLines:1,...e,__css:r.label})}));Gw.displayName="TagLabel",gg(((e,t)=>(0,Ne.jsx)(Dg,{ref:t,verticalAlign:"top",marginEnd:"0.5rem",...e}))).displayName="TagLeftIcon",gg(((e,t)=>(0,Ne.jsx)(Dg,{ref:t,verticalAlign:"top",marginStart:"0.5rem",...e}))).displayName="TagRightIcon";var Tw=e=>(0,Ne.jsx)(Dg,{verticalAlign:"inherit",viewBox:"0 0 512 512",...e,children:(0,Ne.jsx)("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})});Tw.displayName="TagCloseIcon",gg(((e,t)=>{const{isDisabled:r,children:n,...o}=e,a={display:"flex",alignItems:"center",justifyContent:"center",outline:"0",...Fw().closeButton};return(0,Ne.jsx)(Ag.button,{ref:t,"aria-label":"close",...o,type:"button",disabled:r,__css:a,children:n||(0,Ne.jsx)(Tw,{})})})).displayName="TagCloseButton";var Rw=Ag("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Rw.displayName="Center";var Yw={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}},Ww=(gg((function(e,t){const{axis:r="both",...n}=e;return(0,Ne.jsx)(Ag.div,{ref:t,__css:Yw[r],...n,position:"absolute"})})),gg((function(e,t){const{borderLeftWidth:r,borderBottomWidth:n,borderTopWidth:o,borderRightWidth:a,borderWidth:i,borderStyle:l,borderColor:s,...u}=Bg("Divider",e),{className:c,orientation:d="horizontal",__css:f,...A}=Nr(e),p={vertical:{borderLeftWidth:r||a||i||"1px",height:"100%"},horizontal:{borderBottomWidth:n||o||i||"1px",width:"100%"}};return(0,Ne.jsx)(Ag.hr,{ref:t,"aria-orientation":d,...A,__css:{...u,border:"0",borderColor:s,borderStyle:l,...p[d],...f},className:Xe("chakra-divider",c)})})));Ww.displayName="Divider";var[Zw,Kw]=We({strict:!1,name:"ButtonGroupContext"});function Uw(t){const{children:r,className:n,...o}=t,a=(0,e.isValidElement)(r)?(0,e.cloneElement)(r,{"aria-hidden":!0,focusable:!1}):r,i=Xe("chakra-button__icon",n);return(0,Ne.jsx)(Ag.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...o,className:i,children:a})}function Jw(t){const{label:r,placement:n,spacing:o="0.5rem",children:a=(0,Ne.jsx)(Pg,{color:"currentColor",width:"1em",height:"1em"}),className:i,__css:l,...s}=t,u=Xe("chakra-button__spinner",i),c="start"===n?"marginEnd":"marginStart",d=(0,e.useMemo)((()=>({display:"flex",alignItems:"center",position:r?"relative":"absolute",[c]:r?o:0,fontSize:"1em",lineHeight:"normal",...l})),[l,r,c,o]);return(0,Ne.jsx)(Ag.div,{className:u,...s,__css:d,children:a})}Uw.displayName="ButtonIcon",Jw.displayName="ButtonSpinner";var Vw=gg(((t,r)=>{const n=Kw(),o=Bg("Button",{...n,...t}),{isDisabled:a=(null==n?void 0:n.isDisabled),isLoading:i,isActive:l,children:s,leftIcon:u,rightIcon:c,loadingText:d,iconSpacing:f="0.5rem",type:A,spinner:p,spinnerPlacement:h="start",className:m,as:g,...v}=Nr(t),y=(0,e.useMemo)((()=>{const e={...null==o?void 0:o._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...o,...!!n&&{_focus:e}}}),[o,n]),{ref:b,type:w}=function(t){const[r,n]=(0,e.useState)(!t),o=(0,e.useCallback)((e=>{e&&n("BUTTON"===e.tagName)}),[]);return{ref:o,type:r?"button":void 0}}(g),x={rightIcon:c,leftIcon:u,iconSpacing:f,children:s};return(0,Ne.jsxs)(Ag.button,{ref:cb(r,b),as:g,type:null!=A?A:w,"data-active":rt(l),"data-loading":rt(i),__css:y,className:Xe("chakra-button",m),...v,disabled:a||i,children:[i&&"start"===h&&(0,Ne.jsx)(Jw,{className:"chakra-button__spinner--start",label:d,placement:"start",spacing:f,children:p}),i?d||(0,Ne.jsx)(Ag.span,{opacity:0,children:(0,Ne.jsx)(Xw,{...x})}):(0,Ne.jsx)(Xw,{...x}),i&&"end"===h&&(0,Ne.jsx)(Jw,{className:"chakra-button__spinner--end",label:d,placement:"end",spacing:f,children:p})]})}));function Xw(e){const{leftIcon:t,rightIcon:r,children:n,iconSpacing:o}=e;return(0,Ne.jsxs)(Ne.Fragment,{children:[t&&(0,Ne.jsx)(Uw,{marginEnd:o,children:t}),n,r&&(0,Ne.jsx)(Uw,{marginStart:o,children:r})]})}Vw.displayName="Button";var _w=gg((function(e,t){const{htmlWidth:r,htmlHeight:n,alt:o,...a}=e;return(0,Ne.jsx)("img",{width:r,height:n,ref:t,alt:o,...a})}));function $w(e,t=[]){const r=Object.assign({},e);for(const e of t)e in r&&delete r[e];return r}_w.displayName="NativeImage";var ex=gg((function(t,r){const{fallbackSrc:n,fallback:o,src:a,srcSet:i,align:l,fit:s,loading:u,ignoreFallback:c,crossOrigin:d,fallbackStrategy:f="beforeLoadOrError",referrerPolicy:A,...p}=t,h=null!=u||c||!(void 0!==n||void 0!==o),m=function(t){const{loading:r,src:n,srcSet:o,onLoad:a,onError:i,crossOrigin:l,sizes:s,ignoreFallback:u}=t,[c,d]=(0,e.useState)("pending");(0,e.useEffect)((()=>{d(n?"loading":"pending")}),[n]);const f=(0,e.useRef)(),A=(0,e.useCallback)((()=>{if(!n)return;p();const e=new Image;e.src=n,l&&(e.crossOrigin=l),o&&(e.srcset=o),s&&(e.sizes=s),r&&(e.loading=r),e.onload=e=>{p(),d("loaded"),null==a||a(e)},e.onerror=e=>{p(),d("failed"),null==i||i(e)},f.current=e}),[n,l,o,s,a,i,r]),p=()=>{f.current&&(f.current.onload=null,f.current.onerror=null,f.current=null)};return rn((()=>{if(!u)return"loading"===c&&A(),()=>{p()}}),[c,A,u]),u?"loaded":c}({...t,crossOrigin:d,ignoreFallback:h}),g=((e,t)=>"loaded"!==e&&"beforeLoadOrError"===t||"failed"===e&&"onError"===t)(m,f),v={ref:r,objectFit:s,objectPosition:l,...h?p:$w(p,["onError","onLoad"])};return g?o||(0,Ne.jsx)(Ag.img,{as:_w,className:"chakra-image__placeholder",src:n,...v}):(0,Ne.jsx)(Ag.img,{as:_w,src:a,srcSet:i,crossOrigin:d,loading:u,referrerPolicy:A,className:"chakra-image",...v})}));ex.displayName="Image";var tx=Object.defineProperty,rx=new class{constructor(){((e,t,r)=>{((e,t,r)=>{t in e?tx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r)})(this,"modals"),this.modals=new Map}add(e){return this.modals.set(e,this.modals.size+1),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return!!e&&this.modals.get(e)===this.modals.size}};function nx(t,r){const[n,o]=(0,e.useState)(0);return(0,e.useEffect)((()=>{const e=t.current;if(e){if(r){const t=rx.add(e);o(t)}return()=>{rx.remove(e),o(0)}}}),[r,t]),n}var ox=new WeakMap,ax=new WeakMap,ix={},lx=0,sx=function(e){return e&&(e.host||sx(e.parentNode))},ux=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),function(e,t,r,n){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=sx(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);ix[r]||(ix[r]=new WeakMap);var a=ix[r],i=[],l=new Set,s=new Set(o),u=function(e){e&&!l.has(e)&&(l.add(e),u(e.parentNode))};o.forEach(u);var c=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(l.has(e))c(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,s=(ox.get(e)||0)+1,u=(a.get(e)||0)+1;ox.set(e,s),a.set(e,u),i.push(e),1===s&&o&&ax.set(e,!0),1===u&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return c(t),l.clear(),lx++,function(){i.forEach((function(e){var t=ox.get(e)-1,o=a.get(e)-1;ox.set(e,t),a.set(e,o),t||(ax.has(e)||e.removeAttribute(n),ax.delete(e)),o||e.removeAttribute(r)})),--lx||(ox=new WeakMap,ox=new WeakMap,ax=new WeakMap,ix={})}}(n,o,r,"aria-hidden")):function(){return null}};function cx(t){const{isOpen:r,onClose:n,id:o,closeOnOverlayClick:a=!0,closeOnEsc:i=!0,useInert:l=!0,onOverlayClick:s,onEsc:u}=t,c=(0,e.useRef)(null),d=(0,e.useRef)(null),[f,A,p]=function(t,...r){const n=(0,e.useId)(),o=t||n;return(0,e.useMemo)((()=>r.map((e=>`${e}-${o}`))),[o,r])}(o,"chakra-modal","chakra-modal--header","chakra-modal--body");!function(t,r){const n=t.current;(0,e.useEffect)((()=>{if(t.current&&r)return ux(t.current)}),[r,t,n])}(c,r&&l);const h=nx(c,r),m=(0,e.useRef)(null),g=(0,e.useCallback)((e=>{m.current=e.target}),[]),v=(0,e.useCallback)((e=>{"Escape"===e.key&&(e.stopPropagation(),i&&(null==n||n()),null==u||u())}),[i,n,u]),[y,b]=(0,e.useState)(!1),[w,x]=(0,e.useState)(!1),B=(0,e.useCallback)(((e={},t=null)=>({role:"dialog",...e,ref:ub(t,c),id:f,tabIndex:-1,"aria-modal":!0,"aria-labelledby":y?A:void 0,"aria-describedby":w?p:void 0,onClick:ot(e.onClick,(e=>e.stopPropagation()))})),[p,w,f,A,y]),E=(0,e.useCallback)((e=>{e.stopPropagation(),m.current===e.target&&rx.isTopModal(c.current)&&(a&&(null==n||n()),null==s||s())}),[n,a,s]),C=(0,e.useCallback)(((e={},t=null)=>({...e,ref:ub(t,d),onClick:ot(e.onClick,E),onKeyDown:ot(e.onKeyDown,v),onMouseDown:ot(e.onMouseDown,g)})),[v,g,E]);return{isOpen:r,onClose:n,headerId:A,bodyId:p,setBodyMounted:x,setHeaderMounted:b,dialogRef:c,overlayRef:d,getDialogProps:B,getDialogContainerProps:C,index:h}}var[dx,fx]=We({name:"ModalStylesContext",errorMessage:"useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),[Ax,px]=We({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),hx=e=>{const t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0,...e},{portalProps:r,children:n,autoFocus:o,trapFocus:a,initialFocusRef:i,finalFocusRef:l,returnFocusOnClose:s,blockScrollOnMount:u,allowPinchZoom:c,preserveScrollBarGap:d,motionPreset:f,lockFocusAcrossFrames:A,onCloseComplete:p}=t,h=Eg("Modal",t),m={...cx(t),autoFocus:o,trapFocus:a,initialFocusRef:i,finalFocusRef:l,returnFocusOnClose:s,blockScrollOnMount:u,allowPinchZoom:c,preserveScrollBarGap:d,motionPreset:f,lockFocusAcrossFrames:A};return(0,Ne.jsx)(Ax,{value:m,children:(0,Ne.jsx)(dx,{value:h,children:(0,Ne.jsx)(Vg,{onExitComplete:p,children:m.isOpen&&(0,Ne.jsx)(av,{...r,children:n})})})})};hx.displayName="Modal";var[mx,gx]=We(),vx={start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}};function yx(e){var t;const{isOpen:r,onClose:n,placement:o="right",children:a,...i}=e,l=vg(),s=null==(t=l.components)?void 0:t.Drawer,u=function(e,t){var r,n;if(e)return null!=(n=null==(r=vx[e])?void 0:r[t])?n:e}(o,l.direction);return(0,Ne.jsx)(mx,{value:{placement:u},children:(0,Ne.jsx)(hx,{isOpen:r,onClose:n,styleConfig:s,...i,children:a})})}var bx={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},wx={position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},xx={position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},Bx={position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},Ex={position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}};function Cx(e){var t;switch(null!=(t=null==e?void 0:e.direction)?t:"right"){case"right":default:return xx;case"left":return wx;case"bottom":return Ex;case"top":return Bx}}var Dx={enter:{duration:.2,ease:bx.easeOut},exit:{duration:.1,ease:bx.easeIn}},kx=(e,t)=>({...e,delay:"number"==typeof t?t:null==t?void 0:t.enter}),Mx=(e,t)=>({...e,delay:"number"==typeof t?t:null==t?void 0:t.exit}),Px={enter:({transition:e,transitionEnd:t,delay:r}={})=>{var n;return{opacity:1,transition:null!=(n=null==e?void 0:e.enter)?n:kx(Dx.enter,r),transitionEnd:null==t?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:r}={})=>{var n;return{opacity:0,transition:null!=(n=null==e?void 0:e.exit)?n:Mx(Dx.exit,r),transitionEnd:null==t?void 0:t.exit}}},Sx={initial:"exit",animate:"enter",exit:"exit",variants:Px},Ox=(0,e.forwardRef)((function(e,t){const{unmountOnExit:r,in:n,className:o,transition:a,transitionEnd:i,delay:l,...s}=e,u=n||r?"enter":"exit",c=!r||n&&r,d={transition:a,transitionEnd:i,delay:l};return(0,Ne.jsx)(Vg,{custom:d,children:c&&(0,Ne.jsx)($m.div,{ref:t,className:Xe("chakra-fade",o),custom:d,...Sx,animate:u,...s})})}));Ox.displayName="Fade";var zx=Ag($m.div),Lx=gg(((e,t)=>{const{className:r,transition:n,motionProps:o,...a}=e,i=Xe("chakra-modal__overlay",r),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...fx().overlay},{motionPreset:s}=px(),u=o||("none"===s?{}:Sx);return(0,Ne.jsx)(zx,{...u,__css:l,ref:t,className:i,...a})}));Lx.displayName="ModalOverlay";var Ix="data-focus-lock",jx="data-focus-lock-disabled";function qx(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Hx="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,Qx=new WeakMap;function Fx(t,r){var n,o,a,i=(n=r||null,o=function(e){return t.forEach((function(t){return qx(t,e)}))},(a=(0,e.useState)((function(){return{value:n,callback:o,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}}))[0]).callback=o,a.facade);return Hx((function(){var e=Qx.get(i);if(e){var r=new Set(e),n=new Set(t),o=i.current;r.forEach((function(e){n.has(e)||qx(e,null)})),n.forEach((function(e){r.has(e)||qx(e,o)}))}Qx.set(i,t)}),[t]),i}var Nx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Gx(e){return e}function Tx(e,t){void 0===t&&(t=Gx);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var a=function(){var r=t;t=[],r.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),r={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),r}}}};return o}function Rx(e,t){return void 0===t&&(t=Gx),Tx(e,t)}function Yx(e){void 0===e&&(e={});var t=Tx(null);return t.options=Qu({async:!0,ssr:!1},e),t}var Wx=Rx({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),Zx=Rx(),Kx=Rx(),Ux=Yx({async:!0,ssr:"undefined"!=typeof document}),Jx=(0,e.createContext)(void 0),Vx=[],Xx=(0,e.forwardRef)((function(r,n){var o,a=(0,e.useState)(),i=a[0],l=a[1],s=(0,e.useRef)(),u=(0,e.useRef)(!1),c=(0,e.useRef)(null),d=(0,e.useState)({})[1],f=r.children,A=r.disabled,p=void 0!==A&&A,h=r.noFocusGuards,m=void 0!==h&&h,g=r.persistentFocus,v=void 0!==g&&g,y=r.crossFrame,b=void 0===y||y,w=r.autoFocus,x=void 0===w||w,B=(r.allowTextSelection,r.group),E=r.className,C=r.whiteList,D=r.hasPositiveIndices,k=r.shards,M=void 0===k?Vx:k,P=r.as,S=void 0===P?"div":P,O=r.lockProps,z=void 0===O?{}:O,L=r.sideCar,I=r.returnFocus,j=void 0!==I&&I,q=r.focusOptions,H=r.onActivation,Q=r.onDeactivation,F=(0,e.useState)({})[0],N=(0,e.useCallback)((function(e){var t=e.captureFocusRestore;if(!c.current){var r,n=null==(r=document)?void 0:r.activeElement;c.current=n,n!==document.body&&(c.current=t(n))}s.current&&H&&H(s.current),u.current=!0,d()}),[H]),G=(0,e.useCallback)((function(){u.current=!1,Q&&Q(s.current),d()}),[Q]),T=(0,e.useCallback)((function(e){var t=c.current;if(t){var r=("function"==typeof t?t():t)||document.body,n="function"==typeof j?j(r):j;if(n){var o="object"==typeof n?n:void 0;c.current=null,e?Promise.resolve().then((function(){return r.focus(o)})):r.focus(o)}}}),[j]),R=(0,e.useCallback)((function(e){u.current&&Wx.useMedium(e)}),[]),Y=Zx.useMedium,W=(0,e.useCallback)((function(e){s.current!==e&&(s.current=e,l(e))}),[]),Z=ae(((o={})[jx]=p&&"disabled",o[Ix]=B,o),z),K=!0!==m,U=K&&"tail"!==m,J=Fx([n,W]),V=(0,e.useMemo)((function(){return{observed:s,shards:M,enabled:!p,active:u.current}}),[p,u.current,M,i]);return t().createElement(e.Fragment,null,K&&[t().createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:p?-1:0,style:Nx}),D?t().createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:p?-1:1,style:Nx}):null],!p&&t().createElement(L,{id:F,sideCar:Ux,observed:i,disabled:p,persistentFocus:v,crossFrame:b,autoFocus:x,whiteList:C,shards:M,onActivation:N,onDeactivation:G,returnFocus:T,focusOptions:q,noFocusGuards:m}),t().createElement(S,ae({ref:J},Z,{className:E,onBlur:Y,onFocus:R}),t().createElement(Jx.Provider,{value:V},f)),U&&t().createElement("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:Nx}))}));Xx.propTypes={};const _x=Xx;function $x(e,t){return $x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$x(e,t)}function eB(e){return eB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eB(e)}var tB=function(e){for(var t=Array(e.length),r=0;r=0})).sort(hB)},gB=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),vB="".concat(gB,", [data-focus-guard]"),yB=function(e,t){return tB((e.shadowRoot||e).children).reduce((function(e,r){return e.concat(r.matches(t?vB:gB)?[r]:[],yB(r))}),[])},bB=function(e,t){return e.reduce((function(e,r){var n,o=yB(r,t),a=(n=[]).concat.apply(n,o.map((function(e){return function(e,t){var r;return e instanceof HTMLIFrameElement&&(null===(r=e.contentDocument)||void 0===r?void 0:r.body)?bB([e.contentDocument.body],t):[e]}(e,t)})));return e.concat(a,r.parentNode?tB(r.parentNode.querySelectorAll(gB)).filter((function(e){return e===r})):[])}),[])},wB=function(e,t){return tB(e).filter((function(e){return iB(t,e)})).filter((function(e){return function(e){return!((uB(e)||function(e){return"BUTTON"===e.tagName}(e))&&("hidden"===e.type||e.disabled))}(e)}))},xB=function(e,t){return void 0===t&&(t=new Map),tB(e).filter((function(e){return lB(t,e)}))},BB=function(e,t,r){return mB(wB(bB(e,r),t),!0,r)},EB=function(e,t){return mB(wB(bB(e),t),!1)},CB=function(e,t){return e.shadowRoot?CB(e.shadowRoot,t):!(void 0===Object.getPrototypeOf(e).contains||!Object.getPrototypeOf(e).contains.call(e,t))||tB(e.children).some((function(e){var r;if(e instanceof HTMLIFrameElement){var n=null===(r=e.contentDocument)||void 0===r?void 0:r.body;return!!n&&CB(n,t)}return CB(e,t)}))},DB=function(e){if(void 0===e&&(e=document),e&&e.activeElement){var t=e.activeElement;return t.shadowRoot?DB(t.shadowRoot):t instanceof HTMLIFrameElement&&function(){try{return t.contentWindow.document}catch(e){return}}()?DB(t.contentWindow.document):t}},kB=function(e){return e.parentNode?kB(e.parentNode):e},MB=function(e){return rB(e).filter(Boolean).reduce((function(e,t){var r=t.getAttribute(Ix);return e.push.apply(e,r?function(e){for(var t=new Set,r=e.length,n=0;n0&&t.add(o),(a&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(n)}return e.filter((function(e,r){return!t.has(r)}))}(tB(kB(t).querySelectorAll("[".concat(Ix,'="').concat(r,'"]:not([').concat(jx,'="disabled"])')))):[t]),e}),[])},PB=function(e,t){return void 0===t&&(t=DB(nB(e).ownerDocument)),!(!t||t.dataset&&t.dataset.focusGuard)&&MB(e).some((function(e){return CB(e,t)||function(e,t){return Boolean(tB(e.querySelectorAll("iframe")).some((function(e){return function(e,t){return e===t}(e,t)})))}(e,t)}))},SB=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},OB=function(e,t){return cB(e)&&e.name?function(e,t){return t.filter(cB).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e},zB=function(e){return e[0]&&e.length>1?OB(e[0],e):e[0]},LB=function(e,t){return e.indexOf(OB(t,e))},IB="NEW_FOCUS",jB=function(e,t,r){var n,o=e.map((function(e){return e.node})),a=xB(o.filter((n=r,function(e){var t,r=null===(t=sB(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==r&&"false"!==r||n.indexOf(e)>=0})));return a&&a.length?zB(a):zB(xB(t))},qB=function(e,t){return void 0===t&&(t=[]),t.push(e),e.parentNode&&qB(e.parentNode.host||e.parentNode,t),t},HB=function(e,t){for(var r=qB(e),n=qB(t),o=0;o=0)return a}return!1},QB=function(e,t,r){var n=rB(e),o=rB(t),a=n[0],i=!1;return o.filter(Boolean).forEach((function(e){i=HB(i||e,e)||i,r.filter(Boolean).forEach((function(e){var t=HB(a,e);t&&(i=!i||CB(t,i)?t:HB(t,i))}))})),i},FB=function(e,t){return e.reduce((function(e,r){return e.concat(function(e,t){return wB((r=e.querySelectorAll("[".concat("data-autofocus-inside","]")),tB(r).map((function(e){return bB([e])})).reduce((function(e,t){return e.concat(t)}),[])),t);var r}(r,t))}),[])},NB=function(e,t){var r=DB(rB(e).length>0?document:nB(e).ownerDocument),n=MB(e).filter(AB),o=QB(r||e,e,n),a=new Map,i=EB(n,a),l=i.filter((function(e){var t=e.node;return AB(t)}));if(l[0]){var s,u,c,d=EB([o],a).map((function(e){return e.node})),f=(s=d,u=l,c=new Map,u.forEach((function(e){return c.set(e.node,e)})),s.map((function(e){return c.get(e)})).filter(pB)),A=f.map((function(e){return e.node})),p=f.filter((function(e){return e.tabIndex>=0})).map((function(e){return e.node})),h=function(e,t,r,n,o){var a=e.length,i=e[0],l=e[a-1],s=fB(n);if(!(n&&e.indexOf(n)>=0)){var u=void 0!==n?r.indexOf(n):-1,c=o?r.indexOf(o):u,d=o?e.indexOf(o):-1;if(-1===u)return-1!==d?d:IB;if(-1===d)return IB;var f,A,p=u-c,h=r.indexOf(i),m=r.indexOf(l),g=(f=r,A=new Set,f.forEach((function(e){return A.add(OB(e,f))})),f.filter((function(e){return A.has(e)}))),v=void 0!==n?g.indexOf(n):-1,y=o?g.indexOf(o):v,b=g.filter((function(e){return e.tabIndex>=0})),w=void 0!==n?b.indexOf(n):-1,x=o?b.indexOf(o):w,B=w>=0&&x>=0?x-w:y-v;if(!p&&d>=0)return d;if(0===t.length)return d;var E=LB(e,t[0]),C=LB(e,t[t.length-1]);return u<=h&&s&&Math.abs(p)>1?C:u>=m&&s&&Math.abs(p)>1?E:p&&Math.abs(B)>1?d:u<=h?C:u>m?E:p?Math.abs(p)>1?d:(a+d+p)%a:void 0}}(A,p,d,r,t);if(h===IB){var m=jB(i,p,FB(n,a))||jB(i,A,FB(n,a));return m?{node:m}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===h?h:f[h]}},GB=0,TB=!1,RB=function(e,t,r){void 0===r&&(r={});var n=NB(e,t);if(!TB&&n){if(GB>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),TB=!0,void setTimeout((function(){TB=!1}),1);GB++,SB(n.node,r.focusOptions),GB--}};function YB(e){if(!e)return null;if("undefined"==typeof WeakRef)return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return(null==t?void 0:t.deref())||null}}var WB=function(e){var t=function(e){if(!e)return null;for(var t=[],r=e;r&&r!==document.body;)t.push({current:YB(r),parent:YB(r.parentElement),left:YB(r.previousElementSibling),right:YB(r.nextElementSibling)}),r=r.parentElement;return{element:YB(e),stack:t,ownerDocument:e.ownerDocument}}(e);return function(){return function(e){var t,r,n,o,a;if(e)for(var i=e.stack,l=e.ownerDocument,s=new Map,u=0,c=i;u=0,guard:fB(t)}}))),w=b.map((function(e){return e.node})).indexOf(y);w>-1&&(b.filter((function(e){var t=e.guard,r=e.node;return t&&r.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),oE(w,b.length,1,b),oE(w,-1,-1,b))}}}return i},sE=function(e){lE()&&e&&(e.stopPropagation(),e.preventDefault())},uE=function(){return UB(lE)},cE=function(){rE=!0},dE=function(){rE=!1,tE="just",UB((function(){tE="meanwhile"}))},fE={moveFocusInside:RB,focusInside:PB,focusNextElement:function(e,t){void 0===t&&(t={}),ZB(e,t,(function(e,t){var r=e.next,n=e.first;return r||t&&n}))},focusPrevElement:function(e,t){void 0===t&&(t={}),ZB(e,t,(function(e,t){var r=e.prev,n=e.last;return r||t&&n}))},focusFirstElement:function(e,t){void 0===t&&(t={}),KB(e,t,"first")},focusLastElement:function(e,t){void 0===t&&(t={}),KB(e,t,"last")},captureFocusRestore:WB};Wx.assignSyncMedium((function(e){var t=e.target,r=e.currentTarget;r.contains(t)||(eE={observerNode:r,portaledElement:t})})),Zx.assignMedium(uE),Kx.assignMedium((function(e){return e(fE)}));const AE=(pE=function(e){return e.filter((function(e){return!e.disabled}))},hE=function(e){var t=e.slice(-1)[0];t&&!XB&&(document.addEventListener("focusin",sE),document.addEventListener("focusout",uE),window.addEventListener("focus",cE),window.addEventListener("blur",dE));var r=XB,n=r&&t&&t.id===r.id;XB=t,r&&!n&&(r.onDeactivation(),e.filter((function(e){return e.id===r.id})).length||r.returnFocus(!t)),t?(_B=null,n&&r.observed===t.observed||t.onActivation(fE),lE(),UB(lE)):(document.removeEventListener("focusin",sE),document.removeEventListener("focusout",uE),window.removeEventListener("focus",cE),window.removeEventListener("blur",dE),_B=null)},function(r){var n,o=[];function a(){n=pE(o.map((function(e){return e.props}))),hE(n)}var i=function(e){function i(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$x(e,t)}(i,e),i.peek=function(){return n};var l=i.prototype;return l.componentDidMount=function(){o.push(this),a()},l.componentDidUpdate=function(){a()},l.componentWillUnmount=function(){var e=o.indexOf(this);o.splice(e,1),a()},l.render=function(){return t().createElement(r,this.props)},i}(e.PureComponent);return function(e,t,r){(t=function(e){var t=function(e){if("object"!=eB(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=eB(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eB(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(i,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),i})((function(){return null}));var pE,hE,mE=(0,e.forwardRef)((function(e,r){return t().createElement(_x,ae({sideCar:AE,ref:r},e))})),gE=_x.propTypes||{};gE.sideCar,function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}}(gE,["sideCar"]),mE.propTypes={};const vE=mE;var yE=e=>e.hasAttribute("tabindex");function bE(e){return!(!e.parentElement||!bE(e.parentElement))||e.hidden}function wE(e){if(!Wy(e)||bE(e)||function(e){return!0===Boolean(e.getAttribute("disabled"))||!0===Boolean(e.getAttribute("aria-disabled"))}(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():!!function(e){const t=e.getAttribute("contenteditable");return"false"!==t&&null!=t}(e)||yE(e)}var xE,BE=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"].join();var EE=null!=(xE=vE.default)?xE:vE,CE=t=>{const{initialFocusRef:r,finalFocusRef:n,contentRef:o,restoreFocus:a,children:i,isDisabled:l,autoFocus:s,persistentFocus:u,lockFocusAcrossFrames:c}=t,d=(0,e.useCallback)((()=>{(null==r?void 0:r.current)?r.current.focus():(null==o?void 0:o.current)&&0===function(e){const t=Array.from(e.querySelectorAll(BE));return t.unshift(e),t.filter((e=>wE(e)&&(e=>e.offsetWidth>0&&e.offsetHeight>0)(e)))}(o.current).length&&requestAnimationFrame((()=>{var e;null==(e=o.current)||e.focus()}))}),[r,o]),f=(0,e.useCallback)((()=>{var e;null==(e=null==n?void 0:n.current)||e.focus()}),[n]),A=a&&!n;return(0,Ne.jsx)(EE,{crossFrame:c,persistentFocus:u,autoFocus:s,disabled:l,onActivation:d,onDeactivation:f,returnFocus:A,children:i})};CE.displayName="FocusLock";var DE="right-scroll-bar-position",kE="width-before-scroll-bar",ME=Yx(),PE=function(){},SE=e.forwardRef((function(t,r){var n=e.useRef(null),o=e.useState({onScrollCapture:PE,onWheelCapture:PE,onTouchMoveCapture:PE}),a=o[0],i=o[1],l=t.forwardProps,s=t.children,u=t.className,c=t.removeScrollBar,d=t.enabled,f=t.shards,A=t.sideCar,p=t.noIsolation,h=t.inert,m=t.allowPinchZoom,g=t.as,v=void 0===g?"div":g,y=t.gapMode,b=Fu(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=A,x=Fx([n,r]),B=Qu(Qu({},b),a);return e.createElement(e.Fragment,null,d&&e.createElement(w,{sideCar:ME,removeScrollBar:c,shards:f,noIsolation:p,inert:h,setCallbacks:i,allowPinchZoom:!!m,lockRef:n,gapMode:y}),l?e.cloneElement(e.Children.only(s),Qu(Qu({},B),{ref:x})):e.createElement(v,Qu({},B,{className:u,ref:x}),s))}));SE.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},SE.classNames={fullWidth:kE,zeroRight:DE};var OE=function(t){var r=t.sideCar,n=Fu(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,Qu({},n))};OE.isSideCarExport=!0;var zE=function(){var e=0,t=null;return{add:function(r){var n;0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=i.nc;return t&&e.setAttribute("nonce",t),e}())&&(function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,r),n=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(n)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},LE=function(){var t,r=(t=zE(),function(r,n){e.useEffect((function(){return t.add(r),function(){t.remove()}}),[r&&n])});return function(e){var t=e.styles,n=e.dynamic;return r(t,n),null}},IE={left:0,top:0,right:0,gap:0},jE=function(e){return parseInt(e||"",10)||0},qE=LE(),HE="data-scroll-locked",QE=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(HE,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(DE," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(kE," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(DE," .").concat(DE," {\n right: 0 ").concat(n,";\n }\n \n .").concat(kE," .").concat(kE," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(HE,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},FE=function(){var e=parseInt(document.body.getAttribute(HE)||"0",10);return isFinite(e)?e:0},NE=function(t){var r=t.noRelative,n=t.noImportant,o=t.gapMode,a=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(HE,(FE()+1).toString()),function(){var e=FE()-1;e<=0?document.body.removeAttribute(HE):document.body.setAttribute(HE,e.toString())}}),[]);var i=e.useMemo((function(){return function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return IE;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[jE(r),jE(n),jE(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}}(a)}),[a]);return e.createElement(qE,{styles:QE(i,!r,a,n?"":"!important")})},GE=!1;if("undefined"!=typeof window)try{var TE=Object.defineProperty({},"passive",{get:function(){return GE=!0,!0}});window.addEventListener("test",TE,TE),window.removeEventListener("test",TE,TE)}catch(e){GE=!1}var RE=!!GE&&{passive:!1},YE=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},WE=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),ZE(e,n)){var o=KE(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ZE=function(e,t){return"v"===e?function(e){return YE(e,"overflowY")}(t):function(e){return YE(e,"overflowX")}(t)},KE=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},UE=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},JE=function(e){return[e.deltaX,e.deltaY]},VE=function(e){return e&&"current"in e?e.current:e},XE=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},_E=0,$E=[];function eC(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const tC=(rC=function(t){var r=e.useRef([]),n=e.useRef([0,0]),o=e.useRef(),a=e.useState(_E++)[0],i=e.useState(LE)[0],l=e.useRef(t);e.useEffect((function(){l.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(a));var e=Gu([t.lockRef.current],(t.shards||[]).map(VE),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var r,a=UE(e),i=n.current,s="deltaX"in e?e.deltaX:i[0]-a[0],u="deltaY"in e?e.deltaY:i[1]-a[1],c=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=WE(d,c);if(!f)return!0;if(f?r=d:(r="v"===d?"h":"v",f=WE(d,c)),!f)return!1;if(!o.current&&"changedTouches"in e&&(s||u)&&(o.current=r),!r)return!0;var A=o.current||r;return function(e,t,r,n){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*n,i=r.target,l=t.contains(i),s=!1,u=a>0,c=0,d=0;do{var f=KE(e,i),A=f[0],p=f[1]-f[2]-o*A;(A||p)&&ZE(e,i)&&(c+=p,d+=A),i=i instanceof ShadowRoot?i.host:i.parentNode}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(u&&(Math.abs(c)<1||!1)||!u&&(Math.abs(d)<1||!1))&&(s=!0),s}(A,t,e,"h"===A?s:u)}),[]),u=e.useCallback((function(e){var t=e;if($E.length&&$E[$E.length-1]===i){var n="deltaY"in t?JE(t):UE(t),o=r.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(r=e.delta,o=n,r[0]===o[0]&&r[1]===o[1]);var r,o}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var a=(l.current.shards||[]).map(VE).filter(Boolean).filter((function(e){return e.contains(t.target)}));(a.length>0?s(t,a[0]):!l.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),c=e.useCallback((function(e,t,n,o){var a={name:e,delta:t,target:n,should:o,shadowParent:eC(n)};r.current.push(a),setTimeout((function(){r.current=r.current.filter((function(e){return e!==a}))}),1)}),[]),d=e.useCallback((function(e){n.current=UE(e),o.current=void 0}),[]),f=e.useCallback((function(e){c(e.type,JE(e),e.target,s(e,t.lockRef.current))}),[]),A=e.useCallback((function(e){c(e.type,UE(e),e.target,s(e,t.lockRef.current))}),[]);e.useEffect((function(){return $E.push(i),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:A}),document.addEventListener("wheel",u,RE),document.addEventListener("touchmove",u,RE),document.addEventListener("touchstart",d,RE),function(){$E=$E.filter((function(e){return e!==i})),document.removeEventListener("wheel",u,RE),document.removeEventListener("touchmove",u,RE),document.removeEventListener("touchstart",d,RE)}}),[]);var p=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(i,{styles:XE(a)}):null,p?e.createElement(NE,{gapMode:t.gapMode}):null)},ME.useMedium(rC),OE);var rC,nC=e.forwardRef((function(t,r){return e.createElement(SE,Qu({},t,{ref:r,sideCar:tC}))}));nC.classNames=SE.classNames;const oC=nC;function aC(t){const{autoFocus:r,trapFocus:n,dialogRef:o,initialFocusRef:a,blockScrollOnMount:i,allowPinchZoom:l,finalFocusRef:s,returnFocusOnClose:u,preserveScrollBarGap:c,lockFocusAcrossFrames:d,isOpen:f}=px(),[A,p]=zu();(0,e.useEffect)((()=>{!A&&p&&setTimeout(p)}),[A,p]);const h=nx(o,f);return(0,Ne.jsx)(CE,{autoFocus:r,isDisabled:!n,initialFocusRef:a,finalFocusRef:s,restoreFocus:u,contentRef:o,lockFocusAcrossFrames:d,children:(0,Ne.jsx)(oC,{removeScrollBar:!c,allowPinchZoom:l,enabled:1===h&&i,forwardProps:!0,children:t.children})})}var iC={exit:{duration:.15,ease:bx.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},lC={exit:({direction:e,transition:t,transitionEnd:r,delay:n})=>{var o;const{exit:a}=Cx({direction:e});return{...a,transition:null!=(o=null==t?void 0:t.exit)?o:Mx(iC.exit,n),transitionEnd:null==r?void 0:r.exit}},enter:({direction:e,transitionEnd:t,transition:r,delay:n})=>{var o;const{enter:a}=Cx({direction:e});return{...a,transition:null!=(o=null==r?void 0:r.enter)?o:kx(iC.enter,n),transitionEnd:null==t?void 0:t.enter}}},sC=(0,e.forwardRef)((function(e,t){const{direction:r="right",style:n,unmountOnExit:o,in:a,className:i,transition:l,transitionEnd:s,delay:u,motionProps:c,...d}=e,f=Cx({direction:r}),A=Object.assign({position:"fixed"},f.position,n),p=!o||a&&o,h=a||o?"enter":"exit",m={transitionEnd:s,transition:l,direction:r,delay:u};return(0,Ne.jsx)(Vg,{custom:m,children:p&&(0,Ne.jsx)($m.div,{...d,ref:t,initial:"exit",className:Xe("chakra-slide",i),animate:h,exit:"exit",custom:m,variants:lC,style:A,...c})})}));sC.displayName="Slide";var uC=Ag(sC),cC=gg(((e,t)=>{const{className:r,children:n,motionProps:o,containerProps:a,...i}=e,{getDialogProps:l,getDialogContainerProps:s,isOpen:u}=px(),c=l(i,t),d=s(a),f=Xe("chakra-modal__content",r),A=fx(),p={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...A.dialog},h={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...A.dialogContainer},{placement:m}=gx();return(0,Ne.jsx)(aC,{children:(0,Ne.jsx)(Ag.div,{...d,className:"chakra-modal__content-container",__css:h,children:(0,Ne.jsx)(uC,{motionProps:o,direction:m,in:u,className:f,...c,__css:p,children:n})})})}));cC.displayName="DrawerContent";var dC=gg(((e,t)=>{const{onClick:r,className:n,...o}=e,{onClose:a}=px(),i=Xe("chakra-modal__close-btn",n),l=fx();return(0,Ne.jsx)(Ng,{ref:t,__css:l.closeButton,className:i,onClick:ot(r,(e=>{e.stopPropagation(),a()})),...o})}));dC.displayName="ModalCloseButton";var fC=gg(((t,r)=>{const{className:n,...o}=t,{headerId:a,setHeaderMounted:i}=px();(0,e.useEffect)((()=>(i(!0),()=>i(!1))),[i]);const l=Xe("chakra-modal__header",n),s={flex:0,...fx().header};return(0,Ne.jsx)(Ag.header,{ref:r,className:l,id:a,...o,__css:s})}));fC.displayName="ModalHeader";var AC=gg(((t,r)=>{const{className:n,...o}=t,{bodyId:a,setBodyMounted:i}=px();(0,e.useEffect)((()=>(i(!0),()=>i(!1))),[i]);const l=Xe("chakra-modal__body",n),s=fx();return(0,Ne.jsx)(Ag.div,{ref:r,className:l,id:a,...o,__css:s.body})}));AC.displayName="ModalBody";var pC=i(7604),hC=i.n(pC);const mC=function(e,t){var r,n,o=0;function a(){var a,i,l=r,s=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(i=0;i":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},yC=["(","?"],bC={")":["("],":":["?","?:"]},wC=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var xC={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,r){if(e)throw t;return r}};var BC={contextDelimiter:"",onMissingKey:null};function EC(e,t){var r;for(r in this.data=e,this.pluralForms={},this.options={},BC)this.options[r]=void 0!==t&&r in t?t[r]:BC[r]}EC.prototype.getPluralForm=function(e,t){var r,n,o,a,i=this.pluralForms[e];return i||("function"!=typeof(o=(r=this.data[e][""])["Plural-Forms"]||r["plural-forms"]||r.plural_forms)&&(n=function(e){var t,r,n;for(t=e.split(";"),r=0;r=0||vC[o]1===e?0:1},DC=/^i18n\.(n?gettext|has_translation)(_|$)/,kC=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)},MC=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)},PC=function(e,t){return function(r,n,o,a=10){const i=e[t];if(!MC(r))return;if(!kC(n))return;if("function"!=typeof o)return void console.error("The hook callback must be a function.");if("number"!=typeof a)return void console.error("If specified, the hook priority must be a number.");const l={callback:o,priority:a,namespace:n};if(i[r]){const e=i[r].handlers;let t;for(t=e.length;t>0&&!(a>=e[t-1].priority);t--);t===e.length?e[t]=l:e.splice(t,0,l),i.__current.forEach((e=>{e.name===r&&e.currentIndex>=t&&e.currentIndex++}))}else i[r]={handlers:[l],runs:0};"hookAdded"!==r&&e.doAction("hookAdded",r,n,o,a)}},SC=function(e,t,r=!1){return function(n,o){const a=e[t];if(!MC(n))return;if(!r&&!kC(o))return;if(!a[n])return 0;let i=0;if(r)i=a[n].handlers.length,a[n]={runs:a[n].runs,handlers:[]};else{const e=a[n].handlers;for(let t=e.length-1;t>=0;t--)e[t].namespace===o&&(e.splice(t,1),i++,a.__current.forEach((e=>{e.name===n&&e.currentIndex>=t&&e.currentIndex--})))}return"hookRemoved"!==n&&e.doAction("hookRemoved",n,o),i}},OC=function(e,t){return function(r,n){const o=e[t];return void 0!==n?r in o&&o[r].handlers.some((e=>e.namespace===n)):r in o}},zC=function(e,t,r=!1){return function(n,...o){const a=e[t];a[n]||(a[n]={handlers:[],runs:0}),a[n].runs++;const i=a[n].handlers;if(!i||!i.length)return r?o[0]:void 0;const l={name:n,currentIndex:0};for(a.__current.push(l);l.currentIndex{const n=new EC({}),o=new Set,a=()=>{o.forEach((e=>e()))},i=(e,t="default")=>{n.data[t]={...n.data[t],...e},n.data[t][""]={...CC,...n.data[t]?.[""]},delete n.pluralForms[t]},l=(e,t)=>{i(e,t),a()},s=(e="default",t,r,o,a)=>(n.data[e]||i(void 0,e),n.dcnpgettext(e,t,r,o,a)),u=(e="default")=>e,c=(e,t,n)=>{let o=s(n,t,e);return r?(o=r.applyFilters("i18n.gettext_with_context",o,e,t,n),r.applyFilters("i18n.gettext_with_context_"+u(n),o,e,t,n)):o};if(r){const e=e=>{DC.test(e)&&a()};r.addAction("hookAdded","core/i18n",e),r.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:(e="default")=>n.data[e],setLocaleData:l,addLocaleData:(e,t="default")=>{n.data[t]={...n.data[t],...e,"":{...CC,...n.data[t]?.[""],...e?.[""]}},delete n.pluralForms[t],a()},resetLocaleData:(e,t)=>{n.data={},n.pluralForms={},l(e,t)},subscribe:e=>(o.add(e),()=>o.delete(e)),__:(e,t)=>{let n=s(t,void 0,e);return r?(n=r.applyFilters("i18n.gettext",n,e,t),r.applyFilters("i18n.gettext_"+u(t),n,e,t)):n},_x:c,_n:(e,t,n,o)=>{let a=s(o,void 0,e,t,n);return r?(a=r.applyFilters("i18n.ngettext",a,e,t,n,o),r.applyFilters("i18n.ngettext_"+u(o),a,e,t,n,o)):a},_nx:(e,t,n,o,a)=>{let i=s(a,o,e,t,n);return r?(i=r.applyFilters("i18n.ngettext_with_context",i,e,t,n,o,a),r.applyFilters("i18n.ngettext_with_context_"+u(a),i,e,t,n,o,a)):i},isRTL:()=>"rtl"===c("ltr","text direction"),hasTranslation:(e,t,o)=>{const a=t?t+""+e:e;let i=!!n.data?.[null!=o?o:"default"]?.[a];return r&&(i=r.applyFilters("i18n.has_translation",i,e,t,o),i=r.applyFilters("i18n.has_translation_"+u(o),i,e,t,o)),i}}})(0,0,HC),nD=(rD.getLocaleData.bind(rD),rD.setLocaleData.bind(rD),rD.resetLocaleData.bind(rD),rD.subscribe.bind(rD),rD.__.bind(rD));function oD(e){return function(e){if(Array.isArray(e))return aD(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return aD(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?aD(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aD(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r(0,Ne.jsx)(Gy,{align:"center",...e,direction:"row",ref:t})));function mk(e){const t=e.target,{tagName:r,isContentEditable:n}=t;return"INPUT"!==r&&"TEXTAREA"!==r&&!0!==n}function gk(t={}){const{ref:r,isDisabled:n,isFocusable:o,clickOnEnter:a=!0,clickOnSpace:i=!0,onMouseDown:l,onMouseUp:s,onClick:u,onKeyDown:c,onKeyUp:d,tabIndex:f,onMouseOver:A,onMouseLeave:p,...h}=t,[m,g]=(0,e.useState)(!0),[v,y]=(0,e.useState)(!1),b=function(){const t=(0,e.useRef)(new Map),r=t.current,n=(0,e.useCallback)(((e,r,n,o)=>{t.current.set(n,{type:r,el:e,options:o}),e.addEventListener(r,n,o)}),[]),o=(0,e.useCallback)(((e,r,n,o)=>{e.removeEventListener(r,n,o),t.current.delete(n)}),[]);return(0,e.useEffect)((()=>()=>{r.forEach(((e,t)=>{o(e.el,e.type,t,e.options)}))}),[o,r]),{add:n,remove:o}}(),w=m?f:f||0,x=n&&!o,B=(0,e.useCallback)((e=>{if(n)return e.stopPropagation(),void e.preventDefault();e.currentTarget.focus(),null==u||u(e)}),[n,u]),E=(0,e.useCallback)((e=>{v&&mk(e)&&(e.preventDefault(),e.stopPropagation(),y(!1),b.remove(document,"keyup",E,!1))}),[v,b]),C=(0,e.useCallback)((e=>{if(null==c||c(e),n||e.defaultPrevented||e.metaKey)return;if(!mk(e.nativeEvent)||m)return;const t=a&&"Enter"===e.key;i&&" "===e.key&&(e.preventDefault(),y(!0)),t&&(e.preventDefault(),e.currentTarget.click()),b.add(document,"keyup",E,!1)}),[n,m,c,a,i,b,E]),D=(0,e.useCallback)((e=>{null==d||d(e),n||e.defaultPrevented||e.metaKey||mk(e.nativeEvent)&&!m&&i&&" "===e.key&&(e.preventDefault(),y(!1),e.currentTarget.click())}),[i,m,n,d]),k=(0,e.useCallback)((e=>{0===e.button&&(y(!1),b.remove(document,"mouseup",k,!1))}),[b]),M=(0,e.useCallback)((e=>{if(0===e.button){if(n)return e.stopPropagation(),void e.preventDefault();m||y(!0),e.currentTarget.focus({preventScroll:!0}),b.add(document,"mouseup",k,!1),null==l||l(e)}}),[n,m,l,b,k]),P=(0,e.useCallback)((e=>{0===e.button&&(m||y(!1),null==s||s(e))}),[s,m]),S=(0,e.useCallback)((e=>{n?e.preventDefault():null==A||A(e)}),[n,A]),O=(0,e.useCallback)((e=>{v&&(e.preventDefault(),y(!1)),null==p||p(e)}),[v,p]),z=ub(r,(e=>{e&&"BUTTON"!==e.tagName&&g(!1)}));return m?{...h,ref:z,type:"button","aria-disabled":x?void 0:n,disabled:x,onClick:B,onMouseDown:l,onMouseUp:s,onKeyUp:d,onKeyDown:c,onMouseOver:A,onMouseLeave:p}:{...h,ref:z,role:"button","data-active":rt(v),"aria-disabled":n?"true":void 0,tabIndex:x?void 0:w,onClick:B,onMouseDown:M,onMouseUp:P,onKeyUp:D,onKeyDown:C,onMouseOver:S,onMouseLeave:O}}hk.displayName="HStack";var vk=Object.defineProperty,yk=(e,t,r)=>(((e,t,r)=>{t in e?vk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);function bk(e){return e.sort(((e,t)=>{const r=e.compareDocumentPosition(t);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0}))}function wk(e,t,r){let n=e+1;return r&&n>=t&&(n=0),n}function xk(e,t,r){let n=e-1;return r&&n<0&&(n=t),n}var Bk="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,Ek=class{constructor(){yk(this,"descendants",new Map),yk(this,"register",(e=>{var t;if(null!=e)return"object"==typeof(t=e)&&"nodeType"in t&&t.nodeType===Node.ELEMENT_NODE?this.registerNode(e):t=>{this.registerNode(t,e)}})),yk(this,"unregister",(e=>{this.descendants.delete(e);const t=bk(Array.from(this.descendants.keys()));this.assignIndex(t)})),yk(this,"destroy",(()=>{this.descendants.clear()})),yk(this,"assignIndex",(e=>{this.descendants.forEach((t=>{const r=e.indexOf(t.node);t.index=r,t.node.dataset.index=t.index.toString()}))})),yk(this,"count",(()=>this.descendants.size)),yk(this,"enabledCount",(()=>this.enabledValues().length)),yk(this,"values",(()=>Array.from(this.descendants.values()).sort(((e,t)=>e.index-t.index)))),yk(this,"enabledValues",(()=>this.values().filter((e=>!e.disabled)))),yk(this,"item",(e=>{if(0!==this.count())return this.values()[e]})),yk(this,"enabledItem",(e=>{if(0!==this.enabledCount())return this.enabledValues()[e]})),yk(this,"first",(()=>this.item(0))),yk(this,"firstEnabled",(()=>this.enabledItem(0))),yk(this,"last",(()=>this.item(this.descendants.size-1))),yk(this,"lastEnabled",(()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)})),yk(this,"indexOf",(e=>{var t,r;return e&&null!=(r=null==(t=this.descendants.get(e))?void 0:t.index)?r:-1})),yk(this,"enabledIndexOf",(e=>null==e?-1:this.enabledValues().findIndex((t=>t.node.isSameNode(e))))),yk(this,"next",((e,t=!0)=>{const r=wk(e,this.count(),t);return this.item(r)})),yk(this,"nextEnabled",((e,t=!0)=>{const r=this.item(e);if(!r)return;const n=wk(this.enabledIndexOf(r.node),this.enabledCount(),t);return this.enabledItem(n)})),yk(this,"prev",((e,t=!0)=>{const r=xk(e,this.count()-1,t);return this.item(r)})),yk(this,"prevEnabled",((e,t=!0)=>{const r=this.item(e);if(!r)return;const n=xk(this.enabledIndexOf(r.node),this.enabledCount()-1,t);return this.enabledItem(n)})),yk(this,"registerNode",((e,t)=>{if(!e||this.descendants.has(e))return;const r=bk(Array.from(this.descendants.keys()).concat(e));(null==t?void 0:t.disabled)&&(t.disabled=!!t.disabled);const n={node:e,index:-1,...t};this.descendants.set(e,n),this.assignIndex(r)}))}},[Ck,Dk]=We({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function kk(){return[Ck,()=>Dk(),()=>function(){const t=(0,e.useRef)(new Ek);return Bk((()=>()=>t.current.destroy())),t.current}(),t=>function(t){const r=Dk(),[n,o]=(0,e.useState)(-1),a=(0,e.useRef)(null);Bk((()=>()=>{a.current&&r.unregister(a.current)}),[]),Bk((()=>{if(!a.current)return;const e=Number(a.current.dataset.index);n==e||Number.isNaN(e)||o(e)}));const i=t?r.register(t):r.register;return{descendants:r,index:n,enabledIndex:r.enabledIndexOf(a.current),register:ub(i,a)}}(t)]}function Mk(e){const t=e.current;if(!t)return!1;const r=function(e){return Zy(e).activeElement}(t);return!(!r||t.contains(r)||(n=r,!(n&&Wy(n)&&wE(n))||(e=>yE(e)&&-1===e.tabIndex)(n)));var n}function Pk(e,t){var r;const n=e.target;return!(n&&!Sk(n).contains(n))&&!(null==(r=t.current)?void 0:r.contains(n))}function Sk(e){var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document}function Ok(e){const{wasSelected:t,enabled:r,isSelected:n,mode:o="unmount"}=e;return!r||!!n||!("keepMounted"!==o||!t)}var[zk,Lk,Ik,jk]=kk(),[qk,Hk]=We({strict:!1,name:"MenuContext"});function Qk(e){var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document}function Fk(e){return Qk(e).activeElement===e}function Nk(t={}){const{id:r,closeOnSelect:n=!0,closeOnBlur:o=!0,initialFocusRef:a,autoSelect:i=!0,isLazy:l,isOpen:s,defaultIsOpen:u,onClose:c,onOpen:d,placement:f="bottom-start",lazyBehavior:A="unmount",direction:p,computePositionOnMount:h=!1,...m}=t,g=(0,e.useRef)(null),v=(0,e.useRef)(null),y=Ik(),b=(0,e.useCallback)((()=>{requestAnimationFrame((()=>{var e;null==(e=g.current)||e.focus({preventScroll:!1})}))}),[]),w=(0,e.useCallback)((()=>{const e=setTimeout((()=>{var e;if(a)null==(e=a.current)||e.focus();else{const e=y.firstEnabled();e&&S(e.index)}}));j.current.add(e)}),[y,a]),x=(0,e.useCallback)((()=>{const e=setTimeout((()=>{const e=y.lastEnabled();e&&S(e.index)}));j.current.add(e)}),[y]),B=(0,e.useCallback)((()=>{null==d||d(),i?w():b()}),[i,w,b,d]),{isOpen:E,onOpen:C,onClose:D,onToggle:k}=Sw({isOpen:s,defaultIsOpen:u,onClose:c,onOpen:B});!function(t){const{ref:r,handler:n,enabled:o=!0}=t,a=Mu(n),i=(0,e.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;(0,e.useEffect)((()=>{if(!o)return;const e=e=>{Pk(e,r)&&(i.isPointerDown=!0)},t=e=>{i.ignoreEmulatedMouseEvents?i.ignoreEmulatedMouseEvents=!1:i.isPointerDown&&n&&Pk(e,r)&&(i.isPointerDown=!1,a(e))},l=e=>{i.ignoreEmulatedMouseEvents=!0,n&&i.isPointerDown&&Pk(e,r)&&(i.isPointerDown=!1,a(e))},s=Sk(r.current);return s.addEventListener("mousedown",e,!0),s.addEventListener("mouseup",t,!0),s.addEventListener("touchstart",e,!0),s.addEventListener("touchend",l,!0),()=>{s.removeEventListener("mousedown",e,!0),s.removeEventListener("mouseup",t,!0),s.removeEventListener("touchstart",e,!0),s.removeEventListener("touchend",l,!0)}}),[n,r,a,i,o])}({enabled:E&&o,ref:g,handler:e=>{var t;(null==(t=v.current)?void 0:t.contains(e.target))||D()}});const M=Mw({...m,enabled:E||h,placement:f,direction:p}),[P,S]=(0,e.useState)(-1);Pu((()=>{E||S(-1)}),[E]),function(e,t){const{shouldFocus:r,visible:n,focusRef:o}=t,a=r&&!n;Pu((()=>{if(!a)return;if(Mk(e))return;const t=(null==o?void 0:o.current)||e.current;let r;return t?(r=requestAnimationFrame((()=>{t.focus({preventScroll:!0})})),()=>{cancelAnimationFrame(r)}):void 0}),[a,e,o])}(g,{focusRef:v,visible:E,shouldFocus:!0});const O=function(t){const{isOpen:r,ref:n}=t,[o,a]=(0,e.useState)(r),[i,l]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{i||(a(r),l(!0))}),[r,i,o]),Ow((()=>n.current),"animationend",(()=>{a(r)})),{present:!(!r&&!o),onComplete(){var e;const t=function(e){var t,r;return null!=(r=null==(t=Zy(e))?void 0:t.defaultView)?r:window}(n.current),r=new t.CustomEvent("animationend",{bubbles:!0});null==(e=n.current)||e.dispatchEvent(r)}}}({isOpen:E,ref:g}),[z,L]=function(t,...r){const n=(0,e.useId)(),o=t||n;return(0,e.useMemo)((()=>r.map((e=>`${e}-${o}`))),[o,r])}(r,"menu-button","menu-list"),I=(0,e.useCallback)((()=>{C(),b()}),[C,b]),j=(0,e.useRef)(new Set([]));(0,e.useEffect)((()=>{const e=j.current;return()=>{e.forEach((e=>clearTimeout(e))),e.clear()}}),[]);const q=(0,e.useCallback)((()=>{C(),w()}),[w,C]),H=(0,e.useCallback)((()=>{C(),x()}),[C,x]),Q=(0,e.useCallback)((()=>{var e,t;const r=Qk(g.current),n=null==(e=g.current)?void 0:e.contains(r.activeElement);if(!E||n)return;const o=null==(t=y.item(P))?void 0:t.node;null==o||o.focus({preventScroll:!0})}),[E,P,y]),F=(0,e.useRef)(null);return{openAndFocusMenu:I,openAndFocusFirstItem:q,openAndFocusLastItem:H,onTransitionEnd:Q,unstable__animationState:O,descendants:y,popper:M,buttonId:z,menuId:L,forceUpdate:M.forceUpdate,orientation:"vertical",isOpen:E,onToggle:k,onOpen:C,onClose:D,menuRef:g,buttonRef:v,focusedIndex:P,closeOnSelect:n,closeOnBlur:o,autoSelect:i,setFocusedIndex:S,isLazy:l,lazyBehavior:A,initialFocusRef:a,rafId:F}}function Gk(e){var t;return function(e){var t;if(!function(e){return null!=e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}(e))return!1;return e instanceof(null!=(t=e.ownerDocument.defaultView)?t:window).HTMLElement}(e)&&!!(null==(t=null==e?void 0:e.getAttribute("role"))?void 0:t.startsWith("menuitem"))}var[Tk,Rk]=We({name:"MenuStylesContext",errorMessage:"useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),Yk=t=>{const{children:r}=t,n=Eg("Menu",t),o=Nr(t),{direction:a}=vg(),{descendants:i,...l}=Nk({...o,direction:a}),s=(0,e.useMemo)((()=>l),[l]),{isOpen:u,onClose:c,forceUpdate:d}=s;return(0,Ne.jsx)(zk,{value:i,children:(0,Ne.jsx)(qk,{value:s,children:(0,Ne.jsx)(Tk,{value:n,children:et(r,{isOpen:u,onClose:c,forceUpdate:d})})})})};Yk.displayName="Menu";var Wk=gg(((e,t)=>{const r=Rk();return(0,Ne.jsx)(Ag.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...r.button}})})),Zk=gg(((t,r)=>{const{children:n,as:o,...a}=t,i=function(t={},r=null){const n=Hk(),{onToggle:o,popper:a,openAndFocusFirstItem:i,openAndFocusLastItem:l}=n,s=(0,e.useCallback)((e=>{const t=e.key,r={Enter:i,ArrowDown:i,ArrowUp:l}[t];r&&(e.preventDefault(),e.stopPropagation(),r(e))}),[i,l]);return{...t,ref:ub(n.buttonRef,r,a.referenceRef),id:n.buttonId,"data-active":rt(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:ot(t.onClick,o),onKeyDown:ot(t.onKeyDown,s)}}(a,r),l=o||Wk;return(0,Ne.jsx)(l,{...i,className:Xe("chakra-menu__menu-button",t.className),children:(0,Ne.jsx)(Ag.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:t.children})})}));Zk.displayName="MenuButton";var Kk=gg(((t,r)=>{const{icon:n,children:o,isRound:a,"aria-label":i,...l}=t,s=n||o,u=(0,e.isValidElement)(s)?(0,e.cloneElement)(s,{"aria-hidden":!0,focusable:!1}):null;return(0,Ne.jsx)(Vw,{padding:"0",borderRadius:a?"full":void 0,ref:r,"aria-label":i,...l,children:u})}));Kk.displayName="IconButton";var Uk={enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.1,easings:"easeOut"}}},Jk=Ag($m.div),Vk=gg((function(t,r){var n,o;const{rootProps:a,motionProps:i,...l}=t,{isOpen:s,onTransitionEnd:u,unstable__animationState:c}=Hk(),d=function(t={},r=null){const n=Hk();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within