"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6611],{44419:function(e,t,n){n.d(t,{A:function(){return a},F:function(){return f},I:function(){return p},S:function(){return l},a:function(){return m},d:function(){return g}});var r,o,i,l,a,u,s=n(53048),c=n(70079),d=n(35250);let f=({code:e,intrinsicSize:t=64,className:n,loading:r="lazy"})=>{let[o,i]=(0,c.useState)(null);(0,c.useEffect)(()=>{i(null)},[e]);let l=t>=150,a="unknown"!==o?`${e.toLowerCase()}${null==o&&l?"-detailed":""}`:"wise";return(0,d.jsx)("img",{className:(0,s.W)(`wds-flag wds-flag-${a}`,n),src:`https://wise.com/web-art/assets/flags/${a}.svg`,loading:r,alt:"",width:t,height:t,onError:()=>{i(e=>null==e&&l?"simple":"unknown")}})};(r=l||(l={})).SMALL="small",r.MEDIUM="medium",r.LARGE="large";let p={[l.SMALL]:200,[l.MEDIUM]:300,[l.LARGE]:500},v={[l.SMALL]:200,[l.MEDIUM]:300,[l.LARGE]:500},m=(0,c.forwardRef)(({id:e,name:t,alt:n="",loading:r="eager",className:o,size:i=l.MEDIUM,disablePadding:a=!1},u)=>{let{SMALL:c,MEDIUM:f}=l;return t?(0,d.jsxs)("picture",{children:[i===l.LARGE||i===l.MEDIUM?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("source",{width:v[c],height:v[c],media:"(max-width: 575px)",srcSet:`${h(t,c,"1x")}, ${h(t,c,"2x")} 2x`}),i!==l.MEDIUM?(0,d.jsx)("source",{width:v[f],height:v[f],media:"(max-width: 992px)",srcSet:`${h(t,f,"1x")}, ${h(t,f,"2x")} 2x`}):null]}):null,(0,d.jsx)("img",{id:e,ref:u,alt:n,"data-testid":`wds-${t}-illustration`,className:(0,s.W)(`wds-illustration wds-illustration-${t}`,o,!a&&"wds-illustration-padding"),loading:r,src:h(t,i,"1x"),srcSet:`${h(t,i,"2x")} 2x`,width:v[i],height:v[i]})]}):null});function h(e,t,n){return`https://wise.com/web-art/assets/illustrations/${e}-${t}@${n}.webp`}function g(e){return`https://wise.com/web-art/assets/illustrations3d/${e}`}(o=a||(a={})).BELL="bell",o.BRIEFCASE="briefcase",o.BUSINESS_CARD="business-card",o.CALENDAR="calendar",o.CHECK_MARK="check-mark",o.CLOSED_WINDOW="closed-window",o.COIN_PILE_DOWN="coin-pile-down",o.COIN_PILE_UP="coin-pile-up",o.CONFETTI="confetti",o.CONSTRUCTION_FENCE="construction-fence",o.CONVERT="convert",o.COOKIE="cookie",o.DIGITAL_CARD_2="digital-card-2",o.DIGITAL_CARD="digital-card",o.DOCUMENTS="documents",o.DOOR="door",o.ECO_CARD="eco-card",o.ELECTRIC_PLUG="electric-plug",o.EMAIL_SUCCESS="email-success",o.EMAIL="email",o.EXCLAMATION_MARK="exclamation-mark",o.FLAG="flag",o.FLOWER="flower",o.GEAR="gear",o.GLOBE="globe",o.GRAPH="graph",o.HEART_2="heart-2",o.HEART_3="heart-3",o.HEART_4="heart-4",o.HEART_5="heart-5",o.HEART="heart",o.HOUSE="house",o.ID_CARD="id-card",o.INFINITE="infinite",o.INTEREST="interest",o.INVITE_LETTER="invite-letter",o.JARS="jars",o.KEY="key",o.LIGHT_BULB="light-bulb",o.LOCK_PLATFORM="lock-platform",o.LOCK="lock",o.MAGNIFYING_GLASS="magnifying-glass",o.MAP="map",o.MARBLE_CARD_BUSINESS="marble-card-business",o.MARBLE_CARD="marble-card",o.MARBLE="marble",o.MEGAPHONE="megaphone",o.MULTI_CURRENCY="multi-currency",o.ONE_INVITE_LETTER_OPENED="one-invite-letter-opened",o.PALM_TREE="palm-tree",o.PERCENTAGE="percentage",o.PERSONAL_CARD="personal-card",o.PHONES="phones",o.PIE_CHART="pie-chart",o.PLANE_2="plane-2",o.PLANE="plane",o.PUZZLE_PIECES="puzzle-pieces",o.QUESTION_MARK="question-mark",o.RECEIVE="receive",o.REMINDER_LETTER="reminder-letter",o.SAND_TIMER="sand-timer",o.SATELLITE_PLATFORM="satellite-platform",o.SHOPPING_BAG="shopping-bag",o.SKIP_AUTHENTICATION="skip-authentication",o.SPEECH_BUBBLE="speech-bubble",o.STOPWATCH_PLATFORM="stopwatch-platform",o.TARGET_PLATFORM="target-platform",o.TOOL="tool",o.TWO_INVITE_LETTERS_OPENED="two-invite-letters-opened",o.WALLET="wallet",(i=u||(u={}))[i.INIT=0]="INIT",i[i.FALLBACK=1]="FALLBACK",i[i.ASSET_3D=2]="ASSET_3D"},60324:function(e){var t=this&&this.__assign||function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},o=e=>e&&"window"in e&&e.window===e?e:r(e).defaultView||window,i=new Map,l=new Set;function a(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let t=n=>{if(!e(n)||!n.target)return;let r=i.get(n.target);if(r&&(r.delete(n.propertyName),0===r.size&&(n.target.removeEventListener("transitioncancel",t),i.delete(n.target)),0===i.size)){for(let e of l)e();l.clear()}};document.body.addEventListener("transitionrun",n=>{if(!e(n)||!n.target)return;let r=i.get(n.target);r||(r=new Set,i.set(n.target,r),n.target.addEventListener("transitioncancel",t,{once:!0})),r.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function u(e){if(function(){if(null==s){s=!1;try{document.createElement("div").focus({get preventScroll(){return s=!0,!0}})}catch(e){}}return s}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight{L(e)},{once:!0}),v.set(t,{focus:i})}let L=(e,t)=>{let n=o(e),i=r(e);t&&i.removeEventListener("DOMContentLoaded",t),v.has(n)&&(n.HTMLElement.prototype.focus=v.get(n).focus,i.removeEventListener("keydown",b,!0),i.removeEventListener("keyup",b,!0),i.removeEventListener("click",E,!0),n.removeEventListener("focus",x,!0),n.removeEventListener("blur",w,!1),"undefined"!=typeof PointerEvent?(i.removeEventListener("pointerdown",y,!0),i.removeEventListener("pointermove",y,!0),i.removeEventListener("pointerup",y,!0)):(i.removeEventListener("mousedown",y,!0),i.removeEventListener("mousemove",y,!0),i.removeEventListener("mouseup",y,!0)),v.delete(n))};"undefined"!=typeof document&&function(e){let t;let n=r(void 0);"loading"!==n.readyState?R(void 0):(t=()=>{R(void 0)},n.addEventListener("DOMContentLoaded",t)),()=>L(e,t)}();var S=n(3873);let T=d.createContext(null),C="react-aria-focus-scope-restore",A=null;function N(e){let t,n,{children:o,contain:i,restoreFocus:l,autoFocus:a}=e,u=(0,d.useRef)(null),s=(0,d.useRef)(null),c=(0,d.useRef)([]),{parentNode:f}=(0,d.useContext)(T)||{},p=(0,d.useMemo)(()=>new z({scopeRef:c}),[c]);(0,S.b)(()=>{let e=f||V.root;if(V.getTreeNode(e.scopeRef)&&A&&!k(A,e.scopeRef)){let t=V.getTreeNode(A);t&&(e=t)}e.addChild(p),V.addNode(p)},[p,f]),(0,S.b)(()=>{let e=V.getTreeNode(c);e&&(e.contain=!!i)},[i]),(0,S.b)(()=>{var e;let t=null===(e=u.current)||void 0===e?void 0:e.nextSibling,n=[],r=e=>e.stopPropagation();for(;t&&t!==s.current;)n.push(t),t.addEventListener(C,r),t=t.nextSibling;return c.current=n,()=>{for(let e of n)e.removeEventListener(C,r)}},[o]),(0,S.b)(()=>{if(l||i)return;let e=c.current,t=r(e?e[0]:void 0),n=e=>{let t=e.target;D(t,c.current)?A=c:j(t)||(A=null)};return t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),()=>{t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1))}},[c,l,i]),t=(0,d.useRef)(void 0),n=(0,d.useRef)(void 0),(0,S.b)(()=>{let e=c.current;if(!i){n.current&&(cancelAnimationFrame(n.current),n.current=void 0);return}let o=r(e?e[0]:void 0),l=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!I(c)||e.isComposing)return;let t=o.activeElement,n=c.current;if(!n||!D(t,n))return;let r=U(F(n),{tabbable:!0},n);if(!t)return;r.currentNode=t;let i=e.shiftKey?r.previousNode():r.nextNode();i||(r.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,i=e.shiftKey?r.previousNode():r.nextNode()),e.preventDefault(),i&&_(i,!0)},a=e=>{(!A||k(A,c))&&D(e.target,c.current)?(A=c,t.current=e.target):I(c)&&!j(e.target,c)?t.current?t.current.focus():A&&A.current&&W(A.current):I(c)&&(t.current=e.target)},u=e=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{if(o.activeElement&&I(c)&&!j(o.activeElement,c)){if(A=c,o.body.contains(e.target)){var n;t.current=e.target,null===(n=t.current)||void 0===n||n.focus()}else A.current&&W(A.current)}})};return o.addEventListener("keydown",l,!1),o.addEventListener("focusin",a,!1),null==e||e.forEach(e=>e.addEventListener("focusin",a,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",u,!1)),()=>{o.removeEventListener("keydown",l,!1),o.removeEventListener("focusin",a,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",a,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",u,!1))}},[c,i]),(0,S.b)(()=>()=>{n.current&&cancelAnimationFrame(n.current)},[n]),function(e,t,n){let o=(0,d.useRef)("undefined"!=typeof document?r(e.current?e.current[0]:void 0).activeElement:null);(0,S.b)(()=>{let o=e.current,i=r(o?o[0]:void 0);if(!t||n)return;let l=()=>{(!A||k(A,e))&&D(i.activeElement,e.current)&&(A=e)};return i.addEventListener("focusin",l,!1),null==o||o.forEach(e=>e.addEventListener("focusin",l,!1)),()=>{i.removeEventListener("focusin",l,!1),null==o||o.forEach(e=>e.removeEventListener("focusin",l,!1))}},[e,n]),(0,S.b)(()=>{let o=r(e.current?e.current[0]:void 0);if(!t)return;let i=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!I(e)||t.isComposing)return;let n=o.activeElement;if(!D(n,e.current))return;let r=V.getTreeNode(e);if(!r)return;let i=r.nodeToRestore,l=U(o.body,{tabbable:!0});l.currentNode=n;let a=t.shiftKey?l.previousNode():l.nextNode();if(i&&o.body.contains(i)&&i!==o.body||(i=void 0,r.nodeToRestore=void 0),(!a||!D(a,e.current))&&i){l.currentNode=i;do a=t.shiftKey?l.previousNode():l.nextNode();while(D(a,e.current));(t.preventDefault(),t.stopPropagation(),a)?_(a,!0):j(i)?_(i,!0):n.blur()}};return n||o.addEventListener("keydown",i,!0),()=>{n||o.removeEventListener("keydown",i,!0)}},[e,t,n]),(0,S.b)(()=>{var n;let i=r(e.current?e.current[0]:void 0);if(!t)return;let l=V.getTreeNode(e);if(l)return l.nodeToRestore=null!==(n=o.current)&&void 0!==n?n:void 0,()=>{let n=V.getTreeNode(e);if(!n)return;let r=n.nodeToRestore;if(t&&r&&(D(i.activeElement,e.current)||i.activeElement===i.body&&function(e){let t=V.getTreeNode(A);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}(e))){let t=V.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let n=t.getTreeNode(e);for(;n;){if(n.nodeToRestore&&n.nodeToRestore.isConnected){B(n.nodeToRestore);return}n=n.parent}for(n=t.getTreeNode(e);n;){if(n.scopeRef&&n.scopeRef.current&&V.getTreeNode(n.scopeRef)){B(H(n.scopeRef.current,!0));return}n=n.parent}}})}}},[e,t])}(c,l,i),function(e,t){let n=d.useRef(t);(0,d.useEffect)(()=>{n.current&&(A=e,!D(r(e.current?e.current[0]:void 0).activeElement,A.current)&&e.current&&W(e.current)),n.current=!1},[e])}(c,a),(0,d.useEffect)(()=>{let e=r(c.current?c.current[0]:void 0).activeElement,t=null;if(D(e,c.current)){for(let n of V.traverse())n.scopeRef&&D(e,n.scopeRef.current)&&(t=n);t===V.getTreeNode(c)&&(A=t.scopeRef)}},[c]),(0,S.b)(()=>()=>{var e,t,n;let r=null!==(n=null===(t=V.getTreeNode(c))||void 0===t?void 0:null===(e=t.parent)||void 0===e?void 0:e.scopeRef)&&void 0!==n?n:null;(c===A||k(c,A))&&(!r||V.getTreeNode(r))&&(A=r),V.removeTreeNode(c)},[c]);let v=(0,d.useMemo)(()=>({focusNext(e={}){let t=c.current,{from:n,tabbable:o,wrap:i,accept:l}=e,a=n||r(t[0]).activeElement,u=t[0].previousElementSibling,s=U(F(t),{tabbable:o,accept:l},t);s.currentNode=D(a,t)?a:u;let d=s.nextNode();return!d&&i&&(s.currentNode=u,d=s.nextNode()),d&&_(d,!0),d},focusPrevious(e={}){let t=c.current,{from:n,tabbable:o,wrap:i,accept:l}=e,a=n||r(t[0]).activeElement,u=t[t.length-1].nextElementSibling,s=U(F(t),{tabbable:o,accept:l},t);s.currentNode=D(a,t)?a:u;let d=s.previousNode();return!d&&i&&(s.currentNode=u,d=s.previousNode()),d&&_(d,!0),d},focusFirst(e={}){let t=c.current,{tabbable:n,accept:r}=e,o=U(F(t),{tabbable:n,accept:r},t);o.currentNode=t[0].previousElementSibling;let i=o.nextNode();return i&&_(i,!0),i},focusLast(e={}){let t=c.current,{tabbable:n,accept:r}=e,o=U(F(t),{tabbable:n,accept:r},t);o.currentNode=t[t.length-1].nextElementSibling;let i=o.previousNode();return i&&_(i,!0),i}}),[]),m=(0,d.useMemo)(()=>({focusManager:v,parentNode:p}),[p,v]);return d.createElement(T.Provider,{value:m},d.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:u}),o,d.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:s}))}let O=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],M=O.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";O.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let P=O.join(':not([hidden]):not([tabindex="-1"]),');function F(e){return e[0].parentElement}function I(e){let t=V.getTreeNode(A);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function D(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function j(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of V.traverse(V.getTreeNode(t)))if(n&&D(e,n.current))return!0;return!1}function k(e,t){var n;let r=null===(n=V.getTreeNode(t))||void 0===n?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function _(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch(e){}}else try{!function(e){let t=r(e);if("virtual"===f){var n;let r=t.activeElement;n=()=>{t.activeElement===r&&e.isConnected&&u(e)},requestAnimationFrame(()=>{0===i.size?n():l.add(n)})}else u(e)}(e)}catch(e){}}function H(e,t=!0){let n=e[0].previousElementSibling,r=F(e),o=U(r,{tabbable:t},e);o.currentNode=n;let i=o.nextNode();return t&&!i&&((o=U(r=F(e),{tabbable:!1},e)).currentNode=n,i=o.nextNode()),i}function W(e,t=!0){_(H(e,t))}function B(e){e.dispatchEvent(new CustomEvent(C,{bubbles:!0,cancelable:!0}))&&_(e)}function U(e,t,n){let i=(null==t?void 0:t.tabbable)?P:M,l=r(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){var r;return(null==t?void 0:null===(r=t.from)||void 0===r?void 0:r.contains(e))?NodeFilter.FILTER_REJECT:e.matches(i)&&function e(t,n){return"#comment"!==t.nodeName&&function(e){let t=o(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i="none"!==n&&"hidden"!==r&&"collapse"!==r;if(i){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);i="none"!==n&&"hidden"!==r&&"collapse"!==r}return i}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!n||"SUMMARY"===n.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(e)&&(!n||D(e,n))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}class K{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(null!=t?t:null);if(!r)return;let o=new z({scopeRef:e});r.addChild(o),o.parent=r,this.fastMap.set(e,o),n&&(o.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&D(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e,t;let n=new K;for(let r of this.traverse())n.addTreeNode(r.scopeRef,null!==(t=null===(e=r.parent)||void 0===e?void 0:e.scopeRef)&&void 0!==t?t:null,r.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new z({scopeRef:null}),this.fastMap.set(null,this.root)}}class z{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let V=new K},72602:function(e,t,n){function r(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function o(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function i(e){let t=null;return()=>(null==t&&(t=e()),t)}n.d(t,{Dt:function(){return d},V5:function(){return l},gn:function(){return s}});let l=i(function(){return o(/^Mac/i)}),a=i(function(){return o(/^iPhone/i)}),u=i(function(){return o(/^iPad/i)||l()&&navigator.maxTouchPoints>1}),s=i(function(){return a()||u()});i(function(){return l()||s()}),i(function(){return r(/AppleWebKit/i)&&!c()});let c=i(function(){return r(/Chrome/i)}),d=i(function(){return r(/Android/i)});i(function(){return r(/Firefox/i)})},3873:function(e,t,n){n.d(t,{b:function(){return o}});var r=n(70079);let o="undefined"!=typeof document?r.useLayoutEffect:()=>{}},15466:function(e,t,n){n.d(t,{Ft:function(){return a},hj:function(){return o},o8:function(){return u},xb:function(){return s}});let r=e=>"string"==typeof e,o=e=>"number"==typeof e&&!Number.isNaN(e),i=e=>"object"==typeof e&&!a(e)&&e.constructor===Object,l=e=>Array.isArray(e),a=e=>null===e,u=e=>void 0===e,s=e=>r(e)&&0===e.length||(i(e)||l(e))&&0===Object.keys(e).length},49765:function(e,t,n){n.d(t,{i:function(){return o}});var r=n(70079);function o(e){let t=(0,r.useRef)(()=>{throw Error("Cannot call an event handler while rendering.")});return(0,r.useEffect)(()=>{t.current=e}),(0,r.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r{let n=window.matchMedia(e);return n.addEventListener("change",t),()=>{n.removeEventListener("change",t)}},()=>window.matchMedia(e).matches,()=>void 0)}},18255:function(e,t,n){n.d(t,{e:function(){return o}});var r=n(88458);function o(e){return(0,r.G)("(min-width: ".concat(e,"px)"))}},24458:function(e,t,n){var r,o;n.d(t,{U:function(){return r}}),(o=r||(r={}))[o.ZOOM_400=320]="ZOOM_400",o[o.EXTRA_SMALL=480]="EXTRA_SMALL",o[o.SMALL=576]="SMALL",o[o.MEDIUM=768]="MEDIUM",o[o.LARGE=992]="LARGE",o[o.EXTRA_LARGE=1200]="EXTRA_LARGE"},80296:function(e,t,n){n.d(t,{Z:function(){return r}});var r=(0,n(5532).vU)({ariaLabel:{id:"neptune.ClearButton.ariaLabel"}})},51778:function(e,t,n){n.d(t,{I:function(){return s}});var r=n(53048),o=n(70079),i=n(56229),l=n(92446),a=n(30536),u=n(35250);let s=(0,o.forwardRef)(function(e,t){let{size:n="auto",shape:o="rectangle",className:s,...c}=e,d=(0,l.sU)(),f=(0,a.C)();return(0,u.jsx)("input",{ref:t,className:(0,r.W)(s,(0,i.H)({size:n}),"np-input",{"np-input--shape-rectangle":"rectangle"===o,"np-input--shape-pill":"pill"===o}),style:f,...d,...c})})},30536:function(e,t,n){n.d(t,{B:function(){return p},C:function(){return d}});var r=n(53048),o=n(70079),i=n(49765);function l(e){return"number"==typeof e?"".concat(e,"px"):e}var a=n(92446),u=n(35250);let s=(0,o.createContext)([void 0,()=>{}]),c=(0,o.createContext)([void 0,()=>{}]);function d(){let[e]=(0,o.useContext)(s),[t]=(0,o.useContext)(c);return{paddingInlineStart:e,paddingInlineEnd:t}}function f(){let{initialContentWidth:e,padding:t=m}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return()=>null!=e?"calc(".concat(l(e)," + ").concat(l(v[t]),")"):void 0}function p(e){let{addonStart:t,addonEnd:n,disabled:i,className:l,children:a}=e,[d,p]=(0,o.useState)(f(t)),[v,m]=(0,o.useState)(f(n));return(0,u.jsx)(s.Provider,{value:(0,o.useMemo)(()=>[d,p],[d]),children:(0,u.jsx)(c.Provider,{value:(0,o.useMemo)(()=>[v,m],[v]),children:(0,u.jsxs)("fieldset",{disabled:i,className:(0,r.W)(l,"np-input-group"),children:[null!=t?(0,u.jsx)(h,{placement:"start",...t}):null,a,null!=n?(0,u.jsx)(h,{placement:"end",...n}):null]})})})}let v={none:0,sm:"1rem",md:"1.5rem"},m="md";function h(e){let{placement:t,content:n,interactive:l,padding:d=m}=e,[,f]=(0,o.useContext)("start"===t?s:c),p=(0,o.useRef)(null);return!function(e,t){let n=(0,i.i)(t);(0,o.useEffect)(()=>{if(null!=e.current){let t=new ResizeObserver(e=>{let[t]=e;n(t)});return t.observe(e.current,{box:"border-box"}),()=>{t.disconnect()}}return()=>{}},[n,e])}(p,e=>{var t,n;let r=null===(n=e.borderBoxSize)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.inlineSize;if(null!=r)f(r);else{let t=getComputedStyle(e.target);f(e.contentRect.width+Number.parseFloat(t.paddingInlineStart)+Number.parseFloat(t.paddingInlineEnd))}}),(0,u.jsx)(a.jl,{value:void 0,children:(0,u.jsx)(a.HR,{value:void 0,children:(0,u.jsx)(a.dX,{value:void 0,children:(0,u.jsx)(a.lp,{value:void 0,children:(0,u.jsx)("span",{ref:p,className:(0,r.W)("np-input-addon",{"np-input-addon--placement-start":"start"===t,"np-input-addon--placement-end":"end"===t},l&&"np-input-addon--interactive",{"np-input-addon--padding-sm":"sm"===d,"np-input-addon--padding-md":"md"===d}),children:n})})})})})}},2473:function(e,t,n){let r,o,i,l,a,u,s,c,d,f,p,v,m,h,g,b,y,E;n.d(t,{lq:function(){return oy},X5:function(){return oO},hf:function(){return ox}});var x,w=n(70079),R=n.t(w,2),L=Object.defineProperty,S=(e,t,n)=>t in e?L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T=(e,t,n)=>(S(e,"symbol"!=typeof t?t+"":t,n),n);class C{set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}constructor(){T(this,"current",this.detect()),T(this,"handoffState","pending"),T(this,"currentId",0)}}let A=new C,N=(e,t)=>{A.isServer?(0,w.useEffect)(e,t):(0,w.useLayoutEffect)(e,t)};function O(e){let t=(0,w.useRef)(e);return N(()=>{t.current=e},[e]),t}function M(e,t){let[n,r]=(0,w.useState)(e),o=O(e);return N(()=>r(o.current),[o,r,...t]),n}let P=function(e){let t=O(e);return w.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r(e.addEventListener(n,r,o),t.add(()=>e.removeEventListener(n,r,o))),requestAnimationFrame(){for(var e=arguments.length,n=Array(e),r=0;rcancelAnimationFrame(o))},nextFrame(){for(var e=arguments.length,n=Array(e),r=0;rt.requestAnimationFrame(...n))},setTimeout(){for(var e=arguments.length,n=Array(e),r=0;rclearTimeout(o))},microTask(){for(var e,n=arguments.length,r=Array(n),o=0;o{i.current&&r[0]()},"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e})),t.add(()=>{i.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=F();return e(t),this.add(()=>t.dispose())},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function I(){let[e]=(0,w.useState)(F);return(0,w.useEffect)(()=>()=>e.dispose(),[e]),e}function D(){let e;let t=(e="undefined"==typeof document,(0,R.useSyncExternalStore)(()=>()=>{},()=>!1,()=>!e)),[n,r]=w.useState(A.isHandoffComplete);return n&&!1===A.isHandoffComplete&&r(!1),w.useEffect(()=>{!0!==n&&r(!0)},[n]),w.useEffect(()=>A.handoff(),[]),!t&&n}let j=null!=(x=w.useId)?x:function(){let e=D(),[t,n]=w.useState(e?()=>A.nextId():null);return N(()=>{null===t&&n(A.nextId())},[t]),null!=t?""+t:void 0};function k(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o'"'.concat(e,'"')).join(", "),"."));throw Error.captureStackTrace&&Error.captureStackTrace(i,k),i}function _(e){return A.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let H=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>"".concat(e,":not([tabindex='-1'])")).join(",");var W=((i=W||{})[i.First=1]="First",i[i.Previous=2]="Previous",i[i.Next=4]="Next",i[i.Last=8]="Last",i[i.WrapAround=16]="WrapAround",i[i.NoScroll=32]="NoScroll",i),B=((l=B||{})[l.Error=0]="Error",l[l.Overflow=1]="Overflow",l[l.Success=2]="Success",l[l.Underflow=3]="Underflow",l),U=((a=U||{})[a.Previous=-1]="Previous",a[a.Next=1]="Next",a),K=((u=K||{})[u.Strict=0]="Strict",u[u.Loose=1]="Loose",u);function z(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e!==(null==(t=_(e))?void 0:t.body)&&k(n,{0:()=>e.matches(H),1(){let t=e;for(;null!==t;){if(t.matches(H))return!0;t=t.parentElement}return!1}})}var V=((s=V||{})[s.Keyboard=0]="Keyboard",s[s.Mouse=1]="Mouse",s);function G(e,t,n){let r=O(t);(0,w.useEffect)(()=>{function t(e){r.current(e)}return document.addEventListener(e,t,n),()=>document.removeEventListener(e,t,n)},[e,n])}function q(e){var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";if("string"==typeof n&&"button"===n.toLowerCase())return"button"}"undefined"!=typeof document&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let $=Symbol();function X(){for(var e=arguments.length,t=Array(e),n=0;n{r.current=t},[t]);let o=P(e=>{for(let t of r.current)null!=t&&("function"==typeof t?t(e):t.current=e)});return t.every(e=>null==e||(null==e?void 0:e[$]))?void 0:o}let Y=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Z(e){var t,n;let r=null!=(t=e.innerText)?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let i=!1;for(let e of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),i=!0;let l=i?null!=(n=o.innerText)?n:"":r;return Y.test(l)&&(l=l.replace(Y,"")),l}function Q(e){return[e.screenX,e.screenY]}function J(){for(var e=arguments.length,t=Array(e),n=0;n"string"==typeof e?e.split(" "):[]))).filter(Boolean).join(" ")}var ee=((c=ee||{})[c.None=0]="None",c[c.RenderStrategy=1]="RenderStrategy",c[c.Static=2]="Static",c),et=((d=et||{})[d.Unmount=0]="Unmount",d[d.Hidden=1]="Hidden",d);function en(e){let{ourProps:t,theirProps:n,slot:r,defaultTag:o,features:i,visible:l=!0,name:a,mergeRefs:u}=e;u=null!=u?u:eo;let s=ei(n,t);if(l)return er(s,r,o,a,u);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=s;if(e)return er(t,r,o,a,u)}if(1&c){let{unmount:e=!0,...t}=s;return k(e?0:1,{0:()=>null,1:()=>er({...t,hidden:!0,style:{display:"none"}},r,o,a,u)})}return er(s,r,o,a,u)}function er(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,{as:i=n,children:l,refName:a="ref",...u}=eu(e,["unmount","static"]),s=void 0!==e.ref?{[a]:e.ref}:{},c="function"==typeof l?l(t):l;"className"in u&&u.className&&"function"==typeof u.className&&(u.className=u.className(t));let d={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r);e&&(d["data-headlessui-state"]=n.join(" "))}if(i===w.Fragment&&Object.keys(ea(u)).length>0){if(!(0,w.isValidElement)(c)||Array.isArray(c)&&c.length>1)throw Error(['Passing props on "Fragment"!',"","The current component <".concat(r,' /> is rendering a "Fragment".'),"However we need to passthrough the following props:",Object.keys(u).map(e=>" - ".concat(e)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>" - ".concat(e)).join("\n")].join("\n"));let e=c.props,t="function"==typeof(null==e?void 0:e.className)?function(){for(var t=arguments.length,n=Array(t),r=0;rnull==e)?void 0:e=>{for(let n of t)null!=n&&("function"==typeof n?n(e):n.current=e)}}function ei(){for(var e=arguments.length,t=Array(e),n=0;n[e,void 0])));for(let e in o)Object.assign(r,{[e](t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:[],n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}var es=((f=es||{})[f.None=1]="None",f[f.Focusable=2]="Focusable",f[f.Hidden=4]="Hidden",f);let ec=el(function(e,t){var n;let{features:r=1,...o}=e;return en({ourProps:{ref:t,"aria-hidden":(2&r)==2||(null!=(n=o["aria-hidden"])?n:void 0),hidden:(4&r)==4||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(4&r)==4&&(2&r)!=2&&{display:"none"}}},theirProps:o,slot:{},defaultTag:"div",name:"Hidden"})}),ed=(0,w.createContext)(null);ed.displayName="OpenClosedContext";var ef=((p=ef||{})[p.Open=1]="Open",p[p.Closed=2]="Closed",p[p.Closing=4]="Closing",p[p.Opening=8]="Opening",p);function ep(){return(0,w.useContext)(ed)}function ev(e){let{value:t,children:n}=e;return w.createElement(ed.Provider,{value:t},n)}var em=((v=em||{})[v.First=0]="First",v[v.Previous=1]="Previous",v[v.Next=2]="Next",v[v.Last=3]="Last",v[v.Specific=4]="Specific",v[v.Nothing=5]="Nothing",v);function eh(e,t){return e?e+"["+t+"]":t}var eg=((m=eg||{}).Space=" ",m.Enter="Enter",m.Escape="Escape",m.Backspace="Backspace",m.Delete="Delete",m.ArrowLeft="ArrowLeft",m.ArrowUp="ArrowUp",m.ArrowRight="ArrowRight",m.ArrowDown="ArrowDown",m.Home="Home",m.End="End",m.PageUp="PageUp",m.PageDown="PageDown",m.Tab="Tab",m),eb=((h=eb||{})[h.Open=0]="Open",h[h.Closed=1]="Closed",h),ey=((g=ey||{})[g.Single=0]="Single",g[g.Multi=1]="Multi",g),eE=((b=eE||{})[b.Pointer=0]="Pointer",b[b.Other=1]="Other",b),ex=((y=ex||{})[y.OpenListbox=0]="OpenListbox",y[y.CloseListbox=1]="CloseListbox",y[y.GoToOption=2]="GoToOption",y[y.Search=3]="Search",y[y.ClearSearch=4]="ClearSearch",y[y.RegisterOption=5]="RegisterOption",y[y.UnregisterOption=6]="UnregisterOption",y[y.RegisterLabel=7]="RegisterLabel",y);function ew(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return e.slice().sort((e,n)=>{let r=t(e),o=t(n);if(null===r||null===o)return 0;let i=r.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}(t(e.options.slice()),e=>e.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return -1===o&&(o=null),{options:r,activeOptionIndex:o}}let eR={1:e=>e.dataRef.current.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1},0(e){if(e.dataRef.current.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(e=>n(e.dataRef.current.value));return -1!==r&&(t=r),{...e,listboxState:0,activeOptionIndex:t}},2(e,t){var n;if(e.dataRef.current.disabled||1===e.listboxState)return e;let r=ew(e),o=function(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=o+1;e=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;rr.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeOptionIndex:o,activationTrigger:null!=(n=t.trigger)?n:1}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))}),i=o?e.options.indexOf(o):-1;return -1===i||i===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:i,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=ew(e,e=>[...e,n]);return null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=ew(e,e=>{let n=e.findIndex(e=>e.id===t.id);return -1!==n&&e.splice(n,1),e});return{...e,...n,activationTrigger:1}},7:(e,t)=>({...e,labelId:t.id})},eL=(0,w.createContext)(null);function eS(e){let t=(0,w.useContext)(eL);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,eS),t}return t}eL.displayName="ListboxActionsContext";let eT=(0,w.createContext)(null);function eC(e){let t=(0,w.useContext)(eT);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,eC),t}return t}function eA(e,t){return k(t.type,eR,e,t)}eT.displayName="ListboxDataContext";let eN=w.Fragment,eO=ee.RenderStrategy|ee.Static,eM=Object.assign(el(function(e,t){let{value:n,defaultValue:r,form:o,name:i,onChange:l,by:a=(e,t)=>e===t,disabled:u=!1,horizontal:s=!1,multiple:c=!1,...d}=e,f=s?"horizontal":"vertical",p=X(t),[v=c?[]:void 0,m]=function(e,t,n){let[r,o]=(0,w.useState)(n),i=void 0!==e,l=(0,w.useRef)(i),a=(0,w.useRef)(!1),u=(0,w.useRef)(!1);return!i||l.current||a.current?i||!l.current||u.current||(u.current=!0,l.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(a.current=!0,l.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[i?e:r,P(e=>(i||o(e),null==t?void 0:t(e)))]}(n,l,r),[h,g]=(0,w.useReducer)(eA,{dataRef:(0,w.createRef)(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),b=(0,w.useRef)({static:!1,hold:!1}),y=(0,w.useRef)(null),E=(0,w.useRef)(null),x=(0,w.useRef)(null),R=P("string"==typeof a?(e,t)=>(null==e?void 0:e[a])===(null==t?void 0:t[a]):a),L=(0,w.useCallback)(e=>k(S.mode,{1:()=>v.some(t=>R(t,e)),0:()=>R(v,e)}),[v]),S=(0,w.useMemo)(()=>({...h,value:v,disabled:u,mode:c?1:0,orientation:f,compare:R,isSelected:L,optionsPropsRef:b,labelRef:y,buttonRef:E,optionsRef:x}),[v,u,c,h]);N(()=>{h.dataRef.current=S},[S]),function(e,t){var n;let r,o=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=(0,w.useRef)(!1);function l(n,r){if(!i.current||n.defaultPrevented)return;let o=r(n);if(null!==o&&o.getRootNode().contains(o)&&o.isConnected){for(let t of function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e)){if(null===t)continue;let e=t instanceof HTMLElement?t:t.current;if(null!=e&&e.contains(o)||n.composed&&n.composedPath().includes(e))return}return z(o,K.Loose)||-1===o.tabIndex||n.preventDefault(),t(n,o)}}(0,w.useEffect)(()=>{requestAnimationFrame(()=>{i.current=o})},[o]);let a=(0,w.useRef)(null);G("pointerdown",e=>{var t,n;i.current&&(a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),G("mousedown",e=>{var t,n;i.current&&(a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),G("click",e=>{/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0||/Android/gi.test(window.navigator.userAgent)||a.current&&(l(e,()=>a.current),a.current=null)},!0),G("touchend",e=>l(e,()=>e.target instanceof HTMLElement?e.target:null),!0),n="blur",r=O(e=>l(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null)),(0,w.useEffect)(()=>{function e(e){r.current(e)}return window.addEventListener(n,e,!0),()=>window.removeEventListener(n,e,!0)},[n,!0])}([S.buttonRef,S.optionsRef],(e,t)=>{var n;g({type:1}),z(t,K.Loose)||(e.preventDefault(),null==(n=S.buttonRef.current)||n.focus())},0===S.listboxState);let T=(0,w.useMemo)(()=>({open:0===S.listboxState,disabled:u,value:v}),[S,u,v]),C=P(e=>{let t=S.options.find(t=>t.id===e);t&&H(t.dataRef.current.value)}),A=P(()=>{if(null!==S.activeOptionIndex){let{dataRef:e,id:t}=S.options[S.activeOptionIndex];H(e.current.value),g({type:2,focus:em.Specific,id:t})}}),M=P(()=>g({type:0})),F=P(()=>g({type:1})),D=P((e,t,n)=>e===em.Specific?g({type:2,focus:em.Specific,id:t,trigger:n}):g({type:2,focus:e,trigger:n})),j=P((e,t)=>(g({type:5,id:e,dataRef:t}),()=>g({type:6,id:e}))),_=P(e=>(g({type:7,id:e}),()=>g({type:7,id:null}))),H=P(e=>k(S.mode,{0:()=>null==m?void 0:m(e),1(){let t=S.value.slice(),n=t.findIndex(t=>R(t,e));return -1===n?t.push(e):t.splice(n,1),null==m?void 0:m(t)}})),W=P(e=>g({type:3,value:e})),B=P(()=>g({type:4})),U=(0,w.useMemo)(()=>({onChange:H,registerOption:j,registerLabel:_,goToOption:D,closeListbox:F,openListbox:M,selectActiveOption:A,selectOption:C,search:W,clearSearch:B}),[]),V=(0,w.useRef)(null),q=I();return(0,w.useEffect)(()=>{V.current&&void 0!==r&&q.addEventListener(V.current,"reset",()=>{null==m||m(r)})},[V,m]),w.createElement(eL.Provider,{value:U},w.createElement(eT.Provider,{value:S},w.createElement(ev,{value:k(S.listboxState,{0:ef.Open,1:ef.Closed})},null!=i&&null!=v&&(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(let[o,i]of Object.entries(t))!function t(n,r,o){if(Array.isArray(o))for(let[e,i]of o.entries())t(n,eh(r,e.toString()),i);else o instanceof Date?n.push([r,o.toISOString()]):"boolean"==typeof o?n.push([r,o?"1":"0"]):"string"==typeof o?n.push([r,o]):"number"==typeof o?n.push([r,"".concat(o)]):null==o?n.push([r,""]):e(o,r,n)}(r,eh(n,o),i);return r})({[i]:v}).map((e,t)=>{let[n,r]=e;return w.createElement(ec,{features:es.Hidden,ref:0===t?e=>{var t;V.current=null!=(t=null==e?void 0:e.closest("form"))?t:null}:void 0,...ea({key:n,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:o,disabled:u,name:n,value:r})})}),en({ourProps:{ref:p},theirProps:d,slot:T,defaultTag:eN,name:"Listbox"}))))}),{Button:el(function(e,t){var n;let r=j(),{id:o="headlessui-listbox-button-".concat(r),...i}=e,l=eC("Listbox.Button"),a=eS("Listbox.Button"),u=X(l.buttonRef,t),s=I(),c=P(e=>{switch(e.key){case eg.Space:case eg.Enter:case eg.ArrowDown:e.preventDefault(),a.openListbox(),s.nextFrame(()=>{l.value||a.goToOption(em.First)});break;case eg.ArrowUp:e.preventDefault(),a.openListbox(),s.nextFrame(()=>{l.value||a.goToOption(em.Last)})}}),d=P(e=>{e.key===eg.Space&&e.preventDefault()}),f=P(e=>{if(function(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(null==t?void 0:t.getAttribute("disabled"))==="";return!(r&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}(e.currentTarget))return e.preventDefault();0===l.listboxState?(a.closeListbox(),s.nextFrame(()=>{var e;return null==(e=l.buttonRef.current)?void 0:e.focus({preventScroll:!0})})):(e.preventDefault(),a.openListbox())}),p=M(()=>{if(l.labelId)return[l.labelId,o].join(" ")},[l.labelId,o]),v=(0,w.useMemo)(()=>({open:0===l.listboxState,disabled:l.disabled,value:l.value}),[l]);return en({ourProps:{ref:u,id:o,type:function(e,t){let[n,r]=(0,w.useState)(()=>q(e));return N(()=>{r(q(e))},[e.type,e.as]),N(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}(e,l.buttonRef),"aria-haspopup":"listbox","aria-controls":null==(n=l.optionsRef.current)?void 0:n.id,"aria-expanded":0===l.listboxState,"aria-labelledby":p,disabled:l.disabled,onKeyDown:c,onKeyUp:d,onClick:f},theirProps:i,slot:v,defaultTag:"button",name:"Listbox.Button"})}),Label:el(function(e,t){let n=j(),{id:r="headlessui-listbox-label-".concat(n),...o}=e,i=eC("Listbox.Label"),l=eS("Listbox.Label"),a=X(i.labelRef,t);return N(()=>l.registerLabel(r),[r]),en({ourProps:{ref:a,id:r,onClick:P(()=>{var e;return null==(e=i.buttonRef.current)?void 0:e.focus({preventScroll:!0})})},theirProps:o,slot:(0,w.useMemo)(()=>({open:0===i.listboxState,disabled:i.disabled}),[i]),defaultTag:"label",name:"Listbox.Label"})}),Options:el(function(e,t){var n;let r=j(),{id:o="headlessui-listbox-options-".concat(r),...i}=e,l=eC("Listbox.Options"),a=eS("Listbox.Options"),u=X(l.optionsRef,t),s=I(),c=I(),d=ep(),f=null!==d?(d&ef.Open)===ef.Open:0===l.listboxState;(0,w.useEffect)(()=>{var e;let t=l.optionsRef.current;t&&0===l.listboxState&&t!==(null==(e=_(t))?void 0:e.activeElement)&&t.focus({preventScroll:!0})},[l.listboxState,l.optionsRef]);let p=P(e=>{switch(c.dispose(),e.key){case eg.Space:if(""!==l.searchQuery)return e.preventDefault(),e.stopPropagation(),a.search(e.key);case eg.Enter:if(e.preventDefault(),e.stopPropagation(),null!==l.activeOptionIndex){let{dataRef:e}=l.options[l.activeOptionIndex];a.onChange(e.current.value)}0===l.mode&&(a.closeListbox(),F().nextFrame(()=>{var e;return null==(e=l.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case k(l.orientation,{vertical:eg.ArrowDown,horizontal:eg.ArrowRight}):return e.preventDefault(),e.stopPropagation(),a.goToOption(em.Next);case k(l.orientation,{vertical:eg.ArrowUp,horizontal:eg.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),a.goToOption(em.Previous);case eg.Home:case eg.PageUp:return e.preventDefault(),e.stopPropagation(),a.goToOption(em.First);case eg.End:case eg.PageDown:return e.preventDefault(),e.stopPropagation(),a.goToOption(em.Last);case eg.Escape:return e.preventDefault(),e.stopPropagation(),a.closeListbox(),s.nextFrame(()=>{var e;return null==(e=l.buttonRef.current)?void 0:e.focus({preventScroll:!0})});case eg.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(a.search(e.key),c.setTimeout(()=>a.clearSearch(),350))}}),v=M(()=>{var e;return null==(e=l.buttonRef.current)?void 0:e.id},[l.buttonRef.current]),m=(0,w.useMemo)(()=>({open:0===l.listboxState}),[l]);return en({ourProps:{"aria-activedescendant":null===l.activeOptionIndex||null==(n=l.options[l.activeOptionIndex])?void 0:n.id,"aria-multiselectable":1===l.mode||void 0,"aria-labelledby":v,"aria-orientation":l.orientation,id:o,onKeyDown:p,role:"listbox",tabIndex:0,ref:u},theirProps:i,slot:m,defaultTag:"ul",features:eO,visible:f,name:"Listbox.Options"})}),Option:el(function(e,t){let n,r,o;let i=j(),{id:l="headlessui-listbox-option-".concat(i),disabled:a=!1,value:u,...s}=e,c=eC("Listbox.Option"),d=eS("Listbox.Option"),f=null!==c.activeOptionIndex&&c.options[c.activeOptionIndex].id===l,p=c.isSelected(u),v=(0,w.useRef)(null),m=(n=(0,w.useRef)(""),r=(0,w.useRef)(""),P(()=>{let e=v.current;if(!e)return"";let t=e.innerText;if(n.current===t)return r.current;let o=(function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():Z(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(", ")}return Z(e).trim()})(e).trim().toLowerCase();return n.current=t,r.current=o,o})),h=O({disabled:a,value:u,domRef:v,get textValue(){return m()}}),g=X(t,v);N(()=>{if(0!==c.listboxState||!f||0===c.activationTrigger)return;let e=F();return e.requestAnimationFrame(()=>{var e,t;null==(t=null==(e=v.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}),e.dispose},[v,f,c.listboxState,c.activationTrigger,c.activeOptionIndex]),N(()=>d.registerOption(l,h),[h,l]);let b=P(e=>{if(a)return e.preventDefault();d.onChange(u),0===c.mode&&(d.closeListbox(),F().nextFrame(()=>{var e;return null==(e=c.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))}),y=P(()=>{if(a)return d.goToOption(em.Nothing);d.goToOption(em.Specific,l)}),E=(o=(0,w.useRef)([-1,-1]),{wasMoved(e){let t=Q(e);return(o.current[0]!==t[0]||o.current[1]!==t[1])&&(o.current=t,!0)},update(e){o.current=Q(e)}}),x=P(e=>E.update(e)),R=P(e=>{E.wasMoved(e)&&(a||f||d.goToOption(em.Specific,l,0))}),L=P(e=>{E.wasMoved(e)&&(a||f&&d.goToOption(em.Nothing))}),S=(0,w.useMemo)(()=>({active:f,selected:p,disabled:a}),[f,p,a]);return en({ourProps:{id:l,ref:g,role:"option",tabIndex:!0===a?void 0:-1,"aria-disabled":!0===a||void 0,"aria-selected":p,disabled:void 0,onClick:b,onFocus:y,onPointerEnter:x,onMouseEnter:x,onPointerMove:R,onMouseMove:R,onPointerLeave:L,onMouseLeave:L},theirProps:s,slot:S,defaultTag:"li",name:"Listbox.Option"})})});var eP=n(77713),eF=n(53048),eI=n(60324),eD=n(77874),ej=n(35250),ek=n(99581);let e_=Math.min,eH=Math.max,eW=Math.abs,eB=Array.isArray,eU=setTimeout,eK=(e,t,n)=>e_(n,eH(t,e)),ez=e=>[...e].sort((e,t)=>e-t),eV="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)},eG=e=>{let t,n;return(...r)=>(t||(t=!0,n=e(...r)),n)},eq=(e,t,n)=>{let r=n?"unshift":"push";for(let n=0;n{let n=e.t[t];return -1===n?e.o:n},eX=(e,t,n)=>{let r=-1===e.t[t];return e.t[t]=n,e.i=e_(t,e.i),r},eY=(e,t)=>{if(!e.l)return 0;if(e.i>=t)return e.u[t];e.i<0&&(e.u[0]=0,e.i=0);let n=e.i,r=e.u[n];for(;n{for(;n>=0&&nt)break;n++}else n--}return eK(n,0,e.l-1)},eQ=(e,t,n)=>{let r=t-e.l;return e.i=n?-1:e_(t-1,e.i),e.l=t,r>0?(eq(e.u,r),eq(e.t,r,n),e.o*r):(e.u.splice(r),(n?e.t.splice(0,-r):e.t.splice(r)).reduce((t,n)=>t-(-1===n?e.o:n),0))},eJ="undefined"!=typeof window,e0=()=>document.documentElement,e1=e=>e.ownerDocument,e2=e=>e.defaultView,e5=eG(()=>!!eJ&&"rtl"===getComputedStyle(e0()).direction),e4=eG(()=>/iP(hone|od|ad)/.test(navigator.userAgent)),e3=eG(()=>"scrollBehavior"in e0().style),e7=e=>eH(e.h(),e._()),e6=(e,t,n,r,o)=>(1!==r&&(e-=eH(0,n)),2!==r&&(t+=eH(0,n)),[eH(e,0),e_(t,o-1)]),e8=(e,t=40,n=0,r,o=!1)=>{let i=!!n,l=[],a=0,u=0,s=0,c=0,d=0,f=0,p=0,v=0,m=0,h=i?[0,eH(n-1,0)]:null,g=[0,0],b=0,y={o:r?r[1]:t,t:r&&r[0]?eq(r[0].slice(0,e_(e,r[0].length)),eH(0,e-r[0].length)):eq([],e),l:e,i:-1,u:eq([],e)},E=new Set,x=()=>s-u,w=e=>((e,t,n,r)=>{let o=eZ(e,t,e_(n,e.l-1));return[o,eZ(e,t+r,o)]})(y,e,g[0],a),R=()=>y.l?eY(y,y.l-1)+e$(y,y.l-1):0,L=e=>eY(y,e)-f,S=e=>e$(y,e),T=e=>{e&&(e4()&&0!==v?f+=e:(d+=e,c++))};return{p:()=>l,v:()=>[[...y.t],y.o],m:()=>p?g:(g=w(eH(0,x()+f+d)),h?[e_(g[0],h[0]),eH(g[1],h[1])]:g),S:e=>-1===y.t[e],I:()=>!!a,k:()=>!!h&&y.t.slice(eH(0,h[0]-1),e_(y.l-1,h[1]+1)+1).includes(-1),R:L,C:S,M:()=>y.l,T:()=>s,H:()=>v,_:()=>a,W:()=>u,h:R,J:()=>c,B:()=>(p=d,d=0,[p,2===m||x()+a>=R()]),O(e,t){let n=[e,t];return E.add(n),()=>{E.delete(n)}},D(e,t){let n,r,C=0;switch(e){case 1:{let e=p;p=0;let n=t-s,o=eW(n);e&&o=-a&&l<=R()&&(C+=1,r=o>a);break}case 2:C=8,0!==v&&(n=!0,C+=1),v=0,m=0,h=null;break;case 3:{let e=t.filter(([e,t])=>y.t[e]!==t);if(!e.length)break;for(let[t,n]of(T(e.reduce((e,[t,n])=>((2===m||(h?ta&&(T(((e,t)=>{let n=0,r=e.t.filter((e,r)=>{let o=-1!==e;return o&&r{let t=ez(e),n=e.length/2|0;return t.length%2==0?(t[n-1]+t[n])/2:t[n]})(r))-o)*eH(t-n,0)})(y,g[0])),o=!1),C=3,r=!0;break}case 4:a!==t&&(a=t,C=3);break;case 5:t[1]?(T(eQ(y,t[0],!0)),m=2,C=1):eQ(y,t[0]);break;case 6:u=t;break;case 7:m=1;break;case 8:h=w(t),C=1}C&&(l=[],n&&f&&(d+=f,f=0,c++),E.forEach(([e,t])=>{C&e&&t(r)}))}}},e9=eJ?w.useLayoutEffect:w.useEffect,te=(e,t)=>t&&e5()?-e:e,tt=(e,t,n,r,o,i)=>{let l=Date.now,a=0,u=!1,s=!1,c=!1,d=!1,f=(()=>{let t;let n=()=>{null!=t&&clearTimeout(t)},r=()=>{n(),t=eU(()=>{t=null,(()=>{if(u||s)return u=!1,void f();c=!1,e.D(2)})()},150)};return r.L=n,r})(),p=()=>{a=l(),c&&(d=!0),i&&e.D(6,i()),e.D(1,r()),f()},v=t=>{if(u||0===e.H()||t.ctrlKey)return;let r=l()-a;150>r&&50{s=!0,c=d=!1},h=()=>{s=!1,e4()&&(c=!0)};return t.addEventListener("scroll",p),t.addEventListener("wheel",v,{passive:!0}),t.addEventListener("touchstart",m,{passive:!0}),t.addEventListener("touchend",h,{passive:!0}),{$:()=>{t.removeEventListener("scroll",p),t.removeEventListener("wheel",v),t.removeEventListener("touchstart",m),t.removeEventListener("touchend",h),f.L()},A:()=>{let[t,i]=e.B();t&&(o(te(t,n),i,d),d=!1,i&&e._()>e.h()&&e.D(1,r()))}}},tn=(e,t)=>{let n,r,o;let i=t?"scrollLeft":"scrollTop",l=t?"overflowX":"overflowY",a=async(r,l)=>{if(!n)return void eV(()=>a(r,l));o&&o();let u=()=>{let t;return[new Promise((n,r)=>{t=n,o=r,e.I()&&eU(r,150)}),e.O(2,()=>{t&&t()})]};if(l&&e3()){for(;e.D(8,r()),e.k();){let[e,t]=u();try{await e}catch(e){return}finally{t()}}n.scrollTo({[t?"left":"top"]:te(r(),t),behavior:"smooth"})}else for(;;){let[o,l]=u();try{n[i]=te(r(),t),e.D(7),await o}catch(e){return}finally{l()}}};return{P(a){n=a,r=tt(e,a,t,()=>te(a[i],t),(t,n,r)=>{if(r){let e=a.style,t=e[l];e[l]="hidden",eU(()=>{e[l]=t})}n?(a[i]=e.T()+t,o&&o()):a[i]+=t})},$(){r&&r.$()},V(e){a(()=>e)},X(t){t+=e.T(),a(()=>t)},Y(t,{align:n,smooth:r,offset:o=0}={}){if(t=eK(t,0,e.M()-1),"nearest"===n){let r=e.R(t),o=e.T();if(ro+e._()))return;n="end"}}a(()=>o+e.W()+e.R(t)+("end"===n?e.C(t)-e._():"center"===n?(e.C(t)-e._())/2:0),r)},A:()=>{r&&r.A()}}},tr="current",to=(e,t)=>{if(eB(e))for(let n of e)to(n,t);else null==e||"boolean"==typeof e||t.push(e)},ti=(e,t)=>{let n=e.key;return null!=n?n:"_"+t},tl=e=>{let t=(0,w.useRef)();return t[tr]||(t[tr]=e())},ta=e=>{let t=(0,w.useRef)(e);return e9(()=>{t[tr]=e},[e]),t},tu=e=>{let t;return{P(n){(t||(t=new(e2(e1(n))).ResizeObserver(e))).observe(n)},j(e){t.unobserve(e)},$(){t&&t.disconnect()}}},ts=(e,t)=>{let n;let r=t?"width":"height",o=new WeakMap,i=tu(t=>{let i=[];for(let{target:l,contentRect:a}of t)if(l.offsetParent){if(l===n)e.D(4,a[r]);else{let e=o.get(l);null!=e&&i.push([e,a[r]])}}i.length&&e.D(3,i)});return{q(e){i.P(n=e)},U:(e,t)=>(o.set(e,t),i.P(e),()=>{o.delete(e),i.j(e)}),$:i.$}},tc=(0,w.memo)(({F:e,G:t,K:n,N:r,Z:o,ee:i,te:l,ne:a})=>{let u=(0,w.useRef)(null);e9(()=>t(u[tr],n),[n]);let s=(0,w.useMemo)(()=>{let e={margin:0,padding:0,position:o&&a?void 0:"absolute",[l?"height":"width"]:"100%",[l?"top":"left"]:0,[l?e5()?"right":"left":"top"]:r,visibility:!o||a?"visible":"hidden"};return l&&(e.display="flex"),e},[r,o,a,l]);return(0,ej.jsx)(i,"string"==typeof i?{ref:u,style:s,children:e}:{ref:u,style:s,index:n,children:e})}),td=e=>(0,w.useReducer)(e.p,void 0,e.p)[1],tf=(e,t)=>(0,w.useMemo)(()=>{if("function"==typeof e)return[e,t||0];let n=(e=>{let t=[];return to(e,t),t})(e);return[e=>n[e],n.length]},[e,t]),tp=(0,w.forwardRef)(({children:e,count:t,overscan:n=4,keepMounted:r,itemSize:o,shift:i,horizontal:l,cache:a,startMargin:u=0,ssrCount:s,as:c="div",item:d="div",scrollRef:f,onScroll:p,onScrollEnd:v,onRangeChange:m},h)=>{let[g,b]=tf(e,t),y=(0,w.useRef)(null),E=(0,w.useRef)(!!s),x=ta(p),R=ta(v),[L,S,T,C]=tl(()=>{let e=!!l,t=e8(b,o,s,a,!o);return[t,ts(t,e),tn(t,e),e]});b!==L.M()&&L.D(5,[b,i]),u!==L.W()&&L.D(6,u);let A=td(L),[N,O]=L.m(),M=L.H(),P=L.J(),F=L.h(),I=[],[D,j]=e6(N,O,n,M,b),k=e=>{let t=g(e);return(0,ej.jsx)(tc,{G:S.U,K:e,N:L.R(e),Z:L.S(e),ee:d,F:t,te:C,ne:E[tr]},ti(t,e))};e9(()=>{E[tr]=!1;let e=L.O(1,e=>{e?(0,ek.flushSync)(A):A()}),t=L.O(4,()=>{x[tr]&&x[tr](L.T())}),n=L.O(8,()=>{R[tr]&&R[tr]()}),r=e=>{S.q(e),T.P(e)};return f?eV(()=>r(f[tr])):r(y[tr].parentElement),()=>{e(),t(),n(),S.$(),T.$()}},[]),e9(()=>{T.A()},[P]),(0,w.useEffect)(()=>{m&&m(N,O)},[N,O]),(0,w.useImperativeHandle)(h,()=>({get cache(){return L.v()},get scrollOffset(){return L.T()},get scrollSize(){return e7(L)},get viewportSize(){return L._()},getItemOffset:L.R,scrollToIndex:T.Y,scrollTo:T.V,scrollBy:T.X}),[]);for(let e=D;e<=j;e++)I.push(k(e));if(r){let e=[],t=[];ez(r).forEach(n=>{nj&&t.push(k(n))}),I.unshift(...e),I.push(...t)}return(0,ej.jsx)(c,{ref:y,style:{overflowAnchor:"none",flex:"none",position:"relative",visibility:"hidden",width:C?F:"100%",height:C?"100%":F,pointerEvents:0!==M?"none":"auto"},children:I})});var tv=n(49765),tm=n(18255);let th=(0,w.forwardRef)(function(e,t){let{__overrides:n,...r}=e,{as:o,...i}=n;return(0,ej.jsx)(o,{ref:t,...r,...i})});var tg=n(24458),tb=n(80296);function ty(e){return tx(e)?(e.nodeName||"").toLowerCase():"#document"}function tE(e){var t;return(null==e?void 0:null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function tx(e){return e instanceof Node||e instanceof tE(e).Node}function tw(e){return e instanceof Element||e instanceof tE(e).Element}function tR(e){return e instanceof HTMLElement||e instanceof tE(e).HTMLElement}function tL(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof tE(e).ShadowRoot)}function tS(e){let t=e.activeElement;for(;(null==(n=t)?void 0:null==(r=n.shadowRoot)?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function tT(e,t){if(!e||!t)return!1;let n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&tL(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function tC(e){return(null==e?void 0:e.ownerDocument)||document}function tA(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function tN(e){return"composedPath"in e?e.composedPath()[0]:e.target}function tO(e){e.preventDefault(),e.stopPropagation()}function tM(e){return tI(e)?(e.nodeName||"").toLowerCase():"#document"}function tP(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function tF(e){var t;return null==(t=(tI(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function tI(e){return e instanceof Node||e instanceof tP(e).Node}function tD(e){return e instanceof Element||e instanceof tP(e).Element}function tj(e){return e instanceof HTMLElement||e instanceof tP(e).HTMLElement}function tk(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof tP(e).ShadowRoot)}function t_(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=tK(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function tH(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function tW(e){let t=tB(),n=tD(e)?tK(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function tB(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function tU(e){return["html","body","#document"].includes(tM(e))}function tK(e){return tP(e).getComputedStyle(e)}function tz(e){return tD(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tV(e){if("html"===tM(e))return e;let t=e.assignedSlot||e.parentNode||tk(e)&&e.host||tF(e);return tk(t)?t.host:t}function tG(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=tV(t);return tU(n)?t.ownerDocument?t.ownerDocument.body:t.body:tj(n)&&t_(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=tP(o);if(i){let e=tq(l);return t.concat(l,l.visualViewport||[],t_(o)?o:[],e&&n?tG(e):[])}return t.concat(o,tG(o,[],n))}function tq(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let t$=Math.min,tX=Math.max,tY=Math.round,tZ=Math.floor,tQ=e=>({x:e,y:e}),tJ={left:"right",right:"left",bottom:"top",top:"bottom"},t0={start:"end",end:"start"};function t1(e,t){return"function"==typeof e?e(t):e}function t2(e){return e.split("-")[0]}function t5(e){return e.split("-")[1]}function t4(e){return"x"===e?"y":"x"}function t3(e){return"y"===e?"height":"width"}function t7(e){return["top","bottom"].includes(t2(e))?"y":"x"}function t6(e){return e.replace(/start|end/g,e=>t0[e])}function t8(e){return e.replace(/left|right|bottom|top/g,e=>tJ[e])}function t9(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ne(e,t,n){let r,{reference:o,floating:i}=e,l=t7(t),a=t4(t7(t)),u=t3(a),s=t2(t),c="y"===l,d=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[u]/2-i[u]/2;switch(s){case"top":r={x:d,y:o.y-i.height};break;case"bottom":r={x:d,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:f};break;case"left":r={x:o.x-i.width,y:f};break;default:r={x:o.x,y:o.y}}switch(t5(t)){case"start":r[a]-=p*(n&&c?-1:1);break;case"end":r[a]+=p*(n&&c?-1:1)}return r}let nt=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),u=await (null==l.isRTL?void 0:l.isRTL(t)),s=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=ne(s,r,u),f=r,p={},v=0;for(let n=0;ntD(e)&&"body"!==tM(e)),o=null,i="fixed"===tK(e).position,l=i?tV(e):e;for(;tD(l)&&!tU(l);){let t=tK(l),n=tW(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||t_(l)&&!n&&function e(t,n){let r=tV(t);return!(r===n||!tD(r)||tU(r))&&("fixed"===tK(r).position||e(r,n))}(e,l))?r=r.filter(e=>e!==l):o=t,l=tV(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],a=i.reduce((e,n)=>{let r=nd(t,n,o);return e.top=tX(r.top,e.top),e.right=t$(r.right,e.right),e.bottom=t$(r.bottom,e.bottom),e.left=tX(r.left,e.left),e},nd(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:nv,getElementRects:nm,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=no(e);return{width:t,height:n}},getScale:nl,isElement:tD,isRTL:function(e){return"rtl"===tK(e).direction}};function ng(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=ni(e),d=i||l?[...c?tG(c):[],...tG(t)]:[];d.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});let f=c&&u?function(e,t){let n,r=null,o=tF(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function l(a,u){void 0===a&&(a=!1),void 0===u&&(u=1),i();let{left:s,top:c,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;let p=tZ(c),v=tZ(o.clientWidth-(s+d)),m={rootMargin:-p+"px "+-v+"px "+-tZ(o.clientHeight-(c+f))+"px "+-tZ(s)+"px",threshold:tX(0,t$(1,u))||1},h=!0;function g(e){let t=e[0].intersectionRatio;if(t!==u){if(!h)return l();t?l(!1,t):n=setTimeout(()=>{l(!1,1e-7)},1e3)}h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),i}(c,n):null,p=-1,v=null;a&&(v=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),n()}),c&&!s&&v.observe(c),v.observe(t));let m=s?ns(e):null;return s&&function t(){let r=ns(e);m&&(r.x!==m.x||r.y!==m.y||r.width!==m.width||r.height!==m.height)&&n(),m=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{i&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=v)||e.disconnect(),v=null,s&&cancelAnimationFrame(o)}}let nb=(e,t,n)=>{let r=new Map,o={platform:nh,...n},i={...o.platform,_c:r};return nt(e,t,{...o,platform:i})};var ny="undefined"!=typeof document?w.useLayoutEffect:w.useEffect;function nE(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!nE(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!nE(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function nx(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nw(e,t){let n=nx(e);return Math.round(t*n)/n}function nR(e){let t=w.useRef(e);return ny(()=>{t.current=e}),t}let nL=(e,t)=>{var n;return{...(void 0===(n=e)&&(n=0),{name:"offset",options:n,async fn(e){var t,r;let{x:o,y:i,placement:l,middlewareData:a}=e,u=await nr(e,n);return l===(null==(t=a.offset)?void 0:t.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:l}}}}),options:[e,t]}},nS=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"shift",options:n,async fn(e){let{x:t,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=t1(n,e),s={x:t,y:r},c=await nn(e,u),d=t7(t2(o)),f=t4(d),p=s[f],v=s[d];if(i){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=p+c[e],r=p-c[t];p=tX(n,t$(p,r))}if(l){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",n=v+c[e],r=v-c[t];v=tX(n,t$(v,r))}let m=a.fn({...e,[f]:p,[d]:v});return{...m,data:{x:m.x-t,y:m.y-r}}}}),options:[e,t]}},nT=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"flip",options:n,async fn(e){var t,r,o,i,l;let{placement:a,middlewareData:u,rects:s,initialPlacement:c,platform:d,elements:f}=e,{mainAxis:p=!0,crossAxis:v=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...y}=t1(n,e);if(null!=(t=u.arrow)&&t.alignmentOffset)return{};let E=t2(a),x=t7(c),w=t2(c)===c,R=await (null==d.isRTL?void 0:d.isRTL(f.floating)),L=m||(w||!b?[t8(c)]:function(e){let t=t8(e);return[t6(e),t,t6(t)]}(c)),S="none"!==g;!m&&S&&L.push(...function(e,t,n,r){let o=t5(e),i=function(e,t,n){let r=["left","right"],o=["right","left"];switch(e){case"top":case"bottom":if(n)return t?o:r;return t?r:o;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(t2(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(t6)))),i}(c,b,g,R));let T=[c,...L],C=await nn(e,y),A=[],N=(null==(r=u.flip)?void 0:r.overflows)||[];if(p&&A.push(C[E]),v){let e=function(e,t,n){void 0===n&&(n=!1);let r=t5(e),o=t4(t7(e)),i=t3(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=t8(l)),[l,t8(l)]}(a,s,R);A.push(C[e[0]],C[e[1]])}if(N=[...N,{placement:a,overflows:A}],!A.every(e=>e<=0)){let e=((null==(o=u.flip)?void 0:o.index)||0)+1,t=T[e];if(t)return{data:{index:e,overflows:N},reset:{placement:t}};let n=null==(i=N.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(h){case"bestFit":{let e=null==(l=N.filter(e=>{if(S){let t=t7(e.placement);return t===x||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=c}if(a!==n)return{reset:{placement:n}}}return{}}}),options:[e,t]}},nC=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"size",options:n,async fn(e){let t,r;let{placement:o,rects:i,platform:l,elements:a}=e,{apply:u=()=>{},...s}=t1(n,e),c=await nn(e,s),d=t2(o),f=t5(o),p="y"===t7(o),{width:v,height:m}=i.floating;"top"===d||"bottom"===d?(t=d,r=f===(await (null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(r=d,t="end"===f?"top":"bottom");let h=m-c.top-c.bottom,g=v-c.left-c.right,b=t$(m-c[t],h),y=t$(v-c[r],g),E=!e.middlewareData.shift,x=b,w=y;if(p?w=f||E?t$(y,g):g:x=f||E?t$(b,h):h,E&&!f){let e=tX(c.left,0),t=tX(c.right,0),n=tX(c.top,0),r=tX(c.bottom,0);p?w=v-2*(0!==e||0!==t?e+t:tX(c.left,c.right)):x=m-2*(0!==n||0!==r?n+r:tX(c.top,c.bottom))}await u({...e,availableWidth:w,availableHeight:x});let R=await l.getDimensions(a.floating);return v!==R.width||m!==R.height?{reset:{rects:!0}}:{}}}),options:[e,t]}};var nA='input:not([inert]),select:not([inert]),textarea:not([inert]),a[href]:not([inert]),button:not([inert]),[tabindex]:not(slot):not([inert]),audio[controls]:not([inert]),video[controls]:not([inert]),[contenteditable]:not([contenteditable="false"]):not([inert]),details>summary:first-of-type:not([inert]),details:not([inert])',nN="undefined"==typeof Element,nO=nN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,nM=!nN&&Element.prototype.getRootNode?function(e){var t;return null==e?void 0:null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},nP=function e(t,n){void 0===n&&(n=!0);var r,o=null==t?void 0:null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},nF=function(e){var t,n=null==e?void 0:null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n},nI=function(e,t,n){if(nP(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(nA));return t&&nO.call(e,nA)&&r.unshift(e),r=r.filter(n)},nD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var l=i.shift();if(!nP(l,!1)){if("SLOT"===l.tagName){var a=l.assignedElements(),u=e(a.length?a:l.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:l,candidates:u})}else{nO.call(l,nA)&&r.filter(l)&&(n||!t.includes(l))&&o.push(l);var s=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),c=!nP(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(s&&c){var d=e(!0===s?l.children:s.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:l,candidates:d})}else i.unshift.apply(i,l.children)}}}return o},nj=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},nk=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||nF(e))&&!nj(e)?0:e.tabIndex},n_=function(e,t){var n=nk(e);return n<0&&t&&!nj(e)?0:n},nH=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},nW=function(e){return"INPUT"===e.tagName},nB=function(e,t){for(var n=0;nsummary:first-of-type")?e.parentElement:e;if(nO.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return nz(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,a=nM(e);if(l&&!l.shadowRoot&&!0===r(l))return nz(e);e=e.assignedSlot?e.assignedSlot:l||a===e.ownerDocument?l:a.host}e=i}if(nK(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},nG=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;nnk(t))&&(r=e,!((o=t).disabled||nP(o)||nW(o)&&"hidden"===o.type||nV(o,r)||"DETAILS"===o.tagName&&Array.prototype.slice.apply(o.children).some(function(e){return"SUMMARY"===e.tagName})||nG(o)))},n$=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||t>=0},nX=function e(t){var n=[],r=[];return t.forEach(function(t,o){var i=!!t.scopeParent,l=i?t.scopeParent:t,a=n_(l,i),u=i?e(t.candidates):l;0===a?i?n.push.apply(n,u):n.push(l):r.push({documentOrder:o,tabIndex:a,item:t,isScope:i,content:u})}),r.sort(nH).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(n)},nY=function(e,t){return nX((t=t||{}).getShadowRoot?nD([e],t.includeContainer,{filter:nq.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:n$}):nI(e,t.includeContainer,nq.bind(null,t)))};let nZ=0;function nQ(e,t){void 0===t&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(nZ);let i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():nZ=requestAnimationFrame(i)}var nJ="undefined"!=typeof document?w.useLayoutEffect:w.useEffect;function n0(){return(n0=Object.assign?Object.assign.bind():function(e){for(var t=1;t"floating-ui-"+n2++,n4=R["useId".toString()]||function(){let[e,t]=w.useState(()=>n1?n5():void 0);return nJ(()=>{null==e&&t(n5())},[]),w.useEffect(()=>{n1||(n1=!0)},[]),e},n3=w.createContext(null),n7=w.createContext(null),n6=()=>{var e;return(null==(e=w.useContext(n3))?void 0:e.id)||null},n8=()=>w.useContext(n7);function n9(e){return"data-floating-ui-"+e}function re(e){let t=(0,w.useRef)(e);return nJ(()=>{t.current=e}),t}function rt(e,t){let n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}),r=n;for(;r.length;)r=e.filter(e=>{var t;return null==(t=r)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})}),n=n.concat(r);return n}let rn=new WeakMap,rr=new WeakSet,ro={},ri=0,rl=()=>"undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,ra=e=>e&&(e.host||ra(e.parentNode)),ru=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=ra(t);return e.contains(n)?n:null}).filter(e=>null!=e);function rs(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);let r=tC(e[0]).body;return function(e,t,n,r){let o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,l=ru(t,e),a=new Set,u=new Set(l),s=[];ro[o]||(ro[o]=new WeakMap);let c=ro[o];return l.forEach(function e(t){!(!t||a.has(t))&&(a.add(t),t.parentNode&&e(t.parentNode))}),function e(t){!t||u.has(t)||Array.prototype.forEach.call(t.children,t=>{if(a.has(t))e(t);else{let e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(rn.get(t)||0)+1,l=(c.get(t)||0)+1;rn.set(t,r),c.set(t,l),s.push(t),1===r&&n&&rr.add(t),1===l&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}})}(t),a.clear(),ri++,()=>{s.forEach(e=>{let t=(rn.get(e)||0)-1,n=(c.get(e)||0)-1;rn.set(e,t),c.set(e,n),t||(!rr.has(e)&&i&&e.removeAttribute(i),rr.delete(e)),n||e.removeAttribute(o)}),--ri||(rn=new WeakMap,rn=new WeakMap,rr=new WeakSet,ro={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}let rc=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function rd(e,t){let n=nY(e,rc());"prev"===t&&n.reverse();let r=n.indexOf(tS(tC(e)));return n.slice(r+1)[0]}function rf(){return rd(document.body,"next")}function rp(){return rd(document.body,"prev")}function rv(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!tT(n,r)}let rm={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function rh(e){"Tab"===e.key&&(e.target,clearTimeout(r))}let rg=w.forwardRef(function(e,t){let[n,r]=w.useState();nJ(()=>(/apple/i.test(navigator.vendor)&&r("button"),document.addEventListener("keydown",rh),()=>{document.removeEventListener("keydown",rh)}),[]);let o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[n9("focus-guard")]:"",style:rm};return w.createElement("span",n0({},e,o))}),rb=w.createContext(null);function ry(e){let{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=function(e){let{id:t,root:n}=void 0===e?{}:e,[r,o]=w.useState(null),i=n4(),l=rE(),a=w.useMemo(()=>({id:t,root:n,portalContext:l,uniqueId:i}),[t,n,l,i]),u=w.useRef();return nJ(()=>()=>{null==r||r.remove()},[r,a]),nJ(()=>{if(u.current===a)return;u.current=a;let{id:e,root:t,portalContext:n,uniqueId:r}=a,i=e?document.getElementById(e):null,l=n9("portal");if(i){let e=document.createElement("div");e.id=r,e.setAttribute(l,""),i.appendChild(e),o(e)}else{let i=t||(null==n?void 0:n.portalNode);i&&!tw(i)&&(i=i.current),i=i||document.body;let a=null;e&&((a=document.createElement("div")).id=e,i.appendChild(a));let u=document.createElement("div");u.id=r,u.setAttribute(l,""),(i=a||i).appendChild(u),o(u)}},[a]),r}({id:n,root:r}),[l,a]=w.useState(null),u=w.useRef(null),s=w.useRef(null),c=w.useRef(null),d=w.useRef(null),f=!!l&&!l.modal&&l.open&&o&&!!(r||i);return w.useEffect(()=>{if(i&&o&&(null==l||!l.modal))return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&rv(e)&&("focusin"===e.type?function(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}:function(e){nY(e,rc()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(i)}},[i,o,null==l?void 0:l.modal]),w.createElement(rb.Provider,{value:w.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:u,afterOutsideRef:s,beforeInsideRef:c,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i])},f&&i&&w.createElement(rg,{"data-type":"outside",ref:u,onFocus:e=>{if(rv(e,i)){var t;null==(t=c.current)||t.focus()}else{let e=rp()||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),f&&i&&w.createElement("span",{"aria-owns":i.id,style:rm}),i&&(0,ek.createPortal)(t,i),f&&i&&w.createElement(rg,{"data-type":"outside",ref:s,onFocus:e=>{if(rv(e,i)){var t;null==(t=d.current)||t.focus()}else{let t=rf()||(null==l?void 0:l.refs.domReference.current);null==t||t.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent))}}}))}let rE=()=>w.useContext(rb),rx=w.forwardRef(function(e,t){return w.createElement("button",n0({},e,{type:"button",ref:t,tabIndex:-1,style:rm}))});function rw(e){var t;let{context:n,children:r,disabled:o=!1,order:i=["content"],guards:l=!0,initialFocus:a=0,returnFocus:u=!0,modal:s=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:p,nodeId:v,onOpenChange:m,events:h,dataRef:g,elements:{domReference:b,floating:y}}=n,E=!rl()||l,x=re(i),R=re(a),L=re(u),S=n8(),T=rE(),C="number"==typeof a&&a<0,A=w.useRef(null),N=w.useRef(null),O=w.useRef(!1),M=w.useRef(null),P=w.useRef(!1),F=null!=T,I=b&&"combobox"===b.getAttribute("role")&&tR(t=b)&&t.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")&&C,D=w.useCallback(function(e){return void 0===e&&(e=y),e?nY(e,rc()):[]},[y]),j=w.useCallback(e=>{let t=D(e);return x.current.map(e=>b&&"reference"===e?b:y&&"floating"===e?y:t).filter(Boolean).flat()},[b,y,x,D]);function k(e){return!o&&c&&s?w.createElement(rx,{ref:"start"===e?A:N,onClick:e=>m(!1,e.nativeEvent)},"string"==typeof c?c:"Dismiss"):null}w.useEffect(()=>{if(o||!s)return;function e(e){if("Tab"===e.key){tT(y,tS(tC(y)))&&0===D().length&&!I&&tO(e);let t=j(),n=tN(e);"reference"===x.current[0]&&n===b&&(tO(e),e.shiftKey?nQ(t[t.length-1]):nQ(t[1])),"floating"===x.current[1]&&n===y&&e.shiftKey&&(tO(e),nQ(t[0]))}}let t=tC(y);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[o,b,y,s,x,p,I,D,j]),w.useEffect(()=>{if(!o&&d&&y&&tR(b))return b.addEventListener("focusout",t),b.addEventListener("pointerdown",e),s||y.addEventListener("focusout",t),()=>{b.removeEventListener("focusout",t),b.removeEventListener("pointerdown",e),s||y.removeEventListener("focusout",t)};function e(){P.current=!0,setTimeout(()=>{P.current=!1})}function t(e){let t=e.relatedTarget;queueMicrotask(()=>{let n=!(tT(b,t)||tT(y,t)||tT(t,y)||tT(null==T?void 0:T.portalNode,t)||null!=t&&t.hasAttribute(n9("focus-guard"))||S&&(rt(S.nodesRef.current,v).find(e=>{var n,r;return tT(null==(n=e.context)?void 0:n.elements.floating,t)||tT(null==(r=e.context)?void 0:r.elements.domReference,t)})||(function(e,t){var n;let r=[],o=null==(n=e.find(e=>e.id===t))?void 0:n.parentId;for(;o;){let t=e.find(e=>e.id===o);o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r})(S.nodesRef.current,v).find(e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t})));t&&n&&!P.current&&t!==M.current&&(O.current=!0,m(!1,e))})}},[o,b,y,s,v,S,T,m,d]),w.useEffect(()=>{var e;if(o)return;let t=Array.from((null==T?void 0:null==(e=T.portalNode)?void 0:e.querySelectorAll("["+n9("portal")+"]"))||[]);if(y){let e=[y,...t,A.current,N.current,x.current.includes("reference")||I?b:null].filter(e=>null!=e),n=s?rs(e,E,!E):rs(e);return()=>{n()}}},[o,b,y,s,x,T,I,E]),nJ(()=>{if(o||!y)return;let e=tS(tC(y));queueMicrotask(()=>{let t=j(y),n=R.current,r=("number"==typeof n?t[n]:n.current)||y,o=tT(y,e);C||o||!f||nQ(r,{preventScroll:r===y})})},[o,f,y,C,j,R]),nJ(()=>{if(o||!y)return;let e=!1,t=tC(y),n=tS(t),r=g.current;function i(t){if("escapeKey"===t.type&&p.domReference.current&&(M.current=p.domReference.current),["referencePress","escapeKey"].includes(t.type))return;let n=t.data.returnFocus;"object"==typeof n?(O.current=!1,e=n.preventScroll):O.current=!n}return M.current=n,h.on("dismiss",i),()=>{h.off("dismiss",i);let n=tS(t);(tT(y,n)||S&&rt(S.nodesRef.current,v).some(e=>{var t;return tT(null==(t=e.context)?void 0:t.elements.floating,n)})||r.openEvent&&["click","mousedown"].includes(r.openEvent.type))&&p.domReference.current&&(M.current=p.domReference.current),L.current&&tR(M.current)&&!O.current&&nQ(M.current,{cancelPrevious:!1,preventScroll:e})}},[o,y,L,g,p,h,S,v]),nJ(()=>{if(!o&&T)return T.setFocusManagerState({modal:s,closeOnFocusOut:d,open:f,onOpenChange:m,refs:p}),()=>{T.setFocusManagerState(null)}},[o,T,s,f,m,p,d]),nJ(()=>{if(!o&&y&&"function"==typeof MutationObserver&&!C){let e=()=>{let e=y.getAttribute("tabindex");x.current.includes("floating")||tS(tC(y))!==p.domReference.current&&0===D().length?"0"!==e&&y.setAttribute("tabindex","0"):"-1"!==e&&y.setAttribute("tabindex","-1")};e();let t=new MutationObserver(e);return t.observe(y,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}},[o,y,p,x,D,C]);let _=!o&&E&&!I&&(F||s);return w.createElement(w.Fragment,null,_&&w.createElement(rg,{"data-type":"inside",ref:null==T?void 0:T.beforeInsideRef,onFocus:e=>{if(s){let e=j();nQ("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=T&&T.preserveTabOrder&&T.portalNode){if(O.current=!1,rv(e,T.portalNode)){let e=rf()||b;null==e||e.focus()}else{var t;null==(t=T.beforeOutsideRef.current)||t.focus()}}}}),!I&&k("start"),r,k("end"),_&&w.createElement(rg,{"data-type":"inside",ref:null==T?void 0:T.afterInsideRef,onFocus:e=>{if(s)nQ(j()[0]);else if(null!=T&&T.preserveTabOrder&&T.portalNode){if(d&&(O.current=!0),rv(e,T.portalNode)){let e=rp()||b;null==e||e.focus()}else{var t;null==(t=T.afterOutsideRef.current)||t.focus()}}}}))}let rR=R["useInsertionEffect".toString()]||(e=>e());function rL(e){let t=w.useRef(()=>{});return rR(()=>{t.current=e}),w.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r{var t,n;return{escapeKeyBubbles:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePressBubbles:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function rA(e,t){void 0===t&&(t={});let{open:n,onOpenChange:r,events:o,nodeId:i,elements:{reference:l,domReference:a,floating:u},dataRef:s}=e,{enabled:c=!0,escapeKey:d=!0,outsidePress:f=!0,outsidePressEvent:p="pointerdown",referencePress:v=!1,referencePressEvent:m="pointerdown",ancestorScroll:h=!1,bubbles:g}=t,b=n8(),y=null!=n6(),E=rL("function"==typeof f?f:()=>!1),x="function"==typeof f?E:f,R=w.useRef(!1),{escapeKeyBubbles:L,outsidePressBubbles:S}=rC(g),T=rL(e=>{if(!n||!c||!d||"Escape"!==e.key)return;let t=b?rt(b.nodesRef.current,i):[];if(!L&&(e.stopPropagation(),t.length>0)){let e=!0;if(t.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,"nativeEvent"in e?e.nativeEvent:e)}),C=rL(e=>{var t;let n=R.current;if(R.current=!1,n||"function"==typeof x&&!x(e))return;let l=tN(e),s="["+n9("inert")+"]",c=tC(u).querySelectorAll(s),d=tw(l)?l:null;for(;d&&!["html","body","#document"].includes(ty(d));){let e=function(e){var t;if("html"===ty(e))return e;let n=e.assignedSlot||e.parentNode||tL(e)&&e.host||(null==(t=(tx(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement);return tL(n)?n.host:n}(d);if(e!==tC(u).body&&tw(e))d=e;else break}if(c.length&&tw(l)&&!l.matches("html,body")&&!tT(l,u)&&Array.from(c).every(e=>!tT(d,e)))return;if(tR(l)&&u){let t=l.clientWidth>0&&l.scrollWidth>l.clientWidth,n=l.clientHeight>0&&l.scrollHeight>l.clientHeight,r=n&&e.offsetX>l.clientWidth;if(n&&"rtl"===tE(l).getComputedStyle(l).direction&&(r=e.offsetX<=l.offsetWidth-l.clientWidth),r||t&&e.offsetY>l.clientHeight)return}let f=b&&rt(b.nodesRef.current,i).some(t=>{var n;return tA(e,null==(n=t.context)?void 0:n.elements.floating)});if(tA(e,u)||tA(e,a)||f)return;let p=b?rt(b.nodesRef.current,i):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:y?{preventScroll:!0}:function(e){if(0===e.mozInputSource&&e.isTrusted)return!0;let t=/Android/i;return(t.test(function(){let e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}())||t.test(function(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}()))&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType}(e)||0===(t=e).width&&0===t.height||1===t.width&&1===t.height&&0===t.pressure&&0===t.detail&&"mouse"!==t.pointerType||t.width<1&&t.height<1&&0===t.pressure&&0===t.detail}}),r(!1,e)});return w.useEffect(()=>{if(!n||!c)return;function e(e){r(!1,e)}s.current.__escapeKeyBubbles=L,s.current.__outsidePressBubbles=S;let t=tC(u);d&&t.addEventListener("keydown",T),x&&t.addEventListener(p,C);let o=[];return h&&(tw(a)&&(o=tG(a)),tw(u)&&(o=o.concat(tG(u))),!tw(l)&&l&&l.contextElement&&(o=o.concat(tG(l.contextElement)))),(o=o.filter(e=>{var n;return e!==(null==(n=t.defaultView)?void 0:n.visualViewport)})).forEach(t=>{t.addEventListener("scroll",e,{passive:!0})}),()=>{d&&t.removeEventListener("keydown",T),x&&t.removeEventListener(p,C),o.forEach(t=>{t.removeEventListener("scroll",e)})}},[s,u,a,l,d,x,p,n,r,h,c,L,S,T,C]),w.useEffect(()=>{R.current=!1},[x,p]),w.useMemo(()=>c?{reference:{onKeyDown:T,[rS[m]]:e=>{v&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,e.nativeEvent))}},floating:{onKeyDown:T,[rT[p]]:()=>{R.current=!0}}}:{},[c,o,v,p,m,r,T])}function rN(e){var t;void 0===e&&(e={});let{open:n=!1,onOpenChange:r,nodeId:o}=e,[i,l]=w.useState(null),a=(null==(t=e.elements)?void 0:t.reference)||i,u=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:a=!0,whileElementsMounted:u,open:s}=e,[c,d]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=w.useState(r);nE(f,r)||p(r);let[v,m]=w.useState(null),[h,g]=w.useState(null),b=w.useCallback(e=>{e!==R.current&&(R.current=e,m(e))},[]),y=w.useCallback(e=>{e!==L.current&&(L.current=e,g(e))},[]),E=i||v,x=l||h,R=w.useRef(null),L=w.useRef(null),S=w.useRef(c),T=null!=u,C=nR(u),A=nR(o),N=w.useCallback(()=>{if(!R.current||!L.current)return;let e={placement:t,strategy:n,middleware:f};A.current&&(e.platform=A.current),nb(R.current,L.current,e).then(e=>{let t={...e,isPositioned:!0};O.current&&!nE(S.current,t)&&(S.current=t,ek.flushSync(()=>{d(t)}))})},[f,t,n,A]);ny(()=>{!1===s&&S.current.isPositioned&&(S.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[s]);let O=w.useRef(!1);ny(()=>(O.current=!0,()=>{O.current=!1}),[]),ny(()=>{if(E&&(R.current=E),x&&(L.current=x),E&&x){if(C.current)return C.current(E,x,N);N()}},[E,x,N,C,T]);let M=w.useMemo(()=>({reference:R,floating:L,setReference:b,setFloating:y}),[b,y]),P=w.useMemo(()=>({reference:E,floating:x}),[E,x]),F=w.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=nw(P.floating,c.x),r=nw(P.floating,c.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...nx(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,a,P.floating,c.x,c.y]);return w.useMemo(()=>({...c,update:N,refs:M,elements:P,floatingStyles:F}),[c,N,M,P,F])}(e),s=n8(),c=rL((e,t)=>{e&&(f.current.openEvent=t),null==r||r(e,t)}),d=w.useRef(null),f=w.useRef({}),p=w.useState(()=>(function(){let e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter(e=>e!==n))||[])}}})())[0],v=n4(),m=w.useCallback(e=>{let t=tw(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u.refs.setReference(t)},[u.refs]),h=w.useCallback(e=>{(tw(e)||null===e)&&(d.current=e,l(e)),(tw(u.refs.reference.current)||null===u.refs.reference.current||null!==e&&!tw(e))&&u.refs.setReference(e)},[u.refs]),g=w.useMemo(()=>({...u.refs,setReference:h,setPositionReference:m,domReference:d}),[u.refs,h,m]),b=w.useMemo(()=>({...u.elements,domReference:a}),[u.elements,a]),y=w.useMemo(()=>({...u,refs:g,elements:b,dataRef:f,nodeId:o,floatingId:v,events:p,open:n,onOpenChange:c}),[u,o,v,p,n,c,g,b]);return nJ(()=>{let e=null==s?void 0:s.nodesRef.current.find(e=>e.id===o);e&&(e.context=y)}),w.useMemo(()=>({...u,context:y,refs:g,elements:b}),[u,g,b,y])}function rO(e,t,n){let r=new Map;return{..."floating"===n&&{tabIndex:-1},...e,...t.map(e=>e?e[n]:null).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,o]=t;if(0===n.indexOf("on")){if(r.has(n)||r.set(n,[]),"function"==typeof o){var i;null==(i=r.get(n))||i.push(o),e[n]=function(){for(var e,t=arguments.length,o=Array(t),i=0;ie(...o)).find(e=>void 0!==e)}}}else e[n]=o}),e),{})}}function rM(e){void 0===e&&(e=[]);let t=e,n=w.useCallback(t=>rO(t,e,"reference"),t),r=w.useCallback(t=>rO(t,e,"floating"),t),o=w.useCallback(t=>rO(t,e,"item"),e.map(e=>null==e?void 0:e.item));return w.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}function rP(e,t){void 0===t&&(t={});let{open:n,floatingId:r}=e,{enabled:o=!0,role:i="dialog"}=t,l=n4();return w.useMemo(()=>{let e={id:r,role:i};return o?"tooltip"===i?{reference:{"aria-describedby":n?r:void 0},floating:e}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":"alertdialog"===i?"dialog":i,"aria-controls":n?r:void 0,..."listbox"===i&&{role:"combobox"},..."menu"===i&&{id:l}},floating:{...e,..."menu"===i&&{"aria-labelledby":l}}}:{}},[o,i,n,r,l])}function rF(){let e=(0,w.useRef)(!1);return N(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function rI(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0&&e.classList.add(...n)}function rD(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0&&e.classList.remove(...n)}function rj(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(/\s+/).filter(e=>e.length>1)}let rk=(0,w.createContext)(null);rk.displayName="TransitionContext";var r_=((E=r_||{}).Visible="visible",E.Hidden="hidden",E);let rH=(0,w.createContext)(null);function rW(e){return"children"in e?rW(e.children):e.current.filter(e=>{let{el:t}=e;return null!==t.current}).filter(e=>{let{state:t}=e;return"visible"===t}).length>0}function rB(e,t){let n=O(e),r=(0,w.useRef)([]),o=rF(),i=I(),l=P(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:et.Hidden,l=r.current.findIndex(t=>{let{el:n}=t;return n===e});-1!==l&&(k(t,{[et.Unmount](){r.current.splice(l,1)},[et.Hidden](){r.current[l].state="hidden"}}),i.microTask(()=>{var e;!rW(r)&&o.current&&(null==(e=n.current)||e.call(n))}))}),a=P(e=>{let t=r.current.find(t=>{let{el:n}=t;return n===e});return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>l(e,et.Unmount)}),u=(0,w.useRef)([]),s=(0,w.useRef)(Promise.resolve()),c=(0,w.useRef)({enter:[],leave:[],idle:[]}),d=P((e,n,r)=>{u.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(t=>{let[n]=t;return n!==e})),null==t||t.chains.current[n].push([e,new Promise(e=>{u.current.push(e)})]),null==t||t.chains.current[n].push([e,new Promise(e=>{Promise.all(c.current[n].map(e=>{let[t,n]=e;return n})).then(()=>e())})]),"enter"===n?s.current=s.current.then(()=>null==t?void 0:t.wait.current).then(()=>r(n)):r(n)}),f=P((e,t,n)=>{Promise.all(c.current[t].splice(0).map(e=>{let[t,n]=e;return n})).then(()=>{var e;null==(e=u.current.shift())||e()}).then(()=>n(t))});return(0,w.useMemo)(()=>({children:r,register:a,unregister:l,onStart:d,onStop:f,wait:s,chains:c}),[a,l,r,d,f,c,s])}function rU(){}rH.displayName="NestingContext";let rK=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function rz(e){var t;let n={};for(let r of rK)n[r]=null!=(t=e[r])?t:rU;return n}let rV=ee.RenderStrategy,rG=el(function(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,l=(0,w.useRef)(null),a=X(l,t);D();let u=ep();if(void 0===n&&null!==u&&(n=(u&ef.Open)===ef.Open),![!0,!1].includes(n))throw Error("A is used but it is missing a `show={true | false}` prop.");let[s,c]=(0,w.useState)(n?"visible":"hidden"),d=rB(()=>{c("hidden")}),[f,p]=(0,w.useState)(!0),v=(0,w.useRef)([n]);N(()=>{!1!==f&&v.current[v.current.length-1]!==n&&(v.current.push(n),p(!1))},[v,n]);let m=(0,w.useMemo)(()=>({show:n,appear:r,initial:f}),[n,r,f]);(0,w.useEffect)(()=>{if(n)c("visible");else if(rW(d)){let e=l.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&c("hidden")}else c("hidden")},[n,d]);let h={unmount:o},g=P(()=>{var t;f&&p(!1),null==(t=e.beforeEnter)||t.call(e)}),b=P(()=>{var t;f&&p(!1),null==(t=e.beforeLeave)||t.call(e)});return w.createElement(rH.Provider,{value:d},w.createElement(rk.Provider,{value:m},en({ourProps:{...h,as:w.Fragment,children:w.createElement(rq,{ref:a,...h,...i,beforeEnter:g,beforeLeave:b})},theirProps:{},defaultTag:w.Fragment,features:rV,visible:"visible"===s,name:"Transition"})))}),rq=el(function(e,t){var n,r,o;let i;let{beforeEnter:l,afterEnter:a,beforeLeave:u,afterLeave:s,enter:c,enterFrom:d,enterTo:f,entered:p,leave:v,leaveFrom:m,leaveTo:h,...g}=e,b=(0,w.useRef)(null),y=X(b,t),E=null==(n=g.unmount)||n?et.Unmount:et.Hidden,{show:x,appear:R,initial:L}=function(){let e=(0,w.useContext)(rk);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[S,T]=(0,w.useState)(x?"visible":"hidden"),C=function(){let e=(0,w.useContext)(rH);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:A,unregister:M}=C;(0,w.useEffect)(()=>A(b),[A,b]),(0,w.useEffect)(()=>{if(E===et.Hidden&&b.current){if(x&&"visible"!==S){T("visible");return}return k(S,{hidden:()=>M(b),visible:()=>A(b)})}},[S,b,A,M,x,E]);let j=O({base:rj(g.className),enter:rj(c),enterFrom:rj(d),enterTo:rj(f),entered:rj(p),leave:rj(v),leaveFrom:rj(m),leaveTo:rj(h)}),_=(o={beforeEnter:l,afterEnter:a,beforeLeave:u,afterLeave:s},i=(0,w.useRef)(rz(o)),(0,w.useEffect)(()=>{i.current=rz(o)},[o]),i),H=D();(0,w.useEffect)(()=>{if(H&&"visible"===S&&null===b.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[b,S,H]);let W=R&&x&&L,B=H&&(!L||R)?x?"enter":"leave":"idle",U=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,n]=(0,w.useState)(e),r=rF(),o=(0,w.useCallback)(e=>{r.current&&n(t=>t|e)},[t,r]),i=(0,w.useCallback)(e=>!!(t&e),[t]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:(0,w.useCallback)(e=>{r.current&&n(t=>t&~e)},[n,r]),toggleFlag:(0,w.useCallback)(e=>{r.current&&n(t=>t^e)},[n])}}(0),K=P(e=>k(e,{enter:()=>{U.addFlag(ef.Opening),_.current.beforeEnter()},leave:()=>{U.addFlag(ef.Closing),_.current.beforeLeave()},idle:()=>{}})),z=P(e=>k(e,{enter:()=>{U.removeFlag(ef.Opening),_.current.afterEnter()},leave:()=>{U.removeFlag(ef.Closing),_.current.afterLeave()},idle:()=>{}})),V=rB(()=>{T("hidden"),M(b)},C),G=(0,w.useRef)(!1);!function(e){let{immediate:t,container:n,direction:r,classes:o,onStart:i,onStop:l}=e,a=rF(),u=I(),s=O(r);N(()=>{t&&(s.current="enter")},[t]),N(()=>{let e=F();u.add(e.dispose);let t=n.current;if(t&&"idle"!==s.current&&a.current){var r,c,d;let n,a,u,f,p,v,m;return e.dispose(),i.current(s.current),e.add((r=o.current,c="enter"===s.current,d=()=>{e.dispose(),l.current(s.current)},a=c?"enter":"leave",u=F(),f=void 0!==d?(n={called:!1},function(){for(var e=arguments.length,t=Array(e),r=0;r{},"enter"===a&&(t.removeAttribute("hidden"),t.style.display=""),p=k(a,{enter:()=>r.enter,leave:()=>r.leave}),v=k(a,{enter:()=>r.enterTo,leave:()=>r.leaveTo}),m=k(a,{enter:()=>r.enterFrom,leave:()=>r.leaveFrom}),rD(t,...r.base,...r.enter,...r.enterTo,...r.enterFrom,...r.leave,...r.leaveFrom,...r.leaveTo,...r.entered),rI(t,...r.base,...p,...m),u.nextFrame(()=>{rD(t,...r.base,...p,...m),rI(t,...r.base,...p,...v),function(e,t){let n=F();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(e=>{let[t=0]=e.split(",").filter(Boolean).map(e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e)).sort((e,t)=>t-e);return t}),a=i+l;if(0!==a){n.group(n=>{n.setTimeout(()=>{t(),n.dispose()},a),n.addEventListener(e,"transitionrun",e=>{e.target===e.currentTarget&&n.dispose()})});let r=n.addEventListener(e,"transitionend",e=>{e.target===e.currentTarget&&(t(),r())})}else t();n.add(()=>t()),n.dispose}(t,()=>(rD(t,...r.base,...p),rI(t,...r.base,...r.entered),f()))}),u.dispose)),e.dispose}},[r])}({immediate:W,container:b,classes:j,direction:B,onStart:O(e=>{G.current=!0,V.onStart(b,e,K)}),onStop:O(e=>{G.current=!1,V.onStop(b,e,z),"leave"!==e||rW(V)||(T("hidden"),M(b))})});let q=g;return W?q={...q,className:J(g.className,...j.current.enter,...j.current.enterFrom)}:G.current&&(q.className=J(g.className,null==(r=b.current)?void 0:r.className),""===q.className&&delete q.className),w.createElement(rH.Provider,{value:V},w.createElement(ev,{value:k(S,{visible:ef.Open,hidden:ef.Closed})|U.flags},en({ourProps:{ref:y},theirProps:q,defaultTag:"div",features:rV,visible:"visible"===S,name:"Transition.Child"})))}),r$=el(function(e,t){let n=null!==(0,w.useContext)(rk),r=null!==ep();return w.createElement(w.Fragment,null,!n&&r?w.createElement(rG,{ref:t,...e}):w.createElement(rq,{ref:t,...e}))}),rX=Object.assign(rG,{Child:r$,Root:rG});var rY=n(21096),rZ=n(29406),rQ=n(27823),rJ=n(77296),r0=n(3873),r1=n(72602);function r2(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function r5(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function r4(e,t){let n=e;for(r5(n,t)&&(n=n.parentElement);n&&!r5(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}let r3="undefined"!=typeof document&&window.visualViewport,r7=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),r6=0;function r8(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function r9(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function oe(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=r4(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;r>n+e.clientHeight&&(t.scrollTop+=r-n)}e=t.parentElement}}function ot(e){return e instanceof HTMLInputElement&&!r7.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function on(){return!function(e={}){let{isDisabled:t}=e;(0,r0.b)(()=>{if(!t){let e,t,n,r,i;return 1==++r6&&(o=(0,r1.gn)()?(n=null,r=()=>{if(n)return;let e=window.pageXOffset,t=window.pageYOffset;n=r2(r9(window,"scroll",()=>{window.scrollTo(0,0)}),r8(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),r8(document.documentElement,"overflow","hidden"),r8(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)},i=r2(r9(document,"touchstart",n=>{((e=r4(n.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=r8(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),r9(document,"touchmove",t=>{if(!e||e===document.documentElement||e===document.body){t.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault()},{passive:!1,capture:!0}),r9(document,"touchend",e=>{let n=e.target;ot(n)&&n!==document.activeElement&&(e.preventDefault(),r(),n.style.transform="translateY(-2000px)",n.focus(),requestAnimationFrame(()=>{n.style.transform=""})),t&&t()},{passive:!1,capture:!0}),r9(document,"focus",e=>{let t=e.target;ot(t)&&(r(),t.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{t.style.transform="",r3&&(r3.height{oe(t)}):r3.addEventListener("resize",()=>oe(t),{once:!0}))}))},!0)),()=>{null==t||t(),null==n||n(),i()}):r2(r8(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),r8(document.documentElement,"overflow","hidden"))),()=>{0==--r6&&o()}}},[t])}(),null}var or=n(65163);function oo(e){let{open:t,renderTrigger:n,title:r,initialFocusRef:o,padding:i="md",children:l,onClose:a,onCloseEnd:u}=e;(0,w.useEffect)(()=>{if("virtualKeyboard"in navigator){let e=navigator.virtualKeyboard,t=e.overlaysContent;return e.overlaysContent=!0,()=>{e.overlaysContent=t}}},[]);let{refs:s,context:c}=rN({open:t,onOpenChange:e=>{e||null==a||a()}}),{getReferenceProps:d,getFloatingProps:f}=rM([rA(c),rP(c)]),[p,v]=(0,w.useState)(0),{theme:m,screenMode:h}=(0,rZ.F)();return(0,ej.jsxs)(ej.Fragment,{children:[t?(0,ej.jsx)(on,{}):null,null==n?void 0:n({ref:s.setReference,getInteractionProps:d}),(0,ej.jsx)(ry,{children:(0,ej.jsx)(rQ.f,{theme:"personal",screenMode:"personal"===m?h:"light",isNotRootProvider:!0,children:(0,ej.jsxs)(rX,{show:t,className:"np-bottom-sheet-v2-container",beforeEnter:()=>{v(e=>e+1)},afterLeave:u,children:[(0,ej.jsx)(rX.Child,{className:"np-bottom-sheet-v2-backdrop",enterFrom:"np-bottom-sheet-v2-backdrop--closed",leaveTo:"np-bottom-sheet-v2-backdrop--closed"}),(0,ej.jsx)("div",{className:"np-bottom-sheet-v2",children:(0,ej.jsx)(rY.MT,{children:(0,ej.jsx)(rw,{context:c,initialFocus:o,children:(0,ej.jsx)(w.Fragment,{children:(0,ej.jsxs)(rX.Child,{ref:s.setFloating,className:"np-bottom-sheet-v2-content",enterFrom:"np-bottom-sheet-v2-content--closed",leaveTo:"np-bottom-sheet-v2-content--closed",...f(),children:[(0,ej.jsx)("div",{className:"np-bottom-sheet-v2-header",children:(0,ej.jsx)(rJ.P,{size:or.$.SMALL,onClick:()=>{null==a||a()}})}),(0,ej.jsxs)("div",{className:(0,eF.W)("np-bottom-sheet-v2-content-inner",r&&"np-bottom-sheet-v2-content-inner--has-title","md"===i&&"np-bottom-sheet-v2-content-inner--padding-md"),children:[r?(0,ej.jsx)("h2",{className:"np-bottom-sheet-v2-title np-text-title-body",children:r}):null,(0,ej.jsx)("div",{className:"np-bottom-sheet-v2-body np-text-body-default",children:l})]})]})},p)})})})]})})})]})}var oi=n(30536),ol=n(56229);let oa=(0,w.forwardRef)(function(e,t){let{size:n="md",className:r,style:o,...i}=e,l=(0,oi.C)();return(0,ej.jsx)("button",{ref:t,type:"button",className:(0,eF.W)(r,(0,ol.H)({size:n}),"np-button-input"),style:{...l,...o},...i})});function ou(e){let{placement:t,open:n,renderTrigger:r,title:o,size:i="md",padding:l="md",children:a,onClose:u,onCloseEnd:s}=e,{refs:c,floatingStyles:d,context:f}=rN({placement:t,middleware:[nL(8),nT({padding:16,crossAxis:!1}),nS(),nC({padding:16,apply:e=>{let{elements:t,rects:n,availableHeight:r}=e;t.floating.style.setProperty("--max-height","".concat(r,"px")),t.floating.style.setProperty("--width","".concat(n.reference.width,"px"))}})],whileElementsMounted:ng,open:n,onOpenChange:e=>{e||null==u||u()}}),p=rA(f),{getReferenceProps:v,getFloatingProps:m}=rM([rP(f),p]),[h,g]=(0,w.useState)(0),{theme:b,screenMode:y}=(0,rZ.F)();return(0,ej.jsxs)(ej.Fragment,{children:[n?(0,ej.jsx)(on,{}):null,r({ref:c.setReference,getInteractionProps:v}),(0,ej.jsx)(ry,{children:(0,ej.jsx)(rQ.f,{theme:"personal",screenMode:"personal"===b?y:"light",isNotRootProvider:!0,children:(0,ej.jsx)(rX,{show:n,leave:"transition-opacity",leaveTo:"opacity-0",beforeEnter:()=>{g(e=>e+1)},afterLeave:s,children:(0,ej.jsx)(rY.MT,{children:(0,ej.jsx)(rw,{context:f,children:(0,ej.jsx)("div",{ref:c.setFloating,className:(0,eF.W)("np-popover-v2-container",{"np-popover-v2-container--size-md":"md"===i,"np-popover-v2-container--size-lg":"lg"===i}),style:d,...m(),children:(0,ej.jsxs)("div",{className:(0,eF.W)("np-popover-v2",o&&"np-popover-v2--has-title",{"np-popover-v2--padding-md":"md"===l}),children:[o?(0,ej.jsx)("h2",{className:"np-popover-v2-title np-text-title-body",children:o}):null,(0,ej.jsx)("div",{className:"np-popover-v2-content np-text-body-default",children:a})]})},h)})})})})})]})}var os=n(92446),oc=n(51778);let od=(0,w.forwardRef)(function(e,t){let{shape:n="pill",size:r=or.$.MEDIUM,disabled:o,className:i,...l}=e;return(0,ej.jsx)(oi.B,{addonStart:{content:(0,ej.jsx)(eP.Search,{size:r===or.$.SMALL?16:24}),initialContentWidth:r===or.$.SMALL?16:24},disabled:o,className:i,children:(0,ej.jsx)(oc.I,{ref:t,role:"searchbox",inputMode:"search",shape:n,size:r,...l})})});var of=(0,n(5532).vU)({noResultsFound:{id:"neptune.SelectInput.noResultsFound"}});function op(e){return e.trim().replace(/\s+/gu," ").normalize("NFKC").toLowerCase()}function ov(e,t){return t.has(e.value)?{...e,value:void 0}:(t.add(e.value),e)}function om(e,t){var n,r;return("string"==typeof(r=null!==(n=e.filterMatchers)&&void 0!==n?n:e.value)?[op(r)]:"object"==typeof r&&null!=r?Object.values(r).filter(e=>"string"==typeof e).map(e=>op(e)):[]).some(e=>e.includes(t))}let oh=e=>{let{content:t,placeholderShown:n,clear:r,disabled:o,size:i,className:l}=e;return(0,ej.jsx)(oi.B,{addonEnd:{content:(0,ej.jsxs)("span",{className:(0,eF.W)("np-select-input-addon-container",o&&"disabled"),children:[null==r||n?null:(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)(og,{onClick:e=>{e.preventDefault(),r()}}),(0,ej.jsx)("span",{className:"np-select-input-addon-separator"})]}),(0,ej.jsx)("span",{className:"np-select-input-addon",children:(0,ej.jsx)(eP.ChevronDown,{size:16})})]}),initialContentWidth:28,padding:"sm"},disabled:o,className:l,children:(0,ej.jsx)(ox,{as:oa,size:i,children:(0,ej.jsx)("span",{className:(0,eF.W)("np-select-input-content",n&&"np-select-input-placeholder"),children:t})})})};function og(e){let{className:t,onClick:n}=e,r=(0,eD.Z)();return(0,ej.jsx)("button",{type:"button","aria-label":r.formatMessage(tb.Z.ariaLabel),className:(0,eF.W)(t,"np-select-input-addon np-select-input-addon--interactive"),onClick:n,children:(0,ej.jsx)(eP.Cross,{size:16})})}let ob=()=>{};function oy(e){let{id:t,name:n,multiple:r,placeholder:o,items:i,defaultValue:l,value:a,compareValues:u,renderValue:s=String,renderFooter:c,renderTrigger:d=oh,filterable:f,filterPlaceholder:p,disabled:v,size:m="md",className:h,UNSAFE_triggerButtonProps:g,onFilterChange:b=ob,onChange:y,onClose:E,onClear:x}=e,R=(0,os.sU)({nonLabelable:!0}),L=null!=t?t:R.id,[S,T]=(0,w.useState)(!1),C=(0,w.useRef)(!1),A=(0,tv.i)(null!=E?E:()=>{});(0,w.useEffect)(()=>{C.current?S||null==A||A():C.current=!0},[A,S]);let[N,O]=(0,w.useState)(""),M=(0,w.useDeferredValue)(N),P=(0,tv.i)(e=>{O(e),e!==N&&b({query:e,queryNormalized:e?op(e):null})}),F=(0,w.useRef)(null),I=(0,tm.e)(tg.U.SMALL)?ou:oo,D=(0,w.useRef)(null),j=(0,w.useRef)(null),k=f?D:j,_=()=>(null==g?void 0:g["aria-label"])?{listBoxLabel:g["aria-label"]}:(null==g?void 0:g["aria-labelledby"])?{listBoxLabelledBy:g["aria-labelledby"]}:R["aria-labelledby"]?{listBoxLabelledBy:R["aria-labelledby"]}:{};return(0,ej.jsx)(eM,{name:n,multiple:r,defaultValue:l,value:a,by:u,disabled:v,onChange:e=>{r||T(!1),null==y||y(e)},children:e=>{let{disabled:t,value:n}=e,l=r&&Array.isArray(n)?0===n.length:null==n;return(0,ej.jsx)(I,{placement:"bottom-start",open:S,renderTrigger:e=>{let{ref:i,getInteractionProps:a}=e;return(0,ej.jsx)(oE.Provider,{value:{ref:e=>{i(e),F.current=e},...R,...g,id:L,...eI({onClick:()=>{T(e=>!e)},onKeyDown:e=>{(" "===e.key||"Enter"===e.key||"ArrowDown"===e.key||"ArrowUp"===e.key)&&T(e=>!e)}},a())},children:d({content:l?o:(0,ej.jsx)(oN.Provider,{value:!0,children:r&&Array.isArray(n)?n.map(e=>s(e,!0)).filter(e=>null!=e).join(", "):s(n,!0)}),placeholderShown:l,clear:null!=x?()=>{var e;x(),null===(e=F.current)||void 0===e||e.focus({preventScroll:!0})}:void 0,disabled:t,size:m,className:h})})},initialFocusRef:k,size:f?"lg":"md",padding:"none",onClose:()=>{T(!1)},onCloseEnd:()=>{P("")},children:(0,ej.jsx)(oR,{id:L?"".concat(L,"Search"):void 0,items:i,renderValue:s,renderFooter:c,filterable:f,filterPlaceholder:p,searchInputRef:D,listboxRef:j,filterQuery:M,onFilterChange:P,..._()})})}})}let oE=(0,w.createContext)({});function ox(e){let{as:t="button",...n}=e,{ref:r,onClick:o,onKeyDown:i,...l}=(0,w.useContext)(oE);return(0,ej.jsx)(eM.Button,{ref:r,as:th,role:"combobox",__overrides:{as:t,...l},...eI({onClick:o,onKeyDown:i},n)})}let ow=(0,w.forwardRef)(function(e,t){let{"aria-orientation":n,"aria-activedescendant":r,role:o,tabIndex:i,onAriaActiveDescendantChange:l,onKeyDown:a,...u}=e,s=(0,tv.i)(l);return(0,w.useEffect)(()=>{s(r)},[r,s]),(0,ej.jsx)("div",{ref:t,role:"none",onKeyDown:e=>{if("Enter"!==e.key||null!=r){if("Escape"===e.key||"Tab"===e.key){null==a||a({...e,preventDefault:()=>{},stopPropagation:()=>{}});return}null==a||a(e)}},...u})});function oR(e){var t,n;let{id:r,items:o,renderValue:i=String,renderFooter:l,filterable:a=!1,filterPlaceholder:u,searchInputRef:s,listboxRef:c,filterQuery:d,onFilterChange:f,listBoxLabel:p,listBoxLabelledBy:v}=e,m=(0,eD.Z)(),h=a?s:c,[g,b]=(0,w.useState)(!0),y=(0,w.useMemo)(()=>{if(a)return d?op(d):null},[d,a]);(0,w.useEffect)(()=>{y&&requestAnimationFrame(()=>{null==h.current||h.current.hasAttribute("aria-activedescendant")||h.current.dispatchEvent(new KeyboardEvent("keydown",{key:"Home",bubbles:!0}))})},[h,y]);let E=null!=y?(t=function(e){let t=new Set;return e.map(e=>{switch(e.type){case"option":return ov(e,t);case"group":return{...e,options:e.options.map(e=>ov(e,t))}}return e})}(o),n=e=>om(e,y),t.filter(e=>{switch(e.type){case"option":return n(e);case"group":return e.options.some(e=>n(e))}return!1})):o,x=null!=y&&0===E.length,R=E.length>50,[L,S]=(0,w.useState)([]);(0,w.useEffect)(()=>{S(e=>{let t=new Set(e);return t.add(E.length-1),[...t]})},[y,E.length]);let T=(0,w.useRef)(null);(0,w.useEffect)(()=>{null!=T.current&&T.current.style.setProperty("--initial-height","".concat(T.current.offsetHeight,"px"))},[]),(0,w.useEffect)(()=>{b(!1)},[]);let C=(0,w.useId)(),A=(0,w.useId)(),N=e=>{let t=E[e];return(0,ej.jsx)(oL,{item:t,renderValue:i,needle:y},e)};return(0,ej.jsxs)(eM.Options,{as:ow,static:!0,className:"np-select-input-options-container",onAriaActiveDescendantChange:e=>{null!=h.current&&(g||null==e?h.current.removeAttribute("aria-activedescendant"):h.current.setAttribute("aria-activedescendant",e))},children:[a?(0,ej.jsx)("div",{className:"np-select-input-query-container",children:(0,ej.jsx)(od,{ref:s,id:r,role:"combobox",shape:"rectangle",placeholder:u,"aria-label":u,defaultValue:d,"aria-autocomplete":"list","aria-expanded":!0,"aria-controls":A,"aria-describedby":x?C:void 0,onKeyDown:e=>{/^.$/u.test(e.key)&&e.stopPropagation()},onChange:e=>{S([]),f(e.currentTarget.value)}})}):null,(0,ej.jsxs)("section",{ref:T,tabIndex:-1,className:(0,eF.W)("np-select-input-listbox-container",R&&"np-select-input-listbox-container--virtualized",null==y&&o.some(e=>"group"===e.type)&&"np-select-input-listbox-container--has-group"),children:[x?(0,ej.jsxs)("div",{id:C,className:"np-select-input-options-status",children:[(0,ej.jsx)(eP.CrossCircle,{size:16,className:"np-select-input-options-status-icon"}),m.formatMessage(of.noResultsFound)]}):null,(0,ej.jsx)("div",{ref:c,id:A,role:"listbox","aria-orientation":"vertical","aria-label":p,"aria-labelledby":v,tabIndex:0,className:"np-select-input-listbox",children:R?(0,ej.jsx)(tp,{count:E.length,keepMounted:L,scrollRef:c,onRangeChange:(e,t)=>{S(n=>{let r=new Set(n);for(let n=e;n<=t;n+=1)r.add(n);return[...r].sort((e,t)=>e-t)})},children:e=>(0,ej.jsx)(oT.Provider,{value:E.length,children:(0,ej.jsx)(oC.Provider,{value:e+1,children:N(e)})})},y):E.map((e,t)=>N(t))}),null!=l?(0,ej.jsx)("footer",{className:"np-select-input-footer",children:(0,ej.jsx)("div",{role:"none",onKeyDown:e=>{"Escape"!==e.key&&e.stopPropagation()},children:l({resultsEmpty:x,queryNormalized:y})})}):null]})]})}function oL(e){let{item:t,renderValue:n,needle:r}=e;switch(t.type){case"option":if(null!=t.value&&(null==r||om(t,r)))return(0,ej.jsx)(oA,{value:t.value,disabled:t.disabled,children:n(t.value,!1)});break;case"group":return(0,ej.jsx)(oS,{item:t,renderValue:n,needle:r});case"separator":if(null==r)return(0,ej.jsx)("hr",{className:"np-select-input-separator-item"})}return null}function oS(e){let{item:t,renderValue:n,needle:r}=e,o=(0,w.useId)();return(0,ej.jsxs)("section",{role:"group","aria-labelledby":o,className:(0,eF.W)(null===r&&"np-select-input-group-item--without-needle"),children:[null==r?(0,ej.jsx)("header",{id:o,role:"none",className:"np-select-input-group-item-header np-text-title-group",children:t.label}):null,t.options.map((e,t)=>(0,ej.jsx)(oL,{item:e,renderValue:n,needle:r},t))]})}let oT=(0,w.createContext)(void 0),oC=(0,w.createContext)(void 0);function oA(e){let{value:t,disabled:n,children:r}=e,o=(0,w.useContext)(oT),i=(0,w.useContext)(oC);return(0,ej.jsx)(eM.Option,{as:"div",value:t,"aria-setsize":o,"aria-posinset":i,disabled:n,className:e=>{let{active:t,disabled:n}=e;return(0,eF.W)("np-select-input-option-container np-text-body-large",t&&"np-select-input-option-container--active",n&&"np-select-input-option-container--disabled")},children:e=>{let{selected:t}=e;return(0,ej.jsxs)(ej.Fragment,{children:[(0,ej.jsx)("div",{className:"np-select-input-option",children:r}),(0,ej.jsx)(eP.Check,{size:16,className:(0,eF.W)("np-select-input-option-check",!t&&"np-select-input-option-check--not-selected")})]})}})}let oN=(0,w.createContext)(!1);function oO(e){let{title:t,note:n,description:r,icon:o}=e,i=(0,w.useContext)(oN);return(0,ej.jsxs)("div",{className:(0,eF.W)("np-select-input-option-content-container",(n||r)&&"np-text-body-large"),children:[o?(0,ej.jsx)("div",{className:(0,eF.W)("np-select-input-option-content-icon",!i&&"np-select-input-option-content-icon--not-within-trigger"),children:o}):null,(0,ej.jsxs)("div",{className:"np-select-input-option-content-text",children:[(0,ej.jsxs)("div",{className:(0,eF.W)("np-select-input-option-content-text-line-1",i&&"np-select-input-option-content-text-within-trigger"),children:[(0,ej.jsx)("div",{className:"d-inline",children:t}),n?(0,ej.jsx)("span",{className:"np-select-input-option-content-text-secondary np-text-body-default",children:n}):null]}),r?(0,ej.jsx)("div",{className:(0,eF.W)("np-select-input-option-content-text-secondary np-text-body-default",i&&"np-select-input-option-content-text-within-trigger"),children:r}):null]})]})}},56229:function(e,t,n){n.d(t,{H:function(){return o}});var r=n(53048);function o(){let{size:e="auto"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.W)("form-control","np-form-control",{"np-form-control--size-auto":"auto"===e,"np-form-control--size-sm":"sm"===e,"np-form-control--size-md":"md"===e,"np-form-control--size-lg":"lg"===e})}},92446:function(e,t,n){n.d(t,{HR:function(){return u},dX:function(){return c},iI:function(){return v},jl:function(){return l},lp:function(){return f},sU:function(){return p}});var r=n(70079),o=n(35250);let i=(0,r.createContext)(void 0),l=i.Provider,a=(0,r.createContext)(void 0),u=a.Provider,s=(0,r.createContext)(void 0),c=s.Provider,d=(0,r.createContext)(void 0),f=d.Provider;function p(){let{nonLabelable:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,r.useContext)(i);return{id:(0,r.useContext)(a),"aria-labelledby":e?t:void 0,"aria-describedby":(0,r.useContext)(s),"aria-invalid":(0,r.useContext)(d)}}function v(e,t){function n(n){return(0,o.jsx)(e,{inputAttributes:p(t),...n})}return n.displayName="withInputAttributes(".concat(e.displayName||e.name||"Component",")"),n}},46611:function(e,t,n){n.d(t,{Z:function(){return C}});var r=n(15466),o=n(44419),i=n(53048),l=n(70079),a=n(52008),u=n(92446),s=n(51778),c=n(2473),d=n(48487),f=(0,n(5532).vU)({selectPlaceholder:{id:"neptune.MoneyInput.Select.placeholder"},selectCurrencyLabel:{id:"neptune.MoneyInput.Select.selectCurrencyLabel"}}),p=n(20258),v=n(19330);let m={BIF:0,BYR:0,CLP:0,DJF:0,GNF:0,JPY:0,KMF:0,KRW:0,MGA:0,PYG:0,RWF:0,VND:0,VUV:0,XAF:0,XOF:0,XPF:0,HUF:0,BHD:3,JOD:3,KWD:3,OMR:3,TND:3};function h(){return"1,234"===(1234..toLocaleString&&1234..toLocaleString(v.ZW))}var g=n(35250),b=n(65163),y=n(61969);let E=e=>(0,r.hj)(e)||(0,r.Ft)(e),x=e=>{let{amount:t,currency:n,locale:r}=e;return"number"==typeof t?(0,p.dN)(t,n,r):""},w=e=>{let{amount:t,currency:n,locale:r}=e;return function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v.ZW,o=function(e){try{let t=e.replace(/_/,"-");return Intl.NumberFormat(t),t}catch(e){return v.ZW}}(r),i=null!==(n=m[t.toUpperCase()])&&void 0!==n?n:2,l=h()?1e4.toLocaleString(o)[2]:",",a=h()?1.1.toLocaleString(o)[1]:".";return Math.abs(parseFloat(parseFloat((e?"".concat(e):"").replace(RegExp("\\".concat(l),"g"),"").replace(RegExp("\\".concat(a),"g"),".").replace(/[^0-9.]/g,"")).toFixed(i)))}(t,n,r)},R=new Set(["Backspace","Delete",",",".","ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter","Escape","Tab"]);class L extends l.Component{UNSAFE_componentWillReceiveProps(e){this.setState({locale:e.intl.locale}),this.amountFocused||this.setState({formattedAmount:x({amount:e.amount,currency:e.selectedCurrency.currency,locale:e.intl.locale})})}getSelectOptions(){let e;let t=S(this.props.currencies,this.state.searchQuery),n=[];return t.forEach(t=>{if(null!=t.header)e=[],n.push({type:"group",label:t.header,options:e});else{var r,o;(null!=e?e:n).push({type:"option",value:t,filterMatchers:[t.value,t.label,null!==(r=t.note)&&void 0!==r?r:"",null!==(o=t.searchable)&&void 0!==o?o:""]})}}),n}setAmount(){this.setState(e=>{let t=w({amount:e.formattedAmount,currency:this.props.selectedCurrency.currency,locale:e.locale});return E(t)?{formattedAmount:x({amount:t,currency:this.props.selectedCurrency.currency,locale:e.locale})}:{formattedAmount:e.formattedAmount}})}render(){var e;let{inputAttributes:t,id:n,"aria-labelledby":r,selectedCurrency:l,onCurrencyChange:a,size:u,addon:p,selectProps:v}=this.props,m=null!=r?r:null==t?void 0:t["aria-labelledby"],h=this.getSelectOptions(),b=!this.state.searchQuery&&(()=>{if(0!==h.length){let e=h[0];if(1===h.length){if("option"===e.type)return e.value.currency===l.currency;if("group"===e.type)return 1===e.options.length&&!(this.props.onCustomAction&&this.props.customActionLabel)}}else if(null==l?void 0:l.currency)return!0;return!1})()||!a,E=!this.props.onAmountChange,w="".concat(null!==(e=null==t?void 0:t.id)&&void 0!==e?e:n,"SelectedCurrency");return(0,g.jsxs)("div",{role:"group",...t,"aria-labelledby":m,className:(0,i.W)(this.style("tw-money-input"),this.style("input-group"),this.style("input-group-".concat(u))),children:[(0,g.jsx)(s.I,{id:n,value:this.state.formattedAmount,inputMode:"decimal",disabled:E,placeholder:x({amount:this.props.placeholder,currency:this.props.selectedCurrency.currency,locale:this.state.locale}),autoComplete:"off","aria-describedby":w,onKeyDown:this.handleKeyDown,onChange:this.onAmountChange,onFocus:this.onAmountFocus,onBlur:this.onAmountBlur,onPaste:this.handlePaste}),p&&(0,g.jsx)("span",{className:(0,i.W)(this.style("input-group-addon"),this.style("input-".concat(u)),E?this.style("disabled"):""),children:p}),b?(0,g.jsxs)("div",{className:(0,i.W)(this.style("input-group-addon"),this.style("input-".concat(u)),this.style("tw-money-input__fixed-currency"),E?this.style("disabled"):""),id:w,children:[("lg"===u||"md"===u)&&(0,g.jsx)("span",{className:(0,i.W)(this.style("money-input-currency-flag"),this.style("m-r-2")),children:(0,g.jsx)(o.F,{code:l.currency.toLowerCase(),intrinsicSize:24})}),(0,g.jsx)(d.Z,{as:"span",type:y.Z.TITLE_SUBSECTION,className:"lg"===u?this.style("m-r-1"):"",children:l.currency.toUpperCase()})]}):(0,g.jsx)("div",{translate:"no",className:(0,i.W)(this.style("input-group-btn"),this.style("amount-currency-select-btn")),children:(0,g.jsx)(c.lq,{UNSAFE_triggerButtonProps:{id:void 0,"aria-labelledby":void 0,"aria-describedby":m,"aria-invalid":void 0,"aria-label":this.props.intl.formatMessage(f.selectCurrencyLabel)},id:w,items:h,value:l,compareValues:"currency",renderValue:(e,t)=>(0,g.jsx)(c.X5,{title:t?e.currency.toUpperCase():e.label,note:t?void 0:e.note,icon:(0,g.jsx)(o.F,{code:e.currency,intrinsicSize:24})}),renderFooter:this.props.onCustomAction?()=>(0,g.jsx)("div",{role:"button",tabIndex:0,onClick:this.handleCustomAction,children:this.props.customActionLabel}):void 0,placeholder:this.props.intl.formatMessage(f.selectPlaceholder),filterable:!0,filterPlaceholder:this.props.searchPlaceholder,disabled:E,size:u,onChange:this.handleSelectChange,onFilterChange:e=>{let{queryNormalized:t}=e;this.handleSearchChange(null!=t?t:"")},...v})})]})}constructor(e){super(e),this.amountFocused=!1,this.isInputAllowedForKeyEvent=e=>{let{metaKey:t,key:n,ctrlKey:o}=e;return(0,r.hj)(Number.parseInt(n,10))||t||o||R.has(n)},this.handleKeyDown=e=>{this.isInputAllowedForKeyEvent(e)||e.preventDefault()},this.handlePaste=e=>{let t=e.clipboardData.getData("text"),{locale:n}=this.state,o=(0,r.xb)(t)?null:w({amount:t,currency:this.props.selectedCurrency.currency,locale:n});if(E(o)){var i,l;this.setState({formattedAmount:x({amount:o,currency:this.props.selectedCurrency.currency,locale:n})}),null===(i=(l=this.props).onAmountChange)||void 0===i||i.call(l,o)}e.preventDefault()},this.onAmountChange=e=>{let{value:t}=e.target;this.setState({formattedAmount:t});let n=(0,r.xb)(t)?null:w({amount:t,currency:this.props.selectedCurrency.currency,locale:this.state.locale});if(E(n)){var o,i;null===(o=(i=this.props).onAmountChange)||void 0===o||o.call(i,n)}},this.onAmountBlur=()=>{this.amountFocused=!1,this.setAmount()},this.onAmountFocus=()=>{this.amountFocused=!0},this.handleSelectChange=e=>{var t,n;this.handleSearchChange(""),null===(t=(n=this.props).onCurrencyChange)||void 0===t||t.call(n,e)},this.handleCustomAction=()=>{var e,t;this.handleSearchChange(""),null===(e=(t=this.props).onCustomAction)||void 0===e||e.call(t)},this.handleSearchChange=e=>{var t,n;this.setState({searchQuery:e}),null===(t=(n=this.props).onSearchChange)||void 0===t||t.call(n,{searchQuery:e,filteredOptions:S(this.props.currencies,e)})},this.style=e=>this.props.classNames[e]||e,this.state={searchQuery:"",formattedAmount:x({amount:e.amount,currency:e.selectedCurrency.currency,locale:e.intl.locale}),locale:e.intl.locale}}}function S(e,t){return t?[...(function(e){let t=new Set;return e.filter(e=>!t.has(e.value)&&(t.add(e.value),!0))})(e.filter(e=>null==e.header)).filter(e=>!!e.value&&(T(e.label,t)||T(e.searchable,t)||T(e.note,t)))].sort((e,n)=>{let r=T(e.label,t),o=T(n.label,t);return r&&o?0:r?-1:o?1:0}):[...e]}function T(e,t){return null==e?void 0:e.toLowerCase().includes(t.toLowerCase())}L.defaultProps={size:b.$.LARGE,classNames:{},selectProps:{}};var C=(0,a.ZP)(function(e){function t(t){let n=(0,l.useId)();return(0,g.jsx)(e,{...t,id:t.id||n})}return t.displayName="withId(".concat(e.displayName||e.name||"Component",")"),t}((0,u.iI)(L,{nonLabelable:!0})))}}]); //# sourceMappingURL=6611-6a7babd6bcec9f6c.js.map