@gouvfr-lasuite/ui-kit 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -14,21 +14,21 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Wa;function ah(){return Wa||(Wa=1,process.env.NODE_ENV!=="production"&&function(){function t($){if($==null)return null;if(typeof $=="function")return $.$$typeof===_?null:$.displayName||$.name||null;if(typeof $=="string")return $;switch($){case D:return"Fragment";case x:return"Portal";case b:return"Profiler";case P:return"StrictMode";case H:return"Suspense";case E:return"SuspenseList"}if(typeof $=="object")switch(typeof $.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),$.$$typeof){case B:return($.displayName||"Context")+".Provider";case k:return($._context.displayName||"Context")+".Consumer";case N:var G=$.render;return $=$.displayName,$||($=G.displayName||G.name||"",$=$!==""?"ForwardRef("+$+")":"ForwardRef"),$;case I:return G=$.displayName||null,G!==null?G:t($.type)||"Memo";case z:G=$._payload,$=$._init;try{return t($(G))}catch{}}return null}function e($){return""+$}function n($){try{e($);var G=!1}catch{G=!0}if(G){G=console;var q=G.error,ie=typeof Symbol=="function"&&Symbol.toStringTag&&$[Symbol.toStringTag]||$.constructor.name||"Object";return q.call(G,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ie),e($)}}function r(){}function i(){if(F===0){K=console.log,W=console.info,U=console.warn,L=console.error,Y=console.group,ee=console.groupCollapsed,de=console.groupEnd;var $={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:$,log:$,warn:$,error:$,group:$,groupCollapsed:$,groupEnd:$})}F++}function o(){if(F--,F===0){var $={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:re({},$,{value:K}),info:re({},$,{value:W}),warn:re({},$,{value:U}),error:re({},$,{value:L}),group:re({},$,{value:Y}),groupCollapsed:re({},$,{value:ee}),groupEnd:re({},$,{value:de})})}0>F&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function a($){if(ce===void 0)try{throw Error()}catch(q){var G=q.stack.trim().match(/\n( *(at )?)/);ce=G&&G[1]||"",oe=-1<q.stack.indexOf(`
17
+ */var Wa;function ah(){return Wa||(Wa=1,process.env.NODE_ENV!=="production"&&function(){function t($){if($==null)return null;if(typeof $=="function")return $.$$typeof===_?null:$.displayName||$.name||null;if(typeof $=="string")return $;switch($){case D:return"Fragment";case x:return"Portal";case b:return"Profiler";case P:return"StrictMode";case z:return"Suspense";case E:return"SuspenseList"}if(typeof $=="object")switch(typeof $.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),$.$$typeof){case B:return($.displayName||"Context")+".Provider";case k:return($._context.displayName||"Context")+".Consumer";case R:var G=$.render;return $=$.displayName,$||($=G.displayName||G.name||"",$=$!==""?"ForwardRef("+$+")":"ForwardRef"),$;case I:return G=$.displayName||null,G!==null?G:t($.type)||"Memo";case j:G=$._payload,$=$._init;try{return t($(G))}catch{}}return null}function e($){return""+$}function n($){try{e($);var G=!1}catch{G=!0}if(G){G=console;var q=G.error,ie=typeof Symbol=="function"&&Symbol.toStringTag&&$[Symbol.toStringTag]||$.constructor.name||"Object";return q.call(G,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ie),e($)}}function r(){}function i(){if(L===0){K=console.log,W=console.info,U=console.warn,F=console.error,X=console.group,te=console.groupCollapsed,de=console.groupEnd;var $={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:$,log:$,warn:$,error:$,group:$,groupCollapsed:$,groupEnd:$})}L++}function o(){if(L--,L===0){var $={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Q({},$,{value:K}),info:Q({},$,{value:W}),warn:Q({},$,{value:U}),error:Q({},$,{value:F}),group:Q({},$,{value:X}),groupCollapsed:Q({},$,{value:te}),groupEnd:Q({},$,{value:de})})}0>L&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function a($){if(ce===void 0)try{throw Error()}catch(q){var G=q.stack.trim().match(/\n( *(at )?)/);ce=G&&G[1]||"",oe=-1<q.stack.indexOf(`
18
18
  at`)?" (<anonymous>)":-1<q.stack.indexOf("@")?"@unknown:0:0":""}return`
19
- `+ce+$+oe}function s($,G){if(!$||ge)return"";var q=ne.get($);if(q!==void 0)return q;ge=!0,q=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var ie=null;ie=V.H,V.H=null,i();try{var Se={DetermineComponentFrameRoot:function(){try{if(G){var st=function(){throw Error()};if(Object.defineProperty(st.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(st,[])}catch(Je){var lr=Je}Reflect.construct($,[],st)}else{try{st.call()}catch(Je){lr=Je}$.call(st.prototype)}}else{try{throw Error()}catch(Je){lr=Je}(st=$())&&typeof st.catch=="function"&&st.catch(function(){})}}catch(Je){if(Je&&lr&&typeof Je.stack=="string")return[Je.stack,lr.stack]}return[null,null]}};Se.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var se=Object.getOwnPropertyDescriptor(Se.DetermineComponentFrameRoot,"name");se&&se.configurable&&Object.defineProperty(Se.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var Q=Se.DetermineComponentFrameRoot(),Xe=Q[0],Bt=Q[1];if(Xe&&Bt){var $e=Xe.split(`
19
+ `+ce+$+oe}function s($,G){if(!$||ge)return"";var q=re.get($);if(q!==void 0)return q;ge=!0,q=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var ie=null;ie=H.H,H.H=null,i();try{var Se={DetermineComponentFrameRoot:function(){try{if(G){var st=function(){throw Error()};if(Object.defineProperty(st.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(st,[])}catch(Je){var lr=Je}Reflect.construct($,[],st)}else{try{st.call()}catch(Je){lr=Je}$.call(st.prototype)}}else{try{throw Error()}catch(Je){lr=Je}(st=$())&&typeof st.catch=="function"&&st.catch(function(){})}}catch(Je){if(Je&&lr&&typeof Je.stack=="string")return[Je.stack,lr.stack]}return[null,null]}};Se.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var se=Object.getOwnPropertyDescriptor(Se.DetermineComponentFrameRoot,"name");se&&se.configurable&&Object.defineProperty(Se.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var Z=Se.DetermineComponentFrameRoot(),Xe=Z[0],Bt=Z[1];if(Xe&&Bt){var $e=Xe.split(`
20
20
  `),yt=Bt.split(`
21
- `);for(Q=se=0;se<$e.length&&!$e[se].includes("DetermineComponentFrameRoot");)se++;for(;Q<yt.length&&!yt[Q].includes("DetermineComponentFrameRoot");)Q++;if(se===$e.length||Q===yt.length)for(se=$e.length-1,Q=yt.length-1;1<=se&&0<=Q&&$e[se]!==yt[Q];)Q--;for(;1<=se&&0<=Q;se--,Q--)if($e[se]!==yt[Q]){if(se!==1||Q!==1)do if(se--,Q--,0>Q||$e[se]!==yt[Q]){var Dn=`
22
- `+$e[se].replace(" at new "," at ");return $.displayName&&Dn.includes("<anonymous>")&&(Dn=Dn.replace("<anonymous>",$.displayName)),typeof $=="function"&&ne.set($,Dn),Dn}while(1<=se&&0<=Q);break}}}finally{ge=!1,V.H=ie,o(),Error.prepareStackTrace=q}return $e=($e=$?$.displayName||$.name:"")?a($e):"",typeof $=="function"&&ne.set($,$e),$e}function l($){if($==null)return"";if(typeof $=="function"){var G=$.prototype;return s($,!(!G||!G.isReactComponent))}if(typeof $=="string")return a($);switch($){case H:return a("Suspense");case E:return a("SuspenseList")}if(typeof $=="object")switch($.$$typeof){case N:return $=s($.render,!1),$;case I:return l($.type);case z:G=$._payload,$=$._init;try{return l($(G))}catch{}}return""}function u(){var $=V.A;return $===null?null:$.getOwner()}function c($){if(J.call($,"key")){var G=Object.getOwnPropertyDescriptor($,"key").get;if(G&&G.isReactWarning)return!1}return $.key!==void 0}function p($,G){function q(){at||(at=!0,console.error("%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://react.dev/link/special-props)",G))}q.isReactWarning=!0,Object.defineProperty($,"key",{get:q,configurable:!0})}function g(){var $=t(this.type);return ve[$]||(ve[$]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),$=this.props.ref,$!==void 0?$:null}function h($,G,q,ie,Se,se){return q=se.ref,$={$$typeof:O,type:$,key:G,props:se,_owner:Se},(q!==void 0?q:null)!==null?Object.defineProperty($,"ref",{enumerable:!1,get:g}):Object.defineProperty($,"ref",{enumerable:!1,value:null}),$._store={},Object.defineProperty($._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty($,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze($.props),Object.freeze($)),$}function y($,G,q,ie,Se,se){if(typeof $=="string"||typeof $=="function"||$===D||$===b||$===P||$===H||$===E||$===M||typeof $=="object"&&$!==null&&($.$$typeof===z||$.$$typeof===I||$.$$typeof===B||$.$$typeof===k||$.$$typeof===N||$.$$typeof===A||$.getModuleId!==void 0)){var Q=G.children;if(Q!==void 0)if(ie)if(R(Q)){for(ie=0;ie<Q.length;ie++)f(Q[ie],$);Object.freeze&&Object.freeze(Q)}else console.error("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 f(Q,$)}else Q="",($===void 0||typeof $=="object"&&$!==null&&Object.keys($).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."),$===null?ie="null":R($)?ie="array":$!==void 0&&$.$$typeof===O?(ie="<"+(t($.type)||"Unknown")+" />",Q=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof $,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ie,Q);if(J.call(G,"key")){Q=t($);var Xe=Object.keys(G).filter(function($e){return $e!=="key"});ie=0<Xe.length?"{key: someKey, "+Xe.join(": ..., ")+": ...}":"{key: someKey}",Tn[Q+ie]||(Xe=0<Xe.length?"{"+Xe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
21
+ `);for(Z=se=0;se<$e.length&&!$e[se].includes("DetermineComponentFrameRoot");)se++;for(;Z<yt.length&&!yt[Z].includes("DetermineComponentFrameRoot");)Z++;if(se===$e.length||Z===yt.length)for(se=$e.length-1,Z=yt.length-1;1<=se&&0<=Z&&$e[se]!==yt[Z];)Z--;for(;1<=se&&0<=Z;se--,Z--)if($e[se]!==yt[Z]){if(se!==1||Z!==1)do if(se--,Z--,0>Z||$e[se]!==yt[Z]){var Dn=`
22
+ `+$e[se].replace(" at new "," at ");return $.displayName&&Dn.includes("<anonymous>")&&(Dn=Dn.replace("<anonymous>",$.displayName)),typeof $=="function"&&re.set($,Dn),Dn}while(1<=se&&0<=Z);break}}}finally{ge=!1,H.H=ie,o(),Error.prepareStackTrace=q}return $e=($e=$?$.displayName||$.name:"")?a($e):"",typeof $=="function"&&re.set($,$e),$e}function l($){if($==null)return"";if(typeof $=="function"){var G=$.prototype;return s($,!(!G||!G.isReactComponent))}if(typeof $=="string")return a($);switch($){case z:return a("Suspense");case E:return a("SuspenseList")}if(typeof $=="object")switch($.$$typeof){case R:return $=s($.render,!1),$;case I:return l($.type);case j:G=$._payload,$=$._init;try{return l($(G))}catch{}}return""}function u(){var $=H.A;return $===null?null:$.getOwner()}function c($){if(Y.call($,"key")){var G=Object.getOwnPropertyDescriptor($,"key").get;if(G&&G.isReactWarning)return!1}return $.key!==void 0}function p($,G){function q(){at||(at=!0,console.error("%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://react.dev/link/special-props)",G))}q.isReactWarning=!0,Object.defineProperty($,"key",{get:q,configurable:!0})}function g(){var $=t(this.type);return ve[$]||(ve[$]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),$=this.props.ref,$!==void 0?$:null}function h($,G,q,ie,Se,se){return q=se.ref,$={$$typeof:O,type:$,key:G,props:se,_owner:Se},(q!==void 0?q:null)!==null?Object.defineProperty($,"ref",{enumerable:!1,get:g}):Object.defineProperty($,"ref",{enumerable:!1,value:null}),$._store={},Object.defineProperty($._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty($,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze($.props),Object.freeze($)),$}function y($,G,q,ie,Se,se){if(typeof $=="string"||typeof $=="function"||$===D||$===b||$===P||$===z||$===E||$===V||typeof $=="object"&&$!==null&&($.$$typeof===j||$.$$typeof===I||$.$$typeof===B||$.$$typeof===k||$.$$typeof===R||$.$$typeof===M||$.getModuleId!==void 0)){var Z=G.children;if(Z!==void 0)if(ie)if(N(Z)){for(ie=0;ie<Z.length;ie++)f(Z[ie],$);Object.freeze&&Object.freeze(Z)}else console.error("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 f(Z,$)}else Z="",($===void 0||typeof $=="object"&&$!==null&&Object.keys($).length===0)&&(Z+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),$===null?ie="null":N($)?ie="array":$!==void 0&&$.$$typeof===O?(ie="<"+(t($.type)||"Unknown")+" />",Z=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof $,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ie,Z);if(Y.call(G,"key")){Z=t($);var Xe=Object.keys(G).filter(function($e){return $e!=="key"});ie=0<Xe.length?"{key: someKey, "+Xe.join(": ..., ")+": ...}":"{key: someKey}",Tn[Z+ie]||(Xe=0<Xe.length?"{"+Xe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
23
23
  let props = %s;
24
24
  <%s {...props} />
25
25
  React keys must be passed directly to JSX without using spread:
26
26
  let props = %s;
27
- <%s key={someKey} {...props} />`,ie,Q,Xe,Q),Tn[Q+ie]=!0)}if(Q=null,q!==void 0&&(n(q),Q=""+q),c(G)&&(n(G.key),Q=""+G.key),"key"in G){q={};for(var Bt in G)Bt!=="key"&&(q[Bt]=G[Bt])}else q=G;return Q&&p(q,typeof $=="function"?$.displayName||$.name||"Unknown":$),h($,Q,se,Se,u(),q)}function f($,G){if(typeof $=="object"&&$&&$.$$typeof!==Ue){if(R($))for(var q=0;q<$.length;q++){var ie=$[q];v(ie)&&m(ie,G)}else if(v($))$._store&&($._store.validated=1);else if($===null||typeof $!="object"?q=null:(q=j&&$[j]||$["@@iterator"],q=typeof q=="function"?q:null),typeof q=="function"&&q!==$.entries&&(q=q.call($),q!==$))for(;!($=q.next()).done;)v($.value)&&m($.value,G)}}function v($){return typeof $=="object"&&$!==null&&$.$$typeof===O}function m($,G){if($._store&&!$._store.validated&&$.key==null&&($._store.validated=1,G=S(G),!sr[G])){sr[G]=!0;var q="";$&&$._owner!=null&&$._owner!==u()&&(q=null,typeof $._owner.tag=="number"?q=t($._owner.type):typeof $._owner.name=="string"&&(q=$._owner.name),q=" It was passed a child from "+q+".");var ie=V.getCurrentStack;V.getCurrentStack=function(){var Se=l($.type);return ie&&(Se+=ie()||""),Se},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',G,q),V.getCurrentStack=ie}}function S($){var G="",q=u();return q&&(q=t(q.type))&&(G=`
27
+ <%s key={someKey} {...props} />`,ie,Z,Xe,Z),Tn[Z+ie]=!0)}if(Z=null,q!==void 0&&(n(q),Z=""+q),c(G)&&(n(G.key),Z=""+G.key),"key"in G){q={};for(var Bt in G)Bt!=="key"&&(q[Bt]=G[Bt])}else q=G;return Z&&p(q,typeof $=="function"?$.displayName||$.name||"Unknown":$),h($,Z,se,Se,u(),q)}function f($,G){if(typeof $=="object"&&$&&$.$$typeof!==Ue){if(N($))for(var q=0;q<$.length;q++){var ie=$[q];v(ie)&&m(ie,G)}else if(v($))$._store&&($._store.validated=1);else if($===null||typeof $!="object"?q=null:(q=A&&$[A]||$["@@iterator"],q=typeof q=="function"?q:null),typeof q=="function"&&q!==$.entries&&(q=q.call($),q!==$))for(;!($=q.next()).done;)v($.value)&&m($.value,G)}}function v($){return typeof $=="object"&&$!==null&&$.$$typeof===O}function m($,G){if($._store&&!$._store.validated&&$.key==null&&($._store.validated=1,G=S(G),!sr[G])){sr[G]=!0;var q="";$&&$._owner!=null&&$._owner!==u()&&(q=null,typeof $._owner.tag=="number"?q=t($._owner.type):typeof $._owner.name=="string"&&(q=$._owner.name),q=" It was passed a child from "+q+".");var ie=H.getCurrentStack;H.getCurrentStack=function(){var Se=l($.type);return ie&&(Se+=ie()||""),Se},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',G,q),H.getCurrentStack=ie}}function S($){var G="",q=u();return q&&(q=t(q.type))&&(G=`
28
28
 
29
29
  Check the render method of \``+q+"`."),G||($=t($))&&(G=`
30
30
 
31
- Check the top-level render call using <`+$+">."),G}var w=d,O=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),B=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),j=Symbol.iterator,_=Symbol.for("react.client.reference"),V=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=Object.prototype.hasOwnProperty,re=Object.assign,A=Symbol.for("react.client.reference"),R=Array.isArray,F=0,K,W,U,L,Y,ee,de;r.__reactDisabledLog=!0;var ce,oe,ge=!1,ne=new(typeof WeakMap=="function"?WeakMap:Map),Ue=Symbol.for("react.client.reference"),at,ve={},Tn={},sr={};On.Fragment=D,On.jsx=function($,G,q,ie,Se){return y($,G,q,!1,ie,Se)},On.jsxs=function($,G,q,ie,Se){return y($,G,q,!0,ie,Se)}}()),On}var Ua;function sh(){return Ua||(Ua=1,process.env.NODE_ENV==="production"?ur.exports=oh():ur.exports=ah()),ur.exports}var T=sh();const lh={alert:{close_aria_label:"Delete alert",expand_aria_label:"Expand alert",shrink_aria_label:"Shrink alert"},pagination:{goto_label:"Go to page",goto_label_aria:"Go to any page",next_aria:"Go to next page",previous_aria:"Go to previous page",goto_page_aria:"Go to page {page}",current_page_aria:"You are currently on page {page}"},datagrid:{empty:"This table is empty",empty_alt:"Illustration of an empty table",loader_aria:"Loading data",rows_selection_aria:"All rows selection",row_selection_aria:"Row selection"},provider:{test:"This is a test: {name}"},forms:{input:{password:{show_password:"Show password",hide_password:"Hide password"}},select:{toggle_button_aria_label:"Toggle dropdown",clear_button_aria_label:"Clear selection",clear_all_button_aria_label:"Clear all selections",menu_empty_placeholder:"No options available"},file_uploader:{delete_file_name:"Delete file {name}",delete_file:"Delete file",uploading:"Uploading...",caption:"Drag and drop or ",browse_files:"Browse files"},date_picker:{toggle_button_aria_label_open:"Open calendar",toggle_button_aria_label_close:"Close calendar",clear_button_aria_label:"Clear date",next_month_button_aria_label:"Next month",next_year_button_aria_label:"Next year",previous_month_button_aria_label:"Previous month",previous_year_button_aria_label:"Previous year",year_select_button_aria_label:"Select a year",month_select_button_aria_label:"Select a month"}},modals:{helpers:{delete_confirmation:{title:"Are you sure?",children:"Are you sure to delete this item?",cancel:"Cancel",delete:"Delete"},confirmation:{title:"Are you sure?",children:"Are you sure you want to do that?",cancel:"Cancel",yes:"Yes"},disclaimer:{title:"Disclaimer",children:"This is a disclaimer",ok:"Ok"}}}},uh={components:lh},ch={alert:{close_aria_label:"Supprimer l'alerte",expand_aria_label:"Ouvrir l'alerte",shrink_aria_label:"Fermer l'alerte"},pagination:{goto_label:"Aller à",goto_label_aria:"Aller à la page",next_aria:"Aller à la page suivante",previous_aria:"Aller à la page précédente",goto_page_aria:"Aller à la page {page}",current_page_aria:"Vous êtes actuellement sur la page {page}"},datagrid:{empty:"Ce tableau est vide",empty_alt:"Illustration d'un tableau vide",loader_aria:"Loading data"},provider:{test:"Ceci est un test : {name}"},forms:{select:{toggle_button_aria_label:"Ouvrir le menu",clear_button_aria_label:"Effacer la sélection",clear_all_button_aria_label:"Effacer toutes les sélections",menu_empty_placeholder:"Aucun choix disponible"},file_uploader:{delete_file_name:"Supprimer le fichier {name}",delete_file:"Supprimer le fichier",uploading:"Upload en cours ...",caption:"Glisser-déposer ou ",browse_files:"Parcourir"},date_picker:{toggle_button_aria_label_open:"Ouvrir le calendrier",toggle_button_aria_label_close:"Fermer le calendrier",clear_button_aria_label:"Effacer la date",next_month_button_aria_label:"Mois suivant",next_year_button_aria_label:"Année suivante",previous_month_button_aria_label:"Mois précédent",previous_year_button_aria_label:"Année précédente",year_select_button_aria_label:"Sélectionner une année",month_select_button_aria_label:"Sélectionner un mois"}}},dh={components:ch},fh={},hh={};function Oi(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Br(t,...e){if(!e.length)return t;const n=e.shift();if(Oi(t)&&Oi(n))for(const r in n)Oi(n[r])?(t[r]||Object.assign(t,{[r]:{}}),Br(t[r],n[r])):Object.assign(t,{[r]:n[r]});return Br(t,...e)}function vu(){return{enUS:Br(uh,fh),frFR:Br(dh,hh)}}const ph=t=>{const e=vu();return T.jsx(vn.CunninghamProvider,{theme:"dsfr",customLocales:e,...t})},gh=({disabled:t,onClick:e})=>T.jsx(vn.Button,{disabled:t,className:"pro-connect-button",onClick:e}),pe=typeof document<"u"?d.useLayoutEffect:()=>{};function De(t){const e=d.useRef(null);return pe(()=>{e.current=t},[t]),d.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function vh(t){let[e,n]=d.useState(t),r=d.useRef(null),i=De(()=>{if(!r.current)return;let a=r.current.next();if(a.done){r.current=null;return}e===a.value?i():n(a.value)});pe(()=>{r.current&&i()});let o=De(a=>{r.current=a(e),i()});return[e,o]}const Wr={prefix:String(Math.round(Math.random()*1e10)),current:0},mu=d.createContext(Wr),mh=d.createContext(!1);let yh=!!(typeof window<"u"&&window.document&&window.document.createElement),Ii=new WeakMap;function bh(t=!1){let e=d.useContext(mu),n=d.useRef(null);if(n.current===null&&!t){var r,i;let o=(i=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let a=Ii.get(o);a==null?Ii.set(o,{id:e.current,state:o.memoizedState}):o.memoizedState!==a.state&&(e.current=a.id,Ii.delete(o))}n.current=++e.current}return n.current}function Sh(t){let e=d.useContext(mu);e===Wr&&!yh&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=bh(!!t),r=e===Wr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function wh(t){let e=d.useId(),[n]=d.useState(En()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Wr.prefix}`;return t||`${r}-${e}`}const Eh=typeof d.useId=="function"?wh:Sh;function $h(){return!1}function xh(){return!0}function Ch(t){return()=>{}}function En(){return typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore(Ch,$h,xh):d.useContext(mh)}let Th=!!(typeof window<"u"&&window.document&&window.document.createElement),dt=new Map;function tr(t){let[e,n]=d.useState(t),r=d.useRef(null),i=Eh(e),o=d.useCallback(a=>{r.current=a},[]);return Th&&(dt.has(i)&&!dt.get(i).includes(o)?dt.set(i,[...dt.get(i),o]):dt.set(i,[o])),pe(()=>{let a=i;return()=>{dt.delete(a)}},[i]),d.useEffect(()=>{let a=r.current;a&&(r.current=null,n(a))}),i}function Dh(t,e){if(t===e)return t;let n=dt.get(t);if(n)return n.forEach(i=>i(e)),e;let r=dt.get(e);return r?(r.forEach(i=>i(t)),t):e}function _i(t=[]){let e=tr(),[n,r]=vh(e),i=d.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return pe(i,[e,i,...t]),n}function Vn(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Ke=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},mn=t=>t&&"window"in t&&t.window===t?t:Ke(t).defaultView||window;function yu(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=yu(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function jt(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=yu(t))&&(r&&(r+=" "),r+=e);return r}function ye(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let o=e[i],a=r[i];typeof o=="function"&&typeof a=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=Vn(o,a):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof a=="string"?e[i]=jt(o,a):i==="id"&&o&&a?e.id=Dh(o,a):e[i]=a!==void 0?a:o}}return e}function bu(...t){return t.length===1&&t[0]?t[0]:e=>{for(let n of t)typeof n=="function"?n(e):n!=null&&(n.current=e)}}const Ph=new Set(["id"]),Oh=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Ih=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),_h=/^(data-.*)$/;function Be(t,e={}){let{labelable:n,isLink:r,propNames:i}=e,o={};for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(Ph.has(a)||n&&Oh.has(a)||r&&Ih.has(a)||i!=null&&i.has(a)||_h.test(a))&&(o[a]=t[a]);return o}function $t(t){if(kh())t.focus({preventScroll:!0});else{let e=Nh(t);t.focus(),Rh(e)}}let cr=null;function kh(){if(cr==null){cr=!1;try{document.createElement("div").focus({get preventScroll(){return cr=!0,!0}})}catch{}}return cr}function Nh(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Rh(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function ui(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function aa(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function ot(t){let e=null;return()=>(e==null&&(e=t()),e)}const Ot=ot(function(){return aa(/^Mac/i)}),Mh=ot(function(){return aa(/^iPhone/i)}),Su=ot(function(){return aa(/^iPad/i)||Ot()&&navigator.maxTouchPoints>1}),ci=ot(function(){return Mh()||Su()}),Ah=ot(function(){return Ot()||ci()}),wu=ot(function(){return ui(/AppleWebKit/i)&&!Kh()}),Kh=ot(function(){return ui(/Chrome/i)}),Eu=ot(function(){return ui(/Android/i)}),Lh=ot(function(){return ui(/Firefox/i)}),Fh=d.createContext({isNative:!0,open:zh,useHref:t=>t});function di(){return d.useContext(Fh)}function It(t,e,n=!0){var r,i;let{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}=e;Lh()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(Ot()?o=!0:a=!0);let u=wu()&&Ot()&&!Su()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});It.isOpening=n,$t(t),t.dispatchEvent(u),It.isOpening=!1}It.isOpening=!1;function jh(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function zh(t,e){jh(t,n=>It(n,e))}function $u(t){let e=di();var n;const r=e.useHref((n=t==null?void 0:t.href)!==null&&n!==void 0?n:"");return{href:t!=null&&t.href?r:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let nn=new Map,Eo=new Set;function Va(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=nn.get(r.target);i||(i=new Set,nn.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=nn.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),nn.delete(r.target)),nn.size===0)){for(let o of Eo)o();Eo.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Va():document.addEventListener("DOMContentLoaded",Va));function Hh(t){requestAnimationFrame(()=>{nn.size===0?t():Eo.add(t)})}function xu(){let t=d.useRef(new Map),e=d.useCallback((i,o,a,s)=>{let l=s!=null&&s.once?(...u)=>{t.current.delete(a),a(...u)}:a;t.current.set(a,{type:o,eventTarget:i,fn:l,options:s}),i.addEventListener(o,l,s)},[]),n=d.useCallback((i,o,a,s)=>{var l;let u=((l=t.current.get(a))===null||l===void 0?void 0:l.fn)||a;i.removeEventListener(o,u,s),t.current.delete(a)},[]),r=d.useCallback(()=>{t.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return d.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function sa(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=tr(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":i}}function $n(t){const e=d.useRef(null);return d.useMemo(()=>({get current(){return e.current},set current(n){e.current=n,typeof t=="function"?t(n):t&&(t.current=n)}}),[t])}function Ga(t,e){const n=d.useRef(!0),r=d.useRef(null);pe(()=>(n.current=!0,()=>{n.current=!1}),[]),pe(()=>{n.current?n.current=!1:(!r.current||e.some((i,o)=>!Object.is(i,r[o])))&&t(),r.current=e},e)}function Bh(){return typeof window.ResizeObserver<"u"}function qa(t){const{ref:e,box:n,onResize:r}=t;d.useEffect(()=>{let i=e==null?void 0:e.current;if(i)if(Bh()){const o=new window.ResizeObserver(a=>{a.length&&r()});return o.observe(i,{box:n}),()=>{i&&o.unobserve(i)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,e,n])}function Wh(t,e){pe(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function Gn(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&e&&(r=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),r}function Cu(t,e){let n=t;for(Gn(n,e)&&(n=n.parentElement);n&&!Gn(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function Uh(t,e){const n=[];for(;t&&t!==document.documentElement;)Gn(t,e)&&n.push(t),t=t.parentElement;return n}let Vh=0;const ki=new Map;function Gh(t){let[e,n]=d.useState();return pe(()=>{if(!t)return;let r=ki.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${Vh++}`;n(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=t,document.body.appendChild(o),r={refCount:0,element:o},ki.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),ki.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function dr(t,e,n,r){let i=De(n),o=n==null;d.useEffect(()=>{if(o||!t.current)return;let a=t.current;return a.addEventListener(e,i,r),()=>{a.removeEventListener(e,i,r)}},[t,e,r,o,i])}function Tu(t,e){let n=Ya(t,e,"left"),r=Ya(t,e,"top"),i=e.offsetWidth,o=e.offsetHeight,a=t.scrollLeft,s=t.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:p,scrollPaddingBottom:g,scrollPaddingLeft:h}=getComputedStyle(t),y=a+parseInt(u,10),f=s+parseInt(l,10),v=y+t.clientWidth,m=f+t.clientHeight,S=parseInt(c,10)||0,w=parseInt(g,10)||0,O=parseInt(p,10)||0,x=parseInt(h,10)||0;n<=a+x?a=n-parseInt(u,10)-x:n+i>v-O&&(a+=n+i-v+O),r<=f+S?s=r-parseInt(l,10)-S:r+o>m-w&&(s+=r+o-m+w),t.scrollLeft=a,t.scrollTop=s}function Ya(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[r];break}e=e.offsetParent}return i}function Xa(t,e){if(t&&document.contains(t)){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow==="hidden"){let l=Uh(t);for(let u of l)Tu(u,t)}else{var n;let{left:l,top:u}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:c,top:p}=t.getBoundingClientRect();if(Math.abs(l-c)>1||Math.abs(u-p)>1){var r,i,o;e==null||(i=e.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(o=t.scrollIntoView)===null||o===void 0||o.call(t,{block:"nearest"})}}}}function $o(t){return t.mozInputSource===0&&t.isTrusted?!0:Eu()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function qh(t){return!Eu()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const Yh="react-aria-clear-focus",Xh="react-aria-focus",Du="react-aria-update-activedescendant";function rn(t){return Ot()?t.metaKey:t.ctrlKey}function Jh(t,e=!0){let[n,r]=d.useState(!0),i=n&&e;return pe(()=>{if(i&&t.current&&"getAnimations"in t.current)for(let o of t.current.getAnimations())o instanceof CSSTransition&&o.cancel()},[t,i]),Pu(t,i,d.useCallback(()=>r(!1),[])),i}function Qh(t,e){let[n,r]=d.useState(e?"open":"closed");switch(n){case"open":e||r("exiting");break;case"closed":case"exiting":e&&r("open");break}let i=n==="exiting";return Pu(t,i,d.useCallback(()=>{r(o=>o==="exiting"?"closed":o)},[])),i}function Pu(t,e,n){pe(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let i=!1;return Promise.all(r.map(o=>o.finished)).then(()=>{i||Ft.flushSync(()=>{n()})}).catch(()=>{}),()=>{i=!0}}},[t,e,n])}function nr(t,e,n){let[r,i]=d.useState(t||e),o=d.useRef(t!==void 0),a=t!==void 0;d.useEffect(()=>{let u=o.current;u!==a&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),o.current=a},[a]);let s=a?t:r,l=d.useCallback((u,...c)=>{let p=(g,...h)=>{n&&(Object.is(s,g)||n(g,...h)),a||(s=g)};typeof u=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((h,...y)=>{let f=u(a?s:h,...y);return p(f,...c),a?h:f})):(a||i(u),p(u,...c))},[a,s,n]);return[s,l]}function xo(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const Ja=Symbol("default");function rr({values:t,children:e}){for(let[n,r]of t)e=d.createElement(n.Provider,{value:r},e);return e}function mt(t){let{className:e,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:a,values:s}=t;return d.useMemo(()=>{let l,u,c;return typeof e=="function"?l=e({...s,defaultClassName:i}):l=e,typeof n=="function"?u=n({...s,defaultStyle:a||{}}):u=n,typeof r=="function"?c=r({...s,defaultChildren:o}):r==null?c=o:c=r,{className:l??i,style:u||a?{...a,...u}:void 0,children:c??o,"data-rac":""}},[e,n,r,i,o,a,s])}function la(t,e){let n=d.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(o=>`"${o}"`));if(!e&&!n.slots[Ja])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=e||Ja;if(!n.slots[i])throw new Error(`Invalid slot "${e}". Valid slot names are ${r}.`);return n.slots[i]}return n}function ir(t,e,n){let r=la(n,t.slot)||{},{ref:i,...o}=r,a=$n(d.useMemo(()=>bu(e,i),[e,i])),s=ye(o,t);return"style"in o&&o.style&&"style"in t&&t.style&&(typeof o.style=="function"||typeof t.style=="function"?s.style=l=>{let u=typeof o.style=="function"?o.style(l):o.style,c={...l.defaultStyle,...u},p=typeof t.style=="function"?t.style({...l,defaultStyle:c}):t.style;return{...c,...p}}:s.style={...o.style,...t.style}),[s,a]}function Zh(){let[t,e]=d.useState(!0),n=d.useRef(!1),r=d.useCallback(i=>{n.current=!0,e(!!i)},[]);return pe(()=>{n.current||e(!1)},[]),[r,t]}class ua{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new ua(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e}constructor(e,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.type=e,this.key=n}}class ca{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),i=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?n.get(i.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}filter(e){let n=new ca,r=null;for(let i of this)if(i.type==="section"&&i.hasChildNodes){let o=i.clone(),a=null;for(let s of this.getChildren(i.key))if(e(s.textValue)||s.type==="header"){let l=s.clone();a==null&&(o.firstChildKey=l.key),n.firstKey==null&&(n.firstKey=o.key),a&&a.parentKey===l.parentKey?(a.nextKey=l.key,l.prevKey=a.key):l.prevKey=null,l.nextKey=null,n.addNode(l),a=l}a&&(a.type!=="header"?(o.lastChildKey=a.key,r==null?o.prevKey=null:(r.type==="section"||r.type==="separator")&&(r.nextKey=o.key,o.prevKey=r.key),o.nextKey=null,r=o,n.addNode(o)):(n.firstKey===o.key&&(n.firstKey=null),n.removeNode(a.key)))}else if(i.type==="separator"){let o=i.clone();o.nextKey=null,(r==null?void 0:r.type)==="section"&&(r.nextKey=o.key,o.prevKey=r.key,r=o,n.addNode(o))}else if(e(i.textValue)){let o=i.clone();n.firstKey==null&&(n.firstKey=o.key),r!=null&&r.type!=="section"&&r.type!=="separator"&&r.parentKey===o.parentKey?(r.nextKey=o.key,o.prevKey=r.key):o.prevKey=null,o.nextKey=null,n.addNode(o),r=o}if((r==null?void 0:r.type)==="separator"&&r.nextKey===null){let i;r.prevKey!=null&&(i=n.getItem(r.prevKey),i.nextKey=null),n.removeNode(r.key),r=i}return n.lastKey=(r==null?void 0:r.key)||null,n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}class Ou{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}appendChild(e){this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode;let r=n;for(;r;)r.index++,r=r.nextSibling;e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}removeChild(e){if(e.parentNode!==this||!this.ownerDocument.isMounted)return;this.ownerDocument.startTransaction();let n=e.nextSibling;for(;n;)n.index--,n=n.nextSibling;e.nextSibling&&(e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.removeNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}addEventListener(){}removeEventListener(){}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this.ownerDocument=e}}class qn extends Ou{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof qn?this.parentNode.level+(this.node.type==="item"?1:0):0}updateNode(){var e,n,r,i;let o=this.ownerDocument.getMutableNode(this);o.index=this.index,o.level=this.level,o.parentKey=this.parentNode instanceof qn?this.parentNode.node.key:null;var a;o.prevKey=(a=(e=this.previousSibling)===null||e===void 0?void 0:e.node.key)!==null&&a!==void 0?a:null;var s;o.nextKey=(s=(n=this.nextSibling)===null||n===void 0?void 0:n.node.key)!==null&&s!==void 0?s:null,o.hasChildNodes=!!this.firstChild;var l;o.firstChildKey=(l=(r=this.firstChild)===null||r===void 0?void 0:r.node.key)!==null&&l!==void 0?l:null;var u;o.lastChildKey=(u=(i=this.lastChild)===null||i===void 0?void 0:i.node.key)!==null&&u!==void 0?u:null}setProps(e,n,r,i){let o=this.ownerDocument.getMutableNode(this),{value:a,textValue:s,id:l,...u}=e;if(u.ref=n,o.props=u,o.rendered=r,o.render=i,o.value=a,o.textValue=s||(typeof u.children=="string"?u.children:"")||e["aria-label"]||"",l!=null&&l!==o.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");o.key=l}this.hasSetProps||(this.ownerDocument.addNode(this),this.ownerDocument.endTransaction(),this.hasSetProps=!0),this.ownerDocument.queueUpdate()}get style(){return{}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this._index=0,this.hasSetProps=!1,this.node=new ua(e,`react-aria-${++n.nodeId}`),this.ownerDocument.startTransaction()}}class ep extends Ou{get isConnected(){return this.isMounted}createElement(e){return new qn(e,this)}getMutableNode(e){let n=e.node;return this.mutatedNodes.has(e)||(n=e.node.clone(),this.mutatedNodes.add(e),e.node=n),this.markDirty(e),n}getMutableCollection(){return!this.isSSR&&!this.collectionMutated&&(this.collection=this.collection.clone(),this.collectionMutated=!0),this.collection}markDirty(e){this.dirtyNodes.add(e)}startTransaction(){this.transactionCount++}endTransaction(){this.transactionCount--}addNode(e){let n=this.getMutableCollection();if(!n.getItem(e.node.key)){n.addNode(e.node);for(let r of e)this.addNode(r)}this.markDirty(e)}removeNode(e){for(let r of e)this.removeNode(r);this.getMutableCollection().removeNode(e.node.key),this.markDirty(e)}getCollection(){return this.transactionCount>0?this.collection:(this.updateCollection(),this.collection)}updateCollection(){for(let o of this.dirtyNodes)o instanceof qn&&o.isConnected&&o.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var e,n;let o=this.getMutableCollection();for(let a of this.mutatedNodes)a.isConnected&&o.addNode(a.node);var r,i;o.commit((r=(e=this.firstChild)===null||e===void 0?void 0:e.node.key)!==null&&r!==void 0?r:null,(i=(n=this.lastChild)===null||n===void 0?void 0:n.node.key)!==null&&i!==void 0?i:null,this.isSSR),this.mutatedNodes.clear()}this.collectionMutated=!1}queueUpdate(){if(!(this.dirtyNodes.size===0||this.transactionCount>0))for(let e of this.subscriptions)e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.mutatedNodes=new Set,this.subscriptions=new Set,this.transactionCount=0,this.collection=e,this.collectionMutated=!0}}function Iu(t){let{children:e,items:n,idScope:r,addIdAndValue:i,dependencies:o=[]}=t,a=d.useMemo(()=>new WeakMap,o);return d.useMemo(()=>{if(n&&typeof e=="function"){let u=[];for(let c of n){let p=a.get(c);if(!p){p=e(c);var s,l;let g=(l=(s=p.props.id)!==null&&s!==void 0?s:c.key)!==null&&l!==void 0?l:c.id;if(g==null)throw new Error("Could not determine key for item");r&&(g=r+":"+g),p=d.cloneElement(p,i?{key:g,id:g,value:c}:{key:g}),a.set(c,p)}u.push(p)}return u}else if(typeof e!="function")return e},[e,n,a,r,i])}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const Ur=d.createContext(!1),tp=typeof DocumentFragment<"u"?new DocumentFragment:null;function np(t){let e=d.useContext(Ur),n=En();if(e)return d.createElement(d.Fragment,null,t.children);let r=d.createElement(Ur.Provider,{value:!0},t.children);return n?d.createElement("template",{"data-react-aria-hidden":!0},r):Ft.createPortal(r,tp)}function rp(t){let e=(n,r)=>d.useContext(Ur)?null:t(n,r);return e.displayName=t.displayName||t.name,d.forwardRef(e)}function ip(){return d.useContext(Ur)}const op=typeof document<"u"?d.useLayoutEffect:()=>{};var fr={exports:{}},Ni={};/**
31
+ Check the top-level render call using <`+$+">."),G}var w=d,O=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),B=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),A=Symbol.iterator,_=Symbol.for("react.client.reference"),H=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,Q=Object.assign,M=Symbol.for("react.client.reference"),N=Array.isArray,L=0,K,W,U,F,X,te,de;r.__reactDisabledLog=!0;var ce,oe,ge=!1,re=new(typeof WeakMap=="function"?WeakMap:Map),Ue=Symbol.for("react.client.reference"),at,ve={},Tn={},sr={};On.Fragment=D,On.jsx=function($,G,q,ie,Se){return y($,G,q,!1,ie,Se)},On.jsxs=function($,G,q,ie,Se){return y($,G,q,!0,ie,Se)}}()),On}var Ua;function sh(){return Ua||(Ua=1,process.env.NODE_ENV==="production"?ur.exports=oh():ur.exports=ah()),ur.exports}var T=sh();const lh={alert:{close_aria_label:"Delete alert",expand_aria_label:"Expand alert",shrink_aria_label:"Shrink alert"},pagination:{goto_label:"Go to page",goto_label_aria:"Go to any page",next_aria:"Go to next page",previous_aria:"Go to previous page",goto_page_aria:"Go to page {page}",current_page_aria:"You are currently on page {page}"},datagrid:{empty:"This table is empty",empty_alt:"Illustration of an empty table",loader_aria:"Loading data",rows_selection_aria:"All rows selection",row_selection_aria:"Row selection"},provider:{test:"This is a test: {name}"},forms:{input:{password:{show_password:"Show password",hide_password:"Hide password"}},select:{toggle_button_aria_label:"Toggle dropdown",clear_button_aria_label:"Clear selection",clear_all_button_aria_label:"Clear all selections",menu_empty_placeholder:"No options available"},file_uploader:{delete_file_name:"Delete file {name}",delete_file:"Delete file",uploading:"Uploading...",caption:"Drag and drop or ",browse_files:"Browse files"},date_picker:{toggle_button_aria_label_open:"Open calendar",toggle_button_aria_label_close:"Close calendar",clear_button_aria_label:"Clear date",next_month_button_aria_label:"Next month",next_year_button_aria_label:"Next year",previous_month_button_aria_label:"Previous month",previous_year_button_aria_label:"Previous year",year_select_button_aria_label:"Select a year",month_select_button_aria_label:"Select a month"}},modals:{helpers:{delete_confirmation:{title:"Are you sure?",children:"Are you sure to delete this item?",cancel:"Cancel",delete:"Delete"},confirmation:{title:"Are you sure?",children:"Are you sure you want to do that?",cancel:"Cancel",yes:"Yes"},disclaimer:{title:"Disclaimer",children:"This is a disclaimer",ok:"Ok"}}}},uh={components:lh},ch={alert:{close_aria_label:"Supprimer l'alerte",expand_aria_label:"Ouvrir l'alerte",shrink_aria_label:"Fermer l'alerte"},pagination:{goto_label:"Aller à",goto_label_aria:"Aller à la page",next_aria:"Aller à la page suivante",previous_aria:"Aller à la page précédente",goto_page_aria:"Aller à la page {page}",current_page_aria:"Vous êtes actuellement sur la page {page}"},datagrid:{empty:"Ce tableau est vide",empty_alt:"Illustration d'un tableau vide",loader_aria:"Loading data"},provider:{test:"Ceci est un test : {name}"},forms:{select:{toggle_button_aria_label:"Ouvrir le menu",clear_button_aria_label:"Effacer la sélection",clear_all_button_aria_label:"Effacer toutes les sélections",menu_empty_placeholder:"Aucun choix disponible"},file_uploader:{delete_file_name:"Supprimer le fichier {name}",delete_file:"Supprimer le fichier",uploading:"Upload en cours ...",caption:"Glisser-déposer ou ",browse_files:"Parcourir"},date_picker:{toggle_button_aria_label_open:"Ouvrir le calendrier",toggle_button_aria_label_close:"Fermer le calendrier",clear_button_aria_label:"Effacer la date",next_month_button_aria_label:"Mois suivant",next_year_button_aria_label:"Année suivante",previous_month_button_aria_label:"Mois précédent",previous_year_button_aria_label:"Année précédente",year_select_button_aria_label:"Sélectionner une année",month_select_button_aria_label:"Sélectionner un mois"}}},dh={components:ch},fh={},hh={};function Oi(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Br(t,...e){if(!e.length)return t;const n=e.shift();if(Oi(t)&&Oi(n))for(const r in n)Oi(n[r])?(t[r]||Object.assign(t,{[r]:{}}),Br(t[r],n[r])):Object.assign(t,{[r]:n[r]});return Br(t,...e)}function vu(){return{enUS:Br(uh,fh),frFR:Br(dh,hh)}}const ph=t=>{const e=vu();return T.jsx(vn.CunninghamProvider,{theme:"dsfr",customLocales:e,...t})},gh=({disabled:t,onClick:e})=>T.jsx(vn.Button,{disabled:t,className:"pro-connect-button",onClick:e}),pe=typeof document<"u"?d.useLayoutEffect:()=>{};function De(t){const e=d.useRef(null);return pe(()=>{e.current=t},[t]),d.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function vh(t){let[e,n]=d.useState(t),r=d.useRef(null),i=De(()=>{if(!r.current)return;let a=r.current.next();if(a.done){r.current=null;return}e===a.value?i():n(a.value)});pe(()=>{r.current&&i()});let o=De(a=>{r.current=a(e),i()});return[e,o]}const Wr={prefix:String(Math.round(Math.random()*1e10)),current:0},mu=d.createContext(Wr),mh=d.createContext(!1);let yh=!!(typeof window<"u"&&window.document&&window.document.createElement),Ii=new WeakMap;function bh(t=!1){let e=d.useContext(mu),n=d.useRef(null);if(n.current===null&&!t){var r,i;let o=(i=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let a=Ii.get(o);a==null?Ii.set(o,{id:e.current,state:o.memoizedState}):o.memoizedState!==a.state&&(e.current=a.id,Ii.delete(o))}n.current=++e.current}return n.current}function Sh(t){let e=d.useContext(mu);e===Wr&&!yh&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=bh(!!t),r=e===Wr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function wh(t){let e=d.useId(),[n]=d.useState(En()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Wr.prefix}`;return t||`${r}-${e}`}const Eh=typeof d.useId=="function"?wh:Sh;function $h(){return!1}function xh(){return!0}function Ch(t){return()=>{}}function En(){return typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore(Ch,$h,xh):d.useContext(mh)}let Th=!!(typeof window<"u"&&window.document&&window.document.createElement),dt=new Map;function tr(t){let[e,n]=d.useState(t),r=d.useRef(null),i=Eh(e),o=d.useCallback(a=>{r.current=a},[]);return Th&&(dt.has(i)&&!dt.get(i).includes(o)?dt.set(i,[...dt.get(i),o]):dt.set(i,[o])),pe(()=>{let a=i;return()=>{dt.delete(a)}},[i]),d.useEffect(()=>{let a=r.current;a&&(r.current=null,n(a))}),i}function Dh(t,e){if(t===e)return t;let n=dt.get(t);if(n)return n.forEach(i=>i(e)),e;let r=dt.get(e);return r?(r.forEach(i=>i(t)),t):e}function _i(t=[]){let e=tr(),[n,r]=vh(e),i=d.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return pe(i,[e,i,...t]),n}function Vn(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Ke=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},mn=t=>t&&"window"in t&&t.window===t?t:Ke(t).defaultView||window;function yu(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=yu(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function jt(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=yu(t))&&(r&&(r+=" "),r+=e);return r}function ye(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let o=e[i],a=r[i];typeof o=="function"&&typeof a=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=Vn(o,a):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof a=="string"?e[i]=jt(o,a):i==="id"&&o&&a?e.id=Dh(o,a):e[i]=a!==void 0?a:o}}return e}function bu(...t){return t.length===1&&t[0]?t[0]:e=>{for(let n of t)typeof n=="function"?n(e):n!=null&&(n.current=e)}}const Ph=new Set(["id"]),Oh=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Ih=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),_h=/^(data-.*)$/;function Be(t,e={}){let{labelable:n,isLink:r,propNames:i}=e,o={};for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(Ph.has(a)||n&&Oh.has(a)||r&&Ih.has(a)||i!=null&&i.has(a)||_h.test(a))&&(o[a]=t[a]);return o}function $t(t){if(kh())t.focus({preventScroll:!0});else{let e=Nh(t);t.focus(),Rh(e)}}let cr=null;function kh(){if(cr==null){cr=!1;try{document.createElement("div").focus({get preventScroll(){return cr=!0,!0}})}catch{}}return cr}function Nh(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Rh(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function ui(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function aa(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function ot(t){let e=null;return()=>(e==null&&(e=t()),e)}const Ot=ot(function(){return aa(/^Mac/i)}),Mh=ot(function(){return aa(/^iPhone/i)}),Su=ot(function(){return aa(/^iPad/i)||Ot()&&navigator.maxTouchPoints>1}),ci=ot(function(){return Mh()||Su()}),Ah=ot(function(){return Ot()||ci()}),wu=ot(function(){return ui(/AppleWebKit/i)&&!Kh()}),Kh=ot(function(){return ui(/Chrome/i)}),Eu=ot(function(){return ui(/Android/i)}),Lh=ot(function(){return ui(/Firefox/i)}),Fh=d.createContext({isNative:!0,open:zh,useHref:t=>t});function di(){return d.useContext(Fh)}function It(t,e,n=!0){var r,i;let{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}=e;Lh()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(Ot()?o=!0:a=!0);let u=wu()&&Ot()&&!Su()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});It.isOpening=n,$t(t),t.dispatchEvent(u),It.isOpening=!1}It.isOpening=!1;function jh(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function zh(t,e){jh(t,n=>It(n,e))}function $u(t){let e=di();var n;const r=e.useHref((n=t==null?void 0:t.href)!==null&&n!==void 0?n:"");return{href:t!=null&&t.href?r:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let nn=new Map,Eo=new Set;function Va(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=nn.get(r.target);i||(i=new Set,nn.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=nn.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),nn.delete(r.target)),nn.size===0)){for(let o of Eo)o();Eo.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Va():document.addEventListener("DOMContentLoaded",Va));function Hh(t){requestAnimationFrame(()=>{nn.size===0?t():Eo.add(t)})}function xu(){let t=d.useRef(new Map),e=d.useCallback((i,o,a,s)=>{let l=s!=null&&s.once?(...u)=>{t.current.delete(a),a(...u)}:a;t.current.set(a,{type:o,eventTarget:i,fn:l,options:s}),i.addEventListener(o,l,s)},[]),n=d.useCallback((i,o,a,s)=>{var l;let u=((l=t.current.get(a))===null||l===void 0?void 0:l.fn)||a;i.removeEventListener(o,u,s),t.current.delete(a)},[]),r=d.useCallback(()=>{t.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return d.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function sa(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=tr(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":i}}function $n(t){const e=d.useRef(null);return d.useMemo(()=>({get current(){return e.current},set current(n){e.current=n,typeof t=="function"?t(n):t&&(t.current=n)}}),[t])}function Ga(t,e){const n=d.useRef(!0),r=d.useRef(null);pe(()=>(n.current=!0,()=>{n.current=!1}),[]),pe(()=>{n.current?n.current=!1:(!r.current||e.some((i,o)=>!Object.is(i,r[o])))&&t(),r.current=e},e)}function Bh(){return typeof window.ResizeObserver<"u"}function qa(t){const{ref:e,box:n,onResize:r}=t;d.useEffect(()=>{let i=e==null?void 0:e.current;if(i)if(Bh()){const o=new window.ResizeObserver(a=>{a.length&&r()});return o.observe(i,{box:n}),()=>{i&&o.unobserve(i)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,e,n])}function Wh(t,e){pe(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function Gn(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&e&&(r=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),r}function Cu(t,e){let n=t;for(Gn(n,e)&&(n=n.parentElement);n&&!Gn(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function Uh(t,e){const n=[];for(;t&&t!==document.documentElement;)Gn(t,e)&&n.push(t),t=t.parentElement;return n}let Vh=0;const ki=new Map;function Gh(t){let[e,n]=d.useState();return pe(()=>{if(!t)return;let r=ki.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${Vh++}`;n(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=t,document.body.appendChild(o),r={refCount:0,element:o},ki.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),ki.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function dr(t,e,n,r){let i=De(n),o=n==null;d.useEffect(()=>{if(o||!t.current)return;let a=t.current;return a.addEventListener(e,i,r),()=>{a.removeEventListener(e,i,r)}},[t,e,r,o,i])}function Tu(t,e){let n=Ya(t,e,"left"),r=Ya(t,e,"top"),i=e.offsetWidth,o=e.offsetHeight,a=t.scrollLeft,s=t.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:p,scrollPaddingBottom:g,scrollPaddingLeft:h}=getComputedStyle(t),y=a+parseInt(u,10),f=s+parseInt(l,10),v=y+t.clientWidth,m=f+t.clientHeight,S=parseInt(c,10)||0,w=parseInt(g,10)||0,O=parseInt(p,10)||0,x=parseInt(h,10)||0;n<=a+x?a=n-parseInt(u,10)-x:n+i>v-O&&(a+=n+i-v+O),r<=f+S?s=r-parseInt(l,10)-S:r+o>m-w&&(s+=r+o-m+w),t.scrollLeft=a,t.scrollTop=s}function Ya(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[r];break}e=e.offsetParent}return i}function Xa(t,e){if(t&&document.contains(t)){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow==="hidden"){let l=Uh(t);for(let u of l)Tu(u,t)}else{var n;let{left:l,top:u}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:c,top:p}=t.getBoundingClientRect();if(Math.abs(l-c)>1||Math.abs(u-p)>1){var r,i,o;e==null||(i=e.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(o=t.scrollIntoView)===null||o===void 0||o.call(t,{block:"nearest"})}}}}function $o(t){return t.mozInputSource===0&&t.isTrusted?!0:Eu()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function qh(t){return!Eu()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const Yh="react-aria-clear-focus",Xh="react-aria-focus",Du="react-aria-update-activedescendant";function rn(t){return Ot()?t.metaKey:t.ctrlKey}function Jh(t,e=!0){let[n,r]=d.useState(!0),i=n&&e;return pe(()=>{if(i&&t.current&&"getAnimations"in t.current)for(let o of t.current.getAnimations())o instanceof CSSTransition&&o.cancel()},[t,i]),Pu(t,i,d.useCallback(()=>r(!1),[])),i}function Qh(t,e){let[n,r]=d.useState(e?"open":"closed");switch(n){case"open":e||r("exiting");break;case"closed":case"exiting":e&&r("open");break}let i=n==="exiting";return Pu(t,i,d.useCallback(()=>{r(o=>o==="exiting"?"closed":o)},[])),i}function Pu(t,e,n){pe(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let i=!1;return Promise.all(r.map(o=>o.finished)).then(()=>{i||Ft.flushSync(()=>{n()})}).catch(()=>{}),()=>{i=!0}}},[t,e,n])}function nr(t,e,n){let[r,i]=d.useState(t||e),o=d.useRef(t!==void 0),a=t!==void 0;d.useEffect(()=>{let u=o.current;u!==a&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),o.current=a},[a]);let s=a?t:r,l=d.useCallback((u,...c)=>{let p=(g,...h)=>{n&&(Object.is(s,g)||n(g,...h)),a||(s=g)};typeof u=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((h,...y)=>{let f=u(a?s:h,...y);return p(f,...c),a?h:f})):(a||i(u),p(u,...c))},[a,s,n]);return[s,l]}function xo(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const Ja=Symbol("default");function rr({values:t,children:e}){for(let[n,r]of t)e=d.createElement(n.Provider,{value:r},e);return e}function mt(t){let{className:e,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:a,values:s}=t;return d.useMemo(()=>{let l,u,c;return typeof e=="function"?l=e({...s,defaultClassName:i}):l=e,typeof n=="function"?u=n({...s,defaultStyle:a||{}}):u=n,typeof r=="function"?c=r({...s,defaultChildren:o}):r==null?c=o:c=r,{className:l??i,style:u||a?{...a,...u}:void 0,children:c??o,"data-rac":""}},[e,n,r,i,o,a,s])}function la(t,e){let n=d.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(o=>`"${o}"`));if(!e&&!n.slots[Ja])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=e||Ja;if(!n.slots[i])throw new Error(`Invalid slot "${e}". Valid slot names are ${r}.`);return n.slots[i]}return n}function ir(t,e,n){let r=la(n,t.slot)||{},{ref:i,...o}=r,a=$n(d.useMemo(()=>bu(e,i),[e,i])),s=ye(o,t);return"style"in o&&o.style&&"style"in t&&t.style&&(typeof o.style=="function"||typeof t.style=="function"?s.style=l=>{let u=typeof o.style=="function"?o.style(l):o.style,c={...l.defaultStyle,...u},p=typeof t.style=="function"?t.style({...l,defaultStyle:c}):t.style;return{...c,...p}}:s.style={...o.style,...t.style}),[s,a]}function Zh(){let[t,e]=d.useState(!0),n=d.useRef(!1),r=d.useCallback(i=>{n.current=!0,e(!!i)},[]);return pe(()=>{n.current||e(!1)},[]),[r,t]}class ua{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new ua(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e}constructor(e,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.type=e,this.key=n}}class ca{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),i=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?n.get(i.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}filter(e){let n=new ca,r=null;for(let i of this)if(i.type==="section"&&i.hasChildNodes){let o=i.clone(),a=null;for(let s of this.getChildren(i.key))if(e(s.textValue)||s.type==="header"){let l=s.clone();a==null&&(o.firstChildKey=l.key),n.firstKey==null&&(n.firstKey=o.key),a&&a.parentKey===l.parentKey?(a.nextKey=l.key,l.prevKey=a.key):l.prevKey=null,l.nextKey=null,n.addNode(l),a=l}a&&(a.type!=="header"?(o.lastChildKey=a.key,r==null?o.prevKey=null:(r.type==="section"||r.type==="separator")&&(r.nextKey=o.key,o.prevKey=r.key),o.nextKey=null,r=o,n.addNode(o)):(n.firstKey===o.key&&(n.firstKey=null),n.removeNode(a.key)))}else if(i.type==="separator"){let o=i.clone();o.nextKey=null,(r==null?void 0:r.type)==="section"&&(r.nextKey=o.key,o.prevKey=r.key,r=o,n.addNode(o))}else if(e(i.textValue)){let o=i.clone();n.firstKey==null&&(n.firstKey=o.key),r!=null&&r.type!=="section"&&r.type!=="separator"&&r.parentKey===o.parentKey?(r.nextKey=o.key,o.prevKey=r.key):o.prevKey=null,o.nextKey=null,n.addNode(o),r=o}if((r==null?void 0:r.type)==="separator"&&r.nextKey===null){let i;r.prevKey!=null&&(i=n.getItem(r.prevKey),i.nextKey=null),n.removeNode(r.key),r=i}return n.lastKey=(r==null?void 0:r.key)||null,n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}class Ou{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}appendChild(e){this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode;let r=n;for(;r;)r.index++,r=r.nextSibling;e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}removeChild(e){if(e.parentNode!==this||!this.ownerDocument.isMounted)return;this.ownerDocument.startTransaction();let n=e.nextSibling;for(;n;)n.index--,n=n.nextSibling;e.nextSibling&&(e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.removeNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}addEventListener(){}removeEventListener(){}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this.ownerDocument=e}}class qn extends Ou{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof qn?this.parentNode.level+(this.node.type==="item"?1:0):0}updateNode(){var e,n,r,i;let o=this.ownerDocument.getMutableNode(this);o.index=this.index,o.level=this.level,o.parentKey=this.parentNode instanceof qn?this.parentNode.node.key:null;var a;o.prevKey=(a=(e=this.previousSibling)===null||e===void 0?void 0:e.node.key)!==null&&a!==void 0?a:null;var s;o.nextKey=(s=(n=this.nextSibling)===null||n===void 0?void 0:n.node.key)!==null&&s!==void 0?s:null,o.hasChildNodes=!!this.firstChild;var l;o.firstChildKey=(l=(r=this.firstChild)===null||r===void 0?void 0:r.node.key)!==null&&l!==void 0?l:null;var u;o.lastChildKey=(u=(i=this.lastChild)===null||i===void 0?void 0:i.node.key)!==null&&u!==void 0?u:null}setProps(e,n,r,i){let o=this.ownerDocument.getMutableNode(this),{value:a,textValue:s,id:l,...u}=e;if(u.ref=n,o.props=u,o.rendered=r,o.render=i,o.value=a,o.textValue=s||(typeof u.children=="string"?u.children:"")||e["aria-label"]||"",l!=null&&l!==o.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");o.key=l}this.hasSetProps||(this.ownerDocument.addNode(this),this.ownerDocument.endTransaction(),this.hasSetProps=!0),this.ownerDocument.queueUpdate()}get style(){return{}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this._index=0,this.hasSetProps=!1,this.node=new ua(e,`react-aria-${++n.nodeId}`),this.ownerDocument.startTransaction()}}class ep extends Ou{get isConnected(){return this.isMounted}createElement(e){return new qn(e,this)}getMutableNode(e){let n=e.node;return this.mutatedNodes.has(e)||(n=e.node.clone(),this.mutatedNodes.add(e),e.node=n),this.markDirty(e),n}getMutableCollection(){return!this.isSSR&&!this.collectionMutated&&(this.collection=this.collection.clone(),this.collectionMutated=!0),this.collection}markDirty(e){this.dirtyNodes.add(e)}startTransaction(){this.transactionCount++}endTransaction(){this.transactionCount--}addNode(e){let n=this.getMutableCollection();if(!n.getItem(e.node.key)){n.addNode(e.node);for(let r of e)this.addNode(r)}this.markDirty(e)}removeNode(e){for(let r of e)this.removeNode(r);this.getMutableCollection().removeNode(e.node.key),this.markDirty(e)}getCollection(){return this.transactionCount>0?this.collection:(this.updateCollection(),this.collection)}updateCollection(){for(let o of this.dirtyNodes)o instanceof qn&&o.isConnected&&o.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var e,n;let o=this.getMutableCollection();for(let a of this.mutatedNodes)a.isConnected&&o.addNode(a.node);var r,i;o.commit((r=(e=this.firstChild)===null||e===void 0?void 0:e.node.key)!==null&&r!==void 0?r:null,(i=(n=this.lastChild)===null||n===void 0?void 0:n.node.key)!==null&&i!==void 0?i:null,this.isSSR),this.mutatedNodes.clear()}this.collectionMutated=!1}queueUpdate(){if(!(this.dirtyNodes.size===0||this.transactionCount>0))for(let e of this.subscriptions)e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.mutatedNodes=new Set,this.subscriptions=new Set,this.transactionCount=0,this.collection=e,this.collectionMutated=!0}}function Iu(t){let{children:e,items:n,idScope:r,addIdAndValue:i,dependencies:o=[]}=t,a=d.useMemo(()=>new WeakMap,o);return d.useMemo(()=>{if(n&&typeof e=="function"){let u=[];for(let c of n){let p=a.get(c);if(!p){p=e(c);var s,l;let g=(l=(s=p.props.id)!==null&&s!==void 0?s:c.key)!==null&&l!==void 0?l:c.id;if(g==null)throw new Error("Could not determine key for item");r&&(g=r+":"+g),p=d.cloneElement(p,i?{key:g,id:g,value:c}:{key:g}),a.set(c,p)}u.push(p)}return u}else if(typeof e!="function")return e},[e,n,a,r,i])}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const Ur=d.createContext(!1),tp=typeof DocumentFragment<"u"?new DocumentFragment:null;function np(t){let e=d.useContext(Ur),n=En();if(e)return d.createElement(d.Fragment,null,t.children);let r=d.createElement(Ur.Provider,{value:!0},t.children);return n?d.createElement("template",{"data-react-aria-hidden":!0},r):Ft.createPortal(r,tp)}function rp(t){let e=(n,r)=>d.useContext(Ur)?null:t(n,r);return e.displayName=t.displayName||t.name,d.forwardRef(e)}function ip(){return d.useContext(Ur)}const op=typeof document<"u"?d.useLayoutEffect:()=>{};var fr={exports:{}},Ni={};/**
32
32
  * @license React
33
33
  * use-sync-external-store-shim.production.js
34
34
  *
@@ -44,7 +44,7 @@ Check the top-level render call using <`+$+">."),G}var w=d,O=Symbol.for("react.t
44
44
  *
45
45
  * This source code is licensed under the MIT license found in the
46
46
  * LICENSE file in the root directory of this source tree.
47
- */var Za;function sp(){return Za||(Za=1,process.env.NODE_ENV!=="production"&&function(){function t(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}function e(h,y){c||i.startTransition===void 0||(c=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var f=y();if(!p){var v=y();o(f,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}v=a({inst:{value:f,getSnapshot:y}});var m=v[0].inst,S=v[1];return l(function(){m.value=f,m.getSnapshot=y,n(m)&&S({inst:m})},[h,f,y]),s(function(){return n(m)&&S({inst:m}),h(function(){n(m)&&S({inst:m})})},[h]),u(f),f}function n(h){var y=h.getSnapshot;h=h.value;try{var f=y();return!o(h,f)}catch{return!0}}function r(h,y){return y()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=d,o=typeof Object.is=="function"?Object.is:t,a=i.useState,s=i.useEffect,l=i.useLayoutEffect,u=i.useDebugValue,c=!1,p=!1,g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;Ri.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ri}var es;function lp(){return es||(es=1,process.env.NODE_ENV==="production"?fr.exports=ap():fr.exports=sp()),fr.exports}var da=lp();const _u=d.createContext(!1),Yn=d.createContext(null);function ku(t){if(d.useContext(Yn))return t.content;let{collection:n,document:r}=fp(t.createCollection);return d.createElement(d.Fragment,null,d.createElement(np,null,d.createElement(Yn.Provider,{value:r},t.content)),d.createElement(up,{render:t.children,collection:n}))}function up({collection:t,render:e}){return e(t)}function cp(t,e,n){let r=En(),i=d.useRef(r);i.current=r;let o=d.useCallback(()=>i.current?n():e(),[e,n]);return da.useSyncExternalStore(t,o)}const dp=typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore:cp;function fp(t){let[e]=d.useState(()=>new ep((t==null?void 0:t())||new ca)),n=d.useCallback(a=>e.subscribe(a),[e]),r=d.useCallback(()=>{let a=e.getCollection();return e.isSSR&&e.resetAfterSSR(),a},[e]),i=d.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),o=dp(n,r,i);return op(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:o,document:e}}const Co=d.createContext(null);function hp(t,e,n,r,i,o){let a=d.useCallback(l=>{l==null||l.setProps(e,n,r,o)},[e,n,r,o]),s=d.useContext(Co);if(s){let l=s.ownerDocument.nodesByProps.get(e);return l||(l=s.ownerDocument.createElement(t),l.setProps(e,n,r,o),s.appendChild(l),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(e,l)),i?d.createElement(Co.Provider,{value:l},i):null}return d.createElement(t,{ref:a},i)}function fa(t,e){let n=({node:i})=>e(i.props,i.props.ref,i),r=d.forwardRef((i,o)=>{if(!d.useContext(_u)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(i,o)}return hp(t,i,o,"children"in i?i.children:null,null,s=>d.createElement(n,{node:s}))});return r.displayName=e.name,r}function pp(t){return Iu({...t,addIdAndValue:!0})}const ts=d.createContext(null);function Nu(t){let e=d.useContext(ts),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope||(e==null?void 0:e.idScope),i=pp({...t,idScope:r,dependencies:n});return d.useContext(Yn)&&(i=d.createElement(gp,null,i)),e=d.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),d.createElement(ts.Provider,{value:e},i)}function gp({children:t}){let e=d.useContext(Yn),n=d.useMemo(()=>d.createElement(Yn.Provider,{value:null},d.createElement(_u.Provider,{value:!0},t)),[t]);return En()?d.createElement(Co.Provider,{value:e},n):Ft.createPortal(n,e)}const Pe=typeof document<"u"?d.useLayoutEffect:()=>{};function vp(t){const e=d.useRef(null);return Pe(()=>{e.current=t},[t]),d.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}const me=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},pt=t=>t&&"window"in t&&t.window===t?t:me(t).defaultView||window;function ns(t){if(mp())t.focus({preventScroll:!0});else{let e=yp(t);t.focus(),bp(e)}}let hr=null;function mp(){if(hr==null){hr=!1;try{document.createElement("div").focus({get preventScroll(){return hr=!0,!0}})}catch{}}return hr}function yp(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function bp(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function Ru(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function Sp(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function ha(t){let e=null;return()=>(e==null&&(e=t()),e)}const wp=ha(function(){return Sp(/^Mac/i)}),Ep=ha(function(){return Ru(/Chrome/i)}),Mu=ha(function(){return Ru(/Android/i)});let on=new Map,To=new Set;function rs(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=on.get(r.target);i||(i=new Set,on.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=on.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),on.delete(r.target)),on.size===0)){for(let o of To)o();To.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?rs():document.addEventListener("DOMContentLoaded",rs));function $p(t){requestAnimationFrame(()=>{on.size===0?t():To.add(t)})}function xp(t){return t.mozInputSource===0&&t.isTrusted?!0:Mu()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Cp(t,e){return e.get?e.get.call(t):e.value}function Au(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Tp(t,e){var n=Au(t,e,"get");return Cp(t,n)}function Dp(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pp(t,e,n){Dp(t,e),e.set(t,n)}function Op(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function is(t,e,n){var r=Au(t,e,"set");return Op(t,r,n),n}let Ip=class{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}};function Ku(t){let e=d.useRef({isFocused:!1,observer:null});Pe(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=vp(r=>{t==null||t(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,o=a=>{e.current.isFocused=!1,i.disabled&&n(new Ip("blur",a)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var a;(a=e.current.observer)===null||a===void 0||a.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function _p(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=d.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),a=Ku(o),s=d.useCallback(l=>{const u=me(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),a(l))},[i,n,a]);return{focusProps:{onFocus:!e&&(n||i||r)?s:void 0,onBlur:!e&&(r||i)?o:void 0}}}let xn=null,Do=new Set,Hn=new Map,_t=!1,Po=!1;const kp={Tab:!0,Escape:!0};function pa(t,e){for(let n of Do)n(t,e)}function Np(t){return!(t.metaKey||!wp()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Vr(t){_t=!0,Np(t)&&(xn="keyboard",pa("keyboard",t))}function Ne(t){xn="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(_t=!0,pa("pointer",t))}function Lu(t){xp(t)&&(_t=!0,xn="virtual")}function Fu(t){t.target===window||t.target===document||(!_t&&!Po&&(xn="virtual",pa("virtual",t)),_t=!1,Po=!1)}function ju(){_t=!1,Po=!0}function Oo(t){if(typeof window>"u"||Hn.get(pt(t)))return;const e=pt(t),n=me(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){_t=!0,r.apply(this,arguments)},n.addEventListener("keydown",Vr,!0),n.addEventListener("keyup",Vr,!0),n.addEventListener("click",Lu,!0),e.addEventListener("focus",Fu,!0),e.addEventListener("blur",ju,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ne,!0),n.addEventListener("pointermove",Ne,!0),n.addEventListener("pointerup",Ne,!0)):(n.addEventListener("mousedown",Ne,!0),n.addEventListener("mousemove",Ne,!0),n.addEventListener("mouseup",Ne,!0)),e.addEventListener("beforeunload",()=>{zu(t)},{once:!0}),Hn.set(e,{focus:r})}const zu=(t,e)=>{const n=pt(t),r=me(t);e&&r.removeEventListener("DOMContentLoaded",e),Hn.has(n)&&(n.HTMLElement.prototype.focus=Hn.get(n).focus,r.removeEventListener("keydown",Vr,!0),r.removeEventListener("keyup",Vr,!0),r.removeEventListener("click",Lu,!0),n.removeEventListener("focus",Fu,!0),n.removeEventListener("blur",ju,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ne,!0),r.removeEventListener("pointermove",Ne,!0),r.removeEventListener("pointerup",Ne,!0)):(r.removeEventListener("mousedown",Ne,!0),r.removeEventListener("mousemove",Ne,!0),r.removeEventListener("mouseup",Ne,!0)),Hn.delete(n))};function Rp(t){const e=me(t);let n;return e.readyState!=="loading"?Oo(t):(n=()=>{Oo(t)},e.addEventListener("DOMContentLoaded",n)),()=>zu(t,n)}typeof document<"u"&&Rp();function Hu(){return xn!=="pointer"}function Bu(){return xn}const Mp=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ap(t,e,n){var r;const i=typeof window<"u"?pt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?pt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?pt(n==null?void 0:n.target).HTMLElement:HTMLElement,s=typeof window<"u"?pt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return t=t||(n==null?void 0:n.target)instanceof i&&!Mp.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof o||(n==null?void 0:n.target)instanceof a&&(n==null?void 0:n.target.isContentEditable),!(t&&e==="keyboard"&&n instanceof s&&!kp[n.key])}function Kp(t,e,n){Oo(),d.useEffect(()=>{let r=(i,o)=>{Ap(!!(n!=null&&n.isTextInput),i,o)&&t(Hu())};return Do.add(r),()=>{Do.delete(r)}},e)}function Lp(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=d.useRef({isFocusWithin:!1}),a=d.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),s=Ku(a),l=d.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,s(u))},[r,i,s]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}function Gr(t){const e=me(t);if(Bu()==="virtual"){let n=e.activeElement;$p(()=>{e.activeElement===n&&t.isConnected&&ns(t)})}else ns(t)}function Fp(t){const e=pt(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:o}=t.ownerDocument.defaultView;let{display:a,visibility:s}=o(t);i=a!=="none"&&s!=="hidden"&&s!=="collapse"}return i}function jp(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function Wu(t,e){return t.nodeName!=="#comment"&&Fp(t)&&jp(t,e)&&(!t.parentElement||Wu(t.parentElement,t))}const os=d.createContext(null),Io="react-aria-focus-scope-restore";let ae=null;function Uu(t){let{children:e,contain:n,restoreFocus:r,autoFocus:i}=t,o=d.useRef(null),a=d.useRef(null),s=d.useRef([]),{parentNode:l}=d.useContext(os)||{},u=d.useMemo(()=>new ko({scopeRef:s}),[s]);Pe(()=>{let g=l||ue.root;if(ue.getTreeNode(g.scopeRef)&&ae&&!qr(ae,g.scopeRef)){let h=ue.getTreeNode(ae);h&&(g=h)}g.addChild(u),ue.addNode(u)},[u,l]),Pe(()=>{let g=ue.getTreeNode(s);g&&(g.contain=!!n)},[n]),Pe(()=>{var g;let h=(g=o.current)===null||g===void 0?void 0:g.nextSibling,y=[],f=v=>v.stopPropagation();for(;h&&h!==a.current;)y.push(h),h.addEventListener(Io,f),h=h.nextSibling;return s.current=y,()=>{for(let v of y)v.removeEventListener(Io,f)}},[e]),Gp(s,r,n),Wp(s,n),qp(s,r,n),Vp(s,i),d.useEffect(()=>{const g=me(s.current?s.current[0]:void 0).activeElement;let h=null;if(Le(g,s.current)){for(let y of ue.traverse())y.scopeRef&&Le(g,y.scopeRef.current)&&(h=y);h===ue.getTreeNode(s)&&(ae=h.scopeRef)}},[s]),Pe(()=>()=>{var g,h,y;let f=(y=(h=ue.getTreeNode(s))===null||h===void 0||(g=h.parent)===null||g===void 0?void 0:g.scopeRef)!==null&&y!==void 0?y:null;(s===ae||qr(s,ae))&&(!f||ue.getTreeNode(f))&&(ae=f),ue.removeTreeNode(s)},[s]);let c=d.useMemo(()=>zp(s),[]),p=d.useMemo(()=>({focusManager:c,parentNode:u}),[u,c]);return d.createElement(os.Provider,{value:p},d.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),e,d.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function zp(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:a}=e,s=r||me(n[0]).activeElement,l=n[0].previousElementSibling,u=xt(n),c=qe(u,{tabbable:i,accept:a},n);c.currentNode=Le(s,n)?s:l;let p=c.nextNode();return!p&&o&&(c.currentNode=l,p=c.nextNode()),p&&rt(p,!0),p},focusPrevious(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:a}=e,s=r||me(n[0]).activeElement,l=n[n.length-1].nextElementSibling,u=xt(n),c=qe(u,{tabbable:i,accept:a},n);c.currentNode=Le(s,n)?s:l;let p=c.previousNode();return!p&&o&&(c.currentNode=l,p=c.previousNode()),p&&rt(p,!0),p},focusFirst(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=xt(n),a=qe(o,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let s=a.nextNode();return s&&rt(s,!0),s},focusLast(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=xt(n),a=qe(o,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let s=a.previousNode();return s&&rt(s,!0),s}}}const ga=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],Hp=ga.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ga.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Bp=ga.join(':not([hidden]):not([tabindex="-1"]),');function xt(t){return t[0].parentElement}function An(t){let e=ue.getTreeNode(ae);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function Wp(t,e){let n=d.useRef(void 0),r=d.useRef(void 0);Pe(()=>{let i=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const o=me(i?i[0]:void 0);let a=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!An(t)||u.isComposing)return;let c=o.activeElement,p=t.current;if(!p||!Le(c,p))return;let g=xt(p),h=qe(g,{tabbable:!0},p);if(!c)return;h.currentNode=c;let y=u.shiftKey?h.previousNode():h.nextNode();y||(h.currentNode=u.shiftKey?p[p.length-1].nextElementSibling:p[0].previousElementSibling,y=u.shiftKey?h.previousNode():h.nextNode()),u.preventDefault(),y&&rt(y,!0)},s=u=>{(!ae||qr(ae,t))&&Le(u.target,t.current)?(ae=t,n.current=u.target):An(t)&&!gt(u.target,t)?n.current?n.current.focus():ae&&ae.current&&_o(ae.current):An(t)&&(n.current=u.target)},l=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let c=Bu();if(!((c==="virtual"||c===null)&&Mu()&&Ep())&&o.activeElement&&An(t)&&!gt(o.activeElement,t))if(ae=t,o.body.contains(u.target)){var g;n.current=u.target,(g=n.current)===null||g===void 0||g.focus()}else ae.current&&_o(ae.current)})};return o.addEventListener("keydown",a,!1),o.addEventListener("focusin",s,!1),i==null||i.forEach(u=>u.addEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.addEventListener("focusout",l,!1)),()=>{o.removeEventListener("keydown",a,!1),o.removeEventListener("focusin",s,!1),i==null||i.forEach(u=>u.removeEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.removeEventListener("focusout",l,!1))}},[t,e]),Pe(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function Vu(t){return gt(t)}function Le(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function gt(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of ue.traverse(ue.getTreeNode(e)))if(n&&Le(t,n.current))return!0;return!1}function Up(t){return gt(t,ae)}function qr(t,e){var n;let r=(n=ue.getTreeNode(e))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===t)return!0;r=r.parent}return!1}function rt(t,e=!1){if(t!=null&&!e)try{Gr(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function Gu(t,e=!0){let n=t[0].previousElementSibling,r=xt(t),i=qe(r,{tabbable:e},t);i.currentNode=n;let o=i.nextNode();return e&&!o&&(r=xt(t),i=qe(r,{tabbable:!1},t),i.currentNode=n,o=i.nextNode()),o}function _o(t,e=!0){rt(Gu(t,e))}function Vp(t,e){const n=d.useRef(e);d.useEffect(()=>{if(n.current){ae=t;const r=me(t.current?t.current[0]:void 0);!Le(r.activeElement,ae.current)&&t.current&&_o(t.current)}n.current=!1},[t])}function Gp(t,e,n){Pe(()=>{if(e||n)return;let r=t.current;const i=me(r?r[0]:void 0);let o=a=>{let s=a.target;Le(s,t.current)?ae=t:Vu(s)||(ae=null)};return i.addEventListener("focusin",o,!1),r==null||r.forEach(a=>a.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),r==null||r.forEach(a=>a.removeEventListener("focusin",o,!1))}},[t,e,n])}function as(t){let e=ue.getTreeNode(ae);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function qp(t,e,n){const r=d.useRef(typeof document<"u"?me(t.current?t.current[0]:void 0).activeElement:null);Pe(()=>{let i=t.current;const o=me(i?i[0]:void 0);if(!e||n)return;let a=()=>{(!ae||qr(ae,t))&&Le(o.activeElement,t.current)&&(ae=t)};return o.addEventListener("focusin",a,!1),i==null||i.forEach(s=>s.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),i==null||i.forEach(s=>s.removeEventListener("focusin",a,!1))}},[t,n]),Pe(()=>{const i=me(t.current?t.current[0]:void 0);if(!e)return;let o=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!An(t)||a.isComposing)return;let s=i.activeElement;if(!gt(s,t)||!as(t))return;let l=ue.getTreeNode(t);if(!l)return;let u=l.nodeToRestore,c=qe(i.body,{tabbable:!0});c.currentNode=s;let p=a.shiftKey?c.previousNode():c.nextNode();if((!u||!i.body.contains(u)||u===i.body)&&(u=void 0,l.nodeToRestore=void 0),(!p||!gt(p,t))&&u){c.currentNode=u;do p=a.shiftKey?c.previousNode():c.nextNode();while(gt(p,t));a.preventDefault(),a.stopPropagation(),p?rt(p,!0):Vu(u)?rt(u,!0):s.blur()}};return n||i.addEventListener("keydown",o,!0),()=>{n||i.removeEventListener("keydown",o,!0)}},[t,e,n]),Pe(()=>{const i=me(t.current?t.current[0]:void 0);if(!e)return;let o=ue.getTreeNode(t);if(o){var a;return o.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let s=ue.getTreeNode(t);if(!s)return;let l=s.nodeToRestore;if(e&&l&&(i.activeElement&&gt(i.activeElement,t)||i.activeElement===i.body&&as(t))){let u=ue.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let c=u.getTreeNode(t);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){ss(c.nodeToRestore);return}c=c.parent}for(c=u.getTreeNode(t);c;){if(c.scopeRef&&c.scopeRef.current&&ue.getTreeNode(c.scopeRef)){let p=Gu(c.scopeRef.current,!0);ss(p);return}c=c.parent}}})}}}},[t,e])}function ss(t){t.dispatchEvent(new CustomEvent(Io,{bubbles:!0,cancelable:!0}))&&rt(t)}function qe(t,e,n){let r=e!=null&&e.tabbable?Bp:Hp,i=me(t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var a;return!(e==null||(a=e.from)===null||a===void 0)&&a.contains(o)?NodeFilter.FILTER_REJECT:o.matches(r)&&Wu(o)&&(!n||Le(o,n))&&(!(e!=null&&e.accept)||e.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(i.currentNode=e.from),i}class va{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let i=this.fastMap.get(n??null);if(!i)return;let o=new ko({scopeRef:e});i.addChild(o),o.parent=i,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Le(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var e;let n=new va;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(e=i.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new ko({scopeRef:null}),this.fastMap.set(null,this.root)}}class ko{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let ue=new va;function fi(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=d.useRef({isFocused:!1,isFocusVisible:e||Hu()}),[o,a]=d.useState(!1),[s,l]=d.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=d.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),c=d.useCallback(h=>{i.current.isFocused=h,a(h),u()},[u]);Kp(h=>{i.current.isFocusVisible=h,u()},[],{isTextInput:n});let{focusProps:p}=_p({isDisabled:r,onFocusChange:c}),{focusWithinProps:g}=Lp({isDisabled:!r,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:s,focusProps:r?g:p}}function Yp(t,e){let n=e==null?void 0:e.isDisabled,[r,i]=d.useState(!1);return Pe(()=>{if(t!=null&&t.current&&!n){let o=()=>{if(t.current){let s=qe(t.current,{tabbable:!0});i(!!s.nextNode())}};o();let a=new MutationObserver(o);return a.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{a.disconnect()}}}),n?!1:r}let ln="default",No="",_r=new WeakMap;function ls(t){if(ci()){if(ln==="default"){const e=Ke(t);No=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}ln="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(_r.set(t,t.style.userSelect),t.style.userSelect="none")}function pr(t){if(ci()){if(ln!=="disabled")return;ln="restoring",setTimeout(()=>{Hh(()=>{if(ln==="restoring"){const e=Ke(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=No||""),No="",ln="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&_r.has(t)){let e=_r.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),_r.delete(t)}}const ma=d.createContext({register:()=>{}});ma.displayName="PressResponderContext";function Xp(t){let e=d.useContext(ma);if(e){let{register:n,...r}=e;t=ye(r,t),n()}return Wh(e,t.ref),t}var gr=new WeakMap;class vr{continuePropagation(){is(this,gr,!1)}get shouldStopPropagation(){return Tp(this,gr)}constructor(e,n,r,i){Pp(this,gr,{writable:!0,value:void 0}),is(this,gr,!0);var o;let a=(o=i==null?void 0:i.target)!==null&&o!==void 0?o:r.currentTarget;const s=a==null?void 0:a.getBoundingClientRect();let l,u=0,c,p=null;r.clientX!=null&&r.clientY!=null&&(c=r.clientX,p=r.clientY),s&&(c!=null&&p!=null?(l=c-s.left,u=p-s.top):(l=s.width/2,u=s.height/2)),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=l,this.y=u}}const us=Symbol("linkClicked");function ya(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,isDisabled:a,isPressed:s,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:p,...g}=Xp(t),[h,y]=d.useState(!1),f=d.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:v,removeAllGlobalListeners:m}=xu(),S=De((b,k)=>{let B=f.current;if(a||B.didFirePressStart)return!1;let N=!0;if(B.isTriggeringEvent=!0,r){let H=new vr("pressstart",k,b);r(H),N=H.shouldStopPropagation}return n&&n(!0),B.isTriggeringEvent=!1,B.didFirePressStart=!0,y(!0),N}),w=De((b,k,B=!0)=>{let N=f.current;if(!N.didFirePressStart)return!1;N.ignoreClickAfterPress=!0,N.didFirePressStart=!1,N.isTriggeringEvent=!0;let H=!0;if(i){let E=new vr("pressend",k,b);i(E),H=E.shouldStopPropagation}if(n&&n(!1),y(!1),e&&B&&!a){let E=new vr("press",k,b);e(E),H&&(H=E.shouldStopPropagation)}return N.isTriggeringEvent=!1,H}),O=De((b,k)=>{let B=f.current;if(a)return!1;if(o){B.isTriggeringEvent=!0;let N=new vr("pressup",k,b);return o(N),B.isTriggeringEvent=!1,N.shouldStopPropagation}return!0}),x=De(b=>{let k=f.current;k.isPressed&&k.target&&(k.isOverTarget&&k.pointerType!=null&&w(Qe(k.target,b),k.pointerType,!1),k.isPressed=!1,k.isOverTarget=!1,k.activePointerId=null,k.pointerType=null,m(),c||pr(k.target))}),D=De(b=>{u&&x(b)}),P=d.useMemo(()=>{let b=f.current,k={onKeyDown(N){if(Mi(N.nativeEvent,N.currentTarget)&&N.currentTarget.contains(N.target)){var H;ds(N.target,N.key)&&N.preventDefault();let E=!0;if(!b.isPressed&&!N.repeat){b.target=N.currentTarget,b.isPressed=!0,E=S(N,"keyboard");let I=N.currentTarget,z=M=>{Mi(M,I)&&!M.repeat&&I.contains(M.target)&&b.target&&O(Qe(b.target,M),"keyboard")};v(Ke(N.currentTarget),"keyup",Vn(z,B),!0)}E&&N.stopPropagation(),N.metaKey&&Ot()&&((H=b.metaKeyEvents)===null||H===void 0||H.set(N.key,N.nativeEvent))}else N.key==="Meta"&&(b.metaKeyEvents=new Map)},onClick(N){if(!(N&&!N.currentTarget.contains(N.target))&&N&&N.button===0&&!b.isTriggeringEvent&&!It.isOpening){let H=!0;if(a&&N.preventDefault(),!b.ignoreClickAfterPress&&!b.ignoreEmulatedMouseEvents&&!b.isPressed&&(b.pointerType==="virtual"||$o(N.nativeEvent))){!a&&!l&&$t(N.currentTarget);let E=S(N,"virtual"),I=O(N,"virtual"),z=w(N,"virtual");H=E&&I&&z}b.ignoreEmulatedMouseEvents=!1,b.ignoreClickAfterPress=!1,H&&N.stopPropagation()}}},B=N=>{var H;if(b.isPressed&&b.target&&Mi(N,b.target)){var E;ds(N.target,N.key)&&N.preventDefault();let z=N.target;w(Qe(b.target,N),"keyboard",b.target.contains(z)),m(),N.key!=="Enter"&&ba(b.target)&&b.target.contains(z)&&!N[us]&&(N[us]=!0,It(b.target,N,!1)),b.isPressed=!1,(E=b.metaKeyEvents)===null||E===void 0||E.delete(N.key)}else if(N.key==="Meta"&&(!((H=b.metaKeyEvents)===null||H===void 0)&&H.size)){var I;let z=b.metaKeyEvents;b.metaKeyEvents=void 0;for(let M of z.values())(I=b.target)===null||I===void 0||I.dispatchEvent(new KeyboardEvent("keyup",M))}};if(typeof PointerEvent<"u"){k.onPointerDown=I=>{if(I.button!==0||!I.currentTarget.contains(I.target))return;if(qh(I.nativeEvent)){b.pointerType="virtual";return}Ki(I.currentTarget)&&I.preventDefault(),b.pointerType=I.pointerType;let z=!0;if(!b.isPressed){b.isPressed=!0,b.isOverTarget=!0,b.activePointerId=I.pointerId,b.target=I.currentTarget,!a&&!l&&$t(I.currentTarget),c||ls(b.target),z=S(I,b.pointerType);let M=I.target;"releasePointerCapture"in M&&M.releasePointerCapture(I.pointerId),v(Ke(I.currentTarget),"pointerup",N,!1),v(Ke(I.currentTarget),"pointercancel",E,!1)}z&&I.stopPropagation()},k.onMouseDown=I=>{I.currentTarget.contains(I.target)&&I.button===0&&(Ki(I.currentTarget)&&I.preventDefault(),I.stopPropagation())},k.onPointerUp=I=>{!I.currentTarget.contains(I.target)||b.pointerType==="virtual"||I.button===0&&O(I,b.pointerType||I.pointerType)},k.onPointerEnter=I=>{I.pointerId===b.activePointerId&&b.target&&!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,S(Qe(b.target,I),b.pointerType))},k.onPointerLeave=I=>{I.pointerId===b.activePointerId&&b.target&&b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,w(Qe(b.target,I),b.pointerType,!1),D(I))};let N=I=>{I.pointerId===b.activePointerId&&b.isPressed&&I.button===0&&b.target&&(b.target.contains(I.target)&&b.pointerType!=null?w(Qe(b.target,I),b.pointerType):b.isOverTarget&&b.pointerType!=null&&w(Qe(b.target,I),b.pointerType,!1),b.isPressed=!1,b.isOverTarget=!1,b.activePointerId=null,b.pointerType=null,m(),c||pr(b.target),"ontouchend"in b.target&&I.pointerType!=="mouse"&&v(b.target,"touchend",H,{once:!0}))},H=I=>{qu(I.currentTarget)&&I.preventDefault()},E=I=>{x(I)};k.onDragStart=I=>{I.currentTarget.contains(I.target)&&x(I)}}else{k.onMouseDown=E=>{if(E.button!==0||!E.currentTarget.contains(E.target))return;if(Ki(E.currentTarget)&&E.preventDefault(),b.ignoreEmulatedMouseEvents){E.stopPropagation();return}b.isPressed=!0,b.isOverTarget=!0,b.target=E.currentTarget,b.pointerType=$o(E.nativeEvent)?"virtual":"mouse",!a&&!l&&$t(E.currentTarget),S(E,b.pointerType)&&E.stopPropagation(),v(Ke(E.currentTarget),"mouseup",N,!1)},k.onMouseEnter=E=>{if(!E.currentTarget.contains(E.target))return;let I=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!0,I=S(E,b.pointerType)),I&&E.stopPropagation()},k.onMouseLeave=E=>{if(!E.currentTarget.contains(E.target))return;let I=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!1,I=w(E,b.pointerType,!1),D(E)),I&&E.stopPropagation()},k.onMouseUp=E=>{E.currentTarget.contains(E.target)&&!b.ignoreEmulatedMouseEvents&&E.button===0&&O(E,b.pointerType||"mouse")};let N=E=>{if(E.button===0){if(b.isPressed=!1,m(),b.ignoreEmulatedMouseEvents){b.ignoreEmulatedMouseEvents=!1;return}b.target&&Ai(E,b.target)&&b.pointerType!=null?w(Qe(b.target,E),b.pointerType):b.target&&b.isOverTarget&&b.pointerType!=null&&w(Qe(b.target,E),b.pointerType,!1),b.isOverTarget=!1}};k.onTouchStart=E=>{if(!E.currentTarget.contains(E.target))return;let I=Jp(E.nativeEvent);if(!I)return;b.activePointerId=I.identifier,b.ignoreEmulatedMouseEvents=!0,b.isOverTarget=!0,b.isPressed=!0,b.target=E.currentTarget,b.pointerType="touch",!a&&!l&&$t(E.currentTarget),c||ls(b.target),S(lt(b.target,E),b.pointerType)&&E.stopPropagation(),v(mn(E.currentTarget),"scroll",H,!0)},k.onTouchMove=E=>{if(!E.currentTarget.contains(E.target))return;if(!b.isPressed){E.stopPropagation();return}let I=cs(E.nativeEvent,b.activePointerId),z=!0;I&&Ai(I,E.currentTarget)?!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,z=S(lt(b.target,E),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,z=w(lt(b.target,E),b.pointerType,!1),D(lt(b.target,E))),z&&E.stopPropagation()},k.onTouchEnd=E=>{if(!E.currentTarget.contains(E.target))return;if(!b.isPressed){E.stopPropagation();return}let I=cs(E.nativeEvent,b.activePointerId),z=!0;I&&Ai(I,E.currentTarget)&&b.pointerType!=null?(O(lt(b.target,E),b.pointerType),z=w(lt(b.target,E),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(z=w(lt(b.target,E),b.pointerType,!1)),z&&E.stopPropagation(),b.isPressed=!1,b.activePointerId=null,b.isOverTarget=!1,b.ignoreEmulatedMouseEvents=!0,b.target&&!c&&pr(b.target),m()},k.onTouchCancel=E=>{E.currentTarget.contains(E.target)&&(E.stopPropagation(),b.isPressed&&x(lt(b.target,E)))};let H=E=>{b.isPressed&&E.target.contains(b.target)&&x({currentTarget:b.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};k.onDragStart=E=>{E.currentTarget.contains(E.target)&&x(E)}}return k},[v,a,l,m,c,x,D,w,S,O]);return d.useEffect(()=>()=>{var b;c||pr((b=f.current.target)!==null&&b!==void 0?b:void 0)},[c]),{isPressed:s||h,pressProps:ye(g,P)}}function ba(t){return t.tagName==="A"&&t.hasAttribute("href")}function Mi(t,e){const{key:n,code:r}=t,i=e,o=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof mn(i).HTMLInputElement&&!Yu(i,n)||i instanceof mn(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&ba(i))&&n!=="Enter")}function Jp(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function cs(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===e)return i}return null}function lt(t,e){let n=0,r=0;return e.targetTouches&&e.targetTouches.length===1&&(n=e.targetTouches[0].clientX,r=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function Qe(t,e){let n=e.clientX,r=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function Qp(t){let e=0,n=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?n=t.height/2:t.radiusY!==void 0&&(n=t.radiusY),{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}function Zp(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Ai(t,e){let n=e.getBoundingClientRect(),r=Qp(t);return Zp(n,r)}function Ki(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function qu(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!ba(t)}function ds(t,e){return t instanceof HTMLInputElement?!Yu(t,e):qu(t)}const eg=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Yu(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":eg.has(t.type)}function tg({children:t}){let e=d.useMemo(()=>({register:()=>{}}),[]);return d.createElement(ma.Provider,{value:e},t)}class ng{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}}function Xu(t){let e=d.useRef({isFocused:!1,observer:null});pe(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=De(r=>{t==null||t(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,o=a=>{e.current.isFocused=!1,i.disabled&&n(new ng("blur",a)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var a;(a=e.current.observer)===null||a===void 0||a.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function rg(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=d.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),a=Xu(o),s=d.useCallback(l=>{const u=Ke(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),a(l))},[i,n,a]);return{focusProps:{onFocus:!e&&(n||i||r)?s:void 0,onBlur:!e&&(r||i)?o:void 0}}}let Cn=null,ig=new Set,Bn=new Map,kt=!1,Ro=!1;function Sa(t,e){for(let n of ig)n(t,e)}function og(t){return!(t.metaKey||!Ot()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Yr(t){kt=!0,og(t)&&(Cn="keyboard",Sa("keyboard",t))}function Re(t){Cn="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(kt=!0,Sa("pointer",t))}function Ju(t){$o(t)&&(kt=!0,Cn="virtual")}function Qu(t){t.target===window||t.target===document||(!kt&&!Ro&&(Cn="virtual",Sa("virtual",t)),kt=!1,Ro=!1)}function Zu(){kt=!1,Ro=!0}function fs(t){if(typeof window>"u"||Bn.get(mn(t)))return;const e=mn(t),n=Ke(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){kt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Yr,!0),n.addEventListener("keyup",Yr,!0),n.addEventListener("click",Ju,!0),e.addEventListener("focus",Qu,!0),e.addEventListener("blur",Zu,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Re,!0),n.addEventListener("pointermove",Re,!0),n.addEventListener("pointerup",Re,!0)):(n.addEventListener("mousedown",Re,!0),n.addEventListener("mousemove",Re,!0),n.addEventListener("mouseup",Re,!0)),e.addEventListener("beforeunload",()=>{ec(t)},{once:!0}),Bn.set(e,{focus:r})}const ec=(t,e)=>{const n=mn(t),r=Ke(t);e&&r.removeEventListener("DOMContentLoaded",e),Bn.has(n)&&(n.HTMLElement.prototype.focus=Bn.get(n).focus,r.removeEventListener("keydown",Yr,!0),r.removeEventListener("keyup",Yr,!0),r.removeEventListener("click",Ju,!0),n.removeEventListener("focus",Qu,!0),n.removeEventListener("blur",Zu,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Re,!0),r.removeEventListener("pointermove",Re,!0),r.removeEventListener("pointerup",Re,!0)):(r.removeEventListener("mousedown",Re,!0),r.removeEventListener("mousemove",Re,!0),r.removeEventListener("mouseup",Re,!0)),Bn.delete(n))};function ag(t){const e=Ke(t);let n;return e.readyState!=="loading"?fs(t):(n=()=>{fs(t)},e.addEventListener("DOMContentLoaded",n)),()=>ec(t,n)}typeof document<"u"&&ag();function sg(){return Cn!=="pointer"}function hs(){return Cn}function tc(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=d.useRef({isFocusWithin:!1}),a=d.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),s=Xu(a),l=d.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,s(u))},[r,i,s]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}let Xr=!1,Li=0;function Mo(){Xr=!0,setTimeout(()=>{Xr=!1},50)}function ps(t){t.pointerType==="touch"&&Mo()}function lg(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",ps):document.addEventListener("touchend",Mo),Li++,()=>{Li--,!(Li>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",ps):document.removeEventListener("touchend",Mo))}}function wa(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:i}=t,[o,a]=d.useState(!1),s=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(lg,[]);let{hoverProps:l,triggerHoverEnd:u}=d.useMemo(()=>{let c=(h,y)=>{if(s.pointerType=y,i||y==="touch"||s.isHovered||!h.currentTarget.contains(h.target))return;s.isHovered=!0;let f=h.currentTarget;s.target=f,e&&e({type:"hoverstart",target:f,pointerType:y}),n&&n(!0),a(!0)},p=(h,y)=>{if(s.pointerType="",s.target=null,y==="touch"||!s.isHovered)return;s.isHovered=!1;let f=h.currentTarget;r&&r({type:"hoverend",target:f,pointerType:y}),n&&n(!1),a(!1)},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=h=>{Xr&&h.pointerType==="mouse"||c(h,h.pointerType)},g.onPointerLeave=h=>{!i&&h.currentTarget.contains(h.target)&&p(h,h.pointerType)}):(g.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=h=>{!s.ignoreEmulatedMouseEvents&&!Xr&&c(h,"mouse"),s.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=h=>{!i&&h.currentTarget.contains(h.target)&&p(h,"mouse")}),{hoverProps:g,triggerHoverEnd:p}},[e,n,r,i,s]);return d.useEffect(()=>{i&&u({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:l,isHovered:o}}function ug(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=t,o=d.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=De(l=>{n&&mr(l,e)&&(i&&i(l),o.current.isPointerDown=!0)}),s=De(l=>{n&&n(l)});d.useEffect(()=>{let l=o.current;if(r)return;const u=e.current,c=Ke(u);if(typeof PointerEvent<"u"){let p=g=>{l.isPointerDown&&mr(g,e)&&s(g),l.isPointerDown=!1};return c.addEventListener("pointerdown",a,!0),c.addEventListener("pointerup",p,!0),()=>{c.removeEventListener("pointerdown",a,!0),c.removeEventListener("pointerup",p,!0)}}else{let p=h=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&mr(h,e)&&s(h),l.isPointerDown=!1},g=h=>{l.ignoreEmulatedMouseEvents=!0,l.isPointerDown&&mr(h,e)&&s(h),l.isPointerDown=!1};return c.addEventListener("mousedown",a,!0),c.addEventListener("mouseup",p,!0),c.addEventListener("touchstart",a,!0),c.addEventListener("touchend",g,!0),()=>{c.removeEventListener("mousedown",a,!0),c.removeEventListener("mouseup",p,!0),c.removeEventListener("touchstart",a,!0),c.removeEventListener("touchend",g,!0)}}},[e,r,a,s])}function mr(t,e){if(t.button>0)return!1;if(t.target){const n=t.target.ownerDocument;if(!n||!n.documentElement.contains(t.target)||t.target.closest("[data-react-aria-top-layer]"))return!1}return e.current&&!e.current.contains(t.target)}function gs(t){if(!t)return;let e=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){e?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):e=!0},continuePropagation(){e=!1},isPropagationStopped(){return e}};t(r),e&&n.stopPropagation()}}function cg(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:gs(t.onKeyDown),onKeyUp:gs(t.onKeyUp)}}}const dg=500;function fg(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:o=dg,accessibilityDescription:a}=t;const s=d.useRef(void 0);let{addGlobalListener:l,removeGlobalListener:u}=xu(),{pressProps:c}=ya({isDisabled:e,onPressStart(g){if(g.continuePropagation(),(g.pointerType==="mouse"||g.pointerType==="touch")&&(n&&n({...g,type:"longpressstart"}),s.current=setTimeout(()=>{g.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...g,type:"longpress"}),s.current=void 0},o),g.pointerType==="touch")){let h=y=>{y.preventDefault()};l(g.target,"contextmenu",h,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{u(g.target,"contextmenu",h)},30)},{once:!0})}},onPressEnd(g){s.current&&clearTimeout(s.current),r&&(g.pointerType==="mouse"||g.pointerType==="touch")&&r({...g,type:"longpressend"})}}),p=Gh(i&&!e?a:void 0);return{longPressProps:ye(c,p)}}const hg=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),pg=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gg(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return hg.has(n.script)}let e=t.split("-")[0];return pg.has(e)}const vg=Symbol.for("react-aria.i18n.locale");function nc(){let t=typeof window<"u"&&window[vg]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:gg(t)?"rtl":"ltr"}}let Ao=nc(),Kn=new Set;function vs(){Ao=nc();for(let t of Kn)t(Ao)}function mg(){let t=En(),[e,n]=d.useState(Ao);return d.useEffect(()=>(Kn.size===0&&window.addEventListener("languagechange",vs),Kn.add(n),()=>{Kn.delete(n),Kn.size===0&&window.removeEventListener("languagechange",vs)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const yg=d.createContext(null);function or(){let t=mg();return d.useContext(yg)||t}var Ge=function(){return Ge=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ge.apply(this,arguments)};function rc(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function bg(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}const Sg=Symbol.for("react-aria.i18n.locale"),wg=Symbol.for("react-aria.i18n.strings");let Wt;class hi{getStringForLocale(e,n){let i=this.getStringsForLocale(n)[e];if(!i)throw new Error(`Could not find intl message ${e} in ${n} locale`);return i}getStringsForLocale(e){let n=this.strings[e];return n||(n=Eg(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[Sg];if(Wt===void 0){let i=window[wg];if(!i)return null;Wt={};for(let o in i)Wt[o]=new hi({[n]:i[o]},n)}let r=Wt==null?void 0:Wt[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=n}}function Eg(t,e,n="en-US"){if(e[t])return e[t];let r=$g(t);if(e[r])return e[r];for(let i in e)if(i.startsWith(r+"-"))return e[i];return e[n]}function $g(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const ms=new Map,ys=new Map;class xg{format(e,n){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(n,this):r}plural(e,n,r="cardinal"){let i=n["="+e];if(i)return typeof i=="function"?i():i;let o=this.locale+":"+r,a=ms.get(o);a||(a=new Intl.PluralRules(this.locale,{type:r}),ms.set(o,a));let s=a.select(e);return i=n[s]||n.other,typeof i=="function"?i():i}number(e){let n=ys.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),ys.set(this.locale,n)),n.format(e)}select(e,n){let r=e[n]||e.other;return typeof r=="function"?r():r}constructor(e,n){this.locale=e,this.strings=n}}const bs=new WeakMap;function Cg(t){let e=bs.get(t);return e||(e=new hi(t),bs.set(t,e)),e}function Tg(t,e){return e&&hi.getGlobalDictionaryForPackage(e)||Cg(t)}function Dg(t,e){let{locale:n}=or(),r=Tg(t,e);return d.useMemo(()=>new xg(n,r),[n,r])}let Fi=new Map;function Pg(t){let{locale:e}=or(),n=e+(t?Object.entries(t).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(Fi.has(n))return Fi.get(n);let r=new Intl.Collator(e,t);return Fi.set(n,r),r}const Ss={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function Og(t={}){let{style:e,isFocusable:n}=t,[r,i]=d.useState(!1),{focusWithinProps:o}=tc({isDisabled:!n,onFocusWithinChange:s=>i(s)}),a=d.useMemo(()=>r?e:e?{...Ss,...e}:Ss,[r]);return{visuallyHiddenProps:{...o,style:a}}}function Ig(t){let{children:e,elementType:n="div",isFocusable:r,style:i,...o}=t,{visuallyHiddenProps:a}=Og(t);return d.createElement(n,ye(o,a),e)}const Ye={top:"top",bottom:"top",left:"left",right:"left"},Jr={top:"bottom",bottom:"top",left:"right",right:"left"},_g={top:"left",left:"top"},Ko={top:"height",left:"width"},ic={width:"totalWidth",height:"totalHeight"},yr={};let fe=typeof document<"u"?window.visualViewport:null;function ws(t){let e=0,n=0,r=0,i=0,o=0,a=0,s={};var l;let u=((l=fe==null?void 0:fe.scale)!==null&&l!==void 0?l:1)>1;if(t.tagName==="BODY"){let y=document.documentElement;r=y.clientWidth,i=y.clientHeight;var c;e=(c=fe==null?void 0:fe.width)!==null&&c!==void 0?c:r;var p;n=(p=fe==null?void 0:fe.height)!==null&&p!==void 0?p:i,s.top=y.scrollTop||t.scrollTop,s.left=y.scrollLeft||t.scrollLeft,fe&&(o=fe.offsetTop,a=fe.offsetLeft)}else({width:e,height:n,top:o,left:a}=fn(t)),s.top=t.scrollTop,s.left=t.scrollLeft,r=e,i=n;if(wu()&&(t.tagName==="BODY"||t.tagName==="HTML")&&u){s.top=0,s.left=0;var g;o=(g=fe==null?void 0:fe.pageTop)!==null&&g!==void 0?g:0;var h;a=(h=fe==null?void 0:fe.pageLeft)!==null&&h!==void 0?h:0}return{width:e,height:n,totalWidth:r,totalHeight:i,scroll:s,top:o,left:a}}function kg(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Es(t,e,n,r,i,o,a){var s;let l=(s=i.scroll[t])!==null&&s!==void 0?s:0,u=r[Ko[t]],c=r.scroll[Ye[t]]+o,p=u+r.scroll[Ye[t]]-o,g=e-l+a[t]-r[Ye[t]],h=e-l+n+a[t]-r[Ye[t]];return g<c?c-g:h>p?Math.max(p-h,c-g):0}function Ng(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function $s(t){if(yr[t])return yr[t];let[e,n]=t.split(" "),r=Ye[e]||"right",i=_g[r];Ye[n]||(n="center");let o=Ko[r],a=Ko[i];return yr[t]={placement:e,crossPlacement:n,axis:r,crossAxis:i,size:o,crossSize:a},yr[t]}function ji(t,e,n,r,i,o,a,s,l,u){let{placement:c,crossPlacement:p,axis:g,crossAxis:h,size:y,crossSize:f}=r,v={};var m;v[h]=(m=t[h])!==null&&m!==void 0?m:0;var S,w,O,x;p==="center"?v[h]+=(((S=t[f])!==null&&S!==void 0?S:0)-((w=n[f])!==null&&w!==void 0?w:0))/2:p!==h&&(v[h]+=((O=t[f])!==null&&O!==void 0?O:0)-((x=n[f])!==null&&x!==void 0?x:0)),v[h]+=o;const D=t[h]-n[f]+l+u,P=t[h]+t[f]-l-u;if(v[h]=xo(v[h],D,P),c===g){const b=s?a[y]:e[ic[y]];v[Jr[g]]=Math.floor(b-t[g]+i)}else v[g]=Math.floor(t[g]+t[y]+i);return v}function Rg(t,e,n,r,i,o,a,s){const l=r?n.height:e[ic.height];var u;let c=t.top!=null?n.top+t.top:n.top+(l-((u=t.bottom)!==null&&u!==void 0?u:0)-a);var p,g,h,y,f,v;let m=s!=="top"?Math.max(0,e.height+e.top+((p=e.scroll.top)!==null&&p!==void 0?p:0)-c-(((g=i.top)!==null&&g!==void 0?g:0)+((h=i.bottom)!==null&&h!==void 0?h:0)+o)):Math.max(0,c+a-(e.top+((y=e.scroll.top)!==null&&y!==void 0?y:0))-(((f=i.top)!==null&&f!==void 0?f:0)+((v=i.bottom)!==null&&v!==void 0?v:0)+o));return Math.min(e.height-o*2,m)}function xs(t,e,n,r,i,o){let{placement:a,axis:s,size:l}=o;var u,c;if(a===s)return Math.max(0,n[s]-t[s]-((u=t.scroll[s])!==null&&u!==void 0?u:0)+e[s]-((c=r[s])!==null&&c!==void 0?c:0)-r[Jr[s]]-i);var p;return Math.max(0,t[l]+t[s]+t.scroll[s]-e[s]-n[s]-n[l]-((p=r[s])!==null&&p!==void 0?p:0)-r[Jr[s]]-i)}function Mg(t,e,n,r,i,o,a,s,l,u,c,p,g,h,y,f){let v=$s(t),{size:m,crossAxis:S,crossSize:w,placement:O,crossPlacement:x}=v,D=ji(e,s,n,v,c,p,u,g,y,f),P=c,b=xs(s,u,e,i,o+c,v);if(a&&r[m]>b){let F=$s(`${Jr[O]} ${x}`),K=ji(e,s,n,F,c,p,u,g,y,f);xs(s,u,e,i,o+c,F)>b&&(v=F,D=K,P=c)}let k="bottom";v.axis==="top"?v.placement==="top"?k="top":v.placement==="bottom"&&(k="bottom"):v.crossAxis==="top"&&(v.crossPlacement==="top"?k="bottom":v.crossPlacement==="bottom"&&(k="top"));let B=Es(S,D[S],n[w],s,l,o,u);D[S]+=B;let N=Rg(D,s,u,g,i,o,n.height,k);h&&h<N&&(N=h),n.height=Math.min(n.height,N),D=ji(e,s,n,v,P,p,u,g,y,f),B=Es(S,D[S],n[w],s,l,o,u),D[S]+=B;let H={},E=e[S]+.5*e[w]-D[S]-i[Ye[S]];const I=y/2+f;var z,M,j,_;const V=Ye[S]==="left"?((z=i.left)!==null&&z!==void 0?z:0)+((M=i.right)!==null&&M!==void 0?M:0):((j=i.top)!==null&&j!==void 0?j:0)+((_=i.bottom)!==null&&_!==void 0?_:0),J=n[w]-V-y/2-f,re=e[S]+y/2-(D[S]+i[Ye[S]]),A=e[S]+e[w]-y/2-(D[S]+i[Ye[S]]),R=xo(E,re,A);return H[S]=xo(R,I,J),{position:D,maxHeight:N,arrowOffsetLeft:H.left,arrowOffsetTop:H.top,placement:v.placement}}function Ag(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:i,padding:o,shouldFlip:a,boundaryElement:s,offset:l,crossOffset:u,maxHeight:c,arrowSize:p=0,arrowBoundaryOffset:g=0}=t,h=r instanceof HTMLElement?Kg(r):document.documentElement,y=h===document.documentElement;const f=window.getComputedStyle(h).position;let v=!!f&&f!=="static",m=y?fn(n):Cs(n,h);if(!y){let{marginTop:H,marginLeft:E}=window.getComputedStyle(n);m.top+=parseInt(H,10)||0,m.left+=parseInt(E,10)||0}let S=fn(r),w=Ng(r);var O,x;S.width+=((O=w.left)!==null&&O!==void 0?O:0)+((x=w.right)!==null&&x!==void 0?x:0);var D,P;S.height+=((D=w.top)!==null&&D!==void 0?D:0)+((P=w.bottom)!==null&&P!==void 0?P:0);let b=kg(i),k=ws(s),B=ws(h),N=s.tagName==="BODY"?fn(h):Cs(h,s);return h.tagName==="HTML"&&s.tagName==="BODY"&&(B.scroll.top=0,B.scroll.left=0),Mg(e,m,S,b,w,o,a,k,B,N,l,u,v,c,p,g)}function fn(t){let{top:e,left:n,width:r,height:i}=t.getBoundingClientRect(),{scrollTop:o,scrollLeft:a,clientTop:s,clientLeft:l}=document.documentElement;return{top:e+o-s,left:n+a-l,width:r,height:i}}function Cs(t,e){let n=window.getComputedStyle(t),r;if(n.position==="fixed"){let{top:i,left:o,width:a,height:s}=t.getBoundingClientRect();r={top:i,left:o,width:a,height:s}}else{r=fn(t);let i=fn(e),o=window.getComputedStyle(e);i.top+=(parseInt(o.borderTopWidth,10)||0)-e.scrollTop,i.left+=(parseInt(o.borderLeftWidth,10)||0)-e.scrollLeft,r.top-=i.top,r.left-=i.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function Kg(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Ts(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!Ts(e);)e=e.parentElement;return e||document.documentElement}function Ts(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const Lg=new WeakMap;function Fg(t){let{triggerRef:e,isOpen:n,onClose:r}=t;d.useEffect(()=>{if(!n||r===null)return;let i=o=>{let a=o.target;if(!e.current||a instanceof Node&&!a.contains(e.current)||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement)return;let s=r||Lg.get(e.current);s&&s()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,e])}let le=typeof document<"u"?window.visualViewport:null;function jg(t){let{direction:e}=or(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:o=i,placement:a="bottom",containerPadding:s=12,shouldFlip:l=!0,boundaryElement:u=typeof document<"u"?document.body:null,offset:c=0,crossOffset:p=0,shouldUpdatePosition:g=!0,isOpen:h=!0,onClose:y,maxHeight:f,arrowBoundaryOffset:v=0}=t,[m,S]=d.useState(null),w=[g,a,i.current,r.current,o.current,s,l,u,c,p,h,e,f,v,n],O=d.useRef(le==null?void 0:le.scale);d.useEffect(()=>{h&&(O.current=le==null?void 0:le.scale)},[h]);let x=d.useCallback(()=>{if(g===!1||!h||!i.current||!r.current||!u||(le==null?void 0:le.scale)!==O.current)return;let B=null;if(o.current&&o.current.contains(document.activeElement)){var N;let _=(N=document.activeElement)===null||N===void 0?void 0:N.getBoundingClientRect(),V=o.current.getBoundingClientRect();var H;if(B={type:"top",offset:((H=_==null?void 0:_.top)!==null&&H!==void 0?H:0)-V.top},B.offset>V.height/2){B.type="bottom";var E;B.offset=((E=_==null?void 0:_.bottom)!==null&&E!==void 0?E:0)-V.bottom}}let I=i.current;if(!f&&i.current){var z;I.style.top="0px",I.style.bottom="";var M;I.style.maxHeight=((M=(z=window.visualViewport)===null||z===void 0?void 0:z.height)!==null&&M!==void 0?M:window.innerHeight)+"px"}let j=Ag({placement:Hg(a,e),overlayNode:i.current,targetNode:r.current,scrollNode:o.current||i.current,padding:s,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:p,maxHeight:f,arrowSize:n,arrowBoundaryOffset:v});if(j.position){if(I.style.top="",I.style.bottom="",I.style.left="",I.style.right="",Object.keys(j.position).forEach(_=>I.style[_]=j.position[_]+"px"),I.style.maxHeight=j.maxHeight!=null?j.maxHeight+"px":"",B&&document.activeElement&&o.current){let _=document.activeElement.getBoundingClientRect(),V=o.current.getBoundingClientRect(),J=_[B.type]-V[B.type];o.current.scrollTop+=J-B.offset}S(j)}},w);pe(x,w),zg(x),qa({ref:i,onResize:x}),qa({ref:r,onResize:x});let D=d.useRef(!1);pe(()=>{let B,N=()=>{D.current=!0,clearTimeout(B),B=setTimeout(()=>{D.current=!1},500),x()},H=()=>{D.current&&N()};return le==null||le.addEventListener("resize",N),le==null||le.addEventListener("scroll",H),()=>{le==null||le.removeEventListener("resize",N),le==null||le.removeEventListener("scroll",H)}},[x]);let P=d.useCallback(()=>{D.current||y==null||y()},[y,D]);Fg({triggerRef:r,isOpen:h,onClose:y&&P});var b,k;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...m==null?void 0:m.position,maxHeight:(b=m==null?void 0:m.maxHeight)!==null&&b!==void 0?b:"100vh"}},placement:(k=m==null?void 0:m.placement)!==null&&k!==void 0?k:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:m==null?void 0:m.arrowOffsetLeft,top:m==null?void 0:m.arrowOffsetTop}},updatePosition:x}}function zg(t){pe(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function Hg(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const Ze=[];function Bg(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=t;d.useEffect(()=>(i&&Ze.push(e),()=>{let y=Ze.indexOf(e);y>=0&&Ze.splice(y,1)}),[i,e]);let l=()=>{Ze[Ze.length-1]===e&&n&&n()},u=y=>{(!s||s(y.target))&&Ze[Ze.length-1]===e&&(y.stopPropagation(),y.preventDefault())},c=y=>{(!s||s(y.target))&&(Ze[Ze.length-1]===e&&(y.stopPropagation(),y.preventDefault()),l())},p=y=>{y.key==="Escape"&&!a&&!y.nativeEvent.isComposing&&(y.stopPropagation(),y.preventDefault(),l())};ug({ref:e,onInteractOutside:o&&i?c:void 0,onInteractOutsideStart:u});let{focusWithinProps:g}=tc({isDisabled:!r,onBlurWithin:y=>{!y.relatedTarget||Up(y.relatedTarget)||(!s||s(y.relatedTarget))&&(n==null||n())}}),h=y=>{y.target===y.currentTarget&&y.preventDefault()};return{overlayProps:{onKeyDown:p,...g},underlayProps:{onPointerDown:h}}}const zi=typeof document<"u"&&window.visualViewport,Wg=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let br=0,Hi;function Ug(t={}){let{isDisabled:e}=t;pe(()=>{if(!e)return br++,br===1&&(ci()?Hi=Gg():Hi=Vg()),()=>{br--,br===0&&Hi()}},[e])}function Vg(){return Vn(un(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),un(document.documentElement,"overflow","hidden"))}function Gg(){let t,e,n=u=>{t=Cu(u.target,!0),!(t===document.documentElement&&t===document.body)&&t instanceof HTMLElement&&window.getComputedStyle(t).overscrollBehavior==="auto"&&(e=un(t,"overscrollBehavior","contain"))},r=u=>{if(!t||t===document.documentElement||t===document.body){u.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&u.preventDefault()},i=()=>{e&&e()},o=u=>{let c=u.target;qg(c)&&(s(),c.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{c.style.transform="",zi&&(zi.height<window.innerHeight?requestAnimationFrame(()=>{Ds(c)}):zi.addEventListener("resize",()=>Ds(c),{once:!0}))}))},a=null,s=()=>{if(a)return;let u=()=>{window.scrollTo(0,0)},c=window.pageXOffset,p=window.pageYOffset;a=Vn(In(window,"scroll",u),un(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),un(document.documentElement,"overflow","hidden"),un(document.body,"marginTop",`-${p}px`),()=>{window.scrollTo(c,p)}),window.scrollTo(0,0)},l=Vn(In(document,"touchstart",n,{passive:!1,capture:!0}),In(document,"touchmove",r,{passive:!1,capture:!0}),In(document,"touchend",i,{passive:!1,capture:!0}),In(document,"focus",o,!0));return()=>{e==null||e(),a==null||a(),l()}}function un(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function In(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function Ds(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=Cu(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,o=n.getBoundingClientRect().top;o>i+n.clientHeight&&(r.scrollTop+=o-i)}n=r.parentElement}}function qg(t){return t instanceof HTMLInputElement&&!Wg.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}var oc={};oc={dismiss:"تجاهل"};var ac={};ac={dismiss:"Отхвърляне"};var sc={};sc={dismiss:"Odstranit"};var lc={};lc={dismiss:"Luk"};var uc={};uc={dismiss:"Schließen"};var cc={};cc={dismiss:"Απόρριψη"};var dc={};dc={dismiss:"Dismiss"};var fc={};fc={dismiss:"Descartar"};var hc={};hc={dismiss:"Lõpeta"};var pc={};pc={dismiss:"Hylkää"};var gc={};gc={dismiss:"Rejeter"};var vc={};vc={dismiss:"התעלם"};var mc={};mc={dismiss:"Odbaci"};var yc={};yc={dismiss:"Elutasítás"};var bc={};bc={dismiss:"Ignora"};var Sc={};Sc={dismiss:"閉じる"};var wc={};wc={dismiss:"무시"};var Ec={};Ec={dismiss:"Atmesti"};var $c={};$c={dismiss:"Nerādīt"};var xc={};xc={dismiss:"Lukk"};var Cc={};Cc={dismiss:"Negeren"};var Tc={};Tc={dismiss:"Zignoruj"};var Dc={};Dc={dismiss:"Descartar"};var Pc={};Pc={dismiss:"Dispensar"};var Oc={};Oc={dismiss:"Revocare"};var Ic={};Ic={dismiss:"Пропустить"};var _c={};_c={dismiss:"Zrušiť"};var kc={};kc={dismiss:"Opusti"};var Nc={};Nc={dismiss:"Odbaci"};var Rc={};Rc={dismiss:"Avvisa"};var Mc={};Mc={dismiss:"Kapat"};var Ac={};Ac={dismiss:"Скасувати"};var Kc={};Kc={dismiss:"取消"};var Lc={};Lc={dismiss:"關閉"};var Fc={};Fc={"ar-AE":oc,"bg-BG":ac,"cs-CZ":sc,"da-DK":lc,"de-DE":uc,"el-GR":cc,"en-US":dc,"es-ES":fc,"et-EE":hc,"fi-FI":pc,"fr-FR":gc,"he-IL":vc,"hr-HR":mc,"hu-HU":yc,"it-IT":bc,"ja-JP":Sc,"ko-KR":wc,"lt-LT":Ec,"lv-LV":$c,"nb-NO":xc,"nl-NL":Cc,"pl-PL":Tc,"pt-BR":Dc,"pt-PT":Pc,"ro-RO":Oc,"ru-RU":Ic,"sk-SK":_c,"sl-SI":kc,"sr-SP":Nc,"sv-SE":Rc,"tr-TR":Mc,"uk-UA":Ac,"zh-CN":Kc,"zh-TW":Lc};function Yg(t){return t&&t.__esModule?t.default:t}function Ps(t){let{onDismiss:e,...n}=t,r=Dg(Yg(Fc),"@react-aria/overlays"),i=sa(n,r.format("dismiss")),o=()=>{e&&e()};return d.createElement(Ig,null,d.createElement("button",{...i,tabIndex:-1,onClick:o,style:{width:1,height:1}}))}let _n=new WeakMap,Ie=[];function Xg(t,e=document.body){let n=new Set(t),r=new Set,i=l=>{for(let g of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(g);let u=g=>{if(n.has(g)||g.parentElement&&r.has(g.parentElement)&&g.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let h of n)if(g.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),p=u(l);if(p===NodeFilter.FILTER_ACCEPT&&o(l),p!==NodeFilter.FILTER_REJECT){let g=c.nextNode();for(;g!=null;)o(g),g=c.nextNode()}},o=l=>{var u;let c=(u=_n.get(l))!==null&&u!==void 0?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),_n.set(l,c+1))};Ie.length&&Ie[Ie.length-1].disconnect(),i(e);let a=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(c=>c.contains(u.target))){for(let c of u.removedNodes)c instanceof Element&&(n.delete(c),r.delete(c));for(let c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?n.add(c):c instanceof Element&&i(c)}});a.observe(e,{childList:!0,subtree:!0});let s={observe(){a.observe(e,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return Ie.push(s),()=>{a.disconnect();for(let l of r){let u=_n.get(l);u!=null&&(u===1?(l.removeAttribute("aria-hidden"),_n.delete(l)):_n.set(l,u-1))}s===Ie[Ie.length-1]?(Ie.pop(),Ie.length&&Ie[Ie.length-1].observe()):Ie.splice(Ie.indexOf(s),1)}}function Jg(t,e){let{triggerRef:n,popoverRef:r,isNonModal:i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a,...s}=t,{overlayProps:l,underlayProps:u}=Bg({isOpen:e.isOpen&&!s["data-react-aria-top-layer"],onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a},r),{overlayProps:c,arrowProps:p,placement:g}=jg({...s,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:i?e.close:null});return Ug({isDisabled:i||!e.isOpen}),pe(()=>{if(e.isOpen&&!i&&r.current)return Xg([r.current])},[i,e.isOpen,r]),{popoverProps:ye(l,c),arrowProps:p,underlayProps:u,placement:g}}const Qg=d.createContext({});function Zg(){var t;return(t=d.useContext(Qg))!==null&&t!==void 0?t:{}}const ev=d.createContext(null);function tv(t){let e=En(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[i,o]=d.useState(!1),a=d.useMemo(()=>({contain:i,setContain:o}),[i,o]),{getContainer:s}=Zg();if(!t.portalContainer&&s&&(n=s()),!n)return null;let l=t.children;return t.disableFocusManagement||(l=d.createElement(Uu,{restoreFocus:!0,contain:i&&!r},l)),l=d.createElement(ev.Provider,{value:a},d.createElement(tg,null,l)),Ft.createPortal(l,n)}function Lo(t){return Ah()?t.altKey:t.ctrlKey}const nv=1e3;function rv(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=d.useRef({search:"",timeout:void 0}).current,o=a=>{let s=iv(a.key);if(!(!s||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))){if(s===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=s,e.getKeyForSearch!=null){let l=e.getKeyForSearch(i.search,n.focusedKey);l==null&&(l=e.getKeyForSearch(i.search)),l!=null&&(n.setFocusedKey(l),r&&r(l))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},nv)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?o:void 0}}}function iv(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function jc(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:a=!1,disallowSelectAll:s=!1,selectOnFocus:l=e.selectionBehavior==="replace",disallowTypeAhead:u=!1,shouldUseVirtualFocus:c,allowsTabNavigation:p=!1,isVirtualized:g,scrollRef:h=r,linkBehavior:y="action"}=t,{direction:f}=or(),v=di(),m=E=>{var I;if(E.altKey&&E.key==="Tab"&&E.preventDefault(),!(!((I=r.current)===null||I===void 0)&&I.contains(E.target)))return;const z=(L,Y)=>{if(L!=null){if(e.isLink(L)&&y==="selection"&&l&&!Lo(E)){var ee;Ft.flushSync(()=>{e.setFocusedKey(L,Y)});let de=(ee=h.current)===null||ee===void 0?void 0:ee.querySelector(`[data-key="${CSS.escape(L.toString())}"]`),ce=e.getItemProps(L);de&&v.open(de,E,ce.href,ce.routerOptions);return}if(e.setFocusedKey(L,Y),e.isLink(L)&&y==="override")return;E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(L):l&&!Lo(E)&&e.replaceSelection(L)}};switch(E.key){case"ArrowDown":if(n.getKeyBelow){var M,j,_;let L=e.focusedKey!=null?(M=n.getKeyBelow)===null||M===void 0?void 0:M.call(n,e.focusedKey):(j=n.getFirstKey)===null||j===void 0?void 0:j.call(n);L==null&&o&&(L=(_=n.getFirstKey)===null||_===void 0?void 0:_.call(n,e.focusedKey)),L!=null&&(E.preventDefault(),z(L))}break;case"ArrowUp":if(n.getKeyAbove){var V,J,re;let L=e.focusedKey!=null?(V=n.getKeyAbove)===null||V===void 0?void 0:V.call(n,e.focusedKey):(J=n.getLastKey)===null||J===void 0?void 0:J.call(n);L==null&&o&&(L=(re=n.getLastKey)===null||re===void 0?void 0:re.call(n,e.focusedKey)),L!=null&&(E.preventDefault(),z(L))}break;case"ArrowLeft":if(n.getKeyLeftOf){var A,R,F;let L=e.focusedKey!=null?(A=n.getKeyLeftOf)===null||A===void 0?void 0:A.call(n,e.focusedKey):null;L==null&&o&&(L=f==="rtl"?(R=n.getFirstKey)===null||R===void 0?void 0:R.call(n,e.focusedKey):(F=n.getLastKey)===null||F===void 0?void 0:F.call(n,e.focusedKey)),L!=null&&(E.preventDefault(),z(L,f==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var K,W,U;let L=e.focusedKey!=null?(K=n.getKeyRightOf)===null||K===void 0?void 0:K.call(n,e.focusedKey):null;L==null&&o&&(L=f==="rtl"?(W=n.getLastKey)===null||W===void 0?void 0:W.call(n,e.focusedKey):(U=n.getFirstKey)===null||U===void 0?void 0:U.call(n,e.focusedKey)),L!=null&&(E.preventDefault(),z(L,f==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&E.shiftKey)return;E.preventDefault();let L=n.getFirstKey(e.focusedKey,rn(E));e.setFocusedKey(L),L!=null&&(rn(E)&&E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(L):l&&e.replaceSelection(L))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&E.shiftKey)return;E.preventDefault();let L=n.getLastKey(e.focusedKey,rn(E));e.setFocusedKey(L),L!=null&&(rn(E)&&E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(L):l&&e.replaceSelection(L))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let L=n.getKeyPageBelow(e.focusedKey);L!=null&&(E.preventDefault(),z(L))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let L=n.getKeyPageAbove(e.focusedKey);L!=null&&(E.preventDefault(),z(L))}break;case"a":rn(E)&&e.selectionMode==="multiple"&&s!==!0&&(E.preventDefault(),e.selectAll());break;case"Escape":!a&&e.selectedKeys.size!==0&&(E.stopPropagation(),E.preventDefault(),e.clearSelection());break;case"Tab":if(!p){if(E.shiftKey)r.current.focus();else{let L=qe(r.current,{tabbable:!0}),Y,ee;do ee=L.lastChild(),ee&&(Y=ee);while(ee);Y&&!Y.contains(document.activeElement)&&$t(Y)}break}}},S=d.useRef({top:0,left:0});dr(h,"scroll",g?void 0:()=>{var E,I,z,M;S.current={top:(z=(E=h.current)===null||E===void 0?void 0:E.scrollTop)!==null&&z!==void 0?z:0,left:(M=(I=h.current)===null||I===void 0?void 0:I.scrollLeft)!==null&&M!==void 0?M:0}});let w=E=>{if(e.isFocused){E.currentTarget.contains(E.target)||e.setFocused(!1);return}if(E.currentTarget.contains(E.target)){if(e.setFocused(!0),e.focusedKey==null){var I,z;let _=J=>{J!=null&&(e.setFocusedKey(J),l&&e.replaceSelection(J))},V=E.relatedTarget;var M,j;V&&E.currentTarget.compareDocumentPosition(V)&Node.DOCUMENT_POSITION_FOLLOWING?_((M=e.lastSelectedKey)!==null&&M!==void 0?M:(I=n.getLastKey)===null||I===void 0?void 0:I.call(n)):_((j=e.firstSelectedKey)!==null&&j!==void 0?j:(z=n.getFirstKey)===null||z===void 0?void 0:z.call(n))}else!g&&h.current&&(h.current.scrollTop=S.current.top,h.current.scrollLeft=S.current.left);if(e.focusedKey!=null&&h.current){let _=h.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);_&&(_.contains(document.activeElement)||$t(_),hs()==="keyboard"&&Xa(_,{containingElement:r.current}))}}},O=E=>{E.currentTarget.contains(E.relatedTarget)||e.setFocused(!1)},x=d.useRef(!1);dr(r,Xh,c?E=>{let{detail:I}=E;E.stopPropagation(),e.setFocused(!0),(I==null?void 0:I.focusStrategy)==="first"&&(x.current=!0)}:void 0);let D=De(()=>{var E,I;let z=(I=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&I!==void 0?I:null;if(z==null){var M;(M=r.current)===null||M===void 0||M.dispatchEvent(new CustomEvent(Du,{cancelable:!0,bubbles:!0})),e.collection.size>0&&(x.current=!1)}else e.setFocusedKey(z),x.current=!1});Ga(()=>{x.current&&D()},[e.collection,D]);let P=De(()=>{e.collection.size>0&&(x.current=!1)});Ga(()=>{P()},[e.focusedKey,P]),dr(r,Yh,c?E=>{E.stopPropagation(),e.setFocused(!1),e.setFocusedKey(null)}:void 0);const b=d.useRef(i);d.useEffect(()=>{if(b.current){var E,I;let j=null;var z;i==="first"&&(j=(z=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&z!==void 0?z:null);var M;i==="last"&&(j=(M=(I=n.getLastKey)===null||I===void 0?void 0:I.call(n))!==null&&M!==void 0?M:null);let _=e.selectedKeys;if(_.size){for(let V of _)if(e.canSelectItem(V)){j=V;break}}e.setFocused(!0),e.setFocusedKey(j),j==null&&!c&&r.current&&Gr(r.current)}},[]);let k=d.useRef(e.focusedKey);d.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==k.current||b.current)&&h.current&&r.current){let E=hs(),I=r.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!I)return;(E==="keyboard"||b.current)&&(Tu(h.current,I),E!=="virtual"&&Xa(I,{containingElement:r.current}))}!c&&e.isFocused&&e.focusedKey==null&&k.current!=null&&r.current&&Gr(r.current),k.current=e.focusedKey,b.current=!1}),dr(r,"react-aria-focus-scope-restore",E=>{E.preventDefault(),e.setFocused(!0)});let B={onKeyDown:m,onFocus:w,onBlur:O,onMouseDown(E){h.current===E.target&&E.preventDefault()}},{typeSelectProps:N}=rv({keyboardDelegate:n,selectionManager:e});u||(B=ye(N,B));let H;return c?H=-1:H=e.focusedKey==null?0:-1,{collectionProps:{...B,tabIndex:H}}}function zc(t){let{id:e,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:o,shouldUseVirtualFocus:a,focus:s,isDisabled:l,onAction:u,allowsDifferentPressOrigin:c,linkBehavior:p="action"}=t,g=di();e=tr(e);let h=_=>{if(_.pointerType==="keyboard"&&Lo(_))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(p==="selection"&&i.current){let V=n.getItemProps(r);g.open(i.current,_,V.href,V.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(p==="override"||p==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):_&&_.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||_&&(rn(_)||_.pointerType==="touch"||_.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};d.useEffect(()=>{if(r===n.focusedKey&&n.isFocused)if(!a)s?s():document.activeElement!==i.current&&i.current&&Gr(i.current);else{var V;let J=new CustomEvent(Du,{cancelable:!0,bubbles:!0});(V=i.current)===null||V===void 0||V.dispatchEvent(J)}},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,a]),l=l||n.isDisabled(r);let y={};!a&&!l?y={tabIndex:r===n.focusedKey?0:-1,onFocus(_){_.target===i.current&&n.setFocusedKey(r)}}:l&&(y.onMouseDown=_=>{_.preventDefault()});let f=n.isLink(r)&&p==="override",v=n.isLink(r)&&p!=="selection"&&p!=="none",m=!l&&n.canSelectItem(r)&&!f,S=(u||v)&&!l,w=S&&(n.selectionBehavior==="replace"?!m:!m||n.isEmpty),O=S&&m&&n.selectionBehavior==="replace",x=w||O,D=d.useRef(null),P=x&&m,b=d.useRef(!1),k=d.useRef(!1),B=_=>{if(u&&u(),v&&i.current){let V=n.getItemProps(r);g.open(i.current,_,V.href,V.routerOptions)}},N={};o?(N.onPressStart=_=>{D.current=_.pointerType,b.current=P,_.pointerType==="keyboard"&&(!x||Is())&&h(_)},c?(N.onPressUp=w?void 0:_=>{_.pointerType==="mouse"&&m&&h(_)},N.onPress=w?B:_=>{_.pointerType!=="keyboard"&&_.pointerType!=="mouse"&&m&&h(_)}):N.onPress=_=>{if(w||O&&_.pointerType!=="mouse"){if(_.pointerType==="keyboard"&&!Os())return;B(_)}else _.pointerType!=="keyboard"&&m&&h(_)}):(N.onPressStart=_=>{D.current=_.pointerType,b.current=P,k.current=w,m&&(_.pointerType==="mouse"&&!w||_.pointerType==="keyboard"&&(!S||Is()))&&h(_)},N.onPress=_=>{(_.pointerType==="touch"||_.pointerType==="pen"||_.pointerType==="virtual"||_.pointerType==="keyboard"&&x&&Os()||_.pointerType==="mouse"&&k.current)&&(x?B(_):m&&h(_))}),y["data-key"]=r,N.preventFocusOnPress=a;let{pressProps:H,isPressed:E}=ya(N),I=O?_=>{D.current==="mouse"&&(_.stopPropagation(),_.preventDefault(),B(_))}:void 0,{longPressProps:z}=fg({isDisabled:!P,onLongPress(_){_.pointerType==="touch"&&(h(_),n.setSelectionBehavior("toggle"))}}),M=_=>{D.current==="touch"&&b.current&&_.preventDefault()},j=n.isLink(r)?_=>{It.isOpening||_.preventDefault()}:void 0;return{itemProps:ye(y,m||w?H:{},P?z:{},{onDoubleClick:I,onDragStartCapture:M,onClick:j,id:e}),isPressed:E,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:l,allowsSelection:m,hasAction:x}}function Os(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function Is(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}class _s{getItemRect(e){let n=this.ref.current;if(!n)return null;let r=e!=null?n.querySelector(`[data-key="${CSS.escape(e.toString())}"]`):null;if(!r)return null;let i=n.getBoundingClientRect(),o=r.getBoundingClientRect();return{x:o.left-i.left+n.scrollLeft,y:o.top-i.top+n.scrollTop,width:o.width,height:o.height}}getContentSize(){let e=this.ref.current;var n,r;return{width:(n=e==null?void 0:e.scrollWidth)!==null&&n!==void 0?n:0,height:(r=e==null?void 0:e.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let e=this.ref.current;var n,r,i,o;return{x:(n=e==null?void 0:e.scrollLeft)!==null&&n!==void 0?n:0,y:(r=e==null?void 0:e.scrollTop)!==null&&r!==void 0?r:0,width:(i=e==null?void 0:e.offsetWidth)!==null&&i!==void 0?i:0,height:(o=e==null?void 0:e.offsetHeight)!==null&&o!==void 0?o:0}}constructor(e){this.ref=e}}class ov{isDisabled(e){var n;return this.disabledBehavior==="all"&&(((n=e.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,n){let r=e;for(;r!=null;){let i=this.collection.getItem(r);if((i==null?void 0:i.type)==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(e){let n=e;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(e){let n=e;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(e,n,r){let i=e,o=this.layoutDelegate.getItemRect(i);if(!o||i==null)return null;let a=o;do{if(i=n(i),i==null)break;o=this.layoutDelegate.getItemRect(i)}while(o&&r(a,o)&&i!=null);return i}isSameRow(e,n){return e.y===n.y||e.x!==n.x}isSameColumn(e,n){return e.x===n.x||e.y!==n.y}getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,n){return n?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr"):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyAfter(n))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!Gn(n))return this.getFirstKey();let i=e;if(this.orientation==="horizontal"){let o=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!Gn(n))return this.getLastKey();let i=e;if(this.orientation==="horizontal"){let o=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let o=r.getItem(i);if(!o)return null;let a=o.textValue.slice(0,e.length);if(o.textValue&&this.collator.compare(a,e)===0)return i;i=this.getNextKey(i)}return null}constructor(...e){if(e.length===1){let n=e[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new _s(n.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new _s(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function av(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:i,keyboardDelegate:o,layoutDelegate:a}=t,s=Pg({usage:"search",sensitivity:"base"}),l=e.disabledBehavior,u=d.useMemo(()=>o||new ov({collection:n,disabledKeys:r,disabledBehavior:l,ref:i,collator:s,layoutDelegate:a}),[o,a,n,r,i,s,l]),{collectionProps:c}=jc({...t,ref:i,selectionManager:e,keyboardDelegate:u});return{listProps:c}}function Hc(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function sv(t){return lv(t)}function lv(t,e){for(let n of t)return n}function Bi(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...ks(t,e),e],i=[...ks(t,n),n],o=r.slice(0,i.length).findIndex((a,s)=>a!==i[s]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function ks(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}const Ns=new WeakMap;function uv(t){let e=Ns.get(t);if(e!=null)return e;let n=0,r=i=>{for(let o of i)o.type==="section"?r(Hc(o,t)):n++};return r(t),Ns.set(t,n),n}const Bc=new WeakMap;function cv(t,e,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:o,...a}=t;!t["aria-label"]&&!t["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=Be(t,{labelable:!0}),{listProps:l}=av({...a,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return Bc.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:ye(s,{onKeyDown:i,onKeyUp:o},{role:"menu",...l,onKeyDown:u=>{var c;(u.key!=="Escape"||t.shouldUseVirtualFocus)&&((c=l.onKeyDown)===null||c===void 0||c.call(l,u))}})}}function dv(t,e,n){let{id:r,key:i,closeOnSelect:o,isVirtualized:a,"aria-haspopup":s,onPressStart:l,onPressUp:u,onPress:c,onPressChange:p,onPressEnd:g,onHoverStart:h,onHoverChange:y,onHoverEnd:f,onKeyDown:v,onKeyUp:m,onFocus:S,onFocusChange:w,onBlur:O,selectionManager:x=e.selectionManager}=t,D=!!s,P=D&&t["aria-expanded"]==="true";var b;let k=(b=t.isDisabled)!==null&&b!==void 0?b:x.isDisabled(i);var B;let N=(B=t.isSelected)!==null&&B!==void 0?B:x.isSelected(i),H=Bc.get(e),E=e.collection.getItem(i),I=t.onClose||H.onClose,z=di(),M=ne=>{var Ue;if(!D){if(!(E==null||(Ue=E.props)===null||Ue===void 0)&&Ue.onAction?E.props.onAction():t.onAction&&t.onAction(i),H.onAction){let at=H.onAction;at(i)}ne.target instanceof HTMLAnchorElement&&E&&z.open(ne.target,ne,E.props.href,E.props.routerOptions)}},j="menuitem";D||(x.selectionMode==="single"?j="menuitemradio":x.selectionMode==="multiple"&&(j="menuitemcheckbox"));let _=_i(),V=_i(),J=_i(),re={id:r,"aria-disabled":k||void 0,role:j,"aria-label":t["aria-label"],"aria-labelledby":_,"aria-describedby":[V,J].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":s,"aria-expanded":t["aria-expanded"]};x.selectionMode!=="none"&&!D&&(re["aria-checked"]=N),a&&(re["aria-posinset"]=E==null?void 0:E.index,re["aria-setsize"]=uv(e.collection));let A=ne=>{ne.pointerType==="keyboard"&&M(ne),l==null||l(ne)},R=()=>{!D&&I&&(o??(x.selectionMode!=="multiple"||x.isLink(i)))&&I()},F=ne=>{ne.pointerType==="mouse"&&(M(ne),R()),u==null||u(ne)},K=ne=>{ne.pointerType!=="keyboard"&&ne.pointerType!=="mouse"&&(M(ne),R()),c==null||c(ne)},{itemProps:W,isFocused:U}=zc({id:r,selectionManager:x,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:H.shouldUseVirtualFocus}),{pressProps:L,isPressed:Y}=ya({onPressStart:A,onPress:K,onPressUp:F,onPressChange:p,onPressEnd:g,isDisabled:k}),{hoverProps:ee}=wa({isDisabled:k,onHoverStart(ne){!sg()&&!(P&&s==="dialog")&&(x.setFocused(!0),x.setFocusedKey(i)),h==null||h(ne)},onHoverChange:y,onHoverEnd:f}),{keyboardProps:de}=cg({onKeyDown:ne=>{if(ne.repeat){ne.continuePropagation();return}switch(ne.key){case" ":!k&&x.selectionMode==="none"&&!D&&o!==!1&&I&&I();break;case"Enter":!k&&o!==!1&&!D&&I&&I();break;default:D||ne.continuePropagation(),v==null||v(ne);break}},onKeyUp:m}),{focusProps:ce}=rg({onBlur:O,onFocus:S,onFocusChange:w}),oe=Be(E==null?void 0:E.props);delete oe.id;let ge=$u(E==null?void 0:E.props);return{menuItemProps:{...re,...ye(oe,ge,D?{onFocus:W.onFocus,"data-key":W["data-key"]}:W,L,ee,de,ce),tabIndex:W.tabIndex!=null&&P?-1:W.tabIndex},labelProps:{id:_},descriptionProps:{id:V},keyboardShortcutProps:{id:J},isFocused:U,isSelected:N,isPressed:Y,isDisabled:k}}function fv(t){let{heading:e,"aria-label":n}=t,r=tr();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}function hv(t){let e=Be(t,{labelable:!0}),n;return t.orientation==="vertical"&&(n="vertical"),t.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":n}}:{separatorProps:e}}const Wc=new WeakMap;function Qr(t,e,n){return t?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${Wc.get(t)}-${n}-${e}`):""}function pv(t,e,n){let{key:r,isDisabled:i,shouldSelectOnPressUp:o}=t,{selectionManager:a,selectedKey:s}=e,l=r===s,u=i||e.isDisabled||e.selectionManager.isDisabled(r),{itemProps:c,isPressed:p}=zc({selectionManager:a,key:r,ref:n,isDisabled:u,shouldSelectOnPressUp:o,linkBehavior:"selection"}),g=Qr(e,r,"tab"),h=Qr(e,r,"tabpanel"),{tabIndex:y}=c,f=e.collection.getItem(r),v=Be(f==null?void 0:f.props,{labelable:!0});delete v.id;let m=$u(f==null?void 0:f.props);return{tabProps:ye(v,m,c,{id:g,"aria-selected":l,"aria-disabled":u||void 0,"aria-controls":l?h:void 0,tabIndex:u?void 0:y,role:"tab"}),isSelected:l,isDisabled:u,isPressed:p}}function gv(t,e,n){let r=Yp(n)?void 0:0;var i;const o=Qr(e,(i=t.id)!==null&&i!==void 0?i:e==null?void 0:e.selectedKey,"tabpanel"),a=sa({...t,id:o,"aria-labelledby":Qr(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:ye(a,{tabIndex:r,role:"tabpanel","aria-describedby":t["aria-describedby"],"aria-details":t["aria-details"]})}}class vv{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var n,r;return this.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){do e=this.collection.getKeyAfter(e),e==null&&(e=this.collection.getFirstKey());while(this.isDisabled(e));return e}getPreviousKey(e){do e=this.collection.getKeyBefore(e),e==null&&(e=this.collection.getLastKey());while(this.isDisabled(e));return e}constructor(e,n,r,i=new Set){this.collection=e,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=i,this.tabDirection=r==="horizontal"}}function mv(t,e,n){let{orientation:r="horizontal",keyboardActivation:i="automatic"}=t,{collection:o,selectionManager:a,disabledKeys:s}=e,{direction:l}=or(),u=d.useMemo(()=>new vv(o,l,r,s),[o,s,r,l]),{collectionProps:c}=jc({ref:n,selectionManager:a,keyboardDelegate:u,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),p=tr();Wc.set(e,p);let g=sa({...t,id:p});return{tabListProps:{...ye(c,g),role:"tablist","aria-orientation":r,tabIndex:void 0}}}const yv=d.createContext({});function bv(t){let[e,n]=nr(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=d.useCallback(()=>{n(!0)},[n]),i=d.useCallback(()=>{n(!1)},[n]),o=d.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:i,toggle:o}}class Sv{build(e,n){return this.context=n,Rs(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:r}=e;if(d.isValidElement(n)&&n.type===d.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let o of r)yield*this.getFullNode({value:o,index:i},{renderer:n}),i++}else{let i=[];d.Children.forEach(n,a=>{a&&i.push(a)});let o=0;for(let a of i){let s=this.getFullNode({element:a,index:o},{});for(let l of s)o++,yield l}}}getKey(e,n,r,i){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let o=n.value;if(o!=null){var a;let s=(a=o.key)!==null&&a!==void 0?a:o.id;if(s==null)throw new Error("No key found for item");return s}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,r,i){if(d.isValidElement(e.element)&&e.element.type===d.Fragment){let v=[];d.Children.forEach(e.element.props.children,S=>{v.push(S)});var o;let m=(o=e.index)!==null&&o!==void 0?o:0;for(const S of v)yield*this.getFullNode({element:S,index:m++},n,r,i);return}let a=e.element;if(!a&&e.value&&n&&n.renderer){let v=this.cache.get(e.value);if(v&&(!v.shouldInvalidate||!v.shouldInvalidate(this.context))){v.index=e.index,v.parentKey=i?i.key:null,yield v;return}a=n.renderer(e.value)}if(d.isValidElement(a)){let v=a.type;if(typeof v!="function"&&typeof v.getCollectionNode!="function"){let O=a.type;throw new Error(`Unknown element <${O}> in collection.`)}let m=v.getCollectionNode(a.props,this.context);var s;let S=(s=e.index)!==null&&s!==void 0?s:0,w=m.next();for(;!w.done&&w.value;){let O=w.value;e.index=S;var l;let x=(l=O.key)!==null&&l!==void 0?l:null;x==null&&(x=O.element?null:this.getKey(a,e,n,r));let P=[...this.getFullNode({...O,key:x,index:S,wrapper:wv(e.wrapper,O.wrapper)},this.getChildState(n,O),r?`${r}${a.key}`:a.key,i)];for(let b of P){var u,c;b.value=(c=(u=O.value)!==null&&u!==void 0?u:e.value)!==null&&c!==void 0?c:null,b.value&&this.cache.set(b.value,b);var p;if(e.type&&b.type!==e.type)throw new Error(`Unsupported type <${Wi(b.type)}> in <${Wi((p=i==null?void 0:i.type)!==null&&p!==void 0?p:"unknown parent type")}>. Only <${Wi(e.type)}> is supported.`);S++,yield b}w=m.next(P)}return}if(e.key==null||e.type==null)return;let g=this;var h,y;let f={type:e.type,props:e.props,key:e.key,parentKey:i?i.key:null,value:(h=e.value)!==null&&h!==void 0?h:null,level:i?i.level+1:0,index:e.index,rendered:e.rendered,textValue:(y=e.textValue)!==null&&y!==void 0?y:"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Rs(function*(){if(!e.hasChildNodes||!e.childNodes)return;let v=0;for(let m of e.childNodes()){m.key!=null&&(m.key=`${f.key}${m.key}`);let S=g.getFullNode({...m,index:v},g.getChildState(n,m),f.key,f);for(let w of S)v++,yield w}})};yield f}constructor(){this.cache=new WeakMap}}function Rs(t){let e=[],n=null;return{*[Symbol.iterator](){for(let r of e)yield r;n||(n=t());for(let r of n)e.push(r),yield r}}}function wv(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function Wi(t){return t[0].toUpperCase()+t.slice(1)}function Uc(t,e,n){let r=d.useMemo(()=>new Sv,[]),{children:i,items:o,collection:a}=t;return d.useMemo(()=>{if(a)return a;let l=r.build({children:i,items:o},n);return e(l)},[r,i,o,a,n,e])}function Ev(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function $v(t){return xv(t)}function xv(t,e){for(let n of t)return n}function Ui(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...Ms(t,e),e],i=[...Ms(t,n),n],o=r.slice(0,i.length).findIndex((a,s)=>a!==i[s]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function Ms(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}function Cv(t){let{initialItems:e=[],initialSelectedKeys:n,getKey:r=f=>{var v;return(v=f.id)!==null&&v!==void 0?v:f.key},getChildren:i=f=>f.children}=t,[o,a]=d.useState(()=>p(e,new Map)),{items:s,nodeMap:l}=o,[u,c]=d.useState(new Set(n||[]));function p(f=[],v,m){return f==null&&(f=[]),{items:f.map(S=>{let w={key:r(S),parentKey:m,value:S,children:null};return w.children=p(i(S),v,w.key).items,v.set(w.key,w),w}),nodeMap:v}}function g(f,v,m,S){let w=S.get(v);if(!w)return{items:f,nodeMap:S};let O=new Map(S),x=m(w);for(x==null?y(w,O):h(x,O);w&&w.parentKey;){let P=O.get(w.parentKey),b={key:P.key,parentKey:P.parentKey,value:P.value,children:null},k=P.children;x==null&&k&&(k=k.filter(B=>B!==w));var D;b.children=(D=k==null?void 0:k.map(B=>B===w?x:B))!==null&&D!==void 0?D:null,O.set(b.key,b),x=b,w=P}return x==null&&(f=f.filter(P=>P!==w)),{items:f.map(P=>P===w?x:P),nodeMap:O}}function h(f,v){if(v.set(f.key,f),f.children)for(let m of f.children)h(m,v)}function y(f,v){if(v.delete(f.key),f.children)for(let m of f.children)y(m,v)}return{items:s,selectedKeys:u,setSelectedKeys:c,getItem(f){return l.get(f)},insert(f,v,...m){a(({items:S,nodeMap:w})=>{let{items:O,nodeMap:x}=p(m,w,f);return f==null?{items:[...S.slice(0,v),...O,...S.slice(v)],nodeMap:x}:g(S,f,D=>({key:D.key,parentKey:D.parentKey,value:D.value,children:[...D.children.slice(0,v),...O,...D.children.slice(v)]}),x)})},insertBefore(f,...v){let m=l.get(f);if(!m)return;let S=l.get(m.parentKey),O=(S?S.children:s).indexOf(m);var x;this.insert((x=S==null?void 0:S.key)!==null&&x!==void 0?x:null,O,...v)},insertAfter(f,...v){let m=l.get(f);if(!m)return;let S=l.get(m.parentKey),O=(S?S.children:s).indexOf(m);var x;this.insert((x=S==null?void 0:S.key)!==null&&x!==void 0?x:null,O+1,...v)},prepend(f,...v){this.insert(f,0,...v)},append(f,...v){if(f==null)this.insert(null,s.length,...v);else{let m=l.get(f);if(!m)return;this.insert(f,m.children.length,...v)}},remove(...f){if(f.length===0)return;let v=s,m=l,S;for(let O of f)S=g(v,O,()=>null,m),m=S.nodeMap,v=S.items;a(S);let w=new Set(u);for(let O of u)S.nodeMap.has(O)||w.delete(O);c(w)},removeSelectedItems(){this.remove(...u)},move(f,v,m){a(({items:S,nodeMap:w})=>{let O=w.get(f);if(!O)return{items:S,nodeMap:w};let{items:x,nodeMap:D}=g(S,f,()=>null,w);const P={...O,parentKey:v};return v==null?(D.set(P.key,P),{items:[...x.slice(0,m),P,...x.slice(m)],nodeMap:D}):g(x,v,b=>({key:b.key,parentKey:b.parentKey,value:b.value,children:[...b.children.slice(0,m),P,...b.children.slice(m)]}),D)})},update(f,v){a(({items:m,nodeMap:S})=>g(m,f,w=>{let O={key:w.key,parentKey:w.parentKey,value:v,children:null},x=p(i(v),S,O.key);return O.children=x.items,O},S))}}}class As{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){let n=this.keyMap.get(e);return(n==null?void 0:n.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let n=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&a.type==="section")for(let s of a.childNodes)n(s)};for(let a of e)n(a);let r=null,i=0;for(let[a,s]of this.keyMap)r?(r.nextKey=a,s.prevKey=r.key):(this.firstKey=a,s.prevKey=void 0),s.type==="item"&&(s.index=i++),r=s,r.nextKey=void 0;var o;this.lastKey=(o=r==null?void 0:r.key)!==null&&o!==void 0?o:null}}let tt=class Vc extends Set{constructor(e,n,r){super(e),e instanceof Vc?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function Tv(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Gc(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,a=d.useRef(!1),[,s]=d.useState(!1),l=d.useRef(null),u=d.useRef(null),[,c]=d.useState(null),p=d.useMemo(()=>Ks(t.selectedKeys),[t.selectedKeys]),g=d.useMemo(()=>Ks(t.defaultSelectedKeys,new tt),[t.defaultSelectedKeys]),[h,y]=nr(p,g,t.onSelectionChange),f=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,m]=d.useState(i);i==="replace"&&v==="toggle"&&typeof h=="object"&&h.size===0&&m("replace");let S=d.useRef(i);return d.useEffect(()=>{i!==S.current&&(m(i),S.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:m,get isFocused(){return a.current},setFocused(w){a.current=w,s(w)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(w,O="first"){l.current=w,u.current=O,c(w)},selectedKeys:h,setSelectedKeys(w){(r||!Tv(w,h))&&y(w)},disabledKeys:f,disabledBehavior:o}}function Ks(t,e){return t?t==="all"?"all":new tt(t):e}let qc=class{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Ui(this.collection,i,e)<0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Ui(this.collection,i,e)>0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new tt([n],n,n);else{let a=this.state.selectedKeys;var i;let s=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new tt(a,s,n);var o;for(let l of this.getKeyRange(s,(o=a.currentKey)!==null&&o!==void 0?o:n))r.delete(l);for(let l of this.getKeyRange(n,s))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?Ui(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],o=e;for(;o!=null;){let a=this.collection.getItem(o);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new tt(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new tt([n],n,n):new tt;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new tt;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);(a==null?void 0:a.type)==="item"&&e.push(r);var o;a!=null&&a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((o=(i=$v(Ev(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new tt)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}};function Dv(t){let{filter:e,layoutDelegate:n}=t,r=Gc(t),i=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),o=d.useCallback(c=>e?new As(e(c)):new As(c),[e]),a=d.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),s=Uc(t,o,a),l=d.useMemo(()=>new qc(s,r,{layoutDelegate:n}),[s,r,n]);const u=d.useRef(null);return d.useEffect(()=>{if(r.focusedKey!=null&&!s.getItem(r.focusedKey)&&u.current){const m=u.current.getItem(r.focusedKey),S=[...u.current.getKeys()].map(b=>{const k=u.current.getItem(b);return(k==null?void 0:k.type)==="item"?k:null}).filter(b=>b!==null),w=[...s.getKeys()].map(b=>{const k=s.getItem(b);return(k==null?void 0:k.type)==="item"?k:null}).filter(b=>b!==null);var c,p;const O=((c=S==null?void 0:S.length)!==null&&c!==void 0?c:0)-((p=w==null?void 0:w.length)!==null&&p!==void 0?p:0);var g,h,y;let x=Math.min(O>1?Math.max(((g=m==null?void 0:m.index)!==null&&g!==void 0?g:0)-O+1,0):(h=m==null?void 0:m.index)!==null&&h!==void 0?h:0,((y=w==null?void 0:w.length)!==null&&y!==void 0?y:0)-1),D=null,P=!1;for(;x>=0;){if(!l.isDisabled(w[x].key)){D=w[x];break}if(x<w.length-1&&!P)x++;else{P=!0;var f,v;x>((f=m==null?void 0:m.index)!==null&&f!==void 0?f:0)&&(x=(v=m==null?void 0:m.index)!==null&&v!==void 0?v:0),x--}}r.setFocusedKey(D?D.key:null)}u.current=s},[s,l,r,r.focusedKey]),{collection:s,disabledKeys:i,selectionManager:l}}function Pv(t){var e;let[n,r]=nr(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),i=d.useMemo(()=>n!=null?[n]:[],[n]),{collection:o,disabledKeys:a,selectionManager:s}=Dv({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:u=>{if(u==="all")return;var c;let p=(c=u.values().next().value)!==null&&c!==void 0?c:null;p===n&&t.onSelectionChange&&t.onSelectionChange(p),r(p)}}),l=n!=null?o.getItem(n):null;return{collection:o,disabledKeys:a,selectionManager:s,selectedKey:n,setSelectedKey:r,selectedItem:l}}function Ov(t){var e,n;let r=Pv({...t,suppressTextValueWarning:!0,defaultSelectedKey:(n=(e=t.defaultSelectedKey)!==null&&e!==void 0?e:Ls(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set))!==null&&n!==void 0?n:void 0}),{selectionManager:i,collection:o,selectedKey:a}=r,s=d.useRef(a);return d.useEffect(()=>{let l=a;(i.isEmpty||l==null||!o.getItem(l))&&(l=Ls(o,r.disabledKeys),l!=null&&i.setSelectedKeys([l])),(l!=null&&i.focusedKey==null||!i.isFocused&&l!==s.current)&&i.setFocusedKey(l),s.current=l}),{...r,isDisabled:t.isDisabled||!1}}function Ls(t,e){let n=null;if(t){var r,i,o,a;for(n=t.getFirstKey();n!=null&&(e.has(n)||!((i=t.getItem(n))===null||i===void 0||(r=i.props)===null||r===void 0)&&r.isDisabled)&&n!==t.getLastKey();)n=t.getKeyAfter(n);n!=null&&(e.has(n)||!((a=t.getItem(n))===null||a===void 0||(o=a.props)===null||o===void 0)&&o.isDisabled)&&n===t.getLastKey()&&(n=t.getFirstKey())}return n}class Iv{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,n=n||new Set;let r=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&(s.type==="section"||n.has(s.key)))for(let l of s.childNodes)r(l)};for(let s of e)r(s);let i=null,o=0;for(let[s,l]of this.keyMap)i?(i.nextKey=s,l.prevKey=i.key):(this.firstKey=s,l.prevKey=void 0),l.type==="item"&&(l.index=o++),i=l,i.nextKey=void 0;var a;this.lastKey=(a=i==null?void 0:i.key)!==null&&a!==void 0?a:null}}function _v(t){let{onExpandedChange:e}=t,[n,r]=nr(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),i=Gc(t),o=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),a=Uc(t,d.useCallback(l=>new Iv(l,{expandedKeys:n}),[n]),null);return d.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:o,toggleKey:l=>{r(kv(n,l))},setExpandedKeys:r,selectionManager:new qc(a,i)}}function kv(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const Nv=d.createContext(null),Rv=d.createContext(null),Yc={CollectionRoot({collection:t,renderDropIndicator:e}){return Fs(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return Fs(t,e,n)}};function Fs(t,e,n){return Iu({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){var i;let o=r.render(r);if(!n||r.type!=="item")return o;let a=r.key,s=t.getKeyAfter(a);return d.createElement(d.Fragment,null,n({type:"item",key:a,dropPosition:"before"}),o,(s==null||((i=t.getItem(s))===null||i===void 0?void 0:i.type)!=="item")&&n({type:"item",key:a,dropPosition:"after"}))}})}const pi=d.createContext(Yc);function Xc(t){return d.useMemo(()=>t!=null?new Set([t]):null,[t])}const Mv=d.createContext({}),Jc=d.createContext({}),Av=fa("separator",function(e,n){[e,n]=ir(e,n,Jc);let{elementType:r,orientation:i,style:o,className:a}=e,s=r||"hr";s==="hr"&&i==="vertical"&&(s="div");let{separatorProps:l}=hv({elementType:r,orientation:i});return d.createElement(s,{...Be(e),...l,style:o,className:a??"react-aria-Separator",ref:n,slot:e.slot||void 0})}),Kv=d.createContext({placement:"bottom"}),Lv=d.createContext(null),Fv=d.forwardRef(function(e,n){[e,n]=ir(e,n,Lv);let r=d.useContext(Zv),i=bv(e),o=e.isOpen!=null||e.defaultOpen!=null||!r?i:r,a=Qh(n,o.isOpen)||e.isExiting||!1;if(ip()){let l=e.children;return typeof l=="function"&&(l=l({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),d.createElement(d.Fragment,null,l)}return o&&!o.isOpen&&!a?null:d.createElement(jv,{...e,triggerRef:e.triggerRef,state:o,popoverRef:n,isExiting:a})});function jv({state:t,isExiting:e,UNSTABLE_portalContainer:n,...r}){let i=d.useRef(null),[o,a]=d.useState(0);pe(()=>{i.current&&t.isOpen&&a(i.current.getBoundingClientRect().width)},[t.isOpen,i]);var s;let{popoverProps:l,underlayProps:u,arrowProps:c,placement:p}=Jg({...r,offset:(s=r.offset)!==null&&s!==void 0?s:8,arrowSize:o},t),g=r.popoverRef,h=Jh(g,!!p)||r.isEntering||!1,y=mt({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:p,isEntering:h,isExiting:e}}),f={...l.style,...y.style};return d.createElement(tv,{...r,isExiting:e,portalContainer:n},!r.isNonModal&&t.isOpen&&d.createElement("div",{"data-testid":"underlay",...u,style:{position:"fixed",inset:0}}),d.createElement("div",{...ye(Be(r),l),...y,ref:g,slot:r.slot||void 0,style:f,"data-trigger":r.trigger,"data-placement":p,"data-entering":h||void 0,"data-exiting":e||void 0},!r.isNonModal&&d.createElement(Ps,{onDismiss:t.close}),d.createElement(Kv.Provider,{value:{...c,placement:p,ref:i}},y.children),d.createElement(Ps,{onDismiss:t.close})))}const zv=d.createContext({});class ze extends Set{constructor(e,n,r){super(e),e instanceof ze?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function Hv(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Bv(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,a=d.useRef(!1),[,s]=d.useState(!1),l=d.useRef(null),u=d.useRef(null),[,c]=d.useState(null),p=d.useMemo(()=>js(t.selectedKeys),[t.selectedKeys]),g=d.useMemo(()=>js(t.defaultSelectedKeys,new ze),[t.defaultSelectedKeys]),[h,y]=nr(p,g,t.onSelectionChange),f=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,m]=d.useState(i);i==="replace"&&v==="toggle"&&typeof h=="object"&&h.size===0&&m("replace");let S=d.useRef(i);return d.useEffect(()=>{i!==S.current&&(m(i),S.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:m,get isFocused(){return a.current},setFocused(w){a.current=w,s(w)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(w,O="first"){l.current=w,u.current=O,c(w)},selectedKeys:h,setSelectedKeys(w){(r||!Hv(w,h))&&y(w)},disabledKeys:f,disabledBehavior:o}}function js(t,e){return t?t==="all"?"all":new ze(t):e}class Wv{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Bi(this.collection,i,e)<0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Bi(this.collection,i,e)>0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new ze([n],n,n);else{let a=this.state.selectedKeys;var i;let s=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new ze(a,s,n);var o;for(let l of this.getKeyRange(s,(o=a.currentKey)!==null&&o!==void 0?o:n))r.delete(l);for(let l of this.getKeyRange(n,s))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?Bi(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],o=e;for(;o!=null;){let a=this.collection.getItem(o);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new ze(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new ze([n],n,n):new ze;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new ze;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);(a==null?void 0:a.type)==="item"&&e.push(r);var o;a!=null&&a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((o=(i=sv(Hc(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new ze)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}const Uv=d.createContext(null),Ea=d.createContext(null),Vv=d.createContext(null),Zr=d.createContext(null),Gv=d.createContext(null),qv=d.forwardRef(function(e,n){return[e,n]=ir(e,n,Uv),d.createElement(ku,{content:d.createElement(Nu,e)},r=>r.size>0&&d.createElement(Yv,{props:e,collection:r,menuRef:n}))});function Yv({props:t,collection:e,menuRef:n}){let{filterFn:r,collectionProps:i,collectionRef:o}=d.useContext(Nv)||{};n=$n(d.useMemo(()=>bu(n,o!==void 0?o:null),[o,n]));let a=d.useMemo(()=>r?e.filter(r):e,[e,r]),s=_v({...t,collection:a,children:void 0}),l=d.useContext(Vv),{isVirtualized:u,CollectionRoot:c}=d.useContext(pi),{menuProps:p}=cv({...t,...i,isVirtualized:u,onClose:t.onClose||(l==null?void 0:l.close)},s,n),g=mt({defaultClassName:"react-aria-Menu",className:t.className,style:t.style,values:{}});return d.createElement(Uu,null,d.createElement("div",{...Be(t),...p,...g,ref:n,slot:t.slot||void 0,onScroll:t.onScroll},d.createElement(rr,{values:[[Ea,s],[Jc,{elementType:"div"}],[Rv,{name:"MenuSection",render:Jv}],[Gv,{parentMenuRef:n}],[Fo,null],[Zr,s.selectionManager]]},d.createElement(c,{collection:s.collection,persistedKeys:Xc(s.selectionManager.focusedKey),scrollRef:n}))))}class Xv extends Wv{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,n){return this.parent.setFocusedKey(e,n)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(e,n){super(e.collection,n),this.parent=e}}function Jv(t,e,n,r="react-aria-MenuSection"){var i,o;let a=d.useContext(Ea),{CollectionBranch:s}=d.useContext(pi),[l,u]=Zh();var c;let{headingProps:p,groupProps:g}=fv({heading:u,"aria-label":(c=n.props["aria-label"])!==null&&c!==void 0?c:void 0}),h=mt({defaultClassName:r,className:(i=n.props)===null||i===void 0?void 0:i.className,style:(o=n.props)===null||o===void 0?void 0:o.style,values:{}}),y=d.useContext(Zr),f=Bv(t),v=t.selectionMode!=null?new Xv(y,f):y;return d.createElement("section",{...Be(t),...g,...h,ref:e},d.createElement(rr,{values:[[Mv,{...p,ref:l}],[Zr,v]]},d.createElement(s,{collection:a.collection,parent:n})))}const Fo=d.createContext(null),Qv=fa("item",function(e,n,r){var i;[e,n]=ir(e,n,Fo);let o=(i=la(Fo))===null||i===void 0?void 0:i.id,a=d.useContext(Ea),s=$n(n),l=d.useContext(Zr),{menuItemProps:u,labelProps:c,descriptionProps:p,keyboardShortcutProps:g,...h}=dv({...e,id:o,key:r.key,selectionManager:l},a,s),{isFocusVisible:y,focusProps:f}=fi(),{hoverProps:v,isHovered:m}=wa({isDisabled:h.isDisabled}),S=mt({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...h,isHovered:m,isFocusVisible:y,selectionMode:l.selectionMode,selectionBehavior:l.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),w=e.href?"a":"div";return d.createElement(w,{...ye(u,f,v),...S,ref:s,"data-disabled":h.isDisabled||void 0,"data-hovered":m||void 0,"data-focused":h.isFocused||void 0,"data-focus-visible":y||void 0,"data-pressed":h.isPressed||void 0,"data-selected":h.isSelected||void 0,"data-selection-mode":l.selectionMode==="none"?void 0:l.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},d.createElement(rr,{values:[[yv,{slots:{label:c,description:p}}],[zv,g]]},S.children))}),Zv=d.createContext(null),gi=d.createContext(null),yn=d.createContext(null),em=d.forwardRef(function(e,n){[e,n]=ir(e,n,gi);let{children:r,orientation:i="horizontal"}=e;return r=d.useMemo(()=>typeof r=="function"?r({orientation:i,defaultChildren:null}):r,[r,i]),d.createElement(ku,{content:r},o=>d.createElement(tm,{props:e,collection:o,tabsRef:n}))});function tm({props:t,tabsRef:e,collection:n}){let{orientation:r="horizontal"}=t,i=Ov({...t,collection:n,children:void 0}),{focusProps:o,isFocused:a,isFocusVisible:s}=fi({within:!0}),l=d.useMemo(()=>({orientation:r,isFocusWithin:a,isFocusVisible:s}),[r,a,s]),u=mt({...t,defaultClassName:"react-aria-Tabs",values:l});return d.createElement("div",{...Be(t),...o,...u,ref:e,slot:t.slot||void 0,"data-focused":a||void 0,"data-orientation":r,"data-focus-visible":s||void 0,"data-disabled":i.isDisabled||void 0},d.createElement(rr,{values:[[gi,t],[yn,i]]},u.children))}const nm=d.forwardRef(function(e,n){return d.useContext(yn)?d.createElement(rm,{props:e,forwardedRef:n}):d.createElement(Nu,e)});function rm({props:t,forwardedRef:e}){let n=d.useContext(yn),{CollectionRoot:r}=d.useContext(pi),{orientation:i="horizontal",keyboardActivation:o="automatic"}=la(gi),a=$n(e),{tabListProps:s}=mv({...t,orientation:i,keyboardActivation:o},n,a),l=mt({...t,children:null,defaultClassName:"react-aria-TabList",values:{orientation:i,state:n}}),u=Be(t);return delete u.id,d.createElement("div",{...u,...s,ref:a,...l,"data-orientation":i||void 0},d.createElement(r,{collection:n.collection,persistedKeys:Xc(n.selectionManager.focusedKey)}))}const im=fa("item",(t,e,n)=>{let r=d.useContext(yn),i=$n(e),{tabProps:o,isSelected:a,isDisabled:s,isPressed:l}=pv({key:n.key,...t},r,i),{focusProps:u,isFocused:c,isFocusVisible:p}=fi(),{hoverProps:g,isHovered:h}=wa({isDisabled:s,onHoverStart:t.onHoverStart,onHoverEnd:t.onHoverEnd,onHoverChange:t.onHoverChange}),y=mt({...t,id:void 0,defaultClassName:"react-aria-Tab",values:{isSelected:a,isDisabled:s,isFocused:c,isFocusVisible:p,isPressed:l,isHovered:h}}),f=n.props.href?"a":"div";return d.createElement(f,{...ye(o,u,g,y),ref:i,"data-selected":a||void 0,"data-disabled":s||void 0,"data-focused":c||void 0,"data-focus-visible":p||void 0,"data-pressed":l||void 0,"data-hovered":h||void 0})}),om=rp(function(e,n){const r=d.useContext(yn);let i=$n(n),{tabPanelProps:o}=gv(e,r,i),{focusProps:a,isFocused:s,isFocusVisible:l}=fi(),u=r.selectedKey===e.id,c=mt({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:s,isFocusVisible:l,isInert:!u,state:r}});if(!u&&!e.shouldForceMount)return null;let p=Be(e);delete p.id;let g=u?ye(p,o,a,c):c;return d.createElement("div",{...g,ref:i,"data-focused":s||void 0,"data-focus-visible":l||void 0,inert:u?void 0:"true","data-inert":u?void 0:"true"},d.createElement(rr,{values:[[gi,null],[yn,null]]},d.createElement(pi.Provider,{value:Yc},c.children)))}),Qc=({options:t,isOpen:e=!1,onOpenChange:n,children:r,selectedValues:i=[],onSelectValue:o})=>{const a=d.useId(),s=u=>{n==null||n(u)},l=d.useRef(null);return T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"c__dropdown-menu-trigger",ref:l,id:a,onClick:u=>{u.stopPropagation(),u.preventDefault()},children:r}),T.jsx(Fv,{triggerRef:l,style:{marginTop:"0px"},isOpen:e,onOpenChange:s,children:T.jsx(qv,{className:"c__dropdown-menu","aria-labelledby":a,children:t.map(u=>T.jsxs(d.Fragment,{children:[T.jsxs(Qv,{className:"c__dropdown-menu-item","aria-label":u.label,onAction:()=>{var c;u.value&&(o==null||o(u.value)),(c=u.callback)==null||c.call(u),s(!1)},isDisabled:u.isDisabled,children:[u.icon,T.jsx("div",{className:"c__dropdown-menu-item__label","aria-label":u.label,children:u.label}),(u.isChecked||u.value&&i.includes(u.value))&&T.jsx("span",{className:"material-icons checked",children:"check"})]},u.label),u.showSeparator&&T.jsx(Av,{})]},u.label))})})]})},Zc=()=>{const[t,e]=d.useState(!1);return{isOpen:t,setIsOpen:e}},ed=({languages:t})=>{const{isOpen:e,setIsOpen:n}=Zc();return T.jsx(Qc,{options:t,isOpen:e,onOpenChange:n,children:T.jsxs(vn.Button,{onClick:()=>n(!e),color:"primary-text",className:"c__language-picker",children:[T.jsx("span",{className:"material-icons",children:"translate"}),T.jsx("span",{className:"c__language-picker__label",children:"Français"}),T.jsx("span",{className:"material-icons",children:e?"arrow_drop_up":"arrow_drop_down"})]})})},td=({leftIcon:t,rightIcon:e,languages:n,onTogglePanel:r,isPanelOpen:i})=>{const{t:o}=vn.useCunningham();return T.jsxs("div",{className:"c__header",children:[T.jsx("div",{className:"c__header__toggle-menu",children:T.jsx(vn.Button,{size:"medium",onClick:r,"aria-label":o(i?"Close the menu":"Open the menu"),color:"tertiary-text",icon:T.jsx("span",{className:"material-icons clr-primary-800",children:i?"close":"menu"})})}),T.jsx("div",{className:"c__header__left",children:t}),T.jsxs("div",{className:"c__header__right",children:[n&&T.jsx("div",{className:"c__header__right__language-picker",children:T.jsx(ed,{languages:n})}),e]})]})},jo={themes:{default:{theme:{colors:{"primary-text":"#000091","primary-050":"#F5F5FE","primary-100":"#ECECFE","primary-150":"#F4F4FD","primary-200":"#E3E3FD","primary-300":"#CACAFB","primary-400":"#8585F6","primary-500":"#6A6AF4","primary-600":"#313178","primary-700":"#272747","primary-800":"#000091","primary-900":"#21213F","secondary-text":"#fff","secondary-100":"#fee9ea","secondary-200":"#fedfdf","secondary-300":"#fdbfbf","secondary-400":"#e1020f","secondary-500":"#c91a1f","secondary-600":"#5e2b2b","secondary-700":"#3b2424","secondary-800":"#341f1f","secondary-900":"#2b1919","greyscale-text":"#303C4B","greyscale-000":"#fff","greyscale-050":"#F6F6F6","greyscale-100":"#eee","greyscale-200":"#E5E5E5","greyscale-250":"#ddd","greyscale-300":"#CECECE","greyscale-350":"#ddd","greyscale-400":"#929292","greyscale-500":"#7C7C7C","greyscale-600":"#666666","greyscale-700":"#3A3A3A","greyscale-750":"#353535","greyscale-800":"#2A2A2A","greyscale-900":"#242424","greyscale-950":"#1E1E1E","greyscale-1000":"#161616","success-text":"#1f8d49","success-100":"#dffee6","success-200":"#b8fec9","success-300":"#88fdaa","success-400":"#3bea7e","success-500":"#1f8d49","success-600":"#18753c","success-700":"#204129","success-800":"#1e2e22","success-900":"#19281d","info-text":"#0078f3","info-100":"#E8EDFF","info-200":"#DDE5FF","info-300":"#BCCDFF","info-400":"#518FFF","info-500":"#0078F3","info-600":"#0063CB","info-700":"#273961","info-800":"#222A3F","info-900":"#1D2437","warning-text":"#d64d00","warning-100":"#fff4f3","warning-200":"#ffe9e6","warning-300":"#ffded9","warning-400":"#ffbeb4","warning-500":"#d64d00","warning-600":"#b34000","warning-700":"#5e2c21","warning-800":"#3e241e","warning-900":"#361e19","danger-text":"#FFF","danger-100":"#FFE9E9","danger-200":"#FFDDDD","danger-300":"#FFBDBD","danger-400":"#FF5655","danger-500":"#F60700","danger-600":"#CE0500","danger-700":"#642626","danger-800":"#412121","danger-900":"#391C1C"},font:{sizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",ml:"0.938rem",xl:"1.25rem",t:"0.6875rem",s:"0.75rem",h1:"2rem",h2:"1.75rem",h3:"1.5rem",h4:"1.375rem",h5:"1.25rem",h6:"1.125rem","xl-alt":"5rem","lg-alt":"4.5rem","md-alt":"4rem","sm-alt":"3.5rem","xs-alt":"3rem"},weights:{thin:100,extrabold:800,black:900},families:{accent:"Marianne",base:"Marianne"}},logo:{src:"/assets/logo-gouv.svg",widthHeader:"110px",widthFooter:"220px",alt:"Gouvernement Logo"},spacings:{0:"0",none:"0",auto:"auto",bx:"2.2rem",full:"100%","4xs":"0.125rem","3xs":"0.25rem","2xs":"0.375rem",xs:"0.5rem",sm:"0.75rem",base:"1rem",md:"1.5rem",lg:"2rem",xl:"2.5rem",xxl:"3rem",xxxl:"3.5rem","4xl":"4rem","5xl":"4.5rem","6xl":"6rem","7xl":"7.5rem"},breakpoints:{xxs:"320px",xs:"480px",mobile:"768px",tablet:"1024px"}},components:{modal:{"width-small":"342px"},button:{"medium-height":"40px","medium-text-height":"40px","border-radius":"4px","small-height":"26px",primary:{"background--color":"var(--c--theme--colors--primary-text)","background--color-hover":"#1212ff","background--color-active":"#2323ff","background--color-disabled":"var(--c--theme--colors--greyscale-100)",color:"#fff","color-hover":"#fff","color-active":"#fff","color-focus-visible":"#fff",disabled:"var(--c--theme--colors--greyscale-500)"},"primary-text":{"background--color":"var(--c--theme--colors--primary-text)","background--color-hover":"var(--c--theme--colors--greyscale-100)","background--color-active":"var(--c--theme--colors--primary-100)","background--color-focus-visible":"#fff","background--color-disabled":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-800)","color-hover":"var(--c--theme--colors--primary-800)",disabled:"var(--c--theme--colors--greyscale-400)"},secondary:{"background--color-hover":"#F6F6F6","background--color-active":"#EDEDED","background--color-focus-visible":"var(--c--theme--colors--greyscale-000)","background--disabled":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-800)","border--color":"var(--c--theme--colors--greyscale-300)","border--color-hover":"var(--c--theme--colors--greyscale-300)","border--color-disabled":"var(--c--theme--colors--greyscale-300)",disabled:"var(--c--theme--colors--greyscale-400)"},tertiary:{"background--color":"var(--c--theme--colors--primary-100)","background--color-focus-visible":"var(--c--theme--colors--primary-100)","background--color-hover":"var(--c--theme--colors--primary-300)","background--color-active":"var(--c--theme--colors--primary-300)","background--disabled":"var(--c--theme--colors--primary-050)",color:"var(--c--theme--colors--primary-800)",disabled:"var(--c--theme--colors--primary-300)"},"tertiary-text":{"background--color-hover":"var(--c--theme--colors--greyscale-100)","color-hover":"var(--c--theme--colors--primary-text)",color:"var(--c--theme--colors--primary-600)"},danger:{"color-hover":"white","background--color":"var(--c--theme--colors--danger-600)","background--color-hover":"#FF2725","background--color-focus-visible":"var(--c--theme--colors--danger-600)","background--color-disabled":"var(--c--theme--colors--greyscale-100)","color-disabled":"var(--c--theme--colors--greyscale-400)"}},datagrid:{"header--color":"ref(theme.colors.greyscale-600)","header--size":"12px","header--weight":"500","body--background-color-hover":"ref(theme.colors.greyscale-100)"},"forms-checkbox":{"border-radius":"4px","border-color":"var(--c--theme--colors--primary-800)","background-color--hover":"var(--c--theme--colors--greyscale-100)","border--color-disabled":"var(--c--theme--colors--greyscale-200)","border--color":"var(--c--theme--colors--primary-800)","background--disabled":"var(--c--theme--colors--greyscale-200)","background--enable":"var(--c--theme--colors--primary-800)","check--disabled":"var(--c--theme--colors--greyscale-300)","check--enable":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-text)","label--color":"var(--c--theme--colors--greyscale-1000)","label--size":"var(--c--theme--font--sizes--sm)","label--weight":"500","text--color":"var(--c--theme--colors--greyscale-600)","text--size":"var(--c--theme--font--sizes--s)","text--weight":"400","text--color-disabled":"var(--c--theme--colors--greyscale-300)"},"forms-labelledbox":{"label-color--small":"ref(theme.colors.greyscale-950)","label-color--small--disabled":"ref(theme.colors.greyscale-300)","label-color--big":"ref(theme.colors.greyscale-950)","label-color--big--disabled":"ref(theme.colors.greyscale-300)"},"forms-radio":{"border-color":"var(--c--theme--colors--primary-800)","background-color":"var(--c--theme--colors--greyscale-000)","accent-color":"var(--c--theme--colors--primary-800)","accent-color-disabled":"var(--c--theme--colors--greyscale-300)"},"forms-switch":{"border--color-disabled":"var(--c--theme--colors--greyscale-300)","border--color":"var(--c--theme--colors--primary-800)","handle-background-color":"white","handle-background-color--disabled":"var(--c--theme--colors--greyscale-000)","rail-background-color--disabled":"var(--c--theme--colors--greyscale-000)","accent-color":"var(--c--theme--colors--primary-800)"},"forms-textarea":{"label-color--focus":"ref(theme.colors.greyscale-1000)","border-radius":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","value-color--disabled":"ref(theme.colors.greyscale-300)","font-size":"14px"},"forms-input":{"label-color--focus":"ref(theme.colors.greyscale-1000)","border-radius":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","value-color--disabled":"ref(theme.colors.greyscale-300)","font-size":"14px"},"forms-select":{"label-color--focus":"ref(theme.colors.greyscale-1000)","item-font-size":"14px","border-radius":"4px","border-radius-hover":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","font-size":"14px"}}}}},vi=()=>{const[t,e]=d.useState(window.innerWidth),n=parseInt(jo.themes.default.theme.breakpoints.mobile.replace("px","")),r=parseInt(jo.themes.default.theme.breakpoints.tablet.replace("px","")),i=()=>{e(window.innerWidth)};d.useEffect(()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}),[]);const o=t<=n,a=t<=r,s=t>r;return{isMobile:o,isTablet:a,isDesktop:s}},nd=({children:t,isOpen:e=!1})=>{const{isDesktop:n}=vi();return n?T.jsx("div",{className:"c__left-panel",children:t}):T.jsx("div",{className:jt("c__left-panel__mobile",{open:e}),children:t})},{createElement:bn,createContext:am,createRef:xx,forwardRef:rd,useCallback:xe,useContext:id,useEffect:Tt,useImperativeHandle:od,useLayoutEffect:sm,useMemo:lm,useRef:Ce,useState:hn}=C,zs=C[`useId${Math.random()}`.slice(0,5)],um=sm,mi=am(null);mi.displayName="PanelGroupContext";const Dt=um,cm=typeof zs=="function"?zs:()=>null;let dm=0;function $a(t=null){const e=cm(),n=Ce(t||e||null);return n.current===null&&(n.current=""+dm++),t??n.current}function ad({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:o,id:a,maxSize:s,minSize:l,onCollapse:u,onExpand:c,onResize:p,order:g,style:h,tagName:y="div",...f}){const v=id(mi);if(v===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:m,expandPanel:S,getPanelSize:w,getPanelStyle:O,groupId:x,isPanelCollapsed:D,reevaluatePanelConstraints:P,registerPanel:b,resizePanel:k,unregisterPanel:B}=v,N=$a(a),H=Ce({callbacks:{onCollapse:u,onExpand:c,onResize:p},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:s,minSize:l},id:N,idIsFromProps:a!==void 0,order:g});Ce({didLogMissingDefaultSizeWarning:!1}),Dt(()=>{const{callbacks:I,constraints:z}=H.current,M={...z};H.current.id=N,H.current.idIsFromProps=a!==void 0,H.current.order=g,I.onCollapse=u,I.onExpand=c,I.onResize=p,z.collapsedSize=n,z.collapsible=r,z.defaultSize=i,z.maxSize=s,z.minSize=l,(M.collapsedSize!==z.collapsedSize||M.collapsible!==z.collapsible||M.maxSize!==z.maxSize||M.minSize!==z.minSize)&&P(H.current,M)}),Dt(()=>{const I=H.current;return b(I),()=>{B(I)}},[g,N,b,B]),od(o,()=>({collapse:()=>{m(H.current)},expand:I=>{S(H.current,I)},getId(){return N},getSize(){return w(H.current)},isCollapsed(){return D(H.current)},isExpanded(){return!D(H.current)},resize:I=>{k(H.current,I)}}),[m,S,w,D,N,k]);const E=O(H.current,i);return bn(y,{...f,children:t,className:e,id:a,style:{...E,...h},"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-group-id":x,"data-panel-id":N,"data-panel-size":parseFloat(""+E.flexGrow).toFixed(1)})}const zo=rd((t,e)=>bn(ad,{...t,forwardedRef:e}));ad.displayName="Panel";zo.displayName="forwardRef(Panel)";let Ho=null,Ct=null;function fm(t,e){if(e){const n=(e&dd)!==0,r=(e&fd)!==0,i=(e&hd)!==0,o=(e&pd)!==0;if(n)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function hm(){Ct!==null&&(document.head.removeChild(Ct),Ho=null,Ct=null)}function Vi(t,e){const n=fm(t,e);Ho!==n&&(Ho=n,Ct===null&&(Ct=document.createElement("style"),document.head.appendChild(Ct)),Ct.innerHTML=`*{cursor: ${n}!important;}`)}function sd(t){return t.type==="keydown"}function ld(t){return t.type.startsWith("pointer")}function ud(t){return t.type.startsWith("mouse")}function yi(t){if(ld(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(ud(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function pm(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function gm(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function vm(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:Ws(t),b:Ws(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;Z(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Bs(Hs(n.a)),b:Bs(Hs(n.b))};if(i.a===i.b){const o=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let s=o.length;for(;s--;){const l=o[s];if(l===a.a)return 1;if(l===a.b)return-1}}return Math.sign(i.a-i.b)}const mm=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function ym(t){var e;const n=getComputedStyle((e=cd(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function bm(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||ym(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||mm.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Hs(t){let e=t.length;for(;e--;){const n=t[e];if(Z(n,"Missing node"),bm(n))return n}return null}function Bs(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Ws(t){const e=[];for(;t;)e.push(t),t=cd(t);return e}function cd(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const dd=1,fd=2,hd=4,pd=8,Sm=pm()==="coarse";let He=[],pn=!1,ht=new Map,bi=new Map;const Xn=new Set;function wm(t,e,n,r,i){var o;const{ownerDocument:a}=e,s={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:i},l=(o=ht.get(a))!==null&&o!==void 0?o:0;return ht.set(a,l+1),Xn.add(s),ei(),function(){var c;bi.delete(t),Xn.delete(s);const p=(c=ht.get(a))!==null&&c!==void 0?c:1;if(ht.set(a,p-1),ei(),p===1&&ht.delete(a),He.includes(s)){const g=He.indexOf(s);g>=0&&He.splice(g,1),Ca(),i("up",!0,null)}}}function Us(t){const{target:e}=t,{x:n,y:r}=yi(t);pn=!0,xa({target:e,x:n,y:r}),ei(),He.length>0&&(ti("down",t),t.preventDefault(),t.stopPropagation())}function kn(t){const{x:e,y:n}=yi(t);if(pn&&t.buttons===0&&(pn=!1,ti("up",t)),!pn){const{target:r}=t;xa({target:r,x:e,y:n})}ti("move",t),Ca(),He.length>0&&t.preventDefault()}function Ut(t){const{target:e}=t,{x:n,y:r}=yi(t);bi.clear(),pn=!1,He.length>0&&t.preventDefault(),ti("up",t),xa({target:e,x:n,y:r}),Ca(),ei()}function xa({target:t,x:e,y:n}){He.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),Xn.forEach(i=>{const{element:o,hitAreaMargins:a}=i,s=o.getBoundingClientRect(),{bottom:l,left:u,right:c,top:p}=s,g=Sm?a.coarse:a.fine;if(e>=u-g&&e<=c+g&&n>=p-g&&n<=l+g){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&vm(r,o)>0){let y=r,f=!1;for(;y&&!y.contains(o);){if(gm(y.getBoundingClientRect(),s)){f=!0;break}y=y.parentElement}if(f)return}He.push(i)}})}function Gi(t,e){bi.set(t,e)}function Ca(){let t=!1,e=!1;He.forEach(r=>{const{direction:i}=r;i==="horizontal"?t=!0:e=!0});let n=0;bi.forEach(r=>{n|=r}),t&&e?Vi("intersection",n):t?Vi("horizontal",n):e?Vi("vertical",n):hm()}function ei(){ht.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",Ut),n.removeEventListener("pointerdown",Us),n.removeEventListener("pointerleave",kn),n.removeEventListener("pointermove",kn)}),window.removeEventListener("pointerup",Ut),window.removeEventListener("pointercancel",Ut),Xn.size>0&&(pn?(He.length>0&&ht.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",Ut),n.addEventListener("pointerleave",kn),n.addEventListener("pointermove",kn))}),window.addEventListener("pointerup",Ut),window.addEventListener("pointercancel",Ut)):ht.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("pointerdown",Us,{capture:!0}),n.addEventListener("pointermove",kn))}))}function ti(t,e){Xn.forEach(n=>{const{setResizeHandlerState:r}=n,i=He.includes(n);r(t,i,e)})}function Em(){const[t,e]=hn(0);return xe(()=>e(n=>n+1),[])}function Z(t,e){if(!t)throw console.error(e),Error(e)}const Ta=10;function Nt(t,e,n=Ta){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function nt(t,e,n=Ta){return Nt(t,e,n)===0}function Te(t,e,n){return Nt(t,e,n)===0}function $m(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const i=t[r],o=e[r];if(!Te(i,o,n))return!1}return!0}function cn({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];Z(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:a=100,minSize:s=0}=r;if(Nt(n,s)<0)if(o){const l=(i+s)/2;Nt(n,l)<0?n=i:n=s}else n=s;return n=Math.min(a,n),n=parseFloat(n.toFixed(Ta)),n}function Ln({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(Te(t,0))return e;const a=[...e],[s,l]=r;Z(s!=null,"Invalid first pivot index"),Z(l!=null,"Invalid second pivot index");let u=0;if(o==="keyboard"){{const p=t<0?l:s,g=n[p];Z(g,`Panel constraints not found for index ${p}`);const{collapsedSize:h=0,collapsible:y,minSize:f=0}=g;if(y){const v=e[p];if(Z(v!=null,`Previous layout not found for panel index ${p}`),Te(v,h)){const m=f-v;Nt(m,Math.abs(t))>0&&(t=t<0?0-m:m)}}}{const p=t<0?s:l,g=n[p];Z(g,`No panel constraints found for index ${p}`);const{collapsedSize:h=0,collapsible:y,minSize:f=0}=g;if(y){const v=e[p];if(Z(v!=null,`Previous layout not found for panel index ${p}`),Te(v,f)){const m=v-h;Nt(m,Math.abs(t))>0&&(t=t<0?0-m:m)}}}}{const p=t<0?1:-1;let g=t<0?l:s,h=0;for(;;){const f=e[g];Z(f!=null,`Previous layout not found for panel index ${g}`);const m=cn({panelConstraints:n,panelIndex:g,size:100})-f;if(h+=m,g+=p,g<0||g>=n.length)break}const y=Math.min(Math.abs(t),Math.abs(h));t=t<0?0-y:y}{let g=t<0?s:l;for(;g>=0&&g<n.length;){const h=Math.abs(t)-Math.abs(u),y=e[g];Z(y!=null,`Previous layout not found for panel index ${g}`);const f=y-h,v=cn({panelConstraints:n,panelIndex:g,size:f});if(!Te(y,v)&&(u+=y-v,a[g]=v,u.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?g--:g++}}if($m(i,a))return i;{const p=t<0?l:s,g=e[p];Z(g!=null,`Previous layout not found for panel index ${p}`);const h=g+u,y=cn({panelConstraints:n,panelIndex:p,size:h});if(a[p]=y,!Te(y,h)){let f=h-y,m=t<0?l:s;for(;m>=0&&m<n.length;){const S=a[m];Z(S!=null,`Previous layout not found for panel index ${m}`);const w=S+f,O=cn({panelConstraints:n,panelIndex:m,size:w});if(Te(S,O)||(f-=O-S,a[m]=O),Te(f,0))break;t>0?m--:m++}}}const c=a.reduce((p,g)=>g+p,0);return Te(c,100)?a:i}function xm({layout:t,panelsArray:e,pivotIndices:n}){let r=0,i=100,o=0,a=0;const s=n[0];Z(s!=null,"No pivot index found"),e.forEach((p,g)=>{const{constraints:h}=p,{maxSize:y=100,minSize:f=0}=h;g===s?(r=f,i=y):(o+=f,a+=y)});const l=Math.min(i,100-o),u=Math.max(r,100-a),c=t[s];return{valueMax:l,valueMin:u,valueNow:c}}function Jn(t,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`))}function gd(t,e,n=document){const i=Jn(t,n).findIndex(o=>o.getAttribute("data-panel-resize-handle-id")===e);return i??null}function vd(t,e,n){const r=gd(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function md(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Si(t,e=document){const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function Cm(t,e,n,r=document){var i,o,a,s;const l=Si(e,r),u=Jn(t,r),c=l?u.indexOf(l):-1,p=(i=(o=n[c])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,g=(a=(s=n[c+1])===null||s===void 0?void 0:s.id)!==null&&a!==void 0?a:null;return[p,g]}function Tm({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:a}){Ce({didWarnAboutMissingResizeHandle:!1}),Dt(()=>{if(!o)return;const s=Jn(n,o);for(let l=0;l<i.length-1;l++){const{valueMax:u,valueMin:c,valueNow:p}=xm({layout:r,panelsArray:i,pivotIndices:[l,l+1]}),g=s[l];if(g!=null){const h=i[l];Z(h,`No panel data found for index "${l}"`),g.setAttribute("aria-controls",h.id),g.setAttribute("aria-valuemax",""+Math.round(u)),g.setAttribute("aria-valuemin",""+Math.round(c)),g.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{s.forEach((l,u)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,r,i,o]),Tt(()=>{if(!o)return;const s=e.current;Z(s,"Eager values not found");const{panelDataArray:l}=s,u=md(n,o);Z(u!=null,`No group found for id "${n}"`);const c=Jn(n,o);Z(c,`No resize handles found for group id "${n}"`);const p=c.map(g=>{const h=g.getAttribute("data-panel-resize-handle-id");Z(h,"Resize handle element has no handle id attribute");const[y,f]=Cm(n,h,l,o);if(y==null||f==null)return()=>{};const v=m=>{if(!m.defaultPrevented)switch(m.key){case"Enter":{m.preventDefault();const S=l.findIndex(w=>w.id===y);if(S>=0){const w=l[S];Z(w,`No panel data found for index ${S}`);const O=r[S],{collapsedSize:x=0,collapsible:D,minSize:P=0}=w.constraints;if(O!=null&&D){const b=Ln({delta:Te(O,x)?P-x:x-O,initialLayout:r,panelConstraints:l.map(k=>k.constraints),pivotIndices:vd(n,h,o),prevLayout:r,trigger:"keyboard"});r!==b&&a(b)}}break}}};return g.addEventListener("keydown",v),()=>{g.removeEventListener("keydown",v)}});return()=>{p.forEach(g=>g())}},[o,t,e,n,r,i,a])}function Vs(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function yd(t,e){const n=t==="horizontal",{x:r,y:i}=yi(e);return n?r:i}function Dm(t,e,n,r,i){const o=n==="horizontal",a=Si(e,i);Z(a,`No resize handle element found for id "${e}"`);const s=a.getAttribute("data-panel-group-id");Z(s,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const u=yd(n,t),c=md(s,i);Z(c,`No group element found for id "${s}"`);const p=c.getBoundingClientRect(),g=o?p.width:p.height;return(u-l)/g*100}function Pm(t,e,n,r,i,o){if(sd(t)){const a=n==="horizontal";let s=0;t.shiftKey?s=100:i!=null?s=i:s=10;let l=0;switch(t.key){case"ArrowDown":l=a?0:s;break;case"ArrowLeft":l=a?-s:0;break;case"ArrowRight":l=a?s:0;break;case"ArrowUp":l=a?0:-s;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:Dm(t,e,n,r,o)}function Om({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<t.length;o++){const a=n[o];Z(a,`Panel constraints not found for index ${o}`);const{defaultSize:s}=a;s!=null&&(r++,e[o]=s,i-=s)}for(let o=0;o<t.length;o++){const a=n[o];Z(a,`Panel constraints not found for index ${o}`);const{defaultSize:s}=a;if(s!=null)continue;const l=t.length-r,u=i/l;r++,e[o]=u,i-=u}return e}function Vt(t,e,n){e.forEach((r,i)=>{const o=t[i];Z(o,`Panel data not found for index ${i}`);const{callbacks:a,constraints:s,id:l}=o,{collapsedSize:u=0,collapsible:c}=s,p=n[l];if(p==null||r!==p){n[l]=r;const{onCollapse:g,onExpand:h,onResize:y}=a;y&&y(r,p),c&&(g||h)&&(h&&(p==null||nt(p,u))&&!nt(r,u)&&h(),g&&(p==null||!nt(p,u))&&nt(r,u)&&g())}})}function Sr(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function Im({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:i,precision:o=3}){const a=n[i];let s;return a==null?s=t!=null?t.toPrecision(o):"1":r.length===1?s="1":s=a.toPrecision(o),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function _m(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}function Gs(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function bd(t){return`react-resizable-panels:${t}`}function Sd(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function wd(t,e){try{const n=bd(t),r=e.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function km(t,e,n){var r,i;const o=(r=wd(t,n))!==null&&r!==void 0?r:{},a=Sd(e);return(i=o[a])!==null&&i!==void 0?i:null}function Nm(t,e,n,r,i){var o;const a=bd(t),s=Sd(e),l=(o=wd(t,i))!==null&&o!==void 0?o:{};l[s]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(l))}catch(u){console.error(u)}}function qs({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,a)=>o+a,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!Te(r,100)&&n.length>0)for(let o=0;o<e.length;o++){const a=n[o];Z(a!=null,`No layout data found for index ${o}`);const s=100/r*a;n[o]=s}let i=0;for(let o=0;o<e.length;o++){const a=n[o];Z(a!=null,`No layout data found for index ${o}`);const s=cn({panelConstraints:e,panelIndex:o,size:a});a!=s&&(i+=a-s,n[o]=s)}if(!Te(i,0))for(let o=0;o<e.length;o++){const a=n[o];Z(a!=null,`No layout data found for index ${o}`);const s=a+i,l=cn({panelConstraints:e,panelIndex:o,size:s});if(a!==l&&(i-=l-a,n[o]=l,Te(i,0)))break}return n}const Rm=100,Fn={getItem:t=>(Gs(Fn),Fn.getItem(t)),setItem:(t,e)=>{Gs(Fn),Fn.setItem(t,e)}},Ys={};function Ed({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:i,id:o=null,onLayout:a=null,keyboardResizeBy:s=null,storage:l=Fn,style:u,tagName:c="div",...p}){const g=$a(o),h=Ce(null),[y,f]=hn(null),[v,m]=hn([]),S=Em(),w=Ce({}),O=Ce(new Map),x=Ce(0),D=Ce({autoSaveId:t,direction:r,dragState:y,id:g,keyboardResizeBy:s,onLayout:a,storage:l}),P=Ce({layout:v,panelDataArray:[],panelDataArrayChanged:!1});Ce({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),od(i,()=>({getId:()=>D.current.id,getLayout:()=>{const{layout:R}=P.current;return R},setLayout:R=>{const{onLayout:F}=D.current,{layout:K,panelDataArray:W}=P.current,U=qs({layout:R,panelConstraints:W.map(L=>L.constraints)});Vs(K,U)||(m(U),P.current.layout=U,F&&F(U),Vt(W,U,w.current))}}),[]),Dt(()=>{D.current.autoSaveId=t,D.current.direction=r,D.current.dragState=y,D.current.id=g,D.current.onLayout=a,D.current.storage=l}),Tm({committedValuesRef:D,eagerValuesRef:P,groupId:g,layout:v,panelDataArray:P.current.panelDataArray,setLayout:m,panelGroupElement:h.current}),Tt(()=>{const{panelDataArray:R}=P.current;if(t){if(v.length===0||v.length!==R.length)return;let F=Ys[t];F==null&&(F=_m(Nm,Rm),Ys[t]=F);const K=[...R],W=new Map(O.current);F(t,K,W,v,l)}},[t,v,l]),Tt(()=>{});const b=xe(R=>{const{onLayout:F}=D.current,{layout:K,panelDataArray:W}=P.current;if(R.constraints.collapsible){const U=W.map(de=>de.constraints),{collapsedSize:L=0,panelSize:Y,pivotIndices:ee}=bt(W,R,K);if(Z(Y!=null,`Panel size not found for panel "${R.id}"`),!nt(Y,L)){O.current.set(R.id,Y);const ce=an(W,R)===W.length-1?Y-L:L-Y,oe=Ln({delta:ce,initialLayout:K,panelConstraints:U,pivotIndices:ee,prevLayout:K,trigger:"imperative-api"});Sr(K,oe)||(m(oe),P.current.layout=oe,F&&F(oe),Vt(W,oe,w.current))}}},[]),k=xe((R,F)=>{const{onLayout:K}=D.current,{layout:W,panelDataArray:U}=P.current;if(R.constraints.collapsible){const L=U.map(ge=>ge.constraints),{collapsedSize:Y=0,panelSize:ee=0,minSize:de=0,pivotIndices:ce}=bt(U,R,W),oe=F??de;if(nt(ee,Y)){const ge=O.current.get(R.id),ne=ge!=null&&ge>=oe?ge:oe,at=an(U,R)===U.length-1?ee-ne:ne-ee,ve=Ln({delta:at,initialLayout:W,panelConstraints:L,pivotIndices:ce,prevLayout:W,trigger:"imperative-api"});Sr(W,ve)||(m(ve),P.current.layout=ve,K&&K(ve),Vt(U,ve,w.current))}}},[]),B=xe(R=>{const{layout:F,panelDataArray:K}=P.current,{panelSize:W}=bt(K,R,F);return Z(W!=null,`Panel size not found for panel "${R.id}"`),W},[]),N=xe((R,F)=>{const{panelDataArray:K}=P.current,W=an(K,R);return Im({defaultSize:F,dragState:y,layout:v,panelData:K,panelIndex:W})},[y,v]),H=xe(R=>{const{layout:F,panelDataArray:K}=P.current,{collapsedSize:W=0,collapsible:U,panelSize:L}=bt(K,R,F);return Z(L!=null,`Panel size not found for panel "${R.id}"`),U===!0&&nt(L,W)},[]),E=xe(R=>{const{layout:F,panelDataArray:K}=P.current,{collapsedSize:W=0,collapsible:U,panelSize:L}=bt(K,R,F);return Z(L!=null,`Panel size not found for panel "${R.id}"`),!U||Nt(L,W)>0},[]),I=xe(R=>{const{panelDataArray:F}=P.current;F.push(R),F.sort((K,W)=>{const U=K.order,L=W.order;return U==null&&L==null?0:U==null?-1:L==null?1:U-L}),P.current.panelDataArrayChanged=!0,S()},[S]);Dt(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:R,onLayout:F,storage:K}=D.current,{layout:W,panelDataArray:U}=P.current;let L=null;if(R){const ee=km(R,U,K);ee&&(O.current=new Map(Object.entries(ee.expandToSizes)),L=ee.layout)}L==null&&(L=Om({panelDataArray:U}));const Y=qs({layout:L,panelConstraints:U.map(ee=>ee.constraints)});Vs(W,Y)||(m(Y),P.current.layout=Y,F&&F(Y),Vt(U,Y,w.current))}}),Dt(()=>{const R=P.current;return()=>{R.layout=[]}},[]);const z=xe(R=>{let F=!1;const K=h.current;return K&&window.getComputedStyle(K,null).getPropertyValue("direction")==="rtl"&&(F=!0),function(U){U.preventDefault();const L=h.current;if(!L)return()=>null;const{direction:Y,dragState:ee,id:de,keyboardResizeBy:ce,onLayout:oe}=D.current,{layout:ge,panelDataArray:ne}=P.current,{initialLayout:Ue}=ee??{},at=vd(de,R,L);let ve=Pm(U,R,Y,ee,ce,L);const Tn=Y==="horizontal";Tn&&F&&(ve=-ve);const sr=ne.map(q=>q.constraints),$=Ln({delta:ve,initialLayout:Ue??ge,panelConstraints:sr,pivotIndices:at,prevLayout:ge,trigger:sd(U)?"keyboard":"mouse-or-touch"}),G=!Sr(ge,$);(ld(U)||ud(U))&&x.current!=ve&&(x.current=ve,!G&&ve!==0?Tn?Gi(R,ve<0?dd:fd):Gi(R,ve<0?hd:pd):Gi(R,0)),G&&(m($),P.current.layout=$,oe&&oe($),Vt(ne,$,w.current))}},[]),M=xe((R,F)=>{const{onLayout:K}=D.current,{layout:W,panelDataArray:U}=P.current,L=U.map(ge=>ge.constraints),{panelSize:Y,pivotIndices:ee}=bt(U,R,W);Z(Y!=null,`Panel size not found for panel "${R.id}"`);const ce=an(U,R)===U.length-1?Y-F:F-Y,oe=Ln({delta:ce,initialLayout:W,panelConstraints:L,pivotIndices:ee,prevLayout:W,trigger:"imperative-api"});Sr(W,oe)||(m(oe),P.current.layout=oe,K&&K(oe),Vt(U,oe,w.current))},[]),j=xe((R,F)=>{const{layout:K,panelDataArray:W}=P.current,{collapsedSize:U=0,collapsible:L}=F,{collapsedSize:Y=0,collapsible:ee,maxSize:de=100,minSize:ce=0}=R.constraints,{panelSize:oe}=bt(W,R,K);oe!=null&&(L&&ee&&nt(oe,U)?nt(U,Y)||M(R,Y):oe<ce?M(R,ce):oe>de&&M(R,de))},[M]),_=xe((R,F)=>{const{direction:K}=D.current,{layout:W}=P.current;if(!h.current)return;const U=Si(R,h.current);Z(U,`Drag handle element not found for id "${R}"`);const L=yd(K,F);f({dragHandleId:R,dragHandleRect:U.getBoundingClientRect(),initialCursorPosition:L,initialLayout:W})},[]),V=xe(()=>{f(null)},[]),J=xe(R=>{const{panelDataArray:F}=P.current,K=an(F,R);K>=0&&(F.splice(K,1),delete w.current[R.id],P.current.panelDataArrayChanged=!0,S())},[S]),re=lm(()=>({collapsePanel:b,direction:r,dragState:y,expandPanel:k,getPanelSize:B,getPanelStyle:N,groupId:g,isPanelCollapsed:H,isPanelExpanded:E,reevaluatePanelConstraints:j,registerPanel:I,registerResizeHandle:z,resizePanel:M,startDragging:_,stopDragging:V,unregisterPanel:J,panelGroupElement:h.current}),[b,y,r,k,B,N,g,H,E,j,I,z,M,_,V,J]),A={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return bn(mi.Provider,{value:re},bn(c,{...p,children:e,className:n,id:o,ref:h,style:{...A,...u},"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":g}))}const $d=rd((t,e)=>bn(Ed,{...t,forwardedRef:e}));Ed.displayName="PanelGroup";$d.displayName="forwardRef(PanelGroup)";function an(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function bt(t,e,n){const r=an(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:o}}function Mm({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){Tt(()=>{if(t||n==null||r==null)return;const i=Si(e,r);if(i==null)return;const o=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const s=i.getAttribute("data-panel-group-id");Z(s,`No group element found for id "${s}"`);const l=Jn(s,r),u=gd(s,e,r);Z(u!==null,`No resize element found for id "${e}"`);const c=a.shiftKey?u>0?u-1:l.length-1:u+1<l.length?u+1:0;l[c].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,t,e,n])}function xd({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:o,onDragging:a,onFocus:s,style:l={},tabIndex:u=0,tagName:c="div",...p}){var g,h;const y=Ce(null),f=Ce({onDragging:a});Tt(()=>{f.current.onDragging=a});const v=id(mi);if(v===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:m,groupId:S,registerResizeHandle:w,startDragging:O,stopDragging:x,panelGroupElement:D}=v,P=$a(i),[b,k]=hn("inactive"),[B,N]=hn(!1),[H,E]=hn(null),I=Ce({state:b});Dt(()=>{I.current.state=b}),Tt(()=>{if(n)E(null);else{const _=w(P);E(()=>_)}},[n,P,w]);const z=(g=r==null?void 0:r.coarse)!==null&&g!==void 0?g:15,M=(h=r==null?void 0:r.fine)!==null&&h!==void 0?h:5;return Tt(()=>{if(n||H==null)return;const _=y.current;return Z(_,"Element ref not attached"),wm(P,_,m,{coarse:z,fine:M},(J,re,A)=>{if(re)switch(J){case"down":{k("drag"),Z(A,'Expected event to be defined for "down" action'),O(P,A);const{onDragging:R}=f.current;R&&R(!0);break}case"move":{const{state:R}=I.current;R!=="drag"&&k("hover"),Z(A,'Expected event to be defined for "move" action'),H(A);break}case"up":{k("hover"),x();const{onDragging:R}=f.current;R&&R(!1);break}}else k("inactive")})},[z,m,n,M,w,P,H,O,x]),Mm({disabled:n,handleId:P,resizeHandler:H,panelGroupElement:D}),bn(c,{...p,children:t,className:e,id:i,onBlur:()=>{N(!1),o==null||o()},onFocus:()=>{N(!0),s==null||s()},ref:y,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...l},tabIndex:u,"data-panel-group-direction":m,"data-panel-group-id":S,"data-resize-handle":"","data-resize-handle-active":b==="drag"?"pointer":B?"keyboard":void 0,"data-resize-handle-state":b,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":P})}xd.displayName="PanelResizeHandle";const Am=({icon:t,children:e,leftPanelContent:n,rightHeaderContent:r,languages:i,enableResize:o=!1})=>{const[a,s]=d.useState(!1),{isDesktop:l}=vi(),[u,c]=d.useState(wr(300,l)),[p,g]=d.useState(wr(450,l)),h=()=>{s(!a)};return d.useEffect(()=>{const y=()=>{const f=wr(300,l),v=Math.min(wr(450,l),40);c(l?f:0),g(o?v:f)};return y(),window.addEventListener("resize",()=>{y()}),()=>{window.removeEventListener("resize",y)}},[l,o]),T.jsxs("div",{className:"c__main-layout",children:[T.jsx("div",{className:"c__main-layout__header",children:T.jsx(td,{onTogglePanel:h,isPanelOpen:a,rightIcon:r,leftIcon:t,languages:i})}),T.jsx("div",{className:"c__main-layout__content",children:T.jsxs($d,{direction:"horizontal",children:[T.jsx(zo,{defaultSize:u,minSize:u,maxSize:p,children:T.jsx(nd,{isOpen:a,children:n})}),l&&T.jsx(xd,{className:"bg-greyscale-200",style:{width:"1px"}}),T.jsx(zo,{children:T.jsx("div",{className:"c__main-layout__content__children",children:e})})]})})]})},wr=(t,e)=>{if(!e)return 0;const n=window.innerWidth;return t/n*100},Km=52,Da=({size:t="sm"})=>T.jsx("div",{className:["c__spinner",t].join(" ")}),Cd=({children:t,text:e,...n})=>T.jsxs("div",{className:"suite__label__container",children:[T.jsx("label",{...n,children:t}),e&&T.jsx("span",{className:"suite__label__container__description",children:e})]}),Lm=({label:t,text:e,labelSide:n="right",children:r})=>T.jsxs("div",{className:jt("c__with-label",{[n]:!0}),children:[T.jsx(Cd,{children:t,text:e}),r]});var Xs=1,Fm=.9,jm=.8,zm=.17,qi=.1,Yi=.999,Hm=.9999,Bm=.99,Wm=/[\\\/_+.#"@\[\(\{&]/,Um=/[\\\/_+.#"@\[\(\{&]/g,Vm=/[\s-]/,Td=/[\s-]/g;function Bo(t,e,n,r,i,o,a){if(o===e.length)return i===t.length?Xs:Bm;var s=`${i},${o}`;if(a[s]!==void 0)return a[s];for(var l=r.charAt(o),u=n.indexOf(l,i),c=0,p,g,h,y;u>=0;)p=Bo(t,e,n,r,u+1,o+1,a),p>c&&(u===i?p*=Xs:Wm.test(t.charAt(u-1))?(p*=jm,h=t.slice(i,u-1).match(Um),h&&i>0&&(p*=Math.pow(Yi,h.length))):Vm.test(t.charAt(u-1))?(p*=Fm,y=t.slice(i,u-1).match(Td),y&&i>0&&(p*=Math.pow(Yi,y.length))):(p*=zm,i>0&&(p*=Math.pow(Yi,u-i))),t.charAt(u)!==e.charAt(o)&&(p*=Hm)),(p<qi&&n.charAt(u-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(u-1)!==r.charAt(o))&&(g=Bo(t,e,n,r,u+1,o+2,a),g*qi>p&&(p=g*qi)),p>c&&(c=p),u=n.indexOf(l,u+1);return a[s]=c,c}function Js(t){return t.toLowerCase().replace(Td," ")}function Gm(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,Bo(t,e,Js(t),Js(e),0,0,{})}function vt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function Qs(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Dd(...t){return e=>{let n=!1;const r=t.map(i=>{const o=Qs(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():Qs(t[i],null)}}}}function zt(...t){return C.useCallback(Dd(...t),t)}function qm(t,e){const n=C.createContext(e),r=o=>{const{children:a,...s}=o,l=C.useMemo(()=>s,Object.values(s));return T.jsx(n.Provider,{value:l,children:a})};r.displayName=t+"Provider";function i(o){const a=C.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[r,i]}function Ym(t,e=[]){let n=[];function r(o,a){const s=C.createContext(a),l=n.length;n=[...n,a];const u=p=>{var m;const{scope:g,children:h,...y}=p,f=((m=g==null?void 0:g[t])==null?void 0:m[l])||s,v=C.useMemo(()=>y,Object.values(y));return T.jsx(f.Provider,{value:v,children:h})};u.displayName=o+"Provider";function c(p,g){var f;const h=((f=g==null?void 0:g[t])==null?void 0:f[l])||s,y=C.useContext(h);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[u,c]}const i=()=>{const o=n.map(a=>C.createContext(a));return function(s){const l=(s==null?void 0:s[t])||o;return C.useMemo(()=>({[`__scope${t}`]:{...s,[t]:l}}),[s,l])}};return i.scopeName=t,[r,Xm(i,...e)]}function Xm(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}var ni=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},Jm=C.useId||(()=>{}),Qm=0;function it(t){const[e,n]=C.useState(Jm());return ni(()=>{n(r=>r??String(Qm++))},[t]),e?`radix-${e}`:""}function Rt(t){const e=C.useRef(t);return C.useEffect(()=>{e.current=t}),C.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function Zm({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=ey({defaultProp:e,onChange:n}),o=t!==void 0,a=o?t:r,s=Rt(n),l=C.useCallback(u=>{if(o){const p=typeof u=="function"?u(t):u;p!==t&&s(p)}else i(u)},[o,t,i,s]);return[a,l]}function ey({defaultProp:t,onChange:e}){const n=C.useState(t),[r]=n,i=C.useRef(r),o=Rt(e);return C.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var Pa=C.forwardRef((t,e)=>{const{children:n,...r}=t,i=C.Children.toArray(n),o=i.find(ny);if(o){const a=o.props.children,s=i.map(l=>l===o?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return T.jsx(Wo,{...r,ref:e,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return T.jsx(Wo,{...r,ref:e,children:n})});Pa.displayName="Slot";var Wo=C.forwardRef((t,e)=>{const{children:n,...r}=t;if(C.isValidElement(n)){const i=iy(n),o=ry(r,n.props);return n.type!==C.Fragment&&(o.ref=e?Dd(e,i):i),C.cloneElement(n,o)}return C.Children.count(n)>1?C.Children.only(null):null});Wo.displayName="SlotClone";var ty=({children:t})=>T.jsx(T.Fragment,{children:t});function ny(t){return C.isValidElement(t)&&t.type===ty}function ry(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}function iy(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var oy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],be=oy.reduce((t,e)=>{const n=C.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Pa:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function ay(t,e){t&&rh.flushSync(()=>t.dispatchEvent(e))}function sy(t,e=globalThis==null?void 0:globalThis.document){const n=Rt(t);C.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var ly="DismissableLayer",Uo="dismissableLayer.update",uy="dismissableLayer.pointerDownOutside",cy="dismissableLayer.focusOutside",Zs,Pd=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Od=C.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=t,u=C.useContext(Pd),[c,p]=C.useState(null),g=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=C.useState({}),y=zt(e,P=>p(P)),f=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=f.indexOf(v),S=c?f.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=S>=m,x=hy(P=>{const b=P.target,k=[...u.branches].some(B=>B.contains(b));!O||k||(i==null||i(P),a==null||a(P),P.defaultPrevented||s==null||s())},g),D=py(P=>{const b=P.target;[...u.branches].some(B=>B.contains(b))||(o==null||o(P),a==null||a(P),P.defaultPrevented||s==null||s())},g);return sy(P=>{S===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&s&&(P.preventDefault(),s()))},g),C.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Zs=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),el(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Zs)}},[c,g,n,u]),C.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),el())},[c,u]),C.useEffect(()=>{const P=()=>h({});return document.addEventListener(Uo,P),()=>document.removeEventListener(Uo,P)},[]),T.jsx(be.div,{...l,ref:y,style:{pointerEvents:w?O?"auto":"none":void 0,...t.style},onFocusCapture:vt(t.onFocusCapture,D.onFocusCapture),onBlurCapture:vt(t.onBlurCapture,D.onBlurCapture),onPointerDownCapture:vt(t.onPointerDownCapture,x.onPointerDownCapture)})});Od.displayName=ly;var dy="DismissableLayerBranch",fy=C.forwardRef((t,e)=>{const n=C.useContext(Pd),r=C.useRef(null),i=zt(e,r);return C.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),T.jsx(be.div,{...t,ref:i})});fy.displayName=dy;function hy(t,e=globalThis==null?void 0:globalThis.document){const n=Rt(t),r=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let l=function(){Id(uy,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function py(t,e=globalThis==null?void 0:globalThis.document){const n=Rt(t),r=C.useRef(!1);return C.useEffect(()=>{const i=o=>{o.target&&!r.current&&Id(cy,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function el(){const t=new CustomEvent(Uo);document.dispatchEvent(t)}function Id(t,e,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?ay(i,o):i.dispatchEvent(o)}var Xi="focusScope.autoFocusOnMount",Ji="focusScope.autoFocusOnUnmount",tl={bubbles:!1,cancelable:!0},gy="FocusScope",_d=C.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=t,[s,l]=C.useState(null),u=Rt(i),c=Rt(o),p=C.useRef(null),g=zt(e,f=>l(f)),h=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let f=function(w){if(h.paused||!s)return;const O=w.target;s.contains(O)?p.current=O:ut(p.current,{select:!0})},v=function(w){if(h.paused||!s)return;const O=w.relatedTarget;O!==null&&(s.contains(O)||ut(p.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&ut(s)};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const S=new MutationObserver(m);return s&&S.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),S.disconnect()}}},[r,s,h.paused]),C.useEffect(()=>{if(s){rl.add(h);const f=document.activeElement;if(!s.contains(f)){const m=new CustomEvent(Xi,tl);s.addEventListener(Xi,u),s.dispatchEvent(m),m.defaultPrevented||(vy(wy(kd(s)),{select:!0}),document.activeElement===f&&ut(s))}return()=>{s.removeEventListener(Xi,u),setTimeout(()=>{const m=new CustomEvent(Ji,tl);s.addEventListener(Ji,c),s.dispatchEvent(m),m.defaultPrevented||ut(f??document.body,{select:!0}),s.removeEventListener(Ji,c),rl.remove(h)},0)}}},[s,u,c,h]);const y=C.useCallback(f=>{if(!n&&!r||h.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,m=document.activeElement;if(v&&m){const S=f.currentTarget,[w,O]=my(S);w&&O?!f.shiftKey&&m===O?(f.preventDefault(),n&&ut(w,{select:!0})):f.shiftKey&&m===w&&(f.preventDefault(),n&&ut(O,{select:!0})):m===S&&f.preventDefault()}},[n,r,h.paused]);return T.jsx(be.div,{tabIndex:-1,...a,ref:g,onKeyDown:y})});_d.displayName=gy;function vy(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(ut(r,{select:e}),document.activeElement!==n)return}function my(t){const e=kd(t),n=nl(e,t),r=nl(e.reverse(),t);return[n,r]}function kd(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function nl(t,e){for(const n of t)if(!yy(n,{upTo:e}))return n}function yy(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function by(t){return t instanceof HTMLInputElement&&"select"in t}function ut(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&by(t)&&e&&t.select()}}var rl=Sy();function Sy(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=il(t,e),t.unshift(e)},remove(e){var n;t=il(t,e),(n=t[0])==null||n.resume()}}}function il(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function wy(t){return t.filter(e=>e.tagName!=="A")}var Ey="Portal",Nd=C.forwardRef((t,e)=>{var s;const{container:n,...r}=t,[i,o]=C.useState(!1);ni(()=>o(!0),[]);const a=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?Ft.createPortal(T.jsx(be.div,{...r,ref:e}),a):null});Nd.displayName=Ey;function $y(t,e){return C.useReducer((n,r)=>e[n][r]??n,t)}var wi=t=>{const{present:e,children:n}=t,r=xy(e),i=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),o=zt(r.ref,Cy(i));return typeof n=="function"||r.isPresent?C.cloneElement(i,{ref:o}):null};wi.displayName="Presence";function xy(t){const[e,n]=C.useState(),r=C.useRef({}),i=C.useRef(t),o=C.useRef("none"),a=t?"mounted":"unmounted",[s,l]=$y(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const u=Er(r.current);o.current=s==="mounted"?u:"none"},[s]),ni(()=>{const u=r.current,c=i.current;if(c!==t){const g=o.current,h=Er(u);t?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&g!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),ni(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,p=h=>{const f=Er(r.current).includes(h.animationName);if(h.target===e&&f&&(l("ANIMATION_END"),!i.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},g=h=>{h.target===e&&(o.current=Er(r.current))};return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",p),e.addEventListener("animationend",p),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",p),e.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Er(t){return(t==null?void 0:t.animationName)||"none"}function Cy(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Qi=0;function Ty(){C.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??ol()),document.body.insertAdjacentElement("beforeend",t[1]??ol()),Qi++,()=>{Qi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Qi--}},[])}function ol(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var kr="right-scroll-bar-position",Nr="width-before-scroll-bar",Dy="with-scroll-bars-hidden",Py="--removed-body-scroll-bar-size";function Zi(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Oy(t,e){var n=d.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var Iy=typeof window<"u"?C.useLayoutEffect:C.useEffect,al=new WeakMap;function _y(t,e){var n=Oy(null,function(r){return t.forEach(function(i){return Zi(i,r)})});return Iy(function(){var r=al.get(n);if(r){var i=new Set(r),o=new Set(t),a=n.current;i.forEach(function(s){o.has(s)||Zi(s,null)}),o.forEach(function(s){i.has(s)||Zi(s,a)})}al.set(n,t)},[t]),n}function ky(t){return t}function Ny(t,e){e===void 0&&(e=ky);var n=[],r=!1,i={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]:t},useMedium:function(o){var a=e(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var c=a;a=[],c.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){a.push(c),u()},filter:function(c){return a=a.filter(c),n}}}};return i}function Ry(t){t===void 0&&(t={});var e=Ny(null);return e.options=Ge({async:!0,ssr:!1},t),e}var Rd=function(t){var e=t.sideCar,n=rc(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return C.createElement(r,Ge({},n))};Rd.isSideCarExport=!0;function My(t,e){return t.useMedium(e),Rd}var Md=Ry(),eo=function(){},Ei=C.forwardRef(function(t,e){var n=C.useRef(null),r=C.useState({onScrollCapture:eo,onWheelCapture:eo,onTouchMoveCapture:eo}),i=r[0],o=r[1],a=t.forwardProps,s=t.children,l=t.className,u=t.removeScrollBar,c=t.enabled,p=t.shards,g=t.sideCar,h=t.noIsolation,y=t.inert,f=t.allowPinchZoom,v=t.as,m=v===void 0?"div":v,S=t.gapMode,w=rc(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=g,x=_y([n,e]),D=Ge(Ge({},w),i);return C.createElement(C.Fragment,null,c&&C.createElement(O,{sideCar:Md,removeScrollBar:u,shards:p,noIsolation:h,inert:y,setCallbacks:o,allowPinchZoom:!!f,lockRef:n,gapMode:S}),a?C.cloneElement(C.Children.only(s),Ge(Ge({},D),{ref:x})):C.createElement(m,Ge({},D,{className:l,ref:x}),s))});Ei.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ei.classNames={fullWidth:Nr,zeroRight:kr};var Ay=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ky(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=Ay();return e&&t.setAttribute("nonce",e),t}function Ly(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Fy(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var jy=function(){var t=0,e=null;return{add:function(n){t==0&&(e=Ky())&&(Ly(e,n),Fy(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},zy=function(){var t=jy();return function(e,n){C.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Ad=function(){var t=zy(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},Hy={left:0,top:0,right:0,gap:0},to=function(t){return parseInt(t||"",10)||0},By=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[to(n),to(r),to(i)]},Wy=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Hy;var e=By(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},Uy=Ad(),gn="data-scroll-locked",Vy=function(t,e,n,r){var i=t.left,o=t.top,a=t.right,s=t.gap;return n===void 0&&(n="margin"),`
47
+ */var Za;function sp(){return Za||(Za=1,process.env.NODE_ENV!=="production"&&function(){function t(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}function e(h,y){c||i.startTransition===void 0||(c=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var f=y();if(!p){var v=y();o(f,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}v=a({inst:{value:f,getSnapshot:y}});var m=v[0].inst,S=v[1];return l(function(){m.value=f,m.getSnapshot=y,n(m)&&S({inst:m})},[h,f,y]),s(function(){return n(m)&&S({inst:m}),h(function(){n(m)&&S({inst:m})})},[h]),u(f),f}function n(h){var y=h.getSnapshot;h=h.value;try{var f=y();return!o(h,f)}catch{return!0}}function r(h,y){return y()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=d,o=typeof Object.is=="function"?Object.is:t,a=i.useState,s=i.useEffect,l=i.useLayoutEffect,u=i.useDebugValue,c=!1,p=!1,g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;Ri.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ri}var es;function lp(){return es||(es=1,process.env.NODE_ENV==="production"?fr.exports=ap():fr.exports=sp()),fr.exports}var da=lp();const _u=d.createContext(!1),Yn=d.createContext(null);function ku(t){if(d.useContext(Yn))return t.content;let{collection:n,document:r}=fp(t.createCollection);return d.createElement(d.Fragment,null,d.createElement(np,null,d.createElement(Yn.Provider,{value:r},t.content)),d.createElement(up,{render:t.children,collection:n}))}function up({collection:t,render:e}){return e(t)}function cp(t,e,n){let r=En(),i=d.useRef(r);i.current=r;let o=d.useCallback(()=>i.current?n():e(),[e,n]);return da.useSyncExternalStore(t,o)}const dp=typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore:cp;function fp(t){let[e]=d.useState(()=>new ep((t==null?void 0:t())||new ca)),n=d.useCallback(a=>e.subscribe(a),[e]),r=d.useCallback(()=>{let a=e.getCollection();return e.isSSR&&e.resetAfterSSR(),a},[e]),i=d.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),o=dp(n,r,i);return op(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:o,document:e}}const Co=d.createContext(null);function hp(t,e,n,r,i,o){let a=d.useCallback(l=>{l==null||l.setProps(e,n,r,o)},[e,n,r,o]),s=d.useContext(Co);if(s){let l=s.ownerDocument.nodesByProps.get(e);return l||(l=s.ownerDocument.createElement(t),l.setProps(e,n,r,o),s.appendChild(l),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(e,l)),i?d.createElement(Co.Provider,{value:l},i):null}return d.createElement(t,{ref:a},i)}function fa(t,e){let n=({node:i})=>e(i.props,i.props.ref,i),r=d.forwardRef((i,o)=>{if(!d.useContext(_u)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(i,o)}return hp(t,i,o,"children"in i?i.children:null,null,s=>d.createElement(n,{node:s}))});return r.displayName=e.name,r}function pp(t){return Iu({...t,addIdAndValue:!0})}const ts=d.createContext(null);function Nu(t){let e=d.useContext(ts),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope||(e==null?void 0:e.idScope),i=pp({...t,idScope:r,dependencies:n});return d.useContext(Yn)&&(i=d.createElement(gp,null,i)),e=d.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),d.createElement(ts.Provider,{value:e},i)}function gp({children:t}){let e=d.useContext(Yn),n=d.useMemo(()=>d.createElement(Yn.Provider,{value:null},d.createElement(_u.Provider,{value:!0},t)),[t]);return En()?d.createElement(Co.Provider,{value:e},n):Ft.createPortal(n,e)}const Pe=typeof document<"u"?d.useLayoutEffect:()=>{};function vp(t){const e=d.useRef(null);return Pe(()=>{e.current=t},[t]),d.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}const me=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},pt=t=>t&&"window"in t&&t.window===t?t:me(t).defaultView||window;function ns(t){if(mp())t.focus({preventScroll:!0});else{let e=yp(t);t.focus(),bp(e)}}let hr=null;function mp(){if(hr==null){hr=!1;try{document.createElement("div").focus({get preventScroll(){return hr=!0,!0}})}catch{}}return hr}function yp(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function bp(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function Ru(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function Sp(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function ha(t){let e=null;return()=>(e==null&&(e=t()),e)}const wp=ha(function(){return Sp(/^Mac/i)}),Ep=ha(function(){return Ru(/Chrome/i)}),Mu=ha(function(){return Ru(/Android/i)});let on=new Map,To=new Set;function rs(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=on.get(r.target);i||(i=new Set,on.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=on.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),on.delete(r.target)),on.size===0)){for(let o of To)o();To.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?rs():document.addEventListener("DOMContentLoaded",rs));function $p(t){requestAnimationFrame(()=>{on.size===0?t():To.add(t)})}function xp(t){return t.mozInputSource===0&&t.isTrusted?!0:Mu()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Cp(t,e){return e.get?e.get.call(t):e.value}function Au(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Tp(t,e){var n=Au(t,e,"get");return Cp(t,n)}function Dp(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pp(t,e,n){Dp(t,e),e.set(t,n)}function Op(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function is(t,e,n){var r=Au(t,e,"set");return Op(t,r,n),n}let Ip=class{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}};function Ku(t){let e=d.useRef({isFocused:!1,observer:null});Pe(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=vp(r=>{t==null||t(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,o=a=>{e.current.isFocused=!1,i.disabled&&n(new Ip("blur",a)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var a;(a=e.current.observer)===null||a===void 0||a.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function _p(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=d.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),a=Ku(o),s=d.useCallback(l=>{const u=me(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),a(l))},[i,n,a]);return{focusProps:{onFocus:!e&&(n||i||r)?s:void 0,onBlur:!e&&(r||i)?o:void 0}}}let xn=null,Do=new Set,Hn=new Map,_t=!1,Po=!1;const kp={Tab:!0,Escape:!0};function pa(t,e){for(let n of Do)n(t,e)}function Np(t){return!(t.metaKey||!wp()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Vr(t){_t=!0,Np(t)&&(xn="keyboard",pa("keyboard",t))}function Ne(t){xn="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(_t=!0,pa("pointer",t))}function Lu(t){xp(t)&&(_t=!0,xn="virtual")}function Fu(t){t.target===window||t.target===document||(!_t&&!Po&&(xn="virtual",pa("virtual",t)),_t=!1,Po=!1)}function ju(){_t=!1,Po=!0}function Oo(t){if(typeof window>"u"||Hn.get(pt(t)))return;const e=pt(t),n=me(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){_t=!0,r.apply(this,arguments)},n.addEventListener("keydown",Vr,!0),n.addEventListener("keyup",Vr,!0),n.addEventListener("click",Lu,!0),e.addEventListener("focus",Fu,!0),e.addEventListener("blur",ju,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ne,!0),n.addEventListener("pointermove",Ne,!0),n.addEventListener("pointerup",Ne,!0)):(n.addEventListener("mousedown",Ne,!0),n.addEventListener("mousemove",Ne,!0),n.addEventListener("mouseup",Ne,!0)),e.addEventListener("beforeunload",()=>{zu(t)},{once:!0}),Hn.set(e,{focus:r})}const zu=(t,e)=>{const n=pt(t),r=me(t);e&&r.removeEventListener("DOMContentLoaded",e),Hn.has(n)&&(n.HTMLElement.prototype.focus=Hn.get(n).focus,r.removeEventListener("keydown",Vr,!0),r.removeEventListener("keyup",Vr,!0),r.removeEventListener("click",Lu,!0),n.removeEventListener("focus",Fu,!0),n.removeEventListener("blur",ju,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ne,!0),r.removeEventListener("pointermove",Ne,!0),r.removeEventListener("pointerup",Ne,!0)):(r.removeEventListener("mousedown",Ne,!0),r.removeEventListener("mousemove",Ne,!0),r.removeEventListener("mouseup",Ne,!0)),Hn.delete(n))};function Rp(t){const e=me(t);let n;return e.readyState!=="loading"?Oo(t):(n=()=>{Oo(t)},e.addEventListener("DOMContentLoaded",n)),()=>zu(t,n)}typeof document<"u"&&Rp();function Hu(){return xn!=="pointer"}function Bu(){return xn}const Mp=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ap(t,e,n){var r;const i=typeof window<"u"?pt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?pt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?pt(n==null?void 0:n.target).HTMLElement:HTMLElement,s=typeof window<"u"?pt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return t=t||(n==null?void 0:n.target)instanceof i&&!Mp.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof o||(n==null?void 0:n.target)instanceof a&&(n==null?void 0:n.target.isContentEditable),!(t&&e==="keyboard"&&n instanceof s&&!kp[n.key])}function Kp(t,e,n){Oo(),d.useEffect(()=>{let r=(i,o)=>{Ap(!!(n!=null&&n.isTextInput),i,o)&&t(Hu())};return Do.add(r),()=>{Do.delete(r)}},e)}function Lp(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=d.useRef({isFocusWithin:!1}),a=d.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),s=Ku(a),l=d.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,s(u))},[r,i,s]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}function Gr(t){const e=me(t);if(Bu()==="virtual"){let n=e.activeElement;$p(()=>{e.activeElement===n&&t.isConnected&&ns(t)})}else ns(t)}function Fp(t){const e=pt(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:o}=t.ownerDocument.defaultView;let{display:a,visibility:s}=o(t);i=a!=="none"&&s!=="hidden"&&s!=="collapse"}return i}function jp(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function Wu(t,e){return t.nodeName!=="#comment"&&Fp(t)&&jp(t,e)&&(!t.parentElement||Wu(t.parentElement,t))}const os=d.createContext(null),Io="react-aria-focus-scope-restore";let ae=null;function Uu(t){let{children:e,contain:n,restoreFocus:r,autoFocus:i}=t,o=d.useRef(null),a=d.useRef(null),s=d.useRef([]),{parentNode:l}=d.useContext(os)||{},u=d.useMemo(()=>new ko({scopeRef:s}),[s]);Pe(()=>{let g=l||ue.root;if(ue.getTreeNode(g.scopeRef)&&ae&&!qr(ae,g.scopeRef)){let h=ue.getTreeNode(ae);h&&(g=h)}g.addChild(u),ue.addNode(u)},[u,l]),Pe(()=>{let g=ue.getTreeNode(s);g&&(g.contain=!!n)},[n]),Pe(()=>{var g;let h=(g=o.current)===null||g===void 0?void 0:g.nextSibling,y=[],f=v=>v.stopPropagation();for(;h&&h!==a.current;)y.push(h),h.addEventListener(Io,f),h=h.nextSibling;return s.current=y,()=>{for(let v of y)v.removeEventListener(Io,f)}},[e]),Gp(s,r,n),Wp(s,n),qp(s,r,n),Vp(s,i),d.useEffect(()=>{const g=me(s.current?s.current[0]:void 0).activeElement;let h=null;if(Le(g,s.current)){for(let y of ue.traverse())y.scopeRef&&Le(g,y.scopeRef.current)&&(h=y);h===ue.getTreeNode(s)&&(ae=h.scopeRef)}},[s]),Pe(()=>()=>{var g,h,y;let f=(y=(h=ue.getTreeNode(s))===null||h===void 0||(g=h.parent)===null||g===void 0?void 0:g.scopeRef)!==null&&y!==void 0?y:null;(s===ae||qr(s,ae))&&(!f||ue.getTreeNode(f))&&(ae=f),ue.removeTreeNode(s)},[s]);let c=d.useMemo(()=>zp(s),[]),p=d.useMemo(()=>({focusManager:c,parentNode:u}),[u,c]);return d.createElement(os.Provider,{value:p},d.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),e,d.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function zp(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:a}=e,s=r||me(n[0]).activeElement,l=n[0].previousElementSibling,u=xt(n),c=qe(u,{tabbable:i,accept:a},n);c.currentNode=Le(s,n)?s:l;let p=c.nextNode();return!p&&o&&(c.currentNode=l,p=c.nextNode()),p&&rt(p,!0),p},focusPrevious(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:a}=e,s=r||me(n[0]).activeElement,l=n[n.length-1].nextElementSibling,u=xt(n),c=qe(u,{tabbable:i,accept:a},n);c.currentNode=Le(s,n)?s:l;let p=c.previousNode();return!p&&o&&(c.currentNode=l,p=c.previousNode()),p&&rt(p,!0),p},focusFirst(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=xt(n),a=qe(o,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let s=a.nextNode();return s&&rt(s,!0),s},focusLast(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=xt(n),a=qe(o,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let s=a.previousNode();return s&&rt(s,!0),s}}}const ga=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],Hp=ga.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ga.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Bp=ga.join(':not([hidden]):not([tabindex="-1"]),');function xt(t){return t[0].parentElement}function An(t){let e=ue.getTreeNode(ae);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function Wp(t,e){let n=d.useRef(void 0),r=d.useRef(void 0);Pe(()=>{let i=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const o=me(i?i[0]:void 0);let a=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!An(t)||u.isComposing)return;let c=o.activeElement,p=t.current;if(!p||!Le(c,p))return;let g=xt(p),h=qe(g,{tabbable:!0},p);if(!c)return;h.currentNode=c;let y=u.shiftKey?h.previousNode():h.nextNode();y||(h.currentNode=u.shiftKey?p[p.length-1].nextElementSibling:p[0].previousElementSibling,y=u.shiftKey?h.previousNode():h.nextNode()),u.preventDefault(),y&&rt(y,!0)},s=u=>{(!ae||qr(ae,t))&&Le(u.target,t.current)?(ae=t,n.current=u.target):An(t)&&!gt(u.target,t)?n.current?n.current.focus():ae&&ae.current&&_o(ae.current):An(t)&&(n.current=u.target)},l=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let c=Bu();if(!((c==="virtual"||c===null)&&Mu()&&Ep())&&o.activeElement&&An(t)&&!gt(o.activeElement,t))if(ae=t,o.body.contains(u.target)){var g;n.current=u.target,(g=n.current)===null||g===void 0||g.focus()}else ae.current&&_o(ae.current)})};return o.addEventListener("keydown",a,!1),o.addEventListener("focusin",s,!1),i==null||i.forEach(u=>u.addEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.addEventListener("focusout",l,!1)),()=>{o.removeEventListener("keydown",a,!1),o.removeEventListener("focusin",s,!1),i==null||i.forEach(u=>u.removeEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.removeEventListener("focusout",l,!1))}},[t,e]),Pe(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function Vu(t){return gt(t)}function Le(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function gt(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of ue.traverse(ue.getTreeNode(e)))if(n&&Le(t,n.current))return!0;return!1}function Up(t){return gt(t,ae)}function qr(t,e){var n;let r=(n=ue.getTreeNode(e))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===t)return!0;r=r.parent}return!1}function rt(t,e=!1){if(t!=null&&!e)try{Gr(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function Gu(t,e=!0){let n=t[0].previousElementSibling,r=xt(t),i=qe(r,{tabbable:e},t);i.currentNode=n;let o=i.nextNode();return e&&!o&&(r=xt(t),i=qe(r,{tabbable:!1},t),i.currentNode=n,o=i.nextNode()),o}function _o(t,e=!0){rt(Gu(t,e))}function Vp(t,e){const n=d.useRef(e);d.useEffect(()=>{if(n.current){ae=t;const r=me(t.current?t.current[0]:void 0);!Le(r.activeElement,ae.current)&&t.current&&_o(t.current)}n.current=!1},[t])}function Gp(t,e,n){Pe(()=>{if(e||n)return;let r=t.current;const i=me(r?r[0]:void 0);let o=a=>{let s=a.target;Le(s,t.current)?ae=t:Vu(s)||(ae=null)};return i.addEventListener("focusin",o,!1),r==null||r.forEach(a=>a.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),r==null||r.forEach(a=>a.removeEventListener("focusin",o,!1))}},[t,e,n])}function as(t){let e=ue.getTreeNode(ae);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function qp(t,e,n){const r=d.useRef(typeof document<"u"?me(t.current?t.current[0]:void 0).activeElement:null);Pe(()=>{let i=t.current;const o=me(i?i[0]:void 0);if(!e||n)return;let a=()=>{(!ae||qr(ae,t))&&Le(o.activeElement,t.current)&&(ae=t)};return o.addEventListener("focusin",a,!1),i==null||i.forEach(s=>s.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),i==null||i.forEach(s=>s.removeEventListener("focusin",a,!1))}},[t,n]),Pe(()=>{const i=me(t.current?t.current[0]:void 0);if(!e)return;let o=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!An(t)||a.isComposing)return;let s=i.activeElement;if(!gt(s,t)||!as(t))return;let l=ue.getTreeNode(t);if(!l)return;let u=l.nodeToRestore,c=qe(i.body,{tabbable:!0});c.currentNode=s;let p=a.shiftKey?c.previousNode():c.nextNode();if((!u||!i.body.contains(u)||u===i.body)&&(u=void 0,l.nodeToRestore=void 0),(!p||!gt(p,t))&&u){c.currentNode=u;do p=a.shiftKey?c.previousNode():c.nextNode();while(gt(p,t));a.preventDefault(),a.stopPropagation(),p?rt(p,!0):Vu(u)?rt(u,!0):s.blur()}};return n||i.addEventListener("keydown",o,!0),()=>{n||i.removeEventListener("keydown",o,!0)}},[t,e,n]),Pe(()=>{const i=me(t.current?t.current[0]:void 0);if(!e)return;let o=ue.getTreeNode(t);if(o){var a;return o.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let s=ue.getTreeNode(t);if(!s)return;let l=s.nodeToRestore;if(e&&l&&(i.activeElement&&gt(i.activeElement,t)||i.activeElement===i.body&&as(t))){let u=ue.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let c=u.getTreeNode(t);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){ss(c.nodeToRestore);return}c=c.parent}for(c=u.getTreeNode(t);c;){if(c.scopeRef&&c.scopeRef.current&&ue.getTreeNode(c.scopeRef)){let p=Gu(c.scopeRef.current,!0);ss(p);return}c=c.parent}}})}}}},[t,e])}function ss(t){t.dispatchEvent(new CustomEvent(Io,{bubbles:!0,cancelable:!0}))&&rt(t)}function qe(t,e,n){let r=e!=null&&e.tabbable?Bp:Hp,i=me(t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var a;return!(e==null||(a=e.from)===null||a===void 0)&&a.contains(o)?NodeFilter.FILTER_REJECT:o.matches(r)&&Wu(o)&&(!n||Le(o,n))&&(!(e!=null&&e.accept)||e.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(i.currentNode=e.from),i}class va{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let i=this.fastMap.get(n??null);if(!i)return;let o=new ko({scopeRef:e});i.addChild(o),o.parent=i,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Le(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var e;let n=new va;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(e=i.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new ko({scopeRef:null}),this.fastMap.set(null,this.root)}}class ko{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let ue=new va;function fi(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=d.useRef({isFocused:!1,isFocusVisible:e||Hu()}),[o,a]=d.useState(!1),[s,l]=d.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=d.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),c=d.useCallback(h=>{i.current.isFocused=h,a(h),u()},[u]);Kp(h=>{i.current.isFocusVisible=h,u()},[],{isTextInput:n});let{focusProps:p}=_p({isDisabled:r,onFocusChange:c}),{focusWithinProps:g}=Lp({isDisabled:!r,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:s,focusProps:r?g:p}}function Yp(t,e){let n=e==null?void 0:e.isDisabled,[r,i]=d.useState(!1);return Pe(()=>{if(t!=null&&t.current&&!n){let o=()=>{if(t.current){let s=qe(t.current,{tabbable:!0});i(!!s.nextNode())}};o();let a=new MutationObserver(o);return a.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{a.disconnect()}}}),n?!1:r}let ln="default",No="",_r=new WeakMap;function ls(t){if(ci()){if(ln==="default"){const e=Ke(t);No=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}ln="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(_r.set(t,t.style.userSelect),t.style.userSelect="none")}function pr(t){if(ci()){if(ln!=="disabled")return;ln="restoring",setTimeout(()=>{Hh(()=>{if(ln==="restoring"){const e=Ke(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=No||""),No="",ln="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&_r.has(t)){let e=_r.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),_r.delete(t)}}const ma=d.createContext({register:()=>{}});ma.displayName="PressResponderContext";function Xp(t){let e=d.useContext(ma);if(e){let{register:n,...r}=e;t=ye(r,t),n()}return Wh(e,t.ref),t}var gr=new WeakMap;class vr{continuePropagation(){is(this,gr,!1)}get shouldStopPropagation(){return Tp(this,gr)}constructor(e,n,r,i){Pp(this,gr,{writable:!0,value:void 0}),is(this,gr,!0);var o;let a=(o=i==null?void 0:i.target)!==null&&o!==void 0?o:r.currentTarget;const s=a==null?void 0:a.getBoundingClientRect();let l,u=0,c,p=null;r.clientX!=null&&r.clientY!=null&&(c=r.clientX,p=r.clientY),s&&(c!=null&&p!=null?(l=c-s.left,u=p-s.top):(l=s.width/2,u=s.height/2)),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=l,this.y=u}}const us=Symbol("linkClicked");function ya(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,isDisabled:a,isPressed:s,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:p,...g}=Xp(t),[h,y]=d.useState(!1),f=d.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:v,removeAllGlobalListeners:m}=xu(),S=De((b,k)=>{let B=f.current;if(a||B.didFirePressStart)return!1;let R=!0;if(B.isTriggeringEvent=!0,r){let z=new vr("pressstart",k,b);r(z),R=z.shouldStopPropagation}return n&&n(!0),B.isTriggeringEvent=!1,B.didFirePressStart=!0,y(!0),R}),w=De((b,k,B=!0)=>{let R=f.current;if(!R.didFirePressStart)return!1;R.ignoreClickAfterPress=!0,R.didFirePressStart=!1,R.isTriggeringEvent=!0;let z=!0;if(i){let E=new vr("pressend",k,b);i(E),z=E.shouldStopPropagation}if(n&&n(!1),y(!1),e&&B&&!a){let E=new vr("press",k,b);e(E),z&&(z=E.shouldStopPropagation)}return R.isTriggeringEvent=!1,z}),O=De((b,k)=>{let B=f.current;if(a)return!1;if(o){B.isTriggeringEvent=!0;let R=new vr("pressup",k,b);return o(R),B.isTriggeringEvent=!1,R.shouldStopPropagation}return!0}),x=De(b=>{let k=f.current;k.isPressed&&k.target&&(k.isOverTarget&&k.pointerType!=null&&w(Qe(k.target,b),k.pointerType,!1),k.isPressed=!1,k.isOverTarget=!1,k.activePointerId=null,k.pointerType=null,m(),c||pr(k.target))}),D=De(b=>{u&&x(b)}),P=d.useMemo(()=>{let b=f.current,k={onKeyDown(R){if(Mi(R.nativeEvent,R.currentTarget)&&R.currentTarget.contains(R.target)){var z;ds(R.target,R.key)&&R.preventDefault();let E=!0;if(!b.isPressed&&!R.repeat){b.target=R.currentTarget,b.isPressed=!0,E=S(R,"keyboard");let I=R.currentTarget,j=V=>{Mi(V,I)&&!V.repeat&&I.contains(V.target)&&b.target&&O(Qe(b.target,V),"keyboard")};v(Ke(R.currentTarget),"keyup",Vn(j,B),!0)}E&&R.stopPropagation(),R.metaKey&&Ot()&&((z=b.metaKeyEvents)===null||z===void 0||z.set(R.key,R.nativeEvent))}else R.key==="Meta"&&(b.metaKeyEvents=new Map)},onClick(R){if(!(R&&!R.currentTarget.contains(R.target))&&R&&R.button===0&&!b.isTriggeringEvent&&!It.isOpening){let z=!0;if(a&&R.preventDefault(),!b.ignoreClickAfterPress&&!b.ignoreEmulatedMouseEvents&&!b.isPressed&&(b.pointerType==="virtual"||$o(R.nativeEvent))){!a&&!l&&$t(R.currentTarget);let E=S(R,"virtual"),I=O(R,"virtual"),j=w(R,"virtual");z=E&&I&&j}b.ignoreEmulatedMouseEvents=!1,b.ignoreClickAfterPress=!1,z&&R.stopPropagation()}}},B=R=>{var z;if(b.isPressed&&b.target&&Mi(R,b.target)){var E;ds(R.target,R.key)&&R.preventDefault();let j=R.target;w(Qe(b.target,R),"keyboard",b.target.contains(j)),m(),R.key!=="Enter"&&ba(b.target)&&b.target.contains(j)&&!R[us]&&(R[us]=!0,It(b.target,R,!1)),b.isPressed=!1,(E=b.metaKeyEvents)===null||E===void 0||E.delete(R.key)}else if(R.key==="Meta"&&(!((z=b.metaKeyEvents)===null||z===void 0)&&z.size)){var I;let j=b.metaKeyEvents;b.metaKeyEvents=void 0;for(let V of j.values())(I=b.target)===null||I===void 0||I.dispatchEvent(new KeyboardEvent("keyup",V))}};if(typeof PointerEvent<"u"){k.onPointerDown=I=>{if(I.button!==0||!I.currentTarget.contains(I.target))return;if(qh(I.nativeEvent)){b.pointerType="virtual";return}Ki(I.currentTarget)&&I.preventDefault(),b.pointerType=I.pointerType;let j=!0;if(!b.isPressed){b.isPressed=!0,b.isOverTarget=!0,b.activePointerId=I.pointerId,b.target=I.currentTarget,!a&&!l&&$t(I.currentTarget),c||ls(b.target),j=S(I,b.pointerType);let V=I.target;"releasePointerCapture"in V&&V.releasePointerCapture(I.pointerId),v(Ke(I.currentTarget),"pointerup",R,!1),v(Ke(I.currentTarget),"pointercancel",E,!1)}j&&I.stopPropagation()},k.onMouseDown=I=>{I.currentTarget.contains(I.target)&&I.button===0&&(Ki(I.currentTarget)&&I.preventDefault(),I.stopPropagation())},k.onPointerUp=I=>{!I.currentTarget.contains(I.target)||b.pointerType==="virtual"||I.button===0&&O(I,b.pointerType||I.pointerType)},k.onPointerEnter=I=>{I.pointerId===b.activePointerId&&b.target&&!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,S(Qe(b.target,I),b.pointerType))},k.onPointerLeave=I=>{I.pointerId===b.activePointerId&&b.target&&b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,w(Qe(b.target,I),b.pointerType,!1),D(I))};let R=I=>{I.pointerId===b.activePointerId&&b.isPressed&&I.button===0&&b.target&&(b.target.contains(I.target)&&b.pointerType!=null?w(Qe(b.target,I),b.pointerType):b.isOverTarget&&b.pointerType!=null&&w(Qe(b.target,I),b.pointerType,!1),b.isPressed=!1,b.isOverTarget=!1,b.activePointerId=null,b.pointerType=null,m(),c||pr(b.target),"ontouchend"in b.target&&I.pointerType!=="mouse"&&v(b.target,"touchend",z,{once:!0}))},z=I=>{qu(I.currentTarget)&&I.preventDefault()},E=I=>{x(I)};k.onDragStart=I=>{I.currentTarget.contains(I.target)&&x(I)}}else{k.onMouseDown=E=>{if(E.button!==0||!E.currentTarget.contains(E.target))return;if(Ki(E.currentTarget)&&E.preventDefault(),b.ignoreEmulatedMouseEvents){E.stopPropagation();return}b.isPressed=!0,b.isOverTarget=!0,b.target=E.currentTarget,b.pointerType=$o(E.nativeEvent)?"virtual":"mouse",!a&&!l&&$t(E.currentTarget),S(E,b.pointerType)&&E.stopPropagation(),v(Ke(E.currentTarget),"mouseup",R,!1)},k.onMouseEnter=E=>{if(!E.currentTarget.contains(E.target))return;let I=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!0,I=S(E,b.pointerType)),I&&E.stopPropagation()},k.onMouseLeave=E=>{if(!E.currentTarget.contains(E.target))return;let I=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!1,I=w(E,b.pointerType,!1),D(E)),I&&E.stopPropagation()},k.onMouseUp=E=>{E.currentTarget.contains(E.target)&&!b.ignoreEmulatedMouseEvents&&E.button===0&&O(E,b.pointerType||"mouse")};let R=E=>{if(E.button===0){if(b.isPressed=!1,m(),b.ignoreEmulatedMouseEvents){b.ignoreEmulatedMouseEvents=!1;return}b.target&&Ai(E,b.target)&&b.pointerType!=null?w(Qe(b.target,E),b.pointerType):b.target&&b.isOverTarget&&b.pointerType!=null&&w(Qe(b.target,E),b.pointerType,!1),b.isOverTarget=!1}};k.onTouchStart=E=>{if(!E.currentTarget.contains(E.target))return;let I=Jp(E.nativeEvent);if(!I)return;b.activePointerId=I.identifier,b.ignoreEmulatedMouseEvents=!0,b.isOverTarget=!0,b.isPressed=!0,b.target=E.currentTarget,b.pointerType="touch",!a&&!l&&$t(E.currentTarget),c||ls(b.target),S(lt(b.target,E),b.pointerType)&&E.stopPropagation(),v(mn(E.currentTarget),"scroll",z,!0)},k.onTouchMove=E=>{if(!E.currentTarget.contains(E.target))return;if(!b.isPressed){E.stopPropagation();return}let I=cs(E.nativeEvent,b.activePointerId),j=!0;I&&Ai(I,E.currentTarget)?!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,j=S(lt(b.target,E),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,j=w(lt(b.target,E),b.pointerType,!1),D(lt(b.target,E))),j&&E.stopPropagation()},k.onTouchEnd=E=>{if(!E.currentTarget.contains(E.target))return;if(!b.isPressed){E.stopPropagation();return}let I=cs(E.nativeEvent,b.activePointerId),j=!0;I&&Ai(I,E.currentTarget)&&b.pointerType!=null?(O(lt(b.target,E),b.pointerType),j=w(lt(b.target,E),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(j=w(lt(b.target,E),b.pointerType,!1)),j&&E.stopPropagation(),b.isPressed=!1,b.activePointerId=null,b.isOverTarget=!1,b.ignoreEmulatedMouseEvents=!0,b.target&&!c&&pr(b.target),m()},k.onTouchCancel=E=>{E.currentTarget.contains(E.target)&&(E.stopPropagation(),b.isPressed&&x(lt(b.target,E)))};let z=E=>{b.isPressed&&E.target.contains(b.target)&&x({currentTarget:b.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};k.onDragStart=E=>{E.currentTarget.contains(E.target)&&x(E)}}return k},[v,a,l,m,c,x,D,w,S,O]);return d.useEffect(()=>()=>{var b;c||pr((b=f.current.target)!==null&&b!==void 0?b:void 0)},[c]),{isPressed:s||h,pressProps:ye(g,P)}}function ba(t){return t.tagName==="A"&&t.hasAttribute("href")}function Mi(t,e){const{key:n,code:r}=t,i=e,o=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof mn(i).HTMLInputElement&&!Yu(i,n)||i instanceof mn(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&ba(i))&&n!=="Enter")}function Jp(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function cs(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===e)return i}return null}function lt(t,e){let n=0,r=0;return e.targetTouches&&e.targetTouches.length===1&&(n=e.targetTouches[0].clientX,r=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function Qe(t,e){let n=e.clientX,r=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function Qp(t){let e=0,n=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?n=t.height/2:t.radiusY!==void 0&&(n=t.radiusY),{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}function Zp(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Ai(t,e){let n=e.getBoundingClientRect(),r=Qp(t);return Zp(n,r)}function Ki(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function qu(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!ba(t)}function ds(t,e){return t instanceof HTMLInputElement?!Yu(t,e):qu(t)}const eg=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Yu(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":eg.has(t.type)}function tg({children:t}){let e=d.useMemo(()=>({register:()=>{}}),[]);return d.createElement(ma.Provider,{value:e},t)}class ng{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}}function Xu(t){let e=d.useRef({isFocused:!1,observer:null});pe(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=De(r=>{t==null||t(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,o=a=>{e.current.isFocused=!1,i.disabled&&n(new ng("blur",a)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var a;(a=e.current.observer)===null||a===void 0||a.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function rg(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=d.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),a=Xu(o),s=d.useCallback(l=>{const u=Ke(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),a(l))},[i,n,a]);return{focusProps:{onFocus:!e&&(n||i||r)?s:void 0,onBlur:!e&&(r||i)?o:void 0}}}let Cn=null,ig=new Set,Bn=new Map,kt=!1,Ro=!1;function Sa(t,e){for(let n of ig)n(t,e)}function og(t){return!(t.metaKey||!Ot()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Yr(t){kt=!0,og(t)&&(Cn="keyboard",Sa("keyboard",t))}function Re(t){Cn="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(kt=!0,Sa("pointer",t))}function Ju(t){$o(t)&&(kt=!0,Cn="virtual")}function Qu(t){t.target===window||t.target===document||(!kt&&!Ro&&(Cn="virtual",Sa("virtual",t)),kt=!1,Ro=!1)}function Zu(){kt=!1,Ro=!0}function fs(t){if(typeof window>"u"||Bn.get(mn(t)))return;const e=mn(t),n=Ke(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){kt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Yr,!0),n.addEventListener("keyup",Yr,!0),n.addEventListener("click",Ju,!0),e.addEventListener("focus",Qu,!0),e.addEventListener("blur",Zu,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Re,!0),n.addEventListener("pointermove",Re,!0),n.addEventListener("pointerup",Re,!0)):(n.addEventListener("mousedown",Re,!0),n.addEventListener("mousemove",Re,!0),n.addEventListener("mouseup",Re,!0)),e.addEventListener("beforeunload",()=>{ec(t)},{once:!0}),Bn.set(e,{focus:r})}const ec=(t,e)=>{const n=mn(t),r=Ke(t);e&&r.removeEventListener("DOMContentLoaded",e),Bn.has(n)&&(n.HTMLElement.prototype.focus=Bn.get(n).focus,r.removeEventListener("keydown",Yr,!0),r.removeEventListener("keyup",Yr,!0),r.removeEventListener("click",Ju,!0),n.removeEventListener("focus",Qu,!0),n.removeEventListener("blur",Zu,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Re,!0),r.removeEventListener("pointermove",Re,!0),r.removeEventListener("pointerup",Re,!0)):(r.removeEventListener("mousedown",Re,!0),r.removeEventListener("mousemove",Re,!0),r.removeEventListener("mouseup",Re,!0)),Bn.delete(n))};function ag(t){const e=Ke(t);let n;return e.readyState!=="loading"?fs(t):(n=()=>{fs(t)},e.addEventListener("DOMContentLoaded",n)),()=>ec(t,n)}typeof document<"u"&&ag();function sg(){return Cn!=="pointer"}function hs(){return Cn}function tc(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=d.useRef({isFocusWithin:!1}),a=d.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),s=Xu(a),l=d.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,s(u))},[r,i,s]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}let Xr=!1,Li=0;function Mo(){Xr=!0,setTimeout(()=>{Xr=!1},50)}function ps(t){t.pointerType==="touch"&&Mo()}function lg(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",ps):document.addEventListener("touchend",Mo),Li++,()=>{Li--,!(Li>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",ps):document.removeEventListener("touchend",Mo))}}function wa(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:i}=t,[o,a]=d.useState(!1),s=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(lg,[]);let{hoverProps:l,triggerHoverEnd:u}=d.useMemo(()=>{let c=(h,y)=>{if(s.pointerType=y,i||y==="touch"||s.isHovered||!h.currentTarget.contains(h.target))return;s.isHovered=!0;let f=h.currentTarget;s.target=f,e&&e({type:"hoverstart",target:f,pointerType:y}),n&&n(!0),a(!0)},p=(h,y)=>{if(s.pointerType="",s.target=null,y==="touch"||!s.isHovered)return;s.isHovered=!1;let f=h.currentTarget;r&&r({type:"hoverend",target:f,pointerType:y}),n&&n(!1),a(!1)},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=h=>{Xr&&h.pointerType==="mouse"||c(h,h.pointerType)},g.onPointerLeave=h=>{!i&&h.currentTarget.contains(h.target)&&p(h,h.pointerType)}):(g.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=h=>{!s.ignoreEmulatedMouseEvents&&!Xr&&c(h,"mouse"),s.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=h=>{!i&&h.currentTarget.contains(h.target)&&p(h,"mouse")}),{hoverProps:g,triggerHoverEnd:p}},[e,n,r,i,s]);return d.useEffect(()=>{i&&u({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:l,isHovered:o}}function ug(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=t,o=d.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=De(l=>{n&&mr(l,e)&&(i&&i(l),o.current.isPointerDown=!0)}),s=De(l=>{n&&n(l)});d.useEffect(()=>{let l=o.current;if(r)return;const u=e.current,c=Ke(u);if(typeof PointerEvent<"u"){let p=g=>{l.isPointerDown&&mr(g,e)&&s(g),l.isPointerDown=!1};return c.addEventListener("pointerdown",a,!0),c.addEventListener("pointerup",p,!0),()=>{c.removeEventListener("pointerdown",a,!0),c.removeEventListener("pointerup",p,!0)}}else{let p=h=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&mr(h,e)&&s(h),l.isPointerDown=!1},g=h=>{l.ignoreEmulatedMouseEvents=!0,l.isPointerDown&&mr(h,e)&&s(h),l.isPointerDown=!1};return c.addEventListener("mousedown",a,!0),c.addEventListener("mouseup",p,!0),c.addEventListener("touchstart",a,!0),c.addEventListener("touchend",g,!0),()=>{c.removeEventListener("mousedown",a,!0),c.removeEventListener("mouseup",p,!0),c.removeEventListener("touchstart",a,!0),c.removeEventListener("touchend",g,!0)}}},[e,r,a,s])}function mr(t,e){if(t.button>0)return!1;if(t.target){const n=t.target.ownerDocument;if(!n||!n.documentElement.contains(t.target)||t.target.closest("[data-react-aria-top-layer]"))return!1}return e.current&&!e.current.contains(t.target)}function gs(t){if(!t)return;let e=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){e?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):e=!0},continuePropagation(){e=!1},isPropagationStopped(){return e}};t(r),e&&n.stopPropagation()}}function cg(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:gs(t.onKeyDown),onKeyUp:gs(t.onKeyUp)}}}const dg=500;function fg(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:o=dg,accessibilityDescription:a}=t;const s=d.useRef(void 0);let{addGlobalListener:l,removeGlobalListener:u}=xu(),{pressProps:c}=ya({isDisabled:e,onPressStart(g){if(g.continuePropagation(),(g.pointerType==="mouse"||g.pointerType==="touch")&&(n&&n({...g,type:"longpressstart"}),s.current=setTimeout(()=>{g.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...g,type:"longpress"}),s.current=void 0},o),g.pointerType==="touch")){let h=y=>{y.preventDefault()};l(g.target,"contextmenu",h,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{u(g.target,"contextmenu",h)},30)},{once:!0})}},onPressEnd(g){s.current&&clearTimeout(s.current),r&&(g.pointerType==="mouse"||g.pointerType==="touch")&&r({...g,type:"longpressend"})}}),p=Gh(i&&!e?a:void 0);return{longPressProps:ye(c,p)}}const hg=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),pg=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gg(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return hg.has(n.script)}let e=t.split("-")[0];return pg.has(e)}const vg=Symbol.for("react-aria.i18n.locale");function nc(){let t=typeof window<"u"&&window[vg]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:gg(t)?"rtl":"ltr"}}let Ao=nc(),Kn=new Set;function vs(){Ao=nc();for(let t of Kn)t(Ao)}function mg(){let t=En(),[e,n]=d.useState(Ao);return d.useEffect(()=>(Kn.size===0&&window.addEventListener("languagechange",vs),Kn.add(n),()=>{Kn.delete(n),Kn.size===0&&window.removeEventListener("languagechange",vs)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const yg=d.createContext(null);function or(){let t=mg();return d.useContext(yg)||t}var Ge=function(){return Ge=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ge.apply(this,arguments)};function rc(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function bg(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}const Sg=Symbol.for("react-aria.i18n.locale"),wg=Symbol.for("react-aria.i18n.strings");let Wt;class hi{getStringForLocale(e,n){let i=this.getStringsForLocale(n)[e];if(!i)throw new Error(`Could not find intl message ${e} in ${n} locale`);return i}getStringsForLocale(e){let n=this.strings[e];return n||(n=Eg(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[Sg];if(Wt===void 0){let i=window[wg];if(!i)return null;Wt={};for(let o in i)Wt[o]=new hi({[n]:i[o]},n)}let r=Wt==null?void 0:Wt[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=n}}function Eg(t,e,n="en-US"){if(e[t])return e[t];let r=$g(t);if(e[r])return e[r];for(let i in e)if(i.startsWith(r+"-"))return e[i];return e[n]}function $g(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const ms=new Map,ys=new Map;class xg{format(e,n){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(n,this):r}plural(e,n,r="cardinal"){let i=n["="+e];if(i)return typeof i=="function"?i():i;let o=this.locale+":"+r,a=ms.get(o);a||(a=new Intl.PluralRules(this.locale,{type:r}),ms.set(o,a));let s=a.select(e);return i=n[s]||n.other,typeof i=="function"?i():i}number(e){let n=ys.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),ys.set(this.locale,n)),n.format(e)}select(e,n){let r=e[n]||e.other;return typeof r=="function"?r():r}constructor(e,n){this.locale=e,this.strings=n}}const bs=new WeakMap;function Cg(t){let e=bs.get(t);return e||(e=new hi(t),bs.set(t,e)),e}function Tg(t,e){return e&&hi.getGlobalDictionaryForPackage(e)||Cg(t)}function Dg(t,e){let{locale:n}=or(),r=Tg(t,e);return d.useMemo(()=>new xg(n,r),[n,r])}let Fi=new Map;function Pg(t){let{locale:e}=or(),n=e+(t?Object.entries(t).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(Fi.has(n))return Fi.get(n);let r=new Intl.Collator(e,t);return Fi.set(n,r),r}const Ss={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function Og(t={}){let{style:e,isFocusable:n}=t,[r,i]=d.useState(!1),{focusWithinProps:o}=tc({isDisabled:!n,onFocusWithinChange:s=>i(s)}),a=d.useMemo(()=>r?e:e?{...Ss,...e}:Ss,[r]);return{visuallyHiddenProps:{...o,style:a}}}function Ig(t){let{children:e,elementType:n="div",isFocusable:r,style:i,...o}=t,{visuallyHiddenProps:a}=Og(t);return d.createElement(n,ye(o,a),e)}const Ye={top:"top",bottom:"top",left:"left",right:"left"},Jr={top:"bottom",bottom:"top",left:"right",right:"left"},_g={top:"left",left:"top"},Ko={top:"height",left:"width"},ic={width:"totalWidth",height:"totalHeight"},yr={};let fe=typeof document<"u"?window.visualViewport:null;function ws(t){let e=0,n=0,r=0,i=0,o=0,a=0,s={};var l;let u=((l=fe==null?void 0:fe.scale)!==null&&l!==void 0?l:1)>1;if(t.tagName==="BODY"){let y=document.documentElement;r=y.clientWidth,i=y.clientHeight;var c;e=(c=fe==null?void 0:fe.width)!==null&&c!==void 0?c:r;var p;n=(p=fe==null?void 0:fe.height)!==null&&p!==void 0?p:i,s.top=y.scrollTop||t.scrollTop,s.left=y.scrollLeft||t.scrollLeft,fe&&(o=fe.offsetTop,a=fe.offsetLeft)}else({width:e,height:n,top:o,left:a}=fn(t)),s.top=t.scrollTop,s.left=t.scrollLeft,r=e,i=n;if(wu()&&(t.tagName==="BODY"||t.tagName==="HTML")&&u){s.top=0,s.left=0;var g;o=(g=fe==null?void 0:fe.pageTop)!==null&&g!==void 0?g:0;var h;a=(h=fe==null?void 0:fe.pageLeft)!==null&&h!==void 0?h:0}return{width:e,height:n,totalWidth:r,totalHeight:i,scroll:s,top:o,left:a}}function kg(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Es(t,e,n,r,i,o,a){var s;let l=(s=i.scroll[t])!==null&&s!==void 0?s:0,u=r[Ko[t]],c=r.scroll[Ye[t]]+o,p=u+r.scroll[Ye[t]]-o,g=e-l+a[t]-r[Ye[t]],h=e-l+n+a[t]-r[Ye[t]];return g<c?c-g:h>p?Math.max(p-h,c-g):0}function Ng(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function $s(t){if(yr[t])return yr[t];let[e,n]=t.split(" "),r=Ye[e]||"right",i=_g[r];Ye[n]||(n="center");let o=Ko[r],a=Ko[i];return yr[t]={placement:e,crossPlacement:n,axis:r,crossAxis:i,size:o,crossSize:a},yr[t]}function ji(t,e,n,r,i,o,a,s,l,u){let{placement:c,crossPlacement:p,axis:g,crossAxis:h,size:y,crossSize:f}=r,v={};var m;v[h]=(m=t[h])!==null&&m!==void 0?m:0;var S,w,O,x;p==="center"?v[h]+=(((S=t[f])!==null&&S!==void 0?S:0)-((w=n[f])!==null&&w!==void 0?w:0))/2:p!==h&&(v[h]+=((O=t[f])!==null&&O!==void 0?O:0)-((x=n[f])!==null&&x!==void 0?x:0)),v[h]+=o;const D=t[h]-n[f]+l+u,P=t[h]+t[f]-l-u;if(v[h]=xo(v[h],D,P),c===g){const b=s?a[y]:e[ic[y]];v[Jr[g]]=Math.floor(b-t[g]+i)}else v[g]=Math.floor(t[g]+t[y]+i);return v}function Rg(t,e,n,r,i,o,a,s){const l=r?n.height:e[ic.height];var u;let c=t.top!=null?n.top+t.top:n.top+(l-((u=t.bottom)!==null&&u!==void 0?u:0)-a);var p,g,h,y,f,v;let m=s!=="top"?Math.max(0,e.height+e.top+((p=e.scroll.top)!==null&&p!==void 0?p:0)-c-(((g=i.top)!==null&&g!==void 0?g:0)+((h=i.bottom)!==null&&h!==void 0?h:0)+o)):Math.max(0,c+a-(e.top+((y=e.scroll.top)!==null&&y!==void 0?y:0))-(((f=i.top)!==null&&f!==void 0?f:0)+((v=i.bottom)!==null&&v!==void 0?v:0)+o));return Math.min(e.height-o*2,m)}function xs(t,e,n,r,i,o){let{placement:a,axis:s,size:l}=o;var u,c;if(a===s)return Math.max(0,n[s]-t[s]-((u=t.scroll[s])!==null&&u!==void 0?u:0)+e[s]-((c=r[s])!==null&&c!==void 0?c:0)-r[Jr[s]]-i);var p;return Math.max(0,t[l]+t[s]+t.scroll[s]-e[s]-n[s]-n[l]-((p=r[s])!==null&&p!==void 0?p:0)-r[Jr[s]]-i)}function Mg(t,e,n,r,i,o,a,s,l,u,c,p,g,h,y,f){let v=$s(t),{size:m,crossAxis:S,crossSize:w,placement:O,crossPlacement:x}=v,D=ji(e,s,n,v,c,p,u,g,y,f),P=c,b=xs(s,u,e,i,o+c,v);if(a&&r[m]>b){let L=$s(`${Jr[O]} ${x}`),K=ji(e,s,n,L,c,p,u,g,y,f);xs(s,u,e,i,o+c,L)>b&&(v=L,D=K,P=c)}let k="bottom";v.axis==="top"?v.placement==="top"?k="top":v.placement==="bottom"&&(k="bottom"):v.crossAxis==="top"&&(v.crossPlacement==="top"?k="bottom":v.crossPlacement==="bottom"&&(k="top"));let B=Es(S,D[S],n[w],s,l,o,u);D[S]+=B;let R=Rg(D,s,u,g,i,o,n.height,k);h&&h<R&&(R=h),n.height=Math.min(n.height,R),D=ji(e,s,n,v,P,p,u,g,y,f),B=Es(S,D[S],n[w],s,l,o,u),D[S]+=B;let z={},E=e[S]+.5*e[w]-D[S]-i[Ye[S]];const I=y/2+f;var j,V,A,_;const H=Ye[S]==="left"?((j=i.left)!==null&&j!==void 0?j:0)+((V=i.right)!==null&&V!==void 0?V:0):((A=i.top)!==null&&A!==void 0?A:0)+((_=i.bottom)!==null&&_!==void 0?_:0),Y=n[w]-H-y/2-f,Q=e[S]+y/2-(D[S]+i[Ye[S]]),M=e[S]+e[w]-y/2-(D[S]+i[Ye[S]]),N=xo(E,Q,M);return z[S]=xo(N,I,Y),{position:D,maxHeight:R,arrowOffsetLeft:z.left,arrowOffsetTop:z.top,placement:v.placement}}function Ag(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:i,padding:o,shouldFlip:a,boundaryElement:s,offset:l,crossOffset:u,maxHeight:c,arrowSize:p=0,arrowBoundaryOffset:g=0}=t,h=r instanceof HTMLElement?Kg(r):document.documentElement,y=h===document.documentElement;const f=window.getComputedStyle(h).position;let v=!!f&&f!=="static",m=y?fn(n):Cs(n,h);if(!y){let{marginTop:z,marginLeft:E}=window.getComputedStyle(n);m.top+=parseInt(z,10)||0,m.left+=parseInt(E,10)||0}let S=fn(r),w=Ng(r);var O,x;S.width+=((O=w.left)!==null&&O!==void 0?O:0)+((x=w.right)!==null&&x!==void 0?x:0);var D,P;S.height+=((D=w.top)!==null&&D!==void 0?D:0)+((P=w.bottom)!==null&&P!==void 0?P:0);let b=kg(i),k=ws(s),B=ws(h),R=s.tagName==="BODY"?fn(h):Cs(h,s);return h.tagName==="HTML"&&s.tagName==="BODY"&&(B.scroll.top=0,B.scroll.left=0),Mg(e,m,S,b,w,o,a,k,B,R,l,u,v,c,p,g)}function fn(t){let{top:e,left:n,width:r,height:i}=t.getBoundingClientRect(),{scrollTop:o,scrollLeft:a,clientTop:s,clientLeft:l}=document.documentElement;return{top:e+o-s,left:n+a-l,width:r,height:i}}function Cs(t,e){let n=window.getComputedStyle(t),r;if(n.position==="fixed"){let{top:i,left:o,width:a,height:s}=t.getBoundingClientRect();r={top:i,left:o,width:a,height:s}}else{r=fn(t);let i=fn(e),o=window.getComputedStyle(e);i.top+=(parseInt(o.borderTopWidth,10)||0)-e.scrollTop,i.left+=(parseInt(o.borderLeftWidth,10)||0)-e.scrollLeft,r.top-=i.top,r.left-=i.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function Kg(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Ts(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!Ts(e);)e=e.parentElement;return e||document.documentElement}function Ts(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const Lg=new WeakMap;function Fg(t){let{triggerRef:e,isOpen:n,onClose:r}=t;d.useEffect(()=>{if(!n||r===null)return;let i=o=>{let a=o.target;if(!e.current||a instanceof Node&&!a.contains(e.current)||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement)return;let s=r||Lg.get(e.current);s&&s()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,e])}let le=typeof document<"u"?window.visualViewport:null;function jg(t){let{direction:e}=or(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:o=i,placement:a="bottom",containerPadding:s=12,shouldFlip:l=!0,boundaryElement:u=typeof document<"u"?document.body:null,offset:c=0,crossOffset:p=0,shouldUpdatePosition:g=!0,isOpen:h=!0,onClose:y,maxHeight:f,arrowBoundaryOffset:v=0}=t,[m,S]=d.useState(null),w=[g,a,i.current,r.current,o.current,s,l,u,c,p,h,e,f,v,n],O=d.useRef(le==null?void 0:le.scale);d.useEffect(()=>{h&&(O.current=le==null?void 0:le.scale)},[h]);let x=d.useCallback(()=>{if(g===!1||!h||!i.current||!r.current||!u||(le==null?void 0:le.scale)!==O.current)return;let B=null;if(o.current&&o.current.contains(document.activeElement)){var R;let _=(R=document.activeElement)===null||R===void 0?void 0:R.getBoundingClientRect(),H=o.current.getBoundingClientRect();var z;if(B={type:"top",offset:((z=_==null?void 0:_.top)!==null&&z!==void 0?z:0)-H.top},B.offset>H.height/2){B.type="bottom";var E;B.offset=((E=_==null?void 0:_.bottom)!==null&&E!==void 0?E:0)-H.bottom}}let I=i.current;if(!f&&i.current){var j;I.style.top="0px",I.style.bottom="";var V;I.style.maxHeight=((V=(j=window.visualViewport)===null||j===void 0?void 0:j.height)!==null&&V!==void 0?V:window.innerHeight)+"px"}let A=Ag({placement:Hg(a,e),overlayNode:i.current,targetNode:r.current,scrollNode:o.current||i.current,padding:s,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:p,maxHeight:f,arrowSize:n,arrowBoundaryOffset:v});if(A.position){if(I.style.top="",I.style.bottom="",I.style.left="",I.style.right="",Object.keys(A.position).forEach(_=>I.style[_]=A.position[_]+"px"),I.style.maxHeight=A.maxHeight!=null?A.maxHeight+"px":"",B&&document.activeElement&&o.current){let _=document.activeElement.getBoundingClientRect(),H=o.current.getBoundingClientRect(),Y=_[B.type]-H[B.type];o.current.scrollTop+=Y-B.offset}S(A)}},w);pe(x,w),zg(x),qa({ref:i,onResize:x}),qa({ref:r,onResize:x});let D=d.useRef(!1);pe(()=>{let B,R=()=>{D.current=!0,clearTimeout(B),B=setTimeout(()=>{D.current=!1},500),x()},z=()=>{D.current&&R()};return le==null||le.addEventListener("resize",R),le==null||le.addEventListener("scroll",z),()=>{le==null||le.removeEventListener("resize",R),le==null||le.removeEventListener("scroll",z)}},[x]);let P=d.useCallback(()=>{D.current||y==null||y()},[y,D]);Fg({triggerRef:r,isOpen:h,onClose:y&&P});var b,k;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...m==null?void 0:m.position,maxHeight:(b=m==null?void 0:m.maxHeight)!==null&&b!==void 0?b:"100vh"}},placement:(k=m==null?void 0:m.placement)!==null&&k!==void 0?k:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:m==null?void 0:m.arrowOffsetLeft,top:m==null?void 0:m.arrowOffsetTop}},updatePosition:x}}function zg(t){pe(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function Hg(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const Ze=[];function Bg(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=t;d.useEffect(()=>(i&&Ze.push(e),()=>{let y=Ze.indexOf(e);y>=0&&Ze.splice(y,1)}),[i,e]);let l=()=>{Ze[Ze.length-1]===e&&n&&n()},u=y=>{(!s||s(y.target))&&Ze[Ze.length-1]===e&&(y.stopPropagation(),y.preventDefault())},c=y=>{(!s||s(y.target))&&(Ze[Ze.length-1]===e&&(y.stopPropagation(),y.preventDefault()),l())},p=y=>{y.key==="Escape"&&!a&&!y.nativeEvent.isComposing&&(y.stopPropagation(),y.preventDefault(),l())};ug({ref:e,onInteractOutside:o&&i?c:void 0,onInteractOutsideStart:u});let{focusWithinProps:g}=tc({isDisabled:!r,onBlurWithin:y=>{!y.relatedTarget||Up(y.relatedTarget)||(!s||s(y.relatedTarget))&&(n==null||n())}}),h=y=>{y.target===y.currentTarget&&y.preventDefault()};return{overlayProps:{onKeyDown:p,...g},underlayProps:{onPointerDown:h}}}const zi=typeof document<"u"&&window.visualViewport,Wg=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let br=0,Hi;function Ug(t={}){let{isDisabled:e}=t;pe(()=>{if(!e)return br++,br===1&&(ci()?Hi=Gg():Hi=Vg()),()=>{br--,br===0&&Hi()}},[e])}function Vg(){return Vn(un(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),un(document.documentElement,"overflow","hidden"))}function Gg(){let t,e,n=u=>{t=Cu(u.target,!0),!(t===document.documentElement&&t===document.body)&&t instanceof HTMLElement&&window.getComputedStyle(t).overscrollBehavior==="auto"&&(e=un(t,"overscrollBehavior","contain"))},r=u=>{if(!t||t===document.documentElement||t===document.body){u.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&u.preventDefault()},i=()=>{e&&e()},o=u=>{let c=u.target;qg(c)&&(s(),c.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{c.style.transform="",zi&&(zi.height<window.innerHeight?requestAnimationFrame(()=>{Ds(c)}):zi.addEventListener("resize",()=>Ds(c),{once:!0}))}))},a=null,s=()=>{if(a)return;let u=()=>{window.scrollTo(0,0)},c=window.pageXOffset,p=window.pageYOffset;a=Vn(In(window,"scroll",u),un(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),un(document.documentElement,"overflow","hidden"),un(document.body,"marginTop",`-${p}px`),()=>{window.scrollTo(c,p)}),window.scrollTo(0,0)},l=Vn(In(document,"touchstart",n,{passive:!1,capture:!0}),In(document,"touchmove",r,{passive:!1,capture:!0}),In(document,"touchend",i,{passive:!1,capture:!0}),In(document,"focus",o,!0));return()=>{e==null||e(),a==null||a(),l()}}function un(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function In(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function Ds(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=Cu(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,o=n.getBoundingClientRect().top;o>i+n.clientHeight&&(r.scrollTop+=o-i)}n=r.parentElement}}function qg(t){return t instanceof HTMLInputElement&&!Wg.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}var oc={};oc={dismiss:"تجاهل"};var ac={};ac={dismiss:"Отхвърляне"};var sc={};sc={dismiss:"Odstranit"};var lc={};lc={dismiss:"Luk"};var uc={};uc={dismiss:"Schließen"};var cc={};cc={dismiss:"Απόρριψη"};var dc={};dc={dismiss:"Dismiss"};var fc={};fc={dismiss:"Descartar"};var hc={};hc={dismiss:"Lõpeta"};var pc={};pc={dismiss:"Hylkää"};var gc={};gc={dismiss:"Rejeter"};var vc={};vc={dismiss:"התעלם"};var mc={};mc={dismiss:"Odbaci"};var yc={};yc={dismiss:"Elutasítás"};var bc={};bc={dismiss:"Ignora"};var Sc={};Sc={dismiss:"閉じる"};var wc={};wc={dismiss:"무시"};var Ec={};Ec={dismiss:"Atmesti"};var $c={};$c={dismiss:"Nerādīt"};var xc={};xc={dismiss:"Lukk"};var Cc={};Cc={dismiss:"Negeren"};var Tc={};Tc={dismiss:"Zignoruj"};var Dc={};Dc={dismiss:"Descartar"};var Pc={};Pc={dismiss:"Dispensar"};var Oc={};Oc={dismiss:"Revocare"};var Ic={};Ic={dismiss:"Пропустить"};var _c={};_c={dismiss:"Zrušiť"};var kc={};kc={dismiss:"Opusti"};var Nc={};Nc={dismiss:"Odbaci"};var Rc={};Rc={dismiss:"Avvisa"};var Mc={};Mc={dismiss:"Kapat"};var Ac={};Ac={dismiss:"Скасувати"};var Kc={};Kc={dismiss:"取消"};var Lc={};Lc={dismiss:"關閉"};var Fc={};Fc={"ar-AE":oc,"bg-BG":ac,"cs-CZ":sc,"da-DK":lc,"de-DE":uc,"el-GR":cc,"en-US":dc,"es-ES":fc,"et-EE":hc,"fi-FI":pc,"fr-FR":gc,"he-IL":vc,"hr-HR":mc,"hu-HU":yc,"it-IT":bc,"ja-JP":Sc,"ko-KR":wc,"lt-LT":Ec,"lv-LV":$c,"nb-NO":xc,"nl-NL":Cc,"pl-PL":Tc,"pt-BR":Dc,"pt-PT":Pc,"ro-RO":Oc,"ru-RU":Ic,"sk-SK":_c,"sl-SI":kc,"sr-SP":Nc,"sv-SE":Rc,"tr-TR":Mc,"uk-UA":Ac,"zh-CN":Kc,"zh-TW":Lc};function Yg(t){return t&&t.__esModule?t.default:t}function Ps(t){let{onDismiss:e,...n}=t,r=Dg(Yg(Fc),"@react-aria/overlays"),i=sa(n,r.format("dismiss")),o=()=>{e&&e()};return d.createElement(Ig,null,d.createElement("button",{...i,tabIndex:-1,onClick:o,style:{width:1,height:1}}))}let _n=new WeakMap,Ie=[];function Xg(t,e=document.body){let n=new Set(t),r=new Set,i=l=>{for(let g of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(g);let u=g=>{if(n.has(g)||g.parentElement&&r.has(g.parentElement)&&g.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let h of n)if(g.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),p=u(l);if(p===NodeFilter.FILTER_ACCEPT&&o(l),p!==NodeFilter.FILTER_REJECT){let g=c.nextNode();for(;g!=null;)o(g),g=c.nextNode()}},o=l=>{var u;let c=(u=_n.get(l))!==null&&u!==void 0?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),_n.set(l,c+1))};Ie.length&&Ie[Ie.length-1].disconnect(),i(e);let a=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(c=>c.contains(u.target))){for(let c of u.removedNodes)c instanceof Element&&(n.delete(c),r.delete(c));for(let c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?n.add(c):c instanceof Element&&i(c)}});a.observe(e,{childList:!0,subtree:!0});let s={observe(){a.observe(e,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return Ie.push(s),()=>{a.disconnect();for(let l of r){let u=_n.get(l);u!=null&&(u===1?(l.removeAttribute("aria-hidden"),_n.delete(l)):_n.set(l,u-1))}s===Ie[Ie.length-1]?(Ie.pop(),Ie.length&&Ie[Ie.length-1].observe()):Ie.splice(Ie.indexOf(s),1)}}function Jg(t,e){let{triggerRef:n,popoverRef:r,isNonModal:i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a,...s}=t,{overlayProps:l,underlayProps:u}=Bg({isOpen:e.isOpen&&!s["data-react-aria-top-layer"],onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a},r),{overlayProps:c,arrowProps:p,placement:g}=jg({...s,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:i?e.close:null});return Ug({isDisabled:i||!e.isOpen}),pe(()=>{if(e.isOpen&&!i&&r.current)return Xg([r.current])},[i,e.isOpen,r]),{popoverProps:ye(l,c),arrowProps:p,underlayProps:u,placement:g}}const Qg=d.createContext({});function Zg(){var t;return(t=d.useContext(Qg))!==null&&t!==void 0?t:{}}const ev=d.createContext(null);function tv(t){let e=En(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[i,o]=d.useState(!1),a=d.useMemo(()=>({contain:i,setContain:o}),[i,o]),{getContainer:s}=Zg();if(!t.portalContainer&&s&&(n=s()),!n)return null;let l=t.children;return t.disableFocusManagement||(l=d.createElement(Uu,{restoreFocus:!0,contain:i&&!r},l)),l=d.createElement(ev.Provider,{value:a},d.createElement(tg,null,l)),Ft.createPortal(l,n)}function Lo(t){return Ah()?t.altKey:t.ctrlKey}const nv=1e3;function rv(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=d.useRef({search:"",timeout:void 0}).current,o=a=>{let s=iv(a.key);if(!(!s||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))){if(s===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=s,e.getKeyForSearch!=null){let l=e.getKeyForSearch(i.search,n.focusedKey);l==null&&(l=e.getKeyForSearch(i.search)),l!=null&&(n.setFocusedKey(l),r&&r(l))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},nv)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?o:void 0}}}function iv(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function jc(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:a=!1,disallowSelectAll:s=!1,selectOnFocus:l=e.selectionBehavior==="replace",disallowTypeAhead:u=!1,shouldUseVirtualFocus:c,allowsTabNavigation:p=!1,isVirtualized:g,scrollRef:h=r,linkBehavior:y="action"}=t,{direction:f}=or(),v=di(),m=E=>{var I;if(E.altKey&&E.key==="Tab"&&E.preventDefault(),!(!((I=r.current)===null||I===void 0)&&I.contains(E.target)))return;const j=(F,X)=>{if(F!=null){if(e.isLink(F)&&y==="selection"&&l&&!Lo(E)){var te;Ft.flushSync(()=>{e.setFocusedKey(F,X)});let de=(te=h.current)===null||te===void 0?void 0:te.querySelector(`[data-key="${CSS.escape(F.toString())}"]`),ce=e.getItemProps(F);de&&v.open(de,E,ce.href,ce.routerOptions);return}if(e.setFocusedKey(F,X),e.isLink(F)&&y==="override")return;E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):l&&!Lo(E)&&e.replaceSelection(F)}};switch(E.key){case"ArrowDown":if(n.getKeyBelow){var V,A,_;let F=e.focusedKey!=null?(V=n.getKeyBelow)===null||V===void 0?void 0:V.call(n,e.focusedKey):(A=n.getFirstKey)===null||A===void 0?void 0:A.call(n);F==null&&o&&(F=(_=n.getFirstKey)===null||_===void 0?void 0:_.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F))}break;case"ArrowUp":if(n.getKeyAbove){var H,Y,Q;let F=e.focusedKey!=null?(H=n.getKeyAbove)===null||H===void 0?void 0:H.call(n,e.focusedKey):(Y=n.getLastKey)===null||Y===void 0?void 0:Y.call(n);F==null&&o&&(F=(Q=n.getLastKey)===null||Q===void 0?void 0:Q.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F))}break;case"ArrowLeft":if(n.getKeyLeftOf){var M,N,L;let F=e.focusedKey!=null?(M=n.getKeyLeftOf)===null||M===void 0?void 0:M.call(n,e.focusedKey):null;F==null&&o&&(F=f==="rtl"?(N=n.getFirstKey)===null||N===void 0?void 0:N.call(n,e.focusedKey):(L=n.getLastKey)===null||L===void 0?void 0:L.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F,f==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var K,W,U;let F=e.focusedKey!=null?(K=n.getKeyRightOf)===null||K===void 0?void 0:K.call(n,e.focusedKey):null;F==null&&o&&(F=f==="rtl"?(W=n.getLastKey)===null||W===void 0?void 0:W.call(n,e.focusedKey):(U=n.getFirstKey)===null||U===void 0?void 0:U.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F,f==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&E.shiftKey)return;E.preventDefault();let F=n.getFirstKey(e.focusedKey,rn(E));e.setFocusedKey(F),F!=null&&(rn(E)&&E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):l&&e.replaceSelection(F))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&E.shiftKey)return;E.preventDefault();let F=n.getLastKey(e.focusedKey,rn(E));e.setFocusedKey(F),F!=null&&(rn(E)&&E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):l&&e.replaceSelection(F))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let F=n.getKeyPageBelow(e.focusedKey);F!=null&&(E.preventDefault(),j(F))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let F=n.getKeyPageAbove(e.focusedKey);F!=null&&(E.preventDefault(),j(F))}break;case"a":rn(E)&&e.selectionMode==="multiple"&&s!==!0&&(E.preventDefault(),e.selectAll());break;case"Escape":!a&&e.selectedKeys.size!==0&&(E.stopPropagation(),E.preventDefault(),e.clearSelection());break;case"Tab":if(!p){if(E.shiftKey)r.current.focus();else{let F=qe(r.current,{tabbable:!0}),X,te;do te=F.lastChild(),te&&(X=te);while(te);X&&!X.contains(document.activeElement)&&$t(X)}break}}},S=d.useRef({top:0,left:0});dr(h,"scroll",g?void 0:()=>{var E,I,j,V;S.current={top:(j=(E=h.current)===null||E===void 0?void 0:E.scrollTop)!==null&&j!==void 0?j:0,left:(V=(I=h.current)===null||I===void 0?void 0:I.scrollLeft)!==null&&V!==void 0?V:0}});let w=E=>{if(e.isFocused){E.currentTarget.contains(E.target)||e.setFocused(!1);return}if(E.currentTarget.contains(E.target)){if(e.setFocused(!0),e.focusedKey==null){var I,j;let _=Y=>{Y!=null&&(e.setFocusedKey(Y),l&&e.replaceSelection(Y))},H=E.relatedTarget;var V,A;H&&E.currentTarget.compareDocumentPosition(H)&Node.DOCUMENT_POSITION_FOLLOWING?_((V=e.lastSelectedKey)!==null&&V!==void 0?V:(I=n.getLastKey)===null||I===void 0?void 0:I.call(n)):_((A=e.firstSelectedKey)!==null&&A!==void 0?A:(j=n.getFirstKey)===null||j===void 0?void 0:j.call(n))}else!g&&h.current&&(h.current.scrollTop=S.current.top,h.current.scrollLeft=S.current.left);if(e.focusedKey!=null&&h.current){let _=h.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);_&&(_.contains(document.activeElement)||$t(_),hs()==="keyboard"&&Xa(_,{containingElement:r.current}))}}},O=E=>{E.currentTarget.contains(E.relatedTarget)||e.setFocused(!1)},x=d.useRef(!1);dr(r,Xh,c?E=>{let{detail:I}=E;E.stopPropagation(),e.setFocused(!0),(I==null?void 0:I.focusStrategy)==="first"&&(x.current=!0)}:void 0);let D=De(()=>{var E,I;let j=(I=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&I!==void 0?I:null;if(j==null){var V;(V=r.current)===null||V===void 0||V.dispatchEvent(new CustomEvent(Du,{cancelable:!0,bubbles:!0})),e.collection.size>0&&(x.current=!1)}else e.setFocusedKey(j),x.current=!1});Ga(()=>{x.current&&D()},[e.collection,D]);let P=De(()=>{e.collection.size>0&&(x.current=!1)});Ga(()=>{P()},[e.focusedKey,P]),dr(r,Yh,c?E=>{E.stopPropagation(),e.setFocused(!1),e.setFocusedKey(null)}:void 0);const b=d.useRef(i);d.useEffect(()=>{if(b.current){var E,I;let A=null;var j;i==="first"&&(A=(j=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&j!==void 0?j:null);var V;i==="last"&&(A=(V=(I=n.getLastKey)===null||I===void 0?void 0:I.call(n))!==null&&V!==void 0?V:null);let _=e.selectedKeys;if(_.size){for(let H of _)if(e.canSelectItem(H)){A=H;break}}e.setFocused(!0),e.setFocusedKey(A),A==null&&!c&&r.current&&Gr(r.current)}},[]);let k=d.useRef(e.focusedKey);d.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==k.current||b.current)&&h.current&&r.current){let E=hs(),I=r.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!I)return;(E==="keyboard"||b.current)&&(Tu(h.current,I),E!=="virtual"&&Xa(I,{containingElement:r.current}))}!c&&e.isFocused&&e.focusedKey==null&&k.current!=null&&r.current&&Gr(r.current),k.current=e.focusedKey,b.current=!1}),dr(r,"react-aria-focus-scope-restore",E=>{E.preventDefault(),e.setFocused(!0)});let B={onKeyDown:m,onFocus:w,onBlur:O,onMouseDown(E){h.current===E.target&&E.preventDefault()}},{typeSelectProps:R}=rv({keyboardDelegate:n,selectionManager:e});u||(B=ye(R,B));let z;return c?z=-1:z=e.focusedKey==null?0:-1,{collectionProps:{...B,tabIndex:z}}}function zc(t){let{id:e,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:o,shouldUseVirtualFocus:a,focus:s,isDisabled:l,onAction:u,allowsDifferentPressOrigin:c,linkBehavior:p="action"}=t,g=di();e=tr(e);let h=_=>{if(_.pointerType==="keyboard"&&Lo(_))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(p==="selection"&&i.current){let H=n.getItemProps(r);g.open(i.current,_,H.href,H.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(p==="override"||p==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):_&&_.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||_&&(rn(_)||_.pointerType==="touch"||_.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};d.useEffect(()=>{if(r===n.focusedKey&&n.isFocused)if(!a)s?s():document.activeElement!==i.current&&i.current&&Gr(i.current);else{var H;let Y=new CustomEvent(Du,{cancelable:!0,bubbles:!0});(H=i.current)===null||H===void 0||H.dispatchEvent(Y)}},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,a]),l=l||n.isDisabled(r);let y={};!a&&!l?y={tabIndex:r===n.focusedKey?0:-1,onFocus(_){_.target===i.current&&n.setFocusedKey(r)}}:l&&(y.onMouseDown=_=>{_.preventDefault()});let f=n.isLink(r)&&p==="override",v=n.isLink(r)&&p!=="selection"&&p!=="none",m=!l&&n.canSelectItem(r)&&!f,S=(u||v)&&!l,w=S&&(n.selectionBehavior==="replace"?!m:!m||n.isEmpty),O=S&&m&&n.selectionBehavior==="replace",x=w||O,D=d.useRef(null),P=x&&m,b=d.useRef(!1),k=d.useRef(!1),B=_=>{if(u&&u(),v&&i.current){let H=n.getItemProps(r);g.open(i.current,_,H.href,H.routerOptions)}},R={};o?(R.onPressStart=_=>{D.current=_.pointerType,b.current=P,_.pointerType==="keyboard"&&(!x||Is())&&h(_)},c?(R.onPressUp=w?void 0:_=>{_.pointerType==="mouse"&&m&&h(_)},R.onPress=w?B:_=>{_.pointerType!=="keyboard"&&_.pointerType!=="mouse"&&m&&h(_)}):R.onPress=_=>{if(w||O&&_.pointerType!=="mouse"){if(_.pointerType==="keyboard"&&!Os())return;B(_)}else _.pointerType!=="keyboard"&&m&&h(_)}):(R.onPressStart=_=>{D.current=_.pointerType,b.current=P,k.current=w,m&&(_.pointerType==="mouse"&&!w||_.pointerType==="keyboard"&&(!S||Is()))&&h(_)},R.onPress=_=>{(_.pointerType==="touch"||_.pointerType==="pen"||_.pointerType==="virtual"||_.pointerType==="keyboard"&&x&&Os()||_.pointerType==="mouse"&&k.current)&&(x?B(_):m&&h(_))}),y["data-key"]=r,R.preventFocusOnPress=a;let{pressProps:z,isPressed:E}=ya(R),I=O?_=>{D.current==="mouse"&&(_.stopPropagation(),_.preventDefault(),B(_))}:void 0,{longPressProps:j}=fg({isDisabled:!P,onLongPress(_){_.pointerType==="touch"&&(h(_),n.setSelectionBehavior("toggle"))}}),V=_=>{D.current==="touch"&&b.current&&_.preventDefault()},A=n.isLink(r)?_=>{It.isOpening||_.preventDefault()}:void 0;return{itemProps:ye(y,m||w?z:{},P?j:{},{onDoubleClick:I,onDragStartCapture:V,onClick:A,id:e}),isPressed:E,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:l,allowsSelection:m,hasAction:x}}function Os(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function Is(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}class _s{getItemRect(e){let n=this.ref.current;if(!n)return null;let r=e!=null?n.querySelector(`[data-key="${CSS.escape(e.toString())}"]`):null;if(!r)return null;let i=n.getBoundingClientRect(),o=r.getBoundingClientRect();return{x:o.left-i.left+n.scrollLeft,y:o.top-i.top+n.scrollTop,width:o.width,height:o.height}}getContentSize(){let e=this.ref.current;var n,r;return{width:(n=e==null?void 0:e.scrollWidth)!==null&&n!==void 0?n:0,height:(r=e==null?void 0:e.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let e=this.ref.current;var n,r,i,o;return{x:(n=e==null?void 0:e.scrollLeft)!==null&&n!==void 0?n:0,y:(r=e==null?void 0:e.scrollTop)!==null&&r!==void 0?r:0,width:(i=e==null?void 0:e.offsetWidth)!==null&&i!==void 0?i:0,height:(o=e==null?void 0:e.offsetHeight)!==null&&o!==void 0?o:0}}constructor(e){this.ref=e}}class ov{isDisabled(e){var n;return this.disabledBehavior==="all"&&(((n=e.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,n){let r=e;for(;r!=null;){let i=this.collection.getItem(r);if((i==null?void 0:i.type)==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(e){let n=e;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(e){let n=e;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(e,n,r){let i=e,o=this.layoutDelegate.getItemRect(i);if(!o||i==null)return null;let a=o;do{if(i=n(i),i==null)break;o=this.layoutDelegate.getItemRect(i)}while(o&&r(a,o)&&i!=null);return i}isSameRow(e,n){return e.y===n.y||e.x!==n.x}isSameColumn(e,n){return e.x===n.x||e.y!==n.y}getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,n){return n?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr"):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyAfter(n))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!Gn(n))return this.getFirstKey();let i=e;if(this.orientation==="horizontal"){let o=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!Gn(n))return this.getLastKey();let i=e;if(this.orientation==="horizontal"){let o=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let o=r.getItem(i);if(!o)return null;let a=o.textValue.slice(0,e.length);if(o.textValue&&this.collator.compare(a,e)===0)return i;i=this.getNextKey(i)}return null}constructor(...e){if(e.length===1){let n=e[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new _s(n.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new _s(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function av(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:i,keyboardDelegate:o,layoutDelegate:a}=t,s=Pg({usage:"search",sensitivity:"base"}),l=e.disabledBehavior,u=d.useMemo(()=>o||new ov({collection:n,disabledKeys:r,disabledBehavior:l,ref:i,collator:s,layoutDelegate:a}),[o,a,n,r,i,s,l]),{collectionProps:c}=jc({...t,ref:i,selectionManager:e,keyboardDelegate:u});return{listProps:c}}function Hc(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function sv(t){return lv(t)}function lv(t,e){for(let n of t)return n}function Bi(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...ks(t,e),e],i=[...ks(t,n),n],o=r.slice(0,i.length).findIndex((a,s)=>a!==i[s]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function ks(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}const Ns=new WeakMap;function uv(t){let e=Ns.get(t);if(e!=null)return e;let n=0,r=i=>{for(let o of i)o.type==="section"?r(Hc(o,t)):n++};return r(t),Ns.set(t,n),n}const Bc=new WeakMap;function cv(t,e,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:o,...a}=t;!t["aria-label"]&&!t["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=Be(t,{labelable:!0}),{listProps:l}=av({...a,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return Bc.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:ye(s,{onKeyDown:i,onKeyUp:o},{role:"menu",...l,onKeyDown:u=>{var c;(u.key!=="Escape"||t.shouldUseVirtualFocus)&&((c=l.onKeyDown)===null||c===void 0||c.call(l,u))}})}}function dv(t,e,n){let{id:r,key:i,closeOnSelect:o,isVirtualized:a,"aria-haspopup":s,onPressStart:l,onPressUp:u,onPress:c,onPressChange:p,onPressEnd:g,onHoverStart:h,onHoverChange:y,onHoverEnd:f,onKeyDown:v,onKeyUp:m,onFocus:S,onFocusChange:w,onBlur:O,selectionManager:x=e.selectionManager}=t,D=!!s,P=D&&t["aria-expanded"]==="true";var b;let k=(b=t.isDisabled)!==null&&b!==void 0?b:x.isDisabled(i);var B;let R=(B=t.isSelected)!==null&&B!==void 0?B:x.isSelected(i),z=Bc.get(e),E=e.collection.getItem(i),I=t.onClose||z.onClose,j=di(),V=re=>{var Ue;if(!D){if(!(E==null||(Ue=E.props)===null||Ue===void 0)&&Ue.onAction?E.props.onAction():t.onAction&&t.onAction(i),z.onAction){let at=z.onAction;at(i)}re.target instanceof HTMLAnchorElement&&E&&j.open(re.target,re,E.props.href,E.props.routerOptions)}},A="menuitem";D||(x.selectionMode==="single"?A="menuitemradio":x.selectionMode==="multiple"&&(A="menuitemcheckbox"));let _=_i(),H=_i(),Y=_i(),Q={id:r,"aria-disabled":k||void 0,role:A,"aria-label":t["aria-label"],"aria-labelledby":_,"aria-describedby":[H,Y].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":s,"aria-expanded":t["aria-expanded"]};x.selectionMode!=="none"&&!D&&(Q["aria-checked"]=R),a&&(Q["aria-posinset"]=E==null?void 0:E.index,Q["aria-setsize"]=uv(e.collection));let M=re=>{re.pointerType==="keyboard"&&V(re),l==null||l(re)},N=()=>{!D&&I&&(o??(x.selectionMode!=="multiple"||x.isLink(i)))&&I()},L=re=>{re.pointerType==="mouse"&&(V(re),N()),u==null||u(re)},K=re=>{re.pointerType!=="keyboard"&&re.pointerType!=="mouse"&&(V(re),N()),c==null||c(re)},{itemProps:W,isFocused:U}=zc({id:r,selectionManager:x,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:z.shouldUseVirtualFocus}),{pressProps:F,isPressed:X}=ya({onPressStart:M,onPress:K,onPressUp:L,onPressChange:p,onPressEnd:g,isDisabled:k}),{hoverProps:te}=wa({isDisabled:k,onHoverStart(re){!sg()&&!(P&&s==="dialog")&&(x.setFocused(!0),x.setFocusedKey(i)),h==null||h(re)},onHoverChange:y,onHoverEnd:f}),{keyboardProps:de}=cg({onKeyDown:re=>{if(re.repeat){re.continuePropagation();return}switch(re.key){case" ":!k&&x.selectionMode==="none"&&!D&&o!==!1&&I&&I();break;case"Enter":!k&&o!==!1&&!D&&I&&I();break;default:D||re.continuePropagation(),v==null||v(re);break}},onKeyUp:m}),{focusProps:ce}=rg({onBlur:O,onFocus:S,onFocusChange:w}),oe=Be(E==null?void 0:E.props);delete oe.id;let ge=$u(E==null?void 0:E.props);return{menuItemProps:{...Q,...ye(oe,ge,D?{onFocus:W.onFocus,"data-key":W["data-key"]}:W,F,te,de,ce),tabIndex:W.tabIndex!=null&&P?-1:W.tabIndex},labelProps:{id:_},descriptionProps:{id:H},keyboardShortcutProps:{id:Y},isFocused:U,isSelected:R,isPressed:X,isDisabled:k}}function fv(t){let{heading:e,"aria-label":n}=t,r=tr();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}function hv(t){let e=Be(t,{labelable:!0}),n;return t.orientation==="vertical"&&(n="vertical"),t.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":n}}:{separatorProps:e}}const Wc=new WeakMap;function Qr(t,e,n){return t?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${Wc.get(t)}-${n}-${e}`):""}function pv(t,e,n){let{key:r,isDisabled:i,shouldSelectOnPressUp:o}=t,{selectionManager:a,selectedKey:s}=e,l=r===s,u=i||e.isDisabled||e.selectionManager.isDisabled(r),{itemProps:c,isPressed:p}=zc({selectionManager:a,key:r,ref:n,isDisabled:u,shouldSelectOnPressUp:o,linkBehavior:"selection"}),g=Qr(e,r,"tab"),h=Qr(e,r,"tabpanel"),{tabIndex:y}=c,f=e.collection.getItem(r),v=Be(f==null?void 0:f.props,{labelable:!0});delete v.id;let m=$u(f==null?void 0:f.props);return{tabProps:ye(v,m,c,{id:g,"aria-selected":l,"aria-disabled":u||void 0,"aria-controls":l?h:void 0,tabIndex:u?void 0:y,role:"tab"}),isSelected:l,isDisabled:u,isPressed:p}}function gv(t,e,n){let r=Yp(n)?void 0:0;var i;const o=Qr(e,(i=t.id)!==null&&i!==void 0?i:e==null?void 0:e.selectedKey,"tabpanel"),a=sa({...t,id:o,"aria-labelledby":Qr(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:ye(a,{tabIndex:r,role:"tabpanel","aria-describedby":t["aria-describedby"],"aria-details":t["aria-details"]})}}class vv{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var n,r;return this.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){do e=this.collection.getKeyAfter(e),e==null&&(e=this.collection.getFirstKey());while(this.isDisabled(e));return e}getPreviousKey(e){do e=this.collection.getKeyBefore(e),e==null&&(e=this.collection.getLastKey());while(this.isDisabled(e));return e}constructor(e,n,r,i=new Set){this.collection=e,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=i,this.tabDirection=r==="horizontal"}}function mv(t,e,n){let{orientation:r="horizontal",keyboardActivation:i="automatic"}=t,{collection:o,selectionManager:a,disabledKeys:s}=e,{direction:l}=or(),u=d.useMemo(()=>new vv(o,l,r,s),[o,s,r,l]),{collectionProps:c}=jc({ref:n,selectionManager:a,keyboardDelegate:u,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),p=tr();Wc.set(e,p);let g=sa({...t,id:p});return{tabListProps:{...ye(c,g),role:"tablist","aria-orientation":r,tabIndex:void 0}}}const yv=d.createContext({});function bv(t){let[e,n]=nr(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=d.useCallback(()=>{n(!0)},[n]),i=d.useCallback(()=>{n(!1)},[n]),o=d.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:i,toggle:o}}class Sv{build(e,n){return this.context=n,Rs(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:r}=e;if(d.isValidElement(n)&&n.type===d.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let o of r)yield*this.getFullNode({value:o,index:i},{renderer:n}),i++}else{let i=[];d.Children.forEach(n,a=>{a&&i.push(a)});let o=0;for(let a of i){let s=this.getFullNode({element:a,index:o},{});for(let l of s)o++,yield l}}}getKey(e,n,r,i){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let o=n.value;if(o!=null){var a;let s=(a=o.key)!==null&&a!==void 0?a:o.id;if(s==null)throw new Error("No key found for item");return s}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,r,i){if(d.isValidElement(e.element)&&e.element.type===d.Fragment){let v=[];d.Children.forEach(e.element.props.children,S=>{v.push(S)});var o;let m=(o=e.index)!==null&&o!==void 0?o:0;for(const S of v)yield*this.getFullNode({element:S,index:m++},n,r,i);return}let a=e.element;if(!a&&e.value&&n&&n.renderer){let v=this.cache.get(e.value);if(v&&(!v.shouldInvalidate||!v.shouldInvalidate(this.context))){v.index=e.index,v.parentKey=i?i.key:null,yield v;return}a=n.renderer(e.value)}if(d.isValidElement(a)){let v=a.type;if(typeof v!="function"&&typeof v.getCollectionNode!="function"){let O=a.type;throw new Error(`Unknown element <${O}> in collection.`)}let m=v.getCollectionNode(a.props,this.context);var s;let S=(s=e.index)!==null&&s!==void 0?s:0,w=m.next();for(;!w.done&&w.value;){let O=w.value;e.index=S;var l;let x=(l=O.key)!==null&&l!==void 0?l:null;x==null&&(x=O.element?null:this.getKey(a,e,n,r));let P=[...this.getFullNode({...O,key:x,index:S,wrapper:wv(e.wrapper,O.wrapper)},this.getChildState(n,O),r?`${r}${a.key}`:a.key,i)];for(let b of P){var u,c;b.value=(c=(u=O.value)!==null&&u!==void 0?u:e.value)!==null&&c!==void 0?c:null,b.value&&this.cache.set(b.value,b);var p;if(e.type&&b.type!==e.type)throw new Error(`Unsupported type <${Wi(b.type)}> in <${Wi((p=i==null?void 0:i.type)!==null&&p!==void 0?p:"unknown parent type")}>. Only <${Wi(e.type)}> is supported.`);S++,yield b}w=m.next(P)}return}if(e.key==null||e.type==null)return;let g=this;var h,y;let f={type:e.type,props:e.props,key:e.key,parentKey:i?i.key:null,value:(h=e.value)!==null&&h!==void 0?h:null,level:i?i.level+1:0,index:e.index,rendered:e.rendered,textValue:(y=e.textValue)!==null&&y!==void 0?y:"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Rs(function*(){if(!e.hasChildNodes||!e.childNodes)return;let v=0;for(let m of e.childNodes()){m.key!=null&&(m.key=`${f.key}${m.key}`);let S=g.getFullNode({...m,index:v},g.getChildState(n,m),f.key,f);for(let w of S)v++,yield w}})};yield f}constructor(){this.cache=new WeakMap}}function Rs(t){let e=[],n=null;return{*[Symbol.iterator](){for(let r of e)yield r;n||(n=t());for(let r of n)e.push(r),yield r}}}function wv(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function Wi(t){return t[0].toUpperCase()+t.slice(1)}function Uc(t,e,n){let r=d.useMemo(()=>new Sv,[]),{children:i,items:o,collection:a}=t;return d.useMemo(()=>{if(a)return a;let l=r.build({children:i,items:o},n);return e(l)},[r,i,o,a,n,e])}function Ev(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function $v(t){return xv(t)}function xv(t,e){for(let n of t)return n}function Ui(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...Ms(t,e),e],i=[...Ms(t,n),n],o=r.slice(0,i.length).findIndex((a,s)=>a!==i[s]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function Ms(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}function Cv(t){let{initialItems:e=[],initialSelectedKeys:n,getKey:r=f=>{var v;return(v=f.id)!==null&&v!==void 0?v:f.key},getChildren:i=f=>f.children}=t,[o,a]=d.useState(()=>p(e,new Map)),{items:s,nodeMap:l}=o,[u,c]=d.useState(new Set(n||[]));function p(f=[],v,m){return f==null&&(f=[]),{items:f.map(S=>{let w={key:r(S),parentKey:m,value:S,children:null};return w.children=p(i(S),v,w.key).items,v.set(w.key,w),w}),nodeMap:v}}function g(f,v,m,S){let w=S.get(v);if(!w)return{items:f,nodeMap:S};let O=new Map(S),x=m(w);for(x==null?y(w,O):h(x,O);w&&w.parentKey;){let P=O.get(w.parentKey),b={key:P.key,parentKey:P.parentKey,value:P.value,children:null},k=P.children;x==null&&k&&(k=k.filter(B=>B!==w));var D;b.children=(D=k==null?void 0:k.map(B=>B===w?x:B))!==null&&D!==void 0?D:null,O.set(b.key,b),x=b,w=P}return x==null&&(f=f.filter(P=>P!==w)),{items:f.map(P=>P===w?x:P),nodeMap:O}}function h(f,v){if(v.set(f.key,f),f.children)for(let m of f.children)h(m,v)}function y(f,v){if(v.delete(f.key),f.children)for(let m of f.children)y(m,v)}return{items:s,selectedKeys:u,setSelectedKeys:c,getItem(f){return l.get(f)},insert(f,v,...m){a(({items:S,nodeMap:w})=>{let{items:O,nodeMap:x}=p(m,w,f);return f==null?{items:[...S.slice(0,v),...O,...S.slice(v)],nodeMap:x}:g(S,f,D=>({key:D.key,parentKey:D.parentKey,value:D.value,children:[...D.children.slice(0,v),...O,...D.children.slice(v)]}),x)})},insertBefore(f,...v){let m=l.get(f);if(!m)return;let S=l.get(m.parentKey),O=(S?S.children:s).indexOf(m);var x;this.insert((x=S==null?void 0:S.key)!==null&&x!==void 0?x:null,O,...v)},insertAfter(f,...v){let m=l.get(f);if(!m)return;let S=l.get(m.parentKey),O=(S?S.children:s).indexOf(m);var x;this.insert((x=S==null?void 0:S.key)!==null&&x!==void 0?x:null,O+1,...v)},prepend(f,...v){this.insert(f,0,...v)},append(f,...v){if(f==null)this.insert(null,s.length,...v);else{let m=l.get(f);if(!m)return;this.insert(f,m.children.length,...v)}},remove(...f){if(f.length===0)return;let v=s,m=l,S;for(let O of f)S=g(v,O,()=>null,m),m=S.nodeMap,v=S.items;a(S);let w=new Set(u);for(let O of u)S.nodeMap.has(O)||w.delete(O);c(w)},removeSelectedItems(){this.remove(...u)},move(f,v,m){a(({items:S,nodeMap:w})=>{let O=w.get(f);if(!O)return{items:S,nodeMap:w};let{items:x,nodeMap:D}=g(S,f,()=>null,w);const P={...O,parentKey:v};return v==null?(D.set(P.key,P),{items:[...x.slice(0,m),P,...x.slice(m)],nodeMap:D}):g(x,v,b=>({key:b.key,parentKey:b.parentKey,value:b.value,children:[...b.children.slice(0,m),P,...b.children.slice(m)]}),D)})},update(f,v){a(({items:m,nodeMap:S})=>g(m,f,w=>{let O={key:w.key,parentKey:w.parentKey,value:v,children:null},x=p(i(v),S,O.key);return O.children=x.items,O},S))}}}class As{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){let n=this.keyMap.get(e);return(n==null?void 0:n.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let n=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&a.type==="section")for(let s of a.childNodes)n(s)};for(let a of e)n(a);let r=null,i=0;for(let[a,s]of this.keyMap)r?(r.nextKey=a,s.prevKey=r.key):(this.firstKey=a,s.prevKey=void 0),s.type==="item"&&(s.index=i++),r=s,r.nextKey=void 0;var o;this.lastKey=(o=r==null?void 0:r.key)!==null&&o!==void 0?o:null}}let tt=class Vc extends Set{constructor(e,n,r){super(e),e instanceof Vc?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function Tv(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Gc(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,a=d.useRef(!1),[,s]=d.useState(!1),l=d.useRef(null),u=d.useRef(null),[,c]=d.useState(null),p=d.useMemo(()=>Ks(t.selectedKeys),[t.selectedKeys]),g=d.useMemo(()=>Ks(t.defaultSelectedKeys,new tt),[t.defaultSelectedKeys]),[h,y]=nr(p,g,t.onSelectionChange),f=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,m]=d.useState(i);i==="replace"&&v==="toggle"&&typeof h=="object"&&h.size===0&&m("replace");let S=d.useRef(i);return d.useEffect(()=>{i!==S.current&&(m(i),S.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:m,get isFocused(){return a.current},setFocused(w){a.current=w,s(w)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(w,O="first"){l.current=w,u.current=O,c(w)},selectedKeys:h,setSelectedKeys(w){(r||!Tv(w,h))&&y(w)},disabledKeys:f,disabledBehavior:o}}function Ks(t,e){return t?t==="all"?"all":new tt(t):e}let qc=class{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Ui(this.collection,i,e)<0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Ui(this.collection,i,e)>0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new tt([n],n,n);else{let a=this.state.selectedKeys;var i;let s=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new tt(a,s,n);var o;for(let l of this.getKeyRange(s,(o=a.currentKey)!==null&&o!==void 0?o:n))r.delete(l);for(let l of this.getKeyRange(n,s))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?Ui(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],o=e;for(;o!=null;){let a=this.collection.getItem(o);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new tt(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new tt([n],n,n):new tt;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new tt;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);(a==null?void 0:a.type)==="item"&&e.push(r);var o;a!=null&&a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((o=(i=$v(Ev(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new tt)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}};function Dv(t){let{filter:e,layoutDelegate:n}=t,r=Gc(t),i=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),o=d.useCallback(c=>e?new As(e(c)):new As(c),[e]),a=d.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),s=Uc(t,o,a),l=d.useMemo(()=>new qc(s,r,{layoutDelegate:n}),[s,r,n]);const u=d.useRef(null);return d.useEffect(()=>{if(r.focusedKey!=null&&!s.getItem(r.focusedKey)&&u.current){const m=u.current.getItem(r.focusedKey),S=[...u.current.getKeys()].map(b=>{const k=u.current.getItem(b);return(k==null?void 0:k.type)==="item"?k:null}).filter(b=>b!==null),w=[...s.getKeys()].map(b=>{const k=s.getItem(b);return(k==null?void 0:k.type)==="item"?k:null}).filter(b=>b!==null);var c,p;const O=((c=S==null?void 0:S.length)!==null&&c!==void 0?c:0)-((p=w==null?void 0:w.length)!==null&&p!==void 0?p:0);var g,h,y;let x=Math.min(O>1?Math.max(((g=m==null?void 0:m.index)!==null&&g!==void 0?g:0)-O+1,0):(h=m==null?void 0:m.index)!==null&&h!==void 0?h:0,((y=w==null?void 0:w.length)!==null&&y!==void 0?y:0)-1),D=null,P=!1;for(;x>=0;){if(!l.isDisabled(w[x].key)){D=w[x];break}if(x<w.length-1&&!P)x++;else{P=!0;var f,v;x>((f=m==null?void 0:m.index)!==null&&f!==void 0?f:0)&&(x=(v=m==null?void 0:m.index)!==null&&v!==void 0?v:0),x--}}r.setFocusedKey(D?D.key:null)}u.current=s},[s,l,r,r.focusedKey]),{collection:s,disabledKeys:i,selectionManager:l}}function Pv(t){var e;let[n,r]=nr(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),i=d.useMemo(()=>n!=null?[n]:[],[n]),{collection:o,disabledKeys:a,selectionManager:s}=Dv({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:u=>{if(u==="all")return;var c;let p=(c=u.values().next().value)!==null&&c!==void 0?c:null;p===n&&t.onSelectionChange&&t.onSelectionChange(p),r(p)}}),l=n!=null?o.getItem(n):null;return{collection:o,disabledKeys:a,selectionManager:s,selectedKey:n,setSelectedKey:r,selectedItem:l}}function Ov(t){var e,n;let r=Pv({...t,suppressTextValueWarning:!0,defaultSelectedKey:(n=(e=t.defaultSelectedKey)!==null&&e!==void 0?e:Ls(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set))!==null&&n!==void 0?n:void 0}),{selectionManager:i,collection:o,selectedKey:a}=r,s=d.useRef(a);return d.useEffect(()=>{let l=a;(i.isEmpty||l==null||!o.getItem(l))&&(l=Ls(o,r.disabledKeys),l!=null&&i.setSelectedKeys([l])),(l!=null&&i.focusedKey==null||!i.isFocused&&l!==s.current)&&i.setFocusedKey(l),s.current=l}),{...r,isDisabled:t.isDisabled||!1}}function Ls(t,e){let n=null;if(t){var r,i,o,a;for(n=t.getFirstKey();n!=null&&(e.has(n)||!((i=t.getItem(n))===null||i===void 0||(r=i.props)===null||r===void 0)&&r.isDisabled)&&n!==t.getLastKey();)n=t.getKeyAfter(n);n!=null&&(e.has(n)||!((a=t.getItem(n))===null||a===void 0||(o=a.props)===null||o===void 0)&&o.isDisabled)&&n===t.getLastKey()&&(n=t.getFirstKey())}return n}class Iv{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,n=n||new Set;let r=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&(s.type==="section"||n.has(s.key)))for(let l of s.childNodes)r(l)};for(let s of e)r(s);let i=null,o=0;for(let[s,l]of this.keyMap)i?(i.nextKey=s,l.prevKey=i.key):(this.firstKey=s,l.prevKey=void 0),l.type==="item"&&(l.index=o++),i=l,i.nextKey=void 0;var a;this.lastKey=(a=i==null?void 0:i.key)!==null&&a!==void 0?a:null}}function _v(t){let{onExpandedChange:e}=t,[n,r]=nr(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),i=Gc(t),o=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),a=Uc(t,d.useCallback(l=>new Iv(l,{expandedKeys:n}),[n]),null);return d.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:o,toggleKey:l=>{r(kv(n,l))},setExpandedKeys:r,selectionManager:new qc(a,i)}}function kv(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const Nv=d.createContext(null),Rv=d.createContext(null),Yc={CollectionRoot({collection:t,renderDropIndicator:e}){return Fs(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return Fs(t,e,n)}};function Fs(t,e,n){return Iu({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){var i;let o=r.render(r);if(!n||r.type!=="item")return o;let a=r.key,s=t.getKeyAfter(a);return d.createElement(d.Fragment,null,n({type:"item",key:a,dropPosition:"before"}),o,(s==null||((i=t.getItem(s))===null||i===void 0?void 0:i.type)!=="item")&&n({type:"item",key:a,dropPosition:"after"}))}})}const pi=d.createContext(Yc);function Xc(t){return d.useMemo(()=>t!=null?new Set([t]):null,[t])}const Mv=d.createContext({}),Jc=d.createContext({}),Av=fa("separator",function(e,n){[e,n]=ir(e,n,Jc);let{elementType:r,orientation:i,style:o,className:a}=e,s=r||"hr";s==="hr"&&i==="vertical"&&(s="div");let{separatorProps:l}=hv({elementType:r,orientation:i});return d.createElement(s,{...Be(e),...l,style:o,className:a??"react-aria-Separator",ref:n,slot:e.slot||void 0})}),Kv=d.createContext({placement:"bottom"}),Lv=d.createContext(null),Fv=d.forwardRef(function(e,n){[e,n]=ir(e,n,Lv);let r=d.useContext(Zv),i=bv(e),o=e.isOpen!=null||e.defaultOpen!=null||!r?i:r,a=Qh(n,o.isOpen)||e.isExiting||!1;if(ip()){let l=e.children;return typeof l=="function"&&(l=l({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),d.createElement(d.Fragment,null,l)}return o&&!o.isOpen&&!a?null:d.createElement(jv,{...e,triggerRef:e.triggerRef,state:o,popoverRef:n,isExiting:a})});function jv({state:t,isExiting:e,UNSTABLE_portalContainer:n,...r}){let i=d.useRef(null),[o,a]=d.useState(0);pe(()=>{i.current&&t.isOpen&&a(i.current.getBoundingClientRect().width)},[t.isOpen,i]);var s;let{popoverProps:l,underlayProps:u,arrowProps:c,placement:p}=Jg({...r,offset:(s=r.offset)!==null&&s!==void 0?s:8,arrowSize:o},t),g=r.popoverRef,h=Jh(g,!!p)||r.isEntering||!1,y=mt({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:p,isEntering:h,isExiting:e}}),f={...l.style,...y.style};return d.createElement(tv,{...r,isExiting:e,portalContainer:n},!r.isNonModal&&t.isOpen&&d.createElement("div",{"data-testid":"underlay",...u,style:{position:"fixed",inset:0}}),d.createElement("div",{...ye(Be(r),l),...y,ref:g,slot:r.slot||void 0,style:f,"data-trigger":r.trigger,"data-placement":p,"data-entering":h||void 0,"data-exiting":e||void 0},!r.isNonModal&&d.createElement(Ps,{onDismiss:t.close}),d.createElement(Kv.Provider,{value:{...c,placement:p,ref:i}},y.children),d.createElement(Ps,{onDismiss:t.close})))}const zv=d.createContext({});class ze extends Set{constructor(e,n,r){super(e),e instanceof ze?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function Hv(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Bv(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,a=d.useRef(!1),[,s]=d.useState(!1),l=d.useRef(null),u=d.useRef(null),[,c]=d.useState(null),p=d.useMemo(()=>js(t.selectedKeys),[t.selectedKeys]),g=d.useMemo(()=>js(t.defaultSelectedKeys,new ze),[t.defaultSelectedKeys]),[h,y]=nr(p,g,t.onSelectionChange),f=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,m]=d.useState(i);i==="replace"&&v==="toggle"&&typeof h=="object"&&h.size===0&&m("replace");let S=d.useRef(i);return d.useEffect(()=>{i!==S.current&&(m(i),S.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:m,get isFocused(){return a.current},setFocused(w){a.current=w,s(w)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(w,O="first"){l.current=w,u.current=O,c(w)},selectedKeys:h,setSelectedKeys(w){(r||!Hv(w,h))&&y(w)},disabledKeys:f,disabledBehavior:o}}function js(t,e){return t?t==="all"?"all":new ze(t):e}class Wv{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Bi(this.collection,i,e)<0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Bi(this.collection,i,e)>0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new ze([n],n,n);else{let a=this.state.selectedKeys;var i;let s=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new ze(a,s,n);var o;for(let l of this.getKeyRange(s,(o=a.currentKey)!==null&&o!==void 0?o:n))r.delete(l);for(let l of this.getKeyRange(n,s))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?Bi(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],o=e;for(;o!=null;){let a=this.collection.getItem(o);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new ze(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new ze([n],n,n):new ze;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new ze;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);(a==null?void 0:a.type)==="item"&&e.push(r);var o;a!=null&&a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((o=(i=sv(Hc(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new ze)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}const Uv=d.createContext(null),Ea=d.createContext(null),Vv=d.createContext(null),Zr=d.createContext(null),Gv=d.createContext(null),qv=d.forwardRef(function(e,n){return[e,n]=ir(e,n,Uv),d.createElement(ku,{content:d.createElement(Nu,e)},r=>r.size>0&&d.createElement(Yv,{props:e,collection:r,menuRef:n}))});function Yv({props:t,collection:e,menuRef:n}){let{filterFn:r,collectionProps:i,collectionRef:o}=d.useContext(Nv)||{};n=$n(d.useMemo(()=>bu(n,o!==void 0?o:null),[o,n]));let a=d.useMemo(()=>r?e.filter(r):e,[e,r]),s=_v({...t,collection:a,children:void 0}),l=d.useContext(Vv),{isVirtualized:u,CollectionRoot:c}=d.useContext(pi),{menuProps:p}=cv({...t,...i,isVirtualized:u,onClose:t.onClose||(l==null?void 0:l.close)},s,n),g=mt({defaultClassName:"react-aria-Menu",className:t.className,style:t.style,values:{}});return d.createElement(Uu,null,d.createElement("div",{...Be(t),...p,...g,ref:n,slot:t.slot||void 0,onScroll:t.onScroll},d.createElement(rr,{values:[[Ea,s],[Jc,{elementType:"div"}],[Rv,{name:"MenuSection",render:Jv}],[Gv,{parentMenuRef:n}],[Fo,null],[Zr,s.selectionManager]]},d.createElement(c,{collection:s.collection,persistedKeys:Xc(s.selectionManager.focusedKey),scrollRef:n}))))}class Xv extends Wv{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,n){return this.parent.setFocusedKey(e,n)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(e,n){super(e.collection,n),this.parent=e}}function Jv(t,e,n,r="react-aria-MenuSection"){var i,o;let a=d.useContext(Ea),{CollectionBranch:s}=d.useContext(pi),[l,u]=Zh();var c;let{headingProps:p,groupProps:g}=fv({heading:u,"aria-label":(c=n.props["aria-label"])!==null&&c!==void 0?c:void 0}),h=mt({defaultClassName:r,className:(i=n.props)===null||i===void 0?void 0:i.className,style:(o=n.props)===null||o===void 0?void 0:o.style,values:{}}),y=d.useContext(Zr),f=Bv(t),v=t.selectionMode!=null?new Xv(y,f):y;return d.createElement("section",{...Be(t),...g,...h,ref:e},d.createElement(rr,{values:[[Mv,{...p,ref:l}],[Zr,v]]},d.createElement(s,{collection:a.collection,parent:n})))}const Fo=d.createContext(null),Qv=fa("item",function(e,n,r){var i;[e,n]=ir(e,n,Fo);let o=(i=la(Fo))===null||i===void 0?void 0:i.id,a=d.useContext(Ea),s=$n(n),l=d.useContext(Zr),{menuItemProps:u,labelProps:c,descriptionProps:p,keyboardShortcutProps:g,...h}=dv({...e,id:o,key:r.key,selectionManager:l},a,s),{isFocusVisible:y,focusProps:f}=fi(),{hoverProps:v,isHovered:m}=wa({isDisabled:h.isDisabled}),S=mt({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...h,isHovered:m,isFocusVisible:y,selectionMode:l.selectionMode,selectionBehavior:l.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),w=e.href?"a":"div";return d.createElement(w,{...ye(u,f,v),...S,ref:s,"data-disabled":h.isDisabled||void 0,"data-hovered":m||void 0,"data-focused":h.isFocused||void 0,"data-focus-visible":y||void 0,"data-pressed":h.isPressed||void 0,"data-selected":h.isSelected||void 0,"data-selection-mode":l.selectionMode==="none"?void 0:l.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},d.createElement(rr,{values:[[yv,{slots:{label:c,description:p}}],[zv,g]]},S.children))}),Zv=d.createContext(null),gi=d.createContext(null),yn=d.createContext(null),em=d.forwardRef(function(e,n){[e,n]=ir(e,n,gi);let{children:r,orientation:i="horizontal"}=e;return r=d.useMemo(()=>typeof r=="function"?r({orientation:i,defaultChildren:null}):r,[r,i]),d.createElement(ku,{content:r},o=>d.createElement(tm,{props:e,collection:o,tabsRef:n}))});function tm({props:t,tabsRef:e,collection:n}){let{orientation:r="horizontal"}=t,i=Ov({...t,collection:n,children:void 0}),{focusProps:o,isFocused:a,isFocusVisible:s}=fi({within:!0}),l=d.useMemo(()=>({orientation:r,isFocusWithin:a,isFocusVisible:s}),[r,a,s]),u=mt({...t,defaultClassName:"react-aria-Tabs",values:l});return d.createElement("div",{...Be(t),...o,...u,ref:e,slot:t.slot||void 0,"data-focused":a||void 0,"data-orientation":r,"data-focus-visible":s||void 0,"data-disabled":i.isDisabled||void 0},d.createElement(rr,{values:[[gi,t],[yn,i]]},u.children))}const nm=d.forwardRef(function(e,n){return d.useContext(yn)?d.createElement(rm,{props:e,forwardedRef:n}):d.createElement(Nu,e)});function rm({props:t,forwardedRef:e}){let n=d.useContext(yn),{CollectionRoot:r}=d.useContext(pi),{orientation:i="horizontal",keyboardActivation:o="automatic"}=la(gi),a=$n(e),{tabListProps:s}=mv({...t,orientation:i,keyboardActivation:o},n,a),l=mt({...t,children:null,defaultClassName:"react-aria-TabList",values:{orientation:i,state:n}}),u=Be(t);return delete u.id,d.createElement("div",{...u,...s,ref:a,...l,"data-orientation":i||void 0},d.createElement(r,{collection:n.collection,persistedKeys:Xc(n.selectionManager.focusedKey)}))}const im=fa("item",(t,e,n)=>{let r=d.useContext(yn),i=$n(e),{tabProps:o,isSelected:a,isDisabled:s,isPressed:l}=pv({key:n.key,...t},r,i),{focusProps:u,isFocused:c,isFocusVisible:p}=fi(),{hoverProps:g,isHovered:h}=wa({isDisabled:s,onHoverStart:t.onHoverStart,onHoverEnd:t.onHoverEnd,onHoverChange:t.onHoverChange}),y=mt({...t,id:void 0,defaultClassName:"react-aria-Tab",values:{isSelected:a,isDisabled:s,isFocused:c,isFocusVisible:p,isPressed:l,isHovered:h}}),f=n.props.href?"a":"div";return d.createElement(f,{...ye(o,u,g,y),ref:i,"data-selected":a||void 0,"data-disabled":s||void 0,"data-focused":c||void 0,"data-focus-visible":p||void 0,"data-pressed":l||void 0,"data-hovered":h||void 0})}),om=rp(function(e,n){const r=d.useContext(yn);let i=$n(n),{tabPanelProps:o}=gv(e,r,i),{focusProps:a,isFocused:s,isFocusVisible:l}=fi(),u=r.selectedKey===e.id,c=mt({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:s,isFocusVisible:l,isInert:!u,state:r}});if(!u&&!e.shouldForceMount)return null;let p=Be(e);delete p.id;let g=u?ye(p,o,a,c):c;return d.createElement("div",{...g,ref:i,"data-focused":s||void 0,"data-focus-visible":l||void 0,inert:u?void 0:"true","data-inert":u?void 0:"true"},d.createElement(rr,{values:[[gi,null],[yn,null]]},d.createElement(pi.Provider,{value:Yc},c.children)))}),Qc=({options:t,isOpen:e=!1,onOpenChange:n,children:r,selectedValues:i=[],onSelectValue:o})=>{const a=d.useId(),s=u=>{n==null||n(u)},l=d.useRef(null);return T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"c__dropdown-menu-trigger",ref:l,id:a,onClick:u=>{u.stopPropagation(),u.preventDefault()},children:r}),T.jsx(Fv,{triggerRef:l,style:{marginTop:"0px"},isOpen:e,onOpenChange:s,children:T.jsx(qv,{className:"c__dropdown-menu","aria-labelledby":a,children:t.map(u=>T.jsxs(d.Fragment,{children:[T.jsxs(Qv,{className:"c__dropdown-menu-item","aria-label":u.label,onAction:()=>{var c;u.value&&(o==null||o(u.value)),(c=u.callback)==null||c.call(u),s(!1)},isDisabled:u.isDisabled,children:[u.icon,T.jsx("div",{className:"c__dropdown-menu-item__label","aria-label":u.label,children:u.label}),(u.isChecked||u.value&&i.includes(u.value))&&T.jsx("span",{className:"material-icons checked",children:"check"})]},u.label),u.showSeparator&&T.jsx(Av,{})]},u.label))})})]})},Zc=()=>{const[t,e]=d.useState(!1);return{isOpen:t,setIsOpen:e}},ed=({languages:t})=>{const{isOpen:e,setIsOpen:n}=Zc();return T.jsx(Qc,{options:t,isOpen:e,onOpenChange:n,children:T.jsxs(vn.Button,{onClick:()=>n(!e),color:"primary-text",className:"c__language-picker",children:[T.jsx("span",{className:"material-icons",children:"translate"}),T.jsx("span",{className:"c__language-picker__label",children:"Français"}),T.jsx("span",{className:"material-icons",children:e?"arrow_drop_up":"arrow_drop_down"})]})})},td=({leftIcon:t,rightIcon:e,languages:n,onTogglePanel:r,isPanelOpen:i})=>{const{t:o}=vn.useCunningham();return T.jsxs("div",{className:"c__header",children:[T.jsx("div",{className:"c__header__toggle-menu",children:T.jsx(vn.Button,{size:"medium",onClick:r,"aria-label":o(i?"Close the menu":"Open the menu"),color:"tertiary-text",icon:T.jsx("span",{className:"material-icons clr-primary-800",children:i?"close":"menu"})})}),T.jsx("div",{className:"c__header__left",children:t}),T.jsxs("div",{className:"c__header__right",children:[n&&T.jsx("div",{className:"c__header__right__language-picker",children:T.jsx(ed,{languages:n})}),e]})]})},jo={themes:{default:{theme:{colors:{"primary-text":"#000091","primary-050":"#F5F5FE","primary-100":"#ECECFE","primary-150":"#F4F4FD","primary-200":"#E3E3FD","primary-300":"#CACAFB","primary-400":"#8585F6","primary-500":"#6A6AF4","primary-600":"#313178","primary-700":"#272747","primary-800":"#000091","primary-900":"#21213F","secondary-text":"#fff","secondary-100":"#fee9ea","secondary-200":"#fedfdf","secondary-300":"#fdbfbf","secondary-400":"#e1020f","secondary-500":"#c91a1f","secondary-600":"#5e2b2b","secondary-700":"#3b2424","secondary-800":"#341f1f","secondary-900":"#2b1919","greyscale-text":"#303C4B","greyscale-000":"#fff","greyscale-050":"#F6F6F6","greyscale-100":"#eee","greyscale-200":"#E5E5E5","greyscale-250":"#ddd","greyscale-300":"#CECECE","greyscale-350":"#ddd","greyscale-400":"#929292","greyscale-500":"#7C7C7C","greyscale-600":"#666666","greyscale-700":"#3A3A3A","greyscale-750":"#353535","greyscale-800":"#2A2A2A","greyscale-900":"#242424","greyscale-950":"#1E1E1E","greyscale-1000":"#161616","success-text":"#1f8d49","success-100":"#dffee6","success-200":"#b8fec9","success-300":"#88fdaa","success-400":"#3bea7e","success-500":"#1f8d49","success-600":"#18753c","success-700":"#204129","success-800":"#1e2e22","success-900":"#19281d","info-text":"#0078f3","info-100":"#E8EDFF","info-200":"#DDE5FF","info-300":"#BCCDFF","info-400":"#518FFF","info-500":"#0078F3","info-600":"#0063CB","info-700":"#273961","info-800":"#222A3F","info-900":"#1D2437","warning-text":"#d64d00","warning-100":"#fff4f3","warning-200":"#ffe9e6","warning-300":"#ffded9","warning-400":"#ffbeb4","warning-500":"#d64d00","warning-600":"#b34000","warning-700":"#5e2c21","warning-800":"#3e241e","warning-900":"#361e19","danger-text":"#FFF","danger-100":"#FFE9E9","danger-200":"#FFDDDD","danger-300":"#FFBDBD","danger-400":"#FF5655","danger-500":"#F60700","danger-600":"#CE0500","danger-700":"#642626","danger-800":"#412121","danger-900":"#391C1C"},font:{sizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",ml:"0.938rem",xl:"1.25rem",t:"0.6875rem",s:"0.75rem",h1:"2rem",h2:"1.75rem",h3:"1.5rem",h4:"1.375rem",h5:"1.25rem",h6:"1.125rem","xl-alt":"5rem","lg-alt":"4.5rem","md-alt":"4rem","sm-alt":"3.5rem","xs-alt":"3rem"},weights:{thin:100,extrabold:800,black:900},families:{accent:"Marianne",base:"Marianne"}},logo:{src:"/assets/logo-gouv.svg",widthHeader:"110px",widthFooter:"220px",alt:"Gouvernement Logo"},spacings:{0:"0",none:"0",auto:"auto",bx:"2.2rem",full:"100%","4xs":"0.125rem","3xs":"0.25rem","2xs":"0.375rem",xs:"0.5rem",sm:"0.75rem",base:"1rem",md:"1.5rem",lg:"2rem",xl:"2.5rem",xxl:"3rem",xxxl:"3.5rem","4xl":"4rem","5xl":"4.5rem","6xl":"6rem","7xl":"7.5rem"},breakpoints:{xxs:"320px",xs:"480px",mobile:"768px",tablet:"1024px"}},components:{modal:{"width-small":"342px"},button:{"medium-height":"40px","medium-text-height":"40px","border-radius":"4px","small-height":"26px",primary:{"background--color":"var(--c--theme--colors--primary-text)","background--color-hover":"#1212ff","background--color-active":"#2323ff","background--color-disabled":"var(--c--theme--colors--greyscale-100)",color:"#fff","color-hover":"#fff","color-active":"#fff","color-focus-visible":"#fff",disabled:"var(--c--theme--colors--greyscale-500)"},"primary-text":{"background--color":"var(--c--theme--colors--primary-text)","background--color-hover":"var(--c--theme--colors--greyscale-100)","background--color-active":"var(--c--theme--colors--primary-100)","background--color-focus-visible":"#fff","background--color-disabled":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-800)","color-hover":"var(--c--theme--colors--primary-800)",disabled:"var(--c--theme--colors--greyscale-400)"},secondary:{"background--color-hover":"#F6F6F6","background--color-active":"#EDEDED","background--color-focus-visible":"var(--c--theme--colors--greyscale-000)","background--disabled":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-800)","border--color":"var(--c--theme--colors--greyscale-300)","border--color-hover":"var(--c--theme--colors--greyscale-300)","border--color-disabled":"var(--c--theme--colors--greyscale-300)",disabled:"var(--c--theme--colors--greyscale-400)"},tertiary:{"background--color":"var(--c--theme--colors--primary-100)","background--color-focus-visible":"var(--c--theme--colors--primary-100)","background--color-hover":"var(--c--theme--colors--primary-300)","background--color-active":"var(--c--theme--colors--primary-300)","background--disabled":"var(--c--theme--colors--primary-050)",color:"var(--c--theme--colors--primary-800)",disabled:"var(--c--theme--colors--primary-300)"},"tertiary-text":{"background--color-hover":"var(--c--theme--colors--greyscale-100)","color-hover":"var(--c--theme--colors--primary-text)",color:"var(--c--theme--colors--primary-600)"},danger:{"color-hover":"white","background--color":"var(--c--theme--colors--danger-600)","background--color-hover":"#FF2725","background--color-focus-visible":"var(--c--theme--colors--danger-600)","background--color-disabled":"var(--c--theme--colors--greyscale-100)","color-disabled":"var(--c--theme--colors--greyscale-400)"}},datagrid:{"header--color":"ref(theme.colors.greyscale-600)","header--size":"12px","header--weight":"500","body--background-color-hover":"ref(theme.colors.greyscale-100)"},"forms-checkbox":{"border-radius":"4px","border-color":"var(--c--theme--colors--primary-800)","background-color--hover":"var(--c--theme--colors--greyscale-100)","border--color-disabled":"var(--c--theme--colors--greyscale-200)","border--color":"var(--c--theme--colors--primary-800)","background--disabled":"var(--c--theme--colors--greyscale-200)","background--enable":"var(--c--theme--colors--primary-800)","check--disabled":"var(--c--theme--colors--greyscale-300)","check--enable":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-text)","label--color":"var(--c--theme--colors--greyscale-1000)","label--size":"var(--c--theme--font--sizes--sm)","label--weight":"500","text--color":"var(--c--theme--colors--greyscale-600)","text--size":"var(--c--theme--font--sizes--s)","text--weight":"400","text--color-disabled":"var(--c--theme--colors--greyscale-300)"},"forms-labelledbox":{"label-color--small":"ref(theme.colors.greyscale-950)","label-color--small--disabled":"ref(theme.colors.greyscale-300)","label-color--big":"ref(theme.colors.greyscale-950)","label-color--big--disabled":"ref(theme.colors.greyscale-300)"},"forms-radio":{"border-color":"var(--c--theme--colors--primary-800)","background-color":"var(--c--theme--colors--greyscale-000)","accent-color":"var(--c--theme--colors--primary-800)","accent-color-disabled":"var(--c--theme--colors--greyscale-300)"},"forms-switch":{"border--color-disabled":"var(--c--theme--colors--greyscale-300)","border--color":"var(--c--theme--colors--primary-800)","handle-background-color":"white","handle-background-color--disabled":"var(--c--theme--colors--greyscale-000)","rail-background-color--disabled":"var(--c--theme--colors--greyscale-000)","accent-color":"var(--c--theme--colors--primary-800)"},"forms-textarea":{"label-color--focus":"ref(theme.colors.greyscale-1000)","border-radius":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","value-color--disabled":"ref(theme.colors.greyscale-300)","font-size":"14px"},"forms-input":{"label-color--focus":"ref(theme.colors.greyscale-1000)","border-radius":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","value-color--disabled":"ref(theme.colors.greyscale-300)","font-size":"14px"},"forms-select":{"label-color--focus":"ref(theme.colors.greyscale-1000)","item-font-size":"14px","border-radius":"4px","border-radius-hover":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","font-size":"14px"}}}}},vi=()=>{const[t,e]=d.useState(window.innerWidth),n=parseInt(jo.themes.default.theme.breakpoints.mobile.replace("px","")),r=parseInt(jo.themes.default.theme.breakpoints.tablet.replace("px","")),i=()=>{e(window.innerWidth)};d.useEffect(()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}),[]);const o=t<=n,a=t<=r,s=t>r;return{isMobile:o,isTablet:a,isDesktop:s}},nd=({children:t,isOpen:e=!1})=>{const{isDesktop:n}=vi();return n?T.jsx("div",{className:"c__left-panel",children:t}):T.jsx("div",{className:jt("c__left-panel__mobile",{open:e}),children:t})},{createElement:bn,createContext:am,createRef:xx,forwardRef:rd,useCallback:xe,useContext:id,useEffect:Tt,useImperativeHandle:od,useLayoutEffect:sm,useMemo:lm,useRef:Ce,useState:hn}=C,zs=C[`useId${Math.random()}`.slice(0,5)],um=sm,mi=am(null);mi.displayName="PanelGroupContext";const Dt=um,cm=typeof zs=="function"?zs:()=>null;let dm=0;function $a(t=null){const e=cm(),n=Ce(t||e||null);return n.current===null&&(n.current=""+dm++),t??n.current}function ad({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:o,id:a,maxSize:s,minSize:l,onCollapse:u,onExpand:c,onResize:p,order:g,style:h,tagName:y="div",...f}){const v=id(mi);if(v===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:m,expandPanel:S,getPanelSize:w,getPanelStyle:O,groupId:x,isPanelCollapsed:D,reevaluatePanelConstraints:P,registerPanel:b,resizePanel:k,unregisterPanel:B}=v,R=$a(a),z=Ce({callbacks:{onCollapse:u,onExpand:c,onResize:p},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:s,minSize:l},id:R,idIsFromProps:a!==void 0,order:g});Ce({didLogMissingDefaultSizeWarning:!1}),Dt(()=>{const{callbacks:I,constraints:j}=z.current,V={...j};z.current.id=R,z.current.idIsFromProps=a!==void 0,z.current.order=g,I.onCollapse=u,I.onExpand=c,I.onResize=p,j.collapsedSize=n,j.collapsible=r,j.defaultSize=i,j.maxSize=s,j.minSize=l,(V.collapsedSize!==j.collapsedSize||V.collapsible!==j.collapsible||V.maxSize!==j.maxSize||V.minSize!==j.minSize)&&P(z.current,V)}),Dt(()=>{const I=z.current;return b(I),()=>{B(I)}},[g,R,b,B]),od(o,()=>({collapse:()=>{m(z.current)},expand:I=>{S(z.current,I)},getId(){return R},getSize(){return w(z.current)},isCollapsed(){return D(z.current)},isExpanded(){return!D(z.current)},resize:I=>{k(z.current,I)}}),[m,S,w,D,R,k]);const E=O(z.current,i);return bn(y,{...f,children:t,className:e,id:a,style:{...E,...h},"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-group-id":x,"data-panel-id":R,"data-panel-size":parseFloat(""+E.flexGrow).toFixed(1)})}const zo=rd((t,e)=>bn(ad,{...t,forwardedRef:e}));ad.displayName="Panel";zo.displayName="forwardRef(Panel)";let Ho=null,Ct=null;function fm(t,e){if(e){const n=(e&dd)!==0,r=(e&fd)!==0,i=(e&hd)!==0,o=(e&pd)!==0;if(n)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function hm(){Ct!==null&&(document.head.removeChild(Ct),Ho=null,Ct=null)}function Vi(t,e){const n=fm(t,e);Ho!==n&&(Ho=n,Ct===null&&(Ct=document.createElement("style"),document.head.appendChild(Ct)),Ct.innerHTML=`*{cursor: ${n}!important;}`)}function sd(t){return t.type==="keydown"}function ld(t){return t.type.startsWith("pointer")}function ud(t){return t.type.startsWith("mouse")}function yi(t){if(ld(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(ud(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function pm(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function gm(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function vm(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:Ws(t),b:Ws(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;ee(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Bs(Hs(n.a)),b:Bs(Hs(n.b))};if(i.a===i.b){const o=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let s=o.length;for(;s--;){const l=o[s];if(l===a.a)return 1;if(l===a.b)return-1}}return Math.sign(i.a-i.b)}const mm=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function ym(t){var e;const n=getComputedStyle((e=cd(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function bm(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||ym(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||mm.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Hs(t){let e=t.length;for(;e--;){const n=t[e];if(ee(n,"Missing node"),bm(n))return n}return null}function Bs(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Ws(t){const e=[];for(;t;)e.push(t),t=cd(t);return e}function cd(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const dd=1,fd=2,hd=4,pd=8,Sm=pm()==="coarse";let He=[],pn=!1,ht=new Map,bi=new Map;const Xn=new Set;function wm(t,e,n,r,i){var o;const{ownerDocument:a}=e,s={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:i},l=(o=ht.get(a))!==null&&o!==void 0?o:0;return ht.set(a,l+1),Xn.add(s),ei(),function(){var c;bi.delete(t),Xn.delete(s);const p=(c=ht.get(a))!==null&&c!==void 0?c:1;if(ht.set(a,p-1),ei(),p===1&&ht.delete(a),He.includes(s)){const g=He.indexOf(s);g>=0&&He.splice(g,1),Ca(),i("up",!0,null)}}}function Us(t){const{target:e}=t,{x:n,y:r}=yi(t);pn=!0,xa({target:e,x:n,y:r}),ei(),He.length>0&&(ti("down",t),t.preventDefault(),t.stopPropagation())}function kn(t){const{x:e,y:n}=yi(t);if(pn&&t.buttons===0&&(pn=!1,ti("up",t)),!pn){const{target:r}=t;xa({target:r,x:e,y:n})}ti("move",t),Ca(),He.length>0&&t.preventDefault()}function Ut(t){const{target:e}=t,{x:n,y:r}=yi(t);bi.clear(),pn=!1,He.length>0&&t.preventDefault(),ti("up",t),xa({target:e,x:n,y:r}),Ca(),ei()}function xa({target:t,x:e,y:n}){He.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),Xn.forEach(i=>{const{element:o,hitAreaMargins:a}=i,s=o.getBoundingClientRect(),{bottom:l,left:u,right:c,top:p}=s,g=Sm?a.coarse:a.fine;if(e>=u-g&&e<=c+g&&n>=p-g&&n<=l+g){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&vm(r,o)>0){let y=r,f=!1;for(;y&&!y.contains(o);){if(gm(y.getBoundingClientRect(),s)){f=!0;break}y=y.parentElement}if(f)return}He.push(i)}})}function Gi(t,e){bi.set(t,e)}function Ca(){let t=!1,e=!1;He.forEach(r=>{const{direction:i}=r;i==="horizontal"?t=!0:e=!0});let n=0;bi.forEach(r=>{n|=r}),t&&e?Vi("intersection",n):t?Vi("horizontal",n):e?Vi("vertical",n):hm()}function ei(){ht.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",Ut),n.removeEventListener("pointerdown",Us),n.removeEventListener("pointerleave",kn),n.removeEventListener("pointermove",kn)}),window.removeEventListener("pointerup",Ut),window.removeEventListener("pointercancel",Ut),Xn.size>0&&(pn?(He.length>0&&ht.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",Ut),n.addEventListener("pointerleave",kn),n.addEventListener("pointermove",kn))}),window.addEventListener("pointerup",Ut),window.addEventListener("pointercancel",Ut)):ht.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("pointerdown",Us,{capture:!0}),n.addEventListener("pointermove",kn))}))}function ti(t,e){Xn.forEach(n=>{const{setResizeHandlerState:r}=n,i=He.includes(n);r(t,i,e)})}function Em(){const[t,e]=hn(0);return xe(()=>e(n=>n+1),[])}function ee(t,e){if(!t)throw console.error(e),Error(e)}const Ta=10;function Nt(t,e,n=Ta){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function nt(t,e,n=Ta){return Nt(t,e,n)===0}function Te(t,e,n){return Nt(t,e,n)===0}function $m(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const i=t[r],o=e[r];if(!Te(i,o,n))return!1}return!0}function cn({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];ee(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:a=100,minSize:s=0}=r;if(Nt(n,s)<0)if(o){const l=(i+s)/2;Nt(n,l)<0?n=i:n=s}else n=s;return n=Math.min(a,n),n=parseFloat(n.toFixed(Ta)),n}function Ln({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(Te(t,0))return e;const a=[...e],[s,l]=r;ee(s!=null,"Invalid first pivot index"),ee(l!=null,"Invalid second pivot index");let u=0;if(o==="keyboard"){{const p=t<0?l:s,g=n[p];ee(g,`Panel constraints not found for index ${p}`);const{collapsedSize:h=0,collapsible:y,minSize:f=0}=g;if(y){const v=e[p];if(ee(v!=null,`Previous layout not found for panel index ${p}`),Te(v,h)){const m=f-v;Nt(m,Math.abs(t))>0&&(t=t<0?0-m:m)}}}{const p=t<0?s:l,g=n[p];ee(g,`No panel constraints found for index ${p}`);const{collapsedSize:h=0,collapsible:y,minSize:f=0}=g;if(y){const v=e[p];if(ee(v!=null,`Previous layout not found for panel index ${p}`),Te(v,f)){const m=v-h;Nt(m,Math.abs(t))>0&&(t=t<0?0-m:m)}}}}{const p=t<0?1:-1;let g=t<0?l:s,h=0;for(;;){const f=e[g];ee(f!=null,`Previous layout not found for panel index ${g}`);const m=cn({panelConstraints:n,panelIndex:g,size:100})-f;if(h+=m,g+=p,g<0||g>=n.length)break}const y=Math.min(Math.abs(t),Math.abs(h));t=t<0?0-y:y}{let g=t<0?s:l;for(;g>=0&&g<n.length;){const h=Math.abs(t)-Math.abs(u),y=e[g];ee(y!=null,`Previous layout not found for panel index ${g}`);const f=y-h,v=cn({panelConstraints:n,panelIndex:g,size:f});if(!Te(y,v)&&(u+=y-v,a[g]=v,u.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?g--:g++}}if($m(i,a))return i;{const p=t<0?l:s,g=e[p];ee(g!=null,`Previous layout not found for panel index ${p}`);const h=g+u,y=cn({panelConstraints:n,panelIndex:p,size:h});if(a[p]=y,!Te(y,h)){let f=h-y,m=t<0?l:s;for(;m>=0&&m<n.length;){const S=a[m];ee(S!=null,`Previous layout not found for panel index ${m}`);const w=S+f,O=cn({panelConstraints:n,panelIndex:m,size:w});if(Te(S,O)||(f-=O-S,a[m]=O),Te(f,0))break;t>0?m--:m++}}}const c=a.reduce((p,g)=>g+p,0);return Te(c,100)?a:i}function xm({layout:t,panelsArray:e,pivotIndices:n}){let r=0,i=100,o=0,a=0;const s=n[0];ee(s!=null,"No pivot index found"),e.forEach((p,g)=>{const{constraints:h}=p,{maxSize:y=100,minSize:f=0}=h;g===s?(r=f,i=y):(o+=f,a+=y)});const l=Math.min(i,100-o),u=Math.max(r,100-a),c=t[s];return{valueMax:l,valueMin:u,valueNow:c}}function Jn(t,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`))}function gd(t,e,n=document){const i=Jn(t,n).findIndex(o=>o.getAttribute("data-panel-resize-handle-id")===e);return i??null}function vd(t,e,n){const r=gd(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function md(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Si(t,e=document){const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function Cm(t,e,n,r=document){var i,o,a,s;const l=Si(e,r),u=Jn(t,r),c=l?u.indexOf(l):-1,p=(i=(o=n[c])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,g=(a=(s=n[c+1])===null||s===void 0?void 0:s.id)!==null&&a!==void 0?a:null;return[p,g]}function Tm({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:a}){Ce({didWarnAboutMissingResizeHandle:!1}),Dt(()=>{if(!o)return;const s=Jn(n,o);for(let l=0;l<i.length-1;l++){const{valueMax:u,valueMin:c,valueNow:p}=xm({layout:r,panelsArray:i,pivotIndices:[l,l+1]}),g=s[l];if(g!=null){const h=i[l];ee(h,`No panel data found for index "${l}"`),g.setAttribute("aria-controls",h.id),g.setAttribute("aria-valuemax",""+Math.round(u)),g.setAttribute("aria-valuemin",""+Math.round(c)),g.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{s.forEach((l,u)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,r,i,o]),Tt(()=>{if(!o)return;const s=e.current;ee(s,"Eager values not found");const{panelDataArray:l}=s,u=md(n,o);ee(u!=null,`No group found for id "${n}"`);const c=Jn(n,o);ee(c,`No resize handles found for group id "${n}"`);const p=c.map(g=>{const h=g.getAttribute("data-panel-resize-handle-id");ee(h,"Resize handle element has no handle id attribute");const[y,f]=Cm(n,h,l,o);if(y==null||f==null)return()=>{};const v=m=>{if(!m.defaultPrevented)switch(m.key){case"Enter":{m.preventDefault();const S=l.findIndex(w=>w.id===y);if(S>=0){const w=l[S];ee(w,`No panel data found for index ${S}`);const O=r[S],{collapsedSize:x=0,collapsible:D,minSize:P=0}=w.constraints;if(O!=null&&D){const b=Ln({delta:Te(O,x)?P-x:x-O,initialLayout:r,panelConstraints:l.map(k=>k.constraints),pivotIndices:vd(n,h,o),prevLayout:r,trigger:"keyboard"});r!==b&&a(b)}}break}}};return g.addEventListener("keydown",v),()=>{g.removeEventListener("keydown",v)}});return()=>{p.forEach(g=>g())}},[o,t,e,n,r,i,a])}function Vs(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function yd(t,e){const n=t==="horizontal",{x:r,y:i}=yi(e);return n?r:i}function Dm(t,e,n,r,i){const o=n==="horizontal",a=Si(e,i);ee(a,`No resize handle element found for id "${e}"`);const s=a.getAttribute("data-panel-group-id");ee(s,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const u=yd(n,t),c=md(s,i);ee(c,`No group element found for id "${s}"`);const p=c.getBoundingClientRect(),g=o?p.width:p.height;return(u-l)/g*100}function Pm(t,e,n,r,i,o){if(sd(t)){const a=n==="horizontal";let s=0;t.shiftKey?s=100:i!=null?s=i:s=10;let l=0;switch(t.key){case"ArrowDown":l=a?0:s;break;case"ArrowLeft":l=a?-s:0;break;case"ArrowRight":l=a?s:0;break;case"ArrowUp":l=a?0:-s;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:Dm(t,e,n,r,o)}function Om({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<t.length;o++){const a=n[o];ee(a,`Panel constraints not found for index ${o}`);const{defaultSize:s}=a;s!=null&&(r++,e[o]=s,i-=s)}for(let o=0;o<t.length;o++){const a=n[o];ee(a,`Panel constraints not found for index ${o}`);const{defaultSize:s}=a;if(s!=null)continue;const l=t.length-r,u=i/l;r++,e[o]=u,i-=u}return e}function Vt(t,e,n){e.forEach((r,i)=>{const o=t[i];ee(o,`Panel data not found for index ${i}`);const{callbacks:a,constraints:s,id:l}=o,{collapsedSize:u=0,collapsible:c}=s,p=n[l];if(p==null||r!==p){n[l]=r;const{onCollapse:g,onExpand:h,onResize:y}=a;y&&y(r,p),c&&(g||h)&&(h&&(p==null||nt(p,u))&&!nt(r,u)&&h(),g&&(p==null||!nt(p,u))&&nt(r,u)&&g())}})}function Sr(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function Im({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:i,precision:o=3}){const a=n[i];let s;return a==null?s=t!=null?t.toPrecision(o):"1":r.length===1?s="1":s=a.toPrecision(o),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function _m(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}function Gs(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function bd(t){return`react-resizable-panels:${t}`}function Sd(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function wd(t,e){try{const n=bd(t),r=e.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function km(t,e,n){var r,i;const o=(r=wd(t,n))!==null&&r!==void 0?r:{},a=Sd(e);return(i=o[a])!==null&&i!==void 0?i:null}function Nm(t,e,n,r,i){var o;const a=bd(t),s=Sd(e),l=(o=wd(t,i))!==null&&o!==void 0?o:{};l[s]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(l))}catch(u){console.error(u)}}function qs({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,a)=>o+a,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!Te(r,100)&&n.length>0)for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const s=100/r*a;n[o]=s}let i=0;for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const s=cn({panelConstraints:e,panelIndex:o,size:a});a!=s&&(i+=a-s,n[o]=s)}if(!Te(i,0))for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const s=a+i,l=cn({panelConstraints:e,panelIndex:o,size:s});if(a!==l&&(i-=l-a,n[o]=l,Te(i,0)))break}return n}const Rm=100,Fn={getItem:t=>(Gs(Fn),Fn.getItem(t)),setItem:(t,e)=>{Gs(Fn),Fn.setItem(t,e)}},Ys={};function Ed({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:i,id:o=null,onLayout:a=null,keyboardResizeBy:s=null,storage:l=Fn,style:u,tagName:c="div",...p}){const g=$a(o),h=Ce(null),[y,f]=hn(null),[v,m]=hn([]),S=Em(),w=Ce({}),O=Ce(new Map),x=Ce(0),D=Ce({autoSaveId:t,direction:r,dragState:y,id:g,keyboardResizeBy:s,onLayout:a,storage:l}),P=Ce({layout:v,panelDataArray:[],panelDataArrayChanged:!1});Ce({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),od(i,()=>({getId:()=>D.current.id,getLayout:()=>{const{layout:N}=P.current;return N},setLayout:N=>{const{onLayout:L}=D.current,{layout:K,panelDataArray:W}=P.current,U=qs({layout:N,panelConstraints:W.map(F=>F.constraints)});Vs(K,U)||(m(U),P.current.layout=U,L&&L(U),Vt(W,U,w.current))}}),[]),Dt(()=>{D.current.autoSaveId=t,D.current.direction=r,D.current.dragState=y,D.current.id=g,D.current.onLayout=a,D.current.storage=l}),Tm({committedValuesRef:D,eagerValuesRef:P,groupId:g,layout:v,panelDataArray:P.current.panelDataArray,setLayout:m,panelGroupElement:h.current}),Tt(()=>{const{panelDataArray:N}=P.current;if(t){if(v.length===0||v.length!==N.length)return;let L=Ys[t];L==null&&(L=_m(Nm,Rm),Ys[t]=L);const K=[...N],W=new Map(O.current);L(t,K,W,v,l)}},[t,v,l]),Tt(()=>{});const b=xe(N=>{const{onLayout:L}=D.current,{layout:K,panelDataArray:W}=P.current;if(N.constraints.collapsible){const U=W.map(de=>de.constraints),{collapsedSize:F=0,panelSize:X,pivotIndices:te}=bt(W,N,K);if(ee(X!=null,`Panel size not found for panel "${N.id}"`),!nt(X,F)){O.current.set(N.id,X);const ce=an(W,N)===W.length-1?X-F:F-X,oe=Ln({delta:ce,initialLayout:K,panelConstraints:U,pivotIndices:te,prevLayout:K,trigger:"imperative-api"});Sr(K,oe)||(m(oe),P.current.layout=oe,L&&L(oe),Vt(W,oe,w.current))}}},[]),k=xe((N,L)=>{const{onLayout:K}=D.current,{layout:W,panelDataArray:U}=P.current;if(N.constraints.collapsible){const F=U.map(ge=>ge.constraints),{collapsedSize:X=0,panelSize:te=0,minSize:de=0,pivotIndices:ce}=bt(U,N,W),oe=L??de;if(nt(te,X)){const ge=O.current.get(N.id),re=ge!=null&&ge>=oe?ge:oe,at=an(U,N)===U.length-1?te-re:re-te,ve=Ln({delta:at,initialLayout:W,panelConstraints:F,pivotIndices:ce,prevLayout:W,trigger:"imperative-api"});Sr(W,ve)||(m(ve),P.current.layout=ve,K&&K(ve),Vt(U,ve,w.current))}}},[]),B=xe(N=>{const{layout:L,panelDataArray:K}=P.current,{panelSize:W}=bt(K,N,L);return ee(W!=null,`Panel size not found for panel "${N.id}"`),W},[]),R=xe((N,L)=>{const{panelDataArray:K}=P.current,W=an(K,N);return Im({defaultSize:L,dragState:y,layout:v,panelData:K,panelIndex:W})},[y,v]),z=xe(N=>{const{layout:L,panelDataArray:K}=P.current,{collapsedSize:W=0,collapsible:U,panelSize:F}=bt(K,N,L);return ee(F!=null,`Panel size not found for panel "${N.id}"`),U===!0&&nt(F,W)},[]),E=xe(N=>{const{layout:L,panelDataArray:K}=P.current,{collapsedSize:W=0,collapsible:U,panelSize:F}=bt(K,N,L);return ee(F!=null,`Panel size not found for panel "${N.id}"`),!U||Nt(F,W)>0},[]),I=xe(N=>{const{panelDataArray:L}=P.current;L.push(N),L.sort((K,W)=>{const U=K.order,F=W.order;return U==null&&F==null?0:U==null?-1:F==null?1:U-F}),P.current.panelDataArrayChanged=!0,S()},[S]);Dt(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:N,onLayout:L,storage:K}=D.current,{layout:W,panelDataArray:U}=P.current;let F=null;if(N){const te=km(N,U,K);te&&(O.current=new Map(Object.entries(te.expandToSizes)),F=te.layout)}F==null&&(F=Om({panelDataArray:U}));const X=qs({layout:F,panelConstraints:U.map(te=>te.constraints)});Vs(W,X)||(m(X),P.current.layout=X,L&&L(X),Vt(U,X,w.current))}}),Dt(()=>{const N=P.current;return()=>{N.layout=[]}},[]);const j=xe(N=>{let L=!1;const K=h.current;return K&&window.getComputedStyle(K,null).getPropertyValue("direction")==="rtl"&&(L=!0),function(U){U.preventDefault();const F=h.current;if(!F)return()=>null;const{direction:X,dragState:te,id:de,keyboardResizeBy:ce,onLayout:oe}=D.current,{layout:ge,panelDataArray:re}=P.current,{initialLayout:Ue}=te??{},at=vd(de,N,F);let ve=Pm(U,N,X,te,ce,F);const Tn=X==="horizontal";Tn&&L&&(ve=-ve);const sr=re.map(q=>q.constraints),$=Ln({delta:ve,initialLayout:Ue??ge,panelConstraints:sr,pivotIndices:at,prevLayout:ge,trigger:sd(U)?"keyboard":"mouse-or-touch"}),G=!Sr(ge,$);(ld(U)||ud(U))&&x.current!=ve&&(x.current=ve,!G&&ve!==0?Tn?Gi(N,ve<0?dd:fd):Gi(N,ve<0?hd:pd):Gi(N,0)),G&&(m($),P.current.layout=$,oe&&oe($),Vt(re,$,w.current))}},[]),V=xe((N,L)=>{const{onLayout:K}=D.current,{layout:W,panelDataArray:U}=P.current,F=U.map(ge=>ge.constraints),{panelSize:X,pivotIndices:te}=bt(U,N,W);ee(X!=null,`Panel size not found for panel "${N.id}"`);const ce=an(U,N)===U.length-1?X-L:L-X,oe=Ln({delta:ce,initialLayout:W,panelConstraints:F,pivotIndices:te,prevLayout:W,trigger:"imperative-api"});Sr(W,oe)||(m(oe),P.current.layout=oe,K&&K(oe),Vt(U,oe,w.current))},[]),A=xe((N,L)=>{const{layout:K,panelDataArray:W}=P.current,{collapsedSize:U=0,collapsible:F}=L,{collapsedSize:X=0,collapsible:te,maxSize:de=100,minSize:ce=0}=N.constraints,{panelSize:oe}=bt(W,N,K);oe!=null&&(F&&te&&nt(oe,U)?nt(U,X)||V(N,X):oe<ce?V(N,ce):oe>de&&V(N,de))},[V]),_=xe((N,L)=>{const{direction:K}=D.current,{layout:W}=P.current;if(!h.current)return;const U=Si(N,h.current);ee(U,`Drag handle element not found for id "${N}"`);const F=yd(K,L);f({dragHandleId:N,dragHandleRect:U.getBoundingClientRect(),initialCursorPosition:F,initialLayout:W})},[]),H=xe(()=>{f(null)},[]),Y=xe(N=>{const{panelDataArray:L}=P.current,K=an(L,N);K>=0&&(L.splice(K,1),delete w.current[N.id],P.current.panelDataArrayChanged=!0,S())},[S]),Q=lm(()=>({collapsePanel:b,direction:r,dragState:y,expandPanel:k,getPanelSize:B,getPanelStyle:R,groupId:g,isPanelCollapsed:z,isPanelExpanded:E,reevaluatePanelConstraints:A,registerPanel:I,registerResizeHandle:j,resizePanel:V,startDragging:_,stopDragging:H,unregisterPanel:Y,panelGroupElement:h.current}),[b,y,r,k,B,R,g,z,E,A,I,j,V,_,H,Y]),M={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return bn(mi.Provider,{value:Q},bn(c,{...p,children:e,className:n,id:o,ref:h,style:{...M,...u},"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":g}))}const $d=rd((t,e)=>bn(Ed,{...t,forwardedRef:e}));Ed.displayName="PanelGroup";$d.displayName="forwardRef(PanelGroup)";function an(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function bt(t,e,n){const r=an(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:o}}function Mm({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){Tt(()=>{if(t||n==null||r==null)return;const i=Si(e,r);if(i==null)return;const o=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const s=i.getAttribute("data-panel-group-id");ee(s,`No group element found for id "${s}"`);const l=Jn(s,r),u=gd(s,e,r);ee(u!==null,`No resize element found for id "${e}"`);const c=a.shiftKey?u>0?u-1:l.length-1:u+1<l.length?u+1:0;l[c].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,t,e,n])}function xd({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:o,onDragging:a,onFocus:s,style:l={},tabIndex:u=0,tagName:c="div",...p}){var g,h;const y=Ce(null),f=Ce({onDragging:a});Tt(()=>{f.current.onDragging=a});const v=id(mi);if(v===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:m,groupId:S,registerResizeHandle:w,startDragging:O,stopDragging:x,panelGroupElement:D}=v,P=$a(i),[b,k]=hn("inactive"),[B,R]=hn(!1),[z,E]=hn(null),I=Ce({state:b});Dt(()=>{I.current.state=b}),Tt(()=>{if(n)E(null);else{const _=w(P);E(()=>_)}},[n,P,w]);const j=(g=r==null?void 0:r.coarse)!==null&&g!==void 0?g:15,V=(h=r==null?void 0:r.fine)!==null&&h!==void 0?h:5;return Tt(()=>{if(n||z==null)return;const _=y.current;return ee(_,"Element ref not attached"),wm(P,_,m,{coarse:j,fine:V},(Y,Q,M)=>{if(Q)switch(Y){case"down":{k("drag"),ee(M,'Expected event to be defined for "down" action'),O(P,M);const{onDragging:N}=f.current;N&&N(!0);break}case"move":{const{state:N}=I.current;N!=="drag"&&k("hover"),ee(M,'Expected event to be defined for "move" action'),z(M);break}case"up":{k("hover"),x();const{onDragging:N}=f.current;N&&N(!1);break}}else k("inactive")})},[j,m,n,V,w,P,z,O,x]),Mm({disabled:n,handleId:P,resizeHandler:z,panelGroupElement:D}),bn(c,{...p,children:t,className:e,id:i,onBlur:()=>{R(!1),o==null||o()},onFocus:()=>{R(!0),s==null||s()},ref:y,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...l},tabIndex:u,"data-panel-group-direction":m,"data-panel-group-id":S,"data-resize-handle":"","data-resize-handle-active":b==="drag"?"pointer":B?"keyboard":void 0,"data-resize-handle-state":b,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":P})}xd.displayName="PanelResizeHandle";const Am=({icon:t,children:e,leftPanelContent:n,rightHeaderContent:r,languages:i,enableResize:o=!1})=>{const[a,s]=d.useState(!1),{isDesktop:l}=vi(),[u,c]=d.useState(wr(300,l)),[p,g]=d.useState(wr(450,l)),h=()=>{s(!a)};return d.useEffect(()=>{const y=()=>{const f=wr(300,l),v=Math.min(wr(450,l),40);c(l?f:0),g(o?v:f)};return y(),window.addEventListener("resize",()=>{y()}),()=>{window.removeEventListener("resize",y)}},[l,o]),T.jsxs("div",{className:"c__main-layout",children:[T.jsx("div",{className:"c__main-layout__header",children:T.jsx(td,{onTogglePanel:h,isPanelOpen:a,rightIcon:r,leftIcon:t,languages:i})}),T.jsx("div",{className:"c__main-layout__content",children:T.jsxs($d,{direction:"horizontal",children:[T.jsx(zo,{defaultSize:u,minSize:u,maxSize:p,children:T.jsx(nd,{isOpen:a,children:n})}),l&&T.jsx(xd,{className:"bg-greyscale-200",style:{width:"1px"}}),T.jsx(zo,{children:T.jsx("div",{className:"c__main-layout__content__children",children:e})})]})})]})},wr=(t,e)=>{if(!e)return 0;const n=window.innerWidth;return t/n*100},Km=52,Da=({size:t="sm"})=>T.jsx("div",{className:["c__spinner",t].join(" ")}),Cd=({children:t,text:e,...n})=>T.jsxs("div",{className:"suite__label__container",children:[T.jsx("label",{...n,children:t}),e&&T.jsx("span",{className:"suite__label__container__description",children:e})]}),Lm=({label:t,text:e,labelSide:n="right",children:r})=>T.jsxs("div",{className:jt("c__with-label",{[n]:!0}),children:[T.jsx(Cd,{children:t,text:e}),r]});var Xs=1,Fm=.9,jm=.8,zm=.17,qi=.1,Yi=.999,Hm=.9999,Bm=.99,Wm=/[\\\/_+.#"@\[\(\{&]/,Um=/[\\\/_+.#"@\[\(\{&]/g,Vm=/[\s-]/,Td=/[\s-]/g;function Bo(t,e,n,r,i,o,a){if(o===e.length)return i===t.length?Xs:Bm;var s=`${i},${o}`;if(a[s]!==void 0)return a[s];for(var l=r.charAt(o),u=n.indexOf(l,i),c=0,p,g,h,y;u>=0;)p=Bo(t,e,n,r,u+1,o+1,a),p>c&&(u===i?p*=Xs:Wm.test(t.charAt(u-1))?(p*=jm,h=t.slice(i,u-1).match(Um),h&&i>0&&(p*=Math.pow(Yi,h.length))):Vm.test(t.charAt(u-1))?(p*=Fm,y=t.slice(i,u-1).match(Td),y&&i>0&&(p*=Math.pow(Yi,y.length))):(p*=zm,i>0&&(p*=Math.pow(Yi,u-i))),t.charAt(u)!==e.charAt(o)&&(p*=Hm)),(p<qi&&n.charAt(u-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(u-1)!==r.charAt(o))&&(g=Bo(t,e,n,r,u+1,o+2,a),g*qi>p&&(p=g*qi)),p>c&&(c=p),u=n.indexOf(l,u+1);return a[s]=c,c}function Js(t){return t.toLowerCase().replace(Td," ")}function Gm(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,Bo(t,e,Js(t),Js(e),0,0,{})}function vt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function Qs(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Dd(...t){return e=>{let n=!1;const r=t.map(i=>{const o=Qs(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():Qs(t[i],null)}}}}function zt(...t){return C.useCallback(Dd(...t),t)}function qm(t,e){const n=C.createContext(e),r=o=>{const{children:a,...s}=o,l=C.useMemo(()=>s,Object.values(s));return T.jsx(n.Provider,{value:l,children:a})};r.displayName=t+"Provider";function i(o){const a=C.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[r,i]}function Ym(t,e=[]){let n=[];function r(o,a){const s=C.createContext(a),l=n.length;n=[...n,a];const u=p=>{var m;const{scope:g,children:h,...y}=p,f=((m=g==null?void 0:g[t])==null?void 0:m[l])||s,v=C.useMemo(()=>y,Object.values(y));return T.jsx(f.Provider,{value:v,children:h})};u.displayName=o+"Provider";function c(p,g){var f;const h=((f=g==null?void 0:g[t])==null?void 0:f[l])||s,y=C.useContext(h);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[u,c]}const i=()=>{const o=n.map(a=>C.createContext(a));return function(s){const l=(s==null?void 0:s[t])||o;return C.useMemo(()=>({[`__scope${t}`]:{...s,[t]:l}}),[s,l])}};return i.scopeName=t,[r,Xm(i,...e)]}function Xm(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}var ni=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},Jm=C.useId||(()=>{}),Qm=0;function it(t){const[e,n]=C.useState(Jm());return ni(()=>{n(r=>r??String(Qm++))},[t]),e?`radix-${e}`:""}function Rt(t){const e=C.useRef(t);return C.useEffect(()=>{e.current=t}),C.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function Zm({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=ey({defaultProp:e,onChange:n}),o=t!==void 0,a=o?t:r,s=Rt(n),l=C.useCallback(u=>{if(o){const p=typeof u=="function"?u(t):u;p!==t&&s(p)}else i(u)},[o,t,i,s]);return[a,l]}function ey({defaultProp:t,onChange:e}){const n=C.useState(t),[r]=n,i=C.useRef(r),o=Rt(e);return C.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var Pa=C.forwardRef((t,e)=>{const{children:n,...r}=t,i=C.Children.toArray(n),o=i.find(ny);if(o){const a=o.props.children,s=i.map(l=>l===o?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return T.jsx(Wo,{...r,ref:e,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return T.jsx(Wo,{...r,ref:e,children:n})});Pa.displayName="Slot";var Wo=C.forwardRef((t,e)=>{const{children:n,...r}=t;if(C.isValidElement(n)){const i=iy(n),o=ry(r,n.props);return n.type!==C.Fragment&&(o.ref=e?Dd(e,i):i),C.cloneElement(n,o)}return C.Children.count(n)>1?C.Children.only(null):null});Wo.displayName="SlotClone";var ty=({children:t})=>T.jsx(T.Fragment,{children:t});function ny(t){return C.isValidElement(t)&&t.type===ty}function ry(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}function iy(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var oy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],be=oy.reduce((t,e)=>{const n=C.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Pa:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function ay(t,e){t&&rh.flushSync(()=>t.dispatchEvent(e))}function sy(t,e=globalThis==null?void 0:globalThis.document){const n=Rt(t);C.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var ly="DismissableLayer",Uo="dismissableLayer.update",uy="dismissableLayer.pointerDownOutside",cy="dismissableLayer.focusOutside",Zs,Pd=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Od=C.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=t,u=C.useContext(Pd),[c,p]=C.useState(null),g=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=C.useState({}),y=zt(e,P=>p(P)),f=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=f.indexOf(v),S=c?f.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=S>=m,x=hy(P=>{const b=P.target,k=[...u.branches].some(B=>B.contains(b));!O||k||(i==null||i(P),a==null||a(P),P.defaultPrevented||s==null||s())},g),D=py(P=>{const b=P.target;[...u.branches].some(B=>B.contains(b))||(o==null||o(P),a==null||a(P),P.defaultPrevented||s==null||s())},g);return sy(P=>{S===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&s&&(P.preventDefault(),s()))},g),C.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Zs=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),el(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Zs)}},[c,g,n,u]),C.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),el())},[c,u]),C.useEffect(()=>{const P=()=>h({});return document.addEventListener(Uo,P),()=>document.removeEventListener(Uo,P)},[]),T.jsx(be.div,{...l,ref:y,style:{pointerEvents:w?O?"auto":"none":void 0,...t.style},onFocusCapture:vt(t.onFocusCapture,D.onFocusCapture),onBlurCapture:vt(t.onBlurCapture,D.onBlurCapture),onPointerDownCapture:vt(t.onPointerDownCapture,x.onPointerDownCapture)})});Od.displayName=ly;var dy="DismissableLayerBranch",fy=C.forwardRef((t,e)=>{const n=C.useContext(Pd),r=C.useRef(null),i=zt(e,r);return C.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),T.jsx(be.div,{...t,ref:i})});fy.displayName=dy;function hy(t,e=globalThis==null?void 0:globalThis.document){const n=Rt(t),r=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let l=function(){Id(uy,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function py(t,e=globalThis==null?void 0:globalThis.document){const n=Rt(t),r=C.useRef(!1);return C.useEffect(()=>{const i=o=>{o.target&&!r.current&&Id(cy,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function el(){const t=new CustomEvent(Uo);document.dispatchEvent(t)}function Id(t,e,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?ay(i,o):i.dispatchEvent(o)}var Xi="focusScope.autoFocusOnMount",Ji="focusScope.autoFocusOnUnmount",tl={bubbles:!1,cancelable:!0},gy="FocusScope",_d=C.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=t,[s,l]=C.useState(null),u=Rt(i),c=Rt(o),p=C.useRef(null),g=zt(e,f=>l(f)),h=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let f=function(w){if(h.paused||!s)return;const O=w.target;s.contains(O)?p.current=O:ut(p.current,{select:!0})},v=function(w){if(h.paused||!s)return;const O=w.relatedTarget;O!==null&&(s.contains(O)||ut(p.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&ut(s)};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const S=new MutationObserver(m);return s&&S.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),S.disconnect()}}},[r,s,h.paused]),C.useEffect(()=>{if(s){rl.add(h);const f=document.activeElement;if(!s.contains(f)){const m=new CustomEvent(Xi,tl);s.addEventListener(Xi,u),s.dispatchEvent(m),m.defaultPrevented||(vy(wy(kd(s)),{select:!0}),document.activeElement===f&&ut(s))}return()=>{s.removeEventListener(Xi,u),setTimeout(()=>{const m=new CustomEvent(Ji,tl);s.addEventListener(Ji,c),s.dispatchEvent(m),m.defaultPrevented||ut(f??document.body,{select:!0}),s.removeEventListener(Ji,c),rl.remove(h)},0)}}},[s,u,c,h]);const y=C.useCallback(f=>{if(!n&&!r||h.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,m=document.activeElement;if(v&&m){const S=f.currentTarget,[w,O]=my(S);w&&O?!f.shiftKey&&m===O?(f.preventDefault(),n&&ut(w,{select:!0})):f.shiftKey&&m===w&&(f.preventDefault(),n&&ut(O,{select:!0})):m===S&&f.preventDefault()}},[n,r,h.paused]);return T.jsx(be.div,{tabIndex:-1,...a,ref:g,onKeyDown:y})});_d.displayName=gy;function vy(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(ut(r,{select:e}),document.activeElement!==n)return}function my(t){const e=kd(t),n=nl(e,t),r=nl(e.reverse(),t);return[n,r]}function kd(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function nl(t,e){for(const n of t)if(!yy(n,{upTo:e}))return n}function yy(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function by(t){return t instanceof HTMLInputElement&&"select"in t}function ut(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&by(t)&&e&&t.select()}}var rl=Sy();function Sy(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=il(t,e),t.unshift(e)},remove(e){var n;t=il(t,e),(n=t[0])==null||n.resume()}}}function il(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function wy(t){return t.filter(e=>e.tagName!=="A")}var Ey="Portal",Nd=C.forwardRef((t,e)=>{var s;const{container:n,...r}=t,[i,o]=C.useState(!1);ni(()=>o(!0),[]);const a=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?Ft.createPortal(T.jsx(be.div,{...r,ref:e}),a):null});Nd.displayName=Ey;function $y(t,e){return C.useReducer((n,r)=>e[n][r]??n,t)}var wi=t=>{const{present:e,children:n}=t,r=xy(e),i=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),o=zt(r.ref,Cy(i));return typeof n=="function"||r.isPresent?C.cloneElement(i,{ref:o}):null};wi.displayName="Presence";function xy(t){const[e,n]=C.useState(),r=C.useRef({}),i=C.useRef(t),o=C.useRef("none"),a=t?"mounted":"unmounted",[s,l]=$y(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const u=Er(r.current);o.current=s==="mounted"?u:"none"},[s]),ni(()=>{const u=r.current,c=i.current;if(c!==t){const g=o.current,h=Er(u);t?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&g!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),ni(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,p=h=>{const f=Er(r.current).includes(h.animationName);if(h.target===e&&f&&(l("ANIMATION_END"),!i.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},g=h=>{h.target===e&&(o.current=Er(r.current))};return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",p),e.addEventListener("animationend",p),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",p),e.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Er(t){return(t==null?void 0:t.animationName)||"none"}function Cy(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Qi=0;function Ty(){C.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??ol()),document.body.insertAdjacentElement("beforeend",t[1]??ol()),Qi++,()=>{Qi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Qi--}},[])}function ol(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var kr="right-scroll-bar-position",Nr="width-before-scroll-bar",Dy="with-scroll-bars-hidden",Py="--removed-body-scroll-bar-size";function Zi(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Oy(t,e){var n=d.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var Iy=typeof window<"u"?C.useLayoutEffect:C.useEffect,al=new WeakMap;function _y(t,e){var n=Oy(null,function(r){return t.forEach(function(i){return Zi(i,r)})});return Iy(function(){var r=al.get(n);if(r){var i=new Set(r),o=new Set(t),a=n.current;i.forEach(function(s){o.has(s)||Zi(s,null)}),o.forEach(function(s){i.has(s)||Zi(s,a)})}al.set(n,t)},[t]),n}function ky(t){return t}function Ny(t,e){e===void 0&&(e=ky);var n=[],r=!1,i={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]:t},useMedium:function(o){var a=e(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var c=a;a=[],c.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){a.push(c),u()},filter:function(c){return a=a.filter(c),n}}}};return i}function Ry(t){t===void 0&&(t={});var e=Ny(null);return e.options=Ge({async:!0,ssr:!1},t),e}var Rd=function(t){var e=t.sideCar,n=rc(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return C.createElement(r,Ge({},n))};Rd.isSideCarExport=!0;function My(t,e){return t.useMedium(e),Rd}var Md=Ry(),eo=function(){},Ei=C.forwardRef(function(t,e){var n=C.useRef(null),r=C.useState({onScrollCapture:eo,onWheelCapture:eo,onTouchMoveCapture:eo}),i=r[0],o=r[1],a=t.forwardProps,s=t.children,l=t.className,u=t.removeScrollBar,c=t.enabled,p=t.shards,g=t.sideCar,h=t.noIsolation,y=t.inert,f=t.allowPinchZoom,v=t.as,m=v===void 0?"div":v,S=t.gapMode,w=rc(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=g,x=_y([n,e]),D=Ge(Ge({},w),i);return C.createElement(C.Fragment,null,c&&C.createElement(O,{sideCar:Md,removeScrollBar:u,shards:p,noIsolation:h,inert:y,setCallbacks:o,allowPinchZoom:!!f,lockRef:n,gapMode:S}),a?C.cloneElement(C.Children.only(s),Ge(Ge({},D),{ref:x})):C.createElement(m,Ge({},D,{className:l,ref:x}),s))});Ei.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ei.classNames={fullWidth:Nr,zeroRight:kr};var Ay=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ky(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=Ay();return e&&t.setAttribute("nonce",e),t}function Ly(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Fy(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var jy=function(){var t=0,e=null;return{add:function(n){t==0&&(e=Ky())&&(Ly(e,n),Fy(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},zy=function(){var t=jy();return function(e,n){C.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Ad=function(){var t=zy(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},Hy={left:0,top:0,right:0,gap:0},to=function(t){return parseInt(t||"",10)||0},By=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[to(n),to(r),to(i)]},Wy=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Hy;var e=By(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},Uy=Ad(),gn="data-scroll-locked",Vy=function(t,e,n,r){var i=t.left,o=t.top,a=t.right,s=t.gap;return n===void 0&&(n="margin"),`
48
48
  .`.concat(Dy,` {
49
49
  overflow: hidden `).concat(r,`;
50
50
  padding-right: `).concat(s,"px ").concat(r,`;
@@ -88,15 +88,15 @@ Check the top-level render call using <`+$+">."),G}var w=d,O=Symbol.for("react.t
88
88
 
89
89
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
90
90
 
91
- For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return C.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},Eb="DialogDescriptionWarning",$b=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Zd(Eb).contentName}}.`;return C.useEffect(()=>{var o;const i=(o=t.current)==null?void 0:o.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},xb=Bd,Cb=Vd,Tb=Gd,Db=qd,Nn='[cmdk-group=""]',ro='[cmdk-group-items=""]',Pb='[cmdk-group-heading=""]',Na='[cmdk-item=""]',dl=`${Na}:not([aria-disabled="true"])`,Go="cmdk-item-select",St="data-value",Ob=(t,e,n)=>Gm(t,e,n),ef=C.createContext(void 0),ar=()=>C.useContext(ef),tf=C.createContext(void 0),Ra=()=>C.useContext(tf),nf=C.createContext(void 0),rf=C.forwardRef((t,e)=>{let n=sn(()=>{var A,R;return{search:"",value:(R=(A=t.value)!=null?A:t.defaultValue)!=null?R:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=sn(()=>new Set),i=sn(()=>new Map),o=sn(()=>new Map),a=sn(()=>new Set),s=of(t),{label:l,children:u,value:c,onValueChange:p,filter:g,shouldFilter:h,loop:y,disablePointerSelection:f=!1,vimBindings:v=!0,...m}=t,S=it(),w=it(),O=it(),x=C.useRef(null),D=jb();At(()=>{if(c!==void 0){let A=c.trim();n.current.value=A,P.emit()}},[c]),At(()=>{D(6,E)},[]);let P=C.useMemo(()=>({subscribe:A=>(a.current.add(A),()=>a.current.delete(A)),snapshot:()=>n.current,setState:(A,R,F)=>{var K,W,U;if(!Object.is(n.current[A],R)){if(n.current[A]=R,A==="search")H(),B(),D(1,N);else if(A==="value"&&(F||D(5,E),((K=s.current)==null?void 0:K.value)!==void 0)){let L=R??"";(U=(W=s.current).onValueChange)==null||U.call(W,L);return}P.emit()}},emit:()=>{a.current.forEach(A=>A())}}),[]),b=C.useMemo(()=>({value:(A,R,F)=>{var K;R!==((K=o.current.get(A))==null?void 0:K.value)&&(o.current.set(A,{value:R,keywords:F}),n.current.filtered.items.set(A,k(R,F)),D(2,()=>{B(),P.emit()}))},item:(A,R)=>(r.current.add(A),R&&(i.current.has(R)?i.current.get(R).add(A):i.current.set(R,new Set([A]))),D(3,()=>{H(),B(),n.current.value||N(),P.emit()}),()=>{o.current.delete(A),r.current.delete(A),n.current.filtered.items.delete(A);let F=I();D(4,()=>{H(),(F==null?void 0:F.getAttribute("id"))===A&&N(),P.emit()})}),group:A=>(i.current.has(A)||i.current.set(A,new Set),()=>{o.current.delete(A),i.current.delete(A)}),filter:()=>s.current.shouldFilter,label:l||t["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:S,inputId:O,labelId:w,listInnerRef:x}),[]);function k(A,R){var F,K;let W=(K=(F=s.current)==null?void 0:F.filter)!=null?K:Ob;return A?W(A,n.current.search,R):0}function B(){if(!n.current.search||s.current.shouldFilter===!1)return;let A=n.current.filtered.items,R=[];n.current.filtered.groups.forEach(K=>{let W=i.current.get(K),U=0;W.forEach(L=>{let Y=A.get(L);U=Math.max(Y,U)}),R.push([K,U])});let F=x.current;z().sort((K,W)=>{var U,L;let Y=K.getAttribute("id"),ee=W.getAttribute("id");return((U=A.get(ee))!=null?U:0)-((L=A.get(Y))!=null?L:0)}).forEach(K=>{let W=K.closest(ro);W?W.appendChild(K.parentElement===W?K:K.closest(`${ro} > *`)):F.appendChild(K.parentElement===F?K:K.closest(`${ro} > *`))}),R.sort((K,W)=>W[1]-K[1]).forEach(K=>{var W;let U=(W=x.current)==null?void 0:W.querySelector(`${Nn}[${St}="${encodeURIComponent(K[0])}"]`);U==null||U.parentElement.appendChild(U)})}function N(){let A=z().find(F=>F.getAttribute("aria-disabled")!=="true"),R=A==null?void 0:A.getAttribute(St);P.setState("value",R||void 0)}function H(){var A,R,F,K;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let W=0;for(let U of r.current){let L=(R=(A=o.current.get(U))==null?void 0:A.value)!=null?R:"",Y=(K=(F=o.current.get(U))==null?void 0:F.keywords)!=null?K:[],ee=k(L,Y);n.current.filtered.items.set(U,ee),ee>0&&W++}for(let[U,L]of i.current)for(let Y of L)if(n.current.filtered.items.get(Y)>0){n.current.filtered.groups.add(U);break}n.current.filtered.count=W}function E(){var A,R,F;let K=I();K&&(((A=K.parentElement)==null?void 0:A.firstChild)===K&&((F=(R=K.closest(Nn))==null?void 0:R.querySelector(Pb))==null||F.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function I(){var A;return(A=x.current)==null?void 0:A.querySelector(`${Na}[aria-selected="true"]`)}function z(){var A;return Array.from(((A=x.current)==null?void 0:A.querySelectorAll(dl))||[])}function M(A){let R=z()[A];R&&P.setState("value",R.getAttribute(St))}function j(A){var R;let F=I(),K=z(),W=K.findIndex(L=>L===F),U=K[W+A];(R=s.current)!=null&&R.loop&&(U=W+A<0?K[K.length-1]:W+A===K.length?K[0]:K[W+A]),U&&P.setState("value",U.getAttribute(St))}function _(A){let R=I(),F=R==null?void 0:R.closest(Nn),K;for(;F&&!K;)F=A>0?Lb(F,Nn):Fb(F,Nn),K=F==null?void 0:F.querySelector(dl);K?P.setState("value",K.getAttribute(St)):j(A)}let V=()=>M(z().length-1),J=A=>{A.preventDefault(),A.metaKey?V():A.altKey?_(1):j(1)},re=A=>{A.preventDefault(),A.metaKey?M(0):A.altKey?_(-1):j(-1)};return C.createElement(be.div,{ref:e,tabIndex:-1,...m,"cmdk-root":"",onKeyDown:A=>{var R;if((R=m.onKeyDown)==null||R.call(m,A),!A.defaultPrevented)switch(A.key){case"n":case"j":{v&&A.ctrlKey&&J(A);break}case"ArrowDown":{J(A);break}case"p":case"k":{v&&A.ctrlKey&&re(A);break}case"ArrowUp":{re(A);break}case"Home":{A.preventDefault(),M(0);break}case"End":{A.preventDefault(),V();break}case"Enter":if(!A.nativeEvent.isComposing&&A.keyCode!==229){A.preventDefault();let F=I();if(F){let K=new Event(Go);F.dispatchEvent(K)}}}}},C.createElement("label",{"cmdk-label":"",htmlFor:b.inputId,id:b.labelId,style:Hb},l),$i(t,A=>C.createElement(tf.Provider,{value:P},C.createElement(ef.Provider,{value:b},A))))}),Ib=C.forwardRef((t,e)=>{var n,r;let i=it(),o=C.useRef(null),a=C.useContext(nf),s=ar(),l=of(t),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;At(()=>{if(!u)return s.item(i,a==null?void 0:a.id)},[u]);let c=af(i,o,[t.value,t.children,o],t.keywords),p=Ra(),g=Kt(D=>D.value&&D.value===c.current),h=Kt(D=>u||s.filter()===!1?!0:D.search?D.filtered.items.get(i)>0:!0);C.useEffect(()=>{let D=o.current;if(!(!D||t.disabled))return D.addEventListener(Go,y),()=>D.removeEventListener(Go,y)},[h,t.onSelect,t.disabled]);function y(){var D,P;f(),(P=(D=l.current).onSelect)==null||P.call(D,c.current)}function f(){p.setState("value",c.current,!0)}if(!h)return null;let{disabled:v,value:m,onSelect:S,forceMount:w,keywords:O,...x}=t;return C.createElement(be.div,{ref:Zn([o,e]),...x,id:i,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!g,"data-disabled":!!v,"data-selected":!!g,onPointerMove:v||s.getDisablePointerSelection()?void 0:f,onClick:v?void 0:y},t.children)}),_b=C.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:i,...o}=t,a=it(),s=C.useRef(null),l=C.useRef(null),u=it(),c=ar(),p=Kt(h=>i||c.filter()===!1?!0:h.search?h.filtered.groups.has(a):!0);At(()=>c.group(a),[]),af(a,s,[t.value,t.heading,l]);let g=C.useMemo(()=>({id:a,forceMount:i}),[i]);return C.createElement(be.div,{ref:Zn([s,e]),...o,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&C.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),$i(t,h=>C.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},C.createElement(nf.Provider,{value:g},h))))}),kb=C.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,i=C.useRef(null),o=Kt(a=>!a.search);return!n&&!o?null:C.createElement(be.div,{ref:Zn([i,e]),...r,"cmdk-separator":"",role:"separator"})}),Nb=C.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,i=t.value!=null,o=Ra(),a=Kt(c=>c.search),s=Kt(c=>c.value),l=ar(),u=C.useMemo(()=>{var c;let p=(c=l.listInnerRef.current)==null?void 0:c.querySelector(`${Na}[${St}="${encodeURIComponent(s)}"]`);return p==null?void 0:p.getAttribute("id")},[]);return C.useEffect(()=>{t.value!=null&&o.setState("search",t.value)},[t.value]),C.createElement(be.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":u,id:l.inputId,type:"text",value:i?t.value:a,onChange:c=>{i||o.setState("search",c.target.value),n==null||n(c.target.value)}})}),Rb=C.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...i}=t,o=C.useRef(null),a=C.useRef(null),s=ar();return C.useEffect(()=>{if(a.current&&o.current){let l=a.current,u=o.current,c,p=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let g=l.offsetHeight;u.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return p.observe(l),()=>{cancelAnimationFrame(c),p.unobserve(l)}}},[]),C.createElement(be.div,{ref:Zn([o,e]),...i,"cmdk-list":"",role:"listbox","aria-label":r,id:s.listId},$i(t,l=>C.createElement("div",{ref:Zn([a,s.listInnerRef]),"cmdk-list-sizer":""},l)))}),Mb=C.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...s}=t;return C.createElement(xb,{open:n,onOpenChange:r},C.createElement(Cb,{container:a},C.createElement(Tb,{"cmdk-overlay":"",className:i}),C.createElement(Db,{"aria-label":t.label,"cmdk-dialog":"",className:o},C.createElement(rf,{ref:e,...s}))))}),Ab=C.forwardRef((t,e)=>Kt(n=>n.filtered.count===0)?C.createElement(be.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),Kb=C.forwardRef((t,e)=>{let{progress:n,children:r,label:i="Loading...",...o}=t;return C.createElement(be.div,{ref:e,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},$i(t,a=>C.createElement("div",{"aria-hidden":!0},a)))}),Qn=Object.assign(rf,{List:Rb,Item:Ib,Input:Nb,Group:_b,Separator:kb,Dialog:Mb,Empty:Ab,Loading:Kb});function Lb(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function Fb(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function of(t){let e=C.useRef(t);return At(()=>{e.current=t}),e}var At=typeof window>"u"?C.useEffect:C.useLayoutEffect;function sn(t){let e=C.useRef();return e.current===void 0&&(e.current=t()),e}function Zn(t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Kt(t){let e=Ra(),n=()=>t(e.snapshot());return da.useSyncExternalStore(e.subscribe,n,n)}function af(t,e,n,r=[]){let i=C.useRef(),o=ar();return At(()=>{var a;let s=(()=>{var u;for(let c of n){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():i.current}})(),l=r.map(u=>u.trim());o.value(t,s,l),(a=e.current)==null||a.setAttribute(St,s),i.current=s}),i}var jb=()=>{let[t,e]=C.useState(),n=sn(()=>new Map);return At(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,i)=>{n.current.set(r,i),e({})}};function zb(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function $i({asChild:t,children:e},n){return t&&C.isValidElement(e)?C.cloneElement(zb(e),{ref:e.ref},n(e.props.children)):n(e)}var Hb={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const qo=({withPadding:t=!0})=>T.jsx("div",{className:jt("c__horizontal-separator",{"with-padding":t})}),sf=({loading:t,inputValue:e,onFilter:n,placeholder:r,children:i,withSeparator:o=!0})=>{const{t:a}=vn.useCunningham();return i?T.jsxs(T.Fragment,{children:[i,o&&T.jsx(qo,{})]}):T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"quick-search-input-container",children:[!t&&T.jsx("span",{className:"material-icons",children:"search"}),t&&T.jsx("div",{children:T.jsx(Da,{size:"sm"})}),T.jsx(Qn.Input,{autoFocus:!0,"aria-label":a("Quick search input"),onClick:s=>{s.stopPropagation()},role:"combobox",value:e,placeholder:r,onValueChange:n})]}),o&&T.jsx(qo,{withPadding:!1})]})},Bb=t=>{let e=!1;return d.Children.forEach(t,n=>{e=e||!!n}),e},Wb=({onFilter:t,inputContent:e,inputValue:n,loading:r,showInput:i=!0,label:o,placeholder:a,children:s})=>{const l=d.useRef(null);return T.jsx(T.Fragment,{children:T.jsx("div",{className:"quick-search-container",children:T.jsxs(Qn,{label:o,shouldFilter:!1,ref:l,children:[i&&T.jsx(sf,{loading:r,withSeparator:Bb(s),inputValue:n,onFilter:t,placeholder:a,children:e}),T.jsx(Qn.List,{children:T.jsx("div",{children:s})})]})})})},Rr=({children:t,onSelect:e,id:n})=>T.jsx(Qn.Item,{value:n,onSelect:e,children:t}),Ub=({group:t,onSelect:e,renderElement:n})=>{var r,i;return!t.showWhenEmpty&&t.elements.length===0?null:T.jsx("div",{className:"pt-base",children:T.jsxs(Qn.Group,{heading:t.groupName,forceMount:!1,children:[(r=t.startActions)==null?void 0:r.map((o,a)=>T.jsx(Rr,{onSelect:o.onSelect,children:o.content},`${t.groupName}-action-${a}`)),t.elements.map((o,a)=>T.jsx(Rr,{id:`${t.groupName}-element-${a}`,onSelect:()=>{e==null||e(o)},children:n==null?void 0:n(o)},`${t.groupName}-element-${a}`)),(i=t.endActions)==null?void 0:i.map((o,a)=>T.jsx(Rr,{onSelect:o.onSelect,children:o.content},`${t.groupName}-action-${a}`)),t.emptyString&&t.elements.length===0&&T.jsx("span",{className:"ml-b clr-greyscale-500",children:t.emptyString})]},t.groupName)})},Vb=({alwaysShowRight:t,left:e,right:n})=>{const{isDesktop:r}=vi();return T.jsxs("div",{className:"c__quick-search-item-template",children:[T.jsx("div",{className:"c__quick-search-item-template__left",children:e}),r&&n&&T.jsx("div",{className:jt("c__quick-search-item-template__right",{"show-right-on-focus":t}),children:n})]})},Gb=({tabs:t,defaultSelectedTab:e,fullWidth:n=!1})=>t.length===0?null:T.jsx("div",{className:jt("c__tabs",{"c__tabs__full-width":n}),children:T.jsxs(em,{defaultSelectedKey:e,children:[T.jsx(nm,{"aria-label":"History of Ancient Rome",children:t.map(r=>T.jsxs(im,{id:r.id,children:[r.icon&&T.jsx("span",{className:"material-icons",children:r.icon}),r.label]},r.id))}),t.map(r=>T.jsx(om,{id:r.id,children:r.content},r.id))]})}),lf=d.createContext(null);function Oe(){const t=d.useContext(lf);if(t===null)throw new Error("No Tree Api Provided");return t}const uf=d.createContext(null);function qb(){const t=d.useContext(uf);if(t===null)throw new Error("Provide a NodesContext");return t}const cf=d.createContext(null);function Yb(){const t=d.useContext(cf);if(t===null)throw new Error("Provide a DnDContext");return t}const df=d.createContext(0);function ff(){d.useContext(df)}function Mr(t,e,n){return Math.max(Math.min(t,n),e)}function hf(t){return t&&t.isLeaf}function pf(t){return t&&t.isInternal&&!t.isOpen}function gf(t){var e;return t&&t.isOpen&&!(!((e=t.children)===null||e===void 0)&&e.length)}const vf=(t,e)=>{let n=t;for(;n;){if(n.id===e.id)return!0;n=n.parent}return!1},mf=t=>{if(!t.parent)throw Error("Node does not have a parent");return t.parent.children.findIndex(e=>e.id===t.id)};function Xb(){}function Ma(t,e){if(!t)return null;if(t.id===e)return t;if(t.children)for(let n of t.children){const r=Ma(n,e);if(r)return r}return null}function ii(t,e){if(e(t),t.children)for(let n of t.children)ii(n,e)}function yf(t){const e=Sf(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=Jb(e,r);break}n==null||n.focus()}function bf(t){const e=Sf(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=Qb(e,r);break}n==null||n.focus()}function Jb(t,e){return e+1<t.length?t[e+1]:t[0]}function Qb(t,e){return e-1>=0?t[e-1]:t[t.length-1]}function Sf(t){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter(e=>e===t||!t.contains(e))}function jn(t,e){return typeof e=="boolean"?e:typeof e=="string"?t[e]:e(t)}function wf(t){return t===null?null:wt(t)}function wt(t){return typeof t=="string"?t:t.id}function Zb(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Ef(t,...e){if(t)return t(...e)}function $f(t){return new Promise((e,n)=>{let r=0;function i(){r+=1,r===100&&n(),t()?e():setTimeout(i,10)}i()})}function xf(t){var e,n;const r=t.focusedNode;return r?r.isOpen?0:r.parent?r.childIndex+1:0:(n=(e=t.root.children)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0}function Cf(t){const e=t.focusedNode;return e?e.isOpen?e.id:e.parent&&!e.parent.isRoot?e.parent.id:null:null}const eS=Object.freeze(Object.defineProperty({__proto__:null,access:jn,bound:Mr,dfs:Ma,focusNextElement:yf,focusPrevElement:bf,getInsertIndex:xf,getInsertParentId:Cf,identify:wt,identifyNull:wf,indexOf:mf,isClosed:pf,isDescendant:vf,isItem:hf,isOpenWithEmptyChildren:gf,mergeRefs:Zb,noop:Xb,safeRun:Ef,waitFor:$f,walk:ii},Symbol.toStringTag,{value:"Module"})),tS={display:"flex",alignItems:"center",zIndex:1},nS={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},rS={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"},iS=d.memo(function({top:e,left:n,indent:r}){const i={position:"absolute",pointerEvents:"none",top:e-2+"px",left:n+"px",right:r+"px"};return T.jsxs("div",{style:Object.assign(Object.assign({},tS),i),children:[T.jsx("div",{style:Object.assign({},rS)}),T.jsx("div",{style:Object.assign({},nS)})]})});function oS({node:t,attrs:e,innerRef:n,children:r}){return T.jsx("div",Object.assign({},e,{ref:n,onFocus:i=>i.stopPropagation(),onClick:t.handleClick,children:r}))}function aS(t){return T.jsxs("div",{ref:t.dragHandle,style:t.style,children:[T.jsx("span",{onClick:e=>{e.stopPropagation(),t.node.toggle()},children:t.node.isLeaf?"🌳":t.node.isOpen?"🗁":"🗀"})," ",t.node.isEditing?T.jsx(lS,Object.assign({},t)):T.jsx(sS,Object.assign({},t))]})}function sS(t){return T.jsx(T.Fragment,{children:T.jsx("span",{children:t.node.data.name})})}function lS({node:t}){const e=d.useRef();return d.useEffect(()=>{var n,r;(n=e.current)===null||n===void 0||n.focus(),(r=e.current)===null||r===void 0||r.select()},[]),T.jsx("input",{ref:e,defaultValue:t.data.name,onBlur:()=>t.reset(),onKeyDown:n=>{var r;n.key==="Escape"&&t.reset(),n.key==="Enter"&&t.submit(((r=e.current)===null||r===void 0?void 0:r.value)||"")}})}function io(t){return{type:"EDIT",id:t}}function uS(t={id:null},e){return e.type==="EDIT"?Object.assign(Object.assign({},t),{id:e.id}):t}function Xt(t){return{type:"FOCUS",id:t}}function cS(){return{type:"TREE_BLUR"}}function dS(t={id:null,treeFocused:!1},e){return e.type==="FOCUS"?Object.assign(Object.assign({},t),{id:e.id,treeFocused:!0}):e.type==="TREE_BLUR"?Object.assign(Object.assign({},t),{treeFocused:!1}):t}class oi{constructor(e){this.handleClick=n=>{n.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():n.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=e.tree,this.id=e.id,this.data=e.data,this.level=e.level,this.children=e.children,this.parent=e.parent,this.isDraggable=e.isDraggable,this.rowIndex=e.rowIndex}get isRoot(){return this.id===er}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var e;return this.isSelected&&!(!((e=this.prev)===null||e===void 0)&&e.isSelected)}get isSelectedEnd(){var e;return this.isSelected&&!(!((e=this.next)===null||e===void 0)&&e.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var e,n;const r=this.childIndex;return(n=(e=this.parent)===null||e===void 0?void 0:e.children[r+1])!==null&&n!==void 0?n:null}isAncestorOf(e){if(!e)return!1;let n=e;for(;n;){if(n.id===this.id)return!0;n=n.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(e){this.tree.submit(this,e)}reset(){this.tree.reset()}clone(){return new oi(Object.assign({},this))}edit(){return this.tree.edit(this)}}const er="__REACT_ARBORIST_INTERNAL_ROOT__";function fl(t){var e;function n(o,a,s){const l=t.accessId(o),u=new oi({tree:t,data:o,level:a,parent:s,id:l,children:null,isDraggable:t.isDraggable(o),rowIndex:null}),c=t.accessChildren(o);return c&&(u.children=c.map(p=>n(p,a+1,u))),u}const r=new oi({tree:t,id:er,data:{id:er},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null}),i=(e=t.props.data)!==null&&e!==void 0?e:[];return r.children=i.map(o=>n(o,0,r)),r}const Yo={open(t,e){return{type:"VISIBILITY_OPEN",id:t,filtered:e}},close(t,e){return{type:"VISIBILITY_CLOSE",id:t,filtered:e}},toggle(t,e){return{type:"VISIBILITY_TOGGLE",id:t,filtered:e}},clear(t){return{type:"VISIBILITY_CLEAR",filtered:t}}};function hl(t={},e){if(e.type==="VISIBILITY_OPEN")return Object.assign(Object.assign({},t),{[e.id]:!0});if(e.type==="VISIBILITY_CLOSE")return Object.assign(Object.assign({},t),{[e.id]:!1});if(e.type==="VISIBILITY_TOGGLE"){const n=t[e.id];return Object.assign(Object.assign({},t),{[e.id]:!n})}else return e.type==="VISIBILITY_CLEAR"?{}:t}function fS(t={filtered:{},unfiltered:{}},e){return e.type.startsWith("VISIBILITY")?e.filtered?Object.assign(Object.assign({},t),{filtered:hl(t.filtered,e)}):Object.assign(Object.assign({},t),{unfiltered:hl(t.unfiltered,e)}):t}const Sn=t=>{var e;return{nodes:{open:{filtered:{},unfiltered:(e=t==null?void 0:t.initialOpenState)!==null&&e!==void 0?e:{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}},Fe={clear:()=>({type:"SELECTION_CLEAR"}),only:t=>({type:"SELECTION_ONLY",id:wt(t)}),add:t=>({type:"SELECTION_ADD",ids:(Array.isArray(t)?t:[t]).map(wt)}),remove:t=>({type:"SELECTION_REMOVE",ids:(Array.isArray(t)?t:[t]).map(wt)}),set:t=>Object.assign({type:"SELECTION_SET"},t),mostRecent:t=>({type:"SELECTION_MOST_RECENT",id:t===null?null:wt(t)}),anchor:t=>({type:"SELECTION_ANCHOR",id:t===null?null:wt(t)})};function hS(t=Sn().nodes.selection,e){const n=t.ids;switch(e.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},t),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},t),{ids:new Set([e.id])});case"SELECTION_ADD":return e.ids.length===0?t:(e.ids.forEach(r=>n.add(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_REMOVE":return e.ids.length===0?t:(e.ids.forEach(r=>n.delete(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_SET":return Object.assign(Object.assign({},t),{ids:e.ids,mostRecent:e.mostRecent,anchor:e.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},t),{mostRecent:e.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},t),{anchor:e.id});default:return t}}const wn={cursor(t){return{type:"DND_CURSOR",cursor:t}},dragStart(t,e){return{type:"DND_DRAG_START",id:t,dragIds:e}},dragEnd(){return{type:"DND_DRAG_END"}},hovering(t,e){return{type:"DND_HOVERING",parentId:t,index:e}}};function pS(t=Sn().dnd,e){switch(e.type){case"DND_CURSOR":return Object.assign(Object.assign({},t),{cursor:e.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},t),{dragId:e.id,dragIds:e.dragIds});case"DND_DRAG_END":return Sn().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},t),{parentId:e.parentId,index:e.index});default:return t}}const gS={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},vS=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e}px, ${n}px)`}},mS=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e+10}px, ${n+10}px)`}};function Tf({offset:t,mouse:e,id:n,dragIds:r,isDragging:i}){return T.jsxs(yS,{isDragging:i,children:[T.jsx(bS,{offset:t,children:T.jsx(wS,{id:n,dragIds:r})}),T.jsx(SS,{mouse:e,count:r.length})]})}const yS=d.memo(function(e){return e.isDragging?T.jsx("div",{style:gS,children:e.children}):null});function bS(t){return T.jsx("div",{className:"row preview",style:vS(t.offset),children:t.children})}function SS(t){const{count:e,mouse:n}=t;return e>1?T.jsx("div",{className:"selected-count",style:mS(n),children:e}):null}const wS=d.memo(function(e){const n=Oe(),r=n.get(e.id);return r?T.jsx(n.renderNode,{preview:!0,node:r,style:{paddingLeft:r.level*n.indent,opacity:.2,background:"transparent"},tree:n}):null});function Xo(){return Xo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xo.apply(null,arguments)}function pl(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jo(t,e){return Jo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Jo(t,e)}function ES(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Jo(t,e)}var gl=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function $S(t,e){return!!(t===e||gl(t)&&gl(e))}function xS(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!$S(t[n],e[n]))return!1;return!0}function oo(t,e){e===void 0&&(e=xS);var n,r=[],i,o=!1;function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return o&&n===this&&e(s,r)||(i=t.apply(this,s),o=!0,n=this,r=s),i}return a}var CS=typeof performance=="object"&&typeof performance.now=="function",vl=CS?function(){return performance.now()}:function(){return Date.now()};function ml(t){cancelAnimationFrame(t.id)}function TS(t,e){var n=vl();function r(){vl()-n>=e?t.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var ao=-1;function yl(t){if(t===void 0&&(t=!1),ao===-1||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(e),ao=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return ao}var Jt=null;function bl(t){if(t===void 0&&(t=!1),Jt===null||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?Jt="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?Jt="negative":Jt="positive-ascending"),document.body.removeChild(e),Jt}return Jt}process.env.NODE_ENV;var DS=150,PS=function(e,n){return e},Ar=null,Kr=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(Ar=new WeakSet,Kr=new WeakSet);function OS(t){var e,n=t.getItemOffset,r=t.getEstimatedTotalSize,i=t.getItemSize,o=t.getOffsetForIndexAndAlignment,a=t.getStartIndexForOffset,s=t.getStopIndexForStartIndex,l=t.initInstanceProps,u=t.shouldResetStyleCacheOnItemSizeChange,c=t.validateProps;return e=function(p){ES(g,p);function g(y){var f;return f=p.call(this,y)||this,f._instanceProps=l(f.props,pl(f)),f._outerRef=void 0,f._resetIsScrollingTimeoutId=null,f.state={instance:pl(f),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof f.props.initialScrollOffset=="number"?f.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},f._callOnItemsRendered=void 0,f._callOnItemsRendered=oo(function(v,m,S,w){return f.props.onItemsRendered({overscanStartIndex:v,overscanStopIndex:m,visibleStartIndex:S,visibleStopIndex:w})}),f._callOnScroll=void 0,f._callOnScroll=oo(function(v,m,S){return f.props.onScroll({scrollDirection:v,scrollOffset:m,scrollUpdateWasRequested:S})}),f._getItemStyle=void 0,f._getItemStyle=function(v){var m=f.props,S=m.direction,w=m.itemSize,O=m.layout,x=f._getItemStyleCache(u&&w,u&&O,u&&S),D;if(x.hasOwnProperty(v))D=x[v];else{var P=n(f.props,v,f._instanceProps),b=i(f.props,v,f._instanceProps),k=S==="horizontal"||O==="horizontal",B=S==="rtl",N=k?P:0;x[v]=D={position:"absolute",left:B?void 0:N,right:B?N:void 0,top:k?0:P,height:k?"100%":b,width:k?b:"100%"}}return D},f._getItemStyleCache=void 0,f._getItemStyleCache=oo(function(v,m,S){return{}}),f._onScrollHorizontal=function(v){var m=v.currentTarget,S=m.clientWidth,w=m.scrollLeft,O=m.scrollWidth;f.setState(function(x){if(x.scrollOffset===w)return null;var D=f.props.direction,P=w;if(D==="rtl")switch(bl()){case"negative":P=-w;break;case"positive-descending":P=O-S-w;break}return P=Math.max(0,Math.min(P,O-S)),{isScrolling:!0,scrollDirection:x.scrollOffset<P?"forward":"backward",scrollOffset:P,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._onScrollVertical=function(v){var m=v.currentTarget,S=m.clientHeight,w=m.scrollHeight,O=m.scrollTop;f.setState(function(x){if(x.scrollOffset===O)return null;var D=Math.max(0,Math.min(O,w-S));return{isScrolling:!0,scrollDirection:x.scrollOffset<D?"forward":"backward",scrollOffset:D,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._outerRefSetter=function(v){var m=f.props.outerRef;f._outerRef=v,typeof m=="function"?m(v):m!=null&&typeof m=="object"&&m.hasOwnProperty("current")&&(m.current=v)},f._resetIsScrollingDebounced=function(){f._resetIsScrollingTimeoutId!==null&&ml(f._resetIsScrollingTimeoutId),f._resetIsScrollingTimeoutId=TS(f._resetIsScrolling,DS)},f._resetIsScrolling=function(){f._resetIsScrollingTimeoutId=null,f.setState({isScrolling:!1},function(){f._getItemStyleCache(-1,null)})},f}g.getDerivedStateFromProps=function(f,v){return IS(f,v),c(f),null};var h=g.prototype;return h.scrollTo=function(f){f=Math.max(0,f),this.setState(function(v){return v.scrollOffset===f?null:{scrollDirection:v.scrollOffset<f?"forward":"backward",scrollOffset:f,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},h.scrollToItem=function(f,v){v===void 0&&(v="auto");var m=this.props,S=m.itemCount,w=m.layout,O=this.state.scrollOffset;f=Math.max(0,Math.min(f,S-1));var x=0;if(this._outerRef){var D=this._outerRef;w==="vertical"?x=D.scrollWidth>D.clientWidth?yl():0:x=D.scrollHeight>D.clientHeight?yl():0}this.scrollTo(o(this.props,f,v,O,this._instanceProps,x))},h.componentDidMount=function(){var f=this.props,v=f.direction,m=f.initialScrollOffset,S=f.layout;if(typeof m=="number"&&this._outerRef!=null){var w=this._outerRef;v==="horizontal"||S==="horizontal"?w.scrollLeft=m:w.scrollTop=m}this._callPropsCallbacks()},h.componentDidUpdate=function(){var f=this.props,v=f.direction,m=f.layout,S=this.state,w=S.scrollOffset,O=S.scrollUpdateWasRequested;if(O&&this._outerRef!=null){var x=this._outerRef;if(v==="horizontal"||m==="horizontal")if(v==="rtl")switch(bl()){case"negative":x.scrollLeft=-w;break;case"positive-ascending":x.scrollLeft=w;break;default:var D=x.clientWidth,P=x.scrollWidth;x.scrollLeft=P-D-w;break}else x.scrollLeft=w;else x.scrollTop=w}this._callPropsCallbacks()},h.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&ml(this._resetIsScrollingTimeoutId)},h.render=function(){var f=this.props,v=f.children,m=f.className,S=f.direction,w=f.height,O=f.innerRef,x=f.innerElementType,D=f.innerTagName,P=f.itemCount,b=f.itemData,k=f.itemKey,B=k===void 0?PS:k,N=f.layout,H=f.outerElementType,E=f.outerTagName,I=f.style,z=f.useIsScrolling,M=f.width,j=this.state.isScrolling,_=S==="horizontal"||N==="horizontal",V=_?this._onScrollHorizontal:this._onScrollVertical,J=this._getRangeToRender(),re=J[0],A=J[1],R=[];if(P>0)for(var F=re;F<=A;F++)R.push(d.createElement(v,{data:b,key:B(F,b),index:F,isScrolling:z?j:void 0,style:this._getItemStyle(F)}));var K=r(this.props,this._instanceProps);return d.createElement(H||E||"div",{className:m,onScroll:V,ref:this._outerRefSetter,style:Xo({position:"relative",height:w,width:M,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:S},I)},d.createElement(x||D||"div",{children:R,ref:O,style:{height:_?"100%":K,pointerEvents:j?"none":void 0,width:_?K:"100%"}}))},h._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var f=this.props.itemCount;if(f>0){var v=this._getRangeToRender(),m=v[0],S=v[1],w=v[2],O=v[3];this._callOnItemsRendered(m,S,w,O)}}if(typeof this.props.onScroll=="function"){var x=this.state,D=x.scrollDirection,P=x.scrollOffset,b=x.scrollUpdateWasRequested;this._callOnScroll(D,P,b)}},h._getRangeToRender=function(){var f=this.props,v=f.itemCount,m=f.overscanCount,S=this.state,w=S.isScrolling,O=S.scrollDirection,x=S.scrollOffset;if(v===0)return[0,0,0,0];var D=a(this.props,x,this._instanceProps),P=s(this.props,D,x,this._instanceProps),b=!w||O==="backward"?Math.max(1,m):1,k=!w||O==="forward"?Math.max(1,m):1;return[Math.max(0,D-b),Math.max(0,Math.min(v-1,P+k)),D,P]},g}(d.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var IS=function(e,n){var r=e.children,i=e.direction,o=e.height,a=e.layout,s=e.innerTagName,l=e.outerTagName,u=e.width,c=n.instance;if(process.env.NODE_ENV!=="production"){(s!=null||l!=null)&&Kr&&!Kr.has(c)&&(Kr.add(c),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var p=i==="horizontal"||a==="horizontal";switch(i){case"horizontal":case"vertical":Ar&&!Ar.has(c)&&(Ar.add(c),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+i+'" was specified.'))}switch(a){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+a+'" was specified.'))}if(r==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(r===null?"null":typeof r)+'" was specified.'));if(p&&typeof u!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(u===null?"null":typeof u)+'" was specified.'));if(!p&&typeof o!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(o===null?"null":typeof o)+'" was specified.'))}},_S=OS({getItemOffset:function(e,n){var r=e.itemSize;return n*r},getItemSize:function(e,n){var r=e.itemSize;return r},getEstimatedTotalSize:function(e){var n=e.itemCount,r=e.itemSize;return r*n},getOffsetForIndexAndAlignment:function(e,n,r,i,o,a){var s=e.direction,l=e.height,u=e.itemCount,c=e.itemSize,p=e.layout,g=e.width,h=s==="horizontal"||p==="horizontal",y=h?g:l,f=Math.max(0,u*c-y),v=Math.min(f,n*c),m=Math.max(0,n*c-y+c+a);switch(r==="smart"&&(i>=m-y&&i<=v+y?r="auto":r="center"),r){case"start":return v;case"end":return m;case"center":{var S=Math.round(m+(v-m)/2);return S<Math.ceil(y/2)?0:S>f+Math.floor(y/2)?f:S}case"auto":default:return i>=m&&i<=v?i:i<m?m:v}},getStartIndexForOffset:function(e,n){var r=e.itemCount,i=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(n/i)))},getStopIndexForStartIndex:function(e,n,r){var i=e.direction,o=e.height,a=e.itemCount,s=e.itemSize,l=e.layout,u=e.width,c=i==="horizontal"||l==="horizontal",p=n*s,g=c?u:o,h=Math.ceil((g+r-p)/s);return Math.max(0,Math.min(a-1,n+h-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){var n=e.itemSize;if(process.env.NODE_ENV!=="production"&&typeof n!="number")throw Error('An invalid "itemSize" prop has been specified. Value should be a number. '+('"'+(n===null?"null":typeof n)+'" was specified.'))}});function kS(){var t,e;const n=Oe(),i=Yb().cursor;if(!i||i.type!=="line")return null;const o=n.indent,a=n.rowHeight*i.index+((e=(t=n.props.padding)!==null&&t!==void 0?t:n.props.paddingTop)!==null&&e!==void 0?e:0),s=o*i.level,l=n.renderCursor;return T.jsx(l,{top:a,left:s,indent:o})}var NS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const RS=d.forwardRef(function(e,n){const{children:r}=e,i=NS(e,["children"]),o=Oe();return T.jsxs("div",Object.assign({ref:n},i,{onClick:a=>{a.currentTarget===a.target&&o.deselectAll()},children:[T.jsx(MS,{}),r]}))}),MS=()=>{const t=Oe();return T.jsx("div",{style:{height:t.visibleNodes.length*t.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:T.jsx(kS,{})})};var AS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const KS=d.forwardRef(function(e,n){var r,i,o,a,{style:s}=e,l=AS(e,["style"]);const u=Oe(),c=(i=(r=u.props.padding)!==null&&r!==void 0?r:u.props.paddingTop)!==null&&i!==void 0?i:0,p=(a=(o=u.props.padding)!==null&&o!==void 0?o:u.props.paddingBottom)!==null&&a!==void 0?a:0;return T.jsx("div",Object.assign({ref:n,style:Object.assign(Object.assign({},s),{height:`${parseFloat(s.height)+c+p}px`})},l))});var Df=d.createContext({dragDropManager:void 0}),Me;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(Me||(Me={}));function X(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(process.env.NODE_ENV!=="production"&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){var o;if(e===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;o=new Error(e.replace(/%s/g,function(){return r[a++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}var Aa="dnd-core/INIT_COORDS",xi="dnd-core/BEGIN_DRAG",Ka="dnd-core/PUBLISH_DRAG_SOURCE",Ci="dnd-core/HOVER",Ti="dnd-core/DROP",Di="dnd-core/END_DRAG";function Sl(t,e){return{type:Aa,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}function Lr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Lr=function(n){return typeof n}:Lr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Lr(t)}function LS(t,e,n){return e.split(".").reduce(function(r,i){return r&&r[i]?r[i]:n},t)}function FS(t,e){return t.filter(function(n){return n!==e})}function Pf(t){return Lr(t)==="object"}function jS(t,e){var n=new Map,r=function(a){n.set(a,n.has(a)?n.get(a)+1:1)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(o,a){o===1&&i.push(a)}),i}function zS(t,e){return t.filter(function(n){return e.indexOf(n)>-1})}var HS={type:Aa,payload:{clientOffset:null,sourceClientOffset:null}};function BS(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},i=r.publishSource,o=i===void 0?!0:i,a=r.clientOffset,s=r.getSourceClientOffset,l=t.getMonitor(),u=t.getRegistry();t.dispatch(Sl(a)),WS(n,l,u);var c=GS(n,l);if(c===null){t.dispatch(HS);return}var p=null;if(a){if(!s)throw new Error("getSourceClientOffset must be defined");US(s),p=s(c)}t.dispatch(Sl(a,p));var g=u.getSource(c),h=g.beginDrag(l,c);if(h!=null){VS(h),u.pinSource(c);var y=u.getSourceType(c);return{type:xi,payload:{itemType:y,item:h,sourceId:c,clientOffset:a||null,sourceClientOffset:p||null,isSourcePublic:!!o}}}}}function WS(t,e,n){X(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){X(n.getSource(r),"Expected sourceIds to be registered.")})}function US(t){X(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function VS(t){X(Pf(t),"Item must be an object.")}function GS(t,e){for(var n=null,r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function qS(t){return function(){var n=t.getMonitor();if(n.isDragging())return{type:Ka}}}function Qo(t,e){return e===null?t===null:Array.isArray(t)?t.some(function(n){return n===e}):t===e}function YS(t){return function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.clientOffset;XS(n);var o=n.slice(0),a=t.getMonitor(),s=t.getRegistry();JS(o,a,s);var l=a.getItemType();return QS(o,s,l),ZS(o,a,s),{type:Ci,payload:{targetIds:o,clientOffset:i||null}}}}function XS(t){X(Array.isArray(t),"Expected targetIds to be an array.")}function JS(t,e,n){X(e.isDragging(),"Cannot call hover while not dragging."),X(!e.didDrop(),"Cannot call hover after drop.");for(var r=0;r<t.length;r++){var i=t[r];X(t.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");var o=n.getTarget(i);X(o,"Expected targetIds to be registered.")}}function QS(t,e,n){for(var r=t.length-1;r>=0;r--){var i=t[r],o=e.getTargetType(i);Qo(o,n)||t.splice(r,1)}}function ZS(t,e,n){t.forEach(function(r){var i=n.getTarget(r);i.hover(e,r)})}function wl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function El(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wl(Object(n),!0).forEach(function(r){ew(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ew(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tw(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getMonitor(),i=t.getRegistry();nw(r);var o=ow(r);o.forEach(function(a,s){var l=rw(a,s,i,r),u={type:Ti,payload:{dropResult:El(El({},n),l)}};t.dispatch(u)})}}function nw(t){X(t.isDragging(),"Cannot call drop while not dragging."),X(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function rw(t,e,n,r){var i=n.getTarget(t),o=i?i.drop(r,t):void 0;return iw(o),typeof o>"u"&&(o=e===0?{}:r.getDropResult()),o}function iw(t){X(typeof t>"u"||Pf(t),"Drop result must either be an object or undefined.")}function ow(t){var e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function aw(t){return function(){var n=t.getMonitor(),r=t.getRegistry();sw(n);var i=n.getSourceId();if(i!=null){var o=r.getSource(i,!0);o.endDrag(n,i),r.unpinSource()}return{type:Di}}}function sw(t){X(t.isDragging(),"Cannot call endDrag while not dragging.")}function lw(t){return{beginDrag:BS(t),publishDragSource:qS(t),hover:YS(t),drop:tw(t),endDrag:aw(t)}}function uw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function dw(t,e,n){return cw(t.prototype,e),t}function Rn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var fw=function(){function t(e,n){var r=this;uw(this,t),Rn(this,"store",void 0),Rn(this,"monitor",void 0),Rn(this,"backend",void 0),Rn(this,"isSetUp",!1),Rn(this,"handleRefCountChange",function(){var i=r.store.getState().refCount>0;r.backend&&(i&&!r.isSetUp?(r.backend.setup(),r.isSetUp=!0):!i&&r.isSetUp&&(r.backend.teardown(),r.isSetUp=!1))}),this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}return dw(t,[{key:"receiveBackend",value:function(n){this.backend=n}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var n=this,r=this.store.dispatch;function i(a){return function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var c=a.apply(n,l);typeof c<"u"&&r(c)}}var o=lw(this);return Object.keys(o).reduce(function(a,s){var l=o[s];return a[s]=i(l),a},{})}},{key:"dispatch",value:function(n){this.store.dispatch(n)}}]),t}();function _e(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var $l=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),so=function(){return Math.random().toString(36).substring(7).split("").join(".")},xl={INIT:"@@redux/INIT"+so(),REPLACE:"@@redux/REPLACE"+so(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+so()}};function hw(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function pw(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(mw(t))return"date";if(vw(t))return"error";var n=gw(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function gw(t){return typeof t.constructor=="function"?t.constructor.name:null}function vw(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function mw(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function Qt(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=pw(t)),e}function Of(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?_e(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?_e(1):"Expected the enhancer to be a function. Instead, received: '"+Qt(n)+"'");return n(Of)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?_e(2):"Expected the root reducer to be a function. Instead, received: '"+Qt(t)+"'");var i=t,o=e,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function c(){if(l)throw new Error(process.env.NODE_ENV==="production"?_e(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function p(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?_e(4):"Expected the listener to be a function. Instead, received: '"+Qt(f)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?_e(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var v=!0;return u(),s.push(f),function(){if(v){if(l)throw new Error(process.env.NODE_ENV==="production"?_e(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");v=!1,u();var S=s.indexOf(f);s.splice(S,1),a=null}}}function g(f){if(!hw(f))throw new Error(process.env.NODE_ENV==="production"?_e(7):"Actions must be plain objects. Instead, the actual type was: '"+Qt(f)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof f.type>"u")throw new Error(process.env.NODE_ENV==="production"?_e(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(l)throw new Error(process.env.NODE_ENV==="production"?_e(9):"Reducers may not dispatch actions.");try{l=!0,o=i(o,f)}finally{l=!1}for(var v=a=s,m=0;m<v.length;m++){var S=v[m];S()}return f}function h(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?_e(10):"Expected the nextReducer to be a function. Instead, received: '"+Qt(f));i=f,g({type:xl.REPLACE})}function y(){var f,v=p;return f={subscribe:function(S){if(typeof S!="object"||S===null)throw new Error(process.env.NODE_ENV==="production"?_e(11):"Expected the observer to be an object. Instead, received: '"+Qt(S)+"'");function w(){S.next&&S.next(c())}w();var O=v(w);return{unsubscribe:O}}},f[$l]=function(){return this},f}return g({type:xl.INIT}),r={dispatch:g,subscribe:p,getState:c,replaceReducer:h},r[$l]=y,r}var yw=function(e,n){return e===n};function bw(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function Sw(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yw;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function Cl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Tl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cl(Object(n),!0).forEach(function(r){ww(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ww(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Dl={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Ew(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dl,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case Aa:case xi:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Ci:return bw(t.clientOffset,n.clientOffset)?t:Tl(Tl({},t),{},{clientOffset:n.clientOffset});case Di:case Ti:return Dl;default:return t}}var La="dnd-core/ADD_SOURCE",Fa="dnd-core/ADD_TARGET",ja="dnd-core/REMOVE_SOURCE",Pi="dnd-core/REMOVE_TARGET";function $w(t){return{type:La,payload:{sourceId:t}}}function xw(t){return{type:Fa,payload:{targetId:t}}}function Cw(t){return{type:ja,payload:{sourceId:t}}}function Tw(t){return{type:Pi,payload:{targetId:t}}}function Pl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ke(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pl(Object(n),!0).forEach(function(r){Dw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Dw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Pw={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ow(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Pw,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case xi:return ke(ke({},t),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Ka:return ke(ke({},t),{},{isSourcePublic:!0});case Ci:return ke(ke({},t),{},{targetIds:n.targetIds});case Pi:return t.targetIds.indexOf(n.targetId)===-1?t:ke(ke({},t),{},{targetIds:FS(t.targetIds,n.targetId)});case Ti:return ke(ke({},t),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Di:return ke(ke({},t),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function Iw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case La:case Fa:return t+1;case ja:case Pi:return t-1;default:return t}}var ai=[],za=[];ai.__IS_NONE__=!0;za.__IS_ALL__=!0;function _w(t,e){if(t===ai)return!1;if(t===za||typeof e>"u")return!0;var n=zS(e,t);return n.length>0}function kw(){var t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ci:break;case La:case Fa:case Pi:case ja:return ai;case xi:case Ka:case Di:case Ti:default:return za}var e=t.payload,n=e.targetIds,r=n===void 0?[]:n,i=e.prevTargetIds,o=i===void 0?[]:i,a=jS(r,o),s=a.length>0||!Sw(r,o);if(!s)return ai;var l=o[o.length-1],u=r[r.length-1];return l!==u&&(l&&a.push(l),u&&a.push(u)),a}function Nw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t+1}function Ol(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Il(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ol(Object(n),!0).forEach(function(r){Rw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ol(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Rw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Mw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:kw(t.dirtyHandlerIds,{type:e.type,payload:Il(Il({},e.payload),{},{prevTargetIds:LS(t,"dragOperation.targetIds",[])})}),dragOffset:Ew(t.dragOffset,e),refCount:Iw(t.refCount,e),dragOperation:Ow(t.dragOperation,e),stateId:Nw(t.stateId)}}function Aw(t,e){return{x:t.x+e.x,y:t.y+e.y}}function If(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Kw(t){var e=t.clientOffset,n=t.initialClientOffset,r=t.initialSourceClientOffset;return!e||!n||!r?null:If(Aw(e,r),n)}function Lw(t){var e=t.clientOffset,n=t.initialClientOffset;return!e||!n?null:If(e,n)}function Fw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function zw(t,e,n){return jw(t.prototype,e),t}function _l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Hw=function(){function t(e,n){Fw(this,t),_l(this,"store",void 0),_l(this,"registry",void 0),this.store=e,this.registry=n}return zw(t,[{key:"subscribeToStateChange",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},o=i.handlerIds;X(typeof n=="function","listener must be a function."),X(typeof o>"u"||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");var a=this.store.getState().stateId,s=function(){var u=r.store.getState(),c=u.stateId;try{var p=c===a||c===a+1&&!_w(u.dirtyHandlerIds,o);p||n()}finally{a=c}};return this.store.subscribe(s)}},{key:"subscribeToOffsetChange",value:function(n){var r=this;X(typeof n=="function","listener must be a function.");var i=this.store.getState().dragOffset,o=function(){var s=r.store.getState().dragOffset;s!==i&&(i=s,n())};return this.store.subscribe(o)}},{key:"canDragSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n);return X(r,"Expected to find a valid source. sourceId=".concat(n)),this.isDragging()?!1:r.canDrag(this,n)}},{key:"canDropOnTarget",value:function(n){if(!n)return!1;var r=this.registry.getTarget(n);if(X(r,"Expected to find a valid target. targetId=".concat(n)),!this.isDragging()||this.didDrop())return!1;var i=this.registry.getTargetType(n),o=this.getItemType();return Qo(i,o)&&r.canDrop(this,n)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n,!0);if(X(r,"Expected to find a valid source. sourceId=".concat(n)),!this.isDragging()||!this.isSourcePublic())return!1;var i=this.registry.getSourceType(n),o=this.getItemType();return i!==o?!1:r.isDragging(this,n)}},{key:"isOverTarget",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!n)return!1;var i=r.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(n),a=this.getItemType();if(a&&!Qo(o,a))return!1;var s=this.getTargetIds();if(!s.length)return!1;var l=s.indexOf(n);return i?l===s.length-1:l>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return Kw(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return Lw(this.store.getState().dragOffset)}}]),t}(),Bw=0;function Ww(){return Bw++}function Fr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fr=function(n){return typeof n}:Fr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fr(t)}function Uw(t){X(typeof t.canDrag=="function","Expected canDrag to be a function."),X(typeof t.beginDrag=="function","Expected beginDrag to be a function."),X(typeof t.endDrag=="function","Expected endDrag to be a function.")}function Vw(t){X(typeof t.canDrop=="function","Expected canDrop to be a function."),X(typeof t.hover=="function","Expected hover to be a function."),X(typeof t.drop=="function","Expected beginDrag to be a function.")}function Zo(t,e){if(e&&Array.isArray(t)){t.forEach(function(n){return Zo(n,!1)});return}X(typeof t=="string"||Fr(t)==="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const kl=typeof global<"u"?global:self,_f=kl.MutationObserver||kl.WebKitMutationObserver;function kf(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function Gw(t){let e=1;const n=new _f(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const qw=typeof _f=="function"?Gw:kf;class Yw{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,i=e.length-this.index;r<i;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=qw(this.flush),this.requestErrorThrow=kf(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Xw{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class Jw{create(e){const n=this.freeTasks,r=n.length?n.pop():new Xw(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Nf=new Yw,Qw=new Jw(Nf.registerPendingError);function Zw(t){Nf.enqueueTask(Qw.create(t))}function e0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function t0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n0(t,e,n){return t0(t.prototype,e),t}function Zt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r0(t,e){return s0(t)||a0(t,e)||o0(t,e)||i0()}function i0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
92
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o0(t,e){if(t){if(typeof t=="string")return Nl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nl(t,e)}}function Nl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a0(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function s0(t){if(Array.isArray(t))return t}function l0(t){var e=Ww().toString();switch(t){case Me.SOURCE:return"S".concat(e);case Me.TARGET:return"T".concat(e);default:throw new Error("Unknown Handler Role: ".concat(t))}}function Rl(t){switch(t[0]){case"S":return Me.SOURCE;case"T":return Me.TARGET;default:X(!1,"Cannot parse handler ID: ".concat(t))}}function Ml(t,e){var n=t.entries(),r=!1;do{var i=n.next(),o=i.done,a=r0(i.value,2),s=a[1];if(s===e)return!0;r=!!o}while(!r);return!1}var u0=function(){function t(e){e0(this,t),Zt(this,"types",new Map),Zt(this,"dragSources",new Map),Zt(this,"dropTargets",new Map),Zt(this,"pinnedSourceId",null),Zt(this,"pinnedSource",null),Zt(this,"store",void 0),this.store=e}return n0(t,[{key:"addSource",value:function(n,r){Zo(n),Uw(r);var i=this.addHandler(Me.SOURCE,n,r);return this.store.dispatch($w(i)),i}},{key:"addTarget",value:function(n,r){Zo(n,!0),Vw(r);var i=this.addHandler(Me.TARGET,n,r);return this.store.dispatch(xw(i)),i}},{key:"containsHandler",value:function(n){return Ml(this.dragSources,n)||Ml(this.dropTargets,n)}},{key:"getSource",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;X(this.isSourceId(n),"Expected a valid source ID.");var i=r&&n===this.pinnedSourceId,o=i?this.pinnedSource:this.dragSources.get(n);return o}},{key:"getTarget",value:function(n){return X(this.isTargetId(n),"Expected a valid target ID."),this.dropTargets.get(n)}},{key:"getSourceType",value:function(n){return X(this.isSourceId(n),"Expected a valid source ID."),this.types.get(n)}},{key:"getTargetType",value:function(n){return X(this.isTargetId(n),"Expected a valid target ID."),this.types.get(n)}},{key:"isSourceId",value:function(n){var r=Rl(n);return r===Me.SOURCE}},{key:"isTargetId",value:function(n){var r=Rl(n);return r===Me.TARGET}},{key:"removeSource",value:function(n){var r=this;X(this.getSource(n),"Expected an existing source."),this.store.dispatch(Cw(n)),Zw(function(){r.dragSources.delete(n),r.types.delete(n)})}},{key:"removeTarget",value:function(n){X(this.getTarget(n),"Expected an existing target."),this.store.dispatch(Tw(n)),this.dropTargets.delete(n),this.types.delete(n)}},{key:"pinSource",value:function(n){var r=this.getSource(n);X(r,"Expected an existing source."),this.pinnedSourceId=n,this.pinnedSource=r}},{key:"unpinSource",value:function(){X(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(n,r,i){var o=l0(n);return this.types.set(o,r),n===Me.SOURCE?this.dragSources.set(o,i):n===Me.TARGET&&this.dropTargets.set(o,i),o}}]),t}();function c0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=d0(r),o=new Hw(i,new u0(i)),a=new fw(i,o),s=t(a,e,n);return a.receiveBackend(s),a}function d0(t){var e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Of(Mw,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}var f0=["children"];function h0(t,e){return m0(t)||v0(t,e)||g0(t,e)||p0()}function p0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
93
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g0(t,e){if(t){if(typeof t=="string")return Al(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Al(t,e)}}function Al(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function v0(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function m0(t){if(Array.isArray(t))return t}function y0(t,e){if(t==null)return{};var n=b0(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function b0(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Kl=0,jr=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),S0=d.memo(function(e){var n=e.children,r=y0(e,f0),i=w0(r),o=h0(i,2),a=o[0],s=o[1];return d.useEffect(function(){if(s){var l=Rf();return++Kl,function(){--Kl===0&&(l[jr]=null)}}},[]),T.jsx(Df.Provider,Object.assign({value:a},{children:n}),void 0)});function w0(t){if("manager"in t){var e={dragDropManager:t.manager};return[e,!1]}var n=E0(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[n,r]}function E0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rf(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=e;return i[jr]||(i[jr]={dragDropManager:c0(t,e,n,r)}),i[jr]}function Rf(){return typeof global<"u"?global:window}function $0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function C0(t,e,n){return x0(t.prototype,e),t}function Ll(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var lo=!1,uo=!1,T0=function(){function t(e){$0(this,t),Ll(this,"internalMonitor",void 0),Ll(this,"sourceId",null),this.internalMonitor=e.getMonitor()}return C0(t,[{key:"receiveHandlerId",value:function(n){this.sourceId=n}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){X(!lo,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return lo=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{lo=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;X(!uo,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return uo=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{uo=!1}}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"isDraggingSource",value:function(n){return this.internalMonitor.isDraggingSource(n)}},{key:"isOverTarget",value:function(n,r){return this.internalMonitor.isOverTarget(n,r)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(n){return this.internalMonitor.subscribeToOffsetChange(n)}},{key:"canDragSource",value:function(n){return this.internalMonitor.canDragSource(n)}},{key:"canDropOnTarget",value:function(n){return this.internalMonitor.canDropOnTarget(n)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function D0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function O0(t,e,n){return P0(t.prototype,e),t}function Fl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var co=!1,I0=function(){function t(e){D0(this,t),Fl(this,"internalMonitor",void 0),Fl(this,"targetId",null),this.internalMonitor=e.getMonitor()}return O0(t,[{key:"receiveHandlerId",value:function(n){this.targetId=n}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;X(!co,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return co=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{co=!1}}},{key:"isOver",value:function(n){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,n):!1}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function _0(t){if(typeof t.type!="string"){var e=t.type.displayName||t.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(e," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function k0(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!d.isValidElement(e)){var r=e;return t(r,n),r}var i=e;_0(i);var o=n?function(a){return t(a,n)}:t;return N0(i,o)}}function Mf(t){var e={};return Object.keys(t).forEach(function(n){var r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{var i=k0(r);e[n]=function(){return i}}}),e}function jl(t,e){typeof t=="function"?t(e):t.current=e}function N0(t,e){var n=t.ref;return X(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?d.cloneElement(t,{ref:function(i){jl(n,i),jl(e,i)}}):d.cloneElement(t,{ref:e})}function zr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zr=function(n){return typeof n}:zr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zr(t)}function ea(t){return t!==null&&zr(t)==="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ta(t,e,n,r){var i=void 0;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;var o=Object.keys(t),a=Object.keys(e);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),l=0;l<o.length;l++){var u=o[l];if(!s(u))return!1;var c=t[u],p=e[u];if(i=void 0,i===!1||i===void 0&&c!==p)return!1}return!0}function R0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function A0(t,e,n){return M0(t.prototype,e),t}function we(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var K0=function(){function t(e){var n=this;R0(this,t),we(this,"hooks",Mf({dragSource:function(i,o){n.clearDragSource(),n.dragSourceOptions=o||null,ea(i)?n.dragSourceRef=i:n.dragSourceNode=i,n.reconnectDragSource()},dragPreview:function(i,o){n.clearDragPreview(),n.dragPreviewOptions=o||null,ea(i)?n.dragPreviewRef=i:n.dragPreviewNode=i,n.reconnectDragPreview()}})),we(this,"handlerId",null),we(this,"dragSourceRef",null),we(this,"dragSourceNode",void 0),we(this,"dragSourceOptionsInternal",null),we(this,"dragSourceUnsubscribe",void 0),we(this,"dragPreviewRef",null),we(this,"dragPreviewNode",void 0),we(this,"dragPreviewOptionsInternal",null),we(this,"dragPreviewUnsubscribe",void 0),we(this,"lastConnectedHandlerId",null),we(this,"lastConnectedDragSource",null),we(this,"lastConnectedDragSourceOptions",null),we(this,"lastConnectedDragPreview",null),we(this,"lastConnectedDragPreviewOptions",null),we(this,"backend",void 0),this.backend=e}return A0(t,[{key:"receiveHandlerId",value:function(n){this.handlerId!==n&&(this.handlerId=n,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(n){this.dragSourceOptionsInternal=n}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(n){this.dragPreviewOptionsInternal=n}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var n=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();if(r&&this.disconnectDragSource(),!!this.handlerId){if(!n){this.lastConnectedDragSource=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=n,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,n,this.dragSourceOptions))}}},{key:"reconnectDragPreview",value:function(){var n=this.dragPreview,r=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!ta(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!ta(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}]),t}();function L0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function j0(t,e,n){return F0(t.prototype,e),t}function Ve(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var z0=function(){function t(e){var n=this;L0(this,t),Ve(this,"hooks",Mf({dropTarget:function(i,o){n.clearDropTarget(),n.dropTargetOptions=o,ea(i)?n.dropTargetRef=i:n.dropTargetNode=i,n.reconnect()}})),Ve(this,"handlerId",null),Ve(this,"dropTargetRef",null),Ve(this,"dropTargetNode",void 0),Ve(this,"dropTargetOptionsInternal",null),Ve(this,"unsubscribeDropTarget",void 0),Ve(this,"lastConnectedHandlerId",null),Ve(this,"lastConnectedDropTarget",null),Ve(this,"lastConnectedDropTargetOptions",null),Ve(this,"backend",void 0),this.backend=e}return j0(t,[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var n=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();n&&this.disconnectDropTarget();var r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}},{key:"receiveHandlerId",value:function(n){n!==this.handlerId&&(this.handlerId=n,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(n){this.dropTargetOptionsInternal=n}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!ta(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}]),t}();function H0(t,e,n){var r=n.getRegistry(),i=r.addTarget(t,e);return[i,function(){return r.removeTarget(i)}]}function B0(t,e,n){var r=n.getRegistry(),i=r.addSource(t,e);return[i,function(){return r.removeSource(i)}]}var Lt=typeof window<"u"?d.useLayoutEffect:d.useEffect;function Hr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hr=function(n){return typeof n}:Hr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hr(t)}function W0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function V0(t,e,n){return U0(t.prototype,e),t}function fo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var G0=function(){function t(e,n,r){W0(this,t),fo(this,"spec",void 0),fo(this,"monitor",void 0),fo(this,"connector",void 0),this.spec=e,this.monitor=n,this.connector=r}return V0(t,[{key:"beginDrag",value:function(){var n,r=this.spec,i=this.monitor,o=null;return Hr(r.item)==="object"?o=r.item:typeof r.item=="function"?o=r.item(i):o={},(n=o)!==null&&n!==void 0?n:null}},{key:"canDrag",value:function(){var n=this.spec,r=this.monitor;return typeof n.canDrag=="boolean"?n.canDrag:typeof n.canDrag=="function"?n.canDrag(r):!0}},{key:"isDragging",value:function(n,r){var i=this.spec,o=this.monitor,a=i.isDragging;return a?a(o):r===n.getSourceId()}},{key:"endDrag",value:function(){var n=this.spec,r=this.monitor,i=this.connector,o=n.end;o&&o(r.getItem(),r),i.reconnect()}}]),t}();function q0(t,e,n){var r=d.useMemo(function(){return new G0(t,e,n)},[e,n]);return d.useEffect(function(){r.spec=t},[t]),r}function Ht(){var t=d.useContext(Df),e=t.dragDropManager;return X(e!=null,"Expected drag drop context"),e}function Y0(t){return d.useMemo(function(){var e=t.type;return X(e!=null,"spec.type must be defined"),e},[t])}function X0(t,e){return eE(t)||Z0(t,e)||Q0(t,e)||J0()}function J0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
91
+ For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return C.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},Eb="DialogDescriptionWarning",$b=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Zd(Eb).contentName}}.`;return C.useEffect(()=>{var o;const i=(o=t.current)==null?void 0:o.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},xb=Bd,Cb=Vd,Tb=Gd,Db=qd,Nn='[cmdk-group=""]',ro='[cmdk-group-items=""]',Pb='[cmdk-group-heading=""]',Na='[cmdk-item=""]',dl=`${Na}:not([aria-disabled="true"])`,Go="cmdk-item-select",St="data-value",Ob=(t,e,n)=>Gm(t,e,n),ef=C.createContext(void 0),ar=()=>C.useContext(ef),tf=C.createContext(void 0),Ra=()=>C.useContext(tf),nf=C.createContext(void 0),rf=C.forwardRef((t,e)=>{let n=sn(()=>{var M,N;return{search:"",value:(N=(M=t.value)!=null?M:t.defaultValue)!=null?N:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=sn(()=>new Set),i=sn(()=>new Map),o=sn(()=>new Map),a=sn(()=>new Set),s=of(t),{label:l,children:u,value:c,onValueChange:p,filter:g,shouldFilter:h,loop:y,disablePointerSelection:f=!1,vimBindings:v=!0,...m}=t,S=it(),w=it(),O=it(),x=C.useRef(null),D=jb();At(()=>{if(c!==void 0){let M=c.trim();n.current.value=M,P.emit()}},[c]),At(()=>{D(6,E)},[]);let P=C.useMemo(()=>({subscribe:M=>(a.current.add(M),()=>a.current.delete(M)),snapshot:()=>n.current,setState:(M,N,L)=>{var K,W,U;if(!Object.is(n.current[M],N)){if(n.current[M]=N,M==="search")z(),B(),D(1,R);else if(M==="value"&&(L||D(5,E),((K=s.current)==null?void 0:K.value)!==void 0)){let F=N??"";(U=(W=s.current).onValueChange)==null||U.call(W,F);return}P.emit()}},emit:()=>{a.current.forEach(M=>M())}}),[]),b=C.useMemo(()=>({value:(M,N,L)=>{var K;N!==((K=o.current.get(M))==null?void 0:K.value)&&(o.current.set(M,{value:N,keywords:L}),n.current.filtered.items.set(M,k(N,L)),D(2,()=>{B(),P.emit()}))},item:(M,N)=>(r.current.add(M),N&&(i.current.has(N)?i.current.get(N).add(M):i.current.set(N,new Set([M]))),D(3,()=>{z(),B(),n.current.value||R(),P.emit()}),()=>{o.current.delete(M),r.current.delete(M),n.current.filtered.items.delete(M);let L=I();D(4,()=>{z(),(L==null?void 0:L.getAttribute("id"))===M&&R(),P.emit()})}),group:M=>(i.current.has(M)||i.current.set(M,new Set),()=>{o.current.delete(M),i.current.delete(M)}),filter:()=>s.current.shouldFilter,label:l||t["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:S,inputId:O,labelId:w,listInnerRef:x}),[]);function k(M,N){var L,K;let W=(K=(L=s.current)==null?void 0:L.filter)!=null?K:Ob;return M?W(M,n.current.search,N):0}function B(){if(!n.current.search||s.current.shouldFilter===!1)return;let M=n.current.filtered.items,N=[];n.current.filtered.groups.forEach(K=>{let W=i.current.get(K),U=0;W.forEach(F=>{let X=M.get(F);U=Math.max(X,U)}),N.push([K,U])});let L=x.current;j().sort((K,W)=>{var U,F;let X=K.getAttribute("id"),te=W.getAttribute("id");return((U=M.get(te))!=null?U:0)-((F=M.get(X))!=null?F:0)}).forEach(K=>{let W=K.closest(ro);W?W.appendChild(K.parentElement===W?K:K.closest(`${ro} > *`)):L.appendChild(K.parentElement===L?K:K.closest(`${ro} > *`))}),N.sort((K,W)=>W[1]-K[1]).forEach(K=>{var W;let U=(W=x.current)==null?void 0:W.querySelector(`${Nn}[${St}="${encodeURIComponent(K[0])}"]`);U==null||U.parentElement.appendChild(U)})}function R(){let M=j().find(L=>L.getAttribute("aria-disabled")!=="true"),N=M==null?void 0:M.getAttribute(St);P.setState("value",N||void 0)}function z(){var M,N,L,K;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let W=0;for(let U of r.current){let F=(N=(M=o.current.get(U))==null?void 0:M.value)!=null?N:"",X=(K=(L=o.current.get(U))==null?void 0:L.keywords)!=null?K:[],te=k(F,X);n.current.filtered.items.set(U,te),te>0&&W++}for(let[U,F]of i.current)for(let X of F)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(U);break}n.current.filtered.count=W}function E(){var M,N,L;let K=I();K&&(((M=K.parentElement)==null?void 0:M.firstChild)===K&&((L=(N=K.closest(Nn))==null?void 0:N.querySelector(Pb))==null||L.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function I(){var M;return(M=x.current)==null?void 0:M.querySelector(`${Na}[aria-selected="true"]`)}function j(){var M;return Array.from(((M=x.current)==null?void 0:M.querySelectorAll(dl))||[])}function V(M){let N=j()[M];N&&P.setState("value",N.getAttribute(St))}function A(M){var N;let L=I(),K=j(),W=K.findIndex(F=>F===L),U=K[W+M];(N=s.current)!=null&&N.loop&&(U=W+M<0?K[K.length-1]:W+M===K.length?K[0]:K[W+M]),U&&P.setState("value",U.getAttribute(St))}function _(M){let N=I(),L=N==null?void 0:N.closest(Nn),K;for(;L&&!K;)L=M>0?Lb(L,Nn):Fb(L,Nn),K=L==null?void 0:L.querySelector(dl);K?P.setState("value",K.getAttribute(St)):A(M)}let H=()=>V(j().length-1),Y=M=>{M.preventDefault(),M.metaKey?H():M.altKey?_(1):A(1)},Q=M=>{M.preventDefault(),M.metaKey?V(0):M.altKey?_(-1):A(-1)};return C.createElement(be.div,{ref:e,tabIndex:-1,...m,"cmdk-root":"",onKeyDown:M=>{var N;if((N=m.onKeyDown)==null||N.call(m,M),!M.defaultPrevented)switch(M.key){case"n":case"j":{v&&M.ctrlKey&&Y(M);break}case"ArrowDown":{Y(M);break}case"p":case"k":{v&&M.ctrlKey&&Q(M);break}case"ArrowUp":{Q(M);break}case"Home":{M.preventDefault(),V(0);break}case"End":{M.preventDefault(),H();break}case"Enter":if(!M.nativeEvent.isComposing&&M.keyCode!==229){M.preventDefault();let L=I();if(L){let K=new Event(Go);L.dispatchEvent(K)}}}}},C.createElement("label",{"cmdk-label":"",htmlFor:b.inputId,id:b.labelId,style:Hb},l),$i(t,M=>C.createElement(tf.Provider,{value:P},C.createElement(ef.Provider,{value:b},M))))}),Ib=C.forwardRef((t,e)=>{var n,r;let i=it(),o=C.useRef(null),a=C.useContext(nf),s=ar(),l=of(t),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;At(()=>{if(!u)return s.item(i,a==null?void 0:a.id)},[u]);let c=af(i,o,[t.value,t.children,o],t.keywords),p=Ra(),g=Kt(D=>D.value&&D.value===c.current),h=Kt(D=>u||s.filter()===!1?!0:D.search?D.filtered.items.get(i)>0:!0);C.useEffect(()=>{let D=o.current;if(!(!D||t.disabled))return D.addEventListener(Go,y),()=>D.removeEventListener(Go,y)},[h,t.onSelect,t.disabled]);function y(){var D,P;f(),(P=(D=l.current).onSelect)==null||P.call(D,c.current)}function f(){p.setState("value",c.current,!0)}if(!h)return null;let{disabled:v,value:m,onSelect:S,forceMount:w,keywords:O,...x}=t;return C.createElement(be.div,{ref:Zn([o,e]),...x,id:i,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!g,"data-disabled":!!v,"data-selected":!!g,onPointerMove:v||s.getDisablePointerSelection()?void 0:f,onClick:v?void 0:y},t.children)}),_b=C.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:i,...o}=t,a=it(),s=C.useRef(null),l=C.useRef(null),u=it(),c=ar(),p=Kt(h=>i||c.filter()===!1?!0:h.search?h.filtered.groups.has(a):!0);At(()=>c.group(a),[]),af(a,s,[t.value,t.heading,l]);let g=C.useMemo(()=>({id:a,forceMount:i}),[i]);return C.createElement(be.div,{ref:Zn([s,e]),...o,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&C.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),$i(t,h=>C.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},C.createElement(nf.Provider,{value:g},h))))}),kb=C.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,i=C.useRef(null),o=Kt(a=>!a.search);return!n&&!o?null:C.createElement(be.div,{ref:Zn([i,e]),...r,"cmdk-separator":"",role:"separator"})}),Nb=C.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,i=t.value!=null,o=Ra(),a=Kt(c=>c.search),s=Kt(c=>c.value),l=ar(),u=C.useMemo(()=>{var c;let p=(c=l.listInnerRef.current)==null?void 0:c.querySelector(`${Na}[${St}="${encodeURIComponent(s)}"]`);return p==null?void 0:p.getAttribute("id")},[]);return C.useEffect(()=>{t.value!=null&&o.setState("search",t.value)},[t.value]),C.createElement(be.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":u,id:l.inputId,type:"text",value:i?t.value:a,onChange:c=>{i||o.setState("search",c.target.value),n==null||n(c.target.value)}})}),Rb=C.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...i}=t,o=C.useRef(null),a=C.useRef(null),s=ar();return C.useEffect(()=>{if(a.current&&o.current){let l=a.current,u=o.current,c,p=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let g=l.offsetHeight;u.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return p.observe(l),()=>{cancelAnimationFrame(c),p.unobserve(l)}}},[]),C.createElement(be.div,{ref:Zn([o,e]),...i,"cmdk-list":"",role:"listbox","aria-label":r,id:s.listId},$i(t,l=>C.createElement("div",{ref:Zn([a,s.listInnerRef]),"cmdk-list-sizer":""},l)))}),Mb=C.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...s}=t;return C.createElement(xb,{open:n,onOpenChange:r},C.createElement(Cb,{container:a},C.createElement(Tb,{"cmdk-overlay":"",className:i}),C.createElement(Db,{"aria-label":t.label,"cmdk-dialog":"",className:o},C.createElement(rf,{ref:e,...s}))))}),Ab=C.forwardRef((t,e)=>Kt(n=>n.filtered.count===0)?C.createElement(be.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),Kb=C.forwardRef((t,e)=>{let{progress:n,children:r,label:i="Loading...",...o}=t;return C.createElement(be.div,{ref:e,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},$i(t,a=>C.createElement("div",{"aria-hidden":!0},a)))}),Qn=Object.assign(rf,{List:Rb,Item:Ib,Input:Nb,Group:_b,Separator:kb,Dialog:Mb,Empty:Ab,Loading:Kb});function Lb(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function Fb(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function of(t){let e=C.useRef(t);return At(()=>{e.current=t}),e}var At=typeof window>"u"?C.useEffect:C.useLayoutEffect;function sn(t){let e=C.useRef();return e.current===void 0&&(e.current=t()),e}function Zn(t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Kt(t){let e=Ra(),n=()=>t(e.snapshot());return da.useSyncExternalStore(e.subscribe,n,n)}function af(t,e,n,r=[]){let i=C.useRef(),o=ar();return At(()=>{var a;let s=(()=>{var u;for(let c of n){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():i.current}})(),l=r.map(u=>u.trim());o.value(t,s,l),(a=e.current)==null||a.setAttribute(St,s),i.current=s}),i}var jb=()=>{let[t,e]=C.useState(),n=sn(()=>new Map);return At(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,i)=>{n.current.set(r,i),e({})}};function zb(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function $i({asChild:t,children:e},n){return t&&C.isValidElement(e)?C.cloneElement(zb(e),{ref:e.ref},n(e.props.children)):n(e)}var Hb={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const qo=({withPadding:t=!0})=>T.jsx("div",{className:jt("c__horizontal-separator",{"with-padding":t})}),sf=({loading:t,inputValue:e,onFilter:n,placeholder:r,children:i,withSeparator:o=!0})=>{const{t:a}=vn.useCunningham();return i?T.jsxs(T.Fragment,{children:[i,o&&T.jsx(qo,{})]}):T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"quick-search-input-container",children:[!t&&T.jsx("span",{className:"material-icons",children:"search"}),t&&T.jsx("div",{children:T.jsx(Da,{size:"sm"})}),T.jsx(Qn.Input,{autoFocus:!0,"aria-label":a("Quick search input"),onClick:s=>{s.stopPropagation()},role:"combobox",value:e,placeholder:r,onValueChange:n})]}),o&&T.jsx(qo,{withPadding:!1})]})},Bb=t=>{let e=!1;return d.Children.forEach(t,n=>{e=e||!!n}),e},Wb=({onFilter:t,inputContent:e,inputValue:n,loading:r,showInput:i=!0,label:o,placeholder:a,children:s})=>{const l=d.useRef(null);return T.jsx(T.Fragment,{children:T.jsx("div",{className:"quick-search-container",children:T.jsxs(Qn,{label:o,shouldFilter:!1,ref:l,children:[i&&T.jsx(sf,{loading:r,withSeparator:Bb(s),inputValue:n,onFilter:t,placeholder:a,children:e}),T.jsx(Qn.List,{children:T.jsx("div",{children:s})})]})})})},Rr=({children:t,onSelect:e,id:n})=>T.jsx(Qn.Item,{value:n,onSelect:e,children:t}),Ub=({group:t,onSelect:e,renderElement:n})=>{var r,i;return!t.showWhenEmpty&&t.elements.length===0?null:T.jsx("div",{className:"pt-base",children:T.jsxs(Qn.Group,{heading:t.groupName,forceMount:!1,children:[(r=t.startActions)==null?void 0:r.map((o,a)=>T.jsx(Rr,{onSelect:o.onSelect,children:o.content},`${t.groupName}-action-${a}`)),t.elements.map((o,a)=>T.jsx(Rr,{id:`${t.groupName}-element-${a}`,onSelect:()=>{e==null||e(o)},children:n==null?void 0:n(o)},`${t.groupName}-element-${a}`)),(i=t.endActions)==null?void 0:i.map((o,a)=>T.jsx(Rr,{onSelect:o.onSelect,children:o.content},`${t.groupName}-action-${a}`)),t.emptyString&&t.elements.length===0&&T.jsx("span",{className:"ml-b clr-greyscale-500",children:t.emptyString})]},t.groupName)})},Vb=({alwaysShowRight:t,left:e,right:n})=>{const{isDesktop:r}=vi();return T.jsxs("div",{className:"c__quick-search-item-template",children:[T.jsx("div",{className:"c__quick-search-item-template__left",children:e}),r&&n&&T.jsx("div",{className:jt("c__quick-search-item-template__right",{"show-right-on-focus":t}),children:n})]})},Gb=({tabs:t,defaultSelectedTab:e,fullWidth:n=!1})=>t.length===0?null:T.jsx("div",{className:jt("c__tabs",{"c__tabs__full-width":n}),children:T.jsxs(em,{defaultSelectedKey:e,children:[T.jsx(nm,{"aria-label":"History of Ancient Rome",children:t.map(r=>T.jsxs(im,{id:r.id,children:[r.icon&&T.jsx("span",{className:"material-icons",children:r.icon}),r.label]},r.id))}),t.map(r=>T.jsx(om,{id:r.id,children:r.content},r.id))]})}),lf=d.createContext(null);function Oe(){const t=d.useContext(lf);if(t===null)throw new Error("No Tree Api Provided");return t}const uf=d.createContext(null);function qb(){const t=d.useContext(uf);if(t===null)throw new Error("Provide a NodesContext");return t}const cf=d.createContext(null);function Yb(){const t=d.useContext(cf);if(t===null)throw new Error("Provide a DnDContext");return t}const df=d.createContext(0);function ff(){d.useContext(df)}function Mr(t,e,n){return Math.max(Math.min(t,n),e)}function hf(t){return t&&t.isLeaf}function pf(t){return t&&t.isInternal&&!t.isOpen}function gf(t){var e;return t&&t.isOpen&&!(!((e=t.children)===null||e===void 0)&&e.length)}const vf=(t,e)=>{let n=t;for(;n;){if(n.id===e.id)return!0;n=n.parent}return!1},mf=t=>{if(!t.parent)throw Error("Node does not have a parent");return t.parent.children.findIndex(e=>e.id===t.id)};function Xb(){}function Ma(t,e){if(!t)return null;if(t.id===e)return t;if(t.children)for(let n of t.children){const r=Ma(n,e);if(r)return r}return null}function ii(t,e){if(e(t),t.children)for(let n of t.children)ii(n,e)}function yf(t){const e=Sf(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=Jb(e,r);break}n==null||n.focus()}function bf(t){const e=Sf(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=Qb(e,r);break}n==null||n.focus()}function Jb(t,e){return e+1<t.length?t[e+1]:t[0]}function Qb(t,e){return e-1>=0?t[e-1]:t[t.length-1]}function Sf(t){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter(e=>e===t||!t.contains(e))}function jn(t,e){return typeof e=="boolean"?e:typeof e=="string"?t[e]:e(t)}function wf(t){return t===null?null:wt(t)}function wt(t){return typeof t=="string"?t:t.id}function Zb(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Ef(t,...e){if(t)return t(...e)}function $f(t){return new Promise((e,n)=>{let r=0;function i(){r+=1,r===100&&n(),t()?e():setTimeout(i,10)}i()})}function xf(t){var e,n;const r=t.focusedNode;return r?r.isOpen?0:r.parent?r.childIndex+1:0:(n=(e=t.root.children)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0}function Cf(t){const e=t.focusedNode;return e?e.isOpen?e.id:e.parent&&!e.parent.isRoot?e.parent.id:null:null}const eS=Object.freeze(Object.defineProperty({__proto__:null,access:jn,bound:Mr,dfs:Ma,focusNextElement:yf,focusPrevElement:bf,getInsertIndex:xf,getInsertParentId:Cf,identify:wt,identifyNull:wf,indexOf:mf,isClosed:pf,isDescendant:vf,isItem:hf,isOpenWithEmptyChildren:gf,mergeRefs:Zb,noop:Xb,safeRun:Ef,waitFor:$f,walk:ii},Symbol.toStringTag,{value:"Module"})),tS={display:"flex",alignItems:"center",zIndex:1},nS={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},rS={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"},iS=d.memo(function({top:e,left:n,indent:r}){const i={position:"absolute",pointerEvents:"none",top:e-2+"px",left:n+"px",right:r+"px"};return T.jsxs("div",{style:Object.assign(Object.assign({},tS),i),children:[T.jsx("div",{style:Object.assign({},rS)}),T.jsx("div",{style:Object.assign({},nS)})]})});function oS({node:t,attrs:e,innerRef:n,children:r}){return T.jsx("div",Object.assign({},e,{ref:n,onFocus:i=>i.stopPropagation(),onClick:t.handleClick,children:r}))}function aS(t){return T.jsxs("div",{ref:t.dragHandle,style:t.style,children:[T.jsx("span",{onClick:e=>{e.stopPropagation(),t.node.toggle()},children:t.node.isLeaf?"🌳":t.node.isOpen?"🗁":"🗀"})," ",t.node.isEditing?T.jsx(lS,Object.assign({},t)):T.jsx(sS,Object.assign({},t))]})}function sS(t){return T.jsx(T.Fragment,{children:T.jsx("span",{children:t.node.data.name})})}function lS({node:t}){const e=d.useRef();return d.useEffect(()=>{var n,r;(n=e.current)===null||n===void 0||n.focus(),(r=e.current)===null||r===void 0||r.select()},[]),T.jsx("input",{ref:e,defaultValue:t.data.name,onBlur:()=>t.reset(),onKeyDown:n=>{var r;n.key==="Escape"&&t.reset(),n.key==="Enter"&&t.submit(((r=e.current)===null||r===void 0?void 0:r.value)||"")}})}function io(t){return{type:"EDIT",id:t}}function uS(t={id:null},e){return e.type==="EDIT"?Object.assign(Object.assign({},t),{id:e.id}):t}function Xt(t){return{type:"FOCUS",id:t}}function cS(){return{type:"TREE_BLUR"}}function dS(t={id:null,treeFocused:!1},e){return e.type==="FOCUS"?Object.assign(Object.assign({},t),{id:e.id,treeFocused:!0}):e.type==="TREE_BLUR"?Object.assign(Object.assign({},t),{treeFocused:!1}):t}class oi{constructor(e){this.handleClick=n=>{n.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():n.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=e.tree,this.id=e.id,this.data=e.data,this.level=e.level,this.children=e.children,this.parent=e.parent,this.isDraggable=e.isDraggable,this.rowIndex=e.rowIndex}get isRoot(){return this.id===er}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var e;return this.isSelected&&!(!((e=this.prev)===null||e===void 0)&&e.isSelected)}get isSelectedEnd(){var e;return this.isSelected&&!(!((e=this.next)===null||e===void 0)&&e.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var e,n;const r=this.childIndex;return(n=(e=this.parent)===null||e===void 0?void 0:e.children[r+1])!==null&&n!==void 0?n:null}isAncestorOf(e){if(!e)return!1;let n=e;for(;n;){if(n.id===this.id)return!0;n=n.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(e){this.tree.submit(this,e)}reset(){this.tree.reset()}clone(){return new oi(Object.assign({},this))}edit(){return this.tree.edit(this)}}const er="__REACT_ARBORIST_INTERNAL_ROOT__";function fl(t){var e;function n(o,a,s){const l=t.accessId(o),u=new oi({tree:t,data:o,level:a,parent:s,id:l,children:null,isDraggable:t.isDraggable(o),rowIndex:null}),c=t.accessChildren(o);return c&&(u.children=c.map(p=>n(p,a+1,u))),u}const r=new oi({tree:t,id:er,data:{id:er},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null}),i=(e=t.props.data)!==null&&e!==void 0?e:[];return r.children=i.map(o=>n(o,0,r)),r}const Yo={open(t,e){return{type:"VISIBILITY_OPEN",id:t,filtered:e}},close(t,e){return{type:"VISIBILITY_CLOSE",id:t,filtered:e}},toggle(t,e){return{type:"VISIBILITY_TOGGLE",id:t,filtered:e}},clear(t){return{type:"VISIBILITY_CLEAR",filtered:t}}};function hl(t={},e){if(e.type==="VISIBILITY_OPEN")return Object.assign(Object.assign({},t),{[e.id]:!0});if(e.type==="VISIBILITY_CLOSE")return Object.assign(Object.assign({},t),{[e.id]:!1});if(e.type==="VISIBILITY_TOGGLE"){const n=t[e.id];return Object.assign(Object.assign({},t),{[e.id]:!n})}else return e.type==="VISIBILITY_CLEAR"?{}:t}function fS(t={filtered:{},unfiltered:{}},e){return e.type.startsWith("VISIBILITY")?e.filtered?Object.assign(Object.assign({},t),{filtered:hl(t.filtered,e)}):Object.assign(Object.assign({},t),{unfiltered:hl(t.unfiltered,e)}):t}const Sn=t=>{var e;return{nodes:{open:{filtered:{},unfiltered:(e=t==null?void 0:t.initialOpenState)!==null&&e!==void 0?e:{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}},Fe={clear:()=>({type:"SELECTION_CLEAR"}),only:t=>({type:"SELECTION_ONLY",id:wt(t)}),add:t=>({type:"SELECTION_ADD",ids:(Array.isArray(t)?t:[t]).map(wt)}),remove:t=>({type:"SELECTION_REMOVE",ids:(Array.isArray(t)?t:[t]).map(wt)}),set:t=>Object.assign({type:"SELECTION_SET"},t),mostRecent:t=>({type:"SELECTION_MOST_RECENT",id:t===null?null:wt(t)}),anchor:t=>({type:"SELECTION_ANCHOR",id:t===null?null:wt(t)})};function hS(t=Sn().nodes.selection,e){const n=t.ids;switch(e.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},t),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},t),{ids:new Set([e.id])});case"SELECTION_ADD":return e.ids.length===0?t:(e.ids.forEach(r=>n.add(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_REMOVE":return e.ids.length===0?t:(e.ids.forEach(r=>n.delete(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_SET":return Object.assign(Object.assign({},t),{ids:e.ids,mostRecent:e.mostRecent,anchor:e.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},t),{mostRecent:e.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},t),{anchor:e.id});default:return t}}const wn={cursor(t){return{type:"DND_CURSOR",cursor:t}},dragStart(t,e){return{type:"DND_DRAG_START",id:t,dragIds:e}},dragEnd(){return{type:"DND_DRAG_END"}},hovering(t,e){return{type:"DND_HOVERING",parentId:t,index:e}}};function pS(t=Sn().dnd,e){switch(e.type){case"DND_CURSOR":return Object.assign(Object.assign({},t),{cursor:e.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},t),{dragId:e.id,dragIds:e.dragIds});case"DND_DRAG_END":return Sn().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},t),{parentId:e.parentId,index:e.index});default:return t}}const gS={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},vS=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e}px, ${n}px)`}},mS=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e+10}px, ${n+10}px)`}};function Tf({offset:t,mouse:e,id:n,dragIds:r,isDragging:i}){return T.jsxs(yS,{isDragging:i,children:[T.jsx(bS,{offset:t,children:T.jsx(wS,{id:n,dragIds:r})}),T.jsx(SS,{mouse:e,count:r.length})]})}const yS=d.memo(function(e){return e.isDragging?T.jsx("div",{style:gS,children:e.children}):null});function bS(t){return T.jsx("div",{className:"row preview",style:vS(t.offset),children:t.children})}function SS(t){const{count:e,mouse:n}=t;return e>1?T.jsx("div",{className:"selected-count",style:mS(n),children:e}):null}const wS=d.memo(function(e){const n=Oe(),r=n.get(e.id);return r?T.jsx(n.renderNode,{preview:!0,node:r,style:{paddingLeft:r.level*n.indent,opacity:.2,background:"transparent"},tree:n}):null});function Xo(){return Xo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xo.apply(null,arguments)}function pl(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jo(t,e){return Jo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Jo(t,e)}function ES(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Jo(t,e)}var gl=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function $S(t,e){return!!(t===e||gl(t)&&gl(e))}function xS(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!$S(t[n],e[n]))return!1;return!0}function oo(t,e){e===void 0&&(e=xS);var n,r=[],i,o=!1;function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return o&&n===this&&e(s,r)||(i=t.apply(this,s),o=!0,n=this,r=s),i}return a}var CS=typeof performance=="object"&&typeof performance.now=="function",vl=CS?function(){return performance.now()}:function(){return Date.now()};function ml(t){cancelAnimationFrame(t.id)}function TS(t,e){var n=vl();function r(){vl()-n>=e?t.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var ao=-1;function yl(t){if(t===void 0&&(t=!1),ao===-1||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(e),ao=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return ao}var Jt=null;function bl(t){if(t===void 0&&(t=!1),Jt===null||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?Jt="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?Jt="negative":Jt="positive-ascending"),document.body.removeChild(e),Jt}return Jt}process.env.NODE_ENV;var DS=150,PS=function(e,n){return e},Ar=null,Kr=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(Ar=new WeakSet,Kr=new WeakSet);function OS(t){var e,n=t.getItemOffset,r=t.getEstimatedTotalSize,i=t.getItemSize,o=t.getOffsetForIndexAndAlignment,a=t.getStartIndexForOffset,s=t.getStopIndexForStartIndex,l=t.initInstanceProps,u=t.shouldResetStyleCacheOnItemSizeChange,c=t.validateProps;return e=function(p){ES(g,p);function g(y){var f;return f=p.call(this,y)||this,f._instanceProps=l(f.props,pl(f)),f._outerRef=void 0,f._resetIsScrollingTimeoutId=null,f.state={instance:pl(f),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof f.props.initialScrollOffset=="number"?f.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},f._callOnItemsRendered=void 0,f._callOnItemsRendered=oo(function(v,m,S,w){return f.props.onItemsRendered({overscanStartIndex:v,overscanStopIndex:m,visibleStartIndex:S,visibleStopIndex:w})}),f._callOnScroll=void 0,f._callOnScroll=oo(function(v,m,S){return f.props.onScroll({scrollDirection:v,scrollOffset:m,scrollUpdateWasRequested:S})}),f._getItemStyle=void 0,f._getItemStyle=function(v){var m=f.props,S=m.direction,w=m.itemSize,O=m.layout,x=f._getItemStyleCache(u&&w,u&&O,u&&S),D;if(x.hasOwnProperty(v))D=x[v];else{var P=n(f.props,v,f._instanceProps),b=i(f.props,v,f._instanceProps),k=S==="horizontal"||O==="horizontal",B=S==="rtl",R=k?P:0;x[v]=D={position:"absolute",left:B?void 0:R,right:B?R:void 0,top:k?0:P,height:k?"100%":b,width:k?b:"100%"}}return D},f._getItemStyleCache=void 0,f._getItemStyleCache=oo(function(v,m,S){return{}}),f._onScrollHorizontal=function(v){var m=v.currentTarget,S=m.clientWidth,w=m.scrollLeft,O=m.scrollWidth;f.setState(function(x){if(x.scrollOffset===w)return null;var D=f.props.direction,P=w;if(D==="rtl")switch(bl()){case"negative":P=-w;break;case"positive-descending":P=O-S-w;break}return P=Math.max(0,Math.min(P,O-S)),{isScrolling:!0,scrollDirection:x.scrollOffset<P?"forward":"backward",scrollOffset:P,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._onScrollVertical=function(v){var m=v.currentTarget,S=m.clientHeight,w=m.scrollHeight,O=m.scrollTop;f.setState(function(x){if(x.scrollOffset===O)return null;var D=Math.max(0,Math.min(O,w-S));return{isScrolling:!0,scrollDirection:x.scrollOffset<D?"forward":"backward",scrollOffset:D,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._outerRefSetter=function(v){var m=f.props.outerRef;f._outerRef=v,typeof m=="function"?m(v):m!=null&&typeof m=="object"&&m.hasOwnProperty("current")&&(m.current=v)},f._resetIsScrollingDebounced=function(){f._resetIsScrollingTimeoutId!==null&&ml(f._resetIsScrollingTimeoutId),f._resetIsScrollingTimeoutId=TS(f._resetIsScrolling,DS)},f._resetIsScrolling=function(){f._resetIsScrollingTimeoutId=null,f.setState({isScrolling:!1},function(){f._getItemStyleCache(-1,null)})},f}g.getDerivedStateFromProps=function(f,v){return IS(f,v),c(f),null};var h=g.prototype;return h.scrollTo=function(f){f=Math.max(0,f),this.setState(function(v){return v.scrollOffset===f?null:{scrollDirection:v.scrollOffset<f?"forward":"backward",scrollOffset:f,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},h.scrollToItem=function(f,v){v===void 0&&(v="auto");var m=this.props,S=m.itemCount,w=m.layout,O=this.state.scrollOffset;f=Math.max(0,Math.min(f,S-1));var x=0;if(this._outerRef){var D=this._outerRef;w==="vertical"?x=D.scrollWidth>D.clientWidth?yl():0:x=D.scrollHeight>D.clientHeight?yl():0}this.scrollTo(o(this.props,f,v,O,this._instanceProps,x))},h.componentDidMount=function(){var f=this.props,v=f.direction,m=f.initialScrollOffset,S=f.layout;if(typeof m=="number"&&this._outerRef!=null){var w=this._outerRef;v==="horizontal"||S==="horizontal"?w.scrollLeft=m:w.scrollTop=m}this._callPropsCallbacks()},h.componentDidUpdate=function(){var f=this.props,v=f.direction,m=f.layout,S=this.state,w=S.scrollOffset,O=S.scrollUpdateWasRequested;if(O&&this._outerRef!=null){var x=this._outerRef;if(v==="horizontal"||m==="horizontal")if(v==="rtl")switch(bl()){case"negative":x.scrollLeft=-w;break;case"positive-ascending":x.scrollLeft=w;break;default:var D=x.clientWidth,P=x.scrollWidth;x.scrollLeft=P-D-w;break}else x.scrollLeft=w;else x.scrollTop=w}this._callPropsCallbacks()},h.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&ml(this._resetIsScrollingTimeoutId)},h.render=function(){var f=this.props,v=f.children,m=f.className,S=f.direction,w=f.height,O=f.innerRef,x=f.innerElementType,D=f.innerTagName,P=f.itemCount,b=f.itemData,k=f.itemKey,B=k===void 0?PS:k,R=f.layout,z=f.outerElementType,E=f.outerTagName,I=f.style,j=f.useIsScrolling,V=f.width,A=this.state.isScrolling,_=S==="horizontal"||R==="horizontal",H=_?this._onScrollHorizontal:this._onScrollVertical,Y=this._getRangeToRender(),Q=Y[0],M=Y[1],N=[];if(P>0)for(var L=Q;L<=M;L++)N.push(d.createElement(v,{data:b,key:B(L,b),index:L,isScrolling:j?A:void 0,style:this._getItemStyle(L)}));var K=r(this.props,this._instanceProps);return d.createElement(z||E||"div",{className:m,onScroll:H,ref:this._outerRefSetter,style:Xo({position:"relative",height:w,width:V,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:S},I)},d.createElement(x||D||"div",{children:N,ref:O,style:{height:_?"100%":K,pointerEvents:A?"none":void 0,width:_?K:"100%"}}))},h._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var f=this.props.itemCount;if(f>0){var v=this._getRangeToRender(),m=v[0],S=v[1],w=v[2],O=v[3];this._callOnItemsRendered(m,S,w,O)}}if(typeof this.props.onScroll=="function"){var x=this.state,D=x.scrollDirection,P=x.scrollOffset,b=x.scrollUpdateWasRequested;this._callOnScroll(D,P,b)}},h._getRangeToRender=function(){var f=this.props,v=f.itemCount,m=f.overscanCount,S=this.state,w=S.isScrolling,O=S.scrollDirection,x=S.scrollOffset;if(v===0)return[0,0,0,0];var D=a(this.props,x,this._instanceProps),P=s(this.props,D,x,this._instanceProps),b=!w||O==="backward"?Math.max(1,m):1,k=!w||O==="forward"?Math.max(1,m):1;return[Math.max(0,D-b),Math.max(0,Math.min(v-1,P+k)),D,P]},g}(d.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var IS=function(e,n){var r=e.children,i=e.direction,o=e.height,a=e.layout,s=e.innerTagName,l=e.outerTagName,u=e.width,c=n.instance;if(process.env.NODE_ENV!=="production"){(s!=null||l!=null)&&Kr&&!Kr.has(c)&&(Kr.add(c),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var p=i==="horizontal"||a==="horizontal";switch(i){case"horizontal":case"vertical":Ar&&!Ar.has(c)&&(Ar.add(c),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+i+'" was specified.'))}switch(a){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+a+'" was specified.'))}if(r==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(r===null?"null":typeof r)+'" was specified.'));if(p&&typeof u!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(u===null?"null":typeof u)+'" was specified.'));if(!p&&typeof o!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(o===null?"null":typeof o)+'" was specified.'))}},_S=OS({getItemOffset:function(e,n){var r=e.itemSize;return n*r},getItemSize:function(e,n){var r=e.itemSize;return r},getEstimatedTotalSize:function(e){var n=e.itemCount,r=e.itemSize;return r*n},getOffsetForIndexAndAlignment:function(e,n,r,i,o,a){var s=e.direction,l=e.height,u=e.itemCount,c=e.itemSize,p=e.layout,g=e.width,h=s==="horizontal"||p==="horizontal",y=h?g:l,f=Math.max(0,u*c-y),v=Math.min(f,n*c),m=Math.max(0,n*c-y+c+a);switch(r==="smart"&&(i>=m-y&&i<=v+y?r="auto":r="center"),r){case"start":return v;case"end":return m;case"center":{var S=Math.round(m+(v-m)/2);return S<Math.ceil(y/2)?0:S>f+Math.floor(y/2)?f:S}case"auto":default:return i>=m&&i<=v?i:i<m?m:v}},getStartIndexForOffset:function(e,n){var r=e.itemCount,i=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(n/i)))},getStopIndexForStartIndex:function(e,n,r){var i=e.direction,o=e.height,a=e.itemCount,s=e.itemSize,l=e.layout,u=e.width,c=i==="horizontal"||l==="horizontal",p=n*s,g=c?u:o,h=Math.ceil((g+r-p)/s);return Math.max(0,Math.min(a-1,n+h-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){var n=e.itemSize;if(process.env.NODE_ENV!=="production"&&typeof n!="number")throw Error('An invalid "itemSize" prop has been specified. Value should be a number. '+('"'+(n===null?"null":typeof n)+'" was specified.'))}});function kS(){var t,e;const n=Oe(),i=Yb().cursor;if(!i||i.type!=="line")return null;const o=n.indent,a=n.rowHeight*i.index+((e=(t=n.props.padding)!==null&&t!==void 0?t:n.props.paddingTop)!==null&&e!==void 0?e:0),s=o*i.level,l=n.renderCursor;return T.jsx(l,{top:a,left:s,indent:o})}var NS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const RS=d.forwardRef(function(e,n){const{children:r}=e,i=NS(e,["children"]),o=Oe();return T.jsxs("div",Object.assign({ref:n},i,{onClick:a=>{a.currentTarget===a.target&&o.deselectAll()},children:[T.jsx(MS,{}),r]}))}),MS=()=>{const t=Oe();return T.jsx("div",{style:{height:t.visibleNodes.length*t.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:T.jsx(kS,{})})};var AS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const KS=d.forwardRef(function(e,n){var r,i,o,a,{style:s}=e,l=AS(e,["style"]);const u=Oe(),c=(i=(r=u.props.padding)!==null&&r!==void 0?r:u.props.paddingTop)!==null&&i!==void 0?i:0,p=(a=(o=u.props.padding)!==null&&o!==void 0?o:u.props.paddingBottom)!==null&&a!==void 0?a:0;return T.jsx("div",Object.assign({ref:n,style:Object.assign(Object.assign({},s),{height:`${parseFloat(s.height)+c+p}px`})},l))});var Df=d.createContext({dragDropManager:void 0}),Me;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(Me||(Me={}));function J(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(process.env.NODE_ENV!=="production"&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){var o;if(e===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;o=new Error(e.replace(/%s/g,function(){return r[a++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}var Aa="dnd-core/INIT_COORDS",xi="dnd-core/BEGIN_DRAG",Ka="dnd-core/PUBLISH_DRAG_SOURCE",Ci="dnd-core/HOVER",Ti="dnd-core/DROP",Di="dnd-core/END_DRAG";function Sl(t,e){return{type:Aa,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}function Lr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Lr=function(n){return typeof n}:Lr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Lr(t)}function LS(t,e,n){return e.split(".").reduce(function(r,i){return r&&r[i]?r[i]:n},t)}function FS(t,e){return t.filter(function(n){return n!==e})}function Pf(t){return Lr(t)==="object"}function jS(t,e){var n=new Map,r=function(a){n.set(a,n.has(a)?n.get(a)+1:1)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(o,a){o===1&&i.push(a)}),i}function zS(t,e){return t.filter(function(n){return e.indexOf(n)>-1})}var HS={type:Aa,payload:{clientOffset:null,sourceClientOffset:null}};function BS(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},i=r.publishSource,o=i===void 0?!0:i,a=r.clientOffset,s=r.getSourceClientOffset,l=t.getMonitor(),u=t.getRegistry();t.dispatch(Sl(a)),WS(n,l,u);var c=GS(n,l);if(c===null){t.dispatch(HS);return}var p=null;if(a){if(!s)throw new Error("getSourceClientOffset must be defined");US(s),p=s(c)}t.dispatch(Sl(a,p));var g=u.getSource(c),h=g.beginDrag(l,c);if(h!=null){VS(h),u.pinSource(c);var y=u.getSourceType(c);return{type:xi,payload:{itemType:y,item:h,sourceId:c,clientOffset:a||null,sourceClientOffset:p||null,isSourcePublic:!!o}}}}}function WS(t,e,n){J(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){J(n.getSource(r),"Expected sourceIds to be registered.")})}function US(t){J(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function VS(t){J(Pf(t),"Item must be an object.")}function GS(t,e){for(var n=null,r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function qS(t){return function(){var n=t.getMonitor();if(n.isDragging())return{type:Ka}}}function Qo(t,e){return e===null?t===null:Array.isArray(t)?t.some(function(n){return n===e}):t===e}function YS(t){return function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.clientOffset;XS(n);var o=n.slice(0),a=t.getMonitor(),s=t.getRegistry();JS(o,a,s);var l=a.getItemType();return QS(o,s,l),ZS(o,a,s),{type:Ci,payload:{targetIds:o,clientOffset:i||null}}}}function XS(t){J(Array.isArray(t),"Expected targetIds to be an array.")}function JS(t,e,n){J(e.isDragging(),"Cannot call hover while not dragging."),J(!e.didDrop(),"Cannot call hover after drop.");for(var r=0;r<t.length;r++){var i=t[r];J(t.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");var o=n.getTarget(i);J(o,"Expected targetIds to be registered.")}}function QS(t,e,n){for(var r=t.length-1;r>=0;r--){var i=t[r],o=e.getTargetType(i);Qo(o,n)||t.splice(r,1)}}function ZS(t,e,n){t.forEach(function(r){var i=n.getTarget(r);i.hover(e,r)})}function wl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function El(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wl(Object(n),!0).forEach(function(r){ew(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ew(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tw(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getMonitor(),i=t.getRegistry();nw(r);var o=ow(r);o.forEach(function(a,s){var l=rw(a,s,i,r),u={type:Ti,payload:{dropResult:El(El({},n),l)}};t.dispatch(u)})}}function nw(t){J(t.isDragging(),"Cannot call drop while not dragging."),J(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function rw(t,e,n,r){var i=n.getTarget(t),o=i?i.drop(r,t):void 0;return iw(o),typeof o>"u"&&(o=e===0?{}:r.getDropResult()),o}function iw(t){J(typeof t>"u"||Pf(t),"Drop result must either be an object or undefined.")}function ow(t){var e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function aw(t){return function(){var n=t.getMonitor(),r=t.getRegistry();sw(n);var i=n.getSourceId();if(i!=null){var o=r.getSource(i,!0);o.endDrag(n,i),r.unpinSource()}return{type:Di}}}function sw(t){J(t.isDragging(),"Cannot call endDrag while not dragging.")}function lw(t){return{beginDrag:BS(t),publishDragSource:qS(t),hover:YS(t),drop:tw(t),endDrag:aw(t)}}function uw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function dw(t,e,n){return cw(t.prototype,e),t}function Rn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var fw=function(){function t(e,n){var r=this;uw(this,t),Rn(this,"store",void 0),Rn(this,"monitor",void 0),Rn(this,"backend",void 0),Rn(this,"isSetUp",!1),Rn(this,"handleRefCountChange",function(){var i=r.store.getState().refCount>0;r.backend&&(i&&!r.isSetUp?(r.backend.setup(),r.isSetUp=!0):!i&&r.isSetUp&&(r.backend.teardown(),r.isSetUp=!1))}),this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}return dw(t,[{key:"receiveBackend",value:function(n){this.backend=n}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var n=this,r=this.store.dispatch;function i(a){return function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var c=a.apply(n,l);typeof c<"u"&&r(c)}}var o=lw(this);return Object.keys(o).reduce(function(a,s){var l=o[s];return a[s]=i(l),a},{})}},{key:"dispatch",value:function(n){this.store.dispatch(n)}}]),t}();function _e(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var $l=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),so=function(){return Math.random().toString(36).substring(7).split("").join(".")},xl={INIT:"@@redux/INIT"+so(),REPLACE:"@@redux/REPLACE"+so(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+so()}};function hw(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function pw(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(mw(t))return"date";if(vw(t))return"error";var n=gw(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function gw(t){return typeof t.constructor=="function"?t.constructor.name:null}function vw(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function mw(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function Qt(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=pw(t)),e}function Of(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?_e(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?_e(1):"Expected the enhancer to be a function. Instead, received: '"+Qt(n)+"'");return n(Of)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?_e(2):"Expected the root reducer to be a function. Instead, received: '"+Qt(t)+"'");var i=t,o=e,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function c(){if(l)throw new Error(process.env.NODE_ENV==="production"?_e(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function p(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?_e(4):"Expected the listener to be a function. Instead, received: '"+Qt(f)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?_e(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var v=!0;return u(),s.push(f),function(){if(v){if(l)throw new Error(process.env.NODE_ENV==="production"?_e(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");v=!1,u();var S=s.indexOf(f);s.splice(S,1),a=null}}}function g(f){if(!hw(f))throw new Error(process.env.NODE_ENV==="production"?_e(7):"Actions must be plain objects. Instead, the actual type was: '"+Qt(f)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof f.type>"u")throw new Error(process.env.NODE_ENV==="production"?_e(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(l)throw new Error(process.env.NODE_ENV==="production"?_e(9):"Reducers may not dispatch actions.");try{l=!0,o=i(o,f)}finally{l=!1}for(var v=a=s,m=0;m<v.length;m++){var S=v[m];S()}return f}function h(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?_e(10):"Expected the nextReducer to be a function. Instead, received: '"+Qt(f));i=f,g({type:xl.REPLACE})}function y(){var f,v=p;return f={subscribe:function(S){if(typeof S!="object"||S===null)throw new Error(process.env.NODE_ENV==="production"?_e(11):"Expected the observer to be an object. Instead, received: '"+Qt(S)+"'");function w(){S.next&&S.next(c())}w();var O=v(w);return{unsubscribe:O}}},f[$l]=function(){return this},f}return g({type:xl.INIT}),r={dispatch:g,subscribe:p,getState:c,replaceReducer:h},r[$l]=y,r}var yw=function(e,n){return e===n};function bw(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function Sw(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yw;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function Cl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Tl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cl(Object(n),!0).forEach(function(r){ww(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ww(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Dl={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Ew(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dl,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case Aa:case xi:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Ci:return bw(t.clientOffset,n.clientOffset)?t:Tl(Tl({},t),{},{clientOffset:n.clientOffset});case Di:case Ti:return Dl;default:return t}}var La="dnd-core/ADD_SOURCE",Fa="dnd-core/ADD_TARGET",ja="dnd-core/REMOVE_SOURCE",Pi="dnd-core/REMOVE_TARGET";function $w(t){return{type:La,payload:{sourceId:t}}}function xw(t){return{type:Fa,payload:{targetId:t}}}function Cw(t){return{type:ja,payload:{sourceId:t}}}function Tw(t){return{type:Pi,payload:{targetId:t}}}function Pl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ke(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pl(Object(n),!0).forEach(function(r){Dw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Dw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Pw={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ow(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Pw,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case xi:return ke(ke({},t),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Ka:return ke(ke({},t),{},{isSourcePublic:!0});case Ci:return ke(ke({},t),{},{targetIds:n.targetIds});case Pi:return t.targetIds.indexOf(n.targetId)===-1?t:ke(ke({},t),{},{targetIds:FS(t.targetIds,n.targetId)});case Ti:return ke(ke({},t),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Di:return ke(ke({},t),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function Iw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case La:case Fa:return t+1;case ja:case Pi:return t-1;default:return t}}var ai=[],za=[];ai.__IS_NONE__=!0;za.__IS_ALL__=!0;function _w(t,e){if(t===ai)return!1;if(t===za||typeof e>"u")return!0;var n=zS(e,t);return n.length>0}function kw(){var t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ci:break;case La:case Fa:case Pi:case ja:return ai;case xi:case Ka:case Di:case Ti:default:return za}var e=t.payload,n=e.targetIds,r=n===void 0?[]:n,i=e.prevTargetIds,o=i===void 0?[]:i,a=jS(r,o),s=a.length>0||!Sw(r,o);if(!s)return ai;var l=o[o.length-1],u=r[r.length-1];return l!==u&&(l&&a.push(l),u&&a.push(u)),a}function Nw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t+1}function Ol(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Il(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ol(Object(n),!0).forEach(function(r){Rw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ol(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Rw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Mw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:kw(t.dirtyHandlerIds,{type:e.type,payload:Il(Il({},e.payload),{},{prevTargetIds:LS(t,"dragOperation.targetIds",[])})}),dragOffset:Ew(t.dragOffset,e),refCount:Iw(t.refCount,e),dragOperation:Ow(t.dragOperation,e),stateId:Nw(t.stateId)}}function Aw(t,e){return{x:t.x+e.x,y:t.y+e.y}}function If(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Kw(t){var e=t.clientOffset,n=t.initialClientOffset,r=t.initialSourceClientOffset;return!e||!n||!r?null:If(Aw(e,r),n)}function Lw(t){var e=t.clientOffset,n=t.initialClientOffset;return!e||!n?null:If(e,n)}function Fw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function zw(t,e,n){return jw(t.prototype,e),t}function _l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Hw=function(){function t(e,n){Fw(this,t),_l(this,"store",void 0),_l(this,"registry",void 0),this.store=e,this.registry=n}return zw(t,[{key:"subscribeToStateChange",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},o=i.handlerIds;J(typeof n=="function","listener must be a function."),J(typeof o>"u"||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");var a=this.store.getState().stateId,s=function(){var u=r.store.getState(),c=u.stateId;try{var p=c===a||c===a+1&&!_w(u.dirtyHandlerIds,o);p||n()}finally{a=c}};return this.store.subscribe(s)}},{key:"subscribeToOffsetChange",value:function(n){var r=this;J(typeof n=="function","listener must be a function.");var i=this.store.getState().dragOffset,o=function(){var s=r.store.getState().dragOffset;s!==i&&(i=s,n())};return this.store.subscribe(o)}},{key:"canDragSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n);return J(r,"Expected to find a valid source. sourceId=".concat(n)),this.isDragging()?!1:r.canDrag(this,n)}},{key:"canDropOnTarget",value:function(n){if(!n)return!1;var r=this.registry.getTarget(n);if(J(r,"Expected to find a valid target. targetId=".concat(n)),!this.isDragging()||this.didDrop())return!1;var i=this.registry.getTargetType(n),o=this.getItemType();return Qo(i,o)&&r.canDrop(this,n)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n,!0);if(J(r,"Expected to find a valid source. sourceId=".concat(n)),!this.isDragging()||!this.isSourcePublic())return!1;var i=this.registry.getSourceType(n),o=this.getItemType();return i!==o?!1:r.isDragging(this,n)}},{key:"isOverTarget",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!n)return!1;var i=r.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(n),a=this.getItemType();if(a&&!Qo(o,a))return!1;var s=this.getTargetIds();if(!s.length)return!1;var l=s.indexOf(n);return i?l===s.length-1:l>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return Kw(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return Lw(this.store.getState().dragOffset)}}]),t}(),Bw=0;function Ww(){return Bw++}function Fr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fr=function(n){return typeof n}:Fr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fr(t)}function Uw(t){J(typeof t.canDrag=="function","Expected canDrag to be a function."),J(typeof t.beginDrag=="function","Expected beginDrag to be a function."),J(typeof t.endDrag=="function","Expected endDrag to be a function.")}function Vw(t){J(typeof t.canDrop=="function","Expected canDrop to be a function."),J(typeof t.hover=="function","Expected hover to be a function."),J(typeof t.drop=="function","Expected beginDrag to be a function.")}function Zo(t,e){if(e&&Array.isArray(t)){t.forEach(function(n){return Zo(n,!1)});return}J(typeof t=="string"||Fr(t)==="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const kl=typeof global<"u"?global:self,_f=kl.MutationObserver||kl.WebKitMutationObserver;function kf(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function Gw(t){let e=1;const n=new _f(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const qw=typeof _f=="function"?Gw:kf;class Yw{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,i=e.length-this.index;r<i;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=qw(this.flush),this.requestErrorThrow=kf(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Xw{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class Jw{create(e){const n=this.freeTasks,r=n.length?n.pop():new Xw(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Nf=new Yw,Qw=new Jw(Nf.registerPendingError);function Zw(t){Nf.enqueueTask(Qw.create(t))}function e0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function t0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n0(t,e,n){return t0(t.prototype,e),t}function Zt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r0(t,e){return s0(t)||a0(t,e)||o0(t,e)||i0()}function i0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
92
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o0(t,e){if(t){if(typeof t=="string")return Nl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nl(t,e)}}function Nl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a0(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function s0(t){if(Array.isArray(t))return t}function l0(t){var e=Ww().toString();switch(t){case Me.SOURCE:return"S".concat(e);case Me.TARGET:return"T".concat(e);default:throw new Error("Unknown Handler Role: ".concat(t))}}function Rl(t){switch(t[0]){case"S":return Me.SOURCE;case"T":return Me.TARGET;default:J(!1,"Cannot parse handler ID: ".concat(t))}}function Ml(t,e){var n=t.entries(),r=!1;do{var i=n.next(),o=i.done,a=r0(i.value,2),s=a[1];if(s===e)return!0;r=!!o}while(!r);return!1}var u0=function(){function t(e){e0(this,t),Zt(this,"types",new Map),Zt(this,"dragSources",new Map),Zt(this,"dropTargets",new Map),Zt(this,"pinnedSourceId",null),Zt(this,"pinnedSource",null),Zt(this,"store",void 0),this.store=e}return n0(t,[{key:"addSource",value:function(n,r){Zo(n),Uw(r);var i=this.addHandler(Me.SOURCE,n,r);return this.store.dispatch($w(i)),i}},{key:"addTarget",value:function(n,r){Zo(n,!0),Vw(r);var i=this.addHandler(Me.TARGET,n,r);return this.store.dispatch(xw(i)),i}},{key:"containsHandler",value:function(n){return Ml(this.dragSources,n)||Ml(this.dropTargets,n)}},{key:"getSource",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;J(this.isSourceId(n),"Expected a valid source ID.");var i=r&&n===this.pinnedSourceId,o=i?this.pinnedSource:this.dragSources.get(n);return o}},{key:"getTarget",value:function(n){return J(this.isTargetId(n),"Expected a valid target ID."),this.dropTargets.get(n)}},{key:"getSourceType",value:function(n){return J(this.isSourceId(n),"Expected a valid source ID."),this.types.get(n)}},{key:"getTargetType",value:function(n){return J(this.isTargetId(n),"Expected a valid target ID."),this.types.get(n)}},{key:"isSourceId",value:function(n){var r=Rl(n);return r===Me.SOURCE}},{key:"isTargetId",value:function(n){var r=Rl(n);return r===Me.TARGET}},{key:"removeSource",value:function(n){var r=this;J(this.getSource(n),"Expected an existing source."),this.store.dispatch(Cw(n)),Zw(function(){r.dragSources.delete(n),r.types.delete(n)})}},{key:"removeTarget",value:function(n){J(this.getTarget(n),"Expected an existing target."),this.store.dispatch(Tw(n)),this.dropTargets.delete(n),this.types.delete(n)}},{key:"pinSource",value:function(n){var r=this.getSource(n);J(r,"Expected an existing source."),this.pinnedSourceId=n,this.pinnedSource=r}},{key:"unpinSource",value:function(){J(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(n,r,i){var o=l0(n);return this.types.set(o,r),n===Me.SOURCE?this.dragSources.set(o,i):n===Me.TARGET&&this.dropTargets.set(o,i),o}}]),t}();function c0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=d0(r),o=new Hw(i,new u0(i)),a=new fw(i,o),s=t(a,e,n);return a.receiveBackend(s),a}function d0(t){var e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Of(Mw,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}var f0=["children"];function h0(t,e){return m0(t)||v0(t,e)||g0(t,e)||p0()}function p0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
93
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g0(t,e){if(t){if(typeof t=="string")return Al(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Al(t,e)}}function Al(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function v0(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function m0(t){if(Array.isArray(t))return t}function y0(t,e){if(t==null)return{};var n=b0(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function b0(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Kl=0,jr=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),S0=d.memo(function(e){var n=e.children,r=y0(e,f0),i=w0(r),o=h0(i,2),a=o[0],s=o[1];return d.useEffect(function(){if(s){var l=Rf();return++Kl,function(){--Kl===0&&(l[jr]=null)}}},[]),T.jsx(Df.Provider,Object.assign({value:a},{children:n}),void 0)});function w0(t){if("manager"in t){var e={dragDropManager:t.manager};return[e,!1]}var n=E0(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[n,r]}function E0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rf(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=e;return i[jr]||(i[jr]={dragDropManager:c0(t,e,n,r)}),i[jr]}function Rf(){return typeof global<"u"?global:window}function $0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function C0(t,e,n){return x0(t.prototype,e),t}function Ll(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var lo=!1,uo=!1,T0=function(){function t(e){$0(this,t),Ll(this,"internalMonitor",void 0),Ll(this,"sourceId",null),this.internalMonitor=e.getMonitor()}return C0(t,[{key:"receiveHandlerId",value:function(n){this.sourceId=n}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){J(!lo,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return lo=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{lo=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;J(!uo,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return uo=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{uo=!1}}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"isDraggingSource",value:function(n){return this.internalMonitor.isDraggingSource(n)}},{key:"isOverTarget",value:function(n,r){return this.internalMonitor.isOverTarget(n,r)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(n){return this.internalMonitor.subscribeToOffsetChange(n)}},{key:"canDragSource",value:function(n){return this.internalMonitor.canDragSource(n)}},{key:"canDropOnTarget",value:function(n){return this.internalMonitor.canDropOnTarget(n)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function D0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function O0(t,e,n){return P0(t.prototype,e),t}function Fl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var co=!1,I0=function(){function t(e){D0(this,t),Fl(this,"internalMonitor",void 0),Fl(this,"targetId",null),this.internalMonitor=e.getMonitor()}return O0(t,[{key:"receiveHandlerId",value:function(n){this.targetId=n}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;J(!co,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return co=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{co=!1}}},{key:"isOver",value:function(n){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,n):!1}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function _0(t){if(typeof t.type!="string"){var e=t.type.displayName||t.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(e," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function k0(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!d.isValidElement(e)){var r=e;return t(r,n),r}var i=e;_0(i);var o=n?function(a){return t(a,n)}:t;return N0(i,o)}}function Mf(t){var e={};return Object.keys(t).forEach(function(n){var r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{var i=k0(r);e[n]=function(){return i}}}),e}function jl(t,e){typeof t=="function"?t(e):t.current=e}function N0(t,e){var n=t.ref;return J(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?d.cloneElement(t,{ref:function(i){jl(n,i),jl(e,i)}}):d.cloneElement(t,{ref:e})}function zr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zr=function(n){return typeof n}:zr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zr(t)}function ea(t){return t!==null&&zr(t)==="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ta(t,e,n,r){var i=void 0;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;var o=Object.keys(t),a=Object.keys(e);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),l=0;l<o.length;l++){var u=o[l];if(!s(u))return!1;var c=t[u],p=e[u];if(i=void 0,i===!1||i===void 0&&c!==p)return!1}return!0}function R0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function A0(t,e,n){return M0(t.prototype,e),t}function we(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var K0=function(){function t(e){var n=this;R0(this,t),we(this,"hooks",Mf({dragSource:function(i,o){n.clearDragSource(),n.dragSourceOptions=o||null,ea(i)?n.dragSourceRef=i:n.dragSourceNode=i,n.reconnectDragSource()},dragPreview:function(i,o){n.clearDragPreview(),n.dragPreviewOptions=o||null,ea(i)?n.dragPreviewRef=i:n.dragPreviewNode=i,n.reconnectDragPreview()}})),we(this,"handlerId",null),we(this,"dragSourceRef",null),we(this,"dragSourceNode",void 0),we(this,"dragSourceOptionsInternal",null),we(this,"dragSourceUnsubscribe",void 0),we(this,"dragPreviewRef",null),we(this,"dragPreviewNode",void 0),we(this,"dragPreviewOptionsInternal",null),we(this,"dragPreviewUnsubscribe",void 0),we(this,"lastConnectedHandlerId",null),we(this,"lastConnectedDragSource",null),we(this,"lastConnectedDragSourceOptions",null),we(this,"lastConnectedDragPreview",null),we(this,"lastConnectedDragPreviewOptions",null),we(this,"backend",void 0),this.backend=e}return A0(t,[{key:"receiveHandlerId",value:function(n){this.handlerId!==n&&(this.handlerId=n,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(n){this.dragSourceOptionsInternal=n}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(n){this.dragPreviewOptionsInternal=n}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var n=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();if(r&&this.disconnectDragSource(),!!this.handlerId){if(!n){this.lastConnectedDragSource=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=n,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,n,this.dragSourceOptions))}}},{key:"reconnectDragPreview",value:function(){var n=this.dragPreview,r=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!ta(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!ta(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}]),t}();function L0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function j0(t,e,n){return F0(t.prototype,e),t}function Ve(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var z0=function(){function t(e){var n=this;L0(this,t),Ve(this,"hooks",Mf({dropTarget:function(i,o){n.clearDropTarget(),n.dropTargetOptions=o,ea(i)?n.dropTargetRef=i:n.dropTargetNode=i,n.reconnect()}})),Ve(this,"handlerId",null),Ve(this,"dropTargetRef",null),Ve(this,"dropTargetNode",void 0),Ve(this,"dropTargetOptionsInternal",null),Ve(this,"unsubscribeDropTarget",void 0),Ve(this,"lastConnectedHandlerId",null),Ve(this,"lastConnectedDropTarget",null),Ve(this,"lastConnectedDropTargetOptions",null),Ve(this,"backend",void 0),this.backend=e}return j0(t,[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var n=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();n&&this.disconnectDropTarget();var r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}},{key:"receiveHandlerId",value:function(n){n!==this.handlerId&&(this.handlerId=n,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(n){this.dropTargetOptionsInternal=n}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!ta(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}]),t}();function H0(t,e,n){var r=n.getRegistry(),i=r.addTarget(t,e);return[i,function(){return r.removeTarget(i)}]}function B0(t,e,n){var r=n.getRegistry(),i=r.addSource(t,e);return[i,function(){return r.removeSource(i)}]}var Lt=typeof window<"u"?d.useLayoutEffect:d.useEffect;function Hr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hr=function(n){return typeof n}:Hr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hr(t)}function W0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function V0(t,e,n){return U0(t.prototype,e),t}function fo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var G0=function(){function t(e,n,r){W0(this,t),fo(this,"spec",void 0),fo(this,"monitor",void 0),fo(this,"connector",void 0),this.spec=e,this.monitor=n,this.connector=r}return V0(t,[{key:"beginDrag",value:function(){var n,r=this.spec,i=this.monitor,o=null;return Hr(r.item)==="object"?o=r.item:typeof r.item=="function"?o=r.item(i):o={},(n=o)!==null&&n!==void 0?n:null}},{key:"canDrag",value:function(){var n=this.spec,r=this.monitor;return typeof n.canDrag=="boolean"?n.canDrag:typeof n.canDrag=="function"?n.canDrag(r):!0}},{key:"isDragging",value:function(n,r){var i=this.spec,o=this.monitor,a=i.isDragging;return a?a(o):r===n.getSourceId()}},{key:"endDrag",value:function(){var n=this.spec,r=this.monitor,i=this.connector,o=n.end;o&&o(r.getItem(),r),i.reconnect()}}]),t}();function q0(t,e,n){var r=d.useMemo(function(){return new G0(t,e,n)},[e,n]);return d.useEffect(function(){r.spec=t},[t]),r}function Ht(){var t=d.useContext(Df),e=t.dragDropManager;return J(e!=null,"Expected drag drop context"),e}function Y0(t){return d.useMemo(function(){var e=t.type;return J(e!=null,"spec.type must be defined"),e},[t])}function X0(t,e){return eE(t)||Z0(t,e)||Q0(t,e)||J0()}function J0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
94
94
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q0(t,e){if(t){if(typeof t=="string")return zl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zl(t,e)}}function zl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Z0(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function eE(t){if(Array.isArray(t))return t}function tE(t,e,n){var r=Ht(),i=q0(t,e,n),o=Y0(t);Lt(function(){if(o!=null){var s=B0(o,i,r),l=X0(s,2),u=l[0],c=l[1];return e.receiveHandlerId(u),n.receiveHandlerId(u),c}},[r,e,n,i,o])}function nE(t){return aE(t)||oE(t)||iE(t)||rE()}function rE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
95
95
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iE(t,e){if(t){if(typeof t=="string")return na(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return na(t,e)}}function oE(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function aE(t){if(Array.isArray(t))return na(t)}function na(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Af(t,e){var n=nE(e||[]);return e==null&&typeof t!="function"&&n.push(t),d.useMemo(function(){return typeof t=="function"?t():t},n)}function sE(){var t=Ht();return d.useMemo(function(){return new T0(t)},[t])}function lE(t,e){var n=Ht(),r=d.useMemo(function(){return new K0(n.getBackend())},[n]);return Lt(function(){return r.dragSourceOptions=t||null,r.reconnect(),function(){return r.disconnectDragSource()}},[r,t]),Lt(function(){return r.dragPreviewOptions=e||null,r.reconnect(),function(){return r.disconnectDragPreview()}},[r,e]),r}var ho,Hl;function uE(){return Hl||(Hl=1,ho=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var a=o[i];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}),ho}var cE=uE();const dE=ih(cE);function fE(t,e){return vE(t)||gE(t,e)||pE(t,e)||hE()}function hE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
96
96
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pE(t,e){if(t){if(typeof t=="string")return Bl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bl(t,e)}}function Bl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function gE(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function vE(t){if(Array.isArray(t))return t}function Kf(t,e,n){var r=d.useState(function(){return e(t)}),i=fE(r,2),o=i[0],a=i[1],s=d.useCallback(function(){var l=e(t);dE(o,l)||(a(l),n&&n())},[o,t,n]);return Lt(s),[o,s]}function mE(t,e){return wE(t)||SE(t,e)||bE(t,e)||yE()}function yE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
97
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bE(t,e){if(t){if(typeof t=="string")return Wl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wl(t,e)}}function Wl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function SE(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function wE(t){if(Array.isArray(t))return t}function EE(t,e,n){var r=Kf(t,e,n),i=mE(r,2),o=i[0],a=i[1];return Lt(function(){var l=t.getHandlerId();if(l!=null)return t.subscribeToStateChange(a,{handlerIds:[l]})},[t,a]),o}function Lf(t,e,n){return EE(e,t||function(){return{}},function(){return n.reconnect()})}function $E(t){return d.useMemo(function(){return t.hooks.dragSource()},[t])}function xE(t){return d.useMemo(function(){return t.hooks.dragPreview()},[t])}function CE(t,e){var n=Af(t,e);X(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");var r=sE(),i=lE(n.options,n.previewOptions);return tE(n,r,i),[Lf(n.collect,r,i),$E(i),xE(i)]}function TE(t){var e=t.accept;return d.useMemo(function(){return X(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]},[e])}function DE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function PE(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function OE(t,e,n){return PE(t.prototype,e),t}function Ul(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var IE=function(){function t(e,n){DE(this,t),Ul(this,"spec",void 0),Ul(this,"monitor",void 0),this.spec=e,this.monitor=n}return OE(t,[{key:"canDrop",value:function(){var n=this.spec,r=this.monitor;return n.canDrop?n.canDrop(r.getItem(),r):!0}},{key:"hover",value:function(){var n=this.spec,r=this.monitor;n.hover&&n.hover(r.getItem(),r)}},{key:"drop",value:function(){var n=this.spec,r=this.monitor;if(n.drop)return n.drop(r.getItem(),r)}}]),t}();function _E(t,e){var n=d.useMemo(function(){return new IE(t,e)},[e]);return d.useEffect(function(){n.spec=t},[t]),n}function kE(t,e){return AE(t)||ME(t,e)||RE(t,e)||NE()}function NE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
97
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bE(t,e){if(t){if(typeof t=="string")return Wl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wl(t,e)}}function Wl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function SE(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function wE(t){if(Array.isArray(t))return t}function EE(t,e,n){var r=Kf(t,e,n),i=mE(r,2),o=i[0],a=i[1];return Lt(function(){var l=t.getHandlerId();if(l!=null)return t.subscribeToStateChange(a,{handlerIds:[l]})},[t,a]),o}function Lf(t,e,n){return EE(e,t||function(){return{}},function(){return n.reconnect()})}function $E(t){return d.useMemo(function(){return t.hooks.dragSource()},[t])}function xE(t){return d.useMemo(function(){return t.hooks.dragPreview()},[t])}function CE(t,e){var n=Af(t,e);J(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");var r=sE(),i=lE(n.options,n.previewOptions);return tE(n,r,i),[Lf(n.collect,r,i),$E(i),xE(i)]}function TE(t){var e=t.accept;return d.useMemo(function(){return J(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]},[e])}function DE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function PE(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function OE(t,e,n){return PE(t.prototype,e),t}function Ul(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var IE=function(){function t(e,n){DE(this,t),Ul(this,"spec",void 0),Ul(this,"monitor",void 0),this.spec=e,this.monitor=n}return OE(t,[{key:"canDrop",value:function(){var n=this.spec,r=this.monitor;return n.canDrop?n.canDrop(r.getItem(),r):!0}},{key:"hover",value:function(){var n=this.spec,r=this.monitor;n.hover&&n.hover(r.getItem(),r)}},{key:"drop",value:function(){var n=this.spec,r=this.monitor;if(n.drop)return n.drop(r.getItem(),r)}}]),t}();function _E(t,e){var n=d.useMemo(function(){return new IE(t,e)},[e]);return d.useEffect(function(){n.spec=t},[t]),n}function kE(t,e){return AE(t)||ME(t,e)||RE(t,e)||NE()}function NE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
98
98
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RE(t,e){if(t){if(typeof t=="string")return Vl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vl(t,e)}}function Vl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ME(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function AE(t){if(Array.isArray(t))return t}function KE(t,e,n){var r=Ht(),i=_E(t,e),o=TE(t);Lt(function(){var s=H0(o,i,r),l=kE(s,2),u=l[0],c=l[1];return e.receiveHandlerId(u),n.receiveHandlerId(u),c},[r,e,i,n,o.map(function(a){return a.toString()}).join("|")])}function LE(){var t=Ht();return d.useMemo(function(){return new I0(t)},[t])}function FE(t){var e=Ht(),n=d.useMemo(function(){return new z0(e.getBackend())},[e]);return Lt(function(){return n.dropTargetOptions=t||null,n.reconnect(),function(){return n.disconnectDropTarget()}},[t]),n}function jE(t){return d.useMemo(function(){return t.hooks.dropTarget()},[t])}function Ff(t,e){var n=Af(t,e),r=LE(),i=FE(n.options);return KE(n,r,i),[Lf(n.collect,r,i),jE(i)]}function zE(t,e){return UE(t)||WE(t,e)||BE(t,e)||HE()}function HE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
99
99
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BE(t,e){if(t){if(typeof t=="string")return Gl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gl(t,e)}}function Gl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function WE(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function UE(t){if(Array.isArray(t))return t}function VE(t){var e=Ht(),n=e.getMonitor(),r=Kf(n,t),i=zE(r,2),o=i[0],a=i[1];return d.useEffect(function(){return n.subscribeToOffsetChange(a)}),d.useEffect(function(){return n.subscribeToStateChange(a)}),o}function jf(t){var e=null,n=function(){return e==null&&(e=t()),e};return n}function GE(t,e){return t.filter(function(n){return n!==e})}function qE(t,e){var n=new Set,r=function(a){return n.add(a)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(o){return i.push(o)}),i}function YE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XE(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function JE(t,e,n){return XE(t.prototype,e),t}function ql(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var QE=function(){function t(e){YE(this,t),ql(this,"entered",[]),ql(this,"isNodeInDocument",void 0),this.isNodeInDocument=e}return JE(t,[{key:"enter",value:function(n){var r=this,i=this.entered.length,o=function(s){return r.isNodeInDocument(s)&&(!s.contains||s.contains(n))};return this.entered=qE(this.entered.filter(o),[n]),i===0&&this.entered.length>0}},{key:"leave",value:function(n){var r=this.entered.length;return this.entered=GE(this.entered.filter(this.isNodeInDocument),n),r>0&&this.entered.length===0}},{key:"reset",value:function(){this.entered=[]}}]),t}(),ZE=jf(function(){return/firefox/i.test(navigator.userAgent)}),zf=jf(function(){return!!window.safari});function e$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function t$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n$(t,e,n){return t$(t.prototype,e),t}function Mn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Yl=function(){function t(e,n){e$(this,t),Mn(this,"xs",void 0),Mn(this,"ys",void 0),Mn(this,"c1s",void 0),Mn(this,"c2s",void 0),Mn(this,"c3s",void 0);for(var r=e.length,i=[],o=0;o<r;o++)i.push(o);i.sort(function(b,k){return e[b]<e[k]?-1:1});for(var a=[],s=[],l,u,c=0;c<r-1;c++)l=e[c+1]-e[c],u=n[c+1]-n[c],a.push(l),s.push(u/l);for(var p=[s[0]],g=0;g<a.length-1;g++){var h=s[g],y=s[g+1];if(h*y<=0)p.push(0);else{l=a[g];var f=a[g+1],v=l+f;p.push(3*v/((v+f)/h+(v+l)/y))}}p.push(s[s.length-1]);for(var m=[],S=[],w,O=0;O<p.length-1;O++){w=s[O];var x=p[O],D=1/a[O],P=x+p[O+1]-w-w;m.push((w-x-P)*D),S.push(P*D*D)}this.xs=e,this.ys=n,this.c1s=p,this.c2s=m,this.c3s=S}return n$(t,[{key:"interpolate",value:function(n){var r=this.xs,i=this.ys,o=this.c1s,a=this.c2s,s=this.c3s,l=r.length-1;if(n===r[l])return i[l];for(var u=0,c=s.length-1,p;u<=c;){p=Math.floor(.5*(u+c));var g=r[p];if(g<n)u=p+1;else if(g>n)c=p-1;else return i[p]}l=Math.max(0,c);var h=n-r[l],y=h*h;return i[l]+o[l]*h+a[l]*y+s[l]*h*y}}]),t}(),r$=1;function Hf(t){var e=t.nodeType===r$?t:t.parentElement;if(!e)return null;var n=e.getBoundingClientRect(),r=n.top,i=n.left;return{x:i,y:r}}function Dr(t){return{x:t.clientX,y:t.clientY}}function i$(t){var e;return t.nodeName==="IMG"&&(ZE()||!((e=document.documentElement)!==null&&e!==void 0&&e.contains(t)))}function o$(t,e,n,r){var i=t?e.width:n,o=t?e.height:r;return zf()&&t&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}function a$(t,e,n,r,i){var o=i$(e),a=o?t:e,s=Hf(a),l={x:n.x-s.x,y:n.y-s.y},u=t.offsetWidth,c=t.offsetHeight,p=r.anchorX,g=r.anchorY,h=o$(o,e,u,c),y=h.dragPreviewWidth,f=h.dragPreviewHeight,v=function(){var P=new Yl([0,.5,1],[l.y,l.y/c*f,l.y+f-c]),b=P.interpolate(g);return zf()&&o&&(b+=(window.devicePixelRatio-1)*f),b},m=function(){var P=new Yl([0,.5,1],[l.x,l.x/u*y,l.x+y-u]);return P.interpolate(p)},S=i.offsetX,w=i.offsetY,O=S===0||S,x=w===0||w;return{x:O?S:m(),y:x?w:v()}}var Bf="__NATIVE_FILE__",Wf="__NATIVE_URL__",Uf="__NATIVE_TEXT__",Vf="__NATIVE_HTML__";const Xl=Object.freeze(Object.defineProperty({__proto__:null,FILE:Bf,HTML:Vf,TEXT:Uf,URL:Wf},Symbol.toStringTag,{value:"Module"}));function po(t,e,n){var r=e.reduce(function(i,o){return i||t.getData(o)},"");return r??n}var en;function Pr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ra=(en={},Pr(en,Bf,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items},dataTransfer:function(e){return e}},matchesTypes:["Files"]}),Pr(en,Vf,{exposeProperties:{html:function(e,n){return po(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Html","text/html"]}),Pr(en,Wf,{exposeProperties:{urls:function(e,n){return po(e,n,"").split(`
100
- `)},dataTransfer:function(e){return e}},matchesTypes:["Url","text/uri-list"]}),Pr(en,Uf,{exposeProperties:{text:function(e,n){return po(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Text","text/plain"]}),en);function s$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u$(t,e,n){return l$(t.prototype,e),t}function Jl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c$=function(){function t(e){s$(this,t),Jl(this,"item",void 0),Jl(this,"config",void 0),this.config=e,this.item={},this.initializeExposedProperties()}return u$(t,[{key:"initializeExposedProperties",value:function(){var n=this;Object.keys(this.config.exposeProperties).forEach(function(r){Object.defineProperty(n.item,r,{configurable:!0,enumerable:!0,get:function(){return console.warn(`Browser doesn't allow reading "`.concat(r,'" until the drop event.')),null}})})}},{key:"loadDataTransfer",value:function(n){var r=this;if(n){var i={};Object.keys(this.config.exposeProperties).forEach(function(o){i[o]={value:r.config.exposeProperties[o](n,r.config.matchesTypes),configurable:!0,enumerable:!0}}),Object.defineProperties(this.item,i)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(n,r){return r===n.getSourceId()}},{key:"endDrag",value:function(){}}]),t}();function d$(t,e){var n=new c$(ra[t]);return n.loadDataTransfer(e),n}function go(t){if(!t)return null;var e=Array.prototype.slice.call(t.types||[]);return Object.keys(ra).filter(function(n){var r=ra[n].matchesTypes;return r.some(function(i){return e.indexOf(i)>-1})})[0]||null}function f$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p$(t,e,n){return h$(t.prototype,e),t}function vo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g$=function(){function t(e,n){f$(this,t),vo(this,"ownerDocument",null),vo(this,"globalContext",void 0),vo(this,"optionsArgs",void 0),this.globalContext=e,this.optionsArgs=n}return p$(t,[{key:"window",get:function(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}},{key:"document",get:function(){var n;return(n=this.globalContext)!==null&&n!==void 0&&n.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var n;return((n=this.optionsArgs)===null||n===void 0?void 0:n.rootElement)||this.window}}]),t}();function Ql(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ql(Object(n),!0).forEach(function(r){te(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ql(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function v$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y$(t,e,n){return m$(t.prototype,e),t}function te(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b$=function(){function t(e,n,r){var i=this;v$(this,t),te(this,"options",void 0),te(this,"actions",void 0),te(this,"monitor",void 0),te(this,"registry",void 0),te(this,"enterLeaveCounter",void 0),te(this,"sourcePreviewNodes",new Map),te(this,"sourcePreviewNodeOptions",new Map),te(this,"sourceNodes",new Map),te(this,"sourceNodeOptions",new Map),te(this,"dragStartSourceIds",null),te(this,"dropTargetIds",[]),te(this,"dragEnterTargetIds",[]),te(this,"currentNativeSource",null),te(this,"currentNativeHandle",null),te(this,"currentDragSourceNode",null),te(this,"altKeyPressed",!1),te(this,"mouseMoveTimeoutTimer",null),te(this,"asyncEndDragFrameId",null),te(this,"dragOverTargetIds",null),te(this,"lastClientOffset",null),te(this,"hoverRafId",null),te(this,"getSourceClientOffset",function(o){var a=i.sourceNodes.get(o);return a&&Hf(a)||null}),te(this,"endDragNativeItem",function(){i.isDraggingNativeItem()&&(i.actions.endDrag(),i.currentNativeHandle&&i.registry.removeSource(i.currentNativeHandle),i.currentNativeHandle=null,i.currentNativeSource=null)}),te(this,"isNodeInDocument",function(o){return!!(o&&i.document&&i.document.body&&i.document.body.contains(o))}),te(this,"endDragIfSourceWasRemovedFromDOM",function(){var o=i.currentDragSourceNode;o==null||i.isNodeInDocument(o)||i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),te(this,"handleTopDragStartCapture",function(){i.clearCurrentDragSourceNode(),i.dragStartSourceIds=[]}),te(this,"handleTopDragStart",function(o){if(!o.defaultPrevented){var a=i.dragStartSourceIds;i.dragStartSourceIds=null;var s=Dr(o);i.monitor.isDragging()&&i.actions.endDrag(),i.actions.beginDrag(a||[],{publishSource:!1,getSourceClientOffset:i.getSourceClientOffset,clientOffset:s});var l=o.dataTransfer,u=go(l);if(i.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){var c=i.monitor.getSourceId(),p=i.sourceNodes.get(c),g=i.sourcePreviewNodes.get(c)||p;if(g){var h=i.getCurrentSourcePreviewNodeOptions(),y=h.anchorX,f=h.anchorY,v=h.offsetX,m=h.offsetY,S={anchorX:y,anchorY:f},w={offsetX:v,offsetY:m},O=a$(p,g,s,S,w);l.setDragImage(g,O.x,O.y)}}try{l==null||l.setData("application/json",{})}catch{}i.setCurrentDragSourceNode(o.target);var x=i.getCurrentSourcePreviewNodeOptions(),D=x.captureDraggingState;D?i.actions.publishDragSource():setTimeout(function(){return i.actions.publishDragSource()},0)}else if(u)i.beginDragNativeItem(u);else{if(l&&!l.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}}}),te(this,"handleTopDragEndCapture",function(){i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),te(this,"handleTopDragEnterCapture",function(o){i.dragEnterTargetIds=[];var a=i.enterLeaveCounter.enter(o.target);if(!(!a||i.monitor.isDragging())){var s=o.dataTransfer,l=go(s);l&&i.beginDragNativeItem(l,s)}}),te(this,"handleTopDragEnter",function(o){var a=i.dragEnterTargetIds;if(i.dragEnterTargetIds=[],!!i.monitor.isDragging()){i.altKeyPressed=o.altKey,a.length>0&&i.actions.hover(a,{clientOffset:Dr(o)});var s=a.some(function(l){return i.monitor.canDropOnTarget(l)});s&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect()))}}),te(this,"handleTopDragOverCapture",function(){i.dragOverTargetIds=[]}),te(this,"handleTopDragOver",function(o){var a=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}i.altKeyPressed=o.altKey,i.lastClientOffset=Dr(o),i.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(i.hoverRafId=requestAnimationFrame(function(){i.monitor.isDragging()&&i.actions.hover(a||[],{clientOffset:i.lastClientOffset}),i.hoverRafId=null}));var s=(a||[]).some(function(l){return i.monitor.canDropOnTarget(l)});s?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect())):i.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))}),te(this,"handleTopDragLeaveCapture",function(o){i.isDraggingNativeItem()&&o.preventDefault();var a=i.enterLeaveCounter.leave(o.target);a&&i.isDraggingNativeItem()&&setTimeout(function(){return i.endDragNativeItem()},0)}),te(this,"handleTopDropCapture",function(o){if(i.dropTargetIds=[],i.isDraggingNativeItem()){var a;o.preventDefault(),(a=i.currentNativeSource)===null||a===void 0||a.loadDataTransfer(o.dataTransfer)}else go(o.dataTransfer)&&o.preventDefault();i.enterLeaveCounter.reset()}),te(this,"handleTopDrop",function(o){var a=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(a,{clientOffset:Dr(o)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.monitor.isDragging()&&i.actions.endDrag()}),te(this,"handleSelectStart",function(o){var a=o.target;typeof a.dragDrop=="function"&&(a.tagName==="INPUT"||a.tagName==="SELECT"||a.tagName==="TEXTAREA"||a.isContentEditable||(o.preventDefault(),a.dragDrop()))}),this.options=new g$(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new QE(this.isNodeInDocument)}return y$(t,[{key:"profile",value:function(){var n,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((n=this.dragStartSourceIds)===null||n===void 0?void 0:n.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var n=this.rootElement;if(n!==void 0){if(n.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");n.__isReactDndBackendSetUp=!0,this.addEventListeners(n)}}},{key:"teardown",value:function(){var n=this.rootElement;if(n!==void 0&&(n.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}},{key:"connectDragPreview",value:function(n,r,i){var o=this;return this.sourcePreviewNodeOptions.set(n,i),this.sourcePreviewNodes.set(n,r),function(){o.sourcePreviewNodes.delete(n),o.sourcePreviewNodeOptions.delete(n)}}},{key:"connectDragSource",value:function(n,r,i){var o=this;this.sourceNodes.set(n,r),this.sourceNodeOptions.set(n,i);var a=function(u){return o.handleDragStart(u,n)},s=function(u){return o.handleSelectStart(u)};return r.setAttribute("draggable","true"),r.addEventListener("dragstart",a),r.addEventListener("selectstart",s),function(){o.sourceNodes.delete(n),o.sourceNodeOptions.delete(n),r.removeEventListener("dragstart",a),r.removeEventListener("selectstart",s),r.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(n,r){var i=this,o=function(u){return i.handleDragEnter(u,n)},a=function(u){return i.handleDragOver(u,n)},s=function(u){return i.handleDrop(u,n)};return r.addEventListener("dragenter",o),r.addEventListener("dragover",a),r.addEventListener("drop",s),function(){r.removeEventListener("dragenter",o),r.removeEventListener("dragover",a),r.removeEventListener("drop",s)}}},{key:"addEventListeners",value:function(n){n.addEventListener&&(n.addEventListener("dragstart",this.handleTopDragStart),n.addEventListener("dragstart",this.handleTopDragStartCapture,!0),n.addEventListener("dragend",this.handleTopDragEndCapture,!0),n.addEventListener("dragenter",this.handleTopDragEnter),n.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.addEventListener("dragover",this.handleTopDragOver),n.addEventListener("dragover",this.handleTopDragOverCapture,!0),n.addEventListener("drop",this.handleTopDrop),n.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(n){n.removeEventListener&&(n.removeEventListener("dragstart",this.handleTopDragStart),n.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),n.removeEventListener("dragend",this.handleTopDragEndCapture,!0),n.removeEventListener("dragenter",this.handleTopDragEnter),n.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.removeEventListener("dragover",this.handleTopDragOver),n.removeEventListener("dragover",this.handleTopDragOverCapture,!0),n.removeEventListener("drop",this.handleTopDrop),n.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(n);return Zl({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(n);return Zl({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}},{key:"isDraggingNativeItem",value:function(){var n=this.monitor.getItemType();return Object.keys(Xl).some(function(r){return Xl[r]===n})}},{key:"beginDragNativeItem",value:function(n,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=d$(n,r),this.currentNativeHandle=this.registry.addSource(n,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(n){var r=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=n;var i=1e3;this.mouseMoveTimeoutTimer=setTimeout(function(){var o;return(o=r.rootElement)===null||o===void 0?void 0:o.addEventListener("mousemove",r.endDragIfSourceWasRemovedFromDOM,!0)},i)}},{key:"clearCurrentDragSourceNode",value:function(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var n;(n=this.window)===null||n===void 0||n.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}},{key:"handleDragStart",value:function(n,r){n.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}},{key:"handleDragEnter",value:function(n,r){this.dragEnterTargetIds.unshift(r)}},{key:"handleDragOver",value:function(n,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}},{key:"handleDrop",value:function(n,r){this.dropTargetIds.unshift(r)}}]),t}(),Or;function S$(){return Or||(Or=new Image,Or.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Or}var w$=function(e,n,r){return new b$(e,n,r)};function E$(t){const e=Oe(),n=e.selectedIds,[r,i,o]=CE(()=>({canDrag:()=>t.isDraggable,type:"NODE",item:()=>{const a=e.isSelected(t.id)?Array.from(n):[t.id];return e.dispatch(wn.dragStart(t.id,a)),{id:t.id,dragIds:a}},end:()=>{e.hideCursor(),e.dispatch(wn.dragEnd())}}),[n,t]);return d.useEffect(()=>{o(S$())},[o]),i}function $$(t,e){const n=t.getBoundingClientRect(),r=e.x-Math.round(n.x),i=e.y-Math.round(n.y),o=n.height,a=i<o/2,s=!a,l=o/4,u=i>l&&i<o-l;return{x:r,inTopHalf:a,inBottomHalf:s,inMiddle:u,atTop:!u&&a,atBottom:!u&&s}}function x$(t,e,n,r){return t?t.isInternal?r.atTop?[e,t]:r.inMiddle?[t,t]:[t,n]:r.inTopHalf?[e,t]:[t,n]:[e,null]}function Ir(t,e){return{parentId:t||null,index:e}}function tn(t,e){return{type:"line",index:t,level:e}}function C$(t){return{type:"highlight",id:t}}function mo(t,e){var n;let r=t;for(;r.parent&&r.level>e;)r=r.parent;const i=((n=r.parent)===null||n===void 0?void 0:n.id)||null,o=mf(r)+1;return{parentId:i,index:o}}function Gf(t){var e;const n=$$(t.element,t.offset),r=t.indent,i=Math.round(Math.max(0,n.x-r)/r),{node:o,nextNode:a,prevNode:s}=t,[l,u]=x$(o,s,a,n);if(o&&o.isInternal&&n.inMiddle)return{drop:Ir(o.id,null),cursor:C$(o.id)};if(!l)return{drop:Ir((e=u==null?void 0:u.parent)===null||e===void 0?void 0:e.id,0),cursor:tn(0,0)};if(hf(l)){const c=Mr(i,(u==null?void 0:u.level)||0,l.level);return{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}if(pf(l)){const c=Mr(i,(u==null?void 0:u.level)||0,l.level);return{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}if(gf(l)){const c=Mr(i,0,l.level+1);return c>l.level?{drop:Ir(l.id,0),cursor:tn(l.rowIndex+1,c)}:{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}return{drop:Ir(l==null?void 0:l.id,0),cursor:tn(l.rowIndex+1,l.level+1)}}function T$(t,e){const n=Oe(),[r,i]=Ff(()=>({accept:"NODE",canDrop:()=>n.canDrop(),hover:(o,a)=>{const s=a.getClientOffset();if(!t.current||!s)return;const{cursor:l,drop:u}=Gf({element:t.current,offset:s,indent:n.indent,node:e,prevNode:e.prev,nextNode:e.next});u&&n.dispatch(wn.hovering(u.parentId,u.index)),a.canDrop()?l&&n.showCursor(l):n.hideCursor()},drop:(o,a)=>{if(!a.canDrop())return null;let{parentId:s,index:l,dragIds:u}=n.state.dnd;Ef(n.props.onMove,{dragIds:u,parentId:s===er?null:s,index:l===null?0:l,dragNodes:n.dragNodes,parentNode:n.get(s)}),n.open(s)}}),[e,t.current,n.props]);return i}function D$(t){const e=Oe(),n=e.at(t);if(!n)throw new Error(`Could not find node for index: ${t}`);return d.useMemo(()=>{const r=n.clone();return e.visibleNodes[t]=r,r},[...Object.values(n.state),n])}const P$=d.memo(function({index:e,style:n}){ff(),qb();const r=Oe(),i=D$(e),o=d.useRef(null),a=E$(i),s=T$(o,i),l=d.useCallback(f=>{o.current=f,s(f)},[s]),u=r.indent*i.level,c=d.useMemo(()=>({paddingLeft:u}),[u]),p=d.useMemo(()=>{var f,v;return Object.assign(Object.assign({},n),{top:parseFloat(n.top)+((v=(f=r.props.padding)!==null&&f!==void 0?f:r.props.paddingTop)!==null&&v!==void 0?v:0)})},[n,r.props.padding,r.props.paddingTop]),g={role:"treeitem","aria-level":i.level+1,"aria-selected":i.isSelected,"aria-expanded":i.isOpen,style:p,tabIndex:-1,className:r.props.rowClassName};d.useEffect(()=>{var f;!i.isEditing&&i.isFocused&&((f=o.current)===null||f===void 0||f.focus({preventScroll:!0}))},[i.isEditing,i.isFocused,o.current]);const h=r.renderNode,y=r.renderRow;return T.jsx(y,{node:i,innerRef:l,attrs:g,children:T.jsx(h,{node:i,tree:r,style:c,dragHandle:a})})});let yo="",eu=null;function qf(){ff();const t=Oe();return T.jsx("div",{role:"tree",style:{height:t.height,width:t.width,minHeight:0,minWidth:0},onContextMenu:t.props.onContextMenu,onClick:t.props.onClick,tabIndex:0,onFocus:e=>{e.currentTarget.contains(e.relatedTarget)||t.onFocus()},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||t.onBlur()},onKeyDown:e=>{var n;if(t.isEditing)return;if(e.key==="Backspace"){if(!t.props.onDelete)return;const i=Array.from(t.selectedIds);if(i.length>1){let o=t.mostRecentNode;for(;o&&o.isSelected;)o=o.nextSibling;o||(o=t.lastNode),t.focus(o,{scroll:!1}),t.delete(Array.from(i))}else{const o=t.focusedNode;if(o){const a=o.nextSibling,s=o.parent;t.focus(a||s,{scroll:!1}),t.delete(o)}}return}if(e.key==="Tab"&&!e.shiftKey){e.preventDefault(),yf(e.currentTarget);return}if(e.key==="Tab"&&e.shiftKey){e.preventDefault(),bf(e.currentTarget);return}if(e.key==="ArrowDown"){e.preventDefault();const i=t.nextNode;if(e.metaKey){t.select(t.focusedNode),t.activate(t.focusedNode);return}else if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const o=t.focusedNode;o?o.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.firstNode);return}}if(e.key==="ArrowUp"){e.preventDefault();const i=t.prevNode;if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const o=t.focusedNode;o?o.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.lastNode);return}}if(e.key==="ArrowRight"){const i=t.focusedNode;if(!i)return;i.isInternal&&i.isOpen?t.focus(t.nextNode):i.isInternal&&t.open(i.id);return}if(e.key==="ArrowLeft"){const i=t.focusedNode;if(!i||i.isRoot)return;i.isInternal&&i.isOpen?t.close(i.id):!((n=i.parent)===null||n===void 0)&&n.isRoot||t.focus(i.parent);return}if(e.key==="a"&&e.metaKey&&!t.props.disableMultiSelection){e.preventDefault(),t.selectAll();return}if(e.key==="a"&&!e.metaKey&&t.props.onCreate){t.createLeaf();return}if(e.key==="A"&&!e.metaKey){if(!t.props.onCreate)return;t.createInternal();return}if(e.key==="Home"){e.preventDefault(),t.focus(t.firstNode);return}if(e.key==="End"){e.preventDefault(),t.focus(t.lastNode);return}if(e.key==="Enter"){const i=t.focusedNode;if(!i||!i.isEditable||!t.props.onRename)return;setTimeout(()=>{i&&t.edit(i)});return}if(e.key===" "){e.preventDefault();const i=t.focusedNode;if(!i)return;i.isLeaf?(i.select(),i.activate()):i.toggle();return}if(e.key==="*"){const i=t.focusedNode;if(!i)return;t.openSiblings(i);return}if(e.key==="PageUp"){e.preventDefault(),t.pageUp();return}e.key==="PageDown"&&(e.preventDefault(),t.pageDown()),clearTimeout(eu),yo+=e.key,eu=setTimeout(()=>{yo=""},600);const r=t.visibleNodes.find(i=>{const o=i.data.name;return typeof o=="string"?o.toLowerCase().startsWith(yo):!1});r&&t.focus(r.id)},children:T.jsx(_S,{className:t.props.className,outerRef:t.listEl,itemCount:t.visibleNodes.length,height:t.height,width:t.width,itemSize:t.rowHeight,overscanCount:t.overscanCount,itemKey:e=>{var n;return((n=t.visibleNodes[e])===null||n===void 0?void 0:n.id)||e},outerElementType:RS,innerElementType:KS,onScroll:t.props.onScroll,onItemsRendered:t.onItemsRendered.bind(t),ref:t.list,children:P$})})}function tu(t){return t.isFiltered?I$(t.root,t.isMatch.bind(t)):O$(t.root)}function O$(t){const e=[];function n(r){var i;r.level>=0&&e.push(r),r.isOpen&&((i=r.children)===null||i===void 0||i.forEach(n))}return n(t),e.forEach(Yf),e}function I$(t,e){const n={},r=[];function i(a){if(!a.isRoot&&e(a)){n[a.id]=!0;let l=a.parent;for(;l;)n[l.id]=!0,l=l.parent}if(a.children)for(let l of a.children)i(l)}function o(a){var s;a.level>=0&&n[a.id]&&r.push(a),a.isOpen&&((s=a.children)===null||s===void 0||s.forEach(o))}return i(t),o(t),r.forEach(Yf),r}function Yf(t,e){t.rowIndex=e}const nu=t=>t.reduce((e,n,r)=>(e[n.id]=r,e),{});var bo=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(p){a(p)}}function l(c){try{u(r.throw(c))}catch(p){a(p)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(t,e||[])).next())})};const{safeRun:he,identify:et,identifyNull:je}=eS;class Wn{constructor(e,n,r,i){this.store=e,this.props=n,this.list=r,this.listEl=i,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=fl(this),this.visibleNodes=tu(this),this.idToIndex=nu(this.visibleNodes)}update(e){this.props=e,this.root=fl(this),this.visibleNodes=tu(this),this.idToIndex=nu(this.visibleNodes)}dispatch(e){return this.store.dispatch(e)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){var e;return(e=this.props.width)!==null&&e!==void 0?e:300}get height(){var e;return(e=this.props.height)!==null&&e!==void 0?e:500}get indent(){var e;return(e=this.props.indent)!==null&&e!==void 0?e:24}get rowHeight(){var e;return(e=this.props.rowHeight)!==null&&e!==void 0?e:24}get overscanCount(){var e;return(e=this.props.overscanCount)!==null&&e!==void 0?e:1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){var e;const n=(e=this.props.searchMatch)!==null&&e!==void 0?e:(r,i)=>JSON.stringify(Object.values(r.data)).toLocaleLowerCase().includes(i.toLocaleLowerCase());return r=>n(r,this.searchTerm)}accessChildren(e){var n;const r=this.props.childrenAccessor||"children";return(n=jn(e,r))!==null&&n!==void 0?n:null}accessId(e){const n=this.props.idAccessor||"id",r=jn(e,n);if(!r)throw new Error("Data must contain an 'id' property or props.idAccessor must return a string");return r}get firstNode(){var e;return(e=this.visibleNodes[0])!==null&&e!==void 0?e:null}get lastNode(){var e;return(e=this.visibleNodes[this.visibleNodes.length-1])!==null&&e!==void 0?e:null}get focusedNode(){var e;return(e=this.get(this.state.nodes.focus.id))!==null&&e!==void 0?e:null}get mostRecentNode(){var e;return(e=this.get(this.state.nodes.selection.mostRecent))!==null&&e!==void 0?e:null}get nextNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e+1)}get prevNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e-1)}get(e){return e&&e in this.idToIndex&&this.visibleNodes[this.idToIndex[e]]||null}at(e){return this.visibleNodes[e]||null}nodesBetween(e,n){var r;if(e===null||n===null)return[];const i=(r=this.indexOf(e))!==null&&r!==void 0?r:0,o=this.indexOf(n);if(o===null)return[];const a=Math.min(i,o),s=Math.max(i,o);return this.visibleNodes.slice(a,s+1)}indexOf(e){const n=wf(e);return n?this.idToIndex[n]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(){return bo(this,arguments,void 0,function*(e={}){var n,r;const i=e.parentId===void 0?Cf(this):e.parentId,o=(n=e.index)!==null&&n!==void 0?n:xf(this),a=(r=e.type)!==null&&r!==void 0?r:"leaf",s=yield he(this.props.onCreate,{type:a,parentId:i,index:o,parentNode:this.get(i)});s&&(this.focus(s),setTimeout(()=>{this.edit(s).then(()=>{this.select(s),this.activate(s)})}))})}delete(e){return bo(this,void 0,void 0,function*(){if(!e)return;const r=(Array.isArray(e)?e:[e]).map(et),i=r.map(o=>this.get(o)).filter(o=>!!o);yield he(this.props.onDelete,{nodes:i,ids:r})})}edit(e){const n=et(e);return this.resolveEdit({cancelled:!0}),this.scrollTo(n),this.dispatch(io(n)),new Promise(r=>{Wn.editPromise=r})}submit(e,n){return bo(this,void 0,void 0,function*(){if(!e)return;const r=et(e);yield he(this.props.onRename,{id:r,name:n,node:this.get(r)}),this.dispatch(io(null)),this.resolveEdit({cancelled:!1,value:n}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(io(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(e){const n=this.get(je(e));n&&he(this.props.onActivate,n)}resolveEdit(e){const n=Wn.editPromise;n&&n(e),Wn.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let e=[];for(let n of Array.from(this.selectedIds)){const r=this.get(n);r&&e.push(r)}return e}focus(e,n={}){e&&(this.props.selectionFollowsFocus?this.select(e):(this.dispatch(Xt(et(e))),n.scroll!==!1&&this.scrollTo(e),this.focusedNode&&he(this.props.onFocus,this.focusedNode)))}pageUp(){var e,n;const r=this.visibleStartIndex,o=this.visibleStopIndex-r;let a=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;a>r?a=r:a=Math.max(r-o,0),this.focus(this.at(a))}pageDown(){var e,n;const r=this.visibleStartIndex,i=this.visibleStopIndex,o=i-r;let a=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;a<i?a=i:a=Math.min(a+o,this.visibleNodes.length-1),this.focus(this.at(a))}select(e,n={}){if(!e)return;const r=n.focus!==!1,i=et(e);r&&this.dispatch(Xt(i)),this.dispatch(Fe.only(i)),this.dispatch(Fe.anchor(i)),this.dispatch(Fe.mostRecent(i)),this.scrollTo(i,n.align),this.focusedNode&&r&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}deselect(e){if(!e)return;const n=et(e);this.dispatch(Fe.remove(n)),he(this.props.onSelect,this.selectedNodes)}selectMulti(e){const n=this.get(je(e));n&&(this.dispatch(Xt(n.id)),this.dispatch(Fe.add(n.id)),this.dispatch(Fe.anchor(n.id)),this.dispatch(Fe.mostRecent(n.id)),this.scrollTo(n),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes))}selectContiguous(e){if(!e)return;const n=et(e),{anchor:r,mostRecent:i}=this.state.nodes.selection;this.dispatch(Xt(n)),this.dispatch(Fe.remove(this.nodesBetween(r,i))),this.dispatch(Fe.add(this.nodesBetween(r,je(n)))),this.dispatch(Fe.mostRecent(n)),this.scrollTo(n),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),he(this.props.onSelect,this.selectedNodes)}selectAll(){var e;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(Xt((e=this.lastNode)===null||e===void 0?void 0:e.id)),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}setSelection(e){var n;const r=new Set((n=e.ids)===null||n===void 0?void 0:n.map(et)),i=je(e.anchor),o=je(e.mostRecent);this.dispatch(Fe.set({ids:r,anchor:i,mostRecent:o})),he(this.props.onSelect,this.selectedNodes)}get cursorParentId(){const{cursor:e}=this.state.dnd;switch(e.type){case"highlight":return e.id;default:return null}}get cursorOverFolder(){return this.state.dnd.cursor.type==="highlight"}get dragNodes(){return this.state.dnd.dragIds.map(e=>this.get(e)).filter(e=>!!e)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){var e;if(this.isFiltered)return!1;const n=(e=this.get(this.state.dnd.parentId))!==null&&e!==void 0?e:this.root,r=this.dragNodes,i=this.props.disableDrop;for(const o of r)if(!o||!n||o.isInternal&&vf(n,o))return!1;return typeof i=="function"?!i({parentNode:n,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):typeof i=="string"?!n.data[i]:typeof i=="boolean"?!i:!0}hideCursor(){this.dispatch(wn.cursor({type:"none"}))}showCursor(e){this.dispatch(wn.cursor(e))}open(e){const n=je(e);n&&(this.isOpen(n)||(this.dispatch(Yo.open(n,this.isFiltered)),he(this.props.onToggle,n)))}close(e){const n=je(e);n&&this.isOpen(n)&&(this.dispatch(Yo.close(n,this.isFiltered)),he(this.props.onToggle,n))}toggle(e){const n=je(e);if(n)return this.isOpen(n)?this.close(n):this.open(n)}openParents(e){const n=je(e);if(!n)return;const r=Ma(this.root,n);let i=r==null?void 0:r.parent;for(;i;)this.open(i.id),i=i.parent}openSiblings(e){const n=e.parent;if(!n)this.toggle(e.id);else if(n.children){const r=e.isOpen;for(let i of n.children)i.isInternal&&(r?this.close(i.id):this.open(i.id));this.scrollTo(this.focusedNode)}}openAll(){ii(this.root,e=>{e.isInternal&&e.open()})}closeAll(){ii(this.root,e=>{e.isInternal&&e.close()})}scrollTo(e,n="smart"){if(!e)return;const r=et(e);return this.openParents(r),$f(()=>r in this.idToIndex).then(()=>{var i;const o=this.idToIndex[r];o!==void 0&&((i=this.list.current)===null||i===void 0||i.scrollToItem(o,n))}).catch(()=>{})}get isEditing(){return this.state.nodes.edit.id!==null}get isFiltered(){var e;return!!(!((e=this.props.searchTerm)===null||e===void 0)&&e.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return this.state.nodes.selection.ids.size===0}get hasOneSelection(){return this.state.nodes.selection.ids.size===1}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(e){return e?this.state.nodes.selection.ids.has(e):!1}isOpen(e){var n,r,i;if(!e)return!1;if(e===er)return!0;const o=(n=this.props.openByDefault)!==null&&n!==void 0?n:!0;return this.isFiltered?(r=this.state.nodes.open.filtered[e])!==null&&r!==void 0?r:!0:(i=this.state.nodes.open.unfiltered[e])!==null&&i!==void 0?i:o}isEditable(e){const n=this.props.disableEdit||(()=>!1);return!jn(e,n)}isDraggable(e){const n=this.props.disableDrag||(()=>!1);return!jn(e,n)}isDragging(e){const n=je(e);return n?this.state.nodes.drag.id===n:!1}isFocused(e){return this.hasFocus&&this.state.nodes.focus.id===e}isMatch(e){return this.matchFn(e)}willReceiveDrop(e){const n=je(e);if(!n)return!1;const{destinationParentId:r,destinationIndex:i}=this.state.nodes.drag;return n===r&&i===null}onFocus(){const e=this.focusedNode||this.firstNode;e&&this.dispatch(Xt(e.id))}onBlur(){this.dispatch(cS())}onItemsRendered(e){this.visibleStartIndex=e.visibleStartIndex,this.visibleStopIndex=e.visibleStopIndex}get renderContainer(){return this.props.renderContainer||qf}get renderRow(){return this.props.renderRow||oS}get renderNode(){return this.props.children||aS}get renderDragPreview(){return this.props.renderDragPreview||Tf}get renderCursor(){return this.props.renderCursor||iS}}function Ee(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var _$=typeof Symbol=="function"&&Symbol.observable||"@@observable",ru=_$,So=()=>Math.random().toString(36).substring(7).split("").join("."),k$={INIT:`@@redux/INIT${So()}`,REPLACE:`@@redux/REPLACE${So()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${So()}`},Pt=k$;function Xf(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function N$(t){if(t===void 0)return"undefined";if(t===null)return"null";const e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(A$(t))return"date";if(M$(t))return"error";const n=R$(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"")}function R$(t){return typeof t.constructor=="function"?t.constructor.name:null}function M$(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function A$(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function ct(t){let e=typeof t;return process.env.NODE_ENV!=="production"&&(e=N$(t)),e}function Jf(t,e,n){if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(2):`Expected the root reducer to be a function. Instead, received: '${ct(t)}'`);if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Ee(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(1):`Expected the enhancer to be a function. Instead, received: '${ct(n)}'`);return n(Jf)(t,e)}let r=t,i=e,o=new Map,a=o,s=0,l=!1;function u(){a===o&&(a=new Map,o.forEach((v,m)=>{a.set(m,v)}))}function c(){if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function p(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(4):`Expected the listener to be a function. Instead, received: '${ct(v)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let m=!0;u();const S=s++;return a.set(S,v),function(){if(m){if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");m=!1,u(),a.delete(S),o=null}}}function g(v){if(!Xf(v))throw new Error(process.env.NODE_ENV==="production"?Ee(7):`Actions must be plain objects. Instead, the actual type was: '${ct(v)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof v.type>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof v.type!="string")throw new Error(process.env.NODE_ENV==="production"?Ee(17):`Action "type" property must be a string. Instead, the actual type was: '${ct(v.type)}'. Value was: '${v.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(9):"Reducers may not dispatch actions.");try{l=!0,i=r(i,v)}finally{l=!1}return(o=a).forEach(S=>{S()}),v}function h(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(10):`Expected the nextReducer to be a function. Instead, received: '${ct(v)}`);r=v,g({type:Pt.REPLACE})}function y(){const v=p;return{subscribe(m){if(typeof m!="object"||m===null)throw new Error(process.env.NODE_ENV==="production"?Ee(11):`Expected the observer to be an object. Instead, received: '${ct(m)}'`);function S(){const O=m;O.next&&O.next(c())}return S(),{unsubscribe:v(S)}},[ru](){return this}}}return g({type:Pt.INIT}),{dispatch:g,subscribe:p,getState:c,replaceReducer:h,[ru]:y}}function iu(t){typeof console<"u"&&typeof console.error=="function"&&console.error(t);try{throw new Error(t)}catch{}}function K$(t,e,n,r){const i=Object.keys(e),o=n&&n.type===Pt.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Xf(t))return`The ${o} has unexpected type of "${ct(t)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const a=Object.keys(t).filter(s=>!e.hasOwnProperty(s)&&!r[s]);if(a.forEach(s=>{r[s]=!0}),!(n&&n.type===Pt.REPLACE)&&a.length>0)return`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function L$(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:Pt.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(12):`The slice reducer for key "${e}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:Pt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(13):`The slice reducer for key "${e}" returned undefined when probed with a random type. Don't try to handle '${Pt.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function ou(t){const e=Object.keys(t),n={};for(let a=0;a<e.length;a++){const s=e[a];process.env.NODE_ENV!=="production"&&typeof t[s]>"u"&&iu(`No reducer provided for key "${s}"`),typeof t[s]=="function"&&(n[s]=t[s])}const r=Object.keys(n);let i;process.env.NODE_ENV!=="production"&&(i={});let o;try{L$(n)}catch(a){o=a}return function(s={},l){if(o)throw o;if(process.env.NODE_ENV!=="production"){const p=K$(s,n,l,i);p&&iu(p)}let u=!1;const c={};for(let p=0;p<r.length;p++){const g=r[p],h=n[g],y=s[g],f=h(y,l);if(typeof f>"u"){const v=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?Ee(14):`When called with an action of type ${v?`"${String(v)}"`:"(unknown type)"}, the slice reducer for key "${g}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}c[g]=f,u=u||f!==y}return u=u||r.length!==Object.keys(s).length,u?c:s}}function F$(t=Sn().nodes.drag,e){switch(e.type){case"DND_DRAG_START":return Object.assign(Object.assign({},t),{id:e.id,selectedIds:e.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},t),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":return e.parentId!==t.destinationParentId||e.index!=t.destinationIndex?Object.assign(Object.assign({},t),{destinationParentId:e.parentId,destinationIndex:e.index}):t;default:return t}}const j$=ou({nodes:ou({focus:dS,edit:uS,open:fS,selection:hS,drag:F$}),dnd:pS}),z$=Sn();function H$({treeProps:t,imperativeHandle:e,children:n}){const r=d.useRef(null),i=d.useRef(null),o=d.useRef(Jf(j$,Sn(t))),a=da.useSyncExternalStore(o.current.subscribe,o.current.getState,()=>z$),s=d.useMemo(()=>new Wn(o.current,t,r,i),[]),l=d.useRef(0);return d.useMemo(()=>{l.current+=1,s.update(t)},[...Object.values(t),a.nodes.open]),d.useImperativeHandle(e,()=>s),d.useEffect(()=>{s.props.selection?s.select(s.props.selection,{focus:!1}):s.deselectAll()},[s.props.selection]),d.useEffect(()=>{s.props.searchTerm||o.current.dispatch(Yo.clear(!0))},[s.props.searchTerm]),T.jsx(lf.Provider,{value:s,children:T.jsx(df.Provider,{value:l.current,children:T.jsx(uf.Provider,{value:a.nodes,children:T.jsx(cf.Provider,{value:a.dnd,children:T.jsx(S0,Object.assign({backend:w$,options:{rootElement:s.props.dndRootElement||void 0}},t.dndManager&&{manager:t.dndManager},{children:n}))})})})})}function B$(){const t=Oe(),[,e]=Ff(()=>({accept:"NODE",canDrop:(n,r)=>r.isOver({shallow:!0})?t.canDrop():!1,hover:(n,r)=>{if(!r.isOver({shallow:!0}))return;const i=r.getClientOffset();if(!t.listEl.current||!i)return;const{cursor:o,drop:a}=Gf({element:t.listEl.current,offset:i,indent:t.indent,node:null,prevNode:t.visibleNodes[t.visibleNodes.length-1],nextNode:null});a&&t.dispatch(wn.hovering(a.parentId,a.index)),r.canDrop()?o&&t.showCursor(o):t.hideCursor()}}),[t]);e(t.listEl)}function W$(t){return B$(),t.children}function U$(){const e=Oe().props.renderContainer||qf;return T.jsx(T.Fragment,{children:T.jsx(e,{})})}function V$(){const t=Oe(),{offset:e,mouse:n,item:r,isDragging:i}=VE(a=>({offset:a.getSourceClientOffset(),mouse:a.getClientOffset(),item:a.getItem(),isDragging:a.isDragging()})),o=t.props.renderDragPreview||Tf;return T.jsx(o,{offset:e,mouse:n,id:(r==null?void 0:r.id)||null,dragIds:(r==null?void 0:r.dragIds)||[],isDragging:i})}class G${constructor(e){this.root=q$(e)}get data(){var e,n;return(n=(e=this.root.children)===null||e===void 0?void 0:e.map(r=>r.data))!==null&&n!==void 0?n:[]}create(e){const n=e.parentId?this.find(e.parentId):this.root;if(!n)return null;n.addChild(e.data,e.index)}move(e){const n=this.find(e.id),r=e.parentId?this.find(e.parentId):this.root;!n||!r||(r.addChild(n.data,e.index),n.drop())}update(e){const n=this.find(e.id);n&&n.update(e.changes)}drop(e){const n=this.find(e.id);n&&n.drop()}find(e,n=this.root){if(!n)return null;if(n.id===e)return n;if(n.children){for(let r of n.children){const i=this.find(e,r);if(i)return i}return null}return null}}function q$(t){const e=new Qf({id:"ROOT"},null);return e.children=t.map(n=>Ha(n,e)),e}function Ha(t,e){const n=new Qf(t,e);return t.children&&(n.children=t.children.map(r=>Ha(r,n))),n}class Qf{constructor(e,n){this.data=e,this.parent=n,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,n){var r,i;const o=Ha(e,this);this.children=(r=this.children)!==null&&r!==void 0?r:[],this.children.splice(n,0,o),this.data.children=(i=this.data.children)!==null&&i!==void 0?i:[],this.data.children.splice(n,0,e)}removeChild(e){var n,r;(n=this.children)===null||n===void 0||n.splice(e,1),(r=this.data.children)===null||r===void 0||r.splice(e,1)}update(e){if(this.hasParent()){const n=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),n),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}}let Y$=0;function X$(t){const[e,n]=d.useState(t),r=d.useMemo(()=>new G$(e),[e]);return[e,{onMove:u=>{for(const c of u.dragIds)r.move({id:c,parentId:u.parentId,index:u.index});n(r.data)},onRename:({name:u,id:c})=>{r.update({id:c,changes:{name:u}}),n(r.data)},onCreate:({parentId:u,index:c,type:p})=>{const g={id:`simple-tree-id-${Y$++}`,name:""};return p==="internal"&&(g.children=[]),r.create({parentId:u,index:c,data:g}),n(r.data),g},onDelete:u=>{u.ids.forEach(c=>r.drop({id:c})),n(r.data)}}]}function J$(t){if(t.initialData&&t.data)throw new Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(t.initialData&&(t.onCreate||t.onDelete||t.onMove||t.onRename))throw new Error(`React Arborist Tree => You passed the initialData prop along with a data handler.
101
- Use the data prop if you want to provide your own handlers.`);if(t.initialData){const[e,n]=X$(t.initialData);return Object.assign(Object.assign(Object.assign({},t),n),{data:e})}else return t}function Q$(t,e){const n=J$(t);return T.jsxs(H$,{treeProps:n,imperativeHandle:e,children:[T.jsx(W$,{children:T.jsx(U$,{})}),T.jsx(V$,{})]})}const Z$=d.forwardRef(Q$),Zf=({top:t,left:e})=>T.jsx("div",{className:"c__tree-view__cursor",style:{top:t,left:e+10}});function ex(t,e){var n=d.useRef(null),r=d.useRef(null);r.current=e;var i=d.useRef(null);d.useEffect(function(){o()});var o=d.useCallback(function(){var a=i.current,s=r.current,l=a||(s?s instanceof Element?s:s.current:null);n.current&&n.current.element===l&&n.current.subscriber===t||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:t,cleanup:l?t(l):void 0})},[t]);return d.useEffect(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),d.useCallback(function(a){i.current=a,o()},[o])}function au(t,e,n){return t[e]?t[e][0]?t[e][0][n]:t[e][n]:e==="contentBoxSize"?t.contentRect[n==="inlineSize"?"width":"height"]:void 0}function tx(t){t===void 0&&(t={});var e=t.onResize,n=d.useRef(void 0);n.current=e;var r=t.round||Math.round,i=d.useRef(),o=d.useState({width:void 0,height:void 0}),a=o[0],s=o[1],l=d.useRef(!1);d.useEffect(function(){return l.current=!1,function(){l.current=!0}},[]);var u=d.useRef({width:void 0,height:void 0}),c=ex(d.useCallback(function(p){return(!i.current||i.current.box!==t.box||i.current.round!==r)&&(i.current={box:t.box,round:r,instance:new ResizeObserver(function(g){var h=g[0],y=t.box==="border-box"?"borderBoxSize":t.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",f=au(h,y,"inlineSize"),v=au(h,y,"blockSize"),m=f?r(f):void 0,S=v?r(v):void 0;if(u.current.width!==m||u.current.height!==S){var w={width:m,height:S};u.current.width=m,u.current.height=S,n.current?n.current(w):l.current||s(w)}})}),i.current.instance.observe(p,{box:t.box}),function(){i.current&&i.current.instance.unobserve(p)}},[t.box,r]),t.ref);return d.useMemo(function(){return{ref:c,width:a.width,height:a.height}},[c,a.width,a.height])}var Ae=(t=>(t.NODE="node",t.SEPARATOR="separator",t.TITLE="title",t))(Ae||{}),Et=(t=>(t.FIRST_CHILD="first-child",t.LAST_CHILD="last-child",t.LEFT="left",t.RIGHT="right",t))(Et||{});const si=t=>t?t.type===Ae.SEPARATOR:!1,li=t=>t?t.type===Ae.TITLE:!1,zn=t=>!si(t)&&!li(t),nx=({treeData:t,initialOpenState:e,selectedNodeId:n,rootNodeId:r,renderNode:i,handleMove:o,canDrop:a,canDrag:s})=>{const{ref:l,width:u,height:c}=tx(),p=h=>{var I,z,M,j;const y=JSON.parse(JSON.stringify(t)),f=h.dragNodes[0],v=h.parentId?((I=h.parentNode)==null?void 0:I.data.children)??[]:y,m=h.dragNodes[0].data.value.id,S=h.dragNodes[0].data,w=(z=h.parentNode)==null?void 0:z.data;if((w==null?void 0:w.value.type)===Ae.TITLE||(w==null?void 0:w.value.type)===Ae.SEPARATOR)return null;const O=S.parentKey??r,x=h.parentId??r;let D=h.index+0,P=null,b=x;const k=((j=(M=f.parent)==null?void 0:M.children)==null?void 0:j.findIndex(_=>_.data.value.id===m))??0;if(O===x){if(k===D)return null;D=D<k?D:D-1}const B=h.index-1,N=v[B],H=h.index,E=v[H];return h.index===0?(b=h.parentId??r,P=Et.FIRST_CHILD):!w&&h.index===1&&!zn(N.value)?(b=r,D=1,P=Et.FIRST_CHILD):h.index===v.length?(b=b??r,P=Et.LAST_CHILD):N&&zn(N.value)?(b=N.value.id,P=Et.RIGHT):E&&zn(E.value)&&(P=Et.LEFT,b=E.value.id),P&&b?{targetModeId:b,mode:P,oldParentId:O,index:D,newParentId:h.parentId,sourceId:m}:null},g=h=>{const y=p(h);y&&(o==null||o(y))};return T.jsx("div",{ref:l,className:"c__tree-view--container",children:T.jsx(Z$,{data:t,openByDefault:!1,disableEdit:!0,className:"c__tree-view",idAccessor:"key",onMove:g,rowHeight:35,disableDrag:h=>s?!s(h):!1,disableDrop:({parentNode:h,dragNodes:y,index:f})=>{var w,O;if(a&&!a({parentNode:h,dragNodes:y,index:f}))return h.data.value.canDrop=!1,!0;if(((w=h.data.value)==null?void 0:w.type)===Ae.TITLE||((O=h.data.value)==null?void 0:O.type)===Ae.SEPARATOR)return!0;if(h.id==="__REACT_ARBORIST_INTERNAL_ROOT__"){const x=t[f-1],D=t[f],P=t[f+1],b=si(x==null?void 0:x.value),k=si(D==null?void 0:D.value),B=li(x==null?void 0:x.value),N=li(D==null?void 0:D.value),H=zn(P==null?void 0:P.value);return!!(f===0&&(k||N)||b&&N&&H||B&&k&&H)}const v=h==null?void 0:h.isOpen,m=(h==null?void 0:h.data.value.childrenCount)&&h.data.value.childrenCount>0||(h==null?void 0:h.data.children)&&h.data.children.length>0;if(!m)return h.data.value.canDrop=!0,!1;let S=h.data.value.childrenCount&&h.data.value.childrenCount>0&&(h==null?void 0:h.data.children)&&h.data.children.length>0;return S=S??!0,!v&&!S&&m?(h.data.value.canDrop=!0,!0):(h.data.value.canDrop=!0,!1)},paddingBottom:30,width:u,initialOpenState:e,height:c,overscanCount:20,selection:n,renderCursor:Zf,renderRow:h=>{const y=h.node.data.value.type===Ae.TITLE,f=h.node.data.value.type===Ae.SEPARATOR,{style:v}=h.attrs,m={...v};return y||f?T.jsx("div",{...h.attrs,style:m,ref:h.innerRef,onFocus:S=>S.stopPropagation(),onClick:h.node.handleClick,children:h.children}):T.jsx("div",{...h.attrs,style:m,ref:h.innerRef,onFocus:S=>S.stopPropagation(),onClick:h.node.handleClick,children:T.jsx("div",{style:{padding:"0 12px"},children:h.children})})},rowClassName:"c__tree-view--row",children:h=>i(h)})})},rx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ix(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function ox(t){return"nodeType"in t}function ax(t){var e,n;return t?ix(t)?t:ox(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}const eh=rx?d.useLayoutEffect:d.useEffect;function th(t){const e=d.useRef(t);return eh(()=>{e.current=t}),d.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function su(t,e){e===void 0&&(e=[t]);const n=d.useRef(t);return eh(()=>{n.current!==t&&(n.current=t)},e),n}function sx(t){const e=th(t),n=d.useRef(null),r=d.useCallback(i=>{i!==n.current&&(e==null||e(i,n.current)),n.current=i},[]);return[n,r]}let wo={};function lx(t,e){return d.useMemo(()=>{const n=wo[t]==null?0:wo[t]+1;return wo[t]=n,t+"-"+n},[t,e])}var Un;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(Un||(Un={}));function lu(){}const ux=Object.freeze({x:0,y:0});function cx(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function dx(t,e,n){const r=cx(e);if(!r)return t;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=t.left-a-(1-i)*parseFloat(n),u=t.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?t.width/i:t.width,p=o?t.height/o:t.height;return{width:c,height:p,top:u,right:l+c,bottom:u+p,left:l}}const fx={ignoreTransform:!1};function nh(t,e){e===void 0&&(e=fx);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:u,transformOrigin:c}=ax(t).getComputedStyle(t);u&&(n=dx(n,u,c))}const{top:r,left:i,width:o,height:a,bottom:s,right:l}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:l}}function uu(t){return nh(t,{ignoreTransform:!0})}var dn;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(dn||(dn={}));var cu;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(cu||(cu={}));var ft;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(ft||(ft={}));ft.Space,ft.Enter,ft.Esc,ft.Space,ft.Enter,ft.Tab;var du;(function(t){t[t.RightClick=2]="RightClick"})(du||(du={}));var fu;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(fu||(fu={}));var hu;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(hu||(hu={}));dn.Backward+"",dn.Forward+"",dn.Backward+"",dn.Forward+"";var ia;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(ia||(ia={}));var oa;(function(t){t.Optimized="optimized"})(oa||(oa={}));function hx(t){let{callback:e,disabled:n}=t;const r=th(e),i=d.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return d.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}ia.WhileDragging,oa.Optimized;const px={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:lu,draggableNodes:new Map,over:null,measureDroppableContainers:lu},gx=d.createContext(px);({...ux});var pu;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(pu||(pu={}));const vx="Droppable",mx={timeout:25};function yx(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:i}=t;const o=lx(vx),{active:a,dispatch:s,over:l,measureDroppableContainers:u}=d.useContext(gx),c=d.useRef({disabled:n}),p=d.useRef(!1),g=d.useRef(null),h=d.useRef(null),{disabled:y,updateMeasurementsFor:f,timeout:v}={...mx,...i},m=su(f??r),S=d.useCallback(()=>{if(!p.current){p.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(m.current)?m.current:[m.current]),h.current=null},v)},[v]),w=hx({callback:S,disabled:y||!a}),O=d.useCallback((b,k)=>{w&&(k&&(w.unobserve(k),p.current=!1),b&&w.observe(b))},[w]),[x,D]=sx(O),P=su(e);return d.useEffect(()=>{!w||!x.current||(w.disconnect(),p.current=!1,w.observe(x.current))},[x,w]),d.useEffect(()=>(s({type:Un.RegisterDroppable,element:{id:r,key:o,disabled:n,node:x,rect:g,data:P}}),()=>s({type:Un.UnregisterDroppable,key:o,id:r})),[r]),d.useEffect(()=>{n!==c.current.disabled&&(s({type:Un.SetDroppableDisabled,id:r,key:o,disabled:n}),c.current.disabled=n)},[r,o,n,s]),{active:a,rect:g,isOver:(l==null?void 0:l.id)===r,node:x,over:l,setNodeRef:D}}const bx=t=>{const{isOver:e,setNodeRef:n}=yx({id:t.id,data:t.data});return d.useEffect(()=>{var r;(r=t.onOver)==null||r.call(t,e,t.data)},[e,t.data,t.onOver]),T.jsx("div",{ref:n,children:t.children})},Sx=({children:t,onClick:e,node:n,dragHandle:r,style:i,loadChildren:o,forceLoading:a})=>{var w,O;const s=d.useRef(null),[l,u]=d.useState(!1),[c,p]=d.useState(!1),g=a??l,h=n.willReceiveDrop||c,y=n.data.value.childrenCount!==void 0&&n.data.value.childrenCount>0||(((w=n.data.children)==null?void 0:w.length)??0)>0,f=((O=n.children)==null?void 0:O.length)??!1,v=n.isLeaf||!y,m=d.useCallback(async()=>{if(!v){if(f||n.data.value.hasLoadedChildren){n.toggle();return}u(!0),await(o==null?void 0:o(n.data.value)),u(!1),n.open()}},[f,o,n,v]),S=d.useCallback(x=>{x&&!n.isOpen&&!n.isDragging&&(s.current=setTimeout(()=>{m()},500)),s.current&&!x&&clearTimeout(s.current)},[m,n.isOpen,n.isDragging]);return d.useEffect(()=>{S(h)},[h,S]),n.data.value.type===Ae.SEPARATOR?T.jsx("div",{className:"c__tree-view--node__separator"}):n.data.value.type===Ae.TITLE?T.jsx("div",{className:"c__tree-view--node__title",children:n.data.value.title}):T.jsx(bx,{id:n.id,data:{data:n.data,nodeApi:n},onOver:p,children:T.jsxs("div",{onClick:e,ref:r,style:i,className:jt("c__tree-view--node",{...n.state,canDrop:n.data.value.canDrop??!0,externalDrop:c}),children:[v&&T.jsx("div",{className:"c__tree-view--node__leaf"}),!v&&T.jsxs(T.Fragment,{children:[g&&T.jsx("div",{className:"c__tree-view--node__loading",children:T.jsx(Da,{})}),!g&&T.jsx("span",{onClick:x=>{x.stopPropagation(),m()},className:"c__tree-view--node__arrow material-icons",children:n.isOpen?"keyboard_arrow_down":"keyboard_arrow_right"})]}),t]})})},wx=(t,e,n)=>{const{remove:r,update:i,insert:o,insertBefore:a,insertAfter:s,append:l,prepend:u,getItem:c,move:p,items:g}=Cv({initialItems:JSON.parse(JSON.stringify(t)),getKey:M=>M.id,getChildren:M=>M.children||[]}),[h,y]=d.useState(),f=(M=[])=>{const j=g.map(V=>V.key);r(...j);const _=JSON.parse(JSON.stringify(M));_.length>0&&o(null,0,..._),y(void 0)},v=(M,j)=>{var _;if(M){const V=c(M);V&&(o(M,((_=V.children)==null?void 0:_.length)??0,j),N(M,j))}else o(null,g.length,j)},m=(M,j)=>{const _=c(M);if(!_){console.error("No item found");return}let V=_.value.children??null;j.children&&(V=[...V??[],...j.children]);const J={..._.value,...j,children:V,childrenCount:(V==null?void 0:V.length)??_.value.childrenCount};i(M,J)},S=M=>{const j=c(M),_=j==null?void 0:j.parentKey;_&&j&&B(_,j.value.id),r(M)},w=async M=>{if(!e){console.error("No refresh callback provided");return}try{const j=await e(M);m(M,j)}catch(j){console.error("error while refreshing node:",j)}},O=M=>{o(null,g.length,M)},x=(M,j)=>{const _=c(M);if(!_){console.error("No item found");return}const V={..._.value,children:j,childrenCount:j.length};i(M,V)},D=(M,j)=>{a(M,j)},P=(M,j)=>{s(M,j)},b=(M,j)=>{l(M,j)},k=(M,j)=>{u(M,j)},B=(M,j)=>{const _=c(M);if(!_)return;const J=(_.value.children??[]).filter(re=>re.id!==j);_.value.children=J,_.value.childrenCount=J.length},N=(M,j)=>{const _=c(M);if(!_)return;const J=[..._.value.children??[],j];_.value.children=J,_.value.childrenCount=J.length},H=M=>{const j=c(M);j&&y(j.value)},E=(M,j,_,V)=>{var re;const J=(re=c(M))==null?void 0:re.value;p(M,j,_),j&&J&&N(j,J),V&&B(V,M)};return{nodes:g,addChild:v,updateNode:m,deleteNode:S,addRootNode:O,selectedNode:h,setSelectedNode:y,refreshNode:w,setChildren:x,insertBeforeNode:D,insertAfterNode:P,handleMove:M=>{E(M.sourceId,M.newParentId,M.index,M.oldParentId)},prependToNode:k,moveNode:E,appendToNode:b,move:p,resetTree:f,handleLoadChildren:async M=>{if(!n)return[];const j=await n(M);return m(M,{children:j,hasLoadedChildren:!0,childrenCount:j.length}),j},selectNodeById:H}};exports.CunninghamProvider=ph;exports.CustomTabs=Gb;exports.DropdownMenu=Qc;exports.Header=td;exports.HorizontalSeparator=qo;exports.Label=Cd;exports.LanguagePicker=ed;exports.LeftPanel=nd;exports.MainLayout=Am;exports.ProConnectButton=gh;exports.QuickSearch=Wb;exports.QuickSearchGroup=Ub;exports.QuickSearchInput=sf;exports.QuickSearchItem=Rr;exports.QuickSearchItemTemplate=Vb;exports.Spinner=Da;exports.TreeView=nx;exports.TreeViewItem=Sx;exports.TreeViewMoveModeEnum=Et;exports.TreeViewNodeTypeEnum=Ae;exports.TreeViewSeparator=Zf;exports.WithLabel=Lm;exports.cunninghamConfig=jo;exports.getLocales=vu;exports.headerHeight=Km;exports.isNode=zn;exports.isSeparator=si;exports.isTitle=li;exports.useDropdownMenu=Zc;exports.useResponsive=vi;exports.useTree=wx;
100
+ `)},dataTransfer:function(e){return e}},matchesTypes:["Url","text/uri-list"]}),Pr(en,Uf,{exposeProperties:{text:function(e,n){return po(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Text","text/plain"]}),en);function s$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u$(t,e,n){return l$(t.prototype,e),t}function Jl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c$=function(){function t(e){s$(this,t),Jl(this,"item",void 0),Jl(this,"config",void 0),this.config=e,this.item={},this.initializeExposedProperties()}return u$(t,[{key:"initializeExposedProperties",value:function(){var n=this;Object.keys(this.config.exposeProperties).forEach(function(r){Object.defineProperty(n.item,r,{configurable:!0,enumerable:!0,get:function(){return console.warn(`Browser doesn't allow reading "`.concat(r,'" until the drop event.')),null}})})}},{key:"loadDataTransfer",value:function(n){var r=this;if(n){var i={};Object.keys(this.config.exposeProperties).forEach(function(o){i[o]={value:r.config.exposeProperties[o](n,r.config.matchesTypes),configurable:!0,enumerable:!0}}),Object.defineProperties(this.item,i)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(n,r){return r===n.getSourceId()}},{key:"endDrag",value:function(){}}]),t}();function d$(t,e){var n=new c$(ra[t]);return n.loadDataTransfer(e),n}function go(t){if(!t)return null;var e=Array.prototype.slice.call(t.types||[]);return Object.keys(ra).filter(function(n){var r=ra[n].matchesTypes;return r.some(function(i){return e.indexOf(i)>-1})})[0]||null}function f$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p$(t,e,n){return h$(t.prototype,e),t}function vo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g$=function(){function t(e,n){f$(this,t),vo(this,"ownerDocument",null),vo(this,"globalContext",void 0),vo(this,"optionsArgs",void 0),this.globalContext=e,this.optionsArgs=n}return p$(t,[{key:"window",get:function(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}},{key:"document",get:function(){var n;return(n=this.globalContext)!==null&&n!==void 0&&n.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var n;return((n=this.optionsArgs)===null||n===void 0?void 0:n.rootElement)||this.window}}]),t}();function Ql(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ql(Object(n),!0).forEach(function(r){ne(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ql(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function v$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y$(t,e,n){return m$(t.prototype,e),t}function ne(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b$=function(){function t(e,n,r){var i=this;v$(this,t),ne(this,"options",void 0),ne(this,"actions",void 0),ne(this,"monitor",void 0),ne(this,"registry",void 0),ne(this,"enterLeaveCounter",void 0),ne(this,"sourcePreviewNodes",new Map),ne(this,"sourcePreviewNodeOptions",new Map),ne(this,"sourceNodes",new Map),ne(this,"sourceNodeOptions",new Map),ne(this,"dragStartSourceIds",null),ne(this,"dropTargetIds",[]),ne(this,"dragEnterTargetIds",[]),ne(this,"currentNativeSource",null),ne(this,"currentNativeHandle",null),ne(this,"currentDragSourceNode",null),ne(this,"altKeyPressed",!1),ne(this,"mouseMoveTimeoutTimer",null),ne(this,"asyncEndDragFrameId",null),ne(this,"dragOverTargetIds",null),ne(this,"lastClientOffset",null),ne(this,"hoverRafId",null),ne(this,"getSourceClientOffset",function(o){var a=i.sourceNodes.get(o);return a&&Hf(a)||null}),ne(this,"endDragNativeItem",function(){i.isDraggingNativeItem()&&(i.actions.endDrag(),i.currentNativeHandle&&i.registry.removeSource(i.currentNativeHandle),i.currentNativeHandle=null,i.currentNativeSource=null)}),ne(this,"isNodeInDocument",function(o){return!!(o&&i.document&&i.document.body&&i.document.body.contains(o))}),ne(this,"endDragIfSourceWasRemovedFromDOM",function(){var o=i.currentDragSourceNode;o==null||i.isNodeInDocument(o)||i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleTopDragStartCapture",function(){i.clearCurrentDragSourceNode(),i.dragStartSourceIds=[]}),ne(this,"handleTopDragStart",function(o){if(!o.defaultPrevented){var a=i.dragStartSourceIds;i.dragStartSourceIds=null;var s=Dr(o);i.monitor.isDragging()&&i.actions.endDrag(),i.actions.beginDrag(a||[],{publishSource:!1,getSourceClientOffset:i.getSourceClientOffset,clientOffset:s});var l=o.dataTransfer,u=go(l);if(i.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){var c=i.monitor.getSourceId(),p=i.sourceNodes.get(c),g=i.sourcePreviewNodes.get(c)||p;if(g){var h=i.getCurrentSourcePreviewNodeOptions(),y=h.anchorX,f=h.anchorY,v=h.offsetX,m=h.offsetY,S={anchorX:y,anchorY:f},w={offsetX:v,offsetY:m},O=a$(p,g,s,S,w);l.setDragImage(g,O.x,O.y)}}try{l==null||l.setData("application/json",{})}catch{}i.setCurrentDragSourceNode(o.target);var x=i.getCurrentSourcePreviewNodeOptions(),D=x.captureDraggingState;D?i.actions.publishDragSource():setTimeout(function(){return i.actions.publishDragSource()},0)}else if(u)i.beginDragNativeItem(u);else{if(l&&!l.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}}}),ne(this,"handleTopDragEndCapture",function(){i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleTopDragEnterCapture",function(o){i.dragEnterTargetIds=[];var a=i.enterLeaveCounter.enter(o.target);if(!(!a||i.monitor.isDragging())){var s=o.dataTransfer,l=go(s);l&&i.beginDragNativeItem(l,s)}}),ne(this,"handleTopDragEnter",function(o){var a=i.dragEnterTargetIds;if(i.dragEnterTargetIds=[],!!i.monitor.isDragging()){i.altKeyPressed=o.altKey,a.length>0&&i.actions.hover(a,{clientOffset:Dr(o)});var s=a.some(function(l){return i.monitor.canDropOnTarget(l)});s&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect()))}}),ne(this,"handleTopDragOverCapture",function(){i.dragOverTargetIds=[]}),ne(this,"handleTopDragOver",function(o){var a=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}i.altKeyPressed=o.altKey,i.lastClientOffset=Dr(o),i.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(i.hoverRafId=requestAnimationFrame(function(){i.monitor.isDragging()&&i.actions.hover(a||[],{clientOffset:i.lastClientOffset}),i.hoverRafId=null}));var s=(a||[]).some(function(l){return i.monitor.canDropOnTarget(l)});s?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect())):i.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))}),ne(this,"handleTopDragLeaveCapture",function(o){i.isDraggingNativeItem()&&o.preventDefault();var a=i.enterLeaveCounter.leave(o.target);a&&i.isDraggingNativeItem()&&setTimeout(function(){return i.endDragNativeItem()},0)}),ne(this,"handleTopDropCapture",function(o){if(i.dropTargetIds=[],i.isDraggingNativeItem()){var a;o.preventDefault(),(a=i.currentNativeSource)===null||a===void 0||a.loadDataTransfer(o.dataTransfer)}else go(o.dataTransfer)&&o.preventDefault();i.enterLeaveCounter.reset()}),ne(this,"handleTopDrop",function(o){var a=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(a,{clientOffset:Dr(o)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleSelectStart",function(o){var a=o.target;typeof a.dragDrop=="function"&&(a.tagName==="INPUT"||a.tagName==="SELECT"||a.tagName==="TEXTAREA"||a.isContentEditable||(o.preventDefault(),a.dragDrop()))}),this.options=new g$(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new QE(this.isNodeInDocument)}return y$(t,[{key:"profile",value:function(){var n,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((n=this.dragStartSourceIds)===null||n===void 0?void 0:n.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var n=this.rootElement;if(n!==void 0){if(n.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");n.__isReactDndBackendSetUp=!0,this.addEventListeners(n)}}},{key:"teardown",value:function(){var n=this.rootElement;if(n!==void 0&&(n.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}},{key:"connectDragPreview",value:function(n,r,i){var o=this;return this.sourcePreviewNodeOptions.set(n,i),this.sourcePreviewNodes.set(n,r),function(){o.sourcePreviewNodes.delete(n),o.sourcePreviewNodeOptions.delete(n)}}},{key:"connectDragSource",value:function(n,r,i){var o=this;this.sourceNodes.set(n,r),this.sourceNodeOptions.set(n,i);var a=function(u){return o.handleDragStart(u,n)},s=function(u){return o.handleSelectStart(u)};return r.setAttribute("draggable","true"),r.addEventListener("dragstart",a),r.addEventListener("selectstart",s),function(){o.sourceNodes.delete(n),o.sourceNodeOptions.delete(n),r.removeEventListener("dragstart",a),r.removeEventListener("selectstart",s),r.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(n,r){var i=this,o=function(u){return i.handleDragEnter(u,n)},a=function(u){return i.handleDragOver(u,n)},s=function(u){return i.handleDrop(u,n)};return r.addEventListener("dragenter",o),r.addEventListener("dragover",a),r.addEventListener("drop",s),function(){r.removeEventListener("dragenter",o),r.removeEventListener("dragover",a),r.removeEventListener("drop",s)}}},{key:"addEventListeners",value:function(n){n.addEventListener&&(n.addEventListener("dragstart",this.handleTopDragStart),n.addEventListener("dragstart",this.handleTopDragStartCapture,!0),n.addEventListener("dragend",this.handleTopDragEndCapture,!0),n.addEventListener("dragenter",this.handleTopDragEnter),n.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.addEventListener("dragover",this.handleTopDragOver),n.addEventListener("dragover",this.handleTopDragOverCapture,!0),n.addEventListener("drop",this.handleTopDrop),n.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(n){n.removeEventListener&&(n.removeEventListener("dragstart",this.handleTopDragStart),n.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),n.removeEventListener("dragend",this.handleTopDragEndCapture,!0),n.removeEventListener("dragenter",this.handleTopDragEnter),n.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.removeEventListener("dragover",this.handleTopDragOver),n.removeEventListener("dragover",this.handleTopDragOverCapture,!0),n.removeEventListener("drop",this.handleTopDrop),n.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(n);return Zl({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(n);return Zl({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}},{key:"isDraggingNativeItem",value:function(){var n=this.monitor.getItemType();return Object.keys(Xl).some(function(r){return Xl[r]===n})}},{key:"beginDragNativeItem",value:function(n,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=d$(n,r),this.currentNativeHandle=this.registry.addSource(n,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(n){var r=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=n;var i=1e3;this.mouseMoveTimeoutTimer=setTimeout(function(){var o;return(o=r.rootElement)===null||o===void 0?void 0:o.addEventListener("mousemove",r.endDragIfSourceWasRemovedFromDOM,!0)},i)}},{key:"clearCurrentDragSourceNode",value:function(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var n;(n=this.window)===null||n===void 0||n.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}},{key:"handleDragStart",value:function(n,r){n.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}},{key:"handleDragEnter",value:function(n,r){this.dragEnterTargetIds.unshift(r)}},{key:"handleDragOver",value:function(n,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}},{key:"handleDrop",value:function(n,r){this.dropTargetIds.unshift(r)}}]),t}(),Or;function S$(){return Or||(Or=new Image,Or.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Or}var w$=function(e,n,r){return new b$(e,n,r)};function E$(t){const e=Oe(),n=e.selectedIds,[r,i,o]=CE(()=>({canDrag:()=>t.isDraggable,type:"NODE",item:()=>{const a=e.isSelected(t.id)?Array.from(n):[t.id];return e.dispatch(wn.dragStart(t.id,a)),{id:t.id,dragIds:a}},end:()=>{e.hideCursor(),e.dispatch(wn.dragEnd())}}),[n,t]);return d.useEffect(()=>{o(S$())},[o]),i}function $$(t,e){const n=t.getBoundingClientRect(),r=e.x-Math.round(n.x),i=e.y-Math.round(n.y),o=n.height,a=i<o/2,s=!a,l=o/4,u=i>l&&i<o-l;return{x:r,inTopHalf:a,inBottomHalf:s,inMiddle:u,atTop:!u&&a,atBottom:!u&&s}}function x$(t,e,n,r){return t?t.isInternal?r.atTop?[e,t]:r.inMiddle?[t,t]:[t,n]:r.inTopHalf?[e,t]:[t,n]:[e,null]}function Ir(t,e){return{parentId:t||null,index:e}}function tn(t,e){return{type:"line",index:t,level:e}}function C$(t){return{type:"highlight",id:t}}function mo(t,e){var n;let r=t;for(;r.parent&&r.level>e;)r=r.parent;const i=((n=r.parent)===null||n===void 0?void 0:n.id)||null,o=mf(r)+1;return{parentId:i,index:o}}function Gf(t){var e;const n=$$(t.element,t.offset),r=t.indent,i=Math.round(Math.max(0,n.x-r)/r),{node:o,nextNode:a,prevNode:s}=t,[l,u]=x$(o,s,a,n);if(o&&o.isInternal&&n.inMiddle)return{drop:Ir(o.id,null),cursor:C$(o.id)};if(!l)return{drop:Ir((e=u==null?void 0:u.parent)===null||e===void 0?void 0:e.id,0),cursor:tn(0,0)};if(hf(l)){const c=Mr(i,(u==null?void 0:u.level)||0,l.level);return{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}if(pf(l)){const c=Mr(i,(u==null?void 0:u.level)||0,l.level);return{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}if(gf(l)){const c=Mr(i,0,l.level+1);return c>l.level?{drop:Ir(l.id,0),cursor:tn(l.rowIndex+1,c)}:{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}return{drop:Ir(l==null?void 0:l.id,0),cursor:tn(l.rowIndex+1,l.level+1)}}function T$(t,e){const n=Oe(),[r,i]=Ff(()=>({accept:"NODE",canDrop:()=>n.canDrop(),hover:(o,a)=>{const s=a.getClientOffset();if(!t.current||!s)return;const{cursor:l,drop:u}=Gf({element:t.current,offset:s,indent:n.indent,node:e,prevNode:e.prev,nextNode:e.next});u&&n.dispatch(wn.hovering(u.parentId,u.index)),a.canDrop()?l&&n.showCursor(l):n.hideCursor()},drop:(o,a)=>{if(!a.canDrop())return null;let{parentId:s,index:l,dragIds:u}=n.state.dnd;Ef(n.props.onMove,{dragIds:u,parentId:s===er?null:s,index:l===null?0:l,dragNodes:n.dragNodes,parentNode:n.get(s)}),n.open(s)}}),[e,t.current,n.props]);return i}function D$(t){const e=Oe(),n=e.at(t);if(!n)throw new Error(`Could not find node for index: ${t}`);return d.useMemo(()=>{const r=n.clone();return e.visibleNodes[t]=r,r},[...Object.values(n.state),n])}const P$=d.memo(function({index:e,style:n}){ff(),qb();const r=Oe(),i=D$(e),o=d.useRef(null),a=E$(i),s=T$(o,i),l=d.useCallback(f=>{o.current=f,s(f)},[s]),u=r.indent*i.level,c=d.useMemo(()=>({paddingLeft:u}),[u]),p=d.useMemo(()=>{var f,v;return Object.assign(Object.assign({},n),{top:parseFloat(n.top)+((v=(f=r.props.padding)!==null&&f!==void 0?f:r.props.paddingTop)!==null&&v!==void 0?v:0)})},[n,r.props.padding,r.props.paddingTop]),g={role:"treeitem","aria-level":i.level+1,"aria-selected":i.isSelected,"aria-expanded":i.isOpen,style:p,tabIndex:-1,className:r.props.rowClassName};d.useEffect(()=>{var f;!i.isEditing&&i.isFocused&&((f=o.current)===null||f===void 0||f.focus({preventScroll:!0}))},[i.isEditing,i.isFocused,o.current]);const h=r.renderNode,y=r.renderRow;return T.jsx(y,{node:i,innerRef:l,attrs:g,children:T.jsx(h,{node:i,tree:r,style:c,dragHandle:a})})});let yo="",eu=null;function qf(){ff();const t=Oe();return T.jsx("div",{role:"tree",style:{height:t.height,width:t.width,minHeight:0,minWidth:0},onContextMenu:t.props.onContextMenu,onClick:t.props.onClick,tabIndex:0,onFocus:e=>{e.currentTarget.contains(e.relatedTarget)||t.onFocus()},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||t.onBlur()},onKeyDown:e=>{var n;if(t.isEditing)return;if(e.key==="Backspace"){if(!t.props.onDelete)return;const i=Array.from(t.selectedIds);if(i.length>1){let o=t.mostRecentNode;for(;o&&o.isSelected;)o=o.nextSibling;o||(o=t.lastNode),t.focus(o,{scroll:!1}),t.delete(Array.from(i))}else{const o=t.focusedNode;if(o){const a=o.nextSibling,s=o.parent;t.focus(a||s,{scroll:!1}),t.delete(o)}}return}if(e.key==="Tab"&&!e.shiftKey){e.preventDefault(),yf(e.currentTarget);return}if(e.key==="Tab"&&e.shiftKey){e.preventDefault(),bf(e.currentTarget);return}if(e.key==="ArrowDown"){e.preventDefault();const i=t.nextNode;if(e.metaKey){t.select(t.focusedNode),t.activate(t.focusedNode);return}else if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const o=t.focusedNode;o?o.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.firstNode);return}}if(e.key==="ArrowUp"){e.preventDefault();const i=t.prevNode;if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const o=t.focusedNode;o?o.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.lastNode);return}}if(e.key==="ArrowRight"){const i=t.focusedNode;if(!i)return;i.isInternal&&i.isOpen?t.focus(t.nextNode):i.isInternal&&t.open(i.id);return}if(e.key==="ArrowLeft"){const i=t.focusedNode;if(!i||i.isRoot)return;i.isInternal&&i.isOpen?t.close(i.id):!((n=i.parent)===null||n===void 0)&&n.isRoot||t.focus(i.parent);return}if(e.key==="a"&&e.metaKey&&!t.props.disableMultiSelection){e.preventDefault(),t.selectAll();return}if(e.key==="a"&&!e.metaKey&&t.props.onCreate){t.createLeaf();return}if(e.key==="A"&&!e.metaKey){if(!t.props.onCreate)return;t.createInternal();return}if(e.key==="Home"){e.preventDefault(),t.focus(t.firstNode);return}if(e.key==="End"){e.preventDefault(),t.focus(t.lastNode);return}if(e.key==="Enter"){const i=t.focusedNode;if(!i||!i.isEditable||!t.props.onRename)return;setTimeout(()=>{i&&t.edit(i)});return}if(e.key===" "){e.preventDefault();const i=t.focusedNode;if(!i)return;i.isLeaf?(i.select(),i.activate()):i.toggle();return}if(e.key==="*"){const i=t.focusedNode;if(!i)return;t.openSiblings(i);return}if(e.key==="PageUp"){e.preventDefault(),t.pageUp();return}e.key==="PageDown"&&(e.preventDefault(),t.pageDown()),clearTimeout(eu),yo+=e.key,eu=setTimeout(()=>{yo=""},600);const r=t.visibleNodes.find(i=>{const o=i.data.name;return typeof o=="string"?o.toLowerCase().startsWith(yo):!1});r&&t.focus(r.id)},children:T.jsx(_S,{className:t.props.className,outerRef:t.listEl,itemCount:t.visibleNodes.length,height:t.height,width:t.width,itemSize:t.rowHeight,overscanCount:t.overscanCount,itemKey:e=>{var n;return((n=t.visibleNodes[e])===null||n===void 0?void 0:n.id)||e},outerElementType:RS,innerElementType:KS,onScroll:t.props.onScroll,onItemsRendered:t.onItemsRendered.bind(t),ref:t.list,children:P$})})}function tu(t){return t.isFiltered?I$(t.root,t.isMatch.bind(t)):O$(t.root)}function O$(t){const e=[];function n(r){var i;r.level>=0&&e.push(r),r.isOpen&&((i=r.children)===null||i===void 0||i.forEach(n))}return n(t),e.forEach(Yf),e}function I$(t,e){const n={},r=[];function i(a){if(!a.isRoot&&e(a)){n[a.id]=!0;let l=a.parent;for(;l;)n[l.id]=!0,l=l.parent}if(a.children)for(let l of a.children)i(l)}function o(a){var s;a.level>=0&&n[a.id]&&r.push(a),a.isOpen&&((s=a.children)===null||s===void 0||s.forEach(o))}return i(t),o(t),r.forEach(Yf),r}function Yf(t,e){t.rowIndex=e}const nu=t=>t.reduce((e,n,r)=>(e[n.id]=r,e),{});var bo=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(p){a(p)}}function l(c){try{u(r.throw(c))}catch(p){a(p)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(t,e||[])).next())})};const{safeRun:he,identify:et,identifyNull:je}=eS;class Wn{constructor(e,n,r,i){this.store=e,this.props=n,this.list=r,this.listEl=i,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=fl(this),this.visibleNodes=tu(this),this.idToIndex=nu(this.visibleNodes)}update(e){this.props=e,this.root=fl(this),this.visibleNodes=tu(this),this.idToIndex=nu(this.visibleNodes)}dispatch(e){return this.store.dispatch(e)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){var e;return(e=this.props.width)!==null&&e!==void 0?e:300}get height(){var e;return(e=this.props.height)!==null&&e!==void 0?e:500}get indent(){var e;return(e=this.props.indent)!==null&&e!==void 0?e:24}get rowHeight(){var e;return(e=this.props.rowHeight)!==null&&e!==void 0?e:24}get overscanCount(){var e;return(e=this.props.overscanCount)!==null&&e!==void 0?e:1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){var e;const n=(e=this.props.searchMatch)!==null&&e!==void 0?e:(r,i)=>JSON.stringify(Object.values(r.data)).toLocaleLowerCase().includes(i.toLocaleLowerCase());return r=>n(r,this.searchTerm)}accessChildren(e){var n;const r=this.props.childrenAccessor||"children";return(n=jn(e,r))!==null&&n!==void 0?n:null}accessId(e){const n=this.props.idAccessor||"id",r=jn(e,n);if(!r)throw new Error("Data must contain an 'id' property or props.idAccessor must return a string");return r}get firstNode(){var e;return(e=this.visibleNodes[0])!==null&&e!==void 0?e:null}get lastNode(){var e;return(e=this.visibleNodes[this.visibleNodes.length-1])!==null&&e!==void 0?e:null}get focusedNode(){var e;return(e=this.get(this.state.nodes.focus.id))!==null&&e!==void 0?e:null}get mostRecentNode(){var e;return(e=this.get(this.state.nodes.selection.mostRecent))!==null&&e!==void 0?e:null}get nextNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e+1)}get prevNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e-1)}get(e){return e&&e in this.idToIndex&&this.visibleNodes[this.idToIndex[e]]||null}at(e){return this.visibleNodes[e]||null}nodesBetween(e,n){var r;if(e===null||n===null)return[];const i=(r=this.indexOf(e))!==null&&r!==void 0?r:0,o=this.indexOf(n);if(o===null)return[];const a=Math.min(i,o),s=Math.max(i,o);return this.visibleNodes.slice(a,s+1)}indexOf(e){const n=wf(e);return n?this.idToIndex[n]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(){return bo(this,arguments,void 0,function*(e={}){var n,r;const i=e.parentId===void 0?Cf(this):e.parentId,o=(n=e.index)!==null&&n!==void 0?n:xf(this),a=(r=e.type)!==null&&r!==void 0?r:"leaf",s=yield he(this.props.onCreate,{type:a,parentId:i,index:o,parentNode:this.get(i)});s&&(this.focus(s),setTimeout(()=>{this.edit(s).then(()=>{this.select(s),this.activate(s)})}))})}delete(e){return bo(this,void 0,void 0,function*(){if(!e)return;const r=(Array.isArray(e)?e:[e]).map(et),i=r.map(o=>this.get(o)).filter(o=>!!o);yield he(this.props.onDelete,{nodes:i,ids:r})})}edit(e){const n=et(e);return this.resolveEdit({cancelled:!0}),this.scrollTo(n),this.dispatch(io(n)),new Promise(r=>{Wn.editPromise=r})}submit(e,n){return bo(this,void 0,void 0,function*(){if(!e)return;const r=et(e);yield he(this.props.onRename,{id:r,name:n,node:this.get(r)}),this.dispatch(io(null)),this.resolveEdit({cancelled:!1,value:n}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(io(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(e){const n=this.get(je(e));n&&he(this.props.onActivate,n)}resolveEdit(e){const n=Wn.editPromise;n&&n(e),Wn.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let e=[];for(let n of Array.from(this.selectedIds)){const r=this.get(n);r&&e.push(r)}return e}focus(e,n={}){e&&(this.props.selectionFollowsFocus?this.select(e):(this.dispatch(Xt(et(e))),n.scroll!==!1&&this.scrollTo(e),this.focusedNode&&he(this.props.onFocus,this.focusedNode)))}pageUp(){var e,n;const r=this.visibleStartIndex,o=this.visibleStopIndex-r;let a=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;a>r?a=r:a=Math.max(r-o,0),this.focus(this.at(a))}pageDown(){var e,n;const r=this.visibleStartIndex,i=this.visibleStopIndex,o=i-r;let a=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;a<i?a=i:a=Math.min(a+o,this.visibleNodes.length-1),this.focus(this.at(a))}select(e,n={}){if(!e)return;const r=n.focus!==!1,i=et(e);r&&this.dispatch(Xt(i)),this.dispatch(Fe.only(i)),this.dispatch(Fe.anchor(i)),this.dispatch(Fe.mostRecent(i)),this.scrollTo(i,n.align),this.focusedNode&&r&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}deselect(e){if(!e)return;const n=et(e);this.dispatch(Fe.remove(n)),he(this.props.onSelect,this.selectedNodes)}selectMulti(e){const n=this.get(je(e));n&&(this.dispatch(Xt(n.id)),this.dispatch(Fe.add(n.id)),this.dispatch(Fe.anchor(n.id)),this.dispatch(Fe.mostRecent(n.id)),this.scrollTo(n),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes))}selectContiguous(e){if(!e)return;const n=et(e),{anchor:r,mostRecent:i}=this.state.nodes.selection;this.dispatch(Xt(n)),this.dispatch(Fe.remove(this.nodesBetween(r,i))),this.dispatch(Fe.add(this.nodesBetween(r,je(n)))),this.dispatch(Fe.mostRecent(n)),this.scrollTo(n),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),he(this.props.onSelect,this.selectedNodes)}selectAll(){var e;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(Xt((e=this.lastNode)===null||e===void 0?void 0:e.id)),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}setSelection(e){var n;const r=new Set((n=e.ids)===null||n===void 0?void 0:n.map(et)),i=je(e.anchor),o=je(e.mostRecent);this.dispatch(Fe.set({ids:r,anchor:i,mostRecent:o})),he(this.props.onSelect,this.selectedNodes)}get cursorParentId(){const{cursor:e}=this.state.dnd;switch(e.type){case"highlight":return e.id;default:return null}}get cursorOverFolder(){return this.state.dnd.cursor.type==="highlight"}get dragNodes(){return this.state.dnd.dragIds.map(e=>this.get(e)).filter(e=>!!e)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){var e;if(this.isFiltered)return!1;const n=(e=this.get(this.state.dnd.parentId))!==null&&e!==void 0?e:this.root,r=this.dragNodes,i=this.props.disableDrop;for(const o of r)if(!o||!n||o.isInternal&&vf(n,o))return!1;return typeof i=="function"?!i({parentNode:n,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):typeof i=="string"?!n.data[i]:typeof i=="boolean"?!i:!0}hideCursor(){this.dispatch(wn.cursor({type:"none"}))}showCursor(e){this.dispatch(wn.cursor(e))}open(e){const n=je(e);n&&(this.isOpen(n)||(this.dispatch(Yo.open(n,this.isFiltered)),he(this.props.onToggle,n)))}close(e){const n=je(e);n&&this.isOpen(n)&&(this.dispatch(Yo.close(n,this.isFiltered)),he(this.props.onToggle,n))}toggle(e){const n=je(e);if(n)return this.isOpen(n)?this.close(n):this.open(n)}openParents(e){const n=je(e);if(!n)return;const r=Ma(this.root,n);let i=r==null?void 0:r.parent;for(;i;)this.open(i.id),i=i.parent}openSiblings(e){const n=e.parent;if(!n)this.toggle(e.id);else if(n.children){const r=e.isOpen;for(let i of n.children)i.isInternal&&(r?this.close(i.id):this.open(i.id));this.scrollTo(this.focusedNode)}}openAll(){ii(this.root,e=>{e.isInternal&&e.open()})}closeAll(){ii(this.root,e=>{e.isInternal&&e.close()})}scrollTo(e,n="smart"){if(!e)return;const r=et(e);return this.openParents(r),$f(()=>r in this.idToIndex).then(()=>{var i;const o=this.idToIndex[r];o!==void 0&&((i=this.list.current)===null||i===void 0||i.scrollToItem(o,n))}).catch(()=>{})}get isEditing(){return this.state.nodes.edit.id!==null}get isFiltered(){var e;return!!(!((e=this.props.searchTerm)===null||e===void 0)&&e.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return this.state.nodes.selection.ids.size===0}get hasOneSelection(){return this.state.nodes.selection.ids.size===1}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(e){return e?this.state.nodes.selection.ids.has(e):!1}isOpen(e){var n,r,i;if(!e)return!1;if(e===er)return!0;const o=(n=this.props.openByDefault)!==null&&n!==void 0?n:!0;return this.isFiltered?(r=this.state.nodes.open.filtered[e])!==null&&r!==void 0?r:!0:(i=this.state.nodes.open.unfiltered[e])!==null&&i!==void 0?i:o}isEditable(e){const n=this.props.disableEdit||(()=>!1);return!jn(e,n)}isDraggable(e){const n=this.props.disableDrag||(()=>!1);return!jn(e,n)}isDragging(e){const n=je(e);return n?this.state.nodes.drag.id===n:!1}isFocused(e){return this.hasFocus&&this.state.nodes.focus.id===e}isMatch(e){return this.matchFn(e)}willReceiveDrop(e){const n=je(e);if(!n)return!1;const{destinationParentId:r,destinationIndex:i}=this.state.nodes.drag;return n===r&&i===null}onFocus(){const e=this.focusedNode||this.firstNode;e&&this.dispatch(Xt(e.id))}onBlur(){this.dispatch(cS())}onItemsRendered(e){this.visibleStartIndex=e.visibleStartIndex,this.visibleStopIndex=e.visibleStopIndex}get renderContainer(){return this.props.renderContainer||qf}get renderRow(){return this.props.renderRow||oS}get renderNode(){return this.props.children||aS}get renderDragPreview(){return this.props.renderDragPreview||Tf}get renderCursor(){return this.props.renderCursor||iS}}function Ee(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var _$=typeof Symbol=="function"&&Symbol.observable||"@@observable",ru=_$,So=()=>Math.random().toString(36).substring(7).split("").join("."),k$={INIT:`@@redux/INIT${So()}`,REPLACE:`@@redux/REPLACE${So()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${So()}`},Pt=k$;function Xf(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function N$(t){if(t===void 0)return"undefined";if(t===null)return"null";const e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(A$(t))return"date";if(M$(t))return"error";const n=R$(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"")}function R$(t){return typeof t.constructor=="function"?t.constructor.name:null}function M$(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function A$(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function ct(t){let e=typeof t;return process.env.NODE_ENV!=="production"&&(e=N$(t)),e}function Jf(t,e,n){if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(2):`Expected the root reducer to be a function. Instead, received: '${ct(t)}'`);if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Ee(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(1):`Expected the enhancer to be a function. Instead, received: '${ct(n)}'`);return n(Jf)(t,e)}let r=t,i=e,o=new Map,a=o,s=0,l=!1;function u(){a===o&&(a=new Map,o.forEach((v,m)=>{a.set(m,v)}))}function c(){if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function p(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(4):`Expected the listener to be a function. Instead, received: '${ct(v)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let m=!0;u();const S=s++;return a.set(S,v),function(){if(m){if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");m=!1,u(),a.delete(S),o=null}}}function g(v){if(!Xf(v))throw new Error(process.env.NODE_ENV==="production"?Ee(7):`Actions must be plain objects. Instead, the actual type was: '${ct(v)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof v.type>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof v.type!="string")throw new Error(process.env.NODE_ENV==="production"?Ee(17):`Action "type" property must be a string. Instead, the actual type was: '${ct(v.type)}'. Value was: '${v.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(9):"Reducers may not dispatch actions.");try{l=!0,i=r(i,v)}finally{l=!1}return(o=a).forEach(S=>{S()}),v}function h(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(10):`Expected the nextReducer to be a function. Instead, received: '${ct(v)}`);r=v,g({type:Pt.REPLACE})}function y(){const v=p;return{subscribe(m){if(typeof m!="object"||m===null)throw new Error(process.env.NODE_ENV==="production"?Ee(11):`Expected the observer to be an object. Instead, received: '${ct(m)}'`);function S(){const O=m;O.next&&O.next(c())}return S(),{unsubscribe:v(S)}},[ru](){return this}}}return g({type:Pt.INIT}),{dispatch:g,subscribe:p,getState:c,replaceReducer:h,[ru]:y}}function iu(t){typeof console<"u"&&typeof console.error=="function"&&console.error(t);try{throw new Error(t)}catch{}}function K$(t,e,n,r){const i=Object.keys(e),o=n&&n.type===Pt.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Xf(t))return`The ${o} has unexpected type of "${ct(t)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const a=Object.keys(t).filter(s=>!e.hasOwnProperty(s)&&!r[s]);if(a.forEach(s=>{r[s]=!0}),!(n&&n.type===Pt.REPLACE)&&a.length>0)return`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function L$(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:Pt.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(12):`The slice reducer for key "${e}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:Pt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(13):`The slice reducer for key "${e}" returned undefined when probed with a random type. Don't try to handle '${Pt.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function ou(t){const e=Object.keys(t),n={};for(let a=0;a<e.length;a++){const s=e[a];process.env.NODE_ENV!=="production"&&typeof t[s]>"u"&&iu(`No reducer provided for key "${s}"`),typeof t[s]=="function"&&(n[s]=t[s])}const r=Object.keys(n);let i;process.env.NODE_ENV!=="production"&&(i={});let o;try{L$(n)}catch(a){o=a}return function(s={},l){if(o)throw o;if(process.env.NODE_ENV!=="production"){const p=K$(s,n,l,i);p&&iu(p)}let u=!1;const c={};for(let p=0;p<r.length;p++){const g=r[p],h=n[g],y=s[g],f=h(y,l);if(typeof f>"u"){const v=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?Ee(14):`When called with an action of type ${v?`"${String(v)}"`:"(unknown type)"}, the slice reducer for key "${g}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}c[g]=f,u=u||f!==y}return u=u||r.length!==Object.keys(s).length,u?c:s}}function F$(t=Sn().nodes.drag,e){switch(e.type){case"DND_DRAG_START":return Object.assign(Object.assign({},t),{id:e.id,selectedIds:e.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},t),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":return e.parentId!==t.destinationParentId||e.index!=t.destinationIndex?Object.assign(Object.assign({},t),{destinationParentId:e.parentId,destinationIndex:e.index}):t;default:return t}}const j$=ou({nodes:ou({focus:dS,edit:uS,open:fS,selection:hS,drag:F$}),dnd:pS}),z$=Sn();function H$({treeProps:t,imperativeHandle:e,children:n}){const r=d.useRef(null),i=d.useRef(null),o=d.useRef(Jf(j$,Sn(t))),a=da.useSyncExternalStore(o.current.subscribe,o.current.getState,()=>z$),s=d.useMemo(()=>new Wn(o.current,t,r,i),[]),l=d.useRef(0);return d.useMemo(()=>{l.current+=1,s.update(t)},[...Object.values(t),a.nodes.open]),d.useImperativeHandle(e,()=>s),d.useEffect(()=>{s.props.selection?s.select(s.props.selection,{focus:!1}):s.deselectAll()},[s.props.selection]),d.useEffect(()=>{s.props.searchTerm||o.current.dispatch(Yo.clear(!0))},[s.props.searchTerm]),T.jsx(lf.Provider,{value:s,children:T.jsx(df.Provider,{value:l.current,children:T.jsx(uf.Provider,{value:a.nodes,children:T.jsx(cf.Provider,{value:a.dnd,children:T.jsx(S0,Object.assign({backend:w$,options:{rootElement:s.props.dndRootElement||void 0}},t.dndManager&&{manager:t.dndManager},{children:n}))})})})})}function B$(){const t=Oe(),[,e]=Ff(()=>({accept:"NODE",canDrop:(n,r)=>r.isOver({shallow:!0})?t.canDrop():!1,hover:(n,r)=>{if(!r.isOver({shallow:!0}))return;const i=r.getClientOffset();if(!t.listEl.current||!i)return;const{cursor:o,drop:a}=Gf({element:t.listEl.current,offset:i,indent:t.indent,node:null,prevNode:t.visibleNodes[t.visibleNodes.length-1],nextNode:null});a&&t.dispatch(wn.hovering(a.parentId,a.index)),r.canDrop()?o&&t.showCursor(o):t.hideCursor()}}),[t]);e(t.listEl)}function W$(t){return B$(),t.children}function U$(){const e=Oe().props.renderContainer||qf;return T.jsx(T.Fragment,{children:T.jsx(e,{})})}function V$(){const t=Oe(),{offset:e,mouse:n,item:r,isDragging:i}=VE(a=>({offset:a.getSourceClientOffset(),mouse:a.getClientOffset(),item:a.getItem(),isDragging:a.isDragging()})),o=t.props.renderDragPreview||Tf;return T.jsx(o,{offset:e,mouse:n,id:(r==null?void 0:r.id)||null,dragIds:(r==null?void 0:r.dragIds)||[],isDragging:i})}class G${constructor(e){this.root=q$(e)}get data(){var e,n;return(n=(e=this.root.children)===null||e===void 0?void 0:e.map(r=>r.data))!==null&&n!==void 0?n:[]}create(e){const n=e.parentId?this.find(e.parentId):this.root;if(!n)return null;n.addChild(e.data,e.index)}move(e){const n=this.find(e.id),r=e.parentId?this.find(e.parentId):this.root;!n||!r||(r.addChild(n.data,e.index),n.drop())}update(e){const n=this.find(e.id);n&&n.update(e.changes)}drop(e){const n=this.find(e.id);n&&n.drop()}find(e,n=this.root){if(!n)return null;if(n.id===e)return n;if(n.children){for(let r of n.children){const i=this.find(e,r);if(i)return i}return null}return null}}function q$(t){const e=new Qf({id:"ROOT"},null);return e.children=t.map(n=>Ha(n,e)),e}function Ha(t,e){const n=new Qf(t,e);return t.children&&(n.children=t.children.map(r=>Ha(r,n))),n}class Qf{constructor(e,n){this.data=e,this.parent=n,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,n){var r,i;const o=Ha(e,this);this.children=(r=this.children)!==null&&r!==void 0?r:[],this.children.splice(n,0,o),this.data.children=(i=this.data.children)!==null&&i!==void 0?i:[],this.data.children.splice(n,0,e)}removeChild(e){var n,r;(n=this.children)===null||n===void 0||n.splice(e,1),(r=this.data.children)===null||r===void 0||r.splice(e,1)}update(e){if(this.hasParent()){const n=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),n),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}}let Y$=0;function X$(t){const[e,n]=d.useState(t),r=d.useMemo(()=>new G$(e),[e]);return[e,{onMove:u=>{for(const c of u.dragIds)r.move({id:c,parentId:u.parentId,index:u.index});n(r.data)},onRename:({name:u,id:c})=>{r.update({id:c,changes:{name:u}}),n(r.data)},onCreate:({parentId:u,index:c,type:p})=>{const g={id:`simple-tree-id-${Y$++}`,name:""};return p==="internal"&&(g.children=[]),r.create({parentId:u,index:c,data:g}),n(r.data),g},onDelete:u=>{u.ids.forEach(c=>r.drop({id:c})),n(r.data)}}]}function J$(t){if(t.initialData&&t.data)throw new Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(t.initialData&&(t.onCreate||t.onDelete||t.onMove||t.onRename))throw new Error(`React Arborist Tree => You passed the initialData prop along with a data handler.
101
+ Use the data prop if you want to provide your own handlers.`);if(t.initialData){const[e,n]=X$(t.initialData);return Object.assign(Object.assign(Object.assign({},t),n),{data:e})}else return t}function Q$(t,e){const n=J$(t);return T.jsxs(H$,{treeProps:n,imperativeHandle:e,children:[T.jsx(W$,{children:T.jsx(U$,{})}),T.jsx(V$,{})]})}const Z$=d.forwardRef(Q$),Zf=({top:t,left:e})=>T.jsx("div",{className:"c__tree-view__cursor",style:{top:t-2,left:e+10}});function ex(t,e){var n=d.useRef(null),r=d.useRef(null);r.current=e;var i=d.useRef(null);d.useEffect(function(){o()});var o=d.useCallback(function(){var a=i.current,s=r.current,l=a||(s?s instanceof Element?s:s.current:null);n.current&&n.current.element===l&&n.current.subscriber===t||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:t,cleanup:l?t(l):void 0})},[t]);return d.useEffect(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),d.useCallback(function(a){i.current=a,o()},[o])}function au(t,e,n){return t[e]?t[e][0]?t[e][0][n]:t[e][n]:e==="contentBoxSize"?t.contentRect[n==="inlineSize"?"width":"height"]:void 0}function tx(t){t===void 0&&(t={});var e=t.onResize,n=d.useRef(void 0);n.current=e;var r=t.round||Math.round,i=d.useRef(),o=d.useState({width:void 0,height:void 0}),a=o[0],s=o[1],l=d.useRef(!1);d.useEffect(function(){return l.current=!1,function(){l.current=!0}},[]);var u=d.useRef({width:void 0,height:void 0}),c=ex(d.useCallback(function(p){return(!i.current||i.current.box!==t.box||i.current.round!==r)&&(i.current={box:t.box,round:r,instance:new ResizeObserver(function(g){var h=g[0],y=t.box==="border-box"?"borderBoxSize":t.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",f=au(h,y,"inlineSize"),v=au(h,y,"blockSize"),m=f?r(f):void 0,S=v?r(v):void 0;if(u.current.width!==m||u.current.height!==S){var w={width:m,height:S};u.current.width=m,u.current.height=S,n.current?n.current(w):l.current||s(w)}})}),i.current.instance.observe(p,{box:t.box}),function(){i.current&&i.current.instance.unobserve(p)}},[t.box,r]),t.ref);return d.useMemo(function(){return{ref:c,width:a.width,height:a.height}},[c,a.width,a.height])}var Ae=(t=>(t.NODE="node",t.SEPARATOR="separator",t.TITLE="title",t))(Ae||{}),Et=(t=>(t.FIRST_CHILD="first-child",t.LAST_CHILD="last-child",t.LEFT="left",t.RIGHT="right",t))(Et||{});const si=t=>t?t.type===Ae.SEPARATOR:!1,li=t=>t?t.type===Ae.TITLE:!1,zn=t=>!si(t)&&!li(t),nx=({treeData:t,initialOpenState:e,selectedNodeId:n,rootNodeId:r,renderNode:i,handleMove:o,canDrop:a,canDrag:s})=>{const{ref:l,width:u,height:c}=tx(),p=h=>{var I,j,V,A;const y=JSON.parse(JSON.stringify(t)),f=h.dragNodes[0],v=h.parentId?((I=h.parentNode)==null?void 0:I.data.children)??[]:y,m=h.dragNodes[0].data.value.id,S=h.dragNodes[0].data,w=(j=h.parentNode)==null?void 0:j.data;if((w==null?void 0:w.value.type)===Ae.TITLE||(w==null?void 0:w.value.type)===Ae.SEPARATOR)return null;const O=S.parentKey??r,x=h.parentId??r;let D=h.index+0,P=null,b=x;const k=((A=(V=f.parent)==null?void 0:V.children)==null?void 0:A.findIndex(_=>_.data.value.id===m))??0;if(O===x){if(k===D)return null;D=D<k?D:D-1}const B=h.index-1,R=v[B],z=h.index,E=v[z];return h.index===0?(b=h.parentId??r,P=Et.FIRST_CHILD):!w&&h.index===1&&!zn(R.value)?(b=r,D=1,P=Et.FIRST_CHILD):h.index===v.length?(b=b??r,P=Et.LAST_CHILD):R&&zn(R.value)?(b=R.value.id,P=Et.RIGHT):E&&zn(E.value)&&(P=Et.LEFT,b=E.value.id),P&&b?{targetModeId:b,mode:P,oldParentId:O,index:D,newParentId:h.parentId,sourceId:m}:null},g=h=>{const y=p(h);y&&(o==null||o(y))};return T.jsx("div",{ref:l,className:"c__tree-view--container",children:T.jsx(Z$,{data:t,openByDefault:!1,disableEdit:!0,className:"c__tree-view",idAccessor:"key",onMove:g,rowHeight:35,disableDrag:h=>s?!s(h):!1,disableDrop:({parentNode:h,dragNodes:y,index:f})=>{var w,O;if(a&&!a({parentNode:h,dragNodes:y,index:f}))return h.data.value.canDrop=!1,!0;if(((w=h.data.value)==null?void 0:w.type)===Ae.TITLE||((O=h.data.value)==null?void 0:O.type)===Ae.SEPARATOR)return!0;if(h.id==="__REACT_ARBORIST_INTERNAL_ROOT__"){const x=t[f-1],D=t[f],P=t[f+1],b=si(x==null?void 0:x.value),k=si(D==null?void 0:D.value),B=li(x==null?void 0:x.value),R=li(D==null?void 0:D.value),z=zn(P==null?void 0:P.value);return!!(f===0&&(k||R)||b&&R&&z||B&&k&&z)}const v=h==null?void 0:h.isOpen,m=(h==null?void 0:h.data.value.childrenCount)&&h.data.value.childrenCount>0||(h==null?void 0:h.data.children)&&h.data.children.length>0;if(!m)return h.data.value.canDrop=!0,!1;let S=h.data.value.childrenCount&&h.data.value.childrenCount>0&&(h==null?void 0:h.data.children)&&h.data.children.length>0;return S=S??!0,!v&&!S&&m?(h.data.value.canDrop=!0,!0):(h.data.value.canDrop=!0,!1)},paddingBottom:30,width:u,initialOpenState:e,height:c,overscanCount:20,selection:n,renderCursor:Zf,renderRow:h=>{const y=h.node.data.value.type===Ae.TITLE,f=h.node.data.value.type===Ae.SEPARATOR,{style:v}=h.attrs,m={...v};return y||f?T.jsx("div",{...h.attrs,style:m,ref:h.innerRef,onFocus:S=>S.stopPropagation(),onClick:h.node.handleClick,children:h.children}):T.jsx("div",{...h.attrs,style:m,ref:h.innerRef,onFocus:S=>S.stopPropagation(),onClick:h.node.handleClick,children:T.jsx("div",{style:{padding:"0 12px"},children:h.children})})},rowClassName:"c__tree-view--row",children:h=>i(h)})})},rx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ix(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function ox(t){return"nodeType"in t}function ax(t){var e,n;return t?ix(t)?t:ox(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}const eh=rx?d.useLayoutEffect:d.useEffect;function th(t){const e=d.useRef(t);return eh(()=>{e.current=t}),d.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function su(t,e){e===void 0&&(e=[t]);const n=d.useRef(t);return eh(()=>{n.current!==t&&(n.current=t)},e),n}function sx(t){const e=th(t),n=d.useRef(null),r=d.useCallback(i=>{i!==n.current&&(e==null||e(i,n.current)),n.current=i},[]);return[n,r]}let wo={};function lx(t,e){return d.useMemo(()=>{const n=wo[t]==null?0:wo[t]+1;return wo[t]=n,t+"-"+n},[t,e])}var Un;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(Un||(Un={}));function lu(){}const ux=Object.freeze({x:0,y:0});function cx(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function dx(t,e,n){const r=cx(e);if(!r)return t;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=t.left-a-(1-i)*parseFloat(n),u=t.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?t.width/i:t.width,p=o?t.height/o:t.height;return{width:c,height:p,top:u,right:l+c,bottom:u+p,left:l}}const fx={ignoreTransform:!1};function nh(t,e){e===void 0&&(e=fx);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:u,transformOrigin:c}=ax(t).getComputedStyle(t);u&&(n=dx(n,u,c))}const{top:r,left:i,width:o,height:a,bottom:s,right:l}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:l}}function uu(t){return nh(t,{ignoreTransform:!0})}var dn;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(dn||(dn={}));var cu;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(cu||(cu={}));var ft;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(ft||(ft={}));ft.Space,ft.Enter,ft.Esc,ft.Space,ft.Enter,ft.Tab;var du;(function(t){t[t.RightClick=2]="RightClick"})(du||(du={}));var fu;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(fu||(fu={}));var hu;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(hu||(hu={}));dn.Backward+"",dn.Forward+"",dn.Backward+"",dn.Forward+"";var ia;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(ia||(ia={}));var oa;(function(t){t.Optimized="optimized"})(oa||(oa={}));function hx(t){let{callback:e,disabled:n}=t;const r=th(e),i=d.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return d.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}ia.WhileDragging,oa.Optimized;const px={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:lu,draggableNodes:new Map,over:null,measureDroppableContainers:lu},gx=d.createContext(px);({...ux});var pu;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(pu||(pu={}));const vx="Droppable",mx={timeout:25};function yx(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:i}=t;const o=lx(vx),{active:a,dispatch:s,over:l,measureDroppableContainers:u}=d.useContext(gx),c=d.useRef({disabled:n}),p=d.useRef(!1),g=d.useRef(null),h=d.useRef(null),{disabled:y,updateMeasurementsFor:f,timeout:v}={...mx,...i},m=su(f??r),S=d.useCallback(()=>{if(!p.current){p.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(m.current)?m.current:[m.current]),h.current=null},v)},[v]),w=hx({callback:S,disabled:y||!a}),O=d.useCallback((b,k)=>{w&&(k&&(w.unobserve(k),p.current=!1),b&&w.observe(b))},[w]),[x,D]=sx(O),P=su(e);return d.useEffect(()=>{!w||!x.current||(w.disconnect(),p.current=!1,w.observe(x.current))},[x,w]),d.useEffect(()=>(s({type:Un.RegisterDroppable,element:{id:r,key:o,disabled:n,node:x,rect:g,data:P}}),()=>s({type:Un.UnregisterDroppable,key:o,id:r})),[r]),d.useEffect(()=>{n!==c.current.disabled&&(s({type:Un.SetDroppableDisabled,id:r,key:o,disabled:n}),c.current.disabled=n)},[r,o,n,s]),{active:a,rect:g,isOver:(l==null?void 0:l.id)===r,node:x,over:l,setNodeRef:D}}const bx=t=>{const{isOver:e,setNodeRef:n}=yx({id:t.id,data:t.data});return d.useEffect(()=>{var r;(r=t.onOver)==null||r.call(t,e,t.data)},[e,t.data,t.onOver]),T.jsx("div",{ref:n,children:t.children})},Sx=({children:t,onClick:e,node:n,dragHandle:r,style:i,loadChildren:o,forceLoading:a})=>{var w,O;const s=d.useRef(null),[l,u]=d.useState(!1),[c,p]=d.useState(!1),g=a??l,h=n.willReceiveDrop||c,y=n.data.value.childrenCount!==void 0&&n.data.value.childrenCount>0||(((w=n.data.children)==null?void 0:w.length)??0)>0,f=((O=n.children)==null?void 0:O.length)??!1,v=n.isLeaf||!y,m=d.useCallback(async()=>{if(!v){if(f||n.data.value.hasLoadedChildren){n.toggle();return}u(!0),await(o==null?void 0:o(n.data.value)),u(!1),n.open()}},[f,o,n,v]),S=d.useCallback(x=>{x&&!n.isOpen&&!n.isDragging&&(s.current=setTimeout(()=>{m()},500)),s.current&&!x&&clearTimeout(s.current)},[m,n.isOpen,n.isDragging]);return d.useEffect(()=>{S(h)},[h,S]),n.data.value.type===Ae.SEPARATOR?T.jsx("div",{className:"c__tree-view--node__separator"}):n.data.value.type===Ae.TITLE?T.jsx("div",{className:"c__tree-view--node__title",children:n.data.value.title}):T.jsx(bx,{id:n.id,data:{data:n.data,nodeApi:n},onOver:p,children:T.jsxs("div",{onClick:e,ref:r,style:i,className:jt("c__tree-view--node",{...n.state,canDrop:n.data.value.canDrop??!0,externalDrop:c}),children:[v&&T.jsx("div",{className:"c__tree-view--node__leaf"}),!v&&T.jsxs(T.Fragment,{children:[g&&T.jsx("div",{className:"c__tree-view--node__loading",children:T.jsx(Da,{})}),!g&&T.jsx("span",{onClick:x=>{x.stopPropagation(),m()},className:"c__tree-view--node__arrow material-icons",children:n.isOpen?"keyboard_arrow_down":"keyboard_arrow_right"})]}),t]})})},wx=(t,e,n)=>{const{remove:r,update:i,insert:o,insertBefore:a,insertAfter:s,append:l,prepend:u,getItem:c,move:p,items:g}=Cv({initialItems:JSON.parse(JSON.stringify(t)),getKey:A=>A.id,getChildren:A=>A.children||[]}),[h,y]=d.useState(),f=(A=[])=>{const _=g.map(Y=>Y.key);r(..._);const H=JSON.parse(JSON.stringify(A));H.length>0&&o(null,0,...H),y(void 0)},v=(A,_)=>{var H;if(A){const Y=c(A);Y&&(o(A,((H=Y.children)==null?void 0:H.length)??0,_),z(A,_))}else o(null,g.length,_)},m=(A,_)=>{const H=c(A);if(!H){console.error("No item found");return}let Y=H.value.children??null;_.children&&(Y=[...Y??[],..._.children]);const Q={...H.value,..._,children:Y,childrenCount:(Y==null?void 0:Y.length)??H.value.childrenCount};i(A,Q),H.parentKey&&w(H.parentKey,A,_)},S=A=>{const _=c(A),H=_==null?void 0:_.parentKey;H&&_&&R(H,_.value.id),r(A)},w=(A,_,H)=>{const Y=c(A);if(!Y)return;const Q=Y.value.children??[],M=Q.findIndex(L=>L.id===_);if(M===-1)return;const N={...Q[M],...H};Q[M]=N},O=async A=>{if(!e){console.error("No refresh callback provided");return}try{const _=await e(A);m(A,_)}catch(_){console.error("error while refreshing node:",_)}},x=A=>{o(null,g.length,A)},D=(A,_)=>{const H=c(A);if(!H){console.error("No item found");return}const Y={...H.value,children:_,childrenCount:_.length};i(A,Y)},P=(A,_)=>{a(A,_)},b=(A,_)=>{s(A,_)},k=(A,_)=>{l(A,_)},B=(A,_)=>{u(A,_)},R=(A,_)=>{const H=c(A);if(!H)return;const Q=(H.value.children??[]).filter(M=>M.id!==_);H.value.children=Q,H.value.childrenCount=Q.length},z=(A,_)=>{const H=c(A);if(!H)return;const Q=[...H.value.children??[],_];H.value.children=Q,H.value.childrenCount=Q.length},E=A=>{const _=c(A);_&&y(_.value)},I=(A,_,H,Y)=>{var M;const Q=(M=c(A))==null?void 0:M.value;p(A,_,H),_&&Q&&z(_,Q),Y&&R(Y,A)};return{nodes:g,addChild:v,updateNode:m,deleteNode:S,addRootNode:x,selectedNode:h,setSelectedNode:y,refreshNode:O,setChildren:D,insertBeforeNode:P,insertAfterNode:b,handleMove:A=>{I(A.sourceId,A.newParentId,A.index,A.oldParentId)},prependToNode:B,moveNode:I,appendToNode:k,move:p,resetTree:f,handleLoadChildren:async A=>{if(!n)return[];const _=await n(A);return m(A,{children:_,hasLoadedChildren:!0,childrenCount:_.length}),_},selectNodeById:E}};exports.CunninghamProvider=ph;exports.CustomTabs=Gb;exports.DropdownMenu=Qc;exports.Header=td;exports.HorizontalSeparator=qo;exports.Label=Cd;exports.LanguagePicker=ed;exports.LeftPanel=nd;exports.MainLayout=Am;exports.ProConnectButton=gh;exports.QuickSearch=Wb;exports.QuickSearchGroup=Ub;exports.QuickSearchInput=sf;exports.QuickSearchItem=Rr;exports.QuickSearchItemTemplate=Vb;exports.Spinner=Da;exports.TreeView=nx;exports.TreeViewItem=Sx;exports.TreeViewMoveModeEnum=Et;exports.TreeViewNodeTypeEnum=Ae;exports.TreeViewSeparator=Zf;exports.WithLabel=Lm;exports.cunninghamConfig=jo;exports.getLocales=vu;exports.headerHeight=Km;exports.isNode=zn;exports.isSeparator=si;exports.isTitle=li;exports.useDropdownMenu=Zc;exports.useResponsive=vi;exports.useTree=wx;
102
102
  //# sourceMappingURL=index.cjs.map