@bluealba/pae-ui-react-core 4.5.0-develop-179 → 4.5.0-feature-replace-eslint-prettier-b-299
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 +46 -46
- package/dist/index.css +1 -1
- package/dist/index.esm.js +7546 -7483
- package/dist/index.systemjs.js +49 -49
- package/dist/index.umd.js +47 -47
- package/dist/src/components/ModulePlaceHolder/BaseContainer.d.ts +2 -3
- package/dist/src/components/ModulePlaceHolder/index.d.ts +1 -1
- package/dist/src/components/PAEModule.d.ts +2 -2
- package/dist/src/components/common/Alert/Alert.d.ts +2 -2
- package/dist/src/components/common/Alert/index.d.ts +1 -1
- package/dist/src/components/common/Dialog/Dialog.d.ts +4 -4
- package/dist/src/components/common/Dialog/index.d.ts +1 -1
- package/dist/src/components/common/DropdownList/index.d.ts +1 -1
- package/dist/src/components/common/ErrorState/ErrorState.d.ts +1 -2
- package/dist/src/components/common/ErrorState/WarningIcon.d.ts +1 -2
- package/dist/src/components/common/ErrorState/index.d.ts +1 -1
- package/dist/src/components/common/List/List.d.ts +7 -7
- package/dist/src/components/common/List/index.d.ts +1 -1
- package/dist/src/components/common/Pagination/Pagination.d.ts +2 -2
- package/dist/src/components/common/SearchAutocomplete/SearchAutocomplete.d.ts +2 -2
- package/dist/src/components/common/Select2/index.d.ts +2 -2
- package/dist/src/components/common/Skeleton/Skeleton.d.ts +2 -2
- package/dist/src/components/common/Table/Table.d.ts +1 -1
- package/dist/src/components/common/TextWithTooltip/TextWithTooltip.d.ts +1 -1
- package/dist/src/components/common/Tooltip/Tooltip.d.ts +1 -1
- package/dist/src/components/common/index.d.ts +47 -47
- package/dist/src/components/index.d.ts +3 -3
- package/dist/src/feature-flags/index.d.ts +2 -2
- package/dist/src/hocs/index.d.ts +1 -1
- package/dist/src/hooks/applications/useApplicationMenu.d.ts +1 -1
- package/dist/src/hooks/habits/mapEvent.d.ts +1 -1
- package/dist/src/hooks/habits/trackEvents.d.ts +1 -1
- package/dist/src/hooks/index.d.ts +22 -22
- package/dist/src/hooks/tenants/strategies/cookie.d.ts +2 -2
- package/dist/src/hooks/tenants/strategies/queryParams.d.ts +1 -1
- package/dist/src/hooks/tenants/strategies/sessionStorage.d.ts +1 -1
- package/dist/src/hooks/userState/UserStateApiClient.d.ts +2 -2
- package/dist/src/hooks/userState/useUserState.d.ts +1 -1
- package/dist/src/index.d.ts +8 -8
- package/dist/src/rooms/index.d.ts +3 -3
- package/dist/src/types.d.ts +8 -4
- package/dist/src/utils/immutable.d.ts +1 -1
- package/dist/src/utils/index.d.ts +3 -3
- package/package.json +3 -2
- package/src/global.css +2 -3
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";require('./index.css');var Fi=e=>{throw TypeError(e)};var jo=(e,t,n)=>t.has(e)||Fi("Cannot "+n);var C=(e,t,n)=>(jo(e,t,"read from private field"),n?n.call(e):t.get(e)),M=(e,t,n)=>t.has(e)?Fi("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),O=(e,t,n,r)=>(jo(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),H=(e,t,n)=>(jo(e,t,"access private method"),n);var dr=(e,t,n,r)=>({set _(o){O(e,t,o,n)},get _(){return C(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react"),jr=require("single-spa"),lc=require("react-dom");function uc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const d=uc(_),ro=uc(lc)
|
|
1
|
+
"use strict";require('./index.css');var Fi=e=>{throw TypeError(e)};var jo=(e,t,n)=>t.has(e)||Fi("Cannot "+n);var C=(e,t,n)=>(jo(e,t,"read from private field"),n?n.call(e):t.get(e)),M=(e,t,n)=>t.has(e)?Fi("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),O=(e,t,n,r)=>(jo(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),H=(e,t,n)=>(jo(e,t,"access private method"),n);var dr=(e,t,n,r)=>({set _(o){O(e,t,o,n)},get _(){return C(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react"),jr=require("single-spa"),lc=require("react-dom");function uc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const d=uc(_),ro=uc(lc);var hf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dc={exports:{}},$n={},Bi;function mf(){if(Bi)return $n;Bi=1;/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.development.js
|
|
4
4
|
*
|
|
@@ -6,30 +6,30 @@
|
|
|
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
|
-
*/return function(){var e=_,t=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"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),x=Symbol.iterator,h="@@iterator";function v(
|
|
10
|
-
`+k+
|
|
9
|
+
*/return function(){var e=_,t=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"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),x=Symbol.iterator,h="@@iterator";function v(w){if(w===null||typeof w!="object")return null;var A=x&&w[x]||w[h];return typeof A=="function"?A:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(w){{for(var A=arguments.length,j=new Array(A>1?A-1:0),F=1;F<A;F++)j[F-1]=arguments[F];S("error",w,j)}}function S(w,A,j){{var F=y.ReactDebugCurrentFrame,te=F.getStackAddendum();te!==""&&(A+="%s",j=j.concat([te]));var se=j.map(function(K){return String(K)});se.unshift("Warning: "+A),Function.prototype.apply.call(console[w],console,se)}}var E=!1,R=!1,T=!1,P=!1,D=!1,I;I=Symbol.for("react.module.reference");function L(w){return!!(typeof w=="string"||typeof w=="function"||w===r||w===s||D||w===o||w===u||w===f||P||w===g||E||R||T||typeof w=="object"&&w!==null&&(w.$$typeof===m||w.$$typeof===p||w.$$typeof===i||w.$$typeof===a||w.$$typeof===c||w.$$typeof===I||w.getModuleId!==void 0))}function B(w,A,j){var F=w.displayName;if(F)return F;var te=A.displayName||A.name||"";return te!==""?j+"("+te+")":j}function U(w){return w.displayName||"Context"}function W(w){if(w==null)return null;if(typeof w.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case a:var A=w;return U(A)+".Consumer";case i:var j=w;return U(j._context)+".Provider";case c:return B(w,w.render,"ForwardRef");case p:var F=w.displayName||null;return F!==null?F:W(w.type)||"Memo";case m:{var te=w,se=te._payload,K=te._init;try{return W(K(se))}catch{return null}}}return null}var V=Object.assign,re=0,z,Q,$,oe,pe,Oe,pt;function mt(){}mt.__reactDisabledLog=!0;function Ve(){{if(re===0){z=console.log,Q=console.info,$=console.warn,oe=console.error,pe=console.group,Oe=console.groupCollapsed,pt=console.groupEnd;var w={configurable:!0,enumerable:!0,value:mt,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}re++}}function gt(){{if(re--,re===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},w,{value:z}),info:V({},w,{value:Q}),warn:V({},w,{value:$}),error:V({},w,{value:oe}),group:V({},w,{value:pe}),groupCollapsed:V({},w,{value:Oe}),groupEnd:V({},w,{value:pt})})}re<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var De=y.ReactCurrentDispatcher,k;function J(w,A,j){{if(k===void 0)try{throw Error()}catch(te){var F=te.stack.trim().match(/\n( *(at )?)/);k=F&&F[1]||""}return`
|
|
10
|
+
`+k+w}}var de=!1,Y;{var ee=typeof WeakMap=="function"?WeakMap:Map;Y=new ee}function Z(w,A){if(!w||de)return"";{var j=Y.get(w);if(j!==void 0)return j}var F;de=!0;var te=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var se;se=De.current,De.current=null,Ve();try{if(A){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(Se){F=Se}Reflect.construct(w,[],K)}else{try{K.call()}catch(Se){F=Se}w.call(K.prototype)}}else{try{throw Error()}catch(Se){F=Se}w()}}catch(Se){if(Se&&F&&typeof Se.stack=="string"){for(var q=Se.stack.split(`
|
|
11
11
|
`),be=F.stack.split(`
|
|
12
12
|
`),ue=q.length-1,fe=be.length-1;ue>=1&&fe>=0&&q[ue]!==be[fe];)fe--;for(;ue>=1&&fe>=0;ue--,fe--)if(q[ue]!==be[fe]){if(ue!==1||fe!==1)do if(ue--,fe--,fe<0||q[ue]!==be[fe]){var Ie=`
|
|
13
|
-
`+q[ue].replace(" at new "," at ");return
|
|
13
|
+
`+q[ue].replace(" at new "," at ");return w.displayName&&Ie.includes("<anonymous>")&&(Ie=Ie.replace("<anonymous>",w.displayName)),typeof w=="function"&&Y.set(w,Ie),Ie}while(ue>=1&&fe>=0);break}}}finally{de=!1,De.current=se,gt(),Error.prepareStackTrace=te}var un=w?w.displayName||w.name:"",Bt=un?J(un):"";return typeof w=="function"&&Y.set(w,Bt),Bt}function ye(w,A,j){return Z(w,!1)}function je(w){var A=w.prototype;return!!(A&&A.isReactComponent)}function ze(w,A,j){if(w==null)return"";if(typeof w=="function")return Z(w,je(w));if(typeof w=="string")return J(w);switch(w){case u:return J("Suspense");case f:return J("SuspenseList")}if(typeof w=="object")switch(w.$$typeof){case c:return ye(w.render);case p:return ze(w.type,A,j);case m:{var F=w,te=F._payload,se=F._init;try{return ze(se(te),A,j)}catch{}}}return""}var Le=Object.prototype.hasOwnProperty,vt={},ur=y.ReactDebugCurrentFrame;function rt(w){if(w){var A=w._owner,j=ze(w.type,w._source,A?A.type:null);ur.setExtraStackFrame(j)}else ur.setExtraStackFrame(null)}function Vd(w,A,j,F,te){{var se=Function.call.bind(Le);for(var K in w)if(se(w,K)){var q=void 0;try{if(typeof w[K]!="function"){var be=Error((F||"React class")+": "+j+" type `"+K+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof w[K]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw be.name="Invariant Violation",be}q=w[K](A,K,F,j,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ue){q=ue}q&&!(q instanceof Error)&&(rt(te),b("%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).",F||"React class",j,K,typeof q),rt(null)),q instanceof Error&&!(q.message in vt)&&(vt[q.message]=!0,rt(te),b("Failed %s type: %s",j,q.message),rt(null))}}}var zd=Array.isArray;function Ro(w){return zd(w)}function qd(w){{var A=typeof Symbol=="function"&&Symbol.toStringTag,j=A&&w[Symbol.toStringTag]||w.constructor.name||"Object";return j}}function Gd(w){try{return Ti(w),!1}catch{return!0}}function Ti(w){return""+w}function Pi(w){if(Gd(w))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qd(w)),Ti(w)}var Ai=y.ReactCurrentOwner,Kd={key:!0,ref:!0,__self:!0,__source:!0},Oi,ji;function Qd(w){if(Le.call(w,"ref")){var A=Object.getOwnPropertyDescriptor(w,"ref").get;if(A&&A.isReactWarning)return!1}return w.ref!==void 0}function Yd(w){if(Le.call(w,"key")){var A=Object.getOwnPropertyDescriptor(w,"key").get;if(A&&A.isReactWarning)return!1}return w.key!==void 0}function Zd(w,A){typeof w.ref=="string"&&Ai.current}function Xd(w,A){{var j=function(){Oi||(Oi=!0,b("%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)",A))};j.isReactWarning=!0,Object.defineProperty(w,"key",{get:j,configurable:!0})}}function Jd(w,A){{var j=function(){ji||(ji=!0,b("%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)",A))};j.isReactWarning=!0,Object.defineProperty(w,"ref",{get:j,configurable:!0})}}var ef=function(w,A,j,F,te,se,K){var q={$$typeof:t,type:w,key:A,ref:j,props:K,_owner:se};return q._store={},Object.defineProperty(q._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(q,"_self",{configurable:!1,enumerable:!1,writable:!1,value:F}),Object.defineProperty(q,"_source",{configurable:!1,enumerable:!1,writable:!1,value:te}),Object.freeze&&(Object.freeze(q.props),Object.freeze(q)),q};function tf(w,A,j,F,te){{var se,K={},q=null,be=null;j!==void 0&&(Pi(j),q=""+j),Yd(A)&&(Pi(A.key),q=""+A.key),Qd(A)&&(be=A.ref,Zd(A,te));for(se in A)Le.call(A,se)&&!Kd.hasOwnProperty(se)&&(K[se]=A[se]);if(w&&w.defaultProps){var ue=w.defaultProps;for(se in ue)K[se]===void 0&&(K[se]=ue[se])}if(q||be){var fe=typeof w=="function"?w.displayName||w.name||"Unknown":w;q&&Xd(K,fe),be&&Jd(K,fe)}return ef(w,q,be,te,F,Ai.current,K)}}var To=y.ReactCurrentOwner,Ii=y.ReactDebugCurrentFrame;function ln(w){if(w){var A=w._owner,j=ze(w.type,w._source,A?A.type:null);Ii.setExtraStackFrame(j)}else Ii.setExtraStackFrame(null)}var Po;Po=!1;function Ao(w){return typeof w=="object"&&w!==null&&w.$$typeof===t}function Ni(){{if(To.current){var w=W(To.current.type);if(w)return`
|
|
14
14
|
|
|
15
|
-
Check the render method of \``+
|
|
15
|
+
Check the render method of \``+w+"`."}return""}}function nf(w){return""}var Di={};function rf(w){{var A=Ni();if(!A){var j=typeof w=="string"?w:w.displayName||w.name;j&&(A=`
|
|
16
16
|
|
|
17
|
-
Check the top-level render call using <`+j+">.")}return A}}function Li(
|
|
17
|
+
Check the top-level render call using <`+j+">.")}return A}}function Li(w,A){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var j=rf(A);if(Di[j])return;Di[j]=!0;var F="";w&&w._owner&&w._owner!==To.current&&(F=" It was passed a child from "+W(w._owner.type)+"."),ln(w),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',j,F),ln(null)}}function Mi(w,A){{if(typeof w!="object")return;if(Ro(w))for(var j=0;j<w.length;j++){var F=w[j];Ao(F)&&Li(F,A)}else if(Ao(w))w._store&&(w._store.validated=!0);else if(w){var te=v(w);if(typeof te=="function"&&te!==w.entries)for(var se=te.call(w),K;!(K=se.next()).done;)Ao(K.value)&&Li(K.value,A)}}}function of(w){{var A=w.type;if(A==null||typeof A=="string")return;var j;if(typeof A=="function")j=A.propTypes;else if(typeof A=="object"&&(A.$$typeof===c||A.$$typeof===p))j=A.propTypes;else return;if(j){var F=W(A);Vd(j,w.props,"prop",F,w)}else if(A.PropTypes!==void 0&&!Po){Po=!0;var te=W(A);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",te||"Unknown")}typeof A.getDefaultProps=="function"&&!A.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sf(w){{for(var A=Object.keys(w.props),j=0;j<A.length;j++){var F=A[j];if(F!=="children"&&F!=="key"){ln(w),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",F),ln(null);break}}w.ref!==null&&(ln(w),b("Invalid attribute `ref` supplied to `React.Fragment`."),ln(null))}}var ki={};function $i(w,A,j,F,te,se){{var K=L(w);if(!K){var q="";(w===void 0||typeof w=="object"&&w!==null&&Object.keys(w).length===0)&&(q+=" 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 be=nf();be?q+=be:q+=Ni();var ue;w===null?ue="null":Ro(w)?ue="array":w!==void 0&&w.$$typeof===t?(ue="<"+(W(w.type)||"Unknown")+" />",q=" Did you accidentally export a JSX literal instead of a component?"):ue=typeof w,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ue,q)}var fe=tf(w,A,j,te,se);if(fe==null)return fe;if(K){var Ie=A.children;if(Ie!==void 0)if(F)if(Ro(Ie)){for(var un=0;un<Ie.length;un++)Mi(Ie[un],w);Object.freeze&&Object.freeze(Ie)}else b("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 Mi(Ie,w)}if(Le.call(A,"key")){var Bt=W(w),Se=Object.keys(A).filter(function(ff){return ff!=="key"}),Oo=Se.length>0?"{key: someKey, "+Se.join(": ..., ")+": ...}":"{key: someKey}";if(!ki[Bt+Oo]){var df=Se.length>0?"{"+Se.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,Oo,Bt,df,Bt),ki[Bt+Oo]=!0}}return
|
|
22
|
+
<%s key={someKey} {...props} />`,Oo,Bt,df,Bt),ki[Bt+Oo]=!0}}return w===r?sf(fe):of(fe),fe}}function af(w,A,j){return $i(w,A,j,!0)}function cf(w,A,j){return $i(w,A,j,!1)}var lf=cf,uf=af;$n.Fragment=r,$n.jsx=lf,$n.jsxs=uf}(),$n}dc.exports=mf();var l=dc.exports;const zn="__PAE_GLOBAL_STATE__",fc="__PAE_REACTIVE_GLOBAL_STATE__",hc="__PAE_EXTENSIONS_POINTS_REGISTRY__",Go="__PAE_CUSTOMIZATIONS_LOADING_STATE_KEY__",gf="/auth/logout",vf=(e,t,n)=>n.map((r,o)=>o===e?t(r):r),yf=(e,t,n)=>vf(n.findIndex(e),t,n),Ko=(e,t)=>typeof e=="function"?e(t):e,bf=(e,t)=>{const[n,r]=_.useState(t);return _.useEffect(()=>{const o=e.subscribe(s=>{r(s)});return()=>{o.unsubscribe()}},[e]),n},pc=(e,t)=>{const n=bf(e,t),r=_.useCallback(o=>{e.next(Ko(o,n))},[n,e]);return[n,r]},er=()=>pc(window[fc],window[zn]),tr=()=>er()[0].catalog,wf=()=>{const e=tr(),t=_.useCallback(r=>{window[fc].next({...window[zn],catalog:Ko(r,e)})},[e]),n=_.useCallback((r,o)=>{t(s=>yf(i=>i.name===r,i=>{var a;return{...i,ui:{...i.ui,customProps:Ko(o,((a=i.ui)==null?void 0:a.customProps)??{})}}},s))},[t]);return[e,t,n]},mc=()=>{const[e,t]=_.useState(document.location.pathname);return _.useEffect(()=>{const n=()=>{t(window.location.pathname)};return window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n)}},[]),e},gc=e=>(...t)=>t.every(n=>e.some(r=>r.name===n));function Ds(){if(!window[zn])throw new Error("PAE Global state not found.");return window[zn]}const Ls=()=>{const{authUser:{applications:e}}=Ds();return e||[]},vc=e=>Ls().filter(t=>t.name===e).flatMap(t=>t.operations),yc=_.createContext(null),bc=({module:e,children:t})=>l.jsx(yc.Provider,{value:e,children:t});bc.displayName="PAEModule";const nr=()=>{const e=_.useContext(yc);if(!e)throw new Error("Module metadata was not setup yet !!");return e},wc=()=>{const{application:e}=nr();return _.useMemo(()=>vc(e),[e])},rr=()=>{const[{authUser:e}]=er(),t=wc();return{authUser:e,hasAccess:_.useMemo(()=>gc(t),[t])}},Cf=()=>{const{authUser:e}=rr();return!e||e.id==="anon"},Ms=e=>{const t=tr();return _.useMemo(()=>{const n=t.find(r=>r.name===e);if(!n)throw new Error(`Could not find the module [${e}] in the local catalog !`);return n},[t,e])},xf=e=>e.replace(/\/+/g,"/"),Sf=(e,t="only-base-path")=>{const{apiDocs:n,health:r,version:o,changelog:s}=(e==null?void 0:e.commonPaths)||{},i=(a,c="")=>{if(a===void 0&&!c)return;const u=a??c;if(t==="only-base-path")return u;const f=xf(`${e.baseUrl}/${u}`);return t==="with-module-base"?f:`${document.location.origin}${f}`};return{apiDocsPath:i(n,"/api-docs-json"),healthPath:i(r,"/health"),versionPath:i(o,"/version"),changelogPath:i(s,"/changelog")}},ks=()=>{var e;return((e=nr().ui)==null?void 0:e.customProps)??{}},Cc=e=>{var t,n;return((n=(t=Ms(e))==null?void 0:t.ui)==null?void 0:n.customProps)??{}},xc=e=>e.type==="app"||e.type==="tool",Ef=e=>e.modules.some(xc)&&e.route&&e.route!=="/",Sc=e=>{const{catalog:t}=Ds();return oo(t.filter(n=>n.application===e))},oo=(e=[])=>e.find(t=>{var n;return xc(t)&&((n=t.ui)==null?void 0:n.route)!=="/"}),Nt=new Map,_f=e=>{try{const{catalog:t}=Ds(),n=t.find(r=>r.name===e);return n!=null&&n.version?`${e}@${n.version}`:e}catch{return e}},so=e=>{const[t,n]=_.useState(null);return _.useEffect(()=>{(async()=>{if(!e){n(null);return}try{const o=_f(e);if(Nt.has(o)){const i=Nt.get(o);n(i);return}const s=await System.import(e);Nt.set(o,s),n(s)}catch(o){console.error(`Error importing module ${e}: ${o.message}`),n(null)}})()},[e]),t},Rf=e=>{if(e){const t=Array.from(Nt.keys()).filter(n=>n.startsWith(e));for(const n of t)Nt.delete(n);console.log(`[useApplicationJSModule] Cleared cache for module: ${e}`)}else Nt.clear(),console.log("[useApplicationJSModule] Cleared all module cache")};typeof window<"u"&&(window.PAE={...window.PAE,clearModuleCache:Rf,getModuleCacheSize:()=>Nt.size,getModuleCacheKeys:()=>Array.from(Nt.keys())});const Ec=e=>{const t=typeof e=="string"?Sc(e):oo(e==null?void 0:e.modules),n=so(t==null?void 0:t.name);return n==null?void 0:n.icon},_c=e=>{const t=oo(e==null?void 0:e.modules),n=so(t==null?void 0:t.name),[r,o]=_.useState(!1),[s,i]=_.useState({}),a=async()=>(typeof(n==null?void 0:n.menu)=="function"?await n.menu():n==null?void 0:n.menu)||[],c=async()=>{if(!(n!=null&&n.menu))return[];o(!0);const p=Tf((e==null?void 0:e.operations)||[]),m=(await a()).map(g=>{const{operations:x,items:h,path:v}=g;if(x!=null&&x.length&&!p(x))return null;const y=(h||[]).filter(b=>{var S;return!((S=b==null?void 0:b.operations)!=null&&S.length)||p(b.operations)});return!y.length&&!v?null:{...g,items:y}}).filter(Boolean);return o(!1),m},u=async()=>{const p=await c();e&&i(m=>({...m,[e.name]:p}))};_.useEffect(()=>{u()},[u]);const f=_.useMemo(()=>e?s[e.name]||[]:[],[s,e]);return{loading:r,menu:f}},Tf=e=>t=>t.every(n=>e.some(r=>r.name===n)),Pf=e=>_c(e),Af=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z]{2,}$/,Of=e=>Af.test(e);function jf(){window.open(gf,"_self")}const If=e=>jr.navigateToUrl(e),Nf=(e,t=2)=>{if(!e)return"";const n=e.split(" ");return n.length===1?n.join("").slice(0,t):n.map(r=>r[0]).join("").slice(0,t)},Rc=()=>{const e=tr();return _.useMemo(()=>Ls().map(n=>{var s,i,a;const r=Df(e,n.name),o=oo(r);return{name:n.name,displayName:((i=(s=o==null?void 0:o.ui)==null?void 0:s.customProps)==null?void 0:i.overrideApplicationDisplayName)??n.displayName,modules:r,route:(a=o==null?void 0:o.ui)==null?void 0:a.route,roles:[],operations:n.operations}}),[e])},Df=(e,t)=>e.filter(n=>n.application===t)||[],Tc=e=>_.useMemo(()=>e?Sc(e.name):void 0,[e]);function ae(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function Ut(e){return function t(n){return arguments.length===0||ae(n)?t:e.apply(this,arguments)}}function wt(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return ae(n)?t:Ut(function(o){return e(n,o)});default:return ae(n)&&ae(r)?t:ae(n)?Ut(function(o){return e(o,r)}):ae(r)?Ut(function(o){return e(n,o)}):e(n,r)}}}function $s(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return ae(n)?t:wt(function(s,i){return e(n,s,i)});case 2:return ae(n)&&ae(r)?t:ae(n)?wt(function(s,i){return e(s,r,i)}):ae(r)?wt(function(s,i){return e(n,s,i)}):Ut(function(s){return e(n,r,s)});default:return ae(n)&&ae(r)&&ae(o)?t:ae(n)&&ae(r)?wt(function(s,i){return e(s,i,o)}):ae(n)&&ae(o)?wt(function(s,i){return e(s,r,i)}):ae(r)&&ae(o)?wt(function(s,i){return e(n,s,i)}):ae(n)?Ut(function(s){return e(s,r,o)}):ae(r)?Ut(function(s){return e(n,s,o)}):ae(o)?Ut(function(s){return e(n,r,s)}):e(n,r,o)}}}function fr(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function Ui(e){return Object.prototype.toString.call(e)==="[object Object]"}var Lf=$s(function(t,n,r){var o=t(n),s=t(r);return o>s?-1:o<s?1:0}),Mf=$s(function(t,n,r){var o={},s;n=n||{},r=r||{};for(s in n)fr(s,n)&&(o[s]=fr(s,r)?t(s,n[s],r[s]):n[s]);for(s in r)fr(s,r)&&!fr(s,o)&&(o[s]=r[s]);return o}),kf=$s(function e(t,n,r){return Mf(function(o,s,i){return Ui(s)&&Ui(i)?e(t,s,i):t(o,s,i)},n,r)}),$f=wt(function(t,n){return kf(function(r,o,s){return s},t,n)}),Ff=wt(function(t,n){return Array.prototype.slice.call(n,0).sort(function(r,o){for(var s=0,i=0;s===0&&i<t.length;)s=t[i](r,o),i+=1;return s})});const Pc=()=>{const e=Rc();return _.useMemo(()=>e.filter(Ef),[e])},Fs=()=>{const e=mc(),t=Pc();return _.useMemo(()=>Bf(e,t),[e,t])},Bf=(e,t)=>Ff([Lf(Uf)],t).find(n=>n.route&&e.startsWith(n.route)),Uf=e=>{var t;return((t=e==null?void 0:e.route)==null?void 0:t.length)||-1},Ac=()=>{var e;return(e=Fs())==null?void 0:e.name},Wf=()=>{const e=Fs(),t=Tc(e);return so(t==null?void 0:t.name)},Bs=(e,t)=>{const r=tr().find(o=>o.name===e);if(!r){if(t)return null;throw new Error(`Service with name [${e}] not available in the catalog`)}return r.baseUrl},Us=(e,t)=>{const n=Bs(e,!!t)??t;return _.useCallback((r,o)=>{const i={Accept:"application/json",...(o==null?void 0:o.body)instanceof FormData?{}:{"Content-Type":"application/json"},...o==null?void 0:o.headers};return fetch(Hf(`${n}${r}`),{...o,headers:i})},[n])},Hf=e=>e.replace(/\/+/g,"/"),Vf=["impersonate","impersonate-display-name","tenant"],Oc=(e,t)=>{const n=Bs(e,t);return _.useMemo(()=>{if(!n)return null;try{const r=new URL(window.location.href),o=new URL(n,window.location.origin);return Vf.forEach(s=>{const i=r.searchParams.get(s);i&&o.searchParams.set(s,i)}),o.toString()}catch(r){return console.error("Error building WebSocket URL:",r),n}},[n])},zf=(e,t)=>n=>({timestamp:new Date(new Date().toUTCString()).toISOString(),module:t.name,moduleVersion:t.version,application:t.application,user:e.username,...n}),qf=(e,t,n)=>async r=>{if(r.length===0)throw new Error("Invalid call to trackEvents with an empty array of events!");const o=await e("/event",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.map(zf(t,n)))});if(!o.ok)throw new Error(`Error publishing habits event ${o.statusText}`)},Gf="@bluealba/pae-habits-service",jc=()=>{const{authUser:e}=rr(),t=nr(),n=Us(Gf);return _.useCallback(qf(n,e,t),[])},Kf=()=>{const e=jc();return _.useCallback((t,n)=>e([{name:t,data:n}]),[e])},Qf=e=>{var t;return(t=e.split(/[#?]/)[0].split(".").pop())==null?void 0:t.trim()},Yf={woff2:"woff2",woff:"woff",ttf:"truetype",otf:"opentype",eot:"embedded-opentype",svg:"svg"},Zf=e=>{const t=Qf(e);return t?Yf[t]:void 0},Xf=(e,t)=>{const n=t??Zf(e);return n?`format(${n})`:""};function Ic(e){const[t,n]=_.useState(!1);return _.useEffect(()=>{if(!(e!=null&&e.length))return;const r=document.createElement("style");r.setAttribute("data-generated-fonts","true");const o=e.flatMap(({fontFamily:i,variants:a})=>a.map(({path:c,fontWeight:u,format:f})=>`
|
|
23
23
|
@font-face {
|
|
24
24
|
font-family: "${i}";
|
|
25
|
-
src: url("${c}") ${
|
|
25
|
+
src: url("${c}") ${Xf(c,f)};
|
|
26
26
|
font-weight: ${u};
|
|
27
27
|
font-style: normal;
|
|
28
28
|
}
|
|
29
29
|
`)).join(`
|
|
30
|
-
`);return r.innerHTML=o,document.head.appendChild(r),(async()=>{try{await Promise.all(e.flatMap(({fontFamily:i,variants:a})=>a.map(({fontWeight:c})=>document.fonts.load(`normal ${c} 1em "${i}"`))))}finally{n(!0)}})(),()=>{document.head.removeChild(r)}},[e]),_.useEffect(()=>{!t&&!(e!=null&&e.length)&&n(!0)},[e,t]),{fontsLoaded:t}}
|
|
30
|
+
`);return r.innerHTML=o,document.head.appendChild(r),(async()=>{try{await Promise.all(e.flatMap(({fontFamily:i,variants:a})=>a.map(({fontWeight:c})=>document.fonts.load(`normal ${c} 1em "${i}"`))))}finally{n(!0)}})(),()=>{document.head.removeChild(r)}},[e]),_.useEffect(()=>{!t&&!(e!=null&&e.length)&&n(!0)},[e,t]),{fontsLoaded:t}}const Nc=e=>{const{cssCustomizationLoadingDelay:t=1e3}=ks();_.useEffect(()=>{if(!e)return;const n=document.createElement("style");return setTimeout(()=>{n.innerHTML=e,document.head.append(n)},t),()=>n==null?void 0:n.remove()},[e,t])},Qo="theme",Wi=()=>document.documentElement.dataset[Qo]==="dark"?"dark":"light",Jf=()=>{const[e,t]=_.useState(Wi());return _.useEffect(()=>{const n=document.documentElement,r=()=>t(Wi),o=new MutationObserver(s=>{for(const i of s)i.type==="attributes"&&i.attributeName===`data-${Qo}`&&r()});return o.observe(n,{attributes:!0,attributeFilter:[`data-${Qo}`]}),r(),()=>{o.disconnect()}},[]),e},eh=()=>{const e=window[Go];return pc(e,e.getValue()??void 0)};var Yo=function(e,t){return Yo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Yo(e,t)};function or(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Yo(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ye=function(){return Ye=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ye.apply(this,arguments)};function Dc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Zo(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xo(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function Ur(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function ct(e){return typeof e=="function"}function Lc(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Io=Lc(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
31
31
|
`+n.map(function(r,o){return o+1+") "+r.toString()}).join(`
|
|
32
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function Xo(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var io=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,o,s;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var a=Yo(i),c=a.next();!c.done;c=a.next()){var u=c.value;u.remove(this)}}catch(h){t={error:h}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else i.remove(this);var f=this.initialTeardown;if(ct(f))try{f()}catch(h){s=h instanceof Io?h.errors:[h]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var m=Yo(p),g=m.next();!g.done;g=m.next()){var x=g.value;try{Wi(x)}catch(h){s=s??[],h instanceof Io?s=Ur(Ur([],Zo(s)),Zo(h.errors)):s.push(h)}}}catch(h){r={error:h}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(r)throw r.error}}}if(s)throw new Io(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Wi(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Xo(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Xo(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Fc=io.EMPTY;function Bc(e){return e instanceof io||e&&"closed"in e&&ct(e.remove)&&ct(e.add)&&ct(e.unsubscribe)}function Wi(e){ct(e)?e():e.unsubscribe()}var eh={Promise:void 0},th={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Ur([e,t],Zo(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function nh(e){th.setTimeout(function(){throw e})}function Hi(){}function Ir(e){e()}var Uc=function(e){or(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Bc(n)&&n.add(r)):r.destination=sh,r}return t.create=function(n,r,o){return new Jo(n,r,o)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(io),rh=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){hr(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){hr(r)}else hr(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){hr(n)}},e}(),Jo=function(e){or(t,e);function t(n,r,o){var s=e.call(this)||this,i;return ct(n)||!n?i={next:n??void 0,error:r??void 0,complete:o??void 0}:i=n,s.destination=new rh(i),s}return t}(Uc);function hr(e){nh(e)}function oh(e){throw e}var sh={closed:!0,next:Hi,error:oh,complete:Hi},ih=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ah(e){return e}function ch(e){return e.length===0?ah:e.length===1?e[0]:function(n){return e.reduce(function(r,o){return o(r)},n)}}var Vi=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var o=this,s=uh(t)?t:new Jo(t,n,r);return Ir(function(){var i=o,a=i.operator,c=i.source;s.add(a?a.call(s,c):c?o._subscribe(s):o._trySubscribe(s))}),s},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=zi(n),new n(function(o,s){var i=new Jo({next:function(a){try{t(a)}catch(c){s(c),i.unsubscribe()}},error:s,complete:o});r.subscribe(i)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[ih]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ch(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=zi(t),new t(function(r,o){var s;n.subscribe(function(i){return s=i},function(i){return o(i)},function(){return r(s)})})},e.create=function(t){return new e(t)},e}();function zi(e){var t;return(t=e??eh.Promise)!==null&&t!==void 0?t:Promise}function lh(e){return e&&ct(e.next)&&ct(e.error)&&ct(e.complete)}function uh(e){return e&&e instanceof Uc||lh(e)&&Bc(e)}var dh=$c(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Wc=function(e){or(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new qi(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new dh},t.prototype.next=function(n){var r=this;Ir(function(){var o,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var i=Yo(r.currentObservers),a=i.next();!a.done;a=i.next()){var c=a.value;c.next(n)}}catch(u){o={error:u}}finally{try{a&&!a.done&&(s=i.return)&&s.call(i)}finally{if(o)throw o.error}}}})},t.prototype.error=function(n){var r=this;Ir(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var o=r.observers;o.length;)o.shift().error(n)}})},t.prototype.complete=function(){var n=this;Ir(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,o=this,s=o.hasError,i=o.isStopped,a=o.observers;return s||i?Fc:(this.currentObservers=null,a.push(n),new io(function(){r.currentObservers=null,Xo(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,o=r.hasError,s=r.thrownError,i=r.isStopped;o?n.error(s):i&&n.complete()},t.prototype.asObservable=function(){var n=new Vi;return n.source=this,n},t.create=function(n,r){return new qi(n,r)},t}(Vi),qi=function(e){or(t,e);function t(n,r){var o=e.call(this)||this;return o.destination=n,o.source=r,o}return t.prototype.next=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.next)===null||o===void 0||o.call(r,n)},t.prototype.error=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.error)===null||o===void 0||o.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,o;return(o=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&o!==void 0?o:Fc},t}(Wc),fh=function(e){or(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,o=n.thrownError,s=n._value;if(r)throw o;return this._throwIfClosed(),s},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t}(Wc);const hh=e=>{const{fontsLoaded:t}=Mc(e.fonts);Lc(e.styleSheet);const n=()=>{const r=new fh(!0);window[Go]=r};_.useEffect(()=>{t&&window[Go].next(!1)},[t]),_.useEffect(()=>{n()},[])},ph=()=>{const e=window[Go];return hc(e,e.getValue()??void 0)},es="theme",Gi=()=>document.documentElement.dataset[es]==="dark"?"dark":"light",mh=()=>{const[e,t]=_.useState(Gi());return _.useEffect(()=>{const n=document.documentElement,r=()=>t(Gi),o=new MutationObserver(s=>{for(const i of s)i.type==="attributes"&&i.attributeName===`data-${es}`&&r()});return o.observe(n,{attributes:!0,attributeFilter:[`data-${es}`]}),r(),()=>{o.disconnect()}},[]),e},gh=e=>e!==void 0,vh=e=>e!==!0;let yh={data:""},bh=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||yh},wh=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Ch=/\/\*[^]*?\*\/| +/g,Ki=/\n+/g,Ct=(e,t)=>{let n="",r="",o="";for(let s in e){let i=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+i+";":r+=s[1]=="f"?Ct(i,s):s+"{"+Ct(i,s[1]=="k"?"":t)+"}":typeof i=="object"?r+=Ct(i,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,a):a?a+" "+c:c)):s):i!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Ct.p?Ct.p(s,i):s+":"+i+";")}return n+(t&&o?t+"{"+o+"}":o)+r},ot={},Hc=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Hc(e[n]);return t}return e},xh=(e,t,n,r,o)=>{let s=Hc(e),i=ot[s]||(ot[s]=(c=>{let u=0,f=11;for(;u<c.length;)f=101*f+c.charCodeAt(u++)>>>0;return"go"+f})(s));if(!ot[i]){let c=s!==e?e:(u=>{let f,p,m=[{}];for(;f=wh.exec(u.replace(Ch,""));)f[4]?m.shift():f[3]?(p=f[3].replace(Ki," ").trim(),m.unshift(m[0][p]=m[0][p]||{})):m[0][f[1]]=f[2].replace(Ki," ").trim();return m[0]})(e);ot[i]=Ct(o?{["@keyframes "+i]:c}:c,n?"":"."+i)}let a=n&&ot.g?ot.g:null;return n&&(ot.g=ot[i]),((c,u,f,p)=>{p?u.data=u.data.replace(p,c):u.data.indexOf(c)===-1&&(u.data=f?c+u.data:u.data+c)})(ot[i],t,r,a),i},Sh=(e,t,n)=>e.reduce((r,o,s)=>{let i=t[s];if(i&&i.call){let a=i(n),c=a&&a.props&&a.props.className||/^go/.test(a)&&a;i=c?"."+c:a&&typeof a=="object"?a.props?"":Ct(a,""):a===!1?"":a}return r+o+(i??"")},"");function ao(e){let t=this||{},n=e.call?e(t.p):e;return xh(n.unshift?n.raw?Sh(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,bh(t.target),t.g,t.o,t.k)}let Vc,ts,ns;ao.bind({g:1});let ut=ao.bind({k:1});function Eh(e,t,n,r){Ct.p=t,Vc=e,ts=n,ns=r}function kt(e,t){let n=this||{};return function(){let r=arguments;function o(s,i){let a=Object.assign({},s),c=a.className||o.className;n.p=Object.assign({theme:ts&&ts()},a),n.o=/ *go\d+/.test(c),a.className=ao.apply(n,r)+(c?" "+c:"");let u=e;return e[0]&&(u=a.as||e,delete a.as),ns&&u[0]&&ns(a),Vc(u,a)}return o}}var _h=e=>typeof e=="function",Wr=(e,t)=>_h(e)?e(t):e,Rh=(()=>{let e=0;return()=>(++e).toString()})(),zc=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Th=20,Nr=new Map,Ph=1e3,Qi=e=>{if(Nr.has(e))return;let t=setTimeout(()=>{Nr.delete(e),an({type:4,toastId:e})},Ph);Nr.set(e,t)},Ah=e=>{let t=Nr.get(e);t&&clearTimeout(t)},rs=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Th)};case 1:return t.toast.id&&Ah(t.toast.id),{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return e.toasts.find(s=>s.id===n.id)?rs(e,{type:1,toast:n}):rs(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?Qi(r):e.toasts.forEach(s=>{Qi(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+o}))}}},Dr=[],Lr={toasts:[],pausedAt:void 0},an=e=>{Lr=rs(Lr,e),Dr.forEach(t=>{t(Lr)})},Oh={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},jh=(e={})=>{let[t,n]=_.useState(Lr);_.useEffect(()=>(Dr.push(n),()=>{let o=Dr.indexOf(n);o>-1&&Dr.splice(o,1)}),[t]);let r=t.toasts.map(o=>{var s,i;return{...e,...e[o.type],...o,duration:o.duration||((s=e[o.type])==null?void 0:s.duration)||(e==null?void 0:e.duration)||Oh[o.type],style:{...e.style,...(i=e[o.type])==null?void 0:i.style,...o.style}}});return{...t,toasts:r}},Ih=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Rh()}),sr=e=>(t,n)=>{let r=Ih(t,e,n);return an({type:2,toast:r}),r.id},Pe=(e,t)=>sr("blank")(e,t);Pe.error=sr("error");Pe.success=sr("success");Pe.loading=sr("loading");Pe.custom=sr("custom");Pe.dismiss=e=>{an({type:3,toastId:e})};Pe.remove=e=>an({type:4,toastId:e});Pe.promise=(e,t,n)=>{let r=Pe.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(o=>(Pe.success(Wr(t.success,o),{id:r,...n,...n==null?void 0:n.success}),o)).catch(o=>{Pe.error(Wr(t.error,o),{id:r,...n,...n==null?void 0:n.error})}),e};var Nh=(e,t)=>{an({type:1,toast:{id:e,height:t}})},Dh=()=>{an({type:5,time:Date.now()})},Lh=e=>{let{toasts:t,pausedAt:n}=jh(e);_.useEffect(()=>{if(n)return;let s=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let c=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(c<0){a.visible&&Pe.dismiss(a.id);return}return setTimeout(()=>Pe.dismiss(a.id),c)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=_.useCallback(()=>{n&&an({type:6,time:Date.now()})},[n]),o=_.useCallback((s,i)=>{let{reverseOrder:a=!1,gutter:c=8,defaultPosition:u}=i||{},f=t.filter(g=>(g.position||u)===(s.position||u)&&g.height),p=f.findIndex(g=>g.id===s.id),m=f.filter((g,x)=>x<p&&g.visible).length;return f.filter(g=>g.visible).slice(...a?[m+1]:[0,m]).reduce((g,x)=>g+(x.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:Nh,startPause:Dh,endPause:r,calculateOffset:o}}},Mh=ut`
|
|
32
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function Jo(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var io=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,o,s;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var a=Zo(i),c=a.next();!c.done;c=a.next()){var u=c.value;u.remove(this)}}catch(h){t={error:h}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else i.remove(this);var f=this.initialTeardown;if(ct(f))try{f()}catch(h){s=h instanceof Io?h.errors:[h]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var m=Zo(p),g=m.next();!g.done;g=m.next()){var x=g.value;try{Hi(x)}catch(h){s=s??[],h instanceof Io?s=Ur(Ur([],Xo(s)),Xo(h.errors)):s.push(h)}}}catch(h){r={error:h}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(r)throw r.error}}}if(s)throw new Io(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Hi(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Jo(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Jo(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Mc=io.EMPTY;function kc(e){return e instanceof io||e&&"closed"in e&&ct(e.remove)&&ct(e.add)&&ct(e.unsubscribe)}function Hi(e){ct(e)?e():e.unsubscribe()}var th={Promise:void 0},nh={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Ur([e,t],Xo(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function rh(e){nh.setTimeout(function(){throw e})}function Vi(){}function Ir(e){e()}var $c=function(e){or(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,kc(n)&&n.add(r)):r.destination=ih,r}return t.create=function(n,r,o){return new es(n,r,o)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(io),oh=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){hr(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){hr(r)}else hr(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){hr(n)}},e}(),es=function(e){or(t,e);function t(n,r,o){var s=e.call(this)||this,i;return ct(n)||!n?i={next:n??void 0,error:r??void 0,complete:o??void 0}:i=n,s.destination=new oh(i),s}return t}($c);function hr(e){rh(e)}function sh(e){throw e}var ih={closed:!0,next:Vi,error:sh,complete:Vi},ah=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ch(e){return e}function lh(e){return e.length===0?ch:e.length===1?e[0]:function(n){return e.reduce(function(r,o){return o(r)},n)}}var zi=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var o=this,s=dh(t)?t:new es(t,n,r);return Ir(function(){var i=o,a=i.operator,c=i.source;s.add(a?a.call(s,c):c?o._subscribe(s):o._trySubscribe(s))}),s},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=qi(n),new n(function(o,s){var i=new es({next:function(a){try{t(a)}catch(c){s(c),i.unsubscribe()}},error:s,complete:o});r.subscribe(i)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[ah]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return lh(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=qi(t),new t(function(r,o){var s;n.subscribe(function(i){return s=i},function(i){return o(i)},function(){return r(s)})})},e.create=function(t){return new e(t)},e}();function qi(e){var t;return(t=e??th.Promise)!==null&&t!==void 0?t:Promise}function uh(e){return e&&ct(e.next)&&ct(e.error)&&ct(e.complete)}function dh(e){return e&&e instanceof $c||uh(e)&&kc(e)}var fh=Lc(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Fc=function(e){or(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new Gi(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new fh},t.prototype.next=function(n){var r=this;Ir(function(){var o,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var i=Zo(r.currentObservers),a=i.next();!a.done;a=i.next()){var c=a.value;c.next(n)}}catch(u){o={error:u}}finally{try{a&&!a.done&&(s=i.return)&&s.call(i)}finally{if(o)throw o.error}}}})},t.prototype.error=function(n){var r=this;Ir(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var o=r.observers;o.length;)o.shift().error(n)}})},t.prototype.complete=function(){var n=this;Ir(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,o=this,s=o.hasError,i=o.isStopped,a=o.observers;return s||i?Mc:(this.currentObservers=null,a.push(n),new io(function(){r.currentObservers=null,Jo(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,o=r.hasError,s=r.thrownError,i=r.isStopped;o?n.error(s):i&&n.complete()},t.prototype.asObservable=function(){var n=new zi;return n.source=this,n},t.create=function(n,r){return new Gi(n,r)},t}(zi),Gi=function(e){or(t,e);function t(n,r){var o=e.call(this)||this;return o.destination=n,o.source=r,o}return t.prototype.next=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.next)===null||o===void 0||o.call(r,n)},t.prototype.error=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.error)===null||o===void 0||o.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,o;return(o=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&o!==void 0?o:Mc},t}(Fc),hh=function(e){or(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,o=n.thrownError,s=n._value;if(r)throw o;return this._throwIfClosed(),s},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t}(Fc);const ph=e=>{const{fontsLoaded:t}=Ic(e.fonts);Nc(e.styleSheet);const n=()=>{const r=new hh(!0);window[Go]=r};_.useEffect(()=>{t&&window[Go].next(!1)},[t]),_.useEffect(()=>{n()},[n])},mh=e=>e!==void 0,gh=e=>e!==!0,Bc=(e,t)=>{_.useEffect(()=>(window.addEventListener(e,t),()=>window.removeEventListener(e,t)),[e,t])},Uc=(e,t,n)=>{_.useEffect(()=>window[hc].setExtensionPoint(e,t,n),[n,e,t])},Wc=e=>{const t=nr(),n=window[hc],[r,o]=_.useState(null);return _.useEffect(()=>n.defineExtensionPoint(t,e,s=>{o(()=>s)}),[n.defineExtensionPoint,t,e]),r};var In=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Jt=typeof window>"u"||"Deno"in globalThis;function xe(){}function vh(e,t){return typeof e=="function"?e(t):e}function ts(e){return typeof e=="number"&&e>=0&&e!==1/0}function Hc(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Dt(e,t){return typeof e=="function"?e(t):e}function Fe(e,t){return typeof e=="function"?e(t):e}function Ki(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==Ws(i,t.options))return!1}else if(!qn(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function Qi(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(en(t.options.mutationKey)!==en(s))return!1}else if(!qn(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ws(e,t){return((t==null?void 0:t.queryKeyHashFn)||en)(e)}function en(e){return JSON.stringify(e,(t,n)=>rs(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function qn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>qn(e[n],t[n])):!1}function ns(e,t){if(e===t)return e;const n=Yi(e)&&Yi(t);if(n||rs(e)&&rs(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),i=s.length,a=n?[]:{};let c=0;for(let u=0;u<i;u++){const f=n?u:s[u];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,c++):(a[f]=ns(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&c++)}return o===i&&c===o?e:a}return t}function Wr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Yi(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rs(e){if(!Zi(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Zi(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Zi(e){return Object.prototype.toString.call(e)==="[object Object]"}function yh(e){return new Promise(t=>{setTimeout(t,e)})}function os(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){try{return ns(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return ns(e,t)}return t}function bh(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function wh(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Hr=Symbol();function Vc(e,t){return e.queryFn===Hr&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Hr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function zc(e,t){return typeof e=="function"?e(...t):!!e}var Ht,xt,gn,Ja,Ch=(Ja=class extends In{constructor(){super();M(this,Ht);M(this,xt);M(this,gn);O(this,gn,t=>{if(!Jt&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,xt)||this.setEventListener(C(this,gn))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,xt))==null||t.call(this),O(this,xt,void 0))}setEventListener(t){var n;O(this,gn,t),(n=C(this,xt))==null||n.call(this),O(this,xt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){C(this,Ht)!==t&&(O(this,Ht,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof C(this,Ht)=="boolean"?C(this,Ht):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ht=new WeakMap,xt=new WeakMap,gn=new WeakMap,Ja),Hs=new Ch,vn,St,yn,ec,xh=(ec=class extends In{constructor(){super();M(this,vn,!0);M(this,St);M(this,yn);O(this,yn,t=>{if(!Jt&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,St)||this.setEventListener(C(this,yn))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,St))==null||t.call(this),O(this,St,void 0))}setEventListener(t){var n;O(this,yn,t),(n=C(this,St))==null||n.call(this),O(this,St,t(this.setOnline.bind(this)))}setOnline(t){C(this,vn)!==t&&(O(this,vn,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return C(this,vn)}},vn=new WeakMap,St=new WeakMap,yn=new WeakMap,ec),Vr=new xh;function ss(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function Sh(e){return Math.min(1e3*2**e,3e4)}function qc(e){return(e??"online")==="online"?Vr.isOnline():!0}var Gc=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function No(e){return e instanceof Gc}function Kc(e){let t=!1,n=0,r=!1,o;const s=ss(),i=h=>{var v;r||(m(new Gc(h)),(v=e.abort)==null||v.call(e))},a=()=>{t=!0},c=()=>{t=!1},u=()=>Hs.isFocused()&&(e.networkMode==="always"||Vr.isOnline())&&e.canRun(),f=()=>qc(e.networkMode)&&e.canRun(),p=h=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,h),o==null||o(),s.resolve(h))},m=h=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,h),o==null||o(),s.reject(h))},g=()=>new Promise(h=>{var v;o=y=>{(r||u())&&h(y)},(v=e.onPause)==null||v.call(e)}).then(()=>{var h;o=void 0,r||(h=e.onContinue)==null||h.call(e)}),x=()=>{if(r)return;let h;const v=n===0?e.initialPromise:void 0;try{h=v??e.fn()}catch(y){h=Promise.reject(y)}Promise.resolve(h).then(p).catch(y=>{var T;if(r)return;const b=e.retry??(Jt?0:3),S=e.retryDelay??Sh,E=typeof S=="function"?S(n,y):S,R=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,y);if(t||!R){m(y);return}n++,(T=e.onFail)==null||T.call(e,n,y),yh(E).then(()=>u()?void 0:g()).then(()=>{t?m(y):x()})})};return{promise:s,cancel:i,continue:()=>(o==null||o(),s),cancelRetry:a,continueRetry:c,canStart:f,start:()=>(f()?x():g().then(x),s)}}var Eh=e=>setTimeout(e,0);function _h(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=Eh;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||i()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var he=_h(),Vt,tc,Qc=(tc=class{constructor(){M(this,Vt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ts(this.gcTime)&&O(this,Vt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Jt?1/0:5*60*1e3))}clearGcTimeout(){C(this,Vt)&&(clearTimeout(C(this,Vt)),O(this,Vt,void 0))}},Vt=new WeakMap,tc),bn,wn,Ne,zt,me,Yn,qt,ke,st,nc,Rh=(nc=class extends Qc{constructor(t){super();M(this,ke);M(this,bn);M(this,wn);M(this,Ne);M(this,zt);M(this,me);M(this,Yn);M(this,qt);O(this,qt,!1),O(this,Yn,t.defaultOptions),this.setOptions(t.options),this.observers=[],O(this,zt,t.client),O(this,Ne,C(this,zt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,O(this,bn,Th(this.options)),this.state=t.state??C(this,bn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,me))==null?void 0:t.promise}setOptions(t){this.options={...C(this,Yn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,Ne).remove(this)}setData(t,n){const r=os(this.state.data,t,this.options);return H(this,ke,st).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){H(this,ke,st).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=C(this,me))==null?void 0:r.promise;return(o=C(this,me))==null||o.cancel(t),n?n.then(xe).catch(xe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,bn))}isActive(){return this.observers.some(t=>Fe(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Hr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Dt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Hc(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,me))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,me))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,Ne).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(C(this,me)&&(C(this,qt)?C(this,me).cancel({revert:!0}):C(this,me).cancelRetry()),this.scheduleGc()),C(this,Ne).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||H(this,ke,st).call(this,{type:"invalidate"})}fetch(t,n){var u,f,p;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,me))return C(this,me).continueRetry(),C(this,me).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(g=>g.options.queryFn);m&&this.setOptions(m.options)}Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");const r=new AbortController,o=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(O(this,qt,!0),r.signal)})},s=()=>{const m=Vc(this.options,n),x=(()=>{const h={client:C(this,zt),queryKey:this.queryKey,meta:this.meta};return o(h),h})();return O(this,qt,!1),this.options.persister?this.options.persister(m,x,this):m(x)},a=(()=>{const m={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:C(this,zt),state:this.state,fetchFn:s};return o(m),m})();(u=this.options.behavior)==null||u.onFetch(a,this),O(this,wn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=a.fetchOptions)==null?void 0:f.meta))&&H(this,ke,st).call(this,{type:"fetch",meta:(p=a.fetchOptions)==null?void 0:p.meta});const c=m=>{var g,x,h,v;No(m)&&m.silent||H(this,ke,st).call(this,{type:"error",error:m}),No(m)||((x=(g=C(this,Ne).config).onError)==null||x.call(g,m,this),(v=(h=C(this,Ne).config).onSettled)==null||v.call(h,this.state.data,m,this)),this.scheduleGc()};return O(this,me,Kc({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:m=>{var g,x,h,v;if(m===void 0){console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(y){c(y);return}(x=(g=C(this,Ne).config).onSuccess)==null||x.call(g,m,this),(v=(h=C(this,Ne).config).onSettled)==null||v.call(h,m,this.state.error,this),this.scheduleGc()},onError:c,onFail:(m,g)=>{H(this,ke,st).call(this,{type:"failed",failureCount:m,error:g})},onPause:()=>{H(this,ke,st).call(this,{type:"pause"})},onContinue:()=>{H(this,ke,st).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),C(this,me).start()}},bn=new WeakMap,wn=new WeakMap,Ne=new WeakMap,zt=new WeakMap,me=new WeakMap,Yn=new WeakMap,qt=new WeakMap,ke=new WeakSet,st=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Yc(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return No(o)&&o.revert&&C(this,wn)?{...C(this,wn),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),he.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,Ne).notify({query:this,type:"updated",action:t})})},nc);function Yc(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:qc(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Th(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ge,rc,Ph=(rc=class extends In{constructor(t={}){super();M(this,Ge);this.config=t,O(this,Ge,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Ws(o,n);let i=this.get(s);return i||(i=new Rh({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){C(this,Ge).has(t.queryHash)||(C(this,Ge).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=C(this,Ge).get(t.queryHash);n&&(t.destroy(),n===t&&C(this,Ge).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){he.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,Ge).get(t)}getAll(){return[...C(this,Ge).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ki(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Ki(t,r)):n}notify(t){he.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){he.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){he.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ge=new WeakMap,rc),Ke,we,Gt,Qe,yt,oc,Ah=(oc=class extends Qc{constructor(t){super();M(this,Qe);M(this,Ke);M(this,we);M(this,Gt);this.mutationId=t.mutationId,O(this,we,t.mutationCache),O(this,Ke,[]),this.state=t.state||Zc(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Ke).includes(t)||(C(this,Ke).push(t),this.clearGcTimeout(),C(this,we).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){O(this,Ke,C(this,Ke).filter(n=>n!==t)),this.scheduleGc(),C(this,we).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Ke).length||(this.state.status==="pending"?this.scheduleGc():C(this,we).remove(this))}continue(){var t;return((t=C(this,Gt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,a,c,u,f,p,m,g,x,h,v,y,b,S,E,R,T,P,D;const n=()=>{H(this,Qe,yt).call(this,{type:"continue"})};O(this,Gt,Kc({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(I,L)=>{H(this,Qe,yt).call(this,{type:"failed",failureCount:I,error:L})},onPause:()=>{H(this,Qe,yt).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,we).canRun(this)}));const r=this.state.status==="pending",o=!C(this,Gt).canStart();try{if(r)n();else{H(this,Qe,yt).call(this,{type:"pending",variables:t,isPaused:o}),await((i=(s=C(this,we).config).onMutate)==null?void 0:i.call(s,t,this));const L=await((c=(a=this.options).onMutate)==null?void 0:c.call(a,t));L!==this.state.context&&H(this,Qe,yt).call(this,{type:"pending",context:L,variables:t,isPaused:o})}const I=await C(this,Gt).start();return await((f=(u=C(this,we).config).onSuccess)==null?void 0:f.call(u,I,t,this.state.context,this)),await((m=(p=this.options).onSuccess)==null?void 0:m.call(p,I,t,this.state.context)),await((x=(g=C(this,we).config).onSettled)==null?void 0:x.call(g,I,null,this.state.variables,this.state.context,this)),await((v=(h=this.options).onSettled)==null?void 0:v.call(h,I,null,t,this.state.context)),H(this,Qe,yt).call(this,{type:"success",data:I}),I}catch(I){try{throw await((b=(y=C(this,we).config).onError)==null?void 0:b.call(y,I,t,this.state.context,this)),await((E=(S=this.options).onError)==null?void 0:E.call(S,I,t,this.state.context)),await((T=(R=C(this,we).config).onSettled)==null?void 0:T.call(R,void 0,I,this.state.variables,this.state.context,this)),await((D=(P=this.options).onSettled)==null?void 0:D.call(P,void 0,I,t,this.state.context)),I}finally{H(this,Qe,yt).call(this,{type:"error",error:I})}}finally{C(this,we).runNext(this)}}},Ke=new WeakMap,we=new WeakMap,Gt=new WeakMap,Qe=new WeakSet,yt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),he.batch(()=>{C(this,Ke).forEach(r=>{r.onMutationUpdate(t)}),C(this,we).notify({mutation:this,type:"updated",action:t})})},oc);function Zc(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var it,$e,Zn,sc,Oh=(sc=class extends In{constructor(t={}){super();M(this,it);M(this,$e);M(this,Zn);this.config=t,O(this,it,new Set),O(this,$e,new Map),O(this,Zn,0)}build(t,n,r){const o=new Ah({mutationCache:this,mutationId:++dr(this,Zn)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){C(this,it).add(t);const n=pr(t);if(typeof n=="string"){const r=C(this,$e).get(n);r?r.push(t):C(this,$e).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,it).delete(t)){const n=pr(t);if(typeof n=="string"){const r=C(this,$e).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&C(this,$e).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=pr(t);if(typeof n=="string"){const r=C(this,$e).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=pr(t);if(typeof n=="string"){const o=(r=C(this,$e).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){he.batch(()=>{C(this,it).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,it).clear(),C(this,$e).clear()})}getAll(){return Array.from(C(this,it))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Qi(n,r))}findAll(t={}){return this.getAll().filter(n=>Qi(t,n))}notify(t){he.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return he.batch(()=>Promise.all(t.map(n=>n.continue().catch(xe))))}},it=new WeakMap,$e=new WeakMap,Zn=new WeakMap,sc);function pr(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Xi(e){return{onFetch:(t,n)=>{var f,p,m,g,x;const r=t.options,o=(m=(p=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,s=((g=t.state.data)==null?void 0:g.pages)||[],i=((x=t.state.data)==null?void 0:x.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const u=async()=>{let h=!1;const v=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},y=Vc(t.options,t.fetchOptions),b=async(S,E,R)=>{if(h)return Promise.reject();if(E==null&&S.pages.length)return Promise.resolve(S);const P=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:E,direction:R?"backward":"forward",meta:t.options.meta};return v(B),B})(),D=await y(P),{maxPages:I}=t.options,L=R?wh:bh;return{pages:L(S.pages,D,I),pageParams:L(S.pageParams,E,I)}};if(o&&s.length){const S=o==="backward",E=S?jh:Ji,R={pages:s,pageParams:i},T=E(r,R);a=await b(R,T,S)}else{const S=e??s.length;do{const E=c===0?i[0]??r.initialPageParam:Ji(r,a);if(c>0&&E==null)break;a=await b(a,E),c++}while(c<S)}return a};t.options.persister?t.fetchFn=()=>{var h,v;return(v=(h=t.options).persister)==null?void 0:v.call(h,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Ji(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function jh(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var le,Et,_t,Cn,xn,Rt,Sn,En,ic,Ih=(ic=class{constructor(e={}){M(this,le);M(this,Et);M(this,_t);M(this,Cn);M(this,xn);M(this,Rt);M(this,Sn);M(this,En);O(this,le,e.queryCache||new Ph),O(this,Et,e.mutationCache||new Oh),O(this,_t,e.defaultOptions||{}),O(this,Cn,new Map),O(this,xn,new Map),O(this,Rt,0)}mount(){dr(this,Rt)._++,C(this,Rt)===1&&(O(this,Sn,Hs.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,le).onFocus())})),O(this,En,Vr.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,le).onOnline())})))}unmount(){var e,t;dr(this,Rt)._--,C(this,Rt)===0&&((e=C(this,Sn))==null||e.call(this),O(this,Sn,void 0),(t=C(this,En))==null||t.call(this),O(this,En,void 0))}isFetching(e){return C(this,le).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Et).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,le).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=C(this,le).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Dt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return C(this,le).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=C(this,le).get(r.queryHash),s=o==null?void 0:o.state.data,i=vh(t,s);if(i!==void 0)return C(this,le).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return he.batch(()=>C(this,le).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,le).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=C(this,le);he.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=C(this,le);return he.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=he.batch(()=>C(this,le).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(xe).catch(xe)}invalidateQueries(e,t={}){return he.batch(()=>(C(this,le).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=he.batch(()=>C(this,le).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(xe)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(xe)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=C(this,le).build(this,t);return n.isStaleByTime(Dt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(xe).catch(xe)}fetchInfiniteQuery(e){return e.behavior=Xi(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(xe).catch(xe)}ensureInfiniteQueryData(e){return e.behavior=Xi(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Vr.isOnline()?C(this,Et).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,le)}getMutationCache(){return C(this,Et)}getDefaultOptions(){return C(this,_t)}setDefaultOptions(e){O(this,_t,e)}setQueryDefaults(e,t){C(this,Cn).set(en(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,Cn).values()],n={};return t.forEach(r=>{qn(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){C(this,xn).set(en(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,xn).values()],n={};return t.forEach(r=>{qn(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,_t).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ws(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Hr&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,_t).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,le).clear(),C(this,Et).clear()}},le=new WeakMap,Et=new WeakMap,_t=new WeakMap,Cn=new WeakMap,xn=new WeakMap,Rt=new WeakMap,Sn=new WeakMap,En=new WeakMap,ic),_e,G,Xn,Ce,Kt,_n,Tt,Pt,Jn,Rn,Tn,Qt,Yt,At,Pn,ne,Un,is,as,cs,ls,us,ds,fs,Xc,ac,Nh=(ac=class extends In{constructor(t,n){super();M(this,ne);M(this,_e);M(this,G);M(this,Xn);M(this,Ce);M(this,Kt);M(this,_n);M(this,Tt);M(this,Pt);M(this,Jn);M(this,Rn);M(this,Tn);M(this,Qt);M(this,Yt);M(this,At);M(this,Pn,new Set);this.options=n,O(this,_e,t),O(this,Pt,null),O(this,Tt,ss()),this.options.experimental_prefetchInRender||C(this,Tt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,G).addObserver(this),ea(C(this,G),this.options)?H(this,ne,Un).call(this):this.updateResult(),H(this,ne,ls).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hs(C(this,G),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hs(C(this,G),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,H(this,ne,us).call(this),H(this,ne,ds).call(this),C(this,G).removeObserver(this)}setOptions(t){const n=this.options,r=C(this,G);if(this.options=C(this,_e).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Fe(this.options.enabled,C(this,G))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");H(this,ne,fs).call(this),C(this,G).setOptions(this.options),n._defaulted&&!Wr(this.options,n)&&C(this,_e).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,G),observer:this});const o=this.hasListeners();o&&ta(C(this,G),r,this.options,n)&&H(this,ne,Un).call(this),this.updateResult(),o&&(C(this,G)!==r||Fe(this.options.enabled,C(this,G))!==Fe(n.enabled,C(this,G))||Dt(this.options.staleTime,C(this,G))!==Dt(n.staleTime,C(this,G)))&&H(this,ne,is).call(this);const s=H(this,ne,as).call(this);o&&(C(this,G)!==r||Fe(this.options.enabled,C(this,G))!==Fe(n.enabled,C(this,G))||s!==C(this,At))&&H(this,ne,cs).call(this,s)}getOptimisticResult(t){const n=C(this,_e).getQueryCache().build(C(this,_e),t),r=this.createResult(n,t);return Lh(this,r)&&(O(this,Ce,r),O(this,_n,this.options),O(this,Kt,C(this,G).state)),r}getCurrentResult(){return C(this,Ce)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),Reflect.get(r,o))})}trackProp(t){C(this,Pn).add(t)}getCurrentQuery(){return C(this,G)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=C(this,_e).defaultQueryOptions(t),r=C(this,_e).getQueryCache().build(C(this,_e),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return H(this,ne,Un).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Ce)))}createResult(t,n){var I;const r=C(this,G),o=this.options,s=C(this,Ce),i=C(this,Kt),a=C(this,_n),u=t!==r?t.state:C(this,Xn),{state:f}=t;let p={...f},m=!1,g;if(n._optimisticResults){const L=this.hasListeners(),B=!L&&ea(t,n),U=L&&ta(t,r,n,o);(B||U)&&(p={...p,...Yc(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:x,errorUpdatedAt:h,status:v}=p;g=p.data;let y=!1;if(n.placeholderData!==void 0&&g===void 0&&v==="pending"){let L;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(L=s.data,y=!0):L=typeof n.placeholderData=="function"?n.placeholderData((I=C(this,Tn))==null?void 0:I.state.data,C(this,Tn)):n.placeholderData,L!==void 0&&(v="success",g=os(s==null?void 0:s.data,L,n),m=!0)}if(n.select&&g!==void 0&&!y)if(s&&g===(i==null?void 0:i.data)&&n.select===C(this,Jn))g=C(this,Rn);else try{O(this,Jn,n.select),g=n.select(g),g=os(s==null?void 0:s.data,g,n),O(this,Rn,g),O(this,Pt,null)}catch(L){O(this,Pt,L)}C(this,Pt)&&(x=C(this,Pt),g=C(this,Rn),h=Date.now(),v="error");const b=p.fetchStatus==="fetching",S=v==="pending",E=v==="error",R=S&&b,T=g!==void 0,D={status:v,fetchStatus:p.fetchStatus,isPending:S,isSuccess:v==="success",isError:E,isInitialLoading:R,isLoading:R,data:g,dataUpdatedAt:p.dataUpdatedAt,error:x,errorUpdatedAt:h,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>u.dataUpdateCount||p.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!S,isLoadingError:E&&!T,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:E&&T,isStale:Vs(t,n),refetch:this.refetch,promise:C(this,Tt)};if(this.options.experimental_prefetchInRender){const L=W=>{D.status==="error"?W.reject(D.error):D.data!==void 0&&W.resolve(D.data)},B=()=>{const W=O(this,Tt,D.promise=ss());L(W)},U=C(this,Tt);switch(U.status){case"pending":t.queryHash===r.queryHash&&L(U);break;case"fulfilled":(D.status==="error"||D.data!==U.value)&&B();break;case"rejected":(D.status!=="error"||D.error!==U.reason)&&B();break}}return D}updateResult(){const t=C(this,Ce),n=this.createResult(C(this,G),this.options);if(O(this,Kt,C(this,G).state),O(this,_n,this.options),C(this,Kt).data!==void 0&&O(this,Tn,C(this,G)),Wr(n,t))return;O(this,Ce,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!C(this,Pn).size)return!0;const i=new Set(s??C(this,Pn));return this.options.throwOnError&&i.add("error"),Object.keys(C(this,Ce)).some(a=>{const c=a;return C(this,Ce)[c]!==t[c]&&i.has(c)})};H(this,ne,Xc).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&H(this,ne,ls).call(this)}},_e=new WeakMap,G=new WeakMap,Xn=new WeakMap,Ce=new WeakMap,Kt=new WeakMap,_n=new WeakMap,Tt=new WeakMap,Pt=new WeakMap,Jn=new WeakMap,Rn=new WeakMap,Tn=new WeakMap,Qt=new WeakMap,Yt=new WeakMap,At=new WeakMap,Pn=new WeakMap,ne=new WeakSet,Un=function(t){H(this,ne,fs).call(this);let n=C(this,G).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(xe)),n},is=function(){H(this,ne,us).call(this);const t=Dt(this.options.staleTime,C(this,G));if(Jt||C(this,Ce).isStale||!ts(t))return;const r=Hc(C(this,Ce).dataUpdatedAt,t)+1;O(this,Qt,setTimeout(()=>{C(this,Ce).isStale||this.updateResult()},r))},as=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,G)):this.options.refetchInterval)??!1},cs=function(t){H(this,ne,ds).call(this),O(this,At,t),!(Jt||Fe(this.options.enabled,C(this,G))===!1||!ts(C(this,At))||C(this,At)===0)&&O(this,Yt,setInterval(()=>{(this.options.refetchIntervalInBackground||Hs.isFocused())&&H(this,ne,Un).call(this)},C(this,At)))},ls=function(){H(this,ne,is).call(this),H(this,ne,cs).call(this,H(this,ne,as).call(this))},us=function(){C(this,Qt)&&(clearTimeout(C(this,Qt)),O(this,Qt,void 0))},ds=function(){C(this,Yt)&&(clearInterval(C(this,Yt)),O(this,Yt,void 0))},fs=function(){const t=C(this,_e).getQueryCache().build(C(this,_e),this.options);if(t===C(this,G))return;const n=C(this,G);O(this,G,t),O(this,Xn,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Xc=function(t){he.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(C(this,Ce))}),C(this,_e).getQueryCache().notify({query:C(this,G),type:"observerResultsUpdated"})})},ac);function Dh(e,t){return Fe(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ea(e,t){return Dh(e,t)||e.state.data!==void 0&&hs(e,t,t.refetchOnMount)}function hs(e,t,n){if(Fe(t.enabled,e)!==!1&&Dt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Vs(e,t)}return!1}function ta(e,t,n,r){return(e!==t||Fe(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Vs(e,n)}function Vs(e,t){return Fe(t.enabled,e)!==!1&&e.isStaleByTime(Dt(t.staleTime,e))}function Lh(e,t){return!Wr(e.getCurrentResult(),t)}var Ot,jt,Re,at,lt,Nr,ps,cc,Mh=(cc=class extends In{constructor(n,r){super();M(this,lt);M(this,Ot);M(this,jt);M(this,Re);M(this,at);O(this,Ot,n),this.setOptions(r),this.bindMethods(),H(this,lt,Nr).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=C(this,Ot).defaultMutationOptions(n),Wr(this.options,r)||C(this,Ot).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,Re),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&en(r.mutationKey)!==en(this.options.mutationKey)?this.reset():((o=C(this,Re))==null?void 0:o.state.status)==="pending"&&C(this,Re).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=C(this,Re))==null||n.removeObserver(this)}onMutationUpdate(n){H(this,lt,Nr).call(this),H(this,lt,ps).call(this,n)}getCurrentResult(){return C(this,jt)}reset(){var n;(n=C(this,Re))==null||n.removeObserver(this),O(this,Re,void 0),H(this,lt,Nr).call(this),H(this,lt,ps).call(this)}mutate(n,r){var o;return O(this,at,r),(o=C(this,Re))==null||o.removeObserver(this),O(this,Re,C(this,Ot).getMutationCache().build(C(this,Ot),this.options)),C(this,Re).addObserver(this),C(this,Re).execute(n)}},Ot=new WeakMap,jt=new WeakMap,Re=new WeakMap,at=new WeakMap,lt=new WeakSet,Nr=function(){var r;const n=((r=C(this,Re))==null?void 0:r.state)??Zc();O(this,jt,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},ps=function(n){he.batch(()=>{var r,o,s,i,a,c,u,f;if(C(this,at)&&this.hasListeners()){const p=C(this,jt).variables,m=C(this,jt).context;(n==null?void 0:n.type)==="success"?((o=(r=C(this,at)).onSuccess)==null||o.call(r,n.data,p,m),(i=(s=C(this,at)).onSettled)==null||i.call(s,n.data,null,p,m)):(n==null?void 0:n.type)==="error"&&((c=(a=C(this,at)).onError)==null||c.call(a,n.error,p,m),(f=(u=C(this,at)).onSettled)==null||f.call(u,void 0,n.error,p,m))}this.listeners.forEach(p=>{p(C(this,jt))})})},cc),Jc=d.createContext(void 0),zs=e=>{const t=d.useContext(Jc);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},kh=({client:e,children:t})=>(d.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(Jc.Provider,{value:e,children:t})),el=d.createContext(!1),$h=()=>d.useContext(el);el.Provider;function Fh(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Bh=d.createContext(Fh()),Uh=()=>d.useContext(Bh),Wh=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Hh=e=>{d.useEffect(()=>{e.clearReset()},[e])},Vh=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||zc(n,[e.error,r])),zh=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},qh=(e,t)=>e.isLoading&&e.isFetching&&!t,Gh=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,na=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Kh(e,t,n){var p,m,g,x,h;if(typeof e!="object"||Array.isArray(e))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=$h(),o=Uh(),s=zs(),i=s.defaultQueryOptions(e);(m=(p=s.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||m.call(p,i),i.queryFn||console.error(`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`),i._optimisticResults=r?"isRestoring":"optimistic",zh(i),Wh(i,o),Hh(o);const a=!s.getQueryCache().get(i.queryHash),[c]=d.useState(()=>new t(s,i)),u=c.getOptimisticResult(i),f=!r&&e.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(v=>{const y=f?c.subscribe(he.batchCalls(v)):xe;return c.updateResult(),y},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),d.useEffect(()=>{c.setOptions(i)},[i,c]),Gh(i,u))throw na(i,c,o);if(Vh({result:u,errorResetBoundary:o,throwOnError:i.throwOnError,query:s.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw u.error;if((x=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||x.call(g,i,u),i.experimental_prefetchInRender&&!Jt&&qh(u,r)){const v=a?na(i,c,o):(h=s.getQueryCache().get(i.queryHash))==null?void 0:h.promise;v==null||v.catch(xe).finally(()=>{c.updateResult()})}return i.notifyOnChangeProps?u:c.trackResult(u)}function ra(e,t){return Kh(e,Nh)}function mr(e,t){const n=zs(),[r]=d.useState(()=>new Mh(n,e));d.useEffect(()=>{r.setOptions(e)},[r,e]);const o=d.useSyncExternalStore(d.useCallback(i=>r.subscribe(he.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=d.useCallback((i,a)=>{r.mutate(i,a).catch(xe)},[r]);if(o.error&&zc(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}let Qh={data:""},Yh=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Qh},Zh=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Xh=/\/\*[^]*?\*\/| +/g,oa=/\n+/g,Ct=(e,t)=>{let n="",r="",o="";for(let s in e){let i=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+i+";":r+=s[1]=="f"?Ct(i,s):s+"{"+Ct(i,s[1]=="k"?"":t)+"}":typeof i=="object"?r+=Ct(i,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,a):a?a+" "+c:c)):s):i!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Ct.p?Ct.p(s,i):s+":"+i+";")}return n+(t&&o?t+"{"+o+"}":o)+r},ot={},tl=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+tl(e[n]);return t}return e},Jh=(e,t,n,r,o)=>{let s=tl(e),i=ot[s]||(ot[s]=(c=>{let u=0,f=11;for(;u<c.length;)f=101*f+c.charCodeAt(u++)>>>0;return"go"+f})(s));if(!ot[i]){let c=s!==e?e:(u=>{let f,p,m=[{}];for(;f=Zh.exec(u.replace(Xh,""));)f[4]?m.shift():f[3]?(p=f[3].replace(oa," ").trim(),m.unshift(m[0][p]=m[0][p]||{})):m[0][f[1]]=f[2].replace(oa," ").trim();return m[0]})(e);ot[i]=Ct(o?{["@keyframes "+i]:c}:c,n?"":"."+i)}let a=n&&ot.g?ot.g:null;return n&&(ot.g=ot[i]),((c,u,f,p)=>{p?u.data=u.data.replace(p,c):u.data.indexOf(c)===-1&&(u.data=f?c+u.data:u.data+c)})(ot[i],t,r,a),i},ep=(e,t,n)=>e.reduce((r,o,s)=>{let i=t[s];if(i&&i.call){let a=i(n),c=a&&a.props&&a.props.className||/^go/.test(a)&&a;i=c?"."+c:a&&typeof a=="object"?a.props?"":Ct(a,""):a===!1?"":a}return r+o+(i??"")},"");function ao(e){let t=this||{},n=e.call?e(t.p):e;return Jh(n.unshift?n.raw?ep(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,Yh(t.target),t.g,t.o,t.k)}let nl,ms,gs;ao.bind({g:1});let ut=ao.bind({k:1});function tp(e,t,n,r){Ct.p=t,nl=e,ms=n,gs=r}function kt(e,t){let n=this||{};return function(){let r=arguments;function o(s,i){let a=Object.assign({},s),c=a.className||o.className;n.p=Object.assign({theme:ms&&ms()},a),n.o=/ *go\d+/.test(c),a.className=ao.apply(n,r)+(c?" "+c:"");let u=e;return e[0]&&(u=a.as||e,delete a.as),gs&&u[0]&&gs(a),nl(u,a)}return o}}var np=e=>typeof e=="function",zr=(e,t)=>np(e)?e(t):e,rp=(()=>{let e=0;return()=>(++e).toString()})(),rl=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),op=20,Dr=new Map,sp=1e3,sa=e=>{if(Dr.has(e))return;let t=setTimeout(()=>{Dr.delete(e),an({type:4,toastId:e})},sp);Dr.set(e,t)},ip=e=>{let t=Dr.get(e);t&&clearTimeout(t)},vs=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,op)};case 1:return t.toast.id&&ip(t.toast.id),{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return e.toasts.find(s=>s.id===n.id)?vs(e,{type:1,toast:n}):vs(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?sa(r):e.toasts.forEach(s=>{sa(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+o}))}}},Lr=[],Mr={toasts:[],pausedAt:void 0},an=e=>{Mr=vs(Mr,e),Lr.forEach(t=>{t(Mr)})},ap={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},cp=(e={})=>{let[t,n]=_.useState(Mr);_.useEffect(()=>(Lr.push(n),()=>{let o=Lr.indexOf(n);o>-1&&Lr.splice(o,1)}),[t]);let r=t.toasts.map(o=>{var s,i;return{...e,...e[o.type],...o,duration:o.duration||((s=e[o.type])==null?void 0:s.duration)||(e==null?void 0:e.duration)||ap[o.type],style:{...e.style,...(i=e[o.type])==null?void 0:i.style,...o.style}}});return{...t,toasts:r}},lp=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||rp()}),sr=e=>(t,n)=>{let r=lp(t,e,n);return an({type:2,toast:r}),r.id},Pe=(e,t)=>sr("blank")(e,t);Pe.error=sr("error");Pe.success=sr("success");Pe.loading=sr("loading");Pe.custom=sr("custom");Pe.dismiss=e=>{an({type:3,toastId:e})};Pe.remove=e=>an({type:4,toastId:e});Pe.promise=(e,t,n)=>{let r=Pe.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(o=>(Pe.success(zr(t.success,o),{id:r,...n,...n==null?void 0:n.success}),o)).catch(o=>{Pe.error(zr(t.error,o),{id:r,...n,...n==null?void 0:n.error})}),e};var up=(e,t)=>{an({type:1,toast:{id:e,height:t}})},dp=()=>{an({type:5,time:Date.now()})},fp=e=>{let{toasts:t,pausedAt:n}=cp(e);_.useEffect(()=>{if(n)return;let s=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let c=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(c<0){a.visible&&Pe.dismiss(a.id);return}return setTimeout(()=>Pe.dismiss(a.id),c)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=_.useCallback(()=>{n&&an({type:6,time:Date.now()})},[n]),o=_.useCallback((s,i)=>{let{reverseOrder:a=!1,gutter:c=8,defaultPosition:u}=i||{},f=t.filter(g=>(g.position||u)===(s.position||u)&&g.height),p=f.findIndex(g=>g.id===s.id),m=f.filter((g,x)=>x<p&&g.visible).length;return f.filter(g=>g.visible).slice(...a?[m+1]:[0,m]).reduce((g,x)=>g+(x.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:up,startPause:dp,endPause:r,calculateOffset:o}}},hp=ut`
|
|
33
33
|
from {
|
|
34
34
|
transform: scale(0) rotate(45deg);
|
|
35
35
|
opacity: 0;
|
|
@@ -37,7 +37,7 @@ from {
|
|
|
37
37
|
to {
|
|
38
38
|
transform: scale(1) rotate(45deg);
|
|
39
39
|
opacity: 1;
|
|
40
|
-
}`,
|
|
40
|
+
}`,pp=ut`
|
|
41
41
|
from {
|
|
42
42
|
transform: scale(0);
|
|
43
43
|
opacity: 0;
|
|
@@ -45,7 +45,7 @@ from {
|
|
|
45
45
|
to {
|
|
46
46
|
transform: scale(1);
|
|
47
47
|
opacity: 1;
|
|
48
|
-
}
|
|
48
|
+
}`,mp=ut`
|
|
49
49
|
from {
|
|
50
50
|
transform: scale(0) rotate(90deg);
|
|
51
51
|
opacity: 0;
|
|
@@ -53,7 +53,7 @@ from {
|
|
|
53
53
|
to {
|
|
54
54
|
transform: scale(1) rotate(90deg);
|
|
55
55
|
opacity: 1;
|
|
56
|
-
}`,
|
|
56
|
+
}`,gp=kt("div")`
|
|
57
57
|
width: 20px;
|
|
58
58
|
opacity: 0;
|
|
59
59
|
height: 20px;
|
|
@@ -62,14 +62,14 @@ to {
|
|
|
62
62
|
position: relative;
|
|
63
63
|
transform: rotate(45deg);
|
|
64
64
|
|
|
65
|
-
animation: ${
|
|
65
|
+
animation: ${hp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
66
66
|
forwards;
|
|
67
67
|
animation-delay: 100ms;
|
|
68
68
|
|
|
69
69
|
&:after,
|
|
70
70
|
&:before {
|
|
71
71
|
content: '';
|
|
72
|
-
animation: ${
|
|
72
|
+
animation: ${pp} 0.15s ease-out forwards;
|
|
73
73
|
animation-delay: 150ms;
|
|
74
74
|
position: absolute;
|
|
75
75
|
border-radius: 3px;
|
|
@@ -82,18 +82,18 @@ to {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
&:before {
|
|
85
|
-
animation: ${
|
|
85
|
+
animation: ${mp} 0.15s ease-out forwards;
|
|
86
86
|
animation-delay: 180ms;
|
|
87
87
|
transform: rotate(90deg);
|
|
88
88
|
}
|
|
89
|
-
`,
|
|
89
|
+
`,vp=ut`
|
|
90
90
|
from {
|
|
91
91
|
transform: rotate(0deg);
|
|
92
92
|
}
|
|
93
93
|
to {
|
|
94
94
|
transform: rotate(360deg);
|
|
95
95
|
}
|
|
96
|
-
`,
|
|
96
|
+
`,yp=kt("div")`
|
|
97
97
|
width: 12px;
|
|
98
98
|
height: 12px;
|
|
99
99
|
box-sizing: border-box;
|
|
@@ -101,8 +101,8 @@ to {
|
|
|
101
101
|
border-radius: 100%;
|
|
102
102
|
border-color: ${e=>e.secondary||"#e0e0e0"};
|
|
103
103
|
border-right-color: ${e=>e.primary||"#616161"};
|
|
104
|
-
animation: ${
|
|
105
|
-
`,
|
|
104
|
+
animation: ${vp} 1s linear infinite;
|
|
105
|
+
`,bp=ut`
|
|
106
106
|
from {
|
|
107
107
|
transform: scale(0) rotate(45deg);
|
|
108
108
|
opacity: 0;
|
|
@@ -110,7 +110,7 @@ from {
|
|
|
110
110
|
to {
|
|
111
111
|
transform: scale(1) rotate(45deg);
|
|
112
112
|
opacity: 1;
|
|
113
|
-
}`,
|
|
113
|
+
}`,wp=ut`
|
|
114
114
|
0% {
|
|
115
115
|
height: 0;
|
|
116
116
|
width: 0;
|
|
@@ -124,7 +124,7 @@ to {
|
|
|
124
124
|
100% {
|
|
125
125
|
opacity: 1;
|
|
126
126
|
height: 10px;
|
|
127
|
-
}`,
|
|
127
|
+
}`,Cp=kt("div")`
|
|
128
128
|
width: 20px;
|
|
129
129
|
opacity: 0;
|
|
130
130
|
height: 20px;
|
|
@@ -133,13 +133,13 @@ to {
|
|
|
133
133
|
position: relative;
|
|
134
134
|
transform: rotate(45deg);
|
|
135
135
|
|
|
136
|
-
animation: ${
|
|
136
|
+
animation: ${bp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
137
137
|
forwards;
|
|
138
138
|
animation-delay: 100ms;
|
|
139
139
|
&:after {
|
|
140
140
|
content: '';
|
|
141
141
|
box-sizing: border-box;
|
|
142
|
-
animation: ${
|
|
142
|
+
animation: ${wp} 0.2s ease-out forwards;
|
|
143
143
|
opacity: 0;
|
|
144
144
|
animation-delay: 200ms;
|
|
145
145
|
position: absolute;
|
|
@@ -151,16 +151,16 @@ to {
|
|
|
151
151
|
height: 10px;
|
|
152
152
|
width: 6px;
|
|
153
153
|
}
|
|
154
|
-
`,
|
|
154
|
+
`,xp=kt("div")`
|
|
155
155
|
position: absolute;
|
|
156
|
-
`,
|
|
156
|
+
`,Sp=kt("div")`
|
|
157
157
|
position: relative;
|
|
158
158
|
display: flex;
|
|
159
159
|
justify-content: center;
|
|
160
160
|
align-items: center;
|
|
161
161
|
min-width: 20px;
|
|
162
162
|
min-height: 20px;
|
|
163
|
-
`,
|
|
163
|
+
`,Ep=ut`
|
|
164
164
|
from {
|
|
165
165
|
transform: scale(0.6);
|
|
166
166
|
opacity: 0.4;
|
|
@@ -168,20 +168,20 @@ from {
|
|
|
168
168
|
to {
|
|
169
169
|
transform: scale(1);
|
|
170
170
|
opacity: 1;
|
|
171
|
-
}`,
|
|
171
|
+
}`,_p=kt("div")`
|
|
172
172
|
position: relative;
|
|
173
173
|
transform: scale(0.6);
|
|
174
174
|
opacity: 0.4;
|
|
175
175
|
min-width: 20px;
|
|
176
|
-
animation: ${
|
|
176
|
+
animation: ${Ep} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
177
177
|
forwards;
|
|
178
|
-
`,
|
|
178
|
+
`,Rp=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?d.createElement(_p,null,t):t:n==="blank"?null:d.createElement(Sp,null,d.createElement(yp,{...r}),n!=="loading"&&d.createElement(xp,null,n==="error"?d.createElement(gp,{...r}):d.createElement(Cp,{...r})))},Tp=e=>`
|
|
179
179
|
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
180
180
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
181
|
-
`,
|
|
181
|
+
`,Pp=e=>`
|
|
182
182
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
183
183
|
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
184
|
-
`,
|
|
184
|
+
`,Ap="0%{opacity:0;} 100%{opacity:1;}",Op="0%{opacity:1;} 100%{opacity:0;}",jp=kt("div")`
|
|
185
185
|
display: flex;
|
|
186
186
|
align-items: center;
|
|
187
187
|
background: #fff;
|
|
@@ -193,24 +193,24 @@ to {
|
|
|
193
193
|
pointer-events: auto;
|
|
194
194
|
padding: 8px 10px;
|
|
195
195
|
border-radius: 8px;
|
|
196
|
-
`,
|
|
196
|
+
`,Ip=kt("div")`
|
|
197
197
|
display: flex;
|
|
198
198
|
justify-content: center;
|
|
199
199
|
margin: 4px 10px;
|
|
200
200
|
color: inherit;
|
|
201
201
|
flex: 1 1 auto;
|
|
202
202
|
white-space: pre-line;
|
|
203
|
-
`,
|
|
203
|
+
`,Np=(e,t)=>{let n=e.includes("top")?1:-1,[r,o]=rl()?[Ap,Op]:[Tp(n),Pp(n)];return{animation:t?`${ut(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${ut(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Dp=d.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?Np(e.position||t||"top-center",e.visible):{opacity:0},s=d.createElement(Rp,{toast:e}),i=d.createElement(Ip,{...e.ariaProps},zr(e.message,e));return d.createElement(jp,{className:e.className,style:{...o,...n,...e.style}},typeof r=="function"?r({icon:s,message:i}):d.createElement(d.Fragment,null,s,i))});tp(d.createElement);var Lp=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let s=d.useCallback(i=>{if(i){let a=()=>{let c=i.getBoundingClientRect().height;r(e,c)};a(),new MutationObserver(a).observe(i,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return d.createElement("div",{ref:s,className:t,style:n},o)},Mp=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:rl()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}},kp=ao`
|
|
204
204
|
z-index: 9999;
|
|
205
205
|
> * {
|
|
206
206
|
pointer-events: auto;
|
|
207
207
|
}
|
|
208
|
-
`,pr=16,ap=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:s,containerClassName:i})=>{let{toasts:a,handlers:c}=Lh(n);return d.createElement("div",{style:{position:"fixed",zIndex:9999,top:pr,left:pr,right:pr,bottom:pr,pointerEvents:"none",...s},className:i,onMouseEnter:c.startPause,onMouseLeave:c.endPause},a.map(u=>{let f=u.position||t,p=c.calculateOffset(u,{reverseOrder:e,gutter:r,defaultPosition:t}),m=sp(f,p);return d.createElement(op,{id:u.id,key:u.id,onHeightUpdate:c.updateHeight,className:u.visible?ip:"",style:m},u.type==="custom"?Wr(u.message,u):o?o(u):d.createElement(rp,{toast:u,position:f}))}))},Yi=Pe;const Ws=()=>({notify:_.useCallback((t,n,r)=>{const o={style:{background:"var(--platform-background-primary-color)",color:"var(--platform-text-primary-color)"}};n==="warning"||n==="info"?Yi(t,{...o,icon:n==="warning"?"⚠️":"ℹ️"}):Yi[n](t,o),r&&console.error(r)},[])});var In=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Jt=typeof window>"u"||"Deno"in globalThis;function xe(){}function cp(e,t){return typeof e=="function"?e(t):e}function os(e){return typeof e=="number"&&e>=0&&e!==1/0}function qc(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Dt(e,t){return typeof e=="function"?e(t):e}function Fe(e,t){return typeof e=="function"?e(t):e}function Zi(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==Hs(i,t.options))return!1}else if(!qn(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function Xi(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(en(t.options.mutationKey)!==en(s))return!1}else if(!qn(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Hs(e,t){return((t==null?void 0:t.queryKeyHashFn)||en)(e)}function en(e){return JSON.stringify(e,(t,n)=>is(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function qn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>qn(e[n],t[n])):!1}function ss(e,t){if(e===t)return e;const n=Ji(e)&&Ji(t);if(n||is(e)&&is(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),i=s.length,a=n?[]:{};let c=0;for(let u=0;u<i;u++){const f=n?u:s[u];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,c++):(a[f]=ss(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&c++)}return o===i&&c===o?e:a}return t}function Hr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ji(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function is(e){if(!ea(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!ea(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ea(e){return Object.prototype.toString.call(e)==="[object Object]"}function lp(e){return new Promise(t=>{setTimeout(t,e)})}function as(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){try{return ss(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return ss(e,t)}return t}function up(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function dp(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Vr=Symbol();function Gc(e,t){return e.queryFn===Vr&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Vr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Kc(e,t){return typeof e=="function"?e(...t):!!e}var Ht,xt,gn,Ja,fp=(Ja=class extends In{constructor(){super();M(this,Ht);M(this,xt);M(this,gn);O(this,gn,t=>{if(!Jt&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,xt)||this.setEventListener(C(this,gn))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,xt))==null||t.call(this),O(this,xt,void 0))}setEventListener(t){var n;O(this,gn,t),(n=C(this,xt))==null||n.call(this),O(this,xt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){C(this,Ht)!==t&&(O(this,Ht,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof C(this,Ht)=="boolean"?C(this,Ht):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ht=new WeakMap,xt=new WeakMap,gn=new WeakMap,Ja),Vs=new fp,vn,St,yn,ec,hp=(ec=class extends In{constructor(){super();M(this,vn,!0);M(this,St);M(this,yn);O(this,yn,t=>{if(!Jt&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,St)||this.setEventListener(C(this,yn))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,St))==null||t.call(this),O(this,St,void 0))}setEventListener(t){var n;O(this,yn,t),(n=C(this,St))==null||n.call(this),O(this,St,t(this.setOnline.bind(this)))}setOnline(t){C(this,vn)!==t&&(O(this,vn,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return C(this,vn)}},vn=new WeakMap,St=new WeakMap,yn=new WeakMap,ec),zr=new hp;function cs(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function pp(e){return Math.min(1e3*2**e,3e4)}function Qc(e){return(e??"online")==="online"?zr.isOnline():!0}var Yc=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function No(e){return e instanceof Yc}function Zc(e){let t=!1,n=0,r=!1,o;const s=cs(),i=h=>{var v;r||(m(new Yc(h)),(v=e.abort)==null||v.call(e))},a=()=>{t=!0},c=()=>{t=!1},u=()=>Vs.isFocused()&&(e.networkMode==="always"||zr.isOnline())&&e.canRun(),f=()=>Qc(e.networkMode)&&e.canRun(),p=h=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,h),o==null||o(),s.resolve(h))},m=h=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,h),o==null||o(),s.reject(h))},g=()=>new Promise(h=>{var v;o=y=>{(r||u())&&h(y)},(v=e.onPause)==null||v.call(e)}).then(()=>{var h;o=void 0,r||(h=e.onContinue)==null||h.call(e)}),x=()=>{if(r)return;let h;const v=n===0?e.initialPromise:void 0;try{h=v??e.fn()}catch(y){h=Promise.reject(y)}Promise.resolve(h).then(p).catch(y=>{var T;if(r)return;const w=e.retry??(Jt?0:3),S=e.retryDelay??pp,E=typeof S=="function"?S(n,y):S,R=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,y);if(t||!R){m(y);return}n++,(T=e.onFail)==null||T.call(e,n,y),lp(E).then(()=>u()?void 0:g()).then(()=>{t?m(y):x()})})};return{promise:s,cancel:i,continue:()=>(o==null||o(),s),cancelRetry:a,continueRetry:c,canStart:f,start:()=>(f()?x():g().then(x),s)}}var mp=e=>setTimeout(e,0);function gp(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=mp;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||i()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var he=gp(),Vt,tc,Xc=(tc=class{constructor(){M(this,Vt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),os(this.gcTime)&&O(this,Vt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Jt?1/0:5*60*1e3))}clearGcTimeout(){C(this,Vt)&&(clearTimeout(C(this,Vt)),O(this,Vt,void 0))}},Vt=new WeakMap,tc),bn,wn,Ne,zt,me,Yn,qt,ke,st,nc,vp=(nc=class extends Xc{constructor(t){super();M(this,ke);M(this,bn);M(this,wn);M(this,Ne);M(this,zt);M(this,me);M(this,Yn);M(this,qt);O(this,qt,!1),O(this,Yn,t.defaultOptions),this.setOptions(t.options),this.observers=[],O(this,zt,t.client),O(this,Ne,C(this,zt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,O(this,bn,yp(this.options)),this.state=t.state??C(this,bn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,me))==null?void 0:t.promise}setOptions(t){this.options={...C(this,Yn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,Ne).remove(this)}setData(t,n){const r=as(this.state.data,t,this.options);return H(this,ke,st).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){H(this,ke,st).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=C(this,me))==null?void 0:r.promise;return(o=C(this,me))==null||o.cancel(t),n?n.then(xe).catch(xe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,bn))}isActive(){return this.observers.some(t=>Fe(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Dt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!qc(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,me))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,me))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,Ne).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(C(this,me)&&(C(this,qt)?C(this,me).cancel({revert:!0}):C(this,me).cancelRetry()),this.scheduleGc()),C(this,Ne).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||H(this,ke,st).call(this,{type:"invalidate"})}fetch(t,n){var u,f,p;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,me))return C(this,me).continueRetry(),C(this,me).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(g=>g.options.queryFn);m&&this.setOptions(m.options)}Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");const r=new AbortController,o=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(O(this,qt,!0),r.signal)})},s=()=>{const m=Gc(this.options,n),x=(()=>{const h={client:C(this,zt),queryKey:this.queryKey,meta:this.meta};return o(h),h})();return O(this,qt,!1),this.options.persister?this.options.persister(m,x,this):m(x)},a=(()=>{const m={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:C(this,zt),state:this.state,fetchFn:s};return o(m),m})();(u=this.options.behavior)==null||u.onFetch(a,this),O(this,wn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=a.fetchOptions)==null?void 0:f.meta))&&H(this,ke,st).call(this,{type:"fetch",meta:(p=a.fetchOptions)==null?void 0:p.meta});const c=m=>{var g,x,h,v;No(m)&&m.silent||H(this,ke,st).call(this,{type:"error",error:m}),No(m)||((x=(g=C(this,Ne).config).onError)==null||x.call(g,m,this),(v=(h=C(this,Ne).config).onSettled)==null||v.call(h,this.state.data,m,this)),this.scheduleGc()};return O(this,me,Zc({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:m=>{var g,x,h,v;if(m===void 0){console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(y){c(y);return}(x=(g=C(this,Ne).config).onSuccess)==null||x.call(g,m,this),(v=(h=C(this,Ne).config).onSettled)==null||v.call(h,m,this.state.error,this),this.scheduleGc()},onError:c,onFail:(m,g)=>{H(this,ke,st).call(this,{type:"failed",failureCount:m,error:g})},onPause:()=>{H(this,ke,st).call(this,{type:"pause"})},onContinue:()=>{H(this,ke,st).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),C(this,me).start()}},bn=new WeakMap,wn=new WeakMap,Ne=new WeakMap,zt=new WeakMap,me=new WeakMap,Yn=new WeakMap,qt=new WeakMap,ke=new WeakSet,st=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Jc(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return No(o)&&o.revert&&C(this,wn)?{...C(this,wn),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),he.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,Ne).notify({query:this,type:"updated",action:t})})},nc);function Jc(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Qc(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function yp(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ge,rc,bp=(rc=class extends In{constructor(t={}){super();M(this,Ge);this.config=t,O(this,Ge,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Hs(o,n);let i=this.get(s);return i||(i=new vp({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){C(this,Ge).has(t.queryHash)||(C(this,Ge).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=C(this,Ge).get(t.queryHash);n&&(t.destroy(),n===t&&C(this,Ge).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){he.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,Ge).get(t)}getAll(){return[...C(this,Ge).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Zi(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Zi(t,r)):n}notify(t){he.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){he.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){he.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ge=new WeakMap,rc),Ke,we,Gt,Qe,yt,oc,wp=(oc=class extends Xc{constructor(t){super();M(this,Qe);M(this,Ke);M(this,we);M(this,Gt);this.mutationId=t.mutationId,O(this,we,t.mutationCache),O(this,Ke,[]),this.state=t.state||el(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Ke).includes(t)||(C(this,Ke).push(t),this.clearGcTimeout(),C(this,we).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){O(this,Ke,C(this,Ke).filter(n=>n!==t)),this.scheduleGc(),C(this,we).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Ke).length||(this.state.status==="pending"?this.scheduleGc():C(this,we).remove(this))}continue(){var t;return((t=C(this,Gt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,a,c,u,f,p,m,g,x,h,v,y,w,S,E,R,T,P,D;const n=()=>{H(this,Qe,yt).call(this,{type:"continue"})};O(this,Gt,Zc({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(I,L)=>{H(this,Qe,yt).call(this,{type:"failed",failureCount:I,error:L})},onPause:()=>{H(this,Qe,yt).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,we).canRun(this)}));const r=this.state.status==="pending",o=!C(this,Gt).canStart();try{if(r)n();else{H(this,Qe,yt).call(this,{type:"pending",variables:t,isPaused:o}),await((i=(s=C(this,we).config).onMutate)==null?void 0:i.call(s,t,this));const L=await((c=(a=this.options).onMutate)==null?void 0:c.call(a,t));L!==this.state.context&&H(this,Qe,yt).call(this,{type:"pending",context:L,variables:t,isPaused:o})}const I=await C(this,Gt).start();return await((f=(u=C(this,we).config).onSuccess)==null?void 0:f.call(u,I,t,this.state.context,this)),await((m=(p=this.options).onSuccess)==null?void 0:m.call(p,I,t,this.state.context)),await((x=(g=C(this,we).config).onSettled)==null?void 0:x.call(g,I,null,this.state.variables,this.state.context,this)),await((v=(h=this.options).onSettled)==null?void 0:v.call(h,I,null,t,this.state.context)),H(this,Qe,yt).call(this,{type:"success",data:I}),I}catch(I){try{throw await((w=(y=C(this,we).config).onError)==null?void 0:w.call(y,I,t,this.state.context,this)),await((E=(S=this.options).onError)==null?void 0:E.call(S,I,t,this.state.context)),await((T=(R=C(this,we).config).onSettled)==null?void 0:T.call(R,void 0,I,this.state.variables,this.state.context,this)),await((D=(P=this.options).onSettled)==null?void 0:D.call(P,void 0,I,t,this.state.context)),I}finally{H(this,Qe,yt).call(this,{type:"error",error:I})}}finally{C(this,we).runNext(this)}}},Ke=new WeakMap,we=new WeakMap,Gt=new WeakMap,Qe=new WeakSet,yt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),he.batch(()=>{C(this,Ke).forEach(r=>{r.onMutationUpdate(t)}),C(this,we).notify({mutation:this,type:"updated",action:t})})},oc);function el(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var it,$e,Zn,sc,Cp=(sc=class extends In{constructor(t={}){super();M(this,it);M(this,$e);M(this,Zn);this.config=t,O(this,it,new Set),O(this,$e,new Map),O(this,Zn,0)}build(t,n,r){const o=new wp({mutationCache:this,mutationId:++dr(this,Zn)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){C(this,it).add(t);const n=mr(t);if(typeof n=="string"){const r=C(this,$e).get(n);r?r.push(t):C(this,$e).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,it).delete(t)){const n=mr(t);if(typeof n=="string"){const r=C(this,$e).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&C(this,$e).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=mr(t);if(typeof n=="string"){const r=C(this,$e).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=mr(t);if(typeof n=="string"){const o=(r=C(this,$e).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){he.batch(()=>{C(this,it).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,it).clear(),C(this,$e).clear()})}getAll(){return Array.from(C(this,it))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Xi(n,r))}findAll(t={}){return this.getAll().filter(n=>Xi(t,n))}notify(t){he.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return he.batch(()=>Promise.all(t.map(n=>n.continue().catch(xe))))}},it=new WeakMap,$e=new WeakMap,Zn=new WeakMap,sc);function mr(e){var t;return(t=e.options.scope)==null?void 0:t.id}function ta(e){return{onFetch:(t,n)=>{var f,p,m,g,x;const r=t.options,o=(m=(p=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,s=((g=t.state.data)==null?void 0:g.pages)||[],i=((x=t.state.data)==null?void 0:x.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const u=async()=>{let h=!1;const v=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},y=Gc(t.options,t.fetchOptions),w=async(S,E,R)=>{if(h)return Promise.reject();if(E==null&&S.pages.length)return Promise.resolve(S);const P=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:E,direction:R?"backward":"forward",meta:t.options.meta};return v(B),B})(),D=await y(P),{maxPages:I}=t.options,L=R?dp:up;return{pages:L(S.pages,D,I),pageParams:L(S.pageParams,E,I)}};if(o&&s.length){const S=o==="backward",E=S?xp:na,R={pages:s,pageParams:i},T=E(r,R);a=await w(R,T,S)}else{const S=e??s.length;do{const E=c===0?i[0]??r.initialPageParam:na(r,a);if(c>0&&E==null)break;a=await w(a,E),c++}while(c<S)}return a};t.options.persister?t.fetchFn=()=>{var h,v;return(v=(h=t.options).persister)==null?void 0:v.call(h,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function na(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function xp(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var le,Et,_t,Cn,xn,Rt,Sn,En,ic,Sp=(ic=class{constructor(e={}){M(this,le);M(this,Et);M(this,_t);M(this,Cn);M(this,xn);M(this,Rt);M(this,Sn);M(this,En);O(this,le,e.queryCache||new bp),O(this,Et,e.mutationCache||new Cp),O(this,_t,e.defaultOptions||{}),O(this,Cn,new Map),O(this,xn,new Map),O(this,Rt,0)}mount(){dr(this,Rt)._++,C(this,Rt)===1&&(O(this,Sn,Vs.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,le).onFocus())})),O(this,En,zr.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,le).onOnline())})))}unmount(){var e,t;dr(this,Rt)._--,C(this,Rt)===0&&((e=C(this,Sn))==null||e.call(this),O(this,Sn,void 0),(t=C(this,En))==null||t.call(this),O(this,En,void 0))}isFetching(e){return C(this,le).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Et).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,le).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=C(this,le).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Dt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return C(this,le).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=C(this,le).get(r.queryHash),s=o==null?void 0:o.state.data,i=cp(t,s);if(i!==void 0)return C(this,le).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return he.batch(()=>C(this,le).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,le).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=C(this,le);he.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=C(this,le);return he.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=he.batch(()=>C(this,le).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(xe).catch(xe)}invalidateQueries(e,t={}){return he.batch(()=>(C(this,le).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=he.batch(()=>C(this,le).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(xe)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(xe)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=C(this,le).build(this,t);return n.isStaleByTime(Dt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(xe).catch(xe)}fetchInfiniteQuery(e){return e.behavior=ta(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(xe).catch(xe)}ensureInfiniteQueryData(e){return e.behavior=ta(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return zr.isOnline()?C(this,Et).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,le)}getMutationCache(){return C(this,Et)}getDefaultOptions(){return C(this,_t)}setDefaultOptions(e){O(this,_t,e)}setQueryDefaults(e,t){C(this,Cn).set(en(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,Cn).values()],n={};return t.forEach(r=>{qn(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){C(this,xn).set(en(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,xn).values()],n={};return t.forEach(r=>{qn(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,_t).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Hs(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Vr&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,_t).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,le).clear(),C(this,Et).clear()}},le=new WeakMap,Et=new WeakMap,_t=new WeakMap,Cn=new WeakMap,xn=new WeakMap,Rt=new WeakMap,Sn=new WeakMap,En=new WeakMap,ic),_e,G,Xn,Ce,Kt,_n,Tt,Pt,Jn,Rn,Tn,Qt,Yt,At,Pn,ne,Un,ls,us,ds,fs,hs,ps,ms,tl,ac,Ep=(ac=class extends In{constructor(t,n){super();M(this,ne);M(this,_e);M(this,G);M(this,Xn);M(this,Ce);M(this,Kt);M(this,_n);M(this,Tt);M(this,Pt);M(this,Jn);M(this,Rn);M(this,Tn);M(this,Qt);M(this,Yt);M(this,At);M(this,Pn,new Set);this.options=n,O(this,_e,t),O(this,Pt,null),O(this,Tt,cs()),this.options.experimental_prefetchInRender||C(this,Tt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,G).addObserver(this),ra(C(this,G),this.options)?H(this,ne,Un).call(this):this.updateResult(),H(this,ne,fs).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return gs(C(this,G),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gs(C(this,G),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,H(this,ne,hs).call(this),H(this,ne,ps).call(this),C(this,G).removeObserver(this)}setOptions(t){const n=this.options,r=C(this,G);if(this.options=C(this,_e).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Fe(this.options.enabled,C(this,G))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");H(this,ne,ms).call(this),C(this,G).setOptions(this.options),n._defaulted&&!Hr(this.options,n)&&C(this,_e).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,G),observer:this});const o=this.hasListeners();o&&oa(C(this,G),r,this.options,n)&&H(this,ne,Un).call(this),this.updateResult(),o&&(C(this,G)!==r||Fe(this.options.enabled,C(this,G))!==Fe(n.enabled,C(this,G))||Dt(this.options.staleTime,C(this,G))!==Dt(n.staleTime,C(this,G)))&&H(this,ne,ls).call(this);const s=H(this,ne,us).call(this);o&&(C(this,G)!==r||Fe(this.options.enabled,C(this,G))!==Fe(n.enabled,C(this,G))||s!==C(this,At))&&H(this,ne,ds).call(this,s)}getOptimisticResult(t){const n=C(this,_e).getQueryCache().build(C(this,_e),t),r=this.createResult(n,t);return Rp(this,r)&&(O(this,Ce,r),O(this,_n,this.options),O(this,Kt,C(this,G).state)),r}getCurrentResult(){return C(this,Ce)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),Reflect.get(r,o))})}trackProp(t){C(this,Pn).add(t)}getCurrentQuery(){return C(this,G)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=C(this,_e).defaultQueryOptions(t),r=C(this,_e).getQueryCache().build(C(this,_e),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return H(this,ne,Un).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Ce)))}createResult(t,n){var I;const r=C(this,G),o=this.options,s=C(this,Ce),i=C(this,Kt),a=C(this,_n),u=t!==r?t.state:C(this,Xn),{state:f}=t;let p={...f},m=!1,g;if(n._optimisticResults){const L=this.hasListeners(),B=!L&&ra(t,n),U=L&&oa(t,r,n,o);(B||U)&&(p={...p,...Jc(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:x,errorUpdatedAt:h,status:v}=p;g=p.data;let y=!1;if(n.placeholderData!==void 0&&g===void 0&&v==="pending"){let L;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(L=s.data,y=!0):L=typeof n.placeholderData=="function"?n.placeholderData((I=C(this,Tn))==null?void 0:I.state.data,C(this,Tn)):n.placeholderData,L!==void 0&&(v="success",g=as(s==null?void 0:s.data,L,n),m=!0)}if(n.select&&g!==void 0&&!y)if(s&&g===(i==null?void 0:i.data)&&n.select===C(this,Jn))g=C(this,Rn);else try{O(this,Jn,n.select),g=n.select(g),g=as(s==null?void 0:s.data,g,n),O(this,Rn,g),O(this,Pt,null)}catch(L){O(this,Pt,L)}C(this,Pt)&&(x=C(this,Pt),g=C(this,Rn),h=Date.now(),v="error");const w=p.fetchStatus==="fetching",S=v==="pending",E=v==="error",R=S&&w,T=g!==void 0,D={status:v,fetchStatus:p.fetchStatus,isPending:S,isSuccess:v==="success",isError:E,isInitialLoading:R,isLoading:R,data:g,dataUpdatedAt:p.dataUpdatedAt,error:x,errorUpdatedAt:h,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>u.dataUpdateCount||p.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!S,isLoadingError:E&&!T,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:E&&T,isStale:zs(t,n),refetch:this.refetch,promise:C(this,Tt)};if(this.options.experimental_prefetchInRender){const L=W=>{D.status==="error"?W.reject(D.error):D.data!==void 0&&W.resolve(D.data)},B=()=>{const W=O(this,Tt,D.promise=cs());L(W)},U=C(this,Tt);switch(U.status){case"pending":t.queryHash===r.queryHash&&L(U);break;case"fulfilled":(D.status==="error"||D.data!==U.value)&&B();break;case"rejected":(D.status!=="error"||D.error!==U.reason)&&B();break}}return D}updateResult(){const t=C(this,Ce),n=this.createResult(C(this,G),this.options);if(O(this,Kt,C(this,G).state),O(this,_n,this.options),C(this,Kt).data!==void 0&&O(this,Tn,C(this,G)),Hr(n,t))return;O(this,Ce,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!C(this,Pn).size)return!0;const i=new Set(s??C(this,Pn));return this.options.throwOnError&&i.add("error"),Object.keys(C(this,Ce)).some(a=>{const c=a;return C(this,Ce)[c]!==t[c]&&i.has(c)})};H(this,ne,tl).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&H(this,ne,fs).call(this)}},_e=new WeakMap,G=new WeakMap,Xn=new WeakMap,Ce=new WeakMap,Kt=new WeakMap,_n=new WeakMap,Tt=new WeakMap,Pt=new WeakMap,Jn=new WeakMap,Rn=new WeakMap,Tn=new WeakMap,Qt=new WeakMap,Yt=new WeakMap,At=new WeakMap,Pn=new WeakMap,ne=new WeakSet,Un=function(t){H(this,ne,ms).call(this);let n=C(this,G).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(xe)),n},ls=function(){H(this,ne,hs).call(this);const t=Dt(this.options.staleTime,C(this,G));if(Jt||C(this,Ce).isStale||!os(t))return;const r=qc(C(this,Ce).dataUpdatedAt,t)+1;O(this,Qt,setTimeout(()=>{C(this,Ce).isStale||this.updateResult()},r))},us=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,G)):this.options.refetchInterval)??!1},ds=function(t){H(this,ne,ps).call(this),O(this,At,t),!(Jt||Fe(this.options.enabled,C(this,G))===!1||!os(C(this,At))||C(this,At)===0)&&O(this,Yt,setInterval(()=>{(this.options.refetchIntervalInBackground||Vs.isFocused())&&H(this,ne,Un).call(this)},C(this,At)))},fs=function(){H(this,ne,ls).call(this),H(this,ne,ds).call(this,H(this,ne,us).call(this))},hs=function(){C(this,Qt)&&(clearTimeout(C(this,Qt)),O(this,Qt,void 0))},ps=function(){C(this,Yt)&&(clearInterval(C(this,Yt)),O(this,Yt,void 0))},ms=function(){const t=C(this,_e).getQueryCache().build(C(this,_e),this.options);if(t===C(this,G))return;const n=C(this,G);O(this,G,t),O(this,Xn,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},tl=function(t){he.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(C(this,Ce))}),C(this,_e).getQueryCache().notify({query:C(this,G),type:"observerResultsUpdated"})})},ac);function _p(e,t){return Fe(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ra(e,t){return _p(e,t)||e.state.data!==void 0&&gs(e,t,t.refetchOnMount)}function gs(e,t,n){if(Fe(t.enabled,e)!==!1&&Dt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&zs(e,t)}return!1}function oa(e,t,n,r){return(e!==t||Fe(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&zs(e,n)}function zs(e,t){return Fe(t.enabled,e)!==!1&&e.isStaleByTime(Dt(t.staleTime,e))}function Rp(e,t){return!Hr(e.getCurrentResult(),t)}var Ot,jt,Re,at,lt,Mr,vs,cc,Tp=(cc=class extends In{constructor(n,r){super();M(this,lt);M(this,Ot);M(this,jt);M(this,Re);M(this,at);O(this,Ot,n),this.setOptions(r),this.bindMethods(),H(this,lt,Mr).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=C(this,Ot).defaultMutationOptions(n),Hr(this.options,r)||C(this,Ot).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,Re),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&en(r.mutationKey)!==en(this.options.mutationKey)?this.reset():((o=C(this,Re))==null?void 0:o.state.status)==="pending"&&C(this,Re).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=C(this,Re))==null||n.removeObserver(this)}onMutationUpdate(n){H(this,lt,Mr).call(this),H(this,lt,vs).call(this,n)}getCurrentResult(){return C(this,jt)}reset(){var n;(n=C(this,Re))==null||n.removeObserver(this),O(this,Re,void 0),H(this,lt,Mr).call(this),H(this,lt,vs).call(this)}mutate(n,r){var o;return O(this,at,r),(o=C(this,Re))==null||o.removeObserver(this),O(this,Re,C(this,Ot).getMutationCache().build(C(this,Ot),this.options)),C(this,Re).addObserver(this),C(this,Re).execute(n)}},Ot=new WeakMap,jt=new WeakMap,Re=new WeakMap,at=new WeakMap,lt=new WeakSet,Mr=function(){var r;const n=((r=C(this,Re))==null?void 0:r.state)??el();O(this,jt,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},vs=function(n){he.batch(()=>{var r,o,s,i,a,c,u,f;if(C(this,at)&&this.hasListeners()){const p=C(this,jt).variables,m=C(this,jt).context;(n==null?void 0:n.type)==="success"?((o=(r=C(this,at)).onSuccess)==null||o.call(r,n.data,p,m),(i=(s=C(this,at)).onSettled)==null||i.call(s,n.data,null,p,m)):(n==null?void 0:n.type)==="error"&&((c=(a=C(this,at)).onError)==null||c.call(a,n.error,p,m),(f=(u=C(this,at)).onSettled)==null||f.call(u,void 0,n.error,p,m))}this.listeners.forEach(p=>{p(C(this,jt))})})},cc),nl=d.createContext(void 0),qs=e=>{const t=d.useContext(nl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Pp=({client:e,children:t})=>(d.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(nl.Provider,{value:e,children:t})),rl=d.createContext(!1),Ap=()=>d.useContext(rl);rl.Provider;function Op(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var jp=d.createContext(Op()),Ip=()=>d.useContext(jp),Np=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Dp=e=>{d.useEffect(()=>{e.clearReset()},[e])},Lp=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Kc(n,[e.error,r])),Mp=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},kp=(e,t)=>e.isLoading&&e.isFetching&&!t,$p=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,sa=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Fp(e,t,n){var p,m,g,x,h;if(typeof e!="object"||Array.isArray(e))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Ap(),o=Ip(),s=qs(),i=s.defaultQueryOptions(e);(m=(p=s.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||m.call(p,i),i.queryFn||console.error(`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`),i._optimisticResults=r?"isRestoring":"optimistic",Mp(i),Np(i,o),Dp(o);const a=!s.getQueryCache().get(i.queryHash),[c]=d.useState(()=>new t(s,i)),u=c.getOptimisticResult(i),f=!r&&e.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(v=>{const y=f?c.subscribe(he.batchCalls(v)):xe;return c.updateResult(),y},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),d.useEffect(()=>{c.setOptions(i)},[i,c]),$p(i,u))throw sa(i,c,o);if(Lp({result:u,errorResetBoundary:o,throwOnError:i.throwOnError,query:s.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw u.error;if((x=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||x.call(g,i,u),i.experimental_prefetchInRender&&!Jt&&kp(u,r)){const v=a?sa(i,c,o):(h=s.getQueryCache().get(i.queryHash))==null?void 0:h.promise;v==null||v.catch(xe).finally(()=>{c.updateResult()})}return i.notifyOnChangeProps?u:c.trackResult(u)}function ia(e,t){return Fp(e,Ep)}function gr(e,t){const n=qs(),[r]=d.useState(()=>new Tp(n,e));d.useEffect(()=>{r.setOptions(e)},[r,e]);const o=d.useSyncExternalStore(d.useCallback(i=>r.subscribe(he.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=d.useCallback((i,a)=>{r.mutate(i,a).catch(xe)},[r]);if(o.error&&Kc(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const vr={STALE_TIME:1e3*60*5,GC_TIME:1e3*60*10,RETRY_COUNT:1,RETRY_DELAY:1e3},aa={refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:vr.STALE_TIME,gcTime:vr.GC_TIME,retry:vr.RETRY_COUNT,retryDelay:vr.RETRY_DELAY,enable:!0},yr=e=>e instanceof Error?e.message:String(e),ol=(e,t,n)=>{const r=qs(),{notify:o}=Ws(),{createFn:s,readFn:i,readByIdFn:a,updateFn:c,deleteFn:u,partialUpdateFn:f}=n,p=()=>{r.invalidateQueries({queryKey:[e]})},m=(E,R,T,P)=>o(P!=null&&P.overrideSuccessMessage?P==null?void 0:P.overrideSuccessMessage(E,R):T,"success"),g=(E,R,T,P)=>o(P!=null&&P.overrideErrorMessage?P==null?void 0:P.overrideErrorMessage(E,R):T,"error");return{useCreate:E=>gr({mutationFn:R=>s(R),onSuccess:R=>{p(),m(t,R,`${t} created successfully`,E)},onError:R=>{g(t,R,`Error creating ${t}: ${yr(R)}`,E)}}),useReadQuery:E=>ia({queryKey:[e],queryFn:i,...aa,...E}),useReadByIdQuery:(E,R)=>ia({queryKey:[e,E],queryFn:()=>a(E),...aa,enabled:!!E,...R}),useUpdate:E=>gr({mutationFn:({id:R,data:T})=>c(R,T),onSuccess:R=>{p(),m(t,R,`${t} updated successfully`,E)},onError:R=>{g(t,R,`Error updating ${t}: ${yr(R)}`,E)}}),usePartialUpdate:E=>f&&gr({mutationFn:({id:R,data:T})=>f(R,T),onSuccess:R=>{p(),m(t,R,`${t} updated successfully`,E)},onError:R=>{g(t,R,`Error updating ${t}: ${yr(R)}`,E)}}),useDelete:E=>gr({mutationFn:R=>u(R),onSuccess:()=>{p(),m(t,null,`${t} deleted successfully`,E)},onError:R=>{g(t,R,`Error deleting ${t}: ${yr(R)}`,E)}}),invalidateQueries:p}},Bp=(e,t)=>ol(e,t,{createFn:n=>fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(r=>r.json()),deleteFn:n=>fetch(`${e}/${n}`,{method:"DELETE"}).then(r=>{if(!r.ok)throw new Error(`Error deleting: ${r.status}`)}),readByIdFn:n=>fetch(`${e}/${n}`).then(r=>r.json()),readFn:()=>fetch(e).then(n=>n.json()),updateFn:(n,r)=>fetch(`${e}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(o=>o.json()),partialUpdateFn:(n,r)=>fetch(`${e}/${n}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(o=>o.json())}),Up={SINGLE_TENANT:"single-tenant"},Wp={COOKIE:"cookie"},Do="tenant",ca="tenant",la="tenant",Hp=Up.SINGLE_TENANT,Vp=Wp.COOKIE,zp={mode:Hp,clientSideMode:Vp,tenantIDPProvisioningStrategy:"none"};class qp{setTenant(t,n){const r=new URL(window.location.href);r.searchParams.set(ca,t.name),window.location.href=r.toString()}getCurrentTenantName(){const t=new URL(window.location.href);return new URLSearchParams(t.search).get(ca)}}class Gp{setTenant(t,n){sessionStorage.setItem(la,t.name),window.location.reload()}getCurrentTenantName(){return sessionStorage.getItem(la)}}/*! js-cookie v3.0.5 | MIT */function br(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Kp={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ys(e,t){function n(o,s,i){if(!(typeof document>"u")){i=br({},t,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in i)i[c]&&(a+="; "+c,i[c]!==!0&&(a+="="+i[c].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+a}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],i={},a=0;a<s.length;a++){var c=s[a].split("="),u=c.slice(1).join("=");try{var f=decodeURIComponent(c[0]);if(i[f]=e.read(u,f),o===f)break}catch{}}return o?i[o]:i}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",br({},s,{expires:-1}))},withAttributes:function(o){return ys(this.converter,br({},this.attributes,o))},withConverter:function(o){return ys(br({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Lo=ys(Kp,{path:"/"});class Qp{setTenant(t,n){t?Lo.set(Do,t.name):Lo.remove(Do),window.location.reload()}getCurrentTenantName(){return Lo.get(Do)}}class Yp{extractSubdomain(t){if(t==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(t))return"";const n=t.split(".");if(n.length<2||n.length===2||n[0]==="www"&&n.length===3)return"";const o=(n[0]==="www"?n.slice(1):n).slice(0,-2);return o.length>0?o.join("."):""}getBaseDomain(t){const n=t.split(".");return t==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(t)||n.length<=2?t:n.slice(-2).join(".")}setTenant(t,n){var u;const r=(u=n.urlPatterns)==null?void 0:u.find(f=>f.patternType==="subdomain"&&f.tenantId===t.id&&f.isActive);if(!r)throw new Error(`No active subdomain pattern found for tenant '${t.name}'`);const o=new URL(window.location.href),s=r.patternValue,i=o.hostname,a=this.getBaseDomain(i),c=s?`${s}.${a}`:a;o.hostname=c,window.location.href=o.toString()}getCurrentTenantName(){const t=window.location.hostname;return this.extractSubdomain(t)||null}}const ua={queryParams:new qp,sessionStorage:new Gp,cookie:new Qp,subdomain:new Yp},Zp=e=>{const t=ua[e.clientSideMode];if(!t)throw new Error(`Client side tenant mode '${e.clientSideMode}' is not supported ${JSON.stringify({strategies:ua},null,2)}`);return t},Xp=(e,t,n)=>{const r=t.find(s=>s.name===n);if(!r)throw Error("No tenant permission");return Zp(e).setTenant(r,e),r},Jp=()=>{const[e,t]=er(),{tenants:n=[],currentTenant:r,tenantConfig:o=zp}=e,s=_.useCallback(i=>{const a=Xp(o,n,i);t({...e,currentTenant:a})},[o,e]);return{tenants:n,currentTenant:r,tenantConfig:o,selectTenant:s}};function e1(e){if(!e.ok)throw console.error(e),new Error(e.statusText)}async function wr(e,t,n,r){const o=await e(`/user-states/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,r);return e1(o),o}class Cr{static async get(t,n,r){const s=await wr(t,n,r,{method:"GET",headers:{"Content-Type":"application/json"}});return s.status===204?null:await s.json()}static async create(t,n,r,o){const s={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:o})};return await(await wr(t,n,r,s)).json()}static async update(t,n,r,o){const s={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:o})};return await(await wr(t,n,r,s)).json()}static async delete(t,n,r){return await wr(t,n,r,{method:"DELETE",headers:{"Content-Type":"application/json"}}),null}}const t1=e=>{const t=Us("@bluealba/pae-nestjs-gateway-service"),n=Ac();if(!n)throw new Error("You must call the useUserState hook within a PAE application.");const[r,o]=_.useState(null),[s,i]=_.useState(!1),[a,c]=_.useState(!1),[u,f]=_.useState(null),p=(w,S)=>_.useCallback(async({newValue:E,shouldThrowError:R}={})=>{try{c(!0),f(null);const T=await w(t,n,e,E);return o(T),T?T.value:null}catch(T){if(f(T==null?void 0:T.message),console.error(`Failed to ${S} ${e}:`,T),R)throw T;return null}finally{c(!1)}},[t,n,e]),m=p(Cr.get,"fetch"),g=p(Cr.create,"create"),x=p(Cr.update,"update"),h=p(Cr.delete,"delete"),v=_.useCallback(async()=>{try{await m()}finally{i(!0)}},[m]);_.useEffect(()=>{v()},[v]);const y=_.useCallback(async(w,S=!1)=>r==null?await g({newValue:w,shouldThrowError:S}):await x({newValue:w,shouldThrowError:S}),[r,g,x]);return{value:r?r.value:null,hasFetched:s,loading:a,error:u,setValue:y,createValue:g,updateValue:x,deleteValue:h}},sl="__PAE_EXTENSION_POINT_REACT_CONTENT_EMPTY__",n1=({module:e,point:t,children:n})=>(Nc(e,t,n??sl),null),il=({name:e,children:t,...n})=>{const r=Ic(e);if(r===sl)return null;if(!r)return l.jsx(l.Fragment,{children:t??null});if(r1(r)){const o=r;return l.jsx(o,{...n})}else return r},r1=e=>typeof e=="function",o1=(e,t)=>{const n=r=>(t=t||e.displayName||e.name||"?",l.jsx(il,{name:t,...r,children:l.jsx(e,{...r})}));return n.displayName=`extensionPoint(${t})`,n},da="single-spa:app-change";function s1(){const[e,t]=_.useState(fa());return _.useEffect(()=>{const n=()=>{t(fa())};return window.addEventListener(da,n),()=>{window.removeEventListener(da,n)}},[]),e}function fa(){return jr.getAppNames().reduce((t,n)=>(jr.getAppStatus(n)?t[n]=jr.getAppStatus(n):t[n]="NOT_LOADED",t),{})}function i1(e){const n=s1()[e]??"LOAD_ERROR";return{statusName:n,isLoading:n==="LOADING_SOURCE_CODE"||n==="BOOTSTRAPPING"||n==="MOUNTING",isMounted:n==="MOUNTED",isBroken:n==="SKIP_BECAUSE_BROKEN"||n==="LOAD_ERROR"}}const al=({appName:e})=>l.jsx("div",{children:l.jsxs("p",{children:["Loading ",e,"..."]})});al.displayName="BaseLoading";const cl=({appName:e})=>l.jsxs("div",{children:[l.jsx("p",{children:"Something went wrong..."}),l.jsxs("p",{children:["Failed to load ",e]})]});cl.displayName="BaseError";const a1={display:"flex",flexDirection:"column",flex:1},ll=_.forwardRef((e,t)=>l.jsx("div",{ref:t,style:a1,...e}));ll.displayName="BaseContainer";const c1="pae-app:",ul=_.forwardRef(({appName:e,LoadingComponent:t=al,ErrorComponent:n=cl,ContainerComponent:r=ll,...o},s)=>{const i=i1(e);return l.jsxs(r,{ref:s,...o,id:`${c1}${e}`,children:[i.isLoading&&l.jsx(t,{appName:e}),i.isBroken&&l.jsx(n,{appName:e})]})});ul.displayName="ModulePlaceHolder";const Gs=({operations:e,children:t,forbiddenContent:n})=>{var o;const{hasAccess:r}=rr();if(!r(...e)){if(!n)return null;if(typeof n=="function")if((o=n==null?void 0:n.prototype)!=null&&o.isReactComponent){const s=n;return l.jsx(s,{operations:e})}else return n({operations:e});return _.isValidElement(n)?n:null}return t};Gs.displayName="Authorized";const l1=({eventName:e,listener:t})=>(Dc(e,t),null),u1=()=>l.jsx("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:l.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",d:"M8.737 8.737a21.49 21.49 0 0 1 3.308-2.724m0 0c3.063-2.026 5.99-2.641 7.331-1.3 1.827 1.828.026 6.591-4.023 10.64-4.049 4.049-8.812 5.85-10.64 4.023-1.33-1.33-.736-4.218 1.249-7.253m6.083-6.11c-3.063-2.026-5.99-2.641-7.331-1.3-1.827 1.828-.026 6.591 4.023 10.64m3.308-9.34a21.497 21.497 0 0 1 3.308 2.724m2.775 3.386c1.985 3.035 2.579 5.923 1.248 7.253-1.336 1.337-4.245.732-7.295-1.275M14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})}),dl=({applicationName:e})=>{const t=Tc(e);if(t)if(typeof t=="function"){const n=t;return l.jsx(n,{})}else return t;return l.jsx(u1,{})};dl.displayName="ApplicationIcon";const fl=()=>l.jsx("svg",{width:"28",height:"28",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M15.9998 29.3337C8.63584 29.3337 2.6665 23.3643 2.6665 16.0003C2.6665 8.63633 8.63584 2.66699 15.9998 2.66699C23.3638 2.66699 29.3332 8.63633 29.3332 16.0003C29.3332 23.3643 23.3638 29.3337 15.9998 29.3337ZM15.9998 26.667C18.8288 26.667 21.5419 25.5432 23.5423 23.5428C25.5427 21.5424 26.6665 18.8293 26.6665 16.0003C26.6665 13.1713 25.5427 10.4582 23.5423 8.45785C21.5419 6.45747 18.8288 5.33366 15.9998 5.33366C13.1709 5.33366 10.4578 6.45747 8.45736 8.45785C6.45698 10.4582 5.33317 13.1713 5.33317 16.0003C5.33317 18.8293 6.45698 21.5424 8.45736 23.5428C10.4578 25.5432 13.1709 26.667 15.9998 26.667ZM9.33317 20.427C12.2066 20.2205 14.9088 18.9833 16.9425 16.943C18.9828 14.9092 20.2201 12.2071 20.4265 9.33366C21.4117 9.99003 22.2389 10.8569 22.8486 11.8716C23.4582 12.8864 23.835 14.0239 23.9519 15.2019C24.0687 16.3799 23.9226 17.5692 23.5242 18.684C23.1257 19.7987 22.4849 20.8112 21.6478 21.6483C20.8107 22.4853 19.7982 23.1262 18.6835 23.5247C17.5687 23.9231 16.3795 24.0692 15.2014 23.9523C14.0234 23.8355 12.8859 23.4587 11.8712 22.8491C10.8564 22.2394 9.98954 21.4122 9.33317 20.427Z",fill:"currentColor"})});fl.displayName="DarkModeIcon";const hl=()=>l.jsx("svg",{width:"28",height:"28",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",transform:"matrix(-1,1.2246467991473532e-16,-1.2246467991473532e-16,-1,0,0)",children:l.jsx("path",{d:"M15.9998 29.3337C8.63584 29.3337 2.6665 23.3643 2.6665 16.0003C2.6665 8.63633 8.63584 2.66699 15.9998 2.66699C23.3638 2.66699 29.3332 8.63633 29.3332 16.0003C29.3332 23.3643 23.3638 29.3337 15.9998 29.3337ZM15.9998 26.667C18.8288 26.667 21.5419 25.5432 23.5423 23.5428C25.5427 21.5424 26.6665 18.8293 26.6665 16.0003C26.6665 13.1713 25.5427 10.4582 23.5423 8.45785C21.5419 6.45747 18.8288 5.33366 15.9998 5.33366C13.1709 5.33366 10.4578 6.45747 8.45736 8.45785C6.45698 10.4582 5.33317 13.1713 5.33317 16.0003C5.33317 18.8293 6.45698 21.5424 8.45736 23.5428C10.4578 25.5432 13.1709 26.667 15.9998 26.667ZM9.33317 20.427C12.2066 20.2205 14.9088 18.9833 16.9425 16.943C18.9828 14.9092 20.2201 12.2071 20.4265 9.33366C21.4117 9.99003 22.2389 10.8569 22.8486 11.8716C23.4582 12.8864 23.835 14.0239 23.9519 15.2019C24.0687 16.3799 23.9226 17.5692 23.5242 18.684C23.1257 19.7987 22.4849 20.8112 21.6478 21.6483C20.8107 22.4853 19.7982 23.1262 18.6835 23.5247C17.5687 23.9231 16.3795 24.0692 15.2014 23.9523C14.0234 23.8355 12.8859 23.4587 11.8712 22.8491C10.8564 22.2394 9.98954 21.4122 9.33317 20.427Z",fill:"currentColor"})});hl.displayName="LightModeIcon";const d1="container__zBqbk",f1="expanded__EbsIr",h1="label__cdMnm",Mo={container:d1,expanded:f1,label:h1};function pl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=pl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function N(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=pl(e))&&(r&&(r+=" "),r+=t);return r}const p1=e=>e.toLowerCase().trim().split(" ").join("-"),m1=e=>`${p1(e)}-theme`,ml=()=>{const{platformName:e="Platform"}=Ms(),t=m1(e),[n,r]=_.useState(()=>{const s=localStorage.getItem(t);return s==="light"||s==="dark"?s:"light"}),o=s=>{localStorage.setItem(t,s),r(s)};return _.useEffect(()=>{document.documentElement.setAttribute("data-theme",n)},[n]),{theme:n,setTheme:o}},g1="spinner__fakUN",v1="spinner-rotation__wUmPV",y1="button__8FA9H",b1="button--contained-primary__stkTx",w1="button--outlined-primary__KZ1ww",C1="button--text-primary__GLTfm",x1="button--contained-danger__L9ehT",S1="button--outlined-danger__eoYLd",E1="button--text-danger__Sw-ha",_1="icon__--umH",xr={spinner:g1,"spinner-rotation":"spinner-rotation__wUmPV",spinnerRotation:v1,button:y1,"button--contained-primary":"button--contained-primary__stkTx",buttonContainedPrimary:b1,"button--outlined-primary":"button--outlined-primary__KZ1ww",buttonOutlinedPrimary:w1,"button--text-primary":"button--text-primary__GLTfm",buttonTextPrimary:C1,"button--contained-danger":"button--contained-danger__L9ehT",buttonContainedDanger:x1,"button--outlined-danger":"button--outlined-danger__eoYLd",buttonOutlinedDanger:S1,"button--text-danger":"button--text-danger__Sw-ha",buttonTextDanger:E1,icon:_1},qr=_.forwardRef(({variant:e="contained",colorScheme:t="primary",loading:n=!1,IconComponent:r,className:o,children:s,...i},a)=>{const c=N(xr.button,xr[`button--${e}-${t}`],o);return l.jsxs("button",{ref:a,className:c,...i,children:[n?l.jsx("div",{className:xr.spinner}):r&&l.jsx(r,{className:xr.icon}),s]})});qr.displayName="Button";const R1="Badges__5jpum",T1="Badges__5jpum",P1="Badge__95MWM",A1="Badge__95MWM",O1="Badge--primary__Rx-bS",j1="Badge--secondary__d92bT",I1="Badge--success__Kdo98",N1="Badge--warning__bf-Nn",D1="Badge--danger__HTj39",L1="Badge--small__y93Pj",M1="Badge--regular__aT5AL",k1="Badge--large__wORCH",kr={Badges:R1,badges:T1,Badge:P1,badge:A1,"Badge--primary":"Badge--primary__Rx-bS",badgePrimary:O1,"Badge--secondary":"Badge--secondary__d92bT",badgeSecondary:j1,"Badge--success":"Badge--success__Kdo98",badgeSuccess:I1,"Badge--warning":"Badge--warning__bf-Nn",badgeWarning:N1,"Badge--danger":"Badge--danger__HTj39",badgeDanger:D1,"Badge--small":"Badge--small__y93Pj",badgeSmall:L1,"Badge--regular":"Badge--regular__aT5AL",badgeRegular:M1,"Badge--large":"Badge--large__wORCH",badgeLarge:k1},bs={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(const e in bs)Object.freeze(bs[e]);const ha=Object.freeze(bs);var pa={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function $1(e){var f,p;var t,n=[],r=1,o;if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(e=String(e).toLowerCase(),ha[e])n=ha[e].slice(),o="rgb";else if(e==="transparent")r=0,o="rgb",n=[0,0,0];else if(e[0]==="#"){var s=e.slice(1),i=s.length,a=i<=4;r=1,a?(n=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],i===4&&(r=parseInt(s[3]+s[3],16)/255)):(n=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],i===8&&(r=parseInt(s[6]+s[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),o="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var c=t[1];o=c.replace(/a$/,"");var u=o==="cmyk"?4:o==="gray"?1:3;n=t[2].trim().split(/\s*[,\/]\s*|\s+/),o==="color"&&(o=n.shift()),n=n.map(function(m,g){if(m[m.length-1]==="%")return m=parseFloat(m)/100,g===3?m:o==="rgb"?m*255:o[0]==="h"||o[0]==="l"&&!g?m*100:o==="lab"?m*125:o==="lch"?g<2?m*150:m*360:o[0]==="o"&&!g?m:o==="oklab"?m*.4:o==="oklch"?g<2?m*.4:m*360:m;if(o[g]==="h"||g===2&&o[o.length-1]==="h"){if(pa[m]!==void 0)return pa[m];if(m.endsWith("deg"))return parseFloat(m);if(m.endsWith("turn"))return parseFloat(m)*360;if(m.endsWith("grad"))return parseFloat(m)*360/400;if(m.endsWith("rad"))return parseFloat(m)*180/Math.PI}return m==="none"?0:parseFloat(m)}),r=n.length>u?n.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(n=e.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),o=((p=(f=e.match(/([a-z])/ig))==null?void 0:f.join(""))==null?void 0:p.toLowerCase())||"rgb");return{space:o,values:n,alpha:r}}const F1=(e,t)=>{const{space:n,values:r}=$1(e);return n[0]==="h"?`${n}a(${r[0]}, ${r[1]}%, ${r[2]}%, ${t})`:`${n}a(${r}, ${t})`},Ks=_.forwardRef(({children:e,color:t,className:n,customColor:r,size:o="small",style:s,...i},a)=>{const c=r?{color:r,background:F1(r,.1)}:{},u=N(kr.Badge,kr[`Badge--${o}`],{[kr[`Badge--${t}`]]:!!t},n);return l.jsx("span",{ref:a,className:u,style:{...s,...c},...i,children:e})});Ks.displayName="Badge";const Qs=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(kr.Badges,t);return l.jsx("div",{ref:r,className:o,...n,children:e})});Qs.displayName="Badges";const gl=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:r,style:o,...s})=>l.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r,style:o,...s,children:[l.jsx("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}),l.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"})]}),vl=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:r,style:o,...s})=>l.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r,style:o,...s,children:[l.jsx("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}),l.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}),l.jsx("path",{d:"m9 12 2 2 4-4"})]}),B1="CopyToClipboardButton__2Nd2m",U1={CopyToClipboardButton:B1},W1=({content:e})=>{const[t,n]=H1(),{notify:r}=Ws(),o=t?vl:gl,s=_.useCallback(async()=>{await n(e)&&r("Copied to the Clipboard !","success")},[e,r]);return l.jsx(o,{className:U1.CopyToClipboardButton,size:18,onClick:s})},H1=()=>{const[e,t]=_.useState(!1);return[e,async r=>{var o;try{return await((o=navigator==null?void 0:navigator.clipboard)==null?void 0:o.writeText(r)),t(!0),setTimeout(()=>t(!1),2e3),!0}catch(s){return console.error("Failed to copy text: ",s),!1}}]},V1="FieldGroup__Q2JCV",z1="FieldGroup__Q2JCV",q1="FieldGroup--horizontal__kpfL1",G1="FieldGroup--vertical__FLo-Q",ma={FieldGroup:V1,fieldGroup:z1,"FieldGroup--horizontal":"FieldGroup--horizontal__kpfL1",fieldGroupHorizontal:q1,"FieldGroup--vertical":"FieldGroup--vertical__FLo-Q",fieldGroupVertical:G1},yl=_.forwardRef(({children:e,className:t,orientation:n="vertical",...r},o)=>{const s=N(ma.FieldGroup,ma[`FieldGroup--${n}`],t);return l.jsx("div",{ref:o,className:s,...r,children:e})});yl.displayName="FieldGroup";const K1="Input__uS0sb",ga={Input:K1,Error:"Error__-DQpw"},co=_.forwardRef(({className:e,error:t,...n},r)=>{const o=N(ga.Input,t&&ga.Error,e);return l.jsx("input",{ref:r,className:o,...n})});co.displayName="Input";const Q1={Error:"Error__N4OP5"},bl=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(Q1.Error,t);return l.jsx("span",{ref:r,className:o,...n,children:e})});bl.displayName="InputError";const Y1="Label__VYUvW",va={Label:Y1,Error:"Error__Eu6DI"},wl=_.forwardRef(({children:e,className:t,error:n,...r},o)=>{const s=N(va.Label,n&&va.Error,t);return l.jsx("label",{ref:o,className:s,...r,children:e})});wl.displayName="Label";const Z1="Select__giqpe",X1="Chevron__YvhBd",ws={Select:Z1,Chevron:X1},Cl=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(ws.Option,t);return l.jsx("option",{ref:r,className:o,...n,children:e})});Cl.displayName="Option";const Ys=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(ws.Select,t);return l.jsxs("div",{className:o,children:[l.jsx("select",{ref:r,...n,children:e}),l.jsx("div",{className:ws.Chevron,children:l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M4 6L8 10L12 6",stroke:"#818181",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});Ys.displayName="Select";Ys.Option=Cl;function ya(e,[t,n]){return Math.min(n,Math.max(t,e))}function X(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function J1(e,t){const n=d.createContext(t),r=s=>{const{children:i,...a}=s,c=d.useMemo(()=>a,Object.values(a));return l.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=d.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function ir(e,t=[]){let n=[];function r(s,i){const a=d.createContext(i),c=n.length;n=[...n,i];const u=p=>{var y;const{scope:m,children:g,...x}=p,h=((y=m==null?void 0:m[e])==null?void 0:y[c])||a,v=d.useMemo(()=>x,Object.values(x));return l.jsx(h.Provider,{value:v,children:g})};u.displayName=s+"Provider";function f(p,m){var h;const g=((h=m==null?void 0:m[e])==null?void 0:h[c])||a,x=d.useContext(g);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(i=>d.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,em(o,...t)]}function em(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:c,scopeName:u})=>{const p=c(s)[`__scope${u}`];return{...a,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function ba(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ba(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():ba(e[o],null)}}}}function ce(...e){return d.useCallback(Nn(...e),e)}function wa(e){const t=tm(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),c=a.find(rm);if(c){const u=c.props.children,f=a.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function tm(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=sm(o),a=om(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Nn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nm=Symbol("radix.slottable");function rm(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nm}function om(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function sm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function im(e){const t=e+"CollectionProvider",[n,r]=ir(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:v,children:y}=h,w=_.useRef(null),S=_.useRef(new Map).current;return l.jsx(o,{scope:v,itemMap:S,collectionRef:w,children:y})};i.displayName=t;const a=e+"CollectionSlot",c=wa(a),u=_.forwardRef((h,v)=>{const{scope:y,children:w}=h,S=s(a,y),E=ce(v,S.collectionRef);return l.jsx(c,{ref:E,children:w})});u.displayName=a;const f=e+"CollectionItemSlot",p="data-radix-collection-item",m=wa(f),g=_.forwardRef((h,v)=>{const{scope:y,children:w,...S}=h,E=_.useRef(null),R=ce(v,E),T=s(f,y);return _.useEffect(()=>(T.itemMap.set(E,{ref:E,...S}),()=>void T.itemMap.delete(E))),l.jsx(m,{[p]:"",ref:R,children:w})});g.displayName=f;function x(h){const v=s(e+"CollectionConsumer",h);return _.useCallback(()=>{const w=v.collectionRef.current;if(!w)return[];const S=Array.from(w.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((T,P)=>S.indexOf(T.ref.current)-S.indexOf(P.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:g},x,r]}var am=d.createContext(void 0);function cm(e){const t=d.useContext(am);return e||t||"ltr"}function lm(e){const t=um(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),c=a.find(fm);if(c){const u=c.props.children,f=a.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function um(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=pm(o),a=hm(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Nn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dm=Symbol("radix.slottable");function fm(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dm}function hm(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function pm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=mm.reduce((e,t)=>{const n=lm(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function gm(e,t){e&&ro.flushSync(()=>e.dispatchEvent(t))}function tn(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function vm(e,t=globalThis==null?void 0:globalThis.document){const n=tn(e);d.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ym="DismissableLayer",Cs="dismissableLayer.update",bm="dismissableLayer.pointerDownOutside",wm="dismissableLayer.focusOutside",Ca,xl=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lo=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,u=d.useContext(xl),[f,p]=d.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=d.useState({}),x=ce(t,P=>p(P)),h=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(v),w=f?h.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,E=w>=y,R=Sm(P=>{const D=P.target,I=[...u.branches].some(L=>L.contains(D));!E||I||(o==null||o(P),i==null||i(P),P.defaultPrevented||a==null||a())},m),T=Em(P=>{const D=P.target;[...u.branches].some(L=>L.contains(D))||(s==null||s(P),i==null||i(P),P.defaultPrevented||a==null||a())},m);return vm(P=>{w===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&a&&(P.preventDefault(),a()))},m),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ca=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),xa(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ca)}},[f,m,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),xa())},[f,u]),d.useEffect(()=>{const P=()=>g({});return document.addEventListener(Cs,P),()=>document.removeEventListener(Cs,P)},[]),l.jsx(ie.div,{...c,ref:x,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,T.onFocusCapture),onBlurCapture:X(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,R.onPointerDownCapture)})});lo.displayName=ym;var Cm="DismissableLayerBranch",xm=d.forwardRef((e,t)=>{const n=d.useContext(xl),r=d.useRef(null),o=ce(t,r);return d.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),l.jsx(ie.div,{...e,ref:o})});xm.displayName=Cm;function Sm(e,t=globalThis==null?void 0:globalThis.document){const n=tn(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){Sl(bm,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Em(e,t=globalThis==null?void 0:globalThis.document){const n=tn(e),r=d.useRef(!1);return d.useEffect(()=>{const o=s=>{s.target&&!r.current&&Sl(wm,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function xa(){const e=new CustomEvent(Cs);document.dispatchEvent(e)}function Sl(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?gm(o,s):o.dispatchEvent(s)}var ko=0;function El(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Sa()),document.body.insertAdjacentElement("beforeend",e[1]??Sa()),ko++,()=>{ko===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ko--}},[])}function Sa(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var $o="focusScope.autoFocusOnMount",Fo="focusScope.autoFocusOnUnmount",Ea={bubbles:!1,cancelable:!0},_m="FocusScope",Zs=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=d.useState(null),u=tn(o),f=tn(s),p=d.useRef(null),m=ce(t,h=>c(h)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let h=function(S){if(g.paused||!a)return;const E=S.target;a.contains(E)?p.current=E:bt(p.current,{select:!0})},v=function(S){if(g.paused||!a)return;const E=S.relatedTarget;E!==null&&(a.contains(E)||bt(p.current,{select:!0}))},y=function(S){if(document.activeElement===document.body)for(const R of S)R.removedNodes.length>0&&bt(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",v);const w=new MutationObserver(y);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",v),w.disconnect()}}},[r,a,g.paused]),d.useEffect(()=>{if(a){Ra.add(g);const h=document.activeElement;if(!a.contains(h)){const y=new CustomEvent($o,Ea);a.addEventListener($o,u),a.dispatchEvent(y),y.defaultPrevented||(Rm(jm(_l(a)),{select:!0}),document.activeElement===h&&bt(a))}return()=>{a.removeEventListener($o,u),setTimeout(()=>{const y=new CustomEvent(Fo,Ea);a.addEventListener(Fo,f),a.dispatchEvent(y),y.defaultPrevented||bt(h??document.body,{select:!0}),a.removeEventListener(Fo,f),Ra.remove(g)},0)}}},[a,u,f,g]);const x=d.useCallback(h=>{if(!n&&!r||g.paused)return;const v=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(v&&y){const w=h.currentTarget,[S,E]=Tm(w);S&&E?!h.shiftKey&&y===E?(h.preventDefault(),n&&bt(S,{select:!0})):h.shiftKey&&y===S&&(h.preventDefault(),n&&bt(E,{select:!0})):y===w&&h.preventDefault()}},[n,r,g.paused]);return l.jsx(ie.div,{tabIndex:-1,...i,ref:m,onKeyDown:x})});Zs.displayName=_m;function Rm(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(bt(r,{select:t}),document.activeElement!==n)return}function Tm(e){const t=_l(e),n=_a(t,e),r=_a(t.reverse(),e);return[n,r]}function _l(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _a(e,t){for(const n of e)if(!Pm(n,{upTo:t}))return n}function Pm(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Am(e){return e instanceof HTMLInputElement&&"select"in e}function bt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Am(e)&&t&&e.select()}}var Ra=Om();function Om(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ta(e,t),e.unshift(t)},remove(t){var n;e=Ta(e,t),(n=e[0])==null||n.resume()}}}function Ta(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jm(e){return e.filter(t=>t.tagName!=="A")}var ve=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Im=d[" useId ".trim().toString()]||(()=>{}),Nm=0;function Zt(e){const[t,n]=d.useState(Im());return ve(()=>{n(r=>r??String(Nm++))},[e]),e||(t?`radix-${t}`:"")}const Dm=["top","right","bottom","left"],Lt=Math.min,Te=Math.max,Gr=Math.round,Sr=Math.floor,Je=e=>({x:e,y:e}),Lm={left:"right",right:"left",bottom:"top",top:"bottom"},Mm={start:"end",end:"start"};function xs(e,t,n){return Te(e,Lt(t,n))}function dt(e,t){return typeof e=="function"?e(t):e}function ft(e){return e.split("-")[0]}function Dn(e){return e.split("-")[1]}function Xs(e){return e==="x"?"y":"x"}function Js(e){return e==="y"?"height":"width"}const km=new Set(["top","bottom"]);function Xe(e){return km.has(ft(e))?"y":"x"}function ei(e){return Xs(Xe(e))}function $m(e,t,n){n===void 0&&(n=!1);const r=Dn(e),o=ei(e),s=Js(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Kr(i)),[i,Kr(i)]}function Fm(e){const t=Kr(e);return[Ss(e),t,Ss(t)]}function Ss(e){return e.replace(/start|end/g,t=>Mm[t])}const Pa=["left","right"],Aa=["right","left"],Bm=["top","bottom"],Um=["bottom","top"];function Wm(e,t,n){switch(e){case"top":case"bottom":return n?t?Aa:Pa:t?Pa:Aa;case"left":case"right":return t?Bm:Um;default:return[]}}function Hm(e,t,n,r){const o=Dn(e);let s=Wm(ft(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ss)))),s}function Kr(e){return e.replace(/left|right|bottom|top/g,t=>Lm[t])}function Vm(e){return{top:0,right:0,bottom:0,left:0,...e}}function Rl(e){return typeof e!="number"?Vm(e):{top:e,right:e,bottom:e,left:e}}function Qr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Oa(e,t,n){let{reference:r,floating:o}=e;const s=Xe(t),i=ei(t),a=Js(i),c=ft(t),u=s==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let g;switch(c){case"top":g={x:f,y:r.y-o.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-o.width,y:p};break;default:g={x:r.x,y:r.y}}switch(Dn(t)){case"start":g[i]-=m*(n&&u?-1:1);break;case"end":g[i]+=m*(n&&u?-1:1);break}return g}async function zm(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=dt(t,e),x=Rl(g),v=a[m?p==="floating"?"reference":"floating":p],y=Qr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:c})),w=p==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},R=Qr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:S,strategy:c}):w);return{top:(y.top-R.top+x.top)/E.y,bottom:(R.bottom-y.bottom+x.bottom)/E.y,left:(y.left-R.left+x.left)/E.x,right:(R.right-y.right+x.right)/E.x}}const qm=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Oa(u,r,c),m=r,g={},x=0;for(let v=0;v<a.length;v++){var h;const{name:y,fn:w}=a[v],{x:S,y:E,data:R,reset:T}=await w({x:f,y:p,initialPlacement:r,placement:m,strategy:o,middlewareData:g,rects:u,platform:{...i,detectOverflow:(h=i.detectOverflow)!=null?h:zm},elements:{reference:e,floating:t}});f=S??f,p=E??p,g={...g,[y]:{...g[y],...R}},T&&x<=50&&(x++,typeof T=="object"&&(T.placement&&(m=T.placement),T.rects&&(u=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:f,y:p}=Oa(u,m,c)),v=-1)}return{x:f,y:p,placement:m,strategy:o,middlewareData:g}},Gm=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:f=0}=dt(e,t)||{};if(u==null)return{};const p=Rl(f),m={x:n,y:r},g=ei(o),x=Js(g),h=await i.getDimensions(u),v=g==="y",y=v?"top":"left",w=v?"bottom":"right",S=v?"clientHeight":"clientWidth",E=s.reference[x]+s.reference[g]-m[g]-s.floating[x],R=m[g]-s.reference[g],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let P=T?T[S]:0;(!P||!await(i.isElement==null?void 0:i.isElement(T)))&&(P=a.floating[S]||s.floating[x]);const D=E/2-R/2,I=P/2-h[x]/2-1,L=Lt(p[y],I),B=Lt(p[w],I),U=L,W=P-h[x]-B,V=P/2-h[x]/2+D,re=xs(U,V,W),z=!c.arrow&&Dn(o)!=null&&V!==re&&s.reference[x]/2-(V<U?L:B)-h[x]/2<0,Q=z?V<U?V-U:V-W:0;return{[g]:m[g]+Q,data:{[g]:re,centerOffset:V-re-Q,...z&&{alignmentOffset:Q}},reset:z}}}),Km=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...v}=dt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=ft(o),w=Xe(a),S=ft(a)===a,E=await(c.isRTL==null?void 0:c.isRTL(u.floating)),R=m||(S||!h?[Kr(a)]:Fm(a)),T=x!=="none";!m&&T&&R.push(...Hm(a,h,x,E));const P=[a,...R],D=await c.detectOverflow(t,v),I=[];let L=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&I.push(D[y]),p){const V=$m(o,i,E);I.push(D[V[0]],D[V[1]])}if(L=[...L,{placement:o,overflows:I}],!I.every(V=>V<=0)){var B,U;const V=(((B=s.flip)==null?void 0:B.index)||0)+1,re=P[V];if(re&&(!(p==="alignment"?w!==Xe(re):!1)||L.every($=>Xe($.placement)===w?$.overflows[0]>0:!0)))return{data:{index:V,overflows:L},reset:{placement:re}};let z=(U=L.filter(Q=>Q.overflows[0]<=0).sort((Q,$)=>Q.overflows[1]-$.overflows[1])[0])==null?void 0:U.placement;if(!z)switch(g){case"bestFit":{var W;const Q=(W=L.filter($=>{if(T){const oe=Xe($.placement);return oe===w||oe==="y"}return!0}).map($=>[$.placement,$.overflows.filter(oe=>oe>0).reduce((oe,pe)=>oe+pe,0)]).sort(($,oe)=>$[1]-oe[1])[0])==null?void 0:W[0];Q&&(z=Q);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}};function ja(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ia(e){return Dm.some(t=>e[t]>=0)}const Qm=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=dt(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=ja(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Ia(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=ja(i,n.floating);return{data:{escapedOffsets:a,escaped:Ia(a)}}}default:return{}}}}},Tl=new Set(["left","top"]);async function Ym(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=ft(n),a=Dn(n),c=Xe(n)==="y",u=Tl.has(i)?-1:1,f=s&&c?-1:1,p=dt(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof x=="number"&&(g=a==="end"?x*-1:x),c?{x:g*f,y:m*u}:{x:m*u,y:g*f}}const Zm=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await Ym(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},Xm=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:y=>{let{x:w,y:S}=y;return{x:w,y:S}}},...u}=dt(e,t),f={x:n,y:r},p=await s.detectOverflow(t,u),m=Xe(ft(o)),g=Xs(m);let x=f[g],h=f[m];if(i){const y=g==="y"?"top":"left",w=g==="y"?"bottom":"right",S=x+p[y],E=x-p[w];x=xs(S,x,E)}if(a){const y=m==="y"?"top":"left",w=m==="y"?"bottom":"right",S=h+p[y],E=h-p[w];h=xs(S,h,E)}const v=c.fn({...t,[g]:x,[m]:h});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[g]:i,[m]:a}}}}}},Jm=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=dt(e,t),f={x:n,y:r},p=Xe(o),m=Xs(p);let g=f[m],x=f[p];const h=dt(a,t),v=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const S=m==="y"?"height":"width",E=s.reference[m]-s.floating[S]+v.mainAxis,R=s.reference[m]+s.reference[S]-v.mainAxis;g<E?g=E:g>R&&(g=R)}if(u){var y,w;const S=m==="y"?"width":"height",E=Tl.has(ft(o)),R=s.reference[p]-s.floating[S]+(E&&((y=i.offset)==null?void 0:y[p])||0)+(E?0:v.crossAxis),T=s.reference[p]+s.reference[S]+(E?0:((w=i.offset)==null?void 0:w[p])||0)-(E?v.crossAxis:0);x<R?x=R:x>T&&(x=T)}return{[m]:g,[p]:x}}}},eg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...u}=dt(e,t),f=await i.detectOverflow(t,u),p=ft(o),m=Dn(o),g=Xe(o)==="y",{width:x,height:h}=s.floating;let v,y;p==="top"||p==="bottom"?(v=p,y=m===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=p,v=m==="end"?"top":"bottom");const w=h-f.top-f.bottom,S=x-f.left-f.right,E=Lt(h-f[v],w),R=Lt(x-f[y],S),T=!t.middlewareData.shift;let P=E,D=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=w),T&&!m){const L=Te(f.left,0),B=Te(f.right,0),U=Te(f.top,0),W=Te(f.bottom,0);g?D=x-2*(L!==0||B!==0?L+B:Te(f.left,f.right)):P=h-2*(U!==0||W!==0?U+W:Te(f.top,f.bottom))}await c({...t,availableWidth:D,availableHeight:P});const I=await i.getDimensions(a.floating);return x!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function uo(){return typeof window<"u"}function Ln(e){return Pl(e)?(e.nodeName||"").toLowerCase():"#document"}function Ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tt(e){var t;return(t=(Pl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pl(e){return uo()?e instanceof Node||e instanceof Ae(e).Node:!1}function Ue(e){return uo()?e instanceof Element||e instanceof Ae(e).Element:!1}function et(e){return uo()?e instanceof HTMLElement||e instanceof Ae(e).HTMLElement:!1}function Na(e){return!uo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ae(e).ShadowRoot}const tg=new Set(["inline","contents"]);function ar(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=We(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!tg.has(o)}const ng=new Set(["table","td","th"]);function rg(e){return ng.has(Ln(e))}const og=[":popover-open",":modal"];function fo(e){return og.some(t=>{try{return e.matches(t)}catch{return!1}})}const sg=["transform","translate","scale","rotate","perspective"],ig=["transform","translate","scale","rotate","perspective","filter"],ag=["paint","layout","strict","content"];function ti(e){const t=ni(),n=Ue(e)?We(e):e;return sg.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ig.some(r=>(n.willChange||"").includes(r))||ag.some(r=>(n.contain||"").includes(r))}function cg(e){let t=Mt(e);for(;et(t)&&!An(t);){if(ti(t))return t;if(fo(t))return null;t=Mt(t)}return null}function ni(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lg=new Set(["html","body","#document"]);function An(e){return lg.has(Ln(e))}function We(e){return Ae(e).getComputedStyle(e)}function ho(e){return Ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mt(e){if(Ln(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Na(e)&&e.host||tt(e);return Na(t)?t.host:t}function Al(e){const t=Mt(e);return An(t)?e.ownerDocument?e.ownerDocument.body:e.body:et(t)&&ar(t)?t:Al(t)}function Gn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Al(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Ae(o);if(s){const a=Es(i);return t.concat(i,i.visualViewport||[],ar(o)?o:[],a&&n?Gn(a):[])}return t.concat(o,Gn(o,[],n))}function Es(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ol(e){const t=We(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=et(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Gr(n)!==s||Gr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ri(e){return Ue(e)?e:e.contextElement}function pn(e){const t=ri(e);if(!et(t))return Je(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Ol(t);let i=(s?Gr(n.width):n.width)/r,a=(s?Gr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const ug=Je(0);function jl(e){const t=Ae(e);return!ni()||!t.visualViewport?ug:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ae(e)?!1:t}function nn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ri(e);let i=Je(1);t&&(r?Ue(r)&&(i=pn(r)):i=pn(e));const a=dg(s,n,r)?jl(s):Je(0);let c=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(s){const m=Ae(s),g=r&&Ue(r)?Ae(r):r;let x=m,h=Es(x);for(;h&&r&&g!==x;){const v=pn(h),y=h.getBoundingClientRect(),w=We(h),S=y.left+(h.clientLeft+parseFloat(w.paddingLeft))*v.x,E=y.top+(h.clientTop+parseFloat(w.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,p*=v.y,c+=S,u+=E,x=Ae(h),h=Es(x)}}return Qr({width:f,height:p,x:c,y:u})}function po(e,t){const n=ho(e).scrollLeft;return t?t.left+n:nn(tt(e)).left+n}function Il(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-po(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function fg(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=tt(r),a=t?fo(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},u=Je(1);const f=Je(0),p=et(r);if((p||!p&&!s)&&((Ln(r)!=="body"||ar(i))&&(c=ho(r)),et(r))){const g=nn(r);u=pn(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const m=i&&!p&&!s?Il(i,c):Je(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+m.x,y:n.y*u.y-c.scrollTop*u.y+f.y+m.y}}function hg(e){return Array.from(e.getClientRects())}function pg(e){const t=tt(e),n=ho(e),r=e.ownerDocument.body,o=Te(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Te(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+po(e);const a=-n.scrollTop;return We(r).direction==="rtl"&&(i+=Te(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Da=25;function mg(e,t){const n=Ae(e),r=tt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const f=ni();(!f||f&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const u=po(r);if(u<=0){const f=r.ownerDocument,p=f.body,m=getComputedStyle(p),g=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(r.clientWidth-p.clientWidth-g);x<=Da&&(s-=x)}else u<=Da&&(s+=u);return{width:s,height:i,x:a,y:c}}const gg=new Set(["absolute","fixed"]);function vg(e,t){const n=nn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=et(e)?pn(e):Je(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:i,height:a,x:c,y:u}}function La(e,t,n){let r;if(t==="viewport")r=mg(e,n);else if(t==="document")r=pg(tt(e));else if(Ue(t))r=vg(t,n);else{const o=jl(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Qr(r)}function Nl(e,t){const n=Mt(e);return n===t||!Ue(n)||An(n)?!1:We(n).position==="fixed"||Nl(n,t)}function yg(e,t){const n=t.get(e);if(n)return n;let r=Gn(e,[],!1).filter(a=>Ue(a)&&Ln(a)!=="body"),o=null;const s=We(e).position==="fixed";let i=s?Mt(e):e;for(;Ue(i)&&!An(i);){const a=We(i),c=ti(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&gg.has(o.position)||ar(i)&&!c&&Nl(e,i))?r=r.filter(f=>f!==i):o=a,i=Mt(i)}return t.set(e,r),r}function bg(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?fo(t)?[]:yg(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((u,f)=>{const p=La(t,f,o);return u.top=Te(p.top,u.top),u.right=Lt(p.right,u.right),u.bottom=Lt(p.bottom,u.bottom),u.left=Te(p.left,u.left),u},La(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function wg(e){const{width:t,height:n}=Ol(e);return{width:t,height:n}}function Cg(e,t,n){const r=et(t),o=tt(t),s=n==="fixed",i=nn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Je(0);function u(){c.x=po(o)}if(r||!r&&!s)if((Ln(t)!=="body"||ar(o))&&(a=ho(t)),r){const g=nn(t,!0,s,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&u();s&&!r&&o&&u();const f=o&&!r&&!s?Il(o,a):Je(0),p=i.left+a.scrollLeft-c.x-f.x,m=i.top+a.scrollTop-c.y-f.y;return{x:p,y:m,width:i.width,height:i.height}}function Bo(e){return We(e).position==="static"}function Ma(e,t){if(!et(e)||We(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return tt(e)===n&&(n=n.ownerDocument.body),n}function Dl(e,t){const n=Ae(e);if(fo(e))return n;if(!et(e)){let o=Mt(e);for(;o&&!An(o);){if(Ue(o)&&!Bo(o))return o;o=Mt(o)}return n}let r=Ma(e,t);for(;r&&rg(r)&&Bo(r);)r=Ma(r,t);return r&&An(r)&&Bo(r)&&!ti(r)?n:r||cg(e)||n}const xg=async function(e){const t=this.getOffsetParent||Dl,n=this.getDimensions,r=await n(e.floating);return{reference:Cg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sg(e){return We(e).direction==="rtl"}const Eg={convertOffsetParentRelativeRectToViewportRelativeRect:fg,getDocumentElement:tt,getClippingRect:bg,getOffsetParent:Dl,getElementRects:xg,getClientRects:hg,getDimensions:wg,getScale:pn,isElement:Ue,isRTL:Sg};function Ll(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function _g(e,t){let n=null,r;const o=tt(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=u;if(a||t(),!m||!g)return;const x=Sr(p),h=Sr(o.clientWidth-(f+m)),v=Sr(o.clientHeight-(p+g)),y=Sr(f),S={rootMargin:-x+"px "+-h+"px "+-v+"px "+-y+"px",threshold:Te(0,Lt(1,c))||1};let E=!0;function R(T){const P=T[0].intersectionRatio;if(P!==c){if(!E)return i();P?i(!1,P):r=setTimeout(()=>{i(!1,1e-7)},1e3)}P===1&&!Ll(u,e.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(R,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,S)}n.observe(e)}return i(!0),s}function Rg(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=ri(e),f=o||s?[...u?Gn(u):[],...Gn(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const p=u&&a?_g(u,n):null;let m=-1,g=null;i&&(g=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var S;(S=g)==null||S.observe(t)})),n()}),u&&!c&&g.observe(u),g.observe(t));let x,h=c?nn(e):null;c&&v();function v(){const y=nn(e);h&&!Ll(h,y)&&n(),h=y,x=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),p==null||p(),(y=g)==null||y.disconnect(),g=null,c&&cancelAnimationFrame(x)}}const Tg=Zm,Pg=Xm,Ag=Km,Og=eg,jg=Qm,ka=Gm,Ig=Jm,Ng=(e,t,n)=>{const r=new Map,o={platform:Eg,...n},s={...o.platform,_c:r};return qm(e,t,{...o,platform:s})};var Dg=typeof document<"u",Lg=function(){},$r=Dg?_.useLayoutEffect:Lg;function Yr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Yr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Yr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ml(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $a(e,t){const n=Ml(e);return Math.round(t*n)/n}function Uo(e){const t=d.useRef(e);return $r(()=>{t.current=e}),t}function Mg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[f,p]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=d.useState(r);Yr(m,r)||g(r);const[x,h]=d.useState(null),[v,y]=d.useState(null),w=d.useCallback($=>{$!==T.current&&(T.current=$,h($))},[]),S=d.useCallback($=>{$!==P.current&&(P.current=$,y($))},[]),E=s||x,R=i||v,T=d.useRef(null),P=d.useRef(null),D=d.useRef(f),I=c!=null,L=Uo(c),B=Uo(o),U=Uo(u),W=d.useCallback(()=>{if(!T.current||!P.current)return;const $={placement:t,strategy:n,middleware:m};B.current&&($.platform=B.current),Ng(T.current,P.current,$).then(oe=>{const pe={...oe,isPositioned:U.current!==!1};V.current&&!Yr(D.current,pe)&&(D.current=pe,ro.flushSync(()=>{p(pe)}))})},[m,t,n,B,U]);$r(()=>{u===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p($=>({...$,isPositioned:!1})))},[u]);const V=d.useRef(!1);$r(()=>(V.current=!0,()=>{V.current=!1}),[]),$r(()=>{if(E&&(T.current=E),R&&(P.current=R),E&&R){if(L.current)return L.current(E,R,W);W()}},[E,R,W,L,I]);const re=d.useMemo(()=>({reference:T,floating:P,setReference:w,setFloating:S}),[w,S]),z=d.useMemo(()=>({reference:E,floating:R}),[E,R]),Q=d.useMemo(()=>{const $={position:n,left:0,top:0};if(!z.floating)return $;const oe=$a(z.floating,f.x),pe=$a(z.floating,f.y);return a?{...$,transform:"translate("+oe+"px, "+pe+"px)",...Ml(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:oe,top:pe}},[n,a,z.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:W,refs:re,elements:z,floatingStyles:Q}),[f,W,re,z,Q])}const kg=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ka({element:r.current,padding:o}).fn(n):{}:r?ka({element:r,padding:o}).fn(n):{}}}},$g=(e,t)=>({...Tg(e),options:[e,t]}),Fg=(e,t)=>({...Pg(e),options:[e,t]}),Bg=(e,t)=>({...Ig(e),options:[e,t]}),Ug=(e,t)=>({...Ag(e),options:[e,t]}),Wg=(e,t)=>({...Og(e),options:[e,t]}),Hg=(e,t)=>({...jg(e),options:[e,t]}),Vg=(e,t)=>({...kg(e),options:[e,t]});var zg="Arrow",kl=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return l.jsx(ie.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});kl.displayName=zg;var qg=kl;function Gg(e){const[t,n]=d.useState(void 0);return ve(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var oi="Popper",[$l,mo]=ir(oi),[Kg,Fl]=$l(oi),Bl=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return l.jsx(Kg,{scope:t,anchor:r,onAnchorChange:o,children:n})};Bl.displayName=oi;var Ul="PopperAnchor",Wl=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Fl(Ul,n),i=d.useRef(null),a=ce(t,i),c=d.useRef(null);return d.useEffect(()=>{const u=c.current;c.current=(r==null?void 0:r.current)||i.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:l.jsx(ie.div,{...o,ref:a})});Wl.displayName=Ul;var si="PopperContent",[Qg,Yg]=$l(si),Hl=d.forwardRef((e,t)=>{var k,J,de,Y,ee,Z;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:x,...h}=e,v=Fl(si,n),[y,w]=d.useState(null),S=ce(t,ye=>w(ye)),[E,R]=d.useState(null),T=Gg(E),P=(T==null?void 0:T.width)??0,D=(T==null?void 0:T.height)??0,I=r+(s!=="center"?"-"+s:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},B=Array.isArray(u)?u:[u],U=B.length>0,W={padding:L,boundary:B.filter(Xg),altBoundary:U},{refs:V,floatingStyles:re,placement:z,isPositioned:Q,middlewareData:$}=Mg({strategy:"fixed",placement:I,whileElementsMounted:(...ye)=>Rg(...ye,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[$g({mainAxis:o+D,alignmentAxis:i}),c&&Fg({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Bg():void 0,...W}),c&&Ug({...W}),Wg({...W,apply:({elements:ye,rects:je,availableWidth:ze,availableHeight:Le})=>{const{width:vt,height:ur}=je.reference,rt=ye.floating.style;rt.setProperty("--radix-popper-available-width",`${ze}px`),rt.setProperty("--radix-popper-available-height",`${Le}px`),rt.setProperty("--radix-popper-anchor-width",`${vt}px`),rt.setProperty("--radix-popper-anchor-height",`${ur}px`)}}),E&&Vg({element:E,padding:a}),Jg({arrowWidth:P,arrowHeight:D}),m&&Hg({strategy:"referenceHidden",...W})]}),[oe,pe]=ql(z),Oe=tn(x);ve(()=>{Q&&(Oe==null||Oe())},[Q,Oe]);const pt=(k=$.arrow)==null?void 0:k.x,mt=(J=$.arrow)==null?void 0:J.y,Ve=((de=$.arrow)==null?void 0:de.centerOffset)!==0,[gt,De]=d.useState();return ve(()=>{y&&De(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:Q?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:gt,"--radix-popper-transform-origin":[(Y=$.transformOrigin)==null?void 0:Y.x,(ee=$.transformOrigin)==null?void 0:ee.y].join(" "),...((Z=$.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(Qg,{scope:n,placedSide:oe,onArrowChange:R,arrowX:pt,arrowY:mt,shouldHideArrow:Ve,children:l.jsx(ie.div,{"data-side":oe,"data-align":pe,...h,ref:S,style:{...h.style,animation:Q?void 0:"none"}})})})});Hl.displayName=si;var Vl="PopperArrow",Zg={top:"bottom",right:"left",bottom:"top",left:"right"},zl=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Yg(Vl,r),i=Zg[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:l.jsx(qg,{...o,ref:n,style:{...o.style,display:"block"}})})});zl.displayName=Vl;function Xg(e){return e!==null}var Jg=e=>({name:"transformOrigin",options:e,fn(t){var v,y,w;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,f]=ql(n),p={start:"0%",center:"50%",end:"100%"}[f],m=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,g=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let x="",h="";return u==="bottom"?(x=i?p:`${m}px`,h=`${-c}px`):u==="top"?(x=i?p:`${m}px`,h=`${r.floating.height+c}px`):u==="right"?(x=`${-c}px`,h=i?p:`${g}px`):u==="left"&&(x=`${r.floating.width+c}px`,h=i?p:`${g}px`),{data:{x,y:h}}}});function ql(e){const[t,n="center"]=e.split("-");return[t,n]}var Gl=Bl,Kl=Wl,Ql=Hl,Yl=zl,ev="Portal",ii=d.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=d.useState(!1);ve(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?lc.createPortal(l.jsx(ie.div,{...r,ref:t}),i):null});ii.displayName=ev;function tv(e){const t=nv(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),c=a.find(ov);if(c){const u=c.props.children,f=a.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function nv(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=iv(o),a=sv(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Nn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rv=Symbol("radix.slottable");function ov(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rv}function sv(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function iv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var av=d[" useInsertionEffect ".trim().toString()]||ve;function Zr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=cv({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const p=f.current;p!==a&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=a},[a,r])}const u=d.useCallback(f=>{var p;if(a){const m=lv(f)?f(e):f;m!==e&&((p=i.current)==null||p.call(i,m))}else s(f)},[a,e,s,i]);return[c,u]}function cv({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),s=d.useRef(t);return av(()=>{s.current=t},[t]),d.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function lv(e){return typeof e=="function"}function uv(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Zl=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),dv="VisuallyHidden",Xl=d.forwardRef((e,t)=>l.jsx(ie.span,{...e,ref:t,style:{...Zl,...e.style}}));Xl.displayName=dv;var fv=Xl,hv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},dn=new WeakMap,Er=new WeakMap,_r={},Wo=0,Jl=function(e){return e&&(e.host||Jl(e.parentNode))},pv=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Jl(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},mv=function(e,t,n,r){var o=pv(t,Array.isArray(e)?e:[e]);_r[n]||(_r[n]=new WeakMap);var s=_r[n],i=[],a=new Set,c=new Set(o),u=function(p){!p||a.has(p)||(a.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(a.has(m))f(m);else try{var g=m.getAttribute(r),x=g!==null&&g!=="false",h=(dn.get(m)||0)+1,v=(s.get(m)||0)+1;dn.set(m,h),s.set(m,v),i.push(m),h===1&&x&&Er.set(m,!0),v===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return f(t),a.clear(),Wo++,function(){i.forEach(function(p){var m=dn.get(p)-1,g=s.get(p)-1;dn.set(p,m),s.set(p,g),m||(Er.has(p)||p.removeAttribute(r),Er.delete(p)),g||p.removeAttribute(n)}),Wo--,Wo||(dn=new WeakMap,dn=new WeakMap,Er=new WeakMap,_r={})}},eu=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=hv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),mv(r,o,n,"aria-hidden")):function(){return null}},Fr="right-scroll-bar-position",Br="width-before-scroll-bar",gv="with-scroll-bars-hidden",vv="--removed-body-scroll-bar-size";function Ho(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function yv(e,t){var n=_.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var bv=typeof window<"u"?d.useLayoutEffect:d.useEffect,Fa=new WeakMap;function wv(e,t){var n=yv(null,function(r){return e.forEach(function(o){return Ho(o,r)})});return bv(function(){var r=Fa.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Ho(a,null)}),s.forEach(function(a){o.has(a)||Ho(a,i)})}Fa.set(n,e)},[e]),n}function Cv(e){return e}function xv(e,t){t===void 0&&(t=Cv);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var f=i;i=[],f.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function Sv(e){e===void 0&&(e={});var t=xv(null);return t.options=Ye({async:!0,ssr:!1},e),t}var tu=function(e){var t=e.sideCar,n=kc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,Ye({},n))};tu.isSideCarExport=!0;function Ev(e,t){return e.useMedium(t),tu}var nu=Sv(),Vo=function(){},go=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:Vo,onWheelCapture:Vo,onTouchMoveCapture:Vo}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,g=e.noRelative,x=e.noIsolation,h=e.inert,v=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,S=e.gapMode,E=kc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=m,T=wv([n,t]),P=Ye(Ye({},E),o);return d.createElement(d.Fragment,null,f&&d.createElement(R,{sideCar:nu,removeScrollBar:u,shards:p,noRelative:g,noIsolation:x,inert:h,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:S}),i?d.cloneElement(d.Children.only(a),Ye(Ye({},P),{ref:T})):d.createElement(w,Ye({},P,{className:c,ref:T}),a))});go.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};go.classNames={fullWidth:Br,zeroRight:Fr};var _v=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Rv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_v();return t&&e.setAttribute("nonce",t),e}function Tv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Pv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Av=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Rv())&&(Tv(t,n),Pv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ov=function(){var e=Av();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ru=function(){var e=Ov(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},jv={left:0,top:0,right:0,gap:0},zo=function(e){return parseInt(e||"",10)||0},Iv=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[zo(n),zo(r),zo(o)]},Nv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return jv;var t=Iv(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Dv=ru(),mn="data-scroll-locked",Lv=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
209
|
-
.`.concat(
|
|
208
|
+
`,gr=16,$p=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:s,containerClassName:i})=>{let{toasts:a,handlers:c}=fp(n);return d.createElement("div",{style:{position:"fixed",zIndex:9999,top:gr,left:gr,right:gr,bottom:gr,pointerEvents:"none",...s},className:i,onMouseEnter:c.startPause,onMouseLeave:c.endPause},a.map(u=>{let f=u.position||t,p=c.calculateOffset(u,{reverseOrder:e,gutter:r,defaultPosition:t}),m=Mp(f,p);return d.createElement(Lp,{id:u.id,key:u.id,onHeightUpdate:c.updateHeight,className:u.visible?kp:"",style:m},u.type==="custom"?zr(u.message,u):o?o(u):d.createElement(Dp,{toast:u,position:f}))}))},ia=Pe;const qs=()=>({notify:_.useCallback((t,n,r)=>{const o={style:{background:"var(--platform-background-primary-color)",color:"var(--platform-text-primary-color)"}};n==="warning"||n==="info"?ia(t,{...o,icon:n==="warning"?"⚠️":"ℹ️"}):ia[n](t,o),r&&console.error(r)},[])}),vr={STALE_TIME:1e3*60*5,GC_TIME:1e3*60*10,RETRY_COUNT:1,RETRY_DELAY:1e3},aa={refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:vr.STALE_TIME,gcTime:vr.GC_TIME,retry:vr.RETRY_COUNT,retryDelay:vr.RETRY_DELAY,enable:!0},yr=e=>e instanceof Error?e.message:String(e),ol=(e,t,n)=>{const r=zs(),{notify:o}=qs(),{createFn:s,readFn:i,readByIdFn:a,updateFn:c,deleteFn:u,partialUpdateFn:f}=n,p=()=>{r.invalidateQueries({queryKey:[e]})},m=(E,R,T,P)=>o(P!=null&&P.overrideSuccessMessage?P==null?void 0:P.overrideSuccessMessage(E,R):T,"success"),g=(E,R,T,P)=>o(P!=null&&P.overrideErrorMessage?P==null?void 0:P.overrideErrorMessage(E,R):T,"error");return{useCreate:E=>mr({mutationFn:R=>s(R),onSuccess:R=>{p(),m(t,R,`${t} created successfully`,E)},onError:R=>{g(t,R,`Error creating ${t}: ${yr(R)}`,E)}}),useReadQuery:E=>ra({queryKey:[e],queryFn:i,...aa,...E}),useReadByIdQuery:(E,R)=>ra({queryKey:[e,E],queryFn:()=>a(E),...aa,enabled:!!E,...R}),useUpdate:E=>mr({mutationFn:({id:R,data:T})=>c(R,T),onSuccess:R=>{p(),m(t,R,`${t} updated successfully`,E)},onError:R=>{g(t,R,`Error updating ${t}: ${yr(R)}`,E)}}),usePartialUpdate:E=>f&&mr({mutationFn:({id:R,data:T})=>f(R,T),onSuccess:R=>{p(),m(t,R,`${t} updated successfully`,E)},onError:R=>{g(t,R,`Error updating ${t}: ${yr(R)}`,E)}}),useDelete:E=>mr({mutationFn:R=>u(R),onSuccess:()=>{p(),m(t,null,`${t} deleted successfully`,E)},onError:R=>{g(t,R,`Error deleting ${t}: ${yr(R)}`,E)}}),invalidateQueries:p}},Fp=(e,t)=>ol(e,t,{createFn:n=>fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(r=>r.json()),deleteFn:n=>fetch(`${e}/${n}`,{method:"DELETE"}).then(r=>{if(!r.ok)throw new Error(`Error deleting: ${r.status}`)}),readByIdFn:n=>fetch(`${e}/${n}`).then(r=>r.json()),readFn:()=>fetch(e).then(n=>n.json()),updateFn:(n,r)=>fetch(`${e}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(o=>o.json()),partialUpdateFn:(n,r)=>fetch(`${e}/${n}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(o=>o.json())}),Bp={SINGLE_TENANT:"single-tenant"},Up={COOKIE:"cookie"},Do="tenant",ca="tenant",la="tenant",Wp=Bp.SINGLE_TENANT,Hp=Up.COOKIE,Vp={mode:Wp,clientSideMode:Hp,tenantIDPProvisioningStrategy:"none"};/*! js-cookie v3.0.5 | MIT */function br(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var zp={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ys(e,t){function n(o,s,i){if(!(typeof document>"u")){i=br({},t,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in i)i[c]&&(a+="; "+c,i[c]!==!0&&(a+="="+i[c].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+a}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],i={},a=0;a<s.length;a++){var c=s[a].split("="),u=c.slice(1).join("=");try{var f=decodeURIComponent(c[0]);if(i[f]=e.read(u,f),o===f)break}catch{}}return o?i[o]:i}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",br({},s,{expires:-1}))},withAttributes:function(o){return ys(this.converter,br({},this.attributes,o))},withConverter:function(o){return ys(br({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Lo=ys(zp,{path:"/"});class qp{setTenant(t,n){t?Lo.set(Do,t.name):Lo.remove(Do),window.location.reload()}getCurrentTenantName(){return Lo.get(Do)}}class Gp{setTenant(t,n){const r=new URL(window.location.href);r.searchParams.set(ca,t.name),window.location.href=r.toString()}getCurrentTenantName(){const t=new URL(window.location.href);return new URLSearchParams(t.search).get(ca)}}class Kp{setTenant(t,n){sessionStorage.setItem(la,t.name),window.location.reload()}getCurrentTenantName(){return sessionStorage.getItem(la)}}class Qp{extractSubdomain(t){if(t==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(t))return"";const n=t.split(".");if(n.length<2||n.length===2||n[0]==="www"&&n.length===3)return"";const o=(n[0]==="www"?n.slice(1):n).slice(0,-2);return o.length>0?o.join("."):""}getBaseDomain(t){const n=t.split(".");return t==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(t)||n.length<=2?t:n.slice(-2).join(".")}setTenant(t,n){var u;const r=(u=n.urlPatterns)==null?void 0:u.find(f=>f.patternType==="subdomain"&&f.tenantId===t.id&&f.isActive);if(!r)throw new Error(`No active subdomain pattern found for tenant '${t.name}'`);const o=new URL(window.location.href),s=r.patternValue,i=o.hostname,a=this.getBaseDomain(i),c=s?`${s}.${a}`:a;o.hostname=c,window.location.href=o.toString()}getCurrentTenantName(){const t=window.location.hostname;return this.extractSubdomain(t)||null}}const ua={queryParams:new Gp,sessionStorage:new Kp,cookie:new qp,subdomain:new Qp},Yp=e=>{const t=ua[e.clientSideMode];if(!t)throw new Error(`Client side tenant mode '${e.clientSideMode}' is not supported ${JSON.stringify({strategies:ua},null,2)}`);return t},Zp=(e,t,n)=>{const r=t.find(s=>s.name===n);if(!r)throw Error("No tenant permission");return Yp(e).setTenant(r,e),r},Xp=()=>{const[e,t]=er(),{tenants:n=[],currentTenant:r,tenantConfig:o=Vp}=e,s=_.useCallback(i=>{const a=Zp(o,n,i);t({...e,currentTenant:a})},[o,e,n,t]);return{tenants:n,currentTenant:r,tenantConfig:o,selectTenant:s}};function Jp(e){if(!e.ok)throw console.error(e),new Error(e.statusText)}async function wr(e,t,n,r){const o=await e(`/user-states/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,r);return Jp(o),o}class Cr{static async get(t,n,r){const s=await wr(t,n,r,{method:"GET",headers:{"Content-Type":"application/json"}});return s.status===204?null:await s.json()}static async create(t,n,r,o){const s={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:o})};return await(await wr(t,n,r,s)).json()}static async update(t,n,r,o){const s={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:o})};return await(await wr(t,n,r,s)).json()}static async delete(t,n,r){return await wr(t,n,r,{method:"DELETE",headers:{"Content-Type":"application/json"}}),null}}const e1=e=>{const t=Us("@bluealba/pae-nestjs-gateway-service"),n=Ac();if(!n)throw new Error("You must call the useUserState hook within a PAE application.");const[r,o]=_.useState(null),[s,i]=_.useState(!1),[a,c]=_.useState(!1),[u,f]=_.useState(null),p=(b,S)=>_.useCallback(async({newValue:E,shouldThrowError:R}={})=>{try{c(!0),f(null);const T=await b(t,n,e,E);return o(T),T?T.value:null}catch(T){if(f(T==null?void 0:T.message),console.error(`Failed to ${S} ${e}:`,T),R)throw T;return null}finally{c(!1)}},[S,b]),m=p(Cr.get,"fetch"),g=p(Cr.create,"create"),x=p(Cr.update,"update"),h=p(Cr.delete,"delete"),v=_.useCallback(async()=>{try{await m()}finally{i(!0)}},[m]);_.useEffect(()=>{v()},[v]);const y=_.useCallback(async(b,S=!1)=>r==null?await g({newValue:b,shouldThrowError:S}):await x({newValue:b,shouldThrowError:S}),[r,g,x]);return{value:r?r.value:null,hasFetched:s,loading:a,error:u,setValue:y,createValue:g,updateValue:x,deleteValue:h}},t1=()=>l.jsx("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:l.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",d:"M8.737 8.737a21.49 21.49 0 0 1 3.308-2.724m0 0c3.063-2.026 5.99-2.641 7.331-1.3 1.827 1.828.026 6.591-4.023 10.64-4.049 4.049-8.812 5.85-10.64 4.023-1.33-1.33-.736-4.218 1.249-7.253m6.083-6.11c-3.063-2.026-5.99-2.641-7.331-1.3-1.827 1.828-.026 6.591 4.023 10.64m3.308-9.34a21.497 21.497 0 0 1 3.308 2.724m2.775 3.386c1.985 3.035 2.579 5.923 1.248 7.253-1.336 1.337-4.245.732-7.295-1.275M14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})}),sl=({applicationName:e})=>{const t=Ec(e);if(t)if(typeof t=="function"){const n=t;return l.jsx(n,{})}else return t;return l.jsx(t1,{})};sl.displayName="ApplicationIcon";const Gs=({operations:e,children:t,forbiddenContent:n})=>{var o;const{hasAccess:r}=rr();if(!r(...e)){if(!n)return null;if(typeof n=="function")if((o=n==null?void 0:n.prototype)!=null&&o.isReactComponent){const s=n;return l.jsx(s,{operations:e})}else return n({operations:e});return _.isValidElement(n)?n:null}return t};Gs.displayName="Authorized";const il="__PAE_EXTENSION_POINT_REACT_CONTENT_EMPTY__",n1=({module:e,point:t,children:n})=>(Uc(e,t,n??il),null),al=({name:e,children:t,...n})=>{const r=Wc(e);if(r===il)return null;if(!r)return l.jsx(l.Fragment,{children:t??null});if(r1(r)){const o=r;return l.jsx(o,{...n})}else return r},r1=e=>typeof e=="function",da="single-spa:app-change";function o1(){const[e,t]=_.useState(fa());return _.useEffect(()=>{const n=()=>{t(fa())};return window.addEventListener(da,n),()=>{window.removeEventListener(da,n)}},[]),e}function fa(){return jr.getAppNames().reduce((t,n)=>(jr.getAppStatus(n)?t[n]=jr.getAppStatus(n):t[n]="NOT_LOADED",t),{})}function s1(e){const n=o1()[e]??"LOAD_ERROR";return{statusName:n,isLoading:n==="LOADING_SOURCE_CODE"||n==="BOOTSTRAPPING"||n==="MOUNTING",isMounted:n==="MOUNTED",isBroken:n==="SKIP_BECAUSE_BROKEN"||n==="LOAD_ERROR"}}const i1={display:"flex",flexDirection:"column",flex:1},cl=_.forwardRef((e,t)=>l.jsx("div",{ref:t,style:i1,...e}));cl.displayName="BaseContainer";const ll=({appName:e})=>l.jsxs("div",{children:[l.jsx("p",{children:"Something went wrong..."}),l.jsxs("p",{children:["Failed to load ",e]})]});ll.displayName="BaseError";const ul=({appName:e})=>l.jsx("div",{children:l.jsxs("p",{children:["Loading ",e,"..."]})});ul.displayName="BaseLoading";const a1="pae-app:",dl=_.forwardRef(({appName:e,LoadingComponent:t=ul,ErrorComponent:n=ll,ContainerComponent:r=cl,...o},s)=>{const i=s1(e);return l.jsxs(r,{ref:s,...o,id:`${a1}${e}`,children:[i.isLoading&&l.jsx(t,{appName:e}),i.isBroken&&l.jsx(n,{appName:e})]})});dl.displayName="ModulePlaceHolder";const c1=({eventName:e,listener:t})=>(Bc(e,t),null);function fl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=fl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function N(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=fl(e))&&(r&&(r+=" "),r+=t);return r}const l1="alert__LblpE",u1="destructive__bLNSM",d1="alertTitle__gblKf",f1="alertDescription__BuVHV",qr={alert:l1,default:"default__mgO6A",destructive:u1,alertTitle:d1,alertDescription:f1},co=({className:e,variant:t="default",children:n,...r})=>l.jsx("div",{"data-slot":"alert",role:"alert",className:N(qr.alert,qr[t],e),...r,children:n}),h1=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{ref:r,"data-slot":"alert-title",className:N(qr.alertTitle,t),...n,children:e})),p1=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{ref:r,"data-slot":"alert-description",className:N(qr.alertDescription,t),...n,children:e}));co.displayName="Alert";co.Title=h1;co.Description=p1;const bs={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(const e in bs)Object.freeze(bs[e]);const ha=Object.freeze(bs);var pa={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function m1(e){var f,p;var t,n=[],r=1,o;if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(e=String(e).toLowerCase(),ha[e])n=ha[e].slice(),o="rgb";else if(e==="transparent")r=0,o="rgb",n=[0,0,0];else if(e[0]==="#"){var s=e.slice(1),i=s.length,a=i<=4;r=1,a?(n=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],i===4&&(r=parseInt(s[3]+s[3],16)/255)):(n=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],i===8&&(r=parseInt(s[6]+s[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),o="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var c=t[1];o=c.replace(/a$/,"");var u=o==="cmyk"?4:o==="gray"?1:3;n=t[2].trim().split(/\s*[,\/]\s*|\s+/),o==="color"&&(o=n.shift()),n=n.map(function(m,g){if(m[m.length-1]==="%")return m=parseFloat(m)/100,g===3?m:o==="rgb"?m*255:o[0]==="h"||o[0]==="l"&&!g?m*100:o==="lab"?m*125:o==="lch"?g<2?m*150:m*360:o[0]==="o"&&!g?m:o==="oklab"?m*.4:o==="oklch"?g<2?m*.4:m*360:m;if(o[g]==="h"||g===2&&o[o.length-1]==="h"){if(pa[m]!==void 0)return pa[m];if(m.endsWith("deg"))return parseFloat(m);if(m.endsWith("turn"))return parseFloat(m)*360;if(m.endsWith("grad"))return parseFloat(m)*360/400;if(m.endsWith("rad"))return parseFloat(m)*180/Math.PI}return m==="none"?0:parseFloat(m)}),r=n.length>u?n.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(n=e.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),o=((p=(f=e.match(/([a-z])/ig))==null?void 0:f.join(""))==null?void 0:p.toLowerCase())||"rgb");return{space:o,values:n,alpha:r}}const g1=(e,t)=>{const{space:n,values:r}=m1(e);return n[0]==="h"?`${n}a(${r[0]}, ${r[1]}%, ${r[2]}%, ${t})`:`${n}a(${r}, ${t})`},v1="Badges__5jpum",y1="Badges__5jpum",b1="Badge__95MWM",w1="Badge__95MWM",C1="Badge--primary__Rx-bS",x1="Badge--secondary__d92bT",S1="Badge--success__Kdo98",E1="Badge--warning__bf-Nn",_1="Badge--danger__HTj39",R1="Badge--small__y93Pj",T1="Badge--regular__aT5AL",P1="Badge--large__wORCH",kr={Badges:v1,badges:y1,Badge:b1,badge:w1,"Badge--primary":"Badge--primary__Rx-bS",badgePrimary:C1,"Badge--secondary":"Badge--secondary__d92bT",badgeSecondary:x1,"Badge--success":"Badge--success__Kdo98",badgeSuccess:S1,"Badge--warning":"Badge--warning__bf-Nn",badgeWarning:E1,"Badge--danger":"Badge--danger__HTj39",badgeDanger:_1,"Badge--small":"Badge--small__y93Pj",badgeSmall:R1,"Badge--regular":"Badge--regular__aT5AL",badgeRegular:T1,"Badge--large":"Badge--large__wORCH",badgeLarge:P1},Ks=_.forwardRef(({children:e,color:t,className:n,customColor:r,size:o="small",style:s,...i},a)=>{const c=r?{color:r,background:g1(r,.1)}:{},u=N(kr.Badge,kr[`Badge--${o}`],{[kr[`Badge--${t}`]]:!!t},n);return l.jsx("span",{ref:a,className:u,style:{...s,...c},...i,children:e})});Ks.displayName="Badge";const Qs=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(kr.Badges,t);return l.jsx("div",{ref:r,className:o,...n,children:e})});Qs.displayName="Badges";const A1="spinner__fakUN",O1="spinner-rotation__wUmPV",j1="button__8FA9H",I1="button--contained-primary__stkTx",N1="button--outlined-primary__KZ1ww",D1="button--text-primary__GLTfm",L1="button--contained-danger__L9ehT",M1="button--outlined-danger__eoYLd",k1="button--text-danger__Sw-ha",$1="icon__--umH",xr={spinner:A1,"spinner-rotation":"spinner-rotation__wUmPV",spinnerRotation:O1,button:j1,"button--contained-primary":"button--contained-primary__stkTx",buttonContainedPrimary:I1,"button--outlined-primary":"button--outlined-primary__KZ1ww",buttonOutlinedPrimary:N1,"button--text-primary":"button--text-primary__GLTfm",buttonTextPrimary:D1,"button--contained-danger":"button--contained-danger__L9ehT",buttonContainedDanger:L1,"button--outlined-danger":"button--outlined-danger__eoYLd",buttonOutlinedDanger:M1,"button--text-danger":"button--text-danger__Sw-ha",buttonTextDanger:k1,icon:$1},Gr=_.forwardRef(({variant:e="contained",colorScheme:t="primary",loading:n=!1,IconComponent:r,className:o,children:s,...i},a)=>{const c=N(xr.button,xr[`button--${e}-${t}`],o);return l.jsxs("button",{ref:a,className:c,...i,children:[n?l.jsx("div",{className:xr.spinner}):r&&l.jsx(r,{className:xr.icon}),s]})});Gr.displayName="Button";function X(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ma(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ma(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():ma(e[o],null)}}}}function ce(...e){return d.useCallback(Nn(...e),e)}function F1(e,t){const n=d.createContext(t),r=s=>{const{children:i,...a}=s,c=d.useMemo(()=>a,Object.values(a));return l.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=d.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function ir(e,t=[]){let n=[];function r(s,i){const a=d.createContext(i),c=n.length;n=[...n,i];const u=p=>{var y;const{scope:m,children:g,...x}=p,h=((y=m==null?void 0:m[e])==null?void 0:y[c])||a,v=d.useMemo(()=>x,Object.values(x));return l.jsx(h.Provider,{value:v,children:g})};u.displayName=s+"Provider";function f(p,m){var h;const g=((h=m==null?void 0:m[e])==null?void 0:h[c])||a,x=d.useContext(g);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(i=>d.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,B1(o,...t)]}function B1(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:c,scopeName:u})=>{const p=c(s)[`__scope${u}`];return{...a,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var ve=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},U1=d[" useId ".trim().toString()]||(()=>{}),W1=0;function Zt(e){const[t,n]=d.useState(U1());return ve(()=>{n(r=>r??String(W1++))},[e]),e||(t?`radix-${t}`:"")}var H1=d[" useInsertionEffect ".trim().toString()]||ve;function Kr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=V1({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const p=f.current;p!==a&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=a},[a,r])}const u=d.useCallback(f=>{var p;if(a){const m=z1(f)?f(e):f;m!==e&&((p=i.current)==null||p.call(i,m))}else s(f)},[a,e,s,i]);return[c,u]}function V1({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),s=d.useRef(t);return H1(()=>{s.current=t},[t]),d.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function z1(e){return typeof e=="function"}function q1(e){const t=G1(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),c=a.find(Q1);if(c){const u=c.props.children,f=a.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function G1(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=Z1(o),a=Y1(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Nn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var K1=Symbol("radix.slottable");function Q1(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===K1}function Y1(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Z1(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var X1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=X1.reduce((e,t)=>{const n=q1(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function J1(e,t){e&&ro.flushSync(()=>e.dispatchEvent(t))}function tn(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function em(e,t=globalThis==null?void 0:globalThis.document){const n=tn(e);d.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var tm="DismissableLayer",ws="dismissableLayer.update",nm="dismissableLayer.pointerDownOutside",rm="dismissableLayer.focusOutside",ga,hl=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lo=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,u=d.useContext(hl),[f,p]=d.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=d.useState({}),x=ce(t,P=>p(P)),h=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(v),b=f?h.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,E=b>=y,R=im(P=>{const D=P.target,I=[...u.branches].some(L=>L.contains(D));!E||I||(o==null||o(P),i==null||i(P),P.defaultPrevented||a==null||a())},m),T=am(P=>{const D=P.target;[...u.branches].some(L=>L.contains(D))||(s==null||s(P),i==null||i(P),P.defaultPrevented||a==null||a())},m);return em(P=>{b===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&a&&(P.preventDefault(),a()))},m),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ga=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),va(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=ga)}},[f,m,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),va())},[f,u]),d.useEffect(()=>{const P=()=>g({});return document.addEventListener(ws,P),()=>document.removeEventListener(ws,P)},[]),l.jsx(ie.div,{...c,ref:x,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,T.onFocusCapture),onBlurCapture:X(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,R.onPointerDownCapture)})});lo.displayName=tm;var om="DismissableLayerBranch",sm=d.forwardRef((e,t)=>{const n=d.useContext(hl),r=d.useRef(null),o=ce(t,r);return d.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),l.jsx(ie.div,{...e,ref:o})});sm.displayName=om;function im(e,t=globalThis==null?void 0:globalThis.document){const n=tn(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){pl(nm,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function am(e,t=globalThis==null?void 0:globalThis.document){const n=tn(e),r=d.useRef(!1);return d.useEffect(()=>{const o=s=>{s.target&&!r.current&&pl(rm,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function va(){const e=new CustomEvent(ws);document.dispatchEvent(e)}function pl(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?J1(o,s):o.dispatchEvent(s)}var Mo="focusScope.autoFocusOnMount",ko="focusScope.autoFocusOnUnmount",ya={bubbles:!1,cancelable:!0},cm="FocusScope",Ys=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=d.useState(null),u=tn(o),f=tn(s),p=d.useRef(null),m=ce(t,h=>c(h)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let h=function(S){if(g.paused||!a)return;const E=S.target;a.contains(E)?p.current=E:bt(p.current,{select:!0})},v=function(S){if(g.paused||!a)return;const E=S.relatedTarget;E!==null&&(a.contains(E)||bt(p.current,{select:!0}))},y=function(S){if(document.activeElement===document.body)for(const R of S)R.removedNodes.length>0&&bt(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",v);const b=new MutationObserver(y);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",v),b.disconnect()}}},[r,a,g.paused]),d.useEffect(()=>{if(a){wa.add(g);const h=document.activeElement;if(!a.contains(h)){const y=new CustomEvent(Mo,ya);a.addEventListener(Mo,u),a.dispatchEvent(y),y.defaultPrevented||(lm(pm(ml(a)),{select:!0}),document.activeElement===h&&bt(a))}return()=>{a.removeEventListener(Mo,u),setTimeout(()=>{const y=new CustomEvent(ko,ya);a.addEventListener(ko,f),a.dispatchEvent(y),y.defaultPrevented||bt(h??document.body,{select:!0}),a.removeEventListener(ko,f),wa.remove(g)},0)}}},[a,u,f,g]);const x=d.useCallback(h=>{if(!n&&!r||g.paused)return;const v=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(v&&y){const b=h.currentTarget,[S,E]=um(b);S&&E?!h.shiftKey&&y===E?(h.preventDefault(),n&&bt(S,{select:!0})):h.shiftKey&&y===S&&(h.preventDefault(),n&&bt(E,{select:!0})):y===b&&h.preventDefault()}},[n,r,g.paused]);return l.jsx(ie.div,{tabIndex:-1,...i,ref:m,onKeyDown:x})});Ys.displayName=cm;function lm(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(bt(r,{select:t}),document.activeElement!==n)return}function um(e){const t=ml(e),n=ba(t,e),r=ba(t.reverse(),e);return[n,r]}function ml(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ba(e,t){for(const n of e)if(!dm(n,{upTo:t}))return n}function dm(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fm(e){return e instanceof HTMLInputElement&&"select"in e}function bt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fm(e)&&t&&e.select()}}var wa=hm();function hm(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ca(e,t),e.unshift(t)},remove(t){var n;e=Ca(e,t),(n=e[0])==null||n.resume()}}}function Ca(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function pm(e){return e.filter(t=>t.tagName!=="A")}var mm="Portal",Zs=d.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=d.useState(!1);ve(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?lc.createPortal(l.jsx(ie.div,{...r,ref:t}),i):null});Zs.displayName=mm;function gm(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var Dn=e=>{const{present:t,children:n}=e,r=vm(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),s=ce(r.ref,ym(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:s}):null};Dn.displayName="Presence";function vm(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),s=d.useRef("none"),i=e?"mounted":"unmounted",[a,c]=gm(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Sr(r.current);s.current=a==="mounted"?u:"none"},[a]),ve(()=>{const u=r.current,f=o.current;if(f!==e){const m=s.current,g=Sr(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ve(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=g=>{const h=Sr(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&h&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},m=g=>{g.target===t&&(s.current=Sr(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:d.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Sr(e){return(e==null?void 0:e.animationName)||"none"}function ym(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $o=0;function gl(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??xa()),document.body.insertAdjacentElement("beforeend",e[1]??xa()),$o++,()=>{$o===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),$o--}},[])}function xa(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var $r="right-scroll-bar-position",Fr="width-before-scroll-bar",bm="with-scroll-bars-hidden",wm="--removed-body-scroll-bar-size";function Fo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Cm(e,t){var n=_.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var xm=typeof window<"u"?d.useLayoutEffect:d.useEffect,Sa=new WeakMap;function Sm(e,t){var n=Cm(null,function(r){return e.forEach(function(o){return Fo(o,r)})});return xm(function(){var r=Sa.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Fo(a,null)}),s.forEach(function(a){o.has(a)||Fo(a,i)})}Sa.set(n,e)},[e]),n}function Em(e){return e}function _m(e,t){t===void 0&&(t=Em);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var f=i;i=[],f.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function Rm(e){e===void 0&&(e={});var t=_m(null);return t.options=Ye({async:!0,ssr:!1},e),t}var vl=function(e){var t=e.sideCar,n=Dc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,Ye({},n))};vl.isSideCarExport=!0;function Tm(e,t){return e.useMedium(t),vl}var yl=Rm(),Bo=function(){},uo=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:Bo,onWheelCapture:Bo,onTouchMoveCapture:Bo}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,g=e.noRelative,x=e.noIsolation,h=e.inert,v=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,S=e.gapMode,E=Dc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=m,T=Sm([n,t]),P=Ye(Ye({},E),o);return d.createElement(d.Fragment,null,f&&d.createElement(R,{sideCar:yl,removeScrollBar:u,shards:p,noRelative:g,noIsolation:x,inert:h,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:S}),i?d.cloneElement(d.Children.only(a),Ye(Ye({},P),{ref:T})):d.createElement(b,Ye({},P,{className:c,ref:T}),a))});uo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};uo.classNames={fullWidth:Fr,zeroRight:$r};var Pm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Am(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Pm();return t&&e.setAttribute("nonce",t),e}function Om(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function jm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Im=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Am())&&(Om(t,n),jm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Nm=function(){var e=Im();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},bl=function(){var e=Nm(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Dm={left:0,top:0,right:0,gap:0},Uo=function(e){return parseInt(e||"",10)||0},Lm=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Uo(n),Uo(r),Uo(o)]},Mm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Dm;var t=Lm(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},km=bl(),pn="data-scroll-locked",$m=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
209
|
+
.`.concat(bm,` {
|
|
210
210
|
overflow: hidden `).concat(r,`;
|
|
211
211
|
padding-right: `).concat(a,"px ").concat(r,`;
|
|
212
212
|
}
|
|
213
|
-
body[`).concat(
|
|
213
|
+
body[`).concat(pn,`] {
|
|
214
214
|
overflow: hidden `).concat(r,`;
|
|
215
215
|
overscroll-behavior: contain;
|
|
216
216
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
@@ -223,30 +223,30 @@ to {
|
|
|
223
223
|
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
.`).concat(
|
|
226
|
+
.`).concat($r,` {
|
|
227
227
|
right: `).concat(a,"px ").concat(r,`;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
.`).concat(
|
|
230
|
+
.`).concat(Fr,` {
|
|
231
231
|
margin-right: `).concat(a,"px ").concat(r,`;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
.`).concat(
|
|
234
|
+
.`).concat($r," .").concat($r,` {
|
|
235
235
|
right: 0 `).concat(r,`;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
.`).concat(
|
|
238
|
+
.`).concat(Fr," .").concat(Fr,` {
|
|
239
239
|
margin-right: 0 `).concat(r,`;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
body[`).concat(
|
|
243
|
-
`).concat(
|
|
242
|
+
body[`).concat(pn,`] {
|
|
243
|
+
`).concat(wm,": ").concat(a,`px;
|
|
244
244
|
}
|
|
245
|
-
`)},
|
|
245
|
+
`)},Ea=function(){var e=parseInt(document.body.getAttribute(pn)||"0",10);return isFinite(e)?e:0},Fm=function(){d.useEffect(function(){return document.body.setAttribute(pn,(Ea()+1).toString()),function(){var e=Ea()-1;e<=0?document.body.removeAttribute(pn):document.body.setAttribute(pn,e.toString())}},[])},Bm=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Fm();var s=d.useMemo(function(){return Mm(o)},[o]);return d.createElement(km,{styles:$m(s,!t,o,n?"":"!important")})},Cs=!1;if(typeof window<"u")try{var Er=Object.defineProperty({},"passive",{get:function(){return Cs=!0,!0}});window.addEventListener("test",Er,Er),window.removeEventListener("test",Er,Er)}catch{Cs=!1}var dn=Cs?{passive:!1}:!1,Um=function(e){return e.tagName==="TEXTAREA"},wl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Um(e)&&n[t]==="visible")},Wm=function(e){return wl(e,"overflowY")},Hm=function(e){return wl(e,"overflowX")},_a=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Cl(e,r);if(o){var s=xl(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Vm=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},zm=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Cl=function(e,t){return e==="v"?Wm(t):Hm(t)},xl=function(e,t){return e==="v"?Vm(t):zm(t)},qm=function(e,t){return e==="h"&&t==="rtl"?-1:1},Gm=function(e,t,n,r,o){var s=qm(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),u=!1,f=i>0,p=0,m=0;do{if(!a)break;var g=xl(e,a),x=g[0],h=g[1],v=g[2],y=h-v-s*x;(x||y)&&Cl(e,a)&&(p+=y,m+=x);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(f&&Math.abs(p)<1||!f&&Math.abs(m)<1)&&(u=!0),u},_r=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ra=function(e){return[e.deltaX,e.deltaY]},Ta=function(e){return e&&"current"in e?e.current:e},Km=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Qm=function(e){return`
|
|
246
246
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
247
247
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
248
|
-
`)},Gv=0,hn=[];function Kv(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(Gv++)[0],s=d.useState(ru)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Ur([e.lockRef.current],(e.shards||[]).map(Ha),!0).filter(Boolean);return h.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=d.useCallback(function(h,v){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var y=Tr(h),w=n.current,S="deltaX"in h?h.deltaX:w[0]-y[0],E="deltaY"in h?h.deltaY:w[1]-y[1],R,T=h.target,P=Math.abs(S)>Math.abs(E)?"h":"v";if("touches"in h&&P==="h"&&T.type==="range")return!1;var D=window.getSelection(),I=D&&D.anchorNode,L=I?I===T||I.contains(T):!1;if(L)return!1;var B=Ua(P,T);if(!B)return!0;if(B?R=P:(R=P==="v"?"h":"v",B=Ua(P,T)),!B)return!1;if(!r.current&&"changedTouches"in h&&(S||E)&&(r.current=R),!R)return!0;var U=r.current||R;return Vv(U,v,h,U==="h"?S:E)},[]),c=d.useCallback(function(h){var v=h;if(!(!hn.length||hn[hn.length-1]!==s)){var y="deltaY"in v?Wa(v):Tr(v),w=t.current.filter(function(R){return R.name===v.type&&(R.target===v.target||v.target===R.shadowParent)&&zv(R.delta,y)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var S=(i.current.shards||[]).map(Ha).filter(Boolean).filter(function(R){return R.contains(v.target)}),E=S.length>0?a(v,S[0]):!i.current.noIsolation;E&&v.cancelable&&v.preventDefault()}}},[]),u=d.useCallback(function(h,v,y,w){var S={name:h,delta:v,target:y,should:w,shadowParent:Qv(y)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(E){return E!==S})},1)},[]),f=d.useCallback(function(h){n.current=Tr(h),r.current=void 0},[]),p=d.useCallback(function(h){u(h.type,Wa(h),h.target,a(h,e.lockRef.current))},[]),m=d.useCallback(function(h){u(h.type,Tr(h),h.target,a(h,e.lockRef.current))},[]);d.useEffect(function(){return hn.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",c,fn),document.addEventListener("touchmove",c,fn),document.addEventListener("touchstart",f,fn),function(){hn=hn.filter(function(h){return h!==s}),document.removeEventListener("wheel",c,fn),document.removeEventListener("touchmove",c,fn),document.removeEventListener("touchstart",f,fn)}},[]);var g=e.removeScrollBar,x=e.inert;return d.createElement(d.Fragment,null,x?d.createElement(s,{styles:qv(o)}):null,g?d.createElement(kv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Qv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Yv=Ev(nu,Kv);var ai=d.forwardRef(function(e,t){return d.createElement(go,Ye({},e,{ref:t,sideCar:Yv}))});ai.classNames=go.classNames;var Zv=[" ","Enter","ArrowUp","ArrowDown"],Xv=[" ","Enter"],rn="Select",[vo,yo,Jv]=im(rn),[Mn]=ir(rn,[Jv,mo]),bo=mo(),[ey,$t]=Mn(rn),[ty,ny]=Mn(rn),au=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:u,name:f,autoComplete:p,disabled:m,required:g,form:x}=e,h=bo(t),[v,y]=d.useState(null),[w,S]=d.useState(null),[E,R]=d.useState(!1),T=cm(u),[P,D]=Zr({prop:r,defaultProp:o??!1,onChange:s,caller:rn}),[I,L]=Zr({prop:i,defaultProp:a,onChange:c,caller:rn}),B=d.useRef(null),U=v?x||!!v.closest("form"):!0,[W,V]=d.useState(new Set),re=Array.from(W).map(z=>z.props.value).join(";");return l.jsx(Gl,{...h,children:l.jsxs(ey,{required:g,scope:t,trigger:v,onTriggerChange:y,valueNode:w,onValueNodeChange:S,valueNodeHasChildren:E,onValueNodeHasChildrenChange:R,contentId:Zt(),value:I,onValueChange:L,open:P,onOpenChange:D,dir:T,triggerPointerDownPosRef:B,disabled:m,children:[l.jsx(vo.Provider,{scope:t,children:l.jsx(ty,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(z=>{V(Q=>new Set(Q).add(z))},[]),onNativeOptionRemove:d.useCallback(z=>{V(Q=>{const $=new Set(Q);return $.delete(z),$})},[]),children:n})}),U?l.jsxs(Tu,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:p,value:I,onChange:z=>L(z.target.value),disabled:m,form:x,children:[I===void 0?l.jsx("option",{value:""}):null,Array.from(W)]},re):null]})})};au.displayName=rn;var cu="SelectTrigger",lu=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=bo(n),i=$t(cu,n),a=i.disabled||r,c=ce(t,i.onTriggerChange),u=yo(n),f=d.useRef("touch"),[p,m,g]=Au(h=>{const v=u().filter(S=>!S.disabled),y=v.find(S=>S.value===i.value),w=Ou(v,h,y);w!==void 0&&i.onValueChange(w.value)}),x=h=>{a||(i.onOpenChange(!0),g()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return l.jsx(Kl,{asChild:!0,...s,children:l.jsx(ie.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Pu(i.value)?"":void 0,...o,ref:c,onClick:X(o.onClick,h=>{h.currentTarget.focus(),f.current!=="mouse"&&x(h)}),onPointerDown:X(o.onPointerDown,h=>{f.current=h.pointerType;const v=h.target;v.hasPointerCapture(h.pointerId)&&v.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(x(h),h.preventDefault())}),onKeyDown:X(o.onKeyDown,h=>{const v=p.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&m(h.key),!(v&&h.key===" ")&&Zv.includes(h.key)&&(x(),h.preventDefault())})})})});lu.displayName=cu;var uu="SelectValue",du=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=$t(uu,n),{onValueNodeHasChildrenChange:u}=c,f=s!==void 0,p=ce(t,c.onValueNodeChange);return ve(()=>{u(f)},[u,f]),l.jsx(ie.span,{...a,ref:p,style:{pointerEvents:"none"},children:Pu(c.value)?l.jsx(l.Fragment,{children:i}):s})});du.displayName=uu;var ry="SelectIcon",fu=d.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.jsx(ie.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});fu.displayName=ry;var on="SelectContent",hu=d.forwardRef((e,t)=>{const n=$t(on,e.__scopeSelect),[r,o]=d.useState();if(ve(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?ro.createPortal(l.jsx(pu,{scope:e.__scopeSelect,children:l.jsx(vo.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),s):null}return l.jsx(mu,{...e,ref:t})});hu.displayName=on;var Me=10,[pu,Ft]=Mn(on),oy="SelectContentImpl",sy=tv("SelectContent.RemoveScroll"),mu=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:g,sticky:x,hideWhenDetached:h,avoidCollisions:v,...y}=e,w=$t(on,n),[S,E]=d.useState(null),[R,T]=d.useState(null),P=ce(t,k=>E(k)),[D,I]=d.useState(null),[L,B]=d.useState(null),U=yo(n),[W,V]=d.useState(!1),re=d.useRef(!1);d.useEffect(()=>{if(S)return eu(S)},[S]),El();const z=d.useCallback(k=>{const[J,...de]=U().map(Z=>Z.ref.current),[Y]=de.slice(-1),ee=document.activeElement;for(const Z of k)if(Z===ee||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===J&&R&&(R.scrollTop=0),Z===Y&&R&&(R.scrollTop=R.scrollHeight),Z==null||Z.focus(),document.activeElement!==ee))return},[U,R]),Q=d.useCallback(()=>z([D,S]),[z,D,S]);d.useEffect(()=>{W&&Q()},[W,Q]);const{onOpenChange:$,triggerPointerDownPosRef:oe}=w;d.useEffect(()=>{if(S){let k={x:0,y:0};const J=Y=>{var ee,Z;k={x:Math.abs(Math.round(Y.pageX)-(((ee=oe.current)==null?void 0:ee.x)??0)),y:Math.abs(Math.round(Y.pageY)-(((Z=oe.current)==null?void 0:Z.y)??0))}},de=Y=>{k.x<=10&&k.y<=10?Y.preventDefault():S.contains(Y.target)||$(!1),document.removeEventListener("pointermove",J),oe.current=null};return oe.current!==null&&(document.addEventListener("pointermove",J),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",de,{capture:!0})}}},[S,$,oe]),d.useEffect(()=>{const k=()=>$(!1);return window.addEventListener("blur",k),window.addEventListener("resize",k),()=>{window.removeEventListener("blur",k),window.removeEventListener("resize",k)}},[$]);const[pe,Oe]=Au(k=>{const J=U().filter(ee=>!ee.disabled),de=J.find(ee=>ee.ref.current===document.activeElement),Y=Ou(J,k,de);Y&&setTimeout(()=>Y.ref.current.focus())}),pt=d.useCallback((k,J,de)=>{const Y=!re.current&&!de;(w.value!==void 0&&w.value===J||Y)&&(I(k),Y&&(re.current=!0))},[w.value]),mt=d.useCallback(()=>S==null?void 0:S.focus(),[S]),Ve=d.useCallback((k,J,de)=>{const Y=!re.current&&!de;(w.value!==void 0&&w.value===J||Y)&&B(k)},[w.value]),gt=r==="popper"?Rs:gu,De=gt===Rs?{side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:g,sticky:x,hideWhenDetached:h,avoidCollisions:v}:{};return l.jsx(pu,{scope:n,content:S,viewport:R,onViewportChange:T,itemRefCallback:pt,selectedItem:D,onItemLeave:mt,itemTextRefCallback:Ve,focusSelectedItem:Q,selectedItemText:L,position:r,isPositioned:W,searchRef:pe,children:l.jsx(ai,{as:sy,allowPinchZoom:!0,children:l.jsx(Zs,{asChild:!0,trapped:w.open,onMountAutoFocus:k=>{k.preventDefault()},onUnmountAutoFocus:X(o,k=>{var J;(J=w.trigger)==null||J.focus({preventScroll:!0}),k.preventDefault()}),children:l.jsx(lo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:k=>k.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:l.jsx(gt,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:k=>k.preventDefault(),...y,...De,onPlaced:()=>V(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:X(y.onKeyDown,k=>{const J=k.ctrlKey||k.altKey||k.metaKey;if(k.key==="Tab"&&k.preventDefault(),!J&&k.key.length===1&&Oe(k.key),["ArrowUp","ArrowDown","Home","End"].includes(k.key)){let Y=U().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);if(["ArrowUp","End"].includes(k.key)&&(Y=Y.slice().reverse()),["ArrowUp","ArrowDown"].includes(k.key)){const ee=k.target,Z=Y.indexOf(ee);Y=Y.slice(Z+1)}setTimeout(()=>z(Y)),k.preventDefault()}})})})})})})});mu.displayName=oy;var iy="SelectItemAlignedPosition",gu=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=$t(on,n),i=Ft(on,n),[a,c]=d.useState(null),[u,f]=d.useState(null),p=ce(t,P=>f(P)),m=yo(n),g=d.useRef(!1),x=d.useRef(!0),{viewport:h,selectedItem:v,selectedItemText:y,focusSelectedItem:w}=i,S=d.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&h&&v&&y){const P=s.trigger.getBoundingClientRect(),D=u.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),L=y.getBoundingClientRect();if(s.dir!=="rtl"){const ee=L.left-D.left,Z=I.left-ee,ye=P.left-Z,je=P.width+ye,ze=Math.max(je,D.width),Le=window.innerWidth-Me,vt=ya(Z,[Me,Math.max(Me,Le-ze)]);a.style.minWidth=je+"px",a.style.left=vt+"px"}else{const ee=D.right-L.right,Z=window.innerWidth-I.right-ee,ye=window.innerWidth-P.right-Z,je=P.width+ye,ze=Math.max(je,D.width),Le=window.innerWidth-Me,vt=ya(Z,[Me,Math.max(Me,Le-ze)]);a.style.minWidth=je+"px",a.style.right=vt+"px"}const B=m(),U=window.innerHeight-Me*2,W=h.scrollHeight,V=window.getComputedStyle(u),re=parseInt(V.borderTopWidth,10),z=parseInt(V.paddingTop,10),Q=parseInt(V.borderBottomWidth,10),$=parseInt(V.paddingBottom,10),oe=re+z+W+$+Q,pe=Math.min(v.offsetHeight*5,oe),Oe=window.getComputedStyle(h),pt=parseInt(Oe.paddingTop,10),mt=parseInt(Oe.paddingBottom,10),Ve=P.top+P.height/2-Me,gt=U-Ve,De=v.offsetHeight/2,k=v.offsetTop+De,J=re+z+k,de=oe-J;if(J<=Ve){const ee=B.length>0&&v===B[B.length-1].ref.current;a.style.bottom="0px";const Z=u.clientHeight-h.offsetTop-h.offsetHeight,ye=Math.max(gt,De+(ee?mt:0)+Z+Q),je=J+ye;a.style.height=je+"px"}else{const ee=B.length>0&&v===B[0].ref.current;a.style.top="0px";const ye=Math.max(Ve,re+h.offsetTop+(ee?pt:0)+De)+de;a.style.height=ye+"px",h.scrollTop=J-Ve+h.offsetTop}a.style.margin=`${Me}px 0`,a.style.minHeight=pe+"px",a.style.maxHeight=U+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[m,s.trigger,s.valueNode,a,u,h,v,y,s.dir,r]);ve(()=>S(),[S]);const[E,R]=d.useState();ve(()=>{u&&R(window.getComputedStyle(u).zIndex)},[u]);const T=d.useCallback(P=>{P&&x.current===!0&&(S(),w==null||w(),x.current=!1)},[S,w]);return l.jsx(cy,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:T,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:l.jsx(ie.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});gu.displayName=iy;var ay="SelectPopperPosition",Rs=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Me,...s}=e,i=bo(n);return l.jsx(Ql,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Rs.displayName=ay;var[cy,ci]=Mn(on,{}),Ts="SelectViewport",vu=d.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Ft(Ts,n),i=ci(Ts,n),a=ce(t,s.onViewportChange),c=d.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(vo.Slot,{scope:n,children:l.jsx(ie.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:X(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:m}=i;if(m!=null&&m.current&&p){const g=Math.abs(c.current-f.scrollTop);if(g>0){const x=window.innerHeight-Me*2,h=parseFloat(p.style.minHeight),v=parseFloat(p.style.height),y=Math.max(h,v);if(y<x){const w=y+g,S=Math.min(x,w),E=w-S;p.style.height=S+"px",p.style.bottom==="0px"&&(f.scrollTop=E>0?E:0,p.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});vu.displayName=Ts;var yu="SelectGroup",[ly,uy]=Mn(yu),bu=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Zt();return l.jsx(ly,{scope:n,id:o,children:l.jsx(ie.div,{role:"group","aria-labelledby":o,...r,ref:t})})});bu.displayName=yu;var wu="SelectLabel",dy=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=uy(wu,n);return l.jsx(ie.div,{id:o.id,...r,ref:t})});dy.displayName=wu;var Xr="SelectItem",[fy,Cu]=Mn(Xr),xu=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=$t(Xr,n),c=Ft(Xr,n),u=a.value===r,[f,p]=d.useState(s??""),[m,g]=d.useState(!1),x=ce(t,w=>{var S;return(S=c.itemRefCallback)==null?void 0:S.call(c,w,r,o)}),h=Zt(),v=d.useRef("touch"),y=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(fy,{scope:n,value:r,disabled:o,textId:h,isSelected:u,onItemTextChange:d.useCallback(w=>{p(S=>S||((w==null?void 0:w.textContent)??"").trim())},[]),children:l.jsx(vo.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:l.jsx(ie.div,{role:"option","aria-labelledby":h,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:x,onFocus:X(i.onFocus,()=>g(!0)),onBlur:X(i.onBlur,()=>g(!1)),onClick:X(i.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:X(i.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:X(i.onPointerDown,w=>{v.current=w.pointerType}),onPointerMove:X(i.onPointerMove,w=>{var S;v.current=w.pointerType,o?(S=c.onItemLeave)==null||S.call(c):v.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:X(i.onPointerLeave,w=>{var S;w.currentTarget===document.activeElement&&((S=c.onItemLeave)==null||S.call(c))}),onKeyDown:X(i.onKeyDown,w=>{var E;((E=c.searchRef)==null?void 0:E.current)!==""&&w.key===" "||(Xv.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});xu.displayName=Xr;var Wn="SelectItemText",Su=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=$t(Wn,n),a=Ft(Wn,n),c=Cu(Wn,n),u=ny(Wn,n),[f,p]=d.useState(null),m=ce(t,y=>p(y),c.onItemTextChange,y=>{var w;return(w=a.itemTextRefCallback)==null?void 0:w.call(a,y,c.value,c.disabled)}),g=f==null?void 0:f.textContent,x=d.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:h,onNativeOptionRemove:v}=u;return ve(()=>(h(x),()=>v(x)),[h,v,x]),l.jsxs(l.Fragment,{children:[l.jsx(ie.span,{id:c.textId,...s,ref:m}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ro.createPortal(s.children,i.valueNode):null]})});Su.displayName=Wn;var Eu="SelectItemIndicator",_u=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Cu(Eu,n).isSelected?l.jsx(ie.span,{"aria-hidden":!0,...r,ref:t}):null});_u.displayName=Eu;var Ps="SelectScrollUpButton",hy=d.forwardRef((e,t)=>{const n=Ft(Ps,e.__scopeSelect),r=ci(Ps,e.__scopeSelect),[o,s]=d.useState(!1),i=ce(t,r.onScrollButtonChange);return ve(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;s(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?l.jsx(Ru,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});hy.displayName=Ps;var As="SelectScrollDownButton",py=d.forwardRef((e,t)=>{const n=Ft(As,e.__scopeSelect),r=ci(As,e.__scopeSelect),[o,s]=d.useState(!1),i=ce(t,r.onScrollButtonChange);return ve(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;s(f)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?l.jsx(Ru,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});py.displayName=As;var Ru=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Ft("SelectScrollButton",n),i=d.useRef(null),a=yo(n),c=d.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),ve(()=>{var f;const u=a().find(p=>p.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),l.jsx(ie.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:X(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:X(o.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:X(o.onPointerLeave,()=>{c()})})}),my="SelectSeparator",gy=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(ie.div,{"aria-hidden":!0,...r,ref:t})});gy.displayName=my;var Os="SelectArrow",vy=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=bo(n),s=$t(Os,n),i=Ft(Os,n);return s.open&&i.position==="popper"?l.jsx(Yl,{...o,...r,ref:t}):null});vy.displayName=Os;var yy="SelectBubbleInput",Tu=d.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=d.useRef(null),s=ce(r,o),i=uv(t);return d.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(a,t),a.dispatchEvent(p)}},[i,t]),l.jsx(ie.select,{...n,style:{...Zl,...n.style},ref:s,defaultValue:t})});Tu.displayName=yy;function Pu(e){return e===""||e===void 0}function Au(e){const t=tn(e),n=d.useRef(""),r=d.useRef(0),o=d.useCallback(i=>{const a=n.current+i;t(a),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),s=d.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Ou(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=by(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function by(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var wy=au,Cy=lu,xy=du,Sy=fu,Ey=hu,_y=vu,Ry=bu,Ty=xu,Py=Su,Ay=_u;const Oy="Container__xcHXp",jy="Label__0cZB9",Iy="HelperText__m1nA9",Ny="Trigger__AyFUd",Dy="TriggerIcon__aygFG",Ly="Content__llztG",My="Viewport__COtSL",ky="Item__XN1-2",$y="ItemIndicatorContainer__EQH-X",Fy="ItemIndicator__bySSc",qe={Container:Oy,Label:jy,HelperText:Iy,Trigger:Ny,TriggerIcon:Dy,Content:Ly,Viewport:My,Item:ky,ItemIndicatorContainer:$y,ItemIndicator:Fy},ju=_.forwardRef(({label:e,helperText:t,value:n,onValueChange:r,options:o,placeholder:s="Select",disabled:i=!1,className:a,name:c},u)=>l.jsxs("div",{className:N(qe.Container,a),children:[e&&l.jsx("label",{className:qe.Label,children:e}),l.jsxs(wy,{value:n,onValueChange:r,disabled:i,name:c,children:[l.jsxs(Cy,{ref:u,className:qe.Trigger,children:[l.jsx(xy,{placeholder:s}),l.jsx(Sy,{className:qe.TriggerIcon,children:l.jsx(By,{})})]}),l.jsx(Ey,{className:qe.Content,position:"popper",sideOffset:4,children:l.jsx(_y,{className:qe.Viewport,children:l.jsx(Ry,{children:o.map(f=>l.jsxs(Ty,{value:f.value,disabled:f.disabled,className:qe.Item,children:[l.jsx("div",{className:qe.ItemIndicatorContainer,children:l.jsx(Ay,{className:qe.ItemIndicator,children:l.jsx(Uy,{})})}),l.jsx(Py,{children:f.label})]},f.value))})})})]}),t&&l.jsx("div",{className:qe.HelperText,children:t})]}));ju.displayName="Select";const By=()=>l.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.52459 12.7746C6.8907 12.4085 7.4843 12.4085 7.85041 12.7746L10 14.9242L12.1496 12.7746C12.5157 12.4085 13.1093 12.4085 13.4754 12.7746C13.8415 13.1407 13.8415 13.7343 13.4754 14.1004L10.6629 16.9129C10.2968 17.279 9.7032 17.279 9.33709 16.9129L6.52459 14.1004C6.15847 13.7343 6.15847 13.1407 6.52459 12.7746Z",fill:"currentColor"}),l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.4754 7.22541C13.1093 7.59153 12.5157 7.59153 12.1496 7.22541L10 5.07583L7.85041 7.22541C7.4843 7.59153 6.8907 7.59153 6.52459 7.22541C6.15847 6.8593 6.15847 6.2657 6.52459 5.89959L9.33709 3.08709C9.7032 2.72097 10.2968 2.72097 10.6629 3.08709L13.4754 5.89959C13.8415 6.2657 13.8415 6.8593 13.4754 7.22541Z",fill:"currentColor"})]}),Uy=()=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Wy="TextArea__pa-A0",Hy={TextArea:Wy},Iu=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(Hy.TextArea,t);return l.jsx("textarea",{ref:r,className:o,...n,children:e})});Iu.displayName="TextArea";function Vy(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var kn=e=>{const{present:t,children:n}=e,r=zy(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),s=ce(r.ref,qy(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:s}):null};kn.displayName="Presence";function zy(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),s=d.useRef("none"),i=e?"mounted":"unmounted",[a,c]=Vy(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Pr(r.current);s.current=a==="mounted"?u:"none"},[a]),ve(()=>{const u=r.current,f=o.current;if(f!==e){const m=s.current,g=Pr(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ve(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=g=>{const h=Pr(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&h&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},m=g=>{g.target===t&&(s.current=Pr(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:d.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Pr(e){return(e==null?void 0:e.animationName)||"none"}function qy(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gy=Symbol("radix.slottable");function Ky(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Gy,t}var[wo]=ir("Tooltip",[mo]),Co=mo(),Nu="TooltipProvider",Qy=700,js="tooltip.open",[Yy,li]=wo(Nu),Du=e=>{const{__scopeTooltip:t,delayDuration:n=Qy,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=d.useRef(!0),a=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(Yy,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:d.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:s})};Du.displayName=Nu;var Kn="Tooltip",[Zy,cr]=wo(Kn),Lu=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=li(Kn,e.__scopeTooltip),u=Co(t),[f,p]=d.useState(null),m=Zt(),g=d.useRef(0),x=i??c.disableHoverableContent,h=a??c.delayDuration,v=d.useRef(!1),[y,w]=Zr({prop:r,defaultProp:o??!1,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(js))):c.onClose(),s==null||s(P)},caller:Kn}),S=d.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),E=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,w(!0)},[w]),R=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,w(!1)},[w]),T=d.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,w(!0),g.current=0},h)},[h,w]);return d.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),l.jsx(Gl,{...u,children:l.jsx(Zy,{scope:t,contentId:m,open:y,stateAttribute:S,trigger:f,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?T():E()},[c.isOpenDelayedRef,T,E]),onTriggerLeave:d.useCallback(()=>{x?R():(window.clearTimeout(g.current),g.current=0)},[R,x]),onOpen:E,onClose:R,disableHoverableContent:x,children:n})})};Lu.displayName=Kn;var Is="TooltipTrigger",Mu=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=cr(Is,n),s=li(Is,n),i=Co(n),a=d.useRef(null),c=ce(t,a,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),p=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(Kl,{asChild:!0,...i,children:l.jsx(ie.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:X(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:X(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:X(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:X(e.onBlur,o.onClose),onClick:X(e.onClick,o.onClose)})})});Mu.displayName=Is;var ui="TooltipPortal",[Xy,Jy]=wo(ui,{forceMount:void 0}),ku=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=cr(ui,t);return l.jsx(Xy,{scope:t,forceMount:n,children:l.jsx(kn,{present:n||s.open,children:l.jsx(ii,{asChild:!0,container:o,children:r})})})};ku.displayName=ui;var On="TooltipContent",$u=d.forwardRef((e,t)=>{const n=Jy(On,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=cr(On,e.__scopeTooltip);return l.jsx(kn,{present:r||i.open,children:i.disableHoverableContent?l.jsx(Fu,{side:o,...s,ref:t}):l.jsx(e0,{side:o,...s,ref:t})})}),e0=d.forwardRef((e,t)=>{const n=cr(On,e.__scopeTooltip),r=li(On,e.__scopeTooltip),o=d.useRef(null),s=ce(t,o),[i,a]=d.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:p}=r,m=d.useCallback(()=>{a(null),p(!1)},[p]),g=d.useCallback((x,h)=>{const v=x.currentTarget,y={x:x.clientX,y:x.clientY},w=o0(y,v.getBoundingClientRect()),S=s0(y,w),E=i0(h.getBoundingClientRect()),R=c0([...S,...E]);a(R),p(!0)},[p]);return d.useEffect(()=>()=>m(),[m]),d.useEffect(()=>{if(c&&f){const x=v=>g(v,f),h=v=>g(v,c);return c.addEventListener("pointerleave",x),f.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",x),f.removeEventListener("pointerleave",h)}}},[c,f,g,m]),d.useEffect(()=>{if(i){const x=h=>{const v=h.target,y={x:h.clientX,y:h.clientY},w=(c==null?void 0:c.contains(v))||(f==null?void 0:f.contains(v)),S=!a0(y,i);w?m():S&&(m(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,f,i,u,m]),l.jsx(Fu,{...e,ref:s})}),[t0,n0]=wo(Kn,{isInside:!1}),r0=Ky("TooltipContent"),Fu=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=cr(On,n),u=Co(n),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(js,f),()=>document.removeEventListener(js,f)),[f]),d.useEffect(()=>{if(c.trigger){const p=m=>{const g=m.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),l.jsx(lo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs(Ql,{"data-state":c.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(r0,{children:r}),l.jsx(t0,{scope:n,isInside:!0,children:l.jsx(fv,{id:c.contentId,role:"tooltip",children:o||r})})]})})});$u.displayName=On;var Bu="TooltipArrow",Uu=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Co(n);return n0(Bu,n).isInside?null:l.jsx(Yl,{...o,...r,ref:t})});Uu.displayName=Bu;function o0(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function s0(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function i0(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function a0(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],c=t[i],u=a.x,f=a.y,p=c.x,m=c.y;f>r!=m>r&&n<(p-u)*(r-f)/(m-f)+u&&(o=!o)}return o}function c0(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),l0(t)}function l0(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var u0=Du,d0=Lu,f0=Mu,h0=ku,p0=$u,m0=Uu;const g0="tooltip__nUuSh",v0="tooltipArrow__W2w-f",Va={tooltip:g0,tooltipArrow:v0},jn=({children:e,open:t,displayName:n,tooltipContent:r,className:o,disabled:s,delayDuration:i=300,side:a="right",sideOffset:c=0})=>{const[u,f]=_.useState(!1),p=t!==void 0,g=s?!1:p?t:u,x=h=>{s||p||f(h)};return l.jsx(u0,{delayDuration:i,children:l.jsxs(d0,{open:g,onOpenChange:x,children:[l.jsx(f0,{asChild:!0,children:e}),l.jsx(h0,{children:l.jsxs(p0,{className:N(Va.tooltip,o),side:a,sideOffset:c,children:[n,r,l.jsx(m0,{className:Va.tooltipArrow})]})})]})})};jn.displayName="Tooltip";const y0="truncatedText__Y-jSd",b0="overflowing__o8TC-",za={truncatedText:y0,overflowing:b0},Wu=({children:e,className:t,tooltipSide:n="top",tooltipClassName:r})=>{const o=_.useRef(null),[s,i]=_.useState(!1);_.useEffect(()=>{const c=()=>{if(o.current){const u=o.current.scrollWidth>o.current.clientWidth;i(u)}};return c(),window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c)}},[e]);const a=l.jsx("span",{ref:o,className:N(za.truncatedText,s?za.overflowing:"",t||""),children:e});return s?l.jsx(jn,{tooltipContent:e,side:n,className:r,children:a}):a};Wu.displayName="TextWithTooltip";const w0="SearchInput__4OFyE",C0="SearchIcon__YgnQy",x0="ClearIcon__ukRVr",S0="SearchInput__ClearIcon__uzVoc",E0="SearchInput__SearchIcon__zoDG4",Fn={SearchInput:w0,SearchIcon:C0,ClearIcon:x0,SearchInput__ClearIcon:S0,SearchInput__SearchIcon:E0},di=_.forwardRef(({className:e,placeholder:t="Type to search...",showClearButton:n=!1,showSearchIcon:r=!0,onClear:o,...s},i)=>{const a=N(Fn.SearchInput,n&&Fn.SearchInput__ClearIcon,r&&Fn.SearchInput__SearchIcon,e),c=N(Fn.SearchIcon),u=N(Fn.ClearIcon);return l.jsxs("div",{className:a,children:[l.jsx(co,{ref:i,type:"text",placeholder:t,...s}),r&&l.jsx("svg",{className:c,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M13 13L10.6667 10.6667M12.3333 6.66667C12.3333 9.79628 9.79628 12.3333 6.66667 12.3333C3.53705 12.3333 1 9.79628 1 6.66667C1 3.53705 3.53705 1 6.66667 1C9.79628 1 12.3333 3.53705 12.3333 6.66667Z",stroke:"#A4A4A4",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),n&&l.jsx("svg",{className:u,width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:o,children:l.jsx("path",{d:"M7.33334 0.666748L0.666672 7.33341M0.666672 0.666748L7.33334 7.33341",stroke:"#818181",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})]})});di.displayName="SearchInput";const _0="SearchAutocomplete__vR9Hk",R0="AutocompleteItem__YIm7R",T0="AutocompleteHighlighter__LAFTV",P0="AutocompleteHighlighter__match__Wy1o2",A0="DropdownList__-fHIk",O0="AutocompleteItemDescription__4QYN5",Xt={SearchAutocomplete:_0,AutocompleteItem:R0,"AutocompleteItem--canBeSelected":"AutocompleteItem--canBeSelected__jxk4z",AutocompleteHighlighter:T0,AutocompleteHighlighter__match:P0,DropdownList:A0,AutocompleteItemDescription:O0},j0="DropdownList__QTXXX",I0="DropdownList__QTXXX",N0="DropdownList--closed__pdL1Z",D0="DropdownList--open__opzc9",L0="DropdownList--left__xSwXR",Wt={DropdownList:j0,dropdownList:I0,"DropdownList--closed":"DropdownList--closed__pdL1Z",dropdownListClosed:N0,"DropdownList--open":"DropdownList--open__opzc9",dropdownListOpen:D0,"DropdownList--left":"DropdownList--left__xSwXR",dropdownListLeft:L0},xo=_.forwardRef(({children:e,className:t,open:n,align:r="right",...o},s)=>{const i=N(Wt.DropdownList,{[Wt["DropdownList--open"]]:n,[Wt["DropdownList--closed"]]:!n,[Wt["DropdownList--left"]]:r==="left"},t);return l.jsx("div",{ref:s,className:i,...o,children:e})});xo.displayName="DropdownList";const Hn=_.forwardRef(({children:e,className:t,canBeSelected:n=!1,...r},o)=>{const s=N(Xt.AutocompleteItem,{[Xt["AutocompleteItem--canBeSelected"]]:n},t);return l.jsx("div",{ref:o,className:s,role:n?"option":void 0,...r,children:e})});Hn.displayName="AutocompleteItem";const M0=300,k0={query:"",suggestions:[],loading:!1,error:null},$0=({suggestionFetcher:e,canAdd:t})=>{const[n,r]=_.useState(k0);return _.useEffect(()=>{r(a=>({...a,loading:!0}));const s=async()=>{try{const a=await e(n.query);t&&!a.some(c=>c.value.toLowerCase()===n.query.toLowerCase())&&a.push({label:`Add "${n.query}"`,value:n.query,isNew:!0}),r(c=>({...c,suggestions:a,loading:!1}))}catch(a){r(c=>({...c,suggestions:[],error:a,loading:!1}))}},i=setTimeout(()=>{s()},M0);return()=>{clearTimeout(i)}},[n.query]),{...n,setQuery:s=>{r(i=>({...i,query:s}))}}},Hu=_.forwardRef(({text:e,query:t,className:n,...r},o)=>{const s=N(Xt.AutocompleteHighlighter,n),i=(a,c)=>{const u=a.toLowerCase().indexOf(c.toLowerCase());if(u===-1||c.length===0)return a;const f=a.slice(0,u),p=a.slice(u,u+c.length),m=a.slice(u+c.length);return l.jsxs(l.Fragment,{children:[f,l.jsx("span",{className:Xt.AutocompleteHighlighter__match,children:p}),i(m,c)]})};return l.jsx("div",{ref:o,className:s,...r,children:i(e,t)})});Hu.displayName="AutocompleteHighlighter";const F0=5,Vu=_.forwardRef(({children:e,className:t,canAdd:n,maxSuggestionsShown:r=F0,searchInputProps:o,keepSelectedOption:s,suggestionFetcher:i,onAccept:a,...c},u)=>{const{query:f,setQuery:p,suggestions:m,loading:g}=$0({suggestionFetcher:i,canAdd:n}),[x,h]=_.useState(null),v=f.length>0,y=P=>{p(P.target.value)},w=P=>{a==null||a(P),s?(h(P),p(P.value)):p("")},S=()=>{a==null||a(null),h(null),p("")},E=N(Xt.SearchAutocomplete,t),R=m.slice(0,r),T=m.slice(r);return l.jsxs("div",{ref:u,className:E,...c,children:[l.jsx(di,{...o,value:f,onChange:y,showClearButton:!!x,onClear:S}),e,l.jsxs(xo,{className:Xt.DropdownList,open:v&&!x,role:"listbox","aria-label":"Suggestions",children:[g?l.jsx(Hn,{children:"Loading..."}):R.map(P=>l.jsxs(Hn,{canBeSelected:!0,onClick:w.bind(null,P),children:[l.jsx(Hu,{text:P.label,query:f}),P.description&&l.jsx("span",{className:Xt.AutocompleteItemDescription,children:P.description})]},P.value)),!g&&T.length>0&&l.jsxs(Hn,{children:[T.length," more results"]}),v&&m.length===0&&!g&&l.jsx(Hn,{children:"No results found"})]})]})});Vu.displayName="SearchAutocomplete";const It=e=>{let t=null,n=null;return _.Children.forEach(e.children,r=>{const o=r.props.condition;o===void 0?n=r:!t&&o===!0&&(t=r)}),l.jsx(l.Fragment,{children:t||n})};It.displayName="Show";It.When=({condition:e,children:t})=>l.jsx(l.Fragment,{children:e&&t});It.Else=({render:e,children:t})=>l.jsx(l.Fragment,{children:e||t});var B0=Symbol.for("react.lazy"),Jr=d[" use ".trim().toString()];function U0(e){return typeof e=="object"&&e!==null&&"then"in e}function zu(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===B0&&"_payload"in e&&U0(e._payload)}function W0(e){const t=V0(e),n=d.forwardRef((r,o)=>{let{children:s,...i}=r;zu(s)&&typeof Jr=="function"&&(s=Jr(s._payload));const a=d.Children.toArray(s),c=a.find(q0);if(c){const u=c.props.children,f=a.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var H0=W0("Slot");function V0(e){const t=d.forwardRef((n,r)=>{let{children:o,...s}=n;if(zu(o)&&typeof Jr=="function"&&(o=Jr(o._payload)),d.isValidElement(o)){const i=K0(o),a=G0(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Nn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var z0=Symbol("radix.slottable");function q0(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z0}function G0(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function K0(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Q0="SkeletonListContainer__MKJhE",Y0="Skeleton__Ovpiw",qu={SkeletonListContainer:Q0,Skeleton:Y0},So=_.forwardRef((e,t)=>{const{children:n,className:r,loading:o,height:s=48,width:i,borderRadius:a,style:c,...u}=e;if(!o&&n)return n;const f=_.isValidElement(n)?H0:"span";return l.jsx(f,{ref:t,"aria-hidden":!0,className:N(qu.Skeleton,r),style:{...c,width:i,minWidth:i,height:s,borderRadius:a},"data-inline-skeleton":_.isValidElement(n)?void 0:!0,tabIndex:-1,...u,children:n})});So.displayName="Skeleton";const Gu=e=>{const{numberOfItems:t,itemsGap:n=2,itemProps:r}=e,o=Array.from({length:t},(s,i)=>i+1);return l.jsx("div",{className:N(qu.SkeletonListContainer),style:{gap:n},children:o.map(s=>l.jsx(So,{loading:!0,...r},s))})};Gu.displayName="SkeletonList";const Z0="spinner__qa7F6",X0="rotate__EqlXe",J0="spinner-dark__9A9-q",e2="spinner-white__gRbtI",t2="spinner-success__otWGm",n2="spinner-danger__Bq5DM",r2="spinner-warning__U900K",qa={spinner:Z0,rotate:X0,"spinner-dark":"spinner-dark__9A9-q",spinnerDark:J0,"spinner-white":"spinner-white__gRbtI",spinnerWhite:e2,"spinner-success":"spinner-success__otWGm",spinnerSuccess:t2,"spinner-danger":"spinner-danger__Bq5DM",spinnerDanger:n2,"spinner-warning":"spinner-warning__U900K",spinnerWarning:r2},Ku=({className:e,color:t="white",size:n=80,thickness:r})=>{const o=N(qa.spinner,qa[`spinner-${t}`],e),s=r??Math.max(n/12,2);return l.jsx("span",{style:{width:n,height:n,borderWidth:s},className:o})};Ku.displayName="Spinner";const o2="disabled__KpauE",s2="checked__2-JV-",i2="thumb__fEuKD",Ar={switch:"switch__0b2av",disabled:o2,checked:s2,thumb:i2},Qu=_.forwardRef(({checked:e,defaultChecked:t=!1,onCheckedChange:n,disabled:r=!1,id:o,className:s,name:i,"aria-label":a,"aria-labelledby":c,"aria-describedby":u,...f},p)=>{const[m,g]=_.useState(t),x=e!==void 0,h=x?!!e:m,v=()=>{if(r)return;const w=!h;x||g(w),n==null||n(w)},y=w=>{(w.key===" "||w.key==="Enter")&&(w.preventDefault(),v())};return l.jsx("button",{ref:p,type:"button",role:"switch","aria-checked":h,"aria-label":a,"aria-labelledby":c,"aria-describedby":u,disabled:r,id:o,name:i,className:N(Ar.switch,{[Ar.checked]:h,[Ar.disabled]:r}),onClick:v,onKeyDown:y,...f,children:l.jsx("span",{className:Ar.thumb,"aria-hidden":"true"})})});Qu.displayName="Switch";const a2="tabs-root__ELmdj",c2="tabs-list__rc10N",l2="tabs-list--horizontal__e1YW4",u2="tabs-list--vertical__huK05",d2="tabs-trigger__D8R4R",f2="tabs-trigger--disabled__ezDWc",h2="tabs-trigger--horizontal__4jBFV",p2="tabs-trigger--active__S-Z-S",m2="tabs-trigger--vertical__dNVIZ",g2="tabs-content__1d77o",Ze={tabsRoot:a2,tabsList:c2,tabsListHorizontal:l2,tabsListVertical:u2,tabsTrigger:d2,tabsTriggerDisabled:f2,tabsTriggerHorizontal:h2,tabsTriggerActive:p2,tabsTriggerVertical:m2,tabsContent:g2},Yu=_.createContext(null),fi=()=>{const e=_.useContext(Yu);if(!e)throw new Error("Tabs components must be used within a Tabs provider");return e},v2=({defaultValue:e,value:t,onValueChange:n,orientation:r="horizontal",className:o="",children:s})=>{const[i,a]=_.useState(e||""),c=t!==void 0,u=c?t:i,f=p=>{c||a(p),n==null||n(p)};return l.jsx(Yu.Provider,{value:{value:u,onValueChange:f,orientation:r},children:l.jsx("div",{className:N(Ze.tabsRoot,o),children:s})})},y2=({className:e="",children:t})=>{const{orientation:n}=fi(),r=_.useRef(null),o=s=>{var u;const i=(u=r.current)==null?void 0:u.querySelectorAll('[role="tab"]:not([disabled])');if(!i)return;const a=Array.from(i).findIndex(f=>f===document.activeElement);let c=a;switch(s.key){case"ArrowLeft":n==="horizontal"&&(s.preventDefault(),c=a>0?a-1:i.length-1);break;case"ArrowRight":n==="horizontal"&&(s.preventDefault(),c=a<i.length-1?a+1:0);break;case"ArrowUp":n==="vertical"&&(s.preventDefault(),c=a>0?a-1:i.length-1);break;case"ArrowDown":n==="vertical"&&(s.preventDefault(),c=a<i.length-1?a+1:0);break;case"Home":s.preventDefault(),c=0;break;case"End":s.preventDefault(),c=i.length-1;break}if(c!==a){const f=i[c];f.focus(),f.click()}};return l.jsx("div",{ref:r,role:"tablist","aria-orientation":n,onKeyDown:o,className:N(Ze.tabsList,n==="horizontal"?Ze.tabsListHorizontal:Ze.tabsListVertical,e),children:t})},b2=({value:e,disabled:t=!1,className:n="",children:r})=>{const{value:o,onValueChange:s,orientation:i}=fi(),a=o===e,c=()=>{t||s(e)};return l.jsx("button",{role:"tab","aria-selected":a,"aria-controls":`content-${e}`,tabIndex:a?0:-1,disabled:t,onClick:c,className:N(Ze.tabsTrigger,i==="horizontal"?Ze.tabsTriggerHorizontal:Ze.tabsTriggerVertical,a&&Ze.tabsTriggerActive,t&&Ze.tabsTriggerDisabled,n),children:r})},w2=({value:e,className:t="",children:n})=>{const{value:r}=fi();return r===e?l.jsx("div",{role:"tabpanel",id:`content-${e}`,"aria-labelledby":`trigger-${e}`,tabIndex:0,className:N(Ze.tabsContent,t),children:n}):null},Zu=({className:e,state:t="open",onClick:n})=>t==="open"?l.jsxs("svg",{className:e,onClick:n,xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",viewBox:"0 0 14 14",fill:"none",children:[l.jsx("path",{d:"M1.41174 7.41635C1.3323 7.29056 1.29257 7.22766 1.27034 7.13065C1.25364 7.05778 1.25364 6.94287 1.27034 6.87C1.29257 6.77299 1.3323 6.71009 1.41174 6.58431C2.06823 5.54482 4.02232 2.91699 7.00024 2.91699C9.97815 2.91699 11.9322 5.54482 12.5887 6.5843C12.6682 6.71009 12.7079 6.77299 12.7301 6.87C12.7468 6.94287 12.7468 7.05778 12.7301 7.13065C12.7079 7.22766 12.6682 7.29056 12.5887 7.41635C11.9322 8.45584 9.97815 11.0837 7.00024 11.0837C4.02232 11.0837 2.06823 8.45584 1.41174 7.41635Z",stroke:"#818181",strokeWidth:"1.16667",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("path",{d:"M7.00024 8.75033C7.96673 8.75033 8.75024 7.96682 8.75024 7.00033C8.75024 6.03383 7.96673 5.25033 7.00024 5.25033C6.03374 5.25033 5.25024 6.03383 5.25024 7.00033C5.25024 7.96682 6.03374 8.75033 7.00024 8.75033Z",stroke:"#818181",strokeWidth:"1.16667",strokeLinecap:"round",strokeLinejoin:"round"})]}):l.jsx("svg",{className:e,onClick:n,xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",viewBox:"0 0 14 14",fill:"none",children:l.jsx("path",{d:"M6.26672 2.97052C6.50379 2.93547 6.74835 2.91667 7.00024 2.91667C9.97816 2.91667 11.9323 5.54449 12.5887 6.58398C12.6682 6.70979 12.7079 6.7727 12.7302 6.86973C12.7469 6.94259 12.7468 7.05755 12.7301 7.13042C12.7079 7.22744 12.6679 7.29077 12.5879 7.41741C12.413 7.69425 12.1463 8.08331 11.793 8.50527M3.92252 3.9171C2.66131 4.77266 1.8051 5.9613 1.41231 6.58308C1.3325 6.70942 1.29259 6.7726 1.27035 6.86961C1.25364 6.94248 1.25363 7.05742 1.27033 7.13029C1.29257 7.22731 1.33229 7.29022 1.41174 7.41602C2.06823 8.45551 4.02232 11.0833 7.00024 11.0833C8.20098 11.0833 9.23526 10.6561 10.0851 10.078M1.75024 1.75L12.2502 12.25M5.76281 5.76256C5.44612 6.07925 5.25024 6.51675 5.25024 7C5.25024 7.9665 6.03374 8.75 7.00024 8.75C7.48349 8.75 7.92099 8.55413 8.23768 8.23744",stroke:"#818181",strokeWidth:"1.16667",strokeLinecap:"round",strokeLinejoin:"round"})}),C2="PasswordInput__GDJDN",x2="eyeIcon__kDExG",Ga={PasswordInput:C2,eyeIcon:x2},S2=_.forwardRef((e,t)=>{const[n,r]=_.useState("password"),o=_.useCallback(()=>{r(s=>s==="password"?"text":"password")},[r]);return l.jsxs("div",{className:N(Ga.PasswordInput,e.className),children:[l.jsx(co,{type:n,...e,ref:t}),l.jsx(Zu,{className:Ga.eyeIcon,onClick:o,state:n==="password"?"open":"closed"})]})});function E2(e){const t=_2(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),c=a.find(T2);if(c){const u=c.props.children,f=a.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function _2(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=A2(o),a=P2(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Nn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var R2=Symbol("radix.slottable");function T2(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===R2}function P2(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function A2(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Eo="Dialog",[Xu]=ir(Eo),[O2,He]=Xu(Eo),Ju=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=d.useRef(null),c=d.useRef(null),[u,f]=Zr({prop:r,defaultProp:o??!1,onChange:s,caller:Eo});return l.jsx(O2,{scope:t,triggerRef:a,contentRef:c,contentId:Zt(),titleId:Zt(),descriptionId:Zt(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(p=>!p),[f]),modal:i,children:n})};Ju.displayName=Eo;var ed="DialogTrigger",j2=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(ed,n),s=ce(t,o.triggerRef);return l.jsx(ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":mi(o.open),...r,ref:s,onClick:X(e.onClick,o.onOpenToggle)})});j2.displayName=ed;var hi="DialogPortal",[I2,td]=Xu(hi,{forceMount:void 0}),nd=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=He(hi,t);return l.jsx(I2,{scope:t,forceMount:n,children:d.Children.map(r,i=>l.jsx(kn,{present:n||s.open,children:l.jsx(ii,{asChild:!0,container:o,children:i})}))})};nd.displayName=hi;var eo="DialogOverlay",rd=d.forwardRef((e,t)=>{const n=td(eo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=He(eo,e.__scopeDialog);return s.modal?l.jsx(kn,{present:r||s.open,children:l.jsx(D2,{...o,ref:t})}):null});rd.displayName=eo;var N2=E2("DialogOverlay.RemoveScroll"),D2=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(eo,n);return l.jsx(ai,{as:N2,allowPinchZoom:!0,shards:[o.contentRef],children:l.jsx(ie.div,{"data-state":mi(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),sn="DialogContent",od=d.forwardRef((e,t)=>{const n=td(sn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=He(sn,e.__scopeDialog);return l.jsx(kn,{present:r||s.open,children:s.modal?l.jsx(L2,{...o,ref:t}):l.jsx(M2,{...o,ref:t})})});od.displayName=sn;var L2=d.forwardRef((e,t)=>{const n=He(sn,e.__scopeDialog),r=d.useRef(null),o=ce(t,n.contentRef,r);return d.useEffect(()=>{const s=r.current;if(s)return eu(s)},[]),l.jsx(sd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:X(e.onFocusOutside,s=>s.preventDefault())})}),M2=d.forwardRef((e,t)=>{const n=He(sn,e.__scopeDialog),r=d.useRef(!1),o=d.useRef(!1);return l.jsx(sd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),sd=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=He(sn,n),c=d.useRef(null),u=ce(t,c);return El(),l.jsxs(l.Fragment,{children:[l.jsx(Zs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:l.jsx(lo,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":mi(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(k2,{titleId:a.titleId}),l.jsx(F2,{contentRef:c,descriptionId:a.descriptionId})]})]})}),pi="DialogTitle",id=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(pi,n);return l.jsx(ie.h2,{id:o.titleId,...r,ref:t})});id.displayName=pi;var ad="DialogDescription",cd=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(ad,n);return l.jsx(ie.p,{id:o.descriptionId,...r,ref:t})});cd.displayName=ad;var ld="DialogClose",ud=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(ld,n);return l.jsx(ie.button,{type:"button",...r,ref:t,onClick:X(e.onClick,()=>o.onOpenChange(!1))})});ud.displayName=ld;function mi(e){return e?"open":"closed"}var dd="DialogTitleWarning",[$b,fd]=J1(dd,{contentName:sn,titleName:pi,docsSlug:"dialog"}),k2=({titleId:e})=>{const t=fd(dd),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
248
|
+
`)},Ym=0,fn=[];function Zm(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(Ym++)[0],s=d.useState(bl)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Ur([e.lockRef.current],(e.shards||[]).map(Ta),!0).filter(Boolean);return h.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=d.useCallback(function(h,v){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var y=_r(h),b=n.current,S="deltaX"in h?h.deltaX:b[0]-y[0],E="deltaY"in h?h.deltaY:b[1]-y[1],R,T=h.target,P=Math.abs(S)>Math.abs(E)?"h":"v";if("touches"in h&&P==="h"&&T.type==="range")return!1;var D=window.getSelection(),I=D&&D.anchorNode,L=I?I===T||I.contains(T):!1;if(L)return!1;var B=_a(P,T);if(!B)return!0;if(B?R=P:(R=P==="v"?"h":"v",B=_a(P,T)),!B)return!1;if(!r.current&&"changedTouches"in h&&(S||E)&&(r.current=R),!R)return!0;var U=r.current||R;return Gm(U,v,h,U==="h"?S:E)},[]),c=d.useCallback(function(h){var v=h;if(!(!fn.length||fn[fn.length-1]!==s)){var y="deltaY"in v?Ra(v):_r(v),b=t.current.filter(function(R){return R.name===v.type&&(R.target===v.target||v.target===R.shadowParent)&&Km(R.delta,y)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var S=(i.current.shards||[]).map(Ta).filter(Boolean).filter(function(R){return R.contains(v.target)}),E=S.length>0?a(v,S[0]):!i.current.noIsolation;E&&v.cancelable&&v.preventDefault()}}},[]),u=d.useCallback(function(h,v,y,b){var S={name:h,delta:v,target:y,should:b,shadowParent:Xm(y)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(E){return E!==S})},1)},[]),f=d.useCallback(function(h){n.current=_r(h),r.current=void 0},[]),p=d.useCallback(function(h){u(h.type,Ra(h),h.target,a(h,e.lockRef.current))},[]),m=d.useCallback(function(h){u(h.type,_r(h),h.target,a(h,e.lockRef.current))},[]);d.useEffect(function(){return fn.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",c,dn),document.addEventListener("touchmove",c,dn),document.addEventListener("touchstart",f,dn),function(){fn=fn.filter(function(h){return h!==s}),document.removeEventListener("wheel",c,dn),document.removeEventListener("touchmove",c,dn),document.removeEventListener("touchstart",f,dn)}},[]);var g=e.removeScrollBar,x=e.inert;return d.createElement(d.Fragment,null,x?d.createElement(s,{styles:Qm(o)}):null,g?d.createElement(Bm,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Xm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jm=Tm(yl,Zm);var Xs=d.forwardRef(function(e,t){return d.createElement(uo,Ye({},e,{ref:t,sideCar:Jm}))});Xs.classNames=uo.classNames;var eg=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},hn=new WeakMap,Rr=new WeakMap,Tr={},Wo=0,Sl=function(e){return e&&(e.host||Sl(e.parentNode))},tg=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Sl(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ng=function(e,t,n,r){var o=tg(t,Array.isArray(e)?e:[e]);Tr[n]||(Tr[n]=new WeakMap);var s=Tr[n],i=[],a=new Set,c=new Set(o),u=function(p){!p||a.has(p)||(a.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(a.has(m))f(m);else try{var g=m.getAttribute(r),x=g!==null&&g!=="false",h=(hn.get(m)||0)+1,v=(s.get(m)||0)+1;hn.set(m,h),s.set(m,v),i.push(m),h===1&&x&&Rr.set(m,!0),v===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return f(t),a.clear(),Wo++,function(){i.forEach(function(p){var m=hn.get(p)-1,g=s.get(p)-1;hn.set(p,m),s.set(p,g),m||(Rr.has(p)||p.removeAttribute(r),Rr.delete(p)),g||p.removeAttribute(n)}),Wo--,Wo||(hn=new WeakMap,hn=new WeakMap,Rr=new WeakMap,Tr={})}},El=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=eg(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),ng(r,o,n,"aria-hidden")):function(){return null}};function rg(e){const t=og(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),c=a.find(ig);if(c){const u=c.props.children,f=a.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function og(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=cg(o),a=ag(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Nn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sg=Symbol("radix.slottable");function ig(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sg}function ag(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function cg(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fo="Dialog",[_l]=ir(fo),[lg,He]=_l(fo),Rl=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=d.useRef(null),c=d.useRef(null),[u,f]=Kr({prop:r,defaultProp:o??!1,onChange:s,caller:fo});return l.jsx(lg,{scope:t,triggerRef:a,contentRef:c,contentId:Zt(),titleId:Zt(),descriptionId:Zt(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(p=>!p),[f]),modal:i,children:n})};Rl.displayName=fo;var Tl="DialogTrigger",ug=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Tl,n),s=ce(t,o.triggerRef);return l.jsx(ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ti(o.open),...r,ref:s,onClick:X(e.onClick,o.onOpenToggle)})});ug.displayName=Tl;var Js="DialogPortal",[dg,Pl]=_l(Js,{forceMount:void 0}),Al=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=He(Js,t);return l.jsx(dg,{scope:t,forceMount:n,children:d.Children.map(r,i=>l.jsx(Dn,{present:n||s.open,children:l.jsx(Zs,{asChild:!0,container:o,children:i})}))})};Al.displayName=Js;var Qr="DialogOverlay",Ol=d.forwardRef((e,t)=>{const n=Pl(Qr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=He(Qr,e.__scopeDialog);return s.modal?l.jsx(Dn,{present:r||s.open,children:l.jsx(hg,{...o,ref:t})}):null});Ol.displayName=Qr;var fg=rg("DialogOverlay.RemoveScroll"),hg=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Qr,n);return l.jsx(Xs,{as:fg,allowPinchZoom:!0,shards:[o.contentRef],children:l.jsx(ie.div,{"data-state":ti(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),nn="DialogContent",jl=d.forwardRef((e,t)=>{const n=Pl(nn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=He(nn,e.__scopeDialog);return l.jsx(Dn,{present:r||s.open,children:s.modal?l.jsx(pg,{...o,ref:t}):l.jsx(mg,{...o,ref:t})})});jl.displayName=nn;var pg=d.forwardRef((e,t)=>{const n=He(nn,e.__scopeDialog),r=d.useRef(null),o=ce(t,n.contentRef,r);return d.useEffect(()=>{const s=r.current;if(s)return El(s)},[]),l.jsx(Il,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:X(e.onFocusOutside,s=>s.preventDefault())})}),mg=d.forwardRef((e,t)=>{const n=He(nn,e.__scopeDialog),r=d.useRef(!1),o=d.useRef(!1);return l.jsx(Il,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Il=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=He(nn,n),c=d.useRef(null),u=ce(t,c);return gl(),l.jsxs(l.Fragment,{children:[l.jsx(Ys,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:l.jsx(lo,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ti(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(gg,{titleId:a.titleId}),l.jsx(yg,{contentRef:c,descriptionId:a.descriptionId})]})]})}),ei="DialogTitle",Nl=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(ei,n);return l.jsx(ie.h2,{id:o.titleId,...r,ref:t})});Nl.displayName=ei;var Dl="DialogDescription",Ll=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Dl,n);return l.jsx(ie.p,{id:o.descriptionId,...r,ref:t})});Ll.displayName=Dl;var Ml="DialogClose",kl=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Ml,n);return l.jsx(ie.button,{type:"button",...r,ref:t,onClick:X(e.onClick,()=>o.onOpenChange(!1))})});kl.displayName=Ml;function ti(e){return e?"open":"closed"}var $l="DialogTitleWarning",[$b,Fl]=F1($l,{contentName:nn,titleName:ei,docsSlug:"dialog"}),gg=({titleId:e})=>{const t=Fl($l),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
249
249
|
|
|
250
250
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
251
251
|
|
|
252
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},$2="DialogDescriptionWarning",F2=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fd($2).contentName}}.`;return d.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},B2=Ju,U2=nd,W2=rd,H2=od,V2=id,z2=cd,q2=ud;const G2="Overlay__M5Z83",K2="Content__wAkP4",Ka={Overlay:G2,Content:K2},Q2="Header__VHxNf",Y2="Content__I04qM",Z2="Close__xSN-7",X2="Title__Dznh6",J2="Footer__-8gzQ",e3="Actions__kKF2Q",cn={Header:Q2,Content:Y2,Close:Z2,Title:X2,Footer:J2,Actions:e3},hd=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(cn.Header,t);return l.jsx("div",{ref:r,className:o,...n,children:e})});hd.displayName="Header";const pd=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(cn.Content,t);return l.jsx("div",{ref:r,className:o,...n,children:e})});pd.displayName="Content";const md=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(cn.Footer,t);return l.jsx("div",{ref:r,className:o,...n,children:e})});md.displayName="Footer";const gd=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(cn.Title,t);return l.jsx(V2,{ref:r,className:o,...n,children:e})});gd.displayName="Title";const vd=_.forwardRef(({className:e,...t},n)=>{const r=N(cn.Close,e);return l.jsx(q2,{ref:n,asChild:!0,className:r,...t,children:l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M11 1L1 11M1 1L11 11",stroke:"#A9A9A9",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})});vd.displayName="Close";const yd=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(cn.Actions,t);return l.jsx("div",{ref:r,className:o,...n,children:e})});yd.displayName="Actions";const bd=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(cn.Description,t);return l.jsx("div",{ref:r,className:o,...n,children:e})});bd.displayName="Description";const ge=({children:e,onClose:t,open:n=!1,className:r,zIndexLevel:o=0})=>{const s=()=>{t==null||t()},i={zIndex:`calc(var(--platform-modal-layer) + ${o*2})`},a={zIndex:`calc(var(--platform-modal-layer) + ${o*2+1})`};return l.jsx(B2,{onOpenChange:s,open:n,children:l.jsxs(U2,{children:[l.jsx(W2,{className:Ka.Overlay,style:i}),l.jsxs(H2,{children:[l.jsx(z2,{}),l.jsx("div",{className:N(Ka.Content,r),style:a,children:e})]})]})})};ge.displayName="Dialog";ge.Header=hd;ge.Content=pd;ge.Footer=md;ge.Actions=yd;ge.Title=gd;ge.Description=bd;ge.Close=vd;const t3="pill__vtGwB",n3="pill--solid__F-mR4",r3="pill--outline__gC-mh",Qa={pill:t3,"pill--solid":"pill--solid__F-mR4",pillSolid:n3,"pill--outline":"pill--outline__gC-mh",pillOutline:r3},o3=({children:e,variant:t="solid",className:n})=>{const r=N(Qa.pill,Qa[`pill--${t}`],n);return l.jsx("div",{className:r,children:e})},s3="DialogContent__-WjG9",i3="Message__AUgVP",Ya={DialogContent:s3,Message:i3},wd=({loading:e,title:t,children:n,className:r,onClose:o,onConfirm:s,zIndexLevel:i=1,...a})=>l.jsxs(ge,{...a,zIndexLevel:i,className:N(Ya.DialogContent,r),children:[l.jsxs(ge.Header,{children:[l.jsx(ge.Title,{children:t}),l.jsx(ge.Close,{onClick:o})]}),l.jsx(ge.Content,{children:typeof n=="string"?l.jsx("p",{className:Ya.Message,children:n}):n}),l.jsx(ge.Footer,{children:l.jsxs(ge.Actions,{children:[l.jsx(qr,{onClick:o,disabled:e,variant:"outlined",children:"Cancel"}),l.jsx(qr,{onClick:s,disabled:e,loading:e,variant:"contained",children:"Confirm"})]})})]});wd.displayName="ConfirmDialog";const a3="container__AjtYJ",c3="title__A2vCu",l3="description__bP6Ig",u3="mailToText__SdlsE",Or={container:a3,title:c3,description:l3,mailToText:u3},Cd=()=>l.jsxs("svg",{width:"200",height:"200",viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M184.415 152.221C183.936 151.406 183.401 150.621 182.892 149.824C181.61 147.817 180.327 145.809 179.045 143.801C177.102 140.759 175.159 137.717 173.215 134.676C170.766 130.841 168.316 127.006 165.866 123.171C163.068 118.79 160.27 114.41 157.472 110.03C154.484 105.352 151.496 100.674 148.508 95.9965C145.474 91.2464 142.439 86.4963 139.405 81.7463C136.513 77.2189 133.621 72.6915 130.729 68.1641C128.123 64.084 125.517 60.0039 122.91 55.9238C120.748 52.5389 118.586 49.1541 116.424 45.7692C114.864 43.3273 113.304 40.8854 111.744 38.4436C110.943 37.1899 110.142 35.9362 109.342 34.6825C108.765 33.7802 108.096 32.9744 107.292 32.2572C104.604 29.8584 100.572 29.2302 97.2301 30.5252C94.5951 31.5463 92.6177 33.3853 91.0923 35.7373C90.8768 36.0696 90.6658 36.405 90.4526 36.7387C89.3951 38.3941 88.3378 40.0494 87.2803 41.7049C85.5124 44.4725 83.7444 47.2402 81.9765 50.0079C79.644 53.6594 77.3114 57.3111 74.9788 60.9626C72.2632 65.2138 69.5477 69.465 66.8321 73.7162C63.8817 78.3349 60.9313 82.9536 57.9811 87.5722C54.9542 92.3106 51.9274 97.0491 48.9006 101.787C45.9557 106.398 43.0107 111.008 40.0658 115.618C37.3487 119.872 34.6316 124.125 31.9145 128.379C29.6106 131.986 27.3067 135.592 25.0028 139.199C23.2565 141.933 21.5101 144.667 19.7639 147.4C18.7335 149.013 17.7031 150.626 16.6728 152.239C14.8665 155.067 13.7231 158.171 14.23 161.595C14.9672 166.576 19.2366 170.131 24.2215 170.137C25.559 170.139 26.8963 170.137 28.2338 170.137C30.9198 170.137 33.6058 170.137 36.2918 170.137C40.0725 170.137 43.8533 170.137 47.6341 170.137C52.2557 170.137 56.8772 170.137 61.4989 170.137C66.7339 170.137 71.969 170.137 77.204 170.137C82.7467 170.137 88.2894 170.137 93.8322 170.137C99.4529 170.137 105.074 170.137 110.694 170.137C116.139 170.137 121.584 170.137 127.029 170.137C132.044 170.137 137.06 170.137 142.075 170.137C146.425 170.137 150.776 170.137 155.127 170.137C158.516 170.137 161.904 170.137 165.293 170.137C167.49 170.137 169.686 170.137 171.883 170.137C172.633 170.137 173.384 170.137 174.135 170.137C178.404 170.087 182.136 167.627 184.212 163.932C186.248 160.307 186.562 155.866 184.415 152.221ZM94.0937 37.3471C94.0897 37.3539 94.0862 37.3597 94.0824 37.3661C94.0826 37.3652 94.0831 37.3642 94.0833 37.3632C94.0844 37.3581 94.0909 37.3518 94.0937 37.3471ZM178.584 164.489C178.476 164.538 178.524 164.516 178.584 164.489V164.489ZM180.937 162.79C180.979 162.72 181.118 162.485 181.127 162.498C181.145 162.528 181.058 162.647 180.937 162.79ZM181.821 160.333C181.806 160.446 181.782 160.646 181.773 160.697C181.736 160.919 181.686 161.139 181.637 161.359C181.637 161.359 181.637 161.359 181.637 161.359C181.629 161.377 181.621 161.399 181.61 161.426C181.54 161.604 181.472 161.785 181.406 161.965C181.402 161.977 181.398 161.988 181.394 161.999C181.304 162.16 181.219 162.323 181.123 162.481C181.074 162.562 181.016 162.641 180.97 162.724C180.949 162.762 180.936 162.785 180.93 162.798C180.727 163.035 180.436 163.332 180.388 163.385C180.696 163.049 180.535 163.229 180.318 163.42C180.172 163.548 180.018 163.666 179.869 163.79C179.848 163.807 179.831 163.822 179.816 163.835C179.797 163.845 179.775 163.857 179.747 163.873C179.576 163.97 179.411 164.078 179.238 164.171C179.043 164.277 178.844 164.373 178.642 164.463C178.556 164.494 178.471 164.526 178.384 164.553C177.532 164.819 176.835 164.945 176.084 164.954C175.296 164.954 174.508 164.954 173.719 164.954C171.519 164.954 169.318 164.954 167.118 164.954C163.751 164.954 160.385 164.954 157.019 164.954C152.756 164.954 148.493 164.954 144.231 164.954C139.275 164.954 134.319 164.954 129.364 164.954C123.981 164.954 118.598 164.954 113.215 164.954C107.651 164.954 102.086 164.954 96.5224 164.954C91.024 164.954 85.5255 164.954 80.0271 164.954C74.8407 164.954 69.6543 164.954 64.4679 164.954C59.8401 164.954 55.2123 164.954 50.5846 164.954C46.7784 164.954 42.9721 164.954 39.166 164.954C36.3891 164.954 33.6122 164.954 30.8354 164.954C29.3555 164.954 27.8756 164.954 26.3957 164.954C25.9641 164.954 25.534 164.958 25.1029 164.922C23.4511 164.785 22.11 164.207 20.7626 163.127C20.3445 162.792 19.7301 162.074 19.3142 161.434C19.2096 161.273 19.1102 161.109 19.0161 160.942C18.9707 160.861 18.8013 160.534 18.8105 160.558C18.7451 160.414 18.5329 159.846 18.4422 159.537C18.3467 159.211 18.2692 158.879 18.2129 158.544C18.2174 158.545 18.1876 158.285 18.1815 158.192C18.1669 157.964 18.1617 157.736 18.1651 157.508C18.166 157.455 18.1793 157.245 18.185 157.131C18.2055 157.005 18.2441 156.74 18.2591 156.662C18.2913 156.493 18.3319 156.326 18.3726 156.16C18.2821 156.539 18.4099 156.072 18.4891 155.866C18.518 155.79 18.6652 155.487 18.6846 155.432C18.7383 155.339 18.7932 155.243 18.8125 155.21C18.8692 155.114 18.9282 155.019 18.9875 154.924C19.0003 154.904 19.0137 154.884 19.0265 154.863C19.2211 154.554 19.4201 154.247 19.617 153.939C20.6335 152.348 21.6501 150.756 22.6667 149.165C24.3869 146.472 26.107 143.779 27.8271 141.086C30.0848 137.552 32.3425 134.017 34.6001 130.483C37.2646 126.312 39.9291 122.141 42.5935 117.97C45.5011 113.418 48.4086 108.866 51.3161 104.315C54.3131 99.6229 57.31 94.9312 60.3069 90.2397C63.2394 85.6489 66.172 81.058 69.1045 76.4672C71.819 72.2178 74.5334 67.9683 77.2479 63.719C79.5904 60.0517 81.9331 56.3844 84.2756 52.7172C86.0852 49.8842 87.8948 47.0513 89.7044 44.2184C90.8459 42.4315 91.9873 40.6446 93.1287 38.8578C93.3976 38.4368 93.6701 38.0178 93.9356 37.5945C93.9507 37.5705 93.9737 37.5416 93.9972 37.511C93.8744 37.7231 94.1597 37.2638 94.301 37.0921C94.4017 36.9695 94.5483 36.8114 94.5423 36.8113C94.6372 36.721 94.7333 36.6319 94.8323 36.546C94.9866 36.4121 95.1478 36.2876 95.3084 36.1615C94.9392 36.4513 95.3917 36.1121 95.5441 36.0212C96.7591 35.2961 98.1095 34.9498 99.7068 35.0725C101.356 35.1993 102.702 35.7434 104.07 36.8307C104.685 37.3192 105.311 38.1542 105.817 38.9457C106.592 40.1592 107.367 41.3727 108.142 42.5862C109.667 44.9733 111.192 47.3605 112.717 49.7476C114.838 53.0679 116.959 56.3881 119.08 59.7083C121.629 63.6999 124.179 67.6913 126.729 71.6829C129.579 76.1455 132.43 80.6082 135.281 85.0709C138.267 89.7458 141.253 94.4206 144.239 99.0955C147.207 103.742 150.176 108.388 153.144 113.035C155.94 117.412 158.736 121.789 161.532 126.167C164.002 130.034 166.473 133.902 168.943 137.769C170.935 140.886 172.926 144.003 174.917 147.12C176.27 149.239 177.623 151.357 178.976 153.475C179.551 154.376 180.134 155.272 180.702 156.177C181.138 156.872 181.311 157.219 181.54 157.972C181.6 158.167 181.652 158.363 181.697 158.561C181.711 158.623 181.759 158.873 181.78 158.97C181.787 159.063 181.815 159.319 181.819 159.383C181.831 159.579 181.836 159.775 181.834 159.972C181.834 160.022 181.825 160.217 181.821 160.333Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M98.5821 122.507C99.019 122.759 99.6307 122.629 100.038 122.389C101.205 121.703 101.925 120.275 102.041 118.92C103.115 106.361 106.514 75.1051 106.514 68.3062C106.514 59.902 92.8134 60.6835 92.0664 71.3279C91.6887 76.7103 97.5083 119.581 97.8266 121.187C97.9188 121.652 98.1423 122.253 98.5821 122.507Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M101.841 133.945C101.826 133.94 101.812 133.934 101.797 133.929C98.2767 132.6 94.4012 134.976 93.9964 138.717C93.9765 138.901 93.9636 139.086 93.958 139.272C93.8552 142.712 96.4467 146.126 99.8464 146.664C103.245 147.201 106.896 144.494 107.099 141.059C107.285 137.909 104.789 135.072 101.841 133.945Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M161.729 131.662C161.873 131.367 162.082 130.81 161.71 130.584C161.365 130.375 160.901 130.836 160.768 131.107C156.804 139.201 152.84 147.295 148.877 155.389C147.759 157.67 146.642 159.952 145.525 162.233C145.38 162.528 145.171 163.085 145.543 163.311C145.888 163.52 146.352 163.059 146.485 162.788C150.449 154.694 154.413 146.6 158.377 138.506C159.494 136.225 160.611 133.943 161.729 131.662Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M144.786 152.64C144.441 152.43 143.977 152.891 143.844 153.163C142.363 156.187 140.882 159.21 139.402 162.234C139.257 162.528 139.048 163.085 139.42 163.311C139.765 163.521 140.229 163.06 140.362 162.788C141.843 159.764 143.323 156.741 144.804 153.717C144.948 153.423 145.158 152.866 144.786 152.64Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M136.792 156.459C136.447 156.25 135.983 156.711 135.85 156.982C134.993 158.733 134.136 160.483 133.279 162.233C133.134 162.528 132.925 163.085 133.297 163.311C133.642 163.52 134.106 163.06 134.239 162.788C135.096 161.037 135.953 159.287 136.81 157.537C136.955 157.242 137.164 156.685 136.792 156.459Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M129.1 159.663C128.755 159.454 128.291 159.915 128.158 160.186C127.824 160.869 127.49 161.551 127.155 162.234C127.011 162.528 126.802 163.086 127.174 163.311C127.519 163.521 127.983 163.06 128.116 162.788C128.45 162.106 128.784 161.423 129.118 160.741C129.263 160.447 129.472 159.889 129.1 159.663Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M165.835 137.946C165.979 137.652 166.188 137.094 165.816 136.868C165.471 136.659 165.007 137.12 164.874 137.392C161.72 143.832 158.566 150.273 155.412 156.713C154.511 158.553 153.609 160.393 152.708 162.233C152.564 162.528 152.355 163.085 152.726 163.311C153.071 163.52 153.535 163.06 153.669 162.788C156.823 156.347 159.977 149.907 163.131 143.466C164.032 141.626 164.933 139.786 165.835 137.946Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M169.923 143.153C169.578 142.943 169.114 143.404 168.98 143.676C165.951 149.862 162.921 156.048 159.892 162.234C159.748 162.528 159.538 163.086 159.91 163.311C160.255 163.521 160.719 163.06 160.852 162.788C163.882 156.602 166.911 150.416 169.941 144.23C170.085 143.936 170.294 143.378 169.923 143.153Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M174.332 148.821C173.987 148.611 173.523 149.072 173.39 149.344C171.286 153.64 169.182 157.937 167.077 162.234C166.933 162.528 166.724 163.086 167.095 163.311C167.44 163.521 167.905 163.06 168.038 162.788C170.142 158.492 172.246 154.195 174.351 149.898C174.495 149.604 174.704 149.046 174.332 148.821Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M178.197 155.597C177.852 155.387 177.388 155.848 177.255 156.12C176.257 158.158 175.259 160.196 174.261 162.233C174.117 162.528 173.907 163.085 174.279 163.311C174.624 163.52 175.088 163.06 175.221 162.788C176.219 160.75 177.217 158.712 178.215 156.674C178.36 156.38 178.569 155.823 178.197 155.597Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M97.1962 40.2135C97.3477 39.9803 97.4773 39.477 97.1807 39.2971C96.8678 39.1072 96.5194 39.5265 96.3794 39.7419C94.7034 42.3205 93.0556 44.9176 91.4179 47.5205C88.1743 52.6759 84.976 57.8633 81.9271 63.1367C80.4155 65.7509 78.9283 68.3855 77.5879 71.0925C77.4642 71.3423 77.2879 71.8174 77.6034 72.0088C77.8975 72.1874 78.2905 71.7947 78.4047 71.564C80.9657 66.3919 83.9726 61.4308 86.9671 56.5018C89.7369 51.9427 92.5713 47.4226 95.4474 42.9297C96.0279 42.0228 96.6094 41.1164 97.1962 40.2135Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M75.3224 76.1247C75.0193 75.9408 74.6477 76.3459 74.521 76.5695C74.1645 77.1991 73.808 77.8286 73.4515 78.4581C73.3144 78.7003 73.1605 79.1884 73.467 79.3744C73.77 79.5583 74.1416 79.1532 74.2684 78.9296C74.6248 78.3001 74.9814 77.6705 75.3378 77.0411C75.475 76.7988 75.6288 76.3107 75.3224 76.1247Z",fill:"var(--pae-shell-color-secondary)"})]});Cd.displayName="WarningIcon";const d3="support@bluealba.com",f3="@bluealba/pae-shell-ui",gi=()=>{const{supportEmail:e=d3}=Cc(f3),t=`mailto:${e}?Subject=Support`;return l.jsxs("div",{className:Or.container,children:[l.jsx(Cd,{}),l.jsx("div",{className:Or.title,children:"Oops! Something went wrong"}),l.jsxs("div",{className:Or.description,children:["If the error persists, ",l.jsx("a",{className:Or.mailToText,href:t,children:"contact the administrator."})]})]})};gi.displayName="ErrorState";const h3="List__h09XG",p3="List__h09XG",m3="Item__YMy2i",g3="Item__YMy2i",v3="List--primary__J2pbx",y3="List--secondary__gi1ao",b3="Item--selected__yRWow",w3="Title__RJmEW",C3="Title__RJmEW",x3="Description__DGyX2",S3="Description__DGyX2",E3="Actions__UHP5l",_3="Actions__UHP5l",R3="Action__q-R1I",T3="Action__q-R1I",P3="Item--disabled__Ke1u-",A3="List--small__ijoSR",O3="List--medium__E1FEY",j3="List--large__T8tfz",I3="Icon__dFr-L",N3="Icon__dFr-L",Be={List:h3,list:p3,Item:m3,item:g3,"List--primary":"List--primary__J2pbx",listPrimary:v3,"List--secondary":"List--secondary__gi1ao",listSecondary:y3,"Item--selected":"Item--selected__yRWow",itemSelected:b3,Title:w3,title:C3,Description:x3,description:S3,Actions:E3,actions:_3,Action:R3,action:T3,"Item--disabled":"Item--disabled__Ke1u-",itemDisabled:P3,"List--small":"List--small__ijoSR",listSmall:A3,"List--medium":"List--medium__E1FEY",listMedium:O3,"List--large":"List--large__T8tfz",listLarge:j3,Icon:I3,icon:N3},xd=_.forwardRef(({children:e,className:t,selected:n,disabled:r=!1,...o},s)=>{const i=N(Be.Item,{[Be["Item--selected"]]:n,[Be["Item--disabled"]]:r},t);return l.jsx("li",{ref:s,className:i,role:"listitem","aria-disabled":r,...o,children:e})});xd.displayName="Item";const Sd=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(Be.Title,t);return l.jsx("h3",{ref:r,className:o,...n,children:e})});Sd.displayName="Title";const Ed=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(Be.Description,t);return l.jsx("p",{ref:r,className:o,...n,children:e})});Ed.displayName="Description";const vi=({className:e,...t})=>l.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,...t,children:[l.jsx("path",{d:"M6 6.5C6.27614 6.5 6.5 6.27614 6.5 6C6.5 5.72386 6.27614 5.5 6 5.5C5.72386 5.5 5.5 5.72386 5.5 6C5.5 6.27614 5.72386 6.5 6 6.5Z",stroke:"#A9A9A9",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("path",{d:"M9.5 6.5C9.77614 6.5 10 6.27614 10 6C10 5.72386 9.77614 5.5 9.5 5.5C9.22386 5.5 9 5.72386 9 6C9 6.27614 9.22386 6.5 9.5 6.5Z",stroke:"#A9A9A9",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("path",{d:"M2.5 6.5C2.77614 6.5 3 6.27614 3 6C3 5.72386 2.77614 5.5 2.5 5.5C2.22386 5.5 2 5.72386 2 6C2 6.27614 2.22386 6.5 2.5 6.5Z",stroke:"#A9A9A9",strokeLinecap:"round",strokeLinejoin:"round"})]});vi.displayName="HorizontalDots";const _d=_.forwardRef(({children:e,className:t,onClick:n,...r},o)=>{const s=_.useRef(null),[i,a]=_.useState(!1),c=N(Be.Actions,t),u=()=>{const x=Wt["DropdownList--open"],h=Wt["DropdownList--closed"];document.querySelectorAll(`.${x}`).forEach(y=>{y!==s.current&&(y.classList.remove(x),y.classList.add(h))})},f=x=>{x.stopPropagation(),i?p():(a(!0),n==null||n(x))},p=()=>{a(!1)},m=x=>{x.key==="Escape"&&p()},g=x=>{s.current&&!s.current.contains(x.target)&&p()};return _.useEffect(()=>(i?(u(),document.addEventListener("keydown",m),document.addEventListener("click",g)):(document.removeEventListener("keydown",m),document.removeEventListener("click",g)),()=>{document.removeEventListener("keydown",m),document.removeEventListener("click",g)}),[i]),l.jsxs("div",{ref:o,className:c,onClick:f,role:"button",tabIndex:0,"data-testid":"actions",...r,children:[l.jsx(vi,{}),l.jsx(xo,{align:"left",ref:s,open:i,"data-testid":"actions-dropdown",role:"menu","aria-label":"Actions",children:e})]})});_d.displayName="Actions";const Rd=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(Be.Action,t);return l.jsx("button",{ref:r,className:o,...n,children:e})});Rd.displayName="Action";const Td=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(Be.Icon,t);return l.jsx("div",{ref:r,className:o,...n,children:e})});Td.displayName="Icon";const nt=_.forwardRef(({children:e,className:t,size:n="medium",variant:r,...o},s)=>{const i=N(Be.List,{[Be[`List--${n}`]]:n,[Be[`List--${r}`]]:r},t);return l.jsx("ul",{ref:s,className:i,role:"list",...o,children:e})});nt.displayName="List";nt.Item=xd;nt.Badges=Qs;nt.Badge=Ks;nt.Title=Sd;nt.Description=Ed;nt.Actions=_d;nt.Action=Rd;nt.Icon=Td;const D3="Navigation__uylxk",L3="PaginationContent__UpLw0",M3="PaginationEllipsis__perWk",k3="PaginationLink__GVUZj",$3="Active__u1Ahy",F3="Disabled__8WM0y",B3="Prev__wp4hc",U3="Next__eVyL5",ht={Navigation:D3,PaginationContent:L3,PaginationEllipsis:M3,PaginationLink:k3,Active:$3,Disabled:F3,Prev:B3,Next:U3},Pd=({className:e,...t})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,...t,children:[l.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),l.jsx("path",{d:"M9 6l6 6l-6 6"})]});Pd.displayName="ChevronRight";const Ad=({className:e,...t})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,...t,children:[l.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),l.jsx("path",{d:"M15 6l-6 6l6 6"})]});Ad.displayName="ChevronLeft";const yi=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:N(ht.Navigation,e),...t});yi.displayName="Pagination";const bi=d.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:N(ht.PaginationContent,e),...t}));bi.displayName="PaginationContent";const Vn=d.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:e,...t}));Vn.displayName="PaginationItem";const lr=({className:e,isActive:t,...n})=>l.jsx("a",{"aria-current":t?"page":void 0,className:N(ht.PaginationLink,t&&ht.Active,e),...n});lr.displayName="PaginationLink";const wi=({className:e,disabled:t,...n})=>l.jsxs(lr,{"aria-label":"Go to previous page",className:N(t&&ht.Disabled,ht.Prev,e),...n,children:[l.jsx(Ad,{}),l.jsx("span",{children:"Previous"})]});wi.displayName="PaginationPrevious";const Ci=({className:e,disabled:t,...n})=>l.jsxs(lr,{"aria-label":"Go to next page",className:N(t&&ht.Disabled,ht.Next,e),...n,children:[l.jsx("span",{children:"Next"}),l.jsx(Pd,{})]});Ci.displayName="PaginationNext";const xi=({className:e,...t})=>l.jsx("span",{"aria-hidden":!0,className:N(ht.PaginationEllipsis,e),...t,children:l.jsx(vi,{})});xi.displayName="PaginationEllipsis";function W3(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Od={exports:{}};(function(e,t){(function(n,r){typeof W3=="function"?e.exports=r():n.pluralize=r()})(bf,function(){var n=[],r=[],o={},s={},i={};function a(h){return typeof h=="string"?new RegExp("^"+h+"$","i"):h}function c(h,v){return h===v?v:h===h.toLowerCase()?v.toLowerCase():h===h.toUpperCase()?v.toUpperCase():h[0]===h[0].toUpperCase()?v.charAt(0).toUpperCase()+v.substr(1).toLowerCase():v.toLowerCase()}function u(h,v){return h.replace(/\$(\d{1,2})/g,function(y,w){return v[w]||""})}function f(h,v){return h.replace(v[0],function(y,w){var S=u(v[1],arguments);return c(y===""?h[w-1]:y,S)})}function p(h,v,y){if(!h.length||o.hasOwnProperty(h))return v;for(var w=y.length;w--;){var S=y[w];if(S[0].test(v))return f(v,S)}return v}function m(h,v,y){return function(w){var S=w.toLowerCase();return v.hasOwnProperty(S)?c(w,S):h.hasOwnProperty(S)?c(w,h[S]):p(S,w,y)}}function g(h,v,y,w){return function(S){var E=S.toLowerCase();return v.hasOwnProperty(E)?!0:h.hasOwnProperty(E)?!1:p(E,E,y)===E}}function x(h,v,y){var w=v===1?x.singular(h):x.plural(h);return(y?v+" ":"")+w}return x.plural=m(i,s,n),x.isPlural=g(i,s,n),x.singular=m(s,i,r),x.isSingular=g(s,i,r),x.addPluralRule=function(h,v){n.push([a(h),v])},x.addSingularRule=function(h,v){r.push([a(h),v])},x.addUncountableRule=function(h){if(typeof h=="string"){o[h.toLowerCase()]=!0;return}x.addPluralRule(h,"$0"),x.addSingularRule(h,"$0")},x.addIrregularRule=function(h,v){v=v.toLowerCase(),h=h.toLowerCase(),i[h]=v,s[v]=h},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(h){return x.addIrregularRule(h[0],h[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(h){return x.addPluralRule(h[0],h[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(h){return x.addSingularRule(h[0],h[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(x.addUncountableRule),x})})(Od);var H3=Od.exports;const V3=wf(H3),Si=({count:e,singularText:t,children:n=(r,o)=>`${r} ${o}`})=>l.jsx(l.Fragment,{children:n(e,V3(t,e))});Si.displayName="PluralizeCounter";const z3="TableContainer__osh6Z",q3="TableHeader__sYa-8",G3="Table__2cIs3",K3="selectable__WsGg1",Q3="Cell__ZEv-K",Y3="Right__YoM1V",Z3="Center__CF3tr",X3="Sortable__JIV1V",J3="SortIcon__f0bBy",eb="Active__rJjxB",tb="Rotate__7cwTK",nb="Pagination__sbqMP",rb="PointerNone__kQdQS",Ee={TableContainer:z3,TableHeader:q3,Table:G3,selectable:K3,Cell:Q3,Right:Y3,Center:Z3,Sortable:X3,SortIcon:J3,Active:eb,Rotate:tb,Pagination:nb,PointerNone:rb},ob="EmptyStateContainer__Q9FEb",sb="Message__IHK6M",Za={EmptyStateContainer:ob,Message:sb},jd=({size:e=64})=>l.jsxs("svg",{width:e,height:e,viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsxs("g",{clipPath:"url(#clip-path)",children:[l.jsx("mask",{id:"mask0_1070_8032",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"64",height:"64",children:l.jsx("path",{d:"M64 0H0V64H64V0Z",fill:"white"})}),l.jsx("g",{mask:"url(#mask0_1070_8032)",children:l.jsx("path",{d:"M40 10.6673H13.3333V53.334H50.6667V21.334H40V10.6673ZM8 7.97932C8 6.51798 9.192 5.33398 10.664 5.33398H42.6667L56 18.6673V55.982C56.0024 56.3321 55.936 56.6793 55.8043 57.0039C55.6725 57.3284 55.4781 57.6239 55.2323 57.8732C54.9864 58.1225 54.6936 58.3209 54.3712 58.4572C54.0485 58.5935 53.7021 58.6649 53.352 58.6673H10.648C9.94768 58.6625 9.27739 58.3823 8.78192 57.8873C8.28645 57.3924 8.00557 56.7223 8 56.022V7.97932ZM36.0773 38.5233C33.8408 39.83 31.2056 40.2788 28.6627 39.786C26.1197 39.2929 23.8428 37.8921 22.2566 35.8444C20.6704 33.7966 19.883 31.2417 20.0414 28.6564C20.1998 26.071 21.293 23.6315 23.1173 21.7927C24.9532 19.9571 27.3955 18.8541 29.9864 18.6904C32.5773 18.5267 35.1389 19.3134 37.1912 20.9032C39.2435 22.493 40.6456 24.7767 41.1347 27.3263C41.6237 29.8759 41.1664 32.5164 39.848 34.7527L45.7413 40.646L41.9707 44.4193L36.0773 38.5233ZM34.4293 33.1047C34.9387 32.6126 35.3451 32.0241 35.6245 31.3735C35.904 30.7228 36.0512 30.0231 36.0573 29.3148C36.0635 28.6065 35.9285 27.9044 35.6603 27.2489C35.3923 26.5935 34.9963 25.998 34.4955 25.4972C33.9947 24.9964 33.3992 24.6004 32.7437 24.3323C32.0883 24.0641 31.3861 23.9292 30.6779 23.9353C29.9696 23.9415 29.2699 24.0886 28.6192 24.3681C27.9685 24.6476 27.38 25.0539 26.888 25.5633C25.9165 26.5692 25.3789 27.9164 25.3911 29.3148C25.4032 30.7132 25.9641 32.0508 26.9531 33.0396C27.9419 34.0287 29.2795 34.5895 30.6779 34.6015C32.0763 34.6137 33.4235 34.0761 34.4293 33.1047Z",fill:"currentColor"})})]}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip-path",children:l.jsx("rect",{width:"64",height:"64",fill:"white"})})})]});jd.displayName="EmptyStateIcon";const Ei=({message:e="No results found"})=>l.jsxs("div",{className:N(Za.EmptyStateContainer),children:[l.jsx(jd,{}),l.jsx("p",{className:Za.Message,children:e})]});Ei.displayName="EmptyState";const ib=(e,t,n=1)=>{if(e<=1)return["1"];const r=[],o=s=>{(r.length===0||r[r.length-1]!==s)&&r.push(s)};o(1),t-n>2&&o("...");for(let s=Math.max(2,t-n);s<=Math.min(e-1,t+n);s++)o(s);return t+n<e-1&&o("..."),o(e),r.map(String)},Id=({page:e,totalPages:t,onPageChange:n})=>{const r=e===1,o=e===t;return l.jsx(yi,{className:Ee.Pagination,children:l.jsxs(bi,{children:[l.jsx(Vn,{children:l.jsx(wi,{className:N({[Ee.PointerNone]:r}),onClick:()=>!r&&n(e-1)})}),ib(t,e).map((s,i)=>l.jsxs(Vn,{children:[s==="..."&&l.jsx(xi,{}),s!=="..."&&l.jsx(lr,{isActive:+s===e,onClick:()=>+s!==e&&n(+s),children:s})]},i)),l.jsx(Vn,{children:l.jsx(Ci,{className:N({[Ee.PointerNone]:o}),onClick:()=>!o&&n(e+1)})})]})})};Id.displayName="TablePagination";const Nd=({className:e,...t})=>l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,...t,children:l.jsx("path",{d:"M6 2.5V9.5M6 9.5L9.5 6M6 9.5L2.5 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});Nd.displayName="ArrowDown";const Dd=({columns:e,data:t,isLoading:n,totalCount:r=0,headerLabel:o,sort:s,loadingConfig:i,pagination:a,onRowClick:c})=>{const{count:u=5,height:f=40}=i||{},p=y=>y.sortName??y.name,m=({width:y,maxWidth:w})=>!y&&!w?{}:{...y?{width:y,minWidth:y}:{},...w?{maxWidth:w}:{},overflow:"hidden"},g=y=>N({[Ee.Cell]:!0,[Ee.Center]:y.align==="center",[Ee.Right]:y.align==="right",[Ee.Sortable]:y.isSortable}),x=y=>{if(!s)return"";const w=p(y);return N({[Ee.SortIcon]:!0,[Ee.Active]:y.isSortable&&s.field===w,[Ee.Rotate]:s.field===w&&s.direction==="asc"})},h=y=>()=>c==null?void 0:c(y),v=y=>()=>{if(!s||!y.isSortable)return;const{field:w,direction:S,onSort:E}=s,R=p(y);w===R?E(R,S==="asc"?"desc":"asc"):E(R,"asc")};return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:Ee.TableContainer,children:[o&&l.jsx("div",{className:Ee.TableHeader,children:l.jsx(Si,{count:r,singularText:o,children:(y,w)=>`${y} ${w}`})}),l.jsx("div",{className:Ee.Table,children:l.jsxs("table",{children:[l.jsx("thead",{children:l.jsx("tr",{children:e.map(y=>l.jsx("th",{children:l.jsxs("div",{className:g(y),onClick:v(y),children:[l.jsx("span",{children:y.displayName}),y.isSortable&&l.jsx(Nd,{className:x(y)})]})},y.name))})}),l.jsx("tbody",{children:l.jsxs(It,{children:[l.jsx(It.When,{condition:n,children:[...Array(u).keys()].map(y=>l.jsx("tr",{children:l.jsx("td",{colSpan:e.length,style:{padding:4},children:l.jsx(So,{height:f})})},y))}),l.jsx(It.When,{condition:!t.length,children:l.jsx("tr",{children:l.jsx("td",{colSpan:e.length,children:l.jsx(Ei,{})})})}),l.jsx(It.Else,{children:t.map((y,w)=>l.jsx("tr",{className:c&&Ee.selectable,onClick:h(y),children:e.map(S=>l.jsx("td",{style:m(S),children:l.jsx("div",{className:g(S),children:S.cellRenderer?S.cellRenderer(y):S.valueGetter?S.valueGetter(y):y[S.name]})},`${S.name}-${w}`))},w))})]})})]})})]}),a&&l.jsx(Id,{...a})]})};Dd.displayName="Table";const ab="alert__LblpE",cb="destructive__bLNSM",lb="alertTitle__gblKf",ub="alertDescription__BuVHV",to={alert:ab,default:"default__mgO6A",destructive:cb,alertTitle:lb,alertDescription:ub},_o=({className:e,variant:t="default",children:n,...r})=>l.jsx("div",{"data-slot":"alert",role:"alert",className:N(to.alert,to[t],e),...r,children:n}),db=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{ref:r,"data-slot":"alert-title",className:N(to.alertTitle,t),...n,children:e})),fb=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{ref:r,"data-slot":"alert-description",className:N(to.alertDescription,t),...n,children:e}));_o.displayName="Alert";_o.Title=db;_o.Description=fb;const Ld=({isNavbarExpanded:e})=>{const{theme:t,setTheme:n}=ml(),r=()=>n(t==="dark"?"light":"dark"),o=l.jsxs("div",{className:N(Mo.container,e&&Mo.expanded),onClick:r,children:[t==="light"?l.jsx(fl,{}):l.jsx(hl,{}),e&&l.jsx("p",{className:Mo.label,children:t==="light"?"Dark Mode":"Light Mode"})]});return e?o:l.jsx(jn,{displayName:t==="light"?"Switch to dark mode":"Switch to light mode",sideOffset:-16,children:o})};Ld.displayName="ToggleTheme";const hb=(e,t)=>{const n=r=>l.jsx(Gs,{operations:t,children:l.jsx(e,{...r})});return n.displayName="Authorized",n};function Xa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function no(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xa(Object(n),!0).forEach(function(r){pb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xa(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Md(e){return(Md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function pb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ns(e){return(Ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function kd(e,t){var n;if(typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(r){var o=r.appName||r.name;if(!o)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var s="single-spa-application:".concat(o);return function(){var i=document.getElementById(s);return i||((i=document.createElement("div")).id=s,document.body.appendChild(i)),i}}(t))!="function")throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(Ns(n)));return function(){var r=n(t);if(!(r instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(Ns(r)));return r}}var Qn=null;try{Qn=require("react").createContext()}catch{}var mb={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function gb(e){if(Md(e)!=="object")throw new Error("single-spa-react requires a configuration object");var t,n=no(no({},mb),e);if(!n.React)throw new Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw new Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||((t=n.ReactDOMClient)!==null&&t!==void 0&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&typeof n.errorBoundary!="function")throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!Qn&&n.React.createContext&&(Qn=n.React.createContext()),n.SingleSpaRoot=function(o){function s(i){s.displayName="SingleSpaRoot(".concat(i.name,")")}return s.prototype=Object.create(o.React.Component.prototype),s.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},s.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},s.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},s}(n);var r={bootstrap:vb.bind(null,n),mount:yb.bind(null,n),unmount:bb.bind(null,n)};return n.parcelCanUpdate&&(r.update=wb.bind(null,n)),r}function vb(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(n){e.rootComponent=n})}function yb(e,t){return new Promise(function(n,r){e.suppressComponentDidCatchWarning||!function(a){if(!(a&&typeof a.version=="string"&&a.version.indexOf(".")>=0))return!1;var c=a.version.slice(0,a.version.indexOf("."));try{return Number(c)>=16}catch{return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=$d(e,t,function(){n(this)}),s=kd(e,t)(),i=function(a){var c=a.reactDom,u=a.renderType,f=a.elementToRender,p=a.domElement,m=c[u];if(typeof m!="function")throw new Error('renderType "'.concat(u,'" did not return a function.'));switch(u){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var g=m(p);return g.render(f),g;case"hydrateRoot":return m(p,f);case"hydrate":default:return m(f,p),null}}({elementToRender:o,domElement:s,reactDom:_i(e),renderType:Cb(e)});e.domElements[t.name]=s,e.renderResults[t.name]=i})}function bb(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():_i(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function wb(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=$d(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var s=kd(e,t)();_i(e).render(r,s)}})}function _i(e){return e.ReactDOMClient||e.ReactDOM}function Cb(e){return typeof e.renderType=="function"?e.renderType():e.renderType}function $d(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=Qn?e.React.createElement(Qn.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(s,i){function a(c){s.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},a.displayName="SingleSpaReactErrorBoundary(".concat(c.name,")")}return a.prototype=Object.create(s.React.Component.prototype),a.prototype.render=function(){return this.state.caughtError?(s.errorBoundary||i.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},a.prototype.componentDidCatch=function(c,u){this.setState({caughtError:c,caughtErrorInfo:u})},a}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,no(no({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(s){return s()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)}const xb=e=>{const t=new Sp;return function(r){if(!r)throw new Error("Microfrontend did not receive any properties !!");const o=ks(r.module.name);return l.jsx(vc,{module:o,children:l.jsxs(Pp,{client:t,children:[l.jsx(e,{...r}),l.jsx(ap,{position:"top-right",reverseOrder:!0})]})})}},Sb=({rootComponent:e,...t})=>gb({errorBoundary(n){return console.error(n),l.jsx(gi,{})},...t,rootComponent:xb(e)}),Eb=e=>{const t={authUser:{id:"testuser",username:"testuser",displayName:"Test User",applications:[]},catalog:[],authentication:{passwordMethodEnabled:!0,registerEnabled:!0,invitationsEnabled:!0,resetPasswordExpiration:3e4,passwordConstraints:{lowerCaseRequired:!1,upperCaseRequired:!1,symbolRequired:!1,digitRequired:!1,minLength:0,maxLength:8},sessionExpiration:864e5,jwtSecret:"",sessionIncludeOrigUser:!1,impersonationMode:"cookie",canImpersonateNonExistentUsers:!1,providers:[]},platformVersion:"0.0.0",featureFlags:{}};Object.defineProperty(window,zn,{value:e?Ff(t,e):t})},Ri=()=>{const[e]=er();return e.featureFlags},_b=e=>Ri()[e],Fd=({flag:e,children:t,fallback:n=null,invert:r=!1})=>{const s=Ri()[e]===!0;return(r?!s:s)?l.jsx(l.Fragment,{children:t}):l.jsx(l.Fragment,{children:n})};Fd.displayName="FeatureFlagGuard";const Bd=_.createContext(null);function Ud(e){const t=["#FF6B6B","#4ECDC4","#45B7D1","#FFA07A","#98D8C8","#F7DC6F","#BB8FCE","#85C1E2","#F8B739","#52B788","#E74C3C","#3498DB","#9B59B6","#1ABC9C","#F39C12","#E67E22","#95A5A6","#34495E","#16A085","#27AE60"];let n=0;for(let o=0;o<e.length;o++)n=e.charCodeAt(o)+((n<<5)-n),n=n&n;const r=Math.abs(n)%t.length;return t[r]}const qo={JOIN_ROOM:"join_room",LEAVE_ROOM:"leave_room",USER_LIST:"user_list"},Wd=[1e3,2e3,4e3,8e3,16e3],Rb=Wd.length,Tb=({children:e})=>{const t=Oc("@bluealba/pae-rooms-service"),[n,r]=_.useState([]),[o,s]=_.useState("loading"),i=_.useRef(null),a=_.useRef(!1),c=_.useRef(0),u=_.useRef(null),f=_.useRef(!0),p=_.useRef(()=>{}),m=_.useCallback(T=>new Promise((P,D)=>{const I=new WebSocket(T);let L=!1;I.onopen=()=>{L=!0,c.current=0,f.current&&s("connected"),P(I)},I.addEventListener("message",async B=>{try{const U=await h(B);U.event===qo.USER_LIST&&S(U.data)}catch(U){console.error("Error parsing WebSocket message:",U)}}),I.onerror=B=>{console.error("Rooms WebSocket error",B)},I.onclose=()=>{if(i.current!==I){L||D(new Error("WebSocket connection replaced"));return}a.current?f.current&&s("closed"):p.current(),L||D(new Error("WebSocket connection failed"))},i.current=I}),[]),g=_.useCallback(()=>{if(!t||!f.current)return;if(c.current>=Rb){s("error");return}const T=Wd[c.current];c.current++,s("reconnecting"),u.current=setTimeout(()=>{f.current&&t&&m(t).catch(()=>{})},T)},[t,m]);p.current=g;const x=_.useCallback(()=>{if(!t)return;u.current&&(clearTimeout(u.current),u.current=null);const T=i.current;T&&T.readyState!==WebSocket.CLOSED&&(a.current=!0,T.close()),c.current=0,a.current=!1,s("loading"),m(t)},[t,m]);_.useEffect(()=>{if(f.current=!0,a.current=!1,t)return m(t),()=>{var T;f.current=!1,u.current&&(clearTimeout(u.current),u.current=null),a.current=!0,(T=i.current)==null||T.close()}},[t,m]),_.useEffect(()=>{const T=()=>{if(document.visibilityState!=="visible")return;const P=i.current;P&&P.readyState===WebSocket.OPEN||(u.current&&(clearTimeout(u.current),u.current=null),c.current=0,x())};return document.addEventListener("visibilitychange",T),()=>{document.removeEventListener("visibilitychange",T)}},[x]);const h=async T=>{if(T.data instanceof Blob){const P=await T.data.text();return JSON.parse(P)}else return JSON.parse(T.data)},v=(T,P)=>{const D=i.current;!D||D.readyState!==WebSocket.OPEN||setTimeout(()=>{D.send(JSON.stringify({event:T,data:P}))},100)},y=T=>{v(qo.JOIN_ROOM,{roomId:T})},w=T=>{v(qo.LEAVE_ROOM,{roomId:T})},S=T=>{r(T.map(P=>({...P,username:P.username.toLowerCase(),color:Ud(P.username)})))},E=_.useCallback(T=>n.filter(P=>P.rooms.includes(T)),[n]),R={status:o,getRoomUsers:E,joinRoom:y,leaveRoom:w,reconnect:x};return l.jsx(Bd.Provider,{value:R,children:e})},Hd={autoJoin:!0,autoLeave:!0};function Pb(e,t=Hd){const{autoJoin:n,autoLeave:r}=t,o=_.useContext(Bd),{authUser:s}=rr();if(!o)throw new Error("useRoom must be used within RoomsProvider");const i=_.useRef(!1),a=()=>{if(n){console.warn("[useRoom] Ignoring manual joinRoom call because autoJoin is enabled.",{roomId:e});return}return i.current=!0,o.joinRoom(e)},c=()=>{if(r){console.warn("[useRoom] Ignoring manual leaveRoom call because autoLeave is enabled.",{roomId:e});return}return i.current=!1,o.leaveRoom(e)};_.useEffect(()=>{if(!(!e||o.status!=="connected"))return(n||i.current)&&o.joinRoom(e),()=>{r&&o.status==="connected"&&o.leaveRoom(e)}},[o.status,e]);const u=o.getRoomUsers(e),f=u.findIndex(p=>p.username===(s==null?void 0:s.username))!==-1;return{users:u,roomId:e,hasJoined:f,joinRoom:a,leaveRoom:c,reconnect:o.reconnect}}const Ab="container__LbyGQ",Ob="avatarWrapper__HCQIZ",jb="avatar__E453a",Ib="overflowWrapper__ETnPO",Nb="overflowBadge__igBKT",Bn={container:Ab,avatarWrapper:Ob,avatar:jb,overflowWrapper:Ib,overflowBadge:Nb},Db={sm:24,md:32,lg:40},Lb=({users:e,maxVisible:t=5,size:n="md",overlap:r=!0,className:o="",onUserClick:s})=>{const i=Db[n],a=_.useMemo(()=>e.slice(0,t),[e,t]),c=_.useMemo(()=>e.slice(t),[e,t]),u=Math.max(0,e.length-t),f=p=>p.split(" ").map(m=>m[0]).join("").toUpperCase().slice(0,2);return l.jsxs("div",{className:N(Bn.container,o),children:[a.map((p,m)=>l.jsx(jn,{tooltipContent:p.displayName,side:"bottom",children:l.jsx("div",{className:Bn.avatarWrapper,style:{marginLeft:m>0&&r?`-${i*.25}px`:void 0},onClick:()=>s==null?void 0:s(p),children:l.jsx("div",{className:Bn.avatar,style:{width:i,height:i,backgroundColor:p.color,fontSize:n==="sm"?"10px":n==="md"?"12px":"14px",cursor:s?"pointer":"default"},children:f(p.displayName)})})},p.username)),u>0&&l.jsx(jn,{side:"bottom",tooltipContent:l.jsx("div",{children:c.map(p=>l.jsx("p",{children:p.displayName},p.username))}),children:l.jsx("div",{className:Bn.overflowWrapper,style:{marginLeft:r?`-${i*.25}px`:void 0},children:l.jsxs("div",{className:Bn.overflowBadge,style:{width:i,height:i,fontSize:n==="sm"?"10px":n==="md"?"12px":"14px"},children:["+",u]})})})]})};exports.Alert=_o;exports.ApplicationIcon=dl;exports.Authorized=Gs;exports.Badge=Ks;exports.Badges=Qs;exports.Button=qr;exports.ClipboardCheckIcon=vl;exports.ClipboardIcon=gl;exports.ConfirmDialog=wd;exports.CopyToClipboardButton=W1;exports.DEFAULT_OPTIONS=Hd;exports.Dialog=ge;exports.DropdownList=xo;exports.EmptyState=Ei;exports.ErrorState=gi;exports.ExtendExtensionPoint=n1;exports.ExtensionPoint=il;exports.EyeIcon=Zu;exports.FeatureFlagGuard=Fd;exports.FieldGroup=yl;exports.Input=co;exports.InputError=bl;exports.Label=wl;exports.List=nt;exports.ModulePlaceHolder=ul;exports.Pagination=yi;exports.PaginationContent=bi;exports.PaginationEllipsis=xi;exports.PaginationItem=Vn;exports.PaginationLink=lr;exports.PaginationNext=Ci;exports.PaginationPrevious=wi;exports.PasswordInput=S2;exports.Pill=o3;exports.PlatformEventListener=l1;exports.PlatformEvents=hf;exports.PluralizeCounter=Si;exports.RoomAvatars=Lb;exports.RoomsProvider=Tb;exports.SearchAutocomplete=Vu;exports.SearchInput=di;exports.Select=Ys;exports.Select2=ju;exports.Show=It;exports.Skeleton=So;exports.SkeletonList=Gu;exports.Spinner=Ku;exports.Switch=Qu;exports.Table=Dd;exports.Tabs=v2;exports.TabsContent=w2;exports.TabsList=y2;exports.TabsTrigger=b2;exports.TextArea=Iu;exports.TextWithTooltip=Wu;exports.ThemeToggle=Ld;exports.Tooltip=jn;exports.authorized=hb;exports.dropdownListStyles=Wt;exports.extensionPoint=o1;exports.generateUserColor=Ud;exports.getApplications=Ls;exports.getInitials=Af;exports.getOperations=yc;exports.hasAccess=wc;exports.initializeMicroFrontend=Sb;exports.isPlatformCustomizationCompleted=vh;exports.isValidEmail=Pf;exports.logout=_f;exports.navigateTo=Rf;exports.platformHaveAnyCustomization=gh;exports.setupTestEnvironment=Eb;exports.useApplicationIcon=Tc;exports.useApplicationJSModule=so;exports.useApplicationMenu=Lf;exports.useApplicationUIModule=Rc;exports.useApplications=Ec;exports.useAuth=rr;exports.useCatalog=tr;exports.useCurrentApplication=Fs;exports.useCurrentApplicationName=Ac;exports.useCurrentJSModule=Hf;exports.useDynamicFonts=Mc;exports.useDynamicStyleSheet=Lc;exports.useExtendExtensionPoint=Nc;exports.useExtensionPoint=Ic;exports.useFeatureFlag=_b;exports.useFeatureFlags=Ri;exports.useGetPlatformTheme=mh;exports.useHasNoSession=xf;exports.useLocation=pc;exports.useModule=ks;exports.useModuleCommonPaths=Ef;exports.useModuleConfig=Ms;exports.useModuleConfigByName=Cc;exports.useModuleMenu=Pc;exports.useModuleMetadata=nr;exports.useMutableCatalog=yf;exports.useNotifications=Ws;exports.useOperations=bc;exports.usePAECustomizationsLoadingState=ph;exports.usePAEState=er;exports.usePlatformCustomization=hh;exports.usePlatformEventListener=Dc;exports.useResource=Bp;exports.useResourceActions=ol;exports.useRoom=Pb;exports.useServiceBaseURL=Bs;exports.useServiceInvoker=Us;exports.useServiceWebSocketURL=Oc;exports.useTenants=Jp;exports.useTheme=ml;exports.useTrackEvent=Qf;exports.useTrackEvents=jc;exports.useUIApplications=_c;exports.useUserState=t1;
|
|
252
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},vg="DialogDescriptionWarning",yg=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Fl(vg).contentName}}.`;return d.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},bg=Rl,wg=Al,Cg=Ol,xg=jl,Sg=Nl,Eg=Ll,_g=kl;const Rg="Overlay__M5Z83",Tg="Content__wAkP4",Pa={Overlay:Rg,Content:Tg},Pg="Header__VHxNf",Ag="Content__I04qM",Og="Close__xSN-7",jg="Title__Dznh6",Ig="Footer__-8gzQ",Ng="Actions__kKF2Q",cn={Header:Pg,Content:Ag,Close:Og,Title:jg,Footer:Ig,Actions:Ng},Bl=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(cn.Actions,t);return l.jsx("div",{ref:r,className:o,...n,children:e})});Bl.displayName="Actions";const Ul=_.forwardRef(({className:e,...t},n)=>{const r=N(cn.Close,e);return l.jsx(_g,{ref:n,asChild:!0,className:r,...t,children:l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M11 1L1 11M1 1L11 11",stroke:"#A9A9A9",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})});Ul.displayName="Close";const Wl=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(cn.Content,t);return l.jsx("div",{ref:r,className:o,...n,children:e})});Wl.displayName="Content";const Hl=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(cn.Description,t);return l.jsx("div",{ref:r,className:o,...n,children:e})});Hl.displayName="Description";const Vl=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(cn.Footer,t);return l.jsx("div",{ref:r,className:o,...n,children:e})});Vl.displayName="Footer";const zl=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(cn.Header,t);return l.jsx("div",{ref:r,className:o,...n,children:e})});zl.displayName="Header";const ql=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(cn.Title,t);return l.jsx(Sg,{ref:r,className:o,...n,children:e})});ql.displayName="Title";const ge=({children:e,onClose:t,open:n=!1,className:r,zIndexLevel:o=0})=>{const s=()=>{t==null||t()},i={zIndex:`calc(var(--platform-modal-layer) + ${o*2})`},a={zIndex:`calc(var(--platform-modal-layer) + ${o*2+1})`};return l.jsx(bg,{onOpenChange:s,open:n,children:l.jsxs(wg,{children:[l.jsx(Cg,{className:Pa.Overlay,style:i}),l.jsxs(xg,{children:[l.jsx(Eg,{}),l.jsx("div",{className:N(Pa.Content,r),style:a,children:e})]})]})})};ge.displayName="Dialog";ge.Header=zl;ge.Content=Wl;ge.Footer=Vl;ge.Actions=Bl;ge.Title=ql;ge.Description=Hl;ge.Close=Ul;const Dg="DialogContent__-WjG9",Lg="Message__AUgVP",Aa={DialogContent:Dg,Message:Lg},Gl=({loading:e,title:t,children:n,className:r,onClose:o,onConfirm:s,zIndexLevel:i=1,...a})=>l.jsxs(ge,{...a,zIndexLevel:i,className:N(Aa.DialogContent,r),children:[l.jsxs(ge.Header,{children:[l.jsx(ge.Title,{children:t}),l.jsx(ge.Close,{onClick:o})]}),l.jsx(ge.Content,{children:typeof n=="string"?l.jsx("p",{className:Aa.Message,children:n}):n}),l.jsx(ge.Footer,{children:l.jsxs(ge.Actions,{children:[l.jsx(Gr,{onClick:o,disabled:e,variant:"outlined",children:"Cancel"}),l.jsx(Gr,{onClick:s,disabled:e,loading:e,variant:"contained",children:"Confirm"})]})})]});Gl.displayName="ConfirmDialog";const Kl=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:r,style:o,...s})=>l.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r,style:o,...s,children:[l.jsx("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}),l.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}),l.jsx("path",{d:"m9 12 2 2 4-4"})]}),Ql=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:r,style:o,...s})=>l.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r,style:o,...s,children:[l.jsx("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}),l.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"})]}),Mg="CopyToClipboardButton__2Nd2m",kg={CopyToClipboardButton:Mg},$g=({content:e})=>{const[t,n]=Fg(),{notify:r}=qs(),o=t?Kl:Ql,s=_.useCallback(async()=>{await n(e)&&r("Copied to the Clipboard !","success")},[e,r,n]);return l.jsx(o,{className:kg.CopyToClipboardButton,size:18,onClick:s})},Fg=()=>{const[e,t]=_.useState(!1);return[e,async r=>{var o;try{return await((o=navigator==null?void 0:navigator.clipboard)==null?void 0:o.writeText(r)),t(!0),setTimeout(()=>t(!1),2e3),!0}catch(s){return console.error("Failed to copy text: ",s),!1}}]},Bg="DropdownList__QTXXX",Ug="DropdownList__QTXXX",Wg="DropdownList--closed__pdL1Z",Hg="DropdownList--open__opzc9",Vg="DropdownList--left__xSwXR",Wt={DropdownList:Bg,dropdownList:Ug,"DropdownList--closed":"DropdownList--closed__pdL1Z",dropdownListClosed:Wg,"DropdownList--open":"DropdownList--open__opzc9",dropdownListOpen:Hg,"DropdownList--left":"DropdownList--left__xSwXR",dropdownListLeft:Vg},ho=_.forwardRef(({children:e,className:t,open:n,align:r="right",...o},s)=>{const i=N(Wt.DropdownList,{[Wt["DropdownList--open"]]:n,[Wt["DropdownList--closed"]]:!n,[Wt["DropdownList--left"]]:r==="left"},t);return l.jsx("div",{ref:s,className:i,...o,children:e})});ho.displayName="DropdownList";const Yl=({size:e=64})=>l.jsxs("svg",{width:e,height:e,viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsxs("g",{clipPath:"url(#clip-path)",children:[l.jsx("mask",{id:"mask0_1070_8032",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"64",height:"64",children:l.jsx("path",{d:"M64 0H0V64H64V0Z",fill:"white"})}),l.jsx("g",{mask:"url(#mask0_1070_8032)",children:l.jsx("path",{d:"M40 10.6673H13.3333V53.334H50.6667V21.334H40V10.6673ZM8 7.97932C8 6.51798 9.192 5.33398 10.664 5.33398H42.6667L56 18.6673V55.982C56.0024 56.3321 55.936 56.6793 55.8043 57.0039C55.6725 57.3284 55.4781 57.6239 55.2323 57.8732C54.9864 58.1225 54.6936 58.3209 54.3712 58.4572C54.0485 58.5935 53.7021 58.6649 53.352 58.6673H10.648C9.94768 58.6625 9.27739 58.3823 8.78192 57.8873C8.28645 57.3924 8.00557 56.7223 8 56.022V7.97932ZM36.0773 38.5233C33.8408 39.83 31.2056 40.2788 28.6627 39.786C26.1197 39.2929 23.8428 37.8921 22.2566 35.8444C20.6704 33.7966 19.883 31.2417 20.0414 28.6564C20.1998 26.071 21.293 23.6315 23.1173 21.7927C24.9532 19.9571 27.3955 18.8541 29.9864 18.6904C32.5773 18.5267 35.1389 19.3134 37.1912 20.9032C39.2435 22.493 40.6456 24.7767 41.1347 27.3263C41.6237 29.8759 41.1664 32.5164 39.848 34.7527L45.7413 40.646L41.9707 44.4193L36.0773 38.5233ZM34.4293 33.1047C34.9387 32.6126 35.3451 32.0241 35.6245 31.3735C35.904 30.7228 36.0512 30.0231 36.0573 29.3148C36.0635 28.6065 35.9285 27.9044 35.6603 27.2489C35.3923 26.5935 34.9963 25.998 34.4955 25.4972C33.9947 24.9964 33.3992 24.6004 32.7437 24.3323C32.0883 24.0641 31.3861 23.9292 30.6779 23.9353C29.9696 23.9415 29.2699 24.0886 28.6192 24.3681C27.9685 24.6476 27.38 25.0539 26.888 25.5633C25.9165 26.5692 25.3789 27.9164 25.3911 29.3148C25.4032 30.7132 25.9641 32.0508 26.9531 33.0396C27.9419 34.0287 29.2795 34.5895 30.6779 34.6015C32.0763 34.6137 33.4235 34.0761 34.4293 33.1047Z",fill:"currentColor"})})]}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip-path",children:l.jsx("rect",{width:"64",height:"64",fill:"white"})})})]});Yl.displayName="EmptyStateIcon";const zg="EmptyStateContainer__Q9FEb",qg="Message__IHK6M",Oa={EmptyStateContainer:zg,Message:qg},ni=({message:e="No results found"})=>l.jsxs("div",{className:N(Oa.EmptyStateContainer),children:[l.jsx(Yl,{}),l.jsx("p",{className:Oa.Message,children:e})]});ni.displayName="EmptyState";const Gg="container__AjtYJ",Kg="title__A2vCu",Qg="description__bP6Ig",Yg="mailToText__SdlsE",Pr={container:Gg,title:Kg,description:Qg,mailToText:Yg},Zl=()=>l.jsxs("svg",{width:"200",height:"200",viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M184.415 152.221C183.936 151.406 183.401 150.621 182.892 149.824C181.61 147.817 180.327 145.809 179.045 143.801C177.102 140.759 175.159 137.717 173.215 134.676C170.766 130.841 168.316 127.006 165.866 123.171C163.068 118.79 160.27 114.41 157.472 110.03C154.484 105.352 151.496 100.674 148.508 95.9965C145.474 91.2464 142.439 86.4963 139.405 81.7463C136.513 77.2189 133.621 72.6915 130.729 68.1641C128.123 64.084 125.517 60.0039 122.91 55.9238C120.748 52.5389 118.586 49.1541 116.424 45.7692C114.864 43.3273 113.304 40.8854 111.744 38.4436C110.943 37.1899 110.142 35.9362 109.342 34.6825C108.765 33.7802 108.096 32.9744 107.292 32.2572C104.604 29.8584 100.572 29.2302 97.2301 30.5252C94.5951 31.5463 92.6177 33.3853 91.0923 35.7373C90.8768 36.0696 90.6658 36.405 90.4526 36.7387C89.3951 38.3941 88.3378 40.0494 87.2803 41.7049C85.5124 44.4725 83.7444 47.2402 81.9765 50.0079C79.644 53.6594 77.3114 57.3111 74.9788 60.9626C72.2632 65.2138 69.5477 69.465 66.8321 73.7162C63.8817 78.3349 60.9313 82.9536 57.9811 87.5722C54.9542 92.3106 51.9274 97.0491 48.9006 101.787C45.9557 106.398 43.0107 111.008 40.0658 115.618C37.3487 119.872 34.6316 124.125 31.9145 128.379C29.6106 131.986 27.3067 135.592 25.0028 139.199C23.2565 141.933 21.5101 144.667 19.7639 147.4C18.7335 149.013 17.7031 150.626 16.6728 152.239C14.8665 155.067 13.7231 158.171 14.23 161.595C14.9672 166.576 19.2366 170.131 24.2215 170.137C25.559 170.139 26.8963 170.137 28.2338 170.137C30.9198 170.137 33.6058 170.137 36.2918 170.137C40.0725 170.137 43.8533 170.137 47.6341 170.137C52.2557 170.137 56.8772 170.137 61.4989 170.137C66.7339 170.137 71.969 170.137 77.204 170.137C82.7467 170.137 88.2894 170.137 93.8322 170.137C99.4529 170.137 105.074 170.137 110.694 170.137C116.139 170.137 121.584 170.137 127.029 170.137C132.044 170.137 137.06 170.137 142.075 170.137C146.425 170.137 150.776 170.137 155.127 170.137C158.516 170.137 161.904 170.137 165.293 170.137C167.49 170.137 169.686 170.137 171.883 170.137C172.633 170.137 173.384 170.137 174.135 170.137C178.404 170.087 182.136 167.627 184.212 163.932C186.248 160.307 186.562 155.866 184.415 152.221ZM94.0937 37.3471C94.0897 37.3539 94.0862 37.3597 94.0824 37.3661C94.0826 37.3652 94.0831 37.3642 94.0833 37.3632C94.0844 37.3581 94.0909 37.3518 94.0937 37.3471ZM178.584 164.489C178.476 164.538 178.524 164.516 178.584 164.489V164.489ZM180.937 162.79C180.979 162.72 181.118 162.485 181.127 162.498C181.145 162.528 181.058 162.647 180.937 162.79ZM181.821 160.333C181.806 160.446 181.782 160.646 181.773 160.697C181.736 160.919 181.686 161.139 181.637 161.359C181.637 161.359 181.637 161.359 181.637 161.359C181.629 161.377 181.621 161.399 181.61 161.426C181.54 161.604 181.472 161.785 181.406 161.965C181.402 161.977 181.398 161.988 181.394 161.999C181.304 162.16 181.219 162.323 181.123 162.481C181.074 162.562 181.016 162.641 180.97 162.724C180.949 162.762 180.936 162.785 180.93 162.798C180.727 163.035 180.436 163.332 180.388 163.385C180.696 163.049 180.535 163.229 180.318 163.42C180.172 163.548 180.018 163.666 179.869 163.79C179.848 163.807 179.831 163.822 179.816 163.835C179.797 163.845 179.775 163.857 179.747 163.873C179.576 163.97 179.411 164.078 179.238 164.171C179.043 164.277 178.844 164.373 178.642 164.463C178.556 164.494 178.471 164.526 178.384 164.553C177.532 164.819 176.835 164.945 176.084 164.954C175.296 164.954 174.508 164.954 173.719 164.954C171.519 164.954 169.318 164.954 167.118 164.954C163.751 164.954 160.385 164.954 157.019 164.954C152.756 164.954 148.493 164.954 144.231 164.954C139.275 164.954 134.319 164.954 129.364 164.954C123.981 164.954 118.598 164.954 113.215 164.954C107.651 164.954 102.086 164.954 96.5224 164.954C91.024 164.954 85.5255 164.954 80.0271 164.954C74.8407 164.954 69.6543 164.954 64.4679 164.954C59.8401 164.954 55.2123 164.954 50.5846 164.954C46.7784 164.954 42.9721 164.954 39.166 164.954C36.3891 164.954 33.6122 164.954 30.8354 164.954C29.3555 164.954 27.8756 164.954 26.3957 164.954C25.9641 164.954 25.534 164.958 25.1029 164.922C23.4511 164.785 22.11 164.207 20.7626 163.127C20.3445 162.792 19.7301 162.074 19.3142 161.434C19.2096 161.273 19.1102 161.109 19.0161 160.942C18.9707 160.861 18.8013 160.534 18.8105 160.558C18.7451 160.414 18.5329 159.846 18.4422 159.537C18.3467 159.211 18.2692 158.879 18.2129 158.544C18.2174 158.545 18.1876 158.285 18.1815 158.192C18.1669 157.964 18.1617 157.736 18.1651 157.508C18.166 157.455 18.1793 157.245 18.185 157.131C18.2055 157.005 18.2441 156.74 18.2591 156.662C18.2913 156.493 18.3319 156.326 18.3726 156.16C18.2821 156.539 18.4099 156.072 18.4891 155.866C18.518 155.79 18.6652 155.487 18.6846 155.432C18.7383 155.339 18.7932 155.243 18.8125 155.21C18.8692 155.114 18.9282 155.019 18.9875 154.924C19.0003 154.904 19.0137 154.884 19.0265 154.863C19.2211 154.554 19.4201 154.247 19.617 153.939C20.6335 152.348 21.6501 150.756 22.6667 149.165C24.3869 146.472 26.107 143.779 27.8271 141.086C30.0848 137.552 32.3425 134.017 34.6001 130.483C37.2646 126.312 39.9291 122.141 42.5935 117.97C45.5011 113.418 48.4086 108.866 51.3161 104.315C54.3131 99.6229 57.31 94.9312 60.3069 90.2397C63.2394 85.6489 66.172 81.058 69.1045 76.4672C71.819 72.2178 74.5334 67.9683 77.2479 63.719C79.5904 60.0517 81.9331 56.3844 84.2756 52.7172C86.0852 49.8842 87.8948 47.0513 89.7044 44.2184C90.8459 42.4315 91.9873 40.6446 93.1287 38.8578C93.3976 38.4368 93.6701 38.0178 93.9356 37.5945C93.9507 37.5705 93.9737 37.5416 93.9972 37.511C93.8744 37.7231 94.1597 37.2638 94.301 37.0921C94.4017 36.9695 94.5483 36.8114 94.5423 36.8113C94.6372 36.721 94.7333 36.6319 94.8323 36.546C94.9866 36.4121 95.1478 36.2876 95.3084 36.1615C94.9392 36.4513 95.3917 36.1121 95.5441 36.0212C96.7591 35.2961 98.1095 34.9498 99.7068 35.0725C101.356 35.1993 102.702 35.7434 104.07 36.8307C104.685 37.3192 105.311 38.1542 105.817 38.9457C106.592 40.1592 107.367 41.3727 108.142 42.5862C109.667 44.9733 111.192 47.3605 112.717 49.7476C114.838 53.0679 116.959 56.3881 119.08 59.7083C121.629 63.6999 124.179 67.6913 126.729 71.6829C129.579 76.1455 132.43 80.6082 135.281 85.0709C138.267 89.7458 141.253 94.4206 144.239 99.0955C147.207 103.742 150.176 108.388 153.144 113.035C155.94 117.412 158.736 121.789 161.532 126.167C164.002 130.034 166.473 133.902 168.943 137.769C170.935 140.886 172.926 144.003 174.917 147.12C176.27 149.239 177.623 151.357 178.976 153.475C179.551 154.376 180.134 155.272 180.702 156.177C181.138 156.872 181.311 157.219 181.54 157.972C181.6 158.167 181.652 158.363 181.697 158.561C181.711 158.623 181.759 158.873 181.78 158.97C181.787 159.063 181.815 159.319 181.819 159.383C181.831 159.579 181.836 159.775 181.834 159.972C181.834 160.022 181.825 160.217 181.821 160.333Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M98.5821 122.507C99.019 122.759 99.6307 122.629 100.038 122.389C101.205 121.703 101.925 120.275 102.041 118.92C103.115 106.361 106.514 75.1051 106.514 68.3062C106.514 59.902 92.8134 60.6835 92.0664 71.3279C91.6887 76.7103 97.5083 119.581 97.8266 121.187C97.9188 121.652 98.1423 122.253 98.5821 122.507Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M101.841 133.945C101.826 133.94 101.812 133.934 101.797 133.929C98.2767 132.6 94.4012 134.976 93.9964 138.717C93.9765 138.901 93.9636 139.086 93.958 139.272C93.8552 142.712 96.4467 146.126 99.8464 146.664C103.245 147.201 106.896 144.494 107.099 141.059C107.285 137.909 104.789 135.072 101.841 133.945Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M161.729 131.662C161.873 131.367 162.082 130.81 161.71 130.584C161.365 130.375 160.901 130.836 160.768 131.107C156.804 139.201 152.84 147.295 148.877 155.389C147.759 157.67 146.642 159.952 145.525 162.233C145.38 162.528 145.171 163.085 145.543 163.311C145.888 163.52 146.352 163.059 146.485 162.788C150.449 154.694 154.413 146.6 158.377 138.506C159.494 136.225 160.611 133.943 161.729 131.662Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M144.786 152.64C144.441 152.43 143.977 152.891 143.844 153.163C142.363 156.187 140.882 159.21 139.402 162.234C139.257 162.528 139.048 163.085 139.42 163.311C139.765 163.521 140.229 163.06 140.362 162.788C141.843 159.764 143.323 156.741 144.804 153.717C144.948 153.423 145.158 152.866 144.786 152.64Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M136.792 156.459C136.447 156.25 135.983 156.711 135.85 156.982C134.993 158.733 134.136 160.483 133.279 162.233C133.134 162.528 132.925 163.085 133.297 163.311C133.642 163.52 134.106 163.06 134.239 162.788C135.096 161.037 135.953 159.287 136.81 157.537C136.955 157.242 137.164 156.685 136.792 156.459Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M129.1 159.663C128.755 159.454 128.291 159.915 128.158 160.186C127.824 160.869 127.49 161.551 127.155 162.234C127.011 162.528 126.802 163.086 127.174 163.311C127.519 163.521 127.983 163.06 128.116 162.788C128.45 162.106 128.784 161.423 129.118 160.741C129.263 160.447 129.472 159.889 129.1 159.663Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M165.835 137.946C165.979 137.652 166.188 137.094 165.816 136.868C165.471 136.659 165.007 137.12 164.874 137.392C161.72 143.832 158.566 150.273 155.412 156.713C154.511 158.553 153.609 160.393 152.708 162.233C152.564 162.528 152.355 163.085 152.726 163.311C153.071 163.52 153.535 163.06 153.669 162.788C156.823 156.347 159.977 149.907 163.131 143.466C164.032 141.626 164.933 139.786 165.835 137.946Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M169.923 143.153C169.578 142.943 169.114 143.404 168.98 143.676C165.951 149.862 162.921 156.048 159.892 162.234C159.748 162.528 159.538 163.086 159.91 163.311C160.255 163.521 160.719 163.06 160.852 162.788C163.882 156.602 166.911 150.416 169.941 144.23C170.085 143.936 170.294 143.378 169.923 143.153Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M174.332 148.821C173.987 148.611 173.523 149.072 173.39 149.344C171.286 153.64 169.182 157.937 167.077 162.234C166.933 162.528 166.724 163.086 167.095 163.311C167.44 163.521 167.905 163.06 168.038 162.788C170.142 158.492 172.246 154.195 174.351 149.898C174.495 149.604 174.704 149.046 174.332 148.821Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M178.197 155.597C177.852 155.387 177.388 155.848 177.255 156.12C176.257 158.158 175.259 160.196 174.261 162.233C174.117 162.528 173.907 163.085 174.279 163.311C174.624 163.52 175.088 163.06 175.221 162.788C176.219 160.75 177.217 158.712 178.215 156.674C178.36 156.38 178.569 155.823 178.197 155.597Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M97.1962 40.2135C97.3477 39.9803 97.4773 39.477 97.1807 39.2971C96.8678 39.1072 96.5194 39.5265 96.3794 39.7419C94.7034 42.3205 93.0556 44.9176 91.4179 47.5205C88.1743 52.6759 84.976 57.8633 81.9271 63.1367C80.4155 65.7509 78.9283 68.3855 77.5879 71.0925C77.4642 71.3423 77.2879 71.8174 77.6034 72.0088C77.8975 72.1874 78.2905 71.7947 78.4047 71.564C80.9657 66.3919 83.9726 61.4308 86.9671 56.5018C89.7369 51.9427 92.5713 47.4226 95.4474 42.9297C96.0279 42.0228 96.6094 41.1164 97.1962 40.2135Z",fill:"var(--pae-shell-color-secondary)"}),l.jsx("path",{d:"M75.3224 76.1247C75.0193 75.9408 74.6477 76.3459 74.521 76.5695C74.1645 77.1991 73.808 77.8286 73.4515 78.4581C73.3144 78.7003 73.1605 79.1884 73.467 79.3744C73.77 79.5583 74.1416 79.1532 74.2684 78.9296C74.6248 78.3001 74.9814 77.6705 75.3378 77.0411C75.475 76.7988 75.6288 76.3107 75.3224 76.1247Z",fill:"var(--pae-shell-color-secondary)"})]});Zl.displayName="WarningIcon";const Zg="support@bluealba.com",Xg="@bluealba/pae-shell-ui",ri=()=>{const{supportEmail:e=Zg}=Cc(Xg),t=`mailto:${e}?Subject=Support`;return l.jsxs("div",{className:Pr.container,children:[l.jsx(Zl,{}),l.jsx("div",{className:Pr.title,children:"Oops! Something went wrong"}),l.jsxs("div",{className:Pr.description,children:["If the error persists,"," ",l.jsx("a",{className:Pr.mailToText,href:t,children:"contact the administrator."})]})]})};ri.displayName="ErrorState";const Jg="FieldGroup__Q2JCV",ev="FieldGroup__Q2JCV",tv="FieldGroup--horizontal__kpfL1",nv="FieldGroup--vertical__FLo-Q",ja={FieldGroup:Jg,fieldGroup:ev,"FieldGroup--horizontal":"FieldGroup--horizontal__kpfL1",fieldGroupHorizontal:tv,"FieldGroup--vertical":"FieldGroup--vertical__FLo-Q",fieldGroupVertical:nv},Xl=_.forwardRef(({children:e,className:t,orientation:n="vertical",...r},o)=>{const s=N(ja.FieldGroup,ja[`FieldGroup--${n}`],t);return l.jsx("div",{ref:o,className:s,...r,children:e})});Xl.displayName="FieldGroup";const Jl=({className:e,state:t="open",onClick:n})=>t==="open"?l.jsxs("svg",{className:e,onClick:n,xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",viewBox:"0 0 14 14",fill:"none",children:[l.jsx("path",{d:"M1.41174 7.41635C1.3323 7.29056 1.29257 7.22766 1.27034 7.13065C1.25364 7.05778 1.25364 6.94287 1.27034 6.87C1.29257 6.77299 1.3323 6.71009 1.41174 6.58431C2.06823 5.54482 4.02232 2.91699 7.00024 2.91699C9.97815 2.91699 11.9322 5.54482 12.5887 6.5843C12.6682 6.71009 12.7079 6.77299 12.7301 6.87C12.7468 6.94287 12.7468 7.05778 12.7301 7.13065C12.7079 7.22766 12.6682 7.29056 12.5887 7.41635C11.9322 8.45584 9.97815 11.0837 7.00024 11.0837C4.02232 11.0837 2.06823 8.45584 1.41174 7.41635Z",stroke:"#818181",strokeWidth:"1.16667",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("path",{d:"M7.00024 8.75033C7.96673 8.75033 8.75024 7.96682 8.75024 7.00033C8.75024 6.03383 7.96673 5.25033 7.00024 5.25033C6.03374 5.25033 5.25024 6.03383 5.25024 7.00033C5.25024 7.96682 6.03374 8.75033 7.00024 8.75033Z",stroke:"#818181",strokeWidth:"1.16667",strokeLinecap:"round",strokeLinejoin:"round"})]}):l.jsx("svg",{className:e,onClick:n,xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",viewBox:"0 0 14 14",fill:"none",children:l.jsx("path",{d:"M6.26672 2.97052C6.50379 2.93547 6.74835 2.91667 7.00024 2.91667C9.97816 2.91667 11.9323 5.54449 12.5887 6.58398C12.6682 6.70979 12.7079 6.7727 12.7302 6.86973C12.7469 6.94259 12.7468 7.05755 12.7301 7.13042C12.7079 7.22744 12.6679 7.29077 12.5879 7.41741C12.413 7.69425 12.1463 8.08331 11.793 8.50527M3.92252 3.9171C2.66131 4.77266 1.8051 5.9613 1.41231 6.58308C1.3325 6.70942 1.29259 6.7726 1.27035 6.86961C1.25364 6.94248 1.25363 7.05742 1.27033 7.13029C1.29257 7.22731 1.33229 7.29022 1.41174 7.41602C2.06823 8.45551 4.02232 11.0833 7.00024 11.0833C8.20098 11.0833 9.23526 10.6561 10.0851 10.078M1.75024 1.75L12.2502 12.25M5.76281 5.76256C5.44612 6.07925 5.25024 6.51675 5.25024 7C5.25024 7.9665 6.03374 8.75 7.00024 8.75C7.48349 8.75 7.92099 8.55413 8.23768 8.23744",stroke:"#818181",strokeWidth:"1.16667",strokeLinecap:"round",strokeLinejoin:"round"})}),rv="Input__uS0sb",Ia={Input:rv,Error:"Error__-DQpw"},po=_.forwardRef(({className:e,error:t,...n},r)=>{const o=N(Ia.Input,t&&Ia.Error,e);return l.jsx("input",{ref:r,className:o,...n})});po.displayName="Input";const ov={Error:"Error__N4OP5"},eu=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(ov.Error,t);return l.jsx("span",{ref:r,className:o,...n,children:e})});eu.displayName="InputError";const sv="Label__VYUvW",Na={Label:sv,Error:"Error__Eu6DI"},tu=_.forwardRef(({children:e,className:t,error:n,...r},o)=>{const s=N(Na.Label,n&&Na.Error,t);return l.jsx("label",{ref:o,className:s,...r,children:e})});tu.displayName="Label";const iv="List__h09XG",av="List__h09XG",cv="Item__YMy2i",lv="Item__YMy2i",uv="List--primary__J2pbx",dv="List--secondary__gi1ao",fv="Item--selected__yRWow",hv="Title__RJmEW",pv="Title__RJmEW",mv="Description__DGyX2",gv="Description__DGyX2",vv="Actions__UHP5l",yv="Actions__UHP5l",bv="Action__q-R1I",wv="Action__q-R1I",Cv="Item--disabled__Ke1u-",xv="List--small__ijoSR",Sv="List--medium__E1FEY",Ev="List--large__T8tfz",_v="Icon__dFr-L",Rv="Icon__dFr-L",Be={List:iv,list:av,Item:cv,item:lv,"List--primary":"List--primary__J2pbx",listPrimary:uv,"List--secondary":"List--secondary__gi1ao",listSecondary:dv,"Item--selected":"Item--selected__yRWow",itemSelected:fv,Title:hv,title:pv,Description:mv,description:gv,Actions:vv,actions:yv,Action:bv,action:wv,"Item--disabled":"Item--disabled__Ke1u-",itemDisabled:Cv,"List--small":"List--small__ijoSR",listSmall:xv,"List--medium":"List--medium__E1FEY",listMedium:Sv,"List--large":"List--large__T8tfz",listLarge:Ev,Icon:_v,icon:Rv},nu=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(Be.Action,t);return l.jsx("button",{ref:r,className:o,...n,children:e})});nu.displayName="Action";const oi=({className:e,...t})=>l.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,...t,children:[l.jsx("path",{d:"M6 6.5C6.27614 6.5 6.5 6.27614 6.5 6C6.5 5.72386 6.27614 5.5 6 5.5C5.72386 5.5 5.5 5.72386 5.5 6C5.5 6.27614 5.72386 6.5 6 6.5Z",stroke:"#A9A9A9",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("path",{d:"M9.5 6.5C9.77614 6.5 10 6.27614 10 6C10 5.72386 9.77614 5.5 9.5 5.5C9.22386 5.5 9 5.72386 9 6C9 6.27614 9.22386 6.5 9.5 6.5Z",stroke:"#A9A9A9",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("path",{d:"M2.5 6.5C2.77614 6.5 3 6.27614 3 6C3 5.72386 2.77614 5.5 2.5 5.5C2.22386 5.5 2 5.72386 2 6C2 6.27614 2.22386 6.5 2.5 6.5Z",stroke:"#A9A9A9",strokeLinecap:"round",strokeLinejoin:"round"})]});oi.displayName="HorizontalDots";const ru=_.forwardRef(({children:e,className:t,onClick:n,...r},o)=>{const s=_.useRef(null),[i,a]=_.useState(!1),c=N(Be.Actions,t),u=()=>{const x=Wt["DropdownList--open"],h=Wt["DropdownList--closed"];document.querySelectorAll(`.${x}`).forEach(y=>{y!==s.current&&(y.classList.remove(x),y.classList.add(h))})},f=x=>{x.stopPropagation(),i?p():(a(!0),n==null||n(x))},p=()=>{a(!1)},m=x=>{x.key==="Escape"&&p()},g=x=>{s.current&&!s.current.contains(x.target)&&p()};return _.useEffect(()=>(i?(u(),document.addEventListener("keydown",m),document.addEventListener("click",g)):(document.removeEventListener("keydown",m),document.removeEventListener("click",g)),()=>{document.removeEventListener("keydown",m),document.removeEventListener("click",g)}),[i,g,m,u]),l.jsxs("div",{ref:o,className:c,onClick:f,role:"button",tabIndex:0,"data-testid":"actions",...r,children:[l.jsx(oi,{}),l.jsx(ho,{align:"left",ref:s,open:i,"data-testid":"actions-dropdown",role:"menu","aria-label":"Actions",children:e})]})});ru.displayName="Actions";const ou=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(Be.Description,t);return l.jsx("p",{ref:r,className:o,...n,children:e})});ou.displayName="Description";const su=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(Be.Icon,t);return l.jsx("div",{ref:r,className:o,...n,children:e})});su.displayName="Icon";const iu=_.forwardRef(({children:e,className:t,selected:n,disabled:r=!1,...o},s)=>{const i=N(Be.Item,{[Be["Item--selected"]]:n,[Be["Item--disabled"]]:r},t);return l.jsx("li",{ref:s,className:i,"aria-disabled":r,...o,children:e})});iu.displayName="Item";const au=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(Be.Title,t);return l.jsx("h3",{ref:r,className:o,...n,children:e})});au.displayName="Title";const tt=_.forwardRef(({children:e,className:t,size:n="medium",variant:r,...o},s)=>{const i=N(Be.List,{[Be[`List--${n}`]]:n,[Be[`List--${r}`]]:r},t);return l.jsx("ul",{ref:s,className:i,...o,children:e})});tt.displayName="List";tt.Item=iu;tt.Badges=Qs;tt.Badge=Ks;tt.Title=au;tt.Description=ou;tt.Actions=ru;tt.Action=nu;tt.Icon=su;const cu=({className:e,...t})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,...t,children:[l.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),l.jsx("path",{d:"M15 6l-6 6l6 6"})]});cu.displayName="ChevronLeft";const lu=({className:e,...t})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,...t,children:[l.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),l.jsx("path",{d:"M9 6l6 6l-6 6"})]});lu.displayName="ChevronRight";const Tv="Navigation__uylxk",Pv="PaginationContent__UpLw0",Av="PaginationEllipsis__perWk",Ov="PaginationLink__GVUZj",jv="Active__u1Ahy",Iv="Disabled__8WM0y",Nv="Prev__wp4hc",Dv="Next__eVyL5",dt={Navigation:Tv,PaginationContent:Pv,PaginationEllipsis:Av,PaginationLink:Ov,Active:jv,Disabled:Iv,Prev:Nv,Next:Dv},si=({className:e,...t})=>l.jsx("nav",{"aria-label":"pagination",className:N(dt.Navigation,e),...t});si.displayName="Pagination";const ii=d.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:N(dt.PaginationContent,e),...t}));ii.displayName="PaginationContent";const Vn=d.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:e,...t}));Vn.displayName="PaginationItem";const ar=({className:e,isActive:t,...n})=>l.jsx("a",{"aria-current":t?"page":void 0,className:N(dt.PaginationLink,t&&dt.Active,e),...n});ar.displayName="PaginationLink";const ai=({className:e,disabled:t,...n})=>l.jsxs(ar,{"aria-label":"Go to previous page",className:N(t&&dt.Disabled,dt.Prev,e),...n,children:[l.jsx(cu,{}),l.jsx("span",{children:"Previous"})]});ai.displayName="PaginationPrevious";const ci=({className:e,disabled:t,...n})=>l.jsxs(ar,{"aria-label":"Go to next page",className:N(t&&dt.Disabled,dt.Next,e),...n,children:[l.jsx("span",{children:"Next"}),l.jsx(lu,{})]});ci.displayName="PaginationNext";const li=({className:e,...t})=>l.jsx("span",{"aria-hidden":!0,className:N(dt.PaginationEllipsis,e),...t,children:l.jsx(oi,{})});li.displayName="PaginationEllipsis";const Lv="PasswordInput__GDJDN",Mv="eyeIcon__kDExG",Da={PasswordInput:Lv,eyeIcon:Mv},kv=_.forwardRef((e,t)=>{const[n,r]=_.useState("password"),o=_.useCallback(()=>{r(s=>s==="password"?"text":"password")},[]);return l.jsxs("div",{className:N(Da.PasswordInput,e.className),children:[l.jsx(po,{type:n,...e,ref:t}),l.jsx(Jl,{className:Da.eyeIcon,onClick:o,state:n==="password"?"open":"closed"})]})}),$v="pill__vtGwB",Fv="pill--solid__F-mR4",Bv="pill--outline__gC-mh",La={pill:$v,"pill--solid":"pill--solid__F-mR4",pillSolid:Fv,"pill--outline":"pill--outline__gC-mh",pillOutline:Bv},Uv=({children:e,variant:t="solid",className:n})=>{const r=N(La.pill,La[`pill--${t}`],n);return l.jsx("div",{className:r,children:e})};function Wv(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uu={exports:{}};(function(e,t){(function(n,r){typeof Wv=="function"?e.exports=r():n.pluralize=r()})(hf,function(){var n=[],r=[],o={},s={},i={};function a(h){return typeof h=="string"?new RegExp("^"+h+"$","i"):h}function c(h,v){return h===v?v:h===h.toLowerCase()?v.toLowerCase():h===h.toUpperCase()?v.toUpperCase():h[0]===h[0].toUpperCase()?v.charAt(0).toUpperCase()+v.substr(1).toLowerCase():v.toLowerCase()}function u(h,v){return h.replace(/\$(\d{1,2})/g,function(y,b){return v[b]||""})}function f(h,v){return h.replace(v[0],function(y,b){var S=u(v[1],arguments);return c(y===""?h[b-1]:y,S)})}function p(h,v,y){if(!h.length||o.hasOwnProperty(h))return v;for(var b=y.length;b--;){var S=y[b];if(S[0].test(v))return f(v,S)}return v}function m(h,v,y){return function(b){var S=b.toLowerCase();return v.hasOwnProperty(S)?c(b,S):h.hasOwnProperty(S)?c(b,h[S]):p(S,b,y)}}function g(h,v,y,b){return function(S){var E=S.toLowerCase();return v.hasOwnProperty(E)?!0:h.hasOwnProperty(E)?!1:p(E,E,y)===E}}function x(h,v,y){var b=v===1?x.singular(h):x.plural(h);return(y?v+" ":"")+b}return x.plural=m(i,s,n),x.isPlural=g(i,s,n),x.singular=m(s,i,r),x.isSingular=g(s,i,r),x.addPluralRule=function(h,v){n.push([a(h),v])},x.addSingularRule=function(h,v){r.push([a(h),v])},x.addUncountableRule=function(h){if(typeof h=="string"){o[h.toLowerCase()]=!0;return}x.addPluralRule(h,"$0"),x.addSingularRule(h,"$0")},x.addIrregularRule=function(h,v){v=v.toLowerCase(),h=h.toLowerCase(),i[h]=v,s[v]=h},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(h){return x.addIrregularRule(h[0],h[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(h){return x.addPluralRule(h[0],h[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(h){return x.addSingularRule(h[0],h[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(x.addUncountableRule),x})})(uu);var Hv=uu.exports;const Vv=pf(Hv),ui=({count:e,singularText:t,children:n=(r,o)=>`${r} ${o}`})=>l.jsx(l.Fragment,{children:n(e,Vv(t,e))});ui.displayName="PluralizeCounter";const zv="SearchInput__4OFyE",qv="SearchIcon__YgnQy",Gv="ClearIcon__ukRVr",Kv="SearchInput__ClearIcon__uzVoc",Qv="SearchInput__SearchIcon__zoDG4",Fn={SearchInput:zv,SearchIcon:qv,ClearIcon:Gv,SearchInput__ClearIcon:Kv,SearchInput__SearchIcon:Qv},di=_.forwardRef(({className:e,placeholder:t="Type to search...",showClearButton:n=!1,showSearchIcon:r=!0,onClear:o,...s},i)=>{const a=N(Fn.SearchInput,n&&Fn.SearchInput__ClearIcon,r&&Fn.SearchInput__SearchIcon,e),c=N(Fn.SearchIcon),u=N(Fn.ClearIcon);return l.jsxs("div",{className:a,children:[l.jsx(po,{ref:i,type:"text",placeholder:t,...s}),r&&l.jsx("svg",{className:c,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M13 13L10.6667 10.6667M12.3333 6.66667C12.3333 9.79628 9.79628 12.3333 6.66667 12.3333C3.53705 12.3333 1 9.79628 1 6.66667C1 3.53705 3.53705 1 6.66667 1C9.79628 1 12.3333 3.53705 12.3333 6.66667Z",stroke:"#A4A4A4",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),n&&l.jsx("svg",{className:u,width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:o,children:l.jsx("path",{d:"M7.33334 0.666748L0.666672 7.33341M0.666672 0.666748L7.33334 7.33341",stroke:"#818181",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})]})});di.displayName="SearchInput";const Yv="SearchAutocomplete__vR9Hk",Zv="AutocompleteItem__YIm7R",Xv="AutocompleteHighlighter__LAFTV",Jv="AutocompleteHighlighter__match__Wy1o2",ey="DropdownList__-fHIk",ty="AutocompleteItemDescription__4QYN5",Xt={SearchAutocomplete:Yv,AutocompleteItem:Zv,"AutocompleteItem--canBeSelected":"AutocompleteItem--canBeSelected__jxk4z",AutocompleteHighlighter:Xv,AutocompleteHighlighter__match:Jv,DropdownList:ey,AutocompleteItemDescription:ty},du=_.forwardRef(({text:e,query:t,className:n,...r},o)=>{const s=N(Xt.AutocompleteHighlighter,n),i=(a,c)=>{const u=a.toLowerCase().indexOf(c.toLowerCase());if(u===-1||c.length===0)return a;const f=a.slice(0,u),p=a.slice(u,u+c.length),m=a.slice(u+c.length);return l.jsxs(l.Fragment,{children:[f,l.jsx("span",{className:Xt.AutocompleteHighlighter__match,children:p}),i(m,c)]})};return l.jsx("div",{ref:o,className:s,...r,children:i(e,t)})});du.displayName="AutocompleteHighlighter";const Wn=_.forwardRef(({children:e,className:t,canBeSelected:n=!1,...r},o)=>{const s=N(Xt.AutocompleteItem,{[Xt["AutocompleteItem--canBeSelected"]]:n},t);return l.jsx("div",{ref:o,className:s,role:n?"option":void 0,...r,children:e})});Wn.displayName="AutocompleteItem";const ny=300,ry={query:"",suggestions:[],loading:!1,error:null},oy=({suggestionFetcher:e,canAdd:t})=>{const[n,r]=_.useState(ry);return _.useEffect(()=>{r(a=>({...a,loading:!0}));const s=async()=>{try{const a=await e(n.query);t&&!a.some(c=>c.value.toLowerCase()===n.query.toLowerCase())&&a.push({label:`Add "${n.query}"`,value:n.query,isNew:!0}),r(c=>({...c,suggestions:a,loading:!1}))}catch(a){r(c=>({...c,suggestions:[],error:a,loading:!1}))}},i=setTimeout(()=>{s()},ny);return()=>{clearTimeout(i)}},[n.query,e,t]),{...n,setQuery:s=>{r(i=>({...i,query:s}))}}},sy=5,fu=_.forwardRef(({children:e,className:t,canAdd:n,maxSuggestionsShown:r=sy,searchInputProps:o,keepSelectedOption:s,suggestionFetcher:i,onAccept:a,...c},u)=>{const{query:f,setQuery:p,suggestions:m,loading:g}=oy({suggestionFetcher:i,canAdd:n}),[x,h]=_.useState(null),v=f.length>0,y=P=>{p(P.target.value)},b=P=>{a==null||a(P),s?(h(P),p(P.value)):p("")},S=()=>{a==null||a(null),h(null),p("")},E=N(Xt.SearchAutocomplete,t),R=m.slice(0,r),T=m.slice(r);return l.jsxs("div",{ref:u,className:E,...c,children:[l.jsx(di,{...o,value:f,onChange:y,showClearButton:!!x,onClear:S}),e,l.jsxs(ho,{className:Xt.DropdownList,open:v&&!x,role:"listbox","aria-label":"Suggestions",children:[g?l.jsx(Wn,{children:"Loading..."}):R.map(P=>l.jsxs(Wn,{canBeSelected:!0,onClick:b.bind(null,P),children:[l.jsx(du,{text:P.label,query:f}),P.description&&l.jsx("span",{className:Xt.AutocompleteItemDescription,children:P.description})]},P.value)),!g&&T.length>0&&l.jsxs(Wn,{children:[T.length," more results"]}),v&&m.length===0&&!g&&l.jsx(Wn,{children:"No results found"})]})]})});fu.displayName="SearchAutocomplete";const iy="Select__giqpe",ay="Chevron__YvhBd",xs={Select:iy,Chevron:ay},hu=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(xs.Option,t);return l.jsx("option",{ref:r,className:o,...n,children:e})});hu.displayName="Option";const fi=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(xs.Select,t);return l.jsxs("div",{className:o,children:[l.jsx("select",{ref:r,...n,children:e}),l.jsx("div",{className:xs.Chevron,children:l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M4 6L8 10L12 6",stroke:"#818181",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});fi.displayName="Select";fi.Option=hu;function Ma(e,[t,n]){return Math.min(n,Math.max(t,e))}function ka(e){const t=cy(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),c=a.find(uy);if(c){const u=c.props.children,f=a.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function cy(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=fy(o),a=dy(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Nn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ly=Symbol("radix.slottable");function uy(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ly}function dy(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function fy(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function hy(e){const t=e+"CollectionProvider",[n,r]=ir(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:v,children:y}=h,b=_.useRef(null),S=_.useRef(new Map).current;return l.jsx(o,{scope:v,itemMap:S,collectionRef:b,children:y})};i.displayName=t;const a=e+"CollectionSlot",c=ka(a),u=_.forwardRef((h,v)=>{const{scope:y,children:b}=h,S=s(a,y),E=ce(v,S.collectionRef);return l.jsx(c,{ref:E,children:b})});u.displayName=a;const f=e+"CollectionItemSlot",p="data-radix-collection-item",m=ka(f),g=_.forwardRef((h,v)=>{const{scope:y,children:b,...S}=h,E=_.useRef(null),R=ce(v,E),T=s(f,y);return _.useEffect(()=>(T.itemMap.set(E,{ref:E,...S}),()=>void T.itemMap.delete(E))),l.jsx(m,{[p]:"",ref:R,children:b})});g.displayName=f;function x(h){const v=s(e+"CollectionConsumer",h);return _.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const S=Array.from(b.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((T,P)=>S.indexOf(T.ref.current)-S.indexOf(P.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:g},x,r]}var py=d.createContext(void 0);function my(e){const t=d.useContext(py);return e||t||"ltr"}const gy=["top","right","bottom","left"],Lt=Math.min,Te=Math.max,Yr=Math.round,Ar=Math.floor,Je=e=>({x:e,y:e}),vy={left:"right",right:"left",bottom:"top",top:"bottom"},yy={start:"end",end:"start"};function Ss(e,t,n){return Te(e,Lt(t,n))}function ft(e,t){return typeof e=="function"?e(t):e}function ht(e){return e.split("-")[0]}function Ln(e){return e.split("-")[1]}function hi(e){return e==="x"?"y":"x"}function pi(e){return e==="y"?"height":"width"}const by=new Set(["top","bottom"]);function Xe(e){return by.has(ht(e))?"y":"x"}function mi(e){return hi(Xe(e))}function wy(e,t,n){n===void 0&&(n=!1);const r=Ln(e),o=mi(e),s=pi(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Zr(i)),[i,Zr(i)]}function Cy(e){const t=Zr(e);return[Es(e),t,Es(t)]}function Es(e){return e.replace(/start|end/g,t=>yy[t])}const $a=["left","right"],Fa=["right","left"],xy=["top","bottom"],Sy=["bottom","top"];function Ey(e,t,n){switch(e){case"top":case"bottom":return n?t?Fa:$a:t?$a:Fa;case"left":case"right":return t?xy:Sy;default:return[]}}function _y(e,t,n,r){const o=Ln(e);let s=Ey(ht(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Es)))),s}function Zr(e){return e.replace(/left|right|bottom|top/g,t=>vy[t])}function Ry(e){return{top:0,right:0,bottom:0,left:0,...e}}function pu(e){return typeof e!="number"?Ry(e):{top:e,right:e,bottom:e,left:e}}function Xr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ba(e,t,n){let{reference:r,floating:o}=e;const s=Xe(t),i=mi(t),a=pi(i),c=ht(t),u=s==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let g;switch(c){case"top":g={x:f,y:r.y-o.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-o.width,y:p};break;default:g={x:r.x,y:r.y}}switch(Ln(t)){case"start":g[i]-=m*(n&&u?-1:1);break;case"end":g[i]+=m*(n&&u?-1:1);break}return g}async function Ty(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=ft(t,e),x=pu(g),v=a[m?p==="floating"?"reference":"floating":p],y=Xr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:c})),b=p==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},R=Xr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:S,strategy:c}):b);return{top:(y.top-R.top+x.top)/E.y,bottom:(R.bottom-y.bottom+x.bottom)/E.y,left:(y.left-R.left+x.left)/E.x,right:(R.right-y.right+x.right)/E.x}}const Py=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Ba(u,r,c),m=r,g={},x=0;for(let v=0;v<a.length;v++){var h;const{name:y,fn:b}=a[v],{x:S,y:E,data:R,reset:T}=await b({x:f,y:p,initialPlacement:r,placement:m,strategy:o,middlewareData:g,rects:u,platform:{...i,detectOverflow:(h=i.detectOverflow)!=null?h:Ty},elements:{reference:e,floating:t}});f=S??f,p=E??p,g={...g,[y]:{...g[y],...R}},T&&x<=50&&(x++,typeof T=="object"&&(T.placement&&(m=T.placement),T.rects&&(u=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:f,y:p}=Ba(u,m,c)),v=-1)}return{x:f,y:p,placement:m,strategy:o,middlewareData:g}},Ay=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:f=0}=ft(e,t)||{};if(u==null)return{};const p=pu(f),m={x:n,y:r},g=mi(o),x=pi(g),h=await i.getDimensions(u),v=g==="y",y=v?"top":"left",b=v?"bottom":"right",S=v?"clientHeight":"clientWidth",E=s.reference[x]+s.reference[g]-m[g]-s.floating[x],R=m[g]-s.reference[g],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let P=T?T[S]:0;(!P||!await(i.isElement==null?void 0:i.isElement(T)))&&(P=a.floating[S]||s.floating[x]);const D=E/2-R/2,I=P/2-h[x]/2-1,L=Lt(p[y],I),B=Lt(p[b],I),U=L,W=P-h[x]-B,V=P/2-h[x]/2+D,re=Ss(U,V,W),z=!c.arrow&&Ln(o)!=null&&V!==re&&s.reference[x]/2-(V<U?L:B)-h[x]/2<0,Q=z?V<U?V-U:V-W:0;return{[g]:m[g]+Q,data:{[g]:re,centerOffset:V-re-Q,...z&&{alignmentOffset:Q}},reset:z}}}),Oy=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...v}=ft(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=ht(o),b=Xe(a),S=ht(a)===a,E=await(c.isRTL==null?void 0:c.isRTL(u.floating)),R=m||(S||!h?[Zr(a)]:Cy(a)),T=x!=="none";!m&&T&&R.push(..._y(a,h,x,E));const P=[a,...R],D=await c.detectOverflow(t,v),I=[];let L=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&I.push(D[y]),p){const V=wy(o,i,E);I.push(D[V[0]],D[V[1]])}if(L=[...L,{placement:o,overflows:I}],!I.every(V=>V<=0)){var B,U;const V=(((B=s.flip)==null?void 0:B.index)||0)+1,re=P[V];if(re&&(!(p==="alignment"?b!==Xe(re):!1)||L.every($=>Xe($.placement)===b?$.overflows[0]>0:!0)))return{data:{index:V,overflows:L},reset:{placement:re}};let z=(U=L.filter(Q=>Q.overflows[0]<=0).sort((Q,$)=>Q.overflows[1]-$.overflows[1])[0])==null?void 0:U.placement;if(!z)switch(g){case"bestFit":{var W;const Q=(W=L.filter($=>{if(T){const oe=Xe($.placement);return oe===b||oe==="y"}return!0}).map($=>[$.placement,$.overflows.filter(oe=>oe>0).reduce((oe,pe)=>oe+pe,0)]).sort(($,oe)=>$[1]-oe[1])[0])==null?void 0:W[0];Q&&(z=Q);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}};function Ua(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wa(e){return gy.some(t=>e[t]>=0)}const jy=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=ft(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Ua(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Wa(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Ua(i,n.floating);return{data:{escapedOffsets:a,escaped:Wa(a)}}}default:return{}}}}},mu=new Set(["left","top"]);async function Iy(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=ht(n),a=Ln(n),c=Xe(n)==="y",u=mu.has(i)?-1:1,f=s&&c?-1:1,p=ft(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof x=="number"&&(g=a==="end"?x*-1:x),c?{x:g*f,y:m*u}:{x:m*u,y:g*f}}const Ny=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await Iy(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},Dy=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:y=>{let{x:b,y:S}=y;return{x:b,y:S}}},...u}=ft(e,t),f={x:n,y:r},p=await s.detectOverflow(t,u),m=Xe(ht(o)),g=hi(m);let x=f[g],h=f[m];if(i){const y=g==="y"?"top":"left",b=g==="y"?"bottom":"right",S=x+p[y],E=x-p[b];x=Ss(S,x,E)}if(a){const y=m==="y"?"top":"left",b=m==="y"?"bottom":"right",S=h+p[y],E=h-p[b];h=Ss(S,h,E)}const v=c.fn({...t,[g]:x,[m]:h});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[g]:i,[m]:a}}}}}},Ly=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=ft(e,t),f={x:n,y:r},p=Xe(o),m=hi(p);let g=f[m],x=f[p];const h=ft(a,t),v=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const S=m==="y"?"height":"width",E=s.reference[m]-s.floating[S]+v.mainAxis,R=s.reference[m]+s.reference[S]-v.mainAxis;g<E?g=E:g>R&&(g=R)}if(u){var y,b;const S=m==="y"?"width":"height",E=mu.has(ht(o)),R=s.reference[p]-s.floating[S]+(E&&((y=i.offset)==null?void 0:y[p])||0)+(E?0:v.crossAxis),T=s.reference[p]+s.reference[S]+(E?0:((b=i.offset)==null?void 0:b[p])||0)-(E?v.crossAxis:0);x<R?x=R:x>T&&(x=T)}return{[m]:g,[p]:x}}}},My=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...u}=ft(e,t),f=await i.detectOverflow(t,u),p=ht(o),m=Ln(o),g=Xe(o)==="y",{width:x,height:h}=s.floating;let v,y;p==="top"||p==="bottom"?(v=p,y=m===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=p,v=m==="end"?"top":"bottom");const b=h-f.top-f.bottom,S=x-f.left-f.right,E=Lt(h-f[v],b),R=Lt(x-f[y],S),T=!t.middlewareData.shift;let P=E,D=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=b),T&&!m){const L=Te(f.left,0),B=Te(f.right,0),U=Te(f.top,0),W=Te(f.bottom,0);g?D=x-2*(L!==0||B!==0?L+B:Te(f.left,f.right)):P=h-2*(U!==0||W!==0?U+W:Te(f.top,f.bottom))}await c({...t,availableWidth:D,availableHeight:P});const I=await i.getDimensions(a.floating);return x!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function mo(){return typeof window<"u"}function Mn(e){return gu(e)?(e.nodeName||"").toLowerCase():"#document"}function Ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nt(e){var t;return(t=(gu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gu(e){return mo()?e instanceof Node||e instanceof Ae(e).Node:!1}function Ue(e){return mo()?e instanceof Element||e instanceof Ae(e).Element:!1}function et(e){return mo()?e instanceof HTMLElement||e instanceof Ae(e).HTMLElement:!1}function Ha(e){return!mo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ae(e).ShadowRoot}const ky=new Set(["inline","contents"]);function cr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=We(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ky.has(o)}const $y=new Set(["table","td","th"]);function Fy(e){return $y.has(Mn(e))}const By=[":popover-open",":modal"];function go(e){return By.some(t=>{try{return e.matches(t)}catch{return!1}})}const Uy=["transform","translate","scale","rotate","perspective"],Wy=["transform","translate","scale","rotate","perspective","filter"],Hy=["paint","layout","strict","content"];function gi(e){const t=vi(),n=Ue(e)?We(e):e;return Uy.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Wy.some(r=>(n.willChange||"").includes(r))||Hy.some(r=>(n.contain||"").includes(r))}function Vy(e){let t=Mt(e);for(;et(t)&&!An(t);){if(gi(t))return t;if(go(t))return null;t=Mt(t)}return null}function vi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const zy=new Set(["html","body","#document"]);function An(e){return zy.has(Mn(e))}function We(e){return Ae(e).getComputedStyle(e)}function vo(e){return Ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mt(e){if(Mn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ha(e)&&e.host||nt(e);return Ha(t)?t.host:t}function vu(e){const t=Mt(e);return An(t)?e.ownerDocument?e.ownerDocument.body:e.body:et(t)&&cr(t)?t:vu(t)}function Gn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=vu(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Ae(o);if(s){const a=_s(i);return t.concat(i,i.visualViewport||[],cr(o)?o:[],a&&n?Gn(a):[])}return t.concat(o,Gn(o,[],n))}function _s(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yu(e){const t=We(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=et(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Yr(n)!==s||Yr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function yi(e){return Ue(e)?e:e.contextElement}function mn(e){const t=yi(e);if(!et(t))return Je(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=yu(t);let i=(s?Yr(n.width):n.width)/r,a=(s?Yr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const qy=Je(0);function bu(e){const t=Ae(e);return!vi()||!t.visualViewport?qy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gy(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ae(e)?!1:t}function rn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=yi(e);let i=Je(1);t&&(r?Ue(r)&&(i=mn(r)):i=mn(e));const a=Gy(s,n,r)?bu(s):Je(0);let c=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(s){const m=Ae(s),g=r&&Ue(r)?Ae(r):r;let x=m,h=_s(x);for(;h&&r&&g!==x;){const v=mn(h),y=h.getBoundingClientRect(),b=We(h),S=y.left+(h.clientLeft+parseFloat(b.paddingLeft))*v.x,E=y.top+(h.clientTop+parseFloat(b.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,p*=v.y,c+=S,u+=E,x=Ae(h),h=_s(x)}}return Xr({width:f,height:p,x:c,y:u})}function yo(e,t){const n=vo(e).scrollLeft;return t?t.left+n:rn(nt(e)).left+n}function wu(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-yo(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Ky(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=nt(r),a=t?go(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},u=Je(1);const f=Je(0),p=et(r);if((p||!p&&!s)&&((Mn(r)!=="body"||cr(i))&&(c=vo(r)),et(r))){const g=rn(r);u=mn(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const m=i&&!p&&!s?wu(i,c):Je(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+m.x,y:n.y*u.y-c.scrollTop*u.y+f.y+m.y}}function Qy(e){return Array.from(e.getClientRects())}function Yy(e){const t=nt(e),n=vo(e),r=e.ownerDocument.body,o=Te(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Te(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+yo(e);const a=-n.scrollTop;return We(r).direction==="rtl"&&(i+=Te(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Va=25;function Zy(e,t){const n=Ae(e),r=nt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const f=vi();(!f||f&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const u=yo(r);if(u<=0){const f=r.ownerDocument,p=f.body,m=getComputedStyle(p),g=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(r.clientWidth-p.clientWidth-g);x<=Va&&(s-=x)}else u<=Va&&(s+=u);return{width:s,height:i,x:a,y:c}}const Xy=new Set(["absolute","fixed"]);function Jy(e,t){const n=rn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=et(e)?mn(e):Je(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:i,height:a,x:c,y:u}}function za(e,t,n){let r;if(t==="viewport")r=Zy(e,n);else if(t==="document")r=Yy(nt(e));else if(Ue(t))r=Jy(t,n);else{const o=bu(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Xr(r)}function Cu(e,t){const n=Mt(e);return n===t||!Ue(n)||An(n)?!1:We(n).position==="fixed"||Cu(n,t)}function e0(e,t){const n=t.get(e);if(n)return n;let r=Gn(e,[],!1).filter(a=>Ue(a)&&Mn(a)!=="body"),o=null;const s=We(e).position==="fixed";let i=s?Mt(e):e;for(;Ue(i)&&!An(i);){const a=We(i),c=gi(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&Xy.has(o.position)||cr(i)&&!c&&Cu(e,i))?r=r.filter(f=>f!==i):o=a,i=Mt(i)}return t.set(e,r),r}function t0(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?go(t)?[]:e0(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((u,f)=>{const p=za(t,f,o);return u.top=Te(p.top,u.top),u.right=Lt(p.right,u.right),u.bottom=Lt(p.bottom,u.bottom),u.left=Te(p.left,u.left),u},za(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function n0(e){const{width:t,height:n}=yu(e);return{width:t,height:n}}function r0(e,t,n){const r=et(t),o=nt(t),s=n==="fixed",i=rn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Je(0);function u(){c.x=yo(o)}if(r||!r&&!s)if((Mn(t)!=="body"||cr(o))&&(a=vo(t)),r){const g=rn(t,!0,s,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&u();s&&!r&&o&&u();const f=o&&!r&&!s?wu(o,a):Je(0),p=i.left+a.scrollLeft-c.x-f.x,m=i.top+a.scrollTop-c.y-f.y;return{x:p,y:m,width:i.width,height:i.height}}function Ho(e){return We(e).position==="static"}function qa(e,t){if(!et(e)||We(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return nt(e)===n&&(n=n.ownerDocument.body),n}function xu(e,t){const n=Ae(e);if(go(e))return n;if(!et(e)){let o=Mt(e);for(;o&&!An(o);){if(Ue(o)&&!Ho(o))return o;o=Mt(o)}return n}let r=qa(e,t);for(;r&&Fy(r)&&Ho(r);)r=qa(r,t);return r&&An(r)&&Ho(r)&&!gi(r)?n:r||Vy(e)||n}const o0=async function(e){const t=this.getOffsetParent||xu,n=this.getDimensions,r=await n(e.floating);return{reference:r0(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function s0(e){return We(e).direction==="rtl"}const i0={convertOffsetParentRelativeRectToViewportRelativeRect:Ky,getDocumentElement:nt,getClippingRect:t0,getOffsetParent:xu,getElementRects:o0,getClientRects:Qy,getDimensions:n0,getScale:mn,isElement:Ue,isRTL:s0};function Su(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function a0(e,t){let n=null,r;const o=nt(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=u;if(a||t(),!m||!g)return;const x=Ar(p),h=Ar(o.clientWidth-(f+m)),v=Ar(o.clientHeight-(p+g)),y=Ar(f),S={rootMargin:-x+"px "+-h+"px "+-v+"px "+-y+"px",threshold:Te(0,Lt(1,c))||1};let E=!0;function R(T){const P=T[0].intersectionRatio;if(P!==c){if(!E)return i();P?i(!1,P):r=setTimeout(()=>{i(!1,1e-7)},1e3)}P===1&&!Su(u,e.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(R,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,S)}n.observe(e)}return i(!0),s}function c0(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=yi(e),f=o||s?[...u?Gn(u):[],...Gn(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const p=u&&a?a0(u,n):null;let m=-1,g=null;i&&(g=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var S;(S=g)==null||S.observe(t)})),n()}),u&&!c&&g.observe(u),g.observe(t));let x,h=c?rn(e):null;c&&v();function v(){const y=rn(e);h&&!Su(h,y)&&n(),h=y,x=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),p==null||p(),(y=g)==null||y.disconnect(),g=null,c&&cancelAnimationFrame(x)}}const l0=Ny,u0=Dy,d0=Oy,f0=My,h0=jy,Ga=Ay,p0=Ly,m0=(e,t,n)=>{const r=new Map,o={platform:i0,...n},s={...o.platform,_c:r};return Py(e,t,{...o,platform:s})};var g0=typeof document<"u",v0=function(){},Br=g0?_.useLayoutEffect:v0;function Jr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Jr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Jr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Eu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ka(e,t){const n=Eu(e);return Math.round(t*n)/n}function Vo(e){const t=d.useRef(e);return Br(()=>{t.current=e}),t}function y0(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[f,p]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=d.useState(r);Jr(m,r)||g(r);const[x,h]=d.useState(null),[v,y]=d.useState(null),b=d.useCallback($=>{$!==T.current&&(T.current=$,h($))},[]),S=d.useCallback($=>{$!==P.current&&(P.current=$,y($))},[]),E=s||x,R=i||v,T=d.useRef(null),P=d.useRef(null),D=d.useRef(f),I=c!=null,L=Vo(c),B=Vo(o),U=Vo(u),W=d.useCallback(()=>{if(!T.current||!P.current)return;const $={placement:t,strategy:n,middleware:m};B.current&&($.platform=B.current),m0(T.current,P.current,$).then(oe=>{const pe={...oe,isPositioned:U.current!==!1};V.current&&!Jr(D.current,pe)&&(D.current=pe,ro.flushSync(()=>{p(pe)}))})},[m,t,n,B,U]);Br(()=>{u===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p($=>({...$,isPositioned:!1})))},[u]);const V=d.useRef(!1);Br(()=>(V.current=!0,()=>{V.current=!1}),[]),Br(()=>{if(E&&(T.current=E),R&&(P.current=R),E&&R){if(L.current)return L.current(E,R,W);W()}},[E,R,W,L,I]);const re=d.useMemo(()=>({reference:T,floating:P,setReference:b,setFloating:S}),[b,S]),z=d.useMemo(()=>({reference:E,floating:R}),[E,R]),Q=d.useMemo(()=>{const $={position:n,left:0,top:0};if(!z.floating)return $;const oe=Ka(z.floating,f.x),pe=Ka(z.floating,f.y);return a?{...$,transform:"translate("+oe+"px, "+pe+"px)",...Eu(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:oe,top:pe}},[n,a,z.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:W,refs:re,elements:z,floatingStyles:Q}),[f,W,re,z,Q])}const b0=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ga({element:r.current,padding:o}).fn(n):{}:r?Ga({element:r,padding:o}).fn(n):{}}}},w0=(e,t)=>({...l0(e),options:[e,t]}),C0=(e,t)=>({...u0(e),options:[e,t]}),x0=(e,t)=>({...p0(e),options:[e,t]}),S0=(e,t)=>({...d0(e),options:[e,t]}),E0=(e,t)=>({...f0(e),options:[e,t]}),_0=(e,t)=>({...h0(e),options:[e,t]}),R0=(e,t)=>({...b0(e),options:[e,t]});var T0="Arrow",_u=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return l.jsx(ie.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});_u.displayName=T0;var P0=_u;function A0(e){const[t,n]=d.useState(void 0);return ve(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var bi="Popper",[Ru,bo]=ir(bi),[O0,Tu]=Ru(bi),Pu=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return l.jsx(O0,{scope:t,anchor:r,onAnchorChange:o,children:n})};Pu.displayName=bi;var Au="PopperAnchor",Ou=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Tu(Au,n),i=d.useRef(null),a=ce(t,i),c=d.useRef(null);return d.useEffect(()=>{const u=c.current;c.current=(r==null?void 0:r.current)||i.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:l.jsx(ie.div,{...o,ref:a})});Ou.displayName=Au;var wi="PopperContent",[j0,I0]=Ru(wi),ju=d.forwardRef((e,t)=>{var k,J,de,Y,ee,Z;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:x,...h}=e,v=Tu(wi,n),[y,b]=d.useState(null),S=ce(t,ye=>b(ye)),[E,R]=d.useState(null),T=A0(E),P=(T==null?void 0:T.width)??0,D=(T==null?void 0:T.height)??0,I=r+(s!=="center"?"-"+s:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},B=Array.isArray(u)?u:[u],U=B.length>0,W={padding:L,boundary:B.filter(D0),altBoundary:U},{refs:V,floatingStyles:re,placement:z,isPositioned:Q,middlewareData:$}=y0({strategy:"fixed",placement:I,whileElementsMounted:(...ye)=>c0(...ye,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[w0({mainAxis:o+D,alignmentAxis:i}),c&&C0({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?x0():void 0,...W}),c&&S0({...W}),E0({...W,apply:({elements:ye,rects:je,availableWidth:ze,availableHeight:Le})=>{const{width:vt,height:ur}=je.reference,rt=ye.floating.style;rt.setProperty("--radix-popper-available-width",`${ze}px`),rt.setProperty("--radix-popper-available-height",`${Le}px`),rt.setProperty("--radix-popper-anchor-width",`${vt}px`),rt.setProperty("--radix-popper-anchor-height",`${ur}px`)}}),E&&R0({element:E,padding:a}),L0({arrowWidth:P,arrowHeight:D}),m&&_0({strategy:"referenceHidden",...W})]}),[oe,pe]=Du(z),Oe=tn(x);ve(()=>{Q&&(Oe==null||Oe())},[Q,Oe]);const pt=(k=$.arrow)==null?void 0:k.x,mt=(J=$.arrow)==null?void 0:J.y,Ve=((de=$.arrow)==null?void 0:de.centerOffset)!==0,[gt,De]=d.useState();return ve(()=>{y&&De(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:Q?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:gt,"--radix-popper-transform-origin":[(Y=$.transformOrigin)==null?void 0:Y.x,(ee=$.transformOrigin)==null?void 0:ee.y].join(" "),...((Z=$.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(j0,{scope:n,placedSide:oe,onArrowChange:R,arrowX:pt,arrowY:mt,shouldHideArrow:Ve,children:l.jsx(ie.div,{"data-side":oe,"data-align":pe,...h,ref:S,style:{...h.style,animation:Q?void 0:"none"}})})})});ju.displayName=wi;var Iu="PopperArrow",N0={top:"bottom",right:"left",bottom:"top",left:"right"},Nu=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=I0(Iu,r),i=N0[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:l.jsx(P0,{...o,ref:n,style:{...o.style,display:"block"}})})});Nu.displayName=Iu;function D0(e){return e!==null}var L0=e=>({name:"transformOrigin",options:e,fn(t){var v,y,b;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,f]=Du(n),p={start:"0%",center:"50%",end:"100%"}[f],m=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,g=(((b=o.arrow)==null?void 0:b.y)??0)+c/2;let x="",h="";return u==="bottom"?(x=i?p:`${m}px`,h=`${-c}px`):u==="top"?(x=i?p:`${m}px`,h=`${r.floating.height+c}px`):u==="right"?(x=`${-c}px`,h=i?p:`${g}px`):u==="left"&&(x=`${r.floating.width+c}px`,h=i?p:`${g}px`),{data:{x,y:h}}}});function Du(e){const[t,n="center"]=e.split("-");return[t,n]}var Lu=Pu,Mu=Ou,ku=ju,$u=Nu;function M0(e){const t=k0(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),c=a.find(F0);if(c){const u=c.props.children,f=a.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function k0(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=U0(o),a=B0(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Nn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $0=Symbol("radix.slottable");function F0(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$0}function B0(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function U0(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function W0(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Fu=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),H0="VisuallyHidden",Bu=d.forwardRef((e,t)=>l.jsx(ie.span,{...e,ref:t,style:{...Fu,...e.style}}));Bu.displayName=H0;var V0=Bu,z0=[" ","Enter","ArrowUp","ArrowDown"],q0=[" ","Enter"],on="Select",[wo,Co,G0]=hy(on),[kn]=ir(on,[G0,bo]),xo=bo(),[K0,$t]=kn(on),[Q0,Y0]=kn(on),Uu=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:u,name:f,autoComplete:p,disabled:m,required:g,form:x}=e,h=xo(t),[v,y]=d.useState(null),[b,S]=d.useState(null),[E,R]=d.useState(!1),T=my(u),[P,D]=Kr({prop:r,defaultProp:o??!1,onChange:s,caller:on}),[I,L]=Kr({prop:i,defaultProp:a,onChange:c,caller:on}),B=d.useRef(null),U=v?x||!!v.closest("form"):!0,[W,V]=d.useState(new Set),re=Array.from(W).map(z=>z.props.value).join(";");return l.jsx(Lu,{...h,children:l.jsxs(K0,{required:g,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:S,valueNodeHasChildren:E,onValueNodeHasChildrenChange:R,contentId:Zt(),value:I,onValueChange:L,open:P,onOpenChange:D,dir:T,triggerPointerDownPosRef:B,disabled:m,children:[l.jsx(wo.Provider,{scope:t,children:l.jsx(Q0,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(z=>{V(Q=>new Set(Q).add(z))},[]),onNativeOptionRemove:d.useCallback(z=>{V(Q=>{const $=new Set(Q);return $.delete(z),$})},[]),children:n})}),U?l.jsxs(ad,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:p,value:I,onChange:z=>L(z.target.value),disabled:m,form:x,children:[I===void 0?l.jsx("option",{value:""}):null,Array.from(W)]},re):null]})})};Uu.displayName=on;var Wu="SelectTrigger",Hu=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=xo(n),i=$t(Wu,n),a=i.disabled||r,c=ce(t,i.onTriggerChange),u=Co(n),f=d.useRef("touch"),[p,m,g]=ld(h=>{const v=u().filter(S=>!S.disabled),y=v.find(S=>S.value===i.value),b=ud(v,h,y);b!==void 0&&i.onValueChange(b.value)}),x=h=>{a||(i.onOpenChange(!0),g()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return l.jsx(Mu,{asChild:!0,...s,children:l.jsx(ie.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":cd(i.value)?"":void 0,...o,ref:c,onClick:X(o.onClick,h=>{h.currentTarget.focus(),f.current!=="mouse"&&x(h)}),onPointerDown:X(o.onPointerDown,h=>{f.current=h.pointerType;const v=h.target;v.hasPointerCapture(h.pointerId)&&v.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(x(h),h.preventDefault())}),onKeyDown:X(o.onKeyDown,h=>{const v=p.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&m(h.key),!(v&&h.key===" ")&&z0.includes(h.key)&&(x(),h.preventDefault())})})})});Hu.displayName=Wu;var Vu="SelectValue",zu=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=$t(Vu,n),{onValueNodeHasChildrenChange:u}=c,f=s!==void 0,p=ce(t,c.onValueNodeChange);return ve(()=>{u(f)},[u,f]),l.jsx(ie.span,{...a,ref:p,style:{pointerEvents:"none"},children:cd(c.value)?l.jsx(l.Fragment,{children:i}):s})});zu.displayName=Vu;var Z0="SelectIcon",qu=d.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.jsx(ie.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});qu.displayName=Z0;var sn="SelectContent",Gu=d.forwardRef((e,t)=>{const n=$t(sn,e.__scopeSelect),[r,o]=d.useState();if(ve(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?ro.createPortal(l.jsx(Ku,{scope:e.__scopeSelect,children:l.jsx(wo.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),s):null}return l.jsx(Qu,{...e,ref:t})});Gu.displayName=sn;var Me=10,[Ku,Ft]=kn(sn),X0="SelectContentImpl",J0=M0("SelectContent.RemoveScroll"),Qu=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:g,sticky:x,hideWhenDetached:h,avoidCollisions:v,...y}=e,b=$t(sn,n),[S,E]=d.useState(null),[R,T]=d.useState(null),P=ce(t,k=>E(k)),[D,I]=d.useState(null),[L,B]=d.useState(null),U=Co(n),[W,V]=d.useState(!1),re=d.useRef(!1);d.useEffect(()=>{if(S)return El(S)},[S]),gl();const z=d.useCallback(k=>{const[J,...de]=U().map(Z=>Z.ref.current),[Y]=de.slice(-1),ee=document.activeElement;for(const Z of k)if(Z===ee||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===J&&R&&(R.scrollTop=0),Z===Y&&R&&(R.scrollTop=R.scrollHeight),Z==null||Z.focus(),document.activeElement!==ee))return},[U,R]),Q=d.useCallback(()=>z([D,S]),[z,D,S]);d.useEffect(()=>{W&&Q()},[W,Q]);const{onOpenChange:$,triggerPointerDownPosRef:oe}=b;d.useEffect(()=>{if(S){let k={x:0,y:0};const J=Y=>{var ee,Z;k={x:Math.abs(Math.round(Y.pageX)-(((ee=oe.current)==null?void 0:ee.x)??0)),y:Math.abs(Math.round(Y.pageY)-(((Z=oe.current)==null?void 0:Z.y)??0))}},de=Y=>{k.x<=10&&k.y<=10?Y.preventDefault():S.contains(Y.target)||$(!1),document.removeEventListener("pointermove",J),oe.current=null};return oe.current!==null&&(document.addEventListener("pointermove",J),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",de,{capture:!0})}}},[S,$,oe]),d.useEffect(()=>{const k=()=>$(!1);return window.addEventListener("blur",k),window.addEventListener("resize",k),()=>{window.removeEventListener("blur",k),window.removeEventListener("resize",k)}},[$]);const[pe,Oe]=ld(k=>{const J=U().filter(ee=>!ee.disabled),de=J.find(ee=>ee.ref.current===document.activeElement),Y=ud(J,k,de);Y&&setTimeout(()=>Y.ref.current.focus())}),pt=d.useCallback((k,J,de)=>{const Y=!re.current&&!de;(b.value!==void 0&&b.value===J||Y)&&(I(k),Y&&(re.current=!0))},[b.value]),mt=d.useCallback(()=>S==null?void 0:S.focus(),[S]),Ve=d.useCallback((k,J,de)=>{const Y=!re.current&&!de;(b.value!==void 0&&b.value===J||Y)&&B(k)},[b.value]),gt=r==="popper"?Rs:Yu,De=gt===Rs?{side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:g,sticky:x,hideWhenDetached:h,avoidCollisions:v}:{};return l.jsx(Ku,{scope:n,content:S,viewport:R,onViewportChange:T,itemRefCallback:pt,selectedItem:D,onItemLeave:mt,itemTextRefCallback:Ve,focusSelectedItem:Q,selectedItemText:L,position:r,isPositioned:W,searchRef:pe,children:l.jsx(Xs,{as:J0,allowPinchZoom:!0,children:l.jsx(Ys,{asChild:!0,trapped:b.open,onMountAutoFocus:k=>{k.preventDefault()},onUnmountAutoFocus:X(o,k=>{var J;(J=b.trigger)==null||J.focus({preventScroll:!0}),k.preventDefault()}),children:l.jsx(lo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:k=>k.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:l.jsx(gt,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:k=>k.preventDefault(),...y,...De,onPlaced:()=>V(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:X(y.onKeyDown,k=>{const J=k.ctrlKey||k.altKey||k.metaKey;if(k.key==="Tab"&&k.preventDefault(),!J&&k.key.length===1&&Oe(k.key),["ArrowUp","ArrowDown","Home","End"].includes(k.key)){let Y=U().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);if(["ArrowUp","End"].includes(k.key)&&(Y=Y.slice().reverse()),["ArrowUp","ArrowDown"].includes(k.key)){const ee=k.target,Z=Y.indexOf(ee);Y=Y.slice(Z+1)}setTimeout(()=>z(Y)),k.preventDefault()}})})})})})})});Qu.displayName=X0;var e2="SelectItemAlignedPosition",Yu=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=$t(sn,n),i=Ft(sn,n),[a,c]=d.useState(null),[u,f]=d.useState(null),p=ce(t,P=>f(P)),m=Co(n),g=d.useRef(!1),x=d.useRef(!0),{viewport:h,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=i,S=d.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&h&&v&&y){const P=s.trigger.getBoundingClientRect(),D=u.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),L=y.getBoundingClientRect();if(s.dir!=="rtl"){const ee=L.left-D.left,Z=I.left-ee,ye=P.left-Z,je=P.width+ye,ze=Math.max(je,D.width),Le=window.innerWidth-Me,vt=Ma(Z,[Me,Math.max(Me,Le-ze)]);a.style.minWidth=je+"px",a.style.left=vt+"px"}else{const ee=D.right-L.right,Z=window.innerWidth-I.right-ee,ye=window.innerWidth-P.right-Z,je=P.width+ye,ze=Math.max(je,D.width),Le=window.innerWidth-Me,vt=Ma(Z,[Me,Math.max(Me,Le-ze)]);a.style.minWidth=je+"px",a.style.right=vt+"px"}const B=m(),U=window.innerHeight-Me*2,W=h.scrollHeight,V=window.getComputedStyle(u),re=parseInt(V.borderTopWidth,10),z=parseInt(V.paddingTop,10),Q=parseInt(V.borderBottomWidth,10),$=parseInt(V.paddingBottom,10),oe=re+z+W+$+Q,pe=Math.min(v.offsetHeight*5,oe),Oe=window.getComputedStyle(h),pt=parseInt(Oe.paddingTop,10),mt=parseInt(Oe.paddingBottom,10),Ve=P.top+P.height/2-Me,gt=U-Ve,De=v.offsetHeight/2,k=v.offsetTop+De,J=re+z+k,de=oe-J;if(J<=Ve){const ee=B.length>0&&v===B[B.length-1].ref.current;a.style.bottom="0px";const Z=u.clientHeight-h.offsetTop-h.offsetHeight,ye=Math.max(gt,De+(ee?mt:0)+Z+Q),je=J+ye;a.style.height=je+"px"}else{const ee=B.length>0&&v===B[0].ref.current;a.style.top="0px";const ye=Math.max(Ve,re+h.offsetTop+(ee?pt:0)+De)+de;a.style.height=ye+"px",h.scrollTop=J-Ve+h.offsetTop}a.style.margin=`${Me}px 0`,a.style.minHeight=pe+"px",a.style.maxHeight=U+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[m,s.trigger,s.valueNode,a,u,h,v,y,s.dir,r]);ve(()=>S(),[S]);const[E,R]=d.useState();ve(()=>{u&&R(window.getComputedStyle(u).zIndex)},[u]);const T=d.useCallback(P=>{P&&x.current===!0&&(S(),b==null||b(),x.current=!1)},[S,b]);return l.jsx(n2,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:T,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:l.jsx(ie.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Yu.displayName=e2;var t2="SelectPopperPosition",Rs=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Me,...s}=e,i=xo(n);return l.jsx(ku,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Rs.displayName=t2;var[n2,Ci]=kn(sn,{}),Ts="SelectViewport",Zu=d.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Ft(Ts,n),i=Ci(Ts,n),a=ce(t,s.onViewportChange),c=d.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(wo.Slot,{scope:n,children:l.jsx(ie.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:X(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:m}=i;if(m!=null&&m.current&&p){const g=Math.abs(c.current-f.scrollTop);if(g>0){const x=window.innerHeight-Me*2,h=parseFloat(p.style.minHeight),v=parseFloat(p.style.height),y=Math.max(h,v);if(y<x){const b=y+g,S=Math.min(x,b),E=b-S;p.style.height=S+"px",p.style.bottom==="0px"&&(f.scrollTop=E>0?E:0,p.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});Zu.displayName=Ts;var Xu="SelectGroup",[r2,o2]=kn(Xu),Ju=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Zt();return l.jsx(r2,{scope:n,id:o,children:l.jsx(ie.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Ju.displayName=Xu;var ed="SelectLabel",s2=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=o2(ed,n);return l.jsx(ie.div,{id:o.id,...r,ref:t})});s2.displayName=ed;var eo="SelectItem",[i2,td]=kn(eo),nd=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=$t(eo,n),c=Ft(eo,n),u=a.value===r,[f,p]=d.useState(s??""),[m,g]=d.useState(!1),x=ce(t,b=>{var S;return(S=c.itemRefCallback)==null?void 0:S.call(c,b,r,o)}),h=Zt(),v=d.useRef("touch"),y=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(i2,{scope:n,value:r,disabled:o,textId:h,isSelected:u,onItemTextChange:d.useCallback(b=>{p(S=>S||((b==null?void 0:b.textContent)??"").trim())},[]),children:l.jsx(wo.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:l.jsx(ie.div,{role:"option","aria-labelledby":h,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:x,onFocus:X(i.onFocus,()=>g(!0)),onBlur:X(i.onBlur,()=>g(!1)),onClick:X(i.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:X(i.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:X(i.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:X(i.onPointerMove,b=>{var S;v.current=b.pointerType,o?(S=c.onItemLeave)==null||S.call(c):v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:X(i.onPointerLeave,b=>{var S;b.currentTarget===document.activeElement&&((S=c.onItemLeave)==null||S.call(c))}),onKeyDown:X(i.onKeyDown,b=>{var E;((E=c.searchRef)==null?void 0:E.current)!==""&&b.key===" "||(q0.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});nd.displayName=eo;var Hn="SelectItemText",rd=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=$t(Hn,n),a=Ft(Hn,n),c=td(Hn,n),u=Y0(Hn,n),[f,p]=d.useState(null),m=ce(t,y=>p(y),c.onItemTextChange,y=>{var b;return(b=a.itemTextRefCallback)==null?void 0:b.call(a,y,c.value,c.disabled)}),g=f==null?void 0:f.textContent,x=d.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:h,onNativeOptionRemove:v}=u;return ve(()=>(h(x),()=>v(x)),[h,v,x]),l.jsxs(l.Fragment,{children:[l.jsx(ie.span,{id:c.textId,...s,ref:m}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ro.createPortal(s.children,i.valueNode):null]})});rd.displayName=Hn;var od="SelectItemIndicator",sd=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return td(od,n).isSelected?l.jsx(ie.span,{"aria-hidden":!0,...r,ref:t}):null});sd.displayName=od;var Ps="SelectScrollUpButton",a2=d.forwardRef((e,t)=>{const n=Ft(Ps,e.__scopeSelect),r=Ci(Ps,e.__scopeSelect),[o,s]=d.useState(!1),i=ce(t,r.onScrollButtonChange);return ve(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;s(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?l.jsx(id,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});a2.displayName=Ps;var As="SelectScrollDownButton",c2=d.forwardRef((e,t)=>{const n=Ft(As,e.__scopeSelect),r=Ci(As,e.__scopeSelect),[o,s]=d.useState(!1),i=ce(t,r.onScrollButtonChange);return ve(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;s(f)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?l.jsx(id,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});c2.displayName=As;var id=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Ft("SelectScrollButton",n),i=d.useRef(null),a=Co(n),c=d.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),ve(()=>{var f;const u=a().find(p=>p.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),l.jsx(ie.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:X(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:X(o.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:X(o.onPointerLeave,()=>{c()})})}),l2="SelectSeparator",u2=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(ie.div,{"aria-hidden":!0,...r,ref:t})});u2.displayName=l2;var Os="SelectArrow",d2=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=xo(n),s=$t(Os,n),i=Ft(Os,n);return s.open&&i.position==="popper"?l.jsx($u,{...o,...r,ref:t}):null});d2.displayName=Os;var f2="SelectBubbleInput",ad=d.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=d.useRef(null),s=ce(r,o),i=W0(t);return d.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(a,t),a.dispatchEvent(p)}},[i,t]),l.jsx(ie.select,{...n,style:{...Fu,...n.style},ref:s,defaultValue:t})});ad.displayName=f2;function cd(e){return e===""||e===void 0}function ld(e){const t=tn(e),n=d.useRef(""),r=d.useRef(0),o=d.useCallback(i=>{const a=n.current+i;t(a),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),s=d.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function ud(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=h2(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function h2(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var p2=Uu,m2=Hu,g2=zu,v2=qu,y2=Gu,b2=Zu,w2=Ju,C2=nd,x2=rd,S2=sd;const E2="Container__xcHXp",_2="Label__0cZB9",R2="HelperText__m1nA9",T2="Trigger__AyFUd",P2="TriggerIcon__aygFG",A2="Content__llztG",O2="Viewport__COtSL",j2="Item__XN1-2",I2="ItemIndicatorContainer__EQH-X",N2="ItemIndicator__bySSc",qe={Container:E2,Label:_2,HelperText:R2,Trigger:T2,TriggerIcon:P2,Content:A2,Viewport:O2,Item:j2,ItemIndicatorContainer:I2,ItemIndicator:N2},dd=_.forwardRef(({label:e,helperText:t,value:n,onValueChange:r,options:o,placeholder:s="Select",disabled:i=!1,className:a,name:c},u)=>l.jsxs("div",{className:N(qe.Container,a),children:[e&&l.jsx("label",{className:qe.Label,children:e}),l.jsxs(p2,{value:n,onValueChange:r,disabled:i,name:c,children:[l.jsxs(m2,{ref:u,className:qe.Trigger,children:[l.jsx(g2,{placeholder:s}),l.jsx(v2,{className:qe.TriggerIcon,children:l.jsx(D2,{})})]}),l.jsx(y2,{className:qe.Content,position:"popper",sideOffset:4,children:l.jsx(b2,{className:qe.Viewport,children:l.jsx(w2,{children:o.map(f=>l.jsxs(C2,{value:f.value,disabled:f.disabled,className:qe.Item,children:[l.jsx("div",{className:qe.ItemIndicatorContainer,children:l.jsx(S2,{className:qe.ItemIndicator,children:l.jsx(L2,{})})}),l.jsx(x2,{children:f.label})]},f.value))})})})]}),t&&l.jsx("div",{className:qe.HelperText,children:t})]}));dd.displayName="Select";const D2=()=>l.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.52459 12.7746C6.8907 12.4085 7.4843 12.4085 7.85041 12.7746L10 14.9242L12.1496 12.7746C12.5157 12.4085 13.1093 12.4085 13.4754 12.7746C13.8415 13.1407 13.8415 13.7343 13.4754 14.1004L10.6629 16.9129C10.2968 17.279 9.7032 17.279 9.33709 16.9129L6.52459 14.1004C6.15847 13.7343 6.15847 13.1407 6.52459 12.7746Z",fill:"currentColor"}),l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.4754 7.22541C13.1093 7.59153 12.5157 7.59153 12.1496 7.22541L10 5.07583L7.85041 7.22541C7.4843 7.59153 6.8907 7.59153 6.52459 7.22541C6.15847 6.8593 6.15847 6.2657 6.52459 5.89959L9.33709 3.08709C9.7032 2.72097 10.2968 2.72097 10.6629 3.08709L13.4754 5.89959C13.8415 6.2657 13.8415 6.8593 13.4754 7.22541Z",fill:"currentColor"})]}),L2=()=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),It=e=>{let t=null,n=null;return _.Children.forEach(e.children,r=>{const o=r.props.condition;o===void 0?n=r:!t&&o===!0&&(t=r)}),l.jsx(l.Fragment,{children:t||n})};It.displayName="Show";It.When=({condition:e,children:t})=>l.jsx(l.Fragment,{children:e&&t});It.Else=({render:e,children:t})=>l.jsx(l.Fragment,{children:e||t});var M2=Symbol.for("react.lazy"),to=d[" use ".trim().toString()];function k2(e){return typeof e=="object"&&e!==null&&"then"in e}function fd(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===M2&&"_payload"in e&&k2(e._payload)}function $2(e){const t=B2(e),n=d.forwardRef((r,o)=>{let{children:s,...i}=r;fd(s)&&typeof to=="function"&&(s=to(s._payload));const a=d.Children.toArray(s),c=a.find(W2);if(c){const u=c.props.children,f=a.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var F2=$2("Slot");function B2(e){const t=d.forwardRef((n,r)=>{let{children:o,...s}=n;if(fd(o)&&typeof to=="function"&&(o=to(o._payload)),d.isValidElement(o)){const i=V2(o),a=H2(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Nn(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var U2=Symbol("radix.slottable");function W2(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===U2}function H2(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function V2(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const z2="SkeletonListContainer__MKJhE",q2="Skeleton__Ovpiw",hd={SkeletonListContainer:z2,Skeleton:q2},So=_.forwardRef((e,t)=>{const{children:n,className:r,loading:o,height:s=48,width:i,borderRadius:a,style:c,...u}=e;if(!o&&n)return n;const f=_.isValidElement(n)?F2:"span";return l.jsx(f,{ref:t,"aria-hidden":!0,className:N(hd.Skeleton,r),style:{...c,width:i,minWidth:i,height:s,borderRadius:a},"data-inline-skeleton":_.isValidElement(n)?void 0:!0,tabIndex:-1,...u,children:n})});So.displayName="Skeleton";const pd=e=>{const{numberOfItems:t,itemsGap:n=2,itemProps:r}=e,o=Array.from({length:t},(s,i)=>i+1);return l.jsx("div",{className:N(hd.SkeletonListContainer),style:{gap:n},children:o.map(s=>l.jsx(So,{loading:!0,...r},s))})};pd.displayName="SkeletonList";const G2="spinner__qa7F6",K2="rotate__EqlXe",Q2="spinner-dark__9A9-q",Y2="spinner-white__gRbtI",Z2="spinner-success__otWGm",X2="spinner-danger__Bq5DM",J2="spinner-warning__U900K",Qa={spinner:G2,rotate:K2,"spinner-dark":"spinner-dark__9A9-q",spinnerDark:Q2,"spinner-white":"spinner-white__gRbtI",spinnerWhite:Y2,"spinner-success":"spinner-success__otWGm",spinnerSuccess:Z2,"spinner-danger":"spinner-danger__Bq5DM",spinnerDanger:X2,"spinner-warning":"spinner-warning__U900K",spinnerWarning:J2},md=({className:e,color:t="white",size:n=80,thickness:r})=>{const o=N(Qa.spinner,Qa[`spinner-${t}`],e),s=r??Math.max(n/12,2);return l.jsx("span",{style:{width:n,height:n,borderWidth:s},className:o})};md.displayName="Spinner";const e3="disabled__KpauE",t3="checked__2-JV-",n3="thumb__fEuKD",Or={switch:"switch__0b2av",disabled:e3,checked:t3,thumb:n3},gd=_.forwardRef(({checked:e,defaultChecked:t=!1,onCheckedChange:n,disabled:r=!1,id:o,className:s,name:i,"aria-label":a,"aria-labelledby":c,"aria-describedby":u,...f},p)=>{const[m,g]=_.useState(t),x=e!==void 0,h=x?!!e:m,v=()=>{if(r)return;const b=!h;x||g(b),n==null||n(b)},y=b=>{(b.key===" "||b.key==="Enter")&&(b.preventDefault(),v())};return l.jsx("button",{ref:p,type:"button",role:"switch","aria-checked":h,"aria-label":a,"aria-labelledby":c,"aria-describedby":u,disabled:r,id:o,name:i,className:N(Or.switch,{[Or.checked]:h,[Or.disabled]:r}),onClick:v,onKeyDown:y,...f,children:l.jsx("span",{className:Or.thumb,"aria-hidden":"true"})})});gd.displayName="Switch";const vd=({className:e,...t})=>l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,...t,children:l.jsx("path",{d:"M6 2.5V9.5M6 9.5L9.5 6M6 9.5L2.5 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});vd.displayName="ArrowDown";const r3="TableContainer__osh6Z",o3="TableHeader__sYa-8",s3="Table__2cIs3",i3="selectable__WsGg1",a3="Cell__ZEv-K",c3="Right__YoM1V",l3="Center__CF3tr",u3="Sortable__JIV1V",d3="SortIcon__f0bBy",f3="Active__rJjxB",h3="Rotate__7cwTK",p3="Pagination__sbqMP",m3="PointerNone__kQdQS",Ee={TableContainer:r3,TableHeader:o3,Table:s3,selectable:i3,Cell:a3,Right:c3,Center:l3,Sortable:u3,SortIcon:d3,Active:f3,Rotate:h3,Pagination:p3,PointerNone:m3},g3=(e,t,n=1)=>{if(e<=1)return["1"];const r=[],o=s=>{(r.length===0||r[r.length-1]!==s)&&r.push(s)};o(1),t-n>2&&o("...");for(let s=Math.max(2,t-n);s<=Math.min(e-1,t+n);s++)o(s);return t+n<e-1&&o("..."),o(e),r.map(String)},yd=({page:e,totalPages:t,onPageChange:n})=>{const r=e===1,o=e===t;return l.jsx(si,{className:Ee.Pagination,children:l.jsxs(ii,{children:[l.jsx(Vn,{children:l.jsx(ai,{className:N({[Ee.PointerNone]:r}),onClick:()=>!r&&n(e-1)})}),g3(t,e).map((s,i)=>l.jsxs(Vn,{children:[s==="..."&&l.jsx(li,{}),s!=="..."&&l.jsx(ar,{isActive:+s===e,onClick:()=>+s!==e&&n(+s),children:s})]},i)),l.jsx(Vn,{children:l.jsx(ci,{className:N({[Ee.PointerNone]:o}),onClick:()=>!o&&n(e+1)})})]})})};yd.displayName="TablePagination";const bd=({columns:e,data:t,isLoading:n,totalCount:r=0,headerLabel:o,sort:s,loadingConfig:i,pagination:a,onRowClick:c})=>{const{count:u=5,height:f=40}=i||{},p=y=>y.sortName??y.name,m=({width:y,maxWidth:b})=>!y&&!b?{}:{...y?{width:y,minWidth:y}:{},...b?{maxWidth:b}:{},overflow:"hidden"},g=y=>N({[Ee.Cell]:!0,[Ee.Center]:y.align==="center",[Ee.Right]:y.align==="right",[Ee.Sortable]:y.isSortable}),x=y=>{if(!s)return"";const b=p(y);return N({[Ee.SortIcon]:!0,[Ee.Active]:y.isSortable&&s.field===b,[Ee.Rotate]:s.field===b&&s.direction==="asc"})},h=y=>()=>c==null?void 0:c(y),v=y=>()=>{if(!s||!y.isSortable)return;const{field:b,direction:S,onSort:E}=s,R=p(y);b===R?E(R,S==="asc"?"desc":"asc"):E(R,"asc")};return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:Ee.TableContainer,children:[o&&l.jsx("div",{className:Ee.TableHeader,children:l.jsx(ui,{count:r,singularText:o,children:(y,b)=>`${y} ${b}`})}),l.jsx("div",{className:Ee.Table,children:l.jsxs("table",{children:[l.jsx("thead",{children:l.jsx("tr",{children:e.map(y=>l.jsx("th",{children:l.jsxs("div",{className:g(y),onClick:v(y),children:[l.jsx("span",{children:y.displayName}),y.isSortable&&l.jsx(vd,{className:x(y)})]})},y.name))})}),l.jsx("tbody",{children:l.jsxs(It,{children:[l.jsx(It.When,{condition:n,children:[...Array(u).keys()].map(y=>l.jsx("tr",{children:l.jsx("td",{colSpan:e.length,style:{padding:4},children:l.jsx(So,{height:f})})},y))}),l.jsx(It.When,{condition:!t.length,children:l.jsx("tr",{children:l.jsx("td",{colSpan:e.length,children:l.jsx(ni,{})})})}),l.jsx(It.Else,{children:t.map((y,b)=>l.jsx("tr",{className:c&&Ee.selectable,onClick:h(y),children:e.map(S=>l.jsx("td",{style:m(S),children:l.jsx("div",{className:g(S),children:S.cellRenderer?S.cellRenderer(y):S.valueGetter?S.valueGetter(y):y[S.name]})},`${S.name}-${b}`))},b))})]})})]})})]}),a&&l.jsx(yd,{...a})]})};bd.displayName="Table";const v3="tabs-root__ELmdj",y3="tabs-list__rc10N",b3="tabs-list--horizontal__e1YW4",w3="tabs-list--vertical__huK05",C3="tabs-trigger__D8R4R",x3="tabs-trigger--disabled__ezDWc",S3="tabs-trigger--horizontal__4jBFV",E3="tabs-trigger--active__S-Z-S",_3="tabs-trigger--vertical__dNVIZ",R3="tabs-content__1d77o",Ze={tabsRoot:v3,tabsList:y3,tabsListHorizontal:b3,tabsListVertical:w3,tabsTrigger:C3,tabsTriggerDisabled:x3,tabsTriggerHorizontal:S3,tabsTriggerActive:E3,tabsTriggerVertical:_3,tabsContent:R3},wd=_.createContext(null),xi=()=>{const e=_.useContext(wd);if(!e)throw new Error("Tabs components must be used within a Tabs provider");return e},T3=({defaultValue:e,value:t,onValueChange:n,orientation:r="horizontal",className:o="",children:s})=>{const[i,a]=_.useState(e||""),c=t!==void 0,u=c?t:i,f=p=>{c||a(p),n==null||n(p)};return l.jsx(wd.Provider,{value:{value:u,onValueChange:f,orientation:r},children:l.jsx("div",{className:N(Ze.tabsRoot,o),children:s})})},P3=({className:e="",children:t})=>{const{orientation:n}=xi(),r=_.useRef(null),o=s=>{var u;const i=(u=r.current)==null?void 0:u.querySelectorAll('[role="tab"]:not([disabled])');if(!i)return;const a=Array.from(i).indexOf(document.activeElement);let c=a;switch(s.key){case"ArrowLeft":n==="horizontal"&&(s.preventDefault(),c=a>0?a-1:i.length-1);break;case"ArrowRight":n==="horizontal"&&(s.preventDefault(),c=a<i.length-1?a+1:0);break;case"ArrowUp":n==="vertical"&&(s.preventDefault(),c=a>0?a-1:i.length-1);break;case"ArrowDown":n==="vertical"&&(s.preventDefault(),c=a<i.length-1?a+1:0);break;case"Home":s.preventDefault(),c=0;break;case"End":s.preventDefault(),c=i.length-1;break}if(c!==a){const f=i[c];f.focus(),f.click()}};return l.jsx("div",{ref:r,role:"tablist","aria-orientation":n,onKeyDown:o,className:N(Ze.tabsList,n==="horizontal"?Ze.tabsListHorizontal:Ze.tabsListVertical,e),children:t})},A3=({value:e,disabled:t=!1,className:n="",children:r})=>{const{value:o,onValueChange:s,orientation:i}=xi(),a=o===e,c=()=>{t||s(e)};return l.jsx("button",{type:"button",role:"tab","aria-selected":a,"aria-controls":`content-${e}`,tabIndex:a?0:-1,disabled:t,onClick:c,className:N(Ze.tabsTrigger,i==="horizontal"?Ze.tabsTriggerHorizontal:Ze.tabsTriggerVertical,a&&Ze.tabsTriggerActive,t&&Ze.tabsTriggerDisabled,n),children:r})},O3=({value:e,className:t="",children:n})=>{const{value:r}=xi();return r===e?l.jsx("div",{role:"tabpanel",id:`content-${e}`,"aria-labelledby":`trigger-${e}`,className:N(Ze.tabsContent,t),children:n}):null},j3="TextArea__pa-A0",I3={TextArea:j3},Cd=_.forwardRef(({children:e,className:t,...n},r)=>{const o=N(I3.TextArea,t);return l.jsx("textarea",{ref:r,className:o,...n,children:e})});Cd.displayName="TextArea";var N3=Symbol("radix.slottable");function D3(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=N3,t}var[Eo]=ir("Tooltip",[bo]),_o=bo(),xd="TooltipProvider",L3=700,js="tooltip.open",[M3,Si]=Eo(xd),Sd=e=>{const{__scopeTooltip:t,delayDuration:n=L3,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=d.useRef(!0),a=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(M3,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:d.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:s})};Sd.displayName=xd;var Kn="Tooltip",[k3,lr]=Eo(Kn),Ed=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=Si(Kn,e.__scopeTooltip),u=_o(t),[f,p]=d.useState(null),m=Zt(),g=d.useRef(0),x=i??c.disableHoverableContent,h=a??c.delayDuration,v=d.useRef(!1),[y,b]=Kr({prop:r,defaultProp:o??!1,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(js))):c.onClose(),s==null||s(P)},caller:Kn}),S=d.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),E=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,b(!0)},[b]),R=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b(!1)},[b]),T=d.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,b(!0),g.current=0},h)},[h,b]);return d.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),l.jsx(Lu,{...u,children:l.jsx(k3,{scope:t,contentId:m,open:y,stateAttribute:S,trigger:f,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?T():E()},[c.isOpenDelayedRef,T,E]),onTriggerLeave:d.useCallback(()=>{x?R():(window.clearTimeout(g.current),g.current=0)},[R,x]),onOpen:E,onClose:R,disableHoverableContent:x,children:n})})};Ed.displayName=Kn;var Is="TooltipTrigger",_d=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=lr(Is,n),s=Si(Is,n),i=_o(n),a=d.useRef(null),c=ce(t,a,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),p=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(Mu,{asChild:!0,...i,children:l.jsx(ie.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:X(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:X(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:X(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:X(e.onBlur,o.onClose),onClick:X(e.onClick,o.onClose)})})});_d.displayName=Is;var Ei="TooltipPortal",[$3,F3]=Eo(Ei,{forceMount:void 0}),Rd=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=lr(Ei,t);return l.jsx($3,{scope:t,forceMount:n,children:l.jsx(Dn,{present:n||s.open,children:l.jsx(Zs,{asChild:!0,container:o,children:r})})})};Rd.displayName=Ei;var On="TooltipContent",Td=d.forwardRef((e,t)=>{const n=F3(On,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=lr(On,e.__scopeTooltip);return l.jsx(Dn,{present:r||i.open,children:i.disableHoverableContent?l.jsx(Pd,{side:o,...s,ref:t}):l.jsx(B3,{side:o,...s,ref:t})})}),B3=d.forwardRef((e,t)=>{const n=lr(On,e.__scopeTooltip),r=Si(On,e.__scopeTooltip),o=d.useRef(null),s=ce(t,o),[i,a]=d.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:p}=r,m=d.useCallback(()=>{a(null),p(!1)},[p]),g=d.useCallback((x,h)=>{const v=x.currentTarget,y={x:x.clientX,y:x.clientY},b=V3(y,v.getBoundingClientRect()),S=z3(y,b),E=q3(h.getBoundingClientRect()),R=K3([...S,...E]);a(R),p(!0)},[p]);return d.useEffect(()=>()=>m(),[m]),d.useEffect(()=>{if(c&&f){const x=v=>g(v,f),h=v=>g(v,c);return c.addEventListener("pointerleave",x),f.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",x),f.removeEventListener("pointerleave",h)}}},[c,f,g,m]),d.useEffect(()=>{if(i){const x=h=>{const v=h.target,y={x:h.clientX,y:h.clientY},b=(c==null?void 0:c.contains(v))||(f==null?void 0:f.contains(v)),S=!G3(y,i);b?m():S&&(m(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,f,i,u,m]),l.jsx(Pd,{...e,ref:s})}),[U3,W3]=Eo(Kn,{isInside:!1}),H3=D3("TooltipContent"),Pd=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=lr(On,n),u=_o(n),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(js,f),()=>document.removeEventListener(js,f)),[f]),d.useEffect(()=>{if(c.trigger){const p=m=>{const g=m.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),l.jsx(lo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs(ku,{"data-state":c.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(H3,{children:r}),l.jsx(U3,{scope:n,isInside:!0,children:l.jsx(V0,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Td.displayName=On;var Ad="TooltipArrow",Od=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=_o(n);return W3(Ad,n).isInside?null:l.jsx($u,{...o,...r,ref:t})});Od.displayName=Ad;function V3(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function z3(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function q3(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function G3(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],c=t[i],u=a.x,f=a.y,p=c.x,m=c.y;f>r!=m>r&&n<(p-u)*(r-f)/(m-f)+u&&(o=!o)}return o}function K3(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Q3(t)}function Q3(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Y3=Sd,Z3=Ed,X3=_d,J3=Rd,eb=Td,tb=Od;const nb="tooltip__nUuSh",rb="tooltipArrow__W2w-f",Ya={tooltip:nb,tooltipArrow:rb},jn=({children:e,open:t,displayName:n,tooltipContent:r,className:o,disabled:s,delayDuration:i=300,side:a="right",sideOffset:c=0})=>{const[u,f]=_.useState(!1),p=t!==void 0,g=s?!1:p?t:u,x=h=>{s||p||f(h)};return l.jsx(Y3,{delayDuration:i,children:l.jsxs(Z3,{open:g,onOpenChange:x,children:[l.jsx(X3,{asChild:!0,children:e}),l.jsx(J3,{children:l.jsxs(eb,{className:N(Ya.tooltip,o),side:a,sideOffset:c,children:[n,r,l.jsx(tb,{className:Ya.tooltipArrow})]})})]})})};jn.displayName="Tooltip";const ob="truncatedText__Y-jSd",sb="overflowing__o8TC-",Za={truncatedText:ob,overflowing:sb},jd=({children:e,className:t,tooltipSide:n="top",tooltipClassName:r})=>{const o=_.useRef(null),[s,i]=_.useState(!1);_.useEffect(()=>{const c=()=>{if(o.current){const u=o.current.scrollWidth>o.current.clientWidth;i(u)}};return c(),window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c)}},[]);const a=l.jsx("span",{ref:o,className:N(Za.truncatedText,s?Za.overflowing:"",t||""),children:e});return s?l.jsx(jn,{tooltipContent:e,side:n,className:r,children:a}):a};jd.displayName="TextWithTooltip";const Id=()=>l.jsx("svg",{width:"28",height:"28",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M15.9998 29.3337C8.63584 29.3337 2.6665 23.3643 2.6665 16.0003C2.6665 8.63633 8.63584 2.66699 15.9998 2.66699C23.3638 2.66699 29.3332 8.63633 29.3332 16.0003C29.3332 23.3643 23.3638 29.3337 15.9998 29.3337ZM15.9998 26.667C18.8288 26.667 21.5419 25.5432 23.5423 23.5428C25.5427 21.5424 26.6665 18.8293 26.6665 16.0003C26.6665 13.1713 25.5427 10.4582 23.5423 8.45785C21.5419 6.45747 18.8288 5.33366 15.9998 5.33366C13.1709 5.33366 10.4578 6.45747 8.45736 8.45785C6.45698 10.4582 5.33317 13.1713 5.33317 16.0003C5.33317 18.8293 6.45698 21.5424 8.45736 23.5428C10.4578 25.5432 13.1709 26.667 15.9998 26.667ZM9.33317 20.427C12.2066 20.2205 14.9088 18.9833 16.9425 16.943C18.9828 14.9092 20.2201 12.2071 20.4265 9.33366C21.4117 9.99003 22.2389 10.8569 22.8486 11.8716C23.4582 12.8864 23.835 14.0239 23.9519 15.2019C24.0687 16.3799 23.9226 17.5692 23.5242 18.684C23.1257 19.7987 22.4849 20.8112 21.6478 21.6483C20.8107 22.4853 19.7982 23.1262 18.6835 23.5247C17.5687 23.9231 16.3795 24.0692 15.2014 23.9523C14.0234 23.8355 12.8859 23.4587 11.8712 22.8491C10.8564 22.2394 9.98954 21.4122 9.33317 20.427Z",fill:"currentColor"})});Id.displayName="DarkModeIcon";const Nd=()=>l.jsx("svg",{width:"28",height:"28",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",transform:"matrix(-1,1.2246467991473532e-16,-1.2246467991473532e-16,-1,0,0)",children:l.jsx("path",{d:"M15.9998 29.3337C8.63584 29.3337 2.6665 23.3643 2.6665 16.0003C2.6665 8.63633 8.63584 2.66699 15.9998 2.66699C23.3638 2.66699 29.3332 8.63633 29.3332 16.0003C29.3332 23.3643 23.3638 29.3337 15.9998 29.3337ZM15.9998 26.667C18.8288 26.667 21.5419 25.5432 23.5423 23.5428C25.5427 21.5424 26.6665 18.8293 26.6665 16.0003C26.6665 13.1713 25.5427 10.4582 23.5423 8.45785C21.5419 6.45747 18.8288 5.33366 15.9998 5.33366C13.1709 5.33366 10.4578 6.45747 8.45736 8.45785C6.45698 10.4582 5.33317 13.1713 5.33317 16.0003C5.33317 18.8293 6.45698 21.5424 8.45736 23.5428C10.4578 25.5432 13.1709 26.667 15.9998 26.667ZM9.33317 20.427C12.2066 20.2205 14.9088 18.9833 16.9425 16.943C18.9828 14.9092 20.2201 12.2071 20.4265 9.33366C21.4117 9.99003 22.2389 10.8569 22.8486 11.8716C23.4582 12.8864 23.835 14.0239 23.9519 15.2019C24.0687 16.3799 23.9226 17.5692 23.5242 18.684C23.1257 19.7987 22.4849 20.8112 21.6478 21.6483C20.8107 22.4853 19.7982 23.1262 18.6835 23.5247C17.5687 23.9231 16.3795 24.0692 15.2014 23.9523C14.0234 23.8355 12.8859 23.4587 11.8712 22.8491C10.8564 22.2394 9.98954 21.4122 9.33317 20.427Z",fill:"currentColor"})});Nd.displayName="LightModeIcon";const ib="container__zBqbk",ab="expanded__EbsIr",cb="label__cdMnm",zo={container:ib,expanded:ab,label:cb},lb=e=>e.toLowerCase().trim().split(" ").join("-"),ub=e=>`${lb(e)}-theme`,Dd=()=>{const{platformName:e="Platform"}=ks(),t=ub(e),[n,r]=_.useState(()=>{const s=localStorage.getItem(t);return s==="light"||s==="dark"?s:"light"}),o=s=>{localStorage.setItem(t,s),r(s)};return _.useEffect(()=>{document.documentElement.setAttribute("data-theme",n)},[n]),{theme:n,setTheme:o}},Ld=({isNavbarExpanded:e})=>{const{theme:t,setTheme:n}=Dd(),r=()=>n(t==="dark"?"light":"dark"),o=l.jsxs("div",{className:N(zo.container,e&&zo.expanded),onClick:r,children:[t==="light"?l.jsx(Id,{}):l.jsx(Nd,{}),e&&l.jsx("p",{className:zo.label,children:t==="light"?"Dark Mode":"Light Mode"})]});return e?o:l.jsx(jn,{displayName:t==="light"?"Switch to dark mode":"Switch to light mode",sideOffset:-16,children:o})};Ld.displayName="ToggleTheme";const db={auth:{SESSION_EXPIRED:"platform:auth:session-expired"},apps:{APP_CLICKED:"platform:apps:app-clicked"},shell:{NAVBAR_STATE_CHANGED:"platform:shell:navbar-state-changed",MENU_STATE_CHANGED:"platform:shell:menu-state-changed"}},_i=()=>{const[e]=er();return e.featureFlags},Md=({flag:e,children:t,fallback:n=null,invert:r=!1})=>{const s=_i()[e]===!0;return(r?!s:s)?l.jsx(l.Fragment,{children:t}):l.jsx(l.Fragment,{children:n})};Md.displayName="FeatureFlagGuard";const fb=e=>_i()[e],hb=(e,t)=>{const n=r=>l.jsx(Gs,{operations:t,children:l.jsx(e,{...r})});return n.displayName="Authorized",n},pb=(e,t)=>{const n=r=>(t=t||e.displayName||e.name||"?",l.jsx(al,{name:t,...r,children:l.jsx(e,{...r})}));return n.displayName=`extensionPoint(${t})`,n},mb="container__LbyGQ",gb="avatarWrapper__HCQIZ",vb="avatar__E453a",yb="overflowWrapper__ETnPO",bb="overflowBadge__igBKT",Bn={container:mb,avatarWrapper:gb,avatar:vb,overflowWrapper:yb,overflowBadge:bb},wb={sm:24,md:32,lg:40},Cb=({users:e,maxVisible:t=5,size:n="md",overlap:r=!0,className:o="",onUserClick:s})=>{const i=wb[n],a=_.useMemo(()=>e.slice(0,t),[e,t]),c=_.useMemo(()=>e.slice(t),[e,t]),u=Math.max(0,e.length-t),f=p=>p.split(" ").map(m=>m[0]).join("").toUpperCase().slice(0,2);return l.jsxs("div",{className:N(Bn.container,o),children:[a.map((p,m)=>l.jsx(jn,{tooltipContent:p.displayName,side:"bottom",children:l.jsx("div",{className:Bn.avatarWrapper,style:{marginLeft:m>0&&r?`-${i*.25}px`:void 0},onClick:()=>s==null?void 0:s(p),children:l.jsx("div",{className:Bn.avatar,style:{width:i,height:i,backgroundColor:p.color,fontSize:n==="sm"?"10px":n==="md"?"12px":"14px",cursor:s?"pointer":"default"},children:f(p.displayName)})})},p.username)),u>0&&l.jsx(jn,{side:"bottom",tooltipContent:l.jsx("div",{children:c.map(p=>l.jsx("p",{children:p.displayName},p.username))}),children:l.jsx("div",{className:Bn.overflowWrapper,style:{marginLeft:r?`-${i*.25}px`:void 0},children:l.jsxs("div",{className:Bn.overflowBadge,style:{width:i,height:i,fontSize:n==="sm"?"10px":n==="md"?"12px":"14px"},children:["+",u]})})})]})},kd=_.createContext(null),$d={autoJoin:!0,autoLeave:!0};function xb(e,t=$d){const{autoJoin:n,autoLeave:r}=t,o=_.useContext(kd),{authUser:s}=rr();if(!o)throw new Error("useRoom must be used within RoomsProvider");const i=_.useRef(!1),a=()=>{if(n){console.warn("[useRoom] Ignoring manual joinRoom call because autoJoin is enabled.",{roomId:e});return}return i.current=!0,o.joinRoom(e)},c=()=>{if(r){console.warn("[useRoom] Ignoring manual leaveRoom call because autoLeave is enabled.",{roomId:e});return}return i.current=!1,o.leaveRoom(e)};_.useEffect(()=>{if(!(!e||o.status!=="connected"))return(n||i.current)&&o.joinRoom(e),()=>{r&&o.status==="connected"&&o.leaveRoom(e)}},[o.status,e,o.leaveRoom,o.joinRoom,r,n]);const u=o.getRoomUsers(e),f=u.findIndex(p=>p.username===(s==null?void 0:s.username))!==-1;return{users:u,roomId:e,hasJoined:f,joinRoom:a,leaveRoom:c,reconnect:o.reconnect}}const qo={JOIN_ROOM:"join_room",LEAVE_ROOM:"leave_room",USER_LIST:"user_list"};function Fd(e){const t=["#FF6B6B","#4ECDC4","#45B7D1","#FFA07A","#98D8C8","#F7DC6F","#BB8FCE","#85C1E2","#F8B739","#52B788","#E74C3C","#3498DB","#9B59B6","#1ABC9C","#F39C12","#E67E22","#95A5A6","#34495E","#16A085","#27AE60"];let n=0;for(let o=0;o<e.length;o++)n=e.charCodeAt(o)+((n<<5)-n),n=n&n;const r=Math.abs(n)%t.length;return t[r]}const Bd=[1e3,2e3,4e3,8e3,16e3],Sb=Bd.length,Eb=({children:e})=>{const t=Oc("@bluealba/pae-rooms-service"),[n,r]=_.useState([]),[o,s]=_.useState("loading"),i=_.useRef(null),a=_.useRef(!1),c=_.useRef(0),u=_.useRef(null),f=_.useRef(!0),p=_.useRef(()=>{}),m=_.useCallback(async T=>{if(T.data instanceof Blob){const P=await T.data.text();return JSON.parse(P)}else return JSON.parse(T.data)},[]),g=_.useCallback(T=>{r(T.map(P=>({...P,username:P.username.toLowerCase(),color:Fd(P.username)})))},[]),x=_.useCallback(T=>new Promise((P,D)=>{const I=new WebSocket(T);let L=!1;I.onopen=()=>{L=!0,c.current=0,f.current&&s("connected"),P(I)},I.addEventListener("message",async B=>{try{const U=await m(B);U.event===qo.USER_LIST&&g(U.data)}catch(U){console.error("Error parsing WebSocket message:",U)}}),I.onerror=B=>{console.error("Rooms WebSocket error",B)},I.onclose=()=>{if(i.current!==I){L||D(new Error("WebSocket connection replaced"));return}a.current?f.current&&s("closed"):p.current(),L||D(new Error("WebSocket connection failed"))},i.current=I}),[g,m]),h=_.useCallback(()=>{if(!t||!f.current)return;if(c.current>=Sb){s("error");return}const T=Bd[c.current];c.current++,s("reconnecting"),u.current=setTimeout(()=>{f.current&&t&&x(t).catch(()=>{})},T)},[t,x]);p.current=h;const v=_.useCallback(()=>{if(!t)return;u.current&&(clearTimeout(u.current),u.current=null);const T=i.current;T&&T.readyState!==WebSocket.CLOSED&&(a.current=!0,T.close()),c.current=0,a.current=!1,s("loading"),x(t)},[t,x]);_.useEffect(()=>{if(f.current=!0,a.current=!1,t)return x(t),()=>{var T;f.current=!1,u.current&&(clearTimeout(u.current),u.current=null),a.current=!0,(T=i.current)==null||T.close()}},[t,x]),_.useEffect(()=>{const T=()=>{if(document.visibilityState!=="visible")return;const P=i.current;P&&P.readyState===WebSocket.OPEN||(u.current&&(clearTimeout(u.current),u.current=null),c.current=0,v())};return document.addEventListener("visibilitychange",T),()=>{document.removeEventListener("visibilitychange",T)}},[v]);const y=(T,P)=>{const D=i.current;!D||D.readyState!==WebSocket.OPEN||setTimeout(()=>{D.send(JSON.stringify({event:T,data:P}))},100)},b=T=>{y(qo.JOIN_ROOM,{roomId:T})},S=T=>{y(qo.LEAVE_ROOM,{roomId:T})},E=_.useCallback(T=>n.filter(P=>P.rooms.includes(T)),[n]),R={status:o,getRoomUsers:E,joinRoom:b,leaveRoom:S,reconnect:v};return l.jsx(kd.Provider,{value:R,children:e})},_b=e=>{const t={authUser:{id:"testuser",username:"testuser",displayName:"Test User",applications:[]},catalog:[],authentication:{passwordMethodEnabled:!0,registerEnabled:!0,invitationsEnabled:!0,resetPasswordExpiration:3e4,passwordConstraints:{lowerCaseRequired:!1,upperCaseRequired:!1,symbolRequired:!1,digitRequired:!1,minLength:0,maxLength:8},sessionExpiration:864e5,jwtSecret:"",sessionIncludeOrigUser:!1,impersonationMode:"cookie",canImpersonateNonExistentUsers:!1,providers:[]},platformVersion:"0.0.0",featureFlags:{}};Object.defineProperty(window,zn,{value:e?$f(t,e):t})};function Xa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function no(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xa(Object(n),!0).forEach(function(r){Rb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xa(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ud(e){return(Ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function Rb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ns(e){return(Ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function Wd(e,t){var n;if(typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(r){var o=r.appName||r.name;if(!o)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var s="single-spa-application:".concat(o);return function(){var i=document.getElementById(s);return i||((i=document.createElement("div")).id=s,document.body.appendChild(i)),i}}(t))!="function")throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(Ns(n)));return function(){var r=n(t);if(!(r instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(Ns(r)));return r}}var Qn=null;try{Qn=require("react").createContext()}catch{}var Tb={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function Pb(e){if(Ud(e)!=="object")throw new Error("single-spa-react requires a configuration object");var t,n=no(no({},Tb),e);if(!n.React)throw new Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw new Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||((t=n.ReactDOMClient)!==null&&t!==void 0&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&typeof n.errorBoundary!="function")throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!Qn&&n.React.createContext&&(Qn=n.React.createContext()),n.SingleSpaRoot=function(o){function s(i){s.displayName="SingleSpaRoot(".concat(i.name,")")}return s.prototype=Object.create(o.React.Component.prototype),s.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},s.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},s.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},s}(n);var r={bootstrap:Ab.bind(null,n),mount:Ob.bind(null,n),unmount:jb.bind(null,n)};return n.parcelCanUpdate&&(r.update=Ib.bind(null,n)),r}function Ab(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(n){e.rootComponent=n})}function Ob(e,t){return new Promise(function(n,r){e.suppressComponentDidCatchWarning||!function(a){if(!(a&&typeof a.version=="string"&&a.version.indexOf(".")>=0))return!1;var c=a.version.slice(0,a.version.indexOf("."));try{return Number(c)>=16}catch{return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=Hd(e,t,function(){n(this)}),s=Wd(e,t)(),i=function(a){var c=a.reactDom,u=a.renderType,f=a.elementToRender,p=a.domElement,m=c[u];if(typeof m!="function")throw new Error('renderType "'.concat(u,'" did not return a function.'));switch(u){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var g=m(p);return g.render(f),g;case"hydrateRoot":return m(p,f);case"hydrate":default:return m(f,p),null}}({elementToRender:o,domElement:s,reactDom:Ri(e),renderType:Nb(e)});e.domElements[t.name]=s,e.renderResults[t.name]=i})}function jb(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():Ri(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function Ib(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=Hd(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var s=Wd(e,t)();Ri(e).render(r,s)}})}function Ri(e){return e.ReactDOMClient||e.ReactDOM}function Nb(e){return typeof e.renderType=="function"?e.renderType():e.renderType}function Hd(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=Qn?e.React.createElement(Qn.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(s,i){function a(c){s.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},a.displayName="SingleSpaReactErrorBoundary(".concat(c.name,")")}return a.prototype=Object.create(s.React.Component.prototype),a.prototype.render=function(){return this.state.caughtError?(s.errorBoundary||i.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},a.prototype.componentDidCatch=function(c,u){this.setState({caughtError:c,caughtErrorInfo:u})},a}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,no(no({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(s){return s()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)}const Db=e=>{const t=new Ih;return function(r){if(!r)throw new Error("Microfrontend did not receive any properties !!");const o=Ms(r.module.name);return l.jsx(bc,{module:o,children:l.jsxs(kh,{client:t,children:[l.jsx(e,{...r}),l.jsx($p,{position:"top-right",reverseOrder:!0})]})})}},Lb=({rootComponent:e,...t})=>Pb({errorBoundary(n){return console.error(n),l.jsx(ri,{})},...t,rootComponent:Db(e)});exports.Alert=co;exports.ApplicationIcon=sl;exports.Authorized=Gs;exports.Badge=Ks;exports.Badges=Qs;exports.Button=Gr;exports.ClipboardCheckIcon=Kl;exports.ClipboardIcon=Ql;exports.ConfirmDialog=Gl;exports.CopyToClipboardButton=$g;exports.DEFAULT_OPTIONS=$d;exports.Dialog=ge;exports.DropdownList=ho;exports.EmptyState=ni;exports.ErrorState=ri;exports.ExtendExtensionPoint=n1;exports.ExtensionPoint=al;exports.EyeIcon=Jl;exports.FeatureFlagGuard=Md;exports.FieldGroup=Xl;exports.Input=po;exports.InputError=eu;exports.Label=tu;exports.List=tt;exports.ModulePlaceHolder=dl;exports.Pagination=si;exports.PaginationContent=ii;exports.PaginationEllipsis=li;exports.PaginationItem=Vn;exports.PaginationLink=ar;exports.PaginationNext=ci;exports.PaginationPrevious=ai;exports.PasswordInput=kv;exports.Pill=Uv;exports.PlatformEventListener=c1;exports.PlatformEvents=db;exports.PluralizeCounter=ui;exports.RoomAvatars=Cb;exports.RoomsProvider=Eb;exports.SearchAutocomplete=fu;exports.SearchInput=di;exports.Select=fi;exports.Select2=dd;exports.Show=It;exports.Skeleton=So;exports.SkeletonList=pd;exports.Spinner=md;exports.Switch=gd;exports.Table=bd;exports.Tabs=T3;exports.TabsContent=O3;exports.TabsList=P3;exports.TabsTrigger=A3;exports.TextArea=Cd;exports.TextWithTooltip=jd;exports.ThemeToggle=Ld;exports.Tooltip=jn;exports.authorized=hb;exports.dropdownListStyles=Wt;exports.extensionPoint=pb;exports.generateUserColor=Fd;exports.getApplications=Ls;exports.getInitials=Nf;exports.getOperations=vc;exports.hasAccess=gc;exports.initializeMicroFrontend=Lb;exports.isPlatformCustomizationCompleted=gh;exports.isValidEmail=Of;exports.logout=jf;exports.navigateTo=If;exports.platformHaveAnyCustomization=mh;exports.setupTestEnvironment=_b;exports.useApplicationIcon=Ec;exports.useApplicationJSModule=so;exports.useApplicationMenu=Pf;exports.useApplicationUIModule=Tc;exports.useApplications=Rc;exports.useAuth=rr;exports.useCatalog=tr;exports.useCurrentApplication=Fs;exports.useCurrentApplicationName=Ac;exports.useCurrentJSModule=Wf;exports.useDynamicFonts=Ic;exports.useDynamicStyleSheet=Nc;exports.useExtendExtensionPoint=Uc;exports.useExtensionPoint=Wc;exports.useFeatureFlag=fb;exports.useFeatureFlags=_i;exports.useGetPlatformTheme=Jf;exports.useHasNoSession=Cf;exports.useLocation=mc;exports.useModule=Ms;exports.useModuleCommonPaths=Sf;exports.useModuleConfig=ks;exports.useModuleConfigByName=Cc;exports.useModuleMenu=_c;exports.useModuleMetadata=nr;exports.useMutableCatalog=wf;exports.useNotifications=qs;exports.useOperations=wc;exports.usePAECustomizationsLoadingState=eh;exports.usePAEState=er;exports.usePlatformCustomization=ph;exports.usePlatformEventListener=Bc;exports.useResource=Fp;exports.useResourceActions=ol;exports.useRoom=xb;exports.useServiceBaseURL=Bs;exports.useServiceInvoker=Us;exports.useServiceWebSocketURL=Oc;exports.useTenants=Xp;exports.useTheme=Dd;exports.useTrackEvent=Kf;exports.useTrackEvents=jc;exports.useUIApplications=Pc;exports.useUserState=e1;
|