@protonradio/proton-ui 0.6.18-beta.3 → 0.6.18-beta.5

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 CHANGED
@@ -1,4 +1,4 @@
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={};/**
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"),E=require("./utils-DQj80-_6.js"),Z=require("./constants.cjs.js"),oe=require("color2k"),k=require("./colors-BdogYmJi.js");var Ye={exports:{}},he={};/**
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 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={};/**
9
+ */var Ct;function Wn(){if(Ct)return he;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 he.Fragment=n,he.jsx=l,he.jsxs=l,he}var ve={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,20 +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 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(`
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),$=1;$<b;$++)g[$-1]=arguments[$];M("error",a,g)}}function M(a,b,g){{var $=C.ReactDebugCurrentFrame,N=$.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 ie(a,b,g){var $=a.displayName;if($)return $;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 ie(a,a.render,"ForwardRef");case v:var $=a.displayName||null;return $!==null?$: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,ae,lt,ct;function ut(){}ut.__reactDisabledLog=!0;function vn(){{if(L===0){K=console.log,G=console.info,Y=console.warn,re=console.error,ae=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:ae}),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 $=N.stack.trim().match(/\n( *(at )?)/);Ae=$&&$[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 $;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){$=z}Reflect.construct(a,[],T)}else{try{T.call()}catch(z){$=z}a.call(T.prototype)}}else{try{throw Error()}catch(z){$=z}a()}}catch(z){if(z&&$&&typeof z.stack=="string"){for(var w=z.stack.split(`
19
+ `),U=$.stack.split(`
20
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`
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 ce=a?a.displayName||a.name:"",se=ce?ye(ce):"";return typeof a=="function"&&xe.set(a,se),se}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 $=a,N=$._payload,A=$._init;try{return Se(A(N),b,g)}catch{}}}return""}var fe=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,$,N){{var A=Function.call.bind(fe);for(var T in a)if(A(a,T)){var w=void 0;try{if(typeof a[T]!="function"){var U=Error(($||"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,$,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).",$||"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 pe=C.ReactCurrentOwner,En={key:!0,ref:!0,__self:!0,__source:!0},mt,bt,Oe;Oe={};function Cn(a){if(fe.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(fe.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"&&pe.current&&b&&pe.current.stateNode!==b){var g=B(pe.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(pe.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,$,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:$}),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,$,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)fe.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,$,pe.current,T)}}var Le=C.ReactCurrentOwner,gt=C.ReactDebugCurrentFrame;function le(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
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 <`+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:
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 $="";a&&a._owner&&a._owner!==Le.current&&($=" It was passed a child from "+B(a._owner.type)+"."),le(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,$),le(null)}}function _t(a,b){{if(typeof a!="object")return;if(Ie(a))for(var g=0;g<a.length;g++){var $=a[g];Be($)&&St($,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 $=B(b);xn(g,a.props,"prop",$,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 $=b[g];if($!=="children"&&$!=="key"){le(a),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$),le(null);break}}a.ref!==null&&(le(a),R("Invalid attribute `ref` supplied to `React.Fragment`."),le(null))}}var $t={};function Et(a,b,g,$,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($)if(Ie(X)){for(var ce=0;ce<X.length;ce++)_t(X[ce],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(fe.call(b,"key")){var se=B(a),z=Object.keys(b).filter(function(Vn){return Vn!=="key"}),He=z.length>0?"{key: someKey, "+z.join(": ..., ")+": ...}":"{key: someKey}";if(!$t[se+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} />`,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={};/**
30
+ <%s key={someKey} {...props} />`,He,se,Hn,se),$t[se+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;ve.Fragment=r,ve.jsx=Dn,ve.jsxs=Bn}()),ve}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,ie=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:E.csx("proton-ActionMenu__wrapper",Q&&"proton-ActionMenu__wrapper--scrollable"),children:c.jsx("div",{className:E.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:ie?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:E.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&&E.isUrlExternal(t),u=t?{href:t,target:l?"_blank":void 0,rel:l?"noopener noreferrer":void 0,onClick:l||!t?()=>{}:d=>E.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="rgb(83, 82, 83)";function qn(t){const e=oe.transparentize(t.PRIMARY.PRIMARY_LIGHTEST,.4);return{[Z.THEMES.DARK]:{"--proton-control__background-color":oe.toRgba(Ve),"--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":oe.transparentize(oe.toRgba(Ve),.9),"--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":oe.toRgba(Ve),"--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:E.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:E.csx("proton-Button",`proton-Button--${t}`,o&&"proton-Button--disabled"),ref:p,"data-testid":s,children:[l,e&&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:E.csx("proton-Banner",`proton-Banner--${t}`,e&&"proton-Banner--rounded"),"data-testid":s["data-testid"],children:c.jsxs("div",{className:E.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:E.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:E.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:E.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:E.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:E.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 oe.transparentize(R.PRIMARY.PRIMARY_SUPER_LIGHT,.6);case Z.THEMES.DARK:return oe.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:E.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:E.csx("proton-Input",s&&"proton-Input--error",u&&!p&&"proton-Input__label-top",C)}),c.jsx("label",{...O,className:E.csx("proton-Input__label",p&&"proton-Input__label--hide",v&&"proton-Input__label--filled"),children:u}),e&&c.jsx("div",{className:E.csx("proton-Input__descriptor","proton-Input__suffix"),children:e})]}),s?c.jsx("div",{...F,role:"alert",className:E.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:E.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:E.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 ue=typeof document<"u"?i.useLayoutEffect:()=>{};function Pt(t){const e=i.useRef(null);return ue(()=>{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){ue(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}var ze={exports:{}},Ke={};/**
31
31
  * @license React
32
32
  * use-sync-external-store-shim.production.min.js
33
33
  *
@@ -35,7 +35,7 @@ React keys must be passed directly to JSX without using spread:
35
35
  *
36
36
  * This source code is licensed under the MIT license found in the
37
37
  * LICENSE file in the root directory of this source tree.
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={};/**
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={};/**
39
39
  * @license React
40
40
  * use-sync-external-store-shim.development.js
41
41
  *
@@ -43,5 +43,5 @@ React keys must be passed directly to JSX without using spread:
43
43
  *
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
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;
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 ie=function(){m(V)&&Q({inst:V})};return M(ie)},[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 ue(()=>(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 de(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 ue(()=>{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),ue(()=>{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=de({...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=de({...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=de({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=de({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=de({...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);ue(()=>{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=de({...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:E.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:E.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:E.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:E.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:E.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:E.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:E.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:E.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:E.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:E.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:E.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:E.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:E.csx("proton__Tooltip","proton-Dialog",r),style:o,children:[e&&c.jsx(So,{className:E.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?oe.transparentize(s.SECONDARY.SECONDARY_LIGHT,.3):oe.transparentize(k.BRAND.PRIMARY,.5)};if(t){const p=E.isUrlExternal(t);return c.jsx("span",{className:E.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=>E.handleInternalNavigation(f,t),children:u})})}return c.jsx("span",{className:E.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:E.csx("proton-Waveform__bar-wrapper"),style:{width:`${l}px`,marginRight:`${u}px`},children:[c.jsx("div",{className:E.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:E.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)),ae=ai(j,re);S(ae)},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)},ie=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))*ie/((re=m.current)==null?void 0:re.clientWidth)*100},B=(J=m.current)==null?void 0:J.clientWidth;return c.jsxs("div",{className:E.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,ae=_!==null&&G<=_;return c.jsx(ri,{amplitude:L,isDisabled:Y,isPlayed:re,isHovered:ae,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:E.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;
47
47
  //# sourceMappingURL=index.cjs.js.map