@narmi/design_system 5.1.3 → 5.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -94,7 +94,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
94
94
  *
95
95
  * This source code is licensed under the MIT license found in the
96
96
  * LICENSE file in the root directory of this source tree.
97
- */var O8;function gg(){return O8||(O8=1,process.env.NODE_ENV!=="production"&&function(){function n(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}function t(p,m){d||i.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var v=m();if(!f){var b=m();o(v,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}b=s({inst:{value:v,getSnapshot:m}});var I=b[0].inst,y=b[1];return l(function(){I.value=v,I.getSnapshot=m,e(I)&&y({inst:I})},[p,v,m]),a(function(){return e(I)&&y({inst:I}),p(function(){e(I)&&y({inst:I})})},[p]),u(v),v}function e(p){var m=p.getSnapshot;p=p.value;try{var v=m();return!o(p,v)}catch{return!0}}function r(p,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=c,o=typeof Object.is=="function"?Object.is:n,s=i.useState,a=i.useEffect,l=i.useLayoutEffect,u=i.useDebugValue,d=!1,f=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;O5.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),O5}var _8;function yg(){return _8||(_8=1,process.env.NODE_ENV==="production"?Rn.exports=mg():Rn.exports=gg()),Rn.exports}var bg=yg();const N8=c.createContext(!1),p6=c.createContext(null);function Mg(n){if(c.useContext(p6))return n.content;let{collection:e,document:r}=wg(n.createCollection);return c.createElement(c.Fragment,null,c.createElement(Wm,null,c.createElement(p6.Provider,{value:r},n.content)),c.createElement(xg,{render:n.children,collection:e}))}function xg({collection:n,render:t}){return t(n)}function Ig(n,t,e){let r=Sn(),i=c.useRef(r);i.current=r;let o=c.useCallback(()=>i.current?e():t(),[t,e]);return bg.useSyncExternalStore(n,o)}const Eg=typeof c.useSyncExternalStore=="function"?c.useSyncExternalStore:Ig;function wg(n){let[t]=c.useState(()=>new Um(n?.()||new g5)),e=c.useCallback(s=>t.subscribe(s),[t]),r=c.useCallback(()=>{let s=t.getCollection();return t.isSSR&&t.resetAfterSSR(),s},[t]),i=c.useCallback(()=>(t.isSSR=!0,t.getCollection()),[t]),o=Eg(e,r,i);return Fe(()=>(t.isMounted=!0,()=>{t.isMounted=!1}),[t]),{collection:o,document:t}}const _5=c.createContext(null);function Sg(n,t,e,r,i,o){let s=c.useCallback(l=>{l?.setProps(t,e,r,o)},[t,e,r,o]),a=c.useContext(_5);if(a){let l=a.ownerDocument.nodesByProps.get(t);return l||(l=a.ownerDocument.createElement(n),l.setProps(t,e,r,o),a.appendChild(l),a.ownerDocument.updateCollection(),a.ownerDocument.nodesByProps.set(t,l)),i?c.createElement(_5.Provider,{value:l},i):null}return c.createElement(n,{ref:s},i)}function Cg(n,t){let e=({node:i})=>t(i.props,i.props.ref,i),r=c.forwardRef((i,o)=>{let s=c.useContext(z5);if(!c.useContext(N8)){if(t.length>=3)throw new Error(t.name+" cannot be rendered outside a collection.");return t(i,o)}return Sg(n,i,o,"children"in i?i.children:null,null,l=>c.createElement(z5.Provider,{value:s},c.createElement(e,{node:l})))});return r.displayName=t.name,r}function Pg(n){return c8({...n,addIdAndValue:!0})}const A8=c.createContext(null);function kg(n){let t=c.useContext(A8),e=(t?.dependencies||[]).concat(n.dependencies),r=n.idScope||t?.idScope,i=Pg({...n,idScope:r,dependencies:e});return c.useContext(p6)&&(i=c.createElement(zg,null,i)),t=c.useMemo(()=>({dependencies:e,idScope:r}),[r,...e]),c.createElement(A8.Provider,{value:t},i)}function zg({children:n}){let t=c.useContext(p6),e=c.useMemo(()=>c.createElement(p6.Provider,{value:null},c.createElement(N8.Provider,{value:!0},n)),[n]);return Sn()?c.createElement(_5.Provider,{value:t},e):C1.createPortal(e,t)}const $g=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Tg=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Dg(n){if(Intl.Locale){let e=new Intl.Locale(n).maximize(),r=typeof e.getTextInfo=="function"?e.getTextInfo():e.textInfo;if(r)return r.direction==="rtl";if(e.script)return $g.has(e.script)}let t=n.split("-")[0];return Tg.has(t)}const Og=Symbol.for("react-aria.i18n.locale");function F8(){let n=typeof window<"u"&&window[Og]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([n])}catch{n="en-US"}return{locale:n,direction:Dg(n)?"rtl":"ltr"}}let N5=F8(),h6=new Set;function L8(){N5=F8();for(let n of h6)n(N5)}function _g(){let n=Sn(),[t,e]=c.useState(N5);return c.useEffect(()=>(h6.size===0&&window.addEventListener("languagechange",L8),h6.add(e),()=>{h6.delete(e),h6.size===0&&window.removeEventListener("languagechange",L8)}),[]),n?{locale:"en-US",direction:"ltr"}:t}const Ng=c.createContext(null);function Pt(){let n=_g();return c.useContext(Ng)||n}const Ag=Symbol.for("react-aria.i18n.locale"),Fg=Symbol.for("react-aria.i18n.strings");let kt;class Xn{getStringForLocale(t,e){let i=this.getStringsForLocale(e)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${e} locale`);return i}getStringsForLocale(t){let e=this.strings[t];return e||(e=Lg(t,this.strings,this.defaultLocale),this.strings[t]=e),e}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let e=window[Ag];if(kt===void 0){let i=window[Fg];if(!i)return null;kt={};for(let o in i)kt[o]=new Xn({[e]:i[o]},e)}let r=kt?.[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,e="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=e}}function Lg(n,t,e="en-US"){if(t[n])return t[n];let r=Kg(n);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[e]}function Kg(n){return Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]}const K8=new Map,B8=new Map;class Bg{format(t,e){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(e,this):r}plural(t,e,r="cardinal"){let i=e["="+t];if(i)return typeof i=="function"?i():i;let o=this.locale+":"+r,s=K8.get(o);s||(s=new Intl.PluralRules(this.locale,{type:r}),K8.set(o,s));let a=s.select(t);return i=e[a]||e.other,typeof i=="function"?i():i}number(t){let e=B8.get(this.locale);return e||(e=new Intl.NumberFormat(this.locale),B8.set(this.locale,e)),e.format(t)}select(t,e){let r=t[e]||t.other;return typeof r=="function"?r():r}constructor(t,e){this.locale=t,this.strings=e}}const H8=new WeakMap;function Hg(n){let t=H8.get(n);return t||(t=new Xn(n),H8.set(n,t)),t}function Vg(n,t){return t&&Xn.getGlobalDictionaryForPackage(t)||Hg(n)}function qg(n,t){let{locale:e}=Pt(),r=Vg(n,t);return c.useMemo(()=>new Bg(e,r),[e,r])}let A5=new Map,F5=!1;try{F5=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Jn=!1;try{Jn=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const V8={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class jg{format(t){let e="";if(!F5&&this.options.signDisplay!=null?e=Wg(this.numberFormatter,this.options.signDisplay,t):e=this.numberFormatter.format(t),this.options.style==="unit"&&!Jn){var r;let{unit:i,unitDisplay:o="short",locale:s}=this.resolvedOptions();if(!i)return e;let a=(r=V8[i])===null||r===void 0?void 0:r[o];e+=a[s]||a.default}return e}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,e){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,e);if(e<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(e)}`}formatRangeToParts(t,e){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,e);if(e<t)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(t),i=this.numberFormatter.formatToParts(e);return[...r.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!F5&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Jn&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,e={}){this.numberFormatter=Ug(t,e),this.options=e}}function Ug(n,t={}){let{numberingSystem:e}=t;if(e&&n.includes("-nu-")&&(n.includes("-u-")||(n+="-u-"),n+=`-nu-${e}`),t.style==="unit"&&!Jn){var r;let{unit:s,unitDisplay:a="short"}=t;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=V8[s])===null||r===void 0)&&r[a]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${a}`);t={...t,style:"decimal"}}let i=n+(t?Object.entries(t).sort((s,a)=>s[0]<a[0]?-1:1).join():"");if(A5.has(i))return A5.get(i);let o=new Intl.NumberFormat(n,t);return A5.set(i,o),o}function Wg(n,t,e){if(t==="auto")return n.format(e);if(t==="never")return n.format(Math.abs(e));{let r=!1;if(t==="always"?r=e>0||Object.is(e,0):t==="exceptZero"&&(Object.is(e,-0)||Object.is(e,0)?e=Math.abs(e):r=e>0),r){let i=n.format(-e),o=n.format(e),s=i.replace(o,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(o,"!!!").replace(s,"+").replace("!!!",o)}else return n.format(e)}}function Yg(n={}){let{locale:t}=Pt();return c.useMemo(()=>new jg(t,n),[t,n])}let L5=new Map;function Gg(n){let{locale:t}=Pt(),e=t+(n?Object.entries(n).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(L5.has(e))return L5.get(e);let r=new Intl.Collator(t,n);return L5.set(e,r),r}function Rg(n,t){let{elementType:e="button",isDisabled:r,onPress:i,onPressStart:o,onPressEnd:s,onPressUp:a,onPressChange:l,preventFocusOnPress:u,allowFocusWhenDisabled:d,onClick:f,href:h,target:p,rel:m,type:v="button"}=n,b;e==="button"?b={type:v,disabled:r,form:n.form,formAction:n.formAction,formEncType:n.formEncType,formMethod:n.formMethod,formNoValidate:n.formNoValidate,formTarget:n.formTarget,name:n.name,value:n.value}:b={role:"button",href:e==="a"&&!r?h:void 0,target:e==="a"?p:void 0,type:e==="input"?v:void 0,disabled:e==="input"?r:void 0,"aria-disabled":!r||e==="input"?void 0:r,rel:e==="a"?m:void 0};let{pressProps:I,isPressed:y}=Vn({onPressStart:o,onPressEnd:s,onPressChange:l,onPress:i,onPressUp:a,onClick:f,isDisabled:r,preventFocusOnPress:u,ref:t}),{focusableProps:x}=P8(n,t);d&&(x.tabIndex=r?-1:x.tabIndex);let g=De(x,I,et(n,{labelable:!0}));return{isPressed:y,buttonProps:De(b,g,{"aria-haspopup":n["aria-haspopup"],"aria-expanded":n["aria-expanded"],"aria-controls":n["aria-controls"],"aria-pressed":n["aria-pressed"],"aria-current":n["aria-current"]})}}const q8=c.createContext(null),K5="react-aria-focus-scope-restore";let Oe=null;function Xg(n){let{children:t,contain:e,restoreFocus:r,autoFocus:i}=n,o=c.useRef(null),s=c.useRef(null),a=c.useRef([]),{parentNode:l}=c.useContext(q8)||{},u=c.useMemo(()=>new V5({scopeRef:a}),[a]);Fe(()=>{let h=l||Ke.root;if(Ke.getTreeNode(h.scopeRef)&&Oe&&!Qn(Oe,h.scopeRef)){let p=Ke.getTreeNode(Oe);p&&(h=p)}h.addChild(u),Ke.addNode(u)},[u,l]),Fe(()=>{let h=Ke.getTreeNode(a);h&&(h.contain=!!e)},[e]),Fe(()=>{var h;let p=(h=o.current)===null||h===void 0?void 0:h.nextSibling,m=[],v=b=>b.stopPropagation();for(;p&&p!==s.current;)m.push(p),p.addEventListener(K5,v),p=p.nextSibling;return a.current=m,()=>{for(let b of m)b.removeEventListener(K5,v)}},[t]),ty(a,r,e),Zg(a,e),ny(a,r,e),ey(a,i),c.useEffect(()=>{const h=Xe(Pe(a.current?a.current[0]:void 0));let p=null;if(v1(h,a.current)){for(let m of Ke.traverse())m.scopeRef&&v1(h,m.scopeRef.current)&&(p=m);p===Ke.getTreeNode(a)&&(Oe=p.scopeRef)}},[a]),Fe(()=>()=>{var h,p,m;let v=(m=(p=Ke.getTreeNode(a))===null||p===void 0||(h=p.parent)===null||h===void 0?void 0:h.scopeRef)!==null&&m!==void 0?m:null;(a===Oe||Qn(a,Oe))&&(!v||Ke.getTreeNode(v))&&(Oe=v),Ke.removeTreeNode(a)},[a]);let d=c.useMemo(()=>Jg(a),[]),f=c.useMemo(()=>({focusManager:d,parentNode:u}),[u,d]);return c.createElement(q8.Provider,{value:f},c.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),t,c.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:s}))}function Jg(n){return{focusNext(t={}){let e=n.current,{from:r,tabbable:i,wrap:o,accept:s}=t;var a;let l=r||Xe(Pe((a=e[0])!==null&&a!==void 0?a:void 0)),u=e[0].previousElementSibling,d=at(e),f=K1(d,{tabbable:i,accept:s},e);f.currentNode=v1(l,e)?l:u;let h=f.nextNode();return!h&&o&&(f.currentNode=u,h=f.nextNode()),h&&L1(h,!0),h},focusPrevious(t={}){let e=n.current,{from:r,tabbable:i,wrap:o,accept:s}=t;var a;let l=r||Xe(Pe((a=e[0])!==null&&a!==void 0?a:void 0)),u=e[e.length-1].nextElementSibling,d=at(e),f=K1(d,{tabbable:i,accept:s},e);f.currentNode=v1(l,e)?l:u;let h=f.previousNode();return!h&&o&&(f.currentNode=u,h=f.previousNode()),h&&L1(h,!0),h},focusFirst(t={}){let e=n.current,{tabbable:r,accept:i}=t,o=at(e),s=K1(o,{tabbable:r,accept:i},e);s.currentNode=e[0].previousElementSibling;let a=s.nextNode();return a&&L1(a,!0),a},focusLast(t={}){let e=n.current,{tabbable:r,accept:i}=t,o=at(e),s=K1(o,{tabbable:r,accept:i},e);s.currentNode=e[e.length-1].nextElementSibling;let a=s.previousNode();return a&&L1(a,!0),a}}}function at(n){return n[0].parentElement}function v6(n){let t=Ke.getTreeNode(Oe);for(;t&&t.scopeRef!==n;){if(t.contain)return!1;t=t.parent}return!0}function Qg(n){if(n.checked)return!0;let t=[];if(!n.form)t=[...Pe(n).querySelectorAll(`input[type="radio"][name="${CSS.escape(n.name)}"]`)].filter(o=>!o.form);else{var e,r;let o=(r=n.form)===null||r===void 0||(e=r.elements)===null||e===void 0?void 0:e.namedItem(n.name);t=[...o??[]]}return t?!t.some(o=>o.checked):!1}function Zg(n,t){let e=c.useRef(void 0),r=c.useRef(void 0);Fe(()=>{let i=n.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const o=Pe(i?i[0]:void 0);let s=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!v6(n)||u.isComposing)return;let d=Xe(o),f=n.current;if(!f||!v1(d,f))return;let h=at(f),p=K1(h,{tabbable:!0},f);if(!d)return;p.currentNode=d;let m=u.shiftKey?p.previousNode():p.nextNode();m||(p.currentNode=u.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,m=u.shiftKey?p.previousNode():p.nextNode()),u.preventDefault(),m&&L1(m,!0)},a=u=>{(!Oe||Qn(Oe,n))&&v1(xe(u),n.current)?(Oe=n,e.current=xe(u)):v6(n)&&!lt(xe(u),n)?e.current?e.current.focus():Oe&&Oe.current&&B5(Oe.current):v6(n)&&(e.current=xe(u))},l=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let d=Wn(),f=(d==="virtual"||d===null)&&s5()&&X9(),h=Xe(o);if(!f&&h&&v6(n)&&!lt(h,n)){Oe=n;let m=xe(u);if(m&&m.isConnected){var p;e.current=m,(p=e.current)===null||p===void 0||p.focus()}else Oe.current&&B5(Oe.current)}})};return o.addEventListener("keydown",s,!1),o.addEventListener("focusin",a,!1),i?.forEach(u=>u.addEventListener("focusin",a,!1)),i?.forEach(u=>u.addEventListener("focusout",l,!1)),()=>{o.removeEventListener("keydown",s,!1),o.removeEventListener("focusin",a,!1),i?.forEach(u=>u.removeEventListener("focusin",a,!1)),i?.forEach(u=>u.removeEventListener("focusout",l,!1))}},[n,t]),Fe(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function j8(n){return lt(n)}function v1(n,t){return!n||!t?!1:t.some(e=>e.contains(n))}function lt(n,t=null){if(n instanceof Element&&n.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:e}of Ke.traverse(Ke.getTreeNode(t)))if(e&&v1(n,e.current))return!0;return!1}function Qn(n,t){var e;let r=(e=Ke.getTreeNode(t))===null||e===void 0?void 0:e.parent;for(;r;){if(r.scopeRef===n)return!0;r=r.parent}return!1}function L1(n,t=!1){if(n!=null&&!t)try{f6(n)}catch{}else if(n!=null)try{n.focus()}catch{}}function U8(n,t=!0){let e=n[0].previousElementSibling,r=at(n),i=K1(r,{tabbable:t},n);i.currentNode=e;let o=i.nextNode();return t&&!o&&(r=at(n),i=K1(r,{tabbable:!1},n),i.currentNode=e,o=i.nextNode()),o}function B5(n,t=!0){L1(U8(n,t))}function ey(n,t){const e=c.useRef(t);c.useEffect(()=>{if(e.current){Oe=n;const r=Pe(n.current?n.current[0]:void 0);!v1(Xe(r),Oe.current)&&n.current&&B5(n.current)}e.current=!1},[n])}function ty(n,t,e){Fe(()=>{if(t||e)return;let r=n.current;const i=Pe(r?r[0]:void 0);let o=s=>{let a=xe(s);v1(a,n.current)?Oe=n:j8(a)||(Oe=null)};return i.addEventListener("focusin",o,!1),r?.forEach(s=>s.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),r?.forEach(s=>s.removeEventListener("focusin",o,!1))}},[n,t,e])}function W8(n){let t=Ke.getTreeNode(Oe);for(;t&&t.scopeRef!==n;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===n}function ny(n,t,e){const r=c.useRef(typeof document<"u"?Xe(Pe(n.current?n.current[0]:void 0)):null);Fe(()=>{let i=n.current;const o=Pe(i?i[0]:void 0);if(!t||e)return;let s=()=>{(!Oe||Qn(Oe,n))&&v1(Xe(o),n.current)&&(Oe=n)};return o.addEventListener("focusin",s,!1),i?.forEach(a=>a.addEventListener("focusin",s,!1)),()=>{o.removeEventListener("focusin",s,!1),i?.forEach(a=>a.removeEventListener("focusin",s,!1))}},[n,e]),Fe(()=>{const i=Pe(n.current?n.current[0]:void 0);if(!t)return;let o=s=>{if(s.key!=="Tab"||s.altKey||s.ctrlKey||s.metaKey||!v6(n)||s.isComposing)return;let a=i.activeElement;if(!lt(a,n)||!W8(n))return;let l=Ke.getTreeNode(n);if(!l)return;let u=l.nodeToRestore,d=K1(i.body,{tabbable:!0});d.currentNode=a;let f=s.shiftKey?d.previousNode():d.nextNode();if((!u||!u.isConnected||u===i.body)&&(u=void 0,l.nodeToRestore=void 0),(!f||!lt(f,n))&&u){d.currentNode=u;do f=s.shiftKey?d.previousNode():d.nextNode();while(lt(f,n));s.preventDefault(),s.stopPropagation(),f?L1(f,!0):j8(u)?L1(u,!0):a.blur()}};return e||i.addEventListener("keydown",o,!0),()=>{e||i.removeEventListener("keydown",o,!0)}},[n,t,e]),Fe(()=>{const i=Pe(n.current?n.current[0]:void 0);if(!t)return;let o=Ke.getTreeNode(n);if(o){var s;return o.nodeToRestore=(s=r.current)!==null&&s!==void 0?s:void 0,()=>{let a=Ke.getTreeNode(n);if(!a)return;let l=a.nodeToRestore,u=Xe(i);if(t&&l&&(u&&lt(u,n)||u===i.body&&W8(n))){let d=Ke.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let f=d.getTreeNode(n);for(;f;){if(f.nodeToRestore&&f.nodeToRestore.isConnected){Y8(f.nodeToRestore);return}f=f.parent}for(f=d.getTreeNode(n);f;){if(f.scopeRef&&f.scopeRef.current&&Ke.getTreeNode(f.scopeRef)){let h=U8(f.scopeRef.current,!0);Y8(h);return}f=f.parent}}})}}}},[n,t])}function Y8(n){n.dispatchEvent(new CustomEvent(K5,{bubbles:!0,cancelable:!0}))&&L1(n)}function K1(n,t,e){let r=t?.tabbable?qm:r8,i=n?.nodeType===Node.ELEMENT_NODE?n:null,o=Pe(i),s=am(o,n||o,NodeFilter.SHOW_ELEMENT,{acceptNode(a){var l;return!(t==null||(l=t.from)===null||l===void 0)&&l.contains(a)||t?.tabbable&&a.tagName==="INPUT"&&a.getAttribute("type")==="radio"&&(!Qg(a)||s.currentNode.tagName==="INPUT"&&s.currentNode.type==="radio"&&s.currentNode.name===a.name)?NodeFilter.FILTER_REJECT:r(a)&&(!e||v1(a,e))&&(!t?.accept||t.accept(a))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(s.currentNode=t.from),s}class H5{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,e,r){let i=this.fastMap.get(e??null);if(!i)return;let o=new V5({scopeRef:t});i.addChild(o),o.parent=i,this.fastMap.set(t,o),r&&(o.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let e=this.fastMap.get(t);if(!e)return;let r=e.parent;for(let o of this.traverse())o!==e&&e.nodeToRestore&&o.nodeToRestore&&e.scopeRef&&e.scopeRef.current&&v1(o.nodeToRestore,e.scopeRef.current)&&(o.nodeToRestore=e.nodeToRestore);let i=e.children;r&&(r.removeChild(e),i.size>0&&i.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(e.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let e of t.children)yield*this.traverse(e)}clone(){var t;let e=new H5;var r;for(let i of this.traverse())e.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return e}constructor(){this.fastMap=new Map,this.root=new V5({scopeRef:null}),this.fastMap.set(null,this.root)}}class V5{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Ke=new H5;function G8(n={}){let{autoFocus:t=!1,isTextInput:e,within:r}=n,i=c.useRef({isFocused:!1,isFocusVisible:t||Un()}),[o,s]=c.useState(!1),[a,l]=c.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=c.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),d=c.useCallback(p=>{i.current.isFocused=p,s(p),u()},[u]);dg(p=>{i.current.isFocusVisible=p,u()},[],{isTextInput:e});let{focusProps:f}=P5({isDisabled:r,onFocusChange:d}),{focusWithinProps:h}=k8({isDisabled:!r,onFocusWithinChange:d});return{isFocused:o,isFocusVisible:a,focusProps:r?h:f}}function R8(n){let t=iy(Pe(n));t!==n&&(t&&ry(t,n),n&&X8(n,t))}function ry(n,t){n.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function X8(n,t){n.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),n.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function iy(n){let t=Xe(n),e=t?.getAttribute("aria-activedescendant");return e&&n.getElementById(e)||t}const J8=7e3;let z1=null;function Q8(n,t="assertive",e=J8){z1?z1.announce(n,t,e):(z1=new oy,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?z1.announce(n,t,e):setTimeout(()=>{z1?.isAttached()&&z1?.announce(n,t,e)},100))}class oy{isAttached(){var t;return(t=this.node)===null||t===void 0?void 0:t.isConnected}createLog(t){let e=document.createElement("div");return e.setAttribute("role","log"),e.setAttribute("aria-live",t),e.setAttribute("aria-relevant","additions"),e}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,e="assertive",r=J8){var i,o;if(!this.node)return;let s=document.createElement("div");typeof t=="object"?(s.setAttribute("role","img"),s.setAttribute("aria-labelledby",t["aria-labelledby"])):s.textContent=t,e==="assertive"?(i=this.assertiveLog)===null||i===void 0||i.appendChild(s):(o=this.politeLog)===null||o===void 0||o.appendChild(s),t!==""&&setTimeout(()=>{s.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}function Z8(n){let{id:t,label:e,"aria-labelledby":r,"aria-label":i,labelElementType:o="label"}=n;t=I1(t);let s=I1(),a={};e?(r=r?`${s} ${r}`:s,a={id:s,htmlFor:o==="label"?t:void 0}):!r&&!i&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=km({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:a,fieldProps:l}}const sy=0,ay=100,ly=1;function cy(n){const{isDisabled:t=!1,minValue:e=sy,maxValue:r=ay,numberFormatter:i,step:o=ly,orientation:s="horizontal"}=n;let a=c.useMemo(()=>{let k=(r-e)/10;return k=u6(k,0,k+o,o),Math.max(k,o)},[o,r,e]),l=c.useCallback(k=>k?.map((V,U)=>{let R=U===0?e:k[U-1],G=U===k.length-1?r:k[U+1];return u6(V,R,G,o)}),[e,r,o]),u=c.useMemo(()=>l(tc(n.value)),[n.value,l]),d=c.useMemo(()=>{var k;return l((k=tc(n.defaultValue))!==null&&k!==void 0?k:[e])},[n.defaultValue,e,l]),f=nc(n.value,n.defaultValue,n.onChange),h=nc(n.value,n.defaultValue,n.onChangeEnd);const[p,m]=Dn(u,d,f);let[v]=c.useState(p);const[b,I]=c.useState(new Array(p.length).fill(!1)),y=c.useRef(new Array(p.length).fill(!0)),[x,g]=c.useState(void 0),M=c.useRef(p),w=c.useRef(b);let z=k=>{M.current=k,m(k)},A=k=>{w.current=k,I(k)};function C(k){return(k-e)/(r-e)}function H(k){return k===0?e:p[k-1]}function E(k){return k===p.length-1?r:p[k+1]}function L(k){return y.current[k]}function F(k,V){y.current[k]=V}function $(k,V){if(t||!L(k))return;const U=H(k),R=E(k);V=u6(V,U,R,o);let G=ec(M.current,k,V);z(G)}function X(k,V){if(t||!L(k))return;V&&(M.current=p);const U=w.current[k];w.current=ec(w.current,k,V),A(w.current),h&&U&&!w.current.some(Boolean)&&h(M.current)}function _(k){return i.format(k)}function B(k,V){$(k,N(V))}function W(k){return Math.round((k-e)/o)*o+e}function N(k){const V=k*(r-e)+e;return h5(W(V),e,r)}function T(k,V=1){let U=Math.max(V,o);$(k,u6(p[k]+U,e,r,o))}function O(k,V=1){let U=Math.max(V,o);$(k,u6(p[k]-U,e,r,o))}return{values:p,defaultValues:n.defaultValue!==void 0?d:v,getThumbValue:k=>p[k],setThumbValue:$,setThumbPercent:B,isThumbDragging:k=>b[k],setThumbDragging:X,focusedThumb:x,setFocusedThumb:g,getThumbPercent:k=>C(p[k]),getValuePercent:C,getThumbValueLabel:k=>_(p[k]),getFormattedValue:_,getThumbMinValue:H,getThumbMaxValue:E,getPercentValue:N,isThumbEditable:L,setThumbEditable:F,incrementThumb:T,decrementThumb:O,step:o,pageSize:a,orientation:s,isDisabled:t}}function ec(n,t,e){return n[t]===e?n:[...n.slice(0,t),e,...n.slice(t+1)]}function tc(n){if(n!=null)return Array.isArray(n)?n:[n]}function nc(n,t,e){return r=>{e?.(typeof n=="number"||typeof t=="number"?r[0]:r)}}const rc={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function uy(n={}){let{style:t,isFocusable:e}=n,[r,i]=c.useState(!1),{focusWithinProps:o}=k8({isDisabled:!e,onFocusWithinChange:a=>i(a)}),s=c.useMemo(()=>r?t:t?{...rc,...t}:rc,[r]);return{visuallyHiddenProps:{...o,style:s}}}function ic(n){let{children:t,elementType:e="div",isFocusable:r,style:i,...o}=n,{visuallyHiddenProps:s}=uy(n);return c.createElement(e,De(o,s),t)}const q5=new WeakMap;function j5(n,t){let e=q5.get(n);if(!e)throw new Error("Unknown slider state");return`${e.id}-${t}`}function dy(n,t,e){let{labelProps:r,fieldProps:i}=Z8(n),o=n.orientation==="vertical";var s;q5.set(t,{id:(s=r.id)!==null&&s!==void 0?s:i.id,"aria-describedby":n["aria-describedby"],"aria-details":n["aria-details"]});let{direction:a}=Pt(),{addGlobalListener:l,removeGlobalListener:u}=rt();const d=c.useRef(null),f=a==="rtl",h=c.useRef(null),{moveProps:p}=$8({onMoveStart(){h.current=null},onMove({deltaX:I,deltaY:y}){if(!e.current)return;let{height:x,width:g}=e.current.getBoundingClientRect(),M=o?x:g;h.current==null&&d.current!=null&&(h.current=t.getThumbPercent(d.current)*M);let w=o?y:I;if((o||f)&&(w=-w),h.current+=w,d.current!=null&&e.current){const z=h5(h.current/M,0,1);t.setThumbPercent(d.current,z)}},onMoveEnd(){d.current!=null&&(t.setThumbDragging(d.current,!1),d.current=null)}});let m=c.useRef(void 0),v=(I,y,x,g)=>{if(e.current&&!n.isDisabled&&t.values.every((M,w)=>!t.isThumbDragging(w))){let{height:M,width:w,top:z,left:A}=e.current.getBoundingClientRect(),C=o?M:w,F=((o?g:x)-(o?z:A))/C;(a==="rtl"||o)&&(F=1-F);let $=t.getPercentValue(F),X,_=t.values.findIndex(B=>$-B<0);if(_===0)X=_;else if(_===-1)X=t.values.length-1;else{let B=t.values[_-1],W=t.values[_];Math.abs(B-$)<Math.abs(W-$)?X=_-1:X=_}X>=0&&t.isThumbEditable(X)?(I.preventDefault(),d.current=X,t.setFocusedThumb(X),m.current=y,t.setThumbDragging(d.current,!0),t.setThumbValue(X,$),l(window,"mouseup",b,!1),l(window,"touchend",b,!1),l(window,"pointerup",b,!1)):d.current=null}},b=I=>{var y,x;((x=I.pointerId)!==null&&x!==void 0?x:(y=I.changedTouches)===null||y===void 0?void 0:y[0].identifier)===m.current&&(d.current!=null&&(t.setThumbDragging(d.current,!1),d.current=null),u(window,"mouseup",b,!1),u(window,"touchend",b,!1),u(window,"pointerup",b,!1))};return"htmlFor"in r&&r.htmlFor&&(delete r.htmlFor,r.onClick=()=>{var I;(I=document.getElementById(j5(t,0)))===null||I===void 0||I.focus(),lg("keyboard")}),{labelProps:r,groupProps:{role:"group",...i},trackProps:De({onMouseDown(I){I.button!==0||I.altKey||I.ctrlKey||I.metaKey||v(I,void 0,I.clientX,I.clientY)},onPointerDown(I){I.pointerType==="mouse"&&(I.button!==0||I.altKey||I.ctrlKey||I.metaKey)||v(I,I.pointerId,I.clientX,I.clientY)},onTouchStart(I){v(I,I.changedTouches[0].identifier,I.changedTouches[0].clientX,I.changedTouches[0].clientY)},style:{position:"relative",touchAction:"none"}},p),outputProps:{htmlFor:t.values.map((I,y)=>j5(t,y)).join(" "),"aria-live":"off"}}}function fy(n,t){let{index:e=0,isRequired:r,validationState:i,isInvalid:o,trackRef:s,inputRef:a,orientation:l=t.orientation,name:u,form:d}=n,f=n.isDisabled||t.isDisabled,h=l==="vertical",{direction:p}=Pt(),{addGlobalListener:m,removeGlobalListener:v}=rt(),b=q5.get(t);var I;const{labelProps:y,fieldProps:x}=Z8({...n,id:j5(t,e),"aria-labelledby":`${b.id} ${(I=n["aria-labelledby"])!==null&&I!==void 0?I:""}`.trim()}),g=t.values[e],M=c.useCallback(()=>{a.current&&p1(a.current)},[a]),w=t.focusedThumb===e;c.useEffect(()=>{w&&M()},[w,M]);let z=p==="rtl",A=c.useRef(null),{keyboardProps:C}=k5({onKeyDown(B){let{getThumbMaxValue:W,getThumbMinValue:N,decrementThumb:T,incrementThumb:O,setThumbValue:k,setThumbDragging:V,pageSize:U}=t;if(!/^(PageUp|PageDown|Home|End)$/.test(B.key)){B.continuePropagation();return}switch(B.preventDefault(),V(e,!0),B.key){case"PageUp":O(e,U);break;case"PageDown":T(e,U);break;case"Home":k(e,N(e));break;case"End":k(e,W(e));break}V(e,!1)}}),{moveProps:H}=$8({onMoveStart(){A.current=null,t.setThumbDragging(e,!0)},onMove({deltaX:B,deltaY:W,pointerType:N,shiftKey:T}){const{getThumbPercent:O,setThumbPercent:k,decrementThumb:V,incrementThumb:U,step:R,pageSize:G}=t;if(!s.current)return;let{width:ee,height:Q}=s.current.getBoundingClientRect(),D=h?Q:ee;if(A.current==null&&(A.current=O(e)*D),N==="keyboard")B>0&&z||B<0&&!z||W>0?V(e,T?G:R):U(e,T?G:R);else{let oe=h?W:B;(h||z)&&(oe=-oe),A.current+=oe,k(e,h5(A.current/D,0,1))}},onMoveEnd(){t.setThumbDragging(e,!1)}});t.setThumbEditable(e,!f);const{focusableProps:E}=P8(De(n,{onFocus:()=>t.setFocusedThumb(e),onBlur:()=>t.setFocusedThumb(void 0)}),a);let L=c.useRef(void 0),F=B=>{M(),L.current=B,t.setThumbDragging(e,!0),m(window,"mouseup",$,!1),m(window,"touchend",$,!1),m(window,"pointerup",$,!1)},$=B=>{var W,N;((N=B.pointerId)!==null&&N!==void 0?N:(W=B.changedTouches)===null||W===void 0?void 0:W[0].identifier)===L.current&&(M(),t.setThumbDragging(e,!1),v(window,"mouseup",$,!1),v(window,"touchend",$,!1),v(window,"pointerup",$,!1))},X=t.getThumbPercent(e);(h||p==="rtl")&&(X=1-X);let _=f?{}:De(C,H,{onMouseDown:B=>{B.button!==0||B.altKey||B.ctrlKey||B.metaKey||F()},onPointerDown:B=>{B.button!==0||B.altKey||B.ctrlKey||B.metaKey||F(B.pointerId)},onTouchStart:B=>{F(B.changedTouches[0].identifier)}});return Nm(a,t.defaultValues[e],B=>{t.setThumbValue(e,B)}),{inputProps:De(E,x,{type:"range",tabIndex:f?void 0:0,min:t.getThumbMinValue(e),max:t.getThumbMaxValue(e),step:t.step,value:g,name:u,form:d,disabled:f,"aria-orientation":l,"aria-valuetext":t.getThumbValueLabel(e),"aria-required":r||void 0,"aria-invalid":o||i==="invalid"||void 0,"aria-errormessage":n["aria-errormessage"],"aria-describedby":[b["aria-describedby"],n["aria-describedby"]].filter(Boolean).join(" "),"aria-details":[b["aria-details"],n["aria-details"]].filter(Boolean).join(" "),onChange:B=>{t.setThumbValue(e,parseFloat(B.target.value))}}),thumbProps:{..._,style:{position:"absolute",[h?"top":"left"]:`${X*100}%`,transform:"translate(-50%, -50%)",touchAction:"none"}},labelProps:y,isDragging:t.isThumbDragging(e),isDisabled:f,isFocused:w}}const py=new WeakMap;function hy(n,t,e){let{type:r}=n,{isOpen:i}=t;c.useEffect(()=>{e&&e.current&&py.set(e.current,t.close)});let o;r==="menu"?o=!0:r==="listbox"&&(o="listbox");let s=I1();return{triggerProps:{"aria-haspopup":o,"aria-expanded":i,"aria-controls":i?s:void 0,onPress:t.toggle},overlayProps:{id:s}}}function U5(n){return ym()?n.altKey:n.ctrlKey}function Zn(n,t){var e,r;let i=`[data-key="${CSS.escape(String(t))}"]`,o=(e=n.current)===null||e===void 0?void 0:e.dataset.collection;return o&&(i=`[data-collection="${CSS.escape(o)}"]${i}`),(r=n.current)===null||r===void 0?void 0:r.querySelector(i)}const oc=new WeakMap;function vy(n){let t=I1();return oc.set(n,t),t}function my(n){return oc.get(n)}const gy=1e3;function yy(n){let{keyboardDelegate:t,selectionManager:e,onTypeSelect:r}=n,i=c.useRef({search:"",timeout:void 0}).current,o=s=>{let a=by(s.key);if(!(!a||s.ctrlKey||s.metaKey||!s.currentTarget.contains(s.target)||i.search.length===0&&a===" ")){if(a===" "&&i.search.trim().length>0&&(s.preventDefault(),"continuePropagation"in s||s.stopPropagation()),i.search+=a,t.getKeyForSearch!=null){let l=t.getKeyForSearch(i.search,e.focusedKey);l==null&&(l=t.getKeyForSearch(i.search)),l!=null&&(e.setFocusedKey(l),r&&r(l))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},gy)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?o:void 0}}}function by(n){return n.length===1||!/^[A-Z]/i.test(n)?n:""}function My(n){let{selectionManager:t,keyboardDelegate:e,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:s=!1,disallowSelectAll:a=!1,escapeKeyBehavior:l="clearSelection",selectOnFocus:u=t.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:f,allowsTabNavigation:h=!1,isVirtualized:p,scrollRef:m=r,linkBehavior:v="action"}=n,{direction:b}=Pt(),I=zn(),y=B=>{var W;if(B.altKey&&B.key==="Tab"&&B.preventDefault(),!(!((W=r.current)===null||W===void 0)&&W.contains(B.target)))return;const N=(Y,fe)=>{if(Y!=null){if(t.isLink(Y)&&v==="selection"&&u&&!U5(B)){C1.flushSync(()=>{t.setFocusedKey(Y,fe)});let re=Zn(r,Y),K=t.getItemProps(Y);re&&I.open(re,B,K.href,K.routerOptions);return}if(t.setFocusedKey(Y,fe),t.isLink(Y)&&v==="override")return;B.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Y):u&&!U5(B)&&t.replaceSelection(Y)}};switch(B.key){case"ArrowDown":if(e.getKeyBelow){var T,O,k;let Y=t.focusedKey!=null?(T=e.getKeyBelow)===null||T===void 0?void 0:T.call(e,t.focusedKey):(O=e.getFirstKey)===null||O===void 0?void 0:O.call(e);Y==null&&o&&(Y=(k=e.getFirstKey)===null||k===void 0?void 0:k.call(e,t.focusedKey)),Y!=null&&(B.preventDefault(),N(Y))}break;case"ArrowUp":if(e.getKeyAbove){var V,U,R;let Y=t.focusedKey!=null?(V=e.getKeyAbove)===null||V===void 0?void 0:V.call(e,t.focusedKey):(U=e.getLastKey)===null||U===void 0?void 0:U.call(e);Y==null&&o&&(Y=(R=e.getLastKey)===null||R===void 0?void 0:R.call(e,t.focusedKey)),Y!=null&&(B.preventDefault(),N(Y))}break;case"ArrowLeft":if(e.getKeyLeftOf){var G,ee,Q;let Y=t.focusedKey!=null?(G=e.getKeyLeftOf)===null||G===void 0?void 0:G.call(e,t.focusedKey):null;Y==null&&o&&(Y=b==="rtl"?(ee=e.getFirstKey)===null||ee===void 0?void 0:ee.call(e,t.focusedKey):(Q=e.getLastKey)===null||Q===void 0?void 0:Q.call(e,t.focusedKey)),Y!=null&&(B.preventDefault(),N(Y,b==="rtl"?"first":"last"))}break;case"ArrowRight":if(e.getKeyRightOf){var D,oe,te;let Y=t.focusedKey!=null?(D=e.getKeyRightOf)===null||D===void 0?void 0:D.call(e,t.focusedKey):null;Y==null&&o&&(Y=b==="rtl"?(oe=e.getLastKey)===null||oe===void 0?void 0:oe.call(e,t.focusedKey):(te=e.getFirstKey)===null||te===void 0?void 0:te.call(e,t.focusedKey)),Y!=null&&(B.preventDefault(),N(Y,b==="rtl"?"last":"first"))}break;case"Home":if(e.getFirstKey){if(t.focusedKey===null&&B.shiftKey)return;B.preventDefault();let Y=e.getFirstKey(t.focusedKey,wt(B));t.setFocusedKey(Y),Y!=null&&(wt(B)&&B.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Y):u&&t.replaceSelection(Y))}break;case"End":if(e.getLastKey){if(t.focusedKey===null&&B.shiftKey)return;B.preventDefault();let Y=e.getLastKey(t.focusedKey,wt(B));t.setFocusedKey(Y),Y!=null&&(wt(B)&&B.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Y):u&&t.replaceSelection(Y))}break;case"PageDown":if(e.getKeyPageBelow&&t.focusedKey!=null){let Y=e.getKeyPageBelow(t.focusedKey);Y!=null&&(B.preventDefault(),N(Y))}break;case"PageUp":if(e.getKeyPageAbove&&t.focusedKey!=null){let Y=e.getKeyPageAbove(t.focusedKey);Y!=null&&(B.preventDefault(),N(Y))}break;case"a":wt(B)&&t.selectionMode==="multiple"&&a!==!0&&(B.preventDefault(),t.selectAll());break;case"Escape":l==="clearSelection"&&!s&&t.selectedKeys.size!==0&&(B.stopPropagation(),B.preventDefault(),t.clearSelection());break;case"Tab":if(!h){if(B.shiftKey)r.current.focus();else{let Y=K1(r.current,{tabbable:!0}),fe,re;do re=Y.lastChild(),re&&(fe=re);while(re);fe&&!fe.contains(document.activeElement)&&p1(fe)}break}}},x=c.useRef({top:0,left:0});Tn(m,"scroll",p?void 0:()=>{var B,W,N,T;x.current={top:(N=(B=m.current)===null||B===void 0?void 0:B.scrollTop)!==null&&N!==void 0?N:0,left:(T=(W=m.current)===null||W===void 0?void 0:W.scrollLeft)!==null&&T!==void 0?T:0}});let g=B=>{if(t.isFocused){B.currentTarget.contains(B.target)||t.setFocused(!1);return}if(B.currentTarget.contains(B.target)){if(t.setFocused(!0),t.focusedKey==null){var W,N;let k=U=>{U!=null&&(t.setFocusedKey(U),u&&!t.isSelected(U)&&t.replaceSelection(U))},V=B.relatedTarget;var T,O;V&&B.currentTarget.compareDocumentPosition(V)&Node.DOCUMENT_POSITION_FOLLOWING?k((T=t.lastSelectedKey)!==null&&T!==void 0?T:(W=e.getLastKey)===null||W===void 0?void 0:W.call(e)):k((O=t.firstSelectedKey)!==null&&O!==void 0?O:(N=e.getFirstKey)===null||N===void 0?void 0:N.call(e))}else!p&&m.current&&(m.current.scrollTop=x.current.top,m.current.scrollLeft=x.current.left);if(t.focusedKey!=null&&m.current){let k=Zn(r,t.focusedKey);k instanceof HTMLElement&&(!k.contains(document.activeElement)&&!f&&p1(k),Wn()==="keyboard"&&n8(k,{containingElement:r.current}))}}},M=B=>{B.currentTarget.contains(B.relatedTarget)||t.setFocused(!1)},w=c.useRef(!1);Tn(r,Fm,f?B=>{let{detail:W}=B;B.stopPropagation(),t.setFocused(!0),W?.focusStrategy==="first"&&(w.current=!0)}:void 0);let z=Re(()=>{var B,W;let N=(W=(B=e.getFirstKey)===null||B===void 0?void 0:B.call(e))!==null&&W!==void 0?W:null;if(N==null){let T=Xe();R8(r.current),X8(T,null),t.collection.size>0&&(w.current=!1)}else t.setFocusedKey(N),w.current=!1});Z9(()=>{w.current&&z()},[t.collection,z]);let A=Re(()=>{t.collection.size>0&&(w.current=!1)});Z9(()=>{A()},[t.focusedKey,A]),Tn(r,Am,f?B=>{var W;B.stopPropagation(),t.setFocused(!1),!((W=B.detail)===null||W===void 0)&&W.clearFocusKey&&t.setFocusedKey(null)}:void 0);const C=c.useRef(i),H=c.useRef(!1);c.useEffect(()=>{if(C.current){var B,W;let O=null;var N;i==="first"&&(O=(N=(B=e.getFirstKey)===null||B===void 0?void 0:B.call(e))!==null&&N!==void 0?N:null);var T;i==="last"&&(O=(T=(W=e.getLastKey)===null||W===void 0?void 0:W.call(e))!==null&&T!==void 0?T:null);let k=t.selectedKeys;if(k.size){for(let V of k)if(t.canSelectItem(V)){O=V;break}}t.setFocused(!0),t.setFocusedKey(O),O==null&&!f&&r.current&&f6(r.current),t.collection.size>0&&(C.current=!1,H.current=!0)}});let E=c.useRef(t.focusedKey),L=c.useRef(null);c.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==E.current||H.current)&&m.current&&r.current){let B=Wn(),W=Zn(r,t.focusedKey);if(!(W instanceof HTMLElement))return;(B==="keyboard"||H.current)&&(L.current&&cancelAnimationFrame(L.current),L.current=requestAnimationFrame(()=>{m.current&&(e8(m.current,W),B!=="virtual"&&n8(W,{containingElement:r.current}))}))}!f&&t.isFocused&&t.focusedKey==null&&E.current!=null&&r.current&&f6(r.current),E.current=t.focusedKey,H.current=!1}),c.useEffect(()=>()=>{L.current&&cancelAnimationFrame(L.current)},[]),Tn(r,"react-aria-focus-scope-restore",B=>{B.preventDefault(),t.setFocused(!0)});let F={onKeyDown:y,onFocus:g,onBlur:M,onMouseDown(B){m.current===B.target&&B.preventDefault()}},{typeSelectProps:$}=yy({keyboardDelegate:e,selectionManager:t});d||(F=De($,F));let X;f||(X=t.focusedKey==null?0:-1);let _=vy(t.collection);return{collectionProps:De(F,{tabIndex:X,"data-collection":_})}}function xy(n){let{id:t,selectionManager:e,key:r,ref:i,shouldSelectOnPressUp:o,shouldUseVirtualFocus:s,focus:a,isDisabled:l,onAction:u,allowsDifferentPressOrigin:d,linkBehavior:f="action"}=n,h=zn();t=I1(t);let p=N=>{if(N.pointerType==="keyboard"&&U5(N))e.toggleSelection(r);else{if(e.selectionMode==="none")return;if(e.isLink(r)){if(f==="selection"&&i.current){let T=e.getItemProps(r);h.open(i.current,N,T.href,T.routerOptions),e.setSelectedKeys(e.selectedKeys);return}else if(f==="override"||f==="none")return}e.selectionMode==="single"?e.isSelected(r)&&!e.disallowEmptySelection?e.toggleSelection(r):e.replaceSelection(r):N&&N.shiftKey?e.extendSelection(r):e.selectionBehavior==="toggle"||N&&(wt(N)||N.pointerType==="touch"||N.pointerType==="virtual")?e.toggleSelection(r):e.replaceSelection(r)}};c.useEffect(()=>{r===e.focusedKey&&e.isFocused&&(s?R8(i.current):a?a():document.activeElement!==i.current&&i.current&&f6(i.current))},[i,r,e.focusedKey,e.childFocusStrategy,e.isFocused,s]),l=l||e.isDisabled(r);let m={};!s&&!l?m={tabIndex:r===e.focusedKey?0:-1,onFocus(N){N.target===i.current&&e.setFocusedKey(r)}}:l&&(m.onMouseDown=N=>{N.preventDefault()});let v=e.isLink(r)&&f==="override",b=e.isLink(r)&&f!=="selection"&&f!=="none",I=!l&&e.canSelectItem(r)&&!v,y=(u||b)&&!l,x=y&&(e.selectionBehavior==="replace"?!I:!I||e.isEmpty),g=y&&I&&e.selectionBehavior==="replace",M=x||g,w=c.useRef(null),z=M&&I,A=c.useRef(!1),C=c.useRef(!1),H=e.getItemProps(r),E=N=>{u&&u(),b&&i.current&&h.open(i.current,N,H.href,H.routerOptions)},L={ref:i};if(o?(L.onPressStart=N=>{w.current=N.pointerType,A.current=z,N.pointerType==="keyboard"&&(!M||ac())&&p(N)},d?(L.onPressUp=x?void 0:N=>{N.pointerType==="mouse"&&I&&p(N)},L.onPress=x?E:N=>{N.pointerType!=="keyboard"&&N.pointerType!=="mouse"&&I&&p(N)}):L.onPress=N=>{if(x||g&&N.pointerType!=="mouse"){if(N.pointerType==="keyboard"&&!sc())return;E(N)}else N.pointerType!=="keyboard"&&I&&p(N)}):(L.onPressStart=N=>{w.current=N.pointerType,A.current=z,C.current=x,I&&(N.pointerType==="mouse"&&!x||N.pointerType==="keyboard"&&(!y||ac()))&&p(N)},L.onPress=N=>{(N.pointerType==="touch"||N.pointerType==="pen"||N.pointerType==="virtual"||N.pointerType==="keyboard"&&M&&sc()||N.pointerType==="mouse"&&C.current)&&(M?E(N):I&&p(N))}),m["data-collection"]=my(e.collection),m["data-key"]=r,L.preventFocusOnPress=s,s&&(L=De(L,{onPressStart(N){N.pointerType!=="touch"&&(e.setFocused(!0),e.setFocusedKey(r))},onPress(N){N.pointerType==="touch"&&(e.setFocused(!0),e.setFocusedKey(r))}})),H)for(let N of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])H[N]&&(L[N]=r5(L[N],H[N]));let{pressProps:F,isPressed:$}=Vn(L),X=g?N=>{w.current==="mouse"&&(N.stopPropagation(),N.preventDefault(),E(N))}:void 0,{longPressProps:_}=T8({isDisabled:!z,onLongPress(N){N.pointerType==="touch"&&(p(N),e.setSelectionBehavior("toggle"))}}),B=N=>{w.current==="touch"&&A.current&&N.preventDefault()},W=f!=="none"&&e.isLink(r)?N=>{nt.isOpening||N.preventDefault()}:void 0;return{itemProps:De(m,I||x||s&&!l?F:{},z?_:{},{onDoubleClick:X,onDragStartCapture:B,onClick:W,id:t},s?{onMouseDown:N=>N.preventDefault()}:void 0),isPressed:$,isSelected:e.isSelected(r),isFocused:e.isFocused&&e.focusedKey===r,isDisabled:l,allowsSelection:I,hasAction:M}}function sc(){let n=window.event;return n?.key==="Enter"}function ac(){let n=window.event;return n?.key===" "||n?.code==="Space"}class lc{getItemRect(t){let e=this.ref.current;if(!e)return null;let r=t!=null?Zn(this.ref,t):null;if(!r)return null;let i=e.getBoundingClientRect(),o=r.getBoundingClientRect();return{x:o.left-i.left+e.scrollLeft,y:o.top-i.top+e.scrollTop,width:o.width,height:o.height}}getContentSize(){let t=this.ref.current;var e,r;return{width:(e=t?.scrollWidth)!==null&&e!==void 0?e:0,height:(r=t?.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let t=this.ref.current;var e,r,i,o;return{x:(e=t?.scrollLeft)!==null&&e!==void 0?e:0,y:(r=t?.scrollTop)!==null&&r!==void 0?r:0,width:(i=t?.offsetWidth)!==null&&i!==void 0?i:0,height:(o=t?.offsetHeight)!==null&&o!==void 0?o:0}}constructor(t){this.ref=t}}class Iy{isDisabled(t){var e;return this.disabledBehavior==="all"&&(((e=t.props)===null||e===void 0?void 0:e.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,e){let r=t;for(;r!=null;){let i=this.collection.getItem(r);if(i?.type==="item"&&!this.isDisabled(i))return r;r=e(r)}return null}getNextKey(t){let e=t;return e=this.collection.getKeyAfter(e),this.findNextNonDisabled(e,r=>this.collection.getKeyAfter(r))}getPreviousKey(t){let e=t;return e=this.collection.getKeyBefore(e),this.findNextNonDisabled(e,r=>this.collection.getKeyBefore(r))}findKey(t,e,r){let i=t,o=this.layoutDelegate.getItemRect(i);if(!o||i==null)return null;let s=o;do{if(i=e(i),i==null)break;o=this.layoutDelegate.getItemRect(i)}while(o&&r(s,o)&&i!=null);return i}isSameRow(t,e){return t.y===e.y||t.x!==e.x}isSameColumn(t,e){return t.x===e.x||t.y!==e.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,e=>this.getNextKey(e),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,e=>this.getPreviousKey(e),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,e){return e?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let e=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[e]?(t=this.layoutDelegate[e](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[e](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let e=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[e]?(t=this.layoutDelegate[e](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[e](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,e=>this.collection.getKeyAfter(e))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,e=>this.collection.getKeyBefore(e))}getKeyPageAbove(t){let e=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(e&&!c5(e))return this.getFirstKey();let i=t;if(this.orientation==="horizontal"){let o=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(t){let e=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(e&&!c5(e))return this.getLastKey();let i=t;if(this.orientation==="horizontal"){let o=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(t,e){if(!this.collator)return null;let r=this.collection,i=e||this.getFirstKey();for(;i!=null;){let o=r.getItem(i);if(!o)return null;let s=o.textValue.slice(0,t.length);if(o.textValue&&this.collator.compare(s,t)===0)return i;i=this.getNextKey(i)}return null}constructor(...t){if(t.length===1){let e=t[0];this.collection=e.collection,this.ref=e.ref,this.collator=e.collator,this.disabledKeys=e.disabledKeys||new Set,this.disabledBehavior=e.disabledBehavior||"all",this.orientation=e.orientation||"vertical",this.direction=e.direction,this.layout=e.layout||"stack",this.layoutDelegate=e.layoutDelegate||new lc(e.ref)}else this.collection=t[0],this.disabledKeys=t[1],this.ref=t[2],this.collator=t[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new lc(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function Ey(n){let{selectionManager:t,collection:e,disabledKeys:r,ref:i,keyboardDelegate:o,layoutDelegate:s}=n,a=Gg({usage:"search",sensitivity:"base"}),l=t.disabledBehavior,u=c.useMemo(()=>o||new Iy({collection:e,disabledKeys:r,disabledBehavior:l,ref:i,collator:a,layoutDelegate:s}),[o,s,e,r,i,a,l]),{collectionProps:d}=My({...n,ref:i,selectionManager:t,keyboardDelegate:u});return{listProps:d}}class wy{build(t,e){return this.context=e,cc(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:e,items:r}=t;if(c.isValidElement(e)&&e.type===c.Fragment)yield*this.iterateCollection({children:e.props.children,items:r});else if(typeof e=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let o of r)yield*this.getFullNode({value:o,index:i},{renderer:e}),i++}else{let i=[];c.Children.forEach(e,s=>{s&&i.push(s)});let o=0;for(let s of i){let a=this.getFullNode({element:s,index:o},{});for(let l of a)o++,yield l}}}getKey(t,e,r,i){if(t.key!=null)return t.key;if(e.type==="cell"&&e.key!=null)return`${i}${e.key}`;let o=e.value;if(o!=null){var s;let a=(s=o.key)!==null&&s!==void 0?s:o.id;if(a==null)throw new Error("No key found for item");return a}return i?`${i}.${e.index}`:`$.${e.index}`}getChildState(t,e){return{renderer:e.renderer||t.renderer}}*getFullNode(t,e,r,i){if(c.isValidElement(t.element)&&t.element.type===c.Fragment){let b=[];c.Children.forEach(t.element.props.children,y=>{b.push(y)});var o;let I=(o=t.index)!==null&&o!==void 0?o:0;for(const y of b)yield*this.getFullNode({element:y,index:I++},e,r,i);return}let s=t.element;if(!s&&t.value&&e&&e.renderer){let b=this.cache.get(t.value);if(b&&(!b.shouldInvalidate||!b.shouldInvalidate(this.context))){b.index=t.index,b.parentKey=i?i.key:null,yield b;return}s=e.renderer(t.value)}if(c.isValidElement(s)){let b=s.type;if(typeof b!="function"&&typeof b.getCollectionNode!="function"){let g=s.type;throw new Error(`Unknown element <${g}> in collection.`)}let I=b.getCollectionNode(s.props,this.context);var a;let y=(a=t.index)!==null&&a!==void 0?a:0,x=I.next();for(;!x.done&&x.value;){let g=x.value;t.index=y;var l;let M=(l=g.key)!==null&&l!==void 0?l:null;M==null&&(M=g.element?null:this.getKey(s,t,e,r));let z=[...this.getFullNode({...g,key:M,index:y,wrapper:Sy(t.wrapper,g.wrapper)},this.getChildState(e,g),r?`${r}${s.key}`:s.key,i)];for(let A of z){var u,d;A.value=(d=(u=g.value)!==null&&u!==void 0?u:t.value)!==null&&d!==void 0?d:null,A.value&&this.cache.set(A.value,A);var f;if(t.type&&A.type!==t.type)throw new Error(`Unsupported type <${W5(A.type)}> in <${W5((f=i?.type)!==null&&f!==void 0?f:"unknown parent type")}>. Only <${W5(t.type)}> is supported.`);y++,yield A}x=I.next(z)}return}if(t.key==null||t.type==null)return;let h=this;var p,m;let v={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:(p=t.value)!==null&&p!==void 0?p:null,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:(m=t.textValue)!==null&&m!==void 0?m:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:cc(function*(){if(!t.hasChildNodes||!t.childNodes)return;let b=0;for(let I of t.childNodes()){I.key!=null&&(I.key=`${v.key}${I.key}`);let y=h.getFullNode({...I,index:b},h.getChildState(e,I),v.key,v);for(let x of y)b++,yield x}})};yield v}constructor(){this.cache=new WeakMap}}function cc(n){let t=[],e=null;return{*[Symbol.iterator](){for(let r of t)yield r;e||(e=n());for(let r of e)t.push(r),yield r}}}function Sy(n,t){if(n&&t)return e=>n(t(e));if(n)return n;if(t)return t}function W5(n){return n[0].toUpperCase()+n.slice(1)}function Cy(n,t,e){let r=c.useMemo(()=>new wy,[]),{children:i,items:o,collection:s}=n;return c.useMemo(()=>{if(s)return s;let l=r.build({children:i,items:o},e);return t(l)},[r,i,o,s,e,t])}function uc(n,t){return typeof t.getChildren=="function"?t.getChildren(n.key):n.childNodes}function Py(n){return ky(n)}function ky(n,t){for(let e of n)return e}function Y5(n,t,e){if(t.parentKey===e.parentKey)return t.index-e.index;let r=[...dc(n,t),t],i=[...dc(n,e),e],o=r.slice(0,i.length).findIndex((s,a)=>s!==i[a]);return o!==-1?(t=r[o],e=i[o],t.index-e.index):r.findIndex(s=>s===e)>=0?1:(i.findIndex(s=>s===t)>=0,-1)}function dc(n,t){let e=[],r=t;for(;r?.parentKey!=null;)r=n.getItem(r.parentKey),r&&e.unshift(r);return e}const fc=new WeakMap;function zy(n){let t=fc.get(n);if(t!=null)return t;let e=0,r=i=>{for(let o of i)o.type==="section"?r(uc(o,n)):o.type==="item"&&e++};return r(n),fc.set(n,e),e}var pc={};pc={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var hc={};hc={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var vc={};vc={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var mc={};mc={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var gc={};gc={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var yc={};yc={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var bc={};bc={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Mc={};Mc={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var xc={};xc={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Ic={};Ic={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Ec={};Ec={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var wc={};wc={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Sc={};Sc={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Cc={};Cc={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var Pc={};Pc={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var kc={};kc={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var zc={};zc={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var $c={};$c={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Tc={};Tc={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Dc={};Dc={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var Oc={};Oc={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var _c={};_c={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var Nc={};Nc={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Ac={};Ac={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var Fc={};Fc={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var Lc={};Lc={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var Kc={};Kc={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var Bc={};Bc={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var Hc={};Hc={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var Vc={};Vc={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var qc={};qc={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var jc={};jc={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var Uc={};Uc={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var Wc={};Wc={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var Yc={};Yc={"ar-AE":pc,"bg-BG":hc,"cs-CZ":vc,"da-DK":mc,"de-DE":gc,"el-GR":yc,"en-US":bc,"es-ES":Mc,"et-EE":xc,"fi-FI":Ic,"fr-FR":Ec,"he-IL":wc,"hr-HR":Sc,"hu-HU":Cc,"it-IT":Pc,"ja-JP":kc,"ko-KR":zc,"lt-LT":$c,"lv-LV":Tc,"nb-NO":Dc,"nl-NL":Oc,"pl-PL":_c,"pt-BR":Nc,"pt-PT":Ac,"ro-RO":Fc,"ru-RU":Lc,"sk-SK":Kc,"sl-SI":Bc,"sr-SP":Hc,"sv-SE":Vc,"tr-TR":qc,"uk-UA":jc,"zh-CN":Uc,"zh-TW":Wc};function $y(n){return n&&n.__esModule?n.default:n}function Ty(n,t,e){let{type:r="menu",isDisabled:i,trigger:o="press"}=n,s=I1(),{triggerProps:a,overlayProps:l}=hy({type:r},t,e),u=p=>{if(!i&&!(o==="longPress"&&!p.altKey)&&e&&e.current)switch(p.key){case"Enter":case" ":if(o==="longPress"||p.isDefaultPrevented())return;case"ArrowDown":"continuePropagation"in p||p.stopPropagation(),p.preventDefault(),t.toggle("first");break;case"ArrowUp":"continuePropagation"in p||p.stopPropagation(),p.preventDefault(),t.toggle("last");break;default:"continuePropagation"in p&&p.continuePropagation()}},d=qg($y(Yc),"@react-aria/menu"),{longPressProps:f}=T8({isDisabled:i||o!=="longPress",accessibilityDescription:d.format("longPressMessage"),onLongPressStart(){t.close()},onLongPress(){t.open("first")}}),h={preventFocusOnPress:!0,onPressStart(p){p.pointerType!=="touch"&&p.pointerType!=="keyboard"&&!i&&(p1(p.target),t.open(p.pointerType==="virtual"?"first":null))},onPress(p){p.pointerType==="touch"&&!i&&(p1(p.target),t.toggle())}};return delete a.onPress,{menuTriggerProps:{...a,...o==="press"?h:f,id:s,onKeyDown:u},menuProps:{...l,"aria-labelledby":s,autoFocus:t.focusStrategy||!0,onClose:t.close}}}const Gc=new WeakMap;function Dy(n,t,e){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:o,...s}=n;!n["aria-label"]&&!n["aria-labelledby"]&&process.env.NODE_ENV!=="production"&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let a=et(n,{labelable:!0}),{listProps:l}=Ey({...s,ref:e,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return Gc.set(t,{onClose:n.onClose,onAction:n.onAction,shouldUseVirtualFocus:n.shouldUseVirtualFocus}),{menuProps:De(a,{onKeyDown:i,onKeyUp:o},{role:"menu",...l,onKeyDown:u=>{var d;(u.key!=="Escape"||n.shouldUseVirtualFocus)&&((d=l.onKeyDown)===null||d===void 0||d.call(l,u))}})}}function Oy(n,t,e){let{id:r,key:i,closeOnSelect:o,isVirtualized:s,"aria-haspopup":a,onPressStart:l,onPressUp:u,onPress:d,onPressChange:f,onPressEnd:h,onClick:p,onHoverStart:m,onHoverChange:v,onHoverEnd:b,onKeyDown:I,onKeyUp:y,onFocus:x,onFocusChange:g,onBlur:M,selectionManager:w=t.selectionManager}=n,z=!!a,A=z&&n["aria-expanded"]==="true";var C;let H=(C=n.isDisabled)!==null&&C!==void 0?C:w.isDisabled(i);var E;let L=(E=n.isSelected)!==null&&E!==void 0?E:w.isSelected(i),F=Gc.get(t),$=t.collection.getItem(i),X=n.onClose||F.onClose,_=zn(),B=()=>{var ue;if(!z&&(!($==null||(ue=$.props)===null||ue===void 0)&&ue.onAction?$.props.onAction():n.onAction&&n.onAction(i),F.onAction)){let be=F.onAction;be(i)}},W="menuitem";z||(w.selectionMode==="single"?W="menuitemradio":w.selectionMode==="multiple"&&(W="menuitemcheckbox"));let N=n5(),T=n5(),O=n5(),k={id:r,"aria-disabled":H||void 0,role:W,"aria-label":n["aria-label"],"aria-labelledby":N,"aria-describedby":[T,O].filter(Boolean).join(" ")||void 0,"aria-controls":n["aria-controls"],"aria-haspopup":a,"aria-expanded":n["aria-expanded"]};w.selectionMode!=="none"&&!z&&(k["aria-checked"]=L),s&&(k["aria-posinset"]=$?.index,k["aria-setsize"]=zy(t.collection));let V=ue=>{ue.pointerType==="keyboard"&&!w.isLink(i)&&ue.target.click(),l?.(ue)},U=c.useRef(!1),R=ue=>{f?.(ue),U.current=ue},G=ue=>{ue.pointerType==="mouse"&&(U.current||ue.target.click()),ue.pointerType!=="keyboard"&&!z&&X&&(o??(w.selectionMode!=="multiple"||w.isLink(i)))&&X(),u?.(ue)},ee=ue=>{p?.(ue),B(),Cm(ue,_,$.props.href,$?.props.routerOptions)},{itemProps:Q,isFocused:D}=xy({id:r,selectionManager:w,key:i,ref:e,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:F.shouldUseVirtualFocus}),{pressProps:oe,isPressed:te}=Vn({onPressStart:V,onPress:d,onPressUp:G,onPressChange:R,onPressEnd:h,isDisabled:H}),{hoverProps:Y}=T5({isDisabled:H,onHoverStart(ue){!Un()&&!(A&&a)&&(w.setFocused(!0),w.setFocusedKey(i)),m?.(ue)},onHoverChange:v,onHoverEnd:b}),{keyboardProps:fe}=k5({onKeyDown:ue=>{if(ue.repeat){ue.continuePropagation();return}switch(ue.key){case" ":!H&&w.selectionMode==="none"&&!z&&o!==!1&&X&&X();break;case"Enter":!H&&o!==!1&&!z&&X&&X();break;default:z||ue.continuePropagation(),I?.(ue);break}},onKeyUp:y}),{focusProps:re}=P5({onBlur:M,onFocus:x,onFocusChange:g}),K=et($?.props);delete K.id;let he=Sm($?.props);return{menuItemProps:{...k,...De(K,he,z?{onFocus:Q.onFocus,"data-collection":Q["data-collection"],"data-key":Q["data-key"]}:Q,oe,Y,fe,re,F.shouldUseVirtualFocus||z?{onMouseDown:ue=>ue.preventDefault()}:void 0,H?void 0:{onClick:ee}),tabIndex:Q.tabIndex!=null&&A&&!F.shouldUseVirtualFocus?-1:Q.tabIndex},labelProps:{id:N},descriptionProps:{id:T},keyboardShortcutProps:{id:O},isFocused:D,isFocusVisible:D&&w.isFocused&&Un()&&!A,isSelected:L,isPressed:te,isDisabled:H}}function _y(n){let{heading:t,"aria-label":e}=n,r=I1();return{itemProps:{role:"presentation"},headingProps:t?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":e,"aria-labelledby":t?r:void 0}}}const Ny=c.createContext(null),Ay=c.createContext({}),Fy=Ym(function(t,e){[t,e]=v5(t,e,Ay),t=Ly(t);let r=t,{isPending:i}=r,{buttonProps:o,isPressed:s}=Rg(t,e),{focusProps:a,isFocused:l,isFocusVisible:u}=G8(t),{hoverProps:d,isHovered:f}=T5({...t,isDisabled:t.isDisabled||i}),h={isHovered:f,isPressed:(r.isPressed||s)&&!i,isFocused:l,isFocusVisible:u,isDisabled:t.isDisabled||!1,isPending:i??!1},p=Nn({...t,values:h,defaultClassName:"react-aria-Button"}),m=I1(o.id),v=I1(),b=o["aria-labelledby"];i&&(b?b=`${b} ${v}`:o["aria-label"]&&(b=`${m} ${v}`));let I=c.useRef(i);c.useEffect(()=>{let x={"aria-labelledby":b||m};(!I.current&&l&&i||I.current&&l&&!i)&&Q8(x,"assertive"),I.current=i},[i,l,b,m]);let y=et(t,{global:!0});return delete y.onClick,c.createElement("button",{...De(y,p,o,a,d),type:o.type==="submit"&&i?"button":o.type,id:m,ref:e,"aria-labelledby":b,slot:t.slot||void 0,"aria-disabled":i?"true":o["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":h.isPressed||void 0,"data-hovered":f||void 0,"data-focused":l||void 0,"data-pending":i||void 0,"data-focus-visible":u||void 0},c.createElement(Ny.Provider,{value:{id:v}},p.children))});function Ly(n){return n.isPending&&(n.onPress=void 0,n.onPressStart=void 0,n.onPressEnd=void 0,n.onPressChange=void 0,n.onPressUp=void 0,n.onKeyDown=void 0,n.onKeyUp=void 0,n.onClick=void 0,n.href=void 0),n}const Ky=c.createContext({});class E1 extends Set{constructor(t,e,r){super(t),t instanceof E1?(this.anchorKey=e??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=e??null,this.currentKey=r??null)}}function By(n,t){if(n.size!==t.size)return!1;for(let e of n)if(!t.has(e))return!1;return!0}function Rc(n){let{selectionMode:t="none",disallowEmptySelection:e=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=n,s=c.useRef(!1),[,a]=c.useState(!1),l=c.useRef(null),u=c.useRef(null),[,d]=c.useState(null),f=c.useMemo(()=>Xc(n.selectedKeys),[n.selectedKeys]),h=c.useMemo(()=>Xc(n.defaultSelectedKeys,new E1),[n.defaultSelectedKeys]),[p,m]=Dn(f,h,n.onSelectionChange),v=c.useMemo(()=>n.disabledKeys?new Set(n.disabledKeys):new Set,[n.disabledKeys]),[b,I]=c.useState(i);i==="replace"&&b==="toggle"&&typeof p=="object"&&p.size===0&&I("replace");let y=c.useRef(i);return c.useEffect(()=>{i!==y.current&&(I(i),y.current=i)},[i]),{selectionMode:t,disallowEmptySelection:e,selectionBehavior:b,setSelectionBehavior:I,get isFocused(){return s.current},setFocused(x){s.current=x,a(x)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(x,g="first"){l.current=x,u.current=g,d(x)},selectedKeys:p,setSelectedKeys(x){(r||!By(x,p))&&m(x)},disabledKeys:v,disabledBehavior:o}}function Xc(n,t){return n?n==="all"?"all":new E1(n):t}class er{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,e){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,e)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let e=this.getKey(t);return e==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(e):this.state.selectedKeys.has(e)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),e=this.state.selectedKeys;return this._isSelectAll=t.every(r=>e.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&Y5(this.collection,i,t)<0)&&(t=i)}var e;return(e=t?.key)!==null&&e!==void 0?e:null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&Y5(this.collection,i,t)>0)&&(t=i)}var e;return(e=t?.key)!==null&&e!==void 0?e:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let e=this.getKey(t);if(e==null)return;let r;if(this.state.selectedKeys==="all")r=new E1([e],e,e);else{let s=this.state.selectedKeys;var i;let a=(i=s.anchorKey)!==null&&i!==void 0?i:e;r=new E1(s,a,e);var o;for(let l of this.getKeyRange(a,(o=s.currentKey)!==null&&o!==void 0?o:e))r.delete(l);for(let l of this.getKeyRange(e,a))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(t,e){let r=this.collection.getItem(t),i=this.collection.getItem(e);return r&&i?Y5(this.collection,r,i)<=0?this.getKeyRangeInternal(t,e):this.getKeyRangeInternal(e,t):[]}getKeyRangeInternal(t,e){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,e);let i=[],o=t;for(;o!=null;){let s=this.collection.getItem(o);if(s&&(s.type==="item"||s.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===e)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(t){let e=this.collection.getItem(t);if(!e||e.type==="cell"&&this.allowsCellSelection)return t;for(;e&&e.type!=="item"&&e.parentKey!=null;)e=this.collection.getItem(e.parentKey);return!e||e.type!=="item"?null:e.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let e=this.getKey(t);if(e==null)return;let r=new E1(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(e)?r.delete(e):this.canSelectItem(e)&&(r.add(e),r.anchorKey=e,r.currentKey=e),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let e=this.getKey(t);if(e==null)return;let r=this.canSelectItem(e)?new E1([e],e,e):new E1;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let e=new E1;for(let r of t){let i=this.getKey(r);if(i!=null&&(e.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(e)}getSelectAllKeys(){let t=[],e=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let s=this.collection.getItem(r);s?.type==="item"&&t.push(r);var o;s?.hasChildNodes&&(this.allowsCellSelection||s.type!=="item")&&e((o=(i=Py(uc(s,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return e(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new E1)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,e){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||e&&(e.pointerType==="touch"||e.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let e=this.selectedKeys;if(t.size!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;for(let r of e)if(!t.has(r))return!1;return!0}canSelectItem(t){var e;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(e=r.props)===null||e===void 0)&&e.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var e,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(e=r.props)===null||e===void 0)&&e.isDisabled))}isLink(t){var e,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(e=r.props)===null||e===void 0)&&e.href)}getItemProps(t){var e;return(e=this.collection.getItem(t))===null||e===void 0?void 0:e.props}withCollection(t){return new er(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(t,e,r){this.collection=t,this.state=e;var i;this.allowsCellSelection=(i=r?.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=r?.layoutDelegate||null}}function Hy(n){let[t,e]=Dn(n.isOpen,n.defaultOpen||!1,n.onOpenChange);const r=c.useCallback(()=>{e(!0)},[e]),i=c.useCallback(()=>{e(!1)},[e]),o=c.useCallback(()=>{e(!t)},[e,t]);return{isOpen:t,setOpen:e,open:r,close:i,toggle:o}}function Jc(n){let t=Hy(n),[e,r]=c.useState(null),[i,o]=c.useState([]),s=()=>{o([]),t.close()};return{focusStrategy:e,...t,open(u=null){r(u),t.open()},toggle(u=null){r(u),t.toggle()},close(){s()},expandedKeysStack:i,openSubmenu:(u,d)=>{o(f=>d>f.length?f:[...f.slice(0,d),u])},closeSubmenu:(u,d)=>{o(f=>f[d]===u?f.slice(0,d):f)}}}class Vy{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let e=this.keyMap.get(t);var r;return e&&(r=e.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let e=this.keyMap.get(t);var r;return e&&(r=e.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var e;return(e=this.keyMap.get(t))!==null&&e!==void 0?e:null}at(t){const e=[...this.getKeys()];return this.getItem(e[t])}constructor(t,{expandedKeys:e}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,e=e||new Set;let r=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&(a.type==="section"||e.has(a.key)))for(let l of a.childNodes)r(l)};for(let a of t)r(a);let i=null,o=0;for(let[a,l]of this.keyMap)i?(i.nextKey=a,l.prevKey=i.key):(this.firstKey=a,l.prevKey=void 0),l.type==="item"&&(l.index=o++),i=l,i.nextKey=void 0;var s;this.lastKey=(s=i?.key)!==null&&s!==void 0?s:null}}function qy(n){let{onExpandedChange:t}=n,[e,r]=Dn(n.expandedKeys?new Set(n.expandedKeys):void 0,n.defaultExpandedKeys?new Set(n.defaultExpandedKeys):new Set,t),i=Rc(n),o=c.useMemo(()=>n.disabledKeys?new Set(n.disabledKeys):new Set,[n.disabledKeys]),s=Cy(n,c.useCallback(l=>new Vy(l,{expandedKeys:e}),[e]),null);return c.useEffect(()=>{i.focusedKey!=null&&!s.getItem(i.focusedKey)&&i.setFocusedKey(null)},[s,i.focusedKey]),{collection:s,expandedKeys:e,disabledKeys:o,toggleKey:l=>{r(jy(e,l))},setExpandedKeys:r,selectionManager:new er(s,i)}}function jy(n,t){let e=new Set(n);return e.has(t)?e.delete(t):e.add(t),e}const Qc=c.createContext(null),Uy=c.createContext(null),Wy={CollectionRoot({collection:n,renderDropIndicator:t}){return Zc(n,null,t)},CollectionBranch({collection:n,parent:t,renderDropIndicator:e}){return Zc(n,t,e)}};function Zc(n,t,e){return c8({items:t?n.getChildren(t.key):n,dependencies:[e],children(r){let i=r.render(r);return!e||r.type!=="item"?i:c.createElement(c.Fragment,null,e({type:"item",key:r.key,dropPosition:"before"}),i,Yy(n,r,e))}})}function Yy(n,t,e){let r=t.key,i=n.getKeyAfter(r),o=i!=null?n.getItem(i):null;for(;o!=null&&o.type!=="item";)i=n.getKeyAfter(o.key),o=i!=null?n.getItem(i):null;let s=t.nextKey!=null?n.getItem(t.nextKey):null;for(;s!=null&&s.type!=="item";)s=s.nextKey!=null?n.getItem(s.nextKey):null;let a=[];if(s==null){let l=t;for(;l&&(!o||l.parentKey!==o.parentKey&&o.level<l.level);){let u=e({type:"item",key:l.key,dropPosition:"after"});c.isValidElement(u)&&a.push(c.cloneElement(u,{key:`${l.key}-after`})),l=l.parentKey!=null?n.getItem(l.parentKey):null}}return a}const eu=c.createContext(Wy);function Gy(n){return c.useMemo(()=>n!=null?new Set([n]):null,[n])}const Ry=c.createContext({}),Xy=c.createContext({}),Jy=c.createContext(null),Qy=c.createContext({}),tu=c.createContext(null),G5=c.createContext(null),R5=c.createContext(null),tr=c.createContext(null);function nu(n){let t=Jc(n),e=c.useRef(null),{menuTriggerProps:r,menuProps:i}=Ty({...n,type:"menu"},t,e),[o,s]=c.useState(null),a=c.useCallback(()=>{e.current&&s(e.current.offsetWidth+"px")},[e]);$m({ref:e,onResize:a});let l=c.useRef(null);return c.createElement(_n,{values:[[tu,{...i,ref:l}],[rb,t],[R5,t],[Jy,{trigger:"MenuTrigger",triggerRef:e,scrollRef:l,placement:"bottom start",style:{"--trigger-width":o},"aria-labelledby":i["aria-labelledby"]}]]},c.createElement(pg,{...r,ref:e,isPressed:t.isOpen},n.children))}const Zy=c.createContext(null),ru=c.forwardRef(function(t,e){return[t,e]=v5(t,e,tu),c.createElement(Mg,{content:c.createElement(kg,t)},r=>c.createElement(eb,{props:t,collection:r,menuRef:e}))});function eb({props:n,collection:t,menuRef:e}){let{filter:r,collectionProps:i,collectionRef:o}=c.useContext(Qc)||{};e=$n(c.useMemo(()=>W9(e,o!==void 0?o:null),[o,e]));let s=c.useMemo(()=>r?t.UNSTABLE_filter(r):t,[t,r]),a=qy({...n,collection:s,children:void 0}),l=c.useContext(R5),{isVirtualized:u,CollectionRoot:d}=c.useContext(eu),{menuProps:f}=Dy({...n,...i,isVirtualized:u,onClose:n.onClose||l?.close},a,e),h=Nn({defaultClassName:"react-aria-Menu",className:n.className,style:n.style,values:{isEmpty:a.collection.size===0}}),p=null;a.collection.size===0&&n.renderEmptyState&&(p=c.createElement("div",{role:"menuitem",style:{display:"contents"}},n.renderEmptyState()));let m=et(n,{global:!0});return c.createElement(Xg,null,c.createElement("div",{...De(m,h,f),ref:e,slot:n.slot||void 0,"data-empty":a.collection.size===0||void 0,onScroll:n.onScroll},c.createElement(_n,{values:[[G5,a],[Xy,{elementType:"div"}],[Uy,{name:"MenuSection",render:nb}],[Zy,{parentMenuRef:e,shouldUseVirtualFocus:i?.shouldUseVirtualFocus}],[X5,null],[Qc,null],[tr,a.selectionManager],[R5,l??Jc({})]]},c.createElement(d,{collection:a.collection,persistedKeys:Gy(a.selectionManager.focusedKey),scrollRef:e})),p))}class tb extends er{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(t,e){return this.parent.setFocusedKey(t,e)}setFocused(t){this.parent.setFocused(t)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(t,e){super(t.collection,e),this.parent=t}}function nb(n,t,e,r="react-aria-MenuSection"){var i,o;let s=c.useContext(G5),{CollectionBranch:a}=c.useContext(eu),[l,u]=jm();var d;let{headingProps:f,groupProps:h}=_y({heading:u,"aria-label":(d=e.props["aria-label"])!==null&&d!==void 0?d:void 0}),p=Nn({defaultClassName:r,className:(i=e.props)===null||i===void 0?void 0:i.className,style:(o=e.props)===null||o===void 0?void 0:o.style,values:{}}),m=c.useContext(tr),v=Rc(n),b=n.selectionMode!=null?new tb(m,v):m,I=et(n,{global:!0});return delete I.id,c.createElement("section",{...De(I,p,h),ref:t},c.createElement(_n,{values:[[Ry,{...f,ref:l}],[tr,b]]},c.createElement(a,{collection:s.collection,parent:e})))}const X5=c.createContext(null),iu=Cg("item",function(t,e,r){var i;[t,e]=v5(t,e,X5);let o=(i=s8(X5))===null||i===void 0?void 0:i.id,s=c.useContext(G5),a=$n(e),l=c.useContext(tr),{menuItemProps:u,labelProps:d,descriptionProps:f,keyboardShortcutProps:h,...p}=Oy({...t,id:o,key:r.key,selectionManager:l},s,a),{hoverProps:m,isHovered:v}=T5({isDisabled:p.isDisabled}),b=Nn({...t,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...p,isHovered:v,isFocusVisible:p.isFocusVisible,selectionMode:l.selectionMode,selectionBehavior:l.selectionBehavior,hasSubmenu:!!t["aria-haspopup"],isOpen:t["aria-expanded"]==="true"}}),I=t.href?"a":"div",y=et(t,{global:!0});return delete y.id,delete y.onClick,c.createElement(I,{...De(y,b,u,m),ref:a,"data-disabled":p.isDisabled||void 0,"data-hovered":v||void 0,"data-focused":p.isFocused||void 0,"data-focus-visible":p.isFocusVisible||void 0,"data-pressed":p.isPressed||void 0,"data-selected":p.isSelected||void 0,"data-selection-mode":l.selectionMode==="none"?void 0:l.selectionMode,"data-has-submenu":!!t["aria-haspopup"]||void 0,"data-open":t["aria-expanded"]==="true"||void 0},c.createElement(_n,{values:[[Ky,{slots:{[o8]:d,label:d,description:f}}],[Qy,h]]},b.children))}),rb=c.createContext(null);O1.icons.map(n=>n.properties.name);const ou=n=>c.createElement(c.Fragment,null);ou.displayName="MenuButton.Item";function nr(){return nr=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)({}).hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},nr.apply(null,arguments)}function su({menuItems:n,testId:t,children:e}){const[r,i]=c.useState(!1),[o,s]=c.useState(!0),{handleMouseEvent:a,trigger:l,parentRef:u}=td({enabled:o}),{renderLayer:d,triggerProps:f,layerProps:h}=Wt({isOpen:r,auto:!0,onOutsideClick:()=>{i(!1),s(!0)},preferX:"right",preferY:"bottom",placement:"bottom-start",trigger:l,container:Qt});function p(y){y.preventDefault(),i(!0),s(!1)}function m(y){y.preventDefault(),y.key==="F12"&&y.ctrlKey&&(i(!0),s(!1))}const v=y=>{const x=n.find(g=>g.props.id===y);x?.props.onSelect&&x.props.onSelect(x.props.label,x.props.id),i(!1),s(!0)},b=({key:y})=>{y==="Escape"&&r&&(i(!1),s(!0))},I=y=>{u.current?.contains(y.target)||(i(!1),s(!0))};return c.useEffect(()=>(window.addEventListener("keyup",b),window.addEventListener("contextmenu",I),()=>{window.removeEventListener("keyup",b),window.removeEventListener("contextmenu",I)}),[b]),c.createElement(nu,{isOpen:!0,onOpenChange:y=>{y&&i(y)},"data-testid":t},c.createElement("div",nr({ref:u,role:"button",tabIndex:0,"aria-label":"Press Control + F12 to open the context menu",onContextMenu:p,onKeyDown:m,onMouseMove:a},f),e),r&&d(c.createElement("div",nr({className:"nds-context-menu-popover"},h),c.createElement(ru,{onAction:v,className:"nds-context-menu rounded--all elevation--high"},n.map((y,x)=>c.createElement(iu,{key:y.props.id,id:y.props.id,value:y.props.id,className:({isSelected:g,isFocused:M,isDisabled:w})=>ae(["nds-context-menu-item","padding--x--s padding--y--xs",{"nds-context-menu-item--highlighted":g||M,"nds-context-menu-item--disabled":w,"rounded--top":x===0,"rounded--bottom":x===n.length-1}])},c.createElement(de,{gapSize:"s"},y.props.startIcon&&c.createElement(de.Item,{shrink:!0},c.createElement("span",{className:`narmi-icon-${y.props.startIcon}`})),c.createElement(de.Item,null,y.props.label))))))))}su.Item=ou;function rr(){return rr=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)({}).hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},rr.apply(null,arguments)}const J5=()=>{},ib=({title:n,subtitle:t,statusText:e,isOpen:r,trigger:i="header",onOpen:o=J5,onClose:s=J5,isDisabled:a=!1,onDisabledClick:l=J5,renderTitle:u,hasError:d=!1,disableHover:f=!1,children:h,radiusSize:p="m",kind:m="default"})=>{const[v,b]=c.useState(!1),I=(z=!1,A)=>{if(z){l();return}else A==="open"?(o(),b(!0)):A==="close"&&(s(),b(!1))},y=()=>{b(!1),r?s():o()},x=c.createElement("div",{className:ae(["collapsible-card-trigger","alignChild--center--center",{"padding--left":i=="caret-start","padding--right--l":i=="caret-end"}])},c.createElement(un,{kind:"action",label:r?"Close":"Open",onClick:y,name:`chevron-${r?"up":"down"}`,textSize:"l",onKeyUp:({key:z})=>{z==="Enter"&&y()}})),g=c.createElement("div",{className:ae(["collapsible-card-titleBar",`rounded--top--${m==="ai"?"m":p}`])},c.createElement(l6,{isDisabled:a},typeof u=="function"?u(r):c.createElement(de,{alignItems:"center",gapSize:"s"},i==="caret-start"&&c.createElement(de.Item,{shrink:!0},x),c.createElement(de.Item,null,c.createElement("h4",{className:ae(["fontWeight--bold","fontSize--l","padding--top--l","fontFamily--body",{"padding--left--l":i!=="caret-start"}])},n),c.createElement("div",{className:ae([a?"subtitle--disabled":"subtitle","padding--bottom--l","margin--top--xxs",{"padding--left--l":i!=="caret-start"}])},t)),i==="caret-end"&&c.createElement(de.Item,{shrink:!0},x),e&&c.createElement(de.Item,{shrink:!0},c.createElement("div",{className:"collapsible-card--statusText padding--right--l fontSize--s alignChild--right--center"},c.createElement("span",null,e)))))),M=ae(["collapsible-card--content-card",`collapisble-card--${m}`,{"content-card--hasCaretTrigger":i.includes("caret"),"content-card--error":d,"content-card--disabled":a,"content-card--hover":i==="header"&&!f&&v,"collapsible-card--no-user-select":!f||i==="header","collapsible-card--customTitle":typeof u=="function"},r&&!a?void 0:"content-card--closed",`rounded--all--${p}`,"bgColor--white"]),w=i==="header"?{role:"button",tabIndex:0,onKeyUp:({key:z})=>{if(z==="Enter"){const A=r&&!a?"close":"open";I(A==="open"?a:!1,A)}},onClick:()=>{const z=r&&!a?"close":"open";I(z==="open"?a:!1,z)}}:{};return c.createElement("div",{className:M},r&&!a?c.createElement(c.Fragment,null,c.createElement("div",rr({className:`collapsible-card--title-expanded rounded--top--${p}`,"aria-expanded":"true",onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1)},w),g),c.createElement("div",{className:"padding--all--l"},h)):c.createElement("div",rr({"aria-expanded":"false"},w),g))},Q5=({children:n,value:t})=>c.createElement(c.Fragment,null,n||t);Q5.displayName="Combobox.Item",Q5.propTypes={value:q.string.isRequired,searchValue:q.string,children:q.oneOfType([q.node,q.arrayOf(q.node)])};const au=({text:n,kind:t="bold"})=>c.createElement("h5",{className:`nds-combobox-list-heading--${t}`},n);au.displayName="Combobox.Heading";const ir=({children:n})=>c.createElement(c.Fragment,null,n);ir.displayName="Combobox.Category",ir.propTypes={label:q.string.isRequired,children:q.oneOfType([q.node,q.arrayOf(q.node)])};const ob=()=>{},Z5=({onSelect:n=ob})=>c.createElement(c.Fragment,null);Z5.displayName="Combobox.Action",Z5.propTypes={onSelect:q.func.isRequired,label:q.string.isRequired};var e0=function(t){var e=[],r=null,i=function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];e=a,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,e)}))};return i.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},i};const lu=()=>c.useMemo(()=>typeof CSS>"u"||typeof CSS.supports!="function"?!1:[CSS.supports("anchor-name","--my-anchor"),CSS.supports("position-anchor","--my-anchor"),CSS.supports("position-area","bottom center"),CSS.supports("position-try-fallbacks","flip-block")].every(Boolean),[]),sb=({anchorRef:n,layerRef:t,matchWidth:e=!1,isOpen:r,setIsOpen:i})=>{const o=lu();return c.useLayoutEffect(()=>{if(o||!r)return;const s=n.current,a=t.current;if(!s||!a)return;const l=s.getBoundingClientRect(),u=a.getBoundingClientRect();if(l.width===0||u.width===0)return;const d=window.visualViewport?.height||window.innerHeight,f=window.visualViewport?.offsetTop||0,h=d-(l.bottom-f),p=l.top-f,m=u.height>h&&p>h;let v=l.left,b=m?l.top-u.height:l.bottom;const I=a.offsetParent;if(I&&I!==document.body){const M=I.getBoundingClientRect();v=l.left-M.left,b=b-M.top}a.style.setProperty("--js-dropdown-top",`${b}px`),a.style.setProperty("--js-dropdown-left",`${v}px`),e&&a.style.setProperty("--js-dropdown-width",`${l.width}px`);const y=l.top,x=e0(()=>{Math.abs(s.getBoundingClientRect().top-y)>20&&i(!1)}),g=()=>i(!1);return window.addEventListener("scroll",x,!0),window.addEventListener("resize",g),window.visualViewport?.addEventListener("resize",g),()=>{x.cancel(),window.removeEventListener("scroll",x,!0),window.removeEventListener("resize",g),window.visualViewport?.removeEventListener("resize",g)}},[o,n,t,e,r,i]),{isAnchorPositionSupported:o,polyFillLayerStyles:o?{}:{position:"fixed",top:"var(--js-dropdown-top)",left:"var(--js-dropdown-left)",...e&&{width:"var(--js-dropdown-width)"}}}},or=({isOpen:n,setIsOpen:t,matchWidth:e=!0})=>{const r=c.useRef(null),i=c.useRef(null),o=c.useId().replaceAll(/:/g,"-"),s=c.useMemo(()=>`--nds-dropdown-anchor-${o}`,[o]),{isAnchorPositionSupported:a,polyFillLayerStyles:l}=sb({anchorRef:r,layerRef:i,matchWidth:e,isOpen:n,setIsOpen:t}),u=c.useMemo(()=>({ref:r,style:{anchorName:a?s:void 0}}),[r,a,s]),d=c.useMemo(()=>{const f={...a?{position:"absolute",positionAnchor:s,positionArea:"bottom center",positionTryFallbacks:"flip-block",width:e?"anchor-size(width)":"max-content"}:l,display:n?"block":"none",zIndex:4};return{ref:i,style:f}},[n,a,s,e,l,i]);return{anchorProps:u,layerProps:d}};function sr(){return sr=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)({}).hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},sr.apply(null,arguments)}const m6=c.forwardRef(({isOpen:n=!1,showOpenIndicator:t=!0,disabled:e=!1,labelText:r,labelProps:i,displayValue:o,errorText:s,hasError:a=!1,minWidth:l="auto",kind:u="default",testId:d,startContent:f=c.createElement(c.Fragment,null),endContent:h=c.createElement(c.Fragment,null),...p},m)=>c.createElement(c.Fragment,null,c.createElement("div",{className:`nds-dropdownTrigger nds-dropdownTrigger--${u}`,style:{minWidth:l}},c.createElement("button",sr({disabled:e,ref:m,"data-testid":d||"dropdownTriggerButton",className:ae(["nds-dropdownTrigger-button button--reset","padding--x--s rounded--all",{"nds-dropdownTrigger-button--hasValue":!!o,"nds-dropdownTrigger-button--hasError":!!s||a,"nds-dropdownTrigger-button--isActive":n,"nds-dropdownTrigger-button--disabled":e}]),"aria-expanded":n?"true":"false",type:"button"},p),f,r&&c.createElement("label",sr({className:"nds-dropdownTrigger-label"},i),r),o&&c.createElement("span",{className:"nds-dropdownTrigger-value"},o),h,t&&!e&&c.createElement("span",{role:"img","aria-label":n?"popup open":"popup closed",className:ae(["nds-dropdownTrigger-chevron fontSize--l fontColor--secondary",`narmi-icon-chevron-${n?"up":"down"}`])}))),s&&c.createElement(D1,{error:s})));m6.displayName="DropdownTrigger";const t0=({children:n})=>c.createElement(c.Fragment,null,n);t0.displayName="Select.Item",t0.propTypes={value:q.string.isRequired,searchValue:q.string,children:q.oneOfType([q.node,q.arrayOf(q.node)])};const n0=({children:n})=>c.createElement(c.Fragment,null,n);n0.displayName="Select.Action",n0.propTypes={onSelect:q.func.isRequired,children:q.oneOfType([q.node,q.arrayOf(q.node)])};const r0=({children:n})=>c.createElement(c.Fragment,null,n);r0.displayName="Select.Category",r0.propTypes={label:q.string,kind:q.oneOf(["heading","label"]),children:q.oneOfType([q.node,q.arrayOf(q.node)]),isFlat:q.bool};function zt(){return zt=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)({}).hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},zt.apply(null,arguments)}const ab=()=>{},B1=n=>{let t=!1;return n&&n.props&&(t="onSelect"in n.props),t},lb=n=>{let t="";return n&&!B1(n)&&(t=n.props.children),t},cu=(n,t)=>t.filter(r=>!B1(r)).filter(({props:r})=>r.value===n).pop()||"",uu=(n,t)=>{let e=0;return B1(n)?e=t.map(({props:r})=>r.onSelect).indexOf(n.props.onSelect):e=t.map(({props:r})=>r.value).indexOf(n.props.value),e},cb=(n,t,e)=>{if(n<0)return!1;const r=e[n].props.value;return t.map(o=>o.props.value).includes(r)},ub=(n,t)=>{if(!n||B1(n))return!1;const e=n.props.value;return t.map(i=>i.props.value).includes(e)},db=(n="",t)=>B1(t)?"":t.props.searchValue||t.props.value,ar=({id:n,label:t,children:e,onChange:r=ab,value:i,defaultValue:o,defaultOpen:s=!1,disabled:a=!1,getTypeaheadString:l=db,clearSelectionOnAction:u=!1,errorText:d,testId:f,maxMenuHeight:h="40vh"})=>{let p=[],m=[];const v=c.useMemo(()=>c.Children.toArray(e).filter(N=>!B1(N)),[e]),b=c.Children.toArray(e).filter(B1),[I,y]=c.useState("");v.some(({type:N})=>N.displayName==="Select.Category")?(p=[...v.flatMap(({props:N})=>c.Children.toArray(N.children)),...b],m=v.map(({props:N})=>({label:N.label,categoryChildren:c.Children.toArray(N.children),kind:N.kind,isFlat:N.isFlat}))):p=[...v,...b];const x={id:n||`nds-select-${t}`,items:p,disabled:a,initialSelectedItem:o&&cu(o,p),initialIsOpen:s,itemToString:N=>l(I,N),onSelectedItemChange:({selectedItem:N})=>{N&&!B1(N)&&r(N.props?N.props.value:"")},stateReducer:(N,T)=>{const{type:O,changes:k}=T,{selectedItem:V}=N,{selectedItem:U}=k;let R=k.isOpen;if(O===u1.stateChangeTypes.ToggleButtonKeyDownCharacter){const{inputValue:G}=k;y(G),R=!0}else y("");return B1(U)?(U.props.onSelect(),u&&r(""),{...k,selectedItem:u?null:V,isOpen:!1}):{...k,isOpen:R}}};i!==void 0&&(x.selectedItem=cu(i,p));const{isOpen:g,selectedItem:M,getToggleButtonProps:w,getLabelProps:z,getMenuProps:A,highlightedIndex:C,getItemProps:H,closeMenu:E}=u1(x),{anchorProps:L,layerProps:F}=or({isOpen:g,setIsOpen:N=>{N||E()}}),$=m.length>0,X=M!==null&&M.props,_=g&&p.length>0,B=(N,T)=>{const O=uu(N,T);return c.createElement("li",zt({key:`item-${O}`,className:ae(["nds-select-item","alignChild--left--center padding--x--s padding--y--xs",{"nds-select-item--highlighted":C===O,"rounded--top":O===0,"rounded--bottom":O===T.length-1,"nds-select-item--hasGutter":$}])},H({item:N,index:O})),c.createElement(de,{as:"span"},c.createElement(de.Item,{as:"span"},N),X&&M.props.value===N.props.value&&c.createElement(de.Item,{as:"span",shrink:!0},c.createElement("span",{className:"narmi-icon-check fontSize--l fontWeight--bold"}))))},W=N=>{let T={};return(cb(C,N,p)||ub(M,N))&&(T.open=!0),T};return c.createElement("div",{className:"nds-select","data-testid":f},c.createElement("div",L,c.createElement(m6,zt({isOpen:_,labelText:t,disabled:a,displayValue:lb(M)||I,labelProps:{...z()},hasError:!!d},w()))),c.createElement(D1,{error:d}),c.createElement("div",F,c.createElement("div",zt({className:ae(["nds-select-list","bgColor--white",{"nds-select-list--error":!!d}])},A(),{style:{maxHeight:h}}),_&&$&&m.map(({label:N,kind:T,categoryChildren:O,isFlat:k})=>k?c.createElement(c.Fragment,null,N&&c.createElement("h4",{id:`select-category-${N}`,className:ae(["fontFamily--default","padding--x--s padding--y--xs",{"select-category-title--label":T==="label","select-category-title--heading":T==="heading"}])},N),c.createElement("ul",{className:"list--reset","aria-labelledby":`select-category-${N}`},O.map(V=>B(V,p)))):c.createElement("details",zt({key:N,className:"nds-select-category"},W(O)),c.createElement("summary",{className:ae(["alignChild--left--center","padding--x--s",{"select-category-title--label":T==="label","select-category-title--heading":T==="heading"||!T}])},c.createElement("span",{id:`select-category-${N}`},N),c.createElement("span",{className:"nds-category-icon narmi-icon-chevron-down"}),c.createElement("span",{className:"nds-category-icon narmi-icon-chevron-up"})),c.createElement("ul",{className:"list--reset","aria-labelledby":`select-category-${N}`},O.map(V=>B(V,p))))),_&&$&&c.createElement("ul",{className:"list--reset"},b.map(N=>B(N,p))),_&&!$&&c.createElement("ul",{className:"list--reset"},v.map(N=>B(N,p)),b.map(N=>B(N,p))))))};ar.Item=t0,ar.Action=n0,ar.Category=r0;function $t(){return $t=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)({}).hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},$t.apply(null,arguments)}const du=()=>{};O1.icons.map(n=>n.properties.name);const g6=n=>{let t=!1;return n&&n.props&&(t="label"in n.props),t},i0=n=>{let t=!1;return n&&(t=g6(n)||"value"in n.props),t},fb=(n,t,e,r,i)=>{let o=!1;if(t>-1&&e.length>0){const s=e[t].props.value;o=r.map(l=>l.props.value).includes(s)}return typeof n=="string"&&n.length>0&&(o=!0),i&&(o=r.map(s=>s.props.value).includes(i.props.value)),o},pb=(n,t)=>t.map(r=>r.props.value).reduce((r,i)=>{const o=n.find(s=>i===s.props.value);return o&&r.push(o),r},[]),hb=(n,t)=>n.filter(e=>(e.props.searchValue||e.props.value).toLowerCase().startsWith(t)),vb=n=>c.createElement("span",{className:`fontSize--l fontColor--primary narmi-icon-${n?"chevron-up":"chevron-down"}`}),y6=({label:n,onChange:t=du,onInputChange:e=du,inputValue:r,filterItemsByInput:i=hb,children:o,disableFiltering:s=!1,clearSelectionOnAction:a=!1,errorText:l,icon:u,testId:d,renderEndContent:f=vb,maxMenuHeight:h="40vh"})=>{const p=c.useMemo(()=>c.Children.toArray(o),[o]),m=p.some(({type:O})=>O.displayName===ir.displayName);let v=[],b=p.length<1?[]:p.filter(({props:O})=>"value"in O||"text"in O);m?(b=p.flatMap(({props:O})=>c.Children.toArray(O.children)),v=p.map(({props:O})=>({label:O.label,categoryChildren:c.Children.toArray(O.children)}))):b=p;const[I,y]=c.useState(b),x=O=>O?.props?.searchValue||O?.props?.value||"",{isOpen:g,selectedItem:M,getInputProps:w,getMenuProps:z,getItemProps:A,highlightedIndex:C,inputValue:H,openMenu:E,closeMenu:L,reset:F}=n6({items:I,inputValue:r,itemToString:x,onInputValueChange:({inputValue:O})=>{if(O.length===0){y(b),F(),e("");return}if(!s){const k=b.filter(g6),V=i(b.filter(U=>!g6(U)&&i0(U)),O.toLowerCase());y([...V,...k])}e(O)},onSelectedItemChange:({selectedItem:O})=>{t(O?O.props.value:""),L()},stateReducer:(O,k)=>{const{changes:V}=k,{selectedItem:U}=O,{selectedItem:R}=V;return g6(R)?(R.props.onSelect(),{...V,selectedItem:a?null:U,inputValue:a?"":x(U),isOpen:!1}):V}}),{anchorProps:$,layerProps:X}=or({isOpen:g,setIsOpen:O=>{O||L()}});c.useEffect(()=>{(!H||H.length===0)&&b.length!==I.length&&y(b)},[b,H]);const _=!!M,B=(O,k)=>{const V=g6(O);let U=c.createElement("li",{key:`${O}-${k}`,className:"alignChild--left--center"},O);return i0(O)&&(U=c.createElement("li",$t({key:`${O}-${k}`,className:ae(["nds-combobox-item","alignChild--left--center padding--x--s",{"nds-combobox-action":V,"padding--y--xs":!m,"nds-combobox-item--highlighted":C===k,"rounded--top":k===0,"rounded--bottom":k===I.length-1}])},A({item:O,index:k})),V&&c.createElement(de,{as:"span",gapSize:"xxs"},c.createElement(de.Item,{as:"span",shrink:!0},c.createElement("span",{className:"narmi-icon-plus fontWeight--bold"})),c.createElement(de.Item,{as:"span"},c.createElement("span",{className:"fontWeight--semibold"},O.props.label))),!V&&c.createElement(de,{as:"span"},c.createElement(de.Item,{as:"span"},O),_&&M.props.value===O.props.value&&c.createElement(de.Item,{as:"span",shrink:!0},c.createElement("span",{className:"narmi-icon-check fontSize--l fontWeight--bold"}))))),U},W=({label:O,categoryChildren:k})=>{const V={},U=pb(I,k),R=U.length>0;return fb(H,C,I,k,M)&&(V.open=!0),R?c.createElement("details",$t({key:O,className:"nds-combobox-category",tabIndex:-1},V),c.createElement("summary",{className:"fontWeight--bold alignChild--left--center padding--x--s padding--y-xs",onFocus:G=>{G.target.blur()}},c.createElement("span",{id:`combobox-category-${O}`},O),c.createElement("span",{className:"nds-category-icon narmi-icon-chevron-down"}),c.createElement("span",{className:"nds-category-icon narmi-icon-chevron-up"})),c.createElement("ul",{className:"list--reset","aria-labelledby":`combobox-category-${O}`},U.map(G=>B(G,uu(G,I))))):null},N=()=>{g||(E(),_&&y(b.filter(i0)))},T=()=>{e(M?x(M):""),C!==-1&&L()};return b.length<1?c.createElement(_1,{error:l,label:n,startIcon:u,onChange:e,value:H}):c.createElement(c.Fragment,null,c.createElement("div",{className:ae(["nds-combobox",{"nds-combobox--active":g}]),"data-testid":d},c.createElement("div",$,c.createElement(_1,$t({error:l,renderError:!1,label:n,value:H,startIcon:u,endContent:f(g)},w({onBlur:T,onFocus:N,onClick:N}),{onClick:N}))),c.createElement(D1,{error:l,className:"margin--top--xs"}),c.createElement("div",X,c.createElement("ul",$t({className:ae(["nds-combobox-list","list--reset","bgColor--white",{"nds-combobox-list--error":!!l}])},z(),{style:{maxHeight:h}}),g&&(m?v.map(W):I.map(B))))))};y6.Item=Q5,y6.Heading=au,y6.Category=ir,y6.Action=Z5;var b6={exports:{}},mb=b6.exports,fu;function gb(){return fu||(fu=1,function(n,t){(function(e,r){r(t)})(mb,function(e){var r={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(i){var o=i%100;if(o>3&&o<21)return"th";switch(o%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1};e.default=r,e.english=r,Object.defineProperty(e,"__esModule",{value:!0})})}(b6,b6.exports)),b6.exports}var o0=gb(),s0=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Tt={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var t=new Date(n.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var e=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},M6={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var t=n%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},o1=function(n,t){return t===void 0&&(t=2),("000"+n).slice(t*-1)},m1=function(n){return n===!0?1:0};function pu(n,t){var e;return function(){var r=this,i=arguments;clearTimeout(e),e=setTimeout(function(){return n.apply(r,i)},t)}}var a0=function(n){return n instanceof Array?n:[n]};function t1(n,t,e){if(e===!0)return n.classList.add(t);n.classList.remove(t)}function Ie(n,t,e){var r=window.document.createElement(n);return t=t||"",e=e||"",r.className=t,e!==void 0&&(r.textContent=e),r}function lr(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function hu(n,t){if(t(n))return n;if(n.parentNode)return hu(n.parentNode,t)}function cr(n,t){var e=Ie("div","numInputWrapper"),r=Ie("input","numInput "+n),i=Ie("span","arrowUp"),o=Ie("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var s in t)r.setAttribute(s,t[s]);return e.appendChild(r),e.appendChild(i),e.appendChild(o),e}function a1(n){try{if(typeof n.composedPath=="function"){var t=n.composedPath();return t[0]}return n.target}catch{return n.target}}var l0=function(){},ur=function(n,t,e){return e.months[t?"shorthand":"longhand"][n]},yb={D:l0,F:function(n,t,e){n.setMonth(e.months.longhand.indexOf(t))},G:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},H:function(n,t){n.setHours(parseFloat(t))},J:function(n,t){n.setDate(parseFloat(t))},K:function(n,t,e){n.setHours(n.getHours()%12+12*m1(new RegExp(e.amPM[1],"i").test(t)))},M:function(n,t,e){n.setMonth(e.months.shorthand.indexOf(t))},S:function(n,t){n.setSeconds(parseFloat(t))},U:function(n,t){return new Date(parseFloat(t)*1e3)},W:function(n,t,e){var r=parseInt(t),i=new Date(n.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+e.firstDayOfWeek),i},Y:function(n,t){n.setFullYear(parseFloat(t))},Z:function(n,t){return new Date(t)},d:function(n,t){n.setDate(parseFloat(t))},h:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},i:function(n,t){n.setMinutes(parseFloat(t))},j:function(n,t){n.setDate(parseFloat(t))},l:l0,m:function(n,t){n.setMonth(parseFloat(t)-1)},n:function(n,t){n.setMonth(parseFloat(t)-1)},s:function(n,t){n.setSeconds(parseFloat(t))},u:function(n,t){return new Date(parseFloat(t))},w:l0,y:function(n,t){n.setFullYear(2e3+parseFloat(t))}},ct={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},x6={Z:function(n){return n.toISOString()},D:function(n,t,e){return t.weekdays.shorthand[x6.w(n,t,e)]},F:function(n,t,e){return ur(x6.n(n,t,e)-1,!1,t)},G:function(n,t,e){return o1(x6.h(n,t,e))},H:function(n){return o1(n.getHours())},J:function(n,t){return t.ordinal!==void 0?n.getDate()+t.ordinal(n.getDate()):n.getDate()},K:function(n,t){return t.amPM[m1(n.getHours()>11)]},M:function(n,t){return ur(n.getMonth(),!0,t)},S:function(n){return o1(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,t,e){return e.getWeek(n)},Y:function(n){return o1(n.getFullYear(),4)},d:function(n){return o1(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return o1(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,t){return t.weekdays.longhand[n.getDay()]},m:function(n){return o1(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},vu=function(n){var t=n.config,e=t===void 0?Tt:t,r=n.l10n,i=r===void 0?M6:r,o=n.isMobile,s=o===void 0?!1:o;return function(a,l,u){var d=u||i;return e.formatDate!==void 0&&!s?e.formatDate(a,l,d):l.split("").map(function(f,h,p){return x6[f]&&p[h-1]!=="\\"?x6[f](a,d,e):f!=="\\"?f:""}).join("")}},c0=function(n){var t=n.config,e=t===void 0?Tt:t,r=n.l10n,i=r===void 0?M6:r;return function(o,s,a,l){if(!(o!==0&&!o)){var u=l||i,d,f=o;if(o instanceof Date)d=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)d=new Date(o);else if(typeof o=="string"){var h=s||(e||Tt).dateFormat,p=String(o).trim();if(p==="today")d=new Date,a=!0;else if(e&&e.parseDate)d=e.parseDate(o,h);else if(/Z$/.test(p)||/GMT$/.test(p))d=new Date(o);else{for(var m=void 0,v=[],b=0,I=0,y="";b<h.length;b++){var x=h[b],g=x==="\\",M=h[b-1]==="\\"||g;if(ct[x]&&!M){y+=ct[x];var w=new RegExp(y).exec(o);w&&(m=!0)&&v[x!=="Y"?"push":"unshift"]({fn:yb[x],val:w[++I]})}else g||(y+=".")}d=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),v.forEach(function(z){var A=z.fn,C=z.val;return d=A(d,C,u)||d}),d=m?d:void 0}}if(!(d instanceof Date&&!isNaN(d.getTime()))){e.errorHandler(new Error("Invalid date provided: "+f));return}return a===!0&&d.setHours(0,0,0,0),d}}};function l1(n,t,e){return e===void 0&&(e=!0),e!==!1?new Date(n.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):n.getTime()-t.getTime()}var bb=function(n,t,e){return n>Math.min(t,e)&&n<Math.max(t,e)},u0=function(n,t,e){return n*3600+t*60+e},Mb=function(n){var t=Math.floor(n/3600),e=(n-t*3600)/60;return[t,e,n-t*3600-e*60]},xb={DAY:864e5};function d0(n){var t=n.defaultHour,e=n.defaultMinute,r=n.defaultSeconds;if(n.minDate!==void 0){var i=n.minDate.getHours(),o=n.minDate.getMinutes(),s=n.minDate.getSeconds();t<i&&(t=i),t===i&&e<o&&(e=o),t===i&&e===o&&r<s&&(r=n.minDate.getSeconds())}if(n.maxDate!==void 0){var a=n.maxDate.getHours(),l=n.maxDate.getMinutes();t=Math.min(t,a),t===a&&(e=Math.min(l,e)),t===a&&e===l&&(r=n.maxDate.getSeconds())}return{hours:t,minutes:e,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var r=function(a){a&&Object.keys(a).forEach(function(l){return n[l]=a[l]})},i=0,o=t;i<o.length;i++){var s=o[i];r(s)}return n});var Je=function(){return Je=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Je.apply(this,arguments)},mu=function(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;for(var r=Array(n),i=0,t=0;t<e;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},Ib=300;function Eb(n,t){var e={config:Je(Je({},Tt),Be.defaultConfig),l10n:M6};e.parseDate=c0({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=v,e._setHoursFromDate=h,e._positionCalendar=$e,e.changeMonth=O,e.changeYear=ee,e.clear=k,e.close=V,e.onMouseOver=Y,e._createElement=Ie,e.createDay=w,e.destroy=U,e.isEnabled=Q,e.jumpToDate=y,e.updateValue=S1,e.open=re,e.redraw=Ue,e.set=n1,e.setDate=We,e.toggle=kr;function r(){e.utils={getDaysInMonth:function(S,P){return S===void 0&&(S=e.currentMonth),P===void 0&&(P=e.currentYear),S===1&&(P%4===0&&P%100!==0||P%400===0)?29:e.l10n.daysInMonth[S]}}}function i(){e.element=e.input=n,e.isOpen=!1,he(),be(),Bt(),ft(),r(),e.isMobile||M(),I(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&h(e.config.noCalendar?e.latestSelectedDateObj:void 0),S1(!1)),a();var S=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&S&&$e(),_e("onReady")}function o(){var S;return((S=e.calendarContainer)===null||S===void 0?void 0:S.getRootNode()).activeElement||document.activeElement}function s(S){return S.bind(e)}function a(){var S=e.config;S.weekNumbers===!1&&S.showMonths===1||S.noCalendar!==!0&&window.requestAnimationFrame(function(){if(e.calendarContainer!==void 0&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),e.daysContainer!==void 0){var P=(e.days.offsetWidth+1)*S.showMonths;e.daysContainer.style.width=P+"px",e.calendarContainer.style.width=P+(e.weekWrapper!==void 0?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}})}function l(S){if(e.selectedDates.length===0){var P=e.config.minDate===void 0||l1(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),j=d0(e.config);P.setHours(j.hours,j.minutes,j.seconds,P.getMilliseconds()),e.selectedDates=[P],e.latestSelectedDateObj=P}S!==void 0&&S.type!=="blur"&&Z(S);var J=e._input.value;f(),S1(),e._input.value!==J&&e._debouncedChange()}function u(S,P){return S%12+12*m1(P===e.l10n.amPM[1])}function d(S){switch(S%24){case 0:case 12:return 12;default:return S%12}}function f(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var S=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,P=(parseInt(e.minuteElement.value,10)||0)%60,j=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(S=u(S,e.amPM.textContent));var J=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&l1(e.latestSelectedDateObj,e.config.minDate,!0)===0,ne=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&l1(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var se=u0(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),me=u0(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),le=u0(S,P,j);if(le>me&&le<se){var ge=Mb(se);S=ge[0],P=ge[1],j=ge[2]}}else{if(ne){var ie=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;S=Math.min(S,ie.getHours()),S===ie.getHours()&&(P=Math.min(P,ie.getMinutes())),P===ie.getMinutes()&&(j=Math.min(j,ie.getSeconds()))}if(J){var ve=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;S=Math.max(S,ve.getHours()),S===ve.getHours()&&P<ve.getMinutes()&&(P=ve.getMinutes()),P===ve.getMinutes()&&(j=Math.max(j,ve.getSeconds()))}}p(S,P,j)}}function h(S){var P=S||e.latestSelectedDateObj;P&&P instanceof Date&&p(P.getHours(),P.getMinutes(),P.getSeconds())}function p(S,P,j){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(S%24,P,j||0,0),!(!e.hourElement||!e.minuteElement||e.isMobile)&&(e.hourElement.value=o1(e.config.time_24hr?S:(12+S)%12+12*m1(S%12===0)),e.minuteElement.value=o1(P),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[m1(S>=12)]),e.secondElement!==void 0&&(e.secondElement.value=o1(j)))}function m(S){var P=a1(S),j=parseInt(P.value)+(S.delta||0);(j/1e3>1||S.key==="Enter"&&!/[^\d]/.test(j.toString()))&&ee(j)}function v(S,P,j,J){if(P instanceof Array)return P.forEach(function(ne){return v(S,ne,j,J)});if(S instanceof Array)return S.forEach(function(ne){return v(ne,P,j,J)});S.addEventListener(P,j,J),e._handlers.push({remove:function(){return S.removeEventListener(P,j,J)}})}function b(){_e("onChange")}function I(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(j){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+j+"]"),function(J){return v(J,"click",e[j])})}),e.isMobile){Pr();return}var S=pu(fe,50);if(e._debouncedChange=pu(b,Ib),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&v(e.daysContainer,"mouseover",function(j){e.config.mode==="range"&&Y(a1(j))}),v(e._input,"keydown",te),e.calendarContainer!==void 0&&v(e.calendarContainer,"keydown",te),!e.config.inline&&!e.config.static&&v(window,"resize",S),window.ontouchstart!==void 0?v(window.document,"touchstart",G):v(window.document,"mousedown",G),v(window.document,"focus",G,{capture:!0}),e.config.clickOpens===!0&&(v(e._input,"focus",e.open),v(e._input,"click",e.open)),e.daysContainer!==void 0&&(v(e.monthNav,"click",_0),v(e.monthNav,["keyup","increment"],m),v(e.daysContainer,"click",w1)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var P=function(j){return a1(j).select()};v(e.timeContainer,["increment"],l),v(e.timeContainer,"blur",l,{capture:!0}),v(e.timeContainer,"click",x),v([e.hourElement,e.minuteElement],["focus","click"],P),e.secondElement!==void 0&&v(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&v(e.amPM,"click",function(j){l(j)})}e.config.allowInput&&v(e._input,"blur",oe)}function y(S,P){var j=S!==void 0?e.parseDate(S):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),J=e.currentYear,ne=e.currentMonth;try{j!==void 0&&(e.currentYear=j.getFullYear(),e.currentMonth=j.getMonth())}catch(se){se.message="Invalid date supplied: "+j,e.config.errorHandler(se)}P&&e.currentYear!==J&&(_e("onYearChange"),F()),P&&(e.currentYear!==J||e.currentMonth!==ne)&&_e("onMonthChange"),e.redraw()}function x(S){var P=a1(S);~P.className.indexOf("arrow")&&g(S,P.classList.contains("arrowUp")?1:-1)}function g(S,P,j){var J=S&&a1(S),ne=j||J&&J.parentNode&&J.parentNode.firstChild,se=Ht("increment");se.delta=P,ne&&ne.dispatchEvent(se)}function M(){var S=window.document.createDocumentFragment();if(e.calendarContainer=Ie("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(S.appendChild(_()),e.innerContainer=Ie("div","flatpickr-innerContainer"),e.config.weekNumbers){var P=T(),j=P.weekWrapper,J=P.weekNumbers;e.innerContainer.appendChild(j),e.weekNumbers=J,e.weekWrapper=j}e.rContainer=Ie("div","flatpickr-rContainer"),e.rContainer.appendChild(W()),e.daysContainer||(e.daysContainer=Ie("div","flatpickr-days"),e.daysContainer.tabIndex=-1),L(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),S.appendChild(e.innerContainer)}e.config.enableTime&&S.appendChild(B()),t1(e.calendarContainer,"rangeMode",e.config.mode==="range"),t1(e.calendarContainer,"animate",e.config.animate===!0),t1(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(S);var ne=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!ne&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var se=Ie("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(se,e.element),se.appendChild(e.element),e.altInput&&se.appendChild(e.altInput),se.appendChild(e.calendarContainer)}!e.config.static&&!e.config.inline&&(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}function w(S,P,j,J){var ne=Q(P,!0),se=Ie("span",S,P.getDate().toString());return se.dateObj=P,se.$i=J,se.setAttribute("aria-label",e.formatDate(P,e.config.ariaDateFormat)),S.indexOf("hidden")===-1&&l1(P,e.now)===0&&(e.todayDateElem=se,se.classList.add("today"),se.setAttribute("aria-current","date")),ne?(se.tabIndex=-1,Vt(P)&&(se.classList.add("selected"),e.selectedDateElem=se,e.config.mode==="range"&&(t1(se,"startRange",e.selectedDates[0]&&l1(P,e.selectedDates[0],!0)===0),t1(se,"endRange",e.selectedDates[1]&&l1(P,e.selectedDates[1],!0)===0),S==="nextMonthDay"&&se.classList.add("inRange")))):se.classList.add("flatpickr-disabled"),e.config.mode==="range"&&O0(P)&&!Vt(P)&&se.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&S!=="prevMonthDay"&&J%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(P)+"</span>"),_e("onDayCreate",se),se}function z(S){S.focus(),e.config.mode==="range"&&Y(S)}function A(S){for(var P=S>0?0:e.config.showMonths-1,j=S>0?e.config.showMonths:-1,J=P;J!=j;J+=S)for(var ne=e.daysContainer.children[J],se=S>0?0:ne.children.length-1,me=S>0?ne.children.length:-1,le=se;le!=me;le+=S){var ge=ne.children[le];if(ge.className.indexOf("hidden")===-1&&Q(ge.dateObj))return ge}}function C(S,P){for(var j=S.className.indexOf("Month")===-1?S.dateObj.getMonth():e.currentMonth,J=P>0?e.config.showMonths:-1,ne=P>0?1:-1,se=j-e.currentMonth;se!=J;se+=ne)for(var me=e.daysContainer.children[se],le=j-e.currentMonth===se?S.$i+P:P<0?me.children.length-1:0,ge=me.children.length,ie=le;ie>=0&&ie<ge&&ie!=(P>0?ge:-1);ie+=ne){var ve=me.children[ie];if(ve.className.indexOf("hidden")===-1&&Q(ve.dateObj)&&Math.abs(S.$i-ie)>=Math.abs(P))return z(ve)}e.changeMonth(ne),H(A(ne),0)}function H(S,P){var j=o(),J=D(j||document.body),ne=S!==void 0?S:J?j:e.selectedDateElem!==void 0&&D(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&D(e.todayDateElem)?e.todayDateElem:A(P>0?1:-1);ne===void 0?e._input.focus():J?C(ne,P):z(ne)}function E(S,P){for(var j=(new Date(S,P,1).getDay()-e.l10n.firstDayOfWeek+7)%7,J=e.utils.getDaysInMonth((P-1+12)%12,S),ne=e.utils.getDaysInMonth(P,S),se=window.document.createDocumentFragment(),me=e.config.showMonths>1,le=me?"prevMonthDay hidden":"prevMonthDay",ge=me?"nextMonthDay hidden":"nextMonthDay",ie=J+1-j,ve=0;ie<=J;ie++,ve++)se.appendChild(w("flatpickr-day "+le,new Date(S,P-1,ie),ie,ve));for(ie=1;ie<=ne;ie++,ve++)se.appendChild(w("flatpickr-day",new Date(S,P,ie),ie,ve));for(var ye=ne+1;ye<=42-j&&(e.config.showMonths===1||ve%7!==0);ye++,ve++)se.appendChild(w("flatpickr-day "+ge,new Date(S,P+1,ye%ne),ye,ve));var T1=Ie("div","dayContainer");return T1.appendChild(se),T1}function L(){if(e.daysContainer!==void 0){lr(e.daysContainer),e.weekNumbers&&lr(e.weekNumbers);for(var S=document.createDocumentFragment(),P=0;P<e.config.showMonths;P++){var j=new Date(e.currentYear,e.currentMonth,1);j.setMonth(e.currentMonth+P),S.appendChild(E(j.getFullYear(),j.getMonth()))}e.daysContainer.appendChild(S),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&Y()}}function F(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var S=function(J){return e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&J<e.config.minDate.getMonth()?!1:!(e.config.maxDate!==void 0&&e.currentYear===e.config.maxDate.getFullYear()&&J>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var P=0;P<12;P++)if(S(P)){var j=Ie("option","flatpickr-monthDropdown-month");j.value=new Date(e.currentYear,P).getMonth().toString(),j.textContent=ur(P,e.config.shorthandCurrentMonth,e.l10n),j.tabIndex=-1,e.currentMonth===P&&(j.selected=!0),e.monthsDropdownContainer.appendChild(j)}}}function $(){var S=Ie("div","flatpickr-month"),P=window.document.createDocumentFragment(),j;e.config.showMonths>1||e.config.monthSelectorType==="static"?j=Ie("span","cur-month"):(e.monthsDropdownContainer=Ie("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),v(e.monthsDropdownContainer,"change",function(me){var le=a1(me),ge=parseInt(le.value,10);e.changeMonth(ge-e.currentMonth),_e("onMonthChange")}),F(),j=e.monthsDropdownContainer);var J=cr("cur-year",{tabindex:"-1"}),ne=J.getElementsByTagName("input")[0];ne.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&ne.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(ne.setAttribute("max",e.config.maxDate.getFullYear().toString()),ne.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var se=Ie("div","flatpickr-current-month");return se.appendChild(j),se.appendChild(J),P.appendChild(se),S.appendChild(P),{container:S,yearElement:ne,monthElement:j}}function X(){lr(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var S=e.config.showMonths;S--;){var P=$();e.yearElements.push(P.yearElement),e.monthElements.push(P.monthElement),e.monthNav.appendChild(P.container)}e.monthNav.appendChild(e.nextMonthNav)}function _(){return e.monthNav=Ie("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=Ie("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=Ie("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,X(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(S){e.__hidePrevMonthArrow!==S&&(t1(e.prevMonthNav,"flatpickr-disabled",S),e.__hidePrevMonthArrow=S)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(S){e.__hideNextMonthArrow!==S&&(t1(e.nextMonthNav,"flatpickr-disabled",S),e.__hideNextMonthArrow=S)}}),e.currentYearElement=e.yearElements[0],qt(),e.monthNav}function B(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var S=d0(e.config);e.timeContainer=Ie("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var P=Ie("span","flatpickr-time-separator",":"),j=cr("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=j.getElementsByTagName("input")[0];var J=cr("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=J.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=o1(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?S.hours:d(S.hours)),e.minuteElement.value=o1(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():S.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(j),e.timeContainer.appendChild(P),e.timeContainer.appendChild(J),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var ne=cr("flatpickr-second");e.secondElement=ne.getElementsByTagName("input")[0],e.secondElement.value=o1(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():S.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(Ie("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(ne)}return e.config.time_24hr||(e.amPM=Ie("span","flatpickr-am-pm",e.l10n.amPM[m1((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}function W(){e.weekdayContainer?lr(e.weekdayContainer):e.weekdayContainer=Ie("div","flatpickr-weekdays");for(var S=e.config.showMonths;S--;){var P=Ie("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(P)}return N(),e.weekdayContainer}function N(){if(e.weekdayContainer){var S=e.l10n.firstDayOfWeek,P=mu(e.l10n.weekdays.shorthand);S>0&&S<P.length&&(P=mu(P.splice(S,P.length),P.splice(0,S)));for(var j=e.config.showMonths;j--;)e.weekdayContainer.children[j].innerHTML=`
97
+ */var O8;function gg(){return O8||(O8=1,process.env.NODE_ENV!=="production"&&function(){function n(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}function t(p,m){d||i.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var v=m();if(!f){var b=m();o(v,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}b=s({inst:{value:v,getSnapshot:m}});var I=b[0].inst,y=b[1];return l(function(){I.value=v,I.getSnapshot=m,e(I)&&y({inst:I})},[p,v,m]),a(function(){return e(I)&&y({inst:I}),p(function(){e(I)&&y({inst:I})})},[p]),u(v),v}function e(p){var m=p.getSnapshot;p=p.value;try{var v=m();return!o(p,v)}catch{return!0}}function r(p,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=c,o=typeof Object.is=="function"?Object.is:n,s=i.useState,a=i.useEffect,l=i.useLayoutEffect,u=i.useDebugValue,d=!1,f=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;O5.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),O5}var _8;function yg(){return _8||(_8=1,process.env.NODE_ENV==="production"?Rn.exports=mg():Rn.exports=gg()),Rn.exports}var bg=yg();const N8=c.createContext(!1),p6=c.createContext(null);function Mg(n){if(c.useContext(p6))return n.content;let{collection:e,document:r}=wg(n.createCollection);return c.createElement(c.Fragment,null,c.createElement(Wm,null,c.createElement(p6.Provider,{value:r},n.content)),c.createElement(xg,{render:n.children,collection:e}))}function xg({collection:n,render:t}){return t(n)}function Ig(n,t,e){let r=Sn(),i=c.useRef(r);i.current=r;let o=c.useCallback(()=>i.current?e():t(),[t,e]);return bg.useSyncExternalStore(n,o)}const Eg=typeof c.useSyncExternalStore=="function"?c.useSyncExternalStore:Ig;function wg(n){let[t]=c.useState(()=>new Um(n?.()||new g5)),e=c.useCallback(s=>t.subscribe(s),[t]),r=c.useCallback(()=>{let s=t.getCollection();return t.isSSR&&t.resetAfterSSR(),s},[t]),i=c.useCallback(()=>(t.isSSR=!0,t.getCollection()),[t]),o=Eg(e,r,i);return Fe(()=>(t.isMounted=!0,()=>{t.isMounted=!1}),[t]),{collection:o,document:t}}const _5=c.createContext(null);function Sg(n,t,e,r,i,o){let s=c.useCallback(l=>{l?.setProps(t,e,r,o)},[t,e,r,o]),a=c.useContext(_5);if(a){let l=a.ownerDocument.nodesByProps.get(t);return l||(l=a.ownerDocument.createElement(n),l.setProps(t,e,r,o),a.appendChild(l),a.ownerDocument.updateCollection(),a.ownerDocument.nodesByProps.set(t,l)),i?c.createElement(_5.Provider,{value:l},i):null}return c.createElement(n,{ref:s},i)}function Cg(n,t){let e=({node:i})=>t(i.props,i.props.ref,i),r=c.forwardRef((i,o)=>{let s=c.useContext(z5);if(!c.useContext(N8)){if(t.length>=3)throw new Error(t.name+" cannot be rendered outside a collection.");return t(i,o)}return Sg(n,i,o,"children"in i?i.children:null,null,l=>c.createElement(z5.Provider,{value:s},c.createElement(e,{node:l})))});return r.displayName=t.name,r}function Pg(n){return c8({...n,addIdAndValue:!0})}const A8=c.createContext(null);function kg(n){let t=c.useContext(A8),e=(t?.dependencies||[]).concat(n.dependencies),r=n.idScope||t?.idScope,i=Pg({...n,idScope:r,dependencies:e});return c.useContext(p6)&&(i=c.createElement(zg,null,i)),t=c.useMemo(()=>({dependencies:e,idScope:r}),[r,...e]),c.createElement(A8.Provider,{value:t},i)}function zg({children:n}){let t=c.useContext(p6),e=c.useMemo(()=>c.createElement(p6.Provider,{value:null},c.createElement(N8.Provider,{value:!0},n)),[n]);return Sn()?c.createElement(_5.Provider,{value:t},e):C1.createPortal(e,t)}const $g=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Tg=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Dg(n){if(Intl.Locale){let e=new Intl.Locale(n).maximize(),r=typeof e.getTextInfo=="function"?e.getTextInfo():e.textInfo;if(r)return r.direction==="rtl";if(e.script)return $g.has(e.script)}let t=n.split("-")[0];return Tg.has(t)}const Og=Symbol.for("react-aria.i18n.locale");function F8(){let n=typeof window<"u"&&window[Og]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([n])}catch{n="en-US"}return{locale:n,direction:Dg(n)?"rtl":"ltr"}}let N5=F8(),h6=new Set;function L8(){N5=F8();for(let n of h6)n(N5)}function _g(){let n=Sn(),[t,e]=c.useState(N5);return c.useEffect(()=>(h6.size===0&&window.addEventListener("languagechange",L8),h6.add(e),()=>{h6.delete(e),h6.size===0&&window.removeEventListener("languagechange",L8)}),[]),n?{locale:"en-US",direction:"ltr"}:t}const Ng=c.createContext(null);function Pt(){let n=_g();return c.useContext(Ng)||n}const Ag=Symbol.for("react-aria.i18n.locale"),Fg=Symbol.for("react-aria.i18n.strings");let kt;class Xn{getStringForLocale(t,e){let i=this.getStringsForLocale(e)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${e} locale`);return i}getStringsForLocale(t){let e=this.strings[t];return e||(e=Lg(t,this.strings,this.defaultLocale),this.strings[t]=e),e}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let e=window[Ag];if(kt===void 0){let i=window[Fg];if(!i)return null;kt={};for(let o in i)kt[o]=new Xn({[e]:i[o]},e)}let r=kt?.[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,e="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=e}}function Lg(n,t,e="en-US"){if(t[n])return t[n];let r=Kg(n);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[e]}function Kg(n){return Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]}const K8=new Map,B8=new Map;class Bg{format(t,e){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(e,this):r}plural(t,e,r="cardinal"){let i=e["="+t];if(i)return typeof i=="function"?i():i;let o=this.locale+":"+r,s=K8.get(o);s||(s=new Intl.PluralRules(this.locale,{type:r}),K8.set(o,s));let a=s.select(t);return i=e[a]||e.other,typeof i=="function"?i():i}number(t){let e=B8.get(this.locale);return e||(e=new Intl.NumberFormat(this.locale),B8.set(this.locale,e)),e.format(t)}select(t,e){let r=t[e]||t.other;return typeof r=="function"?r():r}constructor(t,e){this.locale=t,this.strings=e}}const H8=new WeakMap;function Hg(n){let t=H8.get(n);return t||(t=new Xn(n),H8.set(n,t)),t}function Vg(n,t){return t&&Xn.getGlobalDictionaryForPackage(t)||Hg(n)}function qg(n,t){let{locale:e}=Pt(),r=Vg(n,t);return c.useMemo(()=>new Bg(e,r),[e,r])}let A5=new Map,F5=!1;try{F5=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Jn=!1;try{Jn=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const V8={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class jg{format(t){let e="";if(!F5&&this.options.signDisplay!=null?e=Wg(this.numberFormatter,this.options.signDisplay,t):e=this.numberFormatter.format(t),this.options.style==="unit"&&!Jn){var r;let{unit:i,unitDisplay:o="short",locale:s}=this.resolvedOptions();if(!i)return e;let a=(r=V8[i])===null||r===void 0?void 0:r[o];e+=a[s]||a.default}return e}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,e){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,e);if(e<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(e)}`}formatRangeToParts(t,e){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,e);if(e<t)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(t),i=this.numberFormatter.formatToParts(e);return[...r.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!F5&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Jn&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,e={}){this.numberFormatter=Ug(t,e),this.options=e}}function Ug(n,t={}){let{numberingSystem:e}=t;if(e&&n.includes("-nu-")&&(n.includes("-u-")||(n+="-u-"),n+=`-nu-${e}`),t.style==="unit"&&!Jn){var r;let{unit:s,unitDisplay:a="short"}=t;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=V8[s])===null||r===void 0)&&r[a]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${a}`);t={...t,style:"decimal"}}let i=n+(t?Object.entries(t).sort((s,a)=>s[0]<a[0]?-1:1).join():"");if(A5.has(i))return A5.get(i);let o=new Intl.NumberFormat(n,t);return A5.set(i,o),o}function Wg(n,t,e){if(t==="auto")return n.format(e);if(t==="never")return n.format(Math.abs(e));{let r=!1;if(t==="always"?r=e>0||Object.is(e,0):t==="exceptZero"&&(Object.is(e,-0)||Object.is(e,0)?e=Math.abs(e):r=e>0),r){let i=n.format(-e),o=n.format(e),s=i.replace(o,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(o,"!!!").replace(s,"+").replace("!!!",o)}else return n.format(e)}}function Yg(n={}){let{locale:t}=Pt();return c.useMemo(()=>new jg(t,n),[t,n])}let L5=new Map;function Gg(n){let{locale:t}=Pt(),e=t+(n?Object.entries(n).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(L5.has(e))return L5.get(e);let r=new Intl.Collator(t,n);return L5.set(e,r),r}function Rg(n,t){let{elementType:e="button",isDisabled:r,onPress:i,onPressStart:o,onPressEnd:s,onPressUp:a,onPressChange:l,preventFocusOnPress:u,allowFocusWhenDisabled:d,onClick:f,href:h,target:p,rel:m,type:v="button"}=n,b;e==="button"?b={type:v,disabled:r,form:n.form,formAction:n.formAction,formEncType:n.formEncType,formMethod:n.formMethod,formNoValidate:n.formNoValidate,formTarget:n.formTarget,name:n.name,value:n.value}:b={role:"button",href:e==="a"&&!r?h:void 0,target:e==="a"?p:void 0,type:e==="input"?v:void 0,disabled:e==="input"?r:void 0,"aria-disabled":!r||e==="input"?void 0:r,rel:e==="a"?m:void 0};let{pressProps:I,isPressed:y}=Vn({onPressStart:o,onPressEnd:s,onPressChange:l,onPress:i,onPressUp:a,onClick:f,isDisabled:r,preventFocusOnPress:u,ref:t}),{focusableProps:x}=P8(n,t);d&&(x.tabIndex=r?-1:x.tabIndex);let g=De(x,I,et(n,{labelable:!0}));return{isPressed:y,buttonProps:De(b,g,{"aria-haspopup":n["aria-haspopup"],"aria-expanded":n["aria-expanded"],"aria-controls":n["aria-controls"],"aria-pressed":n["aria-pressed"],"aria-current":n["aria-current"]})}}const q8=c.createContext(null),K5="react-aria-focus-scope-restore";let Oe=null;function Xg(n){let{children:t,contain:e,restoreFocus:r,autoFocus:i}=n,o=c.useRef(null),s=c.useRef(null),a=c.useRef([]),{parentNode:l}=c.useContext(q8)||{},u=c.useMemo(()=>new V5({scopeRef:a}),[a]);Fe(()=>{let h=l||Ke.root;if(Ke.getTreeNode(h.scopeRef)&&Oe&&!Qn(Oe,h.scopeRef)){let p=Ke.getTreeNode(Oe);p&&(h=p)}h.addChild(u),Ke.addNode(u)},[u,l]),Fe(()=>{let h=Ke.getTreeNode(a);h&&(h.contain=!!e)},[e]),Fe(()=>{var h;let p=(h=o.current)===null||h===void 0?void 0:h.nextSibling,m=[],v=b=>b.stopPropagation();for(;p&&p!==s.current;)m.push(p),p.addEventListener(K5,v),p=p.nextSibling;return a.current=m,()=>{for(let b of m)b.removeEventListener(K5,v)}},[t]),ty(a,r,e),Zg(a,e),ny(a,r,e),ey(a,i),c.useEffect(()=>{const h=Xe(Pe(a.current?a.current[0]:void 0));let p=null;if(v1(h,a.current)){for(let m of Ke.traverse())m.scopeRef&&v1(h,m.scopeRef.current)&&(p=m);p===Ke.getTreeNode(a)&&(Oe=p.scopeRef)}},[a]),Fe(()=>()=>{var h,p,m;let v=(m=(p=Ke.getTreeNode(a))===null||p===void 0||(h=p.parent)===null||h===void 0?void 0:h.scopeRef)!==null&&m!==void 0?m:null;(a===Oe||Qn(a,Oe))&&(!v||Ke.getTreeNode(v))&&(Oe=v),Ke.removeTreeNode(a)},[a]);let d=c.useMemo(()=>Jg(a),[]),f=c.useMemo(()=>({focusManager:d,parentNode:u}),[u,d]);return c.createElement(q8.Provider,{value:f},c.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),t,c.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:s}))}function Jg(n){return{focusNext(t={}){let e=n.current,{from:r,tabbable:i,wrap:o,accept:s}=t;var a;let l=r||Xe(Pe((a=e[0])!==null&&a!==void 0?a:void 0)),u=e[0].previousElementSibling,d=at(e),f=K1(d,{tabbable:i,accept:s},e);f.currentNode=v1(l,e)?l:u;let h=f.nextNode();return!h&&o&&(f.currentNode=u,h=f.nextNode()),h&&L1(h,!0),h},focusPrevious(t={}){let e=n.current,{from:r,tabbable:i,wrap:o,accept:s}=t;var a;let l=r||Xe(Pe((a=e[0])!==null&&a!==void 0?a:void 0)),u=e[e.length-1].nextElementSibling,d=at(e),f=K1(d,{tabbable:i,accept:s},e);f.currentNode=v1(l,e)?l:u;let h=f.previousNode();return!h&&o&&(f.currentNode=u,h=f.previousNode()),h&&L1(h,!0),h},focusFirst(t={}){let e=n.current,{tabbable:r,accept:i}=t,o=at(e),s=K1(o,{tabbable:r,accept:i},e);s.currentNode=e[0].previousElementSibling;let a=s.nextNode();return a&&L1(a,!0),a},focusLast(t={}){let e=n.current,{tabbable:r,accept:i}=t,o=at(e),s=K1(o,{tabbable:r,accept:i},e);s.currentNode=e[e.length-1].nextElementSibling;let a=s.previousNode();return a&&L1(a,!0),a}}}function at(n){return n[0].parentElement}function v6(n){let t=Ke.getTreeNode(Oe);for(;t&&t.scopeRef!==n;){if(t.contain)return!1;t=t.parent}return!0}function Qg(n){if(n.checked)return!0;let t=[];if(!n.form)t=[...Pe(n).querySelectorAll(`input[type="radio"][name="${CSS.escape(n.name)}"]`)].filter(o=>!o.form);else{var e,r;let o=(r=n.form)===null||r===void 0||(e=r.elements)===null||e===void 0?void 0:e.namedItem(n.name);t=[...o??[]]}return t?!t.some(o=>o.checked):!1}function Zg(n,t){let e=c.useRef(void 0),r=c.useRef(void 0);Fe(()=>{let i=n.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const o=Pe(i?i[0]:void 0);let s=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!v6(n)||u.isComposing)return;let d=Xe(o),f=n.current;if(!f||!v1(d,f))return;let h=at(f),p=K1(h,{tabbable:!0},f);if(!d)return;p.currentNode=d;let m=u.shiftKey?p.previousNode():p.nextNode();m||(p.currentNode=u.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,m=u.shiftKey?p.previousNode():p.nextNode()),u.preventDefault(),m&&L1(m,!0)},a=u=>{(!Oe||Qn(Oe,n))&&v1(xe(u),n.current)?(Oe=n,e.current=xe(u)):v6(n)&&!lt(xe(u),n)?e.current?e.current.focus():Oe&&Oe.current&&B5(Oe.current):v6(n)&&(e.current=xe(u))},l=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let d=Wn(),f=(d==="virtual"||d===null)&&s5()&&X9(),h=Xe(o);if(!f&&h&&v6(n)&&!lt(h,n)){Oe=n;let m=xe(u);if(m&&m.isConnected){var p;e.current=m,(p=e.current)===null||p===void 0||p.focus()}else Oe.current&&B5(Oe.current)}})};return o.addEventListener("keydown",s,!1),o.addEventListener("focusin",a,!1),i?.forEach(u=>u.addEventListener("focusin",a,!1)),i?.forEach(u=>u.addEventListener("focusout",l,!1)),()=>{o.removeEventListener("keydown",s,!1),o.removeEventListener("focusin",a,!1),i?.forEach(u=>u.removeEventListener("focusin",a,!1)),i?.forEach(u=>u.removeEventListener("focusout",l,!1))}},[n,t]),Fe(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function j8(n){return lt(n)}function v1(n,t){return!n||!t?!1:t.some(e=>e.contains(n))}function lt(n,t=null){if(n instanceof Element&&n.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:e}of Ke.traverse(Ke.getTreeNode(t)))if(e&&v1(n,e.current))return!0;return!1}function Qn(n,t){var e;let r=(e=Ke.getTreeNode(t))===null||e===void 0?void 0:e.parent;for(;r;){if(r.scopeRef===n)return!0;r=r.parent}return!1}function L1(n,t=!1){if(n!=null&&!t)try{f6(n)}catch{}else if(n!=null)try{n.focus()}catch{}}function U8(n,t=!0){let e=n[0].previousElementSibling,r=at(n),i=K1(r,{tabbable:t},n);i.currentNode=e;let o=i.nextNode();return t&&!o&&(r=at(n),i=K1(r,{tabbable:!1},n),i.currentNode=e,o=i.nextNode()),o}function B5(n,t=!0){L1(U8(n,t))}function ey(n,t){const e=c.useRef(t);c.useEffect(()=>{if(e.current){Oe=n;const r=Pe(n.current?n.current[0]:void 0);!v1(Xe(r),Oe.current)&&n.current&&B5(n.current)}e.current=!1},[n])}function ty(n,t,e){Fe(()=>{if(t||e)return;let r=n.current;const i=Pe(r?r[0]:void 0);let o=s=>{let a=xe(s);v1(a,n.current)?Oe=n:j8(a)||(Oe=null)};return i.addEventListener("focusin",o,!1),r?.forEach(s=>s.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),r?.forEach(s=>s.removeEventListener("focusin",o,!1))}},[n,t,e])}function W8(n){let t=Ke.getTreeNode(Oe);for(;t&&t.scopeRef!==n;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===n}function ny(n,t,e){const r=c.useRef(typeof document<"u"?Xe(Pe(n.current?n.current[0]:void 0)):null);Fe(()=>{let i=n.current;const o=Pe(i?i[0]:void 0);if(!t||e)return;let s=()=>{(!Oe||Qn(Oe,n))&&v1(Xe(o),n.current)&&(Oe=n)};return o.addEventListener("focusin",s,!1),i?.forEach(a=>a.addEventListener("focusin",s,!1)),()=>{o.removeEventListener("focusin",s,!1),i?.forEach(a=>a.removeEventListener("focusin",s,!1))}},[n,e]),Fe(()=>{const i=Pe(n.current?n.current[0]:void 0);if(!t)return;let o=s=>{if(s.key!=="Tab"||s.altKey||s.ctrlKey||s.metaKey||!v6(n)||s.isComposing)return;let a=i.activeElement;if(!lt(a,n)||!W8(n))return;let l=Ke.getTreeNode(n);if(!l)return;let u=l.nodeToRestore,d=K1(i.body,{tabbable:!0});d.currentNode=a;let f=s.shiftKey?d.previousNode():d.nextNode();if((!u||!u.isConnected||u===i.body)&&(u=void 0,l.nodeToRestore=void 0),(!f||!lt(f,n))&&u){d.currentNode=u;do f=s.shiftKey?d.previousNode():d.nextNode();while(lt(f,n));s.preventDefault(),s.stopPropagation(),f?L1(f,!0):j8(u)?L1(u,!0):a.blur()}};return e||i.addEventListener("keydown",o,!0),()=>{e||i.removeEventListener("keydown",o,!0)}},[n,t,e]),Fe(()=>{const i=Pe(n.current?n.current[0]:void 0);if(!t)return;let o=Ke.getTreeNode(n);if(o){var s;return o.nodeToRestore=(s=r.current)!==null&&s!==void 0?s:void 0,()=>{let a=Ke.getTreeNode(n);if(!a)return;let l=a.nodeToRestore,u=Xe(i);if(t&&l&&(u&&lt(u,n)||u===i.body&&W8(n))){let d=Ke.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let f=d.getTreeNode(n);for(;f;){if(f.nodeToRestore&&f.nodeToRestore.isConnected){Y8(f.nodeToRestore);return}f=f.parent}for(f=d.getTreeNode(n);f;){if(f.scopeRef&&f.scopeRef.current&&Ke.getTreeNode(f.scopeRef)){let h=U8(f.scopeRef.current,!0);Y8(h);return}f=f.parent}}})}}}},[n,t])}function Y8(n){n.dispatchEvent(new CustomEvent(K5,{bubbles:!0,cancelable:!0}))&&L1(n)}function K1(n,t,e){let r=t?.tabbable?qm:r8,i=n?.nodeType===Node.ELEMENT_NODE?n:null,o=Pe(i),s=am(o,n||o,NodeFilter.SHOW_ELEMENT,{acceptNode(a){var l;return!(t==null||(l=t.from)===null||l===void 0)&&l.contains(a)||t?.tabbable&&a.tagName==="INPUT"&&a.getAttribute("type")==="radio"&&(!Qg(a)||s.currentNode.tagName==="INPUT"&&s.currentNode.type==="radio"&&s.currentNode.name===a.name)?NodeFilter.FILTER_REJECT:r(a)&&(!e||v1(a,e))&&(!t?.accept||t.accept(a))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(s.currentNode=t.from),s}class H5{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,e,r){let i=this.fastMap.get(e??null);if(!i)return;let o=new V5({scopeRef:t});i.addChild(o),o.parent=i,this.fastMap.set(t,o),r&&(o.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let e=this.fastMap.get(t);if(!e)return;let r=e.parent;for(let o of this.traverse())o!==e&&e.nodeToRestore&&o.nodeToRestore&&e.scopeRef&&e.scopeRef.current&&v1(o.nodeToRestore,e.scopeRef.current)&&(o.nodeToRestore=e.nodeToRestore);let i=e.children;r&&(r.removeChild(e),i.size>0&&i.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(e.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let e of t.children)yield*this.traverse(e)}clone(){var t;let e=new H5;var r;for(let i of this.traverse())e.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return e}constructor(){this.fastMap=new Map,this.root=new V5({scopeRef:null}),this.fastMap.set(null,this.root)}}class V5{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Ke=new H5;function G8(n={}){let{autoFocus:t=!1,isTextInput:e,within:r}=n,i=c.useRef({isFocused:!1,isFocusVisible:t||Un()}),[o,s]=c.useState(!1),[a,l]=c.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=c.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),d=c.useCallback(p=>{i.current.isFocused=p,s(p),u()},[u]);dg(p=>{i.current.isFocusVisible=p,u()},[],{isTextInput:e});let{focusProps:f}=P5({isDisabled:r,onFocusChange:d}),{focusWithinProps:h}=k8({isDisabled:!r,onFocusWithinChange:d});return{isFocused:o,isFocusVisible:a,focusProps:r?h:f}}function R8(n){let t=iy(Pe(n));t!==n&&(t&&ry(t,n),n&&X8(n,t))}function ry(n,t){n.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function X8(n,t){n.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),n.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function iy(n){let t=Xe(n),e=t?.getAttribute("aria-activedescendant");return e&&n.getElementById(e)||t}const J8=7e3;let z1=null;function Q8(n,t="assertive",e=J8){z1?z1.announce(n,t,e):(z1=new oy,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?z1.announce(n,t,e):setTimeout(()=>{z1?.isAttached()&&z1?.announce(n,t,e)},100))}class oy{isAttached(){var t;return(t=this.node)===null||t===void 0?void 0:t.isConnected}createLog(t){let e=document.createElement("div");return e.setAttribute("role","log"),e.setAttribute("aria-live",t),e.setAttribute("aria-relevant","additions"),e}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,e="assertive",r=J8){var i,o;if(!this.node)return;let s=document.createElement("div");typeof t=="object"?(s.setAttribute("role","img"),s.setAttribute("aria-labelledby",t["aria-labelledby"])):s.textContent=t,e==="assertive"?(i=this.assertiveLog)===null||i===void 0||i.appendChild(s):(o=this.politeLog)===null||o===void 0||o.appendChild(s),t!==""&&setTimeout(()=>{s.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}function Z8(n){let{id:t,label:e,"aria-labelledby":r,"aria-label":i,labelElementType:o="label"}=n;t=I1(t);let s=I1(),a={};e?(r=r?`${s} ${r}`:s,a={id:s,htmlFor:o==="label"?t:void 0}):!r&&!i&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=km({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:a,fieldProps:l}}const sy=0,ay=100,ly=1;function cy(n){const{isDisabled:t=!1,minValue:e=sy,maxValue:r=ay,numberFormatter:i,step:o=ly,orientation:s="horizontal"}=n;let a=c.useMemo(()=>{let k=(r-e)/10;return k=u6(k,0,k+o,o),Math.max(k,o)},[o,r,e]),l=c.useCallback(k=>k?.map((V,U)=>{let R=U===0?e:k[U-1],G=U===k.length-1?r:k[U+1];return u6(V,R,G,o)}),[e,r,o]),u=c.useMemo(()=>l(tc(n.value)),[n.value,l]),d=c.useMemo(()=>{var k;return l((k=tc(n.defaultValue))!==null&&k!==void 0?k:[e])},[n.defaultValue,e,l]),f=nc(n.value,n.defaultValue,n.onChange),h=nc(n.value,n.defaultValue,n.onChangeEnd);const[p,m]=Dn(u,d,f);let[v]=c.useState(p);const[b,I]=c.useState(new Array(p.length).fill(!1)),y=c.useRef(new Array(p.length).fill(!0)),[x,g]=c.useState(void 0),M=c.useRef(p),w=c.useRef(b);let z=k=>{M.current=k,m(k)},A=k=>{w.current=k,I(k)};function C(k){return(k-e)/(r-e)}function H(k){return k===0?e:p[k-1]}function E(k){return k===p.length-1?r:p[k+1]}function L(k){return y.current[k]}function F(k,V){y.current[k]=V}function $(k,V){if(t||!L(k))return;const U=H(k),R=E(k);V=u6(V,U,R,o);let G=ec(M.current,k,V);z(G)}function X(k,V){if(t||!L(k))return;V&&(M.current=p);const U=w.current[k];w.current=ec(w.current,k,V),A(w.current),h&&U&&!w.current.some(Boolean)&&h(M.current)}function _(k){return i.format(k)}function B(k,V){$(k,N(V))}function W(k){return Math.round((k-e)/o)*o+e}function N(k){const V=k*(r-e)+e;return h5(W(V),e,r)}function T(k,V=1){let U=Math.max(V,o);$(k,u6(p[k]+U,e,r,o))}function O(k,V=1){let U=Math.max(V,o);$(k,u6(p[k]-U,e,r,o))}return{values:p,defaultValues:n.defaultValue!==void 0?d:v,getThumbValue:k=>p[k],setThumbValue:$,setThumbPercent:B,isThumbDragging:k=>b[k],setThumbDragging:X,focusedThumb:x,setFocusedThumb:g,getThumbPercent:k=>C(p[k]),getValuePercent:C,getThumbValueLabel:k=>_(p[k]),getFormattedValue:_,getThumbMinValue:H,getThumbMaxValue:E,getPercentValue:N,isThumbEditable:L,setThumbEditable:F,incrementThumb:T,decrementThumb:O,step:o,pageSize:a,orientation:s,isDisabled:t}}function ec(n,t,e){return n[t]===e?n:[...n.slice(0,t),e,...n.slice(t+1)]}function tc(n){if(n!=null)return Array.isArray(n)?n:[n]}function nc(n,t,e){return r=>{e?.(typeof n=="number"||typeof t=="number"?r[0]:r)}}const rc={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function uy(n={}){let{style:t,isFocusable:e}=n,[r,i]=c.useState(!1),{focusWithinProps:o}=k8({isDisabled:!e,onFocusWithinChange:a=>i(a)}),s=c.useMemo(()=>r?t:t?{...rc,...t}:rc,[r]);return{visuallyHiddenProps:{...o,style:s}}}function ic(n){let{children:t,elementType:e="div",isFocusable:r,style:i,...o}=n,{visuallyHiddenProps:s}=uy(n);return c.createElement(e,De(o,s),t)}const q5=new WeakMap;function j5(n,t){let e=q5.get(n);if(!e)throw new Error("Unknown slider state");return`${e.id}-${t}`}function dy(n,t,e){let{labelProps:r,fieldProps:i}=Z8(n),o=n.orientation==="vertical";var s;q5.set(t,{id:(s=r.id)!==null&&s!==void 0?s:i.id,"aria-describedby":n["aria-describedby"],"aria-details":n["aria-details"]});let{direction:a}=Pt(),{addGlobalListener:l,removeGlobalListener:u}=rt();const d=c.useRef(null),f=a==="rtl",h=c.useRef(null),{moveProps:p}=$8({onMoveStart(){h.current=null},onMove({deltaX:I,deltaY:y}){if(!e.current)return;let{height:x,width:g}=e.current.getBoundingClientRect(),M=o?x:g;h.current==null&&d.current!=null&&(h.current=t.getThumbPercent(d.current)*M);let w=o?y:I;if((o||f)&&(w=-w),h.current+=w,d.current!=null&&e.current){const z=h5(h.current/M,0,1);t.setThumbPercent(d.current,z)}},onMoveEnd(){d.current!=null&&(t.setThumbDragging(d.current,!1),d.current=null)}});let m=c.useRef(void 0),v=(I,y,x,g)=>{if(e.current&&!n.isDisabled&&t.values.every((M,w)=>!t.isThumbDragging(w))){let{height:M,width:w,top:z,left:A}=e.current.getBoundingClientRect(),C=o?M:w,F=((o?g:x)-(o?z:A))/C;(a==="rtl"||o)&&(F=1-F);let $=t.getPercentValue(F),X,_=t.values.findIndex(B=>$-B<0);if(_===0)X=_;else if(_===-1)X=t.values.length-1;else{let B=t.values[_-1],W=t.values[_];Math.abs(B-$)<Math.abs(W-$)?X=_-1:X=_}X>=0&&t.isThumbEditable(X)?(I.preventDefault(),d.current=X,t.setFocusedThumb(X),m.current=y,t.setThumbDragging(d.current,!0),t.setThumbValue(X,$),l(window,"mouseup",b,!1),l(window,"touchend",b,!1),l(window,"pointerup",b,!1)):d.current=null}},b=I=>{var y,x;((x=I.pointerId)!==null&&x!==void 0?x:(y=I.changedTouches)===null||y===void 0?void 0:y[0].identifier)===m.current&&(d.current!=null&&(t.setThumbDragging(d.current,!1),d.current=null),u(window,"mouseup",b,!1),u(window,"touchend",b,!1),u(window,"pointerup",b,!1))};return"htmlFor"in r&&r.htmlFor&&(delete r.htmlFor,r.onClick=()=>{var I;(I=document.getElementById(j5(t,0)))===null||I===void 0||I.focus(),lg("keyboard")}),{labelProps:r,groupProps:{role:"group",...i},trackProps:De({onMouseDown(I){I.button!==0||I.altKey||I.ctrlKey||I.metaKey||v(I,void 0,I.clientX,I.clientY)},onPointerDown(I){I.pointerType==="mouse"&&(I.button!==0||I.altKey||I.ctrlKey||I.metaKey)||v(I,I.pointerId,I.clientX,I.clientY)},onTouchStart(I){v(I,I.changedTouches[0].identifier,I.changedTouches[0].clientX,I.changedTouches[0].clientY)},style:{position:"relative",touchAction:"none"}},p),outputProps:{htmlFor:t.values.map((I,y)=>j5(t,y)).join(" "),"aria-live":"off"}}}function fy(n,t){let{index:e=0,isRequired:r,validationState:i,isInvalid:o,trackRef:s,inputRef:a,orientation:l=t.orientation,name:u,form:d}=n,f=n.isDisabled||t.isDisabled,h=l==="vertical",{direction:p}=Pt(),{addGlobalListener:m,removeGlobalListener:v}=rt(),b=q5.get(t);var I;const{labelProps:y,fieldProps:x}=Z8({...n,id:j5(t,e),"aria-labelledby":`${b.id} ${(I=n["aria-labelledby"])!==null&&I!==void 0?I:""}`.trim()}),g=t.values[e],M=c.useCallback(()=>{a.current&&p1(a.current)},[a]),w=t.focusedThumb===e;c.useEffect(()=>{w&&M()},[w,M]);let z=p==="rtl",A=c.useRef(null),{keyboardProps:C}=k5({onKeyDown(B){let{getThumbMaxValue:W,getThumbMinValue:N,decrementThumb:T,incrementThumb:O,setThumbValue:k,setThumbDragging:V,pageSize:U}=t;if(!/^(PageUp|PageDown|Home|End)$/.test(B.key)){B.continuePropagation();return}switch(B.preventDefault(),V(e,!0),B.key){case"PageUp":O(e,U);break;case"PageDown":T(e,U);break;case"Home":k(e,N(e));break;case"End":k(e,W(e));break}V(e,!1)}}),{moveProps:H}=$8({onMoveStart(){A.current=null,t.setThumbDragging(e,!0)},onMove({deltaX:B,deltaY:W,pointerType:N,shiftKey:T}){const{getThumbPercent:O,setThumbPercent:k,decrementThumb:V,incrementThumb:U,step:R,pageSize:G}=t;if(!s.current)return;let{width:ee,height:Q}=s.current.getBoundingClientRect(),D=h?Q:ee;if(A.current==null&&(A.current=O(e)*D),N==="keyboard")B>0&&z||B<0&&!z||W>0?V(e,T?G:R):U(e,T?G:R);else{let oe=h?W:B;(h||z)&&(oe=-oe),A.current+=oe,k(e,h5(A.current/D,0,1))}},onMoveEnd(){t.setThumbDragging(e,!1)}});t.setThumbEditable(e,!f);const{focusableProps:E}=P8(De(n,{onFocus:()=>t.setFocusedThumb(e),onBlur:()=>t.setFocusedThumb(void 0)}),a);let L=c.useRef(void 0),F=B=>{M(),L.current=B,t.setThumbDragging(e,!0),m(window,"mouseup",$,!1),m(window,"touchend",$,!1),m(window,"pointerup",$,!1)},$=B=>{var W,N;((N=B.pointerId)!==null&&N!==void 0?N:(W=B.changedTouches)===null||W===void 0?void 0:W[0].identifier)===L.current&&(M(),t.setThumbDragging(e,!1),v(window,"mouseup",$,!1),v(window,"touchend",$,!1),v(window,"pointerup",$,!1))},X=t.getThumbPercent(e);(h||p==="rtl")&&(X=1-X);let _=f?{}:De(C,H,{onMouseDown:B=>{B.button!==0||B.altKey||B.ctrlKey||B.metaKey||F()},onPointerDown:B=>{B.button!==0||B.altKey||B.ctrlKey||B.metaKey||F(B.pointerId)},onTouchStart:B=>{F(B.changedTouches[0].identifier)}});return Nm(a,t.defaultValues[e],B=>{t.setThumbValue(e,B)}),{inputProps:De(E,x,{type:"range",tabIndex:f?void 0:0,min:t.getThumbMinValue(e),max:t.getThumbMaxValue(e),step:t.step,value:g,name:u,form:d,disabled:f,"aria-orientation":l,"aria-valuetext":t.getThumbValueLabel(e),"aria-required":r||void 0,"aria-invalid":o||i==="invalid"||void 0,"aria-errormessage":n["aria-errormessage"],"aria-describedby":[b["aria-describedby"],n["aria-describedby"]].filter(Boolean).join(" "),"aria-details":[b["aria-details"],n["aria-details"]].filter(Boolean).join(" "),onChange:B=>{t.setThumbValue(e,parseFloat(B.target.value))}}),thumbProps:{..._,style:{position:"absolute",[h?"top":"left"]:`${X*100}%`,transform:"translate(-50%, -50%)",touchAction:"none"}},labelProps:y,isDragging:t.isThumbDragging(e),isDisabled:f,isFocused:w}}const py=new WeakMap;function hy(n,t,e){let{type:r}=n,{isOpen:i}=t;c.useEffect(()=>{e&&e.current&&py.set(e.current,t.close)});let o;r==="menu"?o=!0:r==="listbox"&&(o="listbox");let s=I1();return{triggerProps:{"aria-haspopup":o,"aria-expanded":i,"aria-controls":i?s:void 0,onPress:t.toggle},overlayProps:{id:s}}}function U5(n){return ym()?n.altKey:n.ctrlKey}function Zn(n,t){var e,r;let i=`[data-key="${CSS.escape(String(t))}"]`,o=(e=n.current)===null||e===void 0?void 0:e.dataset.collection;return o&&(i=`[data-collection="${CSS.escape(o)}"]${i}`),(r=n.current)===null||r===void 0?void 0:r.querySelector(i)}const oc=new WeakMap;function vy(n){let t=I1();return oc.set(n,t),t}function my(n){return oc.get(n)}const gy=1e3;function yy(n){let{keyboardDelegate:t,selectionManager:e,onTypeSelect:r}=n,i=c.useRef({search:"",timeout:void 0}).current,o=s=>{let a=by(s.key);if(!(!a||s.ctrlKey||s.metaKey||!s.currentTarget.contains(s.target)||i.search.length===0&&a===" ")){if(a===" "&&i.search.trim().length>0&&(s.preventDefault(),"continuePropagation"in s||s.stopPropagation()),i.search+=a,t.getKeyForSearch!=null){let l=t.getKeyForSearch(i.search,e.focusedKey);l==null&&(l=t.getKeyForSearch(i.search)),l!=null&&(e.setFocusedKey(l),r&&r(l))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},gy)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?o:void 0}}}function by(n){return n.length===1||!/^[A-Z]/i.test(n)?n:""}function My(n){let{selectionManager:t,keyboardDelegate:e,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:s=!1,disallowSelectAll:a=!1,escapeKeyBehavior:l="clearSelection",selectOnFocus:u=t.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:f,allowsTabNavigation:h=!1,isVirtualized:p,scrollRef:m=r,linkBehavior:v="action"}=n,{direction:b}=Pt(),I=zn(),y=B=>{var W;if(B.altKey&&B.key==="Tab"&&B.preventDefault(),!(!((W=r.current)===null||W===void 0)&&W.contains(B.target)))return;const N=(Y,fe)=>{if(Y!=null){if(t.isLink(Y)&&v==="selection"&&u&&!U5(B)){C1.flushSync(()=>{t.setFocusedKey(Y,fe)});let re=Zn(r,Y),K=t.getItemProps(Y);re&&I.open(re,B,K.href,K.routerOptions);return}if(t.setFocusedKey(Y,fe),t.isLink(Y)&&v==="override")return;B.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Y):u&&!U5(B)&&t.replaceSelection(Y)}};switch(B.key){case"ArrowDown":if(e.getKeyBelow){var T,O,k;let Y=t.focusedKey!=null?(T=e.getKeyBelow)===null||T===void 0?void 0:T.call(e,t.focusedKey):(O=e.getFirstKey)===null||O===void 0?void 0:O.call(e);Y==null&&o&&(Y=(k=e.getFirstKey)===null||k===void 0?void 0:k.call(e,t.focusedKey)),Y!=null&&(B.preventDefault(),N(Y))}break;case"ArrowUp":if(e.getKeyAbove){var V,U,R;let Y=t.focusedKey!=null?(V=e.getKeyAbove)===null||V===void 0?void 0:V.call(e,t.focusedKey):(U=e.getLastKey)===null||U===void 0?void 0:U.call(e);Y==null&&o&&(Y=(R=e.getLastKey)===null||R===void 0?void 0:R.call(e,t.focusedKey)),Y!=null&&(B.preventDefault(),N(Y))}break;case"ArrowLeft":if(e.getKeyLeftOf){var G,ee,Q;let Y=t.focusedKey!=null?(G=e.getKeyLeftOf)===null||G===void 0?void 0:G.call(e,t.focusedKey):null;Y==null&&o&&(Y=b==="rtl"?(ee=e.getFirstKey)===null||ee===void 0?void 0:ee.call(e,t.focusedKey):(Q=e.getLastKey)===null||Q===void 0?void 0:Q.call(e,t.focusedKey)),Y!=null&&(B.preventDefault(),N(Y,b==="rtl"?"first":"last"))}break;case"ArrowRight":if(e.getKeyRightOf){var D,oe,te;let Y=t.focusedKey!=null?(D=e.getKeyRightOf)===null||D===void 0?void 0:D.call(e,t.focusedKey):null;Y==null&&o&&(Y=b==="rtl"?(oe=e.getLastKey)===null||oe===void 0?void 0:oe.call(e,t.focusedKey):(te=e.getFirstKey)===null||te===void 0?void 0:te.call(e,t.focusedKey)),Y!=null&&(B.preventDefault(),N(Y,b==="rtl"?"last":"first"))}break;case"Home":if(e.getFirstKey){if(t.focusedKey===null&&B.shiftKey)return;B.preventDefault();let Y=e.getFirstKey(t.focusedKey,wt(B));t.setFocusedKey(Y),Y!=null&&(wt(B)&&B.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Y):u&&t.replaceSelection(Y))}break;case"End":if(e.getLastKey){if(t.focusedKey===null&&B.shiftKey)return;B.preventDefault();let Y=e.getLastKey(t.focusedKey,wt(B));t.setFocusedKey(Y),Y!=null&&(wt(B)&&B.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Y):u&&t.replaceSelection(Y))}break;case"PageDown":if(e.getKeyPageBelow&&t.focusedKey!=null){let Y=e.getKeyPageBelow(t.focusedKey);Y!=null&&(B.preventDefault(),N(Y))}break;case"PageUp":if(e.getKeyPageAbove&&t.focusedKey!=null){let Y=e.getKeyPageAbove(t.focusedKey);Y!=null&&(B.preventDefault(),N(Y))}break;case"a":wt(B)&&t.selectionMode==="multiple"&&a!==!0&&(B.preventDefault(),t.selectAll());break;case"Escape":l==="clearSelection"&&!s&&t.selectedKeys.size!==0&&(B.stopPropagation(),B.preventDefault(),t.clearSelection());break;case"Tab":if(!h){if(B.shiftKey)r.current.focus();else{let Y=K1(r.current,{tabbable:!0}),fe,re;do re=Y.lastChild(),re&&(fe=re);while(re);fe&&!fe.contains(document.activeElement)&&p1(fe)}break}}},x=c.useRef({top:0,left:0});Tn(m,"scroll",p?void 0:()=>{var B,W,N,T;x.current={top:(N=(B=m.current)===null||B===void 0?void 0:B.scrollTop)!==null&&N!==void 0?N:0,left:(T=(W=m.current)===null||W===void 0?void 0:W.scrollLeft)!==null&&T!==void 0?T:0}});let g=B=>{if(t.isFocused){B.currentTarget.contains(B.target)||t.setFocused(!1);return}if(B.currentTarget.contains(B.target)){if(t.setFocused(!0),t.focusedKey==null){var W,N;let k=U=>{U!=null&&(t.setFocusedKey(U),u&&!t.isSelected(U)&&t.replaceSelection(U))},V=B.relatedTarget;var T,O;V&&B.currentTarget.compareDocumentPosition(V)&Node.DOCUMENT_POSITION_FOLLOWING?k((T=t.lastSelectedKey)!==null&&T!==void 0?T:(W=e.getLastKey)===null||W===void 0?void 0:W.call(e)):k((O=t.firstSelectedKey)!==null&&O!==void 0?O:(N=e.getFirstKey)===null||N===void 0?void 0:N.call(e))}else!p&&m.current&&(m.current.scrollTop=x.current.top,m.current.scrollLeft=x.current.left);if(t.focusedKey!=null&&m.current){let k=Zn(r,t.focusedKey);k instanceof HTMLElement&&(!k.contains(document.activeElement)&&!f&&p1(k),Wn()==="keyboard"&&n8(k,{containingElement:r.current}))}}},M=B=>{B.currentTarget.contains(B.relatedTarget)||t.setFocused(!1)},w=c.useRef(!1);Tn(r,Fm,f?B=>{let{detail:W}=B;B.stopPropagation(),t.setFocused(!0),W?.focusStrategy==="first"&&(w.current=!0)}:void 0);let z=Re(()=>{var B,W;let N=(W=(B=e.getFirstKey)===null||B===void 0?void 0:B.call(e))!==null&&W!==void 0?W:null;if(N==null){let T=Xe();R8(r.current),X8(T,null),t.collection.size>0&&(w.current=!1)}else t.setFocusedKey(N),w.current=!1});Z9(()=>{w.current&&z()},[t.collection,z]);let A=Re(()=>{t.collection.size>0&&(w.current=!1)});Z9(()=>{A()},[t.focusedKey,A]),Tn(r,Am,f?B=>{var W;B.stopPropagation(),t.setFocused(!1),!((W=B.detail)===null||W===void 0)&&W.clearFocusKey&&t.setFocusedKey(null)}:void 0);const C=c.useRef(i),H=c.useRef(!1);c.useEffect(()=>{if(C.current){var B,W;let O=null;var N;i==="first"&&(O=(N=(B=e.getFirstKey)===null||B===void 0?void 0:B.call(e))!==null&&N!==void 0?N:null);var T;i==="last"&&(O=(T=(W=e.getLastKey)===null||W===void 0?void 0:W.call(e))!==null&&T!==void 0?T:null);let k=t.selectedKeys;if(k.size){for(let V of k)if(t.canSelectItem(V)){O=V;break}}t.setFocused(!0),t.setFocusedKey(O),O==null&&!f&&r.current&&f6(r.current),t.collection.size>0&&(C.current=!1,H.current=!0)}});let E=c.useRef(t.focusedKey),L=c.useRef(null);c.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==E.current||H.current)&&m.current&&r.current){let B=Wn(),W=Zn(r,t.focusedKey);if(!(W instanceof HTMLElement))return;(B==="keyboard"||H.current)&&(L.current&&cancelAnimationFrame(L.current),L.current=requestAnimationFrame(()=>{m.current&&(e8(m.current,W),B!=="virtual"&&n8(W,{containingElement:r.current}))}))}!f&&t.isFocused&&t.focusedKey==null&&E.current!=null&&r.current&&f6(r.current),E.current=t.focusedKey,H.current=!1}),c.useEffect(()=>()=>{L.current&&cancelAnimationFrame(L.current)},[]),Tn(r,"react-aria-focus-scope-restore",B=>{B.preventDefault(),t.setFocused(!0)});let F={onKeyDown:y,onFocus:g,onBlur:M,onMouseDown(B){m.current===B.target&&B.preventDefault()}},{typeSelectProps:$}=yy({keyboardDelegate:e,selectionManager:t});d||(F=De($,F));let X;f||(X=t.focusedKey==null?0:-1);let _=vy(t.collection);return{collectionProps:De(F,{tabIndex:X,"data-collection":_})}}function xy(n){let{id:t,selectionManager:e,key:r,ref:i,shouldSelectOnPressUp:o,shouldUseVirtualFocus:s,focus:a,isDisabled:l,onAction:u,allowsDifferentPressOrigin:d,linkBehavior:f="action"}=n,h=zn();t=I1(t);let p=N=>{if(N.pointerType==="keyboard"&&U5(N))e.toggleSelection(r);else{if(e.selectionMode==="none")return;if(e.isLink(r)){if(f==="selection"&&i.current){let T=e.getItemProps(r);h.open(i.current,N,T.href,T.routerOptions),e.setSelectedKeys(e.selectedKeys);return}else if(f==="override"||f==="none")return}e.selectionMode==="single"?e.isSelected(r)&&!e.disallowEmptySelection?e.toggleSelection(r):e.replaceSelection(r):N&&N.shiftKey?e.extendSelection(r):e.selectionBehavior==="toggle"||N&&(wt(N)||N.pointerType==="touch"||N.pointerType==="virtual")?e.toggleSelection(r):e.replaceSelection(r)}};c.useEffect(()=>{r===e.focusedKey&&e.isFocused&&(s?R8(i.current):a?a():document.activeElement!==i.current&&i.current&&f6(i.current))},[i,r,e.focusedKey,e.childFocusStrategy,e.isFocused,s]),l=l||e.isDisabled(r);let m={};!s&&!l?m={tabIndex:r===e.focusedKey?0:-1,onFocus(N){N.target===i.current&&e.setFocusedKey(r)}}:l&&(m.onMouseDown=N=>{N.preventDefault()});let v=e.isLink(r)&&f==="override",b=e.isLink(r)&&f!=="selection"&&f!=="none",I=!l&&e.canSelectItem(r)&&!v,y=(u||b)&&!l,x=y&&(e.selectionBehavior==="replace"?!I:!I||e.isEmpty),g=y&&I&&e.selectionBehavior==="replace",M=x||g,w=c.useRef(null),z=M&&I,A=c.useRef(!1),C=c.useRef(!1),H=e.getItemProps(r),E=N=>{u&&u(),b&&i.current&&h.open(i.current,N,H.href,H.routerOptions)},L={ref:i};if(o?(L.onPressStart=N=>{w.current=N.pointerType,A.current=z,N.pointerType==="keyboard"&&(!M||ac())&&p(N)},d?(L.onPressUp=x?void 0:N=>{N.pointerType==="mouse"&&I&&p(N)},L.onPress=x?E:N=>{N.pointerType!=="keyboard"&&N.pointerType!=="mouse"&&I&&p(N)}):L.onPress=N=>{if(x||g&&N.pointerType!=="mouse"){if(N.pointerType==="keyboard"&&!sc())return;E(N)}else N.pointerType!=="keyboard"&&I&&p(N)}):(L.onPressStart=N=>{w.current=N.pointerType,A.current=z,C.current=x,I&&(N.pointerType==="mouse"&&!x||N.pointerType==="keyboard"&&(!y||ac()))&&p(N)},L.onPress=N=>{(N.pointerType==="touch"||N.pointerType==="pen"||N.pointerType==="virtual"||N.pointerType==="keyboard"&&M&&sc()||N.pointerType==="mouse"&&C.current)&&(M?E(N):I&&p(N))}),m["data-collection"]=my(e.collection),m["data-key"]=r,L.preventFocusOnPress=s,s&&(L=De(L,{onPressStart(N){N.pointerType!=="touch"&&(e.setFocused(!0),e.setFocusedKey(r))},onPress(N){N.pointerType==="touch"&&(e.setFocused(!0),e.setFocusedKey(r))}})),H)for(let N of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])H[N]&&(L[N]=r5(L[N],H[N]));let{pressProps:F,isPressed:$}=Vn(L),X=g?N=>{w.current==="mouse"&&(N.stopPropagation(),N.preventDefault(),E(N))}:void 0,{longPressProps:_}=T8({isDisabled:!z,onLongPress(N){N.pointerType==="touch"&&(p(N),e.setSelectionBehavior("toggle"))}}),B=N=>{w.current==="touch"&&A.current&&N.preventDefault()},W=f!=="none"&&e.isLink(r)?N=>{nt.isOpening||N.preventDefault()}:void 0;return{itemProps:De(m,I||x||s&&!l?F:{},z?_:{},{onDoubleClick:X,onDragStartCapture:B,onClick:W,id:t},s?{onMouseDown:N=>N.preventDefault()}:void 0),isPressed:$,isSelected:e.isSelected(r),isFocused:e.isFocused&&e.focusedKey===r,isDisabled:l,allowsSelection:I,hasAction:M}}function sc(){let n=window.event;return n?.key==="Enter"}function ac(){let n=window.event;return n?.key===" "||n?.code==="Space"}class lc{getItemRect(t){let e=this.ref.current;if(!e)return null;let r=t!=null?Zn(this.ref,t):null;if(!r)return null;let i=e.getBoundingClientRect(),o=r.getBoundingClientRect();return{x:o.left-i.left+e.scrollLeft,y:o.top-i.top+e.scrollTop,width:o.width,height:o.height}}getContentSize(){let t=this.ref.current;var e,r;return{width:(e=t?.scrollWidth)!==null&&e!==void 0?e:0,height:(r=t?.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let t=this.ref.current;var e,r,i,o;return{x:(e=t?.scrollLeft)!==null&&e!==void 0?e:0,y:(r=t?.scrollTop)!==null&&r!==void 0?r:0,width:(i=t?.offsetWidth)!==null&&i!==void 0?i:0,height:(o=t?.offsetHeight)!==null&&o!==void 0?o:0}}constructor(t){this.ref=t}}class Iy{isDisabled(t){var e;return this.disabledBehavior==="all"&&(((e=t.props)===null||e===void 0?void 0:e.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,e){let r=t;for(;r!=null;){let i=this.collection.getItem(r);if(i?.type==="item"&&!this.isDisabled(i))return r;r=e(r)}return null}getNextKey(t){let e=t;return e=this.collection.getKeyAfter(e),this.findNextNonDisabled(e,r=>this.collection.getKeyAfter(r))}getPreviousKey(t){let e=t;return e=this.collection.getKeyBefore(e),this.findNextNonDisabled(e,r=>this.collection.getKeyBefore(r))}findKey(t,e,r){let i=t,o=this.layoutDelegate.getItemRect(i);if(!o||i==null)return null;let s=o;do{if(i=e(i),i==null)break;o=this.layoutDelegate.getItemRect(i)}while(o&&r(s,o)&&i!=null);return i}isSameRow(t,e){return t.y===e.y||t.x!==e.x}isSameColumn(t,e){return t.x===e.x||t.y!==e.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,e=>this.getNextKey(e),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,e=>this.getPreviousKey(e),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,e){return e?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let e=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[e]?(t=this.layoutDelegate[e](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[e](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let e=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[e]?(t=this.layoutDelegate[e](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[e](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,e=>this.collection.getKeyAfter(e))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,e=>this.collection.getKeyBefore(e))}getKeyPageAbove(t){let e=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(e&&!c5(e))return this.getFirstKey();let i=t;if(this.orientation==="horizontal"){let o=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(t){let e=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(e&&!c5(e))return this.getLastKey();let i=t;if(this.orientation==="horizontal"){let o=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(t,e){if(!this.collator)return null;let r=this.collection,i=e||this.getFirstKey();for(;i!=null;){let o=r.getItem(i);if(!o)return null;let s=o.textValue.slice(0,t.length);if(o.textValue&&this.collator.compare(s,t)===0)return i;i=this.getNextKey(i)}return null}constructor(...t){if(t.length===1){let e=t[0];this.collection=e.collection,this.ref=e.ref,this.collator=e.collator,this.disabledKeys=e.disabledKeys||new Set,this.disabledBehavior=e.disabledBehavior||"all",this.orientation=e.orientation||"vertical",this.direction=e.direction,this.layout=e.layout||"stack",this.layoutDelegate=e.layoutDelegate||new lc(e.ref)}else this.collection=t[0],this.disabledKeys=t[1],this.ref=t[2],this.collator=t[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new lc(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function Ey(n){let{selectionManager:t,collection:e,disabledKeys:r,ref:i,keyboardDelegate:o,layoutDelegate:s}=n,a=Gg({usage:"search",sensitivity:"base"}),l=t.disabledBehavior,u=c.useMemo(()=>o||new Iy({collection:e,disabledKeys:r,disabledBehavior:l,ref:i,collator:a,layoutDelegate:s}),[o,s,e,r,i,a,l]),{collectionProps:d}=My({...n,ref:i,selectionManager:t,keyboardDelegate:u});return{listProps:d}}class wy{build(t,e){return this.context=e,cc(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:e,items:r}=t;if(c.isValidElement(e)&&e.type===c.Fragment)yield*this.iterateCollection({children:e.props.children,items:r});else if(typeof e=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let o of r)yield*this.getFullNode({value:o,index:i},{renderer:e}),i++}else{let i=[];c.Children.forEach(e,s=>{s&&i.push(s)});let o=0;for(let s of i){let a=this.getFullNode({element:s,index:o},{});for(let l of a)o++,yield l}}}getKey(t,e,r,i){if(t.key!=null)return t.key;if(e.type==="cell"&&e.key!=null)return`${i}${e.key}`;let o=e.value;if(o!=null){var s;let a=(s=o.key)!==null&&s!==void 0?s:o.id;if(a==null)throw new Error("No key found for item");return a}return i?`${i}.${e.index}`:`$.${e.index}`}getChildState(t,e){return{renderer:e.renderer||t.renderer}}*getFullNode(t,e,r,i){if(c.isValidElement(t.element)&&t.element.type===c.Fragment){let b=[];c.Children.forEach(t.element.props.children,y=>{b.push(y)});var o;let I=(o=t.index)!==null&&o!==void 0?o:0;for(const y of b)yield*this.getFullNode({element:y,index:I++},e,r,i);return}let s=t.element;if(!s&&t.value&&e&&e.renderer){let b=this.cache.get(t.value);if(b&&(!b.shouldInvalidate||!b.shouldInvalidate(this.context))){b.index=t.index,b.parentKey=i?i.key:null,yield b;return}s=e.renderer(t.value)}if(c.isValidElement(s)){let b=s.type;if(typeof b!="function"&&typeof b.getCollectionNode!="function"){let g=s.type;throw new Error(`Unknown element <${g}> in collection.`)}let I=b.getCollectionNode(s.props,this.context);var a;let y=(a=t.index)!==null&&a!==void 0?a:0,x=I.next();for(;!x.done&&x.value;){let g=x.value;t.index=y;var l;let M=(l=g.key)!==null&&l!==void 0?l:null;M==null&&(M=g.element?null:this.getKey(s,t,e,r));let z=[...this.getFullNode({...g,key:M,index:y,wrapper:Sy(t.wrapper,g.wrapper)},this.getChildState(e,g),r?`${r}${s.key}`:s.key,i)];for(let A of z){var u,d;A.value=(d=(u=g.value)!==null&&u!==void 0?u:t.value)!==null&&d!==void 0?d:null,A.value&&this.cache.set(A.value,A);var f;if(t.type&&A.type!==t.type)throw new Error(`Unsupported type <${W5(A.type)}> in <${W5((f=i?.type)!==null&&f!==void 0?f:"unknown parent type")}>. Only <${W5(t.type)}> is supported.`);y++,yield A}x=I.next(z)}return}if(t.key==null||t.type==null)return;let h=this;var p,m;let v={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:(p=t.value)!==null&&p!==void 0?p:null,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:(m=t.textValue)!==null&&m!==void 0?m:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:cc(function*(){if(!t.hasChildNodes||!t.childNodes)return;let b=0;for(let I of t.childNodes()){I.key!=null&&(I.key=`${v.key}${I.key}`);let y=h.getFullNode({...I,index:b},h.getChildState(e,I),v.key,v);for(let x of y)b++,yield x}})};yield v}constructor(){this.cache=new WeakMap}}function cc(n){let t=[],e=null;return{*[Symbol.iterator](){for(let r of t)yield r;e||(e=n());for(let r of e)t.push(r),yield r}}}function Sy(n,t){if(n&&t)return e=>n(t(e));if(n)return n;if(t)return t}function W5(n){return n[0].toUpperCase()+n.slice(1)}function Cy(n,t,e){let r=c.useMemo(()=>new wy,[]),{children:i,items:o,collection:s}=n;return c.useMemo(()=>{if(s)return s;let l=r.build({children:i,items:o},e);return t(l)},[r,i,o,s,e,t])}function uc(n,t){return typeof t.getChildren=="function"?t.getChildren(n.key):n.childNodes}function Py(n){return ky(n)}function ky(n,t){for(let e of n)return e}function Y5(n,t,e){if(t.parentKey===e.parentKey)return t.index-e.index;let r=[...dc(n,t),t],i=[...dc(n,e),e],o=r.slice(0,i.length).findIndex((s,a)=>s!==i[a]);return o!==-1?(t=r[o],e=i[o],t.index-e.index):r.findIndex(s=>s===e)>=0?1:(i.findIndex(s=>s===t)>=0,-1)}function dc(n,t){let e=[],r=t;for(;r?.parentKey!=null;)r=n.getItem(r.parentKey),r&&e.unshift(r);return e}const fc=new WeakMap;function zy(n){let t=fc.get(n);if(t!=null)return t;let e=0,r=i=>{for(let o of i)o.type==="section"?r(uc(o,n)):o.type==="item"&&e++};return r(n),fc.set(n,e),e}var pc={};pc={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var hc={};hc={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var vc={};vc={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var mc={};mc={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var gc={};gc={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var yc={};yc={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var bc={};bc={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Mc={};Mc={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var xc={};xc={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Ic={};Ic={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Ec={};Ec={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var wc={};wc={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Sc={};Sc={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Cc={};Cc={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var Pc={};Pc={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var kc={};kc={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var zc={};zc={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var $c={};$c={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Tc={};Tc={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Dc={};Dc={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var Oc={};Oc={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var _c={};_c={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var Nc={};Nc={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Ac={};Ac={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var Fc={};Fc={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var Lc={};Lc={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var Kc={};Kc={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var Bc={};Bc={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var Hc={};Hc={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var Vc={};Vc={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var qc={};qc={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var jc={};jc={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var Uc={};Uc={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var Wc={};Wc={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var Yc={};Yc={"ar-AE":pc,"bg-BG":hc,"cs-CZ":vc,"da-DK":mc,"de-DE":gc,"el-GR":yc,"en-US":bc,"es-ES":Mc,"et-EE":xc,"fi-FI":Ic,"fr-FR":Ec,"he-IL":wc,"hr-HR":Sc,"hu-HU":Cc,"it-IT":Pc,"ja-JP":kc,"ko-KR":zc,"lt-LT":$c,"lv-LV":Tc,"nb-NO":Dc,"nl-NL":Oc,"pl-PL":_c,"pt-BR":Nc,"pt-PT":Ac,"ro-RO":Fc,"ru-RU":Lc,"sk-SK":Kc,"sl-SI":Bc,"sr-SP":Hc,"sv-SE":Vc,"tr-TR":qc,"uk-UA":jc,"zh-CN":Uc,"zh-TW":Wc};function $y(n){return n&&n.__esModule?n.default:n}function Ty(n,t,e){let{type:r="menu",isDisabled:i,trigger:o="press"}=n,s=I1(),{triggerProps:a,overlayProps:l}=hy({type:r},t,e),u=p=>{if(!i&&!(o==="longPress"&&!p.altKey)&&e&&e.current)switch(p.key){case"Enter":case" ":if(o==="longPress"||p.isDefaultPrevented())return;case"ArrowDown":"continuePropagation"in p||p.stopPropagation(),p.preventDefault(),t.toggle("first");break;case"ArrowUp":"continuePropagation"in p||p.stopPropagation(),p.preventDefault(),t.toggle("last");break;default:"continuePropagation"in p&&p.continuePropagation()}},d=qg($y(Yc),"@react-aria/menu"),{longPressProps:f}=T8({isDisabled:i||o!=="longPress",accessibilityDescription:d.format("longPressMessage"),onLongPressStart(){t.close()},onLongPress(){t.open("first")}}),h={preventFocusOnPress:!0,onPressStart(p){p.pointerType!=="touch"&&p.pointerType!=="keyboard"&&!i&&(p1(p.target),t.open(p.pointerType==="virtual"?"first":null))},onPress(p){p.pointerType==="touch"&&!i&&(p1(p.target),t.toggle())}};return delete a.onPress,{menuTriggerProps:{...a,...o==="press"?h:f,id:s,onKeyDown:u},menuProps:{...l,"aria-labelledby":s,autoFocus:t.focusStrategy||!0,onClose:t.close}}}const Gc=new WeakMap;function Dy(n,t,e){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:o,...s}=n;!n["aria-label"]&&!n["aria-labelledby"]&&process.env.NODE_ENV!=="production"&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let a=et(n,{labelable:!0}),{listProps:l}=Ey({...s,ref:e,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return Gc.set(t,{onClose:n.onClose,onAction:n.onAction,shouldUseVirtualFocus:n.shouldUseVirtualFocus}),{menuProps:De(a,{onKeyDown:i,onKeyUp:o},{role:"menu",...l,onKeyDown:u=>{var d;(u.key!=="Escape"||n.shouldUseVirtualFocus)&&((d=l.onKeyDown)===null||d===void 0||d.call(l,u))}})}}function Oy(n,t,e){let{id:r,key:i,closeOnSelect:o,isVirtualized:s,"aria-haspopup":a,onPressStart:l,onPressUp:u,onPress:d,onPressChange:f,onPressEnd:h,onClick:p,onHoverStart:m,onHoverChange:v,onHoverEnd:b,onKeyDown:I,onKeyUp:y,onFocus:x,onFocusChange:g,onBlur:M,selectionManager:w=t.selectionManager}=n,z=!!a,A=z&&n["aria-expanded"]==="true";var C;let H=(C=n.isDisabled)!==null&&C!==void 0?C:w.isDisabled(i);var E;let L=(E=n.isSelected)!==null&&E!==void 0?E:w.isSelected(i),F=Gc.get(t),$=t.collection.getItem(i),X=n.onClose||F.onClose,_=zn(),B=()=>{var ue;if(!z&&(!($==null||(ue=$.props)===null||ue===void 0)&&ue.onAction?$.props.onAction():n.onAction&&n.onAction(i),F.onAction)){let be=F.onAction;be(i)}},W="menuitem";z||(w.selectionMode==="single"?W="menuitemradio":w.selectionMode==="multiple"&&(W="menuitemcheckbox"));let N=n5(),T=n5(),O=n5(),k={id:r,"aria-disabled":H||void 0,role:W,"aria-label":n["aria-label"],"aria-labelledby":N,"aria-describedby":[T,O].filter(Boolean).join(" ")||void 0,"aria-controls":n["aria-controls"],"aria-haspopup":a,"aria-expanded":n["aria-expanded"]};w.selectionMode!=="none"&&!z&&(k["aria-checked"]=L),s&&(k["aria-posinset"]=$?.index,k["aria-setsize"]=zy(t.collection));let V=ue=>{ue.pointerType==="keyboard"&&!w.isLink(i)&&ue.target.click(),l?.(ue)},U=c.useRef(!1),R=ue=>{f?.(ue),U.current=ue},G=ue=>{ue.pointerType==="mouse"&&(U.current||ue.target.click()),ue.pointerType!=="keyboard"&&!z&&X&&(o??(w.selectionMode!=="multiple"||w.isLink(i)))&&X(),u?.(ue)},ee=ue=>{p?.(ue),B(),Cm(ue,_,$.props.href,$?.props.routerOptions)},{itemProps:Q,isFocused:D}=xy({id:r,selectionManager:w,key:i,ref:e,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:F.shouldUseVirtualFocus}),{pressProps:oe,isPressed:te}=Vn({onPressStart:V,onPress:d,onPressUp:G,onPressChange:R,onPressEnd:h,isDisabled:H}),{hoverProps:Y}=T5({isDisabled:H,onHoverStart(ue){!Un()&&!(A&&a)&&(w.setFocused(!0),w.setFocusedKey(i)),m?.(ue)},onHoverChange:v,onHoverEnd:b}),{keyboardProps:fe}=k5({onKeyDown:ue=>{if(ue.repeat){ue.continuePropagation();return}switch(ue.key){case" ":!H&&w.selectionMode==="none"&&!z&&o!==!1&&X&&X();break;case"Enter":!H&&o!==!1&&!z&&X&&X();break;default:z||ue.continuePropagation(),I?.(ue);break}},onKeyUp:y}),{focusProps:re}=P5({onBlur:M,onFocus:x,onFocusChange:g}),K=et($?.props);delete K.id;let he=Sm($?.props);return{menuItemProps:{...k,...De(K,he,z?{onFocus:Q.onFocus,"data-collection":Q["data-collection"],"data-key":Q["data-key"]}:Q,oe,Y,fe,re,F.shouldUseVirtualFocus||z?{onMouseDown:ue=>ue.preventDefault()}:void 0,H?void 0:{onClick:ee}),tabIndex:Q.tabIndex!=null&&A&&!F.shouldUseVirtualFocus?-1:Q.tabIndex},labelProps:{id:N},descriptionProps:{id:T},keyboardShortcutProps:{id:O},isFocused:D,isFocusVisible:D&&w.isFocused&&Un()&&!A,isSelected:L,isPressed:te,isDisabled:H}}function _y(n){let{heading:t,"aria-label":e}=n,r=I1();return{itemProps:{role:"presentation"},headingProps:t?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":e,"aria-labelledby":t?r:void 0}}}const Ny=c.createContext(null),Ay=c.createContext({}),Fy=Ym(function(t,e){[t,e]=v5(t,e,Ay),t=Ly(t);let r=t,{isPending:i}=r,{buttonProps:o,isPressed:s}=Rg(t,e),{focusProps:a,isFocused:l,isFocusVisible:u}=G8(t),{hoverProps:d,isHovered:f}=T5({...t,isDisabled:t.isDisabled||i}),h={isHovered:f,isPressed:(r.isPressed||s)&&!i,isFocused:l,isFocusVisible:u,isDisabled:t.isDisabled||!1,isPending:i??!1},p=Nn({...t,values:h,defaultClassName:"react-aria-Button"}),m=I1(o.id),v=I1(),b=o["aria-labelledby"];i&&(b?b=`${b} ${v}`:o["aria-label"]&&(b=`${m} ${v}`));let I=c.useRef(i);c.useEffect(()=>{let x={"aria-labelledby":b||m};(!I.current&&l&&i||I.current&&l&&!i)&&Q8(x,"assertive"),I.current=i},[i,l,b,m]);let y=et(t,{global:!0});return delete y.onClick,c.createElement("button",{...De(y,p,o,a,d),type:o.type==="submit"&&i?"button":o.type,id:m,ref:e,"aria-labelledby":b,slot:t.slot||void 0,"aria-disabled":i?"true":o["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":h.isPressed||void 0,"data-hovered":f||void 0,"data-focused":l||void 0,"data-pending":i||void 0,"data-focus-visible":u||void 0},c.createElement(Ny.Provider,{value:{id:v}},p.children))});function Ly(n){return n.isPending&&(n.onPress=void 0,n.onPressStart=void 0,n.onPressEnd=void 0,n.onPressChange=void 0,n.onPressUp=void 0,n.onKeyDown=void 0,n.onKeyUp=void 0,n.onClick=void 0,n.href=void 0),n}const Ky=c.createContext({});class E1 extends Set{constructor(t,e,r){super(t),t instanceof E1?(this.anchorKey=e??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=e??null,this.currentKey=r??null)}}function By(n,t){if(n.size!==t.size)return!1;for(let e of n)if(!t.has(e))return!1;return!0}function Rc(n){let{selectionMode:t="none",disallowEmptySelection:e=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=n,s=c.useRef(!1),[,a]=c.useState(!1),l=c.useRef(null),u=c.useRef(null),[,d]=c.useState(null),f=c.useMemo(()=>Xc(n.selectedKeys),[n.selectedKeys]),h=c.useMemo(()=>Xc(n.defaultSelectedKeys,new E1),[n.defaultSelectedKeys]),[p,m]=Dn(f,h,n.onSelectionChange),v=c.useMemo(()=>n.disabledKeys?new Set(n.disabledKeys):new Set,[n.disabledKeys]),[b,I]=c.useState(i);i==="replace"&&b==="toggle"&&typeof p=="object"&&p.size===0&&I("replace");let y=c.useRef(i);return c.useEffect(()=>{i!==y.current&&(I(i),y.current=i)},[i]),{selectionMode:t,disallowEmptySelection:e,selectionBehavior:b,setSelectionBehavior:I,get isFocused(){return s.current},setFocused(x){s.current=x,a(x)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(x,g="first"){l.current=x,u.current=g,d(x)},selectedKeys:p,setSelectedKeys(x){(r||!By(x,p))&&m(x)},disabledKeys:v,disabledBehavior:o}}function Xc(n,t){return n?n==="all"?"all":new E1(n):t}class er{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,e){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,e)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let e=this.getKey(t);return e==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(e):this.state.selectedKeys.has(e)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),e=this.state.selectedKeys;return this._isSelectAll=t.every(r=>e.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&Y5(this.collection,i,t)<0)&&(t=i)}var e;return(e=t?.key)!==null&&e!==void 0?e:null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&Y5(this.collection,i,t)>0)&&(t=i)}var e;return(e=t?.key)!==null&&e!==void 0?e:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let e=this.getKey(t);if(e==null)return;let r;if(this.state.selectedKeys==="all")r=new E1([e],e,e);else{let s=this.state.selectedKeys;var i;let a=(i=s.anchorKey)!==null&&i!==void 0?i:e;r=new E1(s,a,e);var o;for(let l of this.getKeyRange(a,(o=s.currentKey)!==null&&o!==void 0?o:e))r.delete(l);for(let l of this.getKeyRange(e,a))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(t,e){let r=this.collection.getItem(t),i=this.collection.getItem(e);return r&&i?Y5(this.collection,r,i)<=0?this.getKeyRangeInternal(t,e):this.getKeyRangeInternal(e,t):[]}getKeyRangeInternal(t,e){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,e);let i=[],o=t;for(;o!=null;){let s=this.collection.getItem(o);if(s&&(s.type==="item"||s.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===e)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(t){let e=this.collection.getItem(t);if(!e||e.type==="cell"&&this.allowsCellSelection)return t;for(;e&&e.type!=="item"&&e.parentKey!=null;)e=this.collection.getItem(e.parentKey);return!e||e.type!=="item"?null:e.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let e=this.getKey(t);if(e==null)return;let r=new E1(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(e)?r.delete(e):this.canSelectItem(e)&&(r.add(e),r.anchorKey=e,r.currentKey=e),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let e=this.getKey(t);if(e==null)return;let r=this.canSelectItem(e)?new E1([e],e,e):new E1;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let e=new E1;for(let r of t){let i=this.getKey(r);if(i!=null&&(e.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(e)}getSelectAllKeys(){let t=[],e=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let s=this.collection.getItem(r);s?.type==="item"&&t.push(r);var o;s?.hasChildNodes&&(this.allowsCellSelection||s.type!=="item")&&e((o=(i=Py(uc(s,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return e(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new E1)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,e){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||e&&(e.pointerType==="touch"||e.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let e=this.selectedKeys;if(t.size!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;for(let r of e)if(!t.has(r))return!1;return!0}canSelectItem(t){var e;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(e=r.props)===null||e===void 0)&&e.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var e,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(e=r.props)===null||e===void 0)&&e.isDisabled))}isLink(t){var e,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(e=r.props)===null||e===void 0)&&e.href)}getItemProps(t){var e;return(e=this.collection.getItem(t))===null||e===void 0?void 0:e.props}withCollection(t){return new er(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(t,e,r){this.collection=t,this.state=e;var i;this.allowsCellSelection=(i=r?.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=r?.layoutDelegate||null}}function Hy(n){let[t,e]=Dn(n.isOpen,n.defaultOpen||!1,n.onOpenChange);const r=c.useCallback(()=>{e(!0)},[e]),i=c.useCallback(()=>{e(!1)},[e]),o=c.useCallback(()=>{e(!t)},[e,t]);return{isOpen:t,setOpen:e,open:r,close:i,toggle:o}}function Jc(n){let t=Hy(n),[e,r]=c.useState(null),[i,o]=c.useState([]),s=()=>{o([]),t.close()};return{focusStrategy:e,...t,open(u=null){r(u),t.open()},toggle(u=null){r(u),t.toggle()},close(){s()},expandedKeysStack:i,openSubmenu:(u,d)=>{o(f=>d>f.length?f:[...f.slice(0,d),u])},closeSubmenu:(u,d)=>{o(f=>f[d]===u?f.slice(0,d):f)}}}class Vy{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let e=this.keyMap.get(t);var r;return e&&(r=e.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let e=this.keyMap.get(t);var r;return e&&(r=e.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var e;return(e=this.keyMap.get(t))!==null&&e!==void 0?e:null}at(t){const e=[...this.getKeys()];return this.getItem(e[t])}constructor(t,{expandedKeys:e}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,e=e||new Set;let r=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&(a.type==="section"||e.has(a.key)))for(let l of a.childNodes)r(l)};for(let a of t)r(a);let i=null,o=0;for(let[a,l]of this.keyMap)i?(i.nextKey=a,l.prevKey=i.key):(this.firstKey=a,l.prevKey=void 0),l.type==="item"&&(l.index=o++),i=l,i.nextKey=void 0;var s;this.lastKey=(s=i?.key)!==null&&s!==void 0?s:null}}function qy(n){let{onExpandedChange:t}=n,[e,r]=Dn(n.expandedKeys?new Set(n.expandedKeys):void 0,n.defaultExpandedKeys?new Set(n.defaultExpandedKeys):new Set,t),i=Rc(n),o=c.useMemo(()=>n.disabledKeys?new Set(n.disabledKeys):new Set,[n.disabledKeys]),s=Cy(n,c.useCallback(l=>new Vy(l,{expandedKeys:e}),[e]),null);return c.useEffect(()=>{i.focusedKey!=null&&!s.getItem(i.focusedKey)&&i.setFocusedKey(null)},[s,i.focusedKey]),{collection:s,expandedKeys:e,disabledKeys:o,toggleKey:l=>{r(jy(e,l))},setExpandedKeys:r,selectionManager:new er(s,i)}}function jy(n,t){let e=new Set(n);return e.has(t)?e.delete(t):e.add(t),e}const Qc=c.createContext(null),Uy=c.createContext(null),Wy={CollectionRoot({collection:n,renderDropIndicator:t}){return Zc(n,null,t)},CollectionBranch({collection:n,parent:t,renderDropIndicator:e}){return Zc(n,t,e)}};function Zc(n,t,e){return c8({items:t?n.getChildren(t.key):n,dependencies:[e],children(r){let i=r.render(r);return!e||r.type!=="item"?i:c.createElement(c.Fragment,null,e({type:"item",key:r.key,dropPosition:"before"}),i,Yy(n,r,e))}})}function Yy(n,t,e){let r=t.key,i=n.getKeyAfter(r),o=i!=null?n.getItem(i):null;for(;o!=null&&o.type!=="item";)i=n.getKeyAfter(o.key),o=i!=null?n.getItem(i):null;let s=t.nextKey!=null?n.getItem(t.nextKey):null;for(;s!=null&&s.type!=="item";)s=s.nextKey!=null?n.getItem(s.nextKey):null;let a=[];if(s==null){let l=t;for(;l&&(!o||l.parentKey!==o.parentKey&&o.level<l.level);){let u=e({type:"item",key:l.key,dropPosition:"after"});c.isValidElement(u)&&a.push(c.cloneElement(u,{key:`${l.key}-after`})),l=l.parentKey!=null?n.getItem(l.parentKey):null}}return a}const eu=c.createContext(Wy);function Gy(n){return c.useMemo(()=>n!=null?new Set([n]):null,[n])}const Ry=c.createContext({}),Xy=c.createContext({}),Jy=c.createContext(null),Qy=c.createContext({}),tu=c.createContext(null),G5=c.createContext(null),R5=c.createContext(null),tr=c.createContext(null);function nu(n){let t=Jc(n),e=c.useRef(null),{menuTriggerProps:r,menuProps:i}=Ty({...n,type:"menu"},t,e),[o,s]=c.useState(null),a=c.useCallback(()=>{e.current&&s(e.current.offsetWidth+"px")},[e]);$m({ref:e,onResize:a});let l=c.useRef(null);return c.createElement(_n,{values:[[tu,{...i,ref:l}],[rb,t],[R5,t],[Jy,{trigger:"MenuTrigger",triggerRef:e,scrollRef:l,placement:"bottom start",style:{"--trigger-width":o},"aria-labelledby":i["aria-labelledby"]}]]},c.createElement(pg,{...r,ref:e,isPressed:t.isOpen},n.children))}const Zy=c.createContext(null),ru=c.forwardRef(function(t,e){return[t,e]=v5(t,e,tu),c.createElement(Mg,{content:c.createElement(kg,t)},r=>c.createElement(eb,{props:t,collection:r,menuRef:e}))});function eb({props:n,collection:t,menuRef:e}){let{filter:r,collectionProps:i,collectionRef:o}=c.useContext(Qc)||{};e=$n(c.useMemo(()=>W9(e,o!==void 0?o:null),[o,e]));let s=c.useMemo(()=>r?t.UNSTABLE_filter(r):t,[t,r]),a=qy({...n,collection:s,children:void 0}),l=c.useContext(R5),{isVirtualized:u,CollectionRoot:d}=c.useContext(eu),{menuProps:f}=Dy({...n,...i,isVirtualized:u,onClose:n.onClose||l?.close},a,e),h=Nn({defaultClassName:"react-aria-Menu",className:n.className,style:n.style,values:{isEmpty:a.collection.size===0}}),p=null;a.collection.size===0&&n.renderEmptyState&&(p=c.createElement("div",{role:"menuitem",style:{display:"contents"}},n.renderEmptyState()));let m=et(n,{global:!0});return c.createElement(Xg,null,c.createElement("div",{...De(m,h,f),ref:e,slot:n.slot||void 0,"data-empty":a.collection.size===0||void 0,onScroll:n.onScroll},c.createElement(_n,{values:[[G5,a],[Xy,{elementType:"div"}],[Uy,{name:"MenuSection",render:nb}],[Zy,{parentMenuRef:e,shouldUseVirtualFocus:i?.shouldUseVirtualFocus}],[X5,null],[Qc,null],[tr,a.selectionManager],[R5,l??Jc({})]]},c.createElement(d,{collection:a.collection,persistedKeys:Gy(a.selectionManager.focusedKey),scrollRef:e})),p))}class tb extends er{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(t,e){return this.parent.setFocusedKey(t,e)}setFocused(t){this.parent.setFocused(t)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(t,e){super(t.collection,e),this.parent=t}}function nb(n,t,e,r="react-aria-MenuSection"){var i,o;let s=c.useContext(G5),{CollectionBranch:a}=c.useContext(eu),[l,u]=jm();var d;let{headingProps:f,groupProps:h}=_y({heading:u,"aria-label":(d=e.props["aria-label"])!==null&&d!==void 0?d:void 0}),p=Nn({defaultClassName:r,className:(i=e.props)===null||i===void 0?void 0:i.className,style:(o=e.props)===null||o===void 0?void 0:o.style,values:{}}),m=c.useContext(tr),v=Rc(n),b=n.selectionMode!=null?new tb(m,v):m,I=et(n,{global:!0});return delete I.id,c.createElement("section",{...De(I,p,h),ref:t},c.createElement(_n,{values:[[Ry,{...f,ref:l}],[tr,b]]},c.createElement(a,{collection:s.collection,parent:e})))}const X5=c.createContext(null),iu=Cg("item",function(t,e,r){var i;[t,e]=v5(t,e,X5);let o=(i=s8(X5))===null||i===void 0?void 0:i.id,s=c.useContext(G5),a=$n(e),l=c.useContext(tr),{menuItemProps:u,labelProps:d,descriptionProps:f,keyboardShortcutProps:h,...p}=Oy({...t,id:o,key:r.key,selectionManager:l},s,a),{hoverProps:m,isHovered:v}=T5({isDisabled:p.isDisabled}),b=Nn({...t,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...p,isHovered:v,isFocusVisible:p.isFocusVisible,selectionMode:l.selectionMode,selectionBehavior:l.selectionBehavior,hasSubmenu:!!t["aria-haspopup"],isOpen:t["aria-expanded"]==="true"}}),I=t.href?"a":"div",y=et(t,{global:!0});return delete y.id,delete y.onClick,c.createElement(I,{...De(y,b,u,m),ref:a,"data-disabled":p.isDisabled||void 0,"data-hovered":v||void 0,"data-focused":p.isFocused||void 0,"data-focus-visible":p.isFocusVisible||void 0,"data-pressed":p.isPressed||void 0,"data-selected":p.isSelected||void 0,"data-selection-mode":l.selectionMode==="none"?void 0:l.selectionMode,"data-has-submenu":!!t["aria-haspopup"]||void 0,"data-open":t["aria-expanded"]==="true"||void 0},c.createElement(_n,{values:[[Ky,{slots:{[o8]:d,label:d,description:f}}],[Qy,h]]},b.children))}),rb=c.createContext(null);O1.icons.map(n=>n.properties.name);const ou=n=>c.createElement(c.Fragment,null);ou.displayName="MenuButton.Item";function nr(){return nr=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)({}).hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},nr.apply(null,arguments)}function su({menuItems:n,testId:t,children:e}){const[r,i]=c.useState(!1),[o,s]=c.useState(!0),{handleMouseEvent:a,trigger:l,parentRef:u}=td({enabled:o}),{renderLayer:d,triggerProps:f,layerProps:h}=Wt({isOpen:r,auto:!0,onOutsideClick:()=>{i(!1),s(!0)},preferX:"right",preferY:"bottom",placement:"bottom-start",trigger:l,container:Qt});function p(y){y.preventDefault(),i(!0),s(!1)}function m(y){y.preventDefault(),y.key==="F12"&&y.ctrlKey&&(i(!0),s(!1))}const v=y=>{const x=n.find(g=>g.props.id===y);x?.props.onSelect&&x.props.onSelect(x.props.label,x.props.id),i(!1),s(!0)},b=({key:y})=>{y==="Escape"&&r&&(i(!1),s(!0))},I=y=>{u.current?.contains(y.target)||(i(!1),s(!0))};return c.useEffect(()=>(window.addEventListener("keyup",b),window.addEventListener("contextmenu",I),()=>{window.removeEventListener("keyup",b),window.removeEventListener("contextmenu",I)}),[b]),c.createElement(nu,{isOpen:!0,onOpenChange:y=>{y&&i(y)},"data-testid":t},c.createElement("div",nr({ref:u,role:"button",tabIndex:0,"aria-label":"Press Control + F12 to open the context menu",onContextMenu:p,onKeyDown:m,onMouseMove:a},f),e),r&&d(c.createElement("div",nr({className:"nds-context-menu-popover"},h),c.createElement(ru,{onAction:v,className:"nds-context-menu rounded--all elevation--high"},n.map((y,x)=>c.createElement(iu,{key:y.props.id,id:y.props.id,value:y.props.id,className:({isSelected:g,isFocused:M,isDisabled:w})=>ae(["nds-context-menu-item","padding--x--s padding--y--xs",{"nds-context-menu-item--highlighted":g||M,"nds-context-menu-item--disabled":w,"rounded--top":x===0,"rounded--bottom":x===n.length-1}])},c.createElement(de,{gapSize:"s"},y.props.startIcon&&c.createElement(de.Item,{shrink:!0},c.createElement("span",{className:`narmi-icon-${y.props.startIcon}`})),c.createElement(de.Item,null,y.props.label))))))))}su.Item=ou;function rr(){return rr=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)({}).hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},rr.apply(null,arguments)}const J5=()=>{},ib=({title:n,subtitle:t,statusText:e,isOpen:r,trigger:i="header",onOpen:o=J5,onClose:s=J5,isDisabled:a=!1,onDisabledClick:l=J5,renderTitle:u,hasError:d=!1,disableHover:f=!1,children:h,radiusSize:p="m",kind:m="default"})=>{const[v,b]=c.useState(!1),I=(z=!1,A)=>{if(z){l();return}else A==="open"?(o(),b(!0)):A==="close"&&(s(),b(!1))},y=()=>{b(!1),r?s():o()},x=c.createElement("div",{className:ae(["collapsible-card-trigger","alignChild--center--center",{"padding--left":i=="caret-start","padding--right--l":i=="caret-end"}])},c.createElement(un,{kind:"action",label:r?"Close":"Open",onClick:y,name:`chevron-${r?"up":"down"}`,textSize:"l",onKeyUp:({key:z})=>{z==="Enter"&&y()}})),g=c.createElement("div",{className:ae(["collapsible-card-titleBar",`rounded--top--${m==="ai"?"m":p}`])},c.createElement(l6,{isDisabled:a},typeof u=="function"?u(r):c.createElement(de,{alignItems:"center",gapSize:"s"},i==="caret-start"&&c.createElement(de.Item,{shrink:!0},x),c.createElement(de.Item,null,c.createElement("h4",{className:ae(["fontWeight--bold","fontSize--l","padding--top--l","fontFamily--body",{"padding--left--l":i!=="caret-start"}])},n),c.createElement("div",{className:ae([a?"subtitle--disabled":"subtitle","padding--bottom--l","margin--top--xxs",{"padding--left--l":i!=="caret-start"}])},t)),i==="caret-end"&&c.createElement(de.Item,{shrink:!0},x),e&&c.createElement(de.Item,{shrink:!0},c.createElement("div",{className:"collapsible-card--statusText padding--right--l fontSize--s alignChild--right--center"},c.createElement("span",null,e)))))),M=ae(["collapsible-card--content-card",`collapisble-card--${m}`,{"content-card--hasCaretTrigger":i.includes("caret"),"content-card--error":d,"content-card--disabled":a,"content-card--hover":i==="header"&&!f&&v,"collapsible-card--no-user-select":!f||i==="header","collapsible-card--customTitle":typeof u=="function"},r&&!a?void 0:"content-card--closed",`rounded--all--${p}`,"bgColor--white"]),w=i==="header"?{role:"button",tabIndex:0,onKeyUp:({key:z})=>{if(z==="Enter"){const A=r&&!a?"close":"open";I(A==="open"?a:!1,A)}},onClick:()=>{const z=r&&!a?"close":"open";I(z==="open"?a:!1,z)}}:{};return c.createElement("div",{className:M},r&&!a?c.createElement(c.Fragment,null,c.createElement("div",rr({className:`collapsible-card--title-expanded rounded--top--${p}`,"aria-expanded":"true",onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1)},w),g),c.createElement("div",{className:"padding--all--l"},h)):c.createElement("div",rr({"aria-expanded":"false"},w),g))},Q5=({children:n,value:t})=>c.createElement(c.Fragment,null,n||t);Q5.displayName="Combobox.Item",Q5.propTypes={value:q.string.isRequired,searchValue:q.string,children:q.oneOfType([q.node,q.arrayOf(q.node)])};const au=({text:n,kind:t="bold"})=>c.createElement("h5",{className:`nds-combobox-list-heading--${t}`},n);au.displayName="Combobox.Heading";const ir=({children:n})=>c.createElement(c.Fragment,null,n);ir.displayName="Combobox.Category",ir.propTypes={label:q.string.isRequired,children:q.oneOfType([q.node,q.arrayOf(q.node)])};const ob=()=>{},Z5=({onSelect:n=ob})=>c.createElement(c.Fragment,null);Z5.displayName="Combobox.Action",Z5.propTypes={onSelect:q.func.isRequired,label:q.string.isRequired};var e0=function(t){var e=[],r=null,i=function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];e=a,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,e)}))};return i.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},i};const lu=()=>c.useMemo(()=>typeof CSS>"u"||typeof CSS.supports!="function"?!1:[CSS.supports("anchor-name","--my-anchor"),CSS.supports("position-anchor","--my-anchor"),CSS.supports("position-area","bottom center"),CSS.supports("position-try-fallbacks","flip-block")].every(Boolean),[]),sb=({anchorRef:n,layerRef:t,matchWidth:e=!1,isOpen:r,setIsOpen:i})=>{const o=lu();return c.useLayoutEffect(()=>{if(o||!r)return;const s=n.current,a=t.current;if(!s||!a)return;const l=s.getBoundingClientRect(),u=a.getBoundingClientRect();if(l.width===0||u.width===0)return;const d=window.visualViewport?.height||window.innerHeight,f=window.visualViewport?.offsetTop||0,h=d-(l.bottom-f),p=l.top-f,m=u.height>h&&p>h;let v=l.left,b=m?l.top-u.height:l.bottom;const I=a.offsetParent;if(I&&I!==document.body){const M=I.getBoundingClientRect();v=l.left-M.left,b=b-M.top}a.style.setProperty("--js-dropdown-top",`${b}px`),a.style.setProperty("--js-dropdown-left",`${v}px`),a.style.setProperty("--js-dropdown-minWidth","max-content"),e&&a.style.setProperty("--js-dropdown-width",`${l.width}px`);const y=l.top,x=e0(()=>{Math.abs(s.getBoundingClientRect().top-y)>20&&i(!1)}),g=()=>i(!1);return window.addEventListener("scroll",x,!0),window.addEventListener("resize",g),window.visualViewport?.addEventListener("resize",g),()=>{x.cancel(),window.removeEventListener("scroll",x,!0),window.removeEventListener("resize",g),window.visualViewport?.removeEventListener("resize",g)}},[o,n,t,e,r,i]),{isAnchorPositionSupported:o,polyFillLayerStyles:o?{}:{position:"fixed",top:"var(--js-dropdown-top)",left:"var(--js-dropdown-left)",minWidth:"var(--js-dropdown-minWidth)",...e&&{width:"var(--js-dropdown-width)"}}}},or=({isOpen:n,setIsOpen:t,matchWidth:e=!0})=>{const r=c.useRef(null),i=c.useRef(null),o=c.useId().replaceAll(/:/g,"-"),s=c.useMemo(()=>`--nds-dropdown-anchor-${o}`,[o]),{isAnchorPositionSupported:a,polyFillLayerStyles:l}=sb({anchorRef:r,layerRef:i,matchWidth:e,isOpen:n,setIsOpen:t}),u=c.useMemo(()=>({ref:r,style:{anchorName:a?s:void 0}}),[r,a,s]),d=c.useMemo(()=>{const f={...a?{position:"absolute",positionAnchor:s,positionArea:"bottom start",positionTryFallbacks:"flip-block",width:"max-content",minWidth:e?"anchor-size(width)":void 0}:l,display:n?"block":"none",zIndex:4};return{ref:i,style:f}},[n,a,s,e,l,i]);return{anchorProps:u,layerProps:d}};function sr(){return sr=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)({}).hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},sr.apply(null,arguments)}const m6=c.forwardRef(({isOpen:n=!1,showOpenIndicator:t=!0,disabled:e=!1,labelText:r,labelProps:i,displayValue:o,errorText:s,hasError:a=!1,minWidth:l="auto",kind:u="default",testId:d,startContent:f=c.createElement(c.Fragment,null),endContent:h=c.createElement(c.Fragment,null),...p},m)=>c.createElement(c.Fragment,null,c.createElement("div",{className:`nds-dropdownTrigger nds-dropdownTrigger--${u}`,style:{minWidth:l}},c.createElement("button",sr({disabled:e,ref:m,"data-testid":d||"dropdownTriggerButton",className:ae(["nds-dropdownTrigger-button button--reset","padding--x--s rounded--all",{"nds-dropdownTrigger-button--hasValue":!!o,"nds-dropdownTrigger-button--hasError":!!s||a,"nds-dropdownTrigger-button--isActive":n,"nds-dropdownTrigger-button--disabled":e}]),"aria-expanded":n?"true":"false",type:"button"},p),f,r&&c.createElement("label",sr({className:"nds-dropdownTrigger-label"},i),r),o&&c.createElement("span",{className:"nds-dropdownTrigger-value"},o),h,t&&!e&&c.createElement("span",{role:"img","aria-label":n?"popup open":"popup closed",className:ae(["nds-dropdownTrigger-chevron fontSize--l fontColor--secondary",`narmi-icon-chevron-${n?"up":"down"}`])}))),s&&c.createElement(D1,{error:s})));m6.displayName="DropdownTrigger";const t0=({children:n})=>c.createElement(c.Fragment,null,n);t0.displayName="Select.Item",t0.propTypes={value:q.string.isRequired,searchValue:q.string,children:q.oneOfType([q.node,q.arrayOf(q.node)])};const n0=({children:n})=>c.createElement(c.Fragment,null,n);n0.displayName="Select.Action",n0.propTypes={onSelect:q.func.isRequired,children:q.oneOfType([q.node,q.arrayOf(q.node)])};const r0=({children:n})=>c.createElement(c.Fragment,null,n);r0.displayName="Select.Category",r0.propTypes={label:q.string,kind:q.oneOf(["heading","label"]),children:q.oneOfType([q.node,q.arrayOf(q.node)]),isFlat:q.bool};function zt(){return zt=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)({}).hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},zt.apply(null,arguments)}const ab=()=>{},B1=n=>{let t=!1;return n&&n.props&&(t="onSelect"in n.props),t},lb=n=>{let t="";return n&&!B1(n)&&(t=n.props.children),t},cu=(n,t)=>t.filter(r=>!B1(r)).filter(({props:r})=>r.value===n).pop()||"",uu=(n,t)=>{let e=0;return B1(n)?e=t.map(({props:r})=>r.onSelect).indexOf(n.props.onSelect):e=t.map(({props:r})=>r.value).indexOf(n.props.value),e},cb=(n,t,e)=>{if(n<0)return!1;const r=e[n].props.value;return t.map(o=>o.props.value).includes(r)},ub=(n,t)=>{if(!n||B1(n))return!1;const e=n.props.value;return t.map(i=>i.props.value).includes(e)},db=(n="",t)=>B1(t)?"":t.props.searchValue||t.props.value,ar=({id:n,label:t,children:e,onChange:r=ab,value:i,defaultValue:o,defaultOpen:s=!1,disabled:a=!1,getTypeaheadString:l=db,clearSelectionOnAction:u=!1,errorText:d,testId:f,maxMenuHeight:h="40vh"})=>{let p=[],m=[];const v=c.useMemo(()=>c.Children.toArray(e).filter(N=>!B1(N)),[e]),b=c.Children.toArray(e).filter(B1),[I,y]=c.useState("");v.some(({type:N})=>N.displayName==="Select.Category")?(p=[...v.flatMap(({props:N})=>c.Children.toArray(N.children)),...b],m=v.map(({props:N})=>({label:N.label,categoryChildren:c.Children.toArray(N.children),kind:N.kind,isFlat:N.isFlat}))):p=[...v,...b];const x={id:n||`nds-select-${t}`,items:p,disabled:a,initialSelectedItem:o&&cu(o,p),initialIsOpen:s,itemToString:N=>l(I,N),onSelectedItemChange:({selectedItem:N})=>{N&&!B1(N)&&r(N.props?N.props.value:"")},stateReducer:(N,T)=>{const{type:O,changes:k}=T,{selectedItem:V}=N,{selectedItem:U}=k;let R=k.isOpen;if(O===u1.stateChangeTypes.ToggleButtonKeyDownCharacter){const{inputValue:G}=k;y(G),R=!0}else y("");return B1(U)?(U.props.onSelect(),u&&r(""),{...k,selectedItem:u?null:V,isOpen:!1}):{...k,isOpen:R}}};i!==void 0&&(x.selectedItem=cu(i,p));const{isOpen:g,selectedItem:M,getToggleButtonProps:w,getLabelProps:z,getMenuProps:A,highlightedIndex:C,getItemProps:H,closeMenu:E}=u1(x),{anchorProps:L,layerProps:F}=or({isOpen:g,setIsOpen:N=>{N||E()}}),$=m.length>0,X=M!==null&&M.props,_=g&&p.length>0,B=(N,T)=>{const O=uu(N,T);return c.createElement("li",zt({key:`item-${O}`,className:ae(["nds-select-item","alignChild--left--center padding--x--s padding--y--xs",{"nds-select-item--highlighted":C===O,"rounded--top":O===0,"rounded--bottom":O===T.length-1,"nds-select-item--hasGutter":$}])},H({item:N,index:O})),c.createElement(de,{as:"span"},c.createElement(de.Item,{as:"span"},N),X&&M.props.value===N.props.value&&c.createElement(de.Item,{as:"span",shrink:!0},c.createElement("span",{className:"narmi-icon-check fontSize--l fontWeight--bold"}))))},W=N=>{let T={};return(cb(C,N,p)||ub(M,N))&&(T.open=!0),T};return c.createElement("div",{className:"nds-select","data-testid":f},c.createElement("div",L,c.createElement(m6,zt({isOpen:_,labelText:t,disabled:a,displayValue:lb(M)||I,labelProps:{...z()},hasError:!!d},w()))),c.createElement(D1,{error:d}),c.createElement("div",F,c.createElement("div",zt({className:ae(["nds-select-list","bgColor--white",{"nds-select-list--error":!!d}])},A(),{style:{maxHeight:h}}),_&&$&&m.map(({label:N,kind:T,categoryChildren:O,isFlat:k})=>k?c.createElement(c.Fragment,null,N&&c.createElement("h4",{id:`select-category-${N}`,className:ae(["fontFamily--default","padding--x--s padding--y--xs",{"select-category-title--label":T==="label","select-category-title--heading":T==="heading"}])},N),c.createElement("ul",{className:"list--reset","aria-labelledby":`select-category-${N}`},O.map(V=>B(V,p)))):c.createElement("details",zt({key:N,className:"nds-select-category"},W(O)),c.createElement("summary",{className:ae(["alignChild--left--center","padding--x--s",{"select-category-title--label":T==="label","select-category-title--heading":T==="heading"||!T}])},c.createElement("span",{id:`select-category-${N}`},N),c.createElement("span",{className:"nds-category-icon narmi-icon-chevron-down"}),c.createElement("span",{className:"nds-category-icon narmi-icon-chevron-up"})),c.createElement("ul",{className:"list--reset","aria-labelledby":`select-category-${N}`},O.map(V=>B(V,p))))),_&&$&&c.createElement("ul",{className:"list--reset"},b.map(N=>B(N,p))),_&&!$&&c.createElement("ul",{className:"list--reset"},v.map(N=>B(N,p)),b.map(N=>B(N,p))))))};ar.Item=t0,ar.Action=n0,ar.Category=r0;function $t(){return $t=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)({}).hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},$t.apply(null,arguments)}const du=()=>{};O1.icons.map(n=>n.properties.name);const g6=n=>{let t=!1;return n&&n.props&&(t="label"in n.props),t},i0=n=>{let t=!1;return n&&(t=g6(n)||"value"in n.props),t},fb=(n,t,e,r,i)=>{let o=!1;if(t>-1&&e.length>0){const s=e[t].props.value;o=r.map(l=>l.props.value).includes(s)}return typeof n=="string"&&n.length>0&&(o=!0),i&&(o=r.map(s=>s.props.value).includes(i.props.value)),o},pb=(n,t)=>t.map(r=>r.props.value).reduce((r,i)=>{const o=n.find(s=>i===s.props.value);return o&&r.push(o),r},[]),hb=(n,t)=>n.filter(e=>(e.props.searchValue||e.props.value).toLowerCase().startsWith(t)),vb=n=>c.createElement("span",{className:`fontSize--l fontColor--primary narmi-icon-${n?"chevron-up":"chevron-down"}`}),y6=({label:n,onChange:t=du,onInputChange:e=du,inputValue:r,filterItemsByInput:i=hb,children:o,disableFiltering:s=!1,clearSelectionOnAction:a=!1,errorText:l,icon:u,testId:d,renderEndContent:f=vb,maxMenuHeight:h="40vh"})=>{const p=c.useMemo(()=>c.Children.toArray(o),[o]),m=p.some(({type:O})=>O.displayName===ir.displayName);let v=[],b=p.length<1?[]:p.filter(({props:O})=>"value"in O||"text"in O);m?(b=p.flatMap(({props:O})=>c.Children.toArray(O.children)),v=p.map(({props:O})=>({label:O.label,categoryChildren:c.Children.toArray(O.children)}))):b=p;const[I,y]=c.useState(b),x=O=>O?.props?.searchValue||O?.props?.value||"",{isOpen:g,selectedItem:M,getInputProps:w,getMenuProps:z,getItemProps:A,highlightedIndex:C,inputValue:H,openMenu:E,closeMenu:L,reset:F}=n6({items:I,inputValue:r,itemToString:x,onInputValueChange:({inputValue:O})=>{if(O.length===0){y(b),F(),e("");return}if(!s){const k=b.filter(g6),V=i(b.filter(U=>!g6(U)&&i0(U)),O.toLowerCase());y([...V,...k])}e(O)},onSelectedItemChange:({selectedItem:O})=>{t(O?O.props.value:""),L()},stateReducer:(O,k)=>{const{changes:V}=k,{selectedItem:U}=O,{selectedItem:R}=V;return g6(R)?(R.props.onSelect(),{...V,selectedItem:a?null:U,inputValue:a?"":x(U),isOpen:!1}):V}}),{anchorProps:$,layerProps:X}=or({isOpen:g,setIsOpen:O=>{O||L()}});c.useEffect(()=>{(!H||H.length===0)&&b.length!==I.length&&y(b)},[b,H]);const _=!!M,B=(O,k)=>{const V=g6(O);let U=c.createElement("li",{key:`${O}-${k}`,className:"alignChild--left--center"},O);return i0(O)&&(U=c.createElement("li",$t({key:`${O}-${k}`,className:ae(["nds-combobox-item","alignChild--left--center padding--x--s",{"nds-combobox-action":V,"padding--y--xs":!m,"nds-combobox-item--highlighted":C===k,"rounded--top":k===0,"rounded--bottom":k===I.length-1}])},A({item:O,index:k})),V&&c.createElement(de,{as:"span",gapSize:"xxs"},c.createElement(de.Item,{as:"span",shrink:!0},c.createElement("span",{className:"narmi-icon-plus fontWeight--bold"})),c.createElement(de.Item,{as:"span"},c.createElement("span",{className:"fontWeight--semibold"},O.props.label))),!V&&c.createElement(de,{as:"span"},c.createElement(de.Item,{as:"span"},O),_&&M.props.value===O.props.value&&c.createElement(de.Item,{as:"span",shrink:!0},c.createElement("span",{className:"narmi-icon-check fontSize--l fontWeight--bold"}))))),U},W=({label:O,categoryChildren:k})=>{const V={},U=pb(I,k),R=U.length>0;return fb(H,C,I,k,M)&&(V.open=!0),R?c.createElement("details",$t({key:O,className:"nds-combobox-category",tabIndex:-1},V),c.createElement("summary",{className:"fontWeight--bold alignChild--left--center padding--x--s padding--y-xs",onFocus:G=>{G.target.blur()}},c.createElement("span",{id:`combobox-category-${O}`},O),c.createElement("span",{className:"nds-category-icon narmi-icon-chevron-down"}),c.createElement("span",{className:"nds-category-icon narmi-icon-chevron-up"})),c.createElement("ul",{className:"list--reset","aria-labelledby":`combobox-category-${O}`},U.map(G=>B(G,uu(G,I))))):null},N=()=>{g||(E(),_&&y(b.filter(i0)))},T=()=>{e(M?x(M):""),C!==-1&&L()};return b.length<1?c.createElement(_1,{error:l,label:n,startIcon:u,onChange:e,value:H}):c.createElement(c.Fragment,null,c.createElement("div",{className:ae(["nds-combobox",{"nds-combobox--active":g}]),"data-testid":d},c.createElement("div",$,c.createElement(_1,$t({error:l,renderError:!1,label:n,value:H,startIcon:u,endContent:f(g)},w({onBlur:T,onFocus:N,onClick:N}),{onClick:N}))),c.createElement(D1,{error:l,className:"margin--top--xs"}),c.createElement("div",X,c.createElement("ul",$t({className:ae(["nds-combobox-list","list--reset","bgColor--white",{"nds-combobox-list--error":!!l}])},z(),{style:{maxHeight:h}}),g&&(m?v.map(W):I.map(B))))))};y6.Item=Q5,y6.Heading=au,y6.Category=ir,y6.Action=Z5;var b6={exports:{}},mb=b6.exports,fu;function gb(){return fu||(fu=1,function(n,t){(function(e,r){r(t)})(mb,function(e){var r={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(i){var o=i%100;if(o>3&&o<21)return"th";switch(o%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1};e.default=r,e.english=r,Object.defineProperty(e,"__esModule",{value:!0})})}(b6,b6.exports)),b6.exports}var o0=gb(),s0=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Tt={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var t=new Date(n.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var e=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},M6={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var t=n%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},o1=function(n,t){return t===void 0&&(t=2),("000"+n).slice(t*-1)},m1=function(n){return n===!0?1:0};function pu(n,t){var e;return function(){var r=this,i=arguments;clearTimeout(e),e=setTimeout(function(){return n.apply(r,i)},t)}}var a0=function(n){return n instanceof Array?n:[n]};function t1(n,t,e){if(e===!0)return n.classList.add(t);n.classList.remove(t)}function Ie(n,t,e){var r=window.document.createElement(n);return t=t||"",e=e||"",r.className=t,e!==void 0&&(r.textContent=e),r}function lr(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function hu(n,t){if(t(n))return n;if(n.parentNode)return hu(n.parentNode,t)}function cr(n,t){var e=Ie("div","numInputWrapper"),r=Ie("input","numInput "+n),i=Ie("span","arrowUp"),o=Ie("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var s in t)r.setAttribute(s,t[s]);return e.appendChild(r),e.appendChild(i),e.appendChild(o),e}function a1(n){try{if(typeof n.composedPath=="function"){var t=n.composedPath();return t[0]}return n.target}catch{return n.target}}var l0=function(){},ur=function(n,t,e){return e.months[t?"shorthand":"longhand"][n]},yb={D:l0,F:function(n,t,e){n.setMonth(e.months.longhand.indexOf(t))},G:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},H:function(n,t){n.setHours(parseFloat(t))},J:function(n,t){n.setDate(parseFloat(t))},K:function(n,t,e){n.setHours(n.getHours()%12+12*m1(new RegExp(e.amPM[1],"i").test(t)))},M:function(n,t,e){n.setMonth(e.months.shorthand.indexOf(t))},S:function(n,t){n.setSeconds(parseFloat(t))},U:function(n,t){return new Date(parseFloat(t)*1e3)},W:function(n,t,e){var r=parseInt(t),i=new Date(n.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+e.firstDayOfWeek),i},Y:function(n,t){n.setFullYear(parseFloat(t))},Z:function(n,t){return new Date(t)},d:function(n,t){n.setDate(parseFloat(t))},h:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},i:function(n,t){n.setMinutes(parseFloat(t))},j:function(n,t){n.setDate(parseFloat(t))},l:l0,m:function(n,t){n.setMonth(parseFloat(t)-1)},n:function(n,t){n.setMonth(parseFloat(t)-1)},s:function(n,t){n.setSeconds(parseFloat(t))},u:function(n,t){return new Date(parseFloat(t))},w:l0,y:function(n,t){n.setFullYear(2e3+parseFloat(t))}},ct={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},x6={Z:function(n){return n.toISOString()},D:function(n,t,e){return t.weekdays.shorthand[x6.w(n,t,e)]},F:function(n,t,e){return ur(x6.n(n,t,e)-1,!1,t)},G:function(n,t,e){return o1(x6.h(n,t,e))},H:function(n){return o1(n.getHours())},J:function(n,t){return t.ordinal!==void 0?n.getDate()+t.ordinal(n.getDate()):n.getDate()},K:function(n,t){return t.amPM[m1(n.getHours()>11)]},M:function(n,t){return ur(n.getMonth(),!0,t)},S:function(n){return o1(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,t,e){return e.getWeek(n)},Y:function(n){return o1(n.getFullYear(),4)},d:function(n){return o1(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return o1(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,t){return t.weekdays.longhand[n.getDay()]},m:function(n){return o1(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},vu=function(n){var t=n.config,e=t===void 0?Tt:t,r=n.l10n,i=r===void 0?M6:r,o=n.isMobile,s=o===void 0?!1:o;return function(a,l,u){var d=u||i;return e.formatDate!==void 0&&!s?e.formatDate(a,l,d):l.split("").map(function(f,h,p){return x6[f]&&p[h-1]!=="\\"?x6[f](a,d,e):f!=="\\"?f:""}).join("")}},c0=function(n){var t=n.config,e=t===void 0?Tt:t,r=n.l10n,i=r===void 0?M6:r;return function(o,s,a,l){if(!(o!==0&&!o)){var u=l||i,d,f=o;if(o instanceof Date)d=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)d=new Date(o);else if(typeof o=="string"){var h=s||(e||Tt).dateFormat,p=String(o).trim();if(p==="today")d=new Date,a=!0;else if(e&&e.parseDate)d=e.parseDate(o,h);else if(/Z$/.test(p)||/GMT$/.test(p))d=new Date(o);else{for(var m=void 0,v=[],b=0,I=0,y="";b<h.length;b++){var x=h[b],g=x==="\\",M=h[b-1]==="\\"||g;if(ct[x]&&!M){y+=ct[x];var w=new RegExp(y).exec(o);w&&(m=!0)&&v[x!=="Y"?"push":"unshift"]({fn:yb[x],val:w[++I]})}else g||(y+=".")}d=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),v.forEach(function(z){var A=z.fn,C=z.val;return d=A(d,C,u)||d}),d=m?d:void 0}}if(!(d instanceof Date&&!isNaN(d.getTime()))){e.errorHandler(new Error("Invalid date provided: "+f));return}return a===!0&&d.setHours(0,0,0,0),d}}};function l1(n,t,e){return e===void 0&&(e=!0),e!==!1?new Date(n.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):n.getTime()-t.getTime()}var bb=function(n,t,e){return n>Math.min(t,e)&&n<Math.max(t,e)},u0=function(n,t,e){return n*3600+t*60+e},Mb=function(n){var t=Math.floor(n/3600),e=(n-t*3600)/60;return[t,e,n-t*3600-e*60]},xb={DAY:864e5};function d0(n){var t=n.defaultHour,e=n.defaultMinute,r=n.defaultSeconds;if(n.minDate!==void 0){var i=n.minDate.getHours(),o=n.minDate.getMinutes(),s=n.minDate.getSeconds();t<i&&(t=i),t===i&&e<o&&(e=o),t===i&&e===o&&r<s&&(r=n.minDate.getSeconds())}if(n.maxDate!==void 0){var a=n.maxDate.getHours(),l=n.maxDate.getMinutes();t=Math.min(t,a),t===a&&(e=Math.min(l,e)),t===a&&e===l&&(r=n.maxDate.getSeconds())}return{hours:t,minutes:e,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var r=function(a){a&&Object.keys(a).forEach(function(l){return n[l]=a[l]})},i=0,o=t;i<o.length;i++){var s=o[i];r(s)}return n});var Je=function(){return Je=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Je.apply(this,arguments)},mu=function(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;for(var r=Array(n),i=0,t=0;t<e;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},Ib=300;function Eb(n,t){var e={config:Je(Je({},Tt),Be.defaultConfig),l10n:M6};e.parseDate=c0({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=v,e._setHoursFromDate=h,e._positionCalendar=$e,e.changeMonth=O,e.changeYear=ee,e.clear=k,e.close=V,e.onMouseOver=Y,e._createElement=Ie,e.createDay=w,e.destroy=U,e.isEnabled=Q,e.jumpToDate=y,e.updateValue=S1,e.open=re,e.redraw=Ue,e.set=n1,e.setDate=We,e.toggle=kr;function r(){e.utils={getDaysInMonth:function(S,P){return S===void 0&&(S=e.currentMonth),P===void 0&&(P=e.currentYear),S===1&&(P%4===0&&P%100!==0||P%400===0)?29:e.l10n.daysInMonth[S]}}}function i(){e.element=e.input=n,e.isOpen=!1,he(),be(),Bt(),ft(),r(),e.isMobile||M(),I(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&h(e.config.noCalendar?e.latestSelectedDateObj:void 0),S1(!1)),a();var S=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&S&&$e(),_e("onReady")}function o(){var S;return((S=e.calendarContainer)===null||S===void 0?void 0:S.getRootNode()).activeElement||document.activeElement}function s(S){return S.bind(e)}function a(){var S=e.config;S.weekNumbers===!1&&S.showMonths===1||S.noCalendar!==!0&&window.requestAnimationFrame(function(){if(e.calendarContainer!==void 0&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),e.daysContainer!==void 0){var P=(e.days.offsetWidth+1)*S.showMonths;e.daysContainer.style.width=P+"px",e.calendarContainer.style.width=P+(e.weekWrapper!==void 0?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}})}function l(S){if(e.selectedDates.length===0){var P=e.config.minDate===void 0||l1(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),j=d0(e.config);P.setHours(j.hours,j.minutes,j.seconds,P.getMilliseconds()),e.selectedDates=[P],e.latestSelectedDateObj=P}S!==void 0&&S.type!=="blur"&&Z(S);var J=e._input.value;f(),S1(),e._input.value!==J&&e._debouncedChange()}function u(S,P){return S%12+12*m1(P===e.l10n.amPM[1])}function d(S){switch(S%24){case 0:case 12:return 12;default:return S%12}}function f(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var S=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,P=(parseInt(e.minuteElement.value,10)||0)%60,j=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(S=u(S,e.amPM.textContent));var J=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&l1(e.latestSelectedDateObj,e.config.minDate,!0)===0,ne=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&l1(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var se=u0(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),me=u0(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),le=u0(S,P,j);if(le>me&&le<se){var ge=Mb(se);S=ge[0],P=ge[1],j=ge[2]}}else{if(ne){var ie=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;S=Math.min(S,ie.getHours()),S===ie.getHours()&&(P=Math.min(P,ie.getMinutes())),P===ie.getMinutes()&&(j=Math.min(j,ie.getSeconds()))}if(J){var ve=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;S=Math.max(S,ve.getHours()),S===ve.getHours()&&P<ve.getMinutes()&&(P=ve.getMinutes()),P===ve.getMinutes()&&(j=Math.max(j,ve.getSeconds()))}}p(S,P,j)}}function h(S){var P=S||e.latestSelectedDateObj;P&&P instanceof Date&&p(P.getHours(),P.getMinutes(),P.getSeconds())}function p(S,P,j){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(S%24,P,j||0,0),!(!e.hourElement||!e.minuteElement||e.isMobile)&&(e.hourElement.value=o1(e.config.time_24hr?S:(12+S)%12+12*m1(S%12===0)),e.minuteElement.value=o1(P),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[m1(S>=12)]),e.secondElement!==void 0&&(e.secondElement.value=o1(j)))}function m(S){var P=a1(S),j=parseInt(P.value)+(S.delta||0);(j/1e3>1||S.key==="Enter"&&!/[^\d]/.test(j.toString()))&&ee(j)}function v(S,P,j,J){if(P instanceof Array)return P.forEach(function(ne){return v(S,ne,j,J)});if(S instanceof Array)return S.forEach(function(ne){return v(ne,P,j,J)});S.addEventListener(P,j,J),e._handlers.push({remove:function(){return S.removeEventListener(P,j,J)}})}function b(){_e("onChange")}function I(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(j){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+j+"]"),function(J){return v(J,"click",e[j])})}),e.isMobile){Pr();return}var S=pu(fe,50);if(e._debouncedChange=pu(b,Ib),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&v(e.daysContainer,"mouseover",function(j){e.config.mode==="range"&&Y(a1(j))}),v(e._input,"keydown",te),e.calendarContainer!==void 0&&v(e.calendarContainer,"keydown",te),!e.config.inline&&!e.config.static&&v(window,"resize",S),window.ontouchstart!==void 0?v(window.document,"touchstart",G):v(window.document,"mousedown",G),v(window.document,"focus",G,{capture:!0}),e.config.clickOpens===!0&&(v(e._input,"focus",e.open),v(e._input,"click",e.open)),e.daysContainer!==void 0&&(v(e.monthNav,"click",_0),v(e.monthNav,["keyup","increment"],m),v(e.daysContainer,"click",w1)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var P=function(j){return a1(j).select()};v(e.timeContainer,["increment"],l),v(e.timeContainer,"blur",l,{capture:!0}),v(e.timeContainer,"click",x),v([e.hourElement,e.minuteElement],["focus","click"],P),e.secondElement!==void 0&&v(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&v(e.amPM,"click",function(j){l(j)})}e.config.allowInput&&v(e._input,"blur",oe)}function y(S,P){var j=S!==void 0?e.parseDate(S):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),J=e.currentYear,ne=e.currentMonth;try{j!==void 0&&(e.currentYear=j.getFullYear(),e.currentMonth=j.getMonth())}catch(se){se.message="Invalid date supplied: "+j,e.config.errorHandler(se)}P&&e.currentYear!==J&&(_e("onYearChange"),F()),P&&(e.currentYear!==J||e.currentMonth!==ne)&&_e("onMonthChange"),e.redraw()}function x(S){var P=a1(S);~P.className.indexOf("arrow")&&g(S,P.classList.contains("arrowUp")?1:-1)}function g(S,P,j){var J=S&&a1(S),ne=j||J&&J.parentNode&&J.parentNode.firstChild,se=Ht("increment");se.delta=P,ne&&ne.dispatchEvent(se)}function M(){var S=window.document.createDocumentFragment();if(e.calendarContainer=Ie("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(S.appendChild(_()),e.innerContainer=Ie("div","flatpickr-innerContainer"),e.config.weekNumbers){var P=T(),j=P.weekWrapper,J=P.weekNumbers;e.innerContainer.appendChild(j),e.weekNumbers=J,e.weekWrapper=j}e.rContainer=Ie("div","flatpickr-rContainer"),e.rContainer.appendChild(W()),e.daysContainer||(e.daysContainer=Ie("div","flatpickr-days"),e.daysContainer.tabIndex=-1),L(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),S.appendChild(e.innerContainer)}e.config.enableTime&&S.appendChild(B()),t1(e.calendarContainer,"rangeMode",e.config.mode==="range"),t1(e.calendarContainer,"animate",e.config.animate===!0),t1(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(S);var ne=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!ne&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var se=Ie("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(se,e.element),se.appendChild(e.element),e.altInput&&se.appendChild(e.altInput),se.appendChild(e.calendarContainer)}!e.config.static&&!e.config.inline&&(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}function w(S,P,j,J){var ne=Q(P,!0),se=Ie("span",S,P.getDate().toString());return se.dateObj=P,se.$i=J,se.setAttribute("aria-label",e.formatDate(P,e.config.ariaDateFormat)),S.indexOf("hidden")===-1&&l1(P,e.now)===0&&(e.todayDateElem=se,se.classList.add("today"),se.setAttribute("aria-current","date")),ne?(se.tabIndex=-1,Vt(P)&&(se.classList.add("selected"),e.selectedDateElem=se,e.config.mode==="range"&&(t1(se,"startRange",e.selectedDates[0]&&l1(P,e.selectedDates[0],!0)===0),t1(se,"endRange",e.selectedDates[1]&&l1(P,e.selectedDates[1],!0)===0),S==="nextMonthDay"&&se.classList.add("inRange")))):se.classList.add("flatpickr-disabled"),e.config.mode==="range"&&O0(P)&&!Vt(P)&&se.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&S!=="prevMonthDay"&&J%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(P)+"</span>"),_e("onDayCreate",se),se}function z(S){S.focus(),e.config.mode==="range"&&Y(S)}function A(S){for(var P=S>0?0:e.config.showMonths-1,j=S>0?e.config.showMonths:-1,J=P;J!=j;J+=S)for(var ne=e.daysContainer.children[J],se=S>0?0:ne.children.length-1,me=S>0?ne.children.length:-1,le=se;le!=me;le+=S){var ge=ne.children[le];if(ge.className.indexOf("hidden")===-1&&Q(ge.dateObj))return ge}}function C(S,P){for(var j=S.className.indexOf("Month")===-1?S.dateObj.getMonth():e.currentMonth,J=P>0?e.config.showMonths:-1,ne=P>0?1:-1,se=j-e.currentMonth;se!=J;se+=ne)for(var me=e.daysContainer.children[se],le=j-e.currentMonth===se?S.$i+P:P<0?me.children.length-1:0,ge=me.children.length,ie=le;ie>=0&&ie<ge&&ie!=(P>0?ge:-1);ie+=ne){var ve=me.children[ie];if(ve.className.indexOf("hidden")===-1&&Q(ve.dateObj)&&Math.abs(S.$i-ie)>=Math.abs(P))return z(ve)}e.changeMonth(ne),H(A(ne),0)}function H(S,P){var j=o(),J=D(j||document.body),ne=S!==void 0?S:J?j:e.selectedDateElem!==void 0&&D(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&D(e.todayDateElem)?e.todayDateElem:A(P>0?1:-1);ne===void 0?e._input.focus():J?C(ne,P):z(ne)}function E(S,P){for(var j=(new Date(S,P,1).getDay()-e.l10n.firstDayOfWeek+7)%7,J=e.utils.getDaysInMonth((P-1+12)%12,S),ne=e.utils.getDaysInMonth(P,S),se=window.document.createDocumentFragment(),me=e.config.showMonths>1,le=me?"prevMonthDay hidden":"prevMonthDay",ge=me?"nextMonthDay hidden":"nextMonthDay",ie=J+1-j,ve=0;ie<=J;ie++,ve++)se.appendChild(w("flatpickr-day "+le,new Date(S,P-1,ie),ie,ve));for(ie=1;ie<=ne;ie++,ve++)se.appendChild(w("flatpickr-day",new Date(S,P,ie),ie,ve));for(var ye=ne+1;ye<=42-j&&(e.config.showMonths===1||ve%7!==0);ye++,ve++)se.appendChild(w("flatpickr-day "+ge,new Date(S,P+1,ye%ne),ye,ve));var T1=Ie("div","dayContainer");return T1.appendChild(se),T1}function L(){if(e.daysContainer!==void 0){lr(e.daysContainer),e.weekNumbers&&lr(e.weekNumbers);for(var S=document.createDocumentFragment(),P=0;P<e.config.showMonths;P++){var j=new Date(e.currentYear,e.currentMonth,1);j.setMonth(e.currentMonth+P),S.appendChild(E(j.getFullYear(),j.getMonth()))}e.daysContainer.appendChild(S),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&Y()}}function F(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var S=function(J){return e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&J<e.config.minDate.getMonth()?!1:!(e.config.maxDate!==void 0&&e.currentYear===e.config.maxDate.getFullYear()&&J>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var P=0;P<12;P++)if(S(P)){var j=Ie("option","flatpickr-monthDropdown-month");j.value=new Date(e.currentYear,P).getMonth().toString(),j.textContent=ur(P,e.config.shorthandCurrentMonth,e.l10n),j.tabIndex=-1,e.currentMonth===P&&(j.selected=!0),e.monthsDropdownContainer.appendChild(j)}}}function $(){var S=Ie("div","flatpickr-month"),P=window.document.createDocumentFragment(),j;e.config.showMonths>1||e.config.monthSelectorType==="static"?j=Ie("span","cur-month"):(e.monthsDropdownContainer=Ie("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),v(e.monthsDropdownContainer,"change",function(me){var le=a1(me),ge=parseInt(le.value,10);e.changeMonth(ge-e.currentMonth),_e("onMonthChange")}),F(),j=e.monthsDropdownContainer);var J=cr("cur-year",{tabindex:"-1"}),ne=J.getElementsByTagName("input")[0];ne.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&ne.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(ne.setAttribute("max",e.config.maxDate.getFullYear().toString()),ne.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var se=Ie("div","flatpickr-current-month");return se.appendChild(j),se.appendChild(J),P.appendChild(se),S.appendChild(P),{container:S,yearElement:ne,monthElement:j}}function X(){lr(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var S=e.config.showMonths;S--;){var P=$();e.yearElements.push(P.yearElement),e.monthElements.push(P.monthElement),e.monthNav.appendChild(P.container)}e.monthNav.appendChild(e.nextMonthNav)}function _(){return e.monthNav=Ie("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=Ie("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=Ie("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,X(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(S){e.__hidePrevMonthArrow!==S&&(t1(e.prevMonthNav,"flatpickr-disabled",S),e.__hidePrevMonthArrow=S)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(S){e.__hideNextMonthArrow!==S&&(t1(e.nextMonthNav,"flatpickr-disabled",S),e.__hideNextMonthArrow=S)}}),e.currentYearElement=e.yearElements[0],qt(),e.monthNav}function B(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var S=d0(e.config);e.timeContainer=Ie("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var P=Ie("span","flatpickr-time-separator",":"),j=cr("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=j.getElementsByTagName("input")[0];var J=cr("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=J.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=o1(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?S.hours:d(S.hours)),e.minuteElement.value=o1(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():S.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(j),e.timeContainer.appendChild(P),e.timeContainer.appendChild(J),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var ne=cr("flatpickr-second");e.secondElement=ne.getElementsByTagName("input")[0],e.secondElement.value=o1(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():S.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(Ie("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(ne)}return e.config.time_24hr||(e.amPM=Ie("span","flatpickr-am-pm",e.l10n.amPM[m1((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}function W(){e.weekdayContainer?lr(e.weekdayContainer):e.weekdayContainer=Ie("div","flatpickr-weekdays");for(var S=e.config.showMonths;S--;){var P=Ie("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(P)}return N(),e.weekdayContainer}function N(){if(e.weekdayContainer){var S=e.l10n.firstDayOfWeek,P=mu(e.l10n.weekdays.shorthand);S>0&&S<P.length&&(P=mu(P.splice(S,P.length),P.splice(0,S)));for(var j=e.config.showMonths;j--;)e.weekdayContainer.children[j].innerHTML=`
98
98
  <span class='flatpickr-weekday'>
99
99
  `+P.join("</span><span class='flatpickr-weekday'>")+`
100
100
  </span>