@protonradio/proton-ui 0.6.18-beta.2 → 0.6.18-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +12 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2162 -9862
- package/dist/index.es.js.map +1 -1
- package/dist/utils-C8gwYqRQ.js +2 -0
- package/dist/utils-C8gwYqRQ.js.map +1 -0
- package/dist/utils-D71ZKfny.mjs +114 -0
- package/dist/utils-D71ZKfny.mjs.map +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +1 -1
- package/package.json +2 -1
- package/dist/index-C_MMhG34.mjs +0 -1759
- package/dist/index-C_MMhG34.mjs.map +0 -1
- package/dist/index-DdgXcT07.js +0 -14
- package/dist/index-DdgXcT07.js.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),we=require("react-dom"),y=require("react-aria"),q=require("react-stately"),_=require("./utils-C8gwYqRQ.js"),Z=require("./constants.cjs.js"),ve=require("color2k"),k=require("./colors-BdogYmJi.js");var Ye={exports:{}},pe={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Ct;function Wn(){if(Ct)return pe;Ct=1;var t=i,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(u,d,p){var f,v={},h=null,m=null;p!==void 0&&(h=""+p),d.key!==void 0&&(h=""+d.key),d.ref!==void 0&&(m=d.ref);for(f in d)r.call(d,f)&&!s.hasOwnProperty(f)&&(v[f]=d[f]);if(u&&u.defaultProps)for(f in d=u.defaultProps,d)v[f]===void 0&&(v[f]=d[f]);return{$$typeof:e,type:u,key:h,ref:m,props:v,_owner:o.current}}return pe.Fragment=n,pe.jsx=l,pe.jsxs=l,pe}var he={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,21 +14,20 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var wt;function Kn(){return wt||(wt=1,process.env.NODE_ENV!=="production"&&function(){var t=i,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),x=Symbol.iterator,S="@@iterator";function $(a){if(a===null||typeof a!="object")return null;var b=x&&a[x]||a[S];return typeof b=="function"?b:null}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(a){{for(var b=arguments.length,g=new Array(b>1?b-1:0),E=1;E<b;E++)g[E-1]=arguments[E];M("error",a,g)}}function M(a,b,g){{var E=C.ReactDebugCurrentFrame,N=E.getStackAddendum();N!==""&&(b+="%s",g=g.concat([N]));var A=g.map(function(T){return String(T)});A.unshift("Warning: "+b),Function.prototype.apply.call(console[a],console,A)}}var P=!1,O=!1,j=!1,W=!1,F=!1,V;V=Symbol.for("react.module.reference");function Q(a){return!!(typeof a=="string"||typeof a=="function"||a===r||a===s||F||a===o||a===p||a===f||W||a===m||P||O||j||typeof a=="object"&&a!==null&&(a.$$typeof===h||a.$$typeof===v||a.$$typeof===l||a.$$typeof===u||a.$$typeof===d||a.$$typeof===V||a.getModuleId!==void 0))}function oe(a,b,g){var E=a.displayName;if(E)return E;var N=b.displayName||b.name||"";return N!==""?g+"("+N+")":g}function I(a){return a.displayName||"Context"}function B(a){if(a==null)return null;if(typeof a.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case p:return"Suspense";case f:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case u:var b=a;return I(b)+".Consumer";case l:var g=a;return I(g._context)+".Provider";case d:return oe(a,a.render,"ForwardRef");case v:var E=a.displayName||null;return E!==null?E:B(a.type)||"Memo";case h:{var N=a,A=N._payload,T=N._init;try{return B(T(A))}catch{return null}}}return null}var J=Object.assign,L=0,K,G,Y,re,se,lt,ct;function ut(){}ut.__reactDisabledLog=!0;function vn(){{if(L===0){K=console.log,G=console.info,Y=console.warn,re=console.error,se=console.group,lt=console.groupCollapsed,ct=console.groupEnd;var a={configurable:!0,enumerable:!0,value:ut,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}L++}}function mn(){{if(L--,L===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:J({},a,{value:K}),info:J({},a,{value:G}),warn:J({},a,{value:Y}),error:J({},a,{value:re}),group:J({},a,{value:se}),groupCollapsed:J({},a,{value:lt}),groupEnd:J({},a,{value:ct})})}L<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var je=C.ReactCurrentDispatcher,Ae;function ye(a,b,g){{if(Ae===void 0)try{throw Error()}catch(N){var E=N.stack.trim().match(/\n( *(at )?)/);Ae=E&&E[1]||""}return`
|
|
18
|
+
`+Ae+a}}var ke=!1,xe;{var bn=typeof WeakMap=="function"?WeakMap:Map;xe=new bn}function dt(a,b){if(!a||ke)return"";{var g=xe.get(a);if(g!==void 0)return g}var E;ke=!0;var N=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var A;A=je.current,je.current=null,vn();try{if(b){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(z){E=z}Reflect.construct(a,[],T)}else{try{T.call()}catch(z){E=z}a.call(T.prototype)}}else{try{throw Error()}catch(z){E=z}a()}}catch(z){if(z&&E&&typeof z.stack=="string"){for(var w=z.stack.split(`
|
|
19
|
+
`),U=E.stack.split(`
|
|
20
|
+
`),D=w.length-1,H=U.length-1;D>=1&&H>=0&&w[D]!==U[H];)H--;for(;D>=1&&H>=0;D--,H--)if(w[D]!==U[H]){if(D!==1||H!==1)do if(D--,H--,H<0||w[D]!==U[H]){var X=`
|
|
21
|
+
`+w[D].replace(" at new "," at ");return a.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",a.displayName)),typeof a=="function"&&xe.set(a,X),X}while(D>=1&&H>=0);break}}}finally{ke=!1,je.current=A,mn(),Error.prepareStackTrace=N}var le=a?a.displayName||a.name:"",ie=le?ye(le):"";return typeof a=="function"&&xe.set(a,ie),ie}function gn(a,b,g){return dt(a,!1)}function yn(a){var b=a.prototype;return!!(b&&b.isReactComponent)}function Se(a,b,g){if(a==null)return"";if(typeof a=="function")return dt(a,yn(a));if(typeof a=="string")return ye(a);switch(a){case p:return ye("Suspense");case f:return ye("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case d:return gn(a.render);case v:return Se(a.type,b,g);case h:{var E=a,N=E._payload,A=E._init;try{return Se(A(N),b,g)}catch{}}}return""}var de=Object.prototype.hasOwnProperty,ft={},pt=C.ReactDebugCurrentFrame;function _e(a){if(a){var b=a._owner,g=Se(a.type,a._source,b?b.type:null);pt.setExtraStackFrame(g)}else pt.setExtraStackFrame(null)}function xn(a,b,g,E,N){{var A=Function.call.bind(de);for(var T in a)if(A(a,T)){var w=void 0;try{if(typeof a[T]!="function"){var U=Error((E||"React class")+": "+g+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw U.name="Invariant Violation",U}w=a[T](b,T,E,g,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(D){w=D}w&&!(w instanceof Error)&&(_e(N),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",E||"React class",g,T,typeof w),_e(null)),w instanceof Error&&!(w.message in ft)&&(ft[w.message]=!0,_e(N),R("Failed %s type: %s",g,w.message),_e(null))}}}var Sn=Array.isArray;function Ie(a){return Sn(a)}function _n(a){{var b=typeof Symbol=="function"&&Symbol.toStringTag,g=b&&a[Symbol.toStringTag]||a.constructor.name||"Object";return g}}function $n(a){try{return ht(a),!1}catch{return!0}}function ht(a){return""+a}function vt(a){if($n(a))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",_n(a)),ht(a)}var fe=C.ReactCurrentOwner,En={key:!0,ref:!0,__self:!0,__source:!0},mt,bt,Oe;Oe={};function Cn(a){if(de.call(a,"ref")){var b=Object.getOwnPropertyDescriptor(a,"ref").get;if(b&&b.isReactWarning)return!1}return a.ref!==void 0}function wn(a){if(de.call(a,"key")){var b=Object.getOwnPropertyDescriptor(a,"key").get;if(b&&b.isReactWarning)return!1}return a.key!==void 0}function Rn(a,b){if(typeof a.ref=="string"&&fe.current&&b&&fe.current.stateNode!==b){var g=B(fe.current.type);Oe[g]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',B(fe.current.type),a.ref),Oe[g]=!0)}}function Pn(a,b){{var g=function(){mt||(mt=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",b))};g.isReactWarning=!0,Object.defineProperty(a,"key",{get:g,configurable:!0})}}function Tn(a,b){{var g=function(){bt||(bt=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",b))};g.isReactWarning=!0,Object.defineProperty(a,"ref",{get:g,configurable:!0})}}var Mn=function(a,b,g,E,N,A,T){var w={$$typeof:e,type:a,key:b,ref:g,props:T,_owner:A};return w._store={},Object.defineProperty(w._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(w,"_self",{configurable:!1,enumerable:!1,writable:!1,value:E}),Object.defineProperty(w,"_source",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.freeze&&(Object.freeze(w.props),Object.freeze(w)),w};function Nn(a,b,g,E,N){{var A,T={},w=null,U=null;g!==void 0&&(vt(g),w=""+g),wn(b)&&(vt(b.key),w=""+b.key),Cn(b)&&(U=b.ref,Rn(b,N));for(A in b)de.call(b,A)&&!En.hasOwnProperty(A)&&(T[A]=b[A]);if(a&&a.defaultProps){var D=a.defaultProps;for(A in D)T[A]===void 0&&(T[A]=D[A])}if(w||U){var H=typeof a=="function"?a.displayName||a.name||"Unknown":a;w&&Pn(T,H),U&&Tn(T,H)}return Mn(a,w,U,N,E,fe.current,T)}}var Le=C.ReactCurrentOwner,gt=C.ReactDebugCurrentFrame;function ae(a){if(a){var b=a._owner,g=Se(a.type,a._source,b?b.type:null);gt.setExtraStackFrame(g)}else gt.setExtraStackFrame(null)}var De;De=!1;function Be(a){return typeof a=="object"&&a!==null&&a.$$typeof===e}function yt(){{if(Le.current){var a=B(Le.current.type);if(a)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+a+"`."}return""}}function jn(a){return""}var xt={};function An(a){{var b=yt();if(!b){var g=typeof a=="string"?a:a.displayName||a.name;g&&(b=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+g+">.")}return b}}function St(a,b){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var g=An(b);if(xt[g])return;xt[g]=!0;var E="";a&&a._owner&&a._owner!==Le.current&&(E=" It was passed a child from "+B(a._owner.type)+"."),ae(a),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',g,E),ae(null)}}function _t(a,b){{if(typeof a!="object")return;if(Ie(a))for(var g=0;g<a.length;g++){var E=a[g];Be(E)&&St(E,b)}else if(Be(a))a._store&&(a._store.validated=!0);else if(a){var N=$(a);if(typeof N=="function"&&N!==a.entries)for(var A=N.call(a),T;!(T=A.next()).done;)Be(T.value)&&St(T.value,b)}}}function kn(a){{var b=a.type;if(b==null||typeof b=="string")return;var g;if(typeof b=="function")g=b.propTypes;else if(typeof b=="object"&&(b.$$typeof===d||b.$$typeof===v))g=b.propTypes;else return;if(g){var E=B(b);xn(g,a.props,"prop",E,a)}else if(b.PropTypes!==void 0&&!De){De=!0;var N=B(b);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",N||"Unknown")}typeof b.getDefaultProps=="function"&&!b.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function In(a){{for(var b=Object.keys(a.props),g=0;g<b.length;g++){var E=b[g];if(E!=="children"&&E!=="key"){ae(a),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",E),ae(null);break}}a.ref!==null&&(ae(a),R("Invalid attribute `ref` supplied to `React.Fragment`."),ae(null))}}var $t={};function Et(a,b,g,E,N,A){{var T=Q(a);if(!T){var w="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(w+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var U=jn();U?w+=U:w+=yt();var D;a===null?D="null":Ie(a)?D="array":a!==void 0&&a.$$typeof===e?(D="<"+(B(a.type)||"Unknown")+" />",w=" Did you accidentally export a JSX literal instead of a component?"):D=typeof a,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",D,w)}var H=Nn(a,b,g,N,A);if(H==null)return H;if(T){var X=b.children;if(X!==void 0)if(E)if(Ie(X)){for(var le=0;le<X.length;le++)_t(X[le],a);Object.freeze&&Object.freeze(X)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _t(X,a)}if(de.call(b,"key")){var ie=B(a),z=Object.keys(b).filter(function(Vn){return Vn!=="key"}),He=z.length>0?"{key: someKey, "+z.join(": ..., ")+": ...}":"{key: someKey}";if(!$t[ie+He]){var Hn=z.length>0?"{"+z.join(": ..., ")+": ...}":"{}";R(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,In,Je,bc,Je),al[Je+In]=!0}}return m===r?fc(re):dc(re),re}}function pc(m,K,F){return cl(m,K,F,!0)}function vc(m,K,F){return cl(m,K,F,!1)}var hc=vc,mc=pc;Dt.Fragment=r,Dt.jsx=hc,Dt.jsxs=mc}()),Dt}process.env.NODE_ENV==="production"?Qn.exports=$c():Qn.exports=yc();var g=Qn.exports;const G=typeof document<"u"?a.useLayoutEffect:()=>{};function te(t){const e=a.useRef(null);return G(()=>{e.current=t},[t]),a.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function xc(t){let[e,n]=a.useState(t),r=a.useRef(null),l=te(()=>{if(!r.current)return;let o=r.current.next();if(o.done){r.current=null;return}e===o.value?l():n(o.value)});G(()=>{r.current&&l()});let i=te(o=>{r.current=o(e),l()});return[e,i]}const tn={prefix:String(Math.round(Math.random()*1e10)),current:0},ii=a.createContext(tn),Ec=a.createContext(!1);let Cc=!!(typeof window<"u"&&window.document&&window.document.createElement),Fn=new WeakMap;function Sc(t=!1){let e=a.useContext(ii),n=a.useRef(null);if(n.current===null&&!t){var r,l;let i=(l=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||l===void 0||(r=l.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(i){let o=Fn.get(i);o==null?Fn.set(i,{id:e.current,state:i.memoizedState}):i.memoizedState!==o.state&&(e.current=o.id,Fn.delete(i))}n.current=++e.current}return n.current}function wc(t){let e=a.useContext(ii);e===tn&&!Cc&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Sc(!!t),r=e===tn&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function Pc(t){let e=a.useId(),[n]=a.useState(Xe()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${tn.prefix}`;return t||`${r}-${e}`}const Dc=typeof a.useId=="function"?Pc:wc;function kc(){return!1}function Tc(){return!0}function Ac(t){return()=>{}}function Xe(){return typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore(Ac,kc,Tc):a.useContext(Ec)}let Bc=!!(typeof window<"u"&&window.document&&window.document.createElement),Ve=new Map;function de(t){let[e,n]=a.useState(t),r=a.useRef(null),l=Dc(e),i=a.useCallback(o=>{r.current=o},[]);return Bc&&(Ve.has(l)&&!Ve.get(l).includes(i)?Ve.set(l,[...Ve.get(l),i]):Ve.set(l,[i])),G(()=>{let o=l;return()=>{Ve.delete(o)}},[l]),a.useEffect(()=>{let o=r.current;o&&(r.current=null,n(o))}),l}function Kc(t,e){if(t===e)return t;let n=Ve.get(t);if(n)return n.forEach(l=>l(e)),e;let r=Ve.get(e);return r?(r.forEach(l=>l(t)),t):e}function Ye(t=[]){let e=de(),[n,r]=xc(e),l=a.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return G(l,[e,l,...t]),n}function ke(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Z=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},ye=t=>t&&"window"in t&&t.window===t?t:Z(t).defaultView||window;function oi(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var l=t.length;for(e=0;e<l;e++)t[e]&&(n=oi(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Mc(){for(var t,e,n=0,r="",l=arguments.length;n<l;n++)(t=arguments[n])&&(e=oi(t))&&(r&&(r+=" "),r+=e);return r}function j(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let l in r){let i=e[l],o=r[l];typeof i=="function"&&typeof o=="function"&&l[0]==="o"&&l[1]==="n"&&l.charCodeAt(2)>=65&&l.charCodeAt(2)<=90?e[l]=ke(i,o):(l==="className"||l==="UNSAFE_className")&&typeof i=="string"&&typeof o=="string"?e[l]=Mc(i,o):l==="id"&&i&&o?e.id=Kc(i,o):e[l]=o!==void 0?o:i}}return e}function Rc(...t){return t.length===1&&t[0]?t[0]:e=>{for(let n of t)typeof n=="function"?n(e):n!=null&&(n.current=e)}}const Ic=new Set(["id"]),Fc=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Nc=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),_c=/^(data-.*)$/;function se(t,e={}){let{labelable:n,isLink:r,propNames:l}=e,i={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(Ic.has(o)||n&&Fc.has(o)||r&&Nc.has(o)||l!=null&&l.has(o)||_c.test(o))&&(i[o]=t[o]);return i}function Re(t){if(Lc())t.focus({preventScroll:!0});else{let e=Oc(t);t.focus(),zc(e)}}let Gt=null;function Lc(){if(Gt==null){Gt=!1;try{document.createElement("div").focus({get preventScroll(){return Gt=!0,!0}})}catch{}}return Gt}function Oc(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function zc(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function pn(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function Dr(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function _e(t){let e=null;return()=>(e==null&&(e=t()),e)}const qe=_e(function(){return Dr(/^Mac/i)}),jc=_e(function(){return Dr(/^iPhone/i)}),ui=_e(function(){return Dr(/^iPad/i)||qe()&&navigator.maxTouchPoints>1}),vn=_e(function(){return jc()||ui()}),Vc=_e(function(){return qe()||vn()}),kr=_e(function(){return pn(/AppleWebKit/i)&&!Hc()}),Hc=_e(function(){return pn(/Chrome/i)}),nn=_e(function(){return pn(/Android/i)}),Wc=_e(function(){return pn(/Firefox/i)}),Uc=a.createContext({isNative:!0,open:Yc,useHref:t=>t});function zt(){return a.useContext(Uc)}function nt(t,e,n=!0){var r,l;let{metaKey:i,ctrlKey:o,altKey:u,shiftKey:s}=e;Wc()&&(!((l=window.event)===null||l===void 0||(r=l.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(qe()?i=!0:o=!0);let c=kr()&&qe()&&!ui()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:o,altKey:u,shiftKey:s}):new MouseEvent("click",{metaKey:i,ctrlKey:o,altKey:u,shiftKey:s,bubbles:!0,cancelable:!0});nt.isOpening=n,Re(t),t.dispatchEvent(c),nt.isOpening=!1}nt.isOpening=!1;function Gc(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function Yc(t,e){Gc(t,n=>nt(n,e))}function qc(t){let e=zt();var n;const r=e.useHref((n=t.href)!==null&&n!==void 0?n:"");return{"data-href":t.href?r:void 0,"data-target":t.target,"data-rel":t.rel,"data-download":t.download,"data-ping":t.ping,"data-referrer-policy":t.referrerPolicy}}function si(t){let e=zt();var n;const r=e.useHref((n=t==null?void 0:t.href)!==null&&n!==void 0?n:"");return{href:t!=null&&t.href?r:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let mt=new Map,er=new Set;function pl(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let l=mt.get(r.target);l||(l=new Set,mt.set(r.target,l),r.target.addEventListener("transitioncancel",n,{once:!0})),l.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let l=mt.get(r.target);if(l&&(l.delete(r.propertyName),l.size===0&&(r.target.removeEventListener("transitioncancel",n),mt.delete(r.target)),mt.size===0)){for(let i of er)i();er.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?pl():document.addEventListener("DOMContentLoaded",pl));function ai(t){requestAnimationFrame(()=>{mt.size===0?t():er.add(t)})}function ci(){let t=a.useRef(new Map),e=a.useCallback((l,i,o,u)=>{let s=u!=null&&u.once?(...c)=>{t.current.delete(o),o(...c)}:o;t.current.set(o,{type:i,eventTarget:l,fn:s,options:u}),l.addEventListener(i,o,u)},[]),n=a.useCallback((l,i,o,u)=>{var s;let c=((s=t.current.get(o))===null||s===void 0?void 0:s.fn)||o;l.removeEventListener(i,c,u),t.current.delete(o)},[]),r=a.useCallback(()=>{t.current.forEach((l,i)=>{n(l.eventTarget,l.type,i,l.options)})},[n]);return a.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function di(t,e){let{id:n,"aria-label":r,"aria-labelledby":l}=t;return n=de(n),l&&r?l=[...new Set([n,...l.trim().split(/\s+/)])].join(" "):l&&(l=l.trim().split(/\s+/).join(" ")),!r&&!l&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":l}}function hn(t){const e=a.useRef(null);return a.useMemo(()=>({get current(){return e.current},set current(n){e.current=n,typeof t=="function"?t(n):t&&(t.current=n)}}),[t])}function fi(t,e){const n=a.useRef(!0),r=a.useRef(null);a.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),a.useEffect(()=>{n.current?n.current=!1:(!r.current||e.some((l,i)=>!Object.is(l,r[i])))&&t(),r.current=e},e)}function Xc(){return typeof window.ResizeObserver<"u"}function tr(t){const{ref:e,box:n,onResize:r}=t;a.useEffect(()=>{let l=e==null?void 0:e.current;if(l)if(Xc()){const i=new window.ResizeObserver(o=>{o.length&&r()});return i.observe(l,{box:n}),()=>{l&&i.unobserve(l)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,e,n])}function Tr(t,e){G(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function It(t,e){let n=window.getComputedStyle(t),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&e&&(r=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),r}function He(t,e){let n=t;for(It(n,e)&&(n=n.parentElement);n&&!It(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function Zc(t,e){const n=[];for(;t&&t!==document.documentElement;)It(t,e)&&n.push(t),t=t.parentElement;return n}let Jc=0;const Nn=new Map;function mn(t){let[e,n]=a.useState();return G(()=>{if(!t)return;let r=Nn.get(t);if(r)n(r.element.id);else{let l=`react-aria-description-${Jc++}`;n(l);let i=document.createElement("div");i.id=l,i.style.display="none",i.textContent=t,document.body.appendChild(i),r={refCount:0,element:i},Nn.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Nn.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function vl(t,e,n,r){let l=te(n),i=n==null;a.useEffect(()=>{if(i||!t.current)return;let o=t.current;return o.addEventListener(e,l,r),()=>{o.removeEventListener(e,l,r)}},[t,e,r,i,l])}function pi(t,e){let n=hl(t,e,"left"),r=hl(t,e,"top"),l=e.offsetWidth,i=e.offsetHeight,o=t.scrollLeft,u=t.scrollTop,{borderTopWidth:s,borderLeftWidth:c}=getComputedStyle(t),d=t.scrollLeft+parseInt(c,10),f=t.scrollTop+parseInt(s,10),p=d+t.clientWidth,v=f+t.clientHeight;n<=o?o=n-parseInt(c,10):n+l>p&&(o+=n+l-p),r<=f?u=r-parseInt(s,10):r+i>v&&(u+=r+i-v),t.scrollLeft=o,t.scrollTop=u}function hl(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let l=0;for(;e.offsetParent&&(l+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){l-=t[r];break}e=e.offsetParent}return l}function We(t,e){if(document.contains(t)){let o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow==="hidden"){let s=Zc(t);for(let c of s)pi(c,t)}else{var n;let{left:s,top:c}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:d,top:f}=t.getBoundingClientRect();if(Math.abs(s-d)>1||Math.abs(c-f)>1){var r,l,i;e==null||(l=e.containingElement)===null||l===void 0||(r=l.scrollIntoView)===null||r===void 0||r.call(l,{block:"center",inline:"center"}),(i=t.scrollIntoView)===null||i===void 0||i.call(t,{block:"nearest"})}}}}function nr(t){return t.mozInputSource===0&&t.isTrusted?!0:nn()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Qc(t){return!nn()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}function bn(t,e,n){let r=a.useRef(e),l=te(()=>{n&&n(r.current)});a.useEffect(()=>{var i;let o=t==null||(i=t.current)===null||i===void 0?void 0:i.form;return o==null||o.addEventListener("reset",l),()=>{o==null||o.removeEventListener("reset",l)}},[t,l])}function Ze(t,e,n){let[r,l]=a.useState(t||e),i=a.useRef(t!==void 0),o=t!==void 0;a.useEffect(()=>{let c=i.current;c!==o&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}.`),i.current=o},[o]);let u=o?t:r,s=a.useCallback((c,...d)=>{let f=(p,...v)=>{n&&(Object.is(u,p)||n(p,...v)),o||(u=p)};typeof c=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),l((v,...b)=>{let y=c(o?u:v,...b);return f(y,...d),o?v:y})):(o||l(c),f(c,...d))},[o,u,n]);return[u,s]}function rr(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}let gt="default",lr="",en=new WeakMap;function ml(t){if(vn()){if(gt==="default"){const e=Z(t);lr=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}gt="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(en.set(t,t.style.userSelect),t.style.userSelect="none")}function Yt(t){if(vn()){if(gt!=="disabled")return;gt="restoring",setTimeout(()=>{ai(()=>{if(gt==="restoring"){const e=Z(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=lr||""),lr="",gt="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&en.has(t)){let e=en.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),en.delete(t)}}const Ft=a.createContext({register:()=>{}});Ft.displayName="PressResponderContext";function ed(t,e){return e.get?e.get.call(t):e.value}function vi(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function td(t,e){var n=vi(t,e,"get");return ed(t,n)}function nd(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function rd(t,e,n){nd(t,e),e.set(t,n)}function ld(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function bl(t,e,n){var r=vi(t,e,"set");return ld(t,r,n),n}function id(t){let e=a.useContext(Ft);if(e){let{register:n,...r}=e;t=j(r,t),n()}return Tr(e,t.ref),t}var qt=new WeakMap;class Xt{continuePropagation(){bl(this,qt,!1)}get shouldStopPropagation(){return td(this,qt)}constructor(e,n,r,l){rd(this,qt,{writable:!0,value:void 0}),bl(this,qt,!0);var i;let o=(i=l==null?void 0:l.target)!==null&&i!==void 0?i:r.currentTarget;const u=o==null?void 0:o.getBoundingClientRect();let s,c=0,d,f=null;r.clientX!=null&&r.clientY!=null&&(d=r.clientX,f=r.clientY),u&&(d!=null&&f!=null?(s=d-u.left,c=f-u.top):(s=u.width/2,c=u.height/2)),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=s,this.y=c}}const gl=Symbol("linkClicked");function Fe(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:l,onPressUp:i,isDisabled:o,isPressed:u,preventFocusOnPress:s,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:f,...p}=id(t),[v,b]=a.useState(!1),y=a.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:$,removeAllGlobalListeners:C}=ci(),S=te((h,B)=>{let P=y.current;if(o||P.didFirePressStart)return!1;let A=!0;if(P.isTriggeringEvent=!0,r){let R=new Xt("pressstart",B,h);r(R),A=R.shouldStopPropagation}return n&&n(!0),P.isTriggeringEvent=!1,P.didFirePressStart=!0,b(!0),A}),x=te((h,B,P=!0)=>{let A=y.current;if(!A.didFirePressStart)return!1;A.ignoreClickAfterPress=!0,A.didFirePressStart=!1,A.isTriggeringEvent=!0;let R=!0;if(l){let E=new Xt("pressend",B,h);l(E),R=E.shouldStopPropagation}if(n&&n(!1),b(!1),e&&P&&!o){let E=new Xt("press",B,h);e(E),R&&(R=E.shouldStopPropagation)}return A.isTriggeringEvent=!1,R}),T=te((h,B)=>{let P=y.current;if(o)return!1;if(i){P.isTriggeringEvent=!0;let A=new Xt("pressup",B,h);return i(A),P.isTriggeringEvent=!1,A.shouldStopPropagation}return!0}),w=te(h=>{let B=y.current;B.isPressed&&B.target&&(B.isOverTarget&&B.pointerType!=null&&x(Ae(B.target,h),B.pointerType,!1),B.isPressed=!1,B.isOverTarget=!1,B.activePointerId=null,B.pointerType=null,C(),d||Yt(B.target))}),D=te(h=>{c&&w(h)}),I=a.useMemo(()=>{let h=y.current,B={onKeyDown(A){if(_n(A.nativeEvent,A.currentTarget)&&A.currentTarget.contains(A.target)){var R;yl(A.target,A.key)&&A.preventDefault();let E=!0;if(!h.isPressed&&!A.repeat){h.target=A.currentTarget,h.isPressed=!0,E=S(A,"keyboard");let N=A.currentTarget,k=O=>{_n(O,N)&&!O.repeat&&N.contains(O.target)&&h.target&&T(Ae(h.target,O),"keyboard")};$(Z(A.currentTarget),"keyup",ke(k,P),!0)}E&&A.stopPropagation(),A.metaKey&&qe()&&((R=h.metaKeyEvents)===null||R===void 0||R.set(A.key,A.nativeEvent))}else A.key==="Meta"&&(h.metaKeyEvents=new Map)},onClick(A){if(!(A&&!A.currentTarget.contains(A.target))&&A&&A.button===0&&!h.isTriggeringEvent&&!nt.isOpening){let R=!0;if(o&&A.preventDefault(),!h.ignoreClickAfterPress&&!h.ignoreEmulatedMouseEvents&&!h.isPressed&&(h.pointerType==="virtual"||nr(A.nativeEvent))){!o&&!s&&Re(A.currentTarget);let E=S(A,"virtual"),N=T(A,"virtual"),k=x(A,"virtual");R=E&&N&&k}h.ignoreEmulatedMouseEvents=!1,h.ignoreClickAfterPress=!1,R&&A.stopPropagation()}}},P=A=>{var R;if(h.isPressed&&h.target&&_n(A,h.target)){var E;yl(A.target,A.key)&&A.preventDefault();let k=A.target;x(Ae(h.target,A),"keyboard",h.target.contains(k)),C(),A.key!=="Enter"&&Ar(h.target)&&h.target.contains(k)&&!A[gl]&&(A[gl]=!0,nt(h.target,A,!1)),h.isPressed=!1,(E=h.metaKeyEvents)===null||E===void 0||E.delete(A.key)}else if(A.key==="Meta"&&(!((R=h.metaKeyEvents)===null||R===void 0)&&R.size)){var N;let k=h.metaKeyEvents;h.metaKeyEvents=void 0;for(let O of k.values())(N=h.target)===null||N===void 0||N.dispatchEvent(new KeyboardEvent("keyup",O))}};if(typeof PointerEvent<"u"){B.onPointerDown=k=>{if(k.button!==0||!k.currentTarget.contains(k.target))return;if(Qc(k.nativeEvent)){h.pointerType="virtual";return}Ln(k.currentTarget)&&k.preventDefault(),h.pointerType=k.pointerType;let O=!0;h.isPressed||(h.isPressed=!0,h.isOverTarget=!0,h.activePointerId=k.pointerId,h.target=k.currentTarget,!o&&!s&&Re(k.currentTarget),d||ml(h.target),O=S(k,h.pointerType),$(Z(k.currentTarget),"pointermove",A,!1),$(Z(k.currentTarget),"pointerup",R,!1),$(Z(k.currentTarget),"pointercancel",N,!1)),O&&k.stopPropagation()},B.onMouseDown=k=>{k.currentTarget.contains(k.target)&&k.button===0&&(Ln(k.currentTarget)&&k.preventDefault(),k.stopPropagation())},B.onPointerUp=k=>{!k.currentTarget.contains(k.target)||h.pointerType==="virtual"||k.button===0&&pt(k,k.currentTarget)&&T(k,h.pointerType||k.pointerType)};let A=k=>{k.pointerId===h.activePointerId&&(h.target&&pt(k,h.target)?!h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!0,S(Ae(h.target,k),h.pointerType)):h.target&&h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!1,x(Ae(h.target,k),h.pointerType,!1),D(k)))},R=k=>{k.pointerId===h.activePointerId&&h.isPressed&&k.button===0&&h.target&&(pt(k,h.target)&&h.pointerType!=null?x(Ae(h.target,k),h.pointerType):h.isOverTarget&&h.pointerType!=null&&x(Ae(h.target,k),h.pointerType,!1),h.isPressed=!1,h.isOverTarget=!1,h.activePointerId=null,h.pointerType=null,C(),d||Yt(h.target),"ontouchend"in h.target&&k.pointerType!=="mouse"&&$(h.target,"touchend",E,{once:!0}))},E=k=>{hi(k.currentTarget)&&k.preventDefault()},N=k=>{w(k)};B.onDragStart=k=>{k.currentTarget.contains(k.target)&&w(k)}}else{B.onMouseDown=E=>{if(E.button!==0||!E.currentTarget.contains(E.target))return;if(Ln(E.currentTarget)&&E.preventDefault(),h.ignoreEmulatedMouseEvents){E.stopPropagation();return}h.isPressed=!0,h.isOverTarget=!0,h.target=E.currentTarget,h.pointerType=nr(E.nativeEvent)?"virtual":"mouse",!o&&!s&&Re(E.currentTarget),S(E,h.pointerType)&&E.stopPropagation(),$(Z(E.currentTarget),"mouseup",A,!1)},B.onMouseEnter=E=>{if(!E.currentTarget.contains(E.target))return;let N=!0;h.isPressed&&!h.ignoreEmulatedMouseEvents&&h.pointerType!=null&&(h.isOverTarget=!0,N=S(E,h.pointerType)),N&&E.stopPropagation()},B.onMouseLeave=E=>{if(!E.currentTarget.contains(E.target))return;let N=!0;h.isPressed&&!h.ignoreEmulatedMouseEvents&&h.pointerType!=null&&(h.isOverTarget=!1,N=x(E,h.pointerType,!1),D(E)),N&&E.stopPropagation()},B.onMouseUp=E=>{E.currentTarget.contains(E.target)&&!h.ignoreEmulatedMouseEvents&&E.button===0&&T(E,h.pointerType||"mouse")};let A=E=>{if(E.button===0){if(h.isPressed=!1,C(),h.ignoreEmulatedMouseEvents){h.ignoreEmulatedMouseEvents=!1;return}h.target&&pt(E,h.target)&&h.pointerType!=null?x(Ae(h.target,E),h.pointerType):h.target&&h.isOverTarget&&h.pointerType!=null&&x(Ae(h.target,E),h.pointerType,!1),h.isOverTarget=!1}};B.onTouchStart=E=>{if(!E.currentTarget.contains(E.target))return;let N=od(E.nativeEvent);if(!N)return;h.activePointerId=N.identifier,h.ignoreEmulatedMouseEvents=!0,h.isOverTarget=!0,h.isPressed=!0,h.target=E.currentTarget,h.pointerType="touch",!o&&!s&&Re(E.currentTarget),d||ml(h.target),S(je(h.target,E),h.pointerType)&&E.stopPropagation(),$(ye(E.currentTarget),"scroll",R,!0)},B.onTouchMove=E=>{if(!E.currentTarget.contains(E.target))return;if(!h.isPressed){E.stopPropagation();return}let N=$l(E.nativeEvent,h.activePointerId),k=!0;N&&pt(N,E.currentTarget)?!h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!0,k=S(je(h.target,E),h.pointerType)):h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!1,k=x(je(h.target,E),h.pointerType,!1),D(je(h.target,E))),k&&E.stopPropagation()},B.onTouchEnd=E=>{if(!E.currentTarget.contains(E.target))return;if(!h.isPressed){E.stopPropagation();return}let N=$l(E.nativeEvent,h.activePointerId),k=!0;N&&pt(N,E.currentTarget)&&h.pointerType!=null?(T(je(h.target,E),h.pointerType),k=x(je(h.target,E),h.pointerType)):h.isOverTarget&&h.pointerType!=null&&(k=x(je(h.target,E),h.pointerType,!1)),k&&E.stopPropagation(),h.isPressed=!1,h.activePointerId=null,h.isOverTarget=!1,h.ignoreEmulatedMouseEvents=!0,h.target&&!d&&Yt(h.target),C()},B.onTouchCancel=E=>{E.currentTarget.contains(E.target)&&(E.stopPropagation(),h.isPressed&&w(je(h.target,E)))};let R=E=>{h.isPressed&&E.target.contains(h.target)&&w({currentTarget:h.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};B.onDragStart=E=>{E.currentTarget.contains(E.target)&&w(E)}}return B},[$,o,s,C,d,w,D,x,S,T]);return a.useEffect(()=>()=>{var h;d||Yt((h=y.current.target)!==null&&h!==void 0?h:void 0)},[d]),{isPressed:u||v,pressProps:j(p,I)}}function Ar(t){return t.tagName==="A"&&t.hasAttribute("href")}function _n(t,e){const{key:n,code:r}=t,l=e,i=l.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(l instanceof ye(l).HTMLInputElement&&!mi(l,n)||l instanceof ye(l).HTMLTextAreaElement||l.isContentEditable)&&!((i==="link"||!i&&Ar(l))&&n!=="Enter")}function od(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function $l(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const l=n[r];if(l.identifier===e)return l}return null}function je(t,e){let n=0,r=0;return e.targetTouches&&e.targetTouches.length===1&&(n=e.targetTouches[0].clientX,r=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function Ae(t,e){let n=e.clientX,r=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function ud(t){let e=0,n=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?n=t.height/2:t.radiusY!==void 0&&(n=t.radiusY),{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}function sd(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function pt(t,e){let n=e.getBoundingClientRect(),r=ud(t);return sd(n,r)}function Ln(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function hi(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!Ar(t)}function yl(t,e){return t instanceof HTMLInputElement?!mi(t,e):hi(t)}const ad=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function mi(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":ad.has(t.type)}const cd=a.forwardRef(({children:t,...e},n)=>{let r=a.useRef(!1),l=a.useContext(Ft);n=hn(n||(l==null?void 0:l.ref));let i=j(l||{},{...e,ref:n,register(){r.current=!0,l&&l.register()}});return Tr(l,n),a.useEffect(()=>{r.current||(console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."),r.current=!0)},[]),a.createElement(Ft.Provider,{value:i},t)});function dd({children:t}){let e=a.useMemo(()=>({register:()=>{}}),[]);return a.createElement(Ft.Provider,{value:e},t)}class fd{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}}function bi(t){let e=a.useRef({isFocused:!1,observer:null});G(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=te(r=>{t==null||t(r)});return a.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let l=r.target,i=o=>{e.current.isFocused=!1,l.disabled&&n(new fd("blur",o)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};l.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&l.disabled){var o;(o=e.current.observer)===null||o===void 0||o.disconnect();let u=l===document.activeElement?null:document.activeElement;l.dispatchEvent(new FocusEvent("blur",{relatedTarget:u})),l.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:u}))}}),e.current.observer.observe(l,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function gn(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:l}=t;const i=a.useCallback(s=>{if(s.target===s.currentTarget)return r&&r(s),l&&l(!1),!0},[r,l]),o=bi(i),u=a.useCallback(s=>{const c=Z(s.target);s.target===s.currentTarget&&c.activeElement===s.target&&(n&&n(s),l&&l(!0),o(s))},[l,n,o]);return{focusProps:{onFocus:!e&&(n||l||r)?u:void 0,onBlur:!e&&(r||l)?i:void 0}}}let Ne=null,Nt=new Set,Rt=new Map,rt=!1,ir=!1;const pd={Tab:!0,Escape:!0};function $n(t,e){for(let n of Nt)n(t,e)}function vd(t){return!(t.metaKey||!qe()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function rn(t){rt=!0,vd(t)&&(Ne="keyboard",$n("keyboard",t))}function $e(t){Ne="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(rt=!0,$n("pointer",t))}function gi(t){nr(t)&&(rt=!0,Ne="virtual")}function $i(t){t.target===window||t.target===document||(!rt&&!ir&&(Ne="virtual",$n("virtual",t)),rt=!1,ir=!1)}function yi(){rt=!1,ir=!0}function ln(t){if(typeof window>"u"||Rt.get(ye(t)))return;const e=ye(t),n=Z(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){rt=!0,r.apply(this,arguments)},n.addEventListener("keydown",rn,!0),n.addEventListener("keyup",rn,!0),n.addEventListener("click",gi,!0),e.addEventListener("focus",$i,!0),e.addEventListener("blur",yi,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",$e,!0),n.addEventListener("pointermove",$e,!0),n.addEventListener("pointerup",$e,!0)):(n.addEventListener("mousedown",$e,!0),n.addEventListener("mousemove",$e,!0),n.addEventListener("mouseup",$e,!0)),e.addEventListener("beforeunload",()=>{xi(t)},{once:!0}),Rt.set(e,{focus:r})}const xi=(t,e)=>{const n=ye(t),r=Z(t);e&&r.removeEventListener("DOMContentLoaded",e),Rt.has(n)&&(n.HTMLElement.prototype.focus=Rt.get(n).focus,r.removeEventListener("keydown",rn,!0),r.removeEventListener("keyup",rn,!0),r.removeEventListener("click",gi,!0),n.removeEventListener("focus",$i,!0),n.removeEventListener("blur",yi,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",$e,!0),r.removeEventListener("pointermove",$e,!0),r.removeEventListener("pointerup",$e,!0)):(r.removeEventListener("mousedown",$e,!0),r.removeEventListener("mousemove",$e,!0),r.removeEventListener("mouseup",$e,!0)),Rt.delete(n))};function hd(t){const e=Z(t);let n;return e.readyState!=="loading"?ln(t):(n=()=>{ln(t)},e.addEventListener("DOMContentLoaded",n)),()=>xi(t,n)}typeof document<"u"&&hd();function lt(){return Ne!=="pointer"}function on(){return Ne}function Ei(t){Ne=t,$n(t,null)}function Ci(){ln();let[t,e]=a.useState(Ne);return a.useEffect(()=>{let n=()=>{e(Ne)};return Nt.add(n),()=>{Nt.delete(n)}},[]),Xe()?null:t}const md=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function bd(t,e,n){var r;const l=typeof window<"u"?ye(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?ye(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window<"u"?ye(n==null?void 0:n.target).HTMLElement:HTMLElement,u=typeof window<"u"?ye(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return t=t||(n==null?void 0:n.target)instanceof l&&!md.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof i||(n==null?void 0:n.target)instanceof o&&(n==null?void 0:n.target.isContentEditable),!(t&&e==="keyboard"&&n instanceof u&&!pd[n.key])}function gd(t,e,n){ln(),a.useEffect(()=>{let r=(l,i)=>{bd(!!(n!=null&&n.isTextInput),l,i)&&t(lt())};return Nt.add(r),()=>{Nt.delete(r)}},e)}function jt(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:l}=t,i=a.useRef({isFocusWithin:!1}),o=a.useCallback(c=>{i.current.isFocusWithin&&!c.currentTarget.contains(c.relatedTarget)&&(i.current.isFocusWithin=!1,n&&n(c),l&&l(!1))},[n,l,i]),u=bi(o),s=a.useCallback(c=>{!i.current.isFocusWithin&&document.activeElement===c.target&&(r&&r(c),l&&l(!0),i.current.isFocusWithin=!0,u(c))},[r,l,u]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:s,onBlur:o}}}let un=!1,On=0;function or(){un=!0,setTimeout(()=>{un=!1},50)}function xl(t){t.pointerType==="touch"&&or()}function $d(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",xl):document.addEventListener("touchend",or),On++,()=>{On--,!(On>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",xl):document.removeEventListener("touchend",or))}}function xt(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:l}=t,[i,o]=a.useState(!1),u=a.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;a.useEffect($d,[]);let{hoverProps:s,triggerHoverEnd:c}=a.useMemo(()=>{let d=(v,b)=>{if(u.pointerType=b,l||b==="touch"||u.isHovered||!v.currentTarget.contains(v.target))return;u.isHovered=!0;let y=v.currentTarget;u.target=y,e&&e({type:"hoverstart",target:y,pointerType:b}),n&&n(!0),o(!0)},f=(v,b)=>{if(u.pointerType="",u.target=null,b==="touch"||!u.isHovered)return;u.isHovered=!1;let y=v.currentTarget;r&&r({type:"hoverend",target:y,pointerType:b}),n&&n(!1),o(!1)},p={};return typeof PointerEvent<"u"?(p.onPointerEnter=v=>{un&&v.pointerType==="mouse"||d(v,v.pointerType)},p.onPointerLeave=v=>{!l&&v.currentTarget.contains(v.target)&&f(v,v.pointerType)}):(p.onTouchStart=()=>{u.ignoreEmulatedMouseEvents=!0},p.onMouseEnter=v=>{!u.ignoreEmulatedMouseEvents&&!un&&d(v,"mouse"),u.ignoreEmulatedMouseEvents=!1},p.onMouseLeave=v=>{!l&&v.currentTarget.contains(v.target)&&f(v,"mouse")}),{hoverProps:p,triggerHoverEnd:f}},[e,n,r,l,u]);return a.useEffect(()=>{l&&c({currentTarget:u.target},u.pointerType)},[l]),{hoverProps:s,isHovered:i}}function Si(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:l}=t,i=a.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),o=te(s=>{n&&Zt(s,e)&&(l&&l(s),i.current.isPointerDown=!0)}),u=te(s=>{n&&n(s)});a.useEffect(()=>{let s=i.current;if(r)return;const c=e.current,d=Z(c);if(typeof PointerEvent<"u"){let f=p=>{s.isPointerDown&&Zt(p,e)&&u(p),s.isPointerDown=!1};return d.addEventListener("pointerdown",o,!0),d.addEventListener("pointerup",f,!0),()=>{d.removeEventListener("pointerdown",o,!0),d.removeEventListener("pointerup",f,!0)}}else{let f=v=>{s.ignoreEmulatedMouseEvents?s.ignoreEmulatedMouseEvents=!1:s.isPointerDown&&Zt(v,e)&&u(v),s.isPointerDown=!1},p=v=>{s.ignoreEmulatedMouseEvents=!0,s.isPointerDown&&Zt(v,e)&&u(v),s.isPointerDown=!1};return d.addEventListener("mousedown",o,!0),d.addEventListener("mouseup",f,!0),d.addEventListener("touchstart",o,!0),d.addEventListener("touchend",p,!0),()=>{d.removeEventListener("mousedown",o,!0),d.removeEventListener("mouseup",f,!0),d.removeEventListener("touchstart",o,!0),d.removeEventListener("touchend",p,!0)}}},[e,r,o,u])}function Zt(t,e){if(t.button>0)return!1;if(t.target){const n=t.target.ownerDocument;if(!n||!n.documentElement.contains(t.target)||t.target.closest("[data-react-aria-top-layer]"))return!1}return e.current&&!e.current.contains(t.target)}function El(t){if(!t)return;let e=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){e=!1}};t(r),e&&n.stopPropagation()}}function wi(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:El(t.onKeyDown),onKeyUp:El(t.onKeyUp)}}}const yd=500;function Pi(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:l,threshold:i=yd,accessibilityDescription:o}=t;const u=a.useRef(void 0);let{addGlobalListener:s,removeGlobalListener:c}=ci(),{pressProps:d}=Fe({isDisabled:e,onPressStart(p){if(p.continuePropagation(),(p.pointerType==="mouse"||p.pointerType==="touch")&&(n&&n({...p,type:"longpressstart"}),u.current=setTimeout(()=>{p.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),l&&l({...p,type:"longpress"}),u.current=void 0},i),p.pointerType==="touch")){let v=b=>{b.preventDefault()};s(p.target,"contextmenu",v,{once:!0}),s(window,"pointerup",()=>{setTimeout(()=>{c(p.target,"contextmenu",v)},30)},{once:!0})}},onPressEnd(p){u.current&&clearTimeout(u.current),r&&(p.pointerType==="mouse"||p.pointerType==="touch")&&r({...p,type:"longpressend"})}}),f=mn(l&&!e?o:void 0);return{longPressProps:j(d,f)}}function ce(t){const e=Z(t);if(on()==="virtual"){let n=e.activeElement;ai(()=>{e.activeElement===n&&t.isConnected&&Re(t)})}else Re(t)}function xd(t){const e=ye(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,l=n!=="none"&&r!=="hidden"&&r!=="collapse";if(l){const{getComputedStyle:i}=t.ownerDocument.defaultView;let{display:o,visibility:u}=i(t);l=o!=="none"&&u!=="hidden"&&u!=="collapse"}return l}function Ed(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function Di(t,e){return t.nodeName!=="#comment"&&xd(t)&&Ed(t,e)&&(!t.parentElement||Di(t.parentElement,t))}const Cl=a.createContext(null),ur="react-aria-focus-scope-restore";let X=null;function yn(t){let{children:e,contain:n,restoreFocus:r,autoFocus:l}=t,i=a.useRef(null),o=a.useRef(null),u=a.useRef([]),{parentNode:s}=a.useContext(Cl)||{},c=a.useMemo(()=>new ar({scopeRef:u}),[u]);G(()=>{let p=s||ie.root;if(ie.getTreeNode(p.scopeRef)&&X&&!an(X,p.scopeRef)){let v=ie.getTreeNode(X);v&&(p=v)}p.addChild(c),ie.addNode(c)},[c,s]),G(()=>{let p=ie.getTreeNode(u);p&&(p.contain=!!n)},[n]),G(()=>{var p;let v=(p=i.current)===null||p===void 0?void 0:p.nextSibling,b=[],y=$=>$.stopPropagation();for(;v&&v!==o.current;)b.push(v),v.addEventListener(ur,y),v=v.nextSibling;return u.current=b,()=>{for(let $ of b)$.removeEventListener(ur,y)}},[e]),Td(u,r,n),Pd(u,n),Bd(u,r,n),kd(u,l),a.useEffect(()=>{const p=Z(u.current?u.current[0]:void 0).activeElement;let v=null;if(ue(p,u.current)){for(let b of ie.traverse())b.scopeRef&&ue(p,b.scopeRef.current)&&(v=b);v===ie.getTreeNode(u)&&(X=v.scopeRef)}},[u]),G(()=>()=>{var p,v,b;let y=(b=(v=ie.getTreeNode(u))===null||v===void 0||(p=v.parent)===null||p===void 0?void 0:p.scopeRef)!==null&&b!==void 0?b:null;(u===X||an(u,X))&&(!y||ie.getTreeNode(y))&&(X=y),ie.removeTreeNode(u)},[u]);let d=a.useMemo(()=>Cd(u),[]),f=a.useMemo(()=>({focusManager:d,parentNode:c}),[c,d]);return a.createElement(Cl.Provider,{value:f},a.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),e,a.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:o}))}function Cd(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:l,wrap:i,accept:o}=e,u=r||Z(n[0]).activeElement,s=n[0].previousElementSibling,c=tt(n),d=ve(c,{tabbable:l,accept:o},n);d.currentNode=ue(u,n)?u:s;let f=d.nextNode();return!f&&i&&(d.currentNode=s,f=d.nextNode()),f&&Ie(f,!0),f},focusPrevious(e={}){let n=t.current,{from:r,tabbable:l,wrap:i,accept:o}=e,u=r||Z(n[0]).activeElement,s=n[n.length-1].nextElementSibling,c=tt(n),d=ve(c,{tabbable:l,accept:o},n);d.currentNode=ue(u,n)?u:s;let f=d.previousNode();return!f&&i&&(d.currentNode=s,f=d.previousNode()),f&&Ie(f,!0),f},focusFirst(e={}){let n=t.current,{tabbable:r,accept:l}=e,i=tt(n),o=ve(i,{tabbable:r,accept:l},n);o.currentNode=n[0].previousElementSibling;let u=o.nextNode();return u&&Ie(u,!0),u},focusLast(e={}){let n=t.current,{tabbable:r,accept:l}=e,i=tt(n),o=ve(i,{tabbable:r,accept:l},n);o.currentNode=n[n.length-1].nextElementSibling;let u=o.previousNode();return u&&Ie(u,!0),u}}}const Br=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],Sd=Br.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Br.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const wd=Br.join(':not([hidden]):not([tabindex="-1"]),');function tt(t){return t[0].parentElement}function Kt(t){let e=ie.getTreeNode(X);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function Pd(t,e){let n=a.useRef(void 0),r=a.useRef(void 0);G(()=>{let l=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const i=Z(l?l[0]:void 0);let o=c=>{if(c.key!=="Tab"||c.altKey||c.ctrlKey||c.metaKey||!Kt(t)||c.isComposing)return;let d=i.activeElement,f=t.current;if(!f||!ue(d,f))return;let p=tt(f),v=ve(p,{tabbable:!0},f);if(!d)return;v.currentNode=d;let b=c.shiftKey?v.previousNode():v.nextNode();b||(v.currentNode=c.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,b=c.shiftKey?v.previousNode():v.nextNode()),c.preventDefault(),b&&Ie(b,!0)},u=c=>{(!X||an(X,t))&&ue(c.target,t.current)?(X=t,n.current=c.target):Kt(t)&&!sn(c.target,t)?n.current?n.current.focus():X&&X.current&&sr(X.current):Kt(t)&&(n.current=c.target)},s=c=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{if(i.activeElement&&Kt(t)&&!sn(i.activeElement,t))if(X=t,i.body.contains(c.target)){var d;n.current=c.target,(d=n.current)===null||d===void 0||d.focus()}else X.current&&sr(X.current)})};return i.addEventListener("keydown",o,!1),i.addEventListener("focusin",u,!1),l==null||l.forEach(c=>c.addEventListener("focusin",u,!1)),l==null||l.forEach(c=>c.addEventListener("focusout",s,!1)),()=>{i.removeEventListener("keydown",o,!1),i.removeEventListener("focusin",u,!1),l==null||l.forEach(c=>c.removeEventListener("focusin",u,!1)),l==null||l.forEach(c=>c.removeEventListener("focusout",s,!1))}},[t,e]),G(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function ki(t){return sn(t)}function ue(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function sn(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of ie.traverse(ie.getTreeNode(e)))if(n&&ue(t,n.current))return!0;return!1}function Dd(t){return sn(t,X)}function an(t,e){var n;let r=(n=ie.getTreeNode(e))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===t)return!0;r=r.parent}return!1}function Ie(t,e=!1){if(t!=null&&!e)try{ce(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function Ti(t,e=!0){let n=t[0].previousElementSibling,r=tt(t),l=ve(r,{tabbable:e},t);l.currentNode=n;let i=l.nextNode();return e&&!i&&(r=tt(t),l=ve(r,{tabbable:!1},t),l.currentNode=n,i=l.nextNode()),i}function sr(t,e=!0){Ie(Ti(t,e))}function kd(t,e){const n=a.useRef(e);a.useEffect(()=>{if(n.current){X=t;const r=Z(t.current?t.current[0]:void 0);!ue(r.activeElement,X.current)&&t.current&&sr(t.current)}n.current=!1},[t])}function Td(t,e,n){G(()=>{if(e||n)return;let r=t.current;const l=Z(r?r[0]:void 0);let i=o=>{let u=o.target;ue(u,t.current)?X=t:ki(u)||(X=null)};return l.addEventListener("focusin",i,!1),r==null||r.forEach(o=>o.addEventListener("focusin",i,!1)),()=>{l.removeEventListener("focusin",i,!1),r==null||r.forEach(o=>o.removeEventListener("focusin",i,!1))}},[t,e,n])}function Ad(t){let e=ie.getTreeNode(X);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function Bd(t,e,n){const r=a.useRef(typeof document<"u"?Z(t.current?t.current[0]:void 0).activeElement:null);G(()=>{let l=t.current;const i=Z(l?l[0]:void 0);if(!e||n)return;let o=()=>{(!X||an(X,t))&&ue(i.activeElement,t.current)&&(X=t)};return i.addEventListener("focusin",o,!1),l==null||l.forEach(u=>u.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),l==null||l.forEach(u=>u.removeEventListener("focusin",o,!1))}},[t,n]),G(()=>{const l=Z(t.current?t.current[0]:void 0);if(!e)return;let i=o=>{if(o.key!=="Tab"||o.altKey||o.ctrlKey||o.metaKey||!Kt(t)||o.isComposing)return;let u=l.activeElement;if(!ue(u,t.current))return;let s=ie.getTreeNode(t);if(!s)return;let c=s.nodeToRestore,d=ve(l.body,{tabbable:!0});d.currentNode=u;let f=o.shiftKey?d.previousNode():d.nextNode();if((!c||!l.body.contains(c)||c===l.body)&&(c=void 0,s.nodeToRestore=void 0),(!f||!ue(f,t.current))&&c){d.currentNode=c;do f=o.shiftKey?d.previousNode():d.nextNode();while(ue(f,t.current));o.preventDefault(),o.stopPropagation(),f?Ie(f,!0):ki(c)?Ie(c,!0):u.blur()}};return n||l.addEventListener("keydown",i,!0),()=>{n||l.removeEventListener("keydown",i,!0)}},[t,e,n]),G(()=>{const l=Z(t.current?t.current[0]:void 0);if(!e)return;let i=ie.getTreeNode(t);if(i){var o;return i.nodeToRestore=(o=r.current)!==null&&o!==void 0?o:void 0,()=>{let u=ie.getTreeNode(t);if(!u)return;let s=u.nodeToRestore;if(e&&s&&(ue(l.activeElement,t.current)||l.activeElement===l.body&&Ad(t))){let c=ie.clone();requestAnimationFrame(()=>{if(l.activeElement===l.body){let d=c.getTreeNode(t);for(;d;){if(d.nodeToRestore&&d.nodeToRestore.isConnected){Sl(d.nodeToRestore);return}d=d.parent}for(d=c.getTreeNode(t);d;){if(d.scopeRef&&d.scopeRef.current&&ie.getTreeNode(d.scopeRef)){let f=Ti(d.scopeRef.current,!0);Sl(f);return}d=d.parent}}})}}}},[t,e])}function Sl(t){t.dispatchEvent(new CustomEvent(ur,{bubbles:!0,cancelable:!0}))&&Ie(t)}function ve(t,e,n){let r=e!=null&&e.tabbable?wd:Sd,l=Z(t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(i){var o;return!(e==null||(o=e.from)===null||o===void 0)&&o.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&Di(i)&&(!n||ue(i,n))&&(!(e!=null&&e.accept)||e.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(l.currentNode=e.from),l}class Kr{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let l=this.fastMap.get(n??null);if(!l)return;let i=new ar({scopeRef:e});l.addChild(i),i.parent=l,this.fastMap.set(e,i),r&&(i.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let i of this.traverse())i!==n&&n.nodeToRestore&&i.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&ue(i.nodeToRestore,n.scopeRef.current)&&(i.nodeToRestore=n.nodeToRestore);let l=n.children;r&&(r.removeChild(n),l.size>0&&l.forEach(i=>r&&r.addChild(i))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var e;let n=new Kr;var r;for(let l of this.traverse())n.addTreeNode(l.scopeRef,(r=(e=l.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&r!==void 0?r:null,l.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new ar({scopeRef:null}),this.fastMap.set(null,this.root)}}class ar{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let ie=new Kr;function Vt(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,l=a.useRef({isFocused:!1,isFocusVisible:e||lt()}),[i,o]=a.useState(!1),[u,s]=a.useState(()=>l.current.isFocused&&l.current.isFocusVisible),c=a.useCallback(()=>s(l.current.isFocused&&l.current.isFocusVisible),[]),d=a.useCallback(v=>{l.current.isFocused=v,o(v),c()},[c]);gd(v=>{l.current.isFocusVisible=v,c()},[],{isTextInput:n});let{focusProps:f}=gn({isDisabled:r,onFocusChange:d}),{focusWithinProps:p}=jt({isDisabled:!r,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:u,focusProps:r?p:f}}let Ai=a.createContext(null);function Kd(t){let e=a.useContext(Ai)||{};Tr(e,t);let{ref:n,...r}=e;return r}function Md(t,e){let{children:n,...r}=t,l=hn(e),i={...r,ref:l};return a.createElement(Ai.Provider,{value:i},n)}let Rd=a.forwardRef(Md);function Et(t,e){let{focusProps:n}=gn(t),{keyboardProps:r}=wi(t),l=j(n,r),i=Kd(e),o=t.isDisabled?{}:i,u=a.useRef(t.autoFocus);return a.useEffect(()=>{u.current&&e.current&&ce(e.current),u.current=!1},[e]),{focusableProps:j({...l,tabIndex:t.excludeFromTabOrder&&!t.isDisabled?-1:void 0},o)}}function Id(t,e){let n=e==null?void 0:e.isDisabled,[r,l]=a.useState(!1);return G(()=>{if(t!=null&&t.current&&!n){let i=()=>{if(t.current){let u=ve(t.current,{tabbable:!0});l(!!u.nextNode())}};i();let o=new MutationObserver(i);return o.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{o.disconnect()}}}),n?!1:r}const Fd=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Nd=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function _d(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return Fd.has(n.script)}let e=t.split("-")[0];return Nd.has(e)}const Ld=Symbol.for("react-aria.i18n.locale");function Bi(){let t=typeof window<"u"&&window[Ld]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:_d(t)?"rtl":"ltr"}}let cr=Bi(),Mt=new Set;function wl(){cr=Bi();for(let t of Mt)t(cr)}function Od(){let t=Xe(),[e,n]=a.useState(cr);return a.useEffect(()=>(Mt.size===0&&window.addEventListener("languagechange",wl),Mt.add(n),()=>{Mt.delete(n),Mt.size===0&&window.removeEventListener("languagechange",wl)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const zd=a.createContext(null);function Le(){let t=Od();return a.useContext(zd)||t}const jd=Symbol.for("react-aria.i18n.locale"),Vd=Symbol.for("react-aria.i18n.strings");let vt;class xn{getStringForLocale(e,n){let l=this.getStringsForLocale(n)[e];if(!l)throw new Error(`Could not find intl message ${e} in ${n} locale`);return l}getStringsForLocale(e){let n=this.strings[e];return n||(n=Hd(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[jd];if(vt===void 0){let l=window[Vd];if(!l)return null;vt={};for(let i in l)vt[i]=new xn({[n]:l[i]},n)}let r=vt==null?void 0:vt[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=n}}function Hd(t,e,n="en-US"){if(e[t])return e[t];let r=Wd(t);if(e[r])return e[r];for(let l in e)if(l.startsWith(r+"-"))return e[l];return e[n]}function Wd(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const Pl=new Map,Dl=new Map;class Ud{format(e,n){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(n,this):r}plural(e,n,r="cardinal"){let l=n["="+e];if(l)return typeof l=="function"?l():l;let i=this.locale+":"+r,o=Pl.get(i);o||(o=new Intl.PluralRules(this.locale,{type:r}),Pl.set(i,o));let u=o.select(e);return l=n[u]||n.other,typeof l=="function"?l():l}number(e){let n=Dl.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),Dl.set(this.locale,n)),n.format(e)}select(e,n){let r=e[n]||e.other;return typeof r=="function"?r():r}constructor(e,n){this.locale=e,this.strings=n}}const kl=new WeakMap;function Gd(t){let e=kl.get(t);return e||(e=new xn(t),kl.set(t,e)),e}function Yd(t,e){return e&&xn.getGlobalDictionaryForPackage(e)||Gd(t)}function ot(t,e){let{locale:n}=Le(),r=Yd(t,e);return a.useMemo(()=>new Ud(n,r),[n,r])}let zn=new Map;function En(t){let{locale:e}=Le(),n=e+(t?Object.entries(t).sort((l,i)=>l[0]<i[0]?-1:1).join():"");if(zn.has(n))return zn.get(n);let r=new Intl.Collator(e,t);return zn.set(n,r),r}function Cn(t,e){let{elementType:n="button",isDisabled:r,onPress:l,onPressStart:i,onPressEnd:o,onPressUp:u,onPressChange:s,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:p,target:v,rel:b,type:y="button"}=t,$;n==="button"?$={type:y,disabled:r}:$={role:"button",tabIndex:r?void 0:0,href:n==="a"&&r?void 0:p,target:n==="a"?v:void 0,type:n==="input"?y:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?b:void 0};let{pressProps:C,isPressed:S}=Fe({onPressStart:i,onPressEnd:o,onPressChange:s,onPress:l,onPressUp:u,isDisabled:r,preventFocusOnPress:c,ref:e}),{focusableProps:x}=Et(t,e);d&&(x.tabIndex=r?-1:x.tabIndex);let T=j(x,C,se(t,{labelable:!0}));return{isPressed:S,buttonProps:j($,T,{"aria-haspopup":t["aria-haspopup"],"aria-expanded":t["aria-expanded"],"aria-controls":t["aria-controls"],"aria-pressed":t["aria-pressed"],onClick:w=>{f&&(f(w),console.warn("onClick is deprecated, please use onPress"))}})}}const Ki=7e3;let Pe=null;function cn(t,e="assertive",n=Ki){Pe?Pe.announce(t,e,n):(Pe=new qd,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?Pe.announce(t,e,n):setTimeout(()=>{Pe!=null&&Pe.isAttached()&&(Pe==null||Pe.announce(t,e,n))},100))}class qd{isAttached(){var e;return(e=this.node)===null||e===void 0?void 0:e.isConnected}createLog(e){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",e),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,n="assertive",r=Ki){var l,i;if(!this.node)return;let o=document.createElement("div");typeof e=="object"?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,n==="assertive"?(l=this.assertiveLog)===null||l===void 0||l.appendChild(o):(i=this.politeLog)===null||i===void 0||i.appendChild(o),e!==""&&setTimeout(()=>{o.remove()},r)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="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 Mr(t,e,n){let{validationBehavior:r,focus:l}=t;G(()=>{if(r==="native"&&(n!=null&&n.current)){let s=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(s),n.current.hasAttribute("title")||(n.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(Zd(n.current))}});let i=te(()=>{e.resetValidation()}),o=te(s=>{var c;e.displayValidation.isInvalid||e.commitValidation();let d=n==null||(c=n.current)===null||c===void 0?void 0:c.form;if(!s.defaultPrevented&&n&&d&&Jd(d)===n.current){var f;l?l():(f=n.current)===null||f===void 0||f.focus(),Ei("keyboard")}s.preventDefault()}),u=te(()=>{e.commitValidation()});a.useEffect(()=>{let s=n==null?void 0:n.current;if(!s)return;let c=s.form;return s.addEventListener("invalid",o),s.addEventListener("change",u),c==null||c.addEventListener("reset",i),()=>{s.removeEventListener("invalid",o),s.removeEventListener("change",u),c==null||c.removeEventListener("reset",i)}},[n,o,u,i,r])}function Xd(t){let e=t.validity;return{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function Zd(t){return{isInvalid:!t.validity.valid,validationDetails:Xd(t),validationErrors:t.validationMessage?[t.validationMessage]:[]}}function Jd(t){for(let e=0;e<t.elements.length;e++){let n=t.elements[e];if(!n.validity.valid)return n}return null}const Mi={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Ri={...Mi,customError:!0,valid:!1},kt={isInvalid:!1,validationDetails:Mi,validationErrors:[]},Qd=a.createContext({}),Tl="__formValidationState"+Date.now();function Rr(t){if(t[Tl]){let{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:l,commitValidation:i}=t[Tl];return{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:l,commitValidation:i}}return ef(t)}function ef(t){let{isInvalid:e,validationState:n,name:r,value:l,builtinValidation:i,validate:o,validationBehavior:u="aria"}=t;n&&(e||(e=n==="invalid"));let s=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:Ri}:null,c=a.useMemo(()=>Al(tf(o,l)),[o,l]);i!=null&&i.validationDetails.valid&&(i=null);let d=a.useContext(Qd),f=a.useMemo(()=>r?Array.isArray(r)?r.flatMap(P=>dr(d[P])):dr(d[r]):[],[d,r]),[p,v]=a.useState(d),[b,y]=a.useState(!1);d!==p&&(v(d),y(!1));let $=a.useMemo(()=>Al(b?[]:f),[b,f]),C=a.useRef(kt),[S,x]=a.useState(kt),T=a.useRef(kt),w=()=>{if(!D)return;I(!1);let P=c||i||C.current;jn(P,T.current)||(T.current=P,x(P))},[D,I]=a.useState(!1);return a.useEffect(w),{realtimeValidation:s||$||c||i||kt,displayValidation:u==="native"?s||$||S:s||$||c||i||S,updateValidation(P){u==="aria"&&!jn(S,P)?x(P):C.current=P},resetValidation(){let P=kt;jn(P,T.current)||(T.current=P,x(P)),u==="native"&&I(!1),y(!0)},commitValidation(){u==="native"&&I(!0),y(!0)}}}function dr(t){return t?Array.isArray(t)?t:[t]:[]}function tf(t,e){if(typeof t=="function"){let n=t(e);if(n&&typeof n!="boolean")return dr(n)}return[]}function Al(t){return t.length?{isInvalid:!0,validationErrors:t,validationDetails:Ri}:null}function jn(t,e){return t===e?!0:t&&e&&t.isInvalid===e.isInvalid&&t.validationErrors.length===e.validationErrors.length&&t.validationErrors.every((n,r)=>n===e.validationErrors[r])&&Object.entries(t.validationDetails).every(([n,r])=>e.validationDetails[n]===r)}function nf(t,e,n){let{isDisabled:r=!1,isReadOnly:l=!1,value:i,name:o,children:u,"aria-label":s,"aria-labelledby":c,validationState:d="valid",isInvalid:f}=t,p=D=>{D.stopPropagation(),e.setSelected(D.target.checked)},v=u!=null,b=s!=null||c!=null;!v&&!b&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:y,isPressed:$}=Fe({isDisabled:r}),{pressProps:C,isPressed:S}=Fe({isDisabled:r||l,onPress(){e.toggle()}}),{focusableProps:x}=Et(t,n),T=j(y,x),w=se(t,{labelable:!0});return bn(n,e.isSelected,e.setSelected),{labelProps:j(C,{onClick:D=>D.preventDefault()}),inputProps:j(w,{"aria-invalid":f||d==="invalid"||void 0,"aria-errormessage":t["aria-errormessage"],"aria-controls":t["aria-controls"],"aria-readonly":l||void 0,onChange:p,disabled:r,...i==null?{}:{value:i},name:o,type:"checkbox",...T}),isSelected:e.isSelected,isPressed:$||S,isDisabled:r,isReadOnly:l,isInvalid:f||d==="invalid"}}function Ii(t){let{id:e,label:n,"aria-labelledby":r,"aria-label":l,labelElementType:i="label"}=t;e=de(e);let o=de(),u={};n?(r=r?`${o} ${r}`:o,u={id:o,htmlFor:i==="label"?e:void 0}):!r&&!l&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let s=di({id:e,"aria-label":l,"aria-labelledby":r});return{labelProps:u,fieldProps:s}}function Ir(t){let{description:e,errorMessage:n,isInvalid:r,validationState:l}=t,{labelProps:i,fieldProps:o}=Ii(t),u=Ye([!!e,!!n,r,l]),s=Ye([!!e,!!n,r,l]);return o=j(o,{"aria-describedby":[u,s,t["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:i,fieldProps:o,descriptionProps:{id:u},errorMessageProps:{id:s}}}function rf(t={}){let{isReadOnly:e}=t,[n,r]=Ze(t.isSelected,t.defaultSelected||!1,t.onChange);function l(o){e||r(o)}function i(){e||r(!n)}return{isSelected:n,setSelected:l,toggle:i}}const Bl={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 Fi(t={}){let{style:e,isFocusable:n}=t,[r,l]=a.useState(!1),{focusWithinProps:i}=jt({isDisabled:!n,onFocusWithinChange:u=>l(u)}),o=a.useMemo(()=>r?e:e?{...Bl,...e}:Bl,[r]);return{visuallyHiddenProps:{...i,style:o}}}function Fr(t){let{children:e,elementType:n="div",isFocusable:r,style:l,...i}=t,{visuallyHiddenProps:o}=Fi(t);return a.createElement(n,j(i,o),e)}function Ni(t,e){let{inputElementType:n="input",isDisabled:r=!1,isRequired:l=!1,isReadOnly:i=!1,type:o="text",validationBehavior:u="aria"}=t,[s,c]=Ze(t.value,t.defaultValue||"",t.onChange),{focusableProps:d}=Et(t,e),f=Rr({...t,value:s}),{isInvalid:p,validationErrors:v,validationDetails:b}=f.displayValidation,{labelProps:y,fieldProps:$,descriptionProps:C,errorMessageProps:S}=Ir({...t,isInvalid:p,errorMessage:t.errorMessage||v}),x=se(t,{labelable:!0});const T={type:o,pattern:t.pattern};return bn(e,s,c),Mr(t,f,e),a.useEffect(()=>{if(e.current instanceof ye(e.current).HTMLTextAreaElement){let w=e.current;Object.defineProperty(w,"defaultValue",{get:()=>w.value,set:()=>{},configurable:!0})}},[e]),{labelProps:y,inputProps:j(x,n==="input"?T:void 0,{disabled:r,readOnly:i,required:l&&u==="native","aria-required":l&&u==="aria"||void 0,"aria-invalid":p||void 0,"aria-errormessage":t["aria-errormessage"],"aria-activedescendant":t["aria-activedescendant"],"aria-autocomplete":t["aria-autocomplete"],"aria-haspopup":t["aria-haspopup"],value:s,onChange:w=>c(w.target.value),autoComplete:t.autoComplete,autoCapitalize:t.autoCapitalize,maxLength:t.maxLength,minLength:t.minLength,name:t.name,placeholder:t.placeholder,inputMode:t.inputMode,onCopy:t.onCopy,onCut:t.onCut,onPaste:t.onPaste,onCompositionEnd:t.onCompositionEnd,onCompositionStart:t.onCompositionStart,onCompositionUpdate:t.onCompositionUpdate,onSelect:t.onSelect,onBeforeInput:t.onBeforeInput,onInput:t.onInput,...d,...$}),descriptionProps:C,errorMessageProps:S,isInvalid:p,validationErrors:v,validationDetails:b}}const De={top:"top",bottom:"top",left:"left",right:"left"},dn={top:"bottom",bottom:"top",left:"right",right:"left"},lf={top:"left",left:"top"},fr={top:"height",left:"width"},_i={width:"totalWidth",height:"totalHeight"},Jt={};let pe=typeof document<"u"&&window.visualViewport;function Kl(t){let e=0,n=0,r=0,l=0,i=0,o=0,u={},s=(pe==null?void 0:pe.scale)>1;if(t.tagName==="BODY"){let f=document.documentElement;r=f.clientWidth,l=f.clientHeight;var c;e=(c=pe==null?void 0:pe.width)!==null&&c!==void 0?c:r;var d;n=(d=pe==null?void 0:pe.height)!==null&&d!==void 0?d:l,u.top=f.scrollTop||t.scrollTop,u.left=f.scrollLeft||t.scrollLeft,pe&&(i=pe.offsetTop,o=pe.offsetLeft)}else({width:e,height:n,top:i,left:o}=yt(t)),u.top=t.scrollTop,u.left=t.scrollLeft,r=e,l=n;return kr()&&(t.tagName==="BODY"||t.tagName==="HTML")&&s&&(u.top=0,u.left=0,i=pe.pageTop,o=pe.pageLeft),{width:e,height:n,totalWidth:r,totalHeight:l,scroll:u,top:i,left:o}}function of(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Ml(t,e,n,r,l,i,o){let u=l.scroll[t],s=r[fr[t]],c=r.scroll[De[t]]+i,d=s+r.scroll[De[t]]-i,f=e-u+o[t]-r[De[t]],p=e-u+n+o[t]-r[De[t]];return f<c?c-f:p>d?Math.max(d-p,c-f):0}function uf(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function Rl(t){if(Jt[t])return Jt[t];let[e,n]=t.split(" "),r=De[e]||"right",l=lf[r];De[n]||(n="center");let i=fr[r],o=fr[l];return Jt[t]={placement:e,crossPlacement:n,axis:r,crossAxis:l,size:i,crossSize:o},Jt[t]}function Vn(t,e,n,r,l,i,o,u,s,c){let{placement:d,crossPlacement:f,axis:p,crossAxis:v,size:b,crossSize:y}=r,$={};$[v]=t[v],f==="center"?$[v]+=(t[y]-n[y])/2:f!==v&&($[v]+=t[y]-n[y]),$[v]+=i;const C=t[v]-n[y]+s+c,S=t[v]+t[y]-s-c;if($[v]=rr($[v],C,S),d===p){const x=u?o[b]:e[_i[b]];$[dn[p]]=Math.floor(x-t[p]+l)}else $[p]=Math.floor(t[p]+t[b]+l);return $}function sf(t,e,n,r,l,i,o,u){const s=r?n.height:e[_i.height];let c=t.top!=null?n.top+t.top:n.top+(s-t.bottom-o),d=u!=="top"?Math.max(0,e.height+e.top+e.scroll.top-c-(l.top+l.bottom+i)):Math.max(0,c+o-(e.top+e.scroll.top)-(l.top+l.bottom+i));return Math.min(e.height-i*2,d)}function Il(t,e,n,r,l,i){let{placement:o,axis:u,size:s}=i;return o===u?Math.max(0,n[u]-t[u]-t.scroll[u]+e[u]-r[u]-r[dn[u]]-l):Math.max(0,t[s]+t[u]+t.scroll[u]-e[u]-n[u]-n[s]-r[u]-r[dn[u]]-l)}function af(t,e,n,r,l,i,o,u,s,c,d,f,p,v,b,y){let $=Rl(t),{size:C,crossAxis:S,crossSize:x,placement:T,crossPlacement:w}=$,D=Vn(e,u,n,$,d,f,c,p,b,y),I=d,h=Il(u,c,e,l,i+d,$);if(o&&r[C]>h){let oe=Rl(`${dn[T]} ${w}`),we=Vn(e,u,n,oe,d,f,c,p,b,y);Il(u,c,e,l,i+d,oe)>h&&($=oe,D=we,I=d)}let B="bottom";$.axis==="top"?$.placement==="top"?B="top":$.placement==="bottom"&&(B="bottom"):$.crossAxis==="top"&&($.crossPlacement==="top"?B="bottom":$.crossPlacement==="bottom"&&(B="top"));let P=Ml(S,D[S],n[x],u,s,i,c);D[S]+=P;let A=sf(D,u,c,p,l,i,n.height,B);v&&v<A&&(A=v),n.height=Math.min(n.height,A),D=Vn(e,u,n,$,I,f,c,p,b,y),P=Ml(S,D[S],n[x],u,s,i,c),D[S]+=P;let R={},E=e[S]+.5*e[x]-D[S]-l[De[S]];const N=b/2+y,k=De[S]==="left"?l.left+l.right:l.top+l.bottom,O=n[x]-k-b/2-y,M=e[S]+b/2-(D[S]+l[De[S]]),W=e[S]+e[x]-b/2-(D[S]+l[De[S]]),ne=rr(E,M,W);return R[S]=rr(ne,N,O),{position:D,maxHeight:A,arrowOffsetLeft:R.left,arrowOffsetTop:R.top,placement:$.placement}}function cf(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:l,padding:i,shouldFlip:o,boundaryElement:u,offset:s,crossOffset:c,maxHeight:d,arrowSize:f=0,arrowBoundaryOffset:p=0}=t,v=r instanceof HTMLElement?df(r):document.documentElement,b=v===document.documentElement;const y=window.getComputedStyle(v).position;let $=!!y&&y!=="static",C=b?yt(n):Fl(n,v);if(!b){let{marginTop:h,marginLeft:B}=window.getComputedStyle(n);C.top+=parseInt(h,10)||0,C.left+=parseInt(B,10)||0}let S=yt(r),x=uf(r);S.width+=x.left+x.right,S.height+=x.top+x.bottom;let T=of(l),w=Kl(u),D=Kl(v),I=u.tagName==="BODY"?yt(v):Fl(v,u);return v.tagName==="HTML"&&u.tagName==="BODY"&&(D.scroll.top=0,D.scroll.left=0),af(e,C,S,T,x,i,o,w,D,I,s,c,$,d,f,p)}function yt(t){let{top:e,left:n,width:r,height:l}=t.getBoundingClientRect(),{scrollTop:i,scrollLeft:o,clientTop:u,clientLeft:s}=document.documentElement;return{top:e+i-u,left:n+o-s,width:r,height:l}}function Fl(t,e){let n=window.getComputedStyle(t),r;if(n.position==="fixed"){let{top:l,left:i,width:o,height:u}=t.getBoundingClientRect();r={top:l,left:i,width:o,height:u}}else{r=yt(t);let l=yt(e),i=window.getComputedStyle(e);l.top+=(parseInt(i.borderTopWidth,10)||0)-e.scrollTop,l.left+=(parseInt(i.borderLeftWidth,10)||0)-e.scrollLeft,r.top-=l.top,r.left-=l.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function df(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Nl(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!Nl(e);)e=e.parentElement;return e||document.documentElement}function Nl(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const Li=new WeakMap;function ff(t){let{triggerRef:e,isOpen:n,onClose:r}=t;a.useEffect(()=>{if(!n||r===null)return;let l=i=>{let o=i.target;if(!e.current||o instanceof Node&&!o.contains(e.current)||i.target instanceof HTMLInputElement||i.target instanceof HTMLTextAreaElement)return;let u=r||Li.get(e.current);u&&u()};return window.addEventListener("scroll",l,!0),()=>{window.removeEventListener("scroll",l,!0)}},[n,r,e])}let ee=typeof document<"u"&&window.visualViewport;function Oi(t){let{direction:e}=Le(),{arrowSize:n=0,targetRef:r,overlayRef:l,scrollRef:i=l,placement:o="bottom",containerPadding:u=12,shouldFlip:s=!0,boundaryElement:c=typeof document<"u"?document.body:null,offset:d=0,crossOffset:f=0,shouldUpdatePosition:p=!0,isOpen:v=!0,onClose:b,maxHeight:y,arrowBoundaryOffset:$=0}=t,[C,S]=a.useState({position:{},arrowOffsetLeft:void 0,arrowOffsetTop:void 0,maxHeight:void 0,placement:void 0}),x=[p,o,l.current,r.current,i.current,u,s,c,d,f,v,e,y,$,n],T=a.useRef(ee==null?void 0:ee.scale);a.useEffect(()=>{v&&(T.current=ee==null?void 0:ee.scale)},[v]);let w=a.useCallback(()=>{if(p===!1||!v||!l.current||!r.current||!c||(ee==null?void 0:ee.scale)!==T.current)return;let B=null;if(i.current&&i.current.contains(document.activeElement)){let N=document.activeElement.getBoundingClientRect(),k=i.current.getBoundingClientRect();B={type:"top",offset:N.top-k.top},B.offset>k.height/2&&(B.type="bottom",B.offset=N.bottom-k.bottom)}let P=l.current;if(!y&&l.current){var A;P.style.top="0px",P.style.bottom="";var R;P.style.maxHeight=((R=(A=window.visualViewport)===null||A===void 0?void 0:A.height)!==null&&R!==void 0?R:window.innerHeight)+"px"}let E=cf({placement:vf(o,e),overlayNode:l.current,targetNode:r.current,scrollNode:i.current||l.current,padding:u,shouldFlip:s,boundaryElement:c,offset:d,crossOffset:f,maxHeight:y,arrowSize:n,arrowBoundaryOffset:$});if(P.style.top="",P.style.bottom="",P.style.left="",P.style.right="",Object.keys(E.position).forEach(N=>P.style[N]=E.position[N]+"px"),P.style.maxHeight=E.maxHeight!=null?E.maxHeight+"px":void 0,B){let N=document.activeElement.getBoundingClientRect(),k=i.current.getBoundingClientRect(),O=N[B.type]-k[B.type];i.current.scrollTop+=O-B.offset}S(E)},x);G(w,x),pf(w),tr({ref:l,onResize:w}),tr({ref:r,onResize:w});let D=a.useRef(!1);G(()=>{let B,P=()=>{D.current=!0,clearTimeout(B),B=setTimeout(()=>{D.current=!1},500),w()},A=()=>{D.current&&P()};return ee==null||ee.addEventListener("resize",P),ee==null||ee.addEventListener("scroll",A),()=>{ee==null||ee.removeEventListener("resize",P),ee==null||ee.removeEventListener("scroll",A)}},[w]);let I=a.useCallback(()=>{D.current||b()},[b,D]);ff({triggerRef:r,isOpen:v,onClose:b&&I});var h;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...C.position,maxHeight:(h=C.maxHeight)!==null&&h!==void 0?h:"100vh"}},placement:C.placement,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:C.arrowOffsetLeft,top:C.arrowOffsetTop}},updatePosition:w}}function pf(t){G(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function vf(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const Be=[];function zi(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:l,isDismissable:i=!1,isKeyboardDismissDisabled:o=!1,shouldCloseOnInteractOutside:u}=t;a.useEffect(()=>(l&&Be.push(e),()=>{let b=Be.indexOf(e);b>=0&&Be.splice(b,1)}),[l,e]);let s=()=>{Be[Be.length-1]===e&&n&&n()},c=b=>{(!u||u(b.target))&&Be[Be.length-1]===e&&(b.stopPropagation(),b.preventDefault())},d=b=>{(!u||u(b.target))&&(Be[Be.length-1]===e&&(b.stopPropagation(),b.preventDefault()),s())},f=b=>{b.key==="Escape"&&!o&&!b.nativeEvent.isComposing&&(b.stopPropagation(),b.preventDefault(),s())};Si({ref:e,onInteractOutside:i&&l?d:null,onInteractOutsideStart:c});let{focusWithinProps:p}=jt({isDisabled:!r,onBlurWithin:b=>{!b.relatedTarget||Dd(b.relatedTarget)||(!u||u(b.relatedTarget))&&n()}}),v=b=>{b.target===b.currentTarget&&b.preventDefault()};return{overlayProps:{onKeyDown:f,...p},underlayProps:{onPointerDown:v}}}function ji(t,e,n){let{type:r}=t,{isOpen:l}=e;a.useEffect(()=>{n&&n.current&&Li.set(n.current,e.close)});let i;r==="menu"?i=!0:r==="listbox"&&(i="listbox");let o=de();return{triggerProps:{"aria-haspopup":i,"aria-expanded":l,"aria-controls":l?o:null,onPress:e.toggle},overlayProps:{id:o}}}const Hn=typeof document<"u"&&window.visualViewport,hf=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Qt=0,Wn;function mf(t={}){let{isDisabled:e}=t;G(()=>{if(!e)return Qt++,Qt===1&&(vn()?Wn=gf():Wn=bf()),()=>{Qt--,Qt===0&&Wn()}},[e])}function bf(){return ke($t(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),$t(document.documentElement,"overflow","hidden"))}function gf(){let t,e,n=c=>{t=He(c.target,!0),!(t===document.documentElement&&t===document.body)&&t instanceof HTMLElement&&window.getComputedStyle(t).overscrollBehavior==="auto"&&(e=$t(t,"overscrollBehavior","contain"))},r=c=>{if(!t||t===document.documentElement||t===document.body){c.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&c.preventDefault()},l=c=>{let d=c.target;Ll(d)&&d!==document.activeElement&&(c.preventDefault(),u(),d.style.transform="translateY(-2000px)",d.focus(),requestAnimationFrame(()=>{d.style.transform=""})),e&&e()},i=c=>{let d=c.target;Ll(d)&&(u(),d.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{d.style.transform="",Hn&&(Hn.height<window.innerHeight?requestAnimationFrame(()=>{_l(d)}):Hn.addEventListener("resize",()=>_l(d),{once:!0}))}))},o=null,u=()=>{if(o)return;let c=()=>{window.scrollTo(0,0)},d=window.pageXOffset,f=window.pageYOffset;o=ke(Tt(window,"scroll",c),$t(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),$t(document.documentElement,"overflow","hidden"),$t(document.body,"marginTop",`-${f}px`),()=>{window.scrollTo(d,f)}),window.scrollTo(0,0)},s=ke(Tt(document,"touchstart",n,{passive:!1,capture:!0}),Tt(document,"touchmove",r,{passive:!1,capture:!0}),Tt(document,"touchend",l,{passive:!1,capture:!0}),Tt(document,"focus",i,!0));return()=>{e==null||e(),o==null||o(),s()}}function $t(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function Tt(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function _l(t){let e=document.scrollingElement||document.documentElement;for(;t&&t!==e;){let n=He(t);if(n!==document.documentElement&&n!==document.body&&n!==t){let r=n.getBoundingClientRect().top,l=t.getBoundingClientRect().top;l>r+t.clientHeight&&(n.scrollTop+=l-r)}t=n.parentElement}}function Ll(t){return t instanceof HTMLInputElement&&!hf.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}const pr=a.createContext(null);function $f(t){let{children:e}=t,n=a.useContext(pr),[r,l]=a.useState(0),i=a.useMemo(()=>({parent:n,modalCount:r,addModal(){l(o=>o+1),n&&n.addModal()},removeModal(){l(o=>o-1),n&&n.removeModal()}}),[n,r]);return a.createElement(pr.Provider,{value:i},e)}function yf(){let t=a.useContext(pr);return{modalProviderProps:{"aria-hidden":t&&t.modalCount>0?!0:null}}}function xf(t){let{modalProviderProps:e}=yf();return a.createElement("div",{"data-overlay-container":!0,...t,...e})}function Ef(t){return a.createElement($f,null,a.createElement(xf,t))}function Cf(t){let e=Xe(),{portalContainer:n=e?null:document.body,...r}=t;if(a.useEffect(()=>{if(n!=null&&n.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let l=a.createElement(Ef,r);return it.createPortal(l,n)}var Vi={};Vi={dismiss:"تجاهل"};var Hi={};Hi={dismiss:"Отхвърляне"};var Wi={};Wi={dismiss:"Odstranit"};var Ui={};Ui={dismiss:"Luk"};var Gi={};Gi={dismiss:"Schließen"};var Yi={};Yi={dismiss:"Απόρριψη"};var qi={};qi={dismiss:"Dismiss"};var Xi={};Xi={dismiss:"Descartar"};var Zi={};Zi={dismiss:"Lõpeta"};var Ji={};Ji={dismiss:"Hylkää"};var Qi={};Qi={dismiss:"Rejeter"};var eo={};eo={dismiss:"התעלם"};var to={};to={dismiss:"Odbaci"};var no={};no={dismiss:"Elutasítás"};var ro={};ro={dismiss:"Ignora"};var lo={};lo={dismiss:"閉じる"};var io={};io={dismiss:"무시"};var oo={};oo={dismiss:"Atmesti"};var uo={};uo={dismiss:"Nerādīt"};var so={};so={dismiss:"Lukk"};var ao={};ao={dismiss:"Negeren"};var co={};co={dismiss:"Zignoruj"};var fo={};fo={dismiss:"Descartar"};var po={};po={dismiss:"Dispensar"};var vo={};vo={dismiss:"Revocare"};var ho={};ho={dismiss:"Пропустить"};var mo={};mo={dismiss:"Zrušiť"};var bo={};bo={dismiss:"Opusti"};var go={};go={dismiss:"Odbaci"};var $o={};$o={dismiss:"Avvisa"};var yo={};yo={dismiss:"Kapat"};var xo={};xo={dismiss:"Скасувати"};var Eo={};Eo={dismiss:"取消"};var Co={};Co={dismiss:"關閉"};var So={};So={"ar-AE":Vi,"bg-BG":Hi,"cs-CZ":Wi,"da-DK":Ui,"de-DE":Gi,"el-GR":Yi,"en-US":qi,"es-ES":Xi,"et-EE":Zi,"fi-FI":Ji,"fr-FR":Qi,"he-IL":eo,"hr-HR":to,"hu-HU":no,"it-IT":ro,"ja-JP":lo,"ko-KR":io,"lt-LT":oo,"lv-LV":uo,"nb-NO":so,"nl-NL":ao,"pl-PL":co,"pt-BR":fo,"pt-PT":po,"ro-RO":vo,"ru-RU":ho,"sk-SK":mo,"sl-SI":bo,"sr-SP":go,"sv-SE":$o,"tr-TR":yo,"uk-UA":xo,"zh-CN":Eo,"zh-TW":Co};function Sf(t){return t&&t.__esModule?t.default:t}function wf(t){let{onDismiss:e,...n}=t,r=ot(Sf(So),"@react-aria/overlays"),l=di(n,r.format("dismiss")),i=()=>{e&&e()};return a.createElement(Fr,null,a.createElement("button",{...l,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}let At=new WeakMap,ge=[];function Pf(t,e=document.body){let n=new Set(t),r=new Set,l=s=>{for(let p of s.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(p);let c=p=>{if(n.has(p)||r.has(p.parentElement)&&p.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let v of n)if(p.contains(v))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},d=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),f=c(s);if(f===NodeFilter.FILTER_ACCEPT&&i(s),f!==NodeFilter.FILTER_REJECT){let p=d.nextNode();for(;p!=null;)i(p),p=d.nextNode()}},i=s=>{var c;let d=(c=At.get(s))!==null&&c!==void 0?c:0;s.getAttribute("aria-hidden")==="true"&&d===0||(d===0&&s.setAttribute("aria-hidden","true"),r.add(s),At.set(s,d+1))};ge.length&&ge[ge.length-1].disconnect(),l(e);let o=new MutationObserver(s=>{for(let c of s)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(d=>d.contains(c.target))){for(let d of c.removedNodes)d instanceof Element&&(n.delete(d),r.delete(d));for(let d of c.addedNodes)(d instanceof HTMLElement||d instanceof SVGElement)&&(d.dataset.liveAnnouncer==="true"||d.dataset.reactAriaTopLayer==="true")?n.add(d):d instanceof Element&&l(d)}});o.observe(e,{childList:!0,subtree:!0});let u={observe(){o.observe(e,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return ge.push(u),()=>{o.disconnect();for(let s of r){let c=At.get(s);c===1?(s.removeAttribute("aria-hidden"),At.delete(s)):At.set(s,c-1)}u===ge[ge.length-1]?(ge.pop(),ge.length&&ge[ge.length-1].observe()):ge.splice(ge.indexOf(u),1)}}function Df(t,e){let{triggerRef:n,popoverRef:r,isNonModal:l,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:o,...u}=t,{overlayProps:s,underlayProps:c}=zi({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!l,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:o},r),{overlayProps:d,arrowProps:f,placement:p}=Oi({...u,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:l?e.close:null});return mf({isDisabled:l||!e.isOpen}),G(()=>{if(e.isOpen&&!l&&r.current)return Pf([r.current])},[l,e.isOpen,r]),{popoverProps:j(s,d),arrowProps:f,underlayProps:c,placement:p}}const kf=a.createContext({});function Tf(){var t;return(t=a.useContext(kf))!==null&&t!==void 0?t:{}}const wo=a.createContext(null);function Af(t){let e=Xe(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[l,i]=a.useState(!1),o=a.useMemo(()=>({contain:l,setContain:i}),[l,i]),{getContainer:u}=Tf();if(!t.portalContainer&&u&&(n=u()),!n)return null;let s=t.children;return t.disableFocusManagement||(s=a.createElement(yn,{restoreFocus:!0,contain:l&&!r},s)),s=a.createElement(wo.Provider,{value:o},a.createElement(dd,null,s)),it.createPortal(s,n)}function Bf(){let t=a.useContext(wo),e=t==null?void 0:t.setContain;G(()=>{e==null||e(!0)},[e])}const Nr=new WeakMap;function Kf(t){return typeof t=="string"?t.replace(/\s*/g,""):""+t}function Mf(t,e){let n=Nr.get(t);if(!n)throw new Error("Unknown list");return`${n.id}-option-${Kf(e)}`}function vr(t){return Vc()?t.altKey:t.ctrlKey}function bt(t){return qe()?t.metaKey:t.ctrlKey}const Rf=1e3;function Po(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,l=a.useRef({search:"",timeout:null}).current,i=o=>{let u=If(o.key);if(!u||o.ctrlKey||o.metaKey||!o.currentTarget.contains(o.target))return;u===" "&&l.search.trim().length>0&&(o.preventDefault(),"continuePropagation"in o||o.stopPropagation()),l.search+=u;let s=e.getKeyForSearch(l.search,n.focusedKey);s==null&&(s=e.getKeyForSearch(l.search)),s!=null&&(n.setFocusedKey(s),r&&r(s)),clearTimeout(l.timeout),l.timeout=setTimeout(()=>{l.search=""},Rf)};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?i:null}}}function If(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function Do(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:l=!1,shouldFocusWrap:i=!1,disallowEmptySelection:o=!1,disallowSelectAll:u=!1,selectOnFocus:s=e.selectionBehavior==="replace",disallowTypeAhead:c=!1,shouldUseVirtualFocus:d,allowsTabNavigation:f=!1,isVirtualized:p,scrollRef:v=r,linkBehavior:b="action"}=t,{direction:y}=Le(),$=zt(),C=P=>{if(P.altKey&&P.key==="Tab"&&P.preventDefault(),!r.current.contains(P.target))return;const A=(L,Ee)=>{if(L!=null){if(e.isLink(L)&&b==="selection"&&s&&!vr(P)){it.flushSync(()=>{e.setFocusedKey(L,Ee)});let me=v.current.querySelector(`[data-key="${CSS.escape(L.toString())}"]`),ze=e.getItemProps(L);$.open(me,P,ze.href,ze.routerOptions);return}if(e.setFocusedKey(L,Ee),e.isLink(L)&&b==="override")return;P.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(L):s&&!vr(P)&&e.replaceSelection(L)}};switch(P.key){case"ArrowDown":if(n.getKeyBelow){var R,E,N;let L=e.focusedKey!=null?(R=n.getKeyBelow)===null||R===void 0?void 0:R.call(n,e.focusedKey):(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n);L==null&&i&&(L=(N=n.getFirstKey)===null||N===void 0?void 0:N.call(n,e.focusedKey)),L!=null&&(P.preventDefault(),A(L))}break;case"ArrowUp":if(n.getKeyAbove){var k,O,M;let L=e.focusedKey!=null?(k=n.getKeyAbove)===null||k===void 0?void 0:k.call(n,e.focusedKey):(O=n.getLastKey)===null||O===void 0?void 0:O.call(n);L==null&&i&&(L=(M=n.getLastKey)===null||M===void 0?void 0:M.call(n,e.focusedKey)),L!=null&&(P.preventDefault(),A(L))}break;case"ArrowLeft":if(n.getKeyLeftOf){var W,ne,oe;let L=(W=n.getKeyLeftOf)===null||W===void 0?void 0:W.call(n,e.focusedKey);L==null&&i&&(L=y==="rtl"?(ne=n.getFirstKey)===null||ne===void 0?void 0:ne.call(n,e.focusedKey):(oe=n.getLastKey)===null||oe===void 0?void 0:oe.call(n,e.focusedKey)),L!=null&&(P.preventDefault(),A(L,y==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var we,he,Oe;let L=(we=n.getKeyRightOf)===null||we===void 0?void 0:we.call(n,e.focusedKey);L==null&&i&&(L=y==="rtl"?(he=n.getLastKey)===null||he===void 0?void 0:he.call(n,e.focusedKey):(Oe=n.getFirstKey)===null||Oe===void 0?void 0:Oe.call(n,e.focusedKey)),L!=null&&(P.preventDefault(),A(L,y==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){P.preventDefault();let L=n.getFirstKey(e.focusedKey,bt(P));e.setFocusedKey(L),bt(P)&&P.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(L):s&&e.replaceSelection(L)}break;case"End":if(n.getLastKey){P.preventDefault();let L=n.getLastKey(e.focusedKey,bt(P));e.setFocusedKey(L),bt(P)&&P.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(L):s&&e.replaceSelection(L)}break;case"PageDown":if(n.getKeyPageBelow){let L=n.getKeyPageBelow(e.focusedKey);L!=null&&(P.preventDefault(),A(L))}break;case"PageUp":if(n.getKeyPageAbove){let L=n.getKeyPageAbove(e.focusedKey);L!=null&&(P.preventDefault(),A(L))}break;case"a":bt(P)&&e.selectionMode==="multiple"&&u!==!0&&(P.preventDefault(),e.selectAll());break;case"Escape":!o&&e.selectedKeys.size!==0&&(P.stopPropagation(),P.preventDefault(),e.clearSelection());break;case"Tab":if(!f){if(P.shiftKey)r.current.focus();else{let L=ve(r.current,{tabbable:!0}),Ee,me;do me=L.lastChild(),me&&(Ee=me);while(me);Ee&&!Ee.contains(document.activeElement)&&Re(Ee)}break}}},S=a.useRef({top:0,left:0});vl(v,"scroll",p?null:()=>{S.current={top:v.current.scrollTop,left:v.current.scrollLeft}});let x=P=>{if(e.isFocused){P.currentTarget.contains(P.target)||e.setFocused(!1);return}if(P.currentTarget.contains(P.target)){if(e.setFocused(!0),e.focusedKey==null){let E=k=>{k!=null&&(e.setFocusedKey(k),s&&e.replaceSelection(k))},N=P.relatedTarget;var A,R;N&&P.currentTarget.compareDocumentPosition(N)&Node.DOCUMENT_POSITION_FOLLOWING?E((A=e.lastSelectedKey)!==null&&A!==void 0?A:n.getLastKey()):E((R=e.firstSelectedKey)!==null&&R!==void 0?R:n.getFirstKey())}else p||(v.current.scrollTop=S.current.top,v.current.scrollLeft=S.current.left);if(e.focusedKey!=null){let E=v.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);E&&(E.contains(document.activeElement)||Re(E),on()==="keyboard"&&We(E,{containingElement:r.current}))}}},T=P=>{P.currentTarget.contains(P.relatedTarget)||e.setFocused(!1)};const w=a.useRef(l);a.useEffect(()=>{if(w.current){let P=null;l==="first"&&(P=n.getFirstKey()),l==="last"&&(P=n.getLastKey());let A=e.selectedKeys;if(A.size){for(let R of A)if(e.canSelectItem(R)){P=R;break}}e.setFocused(!0),e.setFocusedKey(P),P==null&&!d&&ce(r.current)}},[]);let D=a.useRef(e.focusedKey);a.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==D.current||w.current)&&(v!=null&&v.current)){let P=on(),A=r.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!A)return;(P==="keyboard"||w.current)&&(pi(v.current,A),P!=="virtual"&&We(A,{containingElement:r.current}))}!d&&e.isFocused&&e.focusedKey==null&&D.current!=null&&ce(r.current),D.current=e.focusedKey,w.current=!1}),vl(r,"react-aria-focus-scope-restore",P=>{P.preventDefault(),e.setFocused(!0)});let I={onKeyDown:C,onFocus:x,onBlur:T,onMouseDown(P){v.current===P.target&&P.preventDefault()}},{typeSelectProps:h}=Po({keyboardDelegate:n,selectionManager:e});c||(I=j(h,I));let B;return d||(B=e.focusedKey==null?0:-1),{collectionProps:{...I,tabIndex:B}}}function Sn(t){let{selectionManager:e,key:n,ref:r,shouldSelectOnPressUp:l,shouldUseVirtualFocus:i,focus:o,isDisabled:u,onAction:s,allowsDifferentPressOrigin:c,linkBehavior:d="action"}=t,f=zt(),p=M=>{if(M.pointerType==="keyboard"&&vr(M))e.toggleSelection(n);else{if(e.selectionMode==="none")return;if(e.isLink(n)){if(d==="selection"){let W=e.getItemProps(n);f.open(r.current,M,W.href,W.routerOptions),e.setSelectedKeys(e.selectedKeys);return}else if(d==="override"||d==="none")return}e.selectionMode==="single"?e.isSelected(n)&&!e.disallowEmptySelection?e.toggleSelection(n):e.replaceSelection(n):M&&M.shiftKey?e.extendSelection(n):e.selectionBehavior==="toggle"||M&&(bt(M)||M.pointerType==="touch"||M.pointerType==="virtual")?e.toggleSelection(n):e.replaceSelection(n)}};a.useEffect(()=>{n===e.focusedKey&&e.isFocused&&!i&&(o?o():document.activeElement!==r.current&&ce(r.current))},[r,n,e.focusedKey,e.childFocusStrategy,e.isFocused,i]),u=u||e.isDisabled(n);let v={};!i&&!u?v={tabIndex:n===e.focusedKey?0:-1,onFocus(M){M.target===r.current&&e.setFocusedKey(n)}}:u&&(v.onMouseDown=M=>{M.preventDefault()});let b=e.isLink(n)&&d==="override",y=e.isLink(n)&&d!=="selection"&&d!=="none",$=!u&&e.canSelectItem(n)&&!b,C=(s||y)&&!u,S=C&&(e.selectionBehavior==="replace"?!$:!$||e.isEmpty),x=C&&$&&e.selectionBehavior==="replace",T=S||x,w=a.useRef(null),D=T&&$,I=a.useRef(!1),h=a.useRef(!1),B=M=>{if(s&&s(),y){let W=e.getItemProps(n);f.open(r.current,M,W.href,W.routerOptions)}},P={};l?(P.onPressStart=M=>{w.current=M.pointerType,I.current=D,M.pointerType==="keyboard"&&(!T||zl())&&p(M)},c?(P.onPressUp=S?null:M=>{M.pointerType!=="keyboard"&&$&&p(M)},P.onPress=S?B:null):P.onPress=M=>{if(S||x&&M.pointerType!=="mouse"){if(M.pointerType==="keyboard"&&!Ol())return;B(M)}else M.pointerType!=="keyboard"&&$&&p(M)}):(P.onPressStart=M=>{w.current=M.pointerType,I.current=D,h.current=S,$&&(M.pointerType==="mouse"&&!S||M.pointerType==="keyboard"&&(!C||zl()))&&p(M)},P.onPress=M=>{(M.pointerType==="touch"||M.pointerType==="pen"||M.pointerType==="virtual"||M.pointerType==="keyboard"&&T&&Ol()||M.pointerType==="mouse"&&h.current)&&(T?B(M):$&&p(M))}),v["data-key"]=n,P.preventFocusOnPress=i;let{pressProps:A,isPressed:R}=Fe(P),E=x?M=>{w.current==="mouse"&&(M.stopPropagation(),M.preventDefault(),B(M))}:void 0,{longPressProps:N}=Pi({isDisabled:!D,onLongPress(M){M.pointerType==="touch"&&(p(M),e.setSelectionBehavior("toggle"))}}),k=M=>{w.current==="touch"&&I.current&&M.preventDefault()},O=e.isLink(n)?M=>{nt.isOpening||M.preventDefault()}:void 0;return{itemProps:j(v,$||S?A:{},D?N:{},{onDoubleClick:E,onDragStartCapture:k,onClick:O}),isPressed:R,isSelected:e.isSelected(n),isFocused:e.isFocused&&e.focusedKey===n,isDisabled:u,allowsSelection:$,hasAction:T}}function Ol(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function zl(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}class hr{getItemRect(e){let n=this.ref.current,r=e!=null?n.querySelector(`[data-key="${CSS.escape(e.toString())}"]`):null;if(!r)return null;let l=n.getBoundingClientRect(),i=r.getBoundingClientRect();return{x:i.left-l.left+n.scrollLeft,y:i.top-l.top+n.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:e.scrollWidth,height:e.scrollHeight}}getVisibleRect(){let e=this.ref.current;return{x:e.scrollLeft,y:e.scrollTop,width:e.offsetWidth,height:e.offsetHeight}}constructor(e){this.ref=e}}class ko{isDisabled(e){var n;return this.disabledBehavior==="all"&&(((n=e.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,n){for(;e!=null;){let r=this.collection.getItem(e);if((r==null?void 0:r.type)==="item"&&!this.isDisabled(r))return e;e=n(e)}return null}getNextKey(e){return e=this.collection.getKeyAfter(e),this.findNextNonDisabled(e,n=>this.collection.getKeyAfter(n))}getPreviousKey(e){return e=this.collection.getKeyBefore(e),this.findNextNonDisabled(e,n=>this.collection.getKeyBefore(n))}findKey(e,n,r){let l=this.layoutDelegate.getItemRect(e);if(!l)return null;let i=l;do e=n(e),l=this.layoutDelegate.getItemRect(e);while(l&&r(i,l));return e}isSameRow(e,n){return e.y===n.y||e.x!==n.x}isSameColumn(e,n){return e.x===n.x||e.y!==n.y}getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,n){return n?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr"):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyAfter(n))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(!It(n))return this.getFirstKey();if(this.orientation==="horizontal"){let l=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>l;)e=this.getKeyAbove(e),r=e==null?null:this.layoutDelegate.getItemRect(e)}else{let l=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>l;)e=this.getKeyAbove(e),r=e==null?null:this.layoutDelegate.getItemRect(e)}return e??this.getFirstKey()}getKeyPageBelow(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(!It(n))return this.getLastKey();if(this.orientation==="horizontal"){let l=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<l;)e=this.getKeyBelow(e),r=e==null?null:this.layoutDelegate.getItemRect(e)}else{let l=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<l;)e=this.getKeyBelow(e),r=e==null?null:this.layoutDelegate.getItemRect(e)}return e??this.getLastKey()}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,l=n||this.getFirstKey();for(;l!=null;){let i=r.getItem(l),o=i.textValue.slice(0,e.length);if(i.textValue&&this.collator.compare(o,e)===0)return l;l=this.getNextKey(l)}return null}constructor(...e){if(e.length===1){let n=e[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new hr(n.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new hr(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function To(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:l,keyboardDelegate:i,layoutDelegate:o}=t,u=En({usage:"search",sensitivity:"base"}),s=e.disabledBehavior,c=a.useMemo(()=>i||new ko({collection:n,disabledKeys:r,disabledBehavior:s,ref:l,collator:u,layoutDelegate:o}),[i,o,n,r,l,u,s]),{collectionProps:d}=Do({...t,ref:l,selectionManager:e,keyboardDelegate:c});return{listProps:d}}function Ff(t,e,n){let r=se(t,{labelable:!0}),l=t.selectionBehavior||"toggle",i=t.linkBehavior||(l==="replace"?"action":"override");l==="toggle"&&i==="action"&&(i="override");let{listProps:o}=To({...t,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,linkBehavior:i}),{focusWithinProps:u}=jt({onFocusWithin:t.onFocus,onBlurWithin:t.onBlur,onFocusWithinChange:t.onFocusChange}),s=de(t.id);Nr.set(e,{id:s,shouldUseVirtualFocus:t.shouldUseVirtualFocus,shouldSelectOnPressUp:t.shouldSelectOnPressUp,shouldFocusOnHover:t.shouldFocusOnHover,isVirtualized:t.isVirtualized,onAction:t.onAction,linkBehavior:i});let{labelProps:c,fieldProps:d}=Ii({...t,id:s,labelElementType:"span"});return{labelProps:c,listBoxProps:j(r,u,e.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox",...j(d,o)})}}function Ao(t){return null}Ao.getCollectionNode=function*(e,n){let{childItems:r,title:l,children:i}=e,o=e.title||e.children,u=e.textValue||(typeof o=="string"?o:"")||e["aria-label"]||"";!u&&!(n!=null&&n.suppressTextValueWarning)&&console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."),yield{type:"item",props:e,rendered:o,textValue:u,"aria-label":e["aria-label"],hasChildNodes:Nf(e),*childNodes(){if(r)for(let s of r)yield{type:"item",value:s};else if(l){let s=[];a.Children.forEach(i,c=>{s.push({type:"item",element:c})}),yield*s}}}};function Nf(t){return t.hasChildItems!=null?t.hasChildItems:!!(t.childItems||t.title&&a.Children.count(t.children)>0)}let _r=Ao;function Bo(t){return null}Bo.getCollectionNode=function*(e){let{children:n,title:r,items:l}=e;yield{type:"section",props:e,hasChildNodes:!0,rendered:r,"aria-label":e["aria-label"],*childNodes(){if(typeof n=="function"){if(!l)throw new Error("props.children was a function but props.items is missing");for(let i of l)yield{type:"item",value:i,renderer:n}}else{let i=[];a.Children.forEach(n,o=>{i.push({type:"item",element:o})}),yield*i}}}};let _f=Bo;class Lf{build(e,n){return this.context=n,jl(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:r}=e;if(a.isValidElement(n)&&n.type===a.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");for(let l of e.items)yield*this.getFullNode({value:l},{renderer:n})}else{let l=[];a.Children.forEach(n,o=>{l.push(o)});let i=0;for(let o of l){let u=this.getFullNode({element:o,index:i},{});for(let s of u)i++,yield s}}}getKey(e,n,r,l){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${l}${n.key}`;let i=n.value;if(i!=null){var o;let u=(o=i.key)!==null&&o!==void 0?o:i.id;if(u==null)throw new Error("No key found for item");return u}return l?`${l}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,r,l){if(a.isValidElement(e.element)&&e.element.type===a.Fragment){let s=[];a.Children.forEach(e.element.props.children,d=>{s.push(d)});let c=e.index;for(const d of s)yield*this.getFullNode({element:d,index:c++},n,r,l);return}let i=e.element;if(!i&&e.value&&n&&n.renderer){let s=this.cache.get(e.value);if(s&&(!s.shouldInvalidate||!s.shouldInvalidate(this.context))){s.index=e.index,s.parentKey=l?l.key:null,yield s;return}i=n.renderer(e.value)}if(a.isValidElement(i)){let s=i.type;if(typeof s!="function"&&typeof s.getCollectionNode!="function"){let p=typeof i.type=="function"?i.type.name:i.type;throw new Error(`Unknown element <${p}> in collection.`)}let c=s.getCollectionNode(i.props,this.context),d=e.index,f=c.next();for(;!f.done&&f.value;){let p=f.value;e.index=d;let v=p.key;v||(v=p.element?null:this.getKey(i,e,n,r));let y=[...this.getFullNode({...p,key:v,index:d,wrapper:Of(e.wrapper,p.wrapper)},this.getChildState(n,p),r?`${r}${i.key}`:i.key,l)];for(let $ of y){if($.value=p.value||e.value,$.value&&this.cache.set($.value,$),e.type&&$.type!==e.type)throw new Error(`Unsupported type <${Un($.type)}> in <${Un(l.type)}>. Only <${Un(e.type)}> is supported.`);d++,yield $}f=c.next(y)}return}if(e.key==null)return;let o=this,u={type:e.type,props:e.props,key:e.key,parentKey:l?l.key:null,value:e.value,level:l?l.level+1:0,index:e.index,rendered:e.rendered,textValue:e.textValue,"aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes,childNodes:jl(function*(){if(!e.hasChildNodes)return;let s=0;for(let c of e.childNodes()){c.key!=null&&(c.key=`${u.key}${c.key}`),c.index=s;let d=o.getFullNode(c,o.getChildState(n,c),u.key,u);for(let f of d)s++,yield f}})};yield u}constructor(){this.cache=new WeakMap}}function jl(t){let e=[],n=null;return{*[Symbol.iterator](){for(let r of e)yield r;n||(n=t());for(let r of n)e.push(r),yield r}}}function Of(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function Un(t){return t[0].toUpperCase()+t.slice(1)}function Lr(t,e,n){let r=a.useMemo(()=>new Lf,[]),{children:l,items:i,collection:o}=t;return a.useMemo(()=>{if(o)return o;let s=r.build({children:l,items:i},n);return e(s)},[r,l,i,o,n,e])}function le(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function Me(t){return Ue(t,0)}function Ue(t,e){if(e<0)return;let n=0;for(let r of t){if(n===e)return r;n++}}function Ge(t){let e;for(let n of t)e=n;return e}function Gn(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...Vl(t,e),e],l=[...Vl(t,n),n],i=r.slice(0,l.length).findIndex((o,u)=>o!==l[u]);return i!==-1?(e=r[i],n=l[i],e.index-n.index):r.findIndex(o=>o===n)>=0?1:(l.findIndex(o=>o===e)>=0,-1)}function Vl(t,e){let n=[];for(;(e==null?void 0:e.parentKey)!=null;)e=t.getItem(e.parentKey),n.unshift(e);return n}const Hl=new WeakMap;function Ko(t){let e=Hl.get(t);if(e!=null)return e;e=0;let n=r=>{for(let l of r)l.type==="section"?n(le(l,t)):e++};return n(t),Hl.set(t,e),e}function zf(t,e,n){var r,l;let{key:i}=t,o=Nr.get(e);var u;let s=(u=t.isDisabled)!==null&&u!==void 0?u:e.selectionManager.isDisabled(i);var c;let d=(c=t.isSelected)!==null&&c!==void 0?c:e.selectionManager.isSelected(i);var f;let p=(f=t.shouldSelectOnPressUp)!==null&&f!==void 0?f:o==null?void 0:o.shouldSelectOnPressUp;var v;let b=(v=t.shouldFocusOnHover)!==null&&v!==void 0?v:o==null?void 0:o.shouldFocusOnHover;var y;let $=(y=t.shouldUseVirtualFocus)!==null&&y!==void 0?y:o==null?void 0:o.shouldUseVirtualFocus;var C;let S=(C=t.isVirtualized)!==null&&C!==void 0?C:o==null?void 0:o.isVirtualized,x=Ye(),T=Ye(),w={role:"option","aria-disabled":s||void 0,"aria-selected":e.selectionManager.selectionMode!=="none"?d:void 0};qe()&&kr()||(w["aria-label"]=t["aria-label"],w["aria-labelledby"]=x,w["aria-describedby"]=T);let D=e.collection.getItem(i);if(S){let O=Number(D==null?void 0:D.index);w["aria-posinset"]=Number.isNaN(O)?void 0:O+1,w["aria-setsize"]=Ko(e.collection)}let I=o!=null&&o.onAction?()=>{var O;return o==null||(O=o.onAction)===null||O===void 0?void 0:O.call(o,i)}:void 0,{itemProps:h,isPressed:B,isFocused:P,hasAction:A,allowsSelection:R}=Sn({selectionManager:e.selectionManager,key:i,ref:n,shouldSelectOnPressUp:p,allowsDifferentPressOrigin:p&&b,isVirtualized:S,shouldUseVirtualFocus:$,isDisabled:s,onAction:I||!(D==null||(r=D.props)===null||r===void 0)&&r.onAction?ke(D==null||(l=D.props)===null||l===void 0?void 0:l.onAction,I):void 0,linkBehavior:o==null?void 0:o.linkBehavior}),{hoverProps:E}=xt({isDisabled:s||!b,onHoverStart(){lt()||(e.selectionManager.setFocused(!0),e.selectionManager.setFocusedKey(i))}}),N=se(D==null?void 0:D.props);delete N.id;let k=si(D==null?void 0:D.props);return{optionProps:{...w,...j(N,h,E,k),id:Mf(e,i)},labelProps:{id:x},descriptionProps:{id:T},isFocused:P,isFocusVisible:P&<(),isSelected:d,isDisabled:s,isPressed:B,allowsSelection:R,hasAction:A}}var Mo={};Mo={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var Ro={};Ro={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Io={};Io={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Fo={};Fo={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var No={};No={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var _o={};_o={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var Lo={};Lo={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Oo={};Oo={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var zo={};zo={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var jo={};jo={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Vo={};Vo={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var Ho={};Ho={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Wo={};Wo={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Uo={};Uo={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var Go={};Go={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var Yo={};Yo={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var qo={};qo={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var Xo={};Xo={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Zo={};Zo={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Jo={};Jo={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var Qo={};Qo={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var eu={};eu={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var tu={};tu={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var nu={};nu={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var ru={};ru={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var lu={};lu={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var iu={};iu={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var ou={};ou={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var uu={};uu={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var su={};su={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var au={};au={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var cu={};cu={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var du={};du={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var fu={};fu={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var pu={};pu={"ar-AE":Mo,"bg-BG":Ro,"cs-CZ":Io,"da-DK":Fo,"de-DE":No,"el-GR":_o,"en-US":Lo,"es-ES":Oo,"et-EE":zo,"fi-FI":jo,"fr-FR":Vo,"he-IL":Ho,"hr-HR":Wo,"hu-HU":Uo,"it-IT":Go,"ja-JP":Yo,"ko-KR":qo,"lt-LT":Xo,"lv-LV":Zo,"nb-NO":Jo,"nl-NL":Qo,"pl-PL":eu,"pt-BR":tu,"pt-PT":nu,"ro-RO":ru,"ru-RU":lu,"sk-SK":iu,"sl-SI":ou,"sr-SP":uu,"sv-SE":su,"tr-TR":au,"uk-UA":cu,"zh-CN":du,"zh-TW":fu};function jf(t){return t&&t.__esModule?t.default:t}function vu(t,e,n){let{type:r="menu",isDisabled:l,trigger:i="press"}=t,o=de(),{triggerProps:u,overlayProps:s}=ji({type:r},e,n),c=v=>{if(!l&&!(i==="longPress"&&!v.altKey)&&n&&n.current)switch(v.key){case"Enter":case" ":if(i==="longPress")return;case"ArrowDown":"continuePropagation"in v||v.stopPropagation(),v.preventDefault(),e.toggle("first");break;case"ArrowUp":"continuePropagation"in v||v.stopPropagation(),v.preventDefault(),e.toggle("last");break;default:"continuePropagation"in v&&v.continuePropagation()}},d=ot(jf(pu),"@react-aria/menu"),{longPressProps:f}=Pi({isDisabled:l||i!=="longPress",accessibilityDescription:d.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),p={onPressStart(v){v.pointerType!=="touch"&&v.pointerType!=="keyboard"&&!l&&e.open(v.pointerType==="virtual"?"first":null)},onPress(v){v.pointerType==="touch"&&!l&&e.toggle()}};return delete u.onPress,{menuTriggerProps:{...u,...i==="press"?p:f,id:o,onKeyDown:c},menuProps:{...s,"aria-labelledby":o,autoFocus:e.focusStrategy||!0,onClose:e.close}}}const hu=new WeakMap;function mu(t,e,n){let{shouldFocusWrap:r=!0,onKeyDown:l,onKeyUp:i,...o}=t;!t["aria-label"]&&!t["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let u=se(t,{labelable:!0}),{listProps:s}=To({...o,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return hu.set(e,{onClose:t.onClose,onAction:t.onAction}),{menuProps:j(u,{onKeyDown:l,onKeyUp:i},{role:"menu",...s,onKeyDown:c=>{c.key!=="Escape"&&s.onKeyDown(c)}})}}function bu(t,e,n){let{id:r,key:l,closeOnSelect:i,isVirtualized:o,"aria-haspopup":u,onPressStart:s,onPressUp:c,onPress:d,onPressChange:f,onPressEnd:p,onHoverStart:v,onHoverChange:b,onHoverEnd:y,onKeyDown:$,onKeyUp:C,onFocus:S,onFocusChange:x,onBlur:T}=t,w=!!u;var D;let I=(D=t.isDisabled)!==null&&D!==void 0?D:e.selectionManager.isDisabled(l);var h;let B=(h=t.isSelected)!==null&&h!==void 0?h:e.selectionManager.isSelected(l),P=hu.get(e),A=e.collection.getItem(l),R=t.onClose||P.onClose,E=zt(),N=J=>{var ct;if(!w){if(!(A==null||(ct=A.props)===null||ct===void 0)&&ct.onAction?A.props.onAction():t.onAction&&t.onAction(l),P.onAction){let Tn=P.onAction;Tn(l)}J.target instanceof HTMLAnchorElement&&E.open(J.target,J,A.props.href,A.props.routerOptions)}},k="menuitem";w||(e.selectionManager.selectionMode==="single"?k="menuitemradio":e.selectionManager.selectionMode==="multiple"&&(k="menuitemcheckbox"));let O=Ye(),M=Ye(),W=Ye(),ne={id:r,"aria-disabled":I||void 0,role:k,"aria-label":t["aria-label"],"aria-labelledby":O,"aria-describedby":[M,W].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":u,"aria-expanded":t["aria-expanded"]};e.selectionManager.selectionMode!=="none"&&!w&&(ne["aria-checked"]=B),o&&(ne["aria-posinset"]=A==null?void 0:A.index,ne["aria-setsize"]=Ko(e.collection));let oe=J=>{J.pointerType==="keyboard"&&N(J),s==null||s(J)},we=J=>{J.pointerType!=="keyboard"&&(N(J),!w&&R&&(i??(e.selectionManager.selectionMode!=="multiple"||e.selectionManager.isLink(l)))&&R()),c==null||c(J)},{itemProps:he,isFocused:Oe}=Sn({selectionManager:e.selectionManager,key:l,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none"}),{pressProps:L,isPressed:Ee}=Fe({onPressStart:oe,onPress:d,onPressUp:we,onPressChange:f,onPressEnd:p,isDisabled:I}),{hoverProps:me}=xt({isDisabled:I,onHoverStart(J){lt()||(e.selectionManager.setFocused(!0),e.selectionManager.setFocusedKey(l)),v==null||v(J)},onHoverChange:b,onHoverEnd:y}),{keyboardProps:ze}=wi({onKeyDown:J=>{if(J.repeat){J.continuePropagation();return}switch(J.key){case" ":!I&&e.selectionManager.selectionMode==="none"&&!w&&i!==!1&&R&&R();break;case"Enter":!I&&i!==!1&&!w&&R&&R();break;default:w||J.continuePropagation(),$==null||$(J);break}},onKeyUp:C}),{focusProps:ut}=gn({onBlur:T,onFocus:S,onFocusChange:x}),st=se(A.props);delete st.id;let at=si(A.props);return{menuItemProps:{...ne,...j(st,at,w?{onFocus:he.onFocus,"data-key":he["data-key"]}:he,L,me,ze,ut),tabIndex:he.tabIndex!=null?-1:void 0},labelProps:{id:O},descriptionProps:{id:M},keyboardShortcutProps:{id:W},isFocused:Oe,isSelected:B,isPressed:Ee,isDisabled:I}}function Vf(t){let{heading:e,"aria-label":n}=t,r=de();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}function Hf(t,e){let{role:n="dialog"}=t,r=Ye();r=t["aria-label"]?void 0:r;let l=a.useRef(!1);return a.useEffect(()=>{if(e.current&&!e.current.contains(document.activeElement)){ce(e.current);let i=setTimeout(()=>{document.activeElement===e.current&&(l.current=!0,e.current&&(e.current.blur(),ce(e.current)),l.current=!1)},500);return()=>{clearTimeout(i)}}},[e]),Bf(),{dialogProps:{...se(t,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":t["aria-labelledby"]||r,onBlur:i=>{l.current&&i.stopPropagation()}},titleProps:{id:r}}}var _t;(function(t){t[t.none=0]="none",t[t.cancel=0]="cancel",t[t.move=1]="move",t[t.copy=2]="copy",t[t.link=4]="link",t[t.all=7]="all"})(_t||(_t={}));const Wf={..._t,copyMove:3,copyLink:6,linkMove:5,all:7,uninitialized:7},Uf=Or(Wf);Uf[7]="all";Or(_t);const Gf={none:"cancel",link:"link",copy:"copy",move:"move"};Or(Gf);function Or(t){let e={};for(let n in t)e[t[n]]=n;return e}const Yf=new Set(["text/plain","text/uri-list","text/html"]),mr="application/vnd.react-aria.items+json",gu="application/octet-stream";function Wl(t,e){let n=new Map,r=!1,l=[];for(let i of e){let o=Object.keys(i);o.length>1&&(r=!0);let u={};for(let s of o){let c=n.get(s);c?r=!0:(c=[],n.set(s,c));let d=i[s];u[s]=d,c.push(d)}l.push(u)}for(let[i,o]of n)if(Yf.has(i)){let u=o.join(`
|
|
31
|
-
`);t.items.add(u,i)}else t.items.add(o[0],i);if(r){let i=JSON.stringify(l);t.items.add(i,mr)}}function qf(t){let e=[],n=!1;if(t.types.includes(mr))try{let r=t.getData(mr),l=JSON.parse(r);for(let i of l)e.push({kind:"text",types:new Set(Object.keys(i)),getText:o=>Promise.resolve(i[o])});n=!0}catch{}if(!n){let r=new Map;for(let l of t.items)if(l.kind==="string")r.set(l.type||gu,t.getData(l.type));else if(l.kind==="file")if(typeof l.webkitGetAsEntry=="function"){let i=l.webkitGetAsEntry();if(!i)continue;i.isFile?e.push(br(l.getAsFile())):i.isDirectory&&e.push($u(i))}else e.push(br(l.getAsFile()));r.size>0&&e.push({kind:"text",types:new Set(r.keys()),getText:l=>Promise.resolve(r.get(l))})}return e}function Xf(t){return typeof t.text=="function"?t.text():new Promise((e,n)=>{let r=new FileReader;r.onload=()=>{e(r.result)},r.onerror=n,r.readAsText(t)})}function br(t){return{kind:"file",type:t.type||gu,name:t.name,getText:()=>Xf(t),getFile:()=>Promise.resolve(t)}}function $u(t){return{kind:"directory",name:t.name,getEntries:()=>Zf(t)}}async function*Zf(t){let e=t.createReader(),n;do{n=await new Promise((r,l)=>{e.readEntries(r,l)});for(let r of n)if(r.isFile){let l=await Jf(r);yield br(l)}else r.isDirectory&&(yield $u(r))}while(n.length>0)}function Jf(t){return new Promise((e,n)=>t.file(e,n))}_t.none;const Yn=new Map;function ht(t,e){let n=Yn.get(t);if(!n){let r=new Set,l=i=>{for(let o of r)o(i)};n={listener:l,handlers:r},Yn.set(t,n),document.addEventListener(t,l)}return n.handlers.add(e),()=>{n.handlers.delete(e),n.handlers.size===0&&(document.removeEventListener(t,n.listener),Yn.delete(t))}}function Qf(t){let{isDisabled:e}=t,n=a.useRef(!1),{focusProps:r}=gn({onFocusChange:d=>{n.current=d}}),l=te(d=>{n.current&&t.getItems&&d.preventDefault()}),i=te(d=>{var f;!n.current||!t.getItems||(d.preventDefault(),Wl(d.clipboardData,t.getItems()),(f=t.onCopy)===null||f===void 0||f.call(t))}),o=te(d=>{n.current&&t.onCut&&t.getItems&&d.preventDefault()}),u=te(d=>{!n.current||!t.onCut||!t.getItems||(d.preventDefault(),Wl(d.clipboardData,t.getItems()),t.onCut())}),s=te(d=>{n.current&&t.onPaste&&d.preventDefault()}),c=te(d=>{if(!n.current||!t.onPaste)return;d.preventDefault();let f=qf(d.clipboardData);t.onPaste(f)});return a.useEffect(()=>{if(!e)return ke(ht("beforecopy",l),ht("copy",i),ht("beforecut",o),ht("cut",u),ht("beforepaste",s),ht("paste",c))},[e,l,i,o,u,s,c]),{clipboardProps:r}}class yu{isCell(e){return e.type==="cell"}isRow(e){return e.type==="row"||e.type==="item"}isDisabled(e){var n;return this.disabledBehavior==="all"&&(((n=e.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(e.key))}findPreviousKey(e,n){let r=e!=null?this.collection.getKeyBefore(e):this.collection.getLastKey();for(;r!=null;){let l=this.collection.getItem(r);if(!this.isDisabled(l)&&(!n||n(l)))return r;r=this.collection.getKeyBefore(r)}}findNextKey(e,n){let r=e!=null?this.collection.getKeyAfter(e):this.collection.getFirstKey();for(;r!=null;){let l=this.collection.getItem(r);if(!this.isDisabled(l)&&(!n||n(l)))return r;r=this.collection.getKeyAfter(r)}}getKeyBelow(e){let n=this.collection.getItem(e);if(n&&(this.isCell(n)&&(e=n.parentKey),e=this.findNextKey(e,r=>r.type==="item"),e!=null)){if(this.isCell(n)){let r=this.collection.getItem(e);return Ue(le(r,this.collection),n.index).key}if(this.focusMode==="row")return e}}getKeyAbove(e){let n=this.collection.getItem(e);if(n&&(this.isCell(n)&&(e=n.parentKey),e=this.findPreviousKey(e,r=>r.type==="item"),e!=null)){if(this.isCell(n)){let r=this.collection.getItem(e);return Ue(le(r,this.collection),n.index).key}if(this.focusMode==="row")return e}}getKeyRightOf(e){let n=this.collection.getItem(e);if(n){if(this.isRow(n)){let r=le(n,this.collection);return this.direction==="rtl"?Ge(r).key:Me(r).key}if(this.isCell(n)){let r=this.collection.getItem(n.parentKey),l=le(r,this.collection),i=this.direction==="rtl"?Ue(l,n.index-1):Ue(l,n.index+1);return i?i.key:this.focusMode==="row"?n.parentKey:this.direction==="rtl"?this.getFirstKey(e):this.getLastKey(e)}}}getKeyLeftOf(e){let n=this.collection.getItem(e);if(n){if(this.isRow(n)){let r=le(n,this.collection);return this.direction==="rtl"?Me(r).key:Ge(r).key}if(this.isCell(n)){let r=this.collection.getItem(n.parentKey),l=le(r,this.collection),i=this.direction==="rtl"?Ue(l,n.index+1):Ue(l,n.index-1);return i?i.key:this.focusMode==="row"?n.parentKey:this.direction==="rtl"?this.getLastKey(e):this.getFirstKey(e)}}}getFirstKey(e,n){let r;if(e!=null){if(r=this.collection.getItem(e),!r)return;if(this.isCell(r)&&!n){let l=this.collection.getItem(r.parentKey);return Me(le(l,this.collection)).key}}if(e=this.findNextKey(null,l=>l.type==="item"),e!=null&&r&&this.isCell(r)&&n||this.focusMode==="cell"){let l=this.collection.getItem(e);e=Me(le(l,this.collection)).key}return e}getLastKey(e,n){let r;if(e!=null){if(r=this.collection.getItem(e),!r)return;if(this.isCell(r)&&!n){let l=this.collection.getItem(r.parentKey),i=le(l,this.collection);return Ge(i).key}}if(e=this.findPreviousKey(null,l=>l.type==="item"),e!=null&&r&&this.isCell(r)&&n||this.focusMode==="cell"){let l=this.collection.getItem(e),i=le(l,this.collection);e=Ge(i).key}return e}getKeyPageAbove(e){let n=this.layoutDelegate.getItemRect(e);if(!n)return null;let r=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>r;)e=this.getKeyAbove(e),n=this.layoutDelegate.getItemRect(e);return e}getKeyPageBelow(e){let n=this.layoutDelegate.getItemRect(e);if(!n)return null;let r=this.layoutDelegate.getVisibleRect().height,l=Math.min(this.layoutDelegate.getContentSize().height,n.y+r);for(;n&&n.y+n.height<l;){let i=this.getKeyBelow(e);if(i==null)break;n=this.layoutDelegate.getItemRect(i),e=i}return e}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,l=n??this.getFirstKey(),i=r.getItem(l);i.type==="cell"&&(l=i.parentKey);let o=!1;for(;l!=null;){let u=r.getItem(l);if(u.textValue){let s=u.textValue.slice(0,e.length);if(this.collator.compare(s,e)===0)return this.isRow(u)&&this.focusMode==="cell"?Me(le(u,this.collection)).key:u.key}l=this.findNextKey(l,s=>s.type==="item"),l==null&&!o&&(l=this.getFirstKey(),o=!0)}return null}constructor(e){this.collection=e.collection,this.disabledKeys=e.disabledKeys,this.disabledBehavior=e.disabledBehavior||"all",this.direction=e.direction,this.collator=e.collator,this.layoutDelegate=e.layoutDelegate||(e.layout?new ep(e.layout):new hr(e.ref)),this.focusMode=e.focusMode||"row"}}class ep{getContentSize(){return this.layout.getContentSize()}getItemRect(e){var n;return((n=this.layout.getLayoutInfo(e))===null||n===void 0?void 0:n.rect)||null}getVisibleRect(){return this.layout.virtualizer.visibleRect}constructor(e){this.layout=e}}const zr=new WeakMap;var xu={};xu={deselectedItem:t=>`${t.item} غير المحدد`,longPressToSelect:"اضغط مطولًا للدخول إلى وضع التحديد.",select:"تحديد",selectedAll:"جميع العناصر المحددة.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"لم يتم تحديد عناصر",one:()=>`${e.number(t.count)} عنصر محدد`,other:()=>`${e.number(t.count)} عنصر محدد`})}.`,selectedItem:t=>`${t.item} المحدد`};var Eu={};Eu={deselectedItem:t=>`${t.item} не е избран.`,longPressToSelect:"Натиснете и задръжте за да влезете в избирателен режим.",select:"Изберете",selectedAll:"Всички елементи са избрани.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Няма избрани елементи",one:()=>`${e.number(t.count)} избран елемент`,other:()=>`${e.number(t.count)} избрани елементи`})}.`,selectedItem:t=>`${t.item} избран.`};var Cu={};Cu={deselectedItem:t=>`Položka ${t.item} není vybrána.`,longPressToSelect:"Dlouhým stisknutím přejdete do režimu výběru.",select:"Vybrat",selectedAll:"Vybrány všechny položky.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nevybrány žádné položky",one:()=>`Vybrána ${e.number(t.count)} položka`,other:()=>`Vybráno ${e.number(t.count)} položek`})}.`,selectedItem:t=>`Vybrána položka ${t.item}.`};var Su={};Su={deselectedItem:t=>`${t.item} ikke valgt.`,longPressToSelect:"Lav et langt tryk for at aktivere valgtilstand.",select:"Vælg",selectedAll:"Alle elementer valgt.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Ingen elementer valgt",one:()=>`${e.number(t.count)} element valgt`,other:()=>`${e.number(t.count)} elementer valgt`})}.`,selectedItem:t=>`${t.item} valgt.`};var wu={};wu={deselectedItem:t=>`${t.item} nicht ausgewählt.`,longPressToSelect:"Gedrückt halten, um Auswahlmodus zu öffnen.",select:"Auswählen",selectedAll:"Alle Elemente ausgewählt.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Keine Elemente ausgewählt",one:()=>`${e.number(t.count)} Element ausgewählt`,other:()=>`${e.number(t.count)} Elemente ausgewählt`})}.`,selectedItem:t=>`${t.item} ausgewählt.`};var Pu={};Pu={deselectedItem:t=>`Δεν επιλέχθηκε το στοιχείο ${t.item}.`,longPressToSelect:"Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.",select:"Επιλογή",selectedAll:"Επιλέχθηκαν όλα τα στοιχεία.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Δεν επιλέχθηκαν στοιχεία",one:()=>`Επιλέχθηκε ${e.number(t.count)} στοιχείο`,other:()=>`Επιλέχθηκαν ${e.number(t.count)} στοιχεία`})}.`,selectedItem:t=>`Επιλέχθηκε το στοιχείο ${t.item}.`};var Du={};Du={deselectedItem:t=>`${t.item} not selected.`,select:"Select",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"No items selected",one:()=>`${e.number(t.count)} item selected`,other:()=>`${e.number(t.count)} items selected`})}.`,selectedAll:"All items selected.",selectedItem:t=>`${t.item} selected.`,longPressToSelect:"Long press to enter selection mode."};var ku={};ku={deselectedItem:t=>`${t.item} no seleccionado.`,longPressToSelect:"Mantenga pulsado para abrir el modo de selección.",select:"Seleccionar",selectedAll:"Todos los elementos seleccionados.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Ningún elemento seleccionado",one:()=>`${e.number(t.count)} elemento seleccionado`,other:()=>`${e.number(t.count)} elementos seleccionados`})}.`,selectedItem:t=>`${t.item} seleccionado.`};var Tu={};Tu={deselectedItem:t=>`${t.item} pole valitud.`,longPressToSelect:"Valikurežiimi sisenemiseks vajutage pikalt.",select:"Vali",selectedAll:"Kõik üksused valitud.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Üksusi pole valitud",one:()=>`${e.number(t.count)} üksus valitud`,other:()=>`${e.number(t.count)} üksust valitud`})}.`,selectedItem:t=>`${t.item} valitud.`};var Au={};Au={deselectedItem:t=>`Kohdetta ${t.item} ei valittu.`,longPressToSelect:"Siirry valintatilaan painamalla pitkään.",select:"Valitse",selectedAll:"Kaikki kohteet valittu.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Ei yhtään kohdetta valittu",one:()=>`${e.number(t.count)} kohde valittu`,other:()=>`${e.number(t.count)} kohdetta valittu`})}.`,selectedItem:t=>`${t.item} valittu.`};var Bu={};Bu={deselectedItem:t=>`${t.item} non sélectionné.`,longPressToSelect:"Appuyez de manière prolongée pour passer en mode de sélection.",select:"Sélectionner",selectedAll:"Tous les éléments sélectionnés.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Aucun élément sélectionné",one:()=>`${e.number(t.count)} élément sélectionné`,other:()=>`${e.number(t.count)} éléments sélectionnés`})}.`,selectedItem:t=>`${t.item} sélectionné.`};var Ku={};Ku={deselectedItem:t=>`${t.item} לא נבחר.`,longPressToSelect:"הקשה ארוכה לכניסה למצב בחירה.",select:"בחר",selectedAll:"כל הפריטים נבחרו.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"לא נבחרו פריטים",one:()=>`פריט ${e.number(t.count)} נבחר`,other:()=>`${e.number(t.count)} פריטים נבחרו`})}.`,selectedItem:t=>`${t.item} נבחר.`};var Mu={};Mu={deselectedItem:t=>`Stavka ${t.item} nije odabrana.`,longPressToSelect:"Dugo pritisnite za ulazak u način odabira.",select:"Odaberite",selectedAll:"Odabrane su sve stavke.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nije odabrana nijedna stavka",one:()=>`Odabrana je ${e.number(t.count)} stavka`,other:()=>`Odabrano je ${e.number(t.count)} stavki`})}.`,selectedItem:t=>`Stavka ${t.item} je odabrana.`};var Ru={};Ru={deselectedItem:t=>`${t.item} nincs kijelölve.`,longPressToSelect:"Nyomja hosszan a kijelöléshez.",select:"Kijelölés",selectedAll:"Az összes elem kijelölve.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Egy elem sincs kijelölve",one:()=>`${e.number(t.count)} elem kijelölve`,other:()=>`${e.number(t.count)} elem kijelölve`})}.`,selectedItem:t=>`${t.item} kijelölve.`};var Iu={};Iu={deselectedItem:t=>`${t.item} non selezionato.`,longPressToSelect:"Premi a lungo per passare alla modalità di selezione.",select:"Seleziona",selectedAll:"Tutti gli elementi selezionati.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nessun elemento selezionato",one:()=>`${e.number(t.count)} elemento selezionato`,other:()=>`${e.number(t.count)} elementi selezionati`})}.`,selectedItem:t=>`${t.item} selezionato.`};var Fu={};Fu={deselectedItem:t=>`${t.item} が選択されていません。`,longPressToSelect:"長押しして選択モードを開きます。",select:"選択",selectedAll:"すべての項目を選択しました。",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"項目が選択されていません",one:()=>`${e.number(t.count)} 項目を選択しました`,other:()=>`${e.number(t.count)} 項目を選択しました`})}。`,selectedItem:t=>`${t.item} を選択しました。`};var Nu={};Nu={deselectedItem:t=>`${t.item}이(가) 선택되지 않았습니다.`,longPressToSelect:"선택 모드로 들어가려면 길게 누르십시오.",select:"선택",selectedAll:"모든 항목이 선택되었습니다.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"선택된 항목이 없습니다",one:()=>`${e.number(t.count)}개 항목이 선택되었습니다`,other:()=>`${e.number(t.count)}개 항목이 선택되었습니다`})}.`,selectedItem:t=>`${t.item}이(가) 선택되었습니다.`};var _u={};_u={deselectedItem:t=>`${t.item} nepasirinkta.`,longPressToSelect:"Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.",select:"Pasirinkti",selectedAll:"Pasirinkti visi elementai.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nepasirinktas nė vienas elementas",one:()=>`Pasirinktas ${e.number(t.count)} elementas`,other:()=>`Pasirinkta elementų: ${e.number(t.count)}`})}.`,selectedItem:t=>`Pasirinkta: ${t.item}.`};var Lu={};Lu={deselectedItem:t=>`Vienums ${t.item} nav atlasīts.`,longPressToSelect:"Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.",select:"Atlasīt",selectedAll:"Atlasīti visi vienumi.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nav atlasīts neviens vienums",one:()=>`Atlasīto vienumu skaits: ${e.number(t.count)}`,other:()=>`Atlasīto vienumu skaits: ${e.number(t.count)}`})}.`,selectedItem:t=>`Atlasīts vienums ${t.item}.`};var Ou={};Ou={deselectedItem:t=>`${t.item} er ikke valgt.`,longPressToSelect:"Bruk et langt trykk for å gå inn i valgmodus.",select:"Velg",selectedAll:"Alle elementer er valgt.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Ingen elementer er valgt",one:()=>`${e.number(t.count)} element er valgt`,other:()=>`${e.number(t.count)} elementer er valgt`})}.`,selectedItem:t=>`${t.item} er valgt.`};var zu={};zu={deselectedItem:t=>`${t.item} niet geselecteerd.`,longPressToSelect:"Druk lang om de selectiemodus te openen.",select:"Selecteren",selectedAll:"Alle items geselecteerd.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Geen items geselecteerd",one:()=>`${e.number(t.count)} item geselecteerd`,other:()=>`${e.number(t.count)} items geselecteerd`})}.`,selectedItem:t=>`${t.item} geselecteerd.`};var ju={};ju={deselectedItem:t=>`Nie zaznaczono ${t.item}.`,longPressToSelect:"Naciśnij i przytrzymaj, aby wejść do trybu wyboru.",select:"Zaznacz",selectedAll:"Wszystkie zaznaczone elementy.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nie zaznaczono żadnych elementów",one:()=>`${e.number(t.count)} zaznaczony element`,other:()=>`${e.number(t.count)} zaznaczonych elementów`})}.`,selectedItem:t=>`Zaznaczono ${t.item}.`};var Vu={};Vu={deselectedItem:t=>`${t.item} não selecionado.`,longPressToSelect:"Mantenha pressionado para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nenhum item selecionado",one:()=>`${e.number(t.count)} item selecionado`,other:()=>`${e.number(t.count)} itens selecionados`})}.`,selectedItem:t=>`${t.item} selecionado.`};var Hu={};Hu={deselectedItem:t=>`${t.item} não selecionado.`,longPressToSelect:"Prima continuamente para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nenhum item selecionado",one:()=>`${e.number(t.count)} item selecionado`,other:()=>`${e.number(t.count)} itens selecionados`})}.`,selectedItem:t=>`${t.item} selecionado.`};var Wu={};Wu={deselectedItem:t=>`${t.item} neselectat.`,longPressToSelect:"Apăsați lung pentru a intra în modul de selectare.",select:"Selectare",selectedAll:"Toate elementele selectate.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Niciun element selectat",one:()=>`${e.number(t.count)} element selectat`,other:()=>`${e.number(t.count)} elemente selectate`})}.`,selectedItem:t=>`${t.item} selectat.`};var Uu={};Uu={deselectedItem:t=>`${t.item} не выбрано.`,longPressToSelect:"Нажмите и удерживайте для входа в режим выбора.",select:"Выбрать",selectedAll:"Выбраны все элементы.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Нет выбранных элементов",one:()=>`${e.number(t.count)} элемент выбран`,other:()=>`${e.number(t.count)} элементов выбрано`})}.`,selectedItem:t=>`${t.item} выбрано.`};var Gu={};Gu={deselectedItem:t=>`Nevybraté položky: ${t.item}.`,longPressToSelect:"Dlhším stlačením prejdite do režimu výberu.",select:"Vybrať",selectedAll:"Všetky vybraté položky.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Žiadne vybraté položky",one:()=>`${e.number(t.count)} vybratá položka`,other:()=>`Počet vybratých položiek:${e.number(t.count)}`})}.`,selectedItem:t=>`Vybraté položky: ${t.item}.`};var Yu={};Yu={deselectedItem:t=>`Element ${t.item} ni izbran.`,longPressToSelect:"Za izbirni način pritisnite in dlje časa držite.",select:"Izberite",selectedAll:"Vsi elementi so izbrani.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Noben element ni izbran",one:()=>`${e.number(t.count)} element je izbran`,other:()=>`${e.number(t.count)} elementov je izbranih`})}.`,selectedItem:t=>`Element ${t.item} je izbran.`};var qu={};qu={deselectedItem:t=>`${t.item} nije izabrano.`,longPressToSelect:"Dugo pritisnite za ulazak u režim biranja.",select:"Izaberite",selectedAll:"Izabrane su sve stavke.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nije izabrana nijedna stavka",one:()=>`Izabrana je ${e.number(t.count)} stavka`,other:()=>`Izabrano je ${e.number(t.count)} stavki`})}.`,selectedItem:t=>`${t.item} je izabrano.`};var Xu={};Xu={deselectedItem:t=>`${t.item} ej markerat.`,longPressToSelect:"Tryck länge när du vill öppna väljarläge.",select:"Markera",selectedAll:"Alla markerade objekt.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Inga markerade objekt",one:()=>`${e.number(t.count)} markerat objekt`,other:()=>`${e.number(t.count)} markerade objekt`})}.`,selectedItem:t=>`${t.item} markerat.`};var Zu={};Zu={deselectedItem:t=>`${t.item} seçilmedi.`,longPressToSelect:"Seçim moduna girmek için uzun basın.",select:"Seç",selectedAll:"Tüm ögeler seçildi.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Hiçbir öge seçilmedi",one:()=>`${e.number(t.count)} öge seçildi`,other:()=>`${e.number(t.count)} öge seçildi`})}.`,selectedItem:t=>`${t.item} seçildi.`};var Ju={};Ju={deselectedItem:t=>`${t.item} не вибрано.`,longPressToSelect:"Виконайте довге натиснення, щоб перейти в режим вибору.",select:"Вибрати",selectedAll:"Усі елементи вибрано.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Жодних елементів не вибрано",one:()=>`${e.number(t.count)} елемент вибрано`,other:()=>`Вибрано елементів: ${e.number(t.count)}`})}.`,selectedItem:t=>`${t.item} вибрано.`};var Qu={};Qu={deselectedItem:t=>`未选择 ${t.item}。`,longPressToSelect:"长按以进入选择模式。",select:"选择",selectedAll:"已选择所有项目。",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"未选择项目",one:()=>`已选择 ${e.number(t.count)} 个项目`,other:()=>`已选择 ${e.number(t.count)} 个项目`})}。`,selectedItem:t=>`已选择 ${t.item}。`};var es={};es={deselectedItem:t=>`未選取「${t.item}」。`,longPressToSelect:"長按以進入選擇模式。",select:"選取",selectedAll:"已選取所有項目。",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"未選取任何項目",one:()=>`已選取 ${e.number(t.count)} 個項目`,other:()=>`已選取 ${e.number(t.count)} 個項目`})}。`,selectedItem:t=>`已選取「${t.item}」。`};var jr={};jr={"ar-AE":xu,"bg-BG":Eu,"cs-CZ":Cu,"da-DK":Su,"de-DE":wu,"el-GR":Pu,"en-US":Du,"es-ES":ku,"et-EE":Tu,"fi-FI":Au,"fr-FR":Bu,"he-IL":Ku,"hr-HR":Mu,"hu-HU":Ru,"it-IT":Iu,"ja-JP":Fu,"ko-KR":Nu,"lt-LT":_u,"lv-LV":Lu,"nb-NO":Ou,"nl-NL":zu,"pl-PL":ju,"pt-BR":Vu,"pt-PT":Hu,"ro-RO":Wu,"ru-RU":Uu,"sk-SK":Gu,"sl-SI":Yu,"sr-SP":qu,"sv-SE":Xu,"tr-TR":Zu,"uk-UA":Ju,"zh-CN":Qu,"zh-TW":es};function tp(t){return t&&t.__esModule?t.default:t}function np(t,e){let{getRowText:n=o=>{var u,s,c,d;return(d=(u=(s=e.collection).getTextValue)===null||u===void 0?void 0:u.call(s,o))!==null&&d!==void 0?d:(c=e.collection.getItem(o))===null||c===void 0?void 0:c.textValue}}=t,r=ot(tp(jr),"@react-aria/grid"),l=e.selectionManager.rawSelection,i=a.useRef(l);fi(()=>{var o;if(!e.selectionManager.isFocused){i.current=l;return}let u=Ul(l,i.current),s=Ul(i.current,l),c=e.selectionManager.selectionBehavior==="replace",d=[];if(e.selectionManager.selectedKeys.size===1&&c){if(e.collection.getItem(e.selectionManager.selectedKeys.keys().next().value)){let f=n(e.selectionManager.selectedKeys.keys().next().value);f&&d.push(r.format("selectedItem",{item:f}))}}else if(u.size===1&&s.size===0){let f=n(u.keys().next().value);f&&d.push(r.format("selectedItem",{item:f}))}else if(s.size===1&&u.size===0&&e.collection.getItem(s.keys().next().value)){let f=n(s.keys().next().value);f&&d.push(r.format("deselectedItem",{item:f}))}e.selectionManager.selectionMode==="multiple"&&(d.length===0||l==="all"||l.size>1||i.current==="all"||((o=i.current)===null||o===void 0?void 0:o.size)>1)&&d.push(l==="all"?r.format("selectedAll"):r.format("selectedCount",{count:l.size})),d.length>0&&cn(d.join(" ")),i.current=l},[l])}function Ul(t,e){let n=new Set;if(t==="all"||e==="all")return n;for(let r of t.keys())e.has(r)||n.add(r);return n}function rp(t){return t&&t.__esModule?t.default:t}function lp(t){let e=ot(rp(jr),"@react-aria/grid"),n=Ci(),r=(n==="pointer"||n==="virtual"||n==null)&&typeof window<"u"&&"ontouchstart"in window,l=a.useMemo(()=>{let o=t.selectionManager.selectionMode,u=t.selectionManager.selectionBehavior,s;return r&&(s=e.format("longPressToSelect")),u==="replace"&&o!=="none"&&t.hasItemActions?s:void 0},[t.selectionManager.selectionMode,t.selectionManager.selectionBehavior,t.hasItemActions,e,r]);return mn(l)}function ip(t,e,n){let{isVirtualized:r,keyboardDelegate:l,focusMode:i,scrollRef:o,getRowText:u,onRowAction:s,onCellAction:c}=t,{selectionManager:d}=e;!t["aria-label"]&&!t["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let f=En({usage:"search",sensitivity:"base"}),{direction:p}=Le(),v=e.selectionManager.disabledBehavior,b=a.useMemo(()=>l||new yu({collection:e.collection,disabledKeys:e.disabledKeys,disabledBehavior:v,ref:n,direction:p,collator:f,focusMode:i}),[l,e.collection,e.disabledKeys,v,n,p,f,i]),{collectionProps:y}=Do({ref:n,selectionManager:d,keyboardDelegate:b,isVirtualized:r,scrollRef:o}),$=de(t.id);zr.set(e,{keyboardDelegate:b,actions:{onRowAction:s,onCellAction:c}});let C=lp({selectionManager:d,hasItemActions:!!(s||c)}),S=se(t,{labelable:!0}),x=a.useCallback(I=>{if(d.isFocused){I.currentTarget.contains(I.target)||d.setFocused(!1);return}I.currentTarget.contains(I.target)&&d.setFocused(!0)},[d]),T=a.useMemo(()=>({onBlur:y.onBlur,onFocus:x}),[x,y.onBlur]),w=Id(n,{isDisabled:e.collection.size!==0}),D=j(S,{role:"grid",id:$,"aria-multiselectable":d.selectionMode==="multiple"?"true":void 0},e.isKeyboardNavigationDisabled?T:y,e.collection.size===0&&{tabIndex:w?-1:0},C);return r&&(D["aria-rowcount"]=e.collection.size,D["aria-colcount"]=e.collection.columnCount),np({getRowText:u},e),{gridProps:D}}function op(){return{rowGroupProps:{role:"rowgroup"}}}function up(t,e,n){var r,l;let{node:i,isVirtualized:o,shouldSelectOnPressUp:u,onAction:s}=t,{actions:c}=zr.get(e),d=c.onRowAction?()=>c.onRowAction(i.key):s,{itemProps:f,...p}=Sn({selectionManager:e.selectionManager,key:i.key,ref:n,isVirtualized:o,shouldSelectOnPressUp:u,onAction:d||!(i==null||(r=i.props)===null||r===void 0)&&r.onAction?ke(i==null||(l=i.props)===null||l===void 0?void 0:l.onAction,d):void 0,isDisabled:e.collection.size===0}),v=e.selectionManager.isSelected(i.key),b={role:"row","aria-selected":e.selectionManager.selectionMode!=="none"?v:void 0,"aria-disabled":p.isDisabled||void 0,...f};return o&&(b["aria-rowindex"]=i.index+1),{rowProps:b,...p}}function ts(t,e,n){let{node:r,isVirtualized:l,focusMode:i="child",shouldSelectOnPressUp:o,onAction:u}=t,{direction:s}=Le(),{keyboardDelegate:c,actions:{onCellAction:d}}=zr.get(e),f=a.useRef(null),p=()=>{let x=ve(n.current);if(i==="child"){if(n.current.contains(document.activeElement)&&n.current!==document.activeElement)return;let T=e.selectionManager.childFocusStrategy==="last"?qn(x):x.firstChild();if(T){ce(T);return}}(f.current!=null&&r.key!==f.current||!n.current.contains(document.activeElement))&&ce(n.current)},{itemProps:v,isPressed:b}=Sn({selectionManager:e.selectionManager,key:r.key,ref:n,isVirtualized:l,focus:p,shouldSelectOnPressUp:o,onAction:d?()=>d(r.key):u,isDisabled:e.collection.size===0}),C=j(v,{role:"gridcell",onKeyDownCapture:x=>{if(!x.currentTarget.contains(x.target)||e.isKeyboardNavigationDisabled)return;let T=ve(n.current);switch(T.currentNode=document.activeElement,x.key){case"ArrowLeft":{let w=s==="rtl"?T.nextNode():T.previousNode();if(i==="child"&&w===n.current&&(w=null),x.preventDefault(),x.stopPropagation(),w)ce(w),We(w,{containingElement:He(n.current)});else{if(c.getKeyLeftOf(r.key)!==r.key){n.current.parentElement.dispatchEvent(new KeyboardEvent(x.nativeEvent.type,x.nativeEvent));break}i==="cell"&&s==="rtl"?(ce(n.current),We(n.current,{containingElement:He(n.current)})):(T.currentNode=n.current,w=s==="rtl"?T.firstChild():qn(T),w&&(ce(w),We(w,{containingElement:He(n.current)})))}break}case"ArrowRight":{let w=s==="rtl"?T.previousNode():T.nextNode();if(i==="child"&&w===n.current&&(w=null),x.preventDefault(),x.stopPropagation(),w)ce(w),We(w,{containingElement:He(n.current)});else{if(c.getKeyRightOf(r.key)!==r.key){n.current.parentElement.dispatchEvent(new KeyboardEvent(x.nativeEvent.type,x.nativeEvent));break}i==="cell"&&s==="ltr"?(ce(n.current),We(n.current,{containingElement:He(n.current)})):(T.currentNode=n.current,w=s==="rtl"?qn(T):T.firstChild(),w&&(ce(w),We(w,{containingElement:He(n.current)})))}break}case"ArrowUp":case"ArrowDown":!x.altKey&&n.current.contains(x.target)&&(x.stopPropagation(),x.preventDefault(),n.current.parentElement.dispatchEvent(new KeyboardEvent(x.nativeEvent.type,x.nativeEvent)));break}},onFocus:x=>{if(f.current=r.key,x.target!==n.current){lt()||e.selectionManager.setFocusedKey(r.key);return}requestAnimationFrame(()=>{i==="child"&&document.activeElement===n.current&&p()})}});var S;return l&&(C["aria-colindex"]=((S=r.colIndex)!==null&&S!==void 0?S:r.index)+1),o&&C.tabIndex!=null&&C.onPointerDown==null&&(C.onPointerDown=x=>{let T=x.currentTarget,w=T.getAttribute("tabindex");T.removeAttribute("tabindex"),requestAnimationFrame(()=>{T.setAttribute("tabindex",w)})}),{gridCellProps:C,isPressed:b}}function qn(t){let e,n;do n=t.lastChild(),n&&(e=n);while(n);return e}const ns=new WeakMap;function sp(t,e,n){let{value:r,children:l,"aria-label":i,"aria-labelledby":o}=t;const u=t.isDisabled||e.isDisabled;let s=l!=null,c=i!=null||o!=null;!s&&!c&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let d=e.selectedValue===r,f=h=>{h.stopPropagation(),e.setSelectedValue(r)},{pressProps:p,isPressed:v}=Fe({isDisabled:u}),{pressProps:b,isPressed:y}=Fe({isDisabled:u,onPress(){e.setSelectedValue(r)}}),{focusableProps:$}=Et(j(t,{onFocus:()=>e.setLastFocusedValue(r)}),n),C=j(p,$),S=se(t,{labelable:!0}),x=-1;e.selectedValue!=null?e.selectedValue===r&&(x=0):(e.lastFocusedValue===r||e.lastFocusedValue==null)&&(x=0),u&&(x=void 0);let{name:T,descriptionId:w,errorMessageId:D,validationBehavior:I}=ns.get(e);return bn(n,e.selectedValue,e.setSelectedValue),Mr({validationBehavior:I},e,n),{labelProps:j(b,{onClick:h=>h.preventDefault()}),inputProps:j(S,{...C,type:"radio",name:T,tabIndex:x,disabled:u,required:e.isRequired&&I==="native",checked:d,value:r,onChange:f,"aria-describedby":[t["aria-describedby"],e.isInvalid?D:null,w].filter(Boolean).join(" ")||void 0}),isDisabled:u,isSelected:d,isPressed:v||y}}function ap(t,e){let{name:n,isReadOnly:r,isRequired:l,isDisabled:i,orientation:o="vertical",validationBehavior:u="aria"}=t,{direction:s}=Le(),{isInvalid:c,validationErrors:d,validationDetails:f}=e.displayValidation,{labelProps:p,fieldProps:v,descriptionProps:b,errorMessageProps:y}=Ir({...t,labelElementType:"span",isInvalid:e.isInvalid,errorMessage:t.errorMessage||d}),$=se(t,{labelable:!0}),{focusWithinProps:C}=jt({onBlurWithin(T){var w;(w=t.onBlur)===null||w===void 0||w.call(t,T),e.selectedValue||e.setLastFocusedValue(null)},onFocusWithin:t.onFocus,onFocusWithinChange:t.onFocusChange}),S=T=>{let w;switch(T.key){case"ArrowRight":s==="rtl"&&o!=="vertical"?w="prev":w="next";break;case"ArrowLeft":s==="rtl"&&o!=="vertical"?w="next":w="prev";break;case"ArrowDown":w="next";break;case"ArrowUp":w="prev";break;default:return}T.preventDefault();let D=ve(T.currentTarget,{from:T.target}),I;w==="next"?(I=D.nextNode(),I||(D.currentNode=T.currentTarget,I=D.firstChild())):(I=D.previousNode(),I||(D.currentNode=T.currentTarget,I=D.lastChild())),I&&(I.focus(),e.setSelectedValue(I.value))},x=de(n);return ns.set(e,{name:x,descriptionId:b.id,errorMessageId:y.id,validationBehavior:u}),{radioGroupProps:j($,{role:"radiogroup",onKeyDown:S,"aria-invalid":e.isInvalid||void 0,"aria-errormessage":t["aria-errormessage"],"aria-readonly":r||void 0,"aria-required":l||void 0,"aria-disabled":i||void 0,"aria-orientation":o,...v,...C}),labelProps:p,descriptionProps:b,errorMessageProps:y,isInvalid:c,validationErrors:d,validationDetails:f}}var rs={};rs={"Clear search":"مسح البحث"};var ls={};ls={"Clear search":"Изчистване на търсене"};var is={};is={"Clear search":"Vymazat hledání"};var os={};os={"Clear search":"Ryd søgning"};var us={};us={"Clear search":"Suche zurücksetzen"};var ss={};ss={"Clear search":"Απαλοιφή αναζήτησης"};var as={};as={"Clear search":"Clear search"};var cs={};cs={"Clear search":"Borrar búsqueda"};var ds={};ds={"Clear search":"Tühjenda otsing"};var fs={};fs={"Clear search":"Tyhjennä haku"};var ps={};ps={"Clear search":"Effacer la recherche"};var vs={};vs={"Clear search":"נקה חיפוש"};var hs={};hs={"Clear search":"Obriši pretragu"};var ms={};ms={"Clear search":"Keresés törlése"};var bs={};bs={"Clear search":"Cancella ricerca"};var gs={};gs={"Clear search":"検索をクリア"};var $s={};$s={"Clear search":"검색 지우기"};var ys={};ys={"Clear search":"Išvalyti iešką"};var xs={};xs={"Clear search":"Notīrīt meklēšanu"};var Es={};Es={"Clear search":"Tøm søk"};var Cs={};Cs={"Clear search":"Zoekactie wissen"};var Ss={};Ss={"Clear search":"Wyczyść zawartość wyszukiwania"};var ws={};ws={"Clear search":"Limpar pesquisa"};var Ps={};Ps={"Clear search":"Limpar pesquisa"};var Ds={};Ds={"Clear search":"Ştergeţi căutarea"};var ks={};ks={"Clear search":"Очистить поиск"};var Ts={};Ts={"Clear search":"Vymazať vyhľadávanie"};var As={};As={"Clear search":"Počisti iskanje"};var Bs={};Bs={"Clear search":"Obriši pretragu"};var Ks={};Ks={"Clear search":"Rensa sökning"};var Ms={};Ms={"Clear search":"Aramayı temizle"};var Rs={};Rs={"Clear search":"Очистити пошук"};var Is={};Is={"Clear search":"清除搜索"};var Fs={};Fs={"Clear search":"清除搜尋條件"};var Ns={};Ns={"ar-AE":rs,"bg-BG":ls,"cs-CZ":is,"da-DK":os,"de-DE":us,"el-GR":ss,"en-US":as,"es-ES":cs,"et-EE":ds,"fi-FI":fs,"fr-FR":ps,"he-IL":vs,"hr-HR":hs,"hu-HU":ms,"it-IT":bs,"ja-JP":gs,"ko-KR":$s,"lt-LT":ys,"lv-LV":xs,"nb-NO":Es,"nl-NL":Cs,"pl-PL":Ss,"pt-BR":ws,"pt-PT":Ps,"ro-RO":Ds,"ru-RU":ks,"sk-SK":Ts,"sl-SI":As,"sr-SP":Bs,"sv-SE":Ks,"tr-TR":Ms,"uk-UA":Rs,"zh-CN":Is,"zh-TW":Fs};function cp(t){return t&&t.__esModule?t.default:t}function dp(t,e,n){let r=ot(cp(Ns),"@react-aria/searchfield"),{isDisabled:l,isReadOnly:i,onSubmit:o,onClear:u,type:s="search"}=t,c=C=>{const S=C.key;S==="Enter"&&(l||i)&&C.preventDefault(),!(l||i)&&(S==="Enter"&&o&&(C.preventDefault(),o(e.value)),S==="Escape"&&(e.value===""?C.continuePropagation():(e.setValue(""),u&&u())))},d=()=>{e.setValue(""),u&&u()},f=()=>{var C;(C=n.current)===null||C===void 0||C.focus()},{labelProps:p,inputProps:v,descriptionProps:b,errorMessageProps:y,...$}=Ni({...t,value:e.value,onChange:e.setValue,onKeyDown:i?t.onKeyDown:ke(c,t.onKeyDown),type:s},n);return{labelProps:p,inputProps:{...v,defaultValue:void 0},clearButtonProps:{"aria-label":r.format("Clear search"),excludeFromTabOrder:!0,preventFocusOnPress:!0,isDisabled:l||i,onPress:d,onPressStart:f},descriptionProps:b,errorMessageProps:y,...$}}const _s=new WeakMap;function Ls(t,e,n){let{keyboardDelegate:r,isDisabled:l,isRequired:i,name:o,validationBehavior:u="aria"}=t,s=En({usage:"search",sensitivity:"base"}),c=a.useMemo(()=>r||new ko(e.collection,e.disabledKeys,null,s),[r,e.collection,e.disabledKeys,s]),{menuTriggerProps:d,menuProps:f}=vu({isDisabled:l,type:"listbox"},e,n),p=h=>{switch(h.key){case"ArrowLeft":{h.preventDefault();let B=e.selectedKey!=null?c.getKeyAbove(e.selectedKey):c.getFirstKey();B&&e.setSelectedKey(B);break}case"ArrowRight":{h.preventDefault();let B=e.selectedKey!=null?c.getKeyBelow(e.selectedKey):c.getFirstKey();B&&e.setSelectedKey(B);break}}},{typeSelectProps:v}=Po({keyboardDelegate:c,selectionManager:e.selectionManager,onTypeSelect(h){e.setSelectedKey(h)}}),{isInvalid:b,validationErrors:y,validationDetails:$}=e.displayValidation,{labelProps:C,fieldProps:S,descriptionProps:x,errorMessageProps:T}=Ir({...t,labelElementType:"span",isInvalid:b,errorMessage:t.errorMessage||y});v.onKeyDown=v.onKeyDownCapture,delete v.onKeyDownCapture;let w=se(t,{labelable:!0}),D=j(v,d,S),I=de();return _s.set(e,{isDisabled:l,isRequired:i,name:o,validationBehavior:u}),{labelProps:{...C,onClick:()=>{t.isDisabled||(n.current.focus(),Ei("keyboard"))}},triggerProps:j(w,{...D,isDisabled:l,onKeyDown:ke(D.onKeyDown,p,t.onKeyDown),onKeyUp:t.onKeyUp,"aria-labelledby":[I,D["aria-labelledby"],D["aria-label"]&&!D["aria-labelledby"]?D.id:null].filter(Boolean).join(" "),onFocus(h){e.isFocused||(t.onFocus&&t.onFocus(h),t.onFocusChange&&t.onFocusChange(!0),e.setFocused(!0))},onBlur(h){e.isOpen||(t.onBlur&&t.onBlur(h),t.onFocusChange&&t.onFocusChange(!1),e.setFocused(!1))}}),valueProps:{id:I},menuProps:{...f,autoFocus:e.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:h=>{h.currentTarget.contains(h.relatedTarget)||(t.onBlur&&t.onBlur(h),t.onFocusChange&&t.onFocusChange(!1),e.setFocused(!1))},"aria-labelledby":[S["aria-labelledby"],D["aria-label"]&&!S["aria-labelledby"]?D.id:null].filter(Boolean).join(" ")},descriptionProps:x,errorMessageProps:T,isInvalid:b,validationErrors:y,validationDetails:$}}function fp(t,e,n){let r=_s.get(e)||{},{autoComplete:l,name:i=r.name,isDisabled:o=r.isDisabled}=t,{validationBehavior:u,isRequired:s}=r,c=Ci(),{visuallyHiddenProps:d}=Fi();bn(t.selectRef,e.selectedKey,e.setSelectedKey),Mr({validationBehavior:u,focus:()=>n.current.focus()},e,t.selectRef);var f;return{containerProps:{...d,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{type:"text",tabIndex:c==null||e.isFocused||e.isOpen?-1:0,style:{fontSize:16},onFocus:()=>n.current.focus(),disabled:o},selectProps:{tabIndex:-1,autoComplete:l,disabled:o,required:u==="native"&&s,name:i,value:(f=e.selectedKey)!==null&&f!==void 0?f:"",onChange:p=>e.setSelectedKey(p.target.value)}}}function Os(t){let{state:e,triggerRef:n,label:r,name:l,isDisabled:i}=t,o=a.useRef(null),{containerProps:u,inputProps:s,selectProps:c}=fp({...t,selectRef:o},e,n);var d;return e.collection.size<=300?a.createElement("div",{...u,"data-testid":"hidden-select-container"},a.createElement("input",s),a.createElement("label",null,r,a.createElement("select",{...c,ref:o},a.createElement("option",null),[...e.collection.getKeys()].map(f=>{let p=e.collection.getItem(f);if(p.type==="item")return a.createElement("option",{key:p.key,value:p.key},p.textValue)})))):l?a.createElement("input",{type:"hidden",autoComplete:c.autoComplete,name:l,disabled:i,value:(d=e.selectedKey)!==null&&d!==void 0?d:""}):null}function pp(t,e,n){let{labelProps:r,inputProps:l,isSelected:i,isPressed:o,isDisabled:u,isReadOnly:s}=nf(t,e,n);return{labelProps:r,inputProps:{...l,role:"switch",checked:i},isSelected:i,isPressed:o,isDisabled:u,isReadOnly:s}}const Vr=new WeakMap;function gr(t){return typeof t=="string"?t.replace(/\s*/g,""):""+t}function vp(t,e){let n=Vr.get(t);if(!n)throw new Error("Unknown grid");return`${n}-${gr(e)}`}function zs(t,e,n){let r=Vr.get(t);if(!r)throw new Error("Unknown grid");return`${r}-${gr(e)}-${gr(n)}`}function hp(t,e){return[...t.collection.rowHeaderColumnKeys].map(n=>zs(t,e,n)).join(" ")}var js={};js={ascending:"تصاعدي",ascendingSort:t=>`ترتيب حسب العمود ${t.columnName} بترتيب تصاعدي`,columnSize:t=>`${t.value} بالبكسل`,descending:"تنازلي",descendingSort:t=>`ترتيب حسب العمود ${t.columnName} بترتيب تنازلي`,resizerDescription:"اضغط على مفتاح Enter لبدء تغيير الحجم",select:"تحديد",selectAll:"تحديد الكل",sortable:"عمود قابل للترتيب"};var Vs={};Vs={ascending:"възходящ",ascendingSort:t=>`сортирано по колона ${t.columnName} във възходящ ред`,columnSize:t=>`${t.value} пиксела`,descending:"низходящ",descendingSort:t=>`сортирано по колона ${t.columnName} в низходящ ред`,resizerDescription:"Натиснете „Enter“, за да започнете да преоразмерявате",select:"Изберете",selectAll:"Изберете всичко",sortable:"сортираща колона"};var Hs={};Hs={ascending:"vzestupně",ascendingSort:t=>`řazeno vzestupně podle sloupce ${t.columnName}`,columnSize:t=>`${t.value} pixelů`,descending:"sestupně",descendingSort:t=>`řazeno sestupně podle sloupce ${t.columnName}`,resizerDescription:"Stisknutím klávesy Enter začnete měnit velikost",select:"Vybrat",selectAll:"Vybrat vše",sortable:"sloupec s možností řazení"};var Ws={};Ws={ascending:"stigende",ascendingSort:t=>`sorteret efter kolonne ${t.columnName} i stigende rækkefølge`,columnSize:t=>`${t.value} pixels`,descending:"faldende",descendingSort:t=>`sorteret efter kolonne ${t.columnName} i faldende rækkefølge`,resizerDescription:"Tryk på Enter for at ændre størrelse",select:"Vælg",selectAll:"Vælg alle",sortable:"sorterbar kolonne"};var Us={};Us={ascending:"aufsteigend",ascendingSort:t=>`sortiert nach Spalte ${t.columnName} in aufsteigender Reihenfolge`,columnSize:t=>`${t.value} Pixel`,descending:"absteigend",descendingSort:t=>`sortiert nach Spalte ${t.columnName} in absteigender Reihenfolge`,resizerDescription:"Eingabetaste zum Starten der Größenänderung drücken",select:"Auswählen",selectAll:"Alles auswählen",sortable:"sortierbare Spalte"};var Gs={};Gs={ascending:"αύξουσα",ascendingSort:t=>`διαλογή ανά στήλη ${t.columnName} σε αύξουσα σειρά`,columnSize:t=>`${t.value} pixel`,descending:"φθίνουσα",descendingSort:t=>`διαλογή ανά στήλη ${t.columnName} σε φθίνουσα σειρά`,resizerDescription:"Πατήστε Enter για έναρξη της αλλαγής μεγέθους",select:"Επιλογή",selectAll:"Επιλογή όλων",sortable:"Στήλη διαλογής"};var Ys={};Ys={select:"Select",selectAll:"Select All",sortable:"sortable column",ascending:"ascending",descending:"descending",ascendingSort:t=>`sorted by column ${t.columnName} in ascending order`,descendingSort:t=>`sorted by column ${t.columnName} in descending order`,columnSize:t=>`${t.value} pixels`,resizerDescription:"Press Enter to start resizing"};var qs={};qs={ascending:"de subida",ascendingSort:t=>`ordenado por columna ${t.columnName} en orden de subida`,columnSize:t=>`${t.value} píxeles`,descending:"de bajada",descendingSort:t=>`ordenado por columna ${t.columnName} en orden de bajada`,resizerDescription:"Pulse Intro para empezar a redimensionar",select:"Seleccionar",selectAll:"Seleccionar todos",sortable:"columna ordenable"};var Xs={};Xs={ascending:"tõusev järjestus",ascendingSort:t=>`sorditud veeru järgi ${t.columnName} tõusvas järjestuses`,columnSize:t=>`${t.value} pikslit`,descending:"laskuv järjestus",descendingSort:t=>`sorditud veeru järgi ${t.columnName} laskuvas järjestuses`,resizerDescription:"Suuruse muutmise alustamiseks vajutage klahvi Enter",select:"Vali",selectAll:"Vali kõik",sortable:"sorditav veerg"};var Zs={};Zs={ascending:"nouseva",ascendingSort:t=>`lajiteltu sarakkeen ${t.columnName} mukaan nousevassa järjestyksessä`,columnSize:t=>`${t.value} pikseliä`,descending:"laskeva",descendingSort:t=>`lajiteltu sarakkeen ${t.columnName} mukaan laskevassa järjestyksessä`,resizerDescription:"Aloita koon muutos painamalla Enter-näppäintä",select:"Valitse",selectAll:"Valitse kaikki",sortable:"lajiteltava sarake"};var Js={};Js={ascending:"croissant",ascendingSort:t=>`trié en fonction de la colonne ${t.columnName} par ordre croissant`,columnSize:t=>`${t.value} pixels`,descending:"décroissant",descendingSort:t=>`trié en fonction de la colonne ${t.columnName} par ordre décroissant`,resizerDescription:"Appuyez sur Entrée pour commencer le redimensionnement.",select:"Sélectionner",selectAll:"Sélectionner tout",sortable:"colonne triable"};var Qs={};Qs={ascending:"עולה",ascendingSort:t=>`מוין לפי עמודה ${t.columnName} בסדר עולה`,columnSize:t=>`${t.value} פיקסלים`,descending:"יורד",descendingSort:t=>`מוין לפי עמודה ${t.columnName} בסדר יורד`,resizerDescription:"הקש Enter כדי לשנות את הגודל",select:"בחר",selectAll:"בחר הכול",sortable:"עמודה שניתן למיין"};var ea={};ea={ascending:"rastući",ascendingSort:t=>`razvrstano po stupcima ${t.columnName} rastućem redoslijedom`,columnSize:t=>`${t.value} piksela`,descending:"padajući",descendingSort:t=>`razvrstano po stupcima ${t.columnName} padajućim redoslijedom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Odaberite",selectAll:"Odaberite sve",sortable:"stupac koji se može razvrstati"};var ta={};ta={ascending:"növekvő",ascendingSort:t=>`rendezve a(z) ${t.columnName} oszlop szerint, növekvő sorrendben`,columnSize:t=>`${t.value} képpont`,descending:"csökkenő",descendingSort:t=>`rendezve a(z) ${t.columnName} oszlop szerint, csökkenő sorrendben`,resizerDescription:"Nyomja le az Enter billentyűt az átméretezés megkezdéséhez",select:"Kijelölés",selectAll:"Összes kijelölése",sortable:"rendezendő oszlop"};var na={};na={ascending:"crescente",ascendingSort:t=>`in ordine crescente in base alla colonna ${t.columnName}`,columnSize:t=>`${t.value} pixel`,descending:"decrescente",descendingSort:t=>`in ordine decrescente in base alla colonna ${t.columnName}`,resizerDescription:"Premi Invio per iniziare a ridimensionare",select:"Seleziona",selectAll:"Seleziona tutto",sortable:"colonna ordinabile"};var ra={};ra={ascending:"昇順",ascendingSort:t=>`列 ${t.columnName} を昇順で並べ替え`,columnSize:t=>`${t.value} ピクセル`,descending:"降順",descendingSort:t=>`列 ${t.columnName} を降順で並べ替え`,resizerDescription:"Enter キーを押してサイズ変更を開始",select:"選択",selectAll:"すべて選択",sortable:"並べ替え可能な列"};var la={};la={ascending:"오름차순",ascendingSort:t=>`${t.columnName} 열을 기준으로 오름차순으로 정렬됨`,columnSize:t=>`${t.value} 픽셀`,descending:"내림차순",descendingSort:t=>`${t.columnName} 열을 기준으로 내림차순으로 정렬됨`,resizerDescription:"크기 조정을 시작하려면 Enter를 누르세요.",select:"선택",selectAll:"모두 선택",sortable:"정렬 가능한 열"};var ia={};ia={ascending:"didėjančia tvarka",ascendingSort:t=>`surikiuota pagal stulpelį ${t.columnName} didėjančia tvarka`,columnSize:t=>`${t.value} piks.`,descending:"mažėjančia tvarka",descendingSort:t=>`surikiuota pagal stulpelį ${t.columnName} mažėjančia tvarka`,resizerDescription:"Paspauskite „Enter“, kad pradėtumėte keisti dydį",select:"Pasirinkti",selectAll:"Pasirinkti viską",sortable:"rikiuojamas stulpelis"};var oa={};oa={ascending:"augošā secībā",ascendingSort:t=>`kārtots pēc kolonnas ${t.columnName} augošā secībā`,columnSize:t=>`${t.value} pikseļi`,descending:"dilstošā secībā",descendingSort:t=>`kārtots pēc kolonnas ${t.columnName} dilstošā secībā`,resizerDescription:"Nospiediet Enter, lai sāktu izmēru mainīšanu",select:"Atlasīt",selectAll:"Atlasīt visu",sortable:"kārtojamā kolonna"};var ua={};ua={ascending:"stigende",ascendingSort:t=>`sortert etter kolonne ${t.columnName} i stigende rekkefølge`,columnSize:t=>`${t.value} piksler`,descending:"synkende",descendingSort:t=>`sortert etter kolonne ${t.columnName} i synkende rekkefølge`,resizerDescription:"Trykk på Enter for å starte størrelsesendring",select:"Velg",selectAll:"Velg alle",sortable:"kolonne som kan sorteres"};var sa={};sa={ascending:"oplopend",ascendingSort:t=>`gesorteerd in oplopende volgorde in kolom ${t.columnName}`,columnSize:t=>`${t.value} pixels`,descending:"aflopend",descendingSort:t=>`gesorteerd in aflopende volgorde in kolom ${t.columnName}`,resizerDescription:"Druk op Enter om het formaat te wijzigen",select:"Selecteren",selectAll:"Alles selecteren",sortable:"sorteerbare kolom"};var aa={};aa={ascending:"rosnąco",ascendingSort:t=>`posortowano według kolumny ${t.columnName} w porządku rosnącym`,columnSize:t=>`Liczba pikseli: ${t.value}`,descending:"malejąco",descendingSort:t=>`posortowano według kolumny ${t.columnName} w porządku malejącym`,resizerDescription:"Naciśnij Enter, aby rozpocząć zmienianie rozmiaru",select:"Zaznacz",selectAll:"Zaznacz wszystko",sortable:"kolumna z możliwością sortowania"};var ca={};ca={ascending:"crescente",ascendingSort:t=>`classificado pela coluna ${t.columnName} em ordem crescente`,columnSize:t=>`${t.value} pixels`,descending:"decrescente",descendingSort:t=>`classificado pela coluna ${t.columnName} em ordem decrescente`,resizerDescription:"Pressione Enter para começar a redimensionar",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"coluna classificável"};var da={};da={ascending:"ascendente",ascendingSort:t=>`Ordenar por coluna ${t.columnName} em ordem ascendente`,columnSize:t=>`${t.value} pixels`,descending:"descendente",descendingSort:t=>`Ordenar por coluna ${t.columnName} em ordem descendente`,resizerDescription:"Prima Enter para iniciar o redimensionamento",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"Coluna ordenável"};var fa={};fa={ascending:"crescătoare",ascendingSort:t=>`sortate după coloana ${t.columnName} în ordine crescătoare`,columnSize:t=>`${t.value} pixeli`,descending:"descrescătoare",descendingSort:t=>`sortate după coloana ${t.columnName} în ordine descrescătoare`,resizerDescription:"Apăsați pe Enter pentru a începe redimensionarea",select:"Selectare",selectAll:"Selectare totală",sortable:"coloană sortabilă"};var pa={};pa={ascending:"возрастание",ascendingSort:t=>`сортировать столбец ${t.columnName} в порядке возрастания`,columnSize:t=>`${t.value} пикс.`,descending:"убывание",descendingSort:t=>`сортировать столбец ${t.columnName} в порядке убывания`,resizerDescription:"Нажмите клавишу Enter для начала изменения размеров",select:"Выбрать",selectAll:"Выбрать все",sortable:"сортируемый столбец"};var va={};va={ascending:"vzostupne",ascendingSort:t=>`zoradené zostupne podľa stĺpca ${t.columnName}`,columnSize:t=>`Počet pixelov: ${t.value}`,descending:"zostupne",descendingSort:t=>`zoradené zostupne podľa stĺpca ${t.columnName}`,resizerDescription:"Stlačením klávesu Enter začnete zmenu veľkosti",select:"Vybrať",selectAll:"Vybrať všetko",sortable:"zoraditeľný stĺpec"};var ha={};ha={ascending:"naraščajoče",ascendingSort:t=>`razvrščeno po stolpcu ${t.columnName} v naraščajočem vrstnem redu`,columnSize:t=>`${t.value} slikovnih pik`,descending:"padajoče",descendingSort:t=>`razvrščeno po stolpcu ${t.columnName} v padajočem vrstnem redu`,resizerDescription:"Pritisnite tipko Enter da začnete spreminjati velikost",select:"Izberite",selectAll:"Izberite vse",sortable:"razvrstljivi stolpec"};var ma={};ma={ascending:"rastući",ascendingSort:t=>`sortirano po kolonama ${t.columnName} rastućim redosledom`,columnSize:t=>`${t.value} piksela`,descending:"padajući",descendingSort:t=>`sortirano po kolonama ${t.columnName} padajućim redosledom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Izaberite",selectAll:"Izaberite sve",sortable:"kolona koja se može sortirati"};var ba={};ba={ascending:"stigande",ascendingSort:t=>`sorterat på kolumn ${t.columnName} i stigande ordning`,columnSize:t=>`${t.value} pixlar`,descending:"fallande",descendingSort:t=>`sorterat på kolumn ${t.columnName} i fallande ordning`,resizerDescription:"Tryck på Retur för att börja ändra storlek",select:"Markera",selectAll:"Markera allt",sortable:"sorterbar kolumn"};var ga={};ga={ascending:"artan sırada",ascendingSort:t=>`${t.columnName} sütuna göre artan düzende sırala`,columnSize:t=>`${t.value} piksel`,descending:"azalan sırada",descendingSort:t=>`${t.columnName} sütuna göre azalan düzende sırala`,resizerDescription:"Yeniden boyutlandırmak için Enter'a basın",select:"Seç",selectAll:"Tümünü Seç",sortable:"Sıralanabilir sütun"};var $a={};$a={ascending:"висхідний",ascendingSort:t=>`відсортовано за стовпцем ${t.columnName} у висхідному порядку`,columnSize:t=>`${t.value} пікс.`,descending:"низхідний",descendingSort:t=>`відсортовано за стовпцем ${t.columnName} у низхідному порядку`,resizerDescription:"Натисніть Enter, щоб почати зміну розміру",select:"Вибрати",selectAll:"Вибрати все",sortable:"сортувальний стовпець"};var ya={};ya={ascending:"升序",ascendingSort:t=>`按列 ${t.columnName} 升序排序`,columnSize:t=>`${t.value} 像素`,descending:"降序",descendingSort:t=>`按列 ${t.columnName} 降序排序`,resizerDescription:"按“输入”键开始调整大小。",select:"选择",selectAll:"全选",sortable:"可排序的列"};var xa={};xa={ascending:"遞增",ascendingSort:t=>`已依據「${t.columnName}」欄遞增排序`,columnSize:t=>`${t.value} 像素`,descending:"遞減",descendingSort:t=>`已依據「${t.columnName}」欄遞減排序`,resizerDescription:"按 Enter 鍵以開始調整大小",select:"選取",selectAll:"全選",sortable:"可排序的欄"};var Hr={};Hr={"ar-AE":js,"bg-BG":Vs,"cs-CZ":Hs,"da-DK":Ws,"de-DE":Us,"el-GR":Gs,"en-US":Ys,"es-ES":qs,"et-EE":Xs,"fi-FI":Zs,"fr-FR":Js,"he-IL":Qs,"hr-HR":ea,"hu-HU":ta,"it-IT":na,"ja-JP":ra,"ko-KR":la,"lt-LT":ia,"lv-LV":oa,"nb-NO":ua,"nl-NL":sa,"pl-PL":aa,"pt-BR":ca,"pt-PT":da,"ro-RO":fa,"ru-RU":pa,"sk-SK":va,"sl-SI":ha,"sr-SP":ma,"sv-SE":ba,"tr-TR":ga,"uk-UA":$a,"zh-CN":ya,"zh-TW":xa};class mp extends yu{isCell(e){return e.type==="cell"||e.type==="rowheader"||e.type==="column"}getKeyBelow(e){let n=this.collection.getItem(e);if(n){if(n.type==="column"){let r=Me(le(n,this.collection));if(r)return r.key;let l=this.getFirstKey();if(l==null)return;let i=this.collection.getItem(l);return Ue(le(i,this.collection),n.index).key}return super.getKeyBelow(e)}}getKeyAbove(e){let n=this.collection.getItem(e);if(!n)return;if(n.type==="column"){let l=this.collection.getItem(n.parentKey);return l&&l.type==="column"?l.key:void 0}let r=super.getKeyAbove(e);return r!=null&&this.collection.getItem(r).type!=="headerrow"?r:this.isCell(n)?this.collection.columns[n.index].key:this.collection.columns[0].key}findNextColumnKey(e){let n=this.findNextKey(e.key,l=>l.type==="column");if(n!=null)return n;let r=this.collection.headerRows[e.level];for(let l of le(r,this.collection))if(l.type==="column")return l.key}findPreviousColumnKey(e){let n=this.findPreviousKey(e.key,i=>i.type==="column");if(n!=null)return n;let r=this.collection.headerRows[e.level],l=[...le(r,this.collection)];for(let i=l.length-1;i>=0;i--){let o=l[i];if(o.type==="column")return o.key}}getKeyRightOf(e){let n=this.collection.getItem(e);if(n)return n.type==="column"?this.direction==="rtl"?this.findPreviousColumnKey(n):this.findNextColumnKey(n):super.getKeyRightOf(e)}getKeyLeftOf(e){let n=this.collection.getItem(e);if(n)return n.type==="column"?this.direction==="rtl"?this.findNextColumnKey(n):this.findPreviousColumnKey(n):super.getKeyLeftOf(e)}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,l=n??this.getFirstKey();if(l==null)return null;let i=r.getItem(l);i.type==="cell"&&(l=i.parentKey);let o=!1;for(;l!=null;){let u=r.getItem(l);for(let s of le(u,this.collection)){let c=r.columns[s.index];if(r.rowHeaderColumnKeys.has(c.key)&&s.textValue){let d=s.textValue.slice(0,e.length);if(this.collator.compare(d,e)===0)return(n!=null?r.getItem(n):i).type==="cell"?s.key:u.key}}l=this.getKeyBelow(l),l==null&&!o&&(l=this.getFirstKey(),o=!0)}return null}}let bp=!1;function fn(){return bp}function gp(t){return t&&t.__esModule?t.default:t}function $p(t,e,n){let{keyboardDelegate:r,isVirtualized:l,layoutDelegate:i,layout:o}=t,u=En({usage:"search",sensitivity:"base"}),{direction:s}=Le(),c=e.selectionManager.disabledBehavior,d=a.useMemo(()=>r||new mp({collection:e.collection,disabledKeys:e.disabledKeys,disabledBehavior:c,ref:n,direction:s,collator:u,layoutDelegate:i,layout:o}),[r,e.collection,e.disabledKeys,c,n,s,u,i,o]),f=de(t.id);Vr.set(e,f);let{gridProps:p}=ip({...t,id:f,keyboardDelegate:d},e,n);l&&(p["aria-rowcount"]=e.collection.size+e.collection.headerRows.length),fn()&&"expandedKeys"in e&&(p.role="treegrid");let{column:v,direction:b}=e.sortDescriptor||{},y=ot(gp(Hr),"@react-aria/table"),$=a.useMemo(()=>{var S;let x=(S=e.collection.columns.find(T=>T.key===v))===null||S===void 0?void 0:S.textValue;return b&&v?y.format(`${b}Sort`,{columnName:x}):void 0},[b,v,e.collection.columns]),C=mn($);return fi(()=>{cn($,"assertive",500)},[$]),{gridProps:j(p,C,{"aria-describedby":[C["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")})}}function yp(t){return t&&t.__esModule?t.default:t}function xp(t,e,n){var r,l;let{node:i}=t,o=i.props.allowsSorting,{gridCellProps:u}=ts({...t,focusMode:"child"},e,n),s=i.props.isSelectionCell&&e.selectionManager.selectionMode==="single",{pressProps:c}=Fe({isDisabled:!o||s,onPress(){e.sort(i.key)},ref:n}),{focusableProps:d}=Et({},n),f=null,p=((r=e.sortDescriptor)===null||r===void 0?void 0:r.column)===i.key,v=(l=e.sortDescriptor)===null||l===void 0?void 0:l.direction;i.props.allowsSorting&&!nn()&&(f=p?v:"none");let b=ot(yp(Hr),"@react-aria/table"),y;o&&(y=`${b.format("sortable")}`,p&&v&&nn()&&(y=`${y}, ${b.format(v)}`));let $=mn(y),C=e.collection.size===0;return a.useEffect(()=>{C&&e.selectionManager.focusedKey===i.key&&e.selectionManager.setFocusedKey(null)},[C,e.selectionManager,i.key]),{columnHeaderProps:{...j(u,c,d,$,C&&{tabIndex:-1}),role:"columnheader",id:vp(e,i.key),"aria-colspan":i.colspan&&i.colspan>1?i.colspan:null,"aria-sort":f}}}const Gl={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function Ep(t,e,n){let{node:r,isVirtualized:l}=t,{rowProps:i,...o}=up(t,e,n),{direction:u}=Le();l&&!(fn()&&"expandedKeys"in e)?i["aria-rowindex"]=r.index+1+e.collection.headerRows.length:delete i["aria-rowindex"];let s={};if(fn()&&"expandedKeys"in e){let b=e.keyMap.get(r.key);if(b!=null){var c,d,f;let y=((c=b.props)===null||c===void 0?void 0:c.UNSTABLE_childItems)||((f=b.props)===null||f===void 0||(d=f.children)===null||d===void 0?void 0:d.length)>e.userColumnCount;s={onKeyDown:$=>{($.key===Gl.expand[u]&&e.selectionManager.focusedKey===b.key&&y&&e.expandedKeys!=="all"&&!e.expandedKeys.has(b.key)||$.key===Gl.collapse[u]&&e.selectionManager.focusedKey===b.key&&y&&(e.expandedKeys==="all"||e.expandedKeys.has(b.key)))&&(e.toggleKey(b.key),$.stopPropagation())},"aria-expanded":y?e.expandedKeys==="all"||e.expandedKeys.has(r.key):void 0,"aria-level":b.level,"aria-posinset":b.indexOfType+1,"aria-setsize":b.level>1?Ge(e.keyMap.get(b==null?void 0:b.parentKey).childNodes).indexOfType+1:Ge(e.keyMap.get(e.collection.body.key).childNodes).indexOfType+1}}}let p=qc(r.props),v=o.hasAction?p:{};return{rowProps:{...j(i,s,v),"aria-labelledby":hp(e,r.key)},...o}}function Cp(t,e,n){let{node:r,isVirtualized:l}=t,i={role:"row"};return l&&!(fn()&&"expandedKeys"in e)&&(i["aria-rowindex"]=r.index+1),{rowProps:i}}function Sp(t,e,n){let{gridCellProps:r,isPressed:l}=ts(t,e,n),i=t.node.column.key;return e.collection.rowHeaderColumnKeys.has(i)&&(r.role="rowheader",r.id=zs(e,t.node.parentKey,i)),{gridCellProps:r,isPressed:l}}function wp(){return op()}function Pp(t,e){let n=se(t,{labelable:!0}),{hoverProps:r}=xt({onHoverStart:()=>e==null?void 0:e.open(!0),onHoverEnd:()=>e==null?void 0:e.close()});return{tooltipProps:j(n,r,{role:"tooltip"})}}function Dp(t,e,n){let{isDisabled:r,trigger:l}=t,i=de(),o=a.useRef(!1),u=a.useRef(!1),s=()=>{(o.current||u.current)&&e.open(u.current)},c=C=>{!o.current&&!u.current&&e.close(C)};a.useEffect(()=>{let C=S=>{n&&n.current&&S.key==="Escape"&&(S.stopPropagation(),e.close(!0))};if(e.isOpen)return document.addEventListener("keydown",C,!0),()=>{document.removeEventListener("keydown",C,!0)}},[n,e]);let d=()=>{l!=="focus"&&(on()==="pointer"?o.current=!0:o.current=!1,s())},f=()=>{l!=="focus"&&(u.current=!1,o.current=!1,c())},p=()=>{u.current=!1,o.current=!1,c(!0)},v=()=>{lt()&&(u.current=!0,s())},b=()=>{u.current=!1,o.current=!1,c(!0)},{hoverProps:y}=xt({isDisabled:r,onHoverStart:d,onHoverEnd:f}),{focusableProps:$}=Et({isDisabled:r,onFocus:v,onBlur:b},n);return{triggerProps:{"aria-describedby":e.isOpen?i:void 0,...j($,y,{onPointerDown:p,onKeyDown:p})},tooltipProps:{id:i}}}class Yl{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){let n=this.keyMap.get(e);return(n==null?void 0:n.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let n=o=>{if(this.keyMap.set(o.key,o),o.childNodes&&o.type==="section")for(let u of o.childNodes)n(u)};for(let o of e)n(o);let r=null,l=0;for(let[o,u]of this.keyMap)r?(r.nextKey=o,u.prevKey=r.key):(this.firstKey=o,u.prevKey=void 0),u.type==="item"&&(u.index=l++),r=u,r.nextKey=void 0;var i;this.lastKey=(i=r==null?void 0:r.key)!==null&&i!==void 0?i:null}}class Ce extends Set{constructor(e,n,r){super(e),e instanceof Ce?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n,this.currentKey=r)}}function kp(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Wr(t){let{selectionMode:e="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:l="toggle",disabledBehavior:i="all"}=t,o=a.useRef(!1),[,u]=a.useState(!1),s=a.useRef(null),c=a.useRef(null),[,d]=a.useState(null),f=a.useMemo(()=>ql(t.selectedKeys),[t.selectedKeys]),p=a.useMemo(()=>ql(t.defaultSelectedKeys,new Ce),[t.defaultSelectedKeys]),[v,b]=Ze(f,p,t.onSelectionChange),y=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[$,C]=a.useState(l);l==="replace"&&$==="toggle"&&typeof v=="object"&&v.size===0&&C("replace");let S=a.useRef(l);return a.useEffect(()=>{l!==S.current&&(C(l),S.current=l)},[l]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:$,setSelectionBehavior:C,get isFocused(){return o.current},setFocused(x){o.current=x,u(x)},get focusedKey(){return s.current},get childFocusStrategy(){return c.current},setFocusedKey(x,T="first"){s.current=x,c.current=T,d(x)},selectedKeys:v,setSelectedKeys(x){(r||!kp(x,v))&&b(x)},disabledKeys:y,disabledBehavior:i}}function ql(t,e){return t?t==="all"?"all":new Ce(t):e}class Ur{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){return this.state.selectionMode==="none"?!1:(e=this.getKey(e),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 e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&Gn(this.collection,r,e)<0)&&(e=r)}return e==null?void 0:e.key}get lastSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&Gn(this.collection,r,e)>0)&&(e=r)}return e==null?void 0:e.key}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}e=this.getKey(e);let n;if(this.state.selectedKeys==="all")n=new Ce([e],e,e);else{let i=this.state.selectedKeys;var r;let o=(r=i.anchorKey)!==null&&r!==void 0?r:e;n=new Ce(i,o,e);var l;for(let u of this.getKeyRange(o,(l=i.currentKey)!==null&&l!==void 0?l:e))n.delete(u);for(let u of this.getKeyRange(e,o))this.canSelectItem(u)&&n.add(u)}this.state.setSelectedKeys(n)}getKeyRange(e,n){let r=this.collection.getItem(e),l=this.collection.getItem(n);return r&&l?Gn(this.collection,r,l)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let l=[],i=e;for(;i!=null;){let o=this.collection.getItem(i);if((o&&o.type==="item"||o.type==="cell"&&this.allowsCellSelection)&&l.push(i),i===n)return l;i=this.collection.getKeyAfter(i)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}if(e=this.getKey(e),e==null)return;let n=new Ce(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(e)?n.delete(e):this.canSelectItem(e)&&(n.add(e),n.anchorKey=e,n.currentKey=e),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode==="none"||(e=this.getKey(e),e==null))return;let n=this.canSelectItem(e)?new Ce([e],e,e):new Ce;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new Ce;for(let r of e)if(r=this.getKey(r),r!=null&&(n.add(r),this.selectionMode==="single"))break;this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){let l=this.collection.getItem(r);l.type==="item"&&e.push(r),l.hasChildNodes&&(this.allowsCellSelection||l.type!=="item")&&n(Me(le(l,this.collection)).key)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}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 Ce)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var l;this.allowsCellSelection=(l=r==null?void 0:r.allowsCellSelection)!==null&&l!==void 0?l:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function Tp(t){let{filter:e,layoutDelegate:n}=t,r=Wr(t),l=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),i=a.useCallback(d=>e?new Yl(e(d)):new Yl(d),[e]),o=a.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),u=Lr(t,i,o),s=a.useMemo(()=>new Ur(u,r,{layoutDelegate:n}),[u,r,n]);const c=a.useRef(null);return a.useEffect(()=>{if(r.focusedKey!=null&&!u.getItem(r.focusedKey)&&c.current){const C=c.current.getItem(r.focusedKey),S=[...c.current.getKeys()].map(h=>{const B=c.current.getItem(h);return(B==null?void 0:B.type)==="item"?B:null}).filter(h=>h!==null),x=[...u.getKeys()].map(h=>{const B=u.getItem(h);return(B==null?void 0:B.type)==="item"?B:null}).filter(h=>h!==null);var d,f;const T=((d=S==null?void 0:S.length)!==null&&d!==void 0?d:0)-((f=x==null?void 0:x.length)!==null&&f!==void 0?f:0);var p,v,b;let w=Math.min(T>1?Math.max(((p=C==null?void 0:C.index)!==null&&p!==void 0?p:0)-T+1,0):(v=C==null?void 0:C.index)!==null&&v!==void 0?v:0,((b=x==null?void 0:x.length)!==null&&b!==void 0?b:0)-1),D=null,I=!1;for(;w>=0;){if(!s.isDisabled(x[w].key)){D=x[w];break}if(w<x.length-1&&!I)w++;else{I=!0;var y,$;w>((y=C==null?void 0:C.index)!==null&&y!==void 0?y:0)&&(w=($=C==null?void 0:C.index)!==null&&$!==void 0?$:0),w--}}r.setFocusedKey(D?D.key:null)}c.current=u},[u,s,r,r.focusedKey]),{collection:u,disabledKeys:l,selectionManager:s}}function Ap(t){var e;let[n,r]=Ze(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),l=a.useMemo(()=>n!=null?[n]:[],[n]),{collection:i,disabledKeys:o,selectionManager:u}=Tp({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:l,onSelectionChange:c=>{if(c==="all")return;var d;let f=(d=c.values().next().value)!==null&&d!==void 0?d:null;f===n&&t.onSelectionChange&&t.onSelectionChange(f),r(f)}}),s=n!=null?i.getItem(n):null;return{collection:i,disabledKeys:o,selectionManager:u,selectedKey:n,setSelectedKey:r,selectedItem:s}}function wn(t){let[e,n]=Ze(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=a.useCallback(()=>{n(!0)},[n]),l=a.useCallback(()=>{n(!1)},[n]),i=a.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:l,toggle:i}}function Bp(t){let e=wn(t),[n,r]=a.useState(null),[l,i]=a.useState([]),o=()=>{i([]),e.close()};return{focusStrategy:n,...e,open(c=null){r(c),e.open()},toggle(c=null){r(c),e.toggle()},close(){o()},expandedKeysStack:l,openSubmenu:(c,d)=>{i(f=>d>f.length?f:[...f.slice(0,d),c])},closeSubmenu:(c,d)=>{i(f=>f[d]===c?f.slice(0,d):f)}}}let Kp=Math.round(Math.random()*1e10),Mp=0;function Rp(t){let e=a.useMemo(()=>t.name||`radio-group-${Kp}-${++Mp}`,[t.name]);var n;let[r,l]=Ze(t.value,(n=t.defaultValue)!==null&&n!==void 0?n:null,t.onChange),[i,o]=a.useState(null),u=Rr({...t,value:r}),s=d=>{!t.isReadOnly&&!t.isDisabled&&(l(d),u.commitValidation())},c=u.displayValidation.isInvalid;return{...u,name:e,selectedValue:r,setSelectedValue:s,lastFocusedValue:i,setLastFocusedValue:o,isDisabled:t.isDisabled||!1,isReadOnly:t.isReadOnly||!1,isRequired:t.isRequired||!1,validationState:t.validationState||(c?"invalid":null),isInvalid:c}}function Ip(t){let[e,n]=Ze(Xl(t.value),Xl(t.defaultValue)||"",t.onChange);return{value:e,setValue:n}}function Xl(t){if(t!=null)return t.toString()}function Ea(t){let e=wn(t),[n,r]=a.useState(null),l=Ap({...t,onSelectionChange:s=>{t.onSelectionChange!=null&&t.onSelectionChange(s),e.close(),i.commitValidation()}}),i=Rr({...t,value:l.selectedKey}),[o,u]=a.useState(!1);return{...i,...l,...e,focusStrategy:n,open(s=null){l.collection.size!==0&&(r(s),e.open())},toggle(s=null){l.collection.size!==0&&(r(s),e.toggle())},isFocused:o,setFocused:u}}function Fp(t){let{collection:e,focusMode:n}=t,r=t.UNSAFE_selectionState||Wr(t),l=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),i=r.setFocusedKey;r.setFocusedKey=(s,c)=>{if(n==="cell"&&s!=null){let p=e.getItem(s);if((p==null?void 0:p.type)==="item"){var d,f;let v=le(p,e);c==="last"?s=(d=Ge(v))===null||d===void 0?void 0:d.key:s=(f=Me(v))===null||f===void 0?void 0:f.key}}i(s,c)};let o=a.useMemo(()=>new Ur(e,r),[e,r]);const u=a.useRef(null);return a.useEffect(()=>{if(r.focusedKey!=null&&!e.getItem(r.focusedKey)){const s=u.current.getItem(r.focusedKey),c=s.parentKey!=null&&(s.type==="cell"||s.type==="rowheader"||s.type==="column")?u.current.getItem(s.parentKey):s,d=u.current.rows,f=e.rows,p=d.length-f.length;let v=Math.min(p>1?Math.max(c.index-p+1,0):c.index,f.length-1),b;for(;v>=0;){if(!o.isDisabled(f[v].key)&&f[v].type!=="headerrow"){b=f[v];break}v<f.length-1?v++:(v>c.index&&(v=c.index),v--)}if(b){const y=b.hasChildNodes?[...le(b,e)]:[],$=b.hasChildNodes&&c!==s&&s.index<y.length?y[s.index].key:b.key;r.setFocusedKey($)}else r.setFocusedKey(null)}u.current=e},[e,o,r,r.focusedKey]),{collection:e,disabledKeys:l,isKeyboardNavigationDisabled:!1,selectionManager:o}}class Np{*[Symbol.iterator](){yield*[...this.rows]}get size(){return[...this.rows].length}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);return n?n.prevKey:null}getKeyAfter(e){let n=this.keyMap.get(e);return n?n.nextKey:null}getFirstKey(){var e;return(e=[...this.rows][0])===null||e===void 0?void 0:e.key}getLastKey(){var e;let n=[...this.rows];return(e=n[n.length-1])===null||e===void 0?void 0:e.key}getItem(e){return this.keyMap.get(e)}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){let n=this.keyMap.get(e);return(n==null?void 0:n.childNodes)||[]}constructor(e){this.keyMap=new Map,this.keyMap=new Map,this.columnCount=e==null?void 0:e.columnCount,this.rows=[];let n=i=>{let o=this.keyMap.get(i.key);e.visitNode&&(i=e.visitNode(i)),this.keyMap.set(i.key,i);let u=new Set,s;for(let c of i.childNodes)c.type==="cell"&&c.parentKey==null&&(c.parentKey=i.key),u.add(c.key),s?(s.nextKey=c.key,c.prevKey=s.key):c.prevKey=null,n(c),s=c;if(s&&(s.nextKey=null),o)for(let c of o.childNodes)u.has(c.key)||r(c)},r=i=>{this.keyMap.delete(i.key);for(let o of i.childNodes)this.keyMap.get(o.key)===o&&r(o)},l;e.items.forEach((i,o)=>{let u={level:0,key:"row-"+o,type:"row",value:void 0,hasChildNodes:!0,childNodes:[...i.childNodes],rendered:void 0,textValue:void 0,...i};l?(l.nextKey=u.key,u.prevKey=l.key):u.prevKey=null,this.rows.push(u),n(u),l=u}),l&&(l.nextKey=null)}}const Ca="row-header-column-"+Math.random().toString(36).slice(2);let $r="row-header-column-"+Math.random().toString(36).slice(2);for(;Ca===$r;)$r="row-header-column-"+Math.random().toString(36).slice(2);function _p(t,e){if(e.length===0)return[];let n=[],r=new Map;for(let s of e){let c=s.parentKey,d=[s];for(;c;){let f=t.get(c);if(!f)break;if(r.has(f)){f.colspan++;let{column:p,index:v}=r.get(f);if(v>d.length)break;for(let b=v;b<d.length;b++)p.splice(b,0,null);for(let b=d.length;b<p.length;b++)p[b]&&r.has(p[b])&&(r.get(p[b]).index=b)}else f.colspan=1,d.push(f),r.set(f,{column:d,index:d.length-1});c=f.parentKey}n.push(d),s.index=n.length-1}let l=Math.max(...n.map(s=>s.length)),i=Array(l).fill(0).map(()=>[]),o=0;for(let s of n){let c=l-1;for(let d of s){if(d){let f=i[c],p=f.reduce((v,b)=>v+b.colspan,0);if(p<o){let v={type:"placeholder",key:"placeholder-"+d.key,colspan:o-p,index:p,value:null,rendered:null,level:c,hasChildNodes:!1,childNodes:[],textValue:null};f.length>0&&(f[f.length-1].nextKey=v.key,v.prevKey=f[f.length-1].key),f.push(v)}f.length>0&&(f[f.length-1].nextKey=d.key,d.prevKey=f[f.length-1].key),d.level=c,d.colIndex=o,f.push(d)}c--}o++}let u=0;for(let s of i){let c=s.reduce((d,f)=>d+f.colspan,0);if(c<e.length){let d={type:"placeholder",key:"placeholder-"+s[s.length-1].key,colspan:e.length-c,index:c,value:null,rendered:null,level:u,hasChildNodes:!1,childNodes:[],textValue:null,prevKey:s[s.length-1].key};s.push(d)}u++}return i.map((s,c)=>({type:"headerrow",key:"headerrow-"+c,index:c,value:null,rendered:null,level:0,hasChildNodes:!0,childNodes:s,textValue:null}))}class Lp extends Np{*[Symbol.iterator](){yield*this.body.childNodes}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);return n?n.prevKey:null}getKeyAfter(e){let n=this.keyMap.get(e);return n?n.nextKey:null}getFirstKey(){var e;return(e=Me(this.body.childNodes))===null||e===void 0?void 0:e.key}getLastKey(){var e;return(e=Ge(this.body.childNodes))===null||e===void 0?void 0:e.key}getItem(e){return this.keyMap.get(e)}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){return e===this.body.key?this.body.childNodes:super.getChildren(e)}getTextValue(e){let n=this.getItem(e);if(!n)return"";if(n.textValue)return n.textValue;let r=this.rowHeaderColumnKeys;if(r){let l=[];for(let i of n.childNodes){let o=this.columns[i.index];if(r.has(o.key)&&i.textValue&&l.push(i.textValue),l.length===r.size)break}return l.join(" ")}return""}constructor(e,n,r){let l=new Set,i,o=[];if(r!=null&&r.showSelectionCheckboxes){let f={type:"column",key:Ca,value:null,textValue:"",level:0,index:r!=null&&r.showDragButtons?1:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isSelectionCell:!0}};o.unshift(f)}if(r!=null&&r.showDragButtons){let f={type:"column",key:$r,value:null,textValue:"",level:0,index:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isDragButtonCell:!0}};o.unshift(f)}let u=[],s=new Map,c=f=>{switch(f.type){case"body":i=f;break;case"column":s.set(f.key,f),f.hasChildNodes||(o.push(f),f.props.isRowHeader&&l.add(f.key));break;case"item":u.push(f);return}for(let p of f.childNodes)c(p)};for(let f of e)c(f);let d=_p(s,o);d.forEach((f,p)=>u.splice(p,0,f)),super({columnCount:o.length,items:u,visitNode:f=>(f.column=o[f.index],f)}),this._size=0,this.columns=o,this.rowHeaderColumnKeys=l,this.body=i,this.headerRows=d,this._size=[...i.childNodes].length,this.rowHeaderColumnKeys.size===0&&this.rowHeaderColumnKeys.add(this.columns.find(f=>{var p,v;return!(!((p=f.props)===null||p===void 0)&&p.isDragButtonCell)&&!(!((v=f.props)===null||v===void 0)&&v.isSelectionCell)}).key)}}const Op={ascending:"descending",descending:"ascending"};function zp(t){let[e,n]=a.useState(!1),{selectionMode:r="none",showSelectionCheckboxes:l,showDragButtons:i}=t,o=a.useMemo(()=>({showSelectionCheckboxes:l&&r!=="none",showDragButtons:i,selectionMode:r,columns:[]}),[t.children,l,r,i]),u=Lr(t,a.useCallback(d=>new Lp(d,null,o),[o]),o),{disabledKeys:s,selectionManager:c}=Fp({...t,collection:u,disabledBehavior:t.disabledBehavior||"selection"});return{collection:u,disabledKeys:s,selectionManager:c,showSelectionCheckboxes:t.showSelectionCheckboxes||!1,sortDescriptor:t.sortDescriptor,isKeyboardNavigationDisabled:u.size===0||e,setKeyboardNavigationDisabled:n,sort(d,f){var p;t.onSortChange({column:d,direction:f??(((p=t.sortDescriptor)===null||p===void 0?void 0:p.column)===d?Op[t.sortDescriptor.direction]:"ascending")})}}}function Sa(t){return null}Sa.getCollectionNode=function*(e,n){let{children:r,columns:l}=e;if(n.columns=[],typeof r=="function"){if(!l)throw new Error("props.children was a function but props.columns is missing");for(let i of l)yield{type:"column",value:i,renderer:r}}else{let i=[];a.Children.forEach(r,o=>{i.push({type:"column",element:o})}),yield*i}};let jp=Sa;function wa(t){return null}wa.getCollectionNode=function*(e){let{children:n,items:r}=e;yield{type:"body",hasChildNodes:!0,props:e,*childNodes(){if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");for(let l of r)yield{type:"item",value:l,renderer:n}}else{let l=[];a.Children.forEach(n,i=>{l.push({type:"item",element:i})}),yield*l}}}};let Vp=wa;function Pa(t){return null}Pa.getCollectionNode=function*(e,n){let{title:r,children:l,childColumns:i}=e,o=r||l,u=e.textValue||(typeof o=="string"?o:"")||e["aria-label"],s=yield{type:"column",hasChildNodes:!!i||r&&a.Children.count(l)>0,rendered:o,textValue:u,props:e,*childNodes(){if(i)for(let d of i)yield{type:"column",value:d};else if(r){let d=[];a.Children.forEach(l,f=>{d.push({type:"column",element:f})}),yield*d}},shouldInvalidate(d){return c(d),!1}},c=d=>{for(let f of s)f.hasChildNodes||d.columns.push(f)};c(n)};let Hp=Pa;function yr(t){return null}yr.getCollectionNode=function*(e,n){let{children:r,textValue:l,UNSTABLE_childItems:i}=e;yield{type:"item",props:e,textValue:l,"aria-label":e["aria-label"],hasChildNodes:!0,*childNodes(){if(n.showDragButtons&&(yield{type:"cell",key:"header-drag",props:{isDragButtonCell:!0}}),n.showSelectionCheckboxes&&n.selectionMode!=="none"&&(yield{type:"cell",key:"header",props:{isSelectionCell:!0}}),typeof r=="function"){for(let o of n.columns)yield{type:"cell",element:r(o.key),key:o.key};if(i)for(let o of i)yield{type:"item",value:o}}else{let o=[],u=[];if(a.Children.forEach(r,s=>{if(s.type===yr){if(o.length<n.columns.length)throw new Error("All of a Row's child Cells must be positioned before any child Rows.");u.push({type:"item",element:s})}else o.push({type:"cell",element:s})}),o.length!==n.columns.length)throw new Error(`Cell count must match column count. Found ${o.length} cells and ${n.columns.length} columns.`);yield*o,yield*u}},shouldInvalidate(o){return o.columns.length!==n.columns.length||o.columns.some((u,s)=>u.key!==n.columns[s].key)||o.showSelectionCheckboxes!==n.showSelectionCheckboxes||o.showDragButtons!==n.showDragButtons||o.selectionMode!==n.selectionMode}}};let Wp=yr;function Da(t){return null}Da.getCollectionNode=function*(e){let{children:n}=e,r=e.textValue||(typeof n=="string"?n:"")||e["aria-label"]||"";yield{type:"cell",props:e,rendered:n,textValue:r,"aria-label":e["aria-label"],hasChildNodes:!1}};let Up=Da;const Gp=1500,Zl=500;let Qe={},Yp=0,Bt=!1,Ke=null,et=null;function ka(t={}){let{delay:e=Gp,closeDelay:n=Zl}=t,{isOpen:r,open:l,close:i}=wn(t),o=a.useMemo(()=>`${++Yp}`,[]),u=a.useRef(void 0),s=a.useRef(i),c=()=>{Qe[o]=p},d=()=>{for(let b in Qe)b!==o&&(Qe[b](!0),delete Qe[b])},f=()=>{clearTimeout(u.current),u.current=null,d(),c(),Bt=!0,l(),Ke&&(clearTimeout(Ke),Ke=null),et&&(clearTimeout(et),et=null)},p=b=>{b||n<=0?(clearTimeout(u.current),u.current=null,s.current()):u.current||(u.current=setTimeout(()=>{u.current=null,s.current()},n)),Ke&&(clearTimeout(Ke),Ke=null),Bt&&(et&&clearTimeout(et),et=setTimeout(()=>{delete Qe[o],et=null,Bt=!1},Math.max(Zl,n)))},v=()=>{d(),c(),!r&&!Ke&&!Bt?Ke=setTimeout(()=>{Ke=null,Bt=!0,f()},e):r||f()};return a.useEffect(()=>{s.current=i},[i]),a.useEffect(()=>()=>{clearTimeout(u.current),Qe[o]&&delete Qe[o]},[o]),{isOpen:r,open:b=>{!b&&e>0&&!u.current?v():f()},close:p}}class qp{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);return n?n.prevKey:null}getKeyAfter(e){let n=this.keyMap.get(e);return n?n.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.iterable=e,n=n||new Set;let r=o=>{if(this.keyMap.set(o.key,o),o.childNodes&&(o.type==="section"||n.has(o.key)))for(let u of o.childNodes)r(u)};for(let o of e)r(o);let l,i=0;for(let[o,u]of this.keyMap)l?(l.nextKey=o,u.prevKey=l.key):(this.firstKey=o,u.prevKey=void 0),u.type==="item"&&(u.index=i++),l=u,l.nextKey=void 0;this.lastKey=l==null?void 0:l.key}}function Ta(t){let{onExpandedChange:e}=t,[n,r]=Ze(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),l=Wr(t),i=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),o=Lr(t,a.useCallback(s=>new qp(s,{expandedKeys:n}),[n]),null);return a.useEffect(()=>{l.focusedKey!=null&&!o.getItem(l.focusedKey)&&l.setFocusedKey(null)},[o,l.focusedKey]),{collection:o,expandedKeys:n,disabledKeys:i,toggleKey:s=>{r(Xp(n,s))},setExpandedKeys:r,selectionManager:new Ur(o,l)}}function Xp(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}function Zp(t=!0){a.useLayoutEffect(()=>{if(!t)return;const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[t])}const Jp=({children:t})=>{const{className:e,style:n}=Se(),r=(()=>{let l=document.getElementById("action-menus-root");return l||(l=document.createElement("div"),l.id="action-menus-root",document.body.appendChild(l)),l.className=e,Object.entries(n).forEach(([i,o])=>{l.style.setProperty(i,o)}),l})();return it.createPortal(t,r)},Gr=({id:t,isOpen:e,selectionMode:n="single",selectedKeys:r,disabledKeys:l,children:i,showCancel:o=!0,actions:u,closeOnNavigation:s=!0,onSelectionChange:c,onClose:d,"data-testid":f})=>{Zp(e);const{className:p,theme:v}=Se(),[b,y]=a.useState(!1),[$,C]=a.useState(0),S=a.useRef(null),x=a.useRef(null),T=a.useRef(window.location.pathname),w=u&&u.length>0,D=()=>{y(!0),C(0),setTimeout(()=>{d==null||d(),y(!1)},300)},I=w?Ta({items:u,children:u.map(R=>a.createElement(_r,{...R,key:R.key},R.label)),selectedKeys:new Set(r),onSelectionChange:R=>c==null?void 0:c(R),selectionMode:n,disabledKeys:l}):null,{menuProps:h}=w?mu({autoFocus:!0,shouldFocusWrap:!0,onAction:R=>{var E,N;return(N=(E=u.find(k=>k.key===R))==null?void 0:E.onAction)==null?void 0:N.call(E,R)},onClose:()=>d==null?void 0:d(),disabledKeys:l,onSelectionChange:R=>c==null?void 0:c(R),selectionMode:n,selectedKeys:r,"aria-label":"Action Menu"},I,x):{menuProps:{}},{overlayProps:B}=zi({isOpen:e,onClose:()=>d==null?void 0:d(),isDismissable:!1},x);a.useEffect(()=>{e&&S.current&&C(S.current.scrollHeight)},[e,S]),a.useEffect(()=>{const R=E=>{E.key==="Escape"&&D()};return document.addEventListener("keydown",R),()=>{document.removeEventListener("keydown",R)}},[b]),a.useEffect(()=>{s&&(T.current&&T.current!==location.pathname&&D(),T.current=location.pathname)},[b,s]);const P=S.current?S.current.getBoundingClientRect().height>window.innerHeight:!1,A=i||w||o;return e?g.jsxs(Jp,{children:[g.jsx("div",{...B,className:"proton-ActionMenu__background",style:{opacity:$>0?1:0},onClick:D,id:t,children:g.jsx("div",{className:"proton-ActionMenu__close-button","data-testid":"ActionMenu-close",children:"ESC"})}),g.jsx("div",{"data-testid":f||"ActionMenu-wrapper",className:_.csx("proton-ActionMenu__wrapper",P&&"proton-ActionMenu__wrapper--scrollable"),children:g.jsx("div",{className:_.csx("proton-ActionMenu__card",p),"data-testid":"ActionMenu-content",style:{height:`${$}px`},children:g.jsx("div",{ref:x,children:g.jsx("div",{...h,ref:S,children:A?g.jsxs(yn,{autoFocus:!0,contain:!0,children:[i&&g.jsx("div",{className:"proton-ActionMenu__content",children:typeof i=="function"?i({close:D}):i}),w&&g.jsx("div",{className:_.csx("proton-ActionMenu__list",n==="none"&&"proton-ActionMenu__list--disabled"),children:Array.from(I.collection).map(R=>g.jsx(Qp,{item:R,state:I,to:R.props.to},R.key))}),o&&g.jsx("div",{className:"proton-ActionMenu__cancel-button",tabIndex:-1,children:g.jsx(Yr,{variant:v==="dark"||v==="custom-dark"?"translucent":"secondary",onPress:D,"data-testid":"ActionMenuItem-cancel",children:"Cancel"})})]}):null})})})})]}):null},Qp=({to:t,state:e,item:n})=>{const r=a.useRef(null),{menuItemProps:l}=bu({key:n.key},e,r),i=t?"a":"div",o=t&&_.isUrlExternal(t),u=t?{href:t,target:o?"_blank":void 0,rel:o?"noopener noreferrer":void 0,onClick:o||!t?()=>{}:s=>_.handleInternalNavigation(s,t)}:{};return a.createElement(i,{...l,...u,key:n.key,className:"proton-ActionMenu__item","aria-label":`ActionMenu-Item-${n.key}`,ref:r},n.rendered)},Aa=a.createContext(void 0),Se=()=>{const t=a.useContext(Aa);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t},ev={[xe.THEMES.DARK]:"proton-ui__theme--dark",[xe.THEMES.CUSTOM_DARK]:"proton-ui__theme--custom-dark",[xe.THEMES.LIGHT]:"proton-ui__theme--light"},tv=({theme:t,children:e,palette:n})=>{const r=a.useRef(null),l=ev[t],i=a.useMemo(()=>nv(n),[n]);return a.useEffect(()=>{if(r.current){r.current.className=l;const o=i[t];Object.entries(o).forEach(([u,s])=>{r.current.style.setProperty(u,s)})}},[t,l,n,i]),g.jsx(Aa.Provider,{value:{theme:t,style:i[t],palette:n,className:l},children:g.jsx("div",{ref:r,children:e})})},Xn=[83,82,83];function nv(t){const e=_.chroma(t.PRIMARY.PRIMARY_LIGHTEST).alpha(.6);return{[xe.THEMES.DARK]:{"--proton-control__background-color":_.arrayToRgbString(Xn,1),"--proton-control__text-color":q.GRAYSCALE.WHITE,"--proton-control__border-color":q.GRAYSCALE.GRAY_DARK,"--proton-control__shadow-color":q.GRAYSCALE.GRAY_DARK,"--proton-color__primary":t.BRAND.PRIMARY,"--proton-color__primary-light":t.BRAND.PRIMARY_LIGHT,"--proton-color__secondary":t.BRAND.SECONDARY},[xe.THEMES.LIGHT]:{"--proton-control__background-color":q.GRAYSCALE.WHITE,"--proton-control__text-color":q.GRAYSCALE.GRAY_DARK,"--proton-control__border-color":q.GRAYSCALE.GRAY_LIGHT,"--proton-control__shadow-color":_.arrayToRgbString(Xn,.1),"--proton-color__primary":t.BRAND.PRIMARY,"--proton-color__primary-light":t.BRAND.PRIMARY_LIGHT,"--proton-color__secondary":t.BRAND.SECONDARY},[xe.THEMES.CUSTOM_DARK]:{"--proton-control__background-color":_.arrayToRgbString(Xn,1),"--proton-control__text-color":q.GRAYSCALE.WHITE,"--proton-control__border-color":t.PRIMARY.PRIMARY_LIGHTEST,"--proton-control__shadow-color":e.css(),"--proton-color__primary":t.BRAND.PRIMARY,"--proton-color__primary-light":t.BRAND.PRIMARY_LIGHT,"--proton-color__secondary":t.BRAND.SECONDARY}}}const rv={primary:"primary",secondary:"secondary",transparent:"transparent",success:"success",warning:"warning",danger:"danger"},lv=({variant:t,children:e,...n})=>{const{className:r}=Se();return g.jsx("div",{role:"status","aria-live":"polite","data-testid":n["data-testid"],className:_.csx("proton-Badge",t&&`proton-Badge--${t}`,r),children:e})};function Yr({variant:t="primary",href:e,onPress:n,type:r,isDisabled:l,"data-testid":i,children:o}){const u=e?"a":"button",s=u!=="a"?{}:{target:"_blank",href:e},c=a.useRef(null),{buttonProps:d}=Cn({onPress:n,elementType:u,type:r||"button",isDisabled:l},c);return g.jsxs(u,{...d,...s,className:_.csx("proton-Button",`proton-Button--${t}`,l&&"proton-Button--disabled"),ref:c,"data-testid":i,children:[o,e&&_.isUrlExternal(e)&&g.jsx("svg",{viewBox:"0 0 512 512",width:"0.8em",height:"0.8em",children:g.jsx("path",{d:"M384 224v184a40 40 0 01-40 40H104a40 40 0 01-40-40V168a40 40 0 0140-40h167.48M336 64h112v112M224 288L440 72",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"})})]})}const Ba={success:g.jsx("svg",{viewBox:"0 0 20 20",height:"18",width:"18",children:g.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"})}),warning:g.jsx("svg",{viewBox:"0 0 56 56",height:"17",width:"17",children:g.jsx("path",{d:"M9.59 50.207h36.82c3.516 0 5.719-2.531 5.719-5.719a5.56 5.56 0 0 0-.75-2.812l-18.445-33c-1.055-1.899-2.977-2.883-4.922-2.883c-1.922 0-3.89.984-4.946 2.883L4.645 41.699c-.516.89-.774 1.828-.774 2.79c0 3.187 2.227 5.718 5.719 5.718m18.422-16.055c-1.242 0-1.922-.703-1.969-1.968l-.328-11.578c-.047-1.266.937-2.204 2.273-2.204c1.313 0 2.344.961 2.297 2.227l-.351 11.555c-.047 1.289-.727 1.968-1.922 1.968m0 8.649c-1.36 0-2.625-1.078-2.625-2.532s1.242-2.53 2.625-2.53s2.625 1.054 2.625 2.53c0 1.477-1.266 2.532-2.625 2.532"})}),danger:g.jsx("svg",{viewBox:"0 0 20 20",height:"18",width:"18",children:g.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z"})})},iv={default:{background:q.GRAYSCALE.GRAY_LIGHTEST,title:q.GRAYSCALE.GRAY_DARK,content:q.GRAYSCALE.GRAY_MEDIUM,icon:q.GRAYSCALE.GRAY_MEDIUM_LIGHT},success:{background:q.SUCCESS.SUPER_LIGHT,title:q.SUCCESS.DARK,content:q.SUCCESS.MEDIUM,icon:q.SUCCESS.LIGHT},warning:{background:q.WARNING.SUPER_LIGHT,title:q.WARNING.DARK,content:q.WARNING.MEDIUM,icon:q.WARNING.LIGHT},danger:{background:q.DANGER.SUPER_LIGHT,title:q.DANGER.DARK,content:q.DANGER.MEDIUM,icon:q.DANGER.LIGHT}},ov={default:"default",success:"success",warning:"warning",danger:"danger"},Pn=a.createContext(void 0),Te=({variant:t="default",rounded:e=!0,icon:n=!1,compact:r=!0,children:l,...i})=>g.jsx(Pn.Provider,{value:t,children:g.jsx("div",{role:"status","aria-live":"polite",className:_.csx("proton-Banner",`proton-Banner--${t}`,e&&"proton-Banner--rounded"),"data-testid":i["data-testid"],children:g.jsxs("div",{className:_.csx("proton-Banner__wrapper",r&&"proton-Banner__wrapper--compact"),children:[g.jsx(Te.Icon,{icon:n}),g.jsx("div",{className:"proton-Banner__content-wrapper",children:g.jsx("div",{className:"proton-Banner__container",children:l})})]})})}),uv=({children:t,...e})=>{const n=a.useContext(Pn);if(!n)throw new Error("BannerTitle must be used within a Banner");return g.jsx("h3",{className:_.csx("proton-Banner","proton-Banner__title",`proton-Banner--${n}__title`),"data-testid":e["data-testid"],children:t})},sv=({children:t,...e})=>{const n=a.useContext(Pn);if(!n)throw new Error("BannerContent must be used within a Banner");return g.jsx("p",{className:_.csx("proton-Banner","proton-Banner__content",`proton-Banner--${n}__content`),"data-testid":e["data-testid"],children:t})},av=({children:t,icon:e,...n})=>{const r=a.useContext(Pn);if(!r)throw new Error("BannerIcon must be used within a Banner");const i=a.isValidElement(e)?e:e===!0?Ba[r]:t||null;return i?g.jsx("span",{"aria-hidden":"true","data-testid":n["data-testid"],className:_.csx("proton-Banner__icon",`proton-Banner--${r}__icon`),children:i}):null},cv=({children:t,...e})=>g.jsx(Yr,{...e,children:t}),dv=({children:t})=>g.jsx("div",{className:"proton-Banner__actions",children:t});Te.Title=uv;Te.Content=sv;Te.Icon=av;Te.Action=cv;Te.Actions=dv;Te.colors=iv;Te.icons=Ba;Te.variants=ov;let Ka=a.createContext(null);function Ma(t){let e={...t,"data-testid":void 0},n=Rp(e),{radioGroupProps:r}=ap(e,n);return g.jsx("div",{...r,className:"proton-ButtonGroup","data-value":n.selectedValue,"data-testid":t["data-testid"]||void 0,children:g.jsx(Ka.Provider,{value:n,children:t.children})})}Ma.Option=function(e){let n={...e,"data-testid":void 0},r=a.useContext(Ka),l=a.useRef(null),{inputProps:i,isSelected:o}=sp(n,r,l);return g.jsxs("label",{className:_.csx("proton-ButtonGroup__option",o&&"proton-ButtonGroup__option--selected"),"data-selected":o||void 0,"data-testid":e["data-testid"]||void 0,children:[g.jsx(Fr,{children:g.jsx("input",{...i,ref:l})}),e.children]})};function fv({title:t,children:e,...n}){let r=a.useRef(null),{dialogProps:l,titleProps:i}=Hf(n,r);const{className:o}=Se();return g.jsxs("div",{...l,ref:r,className:_.csx("proton-Dialog",o),children:[t&&g.jsx("h3",{...i,className:"proton-Dialog__header",children:t}),e]})}const pv="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs%3e%3csymbol%20id='external-link'%20viewBox='0%200%20512%20512'%3e%3cpath%20d='M384%20224v184a40%2040%200%2001-40%2040H104a40%2040%200%2001-40-40V168a40%2040%200%200140-40h167.48M336%2064h112v112M224%20288L440%2072'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='32'/%3e%3c/symbol%3e%3csymbol%20id='caret-down'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='currentColor'%20d='M233.4%20406.6c12.5%2012.5%2032.8%2012.5%2045.3%200l192-192c12.5-12.5%2012.5-32.8%200-45.3s-32.8-12.5-45.3%200L256%20338.7L86.6%20169.4c-12.5-12.5-32.8-12.5-45.3%200s-12.5%2032.8%200%2045.3l192%20192z'/%3e%3c/symbol%3e%3c/defs%3e%3c/svg%3e";function vv(t){let e={height:t.size||void 0,width:t.size||void 0,color:t.color||void 0};return g.jsx("svg",{style:e,...t,children:g.jsx("use",{href:`${pv}#${t.id}`})})}function hv(t){const[e,n]=a.useState("");return a.useEffect(()=>{},[]),e?g.jsxs(g.Fragment,{children:[g.jsx("div",{dangerouslySetInnerHTML:{__html:e},style:{display:"none"}}),g.jsx(vv,{...t})]}):null}const Ra=a.forwardRef(({prefix:t,suffix:e,description:n,descriptionPosition:r="top",isDisabled:l,error:i,onChange:o,label:u,name:s,placeholder:c,type:d="text",value:f,autoFocus:p,autoComplete:v,"data-testid":b},y)=>{const $=a.useRef(null),{className:C,palette:S,theme:x}=Se(),T=y||$,{labelProps:w,inputProps:D,descriptionProps:I,errorMessageProps:h}=Ni({label:u,name:s,type:d,autoFocus:p,autoComplete:v?"on":"off","aria-label":u||s,"aria-describedby":i?`${s}-input-error`:`${s}-input`,errorMessage:i,isDisabled:l,placeholder:c,validationState:i?"invalid":"valid",value:f,onChange:o},T),{clipboardProps:B}=Qf({getItems(){return[{"text/plain":f}]}}),P={"--input-background":(()=>{switch(x){case xe.THEMES.CUSTOM_DARK:return _.chroma(S.PRIMARY.PRIMARY_SUPER_LIGHT).alpha(.4).css();case xe.THEMES.DARK:return _.chroma(q.GRAYSCALE.GRAY_MEDIUM).alpha(.5).css();default:return _.chroma(q.GRAYSCALE.WHITE).css()}})()};return g.jsxs("div",{className:"proton-Input__container",children:[n&&r==="top"&&g.jsx("div",{...I,className:"proton-Input__text",children:n}),g.jsxs("div",{className:"proton-Input__container-inner",children:[t&&g.jsx("div",{className:_.csx("proton-Input__descriptor","proton-Input__prefix"),children:t}),g.jsx("input",{...D,...B,"data-testid":b,id:`${s}-input`,"aria-invalid":!!i,ref:T,style:P,className:_.csx("proton-Input",i&&"proton-Input--error",u&&!c&&"proton-Input__label-top",C)}),g.jsx("label",{...w,className:_.csx("proton-Input__label",c&&"proton-Input__label--hide",f&&"proton-Input__label--filled"),children:u}),e&&g.jsx("div",{className:_.csx("proton-Input__descriptor","proton-Input__suffix"),children:e})]}),i?g.jsx("div",{...h,role:"alert",className:_.csx("proton-Input__error","proton-Input__text"),id:`${s}-error`,children:i}):n&&r==="bottom"?g.jsx("div",{...I,className:"proton-Input__text",children:n}):null]})}),mv=({name:t="search",placeholder:e="Search...",autoComplete:n,isClearable:r=!0,error:l,defaultValue:i,value:o,"data-testid":u="proton-SearchInput",onChange:s,onClear:c})=>{const d=Ip({defaultValue:i,value:o,onChange:C=>s==null?void 0:s(C),onClear:()=>c==null?void 0:c(),label:e}),f=a.useRef(null),{inputProps:p,clearButtonProps:v}=dp({...d,placeholder:e},d,f),{value:b,setValue:y}=d,$=()=>{c&&c(),s==null||s(""),y("")};return g.jsx("div",{className:"proton-SearchInput__wrapper","data-testid":u,role:"search",children:g.jsx(Ra,{...p,type:"search",onChange:C=>d.setValue(C),value:b,name:t,placeholder:e,autoComplete:n,error:l,ref:f,prefix:g.jsxs("svg",{"aria-hidden":"true",width:"1.6em",height:"1.6em",viewBox:"0 0 24 24",onClick:()=>{var C;return(C=f.current)==null?void 0:C.focus()},children:[g.jsx("title",{children:"Magnifying Glass"}),g.jsx("path",{fill:"currentColor",d:"M10.5 18.5a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm0-1a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5.25-.75 4.5 4.5-1.25 1.25-4.5-4.5 1.25-1.25Z"})]}),suffix:g.jsx("button",{"aria-label":v["aria-label"],type:"button",className:_.csx("proton-SearchInput__button","proton-Input__descriptor","proton-Input__suffix",!(r&&(b==null?void 0:b.length)>0)&&"proton-SearchInput__button--hide"),"data-testid":`${u}-clear`,onClick:()=>{var C;$(),(C=f.current)==null||C.focus()},children:g.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 50 50",width:"1.2em",height:"1.2em",children:[g.jsx("title",{children:"Clear"}),g.jsx("path",{fill:"currentColor",d:"m37.304 11.282l1.414 1.414l-26.022 26.02l-1.414-1.413z"}),g.jsx("path",{fill:"currentColor",d:"m12.696 11.282l26.022 26.02l-1.414 1.415l-26.022-26.02z"})]})})})})};function bv(t){const e=a.useRef(null),n=wn(t||{}),{triggerProps:r,overlayProps:l}=ji({type:"dialog"},n,e),{buttonProps:i}=Cn(r,e);return{buttonProps:i,overlayProps:l,buttonRef:e,state:n}}function Dn({children:t,state:e,arrow:n=!0,offset:r,...l}){const i=a.useRef(null),{popoverRef:o=i}=l,{className:u,style:s}=Se();let{popoverProps:c,underlayProps:d,arrowProps:f,placement:p}=Df({...l,offset:r,popoverRef:o},e);return g.jsxs(Af,{children:[g.jsx("div",{...d,style:{position:"fixed",inset:0}}),g.jsxs("div",{...c,ref:o,className:_.csx("proton-Popover",u),style:{...s,...c.style},"data-testid":l["data-testid"]||void 0,children:[g.jsx(wf,{onDismiss:e.close}),n&&g.jsxs("svg",{...f,className:"arrow","data-placement":p,viewBox:"0 0 12 12",children:[g.jsx("title",{children:"arrow"}),g.jsx("path",{d:"M0 0 L6 6 L12 0"})]}),t]})]})}class qr{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new qr(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e}constructor(e,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.type=e,this.key=n}}class gv{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),l=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;l;)yield l,l=l.nextKey!=null?n.get(l.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}class Ia{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}appendChild(e){this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode;let r=n;for(;r;)r.index++,r=r.nextSibling;e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}removeChild(e){if(e.parentNode!==this||!this.ownerDocument.isMounted)return;this.ownerDocument.startTransaction();let n=e.nextSibling;for(;n;)n.index--,n=n.nextSibling;e.nextSibling&&(e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.removeNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}addEventListener(){}removeEventListener(){}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this.ownerDocument=e}}class Lt extends Ia{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof Lt?this.parentNode.level+(this.node.type==="item"?1:0):0}updateNode(){var e,n,r,l;let i=this.ownerDocument.getMutableNode(this);i.index=this.index,i.level=this.level,i.parentKey=this.parentNode instanceof Lt?this.parentNode.node.key:null;var o;i.prevKey=(o=(e=this.previousSibling)===null||e===void 0?void 0:e.node.key)!==null&&o!==void 0?o:null;var u;i.nextKey=(u=(n=this.nextSibling)===null||n===void 0?void 0:n.node.key)!==null&&u!==void 0?u:null,i.hasChildNodes=!!this.firstChild;var s;i.firstChildKey=(s=(r=this.firstChild)===null||r===void 0?void 0:r.node.key)!==null&&s!==void 0?s:null;var c;i.lastChildKey=(c=(l=this.lastChild)===null||l===void 0?void 0:l.node.key)!==null&&c!==void 0?c:null}setProps(e,n,r,l){let i=this.ownerDocument.getMutableNode(this),{value:o,textValue:u,id:s,...c}=e;if(c.ref=n,i.props=c,i.rendered=r,i.render=l,i.value=o,i.textValue=u||(typeof c.children=="string"?c.children:"")||e["aria-label"]||"",s!=null&&s!==i.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");i.key=s}this.hasSetProps||(this.ownerDocument.addNode(this),this.ownerDocument.endTransaction(),this.hasSetProps=!0),this.ownerDocument.queueUpdate()}get style(){return{}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this._index=0,this.hasSetProps=!1,this.node=new qr(e,`react-aria-${++n.nodeId}`),this.ownerDocument.startTransaction()}}class $v extends Ia{get isConnected(){return this.isMounted}createElement(e){return new Lt(e,this)}getMutableNode(e){let n=e.node;return this.mutatedNodes.has(e)||(n=e.node.clone(),this.mutatedNodes.add(e),e.node=n),this.markDirty(e),n}getMutableCollection(){return!this.isSSR&&!this.collectionMutated&&(this.collection=this.collection.clone(),this.collectionMutated=!0),this.collection}markDirty(e){this.dirtyNodes.add(e)}startTransaction(){this.transactionCount++}endTransaction(){this.transactionCount--}addNode(e){let n=this.getMutableCollection();if(!n.getItem(e.node.key)){n.addNode(e.node);for(let r of e)this.addNode(r)}this.markDirty(e)}removeNode(e){for(let r of e)this.removeNode(r);this.getMutableCollection().removeNode(e.node.key),this.markDirty(e)}getCollection(){return this.transactionCount>0?this.collection:(this.updateCollection(),this.collection)}updateCollection(){for(let i of this.dirtyNodes)i instanceof Lt&&i.isConnected&&i.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var e,n;let i=this.getMutableCollection();for(let o of this.mutatedNodes)o.isConnected&&i.addNode(o.node);var r,l;i.commit((r=(e=this.firstChild)===null||e===void 0?void 0:e.node.key)!==null&&r!==void 0?r:null,(l=(n=this.lastChild)===null||n===void 0?void 0:n.node.key)!==null&&l!==void 0?l:null,this.isSSR),this.mutatedNodes.clear()}this.collectionMutated=!1}queueUpdate(){if(!(this.dirtyNodes.size===0||this.transactionCount>0))for(let e of this.subscriptions)e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.mutatedNodes=new Set,this.subscriptions=new Set,this.transactionCount=0,this.collection=e,this.collectionMutated=!0}}function Fa(t){let{children:e,items:n,idScope:r,addIdAndValue:l,dependencies:i=[]}=t,o=a.useMemo(()=>new WeakMap,i);return a.useMemo(()=>{if(n&&typeof e=="function"){let c=[];for(let d of n){let f=o.get(d);if(!f){f=e(d);var u,s;let p=(s=(u=f.props.id)!==null&&u!==void 0?u:d.key)!==null&&s!==void 0?s:d.id;if(p==null)throw new Error("Could not determine key for item");r&&(p=r+":"+p),f=a.cloneElement(f,l?{key:p,id:p,value:d}:{key:p}),o.set(d,f)}c.push(f)}return c}else if(typeof e!="function")return e},[e,n,o,r,l])}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const xr=a.createContext(!1),yv=typeof DocumentFragment<"u"?new DocumentFragment:null;function xv(t){let e=a.useContext(xr),n=Xe();if(e)return a.createElement(a.Fragment,null,t.children);let r=a.createElement(xr.Provider,{value:!0},t.children);return n?a.createElement("template",{"data-react-aria-hidden":!0},r):it.createPortal(r,yv)}function Ev(t){let e=(n,r)=>a.useContext(xr)?null:t(n,r);return e.displayName=t.displayName||t.name,a.forwardRef(e)}var Er={exports:{}},Zn={};/**
|
|
30
|
+
<%s key={someKey} {...props} />`,He,ie,Hn,ie),$t[ie+He]=!0}}return a===r?In(H):kn(H),H}}function On(a,b,g){return Et(a,b,g,!0)}function Ln(a,b,g){return Et(a,b,g,!1)}var Dn=Ln,Bn=On;he.Fragment=r,he.jsx=Dn,he.jsxs=Bn}()),he}process.env.NODE_ENV==="production"?Ye.exports=Wn():Ye.exports=Kn();var c=Ye.exports;function Fn(t=!0){i.useLayoutEffect(()=>{if(!t)return;const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[t])}const Gn=({children:t})=>{const{className:e,style:n}=ee(),r=(()=>{let o=document.getElementById("action-menus-root");return o||(o=document.createElement("div"),o.id="action-menus-root",document.body.appendChild(o)),o.className=e,Object.entries(n).forEach(([s,l])=>{o.style.setProperty(s,l)}),o})();return we.createPortal(t,r)},nt=({id:t,isOpen:e,selectionMode:n="single",selectedKeys:r,disabledKeys:o,children:s,showCancel:l=!0,actions:u,closeOnNavigation:d=!0,onSelectionChange:p,onClose:f,"data-testid":v})=>{Fn(e);const{className:h,theme:m}=ee(),[x,S]=i.useState(!1),[$,C]=i.useState(0),R=i.useRef(null),M=i.useRef(null),P=i.useRef(window.location.pathname),O=u&&u.length>0,j=()=>{S(!0),C(0),setTimeout(()=>{f==null||f(),S(!1)},300)},W=O?q.useTreeState({items:u,children:u.map(I=>i.createElement(q.Item,{...I,key:I.key},I.label)),selectedKeys:new Set(r),onSelectionChange:I=>p==null?void 0:p(I),selectionMode:n,disabledKeys:o}):null,{menuProps:F}=O?y.useMenu({autoFocus:!0,shouldFocusWrap:!0,onAction:I=>{var B,J;return(J=(B=u.find(L=>L.key===I))==null?void 0:B.onAction)==null?void 0:J.call(B,I)},onClose:()=>f==null?void 0:f(),disabledKeys:o,onSelectionChange:I=>p==null?void 0:p(I),selectionMode:n,selectedKeys:r,"aria-label":"Action Menu"},W,M):{menuProps:{}},{overlayProps:V}=y.useOverlay({isOpen:e,onClose:()=>f==null?void 0:f(),isDismissable:!1},M);i.useEffect(()=>{e&&R.current&&C(R.current.scrollHeight)},[e,R]),i.useEffect(()=>{const I=B=>{B.key==="Escape"&&j()};return document.addEventListener("keydown",I),()=>{document.removeEventListener("keydown",I)}},[x]),i.useEffect(()=>{d&&(P.current&&P.current!==location.pathname&&j(),P.current=location.pathname)},[x,d]);const Q=R.current?R.current.getBoundingClientRect().height>window.innerHeight:!1,oe=s||O||l;return e?c.jsxs(Gn,{children:[c.jsx("div",{...V,className:"proton-ActionMenu__background",style:{opacity:$>0?1:0},onClick:j,id:t,children:c.jsx("div",{className:"proton-ActionMenu__close-button","data-testid":"ActionMenu-close",children:"ESC"})}),c.jsx("div",{"data-testid":v||"ActionMenu-wrapper",className:_.csx("proton-ActionMenu__wrapper",Q&&"proton-ActionMenu__wrapper--scrollable"),children:c.jsx("div",{className:_.csx("proton-ActionMenu__card",h),"data-testid":"ActionMenu-content",style:{height:`${$}px`},children:c.jsx("div",{ref:M,children:c.jsx("div",{...F,ref:R,children:oe?c.jsxs(y.FocusScope,{autoFocus:!0,contain:!0,children:[s&&c.jsx("div",{className:"proton-ActionMenu__content",children:typeof s=="function"?s({close:j}):s}),O&&c.jsx("div",{className:_.csx("proton-ActionMenu__list",n==="none"&&"proton-ActionMenu__list--disabled"),children:Array.from(W.collection).map(I=>c.jsx(Yn,{item:I,state:W,to:I.props.to},I.key))}),l&&c.jsx("div",{className:"proton-ActionMenu__cancel-button",tabIndex:-1,children:c.jsx(rt,{variant:m==="dark"||m==="custom-dark"?"translucent":"secondary",onPress:j,"data-testid":"ActionMenuItem-cancel",children:"Cancel"})})]}):null})})})})]}):null},Yn=({to:t,state:e,item:n})=>{const r=i.useRef(null),{menuItemProps:o}=y.useMenuItem({key:n.key},e,r),s=t?"a":"div",l=t&&_.isUrlExternal(t),u=t?{href:t,target:l?"_blank":void 0,rel:l?"noopener noreferrer":void 0,onClick:l||!t?()=>{}:d=>_.handleInternalNavigation(d,t)}:{};return i.createElement(s,{...o,...u,key:n.key,className:"proton-ActionMenu__item","aria-label":`ActionMenu-Item-${n.key}`,ref:r},n.rendered)},Bt=i.createContext(void 0),ee=()=>{const t=i.useContext(Bt);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t},Un={[Z.THEMES.DARK]:"proton-ui__theme--dark",[Z.THEMES.CUSTOM_DARK]:"proton-ui__theme--custom-dark",[Z.THEMES.LIGHT]:"proton-ui__theme--light"},zn=({theme:t,children:e,palette:n})=>{const r=i.useRef(null),o=Un[t],s=i.useMemo(()=>qn(n),[n]);return i.useEffect(()=>{if(r.current){r.current.className=o;const l=s[t];Object.entries(l).forEach(([u,d])=>{r.current.style.setProperty(u,d)})}},[t,o,n,s]),c.jsx(Bt.Provider,{value:{theme:t,style:s[t],palette:n,className:o},children:c.jsx("div",{ref:r,children:e})})},Ve=[83,82,83];function qn(t){const e=ve.opacify(t.PRIMARY.PRIMARY_LIGHTEST,.6);return{[Z.THEMES.DARK]:{"--proton-control__background-color":_.arrayToRgbString(Ve,1),"--proton-control__text-color":k.GRAYSCALE.WHITE,"--proton-control__border-color":k.GRAYSCALE.GRAY_DARK,"--proton-control__shadow-color":k.GRAYSCALE.GRAY_DARK,"--proton-color__primary":t.BRAND.PRIMARY,"--proton-color__primary-light":t.BRAND.PRIMARY_LIGHT,"--proton-color__secondary":t.BRAND.SECONDARY},[Z.THEMES.LIGHT]:{"--proton-control__background-color":k.GRAYSCALE.WHITE,"--proton-control__text-color":k.GRAYSCALE.GRAY_DARK,"--proton-control__border-color":k.GRAYSCALE.GRAY_LIGHT,"--proton-control__shadow-color":_.arrayToRgbString(Ve,.1),"--proton-color__primary":t.BRAND.PRIMARY,"--proton-color__primary-light":t.BRAND.PRIMARY_LIGHT,"--proton-color__secondary":t.BRAND.SECONDARY},[Z.THEMES.CUSTOM_DARK]:{"--proton-control__background-color":_.arrayToRgbString(Ve,1),"--proton-control__text-color":k.GRAYSCALE.WHITE,"--proton-control__border-color":t.PRIMARY.PRIMARY_LIGHTEST,"--proton-control__shadow-color":e,"--proton-color__primary":t.BRAND.PRIMARY,"--proton-color__primary-light":t.BRAND.PRIMARY_LIGHT,"--proton-color__secondary":t.BRAND.SECONDARY}}}const Jn={primary:"primary",secondary:"secondary",transparent:"transparent",success:"success",warning:"warning",danger:"danger"},Xn=({variant:t,children:e,...n})=>{const{className:r}=ee();return c.jsx("div",{role:"status","aria-live":"polite","data-testid":n["data-testid"],className:_.csx("proton-Badge",t&&`proton-Badge--${t}`,r),children:e})};function rt({variant:t="primary",href:e,onPress:n,type:r,isDisabled:o,"data-testid":s,children:l}){const u=e?"a":"button",d=u!=="a"?{}:{target:"_blank",href:e},p=i.useRef(null),{buttonProps:f}=y.useButton({onPress:n,elementType:u,type:r||"button",isDisabled:o},p);return c.jsxs(u,{...f,...d,className:_.csx("proton-Button",`proton-Button--${t}`,o&&"proton-Button--disabled"),ref:p,"data-testid":s,children:[l,e&&_.isUrlExternal(e)&&c.jsx("svg",{viewBox:"0 0 512 512",width:"0.8em",height:"0.8em",children:c.jsx("path",{d:"M384 224v184a40 40 0 01-40 40H104a40 40 0 01-40-40V168a40 40 0 0140-40h167.48M336 64h112v112M224 288L440 72",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"})})]})}const Ht={success:c.jsx("svg",{viewBox:"0 0 20 20",height:"18",width:"18",children:c.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"})}),warning:c.jsx("svg",{viewBox:"0 0 56 56",height:"17",width:"17",children:c.jsx("path",{d:"M9.59 50.207h36.82c3.516 0 5.719-2.531 5.719-5.719a5.56 5.56 0 0 0-.75-2.812l-18.445-33c-1.055-1.899-2.977-2.883-4.922-2.883c-1.922 0-3.89.984-4.946 2.883L4.645 41.699c-.516.89-.774 1.828-.774 2.79c0 3.187 2.227 5.718 5.719 5.718m18.422-16.055c-1.242 0-1.922-.703-1.969-1.968l-.328-11.578c-.047-1.266.937-2.204 2.273-2.204c1.313 0 2.344.961 2.297 2.227l-.351 11.555c-.047 1.289-.727 1.968-1.922 1.968m0 8.649c-1.36 0-2.625-1.078-2.625-2.532s1.242-2.53 2.625-2.53s2.625 1.054 2.625 2.53c0 1.477-1.266 2.532-2.625 2.532"})}),danger:c.jsx("svg",{viewBox:"0 0 20 20",height:"18",width:"18",children:c.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z"})})},Zn={default:{background:k.GRAYSCALE.GRAY_LIGHTEST,title:k.GRAYSCALE.GRAY_DARK,content:k.GRAYSCALE.GRAY_MEDIUM,icon:k.GRAYSCALE.GRAY_MEDIUM_LIGHT},success:{background:k.SUCCESS.SUPER_LIGHT,title:k.SUCCESS.DARK,content:k.SUCCESS.MEDIUM,icon:k.SUCCESS.LIGHT},warning:{background:k.WARNING.SUPER_LIGHT,title:k.WARNING.DARK,content:k.WARNING.MEDIUM,icon:k.WARNING.LIGHT},danger:{background:k.DANGER.SUPER_LIGHT,title:k.DANGER.DARK,content:k.DANGER.MEDIUM,icon:k.DANGER.LIGHT}},Qn={default:"default",success:"success",warning:"warning",danger:"danger"},Re=i.createContext(void 0),ne=({variant:t="default",rounded:e=!0,icon:n=!1,compact:r=!0,children:o,...s})=>c.jsx(Re.Provider,{value:t,children:c.jsx("div",{role:"status","aria-live":"polite",className:_.csx("proton-Banner",`proton-Banner--${t}`,e&&"proton-Banner--rounded"),"data-testid":s["data-testid"],children:c.jsxs("div",{className:_.csx("proton-Banner__wrapper",r&&"proton-Banner__wrapper--compact"),children:[c.jsx(ne.Icon,{icon:n}),c.jsx("div",{className:"proton-Banner__content-wrapper",children:c.jsx("div",{className:"proton-Banner__container",children:o})})]})})}),er=({children:t,...e})=>{const n=i.useContext(Re);if(!n)throw new Error("BannerTitle must be used within a Banner");return c.jsx("h3",{className:_.csx("proton-Banner","proton-Banner__title",`proton-Banner--${n}__title`),"data-testid":e["data-testid"],children:t})},tr=({children:t,...e})=>{const n=i.useContext(Re);if(!n)throw new Error("BannerContent must be used within a Banner");return c.jsx("p",{className:_.csx("proton-Banner","proton-Banner__content",`proton-Banner--${n}__content`),"data-testid":e["data-testid"],children:t})},nr=({children:t,icon:e,...n})=>{const r=i.useContext(Re);if(!r)throw new Error("BannerIcon must be used within a Banner");const s=i.isValidElement(e)?e:e===!0?Ht[r]:t||null;return s?c.jsx("span",{"aria-hidden":"true","data-testid":n["data-testid"],className:_.csx("proton-Banner__icon",`proton-Banner--${r}__icon`),children:s}):null},rr=({children:t,...e})=>c.jsx(rt,{...e,children:t}),or=({children:t})=>c.jsx("div",{className:"proton-Banner__actions",children:t});ne.Title=er;ne.Content=tr;ne.Icon=nr;ne.Action=rr;ne.Actions=or;ne.colors=Zn;ne.icons=Ht;ne.variants=Qn;let Vt=i.createContext(null);function Wt(t){let e={...t,"data-testid":void 0},n=q.useRadioGroupState(e),{radioGroupProps:r}=y.useRadioGroup(e,n);return c.jsx("div",{...r,className:"proton-ButtonGroup","data-value":n.selectedValue,"data-testid":t["data-testid"]||void 0,children:c.jsx(Vt.Provider,{value:n,children:t.children})})}Wt.Option=function(e){let n={...e,"data-testid":void 0},r=i.useContext(Vt),o=i.useRef(null),{inputProps:s,isSelected:l}=y.useRadio(n,r,o);return c.jsxs("label",{className:_.csx("proton-ButtonGroup__option",l&&"proton-ButtonGroup__option--selected"),"data-selected":l||void 0,"data-testid":e["data-testid"]||void 0,children:[c.jsx(y.VisuallyHidden,{children:c.jsx("input",{...s,ref:o})}),e.children]})};function ir({title:t,children:e,...n}){let r=i.useRef(null),{dialogProps:o,titleProps:s}=y.useDialog(n,r);const{className:l}=ee();return c.jsxs("div",{...o,ref:r,className:_.csx("proton-Dialog",l),children:[t&&c.jsx("h3",{...s,className:"proton-Dialog__header",children:t}),e]})}const sr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs%3e%3csymbol%20id='external-link'%20viewBox='0%200%20512%20512'%3e%3cpath%20d='M384%20224v184a40%2040%200%2001-40%2040H104a40%2040%200%2001-40-40V168a40%2040%200%200140-40h167.48M336%2064h112v112M224%20288L440%2072'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='32'/%3e%3c/symbol%3e%3csymbol%20id='caret-down'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='currentColor'%20d='M233.4%20406.6c12.5%2012.5%2032.8%2012.5%2045.3%200l192-192c12.5-12.5%2012.5-32.8%200-45.3s-32.8-12.5-45.3%200L256%20338.7L86.6%20169.4c-12.5-12.5-32.8-12.5-45.3%200s-12.5%2032.8%200%2045.3l192%20192z'/%3e%3c/symbol%3e%3c/defs%3e%3c/svg%3e";function ar(t){let e={height:t.size||void 0,width:t.size||void 0,color:t.color||void 0};return c.jsx("svg",{style:e,...t,children:c.jsx("use",{href:`${sr}#${t.id}`})})}function lr(t){const[e,n]=i.useState("");return i.useEffect(()=>{},[]),e?c.jsxs(c.Fragment,{children:[c.jsx("div",{dangerouslySetInnerHTML:{__html:e},style:{display:"none"}}),c.jsx(ar,{...t})]}):null}const Kt=i.forwardRef(({prefix:t,suffix:e,description:n,descriptionPosition:r="top",isDisabled:o,error:s,onChange:l,label:u,name:d,placeholder:p,type:f="text",value:v,autoFocus:h,autoComplete:m,"data-testid":x},S)=>{const $=i.useRef(null),{className:C,palette:R,theme:M}=ee(),P=S||$,{labelProps:O,inputProps:j,descriptionProps:W,errorMessageProps:F}=y.useTextField({label:u,name:d,type:f,autoFocus:h,autoComplete:m?"on":"off","aria-label":u||d,"aria-describedby":s?`${d}-input-error`:`${d}-input`,errorMessage:s,isDisabled:o,placeholder:p,validationState:s?"invalid":"valid",value:v,onChange:l},P),{clipboardProps:V}=y.useClipboard({getItems(){return[{"text/plain":v}]}}),Q={"--input-background":(()=>{switch(M){case Z.THEMES.CUSTOM_DARK:return ve.transparentize(R.PRIMARY.PRIMARY_SUPER_LIGHT,.6);case Z.THEMES.DARK:return ve.transparentize(k.GRAYSCALE.GRAY_MEDIUM,.5);default:return k.GRAYSCALE.WHITE}})()};return c.jsxs("div",{className:"proton-Input__container",children:[n&&r==="top"&&c.jsx("div",{...W,className:"proton-Input__text",children:n}),c.jsxs("div",{className:"proton-Input__container-inner",children:[t&&c.jsx("div",{className:_.csx("proton-Input__descriptor","proton-Input__prefix"),children:t}),c.jsx("input",{...j,...V,"data-testid":x,id:`${d}-input`,"aria-invalid":!!s,ref:P,style:Q,className:_.csx("proton-Input",s&&"proton-Input--error",u&&!p&&"proton-Input__label-top",C)}),c.jsx("label",{...O,className:_.csx("proton-Input__label",p&&"proton-Input__label--hide",v&&"proton-Input__label--filled"),children:u}),e&&c.jsx("div",{className:_.csx("proton-Input__descriptor","proton-Input__suffix"),children:e})]}),s?c.jsx("div",{...F,role:"alert",className:_.csx("proton-Input__error","proton-Input__text"),id:`${d}-error`,children:s}):n&&r==="bottom"?c.jsx("div",{...W,className:"proton-Input__text",children:n}):null]})});function cr(t,e,n){let[r,o]=i.useState(t||e),s=i.useRef(t!==void 0),l=t!==void 0;i.useEffect(()=>{let p=s.current;p!==l&&console.warn(`WARN: A component changed from ${p?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),s.current=l},[l]);let u=l?t:r,d=i.useCallback((p,...f)=>{let v=(h,...m)=>{n&&(Object.is(u,h)||n(h,...m)),l||(u=h)};typeof p=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),o((m,...x)=>{let S=p(l?u:m,...x);return v(S,...f),l?m:S})):(l||o(p),v(p,...f))},[l,u,n]);return[u,d]}function ur(t){let[e,n]=cr(Rt(t.value),Rt(t.defaultValue)||"",t.onChange);return{value:e,setValue:n}}function Rt(t){if(t!=null)return t.toString()}const dr=({name:t="search",placeholder:e="Search...",autoComplete:n,isClearable:r=!0,error:o,defaultValue:s,value:l,"data-testid":u="proton-SearchInput",onChange:d,onClear:p})=>{const f=ur({defaultValue:s,value:l,onChange:C=>d==null?void 0:d(C),onClear:()=>p==null?void 0:p(),label:e}),v=i.useRef(null),{inputProps:h,clearButtonProps:m}=y.useSearchField({...f,placeholder:e},f,v),{value:x,setValue:S}=f,$=()=>{p&&p(),d==null||d(""),S("")};return c.jsx("div",{className:"proton-SearchInput__wrapper","data-testid":u,role:"search",children:c.jsx(Kt,{...h,type:"search",onChange:C=>f.setValue(C),value:x,name:t,placeholder:e,autoComplete:n,error:o,ref:v,prefix:c.jsxs("svg",{"aria-hidden":"true",width:"1.6em",height:"1.6em",viewBox:"0 0 24 24",onClick:()=>{var C;return(C=v.current)==null?void 0:C.focus()},children:[c.jsx("title",{children:"Magnifying Glass"}),c.jsx("path",{fill:"currentColor",d:"M10.5 18.5a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm0-1a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5.25-.75 4.5 4.5-1.25 1.25-4.5-4.5 1.25-1.25Z"})]}),suffix:c.jsx("button",{"aria-label":m["aria-label"],type:"button",className:_.csx("proton-SearchInput__button","proton-Input__descriptor","proton-Input__suffix",!(r&&(x==null?void 0:x.length)>0)&&"proton-SearchInput__button--hide"),"data-testid":`${u}-clear`,onClick:()=>{var C;$(),(C=v.current)==null||C.focus()},children:c.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 50 50",width:"1.2em",height:"1.2em",children:[c.jsx("title",{children:"Clear"}),c.jsx("path",{fill:"currentColor",d:"m37.304 11.282l1.414 1.414l-26.022 26.02l-1.414-1.413z"}),c.jsx("path",{fill:"currentColor",d:"m12.696 11.282l26.022 26.02l-1.414 1.415l-26.022-26.02z"})]})})})})};function fr(t){const e=i.useRef(null),n=q.useOverlayTriggerState(t||{}),{triggerProps:r,overlayProps:o}=y.useOverlayTrigger({type:"dialog"},n,e),{buttonProps:s}=y.useButton(r,e);return{buttonProps:s,overlayProps:o,buttonRef:e,state:n}}function Pe({children:t,state:e,arrow:n=!0,offset:r,...o}){const s=i.useRef(null),{popoverRef:l=s}=o,{className:u,style:d}=ee();let{popoverProps:p,underlayProps:f,arrowProps:v,placement:h}=y.usePopover({...o,offset:r,popoverRef:l},e);return c.jsxs(y.Overlay,{children:[c.jsx("div",{...f,style:{position:"fixed",inset:0}}),c.jsxs("div",{...p,ref:l,className:_.csx("proton-Popover",u),style:{...d,...p.style},"data-testid":o["data-testid"]||void 0,children:[c.jsx(y.DismissButton,{onDismiss:e.close}),n&&c.jsxs("svg",{...v,className:"arrow","data-placement":h,viewBox:"0 0 12 12",children:[c.jsx("title",{children:"arrow"}),c.jsx("path",{d:"M0 0 L6 6 L12 0"})]}),t]})]})}class ot{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new ot(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e}constructor(e,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.type=e,this.key=n}}class pr{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),o=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;o;)yield o,o=o.nextKey!=null?n.get(o.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}class Ft{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}appendChild(e){this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode;let r=n;for(;r;)r.index++,r=r.nextSibling;e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}removeChild(e){if(e.parentNode!==this||!this.ownerDocument.isMounted)return;this.ownerDocument.startTransaction();let n=e.nextSibling;for(;n;)n.index--,n=n.nextSibling;e.nextSibling&&(e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.removeNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}addEventListener(){}removeEventListener(){}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this.ownerDocument=e}}class me extends Ft{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof me?this.parentNode.level+(this.node.type==="item"?1:0):0}updateNode(){var e,n,r,o;let s=this.ownerDocument.getMutableNode(this);s.index=this.index,s.level=this.level,s.parentKey=this.parentNode instanceof me?this.parentNode.node.key:null;var l;s.prevKey=(l=(e=this.previousSibling)===null||e===void 0?void 0:e.node.key)!==null&&l!==void 0?l:null;var u;s.nextKey=(u=(n=this.nextSibling)===null||n===void 0?void 0:n.node.key)!==null&&u!==void 0?u:null,s.hasChildNodes=!!this.firstChild;var d;s.firstChildKey=(d=(r=this.firstChild)===null||r===void 0?void 0:r.node.key)!==null&&d!==void 0?d:null;var p;s.lastChildKey=(p=(o=this.lastChild)===null||o===void 0?void 0:o.node.key)!==null&&p!==void 0?p:null}setProps(e,n,r,o){let s=this.ownerDocument.getMutableNode(this),{value:l,textValue:u,id:d,...p}=e;if(p.ref=n,s.props=p,s.rendered=r,s.render=o,s.value=l,s.textValue=u||(typeof p.children=="string"?p.children:"")||e["aria-label"]||"",d!=null&&d!==s.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");s.key=d}this.hasSetProps||(this.ownerDocument.addNode(this),this.ownerDocument.endTransaction(),this.hasSetProps=!0),this.ownerDocument.queueUpdate()}get style(){return{}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this._index=0,this.hasSetProps=!1,this.node=new ot(e,`react-aria-${++n.nodeId}`),this.ownerDocument.startTransaction()}}class hr extends Ft{get isConnected(){return this.isMounted}createElement(e){return new me(e,this)}getMutableNode(e){let n=e.node;return this.mutatedNodes.has(e)||(n=e.node.clone(),this.mutatedNodes.add(e),e.node=n),this.markDirty(e),n}getMutableCollection(){return!this.isSSR&&!this.collectionMutated&&(this.collection=this.collection.clone(),this.collectionMutated=!0),this.collection}markDirty(e){this.dirtyNodes.add(e)}startTransaction(){this.transactionCount++}endTransaction(){this.transactionCount--}addNode(e){let n=this.getMutableCollection();if(!n.getItem(e.node.key)){n.addNode(e.node);for(let r of e)this.addNode(r)}this.markDirty(e)}removeNode(e){for(let r of e)this.removeNode(r);this.getMutableCollection().removeNode(e.node.key),this.markDirty(e)}getCollection(){return this.transactionCount>0?this.collection:(this.updateCollection(),this.collection)}updateCollection(){for(let s of this.dirtyNodes)s instanceof me&&s.isConnected&&s.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var e,n;let s=this.getMutableCollection();for(let l of this.mutatedNodes)l.isConnected&&s.addNode(l.node);var r,o;s.commit((r=(e=this.firstChild)===null||e===void 0?void 0:e.node.key)!==null&&r!==void 0?r:null,(o=(n=this.lastChild)===null||n===void 0?void 0:n.node.key)!==null&&o!==void 0?o:null,this.isSSR),this.mutatedNodes.clear()}this.collectionMutated=!1}queueUpdate(){if(!(this.dirtyNodes.size===0||this.transactionCount>0))for(let e of this.subscriptions)e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.mutatedNodes=new Set,this.subscriptions=new Set,this.transactionCount=0,this.collection=e,this.collectionMutated=!0}}function Gt(t){let{children:e,items:n,idScope:r,addIdAndValue:o,dependencies:s=[]}=t,l=i.useMemo(()=>new WeakMap,s);return i.useMemo(()=>{if(n&&typeof e=="function"){let p=[];for(let f of n){let v=l.get(f);if(!v){v=e(f);var u,d;let h=(d=(u=v.props.id)!==null&&u!==void 0?u:f.key)!==null&&d!==void 0?d:f.id;if(h==null)throw new Error("Could not determine key for item");r&&(h=r+":"+h),v=i.cloneElement(v,o?{key:h,id:h,value:f}:{key:h}),l.set(f,v)}p.push(v)}return p}else if(typeof e!="function")return e},[e,n,l,r,o])}const Ee={prefix:String(Math.round(Math.random()*1e10)),current:0},Yt=i.createContext(Ee),vr=i.createContext(!1);let mr=!!(typeof window<"u"&&window.document&&window.document.createElement),We=new WeakMap;function br(t=!1){let e=i.useContext(Yt),n=i.useRef(null);if(n.current===null&&!t){var r,o;let s=(o=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0||(r=o.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(s){let l=We.get(s);l==null?We.set(s,{id:e.current,state:s.memoizedState}):s.memoizedState!==l.state&&(e.current=l.id,We.delete(s))}n.current=++e.current}return n.current}function gr(t){let e=i.useContext(Yt);e===Ee&&!mr&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=br(!!t),r=e===Ee&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function yr(t){let e=i.useId(),[n]=i.useState(Te()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Ee.prefix}`;return t||`${r}-${e}`}i.useId;function xr(){return!1}function Sr(){return!0}function _r(t){return()=>{}}function Te(){return typeof i.useSyncExternalStore=="function"?i.useSyncExternalStore(_r,xr,Sr):i.useContext(vr)}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const Ue=i.createContext(!1),$r=typeof DocumentFragment<"u"?new DocumentFragment:null;function Er(t){let e=i.useContext(Ue),n=Te();if(e)return i.createElement(i.Fragment,null,t.children);let r=i.createElement(Ue.Provider,{value:!0},t.children);return n?i.createElement("template",{"data-react-aria-hidden":!0},r):we.createPortal(r,$r)}function Cr(t){let e=(n,r)=>i.useContext(Ue)?null:t(n,r);return e.displayName=t.displayName||t.name,i.forwardRef(e)}const ce=typeof document<"u"?i.useLayoutEffect:()=>{};function Pt(t){const e=i.useRef(null);return ce(()=>{e.current=t},[t]),i.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}let Tt=new Map;function wr(t,e){if(t===e)return t;let n=Tt.get(t);if(n)return n.forEach(o=>o(e)),e;let r=Tt.get(e);return r?(r.forEach(o=>o(t)),t):e}function Rr(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Pr=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document};function Ut(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Ut(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Tr(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Ut(t))&&(r&&(r+=" "),r+=e);return r}function zt(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let o in r){let s=e[o],l=r[o];typeof s=="function"&&typeof l=="function"&&o[0]==="o"&&o[1]==="n"&&o.charCodeAt(2)>=65&&o.charCodeAt(2)<=90?e[o]=Rr(s,l):(o==="className"||o==="UNSAFE_className")&&typeof s=="string"&&typeof l=="string"?e[o]=Tr(s,l):o==="id"&&s&&l?e.id=wr(s,l):e[o]=l!==void 0?l:s}}return e}function Mr(...t){return t.length===1&&t[0]?t[0]:e=>{for(let n of t)typeof n=="function"?n(e):n!=null&&(n.current=e)}}const Nr=new Set(["id"]),jr=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Ar=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),kr=/^(data-.*)$/;function it(t,e={}){let{labelable:n,isLink:r,propNames:o}=e,s={};for(const l in t)Object.prototype.hasOwnProperty.call(t,l)&&(Nr.has(l)||n&&jr.has(l)||r&&Ar.has(l)||o!=null&&o.has(l)||kr.test(l))&&(s[l]=t[l]);return s}function Me(t){const e=i.useRef(null);return i.useMemo(()=>({get current(){return e.current},set current(n){e.current=n,typeof t=="function"?t(n):t&&(t.current=n)}}),[t])}function Ir(){return typeof window.ResizeObserver<"u"}function Or(t){const{ref:e,box:n,onResize:r}=t;i.useEffect(()=>{let o=e==null?void 0:e.current;if(o)if(Ir()){const s=new window.ResizeObserver(l=>{l.length&&r()});return s.observe(o,{box:n}),()=>{o&&s.unobserve(o)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,e,n])}function Lr(t,e){ce(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}var ze={exports:{}},Ke={};/**
|
|
32
31
|
* @license React
|
|
33
32
|
* use-sync-external-store-shim.production.min.js
|
|
34
33
|
*
|
|
@@ -36,7 +35,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
36
35
|
*
|
|
37
36
|
* This source code is licensed under the MIT license found in the
|
|
38
37
|
* LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/var
|
|
38
|
+
*/var Mt;function Dr(){if(Mt)return Ke;Mt=1;var t=i;function e(v,h){return v===h&&(v!==0||1/v===1/h)||v!==v&&h!==h}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,s=t.useLayoutEffect,l=t.useDebugValue;function u(v,h){var m=h(),x=r({inst:{value:m,getSnapshot:h}}),S=x[0].inst,$=x[1];return s(function(){S.value=m,S.getSnapshot=h,d(S)&&$({inst:S})},[v,m,h]),o(function(){return d(S)&&$({inst:S}),v(function(){d(S)&&$({inst:S})})},[v]),l(m),m}function d(v){var h=v.getSnapshot;v=v.value;try{var m=h();return!n(v,m)}catch{return!0}}function p(v,h){return h()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:u;return Ke.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:f,Ke}var Fe={};/**
|
|
40
39
|
* @license React
|
|
41
40
|
* use-sync-external-store-shim.development.js
|
|
42
41
|
*
|
|
@@ -44,5 +43,5 @@ React keys must be passed directly to JSX without using spread:
|
|
|
44
43
|
*
|
|
45
44
|
* This source code is licensed under the MIT license found in the
|
|
46
45
|
* LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/var Ql;function Sv(){return Ql||(Ql=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=a,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(x){{for(var T=arguments.length,w=new Array(T>1?T-1:0),D=1;D<T;D++)w[D-1]=arguments[D];r("error",x,w)}}function r(x,T,w){{var D=e.ReactDebugCurrentFrame,I=D.getStackAddendum();I!==""&&(T+="%s",w=w.concat([I]));var h=w.map(function(B){return String(B)});h.unshift("Warning: "+T),Function.prototype.apply.call(console[x],console,h)}}function l(x,T){return x===T&&(x!==0||1/x===1/T)||x!==x&&T!==T}var i=typeof Object.is=="function"?Object.is:l,o=t.useState,u=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue,d=!1,f=!1;function p(x,T,w){d||t.startTransition!==void 0&&(d=!0,n("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 D=T();if(!f){var I=T();i(D,I)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var h=o({inst:{value:D,getSnapshot:T}}),B=h[0].inst,P=h[1];return s(function(){B.value=D,B.getSnapshot=T,v(B)&&P({inst:B})},[x,D,T]),u(function(){v(B)&&P({inst:B});var A=function(){v(B)&&P({inst:B})};return x(A)},[x]),c(D),D}function v(x){var T=x.getSnapshot,w=x.value;try{var D=T();return!i(w,D)}catch{return!0}}function b(x,T,w){return T()}var y=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$=!y,C=$?b:p,S=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:C;Jn.useSyncExternalStore=S,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jn}process.env.NODE_ENV==="production"?Er.exports=Cv():Er.exports=Sv();var wv=Er.exports;const Na=a.createContext(!1),Ot=a.createContext(null);function Pv(t){if(a.useContext(Ot))return t.content;let{collection:n,document:r}=Av(t.createCollection);return a.createElement(a.Fragment,null,a.createElement(xv,null,a.createElement(Ot.Provider,{value:r},t.content)),a.createElement(Dv,{render:t.children,collection:n}))}function Dv({collection:t,render:e}){return e(t)}function kv(t,e,n){let r=Xe(),l=a.useRef(r);l.current=r;let i=a.useCallback(()=>l.current?n():e(),[e,n]);return wv.useSyncExternalStore(t,i)}const Tv=typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore:kv;function Av(t){let[e]=a.useState(()=>new $v((t==null?void 0:t())||new gv)),n=a.useCallback(o=>e.subscribe(o),[e]),r=a.useCallback(()=>{let o=e.getCollection();return e.isSSR&&e.resetAfterSSR(),o},[e]),l=a.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),i=Tv(n,r,l);return G(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:i,document:e}}const Cr=a.createContext(null);function Bv(t,e,n,r,l,i){let o=a.useCallback(s=>{s==null||s.setProps(e,n,r,i)},[e,n,r,i]),u=a.useContext(Cr);if(u){let s=u.ownerDocument.nodesByProps.get(e);return s||(s=u.ownerDocument.createElement(t),s.setProps(e,n,r,i),u.appendChild(s),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(e,s)),l?a.createElement(Cr.Provider,{value:s},l):null}return a.createElement(t,{ref:o},l)}function Kv(t,e){let n=({node:l})=>e(l.props,l.props.ref,l),r=a.forwardRef((l,i)=>{if(!a.useContext(Na)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(l,i)}return Bv(t,l,i,"children"in l?l.children:null,null,u=>a.createElement(n,{node:u}))});return r.displayName=e.name,r}function Mv(t){return Fa({...t,addIdAndValue:!0})}const ei=a.createContext(null);function Rv(t){let e=a.useContext(ei),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope||(e==null?void 0:e.idScope),l=Mv({...t,idScope:r,dependencies:n});return a.useContext(Ot)&&(l=a.createElement(Iv,null,l)),e=a.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),a.createElement(ei.Provider,{value:e},l)}function Iv({children:t}){let e=a.useContext(Ot),n=a.useMemo(()=>a.createElement(Ot.Provider,{value:null},a.createElement(Na.Provider,{value:!0},t)),[t]);return Xe()?a.createElement(Cr.Provider,{value:e},n):it.createPortal(n,e)}const Fv=a.createContext(null),Nv={CollectionRoot({collection:t,renderDropIndicator:e}){return ti(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return ti(t,e,n)}};function ti(t,e,n){return Fa({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){var l;let i=r.render(r);if(!n||r.type!=="item")return i;let o=r.key,u=t.getKeyAfter(o);return a.createElement(a.Fragment,null,n({type:"item",key:o,dropPosition:"before"}),i,(u==null||((l=t.getItem(u))===null||l===void 0?void 0:l.type)!=="item")&&n({type:"item",key:o,dropPosition:"after"}))}})}const _a=a.createContext(Nv);function _v(t){return a.useMemo(()=>t!=null?new Set([t]):null,[t])}const ni=Symbol("default");function kn({values:t,children:e}){for(let[n,r]of t)e=a.createElement(n.Provider,{value:r},e);return e}function Ct(t){let{className:e,style:n,children:r,defaultClassName:l,defaultChildren:i,defaultStyle:o,values:u}=t;return a.useMemo(()=>{let s,c,d;return typeof e=="function"?s=e({...u,defaultClassName:l}):s=e,typeof n=="function"?c=n({...u,defaultStyle:o||{}}):c=n,typeof r=="function"?d=r({...u,defaultChildren:i}):r==null?d=i:d=r,{className:s??l,style:c||o?{...o,...c}:void 0,children:d??i,"data-rac":""}},[e,n,r,l,i,o,u])}function La(t,e){let n=a.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(i=>`"${i}"`));if(!e&&!n.slots[ni])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let l=e||ni;if(!n.slots[l])throw new Error(`Invalid slot "${e}". Valid slot names are ${r}.`);return n.slots[l]}return n}function Ht(t,e,n){let r=La(n,t.slot)||{},{ref:l,...i}=r,o=hn(a.useMemo(()=>Rc(e,l),[e,l])),u=j(i,t);return"style"in i&&i.style&&"style"in t&&t.style&&(typeof i.style=="function"||typeof t.style=="function"?u.style=s=>{let c=typeof i.style=="function"?i.style(s):i.style,d={...s.defaultStyle,...c},f=typeof t.style=="function"?t.style({...s,defaultStyle:d}):t.style;return{...d,...f}}:u.style={...i.style,...t.style}),[u,o]}function Lv(){let[t,e]=a.useState(!0),n=a.useRef(!1),r=a.useCallback(l=>{n.current=!0,e(!!l)},[]);return G(()=>{n.current||e(!1)},[]),[r,t]}function Ov(t,e=!0){let[n,r]=a.useState(!0);return Oa(t,n&&e,a.useCallback(()=>r(!1),[])),n&&e}function zv(t,e){let[n,r]=a.useState(!1),[l,i]=a.useState("idle");return!e&&t.current&&l==="idle"&&(n=!0,r(!0),i("exiting")),!t.current&&l==="exited"&&i("idle"),Oa(t,n,a.useCallback(()=>{i("exited"),r(!1)},[])),n}function Oa(t,e,n){let r=a.useRef(null);e&&t.current&&(r.current=window.getComputedStyle(t.current).animation),G(()=>{if(e&&t.current){let l=window.getComputedStyle(t.current);if(l.animationName&&l.animationName!=="none"&&l.animation!==r.current){let i=u=>{u.target===t.current&&(o.removeEventListener("animationend",i),it.flushSync(()=>{n()}))},o=t.current;return o.addEventListener("animationend",i),()=>{o.removeEventListener("animationend",i)}}else n()}},[t,e,n])}const jv=a.createContext(null),Vv=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),Hv=a.createContext({});function Wv(t,e){[t,e]=Ht(t,e,Hv),t=Uv(t);let n=t,{isPending:r}=n,{buttonProps:l,isPressed:i}=Cn(t,e),{focusProps:o,isFocused:u,isFocusVisible:s}=Vt(t),{hoverProps:c,isHovered:d}=xt({...t,isDisabled:t.isDisabled||r}),f={isHovered:d,isPressed:(n.isPressed||i)&&!r,isFocused:u,isFocusVisible:s,isDisabled:t.isDisabled||!1,isPending:r??!1},p=Ct({...t,values:f,defaultClassName:"react-aria-Button"}),v=de(l.id),b=de(),y=l["aria-labelledby"];r&&(y?y=`${y} ${b}`:l["aria-label"]&&(y=`${v} ${b}`));let $=a.useRef(r);return a.useEffect(()=>{let C={"aria-labelledby":y||v};(!$.current&&u&&r||$.current&&u&&!r)&&cn(C,"assertive"),$.current=r},[r,u,y,v]),a.createElement("button",{...se(t,{propNames:Vv}),...j(l,o,c),...p,id:v,ref:e,"aria-labelledby":y,slot:t.slot||void 0,"aria-disabled":r?"true":l["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":f.isPressed||void 0,"data-hovered":d||void 0,"data-focused":u||void 0,"data-pending":r||void 0,"data-focus-visible":s||void 0},a.createElement(jv.Provider,{value:{id:b}},p.children))}function Uv(t){return t.isPending&&(t.onPress=void 0,t.onPressStart=void 0,t.onPressEnd=void 0,t.onPressChange=void 0,t.onPressUp=void 0,t.onKeyDown=void 0,t.onKeyUp=void 0,t.onClick=void 0,t.href=void 0),t}const za=Ev(Wv),Gv=a.createContext({}),Yv=a.createContext({}),qv=a.createContext({}),ja=a.createContext({placement:"bottom"});function Xv(t,e){[t,e]=Ht(t,e,ja);let n=t.placement,r={position:"absolute",[n]:"100%",transform:n==="top"||n==="bottom"?"translateX(-50%)":"translateY(-50%)"},l=Ct({...t,defaultClassName:"react-aria-OverlayArrow",values:{placement:n}});return l.style&&Object.keys(l.style).forEach(i=>l.style[i]===void 0&&delete l.style[i]),a.createElement("div",{...t,...l,style:{...r,...l.style},ref:e,"data-placement":n})}const Zv=a.forwardRef(Xv),Sr=a.createContext(null),Jv=a.createContext(null),Qv=a.createContext({}),Va=a.createContext(null),Xr=a.createContext(null),Ha=a.createContext(null);function eh(t){let e=Bp(t),n=a.useRef(null),{menuTriggerProps:r,menuProps:l}=vu({...t,type:"menu"},e,n),[i,o]=a.useState(null),u=a.useCallback(()=>{n.current&&o(n.current.offsetWidth+"px")},[n]);tr({ref:n,onResize:u});let s=a.useRef(null);return a.createElement(kn,{values:[[Va,{...l,ref:s}],[Jv,e],[Ha,e],[Sr,{trigger:"MenuTrigger",triggerRef:n,scrollRef:s,placement:"bottom start",style:{"--trigger-width":i}}]]},a.createElement(cd,{...r,ref:n,isPressed:e.isOpen},t.children))}const th=a.createContext(null);function nh(t,e){return[t,e]=Ht(t,e,Va),a.createElement(Pv,{content:a.createElement(Rv,t)},n=>n.size>0&&a.createElement(rh,{props:t,collection:n,menuRef:e}))}function rh({props:t,collection:e,menuRef:n}){let r=Ta({...t,collection:e,children:void 0}),[l,i]=a.useState(null),{isVirtualized:o,CollectionRoot:u}=a.useContext(_a),{menuProps:s}=mu({...t,isVirtualized:o},r,n),c=a.useContext(Ha),d=a.useContext(Sr),f=(d==null?void 0:d.trigger)==="SubmenuTrigger";Si({ref:n,onInteractOutside:$=>{c&&!(l!=null&&l.contains($.target))&&c.close()},isDisabled:f||(c==null?void 0:c.expandedKeysStack.length)===0});let p=a.useRef(null),[v,b]=a.useState({left:0});a.useEffect(()=>{if(l&&p.current!==l&&v.left===0){p.current=l;let{left:$}=l.getBoundingClientRect();b({left:-1*$})}},[v,l]);let y=Ct({defaultClassName:"react-aria-Menu",className:t.className,style:t.style,values:{}});return a.createElement(yn,null,a.createElement("div",{...se(t),...s,...y,ref:n,slot:t.slot||void 0,onScroll:t.onScroll},a.createElement(kn,{values:[[Xr,r],[qv,{elementType:"div"}],[Sr,{UNSTABLE_portalContainer:l||void 0}],[Fv,{render:ih}],[th,{parentMenuRef:n}],[wr,null]]},a.createElement(u,{collection:e,persistedKeys:_v(r.selectionManager.focusedKey),scrollRef:n}))),a.createElement("div",{ref:i,style:{width:"100vw",position:"absolute",top:0,...v}}))}const lh=a.forwardRef(nh);function ih(t,e,n){var r,l;let i=a.useContext(Xr),{CollectionBranch:o}=a.useContext(_a),[u,s]=Lv();var c;let{headingProps:d,groupProps:f}=Vf({heading:s,"aria-label":(c=n.props["aria-label"])!==null&&c!==void 0?c:void 0}),p=Ct({defaultClassName:"react-aria-Section",className:(r=n.props)===null||r===void 0?void 0:r.className,style:(l=n.props)===null||l===void 0?void 0:l.style,values:{}});return a.createElement("section",{...se(t),...f,...p,ref:e},a.createElement(Yv.Provider,{value:{...d,ref:u}},a.createElement(o,{collection:i.collection,parent:n})))}const wr=a.createContext(null),oh=Kv("item",function(e,n,r){var l;[e,n]=Ht(e,n,wr);let i=(l=La(wr))===null||l===void 0?void 0:l.id,o=a.useContext(Xr),u=hn(n),{menuItemProps:s,labelProps:c,descriptionProps:d,keyboardShortcutProps:f,...p}=bu({...e,id:i,key:r.key},o,u),{isFocusVisible:v,focusProps:b}=Vt(),{hoverProps:y,isHovered:$}=xt({isDisabled:p.isDisabled}),C=Ct({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...p,isHovered:$,isFocusVisible:v,selectionMode:o.selectionManager.selectionMode,selectionBehavior:o.selectionManager.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),S=e.href?"a":"div";return a.createElement(S,{...j(s,b,y),...C,ref:u,"data-disabled":p.isDisabled||void 0,"data-hovered":$||void 0,"data-focused":p.isFocused||void 0,"data-focus-visible":v||void 0,"data-pressed":p.isPressed||void 0,"data-selected":p.isSelected||void 0,"data-selection-mode":o.selectionManager.selectionMode==="none"?void 0:o.selectionManager.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},a.createElement(kn,{values:[[Gv,{slots:{label:c,description:d}}],[Qv,f]]},C.children))}),Zr=a.createContext(null),Wa=a.createContext(null);function uh(t){let e=ka(t),n=a.useRef(null),{triggerProps:r,tooltipProps:l}=Dp(t,e,n);return a.createElement(kn,{values:[[Zr,e],[Wa,{...l,triggerRef:n}]]},a.createElement(Rd,{...r,ref:n},t.children))}function sh({UNSTABLE_portalContainer:t,...e},n){[e,n]=Ht(e,n,Wa);let r=a.useContext(Zr),l=ka(e),i=e.isOpen!=null||e.defaultOpen!=null||!r?l:r,o=zv(n,i.isOpen)||e.isExiting||!1;return!i.isOpen&&!o?null:a.createElement(Cf,{portalContainer:t},a.createElement(ch,{...e,tooltipRef:n,isExiting:o}))}const ah=a.forwardRef(sh);function ch(t){let e=a.useContext(Zr),n=a.useRef(null),[r,l]=a.useState(0);G(()=>{n.current&&e.isOpen&&l(n.current.getBoundingClientRect().width)},[e.isOpen,n]);let{overlayProps:i,arrowProps:o,placement:u}=Oi({placement:t.placement||"top",targetRef:t.triggerRef,overlayRef:t.tooltipRef,offset:t.offset,crossOffset:t.crossOffset,isOpen:e.isOpen,arrowSize:r,arrowBoundaryOffset:t.arrowBoundaryOffset,shouldFlip:t.shouldFlip}),s=Ov(t.tooltipRef,!!u)||t.isEntering||!1,c=Ct({...t,defaultClassName:"react-aria-Tooltip",values:{placement:u,isEntering:s,isExiting:t.isExiting,state:e}});t=j(t,i);let{tooltipProps:d}=Pp(t,e);return a.createElement("div",{...d,ref:t.tooltipRef,...c,style:{...i.style,...c.style},"data-placement":u,"data-entering":s||void 0,"data-exiting":t.isExiting||void 0},a.createElement(ja.Provider,{value:{...o,placement:u,ref:n}},c.children))}function Ua(t,e="down"){const n=e==="down"?`(max-width: ${t}px)`:`(min-width: ${t}px)`,[r,l]=a.useState(()=>typeof window<"u"?window.matchMedia(n).matches:!1);return a.useEffect(()=>{if(typeof window>"u")return;const i=window.matchMedia(n),o=u=>{l(u.matches)};return i.addEventListener("change",o),()=>i.removeEventListener("change",o)},[n]),r}const dh=({size:t})=>g.jsx("svg",{viewBox:"0 0 24 24",width:t,height:t,children:g.jsx("path",{fill:"currentColor",d:"M4 14c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm8 0c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm8 0c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})});function fh({renderTrigger:t,menuId:e,size:n=24,actions:r,disabled:l,onClose:i,testId:o,menuTestId:u}){const{className:s}=Se(),c=Ua(xe.BREAKPOINTS.SMALL),[d,f]=a.useState(!1),p=a.useRef(null),v={disabled:l,"data-testid":o,"aria-label":"Menu"},b=g.jsx(za,{...v,ref:p,onPress:()=>f($=>!$),isDisabled:l,className:`proton-ResponsiveMenuTrigger__button ${s}`,children:g.jsx(dh,{size:n})}),y=t?t({...v,onClick:()=>f($=>!$)},d):b;return a.useEffect(()=>()=>{d&&(i==null||i())},[d,i]),c?g.jsxs(g.Fragment,{children:[y,d&&g.jsx(Gr,{id:e,actions:r,isOpen:d,onClose:()=>{f(!1)},showCancel:!0,"data-testid":u})]}):g.jsxs(eh,{children:[y,d&&g.jsx(Dn,{state:{isOpen:d,setOpen:f,open:()=>f(!0),close:()=>f(!1),toggle:()=>f(!d)},triggerRef:p,arrow:!1,children:g.jsx(lh,{className:"proton-ListBox proton-ResponsiveMenuTrigger__menu",id:e,autoFocus:!0,"data-testid":u,children:r.map($=>g.jsx(oh,{href:$.to,target:"_blank",rel:"noopener noreferrer",onAction:()=>{var C;(C=$.onAction)==null||C.call($,$.key),setTimeout(()=>{f(!1)},200)},className:"proton-ListBox__item proton-ResponsiveMenuTrigger__menu-item",children:$.label},$.key))})})]})}const Pr=t=>{let e=a.useRef(null),{state:n}=t,{listBoxProps:r}=Ff(t,n,e);return g.jsx(yn,{contain:!0,restoreFocus:!0,autoFocus:!0,children:g.jsx("ul",{...r,ref:e,"data-testid":"listbox",className:"proton-ListBox",children:[...n.collection].map(l=>g.jsx(ph,{item:l,state:n},l.key))})})};function ph({item:t,state:e}){let n=a.useRef(null),{optionProps:r,isSelected:l,isFocused:i,isDisabled:o}=zf({key:t.key},e,n);return g.jsx("li",{...r,className:_.csx("proton-ListBox__item",i&&"proton-ListBox__item--focused",l&&"proton-ListBox__item--selected",o&&"proton-ListBox__item--disabled"),ref:n,children:t.rendered})}const Ga=a.forwardRef((t,e)=>{let{buttonProps:n}=Cn({...t,isDisabled:t.disabled},e);return g.jsx("button",{...n,ref:e,className:_.csx("proton-Select__trigger",t.disabled&&"proton-Select__trigger--disabled",!t.isOpen&&"proton-Select__trigger--closed",t.isOpen&&"proton-Select__trigger--opened"),children:t.children})});function vh({label:t,name:e,isDisabled:n,disabledKeys:r,selectedKey:l,onSelectionChange:i,onOpen:o,onClose:u,items:s,"data-testid":c,children:d}){const f={label:t,isDisabled:n,disabledKeys:r,selectedKey:l,items:s,"data-testid":c,children:d,onSelectionChange:i,onOpenChange:x=>{x?o==null||o():u==null||u()}},p=Ea(f),v=a.useRef(null),b=a.useRef(null),{labelProps:y,triggerProps:$,valueProps:C,menuProps:S}=Ls({...f,label:t||e},p,v);return a.useEffect(()=>{p.isOpen&&b.current&&v.current&&!b.current.style.minWidth&&(b.current.style.minWidth=`${v.current.offsetWidth}px`)}),g.jsxs("div",{className:"proton-Select","aria-label":t||e,"aria-disabled":n,children:[t?g.jsx("div",{...y,className:"proton-Select__label","data-testid":"select-label",children:t}):g.jsx("div",{...y}),g.jsx(Os,{isDisabled:n,state:p,triggerRef:v,label:t||e,name:e,"data-testid":"hidden-select-container"}),g.jsxs(Ga,{...$,isOpen:p.isOpen,ref:v,disabled:n,"data-testid":c,children:[g.jsx("div",{...C,className:"proton-Select__value",children:p.selectedItem?p.selectedItem.rendered:"Select an option"}),g.jsx("div",{className:_.csx("proton-Select__trigger_icon",p.isOpen&&"proton-Select__trigger_icon--flipped"),"aria-hidden":"true",children:g.jsxs("svg",{id:"caret-down",viewBox:"0 0 512 512",children:[g.jsx("title",{children:p.isOpen?"caret down":"caret up"}),g.jsx("path",{fill:"currentColor",d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7L86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})]})})]}),p.isOpen&&g.jsx("div",{className:"proton-Select__popover",children:g.jsx(Dn,{state:p,triggerRef:v,popoverRef:b,placement:"bottom start","data-testid":"select-popover",children:g.jsx(Pr,{...S,state:p})})})]})}const hh={Menu:vh,Option:_r};function mh({label:t,name:e,isDisabled:n,disabledKeys:r,selectedKey:l,onSelectionChange:i,onOpen:o,onClose:u,items:s,"data-testid":c,children:d}){const f={label:t,isDisabled:n,disabledKeys:r,selectedKey:l,onSelectionChange:i,onOpenChange:T=>{T?o==null||o():u==null||u()},items:s,"data-testid":c,children:d},p=Ea(f),v=Ua(xe.BREAKPOINTS.MEDIUM),b=a.useRef(null),y=a.useRef(null),{labelProps:$,triggerProps:C,valueProps:S,menuProps:x}=Ls({...f,label:t||e},p,b);return a.useEffect(()=>{p.isOpen&&y.current&&b.current&&!y.current.style.minWidth&&(y.current.style.minWidth=`${b.current.offsetWidth}px`)}),g.jsxs("div",{className:"proton-Select","aria-label":t||e,"aria-disabled":n,children:[t?g.jsx("div",{...$,className:"proton-Select__label","data-testid":"select-label",children:t}):g.jsx("div",{...$}),g.jsx(Os,{isDisabled:n,state:p,triggerRef:b,label:t||e,name:e,"data-testid":"hidden-select-container"}),g.jsxs(Ga,{...C,isOpen:p.isOpen,ref:b,disabled:n,"data-testid":c,children:[g.jsx("div",{...S,children:p.selectedItem?p.selectedItem.rendered:"Select an option"}),g.jsx("div",{className:_.csx("proton-Select__trigger_icon",p.isOpen&&"proton-Select__trigger_icon--flipped"),"aria-hidden":"true",children:g.jsxs("svg",{id:"caret-down",viewBox:"0 0 512 512",children:[g.jsx("title",{children:p.isOpen?"caret down":"caret up"}),g.jsx("path",{fill:"currentColor",d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7L86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})]})})]}),p.isOpen&&g.jsx(g.Fragment,{children:v?g.jsx(Gr,{isOpen:p.isOpen,onClose:()=>p.close(),children:g.jsx(Pr,{...x,state:p})}):g.jsx("div",{className:"proton-Select__popover",children:g.jsx(Dn,{state:p,triggerRef:b,popoverRef:y,placement:"bottom start","data-testid":"select-popover",children:g.jsx(Pr,{...x,state:p})})})})]})}const bh={Menu:mh,Option:_r};function gh(t){let e={...t,isSelected:t.isOn,"data-testid":void 0},n=a.useRef(null),r=rf(e),{inputProps:l}=pp(e,r,n);return g.jsxs("label",{className:_.csx("proton-Switch",t.isDisabled&&"proton-Switch--disabled",r.isSelected&&"proton-Switch--on"),"data-on":r.isSelected||void 0,"data-disabled":t.isDisabled||void 0,"data-testid":t["data-testid"]||void 0,"aria-label":t.label||void 0,children:[g.jsx(Fr,{children:g.jsx("input",{...l,ref:n})}),t.label&&g.jsx("div",{className:"proton-Switch__label",children:t.label}),g.jsxs("div",{className:"proton-Switch__wrapper",children:[g.jsx("div",{className:"proton-Switch__toggle",children:g.jsx("div",{className:"proton-Switch__slider"})}),t.children&&g.jsx("div",{className:"proton-Switch__description",children:t.children})]})]})}function $h({item:t,state:e,children:n}){let r=a.useRef(),{rowProps:l}=Cp({node:t},e);return g.jsx("tr",{className:_.csx("proton-Table__headerRow"),...l,ref:r,children:n})}function yh({column:t,state:e}){var s,c;let n=a.useRef(),{columnHeaderProps:r}=xp({node:t},e,n);const{align:l="left"}=t.props;let{isFocusVisible:i,focusProps:o}=Vt(),u=((s=e.sortDescriptor)==null?void 0:s.direction)==="ascending"?"▲":"▼";return g.jsxs("th",{...j(r,o),colSpan:t.colspan,className:_.csx("proton-Table__header",`proton-Table__header--${l}`,i?"proton-Table__header--focused":null),ref:n,children:[t.rendered,t.props.allowsSorting&&g.jsx("span",{"aria-hidden":"true",className:_.csx("proton-Table__headerSortIcon"),style:{visibility:((c=e.sortDescriptor)==null?void 0:c.column)===t.key?"visible":"hidden"},children:u})]})}function ri({type:t,children:e}){let{rowGroupProps:n}=wp();return g.jsx(t,{...n,className:_.csx("proton-Table__rowGroup",t==="thead"?"proton-Table__rowGroup--header":"proton-Table__rowGroup--body"),children:e})}function xh({item:t,children:e,state:n}){let r=a.useRef(),l=n.selectionManager.isSelected(t.key),{rowProps:i,isPressed:o}=Ep({node:t},n,r),{isFocusVisible:u,focusProps:s}=Vt();return g.jsx("tr",{className:_.csx("proton-Table__row",l?"proton-Table__row--selected":null,o?"proton-Table__row--pressed":null,u?"proton-Table__row--focused":null),...j(i,s),ref:r,children:e})}function Eh({cell:t,state:e,...n}){let r=a.useRef(),{gridCellProps:l}=Sp({node:t},e,r),{isFocusVisible:i,focusProps:o}=Vt();const{align:u}=t.props;return g.jsx("td",{...j(l,o),className:_.csx("proton-Table__cell",i?"proton-Table__cell--focused":null,`proton-Table__cell--${u}`),ref:r,children:t.rendered})}const Ch=Hp,Sh=Up;function wh(t){let e=zp({...t}),n=a.useRef(),{collection:r}=e,{gridProps:l}=$p({...t,"aria-label":t["aria-label"]||"Table"},e,n);return g.jsxs("table",{...l,ref:n,className:_.csx("proton-Table"),children:[g.jsx(ri,{type:"thead",children:r.headerRows.map(i=>g.jsx($h,{item:i,state:e,children:Array.from(r.getChildren(i.key)).map(o=>g.jsx(yh,{column:o,state:e},o.key))},i.key))}),g.jsx(ri,{type:"tbody",children:Array.from(r.body.childNodes).map(i=>g.jsx(xh,{item:i,state:e,children:Array.from(r.getChildren(i.key)).map(o=>g.jsx(Eh,{cell:o,state:e},o.key))},i.key))})]})}function Ya({children:t,arrow:e,...n}){const{className:r,style:l}=Se();return g.jsxs(ah,{...n,className:_.csx("proton__Tooltip","proton-Dialog",r),style:l,children:[e&&g.jsx(Zv,{className:_.csx("proton__TooltipArrow",r),children:g.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",children:g.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),t]})}function qa({children:t,delay:e=500,closeDelay:n=500,isDisabled:r,defaultOpen:l,onOpenChange:i,disableTriggerClick:o,content:u,...s}){const[c,d]=a.useState(!1),f=a.useRef(!1),p=a.useRef(!1);return g.jsxs(uh,{delay:e,closeDelay:n,isDisabled:r,isOpen:c,defaultOpen:l,onOpenChange:v=>{v&&!f.current&&(p.current=!0),i&&i(v),f.current||d(v),f.current=!1},children:[g.jsx(za,{className:"proton__TooltipTrigger","aria-label":"Show tooltip",onPress:()=>{o||p.current||(f.current=!0,d(!c))},children:t}),g.jsx(Ya,{...s,children:u})]})}const Ph=({to:t,children:e,tooltipProps:n,"data-testid":r})=>{const{className:l,palette:i,theme:o}=Se(),u=n?g.jsx(qa,{delay:50,closeDelay:75,...n,children:e}):e,s={"--text-emphasis-highlight":o===xe.THEMES.CUSTOM_DARK?_.chroma(i.SECONDARY.SECONDARY_LIGHT).alpha(.7).css():_.chroma(q.BRAND.PRIMARY).alpha(.5).css()};if(t){const c=_.isUrlExternal(t);return g.jsx("span",{className:_.csx("proton-TextEmphasis",n&&"proton-TextEmphasis--tooltip",l),style:s,children:g.jsx("a",{"data-testid":r,href:t,target:c?"_blank":void 0,rel:c?"noopener noreferrer":void 0,onClick:c?void 0:d=>_.handleInternalNavigation(d,t),children:u})})}return g.jsx("span",{className:_.csx("proton-TextEmphasis",n&&"proton-TextEmphasis--tooltip",l),style:s,"data-testid":r,children:u})};function Dh({amplitude:t,isDisabled:e,isPlayed:n,isHovered:r,isVisible:l,hasAnimated:i,resolution:o,spacing:u,index:s}){const c=l?`${Math.max(t*100,4)}%`:"0%";return g.jsxs("div",{className:_.csx("proton-Waveform__bar-wrapper"),style:{width:`${o}px`,marginRight:`${u}px`},children:[g.jsx("div",{className:_.csx("proton-Waveform__bar","proton-Waveform__bar--upper",e&&"proton-Waveform__bar--disabled",n&&"proton-Waveform__bar--played",l&&"proton-Waveform__bar--visible",i&&"proton-Waveform__bar--animated"),style:{"--target-height":`calc(${c} / 2)`,"--index":s}}),g.jsx("div",{className:_.csx("proton-Waveform__bar","proton-Waveform__bar--lower",e&&"proton-Waveform__bar--disabled",n&&"proton-Waveform__bar--played",l&&"proton-Waveform__bar--visible",i&&"proton-Waveform__bar--animated"),style:{"--target-height":`calc(${c} / 2)`,"--index":s}}),r&&!e&&!n&&g.jsx("div",{className:"proton-Waveform__bar--hover",style:{"--hover-height":c}})]})}const kh=Mh(100);function Th({data:t,resolution:e=2,startDuration:n,endDuration:r,currentTime:l=0,showTimestamps:i=!1,totalDuration:o,onClick:u,timestampColor:s,"data-testid":c}){var N;const{className:d,palette:f,theme:p}=Se(),v=a.useRef(null),[b,y]=a.useState([]),[$,C]=a.useState(null),[S,x]=a.useState(!1),[T,w]=a.useState(!1),D=t||kh,I=s||(p==="custom-dark"?f.SECONDARY.SECONDARY_SUPER_LIGHT:void 0),h=e;a.useEffect(()=>{if(!v.current)return;const k=W=>{const ne=Math.floor(W/(e+h)),oe=Bh(D,ne);y(oe)},O=v.current.clientWidth;k(O);const M=new ResizeObserver(W=>{W&&W[0]&&k(W[0].contentRect.width)});return M.observe(v.current),()=>M.disconnect()},[D,e,h]),a.useEffect(()=>{const k=setTimeout(()=>x(!0),50),O=setTimeout(()=>w(!0),500);return()=>{clearTimeout(k),clearTimeout(O)}},[]);const B=k=>{if(!v.current)return;const O=v.current.getBoundingClientRect(),W=(k.clientX-O.left)/O.width*o;C(W)},P=()=>{C(null)},A=e+h,R=(k,O)=>{var ne;const M=k/o*100;return(O==="start"?Math.floor(M/100*b.length):Math.ceil(M/100*b.length))*A/((ne=v.current)==null?void 0:ne.clientWidth)*100},E=(N=v.current)==null?void 0:N.clientWidth;return g.jsxs("div",{className:_.csx("proton-Waveform",d),"data-testid":c,children:[i&&g.jsx(li,{direction:"left",seconds:l,color:I}),g.jsxs("div",{ref:v,className:"proton-Waveform__container",onMouseMove:B,onMouseLeave:P,onClick:k=>{if(!v.current)return;const O=v.current.getBoundingClientRect(),W=(k.clientX-O.left)/O.width*o;u==null||u(W,k)},children:[n!==void 0&&r!==void 0&&g.jsx("div",{className:"proton-Waveform__active-region",style:{left:v.current?`calc(${R(n,"start")}%`:"0%",right:v.current?`calc(${100-R(r,"end")}% - 2px)`:"0%"}}),$!==null&&g.jsx("div",{className:"proton-Waveform__hover-line",style:{left:`${$/o*100}%`}}),b.map((k,O)=>{const M=O/b.length*o,W=n!==void 0&&r!==void 0&&(M<n||M>r),ne=l===0?!1:M<=l,oe=$!==null&&M<=$;return g.jsx(Dh,{amplitude:k,isDisabled:W,isPlayed:ne,isHovered:oe,isVisible:S,hasAnimated:T,resolution:e,spacing:h,index:O},O)})]}),!t&&g.jsx("div",{className:"proton-Waveform__bar-unavailable",style:{backgroundColor:I,fontSize:E<325?"0.85rem":"1rem"},children:E<277?"Unavailable":"Waveform Unavailable"}),i&&g.jsx(li,{direction:"right",seconds:o,color:I})]})}function li({direction:t,color:e,seconds:n}){return g.jsx("div",{className:_.csx("proton-Waveform__timestamp",`proton-Waveform__timestamp--${t}`),style:{backgroundColor:e},children:Ah(n)})}function Ah(t){const e=Math.floor(t/60),n=Math.floor(t%60);return`${e}:${n<10?"0":""}${n.toFixed(0)}`}function Bh(t,e){const n=t.length,r=n/e,l=new Array(e).fill(0).map((i,o)=>{const u=o*r,s=Math.floor(u),c=Math.min(s+1,n-1),d=u-s;return t[s]*(1-d)+t[c]*d});return Kh(l)}function Kh(t){const e=Math.min(...t),n=Math.max(...t);return t.map(r=>{const l=(r-e)/(n-e);return Math.max(l*.8+.1,.1)})}function Mh(t){return Array.from({length:t},(e,n)=>{const l=n/(t-1)*6*2*Math.PI-Math.PI/2;return Math.sin(l)*.5+.5})}exports.THEMES=xe.THEMES;exports.COLORS=q.colors;exports.ActionMenu=Gr;exports.Badge=lv;exports.BadgeVariants=rv;exports.Banner=Te;exports.Button=Yr;exports.ButtonGroup=Ma;exports.Cell=Sh;exports.Column=Ch;exports.Dialog=fv;exports.Icon=hv;exports.Input=Ra;exports.Popover=Dn;exports.ResponsiveMenuTrigger=fh;exports.ResponsiveSelect=bh;exports.Row=Wp;exports.SearchInput=mv;exports.Section=_f;exports.Select=hh;exports.Switch=gh;exports.Table=wh;exports.TableBody=Vp;exports.TableHeader=jp;exports.TextEmphasis=Ph;exports.ThemeProvider=tv;exports.Tooltip=Ya;exports.TooltipTrigger=qa;exports.Waveform=Th;exports.usePopoverTrigger=bv;exports.useTheme=Se;
|
|
46
|
+
*/var Nt;function Br(){return Nt||(Nt=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=i,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(M){{for(var P=arguments.length,O=new Array(P>1?P-1:0),j=1;j<P;j++)O[j-1]=arguments[j];r("error",M,O)}}function r(M,P,O){{var j=e.ReactDebugCurrentFrame,W=j.getStackAddendum();W!==""&&(P+="%s",O=O.concat([W]));var F=O.map(function(V){return String(V)});F.unshift("Warning: "+P),Function.prototype.apply.call(console[M],console,F)}}function o(M,P){return M===P&&(M!==0||1/M===1/P)||M!==M&&P!==P}var s=typeof Object.is=="function"?Object.is:o,l=t.useState,u=t.useEffect,d=t.useLayoutEffect,p=t.useDebugValue,f=!1,v=!1;function h(M,P,O){f||t.startTransition!==void 0&&(f=!0,n("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 j=P();if(!v){var W=P();s(j,W)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),v=!0)}var F=l({inst:{value:j,getSnapshot:P}}),V=F[0].inst,Q=F[1];return d(function(){V.value=j,V.getSnapshot=P,m(V)&&Q({inst:V})},[M,j,P]),u(function(){m(V)&&Q({inst:V});var oe=function(){m(V)&&Q({inst:V})};return M(oe)},[M]),p(j),j}function m(M){var P=M.getSnapshot,O=M.value;try{var j=P();return!s(O,j)}catch{return!0}}function x(M,P,O){return P()}var S=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$=!S,C=$?x:h,R=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:C;Fe.useSyncExternalStore=R,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Fe}process.env.NODE_ENV==="production"?ze.exports=Dr():ze.exports=Br();var Hr=ze.exports;const qt=i.createContext(!1),be=i.createContext(null);function Vr(t){if(i.useContext(be))return t.content;let{collection:n,document:r}=Gr(t.createCollection);return i.createElement(i.Fragment,null,i.createElement(Er,null,i.createElement(be.Provider,{value:r},t.content)),i.createElement(Wr,{render:t.children,collection:n}))}function Wr({collection:t,render:e}){return e(t)}function Kr(t,e,n){let r=Te(),o=i.useRef(r);o.current=r;let s=i.useCallback(()=>o.current?n():e(),[e,n]);return Hr.useSyncExternalStore(t,s)}const Fr=typeof i.useSyncExternalStore=="function"?i.useSyncExternalStore:Kr;function Gr(t){let[e]=i.useState(()=>new hr((t==null?void 0:t())||new pr)),n=i.useCallback(l=>e.subscribe(l),[e]),r=i.useCallback(()=>{let l=e.getCollection();return e.isSSR&&e.resetAfterSSR(),l},[e]),o=i.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),s=Fr(n,r,o);return ce(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:s,document:e}}const qe=i.createContext(null);function Yr(t,e,n,r,o,s){let l=i.useCallback(d=>{d==null||d.setProps(e,n,r,s)},[e,n,r,s]),u=i.useContext(qe);if(u){let d=u.ownerDocument.nodesByProps.get(e);return d||(d=u.ownerDocument.createElement(t),d.setProps(e,n,r,s),u.appendChild(d),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(e,d)),o?i.createElement(qe.Provider,{value:d},o):null}return i.createElement(t,{ref:l},o)}function Ur(t,e){let n=({node:o})=>e(o.props,o.props.ref,o),r=i.forwardRef((o,s)=>{if(!i.useContext(qt)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(o,s)}return Yr(t,o,s,"children"in o?o.children:null,null,u=>i.createElement(n,{node:u}))});return r.displayName=e.name,r}function zr(t){return Gt({...t,addIdAndValue:!0})}const jt=i.createContext(null);function qr(t){let e=i.useContext(jt),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope||(e==null?void 0:e.idScope),o=zr({...t,idScope:r,dependencies:n});return i.useContext(be)&&(o=i.createElement(Jr,null,o)),e=i.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),i.createElement(jt.Provider,{value:e},o)}function Jr({children:t}){let e=i.useContext(be),n=i.useMemo(()=>i.createElement(be.Provider,{value:null},i.createElement(qt.Provider,{value:!0},t)),[t]);return Te()?i.createElement(qe.Provider,{value:e},n):we.createPortal(n,e)}const Xr=i.createContext(null),Zr={CollectionRoot({collection:t,renderDropIndicator:e}){return At(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return At(t,e,n)}};function At(t,e,n){return Gt({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){var o;let s=r.render(r);if(!n||r.type!=="item")return s;let l=r.key,u=t.getKeyAfter(l);return i.createElement(i.Fragment,null,n({type:"item",key:l,dropPosition:"before"}),s,(u==null||((o=t.getItem(u))===null||o===void 0?void 0:o.type)!=="item")&&n({type:"item",key:l,dropPosition:"after"}))}})}const Jt=i.createContext(Zr);function Qr(t){return i.useMemo(()=>t!=null?new Set([t]):null,[t])}const kt=Symbol("default");function Ne({values:t,children:e}){for(let[n,r]of t)e=i.createElement(n.Provider,{value:r},e);return e}function ue(t){let{className:e,style:n,children:r,defaultClassName:o,defaultChildren:s,defaultStyle:l,values:u}=t;return i.useMemo(()=>{let d,p,f;return typeof e=="function"?d=e({...u,defaultClassName:o}):d=e,typeof n=="function"?p=n({...u,defaultStyle:l||{}}):p=n,typeof r=="function"?f=r({...u,defaultChildren:s}):r==null?f=s:f=r,{className:d??o,style:p||l?{...l,...p}:void 0,children:f??s,"data-rac":""}},[e,n,r,o,s,l,u])}function Xt(t,e){let n=i.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(s=>`"${s}"`));if(!e&&!n.slots[kt])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let o=e||kt;if(!n.slots[o])throw new Error(`Invalid slot "${e}". Valid slot names are ${r}.`);return n.slots[o]}return n}function ge(t,e,n){let r=Xt(n,t.slot)||{},{ref:o,...s}=r,l=Me(i.useMemo(()=>Mr(e,o),[e,o])),u=zt(s,t);return"style"in s&&s.style&&"style"in t&&t.style&&(typeof s.style=="function"||typeof t.style=="function"?u.style=d=>{let p=typeof s.style=="function"?s.style(d):s.style,f={...d.defaultStyle,...p},v=typeof t.style=="function"?t.style({...d,defaultStyle:f}):t.style;return{...f,...v}}:u.style={...s.style,...t.style}),[u,l]}function eo(){let[t,e]=i.useState(!0),n=i.useRef(!1),r=i.useCallback(o=>{n.current=!0,e(!!o)},[]);return ce(()=>{n.current||e(!1)},[]),[r,t]}function to(t,e=!0){let[n,r]=i.useState(!0);return Zt(t,n&&e,i.useCallback(()=>r(!1),[])),n&&e}function no(t,e){let[n,r]=i.useState(!1),[o,s]=i.useState("idle");return!e&&t.current&&o==="idle"&&(n=!0,r(!0),s("exiting")),!t.current&&o==="exited"&&s("idle"),Zt(t,n,i.useCallback(()=>{s("exited"),r(!1)},[])),n}function Zt(t,e,n){let r=i.useRef(null);e&&t.current&&(r.current=window.getComputedStyle(t.current).animation),ce(()=>{if(e&&t.current){let o=window.getComputedStyle(t.current);if(o.animationName&&o.animationName!=="none"&&o.animation!==r.current){let s=u=>{u.target===t.current&&(l.removeEventListener("animationend",s),we.flushSync(()=>{n()}))},l=t.current;return l.addEventListener("animationend",s),()=>{l.removeEventListener("animationend",s)}}else n()}},[t,e,n])}const ro=i.createContext(null),Qt=7e3;let te=null;function It(t,e="assertive",n=Qt){te?te.announce(t,e,n):(te=new oo,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?te.announce(t,e,n):setTimeout(()=>{te!=null&&te.isAttached()&&(te==null||te.announce(t,e,n))},100))}class oo{isAttached(){var e;return(e=this.node)===null||e===void 0?void 0:e.isConnected}createLog(e){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",e),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,n="assertive",r=Qt){var o,s;if(!this.node)return;let l=document.createElement("div");typeof e=="object"?(l.setAttribute("role","img"),l.setAttribute("aria-labelledby",e["aria-labelledby"])):l.textContent=e,n==="assertive"?(o=this.assertiveLog)===null||o===void 0||o.appendChild(l):(s=this.politeLog)===null||s===void 0||s.appendChild(l),e!==""&&setTimeout(()=>{l.remove()},r)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="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))}}const io=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),so=i.createContext({});function ao(t,e){[t,e]=ge(t,e,so),t=lo(t);let n=t,{isPending:r}=n,{buttonProps:o,isPressed:s}=y.useButton(t,e),{focusProps:l,isFocused:u,isFocusVisible:d}=y.useFocusRing(t),{hoverProps:p,isHovered:f}=y.useHover({...t,isDisabled:t.isDisabled||r}),v={isHovered:f,isPressed:(n.isPressed||s)&&!r,isFocused:u,isFocusVisible:d,isDisabled:t.isDisabled||!1,isPending:r??!1},h=ue({...t,values:v,defaultClassName:"react-aria-Button"}),m=y.useId(o.id),x=y.useId(),S=o["aria-labelledby"];r&&(S?S=`${S} ${x}`:o["aria-label"]&&(S=`${m} ${x}`));let $=i.useRef(r);return i.useEffect(()=>{let C={"aria-labelledby":S||m};(!$.current&&u&&r||$.current&&u&&!r)&&It(C,"assertive"),$.current=r},[r,u,S,m]),i.createElement("button",{...it(t,{propNames:io}),...y.mergeProps(o,l,p),...h,id:m,ref:e,"aria-labelledby":S,slot:t.slot||void 0,"aria-disabled":r?"true":o["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":v.isPressed||void 0,"data-hovered":f||void 0,"data-focused":u||void 0,"data-pending":r||void 0,"data-focus-visible":d||void 0},i.createElement(ro.Provider,{value:{id:x}},h.children))}function lo(t){return t.isPending&&(t.onPress=void 0,t.onPressStart=void 0,t.onPressEnd=void 0,t.onPressChange=void 0,t.onPressUp=void 0,t.onKeyDown=void 0,t.onKeyUp=void 0,t.onClick=void 0,t.href=void 0),t}const en=Cr(ao),co=i.createContext({}),Je=i.createContext({register:()=>{}});Je.displayName="PressResponderContext";const uo=i.forwardRef(({children:t,...e},n)=>{let r=i.useRef(!1),o=i.useContext(Je);n=Me(n||(o==null?void 0:o.ref));let s=zt(o||{},{...e,ref:n,register(){r.current=!0,o&&o.register()}});return Lr(o,n),i.useEffect(()=>{r.current||(console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."),r.current=!0)},[]),i.createElement(Je.Provider,{value:s},t)});let Ce=!1,Ge=0;function Xe(){Ce=!0,setTimeout(()=>{Ce=!1},50)}function Ot(t){t.pointerType==="touch"&&Xe()}function fo(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",Ot):document.addEventListener("touchend",Xe),Ge++,()=>{Ge--,!(Ge>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Ot):document.removeEventListener("touchend",Xe))}}function po(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:o}=t,[s,l]=i.useState(!1),u=i.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;i.useEffect(fo,[]);let{hoverProps:d,triggerHoverEnd:p}=i.useMemo(()=>{let f=(m,x)=>{if(u.pointerType=x,o||x==="touch"||u.isHovered||!m.currentTarget.contains(m.target))return;u.isHovered=!0;let S=m.currentTarget;u.target=S,e&&e({type:"hoverstart",target:S,pointerType:x}),n&&n(!0),l(!0)},v=(m,x)=>{if(u.pointerType="",u.target=null,x==="touch"||!u.isHovered)return;u.isHovered=!1;let S=m.currentTarget;r&&r({type:"hoverend",target:S,pointerType:x}),n&&n(!1),l(!1)},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=m=>{Ce&&m.pointerType==="mouse"||f(m,m.pointerType)},h.onPointerLeave=m=>{!o&&m.currentTarget.contains(m.target)&&v(m,m.pointerType)}):(h.onTouchStart=()=>{u.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=m=>{!u.ignoreEmulatedMouseEvents&&!Ce&&f(m,"mouse"),u.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=m=>{!o&&m.currentTarget.contains(m.target)&&v(m,"mouse")}),{hoverProps:h,triggerHoverEnd:v}},[e,n,r,o,u]);return i.useEffect(()=>{o&&p({currentTarget:u.target},u.pointerType)},[o]),{hoverProps:d,isHovered:s}}function ho(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:o}=t,s=i.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),l=Pt(d=>{n&&$e(d,e)&&(o&&o(d),s.current.isPointerDown=!0)}),u=Pt(d=>{n&&n(d)});i.useEffect(()=>{let d=s.current;if(r)return;const p=e.current,f=Pr(p);if(typeof PointerEvent<"u"){let v=h=>{d.isPointerDown&&$e(h,e)&&u(h),d.isPointerDown=!1};return f.addEventListener("pointerdown",l,!0),f.addEventListener("pointerup",v,!0),()=>{f.removeEventListener("pointerdown",l,!0),f.removeEventListener("pointerup",v,!0)}}else{let v=m=>{d.ignoreEmulatedMouseEvents?d.ignoreEmulatedMouseEvents=!1:d.isPointerDown&&$e(m,e)&&u(m),d.isPointerDown=!1},h=m=>{d.ignoreEmulatedMouseEvents=!0,d.isPointerDown&&$e(m,e)&&u(m),d.isPointerDown=!1};return f.addEventListener("mousedown",l,!0),f.addEventListener("mouseup",v,!0),f.addEventListener("touchstart",l,!0),f.addEventListener("touchend",h,!0),()=>{f.removeEventListener("mousedown",l,!0),f.removeEventListener("mouseup",v,!0),f.removeEventListener("touchstart",l,!0),f.removeEventListener("touchend",h,!0)}}},[e,r,l,u])}function $e(t,e){if(t.button>0)return!1;if(t.target){const n=t.target.ownerDocument;if(!n||!n.documentElement.contains(t.target)||t.target.closest("[data-react-aria-top-layer]"))return!1}return e.current&&!e.current.contains(t.target)}let vo=i.createContext(null);function mo(t,e){let{children:n,...r}=t,o=Me(e),s={...r,ref:o};return i.createElement(vo.Provider,{value:s},n)}let bo=i.forwardRef(mo);const go=i.createContext({}),yo=i.createContext({}),tn=i.createContext({placement:"bottom"});function xo(t,e){[t,e]=ge(t,e,tn);let n=t.placement,r={position:"absolute",[n]:"100%",transform:n==="top"||n==="bottom"?"translateX(-50%)":"translateY(-50%)"},o=ue({...t,defaultClassName:"react-aria-OverlayArrow",values:{placement:n}});return o.style&&Object.keys(o.style).forEach(s=>o.style[s]===void 0&&delete o.style[s]),i.createElement("div",{...t,...o,style:{...r,...o.style},ref:e,"data-placement":n})}const So=i.forwardRef(xo),Ze=i.createContext(null),_o=i.createContext(null),$o=i.createContext({});function nn(t){return null}nn.getCollectionNode=function*(e){let{children:n,title:r,items:o}=e;yield{type:"section",props:e,hasChildNodes:!0,rendered:r,"aria-label":e["aria-label"],*childNodes(){if(typeof n=="function"){if(!o)throw new Error("props.children was a function but props.items is missing");for(let s of o)yield{type:"item",value:s,renderer:n}}else{let s=[];i.Children.forEach(n,l=>{s.push({type:"item",element:l})}),yield*s}}}};let Eo=nn;const rn=i.createContext(null),st=i.createContext(null),on=i.createContext(null);function Co(t){let e=q.useMenuTriggerState(t),n=i.useRef(null),{menuTriggerProps:r,menuProps:o}=y.useMenuTrigger({...t,type:"menu"},e,n),[s,l]=i.useState(null),u=i.useCallback(()=>{n.current&&l(n.current.offsetWidth+"px")},[n]);Or({ref:n,onResize:u});let d=i.useRef(null);return i.createElement(Ne,{values:[[rn,{...o,ref:d}],[_o,e],[on,e],[Ze,{trigger:"MenuTrigger",triggerRef:n,scrollRef:d,placement:"bottom start",style:{"--trigger-width":s}}]]},i.createElement(uo,{...r,ref:n,isPressed:e.isOpen},t.children))}const wo=i.createContext(null);function Ro(t,e){return[t,e]=ge(t,e,rn),i.createElement(Vr,{content:i.createElement(qr,t)},n=>n.size>0&&i.createElement(Po,{props:t,collection:n,menuRef:e}))}function Po({props:t,collection:e,menuRef:n}){let r=q.useTreeState({...t,collection:e,children:void 0}),[o,s]=i.useState(null),{isVirtualized:l,CollectionRoot:u}=i.useContext(Jt),{menuProps:d}=y.useMenu({...t,isVirtualized:l},r,n),p=i.useContext(on),f=i.useContext(Ze),v=(f==null?void 0:f.trigger)==="SubmenuTrigger";ho({ref:n,onInteractOutside:$=>{p&&!(o!=null&&o.contains($.target))&&p.close()},isDisabled:v||(p==null?void 0:p.expandedKeysStack.length)===0});let h=i.useRef(null),[m,x]=i.useState({left:0});i.useEffect(()=>{if(o&&h.current!==o&&m.left===0){h.current=o;let{left:$}=o.getBoundingClientRect();x({left:-1*$})}},[m,o]);let S=ue({defaultClassName:"react-aria-Menu",className:t.className,style:t.style,values:{}});return i.createElement(y.FocusScope,null,i.createElement("div",{...it(t),...d,...S,ref:n,slot:t.slot||void 0,onScroll:t.onScroll},i.createElement(Ne,{values:[[st,r],[yo,{elementType:"div"}],[Ze,{UNSTABLE_portalContainer:o||void 0}],[Xr,{render:Mo}],[wo,{parentMenuRef:n}],[Qe,null]]},i.createElement(u,{collection:e,persistedKeys:Qr(r.selectionManager.focusedKey),scrollRef:n}))),i.createElement("div",{ref:s,style:{width:"100vw",position:"absolute",top:0,...m}}))}const To=i.forwardRef(Ro);function Mo(t,e,n){var r,o;let s=i.useContext(st),{CollectionBranch:l}=i.useContext(Jt),[u,d]=eo();var p;let{headingProps:f,groupProps:v}=y.useMenuSection({heading:d,"aria-label":(p=n.props["aria-label"])!==null&&p!==void 0?p:void 0}),h=ue({defaultClassName:"react-aria-Section",className:(r=n.props)===null||r===void 0?void 0:r.className,style:(o=n.props)===null||o===void 0?void 0:o.style,values:{}});return i.createElement("section",{...it(t),...v,...h,ref:e},i.createElement(go.Provider,{value:{...f,ref:u}},i.createElement(l,{collection:s.collection,parent:n})))}const Qe=i.createContext(null),No=Ur("item",function(e,n,r){var o;[e,n]=ge(e,n,Qe);let s=(o=Xt(Qe))===null||o===void 0?void 0:o.id,l=i.useContext(st),u=Me(n),{menuItemProps:d,labelProps:p,descriptionProps:f,keyboardShortcutProps:v,...h}=y.useMenuItem({...e,id:s,key:r.key},l,u),{isFocusVisible:m,focusProps:x}=y.useFocusRing(),{hoverProps:S,isHovered:$}=po({isDisabled:h.isDisabled}),C=ue({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...h,isHovered:$,isFocusVisible:m,selectionMode:l.selectionManager.selectionMode,selectionBehavior:l.selectionManager.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),R=e.href?"a":"div";return i.createElement(R,{...y.mergeProps(d,x,S),...C,ref:u,"data-disabled":h.isDisabled||void 0,"data-hovered":$||void 0,"data-focused":h.isFocused||void 0,"data-focus-visible":m||void 0,"data-pressed":h.isPressed||void 0,"data-selected":h.isSelected||void 0,"data-selection-mode":l.selectionManager.selectionMode==="none"?void 0:l.selectionManager.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},i.createElement(Ne,{values:[[co,{slots:{label:p,description:f}}],[$o,v]]},C.children))});function sn(t){return null}sn.getCollectionNode=function*(e,n){let{children:r,columns:o}=e;if(n.columns=[],typeof r=="function"){if(!o)throw new Error("props.children was a function but props.columns is missing");for(let s of o)yield{type:"column",value:s,renderer:r}}else{let s=[];i.Children.forEach(r,l=>{s.push({type:"column",element:l})}),yield*s}};let jo=sn;function an(t){return null}an.getCollectionNode=function*(e){let{children:n,items:r}=e;yield{type:"body",hasChildNodes:!0,props:e,*childNodes(){if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");for(let o of r)yield{type:"item",value:o,renderer:n}}else{let o=[];i.Children.forEach(n,s=>{o.push({type:"item",element:s})}),yield*o}}}};let Ao=an;function ln(t){return null}ln.getCollectionNode=function*(e,n){let{title:r,children:o,childColumns:s}=e,l=r||o,u=e.textValue||(typeof l=="string"?l:"")||e["aria-label"],d=yield{type:"column",hasChildNodes:!!s||r&&i.Children.count(o)>0,rendered:l,textValue:u,props:e,*childNodes(){if(s)for(let f of s)yield{type:"column",value:f};else if(r){let f=[];i.Children.forEach(o,v=>{f.push({type:"column",element:v})}),yield*f}},shouldInvalidate(f){return p(f),!1}},p=f=>{for(let v of d)v.hasChildNodes||f.columns.push(v)};p(n)};let ko=ln;function et(t){return null}et.getCollectionNode=function*(e,n){let{children:r,textValue:o,UNSTABLE_childItems:s}=e;yield{type:"item",props:e,textValue:o,"aria-label":e["aria-label"],hasChildNodes:!0,*childNodes(){if(n.showDragButtons&&(yield{type:"cell",key:"header-drag",props:{isDragButtonCell:!0}}),n.showSelectionCheckboxes&&n.selectionMode!=="none"&&(yield{type:"cell",key:"header",props:{isSelectionCell:!0}}),typeof r=="function"){for(let l of n.columns)yield{type:"cell",element:r(l.key),key:l.key};if(s)for(let l of s)yield{type:"item",value:l}}else{let l=[],u=[];if(i.Children.forEach(r,d=>{if(d.type===et){if(l.length<n.columns.length)throw new Error("All of a Row's child Cells must be positioned before any child Rows.");u.push({type:"item",element:d})}else l.push({type:"cell",element:d})}),l.length!==n.columns.length)throw new Error(`Cell count must match column count. Found ${l.length} cells and ${n.columns.length} columns.`);yield*l,yield*u}},shouldInvalidate(l){return l.columns.length!==n.columns.length||l.columns.some((u,d)=>u.key!==n.columns[d].key)||l.showSelectionCheckboxes!==n.showSelectionCheckboxes||l.showDragButtons!==n.showDragButtons||l.selectionMode!==n.selectionMode}}};let Io=et;function cn(t){return null}cn.getCollectionNode=function*(e){let{children:n}=e,r=e.textValue||(typeof n=="string"?n:"")||e["aria-label"]||"";yield{type:"cell",props:e,rendered:n,textValue:r,"aria-label":e["aria-label"],hasChildNodes:!1}};let Oo=cn;const at=i.createContext(null),un=i.createContext(null);function Lo(t){let e=q.useTooltipTriggerState(t),n=i.useRef(null),{triggerProps:r,tooltipProps:o}=y.useTooltipTrigger(t,e,n);return i.createElement(Ne,{values:[[at,e],[un,{...o,triggerRef:n}]]},i.createElement(bo,{...r,ref:n},t.children))}function Do({UNSTABLE_portalContainer:t,...e},n){[e,n]=ge(e,n,un);let r=i.useContext(at),o=q.useTooltipTriggerState(e),s=e.isOpen!=null||e.defaultOpen!=null||!r?o:r,l=no(n,s.isOpen)||e.isExiting||!1;return!s.isOpen&&!l?null:i.createElement(y.OverlayContainer,{portalContainer:t},i.createElement(Ho,{...e,tooltipRef:n,isExiting:l}))}const Bo=i.forwardRef(Do);function Ho(t){let e=i.useContext(at),n=i.useRef(null),[r,o]=i.useState(0);ce(()=>{n.current&&e.isOpen&&o(n.current.getBoundingClientRect().width)},[e.isOpen,n]);let{overlayProps:s,arrowProps:l,placement:u}=y.useOverlayPosition({placement:t.placement||"top",targetRef:t.triggerRef,overlayRef:t.tooltipRef,offset:t.offset,crossOffset:t.crossOffset,isOpen:e.isOpen,arrowSize:r,arrowBoundaryOffset:t.arrowBoundaryOffset,shouldFlip:t.shouldFlip}),d=to(t.tooltipRef,!!u)||t.isEntering||!1,p=ue({...t,defaultClassName:"react-aria-Tooltip",values:{placement:u,isEntering:d,isExiting:t.isExiting,state:e}});t=y.mergeProps(t,s);let{tooltipProps:f}=y.useTooltip(t,e);return i.createElement("div",{...f,ref:t.tooltipRef,...p,style:{...s.style,...p.style},"data-placement":u,"data-entering":d||void 0,"data-exiting":t.isExiting||void 0},i.createElement(tn.Provider,{value:{...l,placement:u,ref:n}},p.children))}function dn(t,e="down"){const n=e==="down"?`(max-width: ${t}px)`:`(min-width: ${t}px)`,[r,o]=i.useState(()=>typeof window<"u"?window.matchMedia(n).matches:!1);return i.useEffect(()=>{if(typeof window>"u")return;const s=window.matchMedia(n),l=u=>{o(u.matches)};return s.addEventListener("change",l),()=>s.removeEventListener("change",l)},[n]),r}const Vo=({size:t})=>c.jsx("svg",{viewBox:"0 0 24 24",width:t,height:t,children:c.jsx("path",{fill:"currentColor",d:"M4 14c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm8 0c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm8 0c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})});function Wo({renderTrigger:t,menuId:e,size:n=24,actions:r,disabled:o,onClose:s,testId:l,menuTestId:u}){const{className:d}=ee(),p=dn(Z.BREAKPOINTS.SMALL),[f,v]=i.useState(!1),h=i.useRef(null),m={disabled:o,"data-testid":l,"aria-label":"Menu"},x=c.jsx(en,{...m,ref:h,onPress:()=>v($=>!$),isDisabled:o,className:`proton-ResponsiveMenuTrigger__button ${d}`,children:c.jsx(Vo,{size:n})}),S=t?t({...m,onClick:()=>v($=>!$)},f):x;return i.useEffect(()=>()=>{f&&(s==null||s())},[f,s]),p?c.jsxs(c.Fragment,{children:[S,f&&c.jsx(nt,{id:e,actions:r,isOpen:f,onClose:()=>{v(!1)},showCancel:!0,"data-testid":u})]}):c.jsxs(Co,{children:[S,f&&c.jsx(Pe,{state:{isOpen:f,setOpen:v,open:()=>v(!0),close:()=>v(!1),toggle:()=>v(!f)},triggerRef:h,arrow:!1,children:c.jsx(To,{className:"proton-ListBox proton-ResponsiveMenuTrigger__menu",id:e,autoFocus:!0,"data-testid":u,children:r.map($=>c.jsx(No,{href:$.to,target:"_blank",rel:"noopener noreferrer",onAction:()=>{var C;(C=$.onAction)==null||C.call($,$.key),setTimeout(()=>{v(!1)},200)},className:"proton-ListBox__item proton-ResponsiveMenuTrigger__menu-item",children:$.label},$.key))})})]})}const tt=t=>{let e=i.useRef(null),{state:n}=t,{listBoxProps:r}=y.useListBox(t,n,e);return c.jsx(y.FocusScope,{contain:!0,restoreFocus:!0,autoFocus:!0,children:c.jsx("ul",{...r,ref:e,"data-testid":"listbox",className:"proton-ListBox",children:[...n.collection].map(o=>c.jsx(Ko,{item:o,state:n},o.key))})})};function Ko({item:t,state:e}){let n=i.useRef(null),{optionProps:r,isSelected:o,isFocused:s,isDisabled:l}=y.useOption({key:t.key},e,n);return c.jsx("li",{...r,className:_.csx("proton-ListBox__item",s&&"proton-ListBox__item--focused",o&&"proton-ListBox__item--selected",l&&"proton-ListBox__item--disabled"),ref:n,children:t.rendered})}const fn=i.forwardRef((t,e)=>{let{buttonProps:n}=y.useButton({...t,isDisabled:t.disabled},e);return c.jsx("button",{...n,ref:e,className:_.csx("proton-Select__trigger",t.disabled&&"proton-Select__trigger--disabled",!t.isOpen&&"proton-Select__trigger--closed",t.isOpen&&"proton-Select__trigger--opened"),children:t.children})});function Fo({label:t,name:e,isDisabled:n,disabledKeys:r,selectedKey:o,onSelectionChange:s,onOpen:l,onClose:u,items:d,"data-testid":p,children:f}){const v={label:t,isDisabled:n,disabledKeys:r,selectedKey:o,items:d,"data-testid":p,children:f,onSelectionChange:s,onOpenChange:M=>{M?l==null||l():u==null||u()}},h=q.useSelectState(v),m=i.useRef(null),x=i.useRef(null),{labelProps:S,triggerProps:$,valueProps:C,menuProps:R}=y.useSelect({...v,label:t||e},h,m);return i.useEffect(()=>{h.isOpen&&x.current&&m.current&&!x.current.style.minWidth&&(x.current.style.minWidth=`${m.current.offsetWidth}px`)}),c.jsxs("div",{className:"proton-Select","aria-label":t||e,"aria-disabled":n,children:[t?c.jsx("div",{...S,className:"proton-Select__label","data-testid":"select-label",children:t}):c.jsx("div",{...S}),c.jsx(y.HiddenSelect,{isDisabled:n,state:h,triggerRef:m,label:t||e,name:e,"data-testid":"hidden-select-container"}),c.jsxs(fn,{...$,isOpen:h.isOpen,ref:m,disabled:n,"data-testid":p,children:[c.jsx("div",{...C,className:"proton-Select__value",children:h.selectedItem?h.selectedItem.rendered:"Select an option"}),c.jsx("div",{className:_.csx("proton-Select__trigger_icon",h.isOpen&&"proton-Select__trigger_icon--flipped"),"aria-hidden":"true",children:c.jsxs("svg",{id:"caret-down",viewBox:"0 0 512 512",children:[c.jsx("title",{children:h.isOpen?"caret down":"caret up"}),c.jsx("path",{fill:"currentColor",d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7L86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})]})})]}),h.isOpen&&c.jsx("div",{className:"proton-Select__popover",children:c.jsx(Pe,{state:h,triggerRef:m,popoverRef:x,placement:"bottom start","data-testid":"select-popover",children:c.jsx(tt,{...R,state:h})})})]})}const Go={Menu:Fo,Option:q.Item};function Yo({label:t,name:e,isDisabled:n,disabledKeys:r,selectedKey:o,onSelectionChange:s,onOpen:l,onClose:u,items:d,"data-testid":p,children:f}){const v={label:t,isDisabled:n,disabledKeys:r,selectedKey:o,onSelectionChange:s,onOpenChange:P=>{P?l==null||l():u==null||u()},items:d,"data-testid":p,children:f},h=q.useSelectState(v),m=dn(Z.BREAKPOINTS.MEDIUM),x=i.useRef(null),S=i.useRef(null),{labelProps:$,triggerProps:C,valueProps:R,menuProps:M}=y.useSelect({...v,label:t||e},h,x);return i.useEffect(()=>{h.isOpen&&S.current&&x.current&&!S.current.style.minWidth&&(S.current.style.minWidth=`${x.current.offsetWidth}px`)}),c.jsxs("div",{className:"proton-Select","aria-label":t||e,"aria-disabled":n,children:[t?c.jsx("div",{...$,className:"proton-Select__label","data-testid":"select-label",children:t}):c.jsx("div",{...$}),c.jsx(y.HiddenSelect,{isDisabled:n,state:h,triggerRef:x,label:t||e,name:e,"data-testid":"hidden-select-container"}),c.jsxs(fn,{...C,isOpen:h.isOpen,ref:x,disabled:n,"data-testid":p,children:[c.jsx("div",{...R,children:h.selectedItem?h.selectedItem.rendered:"Select an option"}),c.jsx("div",{className:_.csx("proton-Select__trigger_icon",h.isOpen&&"proton-Select__trigger_icon--flipped"),"aria-hidden":"true",children:c.jsxs("svg",{id:"caret-down",viewBox:"0 0 512 512",children:[c.jsx("title",{children:h.isOpen?"caret down":"caret up"}),c.jsx("path",{fill:"currentColor",d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7L86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})]})})]}),h.isOpen&&c.jsx(c.Fragment,{children:m?c.jsx(nt,{isOpen:h.isOpen,onClose:()=>h.close(),children:c.jsx(tt,{...M,state:h})}):c.jsx("div",{className:"proton-Select__popover",children:c.jsx(Pe,{state:h,triggerRef:x,popoverRef:S,placement:"bottom start","data-testid":"select-popover",children:c.jsx(tt,{...M,state:h})})})})]})}const Uo={Menu:Yo,Option:q.Item};function zo(t){let e={...t,isSelected:t.isOn,"data-testid":void 0},n=i.useRef(null),r=q.useToggleState(e),{inputProps:o}=y.useSwitch(e,r,n);return c.jsxs("label",{className:_.csx("proton-Switch",t.isDisabled&&"proton-Switch--disabled",r.isSelected&&"proton-Switch--on"),"data-on":r.isSelected||void 0,"data-disabled":t.isDisabled||void 0,"data-testid":t["data-testid"]||void 0,"aria-label":t.label||void 0,children:[c.jsx(y.VisuallyHidden,{children:c.jsx("input",{...o,ref:n})}),t.label&&c.jsx("div",{className:"proton-Switch__label",children:t.label}),c.jsxs("div",{className:"proton-Switch__wrapper",children:[c.jsx("div",{className:"proton-Switch__toggle",children:c.jsx("div",{className:"proton-Switch__slider"})}),t.children&&c.jsx("div",{className:"proton-Switch__description",children:t.children})]})]})}function qo({item:t,state:e,children:n}){let r=i.useRef(),{rowProps:o}=y.useTableHeaderRow({node:t},e,r);return c.jsx("tr",{className:_.csx("proton-Table__headerRow"),...o,ref:r,children:n})}function Jo({column:t,state:e}){var d,p;let n=i.useRef(),{columnHeaderProps:r}=y.useTableColumnHeader({node:t},e,n);const{align:o="left"}=t.props;let{isFocusVisible:s,focusProps:l}=y.useFocusRing(),u=((d=e.sortDescriptor)==null?void 0:d.direction)==="ascending"?"▲":"▼";return c.jsxs("th",{...y.mergeProps(r,l),colSpan:t.colspan,className:_.csx("proton-Table__header",`proton-Table__header--${o}`,s?"proton-Table__header--focused":null),ref:n,children:[t.rendered,t.props.allowsSorting&&c.jsx("span",{"aria-hidden":"true",className:_.csx("proton-Table__headerSortIcon"),style:{visibility:((p=e.sortDescriptor)==null?void 0:p.column)===t.key?"visible":"hidden"},children:u})]})}function Lt({type:t,children:e}){let{rowGroupProps:n}=y.useTableRowGroup();return c.jsx(t,{...n,className:_.csx("proton-Table__rowGroup",t==="thead"?"proton-Table__rowGroup--header":"proton-Table__rowGroup--body"),children:e})}function Xo({item:t,children:e,state:n}){let r=i.useRef(),o=n.selectionManager.isSelected(t.key),{rowProps:s,isPressed:l}=y.useTableRow({node:t},n,r),{isFocusVisible:u,focusProps:d}=y.useFocusRing();return c.jsx("tr",{className:_.csx("proton-Table__row",o?"proton-Table__row--selected":null,l?"proton-Table__row--pressed":null,u?"proton-Table__row--focused":null),...y.mergeProps(s,d),ref:r,children:e})}function Zo({cell:t,state:e,...n}){let r=i.useRef(),{gridCellProps:o}=y.useTableCell({node:t},e,r),{isFocusVisible:s,focusProps:l}=y.useFocusRing();const{align:u}=t.props;return c.jsx("td",{...y.mergeProps(o,l),className:_.csx("proton-Table__cell",s?"proton-Table__cell--focused":null,`proton-Table__cell--${u}`),ref:r,children:t.rendered})}const Qo=ko,ei=Oo;function ti(t){let e=q.useTableState({...t}),n=i.useRef(),{collection:r}=e,{gridProps:o}=y.useTable({...t,"aria-label":t["aria-label"]||"Table"},e,n);return c.jsxs("table",{...o,ref:n,className:_.csx("proton-Table"),children:[c.jsx(Lt,{type:"thead",children:r.headerRows.map(s=>c.jsx(qo,{item:s,state:e,children:Array.from(r.getChildren(s.key)).map(l=>c.jsx(Jo,{column:l,state:e},l.key))},s.key))}),c.jsx(Lt,{type:"tbody",children:Array.from(r.body.childNodes).map(s=>c.jsx(Xo,{item:s,state:e,children:Array.from(r.getChildren(s.key)).map(l=>c.jsx(Zo,{cell:l,state:e},l.key))},s.key))})]})}function pn({children:t,arrow:e,...n}){const{className:r,style:o}=ee();return c.jsxs(Bo,{...n,className:_.csx("proton__Tooltip","proton-Dialog",r),style:o,children:[e&&c.jsx(So,{className:_.csx("proton__TooltipArrow",r),children:c.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",children:c.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),t]})}function hn({children:t,delay:e=500,closeDelay:n=500,isDisabled:r,defaultOpen:o,onOpenChange:s,disableTriggerClick:l,content:u,...d}){const[p,f]=i.useState(!1),v=i.useRef(!1),h=i.useRef(!1);return c.jsxs(Lo,{delay:e,closeDelay:n,isDisabled:r,isOpen:p,defaultOpen:o,onOpenChange:m=>{m&&!v.current&&(h.current=!0),s&&s(m),v.current||f(m),v.current=!1},children:[c.jsx(en,{className:"proton__TooltipTrigger","aria-label":"Show tooltip",onPress:()=>{l||h.current||(v.current=!0,f(!p))},children:t}),c.jsx(pn,{...d,children:u})]})}const ni=({to:t,children:e,tooltipProps:n,"data-testid":r})=>{const{className:o,palette:s,theme:l}=ee(),u=n?c.jsx(hn,{delay:50,closeDelay:75,...n,children:e}):e,d={"--text-emphasis-highlight":l===Z.THEMES.CUSTOM_DARK?ve.transparentize(s.SECONDARY.SECONDARY_LIGHT,.3):ve.transparentize(k.BRAND.PRIMARY,.5)};if(t){const p=_.isUrlExternal(t);return c.jsx("span",{className:_.csx("proton-TextEmphasis",n&&"proton-TextEmphasis--tooltip",o),style:d,children:c.jsx("a",{"data-testid":r,href:t,target:p?"_blank":void 0,rel:p?"noopener noreferrer":void 0,onClick:p?void 0:f=>_.handleInternalNavigation(f,t),children:u})})}return c.jsx("span",{className:_.csx("proton-TextEmphasis",n&&"proton-TextEmphasis--tooltip",o),style:d,"data-testid":r,children:u})};function ri({amplitude:t,isDisabled:e,isPlayed:n,isHovered:r,isVisible:o,hasAnimated:s,resolution:l,spacing:u,index:d}){const p=o?`${Math.max(t*100,4)}%`:"0%";return c.jsxs("div",{className:_.csx("proton-Waveform__bar-wrapper"),style:{width:`${l}px`,marginRight:`${u}px`},children:[c.jsx("div",{className:_.csx("proton-Waveform__bar","proton-Waveform__bar--upper",e&&"proton-Waveform__bar--disabled",n&&"proton-Waveform__bar--played",o&&"proton-Waveform__bar--visible",s&&"proton-Waveform__bar--animated"),style:{"--target-height":`calc(${p} / 2)`,"--index":d}}),c.jsx("div",{className:_.csx("proton-Waveform__bar","proton-Waveform__bar--lower",e&&"proton-Waveform__bar--disabled",n&&"proton-Waveform__bar--played",o&&"proton-Waveform__bar--visible",s&&"proton-Waveform__bar--animated"),style:{"--target-height":`calc(${p} / 2)`,"--index":d}}),r&&!e&&!n&&c.jsx("div",{className:"proton-Waveform__bar--hover",style:{"--hover-height":p}})]})}const oi=ci(100);function ii({data:t,resolution:e=2,startDuration:n,endDuration:r,currentTime:o=0,showTimestamps:s=!1,totalDuration:l,onClick:u,timestampColor:d,"data-testid":p}){var J;const{className:f,palette:v,theme:h}=ee(),m=i.useRef(null),[x,S]=i.useState([]),[$,C]=i.useState(null),[R,M]=i.useState(!1),[P,O]=i.useState(!1),j=t||oi,W=d||(h==="custom-dark"?v.SECONDARY.SECONDARY_SUPER_LIGHT:void 0),F=e;i.useEffect(()=>{if(!m.current)return;const L=Y=>{const re=Math.floor(Y/(e+F)),se=ai(j,re);S(se)},K=m.current.clientWidth;L(K);const G=new ResizeObserver(Y=>{Y&&Y[0]&&L(Y[0].contentRect.width)});return G.observe(m.current),()=>G.disconnect()},[j,e,F]),i.useEffect(()=>{const L=setTimeout(()=>M(!0),50),K=setTimeout(()=>O(!0),500);return()=>{clearTimeout(L),clearTimeout(K)}},[]);const V=L=>{if(!m.current)return;const K=m.current.getBoundingClientRect(),Y=(L.clientX-K.left)/K.width*l;C(Y)},Q=()=>{C(null)},oe=e+F,I=(L,K)=>{var re;const G=L/l*100;return(K==="start"?Math.floor(G/100*x.length):Math.ceil(G/100*x.length))*oe/((re=m.current)==null?void 0:re.clientWidth)*100},B=(J=m.current)==null?void 0:J.clientWidth;return c.jsxs("div",{className:_.csx("proton-Waveform",f),"data-testid":p,children:[s&&c.jsx(Dt,{direction:"left",seconds:o,color:W}),c.jsxs("div",{ref:m,className:"proton-Waveform__container",onMouseMove:V,onMouseLeave:Q,onClick:L=>{if(!m.current)return;const K=m.current.getBoundingClientRect(),Y=(L.clientX-K.left)/K.width*l;u==null||u(Y,L)},children:[n!==void 0&&r!==void 0&&c.jsx("div",{className:"proton-Waveform__active-region",style:{left:m.current?`calc(${I(n,"start")}%`:"0%",right:m.current?`calc(${100-I(r,"end")}% - 2px)`:"0%"}}),$!==null&&c.jsx("div",{className:"proton-Waveform__hover-line",style:{left:`${$/l*100}%`}}),x.map((L,K)=>{const G=K/x.length*l,Y=n!==void 0&&r!==void 0&&(G<n||G>r),re=o===0?!1:G<=o,se=$!==null&&G<=$;return c.jsx(ri,{amplitude:L,isDisabled:Y,isPlayed:re,isHovered:se,isVisible:R,hasAnimated:P,resolution:e,spacing:F,index:K},K)})]}),!t&&c.jsx("div",{className:"proton-Waveform__bar-unavailable",style:{backgroundColor:W,fontSize:B<325?"0.85rem":"1rem"},children:B<277?"Unavailable":"Waveform Unavailable"}),s&&c.jsx(Dt,{direction:"right",seconds:l,color:W})]})}function Dt({direction:t,color:e,seconds:n}){return c.jsx("div",{className:_.csx("proton-Waveform__timestamp",`proton-Waveform__timestamp--${t}`),style:{backgroundColor:e},children:si(n)})}function si(t){const e=Math.floor(t/60),n=Math.floor(t%60);return`${e}:${n<10?"0":""}${n.toFixed(0)}`}function ai(t,e){const n=t.length,r=n/e,o=new Array(e).fill(0).map((s,l)=>{const u=l*r,d=Math.floor(u),p=Math.min(d+1,n-1),f=u-d;return t[d]*(1-f)+t[p]*f});return li(o)}function li(t){const e=Math.min(...t),n=Math.max(...t);return t.map(r=>{const o=(r-e)/(n-e);return Math.max(o*.8+.1,.1)})}function ci(t){return Array.from({length:t},(e,n)=>{const o=n/(t-1)*6*2*Math.PI-Math.PI/2;return Math.sin(o)*.5+.5})}exports.THEMES=Z.THEMES;exports.COLORS=k.colors;exports.ActionMenu=nt;exports.Badge=Xn;exports.BadgeVariants=Jn;exports.Banner=ne;exports.Button=rt;exports.ButtonGroup=Wt;exports.Cell=ei;exports.Column=Qo;exports.Dialog=ir;exports.Icon=lr;exports.Input=Kt;exports.Popover=Pe;exports.ResponsiveMenuTrigger=Wo;exports.ResponsiveSelect=Uo;exports.Row=Io;exports.SearchInput=dr;exports.Section=Eo;exports.Select=Go;exports.Switch=zo;exports.Table=ti;exports.TableBody=Ao;exports.TableHeader=jo;exports.TextEmphasis=ni;exports.ThemeProvider=zn;exports.Tooltip=pn;exports.TooltipTrigger=hn;exports.Waveform=ii;exports.usePopoverTrigger=fr;exports.useTheme=ee;
|
|
48
47
|
//# sourceMappingURL=index.cjs.js.map
|