From dbdc54aa1bfadd31bdab7120c3d9f4279f97c927 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Fri, 3 Jan 2025 16:40:00 +0100 Subject: [PATCH] Update react files --- .../react/locales/pt_BR/translation.json | 28 +- .../react/locales/zh_Hant/translation.json | 3 +- wger/core/static/react/main.js | 325 +++++++++--------- 3 files changed, 187 insertions(+), 169 deletions(-) diff --git a/wger/core/static/react/locales/pt_BR/translation.json b/wger/core/static/react/locales/pt_BR/translation.json index 7de1542be..1a7e1b232 100644 --- a/wger/core/static/react/locales/pt_BR/translation.json +++ b/wger/core/static/react/locales/pt_BR/translation.json @@ -4,7 +4,7 @@ "routine": "Rotina", "routines": "Rotinas", "addDay": "Adicionar dia de treinamento", - "addWeightLog": "Adicionar registro de peso", + "addWeightLog": "Adicionar registro de treino", "logsHeader": "Registro de exercícios para treino", "logsFilterNote": "Observe que somente as entradas com uma unidade de peso de kg ou lb e repetições são registradas; outras combinações, como tempo ou até a falha, são ignoradas aqui", "addLogToDay": "Adicionar registro a este dia" @@ -68,7 +68,7 @@ "deleteInfo": "Isso excluirá a categoria, bem como todas as suas entradas" }, "category": "Categoria", - "success": "Sucesso", + "success": "Sucesso!", "English": "Inglês", "save": "Salvar", "videos": "Vídeos", @@ -128,7 +128,7 @@ "imageStyleOther": "Outros", "imageDetails": "Detalhes da Imagem", "replacementsInfoText": "Opcionalmente, você pode também selecionar um exercício que pode substituir esse (ex: porque foi substituído duas vezes, or similar). Isso irá substituir o exercício em rotinas e também logs de treinos, ao invés de apenas excluí-lo. Essas mudanças irão também ser propagadas para qualquer instancia que sincroniza os exercícios a partir desse.", - "deleteExerciseReplace": "Delete e substitua." + "deleteExerciseReplace": "Delete e substitua" }, "notes": "Notas", "value": "Valor", @@ -214,9 +214,27 @@ "logThisMeal": "Log esta alimentação sem alterações para o diário nutricional", "copyPlan": "Faça uma cópia deste plano", "onlyLoggingHelpText": "Apenas acompanha calorias. Selecione o box se você apenas quer logar suas calorias e não que iniciar um plano de nutrição detalhado com alimentação específica", - "useGoalsHelpTextLong": "Isto permite que você defina objetivos gerais para energia, proteína, carboidratos ou gorduras para o plano. Note que se você iniciar um plano alimentar detalhado, estes valores tem precedência", + "useGoalsHelpTextLong": "Isto permite que você defina objetivos gerais para energia, proteína, carboidratos ou gorduras para o plano. Note que se você iniciar um plano alimentar detalhado, estes valores tem precedência.", "protein": "Proteína", "meal": "Alimentação" }, - "downloadAsPdf": "Baixar como PDF" + "downloadAsPdf": "Baixar como PDF", + "height": "Altura", + "cm": "cm", + "all": "Tudo", + "lastYear": "Ano Passado", + "lastHalfYear": "Últimos 6 meses", + "lastMonth": "Mês passado", + "lastWeek": "Semana passada", + "bmi": { + "calculator": "Calculadora IMC", + "overweight": "Sobrepeso", + "obese": "Obeso", + "normal": "Peso Normal", + "underweight": "Abaixo do peso", + "result": "Seu IMC é {{value}}" + }, + "calendar": "Calendário", + "entries": "Registros", + "no_entries_for_day": "Sem registros para este dia" } diff --git a/wger/core/static/react/locales/zh_Hant/translation.json b/wger/core/static/react/locales/zh_Hant/translation.json index fb88586fa..a508e5d70 100644 --- a/wger/core/static/react/locales/zh_Hant/translation.json +++ b/wger/core/static/react/locales/zh_Hant/translation.json @@ -231,5 +231,6 @@ "overweight": "過重", "obese": "肥胖", "result": "你的BMI是{{value}}" - } + }, + "all": "所有" } diff --git a/wger/core/static/react/main.js b/wger/core/static/react/main.js index 45544f238..32fc9ba12 100644 --- a/wger/core/static/react/main.js +++ b/wger/core/static/react/main.js @@ -1,4 +1,4 @@ -var jge=Object.defineProperty;var iH=e=>{throw TypeError(e)};var Bge=(e,t,n)=>t in e?jge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var zge=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var dn=(e,t,n)=>Bge(e,typeof t!="symbol"?t+"":t,n),vA=(e,t,n)=>t.has(e)||iH("Cannot "+n);var ve=(e,t,n)=>(vA(e,t,"read from private field"),n?n.call(e):t.get(e)),Lt=(e,t,n)=>t.has(e)?iH("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),bt=(e,t,n,r)=>(vA(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),fn=(e,t,n)=>(vA(e,t,"access private method"),n);var q1=(e,t,n,r)=>({set _(o){bt(e,t,o,n)},get _(){return ve(e,t,r)}});var B$t=zge((Ha,Ua)=>{function AK(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var Di=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $K={exports:{}},hO={},RK={exports:{}},En={};/** +var _ge=Object.defineProperty;var iH=e=>{throw TypeError(e)};var Lge=(e,t,n)=>t in e?_ge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pn=(e,t,n)=>Lge(e,typeof t!="symbol"?t+"":t,n),mA=(e,t,n)=>t.has(e)||iH("Cannot "+n);var ve=(e,t,n)=>(mA(e,t,"read from private field"),n?n.call(e):t.get(e)),jt=(e,t,n)=>t.has(e)?iH("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),bt=(e,t,n,r)=>(mA(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),hn=(e,t,n)=>(mA(e,t,"access private method"),n);var G1=(e,t,n,r)=>({set _(o){bt(e,t,o,n)},get _(){return ve(e,t,r)}});function Nge(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var yc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var AK={exports:{}},uO={},$K={exports:{}},In={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var jge=Object.defineProperty;var iH=e=>{throw TypeError(e)};var Bge=(e,t,n)=>t * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var qx=Symbol.for("react.element"),Vge=Symbol.for("react.portal"),Hge=Symbol.for("react.fragment"),Uge=Symbol.for("react.strict_mode"),Wge=Symbol.for("react.profiler"),Gge=Symbol.for("react.provider"),qge=Symbol.for("react.context"),Kge=Symbol.for("react.forward_ref"),Yge=Symbol.for("react.suspense"),Xge=Symbol.for("react.memo"),Qge=Symbol.for("react.lazy"),aH=Symbol.iterator;function Jge(e){return e===null||typeof e!="object"?null:(e=aH&&e[aH]||e["@@iterator"],typeof e=="function"?e:null)}var _K={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},DK=Object.assign,NK={};function hv(e,t,n){this.props=e,this.context=t,this.refs=NK,this.updater=n||_K}hv.prototype.isReactComponent={};hv.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};hv.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function LK(){}LK.prototype=hv.prototype;function YN(e,t,n){this.props=e,this.context=t,this.refs=NK,this.updater=n||_K}var XN=YN.prototype=new LK;XN.constructor=YN;DK(XN,hv.prototype);XN.isPureReactComponent=!0;var sH=Array.isArray,FK=Object.prototype.hasOwnProperty,QN={current:null},jK={key:!0,ref:!0,__self:!0,__source:!0};function BK(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)FK.call(t,r)&&!jK.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1{throw TypeError(e)};var Bge=(e,t,n)=>t * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var rye=y,oye=Symbol.for("react.element"),iye=Symbol.for("react.fragment"),aye=Object.prototype.hasOwnProperty,sye=rye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,lye={key:!0,ref:!0,__self:!0,__source:!0};function VK(e,t,n){var r,o={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)aye.call(t,r)&&!lye.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:oye,type:e,key:i,ref:a,props:o,_owner:sye.current}}hO.Fragment=iye;hO.jsx=VK;hO.jsxs=VK;$K.exports=hO;var $=$K.exports,cye=!1;function uye(e){if(e.sheet)return e.sheet;for(var t=0;t0?Jo(mv,--va):0,my--,co===10&&(my=1,gO--),co}function Wa(){return co=va2||bw(co)>3?"":" "}function Cye(e,t){for(;--t&&Wa()&&!(co<48||co>102||co>57&&co<65||co>70&&co<97););return Kx(e,lP()+(t<6&&Pc()==32&&Wa()==32))}function MR(e){for(;Wa();)switch(co){case e:return va;case 34:case 39:e!==34&&e!==39&&MR(co);break;case 40:e===41&&MR(e);break;case 92:Wa();break}return va}function Pye(e,t){for(;Wa()&&e+co!==57;)if(e+co===84&&Pc()===47)break;return"/*"+Kx(t,va-1)+"*"+mO(e===47?e:Wa())}function Tye(e){for(;!bw(Pc());)Wa();return Kx(e,va)}function Eye(e){return KK(uP("",null,null,null,[""],e=qK(e),0,[0],e))}function uP(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,m=0,g=1,v=1,w=1,x=0,S="",P=o,T=i,E=r,O=S;v;)switch(m=x,x=Wa()){case 40:if(m!=108&&Jo(O,d-1)==58){kR(O+=qn(cP(x),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:O+=cP(x);break;case 9:case 10:case 13:case 32:O+=Sye(m);break;case 92:O+=Cye(lP()-1,7);continue;case 47:switch(Pc()){case 42:case 47:Y1(Oye(Pye(Wa(),lP()),t,n),l);break;default:O+="/"}break;case 123*g:s[c++]=gc(O)*w;case 125*g:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+u:w==-1&&(O=qn(O,/\f/g,"")),p>0&&gc(O)-d&&Y1(p>32?uH(O+";",r,n,d-1):uH(qn(O," ","")+";",r,n,d-2),l);break;case 59:O+=";";default:if(Y1(E=cH(O,t,n,c,u,o,s,S,P=[],T=[],d),i),x===123)if(u===0)uP(O,t,E,E,P,i,d,s,T);else switch(f===99&&Jo(O,3)===110?100:f){case 100:case 108:case 109:case 115:uP(e,E,E,r&&Y1(cH(e,E,E,0,0,o,s,S,o,P=[],d),T),o,T,d,s,r?P:T);break;default:uP(O,E,E,E,[""],T,0,s,T)}}c=u=p=0,g=w=1,S=O="",d=a;break;case 58:d=1+gc(O),p=m;default:if(g<1){if(x==123)--g;else if(x==125&&g++==0&&xye()==125)continue}switch(O+=mO(x),x*g){case 38:w=u>0?1:(O+="\f",-1);break;case 44:s[c++]=(gc(O)-1)*w,w=1;break;case 64:Pc()===45&&(O+=cP(Wa())),f=Pc(),u=d=gc(S=O+=Tye(lP())),x++;break;case 45:m===45&&gc(O)==2&&(g=0)}}return i}function cH(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=o===0?i:[""],p=tL(f),m=0,g=0,v=0;m0?f[w]+" "+x:qn(x,/&\f/g,f[w])))&&(l[v++]=S);return yO(e,t,n,o===0?ZN:s,l,c,u)}function Oye(e,t,n){return yO(e,t,n,HK,mO(wye()),vw(e,2,-2),0)}function uH(e,t,n,r){return yO(e,t,n,eL,vw(e,0,r),vw(e,r+1,-1),r)}function Mg(e,t){for(var n="",r=tL(e),o=0;o6)switch(Jo(e,t+1)){case 109:if(Jo(e,t+4)!==45)break;case 102:return qn(e,/(.+:)(.+)-([^]+)/,"$1"+Gn+"$2-$3$1"+HP+(Jo(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~kR(e,"stretch")?XK(qn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Jo(e,t+1)!==115)break;case 6444:switch(Jo(e,gc(e)-3-(~kR(e,"!important")&&10))){case 107:return qn(e,":",":"+Gn)+e;case 101:return qn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Gn+(Jo(e,14)===45?"inline-":"")+"box$3$1"+Gn+"$2$3$1"+ci+"$2box$3")+e}break;case 5936:switch(Jo(e,t+11)){case 114:return Gn+e+ci+qn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Gn+e+ci+qn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Gn+e+ci+qn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Gn+e+ci+e+e}return e}var Nye=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case eL:t.return=XK(t.value,t.length);break;case UK:return Mg([Ab(t,{value:qn(t.value,"@","@"+Gn)})],o);case ZN:if(t.length)return bye(t.props,function(i){switch(vye(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Mg([Ab(t,{props:[qn(i,/:(read-\w+)/,":"+HP+"$1")]})],o);case"::placeholder":return Mg([Ab(t,{props:[qn(i,/:(plac\w+)/,":"+Gn+"input-$1")]}),Ab(t,{props:[qn(i,/:(plac\w+)/,":"+HP+"$1")]}),Ab(t,{props:[qn(i,/:(plac\w+)/,ci+"input-$1")]})],o)}return""})}},Lye=[Nye],QK=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var o=t.stylisPlugins||Lye,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),w=1;w0?Zo(pv,--va):0,hy--,fo===10&&(hy=1,fO--),fo}function Ua(){return fo=va2||bw(fo)>3?"":" "}function bye(e,t){for(;--t&&Ua()&&!(fo<48||fo>102||fo>57&&fo<65||fo>70&&fo<97););return Kx(e,aP()+(t<6&&Pc()==32&&Ua()==32))}function IR(e){for(;Ua();)switch(fo){case e:return va;case 34:case 39:e!==34&&e!==39&&IR(fo);break;case 40:e===41&&IR(e);break;case 92:Ua();break}return va}function wye(e,t){for(;Ua()&&e+fo!==57;)if(e+fo===84&&Pc()===47)break;return"/*"+Kx(t,va-1)+"*"+dO(e===47?e:Ua())}function xye(e){for(;!bw(Pc());)Ua();return Kx(e,va)}function Sye(e){return qK(lP("",null,null,null,[""],e=GK(e),0,[0],e))}function lP(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,m=0,g=1,y=1,b=1,x=0,S="",P=o,E=i,T=r,O=S;y;)switch(m=x,x=Ua()){case 40:if(m!=108&&Zo(O,d-1)==58){OR(O+=Xn(sP(x),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:O+=sP(x);break;case 9:case 10:case 13:case 32:O+=vye(m);break;case 92:O+=bye(aP()-1,7);continue;case 47:switch(Pc()){case 42:case 47:K1(Cye(wye(Ua(),aP()),t,n),l);break;default:O+="/"}break;case 123*g:s[c++]=mc(O)*b;case 125*g:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+u:b==-1&&(O=Xn(O,/\f/g,"")),p>0&&mc(O)-d&&K1(p>32?uH(O+";",r,n,d-1):uH(Xn(O," ","")+";",r,n,d-2),l);break;case 59:O+=";";default:if(K1(T=cH(O,t,n,c,u,o,s,S,P=[],E=[],d),i),x===123)if(u===0)lP(O,t,T,T,P,i,d,s,E);else switch(f===99&&Zo(O,3)===110?100:f){case 100:case 108:case 109:case 115:lP(e,T,T,r&&K1(cH(e,T,T,0,0,o,s,S,o,P=[],d),E),o,E,d,s,r?P:E);break;default:lP(O,T,T,T,[""],E,0,s,E)}}c=u=p=0,g=b=1,S=O="",d=a;break;case 58:d=1+mc(O),p=m;default:if(g<1){if(x==123)--g;else if(x==125&&g++==0&&yye()==125)continue}switch(O+=dO(x),x*g){case 38:b=u>0?1:(O+="\f",-1);break;case 44:s[c++]=(mc(O)-1)*b,b=1;break;case 64:Pc()===45&&(O+=sP(Ua())),f=Pc(),u=d=mc(S=O+=xye(aP())),x++;break;case 45:m===45&&mc(O)==2&&(g=0)}}return i}function cH(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=o===0?i:[""],p=JL(f),m=0,g=0,y=0;m0?f[b]+" "+x:Xn(x,/&\f/g,f[b])))&&(l[y++]=S);return pO(e,t,n,o===0?XL:s,l,c,u)}function Cye(e,t,n){return pO(e,t,n,VK,dO(gye()),vw(e,2,-2),0)}function uH(e,t,n,r){return pO(e,t,n,QL,vw(e,0,r),vw(e,r+1,-1),r)}function Mg(e,t){for(var n="",r=JL(e),o=0;o6)switch(Zo(e,t+1)){case 109:if(Zo(e,t+4)!==45)break;case 102:return Xn(e,/(.+:)(.+)-([^]+)/,"$1"+Yn+"$2-$3$1"+zP+(Zo(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~OR(e,"stretch")?YK(Xn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Zo(e,t+1)!==115)break;case 6444:switch(Zo(e,mc(e)-3-(~OR(e,"!important")&&10))){case 107:return Xn(e,":",":"+Yn)+e;case 101:return Xn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Yn+(Zo(e,14)===45?"inline-":"")+"box$3$1"+Yn+"$2$3$1"+di+"$2box$3")+e}break;case 5936:switch(Zo(e,t+11)){case 114:return Yn+e+di+Xn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Yn+e+di+Xn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Yn+e+di+Xn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Yn+e+di+e+e}return e}var $ye=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case QL:t.return=YK(t.value,t.length);break;case HK:return Mg([Ab(t,{value:Xn(t.value,"@","@"+Yn)})],o);case XL:if(t.length)return mye(t.props,function(i){switch(hye(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Mg([Ab(t,{props:[Xn(i,/:(read-\w+)/,":"+zP+"$1")]})],o);case"::placeholder":return Mg([Ab(t,{props:[Xn(i,/:(plac\w+)/,":"+Yn+"input-$1")]}),Ab(t,{props:[Xn(i,/:(plac\w+)/,":"+zP+"$1")]}),Ab(t,{props:[Xn(i,/:(plac\w+)/,di+"input-$1")]})],o)}return""})}},Rye=[$ye],XK=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var y=g.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var o=t.stylisPlugins||Rye,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var y=g.getAttribute("data-emotion").split(" "),b=1;b=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Kye={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Yye=!1,Xye=/[A-Z]|^ms/g,Qye=/_EMO_([^_]+?)_([^]*?)_EMO_/g,rY=function(t){return t.charCodeAt(1)===45},fH=function(t){return t!=null&&typeof t!="boolean"},wA=YK(function(e){return rY(e)?e:e.replace(Xye,"-$&").toLowerCase()}),pH=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Qye,function(r,o,i){return yc={name:o,styles:i,next:yc},o})}return Kye[t]!==1&&!rY(t)&&typeof n=="number"&&n!==0?n+"px":n},Jye="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ww(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return yc={name:o.name,styles:o.styles,next:yc},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)yc={name:a.name,styles:a.styles,next:yc},a=a.next;var s=i.styles+";";return s}return Zye(e,t,n)}case"function":{if(e!==void 0){var l=yc,c=n(e);return yc=l,ww(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function Zye(e,t,n){var r="";if(Array.isArray(n))for(var o=0;on.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Us="$$material";var ave=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,sve=YK(function(e){return ave.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),lve=sve,cve=function(t){return t!=="theme"},gH=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?lve:cve},yH=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(a){return t.__emotion_forwardProp(a)&&i(a)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},uve=!1,dve=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return iL(n,r,o),iY(function(){return aL(n,r,o)}),null},fve=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,a;n!==void 0&&(i=n.label,a=n.target);var s=yH(t,n,r),l=s||gH(o),c=!l("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,p=1;pt(bve(o)?n:o):t;return $.jsx(ive,{styles:r})}/** - * @mui/styled-engine v6.1.10 + */var Wo=typeof Symbol=="function"&&Symbol.for,ZL=Wo?Symbol.for("react.element"):60103,eN=Wo?Symbol.for("react.portal"):60106,hO=Wo?Symbol.for("react.fragment"):60107,mO=Wo?Symbol.for("react.strict_mode"):60108,gO=Wo?Symbol.for("react.profiler"):60114,yO=Wo?Symbol.for("react.provider"):60109,vO=Wo?Symbol.for("react.context"):60110,tN=Wo?Symbol.for("react.async_mode"):60111,bO=Wo?Symbol.for("react.concurrent_mode"):60111,wO=Wo?Symbol.for("react.forward_ref"):60112,xO=Wo?Symbol.for("react.suspense"):60113,Dye=Wo?Symbol.for("react.suspense_list"):60120,SO=Wo?Symbol.for("react.memo"):60115,CO=Wo?Symbol.for("react.lazy"):60116,_ye=Wo?Symbol.for("react.block"):60121,Lye=Wo?Symbol.for("react.fundamental"):60117,Nye=Wo?Symbol.for("react.responder"):60118,Fye=Wo?Symbol.for("react.scope"):60119;function es(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ZL:switch(e=e.type,e){case tN:case bO:case hO:case gO:case mO:case xO:return e;default:switch(e=e&&e.$$typeof,e){case vO:case wO:case CO:case SO:case yO:return e;default:return t}}case eN:return t}}}function JK(e){return es(e)===bO}ar.AsyncMode=tN;ar.ConcurrentMode=bO;ar.ContextConsumer=vO;ar.ContextProvider=yO;ar.Element=ZL;ar.ForwardRef=wO;ar.Fragment=hO;ar.Lazy=CO;ar.Memo=SO;ar.Portal=eN;ar.Profiler=gO;ar.StrictMode=mO;ar.Suspense=xO;ar.isAsyncMode=function(e){return JK(e)||es(e)===tN};ar.isConcurrentMode=JK;ar.isContextConsumer=function(e){return es(e)===vO};ar.isContextProvider=function(e){return es(e)===yO};ar.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ZL};ar.isForwardRef=function(e){return es(e)===wO};ar.isFragment=function(e){return es(e)===hO};ar.isLazy=function(e){return es(e)===CO};ar.isMemo=function(e){return es(e)===SO};ar.isPortal=function(e){return es(e)===eN};ar.isProfiler=function(e){return es(e)===gO};ar.isStrictMode=function(e){return es(e)===mO};ar.isSuspense=function(e){return es(e)===xO};ar.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===hO||e===bO||e===gO||e===mO||e===xO||e===Dye||typeof e=="object"&&e!==null&&(e.$$typeof===CO||e.$$typeof===SO||e.$$typeof===yO||e.$$typeof===vO||e.$$typeof===wO||e.$$typeof===Lye||e.$$typeof===Nye||e.$$typeof===Fye||e.$$typeof===_ye)};ar.typeOf=es;QK.exports=ar;var jye=QK.exports,ZK=jye,Bye={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},zye={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eY={};eY[ZK.ForwardRef]=Bye;eY[ZK.Memo]=zye;var Vye=!0;function tY(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var nN=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||Vye===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},rN=function(t,n,r){nN(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function Hye(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Uye={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Wye=!1,Gye=/[A-Z]|^ms/g,qye=/_EMO_([^_]+?)_([^]*?)_EMO_/g,nY=function(t){return t.charCodeAt(1)===45},fH=function(t){return t!=null&&typeof t!="boolean"},yA=KK(function(e){return nY(e)?e:e.replace(Gye,"-$&").toLowerCase()}),pH=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(qye,function(r,o,i){return gc={name:o,styles:i,next:gc},o})}return Uye[t]!==1&&!nY(t)&&typeof n=="number"&&n!==0?n+"px":n},Kye="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ww(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return gc={name:o.name,styles:o.styles,next:gc},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)gc={name:a.name,styles:a.styles,next:gc},a=a.next;var s=i.styles+";";return s}return Yye(e,t,n)}case"function":{if(e!==void 0){var l=gc,c=n(e);return gc=l,ww(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function Yye(e,t,n){var r="";if(Array.isArray(n))for(var o=0;on.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Hs="$$material";var nve=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,rve=KK(function(e){return nve.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),ove=rve,ive=function(t){return t!=="theme"},gH=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?ove:ive},yH=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(a){return t.__emotion_forwardProp(a)&&i(a)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},ave=!1,sve=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return nN(n,r,o),oY(function(){return rN(n,r,o)}),null},lve=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,a;n!==void 0&&(i=n.label,a=n.target);var s=yH(t,n,r),l=s||gH(o),c=!l("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,p=1;pt(mve(o)?n:o):t;return $.jsx(tve,{styles:r})}/** + * @mui/styled-engine v6.3.0 * * @license MIT * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function fY(e,t){return $R(e,t)}function wve(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const vH=[];function bH(e){return vH[0]=e,Yx(vH)}function vc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function pY(e){if(y.isValidElement(e)||!vc(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=pY(e[n])}),t}function po(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return vc(e)&&vc(t)&&Object.keys(t).forEach(o=>{y.isValidElement(t[o])?r[o]=t[o]:vc(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&vc(e[o])?r[o]=po(e[o],t[o],n):n.clone?r[o]=vc(t[o])?pY(t[o]):t[o]:r[o]=t[o]}),r}const xve=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function Sve(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=xve(t),a=Object.keys(i);function s(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function c(f,p){const m=a.indexOf(p);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:p)-r/100}${n})`}function u(f){return a.indexOf(f)+1r.startsWith("@container")).sort((r,o)=>{var a,s;const i=/min-width:\s*([0-9.]+)/;return+(((a=r.match(i))==null?void 0:a[1])||0)-+(((s=o.match(i))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function Pve(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function Tve(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function Eve(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...s)=>t(e.breakpoints.up(...s),a),i.down=(...s)=>t(e.breakpoints.down(...s),a),i.between=(...s)=>t(e.breakpoints.between(...s),a),i.only=(...s)=>t(e.breakpoints.only(...s),a),i.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const Ove={borderRadius:4};function F0(e,t){return t?po(e,t,{clone:!1}):e}const IO={xs:0,sm:600,md:900,lg:1200,xl:1536},wH={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${IO[e]}px)`},Ive={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:IO[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function ql(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||wH;return t.reduce((a,s,l)=>(a[i.up(i.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const i=r.breakpoints||wH;return Object.keys(t).reduce((a,s)=>{if(Pve(i.keys,s)){const l=Tve(r.containerQueries?r:Ive,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(i.values||IO).includes(s)){const l=i.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function hY(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function mY(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function kve(e,...t){const n=hY(e),r=[n,...t].reduce((o,i)=>po(o,i),{});return mY(Object.keys(n),r)}function Mve(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i{e[o]!=null&&(n[o]=!0)}),n}function xA({values:e,breakpoints:t,base:n}){const r=n||Mve(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((a,s,l)=>(Array.isArray(e)?(a[s]=e[l]!=null?e[l]:e[i],i=l):typeof e=="object"?(a[s]=e[s]!=null?e[s]:e[i],i=s):a[s]=e,a),{})}function Se(e){if(typeof e!="string")throw new Error($u(7));return e.charAt(0).toUpperCase()+e.slice(1)}function kO(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function UP(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=kO(e,n)||r,t&&(o=t(o,r,e)),o}function ro(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=kO(l,r)||{};return ql(a,s,d=>{let f=UP(c,o,d);return d===f&&typeof d=="string"&&(f=UP(c,o,`${t}${d==="default"?"":Se(d)}`,d)),n===!1?f:{[n]:f}})};return i.propTypes={},i.filterProps=[t],i}function Ave(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const $ve={m:"margin",p:"padding"},Rve={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},xH={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},_ve=Ave(e=>{if(e.length>2)if(xH[e])e=xH[e];else return[e];const[t,n]=e.split(""),r=$ve[t],o=Rve[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),uL=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],dL=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...uL,...dL];function Jx(e,t,n,r){const o=kO(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i),s=o[a];return i>=0?s:typeof s=="number"?-s:`-${s}`}:typeof o=="function"?o:()=>{}}function MO(e){return Jx(e,"spacing",8)}function oh(e,t){return typeof t=="string"||t==null?t:e(t)}function Dve(e,t){return n=>e.reduce((r,o)=>(r[o]=oh(t,n),r),{})}function Nve(e,t,n,r){if(!t.includes(n))return null;const o=_ve(n),i=Dve(o,r),a=e[n];return ql(e,a,i)}function gY(e,t){const n=MO(e.theme);return Object.keys(e).map(r=>Nve(e,t,r,n)).reduce(F0,{})}function Wr(e){return gY(e,uL)}Wr.propTypes={};Wr.filterProps=uL;function Gr(e){return gY(e,dL)}Gr.propTypes={};Gr.filterProps=dL;function yY(e=8,t=MO({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function AO(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?F0(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Rs(e){return typeof e!="number"?e:`${e}px solid`}function ol(e,t){return ro({prop:e,themeKey:"borders",transform:t})}const Lve=ol("border",Rs),Fve=ol("borderTop",Rs),jve=ol("borderRight",Rs),Bve=ol("borderBottom",Rs),zve=ol("borderLeft",Rs),Vve=ol("borderColor"),Hve=ol("borderTopColor"),Uve=ol("borderRightColor"),Wve=ol("borderBottomColor"),Gve=ol("borderLeftColor"),qve=ol("outline",Rs),Kve=ol("outlineColor"),$O=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Jx(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:oh(t,r)});return ql(e,e.borderRadius,n)}return null};$O.propTypes={};$O.filterProps=["borderRadius"];AO(Lve,Fve,jve,Bve,zve,Vve,Hve,Uve,Wve,Gve,$O,qve,Kve);const RO=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Jx(e.theme,"spacing",8),n=r=>({gap:oh(t,r)});return ql(e,e.gap,n)}return null};RO.propTypes={};RO.filterProps=["gap"];const _O=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Jx(e.theme,"spacing",8),n=r=>({columnGap:oh(t,r)});return ql(e,e.columnGap,n)}return null};_O.propTypes={};_O.filterProps=["columnGap"];const DO=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Jx(e.theme,"spacing",8),n=r=>({rowGap:oh(t,r)});return ql(e,e.rowGap,n)}return null};DO.propTypes={};DO.filterProps=["rowGap"];const Yve=ro({prop:"gridColumn"}),Xve=ro({prop:"gridRow"}),Qve=ro({prop:"gridAutoFlow"}),Jve=ro({prop:"gridAutoColumns"}),Zve=ro({prop:"gridAutoRows"}),ebe=ro({prop:"gridTemplateColumns"}),tbe=ro({prop:"gridTemplateRows"}),nbe=ro({prop:"gridTemplateAreas"}),rbe=ro({prop:"gridArea"});AO(RO,_O,DO,Yve,Xve,Qve,Jve,Zve,ebe,tbe,nbe,rbe);function Ag(e,t){return t==="grey"?t:e}const obe=ro({prop:"color",themeKey:"palette",transform:Ag}),ibe=ro({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ag}),abe=ro({prop:"backgroundColor",themeKey:"palette",transform:Ag});AO(obe,ibe,abe);function ja(e){return e<=1&&e!==0?`${e*100}%`:e}const sbe=ro({prop:"width",transform:ja}),fL=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,i,a,s,l;const r=((a=(i=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:a[n])||IO[n];return r?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:ja(n)}};return ql(e,e.maxWidth,t)}return null};fL.filterProps=["maxWidth"];const lbe=ro({prop:"minWidth",transform:ja}),cbe=ro({prop:"height",transform:ja}),ube=ro({prop:"maxHeight",transform:ja}),dbe=ro({prop:"minHeight",transform:ja});ro({prop:"size",cssProperty:"width",transform:ja});ro({prop:"size",cssProperty:"height",transform:ja});const fbe=ro({prop:"boxSizing"});AO(sbe,fL,lbe,cbe,ube,dbe,fbe);const Zx={border:{themeKey:"borders",transform:Rs},borderTop:{themeKey:"borders",transform:Rs},borderRight:{themeKey:"borders",transform:Rs},borderBottom:{themeKey:"borders",transform:Rs},borderLeft:{themeKey:"borders",transform:Rs},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Rs},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:$O},color:{themeKey:"palette",transform:Ag},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ag},backgroundColor:{themeKey:"palette",transform:Ag},p:{style:Gr},pt:{style:Gr},pr:{style:Gr},pb:{style:Gr},pl:{style:Gr},px:{style:Gr},py:{style:Gr},padding:{style:Gr},paddingTop:{style:Gr},paddingRight:{style:Gr},paddingBottom:{style:Gr},paddingLeft:{style:Gr},paddingX:{style:Gr},paddingY:{style:Gr},paddingInline:{style:Gr},paddingInlineStart:{style:Gr},paddingInlineEnd:{style:Gr},paddingBlock:{style:Gr},paddingBlockStart:{style:Gr},paddingBlockEnd:{style:Gr},m:{style:Wr},mt:{style:Wr},mr:{style:Wr},mb:{style:Wr},ml:{style:Wr},mx:{style:Wr},my:{style:Wr},margin:{style:Wr},marginTop:{style:Wr},marginRight:{style:Wr},marginBottom:{style:Wr},marginLeft:{style:Wr},marginX:{style:Wr},marginY:{style:Wr},marginInline:{style:Wr},marginInlineStart:{style:Wr},marginInlineEnd:{style:Wr},marginBlock:{style:Wr},marginBlockStart:{style:Wr},marginBlockEnd:{style:Wr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:RO},rowGap:{style:DO},columnGap:{style:_O},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ja},maxWidth:{style:fL},minWidth:{transform:ja},height:{transform:ja},maxHeight:{transform:ja},minHeight:{transform:ja},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function pbe(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function hbe(e,t){return typeof e=="function"?e(t):e}function mbe(){function e(n,r,o,i){const a={[n]:r,theme:o},s=i[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:d}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const f=kO(o,c)||{};return d?d(a):ql(a,r,m=>{let g=UP(f,u,m);return m===g&&typeof m=="string"&&(g=UP(f,u,`${n}${m==="default"?"":Se(m)}`,m)),l===!1?g:{[l]:g}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??Zx;function a(s){let l=s;if(typeof s=="function")l=s(o);else if(typeof s!="object")return s;if(!l)return null;const c=hY(o.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(f=>{const p=hbe(l[f],o);if(p!=null)if(typeof p=="object")if(i[f])d=F0(d,e(f,p,o,i));else{const m=ql({theme:o},p,g=>({[f]:g}));pbe(m,p)?d[f]=t({sx:p,theme:o}):d=F0(d,m)}else d=F0(d,e(f,p,o,i))}),Cve(o,mY(u,d))}return Array.isArray(r)?r.map(a):a(r)}return t}const mf=mbe();mf.filterProps=["sx"];function gbe(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function gv(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,s=Sve(n),l=yY(o);let c=po({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...Ove,...i}},a);return c=Eve(c),c.applyStyles=gbe,c=t.reduce((u,d)=>po(u,d),c),c.unstable_sxConfig={...Zx,...a==null?void 0:a.unstable_sxConfig},c.unstable_sx=function(d){return mf({sx:d,theme:this})},c}function ybe(e){return Object.keys(e).length===0}function pL(e=null){const t=y.useContext(Xx);return!t||ybe(t)?e:t}const vbe=gv();function eS(e=vbe){return pL(e)}function bbe({styles:e,themeId:t,defaultTheme:n={}}){const r=eS(n),o=typeof e=="function"?e(t&&r[t]||r):e;return $.jsx(dY,{styles:o})}const wbe=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??Zx;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function NO(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=wbe(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...a)=>{const s=t(...a);return vc(s)?{...r,...s}:r}:i={...r,...t},{...o,sx:i}}const SH=e=>e,xbe=()=>{let e=SH;return{configure(t){e=t},generate(t){return e(t)},reset(){e=SH}}},vY=xbe();function bY(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ts!=="theme"&&s!=="sx"&&s!=="as"})(mf);return y.forwardRef(function(l,c){const u=eS(n),{className:d,component:f="div",...p}=NO(l);return $.jsx(i,{as:f,ref:c,className:fe(d,o?o(r):r),theme:t&&u[t]||u,...p})})}const Cbe={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ne(e,t,n="Mui"){const r=Cbe[t];return r?`${n}-${r}`:`${vY.generate(e)}-${t}`}function Le(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Ne(e,o,n)}),r}var wY={exports:{}},or={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var hL=Symbol.for("react.element"),mL=Symbol.for("react.portal"),LO=Symbol.for("react.fragment"),FO=Symbol.for("react.strict_mode"),jO=Symbol.for("react.profiler"),BO=Symbol.for("react.provider"),zO=Symbol.for("react.context"),Pbe=Symbol.for("react.server_context"),VO=Symbol.for("react.forward_ref"),HO=Symbol.for("react.suspense"),UO=Symbol.for("react.suspense_list"),WO=Symbol.for("react.memo"),GO=Symbol.for("react.lazy"),Tbe=Symbol.for("react.offscreen"),xY;xY=Symbol.for("react.module.reference");function il(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case hL:switch(e=e.type,e){case LO:case jO:case FO:case HO:case UO:return e;default:switch(e=e&&e.$$typeof,e){case Pbe:case zO:case VO:case GO:case WO:case BO:return e;default:return t}}case mL:return t}}}or.ContextConsumer=zO;or.ContextProvider=BO;or.Element=hL;or.ForwardRef=VO;or.Fragment=LO;or.Lazy=GO;or.Memo=WO;or.Portal=mL;or.Profiler=jO;or.StrictMode=FO;or.Suspense=HO;or.SuspenseList=UO;or.isAsyncMode=function(){return!1};or.isConcurrentMode=function(){return!1};or.isContextConsumer=function(e){return il(e)===zO};or.isContextProvider=function(e){return il(e)===BO};or.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===hL};or.isForwardRef=function(e){return il(e)===VO};or.isFragment=function(e){return il(e)===LO};or.isLazy=function(e){return il(e)===GO};or.isMemo=function(e){return il(e)===WO};or.isPortal=function(e){return il(e)===mL};or.isProfiler=function(e){return il(e)===jO};or.isStrictMode=function(e){return il(e)===FO};or.isSuspense=function(e){return il(e)===HO};or.isSuspenseList=function(e){return il(e)===UO};or.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===LO||e===jO||e===FO||e===HO||e===UO||e===Tbe||typeof e=="object"&&e!==null&&(e.$$typeof===GO||e.$$typeof===WO||e.$$typeof===BO||e.$$typeof===zO||e.$$typeof===VO||e.$$typeof===xY||e.getModuleId!==void 0)};or.typeOf=il;wY.exports=or;var Ebe=wY.exports;function SY(e){const{variants:t,...n}=e,r={variants:t,style:bH(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=bH(o.style))}),r}const Obe=gv();function dP(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Ibe(e){return e?(t,n)=>n[e]:null}function kbe(e,t,n){e.theme=Abe(e.theme)?n:e.theme[t]||e.theme}function fP(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>fP(e,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:o,...i}=n;r=i}return CY(e,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function CY(e,t,n=[]){var o;let r;e:for(let i=0;i{wve(s,T=>T.filter(E=>E!==mf));const{name:c,slot:u,skipVariantsResolver:d,skipSx:f,overridesResolver:p=Ibe(Rbe(u)),...m}=l,g=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,v=f||!1;let w=dP;u==="Root"||u==="root"?w=r:u?w=o:$be(s)&&(w=void 0);const x=fY(s,{shouldForwardProp:w,label:Mbe(),...m}),S=T=>{if(typeof T=="function"&&T.__emotion_real!==T)return function(O){return fP(O,T)};if(vc(T)){const E=SY(T);return E.variants?function(k){return fP(k,E)}:E.style}return T},P=(...T)=>{const E=[],O=T.map(S),k=[];if(E.push(i),c&&p&&k.push(function(L){var D,H;const z=(H=(D=L.theme.components)==null?void 0:D[c])==null?void 0:H.styleOverrides;if(!z)return null;const _={};for(const B in z)_[B]=fP(L,z[B]);return p(L,_)}),c&&!g&&k.push(function(L){var _,D;const F=L.theme,z=(D=(_=F==null?void 0:F.components)==null?void 0:_[c])==null?void 0:D.variants;return z?CY(L,z):null}),v||k.push(mf),Array.isArray(O[0])){const R=O.shift(),L=new Array(E.length).fill(""),F=new Array(k.length).fill("");let z;z=[...L,...R,...F],z.raw=[...L,...R.raw,...F],E.unshift(z)}const A=[...E,...O,...k],I=x(...A);return s.muiName&&(I.muiName=s.muiName),I};return x.withConfig&&(P.withConfig=x.withConfig),P}}function Mbe(e,t){return void 0}function Abe(e){for(const t in e)return!1;return!0}function $be(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Rbe(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Yn=PY();function ih(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)n[o]=i||{};else if(!i)n[o]=a;else{n[o]={...a};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const l=s;n[o][l]=ih(i[l],a[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}function TY(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:ih(t.components[n].defaultProps,r)}function qO({props:e,name:t,defaultTheme:n,themeId:r}){let o=eS(n);return r&&(o=o[r]||o),TY({theme:o,name:t,props:e})}const wn=typeof window<"u"?y.useLayoutEffect:y.useEffect;function _be(e,t,n,r,o){const[i,a]=y.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return wn(()=>{if(!n)return;const s=n(e),l=()=>{a(s.matches)};return l(),s.addEventListener("change",l),()=>{s.removeEventListener("change",l)}},[e,n]),i}const Dbe={...yw},EY=Dbe.useSyncExternalStore;function Nbe(e,t,n,r,o){const i=y.useCallback(()=>t,[t]),a=y.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(r!==null){const{matches:u}=r(e);return()=>u}return i},[i,e,r,o,n]),[s,l]=y.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const u=n(e);return[()=>u.matches,d=>(u.addEventListener("change",d),()=>{u.removeEventListener("change",d)})]},[i,n,e]);return EY(l,s,a)}function Lbe(e={}){const{themeId:t}=e;return function(r,o={}){let i=pL();i&&t&&(i=i[t]||i);const a=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:s=!1,matchMedia:l=a?window.matchMedia:null,ssrMatchMedia:c=null,noSsr:u=!1}=TY({name:"MuiUseMediaQuery",props:o,theme:i});let d=typeof r=="function"?r(i):r;return d=d.replace(/^@media( ?)/m,""),(EY!==void 0?Nbe:_be)(d,s,l,c,u)}}function Fbe(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function gL(e,t=0,n=1){return Fbe(e,t,n)}function jbe(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Rc(e){if(e.type)return e;if(e.charAt(0)==="#")return Rc(jbe(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error($u(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error($u(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const Bbe=e=>{const t=Rc(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},v0=(e,t)=>{try{return Bbe(e)}catch{return e}};function tS(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function OY(e){e=Rc(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(c,u=(c+n/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),tS({type:s,values:l})}function RR(e){e=Rc(e);let t=e.type==="hsl"||e.type==="hsla"?Rc(OY(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function zbe(e,t){const n=RR(e),r=RR(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function vt(e,t){return e=Rc(e),t=gL(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,tS(e)}function X1(e,t,n){try{return vt(e,t)}catch{return e}}function Ru(e,t){if(e=Rc(e),t=gL(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return tS(e)}function ur(e,t,n){try{return Ru(e,t)}catch{return e}}function _u(e,t){if(e=Rc(e),t=gL(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return tS(e)}function dr(e,t,n){try{return _u(e,t)}catch{return e}}function IY(e,t=.15){return RR(e)>.5?Ru(e,t):_u(e,t)}function Q1(e,t,n){try{return IY(e,t)}catch{return e}}const yv=j.oneOfType([j.func,j.object]);function CH(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function nS(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function $g(e,t){var n,r,o;return y.isValidElement(e)&&t.indexOf(e.type.muiName??((o=(r=(n=e.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}function pr(e){return e&&e.ownerDocument||document}function ba(e){return pr(e).defaultView||window}function WP(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let PH=0;function Vbe(e){const[t,n]=y.useState(e),r=e||t;return y.useEffect(()=>{t==null&&(PH+=1,n(`mui-${PH}`))},[t]),r}const Hbe={...yw},TH=Hbe.useId;function Ln(e){if(TH!==void 0){const t=TH();return e??t}return Vbe(e)}function vi({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=y.useRef(e!==void 0),[i,a]=y.useState(t),s=o?e:i,l=y.useCallback(c=>{o||a(c)},[]);return[s,l]}function et(e){const t=y.useRef(e);return wn(()=>{t.current=e}),y.useRef((...n)=>(0,t.current)(...n)).current}function Wt(...e){return y.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{WP(n,t)})},e)}const EH={};function Zl(e,t){const n=y.useRef(EH);return n.current===EH&&(n.current=e(t)),n}const Ube=[];function KO(e){y.useEffect(e,Ube)}class YO{constructor(){dn(this,"currentId",null);dn(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});dn(this,"disposeEffect",()=>this.clear)}static create(){return new YO}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function ca(){const e=Zl(YO.create).current;return KO(e.disposeEffect),e}function GP(e){try{return e.matches(":focus-visible")}catch{}return!1}function kY(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}const yL=e=>{const t=y.useRef({});return y.useEffect(()=>{t.current=e}),t.current};function MY(e){return y.Children.toArray(e).filter(t=>y.isValidElement(t))}const Wbe={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Te(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;lr.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function OH(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function $Y(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const p=fe(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),m={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},g={...n,...o,...r};return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=qP({...o,...r}),s=OH(r),l=OH(o),c=t(a),u=fe(c==null?void 0:c.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d={...c==null?void 0:c.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function Du(e,t,n){return typeof e=="function"?e(t,n):e}function on(e){var d;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:Du(n,r),{props:s,internalRef:l}=$Y({...i,externalSlotProps:a}),c=Wt(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return AY(t,{...s,ref:c},r)}function Ef(e){var t;return parseInt(y.version,10)>=19?((t=e==null?void 0:e.props)==null?void 0:t.ref)||null:(e==null?void 0:e.ref)||null}const RY=y.createContext(null);function XO(){return y.useContext(RY)}const qbe=typeof Symbol=="function"&&Symbol.for,_Y=qbe?Symbol.for("mui.nested"):"__THEME_NESTED__";function Kbe(e,t){return typeof t=="function"?t(e):{...e,...t}}function Ybe(e){const{children:t,theme:n}=e,r=XO(),o=y.useMemo(()=>{const i=r===null?{...n}:Kbe(r,n);return i!=null&&(i[_Y]=r!==null),i},[n,r]);return $.jsx(RY.Provider,{value:o,children:t})}const DY=y.createContext();function Xbe({value:e,...t}){return $.jsx(DY.Provider,{value:e??!0,...t})}const er=()=>y.useContext(DY)??!1,NY=y.createContext(void 0);function Qbe({value:e,children:t}){return $.jsx(NY.Provider,{value:e,children:t})}function Jbe(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?ih(o.defaultProps,r):!o.styleOverrides&&!o.variants?ih(o,r):r}function Zbe({props:e,name:t}){const n=y.useContext(NY);return Jbe({props:e,name:t,theme:{components:n}})}const IH={};function kH(e,t,n,r=!1){return y.useMemo(()=>{const o=e&&t[e]||t;if(typeof n=="function"){const i=n(o),a=e?{...t,[e]:i}:i;return r?()=>a:a}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function LY(e){const{children:t,theme:n,themeId:r}=e,o=pL(IH),i=XO()||IH,a=kH(r,o,n),s=kH(r,i,n,!0),l=(r?a[r]:a).direction==="rtl";return $.jsx(Ybe,{theme:s,children:$.jsx(Xx.Provider,{value:a,children:$.jsx(Xbe,{value:l,children:$.jsx(Qbe,{value:r?a[r].components:a.components,children:t})})})})}const MH={theme:void 0};function e0e(e){let t,n;return function(o){let i=t;return(i===void 0||o.theme!==n)&&(MH.theme=o.theme,i=SY(e(MH)),t=i,n=o.theme),i}}const vL="mode",bL="color-scheme",t0e="data-color-scheme";function n0e(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=vL,colorSchemeStorageKey:i=bL,attribute:a=t0e,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if(a==="class"&&(u=".%s"),a==="data"&&(u="[data-%s]"),u.startsWith(".")){const f=u.substring(1);c+=`${s}.classList.remove('${f}'.replace('%s', light), '${f}'.replace('%s', dark)); + */function uY(e,t){return MR(e,t)}function gve(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const vH=[];function bH(e){return vH[0]=e,Yx(vH)}function vc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dY(e){if(v.isValidElement(e)||!vc(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=dY(e[n])}),t}function mo(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return vc(e)&&vc(t)&&Object.keys(t).forEach(o=>{v.isValidElement(t[o])?r[o]=t[o]:vc(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&vc(e[o])?r[o]=mo(e[o],t[o],n):n.clone?r[o]=vc(t[o])?dY(t[o]):t[o]:r[o]=t[o]}),r}const yve=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function vve(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=yve(t),a=Object.keys(i);function s(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function c(f,p){const m=a.indexOf(p);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:p)-r/100}${n})`}function u(f){return a.indexOf(f)+1r.startsWith("@container")).sort((r,o)=>{var a,s;const i=/min-width:\s*([0-9.]+)/;return+(((a=r.match(i))==null?void 0:a[1])||0)-+(((s=o.match(i))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function wve(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function xve(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function Sve(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...s)=>t(e.breakpoints.up(...s),a),i.down=(...s)=>t(e.breakpoints.down(...s),a),i.between=(...s)=>t(e.breakpoints.between(...s),a),i.only=(...s)=>t(e.breakpoints.only(...s),a),i.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const Cve={borderRadius:4};function F0(e,t){return t?mo(e,t,{clone:!1}):e}const PO={xs:0,sm:600,md:900,lg:1200,xl:1536},wH={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${PO[e]}px)`},Pve={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:PO[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Gl(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||wH;return t.reduce((a,s,l)=>(a[i.up(i.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const i=r.breakpoints||wH;return Object.keys(t).reduce((a,s)=>{if(wve(i.keys,s)){const l=xve(r.containerQueries?r:Pve,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(i.values||PO).includes(s)){const l=i.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function fY(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function pY(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function Eve(e,...t){const n=fY(e),r=[n,...t].reduce((o,i)=>mo(o,i),{});return pY(Object.keys(n),r)}function Tve(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i{e[o]!=null&&(n[o]=!0)}),n}function vA({values:e,breakpoints:t,base:n}){const r=n||Tve(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((a,s,l)=>(Array.isArray(e)?(a[s]=e[l]!=null?e[l]:e[i],i=l):typeof e=="object"?(a[s]=e[s]!=null?e[s]:e[i],i=s):a[s]=e,a),{})}function Se(e){if(typeof e!="string")throw new Error($u(7));return e.charAt(0).toUpperCase()+e.slice(1)}function EO(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function VP(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=EO(e,n)||r,t&&(o=t(o,r,e)),o}function ao(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=EO(l,r)||{};return Gl(a,s,d=>{let f=VP(c,o,d);return d===f&&typeof d=="string"&&(f=VP(c,o,`${t}${d==="default"?"":Se(d)}`,d)),n===!1?f:{[n]:f}})};return i.propTypes={},i.filterProps=[t],i}function Ove(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Ive={m:"margin",p:"padding"},kve={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},xH={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Mve=Ove(e=>{if(e.length>2)if(xH[e])e=xH[e];else return[e];const[t,n]=e.split(""),r=Ive[t],o=kve[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),lN=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],cN=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...lN,...cN];function Jx(e,t,n,r){const o=EO(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i),s=o[a];return i>=0?s:typeof s=="number"?-s:`-${s}`}:typeof o=="function"?o:()=>{}}function TO(e){return Jx(e,"spacing",8)}function oh(e,t){return typeof t=="string"||t==null?t:e(t)}function Ave(e,t){return n=>e.reduce((r,o)=>(r[o]=oh(t,n),r),{})}function $ve(e,t,n,r){if(!t.includes(n))return null;const o=Mve(n),i=Ave(o,r),a=e[n];return Gl(e,a,i)}function hY(e,t){const n=TO(e.theme);return Object.keys(e).map(r=>$ve(e,t,r,n)).reduce(F0,{})}function qr(e){return hY(e,lN)}qr.propTypes={};qr.filterProps=lN;function Kr(e){return hY(e,cN)}Kr.propTypes={};Kr.filterProps=cN;function mY(e=8,t=TO({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function OO(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?F0(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function $s(e){return typeof e!="number"?e:`${e}px solid`}function rl(e,t){return ao({prop:e,themeKey:"borders",transform:t})}const Rve=rl("border",$s),Dve=rl("borderTop",$s),_ve=rl("borderRight",$s),Lve=rl("borderBottom",$s),Nve=rl("borderLeft",$s),Fve=rl("borderColor"),jve=rl("borderTopColor"),Bve=rl("borderRightColor"),zve=rl("borderBottomColor"),Vve=rl("borderLeftColor"),Hve=rl("outline",$s),Uve=rl("outlineColor"),IO=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Jx(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:oh(t,r)});return Gl(e,e.borderRadius,n)}return null};IO.propTypes={};IO.filterProps=["borderRadius"];OO(Rve,Dve,_ve,Lve,Nve,Fve,jve,Bve,zve,Vve,IO,Hve,Uve);const kO=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Jx(e.theme,"spacing",8),n=r=>({gap:oh(t,r)});return Gl(e,e.gap,n)}return null};kO.propTypes={};kO.filterProps=["gap"];const MO=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Jx(e.theme,"spacing",8),n=r=>({columnGap:oh(t,r)});return Gl(e,e.columnGap,n)}return null};MO.propTypes={};MO.filterProps=["columnGap"];const AO=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Jx(e.theme,"spacing",8),n=r=>({rowGap:oh(t,r)});return Gl(e,e.rowGap,n)}return null};AO.propTypes={};AO.filterProps=["rowGap"];const Wve=ao({prop:"gridColumn"}),Gve=ao({prop:"gridRow"}),qve=ao({prop:"gridAutoFlow"}),Kve=ao({prop:"gridAutoColumns"}),Yve=ao({prop:"gridAutoRows"}),Xve=ao({prop:"gridTemplateColumns"}),Qve=ao({prop:"gridTemplateRows"}),Jve=ao({prop:"gridTemplateAreas"}),Zve=ao({prop:"gridArea"});OO(kO,MO,AO,Wve,Gve,qve,Kve,Yve,Xve,Qve,Jve,Zve);function Ag(e,t){return t==="grey"?t:e}const ebe=ao({prop:"color",themeKey:"palette",transform:Ag}),tbe=ao({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ag}),nbe=ao({prop:"backgroundColor",themeKey:"palette",transform:Ag});OO(ebe,tbe,nbe);function Ba(e){return e<=1&&e!==0?`${e*100}%`:e}const rbe=ao({prop:"width",transform:Ba}),uN=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,i,a,s,l;const r=((a=(i=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:a[n])||PO[n];return r?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Ba(n)}};return Gl(e,e.maxWidth,t)}return null};uN.filterProps=["maxWidth"];const obe=ao({prop:"minWidth",transform:Ba}),ibe=ao({prop:"height",transform:Ba}),abe=ao({prop:"maxHeight",transform:Ba}),sbe=ao({prop:"minHeight",transform:Ba});ao({prop:"size",cssProperty:"width",transform:Ba});ao({prop:"size",cssProperty:"height",transform:Ba});const lbe=ao({prop:"boxSizing"});OO(rbe,uN,obe,ibe,abe,sbe,lbe);const Zx={border:{themeKey:"borders",transform:$s},borderTop:{themeKey:"borders",transform:$s},borderRight:{themeKey:"borders",transform:$s},borderBottom:{themeKey:"borders",transform:$s},borderLeft:{themeKey:"borders",transform:$s},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:$s},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:IO},color:{themeKey:"palette",transform:Ag},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ag},backgroundColor:{themeKey:"palette",transform:Ag},p:{style:Kr},pt:{style:Kr},pr:{style:Kr},pb:{style:Kr},pl:{style:Kr},px:{style:Kr},py:{style:Kr},padding:{style:Kr},paddingTop:{style:Kr},paddingRight:{style:Kr},paddingBottom:{style:Kr},paddingLeft:{style:Kr},paddingX:{style:Kr},paddingY:{style:Kr},paddingInline:{style:Kr},paddingInlineStart:{style:Kr},paddingInlineEnd:{style:Kr},paddingBlock:{style:Kr},paddingBlockStart:{style:Kr},paddingBlockEnd:{style:Kr},m:{style:qr},mt:{style:qr},mr:{style:qr},mb:{style:qr},ml:{style:qr},mx:{style:qr},my:{style:qr},margin:{style:qr},marginTop:{style:qr},marginRight:{style:qr},marginBottom:{style:qr},marginLeft:{style:qr},marginX:{style:qr},marginY:{style:qr},marginInline:{style:qr},marginInlineStart:{style:qr},marginInlineEnd:{style:qr},marginBlock:{style:qr},marginBlockStart:{style:qr},marginBlockEnd:{style:qr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:kO},rowGap:{style:AO},columnGap:{style:MO},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ba},maxWidth:{style:uN},minWidth:{transform:Ba},height:{transform:Ba},maxHeight:{transform:Ba},minHeight:{transform:Ba},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function cbe(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function ube(e,t){return typeof e=="function"?e(t):e}function dbe(){function e(n,r,o,i){const a={[n]:r,theme:o},s=i[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:d}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const f=EO(o,c)||{};return d?d(a):Gl(a,r,m=>{let g=VP(f,u,m);return m===g&&typeof m=="string"&&(g=VP(f,u,`${n}${m==="default"?"":Se(m)}`,m)),l===!1?g:{[l]:g}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??Zx;function a(s){let l=s;if(typeof s=="function")l=s(o);else if(typeof s!="object")return s;if(!l)return null;const c=fY(o.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(f=>{const p=ube(l[f],o);if(p!=null)if(typeof p=="object")if(i[f])d=F0(d,e(f,p,o,i));else{const m=Gl({theme:o},p,g=>({[f]:g}));cbe(m,p)?d[f]=t({sx:p,theme:o}):d=F0(d,m)}else d=F0(d,e(f,p,o,i))}),bve(o,pY(u,d))}return Array.isArray(r)?r.map(a):a(r)}return t}const mf=dbe();mf.filterProps=["sx"];function fbe(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function hv(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,s=vve(n),l=mY(o);let c=mo({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...Cve,...i}},a);return c=Sve(c),c.applyStyles=fbe,c=t.reduce((u,d)=>mo(u,d),c),c.unstable_sxConfig={...Zx,...a==null?void 0:a.unstable_sxConfig},c.unstable_sx=function(d){return mf({sx:d,theme:this})},c}function pbe(e){return Object.keys(e).length===0}function dN(e=null){const t=v.useContext(Xx);return!t||pbe(t)?e:t}const hbe=hv();function eS(e=hbe){return dN(e)}function mbe({styles:e,themeId:t,defaultTheme:n={}}){const r=eS(n),o=typeof e=="function"?e(t&&r[t]||r):e;return $.jsx(cY,{styles:o})}const gbe=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??Zx;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function $O(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=gbe(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...a)=>{const s=t(...a);return vc(s)?{...r,...s}:r}:i={...r,...t},{...o,sx:i}}const SH=e=>e,ybe=()=>{let e=SH;return{configure(t){e=t},generate(t){return e(t)},reset(){e=SH}}},gY=ybe();function yY(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ts!=="theme"&&s!=="sx"&&s!=="as"})(mf);return v.forwardRef(function(l,c){const u=eS(n),{className:d,component:f="div",...p}=$O(l);return $.jsx(i,{as:f,ref:c,className:pe(d,o?o(r):r),theme:t&&u[t]||u,...p})})}const bbe={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function _e(e,t,n="Mui"){const r=bbe[t];return r?`${n}-${r}`:`${gY.generate(e)}-${t}`}function Le(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=_e(e,o,n)}),r}function vY(e){const{variants:t,...n}=e,r={variants:t,style:bH(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=bH(o.style))}),r}const wbe=hv();function cP(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function xbe(e){return e?(t,n)=>n[e]:null}function Sbe(e,t,n){e.theme=Pbe(e.theme)?n:e.theme[t]||e.theme}function uP(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>uP(e,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:o,...i}=n;r=i}return bY(e,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function bY(e,t,n=[]){var o;let r;e:for(let i=0;i{gve(s,E=>E.filter(T=>T!==mf));const{name:c,slot:u,skipVariantsResolver:d,skipSx:f,overridesResolver:p=xbe(Tbe(u)),...m}=l,g=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,y=f||!1;let b=cP;u==="Root"||u==="root"?b=r:u?b=o:Ebe(s)&&(b=void 0);const x=uY(s,{shouldForwardProp:b,label:Cbe(),...m}),S=E=>{if(typeof E=="function"&&E.__emotion_real!==E)return function(O){return uP(O,E)};if(vc(E)){const T=vY(E);return T.variants?function(k){return uP(k,T)}:T.style}return E},P=(...E)=>{const T=[],O=E.map(S),k=[];if(T.push(i),c&&p&&k.push(function(_){var F,U;const B=(U=(F=_.theme.components)==null?void 0:F[c])==null?void 0:U.styleOverrides;if(!B)return null;const L={};for(const V in B)L[V]=uP(_,B[V]);return p(_,L)}),c&&!g&&k.push(function(_){var L,F;const N=_.theme,B=(F=(L=N==null?void 0:N.components)==null?void 0:L[c])==null?void 0:F.variants;return B?bY(_,B):null}),y||k.push(mf),Array.isArray(O[0])){const R=O.shift(),_=new Array(T.length).fill(""),N=new Array(k.length).fill("");let B;B=[..._,...R,...N],B.raw=[..._,...R.raw,...N],T.unshift(B)}const M=[...T,...O,...k],I=x(...M);return s.muiName&&(I.muiName=s.muiName),I};return x.withConfig&&(P.withConfig=x.withConfig),P}}function Cbe(e,t){return void 0}function Pbe(e){for(const t in e)return!1;return!0}function Ebe(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Tbe(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Qn=wY();function ih(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)n[o]=i||{};else if(!i)n[o]=a;else{n[o]={...a};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const l=s;n[o][l]=ih(i[l],a[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}function xY(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:ih(t.components[n].defaultProps,r)}function RO({props:e,name:t,defaultTheme:n,themeId:r}){let o=eS(n);return r&&(o=o[r]||o),xY({theme:o,name:t,props:e})}const xn=typeof window<"u"?v.useLayoutEffect:v.useEffect;function Obe(e,t,n,r,o){const[i,a]=v.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return xn(()=>{if(!n)return;const s=n(e),l=()=>{a(s.matches)};return l(),s.addEventListener("change",l),()=>{s.removeEventListener("change",l)}},[e,n]),i}const Ibe={...yw},SY=Ibe.useSyncExternalStore;function kbe(e,t,n,r,o){const i=v.useCallback(()=>t,[t]),a=v.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(r!==null){const{matches:u}=r(e);return()=>u}return i},[i,e,r,o,n]),[s,l]=v.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const u=n(e);return[()=>u.matches,d=>(u.addEventListener("change",d),()=>{u.removeEventListener("change",d)})]},[i,n,e]);return SY(l,s,a)}function Mbe(e={}){const{themeId:t}=e;return function(r,o={}){let i=dN();i&&t&&(i=i[t]||i);const a=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:s=!1,matchMedia:l=a?window.matchMedia:null,ssrMatchMedia:c=null,noSsr:u=!1}=xY({name:"MuiUseMediaQuery",props:o,theme:i});let d=typeof r=="function"?r(i):r;return d=d.replace(/^@media( ?)/m,""),(SY!==void 0?kbe:Obe)(d,s,l,c,u)}}function Abe(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function fN(e,t=0,n=1){return Abe(e,t,n)}function $be(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Rc(e){if(e.type)return e;if(e.charAt(0)==="#")return Rc($be(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error($u(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error($u(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const Rbe=e=>{const t=Rc(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},v0=(e,t)=>{try{return Rbe(e)}catch{return e}};function tS(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function CY(e){e=Rc(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(c,u=(c+n/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),tS({type:s,values:l})}function AR(e){e=Rc(e);let t=e.type==="hsl"||e.type==="hsla"?Rc(CY(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Dbe(e,t){const n=AR(e),r=AR(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function vt(e,t){return e=Rc(e),t=fN(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,tS(e)}function Y1(e,t,n){try{return vt(e,t)}catch{return e}}function Ru(e,t){if(e=Rc(e),t=fN(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return tS(e)}function fr(e,t,n){try{return Ru(e,t)}catch{return e}}function Du(e,t){if(e=Rc(e),t=fN(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return tS(e)}function pr(e,t,n){try{return Du(e,t)}catch{return e}}function PY(e,t=.15){return AR(e)>.5?Ru(e,t):Du(e,t)}function X1(e,t,n){try{return PY(e,t)}catch{return e}}const mv=j.oneOfType([j.func,j.object]);function CH(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function nS(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function $g(e,t){var n,r,o;return v.isValidElement(e)&&t.indexOf(e.type.muiName??((o=(r=(n=e.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}function mr(e){return e&&e.ownerDocument||document}function ba(e){return mr(e).defaultView||window}function HP(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let PH=0;function _be(e){const[t,n]=v.useState(e),r=e||t;return v.useEffect(()=>{t==null&&(PH+=1,n(`mui-${PH}`))},[t]),r}const Lbe={...yw},EH=Lbe.useId;function _n(e){if(EH!==void 0){const t=EH();return e??t}return _be(e)}function bi({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=v.useRef(e!==void 0),[i,a]=v.useState(t),s=o?e:i,l=v.useCallback(c=>{o||a(c)},[]);return[s,l]}function Ze(e){const t=v.useRef(e);return xn(()=>{t.current=e}),v.useRef((...n)=>(0,t.current)(...n)).current}function Wt(...e){return v.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{HP(n,t)})},e)}const TH={};function Jl(e,t){const n=v.useRef(TH);return n.current===TH&&(n.current=e(t)),n}const Nbe=[];function DO(e){v.useEffect(e,Nbe)}class _O{constructor(){pn(this,"currentId",null);pn(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});pn(this,"disposeEffect",()=>this.clear)}static create(){return new _O}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function la(){const e=Jl(_O.create).current;return DO(e.disposeEffect),e}function UP(e){try{return e.matches(":focus-visible")}catch{}return!1}function EY(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}const pN=e=>{const t=v.useRef({});return v.useEffect(()=>{t.current=e}),t.current};function TY(e){return v.Children.toArray(e).filter(t=>v.isValidElement(t))}const Fbe={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Te(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;lr.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function OH(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function IY(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const p=pe(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),m={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},g={...n,...o,...r};return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=WP({...o,...r}),s=OH(r),l=OH(o),c=t(a),u=pe(c==null?void 0:c.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d={...c==null?void 0:c.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function _u(e,t,n){return typeof e=="function"?e(t,n):e}function on(e){var d;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:_u(n,r),{props:s,internalRef:l}=IY({...i,externalSlotProps:a}),c=Wt(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return OY(t,{...s,ref:c},r)}function Tf(e){var t;return parseInt(v.version,10)>=19?((t=e==null?void 0:e.props)==null?void 0:t.ref)||null:(e==null?void 0:e.ref)||null}const kY=v.createContext(null);function LO(){return v.useContext(kY)}const Bbe=typeof Symbol=="function"&&Symbol.for,MY=Bbe?Symbol.for("mui.nested"):"__THEME_NESTED__";function zbe(e,t){return typeof t=="function"?t(e):{...e,...t}}function Vbe(e){const{children:t,theme:n}=e,r=LO(),o=v.useMemo(()=>{const i=r===null?{...n}:zbe(r,n);return i!=null&&(i[MY]=r!==null),i},[n,r]);return $.jsx(kY.Provider,{value:o,children:t})}const AY=v.createContext();function Hbe({value:e,...t}){return $.jsx(AY.Provider,{value:e??!0,...t})}const nr=()=>v.useContext(AY)??!1,$Y=v.createContext(void 0);function Ube({value:e,children:t}){return $.jsx($Y.Provider,{value:e,children:t})}function Wbe(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?ih(o.defaultProps,r):!o.styleOverrides&&!o.variants?ih(o,r):r}function Gbe({props:e,name:t}){const n=v.useContext($Y);return Wbe({props:e,name:t,theme:{components:n}})}const IH={};function kH(e,t,n,r=!1){return v.useMemo(()=>{const o=e&&t[e]||t;if(typeof n=="function"){const i=n(o),a=e?{...t,[e]:i}:i;return r?()=>a:a}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function RY(e){const{children:t,theme:n,themeId:r}=e,o=dN(IH),i=LO()||IH,a=kH(r,o,n),s=kH(r,i,n,!0),l=(r?a[r]:a).direction==="rtl";return $.jsx(Vbe,{theme:s,children:$.jsx(Xx.Provider,{value:a,children:$.jsx(Hbe,{value:l,children:$.jsx(Ube,{value:r?a[r].components:a.components,children:t})})})})}const MH={theme:void 0};function qbe(e){let t,n;return function(o){let i=t;return(i===void 0||o.theme!==n)&&(MH.theme=o.theme,i=vY(e(MH)),t=i,n=o.theme),i}}const hN="mode",mN="color-scheme",Kbe="data-color-scheme";function Ybe(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=hN,colorSchemeStorageKey:i=mN,attribute:a=Kbe,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if(a==="class"&&(u=".%s"),a==="data"&&(u="[data-%s]"),u.startsWith(".")){const f=u.substring(1);c+=`${s}.classList.remove('${f}'.replace('%s', light), '${f}'.replace('%s', dark)); ${s}.classList.add('${f}'.replace('%s', colorScheme));`}const d=u.match(/\[([^\]]+)\]/);if(d){const[f,p]=d[1].split("=");p||(c+=`${s}.removeAttribute('${f}'.replace('%s', light)); ${s}.removeAttribute('${f}'.replace('%s', dark));`),c+=` ${s}.setAttribute('${f}'.replace('%s', colorScheme), ${p?`${p}.replace('%s', colorScheme)`:'""'});`}else c+=`${s}.setAttribute('${u}', colorScheme);`;return $.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(function() { @@ -62,15 +54,15 @@ try { if (colorScheme) { ${c} } -} catch(e){}})();`}},"mui-color-scheme-init")}function AH(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function FY(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function r0e(e){return FY(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function SA(e,t){if(typeof window>"u")return;let n;try{n=localStorage.getItem(e)||void 0,n||localStorage.setItem(e,t)}catch{}return n||t}function o0e(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:i=vL,colorSchemeStorageKey:a=bL,storageWindow:s=typeof window>"u"?void 0:window,noSsr:l=!1}=e,c=o.join(","),u=o.length>1,[d,f]=y.useState(()=>{const P=SA(i,t),T=SA(`${a}-light`,n),E=SA(`${a}-dark`,r);return{mode:P,systemMode:AH(P),lightColorScheme:T,darkColorScheme:E}}),[p,m]=y.useState(l||!u);y.useEffect(()=>{m(!0)},[]);const g=r0e(d),v=y.useCallback(P=>{f(T=>{if(P===T.mode)return T;const E=P??t;try{localStorage.setItem(i,E)}catch{}return{...T,mode:E,systemMode:AH(E)}})},[i,t]),w=y.useCallback(P=>{P?typeof P=="string"?P&&!c.includes(P)?console.error(`\`${P}\` does not exist in \`theme.colorSchemes\`.`):f(T=>{const E={...T};return FY(T,O=>{try{localStorage.setItem(`${a}-${O}`,P)}catch{}O==="light"&&(E.lightColorScheme=P),O==="dark"&&(E.darkColorScheme=P)}),E}):f(T=>{const E={...T},O=P.light===null?n:P.light,k=P.dark===null?r:P.dark;if(O)if(!c.includes(O))console.error(`\`${O}\` does not exist in \`theme.colorSchemes\`.`);else{E.lightColorScheme=O;try{localStorage.setItem(`${a}-light`,O)}catch{}}if(k)if(!c.includes(k))console.error(`\`${k}\` does not exist in \`theme.colorSchemes\`.`);else{E.darkColorScheme=k;try{localStorage.setItem(`${a}-dark`,k)}catch{}}return E}):f(T=>{try{localStorage.setItem(`${a}-light`,n),localStorage.setItem(`${a}-dark`,r)}catch{}return{...T,lightColorScheme:n,darkColorScheme:r}})},[c,a,n,r]),x=y.useCallback(P=>{d.mode==="system"&&f(T=>{const E=P!=null&&P.matches?"dark":"light";return T.systemMode===E?T:{...T,systemMode:E}})},[d.mode]),S=y.useRef(x);return S.current=x,y.useEffect(()=>{if(typeof window.matchMedia!="function"||!u)return;const P=(...E)=>S.current(...E),T=window.matchMedia("(prefers-color-scheme: dark)");return T.addListener(P),P(T),()=>{T.removeListener(P)}},[u]),y.useEffect(()=>{if(s&&u){const P=T=>{const E=T.newValue;typeof T.key=="string"&&T.key.startsWith(a)&&(!E||c.match(E))&&(T.key.endsWith("light")&&w({light:E}),T.key.endsWith("dark")&&w({dark:E})),T.key===i&&(!E||["light","dark","system"].includes(E))&&v(E||t)};return s.addEventListener("storage",P),()=>{s.removeEventListener("storage",P)}}},[w,v,i,a,c,t,s,u]),{...d,mode:p?d.mode:void 0,systemMode:p?d.systemMode:void 0,colorScheme:p?g:void 0,setMode:v,setColorScheme:w}}const i0e="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function a0e(e){const{themeId:t,theme:n={},modeStorageKey:r=vL,colorSchemeStorageKey:o=bL,disableTransitionOnChange:i=!1,defaultColorScheme:a,resolveTheme:s}=e,l={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},c=y.createContext(void 0),u=()=>y.useContext(c)||l,d={},f={};function p(w){var Ae,Oe,$e,Be;const{children:x,theme:S,modeStorageKey:P=r,colorSchemeStorageKey:T=o,disableTransitionOnChange:E=i,storageWindow:O=typeof window>"u"?void 0:window,documentNode:k=typeof document>"u"?void 0:document,colorSchemeNode:A=typeof document>"u"?void 0:document.documentElement,disableNestedContext:I=!1,disableStyleSheetGeneration:R=!1,defaultMode:L="system",noSsr:F}=w,z=y.useRef(!1),_=XO(),D=y.useContext(c),H=!!D&&!I,B=y.useMemo(()=>S||(typeof n=="function"?n():n),[S]),V=B[t],W=V||B,{colorSchemes:G=d,components:Q=f,cssVarPrefix:Y}=W,ne=Object.keys(G).filter(Je=>!!G[Je]).join(","),ie=y.useMemo(()=>ne.split(","),[ne]),re=typeof a=="string"?a:a.light,pe=typeof a=="string"?a:a.dark,le=G[re]&&G[pe]?L:((Oe=(Ae=G[W.defaultColorScheme])==null?void 0:Ae.palette)==null?void 0:Oe.mode)||(($e=W.palette)==null?void 0:$e.mode),{mode:ee,setMode:ce,systemMode:se,lightColorScheme:Z,darkColorScheme:ue,colorScheme:ge,setColorScheme:we}=o0e({supportedColorSchemes:ie,defaultLightColorScheme:re,defaultDarkColorScheme:pe,modeStorageKey:P,colorSchemeStorageKey:T,defaultMode:le,storageWindow:O,noSsr:F});let me=ee,be=ge;H&&(me=D.mode,be=D.colorScheme);const xe=y.useMemo(()=>{var it;const Je=be||W.defaultColorScheme,ot=((it=W.generateThemeVars)==null?void 0:it.call(W))||W.vars,lt={...W,components:Q,colorSchemes:G,cssVarPrefix:Y,vars:ot};if(typeof lt.generateSpacing=="function"&&(lt.spacing=lt.generateSpacing()),Je){const tt=G[Je];tt&&typeof tt=="object"&&Object.keys(tt).forEach(pt=>{tt[pt]&&typeof tt[pt]=="object"?lt[pt]={...lt[pt],...tt[pt]}:lt[pt]=tt[pt]})}return s?s(lt):lt},[W,be,Q,G,Y]),Ee=W.colorSchemeSelector;y.useEffect(()=>{if(be&&A&&Ee&&Ee!=="media"){const Je=Ee;let ot=Ee;if(Je==="class"&&(ot=".%s"),Je==="data"&&(ot="[data-%s]"),Je!=null&&Je.startsWith("data-")&&!Je.includes("%s")&&(ot=`[${Je}="%s"]`),ot.startsWith("."))A.classList.remove(...ie.map(lt=>ot.substring(1).replace("%s",lt))),A.classList.add(ot.substring(1).replace("%s",be));else{const lt=ot.replace("%s",be).match(/\[([^\]]+)\]/);if(lt){const[it,tt]=lt[1].split("=");tt||ie.forEach(pt=>{A.removeAttribute(it.replace(be,pt))}),A.setAttribute(it,tt?tt.replace(/"|'/g,""):"")}else A.setAttribute(ot,be)}}},[be,Ee,A,ie]),y.useEffect(()=>{let Je;if(E&&z.current&&k){const ot=k.createElement("style");ot.appendChild(k.createTextNode(i0e)),k.head.appendChild(ot),window.getComputedStyle(k.body),Je=setTimeout(()=>{k.head.removeChild(ot)},1)}return()=>{clearTimeout(Je)}},[be,E,k]),y.useEffect(()=>(z.current=!0,()=>{z.current=!1}),[]);const Me=y.useMemo(()=>({allColorSchemes:ie,colorScheme:be,darkColorScheme:ue,lightColorScheme:Z,mode:me,setColorScheme:we,setMode:ce,systemMode:se}),[ie,be,ue,Z,me,we,ce,se,xe.colorSchemeSelector]);let _e=!0;(R||W.cssVariables===!1||H&&(_==null?void 0:_.cssVarPrefix)===Y)&&(_e=!1);const de=$.jsxs(y.Fragment,{children:[$.jsx(LY,{themeId:V?t:void 0,theme:xe,children:x}),_e&&$.jsx(dY,{styles:((Be=xe.generateStyleSheets)==null?void 0:Be.call(xe))||[]})]});return H?de:$.jsx(c.Provider,{value:Me,children:de})}const m=typeof a=="string"?a:a.light,g=typeof a=="string"?a:a.dark;return{CssVarsProvider:p,useColorScheme:u,getInitColorSchemeScript:w=>n0e({colorSchemeStorageKey:o,defaultLightColorScheme:m,defaultDarkColorScheme:g,modeStorageKey:r,...w})}}function s0e(e=""){function t(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${t(...o)})`}const $H=(e,t,n,r=[])=>{let o=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},l0e=(e,t,n)=>{function r(o,i=[],a=[]){Object.entries(o).forEach(([s,l])=>{(!n||n&&!n([...i,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,s],Array.isArray(l)?[...a,s]:a):t([...i,s],l,a))})}r(e)},c0e=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function CA(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return l0e(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const u=`--${n?`${n}-`:""}${s.join("-")}`,d=c0e(s,l);Object.assign(o,{[u]:d}),$H(i,s,`var(${u})`,c),$H(a,s,`var(${u}, ${d})`,c)}},s=>s[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function u0e(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=CA(l,t);let f=d;const p={},{[s]:m,...g}=i;if(Object.entries(g||{}).forEach(([S,P])=>{const{vars:T,css:E,varsWithDefaults:O}=CA(P,t);f=po(f,O),p[S]={css:E,vars:T}}),m){const{css:S,vars:P,varsWithDefaults:T}=CA(m,t);f=po(f,T),p[s]={css:S,vars:P}}function v(S,P){var E,O;let T=o;if(o==="class"&&(T=".%s"),o==="data"&&(T="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(T=`[${o}="%s"]`),S){if(T==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${((O=(E=i[S])==null?void 0:E.palette)==null?void 0:O.mode)||S})`]:{":root":P}};if(T)return e.defaultColorScheme===S?`:root, ${T.replace("%s",String(S))}`:T.replace("%s",String(S))}return":root"}return{vars:f,generateThemeVars:()=>{let S={...c};return Object.entries(p).forEach(([,{vars:P}])=>{S=po(S,P)}),S},generateStyleSheets:()=>{var k,A;const S=[],P=e.defaultColorScheme||"light";function T(I,R){Object.keys(R).length&&S.push(typeof I=="string"?{[I]:{...R}}:I)}T(n(void 0,{...u}),u);const{[P]:E,...O}=p;if(E){const{css:I}=E,R=(A=(k=i[P])==null?void 0:k.palette)==null?void 0:A.mode,L=!r&&R?{colorScheme:R,...I}:{...I};T(n(P,{...L}),L)}return Object.entries(O).forEach(([I,{css:R}])=>{var z,_;const L=(_=(z=i[I])==null?void 0:z.palette)==null?void 0:_.mode,F=!r&&L?{colorScheme:L,...R}:{...R};T(n(I,{...F}),F)}),S}}}function d0e(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const f0e=gv(),p0e=Yn("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Se(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),h0e=e=>qO({props:e,name:"MuiContainer",defaultTheme:f0e}),m0e=(e,t)=>{const n=l=>Ne(t,l),{classes:r,fixed:o,disableGutters:i,maxWidth:a}=e,s={root:["root",a&&`maxWidth${Se(String(a))}`,o&&"fixed",i&&"disableGutters"]};return Te(s,n,r)};function g0e(e={}){const{createStyledComponent:t=p0e,useThemeProps:n=h0e,componentName:r="MuiContainer"}=e,o=t(({theme:a,ownerState:s})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!s.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}}),({theme:a,ownerState:s})=>s.fixed&&Object.keys(a.breakpoints.values).reduce((l,c)=>{const u=c,d=a.breakpoints.values[u];return d!==0&&(l[a.breakpoints.up(u)]={maxWidth:`${d}${a.breakpoints.unit}`}),l},{}),({theme:a,ownerState:s})=>({...s.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},...s.maxWidth&&s.maxWidth!=="xs"&&{[a.breakpoints.up(s.maxWidth)]:{maxWidth:`${a.breakpoints.values[s.maxWidth]}${a.breakpoints.unit}`}}}));return y.forwardRef(function(s,l){const c=n(s),{className:u,component:d="div",disableGutters:f=!1,fixed:p=!1,maxWidth:m="lg",classes:g,...v}=c,w={...c,component:d,disableGutters:f,fixed:p,maxWidth:m},x=m0e(w,r);return $.jsx(o,{as:d,ownerState:w,className:fe(x.root,u),ref:l,...v})})}const y0e=(e,t)=>e.filter(n=>t.includes(n)),vv=(e,t,n)=>{const r=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{n((a,s)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,s):a[e.up(e.keys[i])]=s)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:y0e(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.includes(i)){const a=t[i];a!==void 0&&n((s,l)=>{r===i?Object.assign(s,l):s[e.up(i)]=l},a)}}):(typeof t=="number"||typeof t=="string")&&n((o,i)=>{Object.assign(o,i)},t)};function KP(e){return`--Grid-${e}Spacing`}function QO(e){return`--Grid-parent-${e}Spacing`}const RH="--Grid-columns",Rg="--Grid-parent-columns",v0e=({theme:e,ownerState:t})=>{const n={};return vv(e.breakpoints,t.size,(r,o)=>{let i={};o==="grow"&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),o==="auto"&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof o=="number"&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / var(${Rg}) - (var(${Rg}) - ${o}) * (var(${QO("column")}) / var(${Rg})))`}),r(n,i)}),n},b0e=({theme:e,ownerState:t})=>{const n={};return vv(e.breakpoints,t.offset,(r,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / var(${Rg}) + var(${QO("column")}) * ${o} / var(${Rg}))`}),r(n,i)}),n},w0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={[RH]:12};return vv(e.breakpoints,t.columns,(r,o)=>{const i=o??12;r(n,{[RH]:i,"> *":{[Rg]:i}})}),n},x0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return vv(e.breakpoints,t.rowSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[KP("row")]:i,"> *":{[QO("row")]:i}})}),n},S0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return vv(e.breakpoints,t.columnSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[KP("column")]:i,"> *":{[QO("column")]:i}})}),n},C0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return vv(e.breakpoints,t.direction,(r,o)=>{r(n,{flexDirection:o})}),n},P0e=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},gap:`var(${KP("row")}) var(${KP("column")})`}}),T0e=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{r!==!1&&r!==void 0&&t.push(`grid-${n}-${String(r)}`)}),t},E0e=(e,t="xs")=>{function n(r){return r===void 0?!1:typeof r=="string"&&!Number.isNaN(Number(r))||typeof r=="number"&&r>0}if(n(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const r=[];return Object.entries(e).forEach(([o,i])=>{n(i)&&r.push(`spacing-${o}-${String(i)}`)}),r}return[]},O0e=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,n])=>`direction-${t}-${n}`):[`direction-xs-${String(e)}`],I0e=gv(),k0e=Yn("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function M0e(e){return qO({props:e,name:"MuiGrid",defaultTheme:I0e})}function A0e(e={}){const{createStyledComponent:t=k0e,useThemeProps:n=M0e,useTheme:r=eS,componentName:o="MuiGrid"}=e,i=(c,u)=>{const{container:d,direction:f,spacing:p,wrap:m,size:g}=c,v={root:["root",d&&"container",m!=="wrap"&&`wrap-xs-${String(m)}`,...O0e(f),...T0e(g),...d?E0e(p,u.breakpoints.keys[0]):[]]};return Te(v,w=>Ne(o,w),{})};function a(c,u,d=()=>!0){const f={};return c===null||(Array.isArray(c)?c.forEach((p,m)=>{p!==null&&d(p)&&u.keys[m]&&(f[u.keys[m]]=p)}):typeof c=="object"?Object.keys(c).forEach(p=>{const m=c[p];m!=null&&d(m)&&(f[p]=m)}):f[u.keys[0]]=c),f}const s=t(w0e,S0e,x0e,v0e,C0e,P0e,b0e),l=y.forwardRef(function(u,d){const f=r(),p=n(u),m=NO(p),{className:g,children:v,columns:w=12,container:x=!1,component:S="div",direction:P="row",wrap:T="wrap",size:E={},offset:O={},spacing:k=0,rowSpacing:A=k,columnSpacing:I=k,unstable_level:R=0,...L}=m,F=a(E,f.breakpoints,G=>G!==!1),z=a(O,f.breakpoints),_=u.columns??(R?void 0:w),D=u.spacing??(R?void 0:k),H=u.rowSpacing??u.spacing??(R?void 0:A),B=u.columnSpacing??u.spacing??(R?void 0:I),V={...m,level:R,columns:_,container:x,direction:P,wrap:T,spacing:D,rowSpacing:H,columnSpacing:B,size:F,offset:z},W=i(V,f);return $.jsx(s,{ref:d,as:S,ownerState:V,className:fe(W.root,g),...L,children:y.Children.map(v,G=>{var Q;return y.isValidElement(G)&&$g(G,["Grid"])&&x&&G.props.container?y.cloneElement(G,{unstable_level:((Q=G.props)==null?void 0:Q.unstable_level)??R+1}):G})})});return l.muiName="Grid",l}const $0e=gv(),R0e=Yn("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function _0e(e){return qO({props:e,name:"MuiStack",defaultTheme:$0e})}function D0e(e,t){const n=y.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],L0e=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...ql({theme:t},xA({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r}))};if(e.spacing){const r=MO(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),i=xA({values:e.direction,base:o}),a=xA({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,c,u)=>{if(!i[l]){const f=c>0?i[u[c-1]]:"column";i[l]=f}}),n=po(n,ql({theme:t},a,(l,c)=>e.useFlexGap?{gap:oh(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${N0e(c?i[c]:e.direction)}`]:oh(r,l)}}))}return n=kve(t.breakpoints,n),n};function F0e(e={}){const{createStyledComponent:t=R0e,useThemeProps:n=_0e,componentName:r="MuiStack"}=e,o=()=>Te({root:["root"]},l=>Ne(r,l),{}),i=t(L0e);return y.forwardRef(function(l,c){const u=n(l),d=NO(u),{component:f="div",direction:p="column",spacing:m=0,divider:g,children:v,className:w,useFlexGap:x=!1,...S}=d,P={direction:p,spacing:m,useFlexGap:x},T=o();return $.jsx(i,{as:f,ownerState:P,ref:c,className:fe(T.root,w),...S,children:g?D0e(v,g):v})})}const xw={black:"#000",white:"#fff"},j0e={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Sm={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Cm={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},$b={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Pm={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Tm={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Em={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function jY(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:xw.white,default:xw.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const B0e=jY();function BY(){return{text:{primary:xw.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:xw.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const _H=BY();function DH(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=_u(e.main,o):t==="dark"&&(e.dark=Ru(e.main,i)))}function z0e(e="light"){return e==="dark"?{main:Pm[200],light:Pm[50],dark:Pm[400]}:{main:Pm[700],light:Pm[400],dark:Pm[800]}}function V0e(e="light"){return e==="dark"?{main:Sm[200],light:Sm[50],dark:Sm[400]}:{main:Sm[500],light:Sm[300],dark:Sm[700]}}function H0e(e="light"){return e==="dark"?{main:Cm[500],light:Cm[300],dark:Cm[700]}:{main:Cm[700],light:Cm[400],dark:Cm[800]}}function U0e(e="light"){return e==="dark"?{main:Tm[400],light:Tm[300],dark:Tm[700]}:{main:Tm[700],light:Tm[500],dark:Tm[900]}}function W0e(e="light"){return e==="dark"?{main:Em[400],light:Em[300],dark:Em[700]}:{main:Em[800],light:Em[500],dark:Em[900]}}function G0e(e="light"){return e==="dark"?{main:$b[400],light:$b[300],dark:$b[700]}:{main:"#ed6c02",light:$b[500],dark:$b[900]}}function wL(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||z0e(t),a=e.secondary||V0e(t),s=e.error||H0e(t),l=e.info||U0e(t),c=e.success||W0e(t),u=e.warning||G0e(t);function d(g){return zbe(g,_H.text.primary)>=n?_H.text.primary:B0e.text.primary}const f=({color:g,name:v,mainShade:w=500,lightShade:x=300,darkShade:S=700})=>{if(g={...g},!g.main&&g[w]&&(g.main=g[w]),!g.hasOwnProperty("main"))throw new Error($u(11,v?` (${v})`:"",w));if(typeof g.main!="string")throw new Error($u(12,v?` (${v})`:"",JSON.stringify(g.main)));return DH(g,"light",x,r),DH(g,"dark",S,r),g.contrastText||(g.contrastText=d(g.main)),g};let p;return t==="light"?p=jY():t==="dark"&&(p=BY()),po({common:{...xw},mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:j0e,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r,...p},o)}function q0e(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function K0e(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Y0e(e){return Math.round(e*1e5)/1e5}const NH={textTransform:"uppercase"},LH='"Roboto", "Helvetica", "Arial", sans-serif';function zY(e,t){const{fontFamily:n=LH,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}=typeof t=="function"?t(e):t,f=r/14,p=u||(v=>`${v/l*f}rem`),m=(v,w,x,S,P)=>({fontFamily:n,fontWeight:v,fontSize:p(w),lineHeight:x,...n===LH?{letterSpacing:`${Y0e(S/w)}em`}:{},...P,...c}),g={h1:m(o,96,1.167,-1.5),h2:m(o,60,1.2,-.5),h3:m(i,48,1.167,0),h4:m(i,34,1.235,.25),h5:m(i,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(i,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(i,16,1.5,.15),body2:m(i,14,1.43,.15),button:m(a,14,1.75,.4,NH),caption:m(i,12,1.66,.4),overline:m(i,12,2.66,1,NH),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return po({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...g},d,{clone:!1})}const X0e=.2,Q0e=.14,J0e=.12;function Ar(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${X0e})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Q0e})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${J0e})`].join(",")}const Z0e=["none",Ar(0,2,1,-1,0,1,1,0,0,1,3,0),Ar(0,3,1,-2,0,2,2,0,0,1,5,0),Ar(0,3,3,-2,0,3,4,0,0,1,8,0),Ar(0,2,4,-1,0,4,5,0,0,1,10,0),Ar(0,3,5,-1,0,5,8,0,0,1,14,0),Ar(0,3,5,-1,0,6,10,0,0,1,18,0),Ar(0,4,5,-2,0,7,10,1,0,2,16,1),Ar(0,5,5,-3,0,8,10,1,0,3,14,2),Ar(0,5,6,-3,0,9,12,1,0,3,16,2),Ar(0,6,6,-3,0,10,14,1,0,4,18,3),Ar(0,6,7,-4,0,11,15,1,0,4,20,3),Ar(0,7,8,-4,0,12,17,2,0,5,22,4),Ar(0,7,8,-4,0,13,19,2,0,5,24,4),Ar(0,7,9,-4,0,14,21,2,0,5,26,4),Ar(0,8,9,-5,0,15,22,2,0,6,28,5),Ar(0,8,10,-5,0,16,24,2,0,6,30,5),Ar(0,8,11,-5,0,17,26,2,0,6,32,5),Ar(0,9,11,-5,0,18,28,2,0,7,34,6),Ar(0,9,12,-6,0,19,29,2,0,7,36,6),Ar(0,10,13,-6,0,20,31,3,0,8,38,7),Ar(0,10,13,-6,0,21,33,3,0,8,40,7),Ar(0,10,14,-6,0,22,35,3,0,8,42,7),Ar(0,11,14,-7,0,23,36,3,0,9,44,8),Ar(0,11,15,-7,0,24,38,3,0,9,46,8)],ewe={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},VY={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function FH(e){return`${Math.round(e)}ms`}function twe(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function nwe(e){const t={...ewe,...e.easing},n={...VY,...e.duration};return{getAutoHeightDuration:twe,create:(o=["all"],i={})=>{const{duration:a=n.standard,easing:s=t.easeInOut,delay:l=0,...c}=i;return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof a=="string"?a:FH(a)} ${s} ${typeof l=="string"?l:FH(l)}`).join(",")},...e,easing:t,duration:n}}const rwe={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function owe(e){return vc(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function HY(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;i{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function bA(e,t){if(typeof window>"u")return;let n;try{n=localStorage.getItem(e)||void 0,n||localStorage.setItem(e,t)}catch{}return n||t}function Qbe(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:i=hN,colorSchemeStorageKey:a=mN,storageWindow:s=typeof window>"u"?void 0:window,noSsr:l=!1}=e,c=o.join(","),u=o.length>1,[d,f]=v.useState(()=>{const P=bA(i,t),E=bA(`${a}-light`,n),T=bA(`${a}-dark`,r);return{mode:P,systemMode:AH(P),lightColorScheme:E,darkColorScheme:T}}),[p,m]=v.useState(l||!u);v.useEffect(()=>{m(!0)},[]);const g=Xbe(d),y=v.useCallback(P=>{f(E=>{if(P===E.mode)return E;const T=P??t;try{localStorage.setItem(i,T)}catch{}return{...E,mode:T,systemMode:AH(T)}})},[i,t]),b=v.useCallback(P=>{P?typeof P=="string"?P&&!c.includes(P)?console.error(`\`${P}\` does not exist in \`theme.colorSchemes\`.`):f(E=>{const T={...E};return DY(E,O=>{try{localStorage.setItem(`${a}-${O}`,P)}catch{}O==="light"&&(T.lightColorScheme=P),O==="dark"&&(T.darkColorScheme=P)}),T}):f(E=>{const T={...E},O=P.light===null?n:P.light,k=P.dark===null?r:P.dark;if(O)if(!c.includes(O))console.error(`\`${O}\` does not exist in \`theme.colorSchemes\`.`);else{T.lightColorScheme=O;try{localStorage.setItem(`${a}-light`,O)}catch{}}if(k)if(!c.includes(k))console.error(`\`${k}\` does not exist in \`theme.colorSchemes\`.`);else{T.darkColorScheme=k;try{localStorage.setItem(`${a}-dark`,k)}catch{}}return T}):f(E=>{try{localStorage.setItem(`${a}-light`,n),localStorage.setItem(`${a}-dark`,r)}catch{}return{...E,lightColorScheme:n,darkColorScheme:r}})},[c,a,n,r]),x=v.useCallback(P=>{d.mode==="system"&&f(E=>{const T=P!=null&&P.matches?"dark":"light";return E.systemMode===T?E:{...E,systemMode:T}})},[d.mode]),S=v.useRef(x);return S.current=x,v.useEffect(()=>{if(typeof window.matchMedia!="function"||!u)return;const P=(...T)=>S.current(...T),E=window.matchMedia("(prefers-color-scheme: dark)");return E.addListener(P),P(E),()=>{E.removeListener(P)}},[u]),v.useEffect(()=>{if(s&&u){const P=E=>{const T=E.newValue;typeof E.key=="string"&&E.key.startsWith(a)&&(!T||c.match(T))&&(E.key.endsWith("light")&&b({light:T}),E.key.endsWith("dark")&&b({dark:T})),E.key===i&&(!T||["light","dark","system"].includes(T))&&y(T||t)};return s.addEventListener("storage",P),()=>{s.removeEventListener("storage",P)}}},[b,y,i,a,c,t,s,u]),{...d,mode:p?d.mode:void 0,systemMode:p?d.systemMode:void 0,colorScheme:p?g:void 0,setMode:y,setColorScheme:b}}const Jbe="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Zbe(e){const{themeId:t,theme:n={},modeStorageKey:r=hN,colorSchemeStorageKey:o=mN,disableTransitionOnChange:i=!1,defaultColorScheme:a,resolveTheme:s}=e,l={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},c=v.createContext(void 0),u=()=>v.useContext(c)||l,d={},f={};function p(b){var Re,Me,Ae,Ne;const{children:x,theme:S,modeStorageKey:P=r,colorSchemeStorageKey:E=o,disableTransitionOnChange:T=i,storageWindow:O=typeof window>"u"?void 0:window,documentNode:k=typeof document>"u"?void 0:document,colorSchemeNode:M=typeof document>"u"?void 0:document.documentElement,disableNestedContext:I=!1,disableStyleSheetGeneration:R=!1,defaultMode:_="system",noSsr:N}=b,B=v.useRef(!1),L=LO(),F=v.useContext(c),U=!!F&&!I,V=v.useMemo(()=>S||(typeof n=="function"?n():n),[S]),z=V[t],W=z||V,{colorSchemes:G=d,components:J=f,cssVarPrefix:K}=W,ne=Object.keys(G).filter(Je=>!!G[Je]).join(","),re=v.useMemo(()=>ne.split(","),[ne]),oe=typeof a=="string"?a:a.light,fe=typeof a=="string"?a:a.dark,se=G[oe]&&G[fe]?_:((Me=(Re=G[W.defaultColorScheme])==null?void 0:Re.palette)==null?void 0:Me.mode)||((Ae=W.palette)==null?void 0:Ae.mode),{mode:ee,setMode:ce,systemMode:le,lightColorScheme:Q,darkColorScheme:ue,colorScheme:ge,setColorScheme:xe}=Qbe({supportedColorSchemes:re,defaultLightColorScheme:oe,defaultDarkColorScheme:fe,modeStorageKey:P,colorSchemeStorageKey:E,defaultMode:se,storageWindow:O,noSsr:N});let me=ee,be=ge;U&&(me=F.mode,be=F.colorScheme);const we=v.useMemo(()=>{var $t;const Je=be||W.defaultColorScheme,nt=(($t=W.generateThemeVars)==null?void 0:$t.call(W))||W.vars,st={...W,components:J,colorSchemes:G,cssVarPrefix:K,vars:nt};if(typeof st.generateSpacing=="function"&&(st.spacing=st.generateSpacing()),Je){const ct=G[Je];ct&&typeof ct=="object"&&Object.keys(ct).forEach(_t=>{ct[_t]&&typeof ct[_t]=="object"?st[_t]={...st[_t],...ct[_t]}:st[_t]=ct[_t]})}return s?s(st):st},[W,be,J,G,K]),Oe=W.colorSchemeSelector;v.useEffect(()=>{if(be&&M&&Oe&&Oe!=="media"){const Je=Oe;let nt=Oe;if(Je==="class"&&(nt=".%s"),Je==="data"&&(nt="[data-%s]"),Je!=null&&Je.startsWith("data-")&&!Je.includes("%s")&&(nt=`[${Je}="%s"]`),nt.startsWith("."))M.classList.remove(...re.map(st=>nt.substring(1).replace("%s",st))),M.classList.add(nt.substring(1).replace("%s",be));else{const st=nt.replace("%s",be).match(/\[([^\]]+)\]/);if(st){const[$t,ct]=st[1].split("=");ct||re.forEach(_t=>{M.removeAttribute($t.replace(be,_t))}),M.setAttribute($t,ct?ct.replace(/"|'/g,""):"")}else M.setAttribute(nt,be)}}},[be,Oe,M,re]),v.useEffect(()=>{let Je;if(T&&B.current&&k){const nt=k.createElement("style");nt.appendChild(k.createTextNode(Jbe)),k.head.appendChild(nt),window.getComputedStyle(k.body),Je=setTimeout(()=>{k.head.removeChild(nt)},1)}return()=>{clearTimeout(Je)}},[be,T,k]),v.useEffect(()=>(B.current=!0,()=>{B.current=!1}),[]);const ke=v.useMemo(()=>({allColorSchemes:re,colorScheme:be,darkColorScheme:ue,lightColorScheme:Q,mode:me,setColorScheme:xe,setMode:ce,systemMode:le}),[re,be,ue,Q,me,xe,ce,le,we.colorSchemeSelector]);let je=!0;(R||W.cssVariables===!1||U&&(L==null?void 0:L.cssVarPrefix)===K)&&(je=!1);const de=$.jsxs(v.Fragment,{children:[$.jsx(RY,{themeId:z?t:void 0,theme:we,children:x}),je&&$.jsx(cY,{styles:((Ne=we.generateStyleSheets)==null?void 0:Ne.call(we))||[]})]});return U?de:$.jsx(c.Provider,{value:ke,children:de})}const m=typeof a=="string"?a:a.light,g=typeof a=="string"?a:a.dark;return{CssVarsProvider:p,useColorScheme:u,getInitColorSchemeScript:b=>Ybe({colorSchemeStorageKey:o,defaultLightColorScheme:m,defaultDarkColorScheme:g,modeStorageKey:r,...b})}}function e0e(e=""){function t(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${t(...o)})`}const $H=(e,t,n,r=[])=>{let o=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},t0e=(e,t,n)=>{function r(o,i=[],a=[]){Object.entries(o).forEach(([s,l])=>{(!n||n&&!n([...i,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,s],Array.isArray(l)?[...a,s]:a):t([...i,s],l,a))})}r(e)},n0e=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function wA(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return t0e(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const u=`--${n?`${n}-`:""}${s.join("-")}`,d=n0e(s,l);Object.assign(o,{[u]:d}),$H(i,s,`var(${u})`,c),$H(a,s,`var(${u}, ${d})`,c)}},s=>s[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function r0e(e,t={}){const{getSelector:n=y,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=wA(l,t);let f=d;const p={},{[s]:m,...g}=i;if(Object.entries(g||{}).forEach(([S,P])=>{const{vars:E,css:T,varsWithDefaults:O}=wA(P,t);f=mo(f,O),p[S]={css:T,vars:E}}),m){const{css:S,vars:P,varsWithDefaults:E}=wA(m,t);f=mo(f,E),p[s]={css:S,vars:P}}function y(S,P){var T,O;let E=o;if(o==="class"&&(E=".%s"),o==="data"&&(E="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(E=`[${o}="%s"]`),S){if(E==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${((O=(T=i[S])==null?void 0:T.palette)==null?void 0:O.mode)||S})`]:{":root":P}};if(E)return e.defaultColorScheme===S?`:root, ${E.replace("%s",String(S))}`:E.replace("%s",String(S))}return":root"}return{vars:f,generateThemeVars:()=>{let S={...c};return Object.entries(p).forEach(([,{vars:P}])=>{S=mo(S,P)}),S},generateStyleSheets:()=>{var k,M;const S=[],P=e.defaultColorScheme||"light";function E(I,R){Object.keys(R).length&&S.push(typeof I=="string"?{[I]:{...R}}:I)}E(n(void 0,{...u}),u);const{[P]:T,...O}=p;if(T){const{css:I}=T,R=(M=(k=i[P])==null?void 0:k.palette)==null?void 0:M.mode,_=!r&&R?{colorScheme:R,...I}:{...I};E(n(P,{..._}),_)}return Object.entries(O).forEach(([I,{css:R}])=>{var B,L;const _=(L=(B=i[I])==null?void 0:B.palette)==null?void 0:L.mode,N=!r&&_?{colorScheme:_,...R}:{...R};E(n(I,{...N}),N)}),S}}}function o0e(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const i0e=hv(),a0e=Qn("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Se(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),s0e=e=>RO({props:e,name:"MuiContainer",defaultTheme:i0e}),l0e=(e,t)=>{const n=l=>_e(t,l),{classes:r,fixed:o,disableGutters:i,maxWidth:a}=e,s={root:["root",a&&`maxWidth${Se(String(a))}`,o&&"fixed",i&&"disableGutters"]};return Te(s,n,r)};function c0e(e={}){const{createStyledComponent:t=a0e,useThemeProps:n=s0e,componentName:r="MuiContainer"}=e,o=t(({theme:a,ownerState:s})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!s.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}}),({theme:a,ownerState:s})=>s.fixed&&Object.keys(a.breakpoints.values).reduce((l,c)=>{const u=c,d=a.breakpoints.values[u];return d!==0&&(l[a.breakpoints.up(u)]={maxWidth:`${d}${a.breakpoints.unit}`}),l},{}),({theme:a,ownerState:s})=>({...s.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},...s.maxWidth&&s.maxWidth!=="xs"&&{[a.breakpoints.up(s.maxWidth)]:{maxWidth:`${a.breakpoints.values[s.maxWidth]}${a.breakpoints.unit}`}}}));return v.forwardRef(function(s,l){const c=n(s),{className:u,component:d="div",disableGutters:f=!1,fixed:p=!1,maxWidth:m="lg",classes:g,...y}=c,b={...c,component:d,disableGutters:f,fixed:p,maxWidth:m},x=l0e(b,r);return $.jsx(o,{as:d,ownerState:b,className:pe(x.root,u),ref:l,...y})})}const u0e=(e,t)=>e.filter(n=>t.includes(n)),gv=(e,t,n)=>{const r=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{n((a,s)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,s):a[e.up(e.keys[i])]=s)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:u0e(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.includes(i)){const a=t[i];a!==void 0&&n((s,l)=>{r===i?Object.assign(s,l):s[e.up(i)]=l},a)}}):(typeof t=="number"||typeof t=="string")&&n((o,i)=>{Object.assign(o,i)},t)};function GP(e){return`--Grid-${e}Spacing`}function NO(e){return`--Grid-parent-${e}Spacing`}const RH="--Grid-columns",Rg="--Grid-parent-columns",d0e=({theme:e,ownerState:t})=>{const n={};return gv(e.breakpoints,t.size,(r,o)=>{let i={};o==="grow"&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),o==="auto"&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof o=="number"&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / var(${Rg}) - (var(${Rg}) - ${o}) * (var(${NO("column")}) / var(${Rg})))`}),r(n,i)}),n},f0e=({theme:e,ownerState:t})=>{const n={};return gv(e.breakpoints,t.offset,(r,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / var(${Rg}) + var(${NO("column")}) * ${o} / var(${Rg}))`}),r(n,i)}),n},p0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={[RH]:12};return gv(e.breakpoints,t.columns,(r,o)=>{const i=o??12;r(n,{[RH]:i,"> *":{[Rg]:i}})}),n},h0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return gv(e.breakpoints,t.rowSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[GP("row")]:i,"> *":{[NO("row")]:i}})}),n},m0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return gv(e.breakpoints,t.columnSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[GP("column")]:i,"> *":{[NO("column")]:i}})}),n},g0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return gv(e.breakpoints,t.direction,(r,o)=>{r(n,{flexDirection:o})}),n},y0e=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},gap:`var(${GP("row")}) var(${GP("column")})`}}),v0e=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{r!==!1&&r!==void 0&&t.push(`grid-${n}-${String(r)}`)}),t},b0e=(e,t="xs")=>{function n(r){return r===void 0?!1:typeof r=="string"&&!Number.isNaN(Number(r))||typeof r=="number"&&r>0}if(n(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const r=[];return Object.entries(e).forEach(([o,i])=>{n(i)&&r.push(`spacing-${o}-${String(i)}`)}),r}return[]},w0e=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,n])=>`direction-${t}-${n}`):[`direction-xs-${String(e)}`],x0e=hv(),S0e=Qn("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function C0e(e){return RO({props:e,name:"MuiGrid",defaultTheme:x0e})}function P0e(e={}){const{createStyledComponent:t=S0e,useThemeProps:n=C0e,useTheme:r=eS,componentName:o="MuiGrid"}=e,i=(c,u)=>{const{container:d,direction:f,spacing:p,wrap:m,size:g}=c,y={root:["root",d&&"container",m!=="wrap"&&`wrap-xs-${String(m)}`,...w0e(f),...v0e(g),...d?b0e(p,u.breakpoints.keys[0]):[]]};return Te(y,b=>_e(o,b),{})};function a(c,u,d=()=>!0){const f={};return c===null||(Array.isArray(c)?c.forEach((p,m)=>{p!==null&&d(p)&&u.keys[m]&&(f[u.keys[m]]=p)}):typeof c=="object"?Object.keys(c).forEach(p=>{const m=c[p];m!=null&&d(m)&&(f[p]=m)}):f[u.keys[0]]=c),f}const s=t(p0e,m0e,h0e,d0e,g0e,y0e,f0e),l=v.forwardRef(function(u,d){const f=r(),p=n(u),m=$O(p),{className:g,children:y,columns:b=12,container:x=!1,component:S="div",direction:P="row",wrap:E="wrap",size:T={},offset:O={},spacing:k=0,rowSpacing:M=k,columnSpacing:I=k,unstable_level:R=0,..._}=m,N=a(T,f.breakpoints,G=>G!==!1),B=a(O,f.breakpoints),L=u.columns??(R?void 0:b),F=u.spacing??(R?void 0:k),U=u.rowSpacing??u.spacing??(R?void 0:M),V=u.columnSpacing??u.spacing??(R?void 0:I),z={...m,level:R,columns:L,container:x,direction:P,wrap:E,spacing:F,rowSpacing:U,columnSpacing:V,size:N,offset:B},W=i(z,f);return $.jsx(s,{ref:d,as:S,ownerState:z,className:pe(W.root,g),..._,children:v.Children.map(y,G=>{var J;return v.isValidElement(G)&&$g(G,["Grid"])&&x&&G.props.container?v.cloneElement(G,{unstable_level:((J=G.props)==null?void 0:J.unstable_level)??R+1}):G})})});return l.muiName="Grid",l}const E0e=hv(),T0e=Qn("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function O0e(e){return RO({props:e,name:"MuiStack",defaultTheme:E0e})}function I0e(e,t){const n=v.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],M0e=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...Gl({theme:t},vA({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r}))};if(e.spacing){const r=TO(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),i=vA({values:e.direction,base:o}),a=vA({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,c,u)=>{if(!i[l]){const f=c>0?i[u[c-1]]:"column";i[l]=f}}),n=mo(n,Gl({theme:t},a,(l,c)=>e.useFlexGap?{gap:oh(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${k0e(c?i[c]:e.direction)}`]:oh(r,l)}}))}return n=Eve(t.breakpoints,n),n};function A0e(e={}){const{createStyledComponent:t=T0e,useThemeProps:n=O0e,componentName:r="MuiStack"}=e,o=()=>Te({root:["root"]},l=>_e(r,l),{}),i=t(M0e);return v.forwardRef(function(l,c){const u=n(l),d=$O(u),{component:f="div",direction:p="column",spacing:m=0,divider:g,children:y,className:b,useFlexGap:x=!1,...S}=d,P={direction:p,spacing:m,useFlexGap:x},E=o();return $.jsx(i,{as:f,ownerState:P,ref:c,className:pe(E.root,b),...S,children:g?I0e(y,g):y})})}const xw={black:"#000",white:"#fff"},$0e={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Sm={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Cm={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},$b={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Pm={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Em={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Tm={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function _Y(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:xw.white,default:xw.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const R0e=_Y();function LY(){return{text:{primary:xw.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:xw.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const DH=LY();function _H(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Du(e.main,o):t==="dark"&&(e.dark=Ru(e.main,i)))}function D0e(e="light"){return e==="dark"?{main:Pm[200],light:Pm[50],dark:Pm[400]}:{main:Pm[700],light:Pm[400],dark:Pm[800]}}function _0e(e="light"){return e==="dark"?{main:Sm[200],light:Sm[50],dark:Sm[400]}:{main:Sm[500],light:Sm[300],dark:Sm[700]}}function L0e(e="light"){return e==="dark"?{main:Cm[500],light:Cm[300],dark:Cm[700]}:{main:Cm[700],light:Cm[400],dark:Cm[800]}}function N0e(e="light"){return e==="dark"?{main:Em[400],light:Em[300],dark:Em[700]}:{main:Em[700],light:Em[500],dark:Em[900]}}function F0e(e="light"){return e==="dark"?{main:Tm[400],light:Tm[300],dark:Tm[700]}:{main:Tm[800],light:Tm[500],dark:Tm[900]}}function j0e(e="light"){return e==="dark"?{main:$b[400],light:$b[300],dark:$b[700]}:{main:"#ed6c02",light:$b[500],dark:$b[900]}}function gN(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||D0e(t),a=e.secondary||_0e(t),s=e.error||L0e(t),l=e.info||N0e(t),c=e.success||F0e(t),u=e.warning||j0e(t);function d(g){return Dbe(g,DH.text.primary)>=n?DH.text.primary:R0e.text.primary}const f=({color:g,name:y,mainShade:b=500,lightShade:x=300,darkShade:S=700})=>{if(g={...g},!g.main&&g[b]&&(g.main=g[b]),!g.hasOwnProperty("main"))throw new Error($u(11,y?` (${y})`:"",b));if(typeof g.main!="string")throw new Error($u(12,y?` (${y})`:"",JSON.stringify(g.main)));return _H(g,"light",x,r),_H(g,"dark",S,r),g.contrastText||(g.contrastText=d(g.main)),g};let p;return t==="light"?p=_Y():t==="dark"&&(p=LY()),mo({common:{...xw},mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:$0e,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r,...p},o)}function B0e(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function z0e(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function V0e(e){return Math.round(e*1e5)/1e5}const LH={textTransform:"uppercase"},NH='"Roboto", "Helvetica", "Arial", sans-serif';function NY(e,t){const{fontFamily:n=NH,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}=typeof t=="function"?t(e):t,f=r/14,p=u||(y=>`${y/l*f}rem`),m=(y,b,x,S,P)=>({fontFamily:n,fontWeight:y,fontSize:p(b),lineHeight:x,...n===NH?{letterSpacing:`${V0e(S/b)}em`}:{},...P,...c}),g={h1:m(o,96,1.167,-1.5),h2:m(o,60,1.2,-.5),h3:m(i,48,1.167,0),h4:m(i,34,1.235,.25),h5:m(i,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(i,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(i,16,1.5,.15),body2:m(i,14,1.43,.15),button:m(a,14,1.75,.4,LH),caption:m(i,12,1.66,.4),overline:m(i,12,2.66,1,LH),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return mo({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...g},d,{clone:!1})}const H0e=.2,U0e=.14,W0e=.12;function _r(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${H0e})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${U0e})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${W0e})`].join(",")}const G0e=["none",_r(0,2,1,-1,0,1,1,0,0,1,3,0),_r(0,3,1,-2,0,2,2,0,0,1,5,0),_r(0,3,3,-2,0,3,4,0,0,1,8,0),_r(0,2,4,-1,0,4,5,0,0,1,10,0),_r(0,3,5,-1,0,5,8,0,0,1,14,0),_r(0,3,5,-1,0,6,10,0,0,1,18,0),_r(0,4,5,-2,0,7,10,1,0,2,16,1),_r(0,5,5,-3,0,8,10,1,0,3,14,2),_r(0,5,6,-3,0,9,12,1,0,3,16,2),_r(0,6,6,-3,0,10,14,1,0,4,18,3),_r(0,6,7,-4,0,11,15,1,0,4,20,3),_r(0,7,8,-4,0,12,17,2,0,5,22,4),_r(0,7,8,-4,0,13,19,2,0,5,24,4),_r(0,7,9,-4,0,14,21,2,0,5,26,4),_r(0,8,9,-5,0,15,22,2,0,6,28,5),_r(0,8,10,-5,0,16,24,2,0,6,30,5),_r(0,8,11,-5,0,17,26,2,0,6,32,5),_r(0,9,11,-5,0,18,28,2,0,7,34,6),_r(0,9,12,-6,0,19,29,2,0,7,36,6),_r(0,10,13,-6,0,20,31,3,0,8,38,7),_r(0,10,13,-6,0,21,33,3,0,8,40,7),_r(0,10,14,-6,0,22,35,3,0,8,42,7),_r(0,11,14,-7,0,23,36,3,0,9,44,8),_r(0,11,15,-7,0,24,38,3,0,9,46,8)],q0e={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},FY={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function FH(e){return`${Math.round(e)}ms`}function K0e(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Y0e(e){const t={...q0e,...e.easing},n={...FY,...e.duration};return{getAutoHeightDuration:K0e,create:(o=["all"],i={})=>{const{duration:a=n.standard,easing:s=t.easeInOut,delay:l=0,...c}=i;return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof a=="string"?a:FH(a)} ${s} ${typeof l=="string"?l:FH(l)}`).join(",")},...e,easing:t,duration:n}}const X0e={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Q0e(e){return vc(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function jY(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;ipo(p,m),f),f.unstable_sxConfig={...Zx,...c==null?void 0:c.unstable_sxConfig},f.unstable_sx=function(m){return mf({sx:m,theme:this})},f.toRuntimeSource=HY,f}function DR(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const iwe=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=DR(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function UY(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function WY(e){return e==="dark"?iwe:[]}function awe(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=wL(t);return{palette:i,opacity:{...UY(i.mode),...n},overlays:r||WY(i.mode),...o}}function swe(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const lwe=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],cwe=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return lwe(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",t)]:a,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function uwe(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function je(e,t,n){!e[t]&&n&&(e[t]=n)}function b0(e){return typeof e!="string"||!e.startsWith("hsl")?e:OY(e)}function ou(e,t){`${t}Channel`in e||(e[`${t}Channel`]=v0(b0(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color(). -To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function dwe(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const sc=e=>{try{return e()}catch{}},fwe=(e="mui")=>s0e(e);function PA(e,t,n,r){if(!t)return;t=t===!0?{}:t;const o=r==="dark"?"dark":"light";if(!n){e[r]=awe({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:i,...a}=_R({...n,palette:{mode:o,...t==null?void 0:t.palette}});return e[r]={...t,palette:i,opacity:{...UY(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||WY(o)},a}function pwe(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=swe,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],d=r||(n.light&&u!=="light"?"light":u),f=fwe(i),{[d]:p,light:m,dark:g,...v}=n,w={...v};let x=p;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(x=!0),!x)throw new Error($u(21,d));const S=PA(w,x,c,d);m&&!w.light&&PA(w,m,void 0,"light"),g&&!w.dark&&PA(w,g,void 0,"dark");let P={defaultColorScheme:d,...S,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:f,colorSchemes:w,font:{...q0e(S.typography),...S.font},spacing:dwe(c.spacing)};Object.keys(P.colorSchemes).forEach(A=>{const I=P.colorSchemes[A].palette,R=L=>{const F=L.split("-"),z=F[1],_=F[2];return f(L,I[z][_])};if(I.mode==="light"&&(je(I.common,"background","#fff"),je(I.common,"onBackground","#000")),I.mode==="dark"&&(je(I.common,"background","#000"),je(I.common,"onBackground","#fff")),uwe(I,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),I.mode==="light"){je(I.Alert,"errorColor",ur(I.error.light,.6)),je(I.Alert,"infoColor",ur(I.info.light,.6)),je(I.Alert,"successColor",ur(I.success.light,.6)),je(I.Alert,"warningColor",ur(I.warning.light,.6)),je(I.Alert,"errorFilledBg",R("palette-error-main")),je(I.Alert,"infoFilledBg",R("palette-info-main")),je(I.Alert,"successFilledBg",R("palette-success-main")),je(I.Alert,"warningFilledBg",R("palette-warning-main")),je(I.Alert,"errorFilledColor",sc(()=>I.getContrastText(I.error.main))),je(I.Alert,"infoFilledColor",sc(()=>I.getContrastText(I.info.main))),je(I.Alert,"successFilledColor",sc(()=>I.getContrastText(I.success.main))),je(I.Alert,"warningFilledColor",sc(()=>I.getContrastText(I.warning.main))),je(I.Alert,"errorStandardBg",dr(I.error.light,.9)),je(I.Alert,"infoStandardBg",dr(I.info.light,.9)),je(I.Alert,"successStandardBg",dr(I.success.light,.9)),je(I.Alert,"warningStandardBg",dr(I.warning.light,.9)),je(I.Alert,"errorIconColor",R("palette-error-main")),je(I.Alert,"infoIconColor",R("palette-info-main")),je(I.Alert,"successIconColor",R("palette-success-main")),je(I.Alert,"warningIconColor",R("palette-warning-main")),je(I.AppBar,"defaultBg",R("palette-grey-100")),je(I.Avatar,"defaultBg",R("palette-grey-400")),je(I.Button,"inheritContainedBg",R("palette-grey-300")),je(I.Button,"inheritContainedHoverBg",R("palette-grey-A100")),je(I.Chip,"defaultBorder",R("palette-grey-400")),je(I.Chip,"defaultAvatarColor",R("palette-grey-700")),je(I.Chip,"defaultIconColor",R("palette-grey-700")),je(I.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),je(I.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),je(I.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),je(I.LinearProgress,"primaryBg",dr(I.primary.main,.62)),je(I.LinearProgress,"secondaryBg",dr(I.secondary.main,.62)),je(I.LinearProgress,"errorBg",dr(I.error.main,.62)),je(I.LinearProgress,"infoBg",dr(I.info.main,.62)),je(I.LinearProgress,"successBg",dr(I.success.main,.62)),je(I.LinearProgress,"warningBg",dr(I.warning.main,.62)),je(I.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),je(I.Slider,"primaryTrack",dr(I.primary.main,.62)),je(I.Slider,"secondaryTrack",dr(I.secondary.main,.62)),je(I.Slider,"errorTrack",dr(I.error.main,.62)),je(I.Slider,"infoTrack",dr(I.info.main,.62)),je(I.Slider,"successTrack",dr(I.success.main,.62)),je(I.Slider,"warningTrack",dr(I.warning.main,.62));const L=Q1(I.background.default,.8);je(I.SnackbarContent,"bg",L),je(I.SnackbarContent,"color",sc(()=>I.getContrastText(L))),je(I.SpeedDialAction,"fabHoverBg",Q1(I.background.paper,.15)),je(I.StepConnector,"border",R("palette-grey-400")),je(I.StepContent,"border",R("palette-grey-400")),je(I.Switch,"defaultColor",R("palette-common-white")),je(I.Switch,"defaultDisabledColor",R("palette-grey-100")),je(I.Switch,"primaryDisabledColor",dr(I.primary.main,.62)),je(I.Switch,"secondaryDisabledColor",dr(I.secondary.main,.62)),je(I.Switch,"errorDisabledColor",dr(I.error.main,.62)),je(I.Switch,"infoDisabledColor",dr(I.info.main,.62)),je(I.Switch,"successDisabledColor",dr(I.success.main,.62)),je(I.Switch,"warningDisabledColor",dr(I.warning.main,.62)),je(I.TableCell,"border",dr(X1(I.divider,1),.88)),je(I.Tooltip,"bg",X1(I.grey[700],.92))}if(I.mode==="dark"){je(I.Alert,"errorColor",dr(I.error.light,.6)),je(I.Alert,"infoColor",dr(I.info.light,.6)),je(I.Alert,"successColor",dr(I.success.light,.6)),je(I.Alert,"warningColor",dr(I.warning.light,.6)),je(I.Alert,"errorFilledBg",R("palette-error-dark")),je(I.Alert,"infoFilledBg",R("palette-info-dark")),je(I.Alert,"successFilledBg",R("palette-success-dark")),je(I.Alert,"warningFilledBg",R("palette-warning-dark")),je(I.Alert,"errorFilledColor",sc(()=>I.getContrastText(I.error.dark))),je(I.Alert,"infoFilledColor",sc(()=>I.getContrastText(I.info.dark))),je(I.Alert,"successFilledColor",sc(()=>I.getContrastText(I.success.dark))),je(I.Alert,"warningFilledColor",sc(()=>I.getContrastText(I.warning.dark))),je(I.Alert,"errorStandardBg",ur(I.error.light,.9)),je(I.Alert,"infoStandardBg",ur(I.info.light,.9)),je(I.Alert,"successStandardBg",ur(I.success.light,.9)),je(I.Alert,"warningStandardBg",ur(I.warning.light,.9)),je(I.Alert,"errorIconColor",R("palette-error-main")),je(I.Alert,"infoIconColor",R("palette-info-main")),je(I.Alert,"successIconColor",R("palette-success-main")),je(I.Alert,"warningIconColor",R("palette-warning-main")),je(I.AppBar,"defaultBg",R("palette-grey-900")),je(I.AppBar,"darkBg",R("palette-background-paper")),je(I.AppBar,"darkColor",R("palette-text-primary")),je(I.Avatar,"defaultBg",R("palette-grey-600")),je(I.Button,"inheritContainedBg",R("palette-grey-800")),je(I.Button,"inheritContainedHoverBg",R("palette-grey-700")),je(I.Chip,"defaultBorder",R("palette-grey-700")),je(I.Chip,"defaultAvatarColor",R("palette-grey-300")),je(I.Chip,"defaultIconColor",R("palette-grey-300")),je(I.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),je(I.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),je(I.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),je(I.LinearProgress,"primaryBg",ur(I.primary.main,.5)),je(I.LinearProgress,"secondaryBg",ur(I.secondary.main,.5)),je(I.LinearProgress,"errorBg",ur(I.error.main,.5)),je(I.LinearProgress,"infoBg",ur(I.info.main,.5)),je(I.LinearProgress,"successBg",ur(I.success.main,.5)),je(I.LinearProgress,"warningBg",ur(I.warning.main,.5)),je(I.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),je(I.Slider,"primaryTrack",ur(I.primary.main,.5)),je(I.Slider,"secondaryTrack",ur(I.secondary.main,.5)),je(I.Slider,"errorTrack",ur(I.error.main,.5)),je(I.Slider,"infoTrack",ur(I.info.main,.5)),je(I.Slider,"successTrack",ur(I.success.main,.5)),je(I.Slider,"warningTrack",ur(I.warning.main,.5));const L=Q1(I.background.default,.98);je(I.SnackbarContent,"bg",L),je(I.SnackbarContent,"color",sc(()=>I.getContrastText(L))),je(I.SpeedDialAction,"fabHoverBg",Q1(I.background.paper,.15)),je(I.StepConnector,"border",R("palette-grey-600")),je(I.StepContent,"border",R("palette-grey-600")),je(I.Switch,"defaultColor",R("palette-grey-300")),je(I.Switch,"defaultDisabledColor",R("palette-grey-600")),je(I.Switch,"primaryDisabledColor",ur(I.primary.main,.55)),je(I.Switch,"secondaryDisabledColor",ur(I.secondary.main,.55)),je(I.Switch,"errorDisabledColor",ur(I.error.main,.55)),je(I.Switch,"infoDisabledColor",ur(I.info.main,.55)),je(I.Switch,"successDisabledColor",ur(I.success.main,.55)),je(I.Switch,"warningDisabledColor",ur(I.warning.main,.55)),je(I.TableCell,"border",ur(X1(I.divider,1),.68)),je(I.Tooltip,"bg",X1(I.grey[700],.92))}ou(I.background,"default"),ou(I.background,"paper"),ou(I.common,"background"),ou(I.common,"onBackground"),ou(I,"divider"),Object.keys(I).forEach(L=>{const F=I[L];L!=="tonalOffset"&&F&&typeof F=="object"&&(F.main&&je(I[L],"mainChannel",v0(b0(F.main))),F.light&&je(I[L],"lightChannel",v0(b0(F.light))),F.dark&&je(I[L],"darkChannel",v0(b0(F.dark))),F.contrastText&&je(I[L],"contrastTextChannel",v0(b0(F.contrastText))),L==="text"&&(ou(I[L],"primary"),ou(I[L],"secondary")),L==="action"&&(F.active&&ou(I[L],"active"),F.selected&&ou(I[L],"selected")))})}),P=t.reduce((A,I)=>po(A,I),P);const T={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:cwe(P)},{vars:E,generateThemeVars:O,generateStyleSheets:k}=u0e(P,T);return P.vars=E,Object.entries(P.colorSchemes[P.defaultColorScheme]).forEach(([A,I])=>{P[A]=I}),P.generateThemeVars=O,P.generateStyleSheets=k,P.generateSpacing=function(){return yY(c.spacing,MO(this))},P.getColorSchemeSelector=d0e(s),P.spacing=P.generateSpacing(),P.shouldSkipGeneratingVar=a,P.unstable_sxConfig={...Zx,...c==null?void 0:c.unstable_sxConfig},P.unstable_sx=function(I){return mf({sx:I,theme:this})},P.toRuntimeSource=HY,P}function jH(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:wL({...n===!0?{}:n.palette,mode:t})})}function rS(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...a}=e,s=i||"light",l=o==null?void 0:o[s],c={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return _R(e,...t);let u=n;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const d=_R({...e,palette:u},...t);return d.defaultColorScheme=s,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},jH(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},jH(d,"light",c.light)),d}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),pwe({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}function hwe(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function mwe(e){return parseFloat(e)}const JO=rS();function ko(){const e=eS(JO);return e[Us]||e}function Jt({props:e,name:t}){return qO({props:e,name:t,defaultTheme:JO,themeId:Us})}function GY(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ri=e=>GY(e)&&e!=="classes",oe=PY({themeId:Us,defaultTheme:JO,rootShouldForwardProp:ri});function BH({theme:e,...t}){const n=Us in e?e[Us]:void 0;return $.jsx(LY,{...t,themeId:n?Us:void 0,theme:n||e})}const J1={attribute:"data-mui-color-scheme",colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:gwe,useColorScheme:V$t,getInitColorSchemeScript:H$t}=a0e({themeId:Us,theme:()=>rS({cssVariables:!0}),colorSchemeStorageKey:J1.colorSchemeStorageKey,modeStorageKey:J1.modeStorageKey,defaultColorScheme:{light:J1.defaultLightColorScheme,dark:J1.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:zY(e.palette,e.typography)};return t.unstable_sx=function(r){return mf({sx:r,theme:this})},t}}),ywe=gwe;function Of({theme:e,...t}){return typeof e=="function"?$.jsx(BH,{theme:e,...t}):"colorSchemes"in(Us in e?e[Us]:e)?$.jsx(ywe,{theme:e,...t}):$.jsx(BH,{theme:e,...t})}var bv=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ah=typeof window>"u"||"Deno"in globalThis;function ks(){}function vwe(e,t){return typeof e=="function"?e(t):e}function NR(e){return typeof e=="number"&&e>=0&&e!==1/0}function qY(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _g(e,t){return typeof e=="function"?e(t):e}function Rl(e,t){return typeof e=="function"?e(t):e}function zH(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==xL(a,t.options))return!1}else if(!Sw(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function VH(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(sh(t.options.mutationKey)!==sh(i))return!1}else if(!Sw(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function xL(e,t){return((t==null?void 0:t.queryKeyHashFn)||sh)(e)}function sh(e){return JSON.stringify(e,(t,n)=>LR(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Sw(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Sw(e[n],t[n])):!1}function KY(e,t){if(e===t)return e;const n=HH(e)&&HH(t);if(n||LR(e)&&LR(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),a=i.length,s=n?[]:{};let l=0;for(let c=0;c{setTimeout(t,e)})}function FR(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?KY(e,t):t}function wwe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function xwe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var SL=Symbol();function YY(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===SL?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var jp,Ld,ny,xK,Swe=(xK=class extends bv{constructor(){super();Lt(this,jp);Lt(this,Ld);Lt(this,ny);bt(this,ny,t=>{if(!ah&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){ve(this,Ld)||this.setEventListener(ve(this,ny))}onUnsubscribe(){var t;this.hasListeners()||((t=ve(this,Ld))==null||t.call(this),bt(this,Ld,void 0))}setEventListener(t){var n;bt(this,ny,t),(n=ve(this,Ld))==null||n.call(this),bt(this,Ld,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){ve(this,jp)!==t&&(bt(this,jp,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof ve(this,jp)=="boolean"?ve(this,jp):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},jp=new WeakMap,Ld=new WeakMap,ny=new WeakMap,xK),CL=new Swe,ry,Fd,oy,SK,Cwe=(SK=class extends bv{constructor(){super();Lt(this,ry,!0);Lt(this,Fd);Lt(this,oy);bt(this,oy,t=>{if(!ah&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){ve(this,Fd)||this.setEventListener(ve(this,oy))}onUnsubscribe(){var t;this.hasListeners()||((t=ve(this,Fd))==null||t.call(this),bt(this,Fd,void 0))}setEventListener(t){var n;bt(this,oy,t),(n=ve(this,Fd))==null||n.call(this),bt(this,Fd,t(this.setOnline.bind(this)))}setOnline(t){ve(this,ry)!==t&&(bt(this,ry,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return ve(this,ry)}},ry=new WeakMap,Fd=new WeakMap,oy=new WeakMap,SK),XP=new Cwe;function jR(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function Pwe(e){return Math.min(1e3*2**e,3e4)}function XY(e){return(e??"online")==="online"?XP.isOnline():!0}var QY=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function TA(e){return e instanceof QY}function JY(e){let t=!1,n=0,r=!1,o;const i=jR(),a=g=>{var v;r||(f(new QY(g)),(v=e.abort)==null||v.call(e))},s=()=>{t=!0},l=()=>{t=!1},c=()=>CL.isFocused()&&(e.networkMode==="always"||XP.isOnline())&&e.canRun(),u=()=>XY(e.networkMode)&&e.canRun(),d=g=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,g),o==null||o(),i.resolve(g))},f=g=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,g),o==null||o(),i.reject(g))},p=()=>new Promise(g=>{var v;o=w=>{(r||c())&&g(w)},(v=e.onPause)==null||v.call(e)}).then(()=>{var g;o=void 0,r||(g=e.onContinue)==null||g.call(e)}),m=()=>{if(r)return;let g;const v=n===0?e.initialPromise:void 0;try{g=v??e.fn()}catch(w){g=Promise.reject(w)}Promise.resolve(g).then(d).catch(w=>{var E;if(r)return;const x=e.retry??(ah?0:3),S=e.retryDelay??Pwe,P=typeof S=="function"?S(n,w):S,T=x===!0||typeof x=="number"&&nc()?void 0:p()).then(()=>{t?f(w):m()})})};return{promise:i,cancel:a,continue:()=>(o==null||o(),i),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?m():p().then(m),i)}}function Twe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},o=s=>setTimeout(s,0);const i=s=>{t?e.push(s):o(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&o(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{o=s}}}var Eo=Twe(),Bp,CK,ZY=(CK=class{constructor(){Lt(this,Bp)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),NR(this.gcTime)&&bt(this,Bp,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ah?1/0:5*60*1e3))}clearGcTimeout(){ve(this,Bp)&&(clearTimeout(ve(this,Bp)),bt(this,Bp,void 0))}},Bp=new WeakMap,CK),iy,ay,Is,ui,Hx,zp,Il,lu,PK,Ewe=(PK=class extends ZY{constructor(t){super();Lt(this,Il);Lt(this,iy);Lt(this,ay);Lt(this,Is);Lt(this,ui);Lt(this,Hx);Lt(this,zp);bt(this,zp,!1),bt(this,Hx,t.defaultOptions),this.setOptions(t.options),this.observers=[],bt(this,Is,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,bt(this,iy,Owe(this.options)),this.state=t.state??ve(this,iy),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=ve(this,ui))==null?void 0:t.promise}setOptions(t){this.options={...ve(this,Hx),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ve(this,Is).remove(this)}setData(t,n){const r=FR(this.state.data,t,this.options);return fn(this,Il,lu).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){fn(this,Il,lu).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=ve(this,ui))==null?void 0:r.promise;return(o=ve(this,ui))==null||o.cancel(t),n?n.then(ks).catch(ks):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ve(this,iy))}isActive(){return this.observers.some(t=>Rl(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===SL||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!qY(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=ve(this,ui))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=ve(this,ui))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ve(this,Is).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(ve(this,ui)&&(ve(this,zp)?ve(this,ui).cancel({revert:!0}):ve(this,ui).cancelRetry()),this.scheduleGc()),ve(this,Is).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||fn(this,Il,lu).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(ve(this,ui))return ve(this,ui).continueRetry(),ve(this,ui).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,o=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(bt(this,zp,!0),r.signal)})},i=()=>{const d=YY(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return o(f),bt(this,zp,!1),this.options.persister?this.options.persister(d,f,this):d(f)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};o(a),(l=this.options.behavior)==null||l.onFetch(a,this),bt(this,ay,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&fn(this,Il,lu).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta});const s=d=>{var f,p,m,g;TA(d)&&d.silent||fn(this,Il,lu).call(this,{type:"error",error:d}),TA(d)||((p=(f=ve(this,Is).config).onError)==null||p.call(f,d,this),(g=(m=ve(this,Is).config).onSettled)==null||g.call(m,this.state.data,d,this)),this.scheduleGc()};return bt(this,ui,JY({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,p,m,g;if(d===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(v){s(v);return}(p=(f=ve(this,Is).config).onSuccess)==null||p.call(f,d,this),(g=(m=ve(this,Is).config).onSettled)==null||g.call(m,d,this.state.error,this),this.scheduleGc()},onError:s,onFail:(d,f)=>{fn(this,Il,lu).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{fn(this,Il,lu).call(this,{type:"pause"})},onContinue:()=>{fn(this,Il,lu).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),ve(this,ui).start()}},iy=new WeakMap,ay=new WeakMap,Is=new WeakMap,ui=new WeakMap,Hx=new WeakMap,zp=new WeakMap,Il=new WeakSet,lu=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...eX(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return TA(o)&&o.revert&&ve(this,ay)?{...ve(this,ay),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Eo.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),ve(this,Is).notify({query:this,type:"updated",action:t})})},PK);function eX(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:XY(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Owe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var fc,TK,Iwe=(TK=class extends bv{constructor(t={}){super();Lt(this,fc);this.config=t,bt(this,fc,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??xL(o,n);let a=this.get(i);return a||(a=new Ewe({cache:this,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){ve(this,fc).has(t.queryHash)||(ve(this,fc).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=ve(this,fc).get(t.queryHash);n&&(t.destroy(),n===t&&ve(this,fc).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Eo.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ve(this,fc).get(t)}getAll(){return[...ve(this,fc).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>zH(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>zH(t,r)):n}notify(t){Eo.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Eo.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Eo.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},fc=new WeakMap,TK),pc,Mi,Vp,hc,xd,EK,kwe=(EK=class extends ZY{constructor(t){super();Lt(this,hc);Lt(this,pc);Lt(this,Mi);Lt(this,Vp);this.mutationId=t.mutationId,bt(this,Mi,t.mutationCache),bt(this,pc,[]),this.state=t.state||tX(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ve(this,pc).includes(t)||(ve(this,pc).push(t),this.clearGcTimeout(),ve(this,Mi).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){bt(this,pc,ve(this,pc).filter(n=>n!==t)),this.scheduleGc(),ve(this,Mi).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ve(this,pc).length||(this.state.status==="pending"?this.scheduleGc():ve(this,Mi).remove(this))}continue(){var t;return((t=ve(this,Vp))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,s,l,c,u,d,f,p,m,g,v,w,x,S,P,T,E,O;bt(this,Vp,JY({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,A)=>{fn(this,hc,xd).call(this,{type:"failed",failureCount:k,error:A})},onPause:()=>{fn(this,hc,xd).call(this,{type:"pause"})},onContinue:()=>{fn(this,hc,xd).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ve(this,Mi).canRun(this)}));const n=this.state.status==="pending",r=!ve(this,Vp).canStart();try{if(!n){fn(this,hc,xd).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=ve(this,Mi).config).onMutate)==null?void 0:i.call(o,t,this));const A=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,t));A!==this.state.context&&fn(this,hc,xd).call(this,{type:"pending",context:A,variables:t,isPaused:r})}const k=await ve(this,Vp).start();return await((c=(l=ve(this,Mi).config).onSuccess)==null?void 0:c.call(l,k,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,k,t,this.state.context)),await((p=(f=ve(this,Mi).config).onSettled)==null?void 0:p.call(f,k,null,this.state.variables,this.state.context,this)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,k,null,t,this.state.context)),fn(this,hc,xd).call(this,{type:"success",data:k}),k}catch(k){try{throw await((w=(v=ve(this,Mi).config).onError)==null?void 0:w.call(v,k,t,this.state.context,this)),await((S=(x=this.options).onError)==null?void 0:S.call(x,k,t,this.state.context)),await((T=(P=ve(this,Mi).config).onSettled)==null?void 0:T.call(P,void 0,k,this.state.variables,this.state.context,this)),await((O=(E=this.options).onSettled)==null?void 0:O.call(E,void 0,k,t,this.state.context)),k}finally{fn(this,hc,xd).call(this,{type:"error",error:k})}}finally{ve(this,Mi).runNext(this)}}},pc=new WeakMap,Mi=new WeakMap,Vp=new WeakMap,hc=new WeakSet,xd=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Eo.batch(()=>{ve(this,pc).forEach(r=>{r.onMutationUpdate(t)}),ve(this,Mi).notify({mutation:this,type:"updated",action:t})})},EK);function tX(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $a,Ux,OK,Mwe=(OK=class extends bv{constructor(t={}){super();Lt(this,$a);Lt(this,Ux);this.config=t,bt(this,$a,new Map),bt(this,Ux,Date.now())}build(t,n,r){const o=new kwe({mutationCache:this,mutationId:++q1(this,Ux)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){const n=Z1(t),r=ve(this,$a).get(n)??[];r.push(t),ve(this,$a).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Z1(t);if(ve(this,$a).has(n)){const o=(r=ve(this,$a).get(n))==null?void 0:r.filter(i=>i!==t);o&&(o.length===0?ve(this,$a).delete(n):ve(this,$a).set(n,o))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=ve(this,$a).get(Z1(t)))==null?void 0:r.find(o=>o.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=ve(this,$a).get(Z1(t)))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Eo.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...ve(this,$a).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>VH(n,r))}findAll(t={}){return this.getAll().filter(n=>VH(t,n))}notify(t){Eo.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Eo.batch(()=>Promise.all(t.map(n=>n.continue().catch(ks))))}},$a=new WeakMap,Ux=new WeakMap,OK);function Z1(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function WH(e){return{onFetch:(t,n)=>{var u,d,f,p,m;const r=t.options,o=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],a=((m=t.state.data)==null?void 0:m.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const v=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},w=YY(t.options,t.fetchOptions),x=async(S,P,T)=>{if(g)return Promise.reject();if(P==null&&S.pages.length)return Promise.resolve(S);const E={queryKey:t.queryKey,pageParam:P,direction:T?"backward":"forward",meta:t.options.meta};v(E);const O=await w(E),{maxPages:k}=t.options,A=T?xwe:wwe;return{pages:A(S.pages,O,k),pageParams:A(S.pageParams,P,k)}};if(o&&i.length){const S=o==="backward",P=S?Awe:GH,T={pages:i,pageParams:a},E=P(r,T);s=await x(T,E,S)}else{const S=e??i.length;do{const P=l===0?a[0]??r.initialPageParam:GH(r,s);if(l>0&&P==null)break;s=await x(s,P),l++}while(l{var g,v;return(v=(g=t.options).persister)==null?void 0:v.call(g,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function GH(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Awe(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var qr,jd,Bd,sy,ly,zd,cy,uy,IK,$we=(IK=class{constructor(e={}){Lt(this,qr);Lt(this,jd);Lt(this,Bd);Lt(this,sy);Lt(this,ly);Lt(this,zd);Lt(this,cy);Lt(this,uy);bt(this,qr,e.queryCache||new Iwe),bt(this,jd,e.mutationCache||new Mwe),bt(this,Bd,e.defaultOptions||{}),bt(this,sy,new Map),bt(this,ly,new Map),bt(this,zd,0)}mount(){q1(this,zd)._++,ve(this,zd)===1&&(bt(this,cy,CL.subscribe(async e=>{e&&(await this.resumePausedMutations(),ve(this,qr).onFocus())})),bt(this,uy,XP.subscribe(async e=>{e&&(await this.resumePausedMutations(),ve(this,qr).onOnline())})))}unmount(){var e,t;q1(this,zd)._--,ve(this,zd)===0&&((e=ve(this,cy))==null||e.call(this),bt(this,cy,void 0),(t=ve(this,uy))==null||t.call(this),bt(this,uy,void 0))}isFetching(e){return ve(this,qr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ve(this,jd).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ve(this,qr).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=ve(this,qr).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(_g(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return ve(this,qr).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=ve(this,qr).get(r.queryHash),i=o==null?void 0:o.state.data,a=vwe(t,i);if(a!==void 0)return ve(this,qr).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Eo.batch(()=>ve(this,qr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ve(this,qr).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=ve(this,qr);Eo.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=ve(this,qr),r={type:"active",...e};return Eo.batch(()=>(n.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Eo.batch(()=>ve(this,qr).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(ks).catch(ks)}invalidateQueries(e={},t={}){return Eo.batch(()=>{if(ve(this,qr).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Eo.batch(()=>ve(this,qr).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(ks)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(ks)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=ve(this,qr).build(this,t);return n.isStaleByTime(_g(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ks).catch(ks)}fetchInfiniteQuery(e){return e.behavior=WH(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ks).catch(ks)}ensureInfiniteQueryData(e){return e.behavior=WH(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return XP.isOnline()?ve(this,jd).resumePausedMutations():Promise.resolve()}getQueryCache(){return ve(this,qr)}getMutationCache(){return ve(this,jd)}getDefaultOptions(){return ve(this,Bd)}setDefaultOptions(e){bt(this,Bd,e)}setQueryDefaults(e,t){ve(this,sy).set(sh(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ve(this,sy).values()];let n={};return t.forEach(r=>{Sw(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){ve(this,ly).set(sh(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ve(this,ly).values()];let n={};return t.forEach(r=>{Sw(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ve(this,Bd).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=xL(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===SL&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ve(this,Bd).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ve(this,qr).clear(),ve(this,jd).clear()}},qr=new WeakMap,jd=new WeakMap,Bd=new WeakMap,sy=new WeakMap,ly=new WeakMap,zd=new WeakMap,cy=new WeakMap,uy=new WeakMap,IK),na,An,Wx,Ai,Hp,dy,Vd,mc,Gx,fy,py,Up,Wp,Hd,hy,Zn,w0,BR,zR,VR,HR,UR,WR,GR,nX,kK,Rwe=(kK=class extends bv{constructor(t,n){super();Lt(this,Zn);Lt(this,na);Lt(this,An);Lt(this,Wx);Lt(this,Ai);Lt(this,Hp);Lt(this,dy);Lt(this,Vd);Lt(this,mc);Lt(this,Gx);Lt(this,fy);Lt(this,py);Lt(this,Up);Lt(this,Wp);Lt(this,Hd);Lt(this,hy,new Set);this.options=n,bt(this,na,t),bt(this,mc,null),bt(this,Vd,jR()),this.options.experimental_prefetchInRender||ve(this,Vd).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ve(this,An).addObserver(this),qH(ve(this,An),this.options)?fn(this,Zn,w0).call(this):this.updateResult(),fn(this,Zn,HR).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qR(ve(this,An),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qR(ve(this,An),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,fn(this,Zn,UR).call(this),fn(this,Zn,WR).call(this),ve(this,An).removeObserver(this)}setOptions(t,n){const r=this.options,o=ve(this,An);if(this.options=ve(this,na).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Rl(this.options.enabled,ve(this,An))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");fn(this,Zn,GR).call(this),ve(this,An).setOptions(this.options),r._defaulted&&!YP(this.options,r)&&ve(this,na).getQueryCache().notify({type:"observerOptionsUpdated",query:ve(this,An),observer:this});const i=this.hasListeners();i&&KH(ve(this,An),o,this.options,r)&&fn(this,Zn,w0).call(this),this.updateResult(n),i&&(ve(this,An)!==o||Rl(this.options.enabled,ve(this,An))!==Rl(r.enabled,ve(this,An))||_g(this.options.staleTime,ve(this,An))!==_g(r.staleTime,ve(this,An)))&&fn(this,Zn,BR).call(this);const a=fn(this,Zn,zR).call(this);i&&(ve(this,An)!==o||Rl(this.options.enabled,ve(this,An))!==Rl(r.enabled,ve(this,An))||a!==ve(this,Hd))&&fn(this,Zn,VR).call(this,a)}getOptimisticResult(t){const n=ve(this,na).getQueryCache().build(ve(this,na),t),r=this.createResult(n,t);return Dwe(this,r)&&(bt(this,Ai,r),bt(this,dy,this.options),bt(this,Hp,ve(this,An).state)),r}getCurrentResult(){return ve(this,Ai)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){ve(this,hy).add(t)}getCurrentQuery(){return ve(this,An)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=ve(this,na).defaultQueryOptions(t),r=ve(this,na).getQueryCache().build(ve(this,na),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return fn(this,Zn,w0).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ve(this,Ai)))}createResult(t,n){var k;const r=ve(this,An),o=this.options,i=ve(this,Ai),a=ve(this,Hp),s=ve(this,dy),c=t!==r?t.state:ve(this,Wx),{state:u}=t;let d={...u},f=!1,p;if(n._optimisticResults){const A=this.hasListeners(),I=!A&&qH(t,n),R=A&&KH(t,r,n,o);(I||R)&&(d={...d,...eX(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:v}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(a==null?void 0:a.data)&&n.select===ve(this,Gx))p=ve(this,fy);else try{bt(this,Gx,n.select),p=n.select(d.data),p=FR(i==null?void 0:i.data,p,n),bt(this,fy,p),bt(this,mc,null)}catch(A){bt(this,mc,A)}else p=d.data;if(n.placeholderData!==void 0&&p===void 0&&v==="pending"){let A;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))A=i.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData((k=ve(this,py))==null?void 0:k.state.data,ve(this,py)):n.placeholderData,n.select&&A!==void 0)try{A=n.select(A),bt(this,mc,null)}catch(I){bt(this,mc,I)}A!==void 0&&(v="success",p=FR(i==null?void 0:i.data,A,n),f=!0)}ve(this,mc)&&(m=ve(this,mc),p=ve(this,fy),g=Date.now(),v="error");const w=d.fetchStatus==="fetching",x=v==="pending",S=v==="error",P=x&&w,T=p!==void 0,O={status:v,fetchStatus:d.fetchStatus,isPending:x,isSuccess:v==="success",isError:S,isInitialLoading:P,isLoading:P,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!x,isLoadingError:S&&!T,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&T,isStale:PL(t,n),refetch:this.refetch,promise:ve(this,Vd)};if(this.options.experimental_prefetchInRender){const A=L=>{O.status==="error"?L.reject(O.error):O.data!==void 0&&L.resolve(O.data)},I=()=>{const L=bt(this,Vd,O.promise=jR());A(L)},R=ve(this,Vd);switch(R.status){case"pending":t.queryHash===r.queryHash&&A(R);break;case"fulfilled":(O.status==="error"||O.data!==R.value)&&I();break;case"rejected":(O.status!=="error"||O.error!==R.reason)&&I();break}}return O}updateResult(t){const n=ve(this,Ai),r=this.createResult(ve(this,An),this.options);if(bt(this,Hp,ve(this,An).state),bt(this,dy,this.options),ve(this,Hp).data!==void 0&&bt(this,py,ve(this,An)),YP(r,n))return;bt(this,Ai,r);const o={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!ve(this,hy).size)return!0;const l=new Set(s??ve(this,hy));return this.options.throwOnError&&l.add("error"),Object.keys(ve(this,Ai)).some(c=>{const u=c;return ve(this,Ai)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),fn(this,Zn,nX).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&fn(this,Zn,HR).call(this)}},na=new WeakMap,An=new WeakMap,Wx=new WeakMap,Ai=new WeakMap,Hp=new WeakMap,dy=new WeakMap,Vd=new WeakMap,mc=new WeakMap,Gx=new WeakMap,fy=new WeakMap,py=new WeakMap,Up=new WeakMap,Wp=new WeakMap,Hd=new WeakMap,hy=new WeakMap,Zn=new WeakSet,w0=function(t){fn(this,Zn,GR).call(this);let n=ve(this,An).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ks)),n},BR=function(){fn(this,Zn,UR).call(this);const t=_g(this.options.staleTime,ve(this,An));if(ah||ve(this,Ai).isStale||!NR(t))return;const r=qY(ve(this,Ai).dataUpdatedAt,t)+1;bt(this,Up,setTimeout(()=>{ve(this,Ai).isStale||this.updateResult()},r))},zR=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ve(this,An)):this.options.refetchInterval)??!1},VR=function(t){fn(this,Zn,WR).call(this),bt(this,Hd,t),!(ah||Rl(this.options.enabled,ve(this,An))===!1||!NR(ve(this,Hd))||ve(this,Hd)===0)&&bt(this,Wp,setInterval(()=>{(this.options.refetchIntervalInBackground||CL.isFocused())&&fn(this,Zn,w0).call(this)},ve(this,Hd)))},HR=function(){fn(this,Zn,BR).call(this),fn(this,Zn,VR).call(this,fn(this,Zn,zR).call(this))},UR=function(){ve(this,Up)&&(clearTimeout(ve(this,Up)),bt(this,Up,void 0))},WR=function(){ve(this,Wp)&&(clearInterval(ve(this,Wp)),bt(this,Wp,void 0))},GR=function(){const t=ve(this,na).getQueryCache().build(ve(this,na),this.options);if(t===ve(this,An))return;const n=ve(this,An);bt(this,An,t),bt(this,Wx,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},nX=function(t){Eo.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(ve(this,Ai))}),ve(this,na).getQueryCache().notify({query:ve(this,An),type:"observerResultsUpdated"})})},kK);function _we(e,t){return Rl(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function qH(e,t){return _we(e,t)||e.state.data!==void 0&&qR(e,t,t.refetchOnMount)}function qR(e,t,n){if(Rl(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&PL(e,t)}return!1}function KH(e,t,n,r){return(e!==t||Rl(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&PL(e,n)}function PL(e,t){return Rl(t.enabled,e)!==!1&&e.isStaleByTime(_g(t.staleTime,e))}function Dwe(e,t){return!YP(e.getCurrentResult(),t)}var Ud,Wd,ra,gu,Au,pP,KR,MK,Nwe=(MK=class extends bv{constructor(n,r){super();Lt(this,Au);Lt(this,Ud);Lt(this,Wd);Lt(this,ra);Lt(this,gu);bt(this,Ud,n),this.setOptions(r),this.bindMethods(),fn(this,Au,pP).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=ve(this,Ud).defaultMutationOptions(n),YP(this.options,r)||ve(this,Ud).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ve(this,ra),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&sh(r.mutationKey)!==sh(this.options.mutationKey)?this.reset():((o=ve(this,ra))==null?void 0:o.state.status)==="pending"&&ve(this,ra).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=ve(this,ra))==null||n.removeObserver(this)}onMutationUpdate(n){fn(this,Au,pP).call(this),fn(this,Au,KR).call(this,n)}getCurrentResult(){return ve(this,Wd)}reset(){var n;(n=ve(this,ra))==null||n.removeObserver(this),bt(this,ra,void 0),fn(this,Au,pP).call(this),fn(this,Au,KR).call(this)}mutate(n,r){var o;return bt(this,gu,r),(o=ve(this,ra))==null||o.removeObserver(this),bt(this,ra,ve(this,Ud).getMutationCache().build(ve(this,Ud),this.options)),ve(this,ra).addObserver(this),ve(this,ra).execute(n)}},Ud=new WeakMap,Wd=new WeakMap,ra=new WeakMap,gu=new WeakMap,Au=new WeakSet,pP=function(){var r;const n=((r=ve(this,ra))==null?void 0:r.state)??tX();bt(this,Wd,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},KR=function(n){Eo.batch(()=>{var r,o,i,a,s,l,c,u;if(ve(this,gu)&&this.hasListeners()){const d=ve(this,Wd).variables,f=ve(this,Wd).context;(n==null?void 0:n.type)==="success"?((o=(r=ve(this,gu)).onSuccess)==null||o.call(r,n.data,d,f),(a=(i=ve(this,gu)).onSettled)==null||a.call(i,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(s=ve(this,gu)).onError)==null||l.call(s,n.error,d,f),(u=(c=ve(this,gu)).onSettled)==null||u.call(c,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(ve(this,Wd))})})},MK),rX=y.createContext(void 0),Vr=e=>{const t=y.useContext(rX);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Mh=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),$.jsx(rX.Provider,{value:e,children:t})),oX=y.createContext(!1),Lwe=()=>y.useContext(oX);oX.Provider;function Fwe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var jwe=y.createContext(Fwe()),Bwe=()=>y.useContext(jwe);function iX(e,t){return typeof e=="function"?e(...t):!!e}function aX(){}var zwe=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},Vwe=e=>{y.useEffect(()=>{e.clearReset()},[e])},Hwe=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&iX(n,[e.error,r]),Uwe=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Wwe=(e,t)=>e.isLoading&&e.isFetching&&!t,Gwe=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,YH=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function qwe(e,t,n){var u,d,f,p,m;const r=Vr(),o=Lwe(),i=Bwe(),a=r.defaultQueryOptions(e);(d=(u=r.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||d.call(u,a),a._optimisticResults=o?"isRestoring":"optimistic",Uwe(a),zwe(a,i),Vwe(i);const s=!r.getQueryCache().get(a.queryHash),[l]=y.useState(()=>new t(r,a)),c=l.getOptimisticResult(a);if(y.useSyncExternalStore(y.useCallback(g=>{const v=o?()=>{}:l.subscribe(Eo.batchCalls(g));return l.updateResult(),v},[l,o]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(a,{listeners:!1})},[a,l]),Gwe(a,c))throw YH(a,l,i);if(Hwe({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw c.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,a,c),a.experimental_prefetchInRender&&!ah&&Wwe(c,o)){const g=s?YH(a,l,i):(m=r.getQueryCache().get(a.queryHash))==null?void 0:m.promise;g==null||g.catch(aX).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?c:l.trackResult(c)}function yo(e,t){return qwe(e,Rwe)}function oo(e,t){const n=Vr(),[r]=y.useState(()=>new Nwe(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const o=y.useSyncExternalStore(y.useCallback(a=>r.subscribe(Eo.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=y.useCallback((a,s)=>{r.mutate(a,s).catch(aX)},[r]);if(o.error&&iX(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}var Kwe=function(){return null};function Ywe(e){return $.jsx(bbe,{...e,defaultTheme:JO,themeId:Us})}function Xwe(e){return function(n){return $.jsx(Ywe,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function Qwe(){return NO}const rt=e0e;function at(e){return Zbe(e)}function Jwe(e){return Ne("MuiSvgIcon",e)}Le("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Zwe=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Se(t)}`,`fontSize${Se(n)}`]};return Te(o,Jwe,r)},exe=oe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Se(n.color)}`],t[`fontSize${Se(n.fontSize)}`]]}})(rt(({theme:e})=>{var t,n,r,o,i,a,s,l,c,u,d,f,p,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:g=>!g.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,g])=>g&&g.main).map(([g])=>{var v,w;return{props:{color:g},style:{color:(w=(v=(e.vars??e).palette)==null?void 0:v[g])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(f=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(m=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:m.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Cw=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=r,m=y.isValidElement(o)&&o.type==="svg",g={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:m},v={};u||(v.viewBox=f);const w=Zwe(g);return $.jsxs(exe,{as:s,className:fe(w.root,i),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...v,...p,...m&&o.props,ownerState:g,children:[m?o.props.children:o,d?$.jsx("title",{children:d}):null]})});Cw&&(Cw.muiName="SvgIcon");function ut(e,t){function n(r,o){return $.jsx(Cw,{"data-testid":`${t}Icon`,ref:o,...r,children:e})}return n.muiName=Cw.muiName,y.memo(y.forwardRef(n))}function Ue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function YR(e,t){return YR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},YR(e,t)}function oS(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,YR(e,t)}function txe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function nxe(e,t){e.classList?e.classList.add(t):txe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function XH(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function rxe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=XH(e.className,t):e.setAttribute("class",XH(e.className&&e.className.baseVal||"",t))}var sX={exports:{}},rs={},lX={exports:{}},cX={};/** +export default theme;`}function $R(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,...c}=e;if(e.vars)throw new Error($u(20));const u=gN(i),d=hv(e);let f=mo(d,{mixins:z0e(d.breakpoints,r),palette:u,shadows:G0e.slice(),typography:NY(u,s),transitions:Y0e(a),zIndex:{...X0e}});return f=mo(f,c),f=t.reduce((p,m)=>mo(p,m),f),f.unstable_sxConfig={...Zx,...c==null?void 0:c.unstable_sxConfig},f.unstable_sx=function(m){return mf({sx:m,theme:this})},f.toRuntimeSource=jY,f}function RR(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const J0e=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=RR(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function BY(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function zY(e){return e==="dark"?J0e:[]}function Z0e(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=gN(t);return{palette:i,opacity:{...BY(i.mode),...n},overlays:r||zY(i.mode),...o}}function ewe(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const twe=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],nwe=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return twe(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",t)]:a,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function rwe(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function ze(e,t,n){!e[t]&&n&&(e[t]=n)}function b0(e){return typeof e!="string"||!e.startsWith("hsl")?e:CY(e)}function ru(e,t){`${t}Channel`in e||(e[`${t}Channel`]=v0(b0(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color(). +To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function owe(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ac=e=>{try{return e()}catch{}},iwe=(e="mui")=>e0e(e);function xA(e,t,n,r){if(!t)return;t=t===!0?{}:t;const o=r==="dark"?"dark":"light";if(!n){e[r]=Z0e({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:i,...a}=$R({...n,palette:{mode:o,...t==null?void 0:t.palette}});return e[r]={...t,palette:i,opacity:{...BY(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||zY(o)},a}function awe(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=ewe,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],d=r||(n.light&&u!=="light"?"light":u),f=iwe(i),{[d]:p,light:m,dark:g,...y}=n,b={...y};let x=p;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(x=!0),!x)throw new Error($u(21,d));const S=xA(b,x,c,d);m&&!b.light&&xA(b,m,void 0,"light"),g&&!b.dark&&xA(b,g,void 0,"dark");let P={defaultColorScheme:d,...S,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:f,colorSchemes:b,font:{...B0e(S.typography),...S.font},spacing:owe(c.spacing)};Object.keys(P.colorSchemes).forEach(M=>{const I=P.colorSchemes[M].palette,R=_=>{const N=_.split("-"),B=N[1],L=N[2];return f(_,I[B][L])};if(I.mode==="light"&&(ze(I.common,"background","#fff"),ze(I.common,"onBackground","#000")),I.mode==="dark"&&(ze(I.common,"background","#000"),ze(I.common,"onBackground","#fff")),rwe(I,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),I.mode==="light"){ze(I.Alert,"errorColor",fr(I.error.light,.6)),ze(I.Alert,"infoColor",fr(I.info.light,.6)),ze(I.Alert,"successColor",fr(I.success.light,.6)),ze(I.Alert,"warningColor",fr(I.warning.light,.6)),ze(I.Alert,"errorFilledBg",R("palette-error-main")),ze(I.Alert,"infoFilledBg",R("palette-info-main")),ze(I.Alert,"successFilledBg",R("palette-success-main")),ze(I.Alert,"warningFilledBg",R("palette-warning-main")),ze(I.Alert,"errorFilledColor",ac(()=>I.getContrastText(I.error.main))),ze(I.Alert,"infoFilledColor",ac(()=>I.getContrastText(I.info.main))),ze(I.Alert,"successFilledColor",ac(()=>I.getContrastText(I.success.main))),ze(I.Alert,"warningFilledColor",ac(()=>I.getContrastText(I.warning.main))),ze(I.Alert,"errorStandardBg",pr(I.error.light,.9)),ze(I.Alert,"infoStandardBg",pr(I.info.light,.9)),ze(I.Alert,"successStandardBg",pr(I.success.light,.9)),ze(I.Alert,"warningStandardBg",pr(I.warning.light,.9)),ze(I.Alert,"errorIconColor",R("palette-error-main")),ze(I.Alert,"infoIconColor",R("palette-info-main")),ze(I.Alert,"successIconColor",R("palette-success-main")),ze(I.Alert,"warningIconColor",R("palette-warning-main")),ze(I.AppBar,"defaultBg",R("palette-grey-100")),ze(I.Avatar,"defaultBg",R("palette-grey-400")),ze(I.Button,"inheritContainedBg",R("palette-grey-300")),ze(I.Button,"inheritContainedHoverBg",R("palette-grey-A100")),ze(I.Chip,"defaultBorder",R("palette-grey-400")),ze(I.Chip,"defaultAvatarColor",R("palette-grey-700")),ze(I.Chip,"defaultIconColor",R("palette-grey-700")),ze(I.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),ze(I.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),ze(I.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),ze(I.LinearProgress,"primaryBg",pr(I.primary.main,.62)),ze(I.LinearProgress,"secondaryBg",pr(I.secondary.main,.62)),ze(I.LinearProgress,"errorBg",pr(I.error.main,.62)),ze(I.LinearProgress,"infoBg",pr(I.info.main,.62)),ze(I.LinearProgress,"successBg",pr(I.success.main,.62)),ze(I.LinearProgress,"warningBg",pr(I.warning.main,.62)),ze(I.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),ze(I.Slider,"primaryTrack",pr(I.primary.main,.62)),ze(I.Slider,"secondaryTrack",pr(I.secondary.main,.62)),ze(I.Slider,"errorTrack",pr(I.error.main,.62)),ze(I.Slider,"infoTrack",pr(I.info.main,.62)),ze(I.Slider,"successTrack",pr(I.success.main,.62)),ze(I.Slider,"warningTrack",pr(I.warning.main,.62));const _=X1(I.background.default,.8);ze(I.SnackbarContent,"bg",_),ze(I.SnackbarContent,"color",ac(()=>I.getContrastText(_))),ze(I.SpeedDialAction,"fabHoverBg",X1(I.background.paper,.15)),ze(I.StepConnector,"border",R("palette-grey-400")),ze(I.StepContent,"border",R("palette-grey-400")),ze(I.Switch,"defaultColor",R("palette-common-white")),ze(I.Switch,"defaultDisabledColor",R("palette-grey-100")),ze(I.Switch,"primaryDisabledColor",pr(I.primary.main,.62)),ze(I.Switch,"secondaryDisabledColor",pr(I.secondary.main,.62)),ze(I.Switch,"errorDisabledColor",pr(I.error.main,.62)),ze(I.Switch,"infoDisabledColor",pr(I.info.main,.62)),ze(I.Switch,"successDisabledColor",pr(I.success.main,.62)),ze(I.Switch,"warningDisabledColor",pr(I.warning.main,.62)),ze(I.TableCell,"border",pr(Y1(I.divider,1),.88)),ze(I.Tooltip,"bg",Y1(I.grey[700],.92))}if(I.mode==="dark"){ze(I.Alert,"errorColor",pr(I.error.light,.6)),ze(I.Alert,"infoColor",pr(I.info.light,.6)),ze(I.Alert,"successColor",pr(I.success.light,.6)),ze(I.Alert,"warningColor",pr(I.warning.light,.6)),ze(I.Alert,"errorFilledBg",R("palette-error-dark")),ze(I.Alert,"infoFilledBg",R("palette-info-dark")),ze(I.Alert,"successFilledBg",R("palette-success-dark")),ze(I.Alert,"warningFilledBg",R("palette-warning-dark")),ze(I.Alert,"errorFilledColor",ac(()=>I.getContrastText(I.error.dark))),ze(I.Alert,"infoFilledColor",ac(()=>I.getContrastText(I.info.dark))),ze(I.Alert,"successFilledColor",ac(()=>I.getContrastText(I.success.dark))),ze(I.Alert,"warningFilledColor",ac(()=>I.getContrastText(I.warning.dark))),ze(I.Alert,"errorStandardBg",fr(I.error.light,.9)),ze(I.Alert,"infoStandardBg",fr(I.info.light,.9)),ze(I.Alert,"successStandardBg",fr(I.success.light,.9)),ze(I.Alert,"warningStandardBg",fr(I.warning.light,.9)),ze(I.Alert,"errorIconColor",R("palette-error-main")),ze(I.Alert,"infoIconColor",R("palette-info-main")),ze(I.Alert,"successIconColor",R("palette-success-main")),ze(I.Alert,"warningIconColor",R("palette-warning-main")),ze(I.AppBar,"defaultBg",R("palette-grey-900")),ze(I.AppBar,"darkBg",R("palette-background-paper")),ze(I.AppBar,"darkColor",R("palette-text-primary")),ze(I.Avatar,"defaultBg",R("palette-grey-600")),ze(I.Button,"inheritContainedBg",R("palette-grey-800")),ze(I.Button,"inheritContainedHoverBg",R("palette-grey-700")),ze(I.Chip,"defaultBorder",R("palette-grey-700")),ze(I.Chip,"defaultAvatarColor",R("palette-grey-300")),ze(I.Chip,"defaultIconColor",R("palette-grey-300")),ze(I.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),ze(I.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),ze(I.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),ze(I.LinearProgress,"primaryBg",fr(I.primary.main,.5)),ze(I.LinearProgress,"secondaryBg",fr(I.secondary.main,.5)),ze(I.LinearProgress,"errorBg",fr(I.error.main,.5)),ze(I.LinearProgress,"infoBg",fr(I.info.main,.5)),ze(I.LinearProgress,"successBg",fr(I.success.main,.5)),ze(I.LinearProgress,"warningBg",fr(I.warning.main,.5)),ze(I.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),ze(I.Slider,"primaryTrack",fr(I.primary.main,.5)),ze(I.Slider,"secondaryTrack",fr(I.secondary.main,.5)),ze(I.Slider,"errorTrack",fr(I.error.main,.5)),ze(I.Slider,"infoTrack",fr(I.info.main,.5)),ze(I.Slider,"successTrack",fr(I.success.main,.5)),ze(I.Slider,"warningTrack",fr(I.warning.main,.5));const _=X1(I.background.default,.98);ze(I.SnackbarContent,"bg",_),ze(I.SnackbarContent,"color",ac(()=>I.getContrastText(_))),ze(I.SpeedDialAction,"fabHoverBg",X1(I.background.paper,.15)),ze(I.StepConnector,"border",R("palette-grey-600")),ze(I.StepContent,"border",R("palette-grey-600")),ze(I.Switch,"defaultColor",R("palette-grey-300")),ze(I.Switch,"defaultDisabledColor",R("palette-grey-600")),ze(I.Switch,"primaryDisabledColor",fr(I.primary.main,.55)),ze(I.Switch,"secondaryDisabledColor",fr(I.secondary.main,.55)),ze(I.Switch,"errorDisabledColor",fr(I.error.main,.55)),ze(I.Switch,"infoDisabledColor",fr(I.info.main,.55)),ze(I.Switch,"successDisabledColor",fr(I.success.main,.55)),ze(I.Switch,"warningDisabledColor",fr(I.warning.main,.55)),ze(I.TableCell,"border",fr(Y1(I.divider,1),.68)),ze(I.Tooltip,"bg",Y1(I.grey[700],.92))}ru(I.background,"default"),ru(I.background,"paper"),ru(I.common,"background"),ru(I.common,"onBackground"),ru(I,"divider"),Object.keys(I).forEach(_=>{const N=I[_];_!=="tonalOffset"&&N&&typeof N=="object"&&(N.main&&ze(I[_],"mainChannel",v0(b0(N.main))),N.light&&ze(I[_],"lightChannel",v0(b0(N.light))),N.dark&&ze(I[_],"darkChannel",v0(b0(N.dark))),N.contrastText&&ze(I[_],"contrastTextChannel",v0(b0(N.contrastText))),_==="text"&&(ru(I[_],"primary"),ru(I[_],"secondary")),_==="action"&&(N.active&&ru(I[_],"active"),N.selected&&ru(I[_],"selected")))})}),P=t.reduce((M,I)=>mo(M,I),P);const E={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:nwe(P)},{vars:T,generateThemeVars:O,generateStyleSheets:k}=r0e(P,E);return P.vars=T,Object.entries(P.colorSchemes[P.defaultColorScheme]).forEach(([M,I])=>{P[M]=I}),P.generateThemeVars=O,P.generateStyleSheets=k,P.generateSpacing=function(){return mY(c.spacing,TO(this))},P.getColorSchemeSelector=o0e(s),P.spacing=P.generateSpacing(),P.shouldSkipGeneratingVar=a,P.unstable_sxConfig={...Zx,...c==null?void 0:c.unstable_sxConfig},P.unstable_sx=function(I){return mf({sx:I,theme:this})},P.toRuntimeSource=jY,P}function jH(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:gN({...n===!0?{}:n.palette,mode:t})})}function rS(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...a}=e,s=i||"light",l=o==null?void 0:o[s],c={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return $R(e,...t);let u=n;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const d=$R({...e,palette:u},...t);return d.defaultColorScheme=s,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},jH(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},jH(d,"light",c.light)),d}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),awe({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}function swe(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function lwe(e){return parseFloat(e)}const FO=rS();function Ao(){const e=eS(FO);return e[Hs]||e}function Jt({props:e,name:t}){return RO({props:e,name:t,defaultTheme:FO,themeId:Hs})}function VY(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ii=e=>VY(e)&&e!=="classes",ie=wY({themeId:Hs,defaultTheme:FO,rootShouldForwardProp:ii});function BH({theme:e,...t}){const n=Hs in e?e[Hs]:void 0;return $.jsx(RY,{...t,themeId:n?Hs:void 0,theme:n||e})}const Q1={attribute:"data-mui-color-scheme",colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:cwe,useColorScheme:j$t,getInitColorSchemeScript:B$t}=Zbe({themeId:Hs,theme:()=>rS({cssVariables:!0}),colorSchemeStorageKey:Q1.colorSchemeStorageKey,modeStorageKey:Q1.modeStorageKey,defaultColorScheme:{light:Q1.defaultLightColorScheme,dark:Q1.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:NY(e.palette,e.typography)};return t.unstable_sx=function(r){return mf({sx:r,theme:this})},t}}),uwe=cwe;function Of({theme:e,...t}){return typeof e=="function"?$.jsx(BH,{theme:e,...t}):"colorSchemes"in(Hs in e?e[Hs]:e)?$.jsx(uwe,{theme:e,...t}):$.jsx(BH,{theme:e,...t})}var yv=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ah=typeof window>"u"||"Deno"in globalThis;function Is(){}function dwe(e,t){return typeof e=="function"?e(t):e}function DR(e){return typeof e=="number"&&e>=0&&e!==1/0}function HY(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Dg(e,t){return typeof e=="function"?e(t):e}function $l(e,t){return typeof e=="function"?e(t):e}function zH(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==yN(a,t.options))return!1}else if(!Sw(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function VH(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(sh(t.options.mutationKey)!==sh(i))return!1}else if(!Sw(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function yN(e,t){return((t==null?void 0:t.queryKeyHashFn)||sh)(e)}function sh(e){return JSON.stringify(e,(t,n)=>_R(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Sw(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Sw(e[n],t[n])):!1}function UY(e,t){if(e===t)return e;const n=HH(e)&&HH(t);if(n||_R(e)&&_R(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),a=i.length,s=n?[]:{};let l=0;for(let c=0;c{setTimeout(t,e)})}function LR(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?UY(e,t):t}function pwe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function hwe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var vN=Symbol();function WY(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===vN?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Bp,Nd,ty,xK,mwe=(xK=class extends yv{constructor(){super();jt(this,Bp);jt(this,Nd);jt(this,ty);bt(this,ty,t=>{if(!ah&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){ve(this,Nd)||this.setEventListener(ve(this,ty))}onUnsubscribe(){var t;this.hasListeners()||((t=ve(this,Nd))==null||t.call(this),bt(this,Nd,void 0))}setEventListener(t){var n;bt(this,ty,t),(n=ve(this,Nd))==null||n.call(this),bt(this,Nd,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){ve(this,Bp)!==t&&(bt(this,Bp,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof ve(this,Bp)=="boolean"?ve(this,Bp):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Bp=new WeakMap,Nd=new WeakMap,ty=new WeakMap,xK),bN=new mwe,ny,Fd,ry,SK,gwe=(SK=class extends yv{constructor(){super();jt(this,ny,!0);jt(this,Fd);jt(this,ry);bt(this,ry,t=>{if(!ah&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){ve(this,Fd)||this.setEventListener(ve(this,ry))}onUnsubscribe(){var t;this.hasListeners()||((t=ve(this,Fd))==null||t.call(this),bt(this,Fd,void 0))}setEventListener(t){var n;bt(this,ry,t),(n=ve(this,Fd))==null||n.call(this),bt(this,Fd,t(this.setOnline.bind(this)))}setOnline(t){ve(this,ny)!==t&&(bt(this,ny,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return ve(this,ny)}},ny=new WeakMap,Fd=new WeakMap,ry=new WeakMap,SK),KP=new gwe;function NR(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function ywe(e){return Math.min(1e3*2**e,3e4)}function GY(e){return(e??"online")==="online"?KP.isOnline():!0}var qY=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function SA(e){return e instanceof qY}function KY(e){let t=!1,n=0,r=!1,o;const i=NR(),a=g=>{var y;r||(f(new qY(g)),(y=e.abort)==null||y.call(e))},s=()=>{t=!0},l=()=>{t=!1},c=()=>bN.isFocused()&&(e.networkMode==="always"||KP.isOnline())&&e.canRun(),u=()=>GY(e.networkMode)&&e.canRun(),d=g=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,g),o==null||o(),i.resolve(g))},f=g=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,g),o==null||o(),i.reject(g))},p=()=>new Promise(g=>{var y;o=b=>{(r||c())&&g(b)},(y=e.onPause)==null||y.call(e)}).then(()=>{var g;o=void 0,r||(g=e.onContinue)==null||g.call(e)}),m=()=>{if(r)return;let g;const y=n===0?e.initialPromise:void 0;try{g=y??e.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(d).catch(b=>{var T;if(r)return;const x=e.retry??(ah?0:3),S=e.retryDelay??ywe,P=typeof S=="function"?S(n,b):S,E=x===!0||typeof x=="number"&&nc()?void 0:p()).then(()=>{t?f(b):m()})})};return{promise:i,cancel:a,continue:()=>(o==null||o(),i),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?m():p().then(m),i)}}function vwe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},o=s=>setTimeout(s,0);const i=s=>{t?e.push(s):o(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&o(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{o=s}}}var Io=vwe(),zp,CK,YY=(CK=class{constructor(){jt(this,zp)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),DR(this.gcTime)&&bt(this,zp,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ah?1/0:5*60*1e3))}clearGcTimeout(){ve(this,zp)&&(clearTimeout(ve(this,zp)),bt(this,zp,void 0))}},zp=new WeakMap,CK),oy,iy,Os,fi,Hx,Vp,Ol,su,PK,bwe=(PK=class extends YY{constructor(t){super();jt(this,Ol);jt(this,oy);jt(this,iy);jt(this,Os);jt(this,fi);jt(this,Hx);jt(this,Vp);bt(this,Vp,!1),bt(this,Hx,t.defaultOptions),this.setOptions(t.options),this.observers=[],bt(this,Os,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,bt(this,oy,wwe(this.options)),this.state=t.state??ve(this,oy),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=ve(this,fi))==null?void 0:t.promise}setOptions(t){this.options={...ve(this,Hx),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ve(this,Os).remove(this)}setData(t,n){const r=LR(this.state.data,t,this.options);return hn(this,Ol,su).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){hn(this,Ol,su).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=ve(this,fi))==null?void 0:r.promise;return(o=ve(this,fi))==null||o.cancel(t),n?n.then(Is).catch(Is):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ve(this,oy))}isActive(){return this.observers.some(t=>$l(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===vN||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!HY(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=ve(this,fi))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=ve(this,fi))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ve(this,Os).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(ve(this,fi)&&(ve(this,Vp)?ve(this,fi).cancel({revert:!0}):ve(this,fi).cancelRetry()),this.scheduleGc()),ve(this,Os).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||hn(this,Ol,su).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(ve(this,fi))return ve(this,fi).continueRetry(),ve(this,fi).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,o=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(bt(this,Vp,!0),r.signal)})},i=()=>{const d=WY(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return o(f),bt(this,Vp,!1),this.options.persister?this.options.persister(d,f,this):d(f)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};o(a),(l=this.options.behavior)==null||l.onFetch(a,this),bt(this,iy,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&hn(this,Ol,su).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta});const s=d=>{var f,p,m,g;SA(d)&&d.silent||hn(this,Ol,su).call(this,{type:"error",error:d}),SA(d)||((p=(f=ve(this,Os).config).onError)==null||p.call(f,d,this),(g=(m=ve(this,Os).config).onSettled)==null||g.call(m,this.state.data,d,this)),this.scheduleGc()};return bt(this,fi,KY({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,p,m,g;if(d===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(y){s(y);return}(p=(f=ve(this,Os).config).onSuccess)==null||p.call(f,d,this),(g=(m=ve(this,Os).config).onSettled)==null||g.call(m,d,this.state.error,this),this.scheduleGc()},onError:s,onFail:(d,f)=>{hn(this,Ol,su).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{hn(this,Ol,su).call(this,{type:"pause"})},onContinue:()=>{hn(this,Ol,su).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),ve(this,fi).start()}},oy=new WeakMap,iy=new WeakMap,Os=new WeakMap,fi=new WeakMap,Hx=new WeakMap,Vp=new WeakMap,Ol=new WeakSet,su=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...XY(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return SA(o)&&o.revert&&ve(this,iy)?{...ve(this,iy),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Io.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),ve(this,Os).notify({query:this,type:"updated",action:t})})},PK);function XY(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:GY(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function wwe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var dc,EK,xwe=(EK=class extends yv{constructor(t={}){super();jt(this,dc);this.config=t,bt(this,dc,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??yN(o,n);let a=this.get(i);return a||(a=new bwe({cache:this,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){ve(this,dc).has(t.queryHash)||(ve(this,dc).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=ve(this,dc).get(t.queryHash);n&&(t.destroy(),n===t&&ve(this,dc).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Io.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ve(this,dc).get(t)}getAll(){return[...ve(this,dc).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>zH(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>zH(t,r)):n}notify(t){Io.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Io.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Io.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},dc=new WeakMap,EK),fc,Ai,Hp,pc,xd,TK,Swe=(TK=class extends YY{constructor(t){super();jt(this,pc);jt(this,fc);jt(this,Ai);jt(this,Hp);this.mutationId=t.mutationId,bt(this,Ai,t.mutationCache),bt(this,fc,[]),this.state=t.state||QY(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ve(this,fc).includes(t)||(ve(this,fc).push(t),this.clearGcTimeout(),ve(this,Ai).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){bt(this,fc,ve(this,fc).filter(n=>n!==t)),this.scheduleGc(),ve(this,Ai).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ve(this,fc).length||(this.state.status==="pending"?this.scheduleGc():ve(this,Ai).remove(this))}continue(){var t;return((t=ve(this,Hp))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,s,l,c,u,d,f,p,m,g,y,b,x,S,P,E,T,O;bt(this,Hp,KY({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,M)=>{hn(this,pc,xd).call(this,{type:"failed",failureCount:k,error:M})},onPause:()=>{hn(this,pc,xd).call(this,{type:"pause"})},onContinue:()=>{hn(this,pc,xd).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ve(this,Ai).canRun(this)}));const n=this.state.status==="pending",r=!ve(this,Hp).canStart();try{if(!n){hn(this,pc,xd).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=ve(this,Ai).config).onMutate)==null?void 0:i.call(o,t,this));const M=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,t));M!==this.state.context&&hn(this,pc,xd).call(this,{type:"pending",context:M,variables:t,isPaused:r})}const k=await ve(this,Hp).start();return await((c=(l=ve(this,Ai).config).onSuccess)==null?void 0:c.call(l,k,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,k,t,this.state.context)),await((p=(f=ve(this,Ai).config).onSettled)==null?void 0:p.call(f,k,null,this.state.variables,this.state.context,this)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,k,null,t,this.state.context)),hn(this,pc,xd).call(this,{type:"success",data:k}),k}catch(k){try{throw await((b=(y=ve(this,Ai).config).onError)==null?void 0:b.call(y,k,t,this.state.context,this)),await((S=(x=this.options).onError)==null?void 0:S.call(x,k,t,this.state.context)),await((E=(P=ve(this,Ai).config).onSettled)==null?void 0:E.call(P,void 0,k,this.state.variables,this.state.context,this)),await((O=(T=this.options).onSettled)==null?void 0:O.call(T,void 0,k,t,this.state.context)),k}finally{hn(this,pc,xd).call(this,{type:"error",error:k})}}finally{ve(this,Ai).runNext(this)}}},fc=new WeakMap,Ai=new WeakMap,Hp=new WeakMap,pc=new WeakSet,xd=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Io.batch(()=>{ve(this,fc).forEach(r=>{r.onMutationUpdate(t)}),ve(this,Ai).notify({mutation:this,type:"updated",action:t})})},TK);function QY(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ra,Ux,OK,Cwe=(OK=class extends yv{constructor(t={}){super();jt(this,Ra);jt(this,Ux);this.config=t,bt(this,Ra,new Map),bt(this,Ux,Date.now())}build(t,n,r){const o=new Swe({mutationCache:this,mutationId:++G1(this,Ux)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){const n=J1(t),r=ve(this,Ra).get(n)??[];r.push(t),ve(this,Ra).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=J1(t);if(ve(this,Ra).has(n)){const o=(r=ve(this,Ra).get(n))==null?void 0:r.filter(i=>i!==t);o&&(o.length===0?ve(this,Ra).delete(n):ve(this,Ra).set(n,o))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=ve(this,Ra).get(J1(t)))==null?void 0:r.find(o=>o.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=ve(this,Ra).get(J1(t)))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Io.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...ve(this,Ra).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>VH(n,r))}findAll(t={}){return this.getAll().filter(n=>VH(t,n))}notify(t){Io.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Io.batch(()=>Promise.all(t.map(n=>n.continue().catch(Is))))}},Ra=new WeakMap,Ux=new WeakMap,OK);function J1(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function WH(e){return{onFetch:(t,n)=>{var u,d,f,p,m;const r=t.options,o=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],a=((m=t.state.data)==null?void 0:m.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const y=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},b=WY(t.options,t.fetchOptions),x=async(S,P,E)=>{if(g)return Promise.reject();if(P==null&&S.pages.length)return Promise.resolve(S);const T={queryKey:t.queryKey,pageParam:P,direction:E?"backward":"forward",meta:t.options.meta};y(T);const O=await b(T),{maxPages:k}=t.options,M=E?hwe:pwe;return{pages:M(S.pages,O,k),pageParams:M(S.pageParams,P,k)}};if(o&&i.length){const S=o==="backward",P=S?Pwe:GH,E={pages:i,pageParams:a},T=P(r,E);s=await x(E,T,S)}else{const S=e??i.length;do{const P=l===0?a[0]??r.initialPageParam:GH(r,s);if(l>0&&P==null)break;s=await x(s,P),l++}while(l{var g,y;return(y=(g=t.options).persister)==null?void 0:y.call(g,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function GH(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Pwe(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Yr,jd,Bd,ay,sy,zd,ly,cy,IK,Ewe=(IK=class{constructor(e={}){jt(this,Yr);jt(this,jd);jt(this,Bd);jt(this,ay);jt(this,sy);jt(this,zd);jt(this,ly);jt(this,cy);bt(this,Yr,e.queryCache||new xwe),bt(this,jd,e.mutationCache||new Cwe),bt(this,Bd,e.defaultOptions||{}),bt(this,ay,new Map),bt(this,sy,new Map),bt(this,zd,0)}mount(){G1(this,zd)._++,ve(this,zd)===1&&(bt(this,ly,bN.subscribe(async e=>{e&&(await this.resumePausedMutations(),ve(this,Yr).onFocus())})),bt(this,cy,KP.subscribe(async e=>{e&&(await this.resumePausedMutations(),ve(this,Yr).onOnline())})))}unmount(){var e,t;G1(this,zd)._--,ve(this,zd)===0&&((e=ve(this,ly))==null||e.call(this),bt(this,ly,void 0),(t=ve(this,cy))==null||t.call(this),bt(this,cy,void 0))}isFetching(e){return ve(this,Yr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ve(this,jd).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ve(this,Yr).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=ve(this,Yr).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Dg(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return ve(this,Yr).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=ve(this,Yr).get(r.queryHash),i=o==null?void 0:o.state.data,a=dwe(t,i);if(a!==void 0)return ve(this,Yr).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Io.batch(()=>ve(this,Yr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ve(this,Yr).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=ve(this,Yr);Io.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=ve(this,Yr),r={type:"active",...e};return Io.batch(()=>(n.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Io.batch(()=>ve(this,Yr).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Is).catch(Is)}invalidateQueries(e={},t={}){return Io.batch(()=>{if(ve(this,Yr).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Io.batch(()=>ve(this,Yr).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(Is)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Is)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=ve(this,Yr).build(this,t);return n.isStaleByTime(Dg(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Is).catch(Is)}fetchInfiniteQuery(e){return e.behavior=WH(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Is).catch(Is)}ensureInfiniteQueryData(e){return e.behavior=WH(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return KP.isOnline()?ve(this,jd).resumePausedMutations():Promise.resolve()}getQueryCache(){return ve(this,Yr)}getMutationCache(){return ve(this,jd)}getDefaultOptions(){return ve(this,Bd)}setDefaultOptions(e){bt(this,Bd,e)}setQueryDefaults(e,t){ve(this,ay).set(sh(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ve(this,ay).values()];let n={};return t.forEach(r=>{Sw(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){ve(this,sy).set(sh(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ve(this,sy).values()];let n={};return t.forEach(r=>{Sw(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ve(this,Bd).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=yN(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===vN&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ve(this,Bd).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ve(this,Yr).clear(),ve(this,jd).clear()}},Yr=new WeakMap,jd=new WeakMap,Bd=new WeakMap,ay=new WeakMap,sy=new WeakMap,zd=new WeakMap,ly=new WeakMap,cy=new WeakMap,IK),ta,Dn,Wx,$i,Up,uy,Vd,hc,Gx,dy,fy,Wp,Gp,Hd,py,tr,w0,FR,jR,BR,zR,VR,HR,UR,JY,kK,Twe=(kK=class extends yv{constructor(t,n){super();jt(this,tr);jt(this,ta);jt(this,Dn);jt(this,Wx);jt(this,$i);jt(this,Up);jt(this,uy);jt(this,Vd);jt(this,hc);jt(this,Gx);jt(this,dy);jt(this,fy);jt(this,Wp);jt(this,Gp);jt(this,Hd);jt(this,py,new Set);this.options=n,bt(this,ta,t),bt(this,hc,null),bt(this,Vd,NR()),this.options.experimental_prefetchInRender||ve(this,Vd).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ve(this,Dn).addObserver(this),qH(ve(this,Dn),this.options)?hn(this,tr,w0).call(this):this.updateResult(),hn(this,tr,zR).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return WR(ve(this,Dn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return WR(ve(this,Dn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,hn(this,tr,VR).call(this),hn(this,tr,HR).call(this),ve(this,Dn).removeObserver(this)}setOptions(t,n){const r=this.options,o=ve(this,Dn);if(this.options=ve(this,ta).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof $l(this.options.enabled,ve(this,Dn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");hn(this,tr,UR).call(this),ve(this,Dn).setOptions(this.options),r._defaulted&&!qP(this.options,r)&&ve(this,ta).getQueryCache().notify({type:"observerOptionsUpdated",query:ve(this,Dn),observer:this});const i=this.hasListeners();i&&KH(ve(this,Dn),o,this.options,r)&&hn(this,tr,w0).call(this),this.updateResult(n),i&&(ve(this,Dn)!==o||$l(this.options.enabled,ve(this,Dn))!==$l(r.enabled,ve(this,Dn))||Dg(this.options.staleTime,ve(this,Dn))!==Dg(r.staleTime,ve(this,Dn)))&&hn(this,tr,FR).call(this);const a=hn(this,tr,jR).call(this);i&&(ve(this,Dn)!==o||$l(this.options.enabled,ve(this,Dn))!==$l(r.enabled,ve(this,Dn))||a!==ve(this,Hd))&&hn(this,tr,BR).call(this,a)}getOptimisticResult(t){const n=ve(this,ta).getQueryCache().build(ve(this,ta),t),r=this.createResult(n,t);return Iwe(this,r)&&(bt(this,$i,r),bt(this,uy,this.options),bt(this,Up,ve(this,Dn).state)),r}getCurrentResult(){return ve(this,$i)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){ve(this,py).add(t)}getCurrentQuery(){return ve(this,Dn)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=ve(this,ta).defaultQueryOptions(t),r=ve(this,ta).getQueryCache().build(ve(this,ta),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return hn(this,tr,w0).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ve(this,$i)))}createResult(t,n){var k;const r=ve(this,Dn),o=this.options,i=ve(this,$i),a=ve(this,Up),s=ve(this,uy),c=t!==r?t.state:ve(this,Wx),{state:u}=t;let d={...u},f=!1,p;if(n._optimisticResults){const M=this.hasListeners(),I=!M&&qH(t,n),R=M&&KH(t,r,n,o);(I||R)&&(d={...d,...XY(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:y}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(a==null?void 0:a.data)&&n.select===ve(this,Gx))p=ve(this,dy);else try{bt(this,Gx,n.select),p=n.select(d.data),p=LR(i==null?void 0:i.data,p,n),bt(this,dy,p),bt(this,hc,null)}catch(M){bt(this,hc,M)}else p=d.data;if(n.placeholderData!==void 0&&p===void 0&&y==="pending"){let M;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))M=i.data;else if(M=typeof n.placeholderData=="function"?n.placeholderData((k=ve(this,fy))==null?void 0:k.state.data,ve(this,fy)):n.placeholderData,n.select&&M!==void 0)try{M=n.select(M),bt(this,hc,null)}catch(I){bt(this,hc,I)}M!==void 0&&(y="success",p=LR(i==null?void 0:i.data,M,n),f=!0)}ve(this,hc)&&(m=ve(this,hc),p=ve(this,dy),g=Date.now(),y="error");const b=d.fetchStatus==="fetching",x=y==="pending",S=y==="error",P=x&&b,E=p!==void 0,O={status:y,fetchStatus:d.fetchStatus,isPending:x,isSuccess:y==="success",isError:S,isInitialLoading:P,isLoading:P,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:S&&!E,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&E,isStale:wN(t,n),refetch:this.refetch,promise:ve(this,Vd)};if(this.options.experimental_prefetchInRender){const M=_=>{O.status==="error"?_.reject(O.error):O.data!==void 0&&_.resolve(O.data)},I=()=>{const _=bt(this,Vd,O.promise=NR());M(_)},R=ve(this,Vd);switch(R.status){case"pending":t.queryHash===r.queryHash&&M(R);break;case"fulfilled":(O.status==="error"||O.data!==R.value)&&I();break;case"rejected":(O.status!=="error"||O.error!==R.reason)&&I();break}}return O}updateResult(t){const n=ve(this,$i),r=this.createResult(ve(this,Dn),this.options);if(bt(this,Up,ve(this,Dn).state),bt(this,uy,this.options),ve(this,Up).data!==void 0&&bt(this,fy,ve(this,Dn)),qP(r,n))return;bt(this,$i,r);const o={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!ve(this,py).size)return!0;const l=new Set(s??ve(this,py));return this.options.throwOnError&&l.add("error"),Object.keys(ve(this,$i)).some(c=>{const u=c;return ve(this,$i)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),hn(this,tr,JY).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&hn(this,tr,zR).call(this)}},ta=new WeakMap,Dn=new WeakMap,Wx=new WeakMap,$i=new WeakMap,Up=new WeakMap,uy=new WeakMap,Vd=new WeakMap,hc=new WeakMap,Gx=new WeakMap,dy=new WeakMap,fy=new WeakMap,Wp=new WeakMap,Gp=new WeakMap,Hd=new WeakMap,py=new WeakMap,tr=new WeakSet,w0=function(t){hn(this,tr,UR).call(this);let n=ve(this,Dn).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Is)),n},FR=function(){hn(this,tr,VR).call(this);const t=Dg(this.options.staleTime,ve(this,Dn));if(ah||ve(this,$i).isStale||!DR(t))return;const r=HY(ve(this,$i).dataUpdatedAt,t)+1;bt(this,Wp,setTimeout(()=>{ve(this,$i).isStale||this.updateResult()},r))},jR=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ve(this,Dn)):this.options.refetchInterval)??!1},BR=function(t){hn(this,tr,HR).call(this),bt(this,Hd,t),!(ah||$l(this.options.enabled,ve(this,Dn))===!1||!DR(ve(this,Hd))||ve(this,Hd)===0)&&bt(this,Gp,setInterval(()=>{(this.options.refetchIntervalInBackground||bN.isFocused())&&hn(this,tr,w0).call(this)},ve(this,Hd)))},zR=function(){hn(this,tr,FR).call(this),hn(this,tr,BR).call(this,hn(this,tr,jR).call(this))},VR=function(){ve(this,Wp)&&(clearTimeout(ve(this,Wp)),bt(this,Wp,void 0))},HR=function(){ve(this,Gp)&&(clearInterval(ve(this,Gp)),bt(this,Gp,void 0))},UR=function(){const t=ve(this,ta).getQueryCache().build(ve(this,ta),this.options);if(t===ve(this,Dn))return;const n=ve(this,Dn);bt(this,Dn,t),bt(this,Wx,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},JY=function(t){Io.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(ve(this,$i))}),ve(this,ta).getQueryCache().notify({query:ve(this,Dn),type:"observerResultsUpdated"})})},kK);function Owe(e,t){return $l(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function qH(e,t){return Owe(e,t)||e.state.data!==void 0&&WR(e,t,t.refetchOnMount)}function WR(e,t,n){if($l(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&wN(e,t)}return!1}function KH(e,t,n,r){return(e!==t||$l(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&wN(e,n)}function wN(e,t){return $l(t.enabled,e)!==!1&&e.isStaleByTime(Dg(t.staleTime,e))}function Iwe(e,t){return!qP(e.getCurrentResult(),t)}var Ud,Wd,na,mu,Au,dP,GR,MK,kwe=(MK=class extends yv{constructor(n,r){super();jt(this,Au);jt(this,Ud);jt(this,Wd);jt(this,na);jt(this,mu);bt(this,Ud,n),this.setOptions(r),this.bindMethods(),hn(this,Au,dP).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=ve(this,Ud).defaultMutationOptions(n),qP(this.options,r)||ve(this,Ud).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ve(this,na),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&sh(r.mutationKey)!==sh(this.options.mutationKey)?this.reset():((o=ve(this,na))==null?void 0:o.state.status)==="pending"&&ve(this,na).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=ve(this,na))==null||n.removeObserver(this)}onMutationUpdate(n){hn(this,Au,dP).call(this),hn(this,Au,GR).call(this,n)}getCurrentResult(){return ve(this,Wd)}reset(){var n;(n=ve(this,na))==null||n.removeObserver(this),bt(this,na,void 0),hn(this,Au,dP).call(this),hn(this,Au,GR).call(this)}mutate(n,r){var o;return bt(this,mu,r),(o=ve(this,na))==null||o.removeObserver(this),bt(this,na,ve(this,Ud).getMutationCache().build(ve(this,Ud),this.options)),ve(this,na).addObserver(this),ve(this,na).execute(n)}},Ud=new WeakMap,Wd=new WeakMap,na=new WeakMap,mu=new WeakMap,Au=new WeakSet,dP=function(){var r;const n=((r=ve(this,na))==null?void 0:r.state)??QY();bt(this,Wd,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},GR=function(n){Io.batch(()=>{var r,o,i,a,s,l,c,u;if(ve(this,mu)&&this.hasListeners()){const d=ve(this,Wd).variables,f=ve(this,Wd).context;(n==null?void 0:n.type)==="success"?((o=(r=ve(this,mu)).onSuccess)==null||o.call(r,n.data,d,f),(a=(i=ve(this,mu)).onSettled)==null||a.call(i,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(s=ve(this,mu)).onError)==null||l.call(s,n.error,d,f),(u=(c=ve(this,mu)).onSettled)==null||u.call(c,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(ve(this,Wd))})})},MK),ZY=v.createContext(void 0),gr=e=>{const t=v.useContext(ZY);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Mh=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),$.jsx(ZY.Provider,{value:e,children:t})),eX=v.createContext(!1),Mwe=()=>v.useContext(eX);eX.Provider;function Awe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $we=v.createContext(Awe()),Rwe=()=>v.useContext($we);function tX(e,t){return typeof e=="function"?e(...t):!!e}function nX(){}var Dwe=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},_we=e=>{v.useEffect(()=>{e.clearReset()},[e])},Lwe=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&tX(n,[e.error,r]),Nwe=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Fwe=(e,t)=>e.isLoading&&e.isFetching&&!t,jwe=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,YH=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Bwe(e,t,n){var u,d,f,p,m;const r=gr(),o=Mwe(),i=Rwe(),a=r.defaultQueryOptions(e);(d=(u=r.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||d.call(u,a),a._optimisticResults=o?"isRestoring":"optimistic",Nwe(a),Dwe(a,i),_we(i);const s=!r.getQueryCache().get(a.queryHash),[l]=v.useState(()=>new t(r,a)),c=l.getOptimisticResult(a);if(v.useSyncExternalStore(v.useCallback(g=>{const y=o?()=>{}:l.subscribe(Io.batchCalls(g));return l.updateResult(),y},[l,o]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(a,{listeners:!1})},[a,l]),jwe(a,c))throw YH(a,l,i);if(Lwe({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw c.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,a,c),a.experimental_prefetchInRender&&!ah&&Fwe(c,o)){const g=s?YH(a,l,i):(m=r.getQueryCache().get(a.queryHash))==null?void 0:m.promise;g==null||g.catch(nX).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?c:l.trackResult(c)}function oo(e,t){return Bwe(e,Twe)}function $r(e,t){const n=gr(),[r]=v.useState(()=>new kwe(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const o=v.useSyncExternalStore(v.useCallback(a=>r.subscribe(Io.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=v.useCallback((a,s)=>{r.mutate(a,s).catch(nX)},[r]);if(o.error&&tX(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}const zwe="modulepreload",Vwe=function(e){return"/"+e},XH={},Hwe=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=Promise.all(n.map(s=>{if(s=Vwe(s),s in XH)return;XH[s]=!0;const l=s.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${c}`))return;const u=document.createElement("link");if(u.rel=l?"stylesheet":zwe,l||(u.as="script",u.crossOrigin=""),u.href=s,a&&u.setAttribute("nonce",a),document.head.appendChild(u),l)return new Promise((d,f)=>{u.addEventListener("load",d),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})}))}return o.then(()=>t()).catch(i=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i})};var Uwe=function(){return null};function Wwe(e){return $.jsx(mbe,{...e,defaultTheme:FO,themeId:Hs})}function Gwe(e){return function(n){return $.jsx(Wwe,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function qwe(){return $O}const tt=qbe;function rt(e){return Gbe(e)}function Kwe(e){return _e("MuiSvgIcon",e)}Le("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Ywe=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Se(t)}`,`fontSize${Se(n)}`]};return Te(o,Kwe,r)},Xwe=ie("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Se(n.color)}`],t[`fontSize${Se(n.fontSize)}`]]}})(tt(({theme:e})=>{var t,n,r,o,i,a,s,l,c,u,d,f,p,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:g=>!g.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,g])=>g&&g.main).map(([g])=>{var y,b;return{props:{color:g},style:{color:(b=(y=(e.vars??e).palette)==null?void 0:y[g])==null?void 0:b.main}}}),{props:{color:"action"},style:{color:(f=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(m=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:m.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),YP=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=r,m=v.isValidElement(o)&&o.type==="svg",g={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:m},y={};u||(y.viewBox=f);const b=Ywe(g);return $.jsxs(Xwe,{as:s,className:pe(b.root,i),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...y,...p,...m&&o.props,ownerState:g,children:[m?o.props.children:o,d?$.jsx("title",{children:d}):null]})});YP.muiName="SvgIcon";function lt(e,t){function n(r,o){return $.jsx(YP,{"data-testid":`${t}Icon`,ref:o,...r,children:e})}return n.muiName=YP.muiName,v.memo(v.forwardRef(n))}function Ue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function qR(e,t){return qR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},qR(e,t)}function oS(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,qR(e,t)}function Qwe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Jwe(e,t){e.classList?e.classList.add(t):Qwe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function QH(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Zwe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=QH(e.className,t):e.setAttribute("class",QH(e.className&&e.className.baseVal||"",t))}var rX={exports:{}},ts={},oX={exports:{}},iX={};/** * @license React * scheduler.production.min.js * @@ -78,7 +70,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(B,V){var W=B.length;B.push(V);e:for(;0>>1,Q=B[G];if(0>>1;Go(ie,W))reo(pe,ie)?(B[G]=pe,B[re]=W,G=re):(B[G]=ie,B[ne]=W,G=ne);else if(reo(pe,W))B[G]=pe,B[re]=W,G=re;else break e}}return V}function o(B,V){var W=B.sortIndex-V.sortIndex;return W!==0?W:B.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,f=3,p=!1,m=!1,g=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(B){for(var V=n(c);V!==null;){if(V.callback===null)r(c);else if(V.startTime<=B)r(c),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(c)}}function P(B){if(g=!1,S(B),!m)if(n(l)!==null)m=!0,D(T);else{var V=n(c);V!==null&&H(P,V.startTime-B)}}function T(B,V){m=!1,g&&(g=!1,w(k),k=-1),p=!0;var W=f;try{for(S(V),d=n(l);d!==null&&(!(d.expirationTime>V)||B&&!R());){var G=d.callback;if(typeof G=="function"){d.callback=null,f=d.priorityLevel;var Q=G(d.expirationTime<=V);V=e.unstable_now(),typeof Q=="function"?d.callback=Q:d===n(l)&&r(l),S(V)}else r(l);d=n(l)}if(d!==null)var Y=!0;else{var ne=n(c);ne!==null&&H(P,ne.startTime-V),Y=!1}return Y}finally{d=null,f=W,p=!1}}var E=!1,O=null,k=-1,A=5,I=-1;function R(){return!(e.unstable_now()-IB||125G?(B.sortIndex=W,t(c,B),n(l)===null&&B===n(c)&&(g?(w(k),k=-1):g=!0,H(P,W-G))):(B.sortIndex=Q,t(l,B),m||p||(m=!0,D(T))),B},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(B){var V=f;return function(){var W=f;f=V;try{return B.apply(this,arguments)}finally{f=W}}}})(cX);lX.exports=cX;var oxe=lX.exports;/** + */(function(e){function t(V,z){var W=V.length;V.push(z);e:for(;0>>1,J=V[G];if(0>>1;Go(re,W))oeo(fe,re)?(V[G]=fe,V[oe]=W,G=oe):(V[G]=re,V[ne]=W,G=ne);else if(oeo(fe,W))V[G]=fe,V[oe]=W,G=oe;else break e}}return z}function o(V,z){var W=V.sortIndex-z.sortIndex;return W!==0?W:V.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,f=3,p=!1,m=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(V){for(var z=n(c);z!==null;){if(z.callback===null)r(c);else if(z.startTime<=V)r(c),z.sortIndex=z.expirationTime,t(l,z);else break;z=n(c)}}function P(V){if(g=!1,S(V),!m)if(n(l)!==null)m=!0,F(E);else{var z=n(c);z!==null&&U(P,z.startTime-V)}}function E(V,z){m=!1,g&&(g=!1,b(k),k=-1),p=!0;var W=f;try{for(S(z),d=n(l);d!==null&&(!(d.expirationTime>z)||V&&!R());){var G=d.callback;if(typeof G=="function"){d.callback=null,f=d.priorityLevel;var J=G(d.expirationTime<=z);z=e.unstable_now(),typeof J=="function"?d.callback=J:d===n(l)&&r(l),S(z)}else r(l);d=n(l)}if(d!==null)var K=!0;else{var ne=n(c);ne!==null&&U(P,ne.startTime-z),K=!1}return K}finally{d=null,f=W,p=!1}}var T=!1,O=null,k=-1,M=5,I=-1;function R(){return!(e.unstable_now()-IV||125G?(V.sortIndex=W,t(c,V),n(l)===null&&V===n(c)&&(g?(b(k),k=-1):g=!0,U(P,W-G))):(V.sortIndex=J,t(l,V),m||p||(m=!0,F(E))),V},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(V){var z=f;return function(){var W=f;f=z;try{return V.apply(this,arguments)}finally{f=W}}}})(iX);oX.exports=iX;var exe=oX.exports;/** * @license React * react-dom.production.min.js * @@ -86,14 +78,14 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ixe=y,Qa=oxe;function st(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),XR=Object.prototype.hasOwnProperty,axe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,QH={},JH={};function sxe(e){return XR.call(JH,e)?!0:XR.call(QH,e)?!1:axe.test(e)?JH[e]=!0:(QH[e]=!0,!1)}function lxe(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function cxe(e,t,n,r){if(t===null||typeof t>"u"||lxe(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ki(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var ni={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ni[e]=new Ki(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ni[t]=new Ki(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ni[e]=new Ki(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ni[e]=new Ki(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ni[e]=new Ki(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ni[e]=new Ki(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ni[e]=new Ki(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ni[e]=new Ki(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ni[e]=new Ki(e,5,!1,e.toLowerCase(),null,!1,!1)});var TL=/[\-:]([a-z])/g;function EL(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(TL,EL);ni[t]=new Ki(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(TL,EL);ni[t]=new Ki(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(TL,EL);ni[t]=new Ki(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ni[e]=new Ki(e,1,!1,e.toLowerCase(),null,!1,!1)});ni.xlinkHref=new Ki("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ni[e]=new Ki(e,1,!1,e.toLowerCase(),null,!0,!0)});function OL(e,t,n,r){var o=ni.hasOwnProperty(t)?ni[t]:null;(o!==null?o.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),KR=Object.prototype.hasOwnProperty,nxe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,JH={},ZH={};function rxe(e){return KR.call(ZH,e)?!0:KR.call(JH,e)?!1:nxe.test(e)?ZH[e]=!0:(JH[e]=!0,!1)}function oxe(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ixe(e,t,n,r){if(t===null||typeof t>"u"||oxe(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ki(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){oi[e]=new Ki(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];oi[t]=new Ki(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){oi[e]=new Ki(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){oi[e]=new Ki(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){oi[e]=new Ki(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){oi[e]=new Ki(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){oi[e]=new Ki(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){oi[e]=new Ki(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){oi[e]=new Ki(e,5,!1,e.toLowerCase(),null,!1,!1)});var xN=/[\-:]([a-z])/g;function SN(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(xN,SN);oi[t]=new Ki(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(xN,SN);oi[t]=new Ki(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(xN,SN);oi[t]=new Ki(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){oi[e]=new Ki(e,1,!1,e.toLowerCase(),null,!1,!1)});oi.xlinkHref=new Ki("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){oi[e]=new Ki(e,1,!1,e.toLowerCase(),null,!0,!0)});function CN(e,t,n,r){var o=oi.hasOwnProperty(t)?oi[t]:null;(o!==null?o.type!==0:r||!(2s||o[a]!==i[s]){var l=` -`+o[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{OA=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?x0(e):""}function uxe(e){switch(e.tag){case 5:return x0(e.type);case 16:return x0("Lazy");case 13:return x0("Suspense");case 19:return x0("SuspenseList");case 0:case 2:case 15:return e=IA(e.type,!1),e;case 11:return e=IA(e.type.render,!1),e;case 1:return e=IA(e.type,!0),e;default:return""}}function e2(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ig:return"Fragment";case og:return"Portal";case QR:return"Profiler";case IL:return"StrictMode";case JR:return"Suspense";case ZR:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fX:return(e.displayName||"Context")+".Consumer";case dX:return(e._context.displayName||"Context")+".Provider";case kL:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ML:return t=e.displayName||null,t!==null?t:e2(e.type)||"Memo";case Ed:t=e._payload,e=e._init;try{return e2(e(t))}catch{}}return null}function dxe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return e2(t);case 8:return t===IL?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function gf(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hX(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fxe(e){var t=hX(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tC(e){e._valueTracker||(e._valueTracker=fxe(e))}function mX(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=hX(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function QP(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function t2(e,t){var n=t.checked;return zr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function e4(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=gf(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function gX(e,t){t=t.checked,t!=null&&OL(e,"checked",t,!1)}function n2(e,t){gX(e,t);var n=gf(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?r2(e,t.type,n):t.hasOwnProperty("defaultValue")&&r2(e,t.type,gf(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function t4(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function r2(e,t,n){(t!=="number"||QP(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var S0=Array.isArray;function Dg(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=nC.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Tw(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var j0={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pxe=["Webkit","ms","Moz","O"];Object.keys(j0).forEach(function(e){pxe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),j0[t]=j0[e]})});function wX(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||j0.hasOwnProperty(e)&&j0[e]?(""+t).trim():t+"px"}function xX(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=wX(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var hxe=zr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function a2(e,t){if(t){if(hxe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(st(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(st(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(st(61))}if(t.style!=null&&typeof t.style!="object")throw Error(st(62))}}function s2(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var l2=null;function AL(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var c2=null,Ng=null,Lg=null;function o4(e){if(e=sS(e)){if(typeof c2!="function")throw Error(st(280));var t=e.stateNode;t&&(t=rI(t),c2(e.stateNode,e.type,t))}}function SX(e){Ng?Lg?Lg.push(e):Lg=[e]:Ng=e}function CX(){if(Ng){var e=Ng,t=Lg;if(Lg=Ng=null,o4(e),t)for(e=0;e>>=0,e===0?32:31-(Txe(e)/Exe|0)|0}var rC=64,oC=4194304;function C0(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function tT(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~o;s!==0?r=C0(s):(i&=a,i!==0&&(r=C0(i)))}else a=n&~o,a!==0?r=C0(a):i!==0&&(r=C0(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function iS(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-zl(t),e[t]=n}function Mxe(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=z0),p4=" ",h4=!1;function HX(e,t){switch(e){case"keyup":return oSe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function UX(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ag=!1;function aSe(e,t){switch(e){case"compositionend":return UX(t);case"keypress":return t.which!==32?null:(h4=!0,p4);case"textInput":return e=t.data,e===p4&&h4?null:e;default:return null}}function sSe(e,t){if(ag)return e==="compositionend"||!jL&&HX(e,t)?(e=zX(),mP=NL=Gd=null,ag=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=v4(n)}}function KX(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?KX(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function YX(){for(var e=window,t=QP();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=QP(e.document)}return t}function BL(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function gSe(e){var t=YX(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&KX(n.ownerDocument.documentElement,n)){if(r!==null&&BL(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=b4(n,i);var a=b4(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,sg=null,m2=null,H0=null,g2=!1;function w4(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;g2||sg==null||sg!==QP(r)||(r=sg,"selectionStart"in r&&BL(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),H0&&Aw(H0,r)||(H0=r,r=oT(m2,"onSelect"),0ug||(e.current=S2[ug],S2[ug]=null,ug--)}function vr(e,t){ug++,S2[ug]=e.current,e.current=t}var yf={},wi=kf(yf),fa=kf(!1),lh=yf;function yy(e,t){var n=e.type.contextTypes;if(!n)return yf;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function pa(e){return e=e.childContextTypes,e!=null}function aT(){Or(fa),Or(wi)}function O4(e,t,n){if(wi.current!==yf)throw Error(st(168));vr(wi,t),vr(fa,n)}function oQ(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(st(108,dxe(e)||"Unknown",o));return zr({},n,r)}function sT(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yf,lh=wi.current,vr(wi,e),vr(fa,fa.current),!0}function I4(e,t,n){var r=e.stateNode;if(!r)throw Error(st(169));n?(e=oQ(e,t,lh),r.__reactInternalMemoizedMergedChildContext=e,Or(fa),Or(wi),vr(wi,e)):Or(fa),vr(fa,n)}var pu=null,oI=!1,VA=!1;function iQ(e){pu===null?pu=[e]:pu.push(e)}function ISe(e){oI=!0,iQ(e)}function Mf(){if(!VA&&pu!==null){VA=!0;var e=0,t=nr;try{var n=pu;for(nr=1;e>=a,o-=a,yu=1<<32-zl(t)+o|n<k?(A=O,O=null):A=O.sibling;var I=f(w,O,S[k],P);if(I===null){O===null&&(O=A);break}e&&O&&I.alternate===null&&t(w,O),x=i(I,x,k),E===null?T=I:E.sibling=I,E=I,O=A}if(k===S.length)return n(w,O),$r&&yp(w,k),T;if(O===null){for(;kk?(A=O,O=null):A=O.sibling;var R=f(w,O,I.value,P);if(R===null){O===null&&(O=A);break}e&&O&&R.alternate===null&&t(w,O),x=i(R,x,k),E===null?T=R:E.sibling=R,E=R,O=A}if(I.done)return n(w,O),$r&&yp(w,k),T;if(O===null){for(;!I.done;k++,I=S.next())I=d(w,I.value,P),I!==null&&(x=i(I,x,k),E===null?T=I:E.sibling=I,E=I);return $r&&yp(w,k),T}for(O=r(w,O);!I.done;k++,I=S.next())I=p(O,w,k,I.value,P),I!==null&&(e&&I.alternate!==null&&O.delete(I.key===null?k:I.key),x=i(I,x,k),E===null?T=I:E.sibling=I,E=I);return e&&O.forEach(function(L){return t(w,L)}),$r&&yp(w,k),T}function v(w,x,S,P){if(typeof S=="object"&&S!==null&&S.type===ig&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case eC:e:{for(var T=S.key,E=x;E!==null;){if(E.key===T){if(T=S.type,T===ig){if(E.tag===7){n(w,E.sibling),x=o(E,S.props.children),x.return=w,w=x;break e}}else if(E.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ed&&A4(T)===E.type){n(w,E.sibling),x=o(E,S.props),x.ref=Fb(w,E,S),x.return=w,w=x;break e}n(w,E);break}else t(w,E);E=E.sibling}S.type===ig?(x=qp(S.props.children,w.mode,P,S.key),x.return=w,w=x):(P=CP(S.type,S.key,S.props,null,w.mode,P),P.ref=Fb(w,x,S),P.return=w,w=P)}return a(w);case og:e:{for(E=S.key;x!==null;){if(x.key===E)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){n(w,x.sibling),x=o(x,S.children||[]),x.return=w,w=x;break e}else{n(w,x);break}else t(w,x);x=x.sibling}x=XA(S,w.mode,P),x.return=w,w=x}return a(w);case Ed:return E=S._init,v(w,x,E(S._payload),P)}if(S0(S))return m(w,x,S,P);if(Rb(S))return g(w,x,S,P);dC(w,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(n(w,x.sibling),x=o(x,S),x.return=w,w=x):(n(w,x),x=YA(S,w.mode,P),x.return=w,w=x),a(w)):n(w,x)}return v}var by=cQ(!0),uQ=cQ(!1),uT=kf(null),dT=null,pg=null,UL=null;function WL(){UL=pg=dT=null}function GL(e){var t=uT.current;Or(uT),e._currentValue=t}function T2(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function jg(e,t){dT=e,UL=pg=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ua=!0),e.firstContext=null)}function Js(e){var t=e._currentValue;if(UL!==e)if(e={context:e,memoizedValue:t,next:null},pg===null){if(dT===null)throw Error(st(308));pg=e,dT.dependencies={lanes:0,firstContext:e}}else pg=pg.next=e;return t}var Ip=null;function qL(e){Ip===null?Ip=[e]:Ip.push(e)}function dQ(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,qL(t)):(n.next=o.next,o.next=n),t.interleaved=n,Fu(e,r)}function Fu(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Od=!1;function KL(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fQ(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Su(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function of(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Nn&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Fu(e,n)}return o=r.interleaved,o===null?(t.next=t,qL(r)):(t.next=o.next,o.next=t),r.interleaved=t,Fu(e,n)}function yP(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,RL(e,n)}}function $4(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function fT(e,t,n,r){var o=e.updateQueue;Od=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==a&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;a=0,u=c=l=null,s=i;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,g=s;switch(f=t,p=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=zr({},d,f);break e;case 2:Od=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,a|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);dh|=a,e.lanes=a,e.memoizedState=d}}function R4(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=UA.transition;UA.transition={};try{e(!1),t()}finally{nr=n,UA.transition=r}}function kQ(){return Zs().memoizedState}function $Se(e,t,n){var r=sf(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},MQ(e))AQ(t,n);else if(n=dQ(e,t,n,r),n!==null){var o=Bi();Vl(n,e,r,o),$Q(n,t,r)}}function RSe(e,t,n){var r=sf(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(MQ(e))AQ(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,Kl(s,a)){var l=t.interleaved;l===null?(o.next=o,qL(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=dQ(e,t,o,r),n!==null&&(o=Bi(),Vl(n,e,r,o),$Q(n,t,r))}}function MQ(e){var t=e.alternate;return e===Br||t!==null&&t===Br}function AQ(e,t){U0=hT=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $Q(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,RL(e,n)}}var mT={readContext:Js,useCallback:si,useContext:si,useEffect:si,useImperativeHandle:si,useInsertionEffect:si,useLayoutEffect:si,useMemo:si,useReducer:si,useRef:si,useState:si,useDebugValue:si,useDeferredValue:si,useTransition:si,useMutableSource:si,useSyncExternalStore:si,useId:si,unstable_isNewReconciler:!1},_Se={readContext:Js,useCallback:function(e,t){return uc().memoizedState=[e,t===void 0?null:t],e},useContext:Js,useEffect:D4,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,bP(4194308,4,PQ.bind(null,t,e),n)},useLayoutEffect:function(e,t){return bP(4194308,4,e,t)},useInsertionEffect:function(e,t){return bP(4,2,e,t)},useMemo:function(e,t){var n=uc();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=uc();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=$Se.bind(null,Br,e),[r.memoizedState,e]},useRef:function(e){var t=uc();return e={current:e},t.memoizedState=e},useState:_4,useDebugValue:nF,useDeferredValue:function(e){return uc().memoizedState=e},useTransition:function(){var e=_4(!1),t=e[0];return e=ASe.bind(null,e[1]),uc().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Br,o=uc();if($r){if(n===void 0)throw Error(st(407));n=n()}else{if(n=t(),Vo===null)throw Error(st(349));uh&30||gQ(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,D4(vQ.bind(null,r,i,e),[e]),r.flags|=2048,jw(9,yQ.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=uc(),t=Vo.identifierPrefix;if($r){var n=vu,r=yu;n=(r&~(1<<32-zl(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Lw++,0")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{PA=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?x0(e):""}function axe(e){switch(e.tag){case 5:return x0(e.type);case 16:return x0("Lazy");case 13:return x0("Suspense");case 19:return x0("SuspenseList");case 0:case 2:case 15:return e=EA(e.type,!1),e;case 11:return e=EA(e.type.render,!1),e;case 1:return e=EA(e.type,!0),e;default:return""}}function JR(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ig:return"Fragment";case og:return"Portal";case YR:return"Profiler";case PN:return"StrictMode";case XR:return"Suspense";case QR:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case lX:return(e.displayName||"Context")+".Consumer";case sX:return(e._context.displayName||"Context")+".Provider";case EN:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case TN:return t=e.displayName||null,t!==null?t:JR(e.type)||"Memo";case Td:t=e._payload,e=e._init;try{return JR(e(t))}catch{}}return null}function sxe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return JR(t);case 8:return t===PN?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function gf(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function uX(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lxe(e){var t=uX(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function eC(e){e._valueTracker||(e._valueTracker=lxe(e))}function dX(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=uX(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function XP(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ZR(e,t){var n=t.checked;return Ur({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function t4(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=gf(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function fX(e,t){t=t.checked,t!=null&&CN(e,"checked",t,!1)}function e2(e,t){fX(e,t);var n=gf(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?t2(e,t.type,n):t.hasOwnProperty("defaultValue")&&t2(e,t.type,gf(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function n4(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function t2(e,t,n){(t!=="number"||XP(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var S0=Array.isArray;function _g(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=tC.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Pw(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var j0={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},cxe=["Webkit","ms","Moz","O"];Object.keys(j0).forEach(function(e){cxe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),j0[t]=j0[e]})});function gX(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||j0.hasOwnProperty(e)&&j0[e]?(""+t).trim():t+"px"}function yX(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=gX(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var uxe=Ur({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function o2(e,t){if(t){if(uxe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(it(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(it(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(it(61))}if(t.style!=null&&typeof t.style!="object")throw Error(it(62))}}function i2(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var a2=null;function ON(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var s2=null,Lg=null,Ng=null;function i4(e){if(e=sS(e)){if(typeof s2!="function")throw Error(it(280));var t=e.stateNode;t&&(t=HO(t),s2(e.stateNode,e.type,t))}}function vX(e){Lg?Ng?Ng.push(e):Ng=[e]:Lg=e}function bX(){if(Lg){var e=Lg,t=Ng;if(Ng=Lg=null,i4(e),t)for(e=0;e>>=0,e===0?32:31-(xxe(e)/Sxe|0)|0}var nC=64,rC=4194304;function C0(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function eE(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~o;s!==0?r=C0(s):(i&=a,i!==0&&(r=C0(i)))}else a=n&~o,a!==0?r=C0(a):i!==0&&(r=C0(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function iS(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Bl(t),e[t]=n}function Txe(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=z0),h4=" ",m4=!1;function jX(e,t){switch(e){case"keyup":return eSe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function BX(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ag=!1;function nSe(e,t){switch(e){case"compositionend":return BX(t);case"keypress":return t.which!==32?null:(m4=!0,h4);case"textInput":return e=t.data,e===h4&&m4?null:e;default:return null}}function rSe(e,t){if(ag)return e==="compositionend"||!_N&&jX(e,t)?(e=NX(),pP=$N=Gd=null,ag=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=b4(n)}}function UX(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?UX(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function WX(){for(var e=window,t=XP();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=XP(e.document)}return t}function LN(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function fSe(e){var t=WX(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&UX(n.ownerDocument.documentElement,n)){if(r!==null&&LN(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=w4(n,i);var a=w4(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,sg=null,p2=null,H0=null,h2=!1;function x4(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;h2||sg==null||sg!==XP(r)||(r=sg,"selectionStart"in r&&LN(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),H0&&Mw(H0,r)||(H0=r,r=rE(p2,"onSelect"),0ug||(e.current=w2[ug],w2[ug]=null,ug--)}function xr(e,t){ug++,w2[ug]=e.current,e.current=t}var yf={},xi=kf(yf),da=kf(!1),lh=yf;function gy(e,t){var n=e.type.contextTypes;if(!n)return yf;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function fa(e){return e=e.childContextTypes,e!=null}function iE(){Mr(da),Mr(xi)}function I4(e,t,n){if(xi.current!==yf)throw Error(it(168));xr(xi,t),xr(da,n)}function eQ(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(it(108,sxe(e)||"Unknown",o));return Ur({},n,r)}function aE(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yf,lh=xi.current,xr(xi,e),xr(da,da.current),!0}function k4(e,t,n){var r=e.stateNode;if(!r)throw Error(it(169));n?(e=eQ(e,t,lh),r.__reactInternalMemoizedMergedChildContext=e,Mr(da),Mr(xi),xr(xi,e)):Mr(da),xr(da,n)}var fu=null,UO=!1,jA=!1;function tQ(e){fu===null?fu=[e]:fu.push(e)}function PSe(e){UO=!0,tQ(e)}function Mf(){if(!jA&&fu!==null){jA=!0;var e=0,t=ir;try{var n=fu;for(ir=1;e>=a,o-=a,yu=1<<32-Bl(t)+o|n<k?(M=O,O=null):M=O.sibling;var I=f(b,O,S[k],P);if(I===null){O===null&&(O=M);break}e&&O&&I.alternate===null&&t(b,O),x=i(I,x,k),T===null?E=I:T.sibling=I,T=I,O=M}if(k===S.length)return n(b,O),Lr&&yp(b,k),E;if(O===null){for(;kk?(M=O,O=null):M=O.sibling;var R=f(b,O,I.value,P);if(R===null){O===null&&(O=M);break}e&&O&&R.alternate===null&&t(b,O),x=i(R,x,k),T===null?E=R:T.sibling=R,T=R,O=M}if(I.done)return n(b,O),Lr&&yp(b,k),E;if(O===null){for(;!I.done;k++,I=S.next())I=d(b,I.value,P),I!==null&&(x=i(I,x,k),T===null?E=I:T.sibling=I,T=I);return Lr&&yp(b,k),E}for(O=r(b,O);!I.done;k++,I=S.next())I=p(O,b,k,I.value,P),I!==null&&(e&&I.alternate!==null&&O.delete(I.key===null?k:I.key),x=i(I,x,k),T===null?E=I:T.sibling=I,T=I);return e&&O.forEach(function(_){return t(b,_)}),Lr&&yp(b,k),E}function y(b,x,S,P){if(typeof S=="object"&&S!==null&&S.type===ig&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Z1:e:{for(var E=S.key,T=x;T!==null;){if(T.key===E){if(E=S.type,E===ig){if(T.tag===7){n(b,T.sibling),x=o(T,S.props.children),x.return=b,b=x;break e}}else if(T.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Td&&$4(E)===T.type){n(b,T.sibling),x=o(T,S.props),x.ref=Fb(b,T,S),x.return=b,b=x;break e}n(b,T);break}else t(b,T);T=T.sibling}S.type===ig?(x=Kp(S.props.children,b.mode,P,S.key),x.return=b,b=x):(P=xP(S.type,S.key,S.props,null,b.mode,P),P.ref=Fb(b,x,S),P.return=b,b=P)}return a(b);case og:e:{for(T=S.key;x!==null;){if(x.key===T)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){n(b,x.sibling),x=o(x,S.children||[]),x.return=b,b=x;break e}else{n(b,x);break}else t(b,x);x=x.sibling}x=qA(S,b.mode,P),x.return=b,b=x}return a(b);case Td:return T=S._init,y(b,x,T(S._payload),P)}if(S0(S))return m(b,x,S,P);if(Rb(S))return g(b,x,S,P);uC(b,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(n(b,x.sibling),x=o(x,S),x.return=b,b=x):(n(b,x),x=GA(S,b.mode,P),x.return=b,b=x),a(b)):n(b,x)}return y}var vy=iQ(!0),aQ=iQ(!1),cE=kf(null),uE=null,pg=null,BN=null;function zN(){BN=pg=uE=null}function VN(e){var t=cE.current;Mr(cE),e._currentValue=t}function C2(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function jg(e,t){uE=e,BN=pg=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ca=!0),e.firstContext=null)}function Qs(e){var t=e._currentValue;if(BN!==e)if(e={context:e,memoizedValue:t,next:null},pg===null){if(uE===null)throw Error(it(308));pg=e,uE.dependencies={lanes:0,firstContext:e}}else pg=pg.next=e;return t}var kp=null;function HN(e){kp===null?kp=[e]:kp.push(e)}function sQ(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,HN(t)):(n.next=o.next,o.next=n),t.interleaved=n,Fu(e,r)}function Fu(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Od=!1;function UN(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lQ(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Su(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function of(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,jn&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Fu(e,n)}return o=r.interleaved,o===null?(t.next=t,HN(r)):(t.next=o.next,o.next=t),r.interleaved=t,Fu(e,n)}function mP(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,kN(e,n)}}function R4(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function dE(e,t,n,r){var o=e.updateQueue;Od=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==a&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;a=0,u=c=l=null,s=i;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,g=s;switch(f=t,p=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=Ur({},d,f);break e;case 2:Od=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,a|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);dh|=a,e.lanes=a,e.memoizedState=d}}function D4(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=zA.transition;zA.transition={};try{e(!1),t()}finally{ir=n,zA.transition=r}}function EQ(){return Js().memoizedState}function ISe(e,t,n){var r=sf(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},TQ(e))OQ(t,n);else if(n=sQ(e,t,n,r),n!==null){var o=Bi();zl(n,e,r,o),IQ(n,t,r)}}function kSe(e,t,n){var r=sf(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(TQ(e))OQ(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,ql(s,a)){var l=t.interleaved;l===null?(o.next=o,HN(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=sQ(e,t,o,r),n!==null&&(o=Bi(),zl(n,e,r,o),IQ(n,t,r))}}function TQ(e){var t=e.alternate;return e===Hr||t!==null&&t===Hr}function OQ(e,t){U0=pE=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function IQ(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,kN(e,n)}}var hE={readContext:Qs,useCallback:ci,useContext:ci,useEffect:ci,useImperativeHandle:ci,useInsertionEffect:ci,useLayoutEffect:ci,useMemo:ci,useReducer:ci,useRef:ci,useState:ci,useDebugValue:ci,useDeferredValue:ci,useTransition:ci,useMutableSource:ci,useSyncExternalStore:ci,useId:ci,unstable_isNewReconciler:!1},MSe={readContext:Qs,useCallback:function(e,t){return cc().memoizedState=[e,t===void 0?null:t],e},useContext:Qs,useEffect:L4,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,yP(4194308,4,wQ.bind(null,t,e),n)},useLayoutEffect:function(e,t){return yP(4194308,4,e,t)},useInsertionEffect:function(e,t){return yP(4,2,e,t)},useMemo:function(e,t){var n=cc();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=cc();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ISe.bind(null,Hr,e),[r.memoizedState,e]},useRef:function(e){var t=cc();return e={current:e},t.memoizedState=e},useState:_4,useDebugValue:JN,useDeferredValue:function(e){return cc().memoizedState=e},useTransition:function(){var e=_4(!1),t=e[0];return e=OSe.bind(null,e[1]),cc().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Hr,o=cc();if(Lr){if(n===void 0)throw Error(it(407));n=n()}else{if(n=t(),Uo===null)throw Error(it(349));uh&30||fQ(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,L4(hQ.bind(null,r,i,e),[e]),r.flags|=2048,Fw(9,pQ.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=cc(),t=Uo.identifierPrefix;if(Lr){var n=vu,r=yu;n=(r&~(1<<32-Bl(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Lw++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[bc]=t,e[_w]=r,VQ(e,t,!1,!1),t.stateNode=e;e:{switch(a=s2(n,r),n){case"dialog":Sr("cancel",e),Sr("close",e),o=r;break;case"iframe":case"object":case"embed":Sr("load",e),o=r;break;case"video":case"audio":for(o=0;oSy&&(t.flags|=128,r=!0,jb(i,!1),t.lanes=4194304)}else{if(!r)if(e=pT(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),jb(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!$r)return li(t),null}else 2*to()-i.renderingStartTime>Sy&&n!==1073741824&&(t.flags|=128,r=!0,jb(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=to(),t.sibling=null,n=Fr.current,vr(Fr,r?n&1|2:n&1),t):(li(t),null);case 22:case 23:return lF(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_a&1073741824&&(li(t),t.subtreeFlags&6&&(t.flags|=8192)):li(t),null;case 24:return null;case 25:return null}throw Error(st(156,t.tag))}function VSe(e,t){switch(VL(t),t.tag){case 1:return pa(t.type)&&aT(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wy(),Or(fa),Or(wi),QL(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return XL(t),null;case 13:if(Or(Fr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(st(340));vy()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Or(Fr),null;case 4:return wy(),null;case 10:return GL(t.type._context),null;case 22:case 23:return lF(),null;case 24:return null;default:return null}}var pC=!1,pi=!1,HSe=typeof WeakSet=="function"?WeakSet:Set,Tt=null;function hg(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Yr(e,t,r)}else n.current=null}function _2(e,t,n){try{n()}catch(r){Yr(e,t,r)}}var G4=!1;function USe(e,t){if(y2=nT,e=YX(),BL(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(s=a+o),d!==i||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(s=a),f===i&&++u===r&&(l=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(v2={focusedElem:e,selectionRange:n},nT=!1,Tt=t;Tt!==null;)if(t=Tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Tt=e;else for(;Tt!==null;){t=Tt;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,v=m.memoizedState,w=t.stateNode,x=w.getSnapshotBeforeUpdate(t.elementType===t.type?g:El(t.type,g),v);w.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(st(163))}}catch(P){Yr(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,Tt=e;break}Tt=t.return}return m=G4,G4=!1,m}function W0(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&_2(t,n,i)}o=o.next}while(o!==r)}}function sI(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function D2(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function WQ(e){var t=e.alternate;t!==null&&(e.alternate=null,WQ(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[bc],delete t[_w],delete t[x2],delete t[ESe],delete t[OSe])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function GQ(e){return e.tag===5||e.tag===3||e.tag===4}function q4(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||GQ(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function N2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=iT));else if(r!==4&&(e=e.child,e!==null))for(N2(e,t,n),e=e.sibling;e!==null;)N2(e,t,n),e=e.sibling}function L2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(L2(e,t,n),e=e.sibling;e!==null;)L2(e,t,n),e=e.sibling}var Yo=null,kl=!1;function gd(e,t,n){for(n=n.child;n!==null;)qQ(e,t,n),n=n.sibling}function qQ(e,t,n){if(Tc&&typeof Tc.onCommitFiberUnmount=="function")try{Tc.onCommitFiberUnmount(ZO,n)}catch{}switch(n.tag){case 5:pi||hg(n,t);case 6:var r=Yo,o=kl;Yo=null,gd(e,t,n),Yo=r,kl=o,Yo!==null&&(kl?(e=Yo,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Yo.removeChild(n.stateNode));break;case 18:Yo!==null&&(kl?(e=Yo,n=n.stateNode,e.nodeType===8?zA(e.parentNode,n):e.nodeType===1&&zA(e,n),kw(e)):zA(Yo,n.stateNode));break;case 4:r=Yo,o=kl,Yo=n.stateNode.containerInfo,kl=!0,gd(e,t,n),Yo=r,kl=o;break;case 0:case 11:case 14:case 15:if(!pi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&_2(n,t,a),o=o.next}while(o!==r)}gd(e,t,n);break;case 1:if(!pi&&(hg(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Yr(n,t,s)}gd(e,t,n);break;case 21:gd(e,t,n);break;case 22:n.mode&1?(pi=(r=pi)||n.memoizedState!==null,gd(e,t,n),pi=r):gd(e,t,n);break;default:gd(e,t,n)}}function K4(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new HSe),t.forEach(function(r){var o=ZSe.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function wl(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=to()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*GSe(r/1960))-r,10e?16:e,qd===null)var r=!1;else{if(e=qd,qd=null,vT=0,Nn&6)throw Error(st(331));var o=Nn;for(Nn|=4,Tt=e.current;Tt!==null;){var i=Tt,a=i.child;if(Tt.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lto()-aF?Gp(e,0):iF|=n),ha(e,t)}function tJ(e,t){t===0&&(e.mode&1?(t=oC,oC<<=1,!(oC&130023424)&&(oC=4194304)):t=1);var n=Bi();e=Fu(e,t),e!==null&&(iS(e,t,n),ha(e,n))}function JSe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tJ(e,n)}function ZSe(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(st(314))}r!==null&&r.delete(t),tJ(e,n)}var nJ;nJ=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||fa.current)ua=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ua=!1,BSe(e,t,n);ua=!!(e.flags&131072)}else ua=!1,$r&&t.flags&1048576&&aQ(t,cT,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;wP(e,t),e=t.pendingProps;var o=yy(t,wi.current);jg(t,n),o=ZL(null,t,r,e,o,n);var i=eF();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pa(r)?(i=!0,sT(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,KL(t),o.updater=aI,t.stateNode=o,o._reactInternals=t,O2(t,r,e,n),t=M2(null,t,r,!0,i,n)):(t.tag=0,$r&&i&&zL(t),$i(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(wP(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=t1e(r),e=El(r,e),o){case 0:t=k2(null,t,r,e,n);break e;case 1:t=H4(null,t,r,e,n);break e;case 11:t=z4(null,t,r,e,n);break e;case 14:t=V4(null,t,r,El(r.type,e),n);break e}throw Error(st(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:El(r,o),k2(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:El(r,o),H4(e,t,r,o,n);case 3:e:{if(jQ(t),e===null)throw Error(st(387));r=t.pendingProps,i=t.memoizedState,o=i.element,fQ(e,t),fT(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=xy(Error(st(423)),t),t=U4(e,t,r,n,o);break e}else if(r!==o){o=xy(Error(st(424)),t),t=U4(e,t,r,n,o);break e}else for(Va=rf(t.stateNode.containerInfo.firstChild),Ga=t,$r=!0,_l=null,n=uQ(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vy(),r===o){t=ju(e,t,n);break e}$i(e,t,r,n)}t=t.child}return t;case 5:return pQ(t),e===null&&P2(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,b2(r,o)?a=null:i!==null&&b2(r,i)&&(t.flags|=32),FQ(e,t),$i(e,t,a,n),t.child;case 6:return e===null&&P2(t),null;case 13:return BQ(e,t,n);case 4:return YL(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=by(t,null,r,n):$i(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:El(r,o),z4(e,t,r,o,n);case 7:return $i(e,t,t.pendingProps,n),t.child;case 8:return $i(e,t,t.pendingProps.children,n),t.child;case 12:return $i(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,vr(uT,r._currentValue),r._currentValue=a,i!==null)if(Kl(i.value,a)){if(i.children===o.children&&!fa.current){t=ju(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Su(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),T2(i.return,n,t),s.lanes|=n;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(st(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),T2(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}$i(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,jg(t,n),o=Js(o),r=r(o),t.flags|=1,$i(e,t,r,n),t.child;case 14:return r=t.type,o=El(r,t.pendingProps),o=El(r.type,o),V4(e,t,r,o,n);case 15:return NQ(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:El(r,o),wP(e,t),t.tag=1,pa(r)?(e=!0,sT(t)):e=!1,jg(t,n),RQ(t,r,o),O2(t,r,o,n),M2(null,t,r,!0,e,n);case 19:return zQ(e,t,n);case 22:return LQ(e,t,n)}throw Error(st(156,t.tag))};function rJ(e,t){return MX(e,t)}function e1e(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fs(e,t,n,r){return new e1e(e,t,n,r)}function uF(e){return e=e.prototype,!(!e||!e.isReactComponent)}function t1e(e){if(typeof e=="function")return uF(e)?1:0;if(e!=null){if(e=e.$$typeof,e===kL)return 11;if(e===ML)return 14}return 2}function lf(e,t){var n=e.alternate;return n===null?(n=Fs(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function CP(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")uF(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ig:return qp(n.children,o,i,t);case IL:a=8,o|=8;break;case QR:return e=Fs(12,n,t,o|2),e.elementType=QR,e.lanes=i,e;case JR:return e=Fs(13,n,t,o),e.elementType=JR,e.lanes=i,e;case ZR:return e=Fs(19,n,t,o),e.elementType=ZR,e.lanes=i,e;case pX:return cI(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case dX:a=10;break e;case fX:a=9;break e;case kL:a=11;break e;case ML:a=14;break e;case Ed:a=16,r=null;break e}throw Error(st(130,e==null?e:typeof e,""))}return t=Fs(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function qp(e,t,n,r){return e=Fs(7,e,r,t),e.lanes=n,e}function cI(e,t,n,r){return e=Fs(22,e,r,t),e.elementType=pX,e.lanes=n,e.stateNode={isHidden:!1},e}function YA(e,t,n){return e=Fs(6,e,null,t),e.lanes=n,e}function XA(e,t,n){return t=Fs(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function n1e(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=MA(0),this.expirationTimes=MA(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=MA(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function dF(e,t,n,r,o,i,a,s,l){return e=new n1e(e,t,n,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Fs(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},KL(i),e}function r1e(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sJ)}catch(e){console.error(e)}}sJ(),sX.exports=rs;var hI=sX.exports;const gC=_n(hI),n3={disabled:!1},xT=K.createContext(null);var lJ=function(t){return t.scrollTop},T0="unmounted",bp="exited",wp="entering",Xm="entered",V2="exiting",is=function(e){oS(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=bp,i.appearStatus=wp):l=Xm:r.unmountOnExit||r.mountOnEnter?l=T0:l=bp,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===T0?{status:bp}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==wp&&a!==Xm&&(i=wp):(a===wp||a===Xm)&&(i=V2)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===wp){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:gC.findDOMNode(this);a&&lJ(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===bp&&this.setState({status:T0})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[gC.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!o&&!a||n3.disabled){this.safeSetState({status:Xm},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:wp},function(){i.props.onEntering(c,u),i.onTransitionEnd(f,function(){i.safeSetState({status:Xm},function(){i.props.onEntered(c,u)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:gC.findDOMNode(this);if(!i||n3.disabled){this.safeSetState({status:bp},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:V2},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:bp},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:gC.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===T0)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=Ue(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return K.createElement(xT.Provider,{value:null},typeof a=="function"?a(o,s):K.cloneElement(K.Children.only(a),s))},t}(K.Component);is.contextType=xT;is.propTypes={};function Im(){}is.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Im,onEntering:Im,onEntered:Im,onExit:Im,onExiting:Im,onExited:Im};is.UNMOUNTED=T0;is.EXITED=bp;is.ENTERING=wp;is.ENTERED=Xm;is.EXITING=V2;var l1e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return nxe(t,r)})},QA=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return rxe(t,r)})},mF=function(e){oS(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;ae.scrollTop;function vf(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function h1e(e){return Ne("MuiCollapse",e)}Le("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const m1e=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Te(r,h1e,n)},g1e=oe("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(rt(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),y1e=oe("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),v1e=oe("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Gs=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:p,onExit:m,onExited:g,onExiting:v,orientation:w="vertical",style:x,timeout:S=VY.standard,TransitionComponent:P=is,...T}=r,E={...r,orientation:w,collapsedSize:s},O=m1e(E),k=ko(),A=ca(),I=y.useRef(null),R=y.useRef(),L=typeof s=="number"?`${s}px`:s,F=w==="horizontal",z=F?"width":"height",_=y.useRef(null),D=Wt(n,_),H=re=>pe=>{if(re){const le=_.current;pe===void 0?re(le):re(le,pe)}},B=()=>I.current?I.current[F?"clientWidth":"clientHeight"]:0,V=H((re,pe)=>{I.current&&F&&(I.current.style.position="absolute"),re.style[z]=L,d&&d(re,pe)}),W=H((re,pe)=>{const le=B();I.current&&F&&(I.current.style.position="");const{duration:ee,easing:ce}=vf({style:x,timeout:S,easing:c},{mode:"enter"});if(S==="auto"){const se=k.transitions.getAutoHeightDuration(le);re.style.transitionDuration=`${se}ms`,R.current=se}else re.style.transitionDuration=typeof ee=="string"?ee:`${ee}ms`;re.style[z]=`${le}px`,re.style.transitionTimingFunction=ce,p&&p(re,pe)}),G=H((re,pe)=>{re.style[z]="auto",f&&f(re,pe)}),Q=H(re=>{re.style[z]=`${B()}px`,m&&m(re)}),Y=H(g),ne=H(re=>{const pe=B(),{duration:le,easing:ee}=vf({style:x,timeout:S,easing:c},{mode:"exit"});if(S==="auto"){const ce=k.transitions.getAutoHeightDuration(pe);re.style.transitionDuration=`${ce}ms`,R.current=ce}else re.style.transitionDuration=typeof le=="string"?le:`${le}ms`;re.style[z]=L,re.style.transitionTimingFunction=ee,v&&v(re)}),ie=re=>{S==="auto"&&A.start(R.current||0,re),o&&o(_.current,re)};return $.jsx(P,{in:u,onEnter:V,onEntered:G,onEntering:W,onExit:Q,onExited:Y,onExiting:ne,addEndListener:ie,nodeRef:_,timeout:S==="auto"?null:S,...T,children:(re,pe)=>$.jsx(g1e,{as:l,className:fe(O.root,a,{entered:O.entered,exited:!u&&L==="0px"&&O.hidden}[re]),style:{[F?"minWidth":"minHeight"]:L,...x},ref:D,...pe,ownerState:{...E,state:re},children:$.jsx(y1e,{ownerState:{...E,state:re},className:O.wrapper,ref:I,children:$.jsx(v1e,{ownerState:{...E,state:re},className:O.wrapperInner,children:i})})})})});Gs&&(Gs.muiSupportAuto=!0);function b1e(e){return Ne("MuiPaper",e)}Le("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const w1e=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Te(i,b1e,o)},x1e=oe("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(rt(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),io=y.forwardRef(function(t,n){var p;const r=at({props:t,name:"MuiPaper"}),o=ko(),{className:i,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=r,d={...r,component:a,elevation:s,square:l,variant:c},f=w1e(d);return $.jsx(x1e,{as:a,ownerState:d,className:fe(f.root,i),ref:n,...u,style:{...c==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[s],...o.vars&&{"--Paper-overlay":(p=o.vars.overlays)==null?void 0:p[s]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${vt("#fff",DR(s))}, ${vt("#fff",DR(s))})`}},...u.style}})}),cJ=y.createContext({});function Kn(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,...s}=t,{component:l,slots:c={[e]:void 0},slotProps:u={[e]:void 0},...d}=i,f=c[e]||r,p=Du(u[e],o),{props:{component:m,...g},internalRef:v}=$Y({className:n,...s,externalForwardedProps:e==="root"?d:void 0,externalSlotProps:p}),w=Wt(v,p==null?void 0:p.ref,t.ref),x=e==="root"?m||l:m,S=AY(f,{...e==="root"&&!l&&!c[e]&&a,...e!=="root"&&!c[e]&&a,...g,...x&&{as:x},ref:w},o);return[f,S]}function S1e(e){return Ne("MuiAccordion",e)}const yC=Le("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),C1e=e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:i}=e;return Te({root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!i&&"gutters"],heading:["heading"],region:["region"]},S1e,t)},P1e=oe(io,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${yC.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(rt(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${yC.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${yC.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),rt(({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${yC.expanded}`]:{margin:"16px 0"}}}]}))),T1e=oe("h3",{name:"MuiAccordion",slot:"Heading",overridesResolver:(e,t)=>t.heading})({all:"unset"}),vF=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiAccordion"}),{children:o,className:i,defaultExpanded:a=!1,disabled:s=!1,disableGutters:l=!1,expanded:c,onChange:u,square:d=!1,slots:f={},slotProps:p={},TransitionComponent:m,TransitionProps:g,...v}=r,[w,x]=vi({controlled:c,default:a,name:"Accordion",state:"expanded"}),S=y.useCallback(D=>{x(!w),u&&u(D,!w)},[w,u,x]),[P,...T]=y.Children.toArray(o),E=y.useMemo(()=>({expanded:w,disabled:s,disableGutters:l,toggle:S}),[w,s,l,S]),O={...r,square:d,disabled:s,disableGutters:l,expanded:w},k=C1e(O),A={transition:m,...f},I={transition:g,...p},R={slots:A,slotProps:I},[L,F]=Kn("heading",{elementType:T1e,externalForwardedProps:R,className:k.heading,ownerState:O}),[z,_]=Kn("transition",{elementType:Gs,externalForwardedProps:R,ownerState:O});return $.jsxs(P1e,{className:fe(k.root,i),ref:n,ownerState:O,square:d,...v,children:[$.jsx(L,{...F,children:$.jsx(cJ.Provider,{value:E,children:P})}),$.jsx(z,{in:w,timeout:"auto",..._,children:$.jsx("div",{"aria-labelledby":P.props.id,id:P.props["aria-controls"],role:"region",className:k.region,children:T})})]})});function E1e(e){return Ne("MuiAccordionDetails",e)}Le("MuiAccordionDetails",["root"]);const O1e=e=>{const{classes:t}=e;return Te({root:["root"]},E1e,t)},I1e=oe("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(rt(({theme:e})=>({padding:e.spacing(1,2,2)}))),bF=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiAccordionDetails"}),{className:o,...i}=r,a=r,s=O1e(a);return $.jsx(I1e,{className:fe(s.root,o),ref:n,ownerState:a,...i})});class ST{constructor(){dn(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new ST}static use(){const t=Zl(ST.create).current,[n,r]=y.useState(!1);return t.shouldMount=n,t.setShouldMount=r,y.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=M1e(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function k1e(){return ST.use()}function M1e(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function A1e(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,d]=y.useState(!1),f=fe(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},m=fe(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),y.useEffect(()=>{if(!s&&l!=null){const g=setTimeout(l,c);return()=>{clearTimeout(g)}}},[l,s,c]),$.jsx("span",{className:f,style:p,children:$.jsx("span",{className:m})})}const $s=Le("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),U2=550,$1e=80,R1e=jc` +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function UA(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function T2(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var RSe=typeof WeakMap=="function"?WeakMap:Map;function MQ(e,t,n){n=Su(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){gE||(gE=!0,L2=r),T2(e,t)},n}function AQ(e,t,n){n=Su(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){T2(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){T2(e,t),typeof r!="function"&&(af===null?af=new Set([this]):af.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function j4(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new RSe;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=qSe.bind(null,e,t,n),t.then(e,e))}function B4(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function z4(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Su(-1,1),t.tag=2,of(n,t,1))),n.lanes|=1),e)}var DSe=Qu.ReactCurrentOwner,ca=!1;function Ri(e,t,n,r){t.child=e===null?aQ(t,null,n,r):vy(t,e.child,n,r)}function V4(e,t,n,r,o){n=n.render;var i=t.ref;return jg(t,o),r=YN(e,t,n,r,i,o),n=XN(),e!==null&&!ca?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ju(e,t,o)):(Lr&&n&&NN(t),t.flags|=1,Ri(e,t,r,o),t.child)}function H4(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!aF(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,$Q(e,t,i,r,o)):(e=xP(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Mw,n(a,r)&&e.ref===t.ref)return ju(e,t,o)}return t.flags|=1,e=lf(i,r),e.ref=t.ref,e.return=t,t.child=e}function $Q(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Mw(i,r)&&e.ref===t.ref)if(ca=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(ca=!0);else return t.lanes=e.lanes,ju(e,t,o)}return O2(e,t,n,r,o)}function RQ(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xr(mg,_a),_a|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xr(mg,_a),_a|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,xr(mg,_a),_a|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,xr(mg,_a),_a|=r;return Ri(e,t,o,n),t.child}function DQ(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function O2(e,t,n,r,o){var i=fa(n)?lh:xi.current;return i=gy(t,i),jg(t,o),n=YN(e,t,n,r,i,o),r=XN(),e!==null&&!ca?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ju(e,t,o)):(Lr&&r&&NN(t),t.flags|=1,Ri(e,t,n,o),t.child)}function U4(e,t,n,r,o){if(fa(n)){var i=!0;aE(t)}else i=!1;if(jg(t,o),t.stateNode===null)vP(e,t),kQ(t,n,r),E2(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=Qs(c):(c=fa(n)?lh:xi.current,c=gy(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==c)&&F4(t,a,r,c),Od=!1;var f=t.memoizedState;a.state=f,dE(t,r,a,o),l=t.memoizedState,s!==r||f!==l||da.current||Od?(typeof u=="function"&&(P2(t,n,u,r),l=t.memoizedState),(s=Od||N4(t,n,s,r,f,l,c))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,lQ(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:El(t.type,s),a.props=c,d=t.pendingProps,f=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=Qs(l):(l=fa(n)?lh:xi.current,l=gy(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||f!==l)&&F4(t,a,r,l),Od=!1,f=t.memoizedState,a.state=f,dE(t,r,a,o);var m=t.memoizedState;s!==d||f!==m||da.current||Od?(typeof p=="function"&&(P2(t,n,p,r),m=t.memoizedState),(c=Od||N4(t,n,c,r,f,m,l)||!1)?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,m,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,m,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=l,r=c):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return I2(e,t,n,r,i,o)}function I2(e,t,n,r,o,i){DQ(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&k4(t,n,!1),ju(e,t,i);r=t.stateNode,DSe.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=vy(t,e.child,null,i),t.child=vy(t,null,s,i)):Ri(e,t,s,i),t.memoizedState=r.state,o&&k4(t,n,!0),t.child}function _Q(e){var t=e.stateNode;t.pendingContext?I4(e,t.pendingContext,t.pendingContext!==t.context):t.context&&I4(e,t.context,!1),WN(e,t.containerInfo)}function W4(e,t,n,r,o){return yy(),jN(o),t.flags|=256,Ri(e,t,n,r),t.child}var k2={dehydrated:null,treeContext:null,retryLane:0};function M2(e){return{baseLanes:e,cachePool:null,transitions:null}}function LQ(e,t,n){var r=t.pendingProps,o=zr.current,i=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),xr(zr,o&1),e===null)return S2(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=YO(a,r,0,null),e=Kp(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=M2(n),t.memoizedState=k2,e):ZN(t,a));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return _Se(e,t,a,r,s,o,n);if(i){i=r.fallback,a=t.mode,o=e.child,s=o.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=lf(o,l),r.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=lf(s,i):(i=Kp(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?M2(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=k2,r}return i=e.child,e=i.sibling,r=lf(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ZN(e,t){return t=YO({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function dC(e,t,n,r){return r!==null&&jN(r),vy(t,e.child,null,n),e=ZN(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _Se(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=UA(Error(it(422))),dC(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=YO({mode:"visible",children:r.children},o,0,null),i=Kp(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&vy(t,e.child,null,a),t.child.memoizedState=M2(a),t.memoizedState=k2,i);if(!(t.mode&1))return dC(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var s=r.dgst;return r=s,i=Error(it(419)),r=UA(i,r,void 0),dC(e,t,a,r)}if(s=(a&e.childLanes)!==0,ca||s){if(r=Uo,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|a)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Fu(e,o),zl(r,e,o,-1))}return iF(),r=UA(Error(it(421))),dC(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=KSe.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Ha=rf(o.nextSibling),Wa=t,Lr=!0,Rl=null,e!==null&&(Rs[Ds++]=yu,Rs[Ds++]=vu,Rs[Ds++]=ch,yu=e.id,vu=e.overflow,ch=t),t=ZN(t,r.children),t.flags|=4096,t)}function G4(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),C2(e.return,t,n)}function WA(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function NQ(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ri(e,t,r.children,n),r=zr.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&G4(e,n,t);else if(e.tag===19)G4(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(xr(zr,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&fE(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),WA(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&fE(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}WA(t,!0,n,null,i);break;case"together":WA(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function vP(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ju(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),dh|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(it(153));if(t.child!==null){for(e=t.child,n=lf(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=lf(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function LSe(e,t,n){switch(t.tag){case 3:_Q(t),yy();break;case 5:cQ(t);break;case 1:fa(t.type)&&aE(t);break;case 4:WN(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;xr(cE,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xr(zr,zr.current&1),t.flags|=128,null):n&t.child.childLanes?LQ(e,t,n):(xr(zr,zr.current&1),e=ju(e,t,n),e!==null?e.sibling:null);xr(zr,zr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return NQ(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),xr(zr,zr.current),r)break;return null;case 22:case 23:return t.lanes=0,RQ(e,t,n)}return ju(e,t,n)}var FQ,A2,jQ,BQ;FQ=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};A2=function(){};jQ=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Mp(Tc.current);var i=null;switch(n){case"input":o=ZR(e,o),r=ZR(e,r),i=[];break;case"select":o=Ur({},o,{value:void 0}),r=Ur({},r,{value:void 0}),i=[];break;case"textarea":o=n2(e,o),r=n2(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=oE)}o2(n,r);var a;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var s=o[c];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Cw.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(s=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Cw.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Er("scroll",e),i||s===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};BQ=function(e,t,n,r){n!==r&&(t.flags|=4)};function jb(e,t){if(!Lr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ui(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function NSe(e,t,n){var r=t.pendingProps;switch(FN(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ui(t),null;case 1:return fa(t.type)&&iE(),ui(t),null;case 3:return r=t.stateNode,by(),Mr(da),Mr(xi),qN(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(cC(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Rl!==null&&(j2(Rl),Rl=null))),A2(e,t),ui(t),null;case 5:GN(t);var o=Mp(_w.current);if(n=t.type,e!==null&&t.stateNode!=null)jQ(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(it(166));return ui(t),null}if(e=Mp(Tc.current),cC(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[bc]=t,r[Rw]=i,e=(t.mode&1)!==0,n){case"dialog":Er("cancel",r),Er("close",r);break;case"iframe":case"object":case"embed":Er("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[bc]=t,e[Rw]=r,FQ(e,t,!1,!1),t.stateNode=e;e:{switch(a=i2(n,r),n){case"dialog":Er("cancel",e),Er("close",e),o=r;break;case"iframe":case"object":case"embed":Er("load",e),o=r;break;case"video":case"audio":for(o=0;oxy&&(t.flags|=128,r=!0,jb(i,!1),t.lanes=4194304)}else{if(!r)if(e=fE(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),jb(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Lr)return ui(t),null}else 2*ro()-i.renderingStartTime>xy&&n!==1073741824&&(t.flags|=128,r=!0,jb(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ro(),t.sibling=null,n=zr.current,xr(zr,r?n&1|2:n&1),t):(ui(t),null);case 22:case 23:return oF(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_a&1073741824&&(ui(t),t.subtreeFlags&6&&(t.flags|=8192)):ui(t),null;case 24:return null;case 25:return null}throw Error(it(156,t.tag))}function FSe(e,t){switch(FN(t),t.tag){case 1:return fa(t.type)&&iE(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return by(),Mr(da),Mr(xi),qN(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return GN(t),null;case 13:if(Mr(zr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(it(340));yy()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Mr(zr),null;case 4:return by(),null;case 10:return VN(t.type._context),null;case 22:case 23:return oF(),null;case 24:return null;default:return null}}var fC=!1,mi=!1,jSe=typeof WeakSet=="function"?WeakSet:Set,Et=null;function hg(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Qr(e,t,r)}else n.current=null}function $2(e,t,n){try{n()}catch(r){Qr(e,t,r)}}var q4=!1;function BSe(e,t){if(m2=tE,e=WX(),LN(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(s=a+o),d!==i||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(s=a),f===i&&++u===r&&(l=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(g2={focusedElem:e,selectionRange:n},tE=!1,Et=t;Et!==null;)if(t=Et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Et=e;else for(;Et!==null;){t=Et;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,y=m.memoizedState,b=t.stateNode,x=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:El(t.type,g),y);b.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(it(163))}}catch(P){Qr(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,Et=e;break}Et=t.return}return m=q4,q4=!1,m}function W0(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&$2(t,n,i)}o=o.next}while(o!==r)}}function qO(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function R2(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function zQ(e){var t=e.alternate;t!==null&&(e.alternate=null,zQ(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[bc],delete t[Rw],delete t[b2],delete t[SSe],delete t[CSe])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function VQ(e){return e.tag===5||e.tag===3||e.tag===4}function K4(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||VQ(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function D2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=oE));else if(r!==4&&(e=e.child,e!==null))for(D2(e,t,n),e=e.sibling;e!==null;)D2(e,t,n),e=e.sibling}function _2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(_2(e,t,n),e=e.sibling;e!==null;)_2(e,t,n),e=e.sibling}var Xo=null,Il=!1;function gd(e,t,n){for(n=n.child;n!==null;)HQ(e,t,n),n=n.sibling}function HQ(e,t,n){if(Ec&&typeof Ec.onCommitFiberUnmount=="function")try{Ec.onCommitFiberUnmount(jO,n)}catch{}switch(n.tag){case 5:mi||hg(n,t);case 6:var r=Xo,o=Il;Xo=null,gd(e,t,n),Xo=r,Il=o,Xo!==null&&(Il?(e=Xo,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Xo.removeChild(n.stateNode));break;case 18:Xo!==null&&(Il?(e=Xo,n=n.stateNode,e.nodeType===8?FA(e.parentNode,n):e.nodeType===1&&FA(e,n),Iw(e)):FA(Xo,n.stateNode));break;case 4:r=Xo,o=Il,Xo=n.stateNode.containerInfo,Il=!0,gd(e,t,n),Xo=r,Il=o;break;case 0:case 11:case 14:case 15:if(!mi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&$2(n,t,a),o=o.next}while(o!==r)}gd(e,t,n);break;case 1:if(!mi&&(hg(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Qr(n,t,s)}gd(e,t,n);break;case 21:gd(e,t,n);break;case 22:n.mode&1?(mi=(r=mi)||n.memoizedState!==null,gd(e,t,n),mi=r):gd(e,t,n);break;default:gd(e,t,n)}}function Y4(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jSe),t.forEach(function(r){var o=YSe.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function bl(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=ro()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*VSe(r/1960))-r,10e?16:e,qd===null)var r=!1;else{if(e=qd,qd=null,yE=0,jn&6)throw Error(it(331));var o=jn;for(jn|=4,Et=e.current;Et!==null;){var i=Et,a=i.child;if(Et.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lro()-nF?qp(e,0):tF|=n),pa(e,t)}function QQ(e,t){t===0&&(e.mode&1?(t=rC,rC<<=1,!(rC&130023424)&&(rC=4194304)):t=1);var n=Bi();e=Fu(e,t),e!==null&&(iS(e,t,n),pa(e,n))}function KSe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),QQ(e,n)}function YSe(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(it(314))}r!==null&&r.delete(t),QQ(e,n)}var JQ;JQ=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||da.current)ca=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ca=!1,LSe(e,t,n);ca=!!(e.flags&131072)}else ca=!1,Lr&&t.flags&1048576&&nQ(t,lE,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;vP(e,t),e=t.pendingProps;var o=gy(t,xi.current);jg(t,n),o=YN(null,t,r,e,o,n);var i=XN();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,fa(r)?(i=!0,aE(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,UN(t),o.updater=GO,t.stateNode=o,o._reactInternals=t,E2(t,r,e,n),t=I2(null,t,r,!0,i,n)):(t.tag=0,Lr&&i&&NN(t),Ri(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(vP(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=QSe(r),e=El(r,e),o){case 0:t=O2(null,t,r,e,n);break e;case 1:t=U4(null,t,r,e,n);break e;case 11:t=V4(null,t,r,e,n);break e;case 14:t=H4(null,t,r,El(r.type,e),n);break e}throw Error(it(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:El(r,o),O2(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:El(r,o),U4(e,t,r,o,n);case 3:e:{if(_Q(t),e===null)throw Error(it(387));r=t.pendingProps,i=t.memoizedState,o=i.element,lQ(e,t),dE(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=wy(Error(it(423)),t),t=W4(e,t,r,n,o);break e}else if(r!==o){o=wy(Error(it(424)),t),t=W4(e,t,r,n,o);break e}else for(Ha=rf(t.stateNode.containerInfo.firstChild),Wa=t,Lr=!0,Rl=null,n=aQ(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yy(),r===o){t=ju(e,t,n);break e}Ri(e,t,r,n)}t=t.child}return t;case 5:return cQ(t),e===null&&S2(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,y2(r,o)?a=null:i!==null&&y2(r,i)&&(t.flags|=32),DQ(e,t),Ri(e,t,a,n),t.child;case 6:return e===null&&S2(t),null;case 13:return LQ(e,t,n);case 4:return WN(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=vy(t,null,r,n):Ri(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:El(r,o),V4(e,t,r,o,n);case 7:return Ri(e,t,t.pendingProps,n),t.child;case 8:return Ri(e,t,t.pendingProps.children,n),t.child;case 12:return Ri(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,xr(cE,r._currentValue),r._currentValue=a,i!==null)if(ql(i.value,a)){if(i.children===o.children&&!da.current){t=ju(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Su(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),C2(i.return,n,t),s.lanes|=n;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(it(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),C2(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ri(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,jg(t,n),o=Qs(o),r=r(o),t.flags|=1,Ri(e,t,r,n),t.child;case 14:return r=t.type,o=El(r,t.pendingProps),o=El(r.type,o),H4(e,t,r,o,n);case 15:return $Q(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:El(r,o),vP(e,t),t.tag=1,fa(r)?(e=!0,aE(t)):e=!1,jg(t,n),kQ(t,r,o),E2(t,r,o,n),I2(null,t,r,!0,e,n);case 19:return NQ(e,t,n);case 22:return RQ(e,t,n)}throw Error(it(156,t.tag))};function ZQ(e,t){return TX(e,t)}function XSe(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ns(e,t,n,r){return new XSe(e,t,n,r)}function aF(e){return e=e.prototype,!(!e||!e.isReactComponent)}function QSe(e){if(typeof e=="function")return aF(e)?1:0;if(e!=null){if(e=e.$$typeof,e===EN)return 11;if(e===TN)return 14}return 2}function lf(e,t){var n=e.alternate;return n===null?(n=Ns(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function xP(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")aF(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ig:return Kp(n.children,o,i,t);case PN:a=8,o|=8;break;case YR:return e=Ns(12,n,t,o|2),e.elementType=YR,e.lanes=i,e;case XR:return e=Ns(13,n,t,o),e.elementType=XR,e.lanes=i,e;case QR:return e=Ns(19,n,t,o),e.elementType=QR,e.lanes=i,e;case cX:return YO(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case sX:a=10;break e;case lX:a=9;break e;case EN:a=11;break e;case TN:a=14;break e;case Td:a=16,r=null;break e}throw Error(it(130,e==null?e:typeof e,""))}return t=Ns(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Kp(e,t,n,r){return e=Ns(7,e,r,t),e.lanes=n,e}function YO(e,t,n,r){return e=Ns(22,e,r,t),e.elementType=cX,e.lanes=n,e.stateNode={isHidden:!1},e}function GA(e,t,n){return e=Ns(6,e,null,t),e.lanes=n,e}function qA(e,t,n){return t=Ns(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function JSe(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=OA(0),this.expirationTimes=OA(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=OA(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function sF(e,t,n,r,o,i,a,s,l){return e=new JSe(e,t,n,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ns(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},UN(i),e}function ZSe(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rJ)}catch(e){console.error(e)}}rJ(),rX.exports=ts;var eI=rX.exports;const mC=Bn(eI),r3={disabled:!1},wE=Y.createContext(null);var oJ=function(t){return t.scrollTop},E0="unmounted",bp="exited",wp="entering",Xm="entered",B2="exiting",rs=function(e){oS(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=bp,i.appearStatus=wp):l=Xm:r.unmountOnExit||r.mountOnEnter?l=E0:l=bp,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===E0?{status:bp}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==wp&&a!==Xm&&(i=wp):(a===wp||a===Xm)&&(i=B2)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===wp){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:mC.findDOMNode(this);a&&oJ(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===bp&&this.setState({status:E0})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[mC.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!o&&!a||r3.disabled){this.safeSetState({status:Xm},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:wp},function(){i.props.onEntering(c,u),i.onTransitionEnd(f,function(){i.safeSetState({status:Xm},function(){i.props.onEntered(c,u)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:mC.findDOMNode(this);if(!i||r3.disabled){this.safeSetState({status:bp},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:B2},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:bp},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:mC.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===E0)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=Ue(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Y.createElement(wE.Provider,{value:null},typeof a=="function"?a(o,s):Y.cloneElement(Y.Children.only(a),s))},t}(Y.Component);rs.contextType=wE;rs.propTypes={};function Im(){}rs.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Im,onEntering:Im,onEntered:Im,onExit:Im,onExiting:Im,onExited:Im};rs.UNMOUNTED=E0;rs.EXITED=bp;rs.ENTERING=wp;rs.ENTERED=Xm;rs.EXITING=B2;var o1e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Jwe(t,r)})},KA=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Zwe(t,r)})},dF=function(e){oS(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;ae.scrollTop;function vf(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function u1e(e){return _e("MuiCollapse",e)}Le("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const d1e=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Te(r,u1e,n)},f1e=ie("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(tt(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),p1e=ie("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),h1e=ie("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Ws=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:p,onExit:m,onExited:g,onExiting:y,orientation:b="vertical",style:x,timeout:S=FY.standard,TransitionComponent:P=rs,...E}=r,T={...r,orientation:b,collapsedSize:s},O=d1e(T),k=Ao(),M=la(),I=v.useRef(null),R=v.useRef(),_=typeof s=="number"?`${s}px`:s,N=b==="horizontal",B=N?"width":"height",L=v.useRef(null),F=Wt(n,L),U=oe=>fe=>{if(oe){const se=L.current;fe===void 0?oe(se):oe(se,fe)}},V=()=>I.current?I.current[N?"clientWidth":"clientHeight"]:0,z=U((oe,fe)=>{I.current&&N&&(I.current.style.position="absolute"),oe.style[B]=_,d&&d(oe,fe)}),W=U((oe,fe)=>{const se=V();I.current&&N&&(I.current.style.position="");const{duration:ee,easing:ce}=vf({style:x,timeout:S,easing:c},{mode:"enter"});if(S==="auto"){const le=k.transitions.getAutoHeightDuration(se);oe.style.transitionDuration=`${le}ms`,R.current=le}else oe.style.transitionDuration=typeof ee=="string"?ee:`${ee}ms`;oe.style[B]=`${se}px`,oe.style.transitionTimingFunction=ce,p&&p(oe,fe)}),G=U((oe,fe)=>{oe.style[B]="auto",f&&f(oe,fe)}),J=U(oe=>{oe.style[B]=`${V()}px`,m&&m(oe)}),K=U(g),ne=U(oe=>{const fe=V(),{duration:se,easing:ee}=vf({style:x,timeout:S,easing:c},{mode:"exit"});if(S==="auto"){const ce=k.transitions.getAutoHeightDuration(fe);oe.style.transitionDuration=`${ce}ms`,R.current=ce}else oe.style.transitionDuration=typeof se=="string"?se:`${se}ms`;oe.style[B]=_,oe.style.transitionTimingFunction=ee,y&&y(oe)}),re=oe=>{S==="auto"&&M.start(R.current||0,oe),o&&o(L.current,oe)};return $.jsx(P,{in:u,onEnter:z,onEntered:G,onEntering:W,onExit:J,onExited:K,onExiting:ne,addEndListener:re,nodeRef:L,timeout:S==="auto"?null:S,...E,children:(oe,{ownerState:fe,...se})=>$.jsx(f1e,{as:l,className:pe(O.root,a,{entered:O.entered,exited:!u&&_==="0px"&&O.hidden}[oe]),style:{[N?"minWidth":"minHeight"]:_,...x},ref:F,ownerState:{...T,state:oe},...se,children:$.jsx(p1e,{ownerState:{...T,state:oe},className:O.wrapper,ref:I,children:$.jsx(h1e,{ownerState:{...T,state:oe},className:O.wrapperInner,children:i})})})})});Ws&&(Ws.muiSupportAuto=!0);function m1e(e){return _e("MuiPaper",e)}Le("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const g1e=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Te(i,m1e,o)},y1e=ie("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(tt(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),so=v.forwardRef(function(t,n){var p;const r=rt({props:t,name:"MuiPaper"}),o=Ao(),{className:i,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=r,d={...r,component:a,elevation:s,square:l,variant:c},f=g1e(d);return $.jsx(y1e,{as:a,ownerState:d,className:pe(f.root,i),ref:n,...u,style:{...c==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[s],...o.vars&&{"--Paper-overlay":(p=o.vars.overlays)==null?void 0:p[s]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${vt("#fff",RR(s))}, ${vt("#fff",RR(s))})`}},...u.style}})}),iJ=v.createContext({});function dn(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,...s}=t,{component:l,slots:c={[e]:void 0},slotProps:u={[e]:void 0},...d}=i,f=c[e]||r,p=_u(u[e],o),{props:{component:m,...g},internalRef:y}=IY({className:n,...s,externalForwardedProps:e==="root"?d:void 0,externalSlotProps:p}),b=Wt(y,p==null?void 0:p.ref,t.ref),x=e==="root"?m||l:m,S=OY(f,{...e==="root"&&!l&&!c[e]&&a,...e!=="root"&&!c[e]&&a,...g,...x&&{as:x},ref:b},o);return[f,S]}function v1e(e){return _e("MuiAccordion",e)}const gC=Le("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),b1e=e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:i}=e;return Te({root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!i&&"gutters"],heading:["heading"],region:["region"]},v1e,t)},w1e=ie(so,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${gC.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(tt(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${gC.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${gC.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),tt(({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${gC.expanded}`]:{margin:"16px 0"}}}]}))),x1e=ie("h3",{name:"MuiAccordion",slot:"Heading",overridesResolver:(e,t)=>t.heading})({all:"unset"}),hF=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiAccordion"}),{children:o,className:i,defaultExpanded:a=!1,disabled:s=!1,disableGutters:l=!1,expanded:c,onChange:u,square:d=!1,slots:f={},slotProps:p={},TransitionComponent:m,TransitionProps:g,...y}=r,[b,x]=bi({controlled:c,default:a,name:"Accordion",state:"expanded"}),S=v.useCallback(F=>{x(!b),u&&u(F,!b)},[b,u,x]),[P,...E]=v.Children.toArray(o),T=v.useMemo(()=>({expanded:b,disabled:s,disableGutters:l,toggle:S}),[b,s,l,S]),O={...r,square:d,disabled:s,disableGutters:l,expanded:b},k=b1e(O),M={transition:m,...f},I={transition:g,...p},R={slots:M,slotProps:I},[_,N]=dn("heading",{elementType:x1e,externalForwardedProps:R,className:k.heading,ownerState:O}),[B,L]=dn("transition",{elementType:Ws,externalForwardedProps:R,ownerState:O});return $.jsxs(w1e,{className:pe(k.root,i),ref:n,ownerState:O,square:d,...y,children:[$.jsx(_,{...N,children:$.jsx(iJ.Provider,{value:T,children:P})}),$.jsx(B,{in:b,timeout:"auto",...L,children:$.jsx("div",{"aria-labelledby":P.props.id,id:P.props["aria-controls"],role:"region",className:k.region,children:E})})]})});function S1e(e){return _e("MuiAccordionDetails",e)}Le("MuiAccordionDetails",["root"]);const C1e=e=>{const{classes:t}=e;return Te({root:["root"]},S1e,t)},P1e=ie("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(tt(({theme:e})=>({padding:e.spacing(1,2,2)}))),mF=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiAccordionDetails"}),{className:o,...i}=r,a=r,s=C1e(a);return $.jsx(P1e,{className:pe(s.root,o),ref:n,ownerState:a,...i})});class xE{constructor(){pn(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new xE}static use(){const t=Jl(xE.create).current,[n,r]=v.useState(!1);return t.shouldMount=n,t.setShouldMount=r,v.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=T1e(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function E1e(){return xE.use()}function T1e(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function O1e(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,d]=v.useState(!1),f=pe(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},m=pe(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),v.useEffect(()=>{if(!s&&l!=null){const g=setTimeout(l,c);return()=>{clearTimeout(g)}}},[l,s,c]),$.jsx("span",{className:f,style:p,children:$.jsx("span",{className:m})})}const As=Le("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),V2=550,I1e=80,k1e=jc` 0% { transform: scale(0); opacity: 0.1; @@ -103,7 +95,7 @@ Error generating stack: `+i.message+` transform: scale(1); opacity: 0.3; } -`,_1e=jc` +`,M1e=jc` 0% { opacity: 1; } @@ -111,7 +103,7 @@ Error generating stack: `+i.message+` 100% { opacity: 0; } -`,D1e=jc` +`,A1e=jc` 0% { transform: scale(1); } @@ -123,23 +115,23 @@ Error generating stack: `+i.message+` 100% { transform: scale(1); } -`,N1e=oe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),L1e=oe(A1e,{name:"MuiTouchRipple",slot:"Ripple"})` +`,$1e=ie("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),R1e=ie(O1e,{name:"MuiTouchRipple",slot:"Ripple"})` opacity: 0; position: absolute; - &.${$s.rippleVisible} { + &.${As.rippleVisible} { opacity: 0.3; transform: scale(1); - animation-name: ${R1e}; - animation-duration: ${U2}ms; + animation-name: ${k1e}; + animation-duration: ${V2}ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; } - &.${$s.ripplePulsate} { + &.${As.ripplePulsate} { animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms; } - & .${$s.child} { + & .${As.child} { opacity: 1; display: block; width: 100%; @@ -148,26 +140,26 @@ Error generating stack: `+i.message+` background-color: currentColor; } - & .${$s.childLeaving} { + & .${As.childLeaving} { opacity: 0; - animation-name: ${_1e}; - animation-duration: ${U2}ms; + animation-name: ${M1e}; + animation-duration: ${V2}ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; } - & .${$s.childPulsate} { + & .${As.childPulsate} { position: absolute; /* @noflip */ left: 0px; top: 0; - animation-name: ${D1e}; + animation-name: ${A1e}; animation-duration: 2500ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; animation-iteration-count: infinite; animation-delay: 200ms; } -`,F1e=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=r,[l,c]=y.useState([]),u=y.useRef(0),d=y.useRef(null);y.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=y.useRef(!1),p=ca(),m=y.useRef(null),g=y.useRef(null),v=y.useCallback(P=>{const{pulsate:T,rippleX:E,rippleY:O,rippleSize:k,cb:A}=P;c(I=>[...I,$.jsx(L1e,{classes:{ripple:fe(i.ripple,$s.ripple),rippleVisible:fe(i.rippleVisible,$s.rippleVisible),ripplePulsate:fe(i.ripplePulsate,$s.ripplePulsate),child:fe(i.child,$s.child),childLeaving:fe(i.childLeaving,$s.childLeaving),childPulsate:fe(i.childPulsate,$s.childPulsate)},timeout:U2,pulsate:T,rippleX:E,rippleY:O,rippleSize:k},u.current)]),u.current+=1,d.current=A},[i]),w=y.useCallback((P={},T={},E=()=>{})=>{const{pulsate:O=!1,center:k=o||T.pulsate,fakeElement:A=!1}=T;if((P==null?void 0:P.type)==="mousedown"&&f.current){f.current=!1;return}(P==null?void 0:P.type)==="touchstart"&&(f.current=!0);const I=A?null:g.current,R=I?I.getBoundingClientRect():{width:0,height:0,left:0,top:0};let L,F,z;if(k||P===void 0||P.clientX===0&&P.clientY===0||!P.clientX&&!P.touches)L=Math.round(R.width/2),F=Math.round(R.height/2);else{const{clientX:_,clientY:D}=P.touches&&P.touches.length>0?P.touches[0]:P;L=Math.round(_-R.left),F=Math.round(D-R.top)}if(k)z=Math.sqrt((2*R.width**2+R.height**2)/3),z%2===0&&(z+=1);else{const _=Math.max(Math.abs((I?I.clientWidth:0)-L),L)*2+2,D=Math.max(Math.abs((I?I.clientHeight:0)-F),F)*2+2;z=Math.sqrt(_**2+D**2)}P!=null&&P.touches?m.current===null&&(m.current=()=>{v({pulsate:O,rippleX:L,rippleY:F,rippleSize:z,cb:E})},p.start($1e,()=>{m.current&&(m.current(),m.current=null)})):v({pulsate:O,rippleX:L,rippleY:F,rippleSize:z,cb:E})},[o,v,p]),x=y.useCallback(()=>{w({},{pulsate:!0})},[w]),S=y.useCallback((P,T)=>{if(p.clear(),(P==null?void 0:P.type)==="touchend"&&m.current){m.current(),m.current=null,p.start(0,()=>{S(P,T)});return}m.current=null,c(E=>E.length>0?E.slice(1):E),d.current=T},[p]);return y.useImperativeHandle(n,()=>({pulsate:x,start:w,stop:S}),[x,w,S]),$.jsx(N1e,{className:fe($s.root,i.root,a),ref:g,...s,children:$.jsx(cS,{component:null,exit:!0,children:l})})});function j1e(e){return Ne("MuiButtonBase",e)}const B1e=Le("MuiButtonBase",["root","disabled","focusVisible"]),z1e=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=Te({root:["root",t&&"disabled",n&&"focusVisible"]},j1e,o);return n&&r&&(a.root+=` ${r}`),a},V1e=oe("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${B1e.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Hi=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,focusVisibleClassName:p,LinkComponent:m="a",onBlur:g,onClick:v,onContextMenu:w,onDragLeave:x,onFocus:S,onFocusVisible:P,onKeyDown:T,onKeyUp:E,onMouseDown:O,onMouseLeave:k,onMouseUp:A,onTouchEnd:I,onTouchMove:R,onTouchStart:L,tabIndex:F=0,TouchRippleProps:z,touchRippleRef:_,type:D,...H}=r,B=y.useRef(null),V=k1e(),W=Wt(V.ref,_),[G,Q]=y.useState(!1);c&&G&&Q(!1),y.useImperativeHandle(o,()=>({focusVisible:()=>{Q(!0),B.current.focus()}}),[]);const Y=V.shouldMount&&!u&&!c;y.useEffect(()=>{G&&f&&!u&&V.pulsate()},[u,f,G,V]);const ne=iu(V,"start",O,d),ie=iu(V,"stop",w,d),re=iu(V,"stop",x,d),pe=iu(V,"stop",A,d),le=iu(V,"stop",de=>{G&&de.preventDefault(),k&&k(de)},d),ee=iu(V,"start",L,d),ce=iu(V,"stop",I,d),se=iu(V,"stop",R,d),Z=iu(V,"stop",de=>{GP(de.target)||Q(!1),g&&g(de)},!1),ue=et(de=>{B.current||(B.current=de.currentTarget),GP(de.target)&&(Q(!0),P&&P(de)),S&&S(de)}),ge=()=>{const de=B.current;return l&&l!=="button"&&!(de.tagName==="A"&&de.href)},we=et(de=>{f&&!de.repeat&&G&&de.key===" "&&V.stop(de,()=>{V.start(de)}),de.target===de.currentTarget&&ge()&&de.key===" "&&de.preventDefault(),T&&T(de),de.target===de.currentTarget&&ge()&&de.key==="Enter"&&!c&&(de.preventDefault(),v&&v(de))}),me=et(de=>{f&&de.key===" "&&G&&!de.defaultPrevented&&V.stop(de,()=>{V.pulsate(de)}),E&&E(de),v&&de.target===de.currentTarget&&ge()&&de.key===" "&&!de.defaultPrevented&&v(de)});let be=l;be==="button"&&(H.href||H.to)&&(be=m);const xe={};be==="button"?(xe.type=D===void 0?"button":D,xe.disabled=c):(!H.href&&!H.to&&(xe.role="button"),c&&(xe["aria-disabled"]=c));const Ee=Wt(n,B),Me={...r,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:F,focusVisible:G},_e=z1e(Me);return $.jsxs(V1e,{as:be,className:fe(_e.root,s),ownerState:Me,onBlur:Z,onClick:v,onContextMenu:ie,onFocus:ue,onKeyDown:we,onKeyUp:me,onMouseDown:ne,onMouseLeave:le,onMouseUp:pe,onDragLeave:re,onTouchEnd:ce,onTouchMove:se,onTouchStart:ee,ref:Ee,tabIndex:c?-1:F,type:D,...xe,...H,children:[a,Y?$.jsx(F1e,{ref:W,center:i,...z}):null]})});function iu(e,t,n,r=!1){return et(o=>(n&&n(o),r||e[t](o),!0))}function H1e(e){return Ne("MuiAccordionSummary",e)}const gg=Le("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),U1e=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e;return Te({root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},H1e,t)},W1e=oe(Hi,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(rt(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${gg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${gg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${gg.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${gg.expanded}`]:{minHeight:64}}}]}})),G1e=oe("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(rt(({theme:e})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${gg.expanded}`]:{margin:"20px 0"}}}]}))),q1e=oe("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(rt(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${gg.expanded}`]:{transform:"rotate(180deg)"}}))),wF=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiAccordionSummary"}),{children:o,className:i,expandIcon:a,focusVisibleClassName:s,onClick:l,...c}=r,{disabled:u=!1,disableGutters:d,expanded:f,toggle:p}=y.useContext(cJ),m=w=>{p&&p(w),l&&l(w)},g={...r,expanded:f,disabled:u,disableGutters:d},v=U1e(g);return $.jsxs(W1e,{focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":f,className:fe(v.root,i),focusVisibleClassName:fe(v.focusVisible,s),onClick:m,ref:n,ownerState:g,...c,children:[$.jsx(G1e,{className:v.content,ownerState:g,children:o}),a&&$.jsx(q1e,{className:v.expandIconWrapper,ownerState:g,children:a})]})});function K1e(e){return typeof e.main=="string"}function Y1e(e,t=[]){if(!K1e(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Bn(e=[]){return([,t])=>t&&Y1e(t,e)}function X1e(e){return Ne("MuiAlert",e)}const r3=Le("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function Q1e(e){return Ne("MuiIconButton",e)}const J1e=Le("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Z1e=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,a={root:["root",n&&"disabled",r!=="default"&&`color${Se(r)}`,o&&`edge${Se(o)}`,`size${Se(i)}`]};return Te(a,Q1e,t)},eCe=oe(Hi,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Se(n.color)}`],n.edge&&t[`edge${Se(n.edge)}`],t[`size${Se(n.size)}`]]}})(rt(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),rt(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${J1e.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}}))),kn=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium",...d}=r,f={...r,edge:o,color:s,disabled:l,disableFocusRipple:c,size:u},p=Z1e(f);return $.jsx(eCe,{className:fe(p.root,a),centerRipple:!0,focusRipple:!c,disabled:l,ref:n,...d,ownerState:f,children:i})}),tCe=ut($.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),nCe=ut($.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),rCe=ut($.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),oCe=ut($.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),uJ=ut($.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),iCe=e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root",`color${Se(n||r)}`,`${t}${Se(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return Te(i,X1e,o)},aCe=oe(io,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Se(n.color||n.severity)}`]]}})(rt(({theme:e})=>{const t=e.palette.mode==="light"?Ru:_u,n=e.palette.mode==="light"?_u:Ru;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(Bn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${r3.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Bn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${r3.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Bn(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),sCe=oe("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),lCe=oe("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),o3=oe("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),i3={success:$.jsx(tCe,{fontSize:"inherit"}),warning:$.jsx(nCe,{fontSize:"inherit"}),error:$.jsx(rCe,{fontSize:"inherit"}),info:$.jsx(oCe,{fontSize:"inherit"})},Bu=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiAlert"}),{action:o,children:i,className:a,closeText:s="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:f=i3,onClose:p,role:m="alert",severity:g="success",slotProps:v={},slots:w={},variant:x="standard",...S}=r,P={...r,color:l,severity:g,variant:x,colorSeverity:l||g},T=iCe(P),E={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...w},slotProps:{...u,...v}},[O,k]=Kn("closeButton",{elementType:kn,externalForwardedProps:E,ownerState:P}),[A,I]=Kn("closeIcon",{elementType:uJ,externalForwardedProps:E,ownerState:P});return $.jsxs(aCe,{role:m,elevation:0,ownerState:P,className:fe(T.root,a),ref:n,...S,children:[d!==!1?$.jsx(sCe,{ownerState:P,className:T.icon,children:d||f[g]||i3[g]}):null,$.jsx(lCe,{ownerState:P,className:T.message,children:i}),o!=null?$.jsx(o3,{ownerState:P,className:T.action,children:o}):null,o==null&&p?$.jsx(o3,{ownerState:P,className:T.action,children:$.jsx(O,{size:"small","aria-label":s,title:s,color:"inherit",onClick:p,...k,children:$.jsx(A,{fontSize:"small",...I})})}):null]})});function cCe(e){return Ne("MuiTypography",e)}const CT=Le("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),uCe={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},dCe=Qwe(),fCe=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${Se(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Te(s,cCe,a)},pCe=oe("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Se(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(rt(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(e.palette).filter(Bn()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${Se(n)}`},style:{color:(e.vars||e).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),a3={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},dt=y.forwardRef(function(t,n){const{color:r,...o}=at({props:t,name:"MuiTypography"}),i=!uCe[r],a=dCe({...o,...i&&{color:r}}),{align:s="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:d=!1,paragraph:f=!1,variant:p="body1",variantMapping:m=a3,...g}=a,v={...a,align:s,color:r,className:l,component:c,gutterBottom:u,noWrap:d,paragraph:f,variant:p,variantMapping:m},w=c||(f?"p":m[p]||a3[p])||"span",x=fCe(v);return $.jsx(pCe,{as:w,ref:n,className:fe(x.root,l),...g,ownerState:v,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...g.style}})});function hCe(e){return Ne("MuiAlertTitle",e)}Le("MuiAlertTitle",["root"]);const mCe=e=>{const{classes:t}=e;return Te({root:["root"]},hCe,t)},gCe=oe(dt,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})(rt(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),PT=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiAlertTitle"}),{className:o,...i}=r,a=r,s=mCe(a);return $.jsx(gCe,{gutterBottom:!0,component:"div",ownerState:a,ref:n,className:fe(s.root,o),...i})});function yCe(e){return Ne("MuiAppBar",e)}Le("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const vCe=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${Se(t)}`,`position${Se(n)}`]};return Te(o,yCe,r)},s3=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,bCe=oe(io,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Se(n.position)}`],t[`color${Se(n.color)}`]]}})(rt(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Bn(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?s3(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?s3(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),wCe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiAppBar"}),{className:o,color:i="primary",enableColorOnDark:a=!1,position:s="fixed",...l}=r,c={...r,color:i,position:s,enableColorOnDark:a},u=vCe(c);return $.jsx(bCe,{square:!0,component:"header",ownerState:c,elevation:4,className:fe(u.root,o,s==="fixed"&&"mui-fixed"),ref:n,...l})});function l3(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function dJ(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(s,{inputValue:l,getOptionLabel:c})=>{let u=a?l.trim():l;n&&(u=u.toLowerCase()),t&&(u=l3(u));const d=u?s.filter(f=>{let p=(i||c)(f);return n&&(p=p.toLowerCase()),t&&(p=l3(p)),o==="start"?p.startsWith(u):p.includes(u)}):s;return typeof r=="number"?d.slice(0,r):d}}const xCe=dJ(),c3=5,SCe=e=>{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))},CCe=[];function PCe(e){const{unstable_isActiveElementInListbox:t=SCe,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:u=e.multiple?CCe:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:p,disabledItemsFocusable:m=!1,disableListWrap:g=!1,filterOptions:v=xCe,filterSelectedOptions:w=!1,freeSolo:x=!1,getOptionDisabled:S,getOptionKey:P,getOptionLabel:T=Ke=>Ke.label??Ke,groupBy:E,handleHomeEndKeys:O=!e.freeSolo,id:k,includeInputInList:A=!1,inputValue:I,isOptionEqualToValue:R=(Ke,Fe)=>Ke===Fe,multiple:L=!1,onChange:F,onClose:z,onHighlightChange:_,onInputChange:D,onOpen:H,open:B,openOnFocus:V=!1,options:W,readOnly:G=!1,selectOnFocus:Q=!e.freeSolo,value:Y}=e,ne=Ln(k);let ie=T;ie=Ke=>{const Fe=T(Ke);return typeof Fe!="string"?String(Fe):Fe};const re=y.useRef(!1),pe=y.useRef(!0),le=y.useRef(null),ee=y.useRef(null),[ce,se]=y.useState(null),[Z,ue]=y.useState(-1),ge=o?0:-1,we=y.useRef(ge),[me,be]=vi({controlled:Y,default:u,name:c}),[xe,Ee]=vi({controlled:I,default:"",name:c,state:"inputValue"}),[Me,_e]=y.useState(!1),de=y.useCallback((Ke,Fe,wt)=>{if(!(L?me.length!(w&&(L?me:[me]).some(Fe=>Fe!==null&&R(Ke,Fe)))),{inputValue:Je&&$e?"":xe,getOptionLabel:ie}):[],it=yL({filteredOptions:lt,value:me,inputValue:xe});y.useEffect(()=>{const Ke=me!==it.value;Me&&!Ke||x&&!Ke||de(null,me,"reset")},[me,de,Me,it.value,x]);const tt=Ae&<.length>0&&!G,pt=et(Ke=>{Ke===-1?le.current.focus():ce.querySelector(`[data-tag-index="${Ke}"]`).focus()});y.useEffect(()=>{L&&Z>me.length-1&&(ue(-1),pt(-1))},[me,L,Z,pt]);function qt(Ke,Fe){if(!ee.current||Ke<0||Ke>=lt.length)return-1;let wt=Ke;for(;;){const Zt=ee.current.querySelector(`[data-option-index="${wt}"]`),sn=m?!1:!Zt||Zt.disabled||Zt.getAttribute("aria-disabled")==="true";if(Zt&&Zt.hasAttribute("tabindex")&&!sn)return wt;if(Fe==="next"?wt=(wt+1)%lt.length:wt=(wt-1+lt.length)%lt.length,wt===Ke)return-1}}const qe=et(({event:Ke,index:Fe,reason:wt="auto"})=>{if(we.current=Fe,Fe===-1?le.current.removeAttribute("aria-activedescendant"):le.current.setAttribute("aria-activedescendant",`${ne}-option-${Fe}`),_&&_(Ke,Fe===-1?null:lt[Fe],wt),!ee.current)return;const Zt=ee.current.querySelector(`[role="option"].${n}-focused`);Zt&&(Zt.classList.remove(`${n}-focused`),Zt.classList.remove(`${n}-focusVisible`));let sn=ee.current;if(ee.current.getAttribute("role")!=="listbox"&&(sn=ee.current.parentElement.querySelector('[role="listbox"]')),!sn)return;if(Fe===-1){sn.scrollTop=0;return}const kr=ee.current.querySelector(`[data-option-index="${Fe}"]`);if(kr&&(kr.classList.add(`${n}-focused`),wt==="keyboard"&&kr.classList.add(`${n}-focusVisible`),sn.scrollHeight>sn.clientHeight&&wt!=="mouse"&&wt!=="touch")){const Hn=kr,Sa=sn.clientHeight+sn.scrollTop,Kc=Hn.offsetTop+Hn.offsetHeight;Kc>Sa?sn.scrollTop=Kc-sn.clientHeight:Hn.offsetTop-Hn.offsetHeight*(E?1.3:0){if(!ot)return;const kr=qt((()=>{const Hn=lt.length-1;if(Fe==="reset")return ge;if(Fe==="start")return 0;if(Fe==="end")return Hn;const Sa=we.current+Fe;return Sa<0?Sa===-1&&A?-1:g&&we.current!==-1||Math.abs(Fe)>1?0:Hn:Sa>Hn?Sa===Hn+1&&A?-1:g||Math.abs(Fe)>1?Hn:0:Sa})(),wt);if(qe({index:kr,reason:Zt,event:Ke}),r&&Fe!=="reset")if(kr===-1)le.current.value=xe;else{const Hn=ie(lt[kr]);le.current.value=Hn,Hn.toLowerCase().indexOf(xe.toLowerCase())===0&&xe.length>0&&le.current.setSelectionRange(xe.length,Hn.length)}}),Ze=()=>{const Ke=(Fe,wt)=>{const Zt=Fe?ie(Fe):"",sn=wt?ie(wt):"";return Zt===sn};if(we.current!==-1&&it.filteredOptions&&it.filteredOptions.length!==lt.length&&it.inputValue===xe&&(L?me.length===it.value.length&&it.value.every((Fe,wt)=>ie(me[wt])===ie(Fe)):Ke(it.value,me))){const Fe=it.filteredOptions[we.current];if(Fe)return lt.findIndex(wt=>ie(wt)===ie(Fe))}return-1},Pt=y.useCallback(()=>{if(!ot)return;const Ke=Ze();if(Ke!==-1){we.current=Ke;return}const Fe=L?me[0]:me;if(lt.length===0||Fe==null){Re({diff:"reset"});return}if(ee.current){if(Fe!=null){const wt=lt[we.current];if(L&&wt&&me.findIndex(sn=>R(wt,sn))!==-1)return;const Zt=lt.findIndex(sn=>R(sn,Fe));Zt===-1?Re({diff:"reset"}):qe({index:Zt});return}if(we.current>=lt.length-1){qe({index:lt.length-1});return}qe({index:we.current})}},[lt.length,L?!1:me,w,Re,qe,ot,xe,L]),_t=et(Ke=>{WP(ee,Ke),Ke&&Pt()});y.useEffect(()=>{Pt()},[Pt]);const kt=Ke=>{Ae||(Oe(!0),Be(!0),H&&H(Ke))},yn=(Ke,Fe)=>{Ae&&(Oe(!1),z&&z(Ke,Fe))},Fn=(Ke,Fe,wt,Zt)=>{if(L){if(me.length===Fe.length&&me.every((sn,kr)=>sn===Fe[kr]))return}else if(me===Fe)return;F&&F(Ke,Fe,wt,Zt),be(Fe)},Vn=y.useRef(!1),wo=(Ke,Fe,wt="selectOption",Zt="options")=>{let sn=wt,kr=Fe;if(L){kr=Array.isArray(me)?me.slice():[];const Hn=kr.findIndex(Sa=>R(Fe,Sa));Hn===-1?kr.push(Fe):Zt!=="freeSolo"&&(kr.splice(Hn,1),sn="removeOption")}de(Ke,kr,sn),Fn(Ke,kr,sn,{option:Fe}),!f&&(!Ke||!Ke.ctrlKey&&!Ke.metaKey)&&yn(Ke,sn),(a===!0||a==="touch"&&Vn.current||a==="mouse"&&!Vn.current)&&le.current.blur()};function xo(Ke,Fe){if(Ke===-1)return-1;let wt=Ke;for(;;){if(Fe==="next"&&wt===me.length||Fe==="previous"&&wt===-1)return-1;const Zt=ce.querySelector(`[data-tag-index="${wt}"]`);if(!Zt||!Zt.hasAttribute("tabindex")||Zt.disabled||Zt.getAttribute("aria-disabled")==="true")wt+=Fe==="next"?1:-1;else return wt}}const oi=(Ke,Fe)=>{if(!L)return;xe===""&&yn(Ke,"toggleInput");let wt=Z;Z===-1?xe===""&&Fe==="previous"&&(wt=me.length-1):(wt+=Fe==="next"?1:-1,wt<0&&(wt=0),wt===me.length&&(wt=-1)),wt=xo(wt,Fe),ue(wt),pt(wt)},Xi=Ke=>{re.current=!0,Ee(""),D&&D(Ke,"","clear"),Fn(Ke,L?[]:null,"clear")},zt=Ke=>Fe=>{if(Ke.onKeyDown&&Ke.onKeyDown(Fe),!Fe.defaultMuiPrevented&&(Z!==-1&&!["ArrowLeft","ArrowRight"].includes(Fe.key)&&(ue(-1),pt(-1)),Fe.which!==229))switch(Fe.key){case"Home":ot&&O&&(Fe.preventDefault(),Re({diff:"start",direction:"next",reason:"keyboard",event:Fe}));break;case"End":ot&&O&&(Fe.preventDefault(),Re({diff:"end",direction:"previous",reason:"keyboard",event:Fe}));break;case"PageUp":Fe.preventDefault(),Re({diff:-c3,direction:"previous",reason:"keyboard",event:Fe}),kt(Fe);break;case"PageDown":Fe.preventDefault(),Re({diff:c3,direction:"next",reason:"keyboard",event:Fe}),kt(Fe);break;case"ArrowDown":Fe.preventDefault(),Re({diff:1,direction:"next",reason:"keyboard",event:Fe}),kt(Fe);break;case"ArrowUp":Fe.preventDefault(),Re({diff:-1,direction:"previous",reason:"keyboard",event:Fe}),kt(Fe);break;case"ArrowLeft":oi(Fe,"previous");break;case"ArrowRight":oi(Fe,"next");break;case"Enter":if(we.current!==-1&&ot){const wt=lt[we.current],Zt=S?S(wt):!1;if(Fe.preventDefault(),Zt)return;wo(Fe,wt,"selectOption"),r&&le.current.setSelectionRange(le.current.value.length,le.current.value.length)}else x&&xe!==""&&Je===!1&&(L&&Fe.preventDefault(),wo(Fe,xe,"createOption","freeSolo"));break;case"Escape":ot?(Fe.preventDefault(),Fe.stopPropagation(),yn(Fe,"escape")):l&&(xe!==""||L&&me.length>0)&&(Fe.preventDefault(),Fe.stopPropagation(),Xi(Fe));break;case"Backspace":if(L&&!G&&xe===""&&me.length>0){const wt=Z===-1?me.length-1:Z,Zt=me.slice();Zt.splice(wt,1),Fn(Fe,Zt,"removeOption",{option:me[wt]})}break;case"Delete":if(L&&!G&&xe===""&&me.length>0&&Z!==-1){const wt=Z,Zt=me.slice();Zt.splice(wt,1),Fn(Fe,Zt,"removeOption",{option:me[wt]})}break}},Wo=Ke=>{_e(!0),V&&!re.current&&kt(Ke)},Gc=Ke=>{if(t(ee)){le.current.focus();return}_e(!1),pe.current=!0,re.current=!1,i&&we.current!==-1&&ot?wo(Ke,lt[we.current],"blur"):i&&x&&xe!==""?wo(Ke,xe,"blur","freeSolo"):s&&de(Ke,me,"blur"),yn(Ke,"blur")},ad=Ke=>{const Fe=Ke.target.value;xe!==Fe&&(Ee(Fe),Be(!1),D&&D(Ke,Fe,"input")),Fe===""?!d&&!L&&Fn(Ke,null,"clear"):kt(Ke)},qc=Ke=>{const Fe=Number(Ke.currentTarget.getAttribute("data-option-index"));we.current!==Fe&&qe({event:Ke,index:Fe,reason:"mouse"})},Kf=Ke=>{qe({event:Ke,index:Number(Ke.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Vn.current=!0},Yf=Ke=>{const Fe=Number(Ke.currentTarget.getAttribute("data-option-index"));wo(Ke,lt[Fe],"selectOption"),Vn.current=!1},mb=Ke=>Fe=>{const wt=me.slice();wt.splice(Ke,1),Fn(Fe,wt,"removeOption",{option:me[Ke]})},rm=Ke=>{Ae?yn(Ke,"toggleInput"):kt(Ke)},i1=Ke=>{Ke.currentTarget.contains(Ke.target)&&Ke.target.getAttribute("id")!==ne&&Ke.preventDefault()},Xf=Ke=>{Ke.currentTarget.contains(Ke.target)&&(le.current.focus(),Q&&pe.current&&le.current.selectionEnd-le.current.selectionStart===0&&le.current.select(),pe.current=!1)},$o=Ke=>{!p&&(xe===""||!Ae)&&rm(Ke)};let Hr=x&&xe.length>0;Hr=Hr||(L?me.length>0:me!==null);let ml=lt;return E&&(ml=lt.reduce((Ke,Fe,wt)=>{const Zt=E(Fe);return Ke.length>0&&Ke[Ke.length-1].group===Zt?Ke[Ke.length-1].options.push(Fe):Ke.push({key:wt,index:wt,group:Zt,options:[Fe]}),Ke},[])),p&&Me&&Gc(),{getRootProps:(Ke={})=>({"aria-owns":tt?`${ne}-listbox`:null,...Ke,onKeyDown:zt(Ke),onMouseDown:i1,onClick:Xf}),getInputLabelProps:()=>({id:`${ne}-label`,htmlFor:ne}),getInputProps:()=>({id:ne,value:xe,onBlur:Gc,onFocus:Wo,onChange:ad,onMouseDown:$o,"aria-activedescendant":ot?"":null,"aria-autocomplete":r?"both":"list","aria-controls":tt?`${ne}-listbox`:void 0,"aria-expanded":tt,autoComplete:"off",ref:le,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:p}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Xi}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:rm}),getTagProps:({index:Ke})=>({key:Ke,"data-tag-index":Ke,tabIndex:-1,...!G&&{onDelete:mb(Ke)}}),getListboxProps:()=>({role:"listbox",id:`${ne}-listbox`,"aria-labelledby":`${ne}-label`,ref:_t,onMouseDown:Ke=>{Ke.preventDefault()}}),getOptionProps:({index:Ke,option:Fe})=>{const wt=(L?me:[me]).some(sn=>sn!=null&&R(Fe,sn)),Zt=S?S(Fe):!1;return{key:(P==null?void 0:P(Fe))??ie(Fe),tabIndex:-1,role:"option",id:`${ne}-option-${Ke}`,onMouseMove:qc,onClick:Yf,onTouchStart:Kf,"data-option-index":Ke,"aria-disabled":Zt,"aria-selected":wt}},id:ne,inputValue:xe,value:me,dirty:Hr,expanded:ot&&ce,popupOpen:ot,focused:Me||Z!==-1,anchorEl:ce,setAnchorEl:se,focusedTag:Z,groupedOptions:ml}}var ma="top",el="bottom",tl="right",ga="left",xF="auto",uS=[ma,el,tl,ga],Cy="start",zw="end",TCe="clippingParents",fJ="viewport",zb="popper",ECe="reference",u3=uS.reduce(function(e,t){return e.concat([t+"-"+Cy,t+"-"+zw])},[]),pJ=[].concat(uS,[xF]).reduce(function(e,t){return e.concat([t,t+"-"+Cy,t+"-"+zw])},[]),OCe="beforeRead",ICe="read",kCe="afterRead",MCe="beforeMain",ACe="main",$Ce="afterMain",RCe="beforeWrite",_Ce="write",DCe="afterWrite",NCe=[OCe,ICe,kCe,MCe,ACe,$Ce,RCe,_Ce,DCe];function _c(e){return e?(e.nodeName||"").toLowerCase():null}function Ja(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ph(e){var t=Ja(e).Element;return e instanceof t||e instanceof Element}function qs(e){var t=Ja(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function SF(e){if(typeof ShadowRoot>"u")return!1;var t=Ja(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function LCe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!qs(i)||!_c(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function FCe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!qs(o)||!_c(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const jCe={name:"applyStyles",enabled:!0,phase:"write",fn:LCe,effect:FCe,requires:["computeStyles"]};function Oc(e){return e.split("-")[0]}var Kp=Math.max,TT=Math.min,Py=Math.round;function W2(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function hJ(){return!/^((?!chrome|android).)*safari/i.test(W2())}function Ty(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&qs(e)&&(o=e.offsetWidth>0&&Py(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Py(r.height)/e.offsetHeight||1);var a=ph(e)?Ja(e):window,s=a.visualViewport,l=!hJ()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/o,u=(r.top+(l&&s?s.offsetTop:0))/i,d=r.width/o,f=r.height/i;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function CF(e){var t=Ty(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function mJ(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&SF(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function zu(e){return Ja(e).getComputedStyle(e)}function BCe(e){return["table","td","th"].indexOf(_c(e))>=0}function Af(e){return((ph(e)?e.ownerDocument:e.document)||window.document).documentElement}function mI(e){return _c(e)==="html"?e:e.assignedSlot||e.parentNode||(SF(e)?e.host:null)||Af(e)}function d3(e){return!qs(e)||zu(e).position==="fixed"?null:e.offsetParent}function zCe(e){var t=/firefox/i.test(W2()),n=/Trident/i.test(W2());if(n&&qs(e)){var r=zu(e);if(r.position==="fixed")return null}var o=mI(e);for(SF(o)&&(o=o.host);qs(o)&&["html","body"].indexOf(_c(o))<0;){var i=zu(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function dS(e){for(var t=Ja(e),n=d3(e);n&&BCe(n)&&zu(n).position==="static";)n=d3(n);return n&&(_c(n)==="html"||_c(n)==="body"&&zu(n).position==="static")?t:n||zCe(e)||t}function PF(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function K0(e,t,n){return Kp(e,TT(t,n))}function VCe(e,t,n){var r=K0(e,t,n);return r>n?n:r}function gJ(){return{top:0,right:0,bottom:0,left:0}}function yJ(e){return Object.assign({},gJ(),e)}function vJ(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var HCe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,yJ(typeof t!="number"?t:vJ(t,uS))};function UCe(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Oc(n.placement),l=PF(s),c=[ga,tl].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var d=HCe(o.padding,n),f=CF(i),p=l==="y"?ma:ga,m=l==="y"?el:tl,g=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],v=a[l]-n.rects.reference[l],w=dS(i),x=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,S=g/2-v/2,P=d[p],T=x-f[u]-d[m],E=x/2-f[u]/2+S,O=K0(P,E,T),k=l;n.modifiersData[r]=(t={},t[k]=O,t.centerOffset=O-E,t)}}function WCe(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||mJ(t.elements.popper,o)&&(t.elements.arrow=o))}const GCe={name:"arrow",enabled:!0,phase:"main",fn:UCe,effect:WCe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ey(e){return e.split("-")[1]}var qCe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function KCe(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Py(n*o)/o||0,y:Py(r*o)/o||0}}function f3(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=f===void 0?0:f,m=a.y,g=m===void 0?0:m,v=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=v.x,g=v.y;var w=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),S=ga,P=ma,T=window;if(c){var E=dS(n),O="clientHeight",k="clientWidth";if(E===Ja(n)&&(E=Af(n),zu(E).position!=="static"&&s==="absolute"&&(O="scrollHeight",k="scrollWidth")),E=E,o===ma||(o===ga||o===tl)&&i===zw){P=el;var A=d&&E===T&&T.visualViewport?T.visualViewport.height:E[O];g-=A-r.height,g*=l?1:-1}if(o===ga||(o===ma||o===el)&&i===zw){S=tl;var I=d&&E===T&&T.visualViewport?T.visualViewport.width:E[k];p-=I-r.width,p*=l?1:-1}}var R=Object.assign({position:s},c&&qCe),L=u===!0?KCe({x:p,y:g},Ja(n)):{x:p,y:g};if(p=L.x,g=L.y,l){var F;return Object.assign({},R,(F={},F[P]=x?"0":"",F[S]=w?"0":"",F.transform=(T.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",F))}return Object.assign({},R,(t={},t[P]=x?g+"px":"",t[S]=w?p+"px":"",t.transform="",t))}function YCe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:Oc(t.placement),variation:Ey(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,f3(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,f3(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const XCe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:YCe,data:{}};var vC={passive:!0};function QCe(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=Ja(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,vC)}),s&&l.addEventListener("resize",n.update,vC),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,vC)}),s&&l.removeEventListener("resize",n.update,vC)}}const JCe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:QCe,data:{}};var ZCe={left:"right",right:"left",bottom:"top",top:"bottom"};function PP(e){return e.replace(/left|right|bottom|top/g,function(t){return ZCe[t]})}var ePe={start:"end",end:"start"};function p3(e){return e.replace(/start|end/g,function(t){return ePe[t]})}function TF(e){var t=Ja(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function EF(e){return Ty(Af(e)).left+TF(e).scrollLeft}function tPe(e,t){var n=Ja(e),r=Af(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=hJ();(c||!c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+EF(e),y:l}}function nPe(e){var t,n=Af(e),r=TF(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Kp(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Kp(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+EF(e),l=-r.scrollTop;return zu(o||n).direction==="rtl"&&(s+=Kp(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function OF(e){var t=zu(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function bJ(e){return["html","body","#document"].indexOf(_c(e))>=0?e.ownerDocument.body:qs(e)&&OF(e)?e:bJ(mI(e))}function Y0(e,t){var n;t===void 0&&(t=[]);var r=bJ(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=Ja(r),a=o?[i].concat(i.visualViewport||[],OF(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Y0(mI(a)))}function G2(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function rPe(e,t){var n=Ty(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function h3(e,t,n){return t===fJ?G2(tPe(e,n)):ph(t)?rPe(t,n):G2(nPe(Af(e)))}function oPe(e){var t=Y0(mI(e)),n=["absolute","fixed"].indexOf(zu(e).position)>=0,r=n&&qs(e)?dS(e):e;return ph(r)?t.filter(function(o){return ph(o)&&mJ(o,r)&&_c(o)!=="body"}):[]}function iPe(e,t,n,r){var o=t==="clippingParents"?oPe(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(l,c){var u=h3(e,c,r);return l.top=Kp(u.top,l.top),l.right=TT(u.right,l.right),l.bottom=TT(u.bottom,l.bottom),l.left=Kp(u.left,l.left),l},h3(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function wJ(e){var t=e.reference,n=e.element,r=e.placement,o=r?Oc(r):null,i=r?Ey(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case ma:l={x:a,y:t.y-n.height};break;case el:l={x:a,y:t.y+t.height};break;case tl:l={x:t.x+t.width,y:s};break;case ga:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=o?PF(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case Cy:l[c]=l[c]-(t[u]/2-n[u]/2);break;case zw:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Vw(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?TCe:s,c=n.rootBoundary,u=c===void 0?fJ:c,d=n.elementContext,f=d===void 0?zb:d,p=n.altBoundary,m=p===void 0?!1:p,g=n.padding,v=g===void 0?0:g,w=yJ(typeof v!="number"?v:vJ(v,uS)),x=f===zb?ECe:zb,S=e.rects.popper,P=e.elements[m?x:f],T=iPe(ph(P)?P:P.contextElement||Af(e.elements.popper),l,u,a),E=Ty(e.elements.reference),O=wJ({reference:E,element:S,strategy:"absolute",placement:o}),k=G2(Object.assign({},S,O)),A=f===zb?k:E,I={top:T.top-A.top+w.top,bottom:A.bottom-T.bottom+w.bottom,left:T.left-A.left+w.left,right:A.right-T.right+w.right},R=e.modifiersData.offset;if(f===zb&&R){var L=R[o];Object.keys(I).forEach(function(F){var z=[tl,el].indexOf(F)>=0?1:-1,_=[ma,el].indexOf(F)>=0?"y":"x";I[F]+=L[_]*z})}return I}function aPe(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?pJ:l,u=Ey(r),d=u?s?u3:u3.filter(function(m){return Ey(m)===u}):uS,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var p=f.reduce(function(m,g){return m[g]=Vw(e,{placement:g,boundary:o,rootBoundary:i,padding:a})[Oc(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function sPe(e){if(Oc(e)===xF)return[];var t=PP(e);return[p3(e),t,p3(t)]}function lPe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,g=n.allowedAutoPlacements,v=t.options.placement,w=Oc(v),x=w===v,S=l||(x||!m?[PP(v)]:sPe(v)),P=[v].concat(S).reduce(function(ne,ie){return ne.concat(Oc(ie)===xF?aPe(t,{placement:ie,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:g}):ie)},[]),T=t.rects.reference,E=t.rects.popper,O=new Map,k=!0,A=P[0],I=0;I=0,_=z?"width":"height",D=Vw(t,{placement:R,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),H=z?F?tl:ga:F?el:ma;T[_]>E[_]&&(H=PP(H));var B=PP(H),V=[];if(i&&V.push(D[L]<=0),s&&V.push(D[H]<=0,D[B]<=0),V.every(function(ne){return ne})){A=R,k=!1;break}O.set(R,V)}if(k)for(var W=m?3:1,G=function(ie){var re=P.find(function(pe){var le=O.get(pe);if(le)return le.slice(0,ie).every(function(ee){return ee})});if(re)return A=re,"break"},Q=W;Q>0;Q--){var Y=G(Q);if(Y==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const cPe={name:"flip",enabled:!0,phase:"main",fn:lPe,requiresIfExists:["offset"],data:{_skip:!1}};function m3(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function g3(e){return[ma,tl,el,ga].some(function(t){return e[t]>=0})}function uPe(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Vw(t,{elementContext:"reference"}),s=Vw(t,{altBoundary:!0}),l=m3(a,r),c=m3(s,o,i),u=g3(l),d=g3(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const dPe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:uPe};function fPe(e,t,n){var r=Oc(e),o=[ga,ma].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[ga,tl].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function pPe(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=pJ.reduce(function(u,d){return u[d]=fPe(d,t.rects,i),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const hPe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:pPe};function mPe(e){var t=e.state,n=e.name;t.modifiersData[n]=wJ({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const gPe={name:"popperOffsets",enabled:!0,phase:"read",fn:mPe,data:{}};function yPe(e){return e==="x"?"y":"x"}function vPe(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,g=m===void 0?0:m,v=Vw(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),w=Oc(t.placement),x=Ey(t.placement),S=!x,P=PF(w),T=yPe(P),E=t.modifiersData.popperOffsets,O=t.rects.reference,k=t.rects.popper,A=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,I=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(E){if(i){var F,z=P==="y"?ma:ga,_=P==="y"?el:tl,D=P==="y"?"height":"width",H=E[P],B=H+v[z],V=H-v[_],W=p?-k[D]/2:0,G=x===Cy?O[D]:k[D],Q=x===Cy?-k[D]:-O[D],Y=t.elements.arrow,ne=p&&Y?CF(Y):{width:0,height:0},ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:gJ(),re=ie[z],pe=ie[_],le=K0(0,O[D],ne[D]),ee=S?O[D]/2-W-le-re-I.mainAxis:G-le-re-I.mainAxis,ce=S?-O[D]/2+W+le+pe+I.mainAxis:Q+le+pe+I.mainAxis,se=t.elements.arrow&&dS(t.elements.arrow),Z=se?P==="y"?se.clientTop||0:se.clientLeft||0:0,ue=(F=R==null?void 0:R[P])!=null?F:0,ge=H+ee-ue-Z,we=H+ce-ue,me=K0(p?TT(B,ge):B,H,p?Kp(V,we):V);E[P]=me,L[P]=me-H}if(s){var be,xe=P==="x"?ma:ga,Ee=P==="x"?el:tl,Me=E[T],_e=T==="y"?"height":"width",de=Me+v[xe],Ae=Me-v[Ee],Oe=[ma,ga].indexOf(w)!==-1,$e=(be=R==null?void 0:R[T])!=null?be:0,Be=Oe?de:Me-O[_e]-k[_e]-$e+I.altAxis,Je=Oe?Me+O[_e]+k[_e]-$e-I.altAxis:Ae,ot=p&&Oe?VCe(Be,Me,Je):K0(p?Be:de,Me,p?Je:Ae);E[T]=ot,L[T]=ot-Me}t.modifiersData[r]=L}}const bPe={name:"preventOverflow",enabled:!0,phase:"main",fn:vPe,requiresIfExists:["offset"]};function wPe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function xPe(e){return e===Ja(e)||!qs(e)?TF(e):wPe(e)}function SPe(e){var t=e.getBoundingClientRect(),n=Py(t.width)/e.offsetWidth||1,r=Py(t.height)/e.offsetHeight||1;return n!==1||r!==1}function CPe(e,t,n){n===void 0&&(n=!1);var r=qs(t),o=qs(t)&&SPe(t),i=Af(t),a=Ty(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((_c(t)!=="body"||OF(i))&&(s=xPe(t)),qs(t)?(l=Ty(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=EF(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function PPe(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function TPe(e){var t=PPe(e);return NCe.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function EPe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function OPe(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var y3={placement:"bottom",modifiers:[],strategy:"absolute"};function v3(){for(var e=arguments.length,t=new Array(e),n=0;n{i||s(APe(o)||document.body)},[o,i]),wn(()=>{if(a&&!i)return WP(n,a),()=>{WP(n,null)}},[n,a,i]),i){if(y.isValidElement(r)){const c={ref:l};return y.cloneElement(r,c)}return r}return a&&hI.createPortal(r,a)});function $Pe(e){return Ne("MuiPopper",e)}Le("MuiPopper",["root"]);function RPe(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function q2(e){return typeof e=="function"?e():e}function _Pe(e){return e.nodeType!==void 0}const DPe=e=>{const{classes:t}=e;return Te({root:["root"]},$Pe,t)},NPe={},LPe=y.forwardRef(function(t,n){const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:f={},slots:p={},TransitionProps:m,ownerState:g,...v}=t,w=y.useRef(null),x=Wt(w,n),S=y.useRef(null),P=Wt(S,d),T=y.useRef(P);wn(()=>{T.current=P},[P]),y.useImperativeHandle(d,()=>S.current,[]);const E=RPe(c,i),[O,k]=y.useState(E),[A,I]=y.useState(q2(r));y.useEffect(()=>{S.current&&S.current.forceUpdate()}),y.useEffect(()=>{r&&I(q2(r))},[r]),wn(()=>{if(!A||!l)return;const _=B=>{k(B.placement)};let D=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:B})=>{_(B)}}];s!=null&&(D=D.concat(s)),u&&u.modifiers!=null&&(D=D.concat(u.modifiers));const H=MPe(A,w.current,{placement:E,...u,modifiers:D});return T.current(H),()=>{H.destroy(),T.current(null)}},[A,a,s,l,u,E]);const R={placement:O};m!==null&&(R.TransitionProps=m);const L=DPe(t),F=p.root??"div",z=on({elementType:F,externalSlotProps:f.root,externalForwardedProps:v,additionalProps:{role:"tooltip",ref:x},ownerState:t,className:L.root});return $.jsx(F,{...z,children:typeof o=="function"?o(R):o})}),FPe=y.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=NPe,popperRef:p,style:m,transition:g=!1,slotProps:v={},slots:w={},...x}=t,[S,P]=y.useState(!0),T=()=>{P(!1)},E=()=>{P(!0)};if(!l&&!u&&(!g||S))return null;let O;if(i)O=i;else if(r){const I=q2(r);O=I&&_Pe(I)?pr(I).body:pr(null).body}const k=!u&&l&&(!g||S)?"none":void 0,A=g?{in:u,onEnter:T,onExited:E}:void 0;return $.jsx(xJ,{disablePortal:s,container:O,children:$.jsx(LPe,{anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:g?!S:u,placement:d,popperOptions:f,popperRef:p,slotProps:v,slots:w,...x,style:{position:"fixed",top:0,left:0,display:k,...m},TransitionProps:A,children:o})})}),jPe=oe(FPe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),$f=y.forwardRef(function(t,n){const r=er(),o=at({props:t,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:m,popperOptions:g,popperRef:v,transition:w,slots:x,slotProps:S,...P}=o,T=(x==null?void 0:x.root)??(s==null?void 0:s.Root),E={anchorEl:i,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:m,popperOptions:g,popperRef:v,transition:w,...P};return $.jsx(jPe,{as:a,direction:r?"rtl":"ltr",slots:{root:T},slotProps:S??l,...E,ref:n})});function BPe(e){return Ne("MuiListSubheader",e)}Le("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const zPe=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e,a={root:["root",n!=="default"&&`color${Se(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]};return Te(a,BPe,t)},VPe=oe("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Se(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(rt(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),K2=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiListSubheader"}),{className:o,color:i="default",component:a="li",disableGutters:s=!1,disableSticky:l=!1,inset:c=!1,...u}=r,d={...r,color:i,component:a,disableGutters:s,disableSticky:l,inset:c},f=zPe(d);return $.jsx(VPe,{as:a,className:fe(f.root,o),ref:n,ownerState:d,...u})});K2&&(K2.muiSkipListHighlight=!0);const HPe=ut($.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function UPe(e){return Ne("MuiChip",e)}const Tn=Le("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),WPe=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e,c={root:["root",l,n&&"disabled",`size${Se(r)}`,`color${Se(o)}`,s&&"clickable",s&&`clickableColor${Se(o)}`,a&&"deletable",a&&`deletableColor${Se(o)}`,`${l}${Se(o)}`],label:["label",`label${Se(r)}`],avatar:["avatar",`avatar${Se(r)}`,`avatarColor${Se(o)}`],icon:["icon",`icon${Se(r)}`,`iconColor${Se(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Se(r)}`,`deleteIconColor${Se(o)}`,`deleteIcon${Se(l)}Color${Se(o)}`]};return Te(c,UPe,t)},GPe=oe("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${Tn.avatar}`]:t.avatar},{[`& .${Tn.avatar}`]:t[`avatar${Se(s)}`]},{[`& .${Tn.avatar}`]:t[`avatarColor${Se(r)}`]},{[`& .${Tn.icon}`]:t.icon},{[`& .${Tn.icon}`]:t[`icon${Se(s)}`]},{[`& .${Tn.icon}`]:t[`iconColor${Se(o)}`]},{[`& .${Tn.deleteIcon}`]:t.deleteIcon},{[`& .${Tn.deleteIcon}`]:t[`deleteIcon${Se(s)}`]},{[`& .${Tn.deleteIcon}`]:t[`deleteIconColor${Se(r)}`]},{[`& .${Tn.deleteIcon}`]:t[`deleteIcon${Se(l)}Color${Se(r)}`]},t.root,t[`size${Se(s)}`],t[`color${Se(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${Se(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${Se(r)}`],t[l],t[`${l}${Se(r)}`]]}})(rt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Tn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Tn.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Tn.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Tn.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Tn.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Tn.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Tn.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:vt(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:vt(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Tn.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Tn.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Bn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Tn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].contrastTextChannel} / 0.7)`:vt(e.palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${Tn.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Tn.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Tn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(Bn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Tn.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Tn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(Bn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Tn.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Tn.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Tn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Tn.avatar}`]:{marginLeft:4},[`& .${Tn.avatarSmall}`]:{marginLeft:2},[`& .${Tn.icon}`]:{marginLeft:4},[`& .${Tn.iconSmall}`]:{marginLeft:2},[`& .${Tn.deleteIcon}`]:{marginRight:5},[`& .${Tn.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Bn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:vt(e.palette[n].main,.7)}`,[`&.${Tn.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette[n].main,e.palette.action.hoverOpacity)},[`&.${Tn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.focusOpacity})`:vt(e.palette[n].main,e.palette.action.focusOpacity)},[`& .${Tn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:vt(e.palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),qPe=oe("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${Se(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function b3(e){return e.key==="Backspace"||e.key==="Delete"}const hh=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:s="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:f,onClick:p,onDelete:m,onKeyDown:g,onKeyUp:v,size:w="medium",variant:x="filled",tabIndex:S,skipFocusWhenDisabled:P=!1,...T}=r,E=y.useRef(null),O=Wt(E,n),k=V=>{V.stopPropagation(),m&&m(V)},A=V=>{V.currentTarget===V.target&&b3(V)&&V.preventDefault(),g&&g(V)},I=V=>{V.currentTarget===V.target&&m&&b3(V)&&m(V),v&&v(V)},R=a!==!1&&p?!0:a,L=R||m?Hi:l||"div",F={...r,component:L,disabled:u,size:w,color:s,iconColor:y.isValidElement(d)&&d.props.color||s,onDelete:!!m,clickable:R,variant:x},z=WPe(F),_=L===Hi?{component:l||"div",focusVisibleClassName:z.focusVisible,...m&&{disableRipple:!0}}:{};let D=null;m&&(D=c&&y.isValidElement(c)?y.cloneElement(c,{className:fe(c.props.className,z.deleteIcon),onClick:k}):$.jsx(HPe,{className:fe(z.deleteIcon),onClick:k}));let H=null;o&&y.isValidElement(o)&&(H=y.cloneElement(o,{className:fe(z.avatar,o.props.className)}));let B=null;return d&&y.isValidElement(d)&&(B=y.cloneElement(d,{className:fe(z.icon,d.props.className)})),$.jsxs(GPe,{as:L,className:fe(z.root,i),disabled:R&&u?!0:void 0,onClick:p,onKeyDown:A,onKeyUp:I,ref:O,tabIndex:P&&u?-1:S,ownerState:F,..._,...T,children:[H||B,$.jsx(qPe,{className:fe(z.label),ownerState:F,children:f}),D]})});function bC(e){return parseInt(e,10)||0}const KPe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function YPe(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const XPe=y.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:a,value:s,...l}=t,{current:c}=y.useRef(s!=null),u=y.useRef(null),d=Wt(n,u),f=y.useRef(null),p=y.useRef(null),m=y.useCallback(()=>{const w=u.current,S=ba(w).getComputedStyle(w);if(S.width==="0px")return{outerHeightStyle:0,overflowing:!1};const P=p.current;P.style.width=S.width,P.value=w.value||t.placeholder||"x",P.value.slice(-1)===` -`&&(P.value+=" ");const T=S.boxSizing,E=bC(S.paddingBottom)+bC(S.paddingTop),O=bC(S.borderBottomWidth)+bC(S.borderTopWidth),k=P.scrollHeight;P.value="x";const A=P.scrollHeight;let I=k;i&&(I=Math.max(Number(i)*A,I)),o&&(I=Math.min(Number(o)*A,I)),I=Math.max(I,A);const R=I+(T==="border-box"?E+O:0),L=Math.abs(I-k)<=1;return{outerHeightStyle:R,overflowing:L}},[o,i,t.placeholder]),g=y.useCallback(()=>{const w=m();if(YPe(w))return;const x=w.outerHeightStyle,S=u.current;f.current!==x&&(f.current=x,S.style.height=`${x}px`),S.style.overflow=w.overflowing?"hidden":""},[m]);wn(()=>{const w=()=>{g()};let x;const S=nS(w),P=u.current,T=ba(P);T.addEventListener("resize",S);let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(w),E.observe(P)),()=>{S.clear(),cancelAnimationFrame(x),T.removeEventListener("resize",S),E&&E.disconnect()}},[m,g]),wn(()=>{g()});const v=w=>{c||g(),r&&r(w)};return $.jsxs(y.Fragment,{children:[$.jsx("textarea",{value:s,onChange:v,ref:d,rows:i,style:a,...l}),$.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:{...KPe.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function Oy(e){return typeof e=="string"}function Rf({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const gI=y.createContext(void 0);function wa(){return y.useContext(gI)}function w3(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function ET(e,t=!1){return e&&(w3(e.value)&&e.value!==""||t&&w3(e.defaultValue)&&e.defaultValue!=="")}function QPe(e){return e.startAdornment}function JPe(e){return Ne("MuiInputBase",e)}const jo=Le("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var x3;const yI=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Se(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},vI=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},ZPe=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e,g={root:["root",`color${Se(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",f&&f!=="medium"&&`size${Se(f)}`,u&&"multiline",p&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",m==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]};return Te(g,JPe,t)},bI=oe("div",{name:"MuiInputBase",slot:"Root",overridesResolver:yI})(rt(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${jo.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),wI=oe("input",{name:"MuiInputBase",slot:"Input",overridesResolver:vI})(rt(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${jo.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${jo.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),S3=Xwe({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),Sv=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:s,color:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:p,endAdornment:m,error:g,fullWidth:v=!1,id:w,inputComponent:x="input",inputProps:S={},inputRef:P,margin:T,maxRows:E,minRows:O,multiline:k=!1,name:A,onBlur:I,onChange:R,onClick:L,onFocus:F,onKeyDown:z,onKeyUp:_,placeholder:D,readOnly:H,renderSuffix:B,rows:V,size:W,slotProps:G={},slots:Q={},startAdornment:Y,type:ne="text",value:ie,...re}=r,pe=S.value!=null?S.value:ie,{current:le}=y.useRef(pe!=null),ee=y.useRef(),ce=y.useCallback(tt=>{},[]),se=Wt(ee,P,S.ref,ce),[Z,ue]=y.useState(!1),ge=wa(),we=Rf({props:r,muiFormControl:ge,states:["color","disabled","error","hiddenLabel","size","required","filled"]});we.focused=ge?ge.focused:Z,y.useEffect(()=>{!ge&&f&&Z&&(ue(!1),I&&I())},[ge,f,Z,I]);const me=ge&&ge.onFilled,be=ge&&ge.onEmpty,xe=y.useCallback(tt=>{ET(tt)?me&&me():be&&be()},[me,be]);wn(()=>{le&&xe({value:pe})},[pe,xe,le]);const Ee=tt=>{F&&F(tt),S.onFocus&&S.onFocus(tt),ge&&ge.onFocus?ge.onFocus(tt):ue(!0)},Me=tt=>{I&&I(tt),S.onBlur&&S.onBlur(tt),ge&&ge.onBlur?ge.onBlur(tt):ue(!1)},_e=(tt,...pt)=>{if(!le){const qt=tt.target||ee.current;if(qt==null)throw new Error($u(1));xe({value:qt.value})}S.onChange&&S.onChange(tt,...pt),R&&R(tt,...pt)};y.useEffect(()=>{xe(ee.current)},[]);const de=tt=>{ee.current&&tt.currentTarget===tt.target&&ee.current.focus(),L&&L(tt)};let Ae=x,Oe=S;k&&Ae==="input"&&(V?Oe={type:void 0,minRows:V,maxRows:V,...Oe}:Oe={type:void 0,maxRows:E,minRows:O,...Oe},Ae=XPe);const $e=tt=>{xe(tt.animationName==="mui-auto-fill-cancel"?ee.current:{value:"x"})};y.useEffect(()=>{ge&&ge.setAdornedStart(!!Y)},[ge,Y]);const Be={...r,color:we.color||"primary",disabled:we.disabled,endAdornment:m,error:we.error,focused:we.focused,formControl:ge,fullWidth:v,hiddenLabel:we.hiddenLabel,multiline:k,size:we.size,startAdornment:Y,type:ne},Je=ZPe(Be),ot=Q.root||c.Root||bI,lt=G.root||u.root||{},it=Q.input||c.Input||wI;return Oe={...Oe,...G.input??u.input},$.jsxs(y.Fragment,{children:[!p&&typeof S3=="function"&&(x3||(x3=$.jsx(S3,{}))),$.jsxs(ot,{...lt,ref:n,onClick:de,...re,...!Oy(ot)&&{ownerState:{...Be,...lt.ownerState}},className:fe(Je.root,lt.className,s,H&&"MuiInputBase-readOnly"),children:[Y,$.jsx(gI.Provider,{value:null,children:$.jsx(it,{"aria-invalid":we.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:d,disabled:we.disabled,id:w,onAnimationStart:$e,name:A,placeholder:D,readOnly:H,required:we.required,rows:V,value:pe,onKeyDown:z,onKeyUp:_,type:ne,...Oe,...!Oy(it)&&{as:Ae,ownerState:{...Be,...Oe.ownerState}},ref:se,className:fe(Je.input,Oe.className,H&&"MuiInputBase-readOnly"),onBlur:Me,onChange:_e,onFocus:Ee})}),m,B?B({...we,startAdornment:Y}):null]})]})});function eTe(e){return Ne("MuiInput",e)}const _d={...jo,...Le("MuiInput",["root","underline","input"])};function tTe(e){return Ne("MuiOutlinedInput",e)}const Ts={...jo,...Le("MuiOutlinedInput",["root","notchedOutline","input"])};function nTe(e){return Ne("MuiFilledInput",e)}const La={...jo,...Le("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},SJ=ut($.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function rTe(e){return Ne("MuiAutocomplete",e)}const pn=Le("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var C3,P3;const oTe=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:c,size:u}=e,d={root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${Se(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Te(d,rTe,t)},iTe=oe("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${pn.tag}`]:t.tag},{[`& .${pn.tag}`]:t[`tagSize${Se(s)}`]},{[`& .${pn.inputRoot}`]:t.inputRoot},{[`& .${pn.input}`]:t.input},{[`& .${pn.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${pn.focused} .${pn.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${pn.clearIndicator}`]:{visibility:"visible"}},[`& .${pn.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${pn.inputRoot}`]:{[`.${pn.hasPopupIcon}&, .${pn.hasClearIcon}&`]:{paddingRight:30},[`.${pn.hasPopupIcon}.${pn.hasClearIcon}&`]:{paddingRight:56},[`& .${pn.input}`]:{width:0,minWidth:30}},[`& .${_d.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${_d.root}.${jo.sizeSmall}`]:{[`& .${_d.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Ts.root}`]:{padding:9,[`.${pn.hasPopupIcon}&, .${pn.hasClearIcon}&`]:{paddingRight:39},[`.${pn.hasPopupIcon}.${pn.hasClearIcon}&`]:{paddingRight:65},[`& .${pn.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${pn.endAdornment}`]:{right:9}},[`& .${Ts.root}.${jo.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${pn.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${La.root}`]:{paddingTop:19,paddingLeft:8,[`.${pn.hasPopupIcon}&, .${pn.hasClearIcon}&`]:{paddingRight:39},[`.${pn.hasPopupIcon}.${pn.hasClearIcon}&`]:{paddingRight:65},[`& .${La.input}`]:{padding:"7px 4px"},[`& .${pn.endAdornment}`]:{right:9}},[`& .${La.root}.${jo.sizeSmall}`]:{paddingBottom:1,[`& .${La.input}`]:{padding:"2.5px 4px"}},[`& .${jo.hiddenLabel}`]:{paddingTop:8},[`& .${La.root}.${jo.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${pn.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${La.root}.${jo.hiddenLabel}.${jo.sizeSmall}`]:{[`& .${pn.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${pn.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${pn.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${pn.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${pn.inputRoot}`]:{flexWrap:"wrap"}}}]}),aTe=oe("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),sTe=oe(kn,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),lTe=oe(kn,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>({...t.popupIndicator,...e.popupOpen&&t.popupIndicatorOpen})})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),cTe=oe($f,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${pn.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(rt(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),uTe=oe(io,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(rt(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),dTe=oe("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),fTe=oe("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),pTe=oe("ul",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(rt(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${pn.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${pn.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${pn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${pn.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${pn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),hTe=oe(K2,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(rt(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),mTe=oe("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${pn.option}`]:{paddingLeft:24}}),Yl=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiAutocomplete"}),{autoComplete:o=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:s=!1,ChipProps:l,className:c,clearIcon:u=C3||(C3=$.jsx(uJ,{fontSize:"small"})),clearOnBlur:d=!r.freeSolo,clearOnEscape:f=!1,clearText:p="Clear",closeText:m="Close",componentsProps:g,defaultValue:v=r.multiple?[]:null,disableClearable:w=!1,disableCloseOnSelect:x=!1,disabled:S=!1,disabledItemsFocusable:P=!1,disableListWrap:T=!1,disablePortal:E=!1,filterOptions:O,filterSelectedOptions:k=!1,forcePopupIcon:A="auto",freeSolo:I=!1,fullWidth:R=!1,getLimitTagsText:L=On=>`+${On}`,getOptionDisabled:F,getOptionKey:z,getOptionLabel:_,isOptionEqualToValue:D,groupBy:H,handleHomeEndKeys:B=!r.freeSolo,id:V,includeInputInList:W=!1,inputValue:G,limitTags:Q=-1,ListboxComponent:Y,ListboxProps:ne,loading:ie=!1,loadingText:re="Loading…",multiple:pe=!1,noOptionsText:le="No options",onChange:ee,onClose:ce,onHighlightChange:se,onInputChange:Z,onOpen:ue,open:ge,openOnFocus:we=!1,openText:me="Open",options:be,PaperComponent:xe,PopperComponent:Ee,popupIcon:Me=P3||(P3=$.jsx(SJ,{})),readOnly:_e=!1,renderGroup:de,renderInput:Ae,renderOption:Oe,renderTags:$e,selectOnFocus:Be=!r.freeSolo,size:Je="medium",slots:ot={},slotProps:lt={},value:it,...tt}=r,{getRootProps:pt,getInputProps:qt,getInputLabelProps:qe,getPopupIndicatorProps:Re,getClearProps:Ze,getTagProps:Pt,getListboxProps:_t,getOptionProps:kt,value:yn,dirty:Fn,expanded:Vn,id:wo,popupOpen:xo,focused:oi,focusedTag:Xi,anchorEl:zt,setAnchorEl:Wo,inputValue:Gc,groupedOptions:ad}=PCe({...r,componentName:"Autocomplete"}),qc=!w&&!S&&Fn&&!_e,Kf=(!I||A===!0)&&A!==!1,{onMouseDown:Yf}=qt(),{ref:mb,...rm}=_t(),Xf=_||(On=>On.label??On),$o={...r,disablePortal:E,expanded:Vn,focused:oi,fullWidth:R,getOptionLabel:Xf,hasClearIcon:qc,hasPopupIcon:Kf,inputFocused:Xi===-1,popupOpen:xo,size:Je},Hr=oTe($o),ml={slots:{paper:xe,popper:Ee,...ot},slotProps:{chip:l,listbox:ne,...g,...lt}},[Ke,Fe]=Kn("listbox",{elementType:pTe,externalForwardedProps:ml,ownerState:$o,className:Hr.listbox,additionalProps:rm,ref:mb}),[wt,Zt]=Kn("paper",{elementType:io,externalForwardedProps:ml,ownerState:$o,className:Hr.paper}),[sn,kr]=Kn("popper",{elementType:$f,externalForwardedProps:ml,ownerState:$o,className:Hr.popper,additionalProps:{disablePortal:E,style:{width:zt?zt.clientWidth:null},role:"presentation",anchorEl:zt,open:xo}});let Hn;if(pe&&yn.length>0){const On=cs=>({className:Hr.tag,disabled:S,...Pt(cs)});$e?Hn=$e(yn,On,$o):Hn=yn.map((cs,rc)=>{const{key:Jf,...sM}=On({index:rc});return $.jsx(hh,{label:Xf(cs),size:Je,...sM,...ml.slotProps.chip},Jf)})}if(Q>-1&&Array.isArray(Hn)){const On=Hn.length-Q;!oi&&On>0&&(Hn=Hn.splice(0,Q),Hn.push($.jsx("span",{className:Hr.tag,children:L(On)},Hn.length)))}const Kc=de||(On=>$.jsxs("li",{children:[$.jsx(hTe,{className:Hr.groupLabel,ownerState:$o,component:"div",children:On.group}),$.jsx(mTe,{className:Hr.groupUl,ownerState:$o,children:On.children})]},On.key)),om=Oe||((On,cs)=>{const{key:rc,...Jf}=On;return $.jsx("li",{...Jf,children:Xf(cs)},rc)}),a1=(On,cs)=>{const rc=kt({option:On,index:cs});return om({...rc,className:Hr.option},On,{selected:rc["aria-selected"],index:cs,inputValue:Gc},$o)},im=ml.slotProps.clearIndicator,am=ml.slotProps.popupIndicator,sm=On=>$.jsx(cTe,{as:sn,...kr,children:$.jsx(uTe,{as:wt,...Zt,children:On})});let Qf=null;return ad.length>0?Qf=sm($.jsx(Ke,{as:Y,...Fe,children:ad.map((On,cs)=>H?Kc({key:On.key,group:On.group,children:On.options.map((rc,Jf)=>a1(rc,On.index+Jf))}):a1(On,cs))})):ie&&ad.length===0?Qf=sm($.jsx(dTe,{className:Hr.loading,ownerState:$o,children:re})):ad.length===0&&!I&&!ie&&(Qf=sm($.jsx(fTe,{className:Hr.noOptions,ownerState:$o,role:"presentation",onMouseDown:On=>{On.preventDefault()},children:le}))),$.jsxs(y.Fragment,{children:[$.jsx(iTe,{ref:n,className:fe(Hr.root,c),ownerState:$o,...pt(tt),children:Ae({id:wo,disabled:S,fullWidth:!0,size:Je==="small"?"small":void 0,InputLabelProps:qe(),InputProps:{ref:Wo,className:Hr.inputRoot,startAdornment:Hn,onMouseDown:On=>{On.target===On.currentTarget&&Yf(On)},...(qc||Kf)&&{endAdornment:$.jsxs(aTe,{className:Hr.endAdornment,ownerState:$o,children:[qc?$.jsx(sTe,{...Ze(),"aria-label":p,title:p,ownerState:$o,...im,className:fe(Hr.clearIndicator,im==null?void 0:im.className),children:u}):null,Kf?$.jsx(lTe,{...Re(),disabled:S,"aria-label":xo?m:me,title:xo?m:me,ownerState:$o,...am,className:fe(Hr.popupIndicator,am==null?void 0:am.className),children:Me}):null]})}},inputProps:{className:Hr.input,disabled:S,readOnly:_e,...qt()}})}),zt?Qf:null]})}),gTe=ut($.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function yTe(e){return Ne("MuiAvatar",e)}const vTe=Le("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]),bTe=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Te({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},yTe,t)},wTe=oe("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(rt(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),xTe=oe("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),STe=oe(gTe,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function CTe({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,i]=y.useState(!1);return y.useEffect(()=>{if(!n&&!r)return;i(!1);let a=!0;const s=new Image;return s.onload=()=>{a&&i("loaded")},s.onerror=()=>{a&&i("error")},s.crossOrigin=e,s.referrerPolicy=t,s.src=n,r&&(s.srcset=r),()=>{a=!1}},[e,t,n,r]),o}const Xl=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiAvatar"}),{alt:o,children:i,className:a,component:s="div",slots:l={},slotProps:c={},imgProps:u,sizes:d,src:f,srcSet:p,variant:m="circular",...g}=r;let v=null;const w={...r,component:s,variant:m},x=CTe({...u,...typeof c.img=="function"?c.img(w):c.img,src:f,srcSet:p}),S=f||p,P=S&&x!=="error";w.colorDefault=!P,delete w.ownerState;const T=bTe(w),[E,O]=Kn("img",{className:T.img,elementType:xTe,externalForwardedProps:{slots:l,slotProps:{img:{...u,...c.img}}},additionalProps:{alt:o,src:f,srcSet:p,sizes:d},ownerState:w});return P?v=$.jsx(E,{...O}):i||i===0?v=i:S&&o?v=o[0]:v=$.jsx(STe,{ownerState:w,className:T.fallback}),$.jsx(wTe,{as:s,className:fe(T.root,a),ref:n,...g,ownerState:w,children:v})});function PTe(e){return Ne("MuiAvatarGroup",e)}const TTe=Le("MuiAvatarGroup",["root","avatar"]),T3={small:-16,medium:-8},ETe=e=>{const{classes:t}=e;return Te({root:["root"],avatar:["avatar"]},PTe,t)},OTe=oe("div",{name:"MuiAvatarGroup",slot:"Root",overridesResolver:(e,t)=>({[`& .${TTe.avatar}`]:t.avatar,...t.root})})(rt(({theme:e})=>({display:"flex",flexDirection:"row-reverse",[`& .${vTe.root}`]:{border:`2px solid ${(e.vars||e).palette.background.default}`,boxSizing:"content-box",marginLeft:"var(--AvatarGroup-spacing, -8px)","&:last-child":{marginLeft:0}}}))),ITe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiAvatarGroup"}),{children:o,className:i,component:a="div",componentsProps:s,max:l=5,renderSurplus:c,slotProps:u={},slots:d={},spacing:f="medium",total:p,variant:m="circular",...g}=r;let v=l<2?2:l;const w={...r,max:l,spacing:f,component:a,variant:m},x=ETe(w),S=y.Children.toArray(o).filter(L=>y.isValidElement(L)),P=p||S.length;P===v&&(v+=1),v=Math.min(P+1,v);const T=Math.min(S.length,v-1),E=Math.max(P-v,P-T,0),O=c?c(E):`+${E}`,k=w.spacing&&T3[w.spacing]!==void 0?T3[w.spacing]:-w.spacing||-8,A={slots:d,slotProps:{surplus:u.additionalAvatar??(s==null?void 0:s.additionalAvatar),...s,...u}},[I,R]=Kn("surplus",{elementType:Xl,externalForwardedProps:A,className:x.avatar,ownerState:w,additionalProps:{variant:m}});return $.jsxs(OTe,{as:a,ownerState:w,className:fe(x.root,i),ref:n,...g,style:{"--AvatarGroup-spacing":k?`${k}px`:void 0,...g.style},children:[E?$.jsx(I,{...R,children:O}):null,S.slice(0,T).reverse().map(L=>y.cloneElement(L,{className:fe(L.props.className,x.avatar),variant:L.props.variant||m}))]})}),kTe={entering:{opacity:1},entered:{opacity:1}},Cv=y.forwardRef(function(t,n){const r=ko(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:g,style:v,timeout:w=o,TransitionComponent:x=is,...S}=t,P=y.useRef(null),T=Wt(P,Ef(s),n),E=z=>_=>{if(z){const D=P.current;_===void 0?z(D):z(D,_)}},O=E(f),k=E((z,_)=>{yF(z);const D=vf({style:v,timeout:w,easing:l},{mode:"enter"});z.style.webkitTransition=r.transitions.create("opacity",D),z.style.transition=r.transitions.create("opacity",D),u&&u(z,_)}),A=E(d),I=E(g),R=E(z=>{const _=vf({style:v,timeout:w,easing:l},{mode:"exit"});z.style.webkitTransition=r.transitions.create("opacity",_),z.style.transition=r.transitions.create("opacity",_),p&&p(z)}),L=E(m),F=z=>{i&&i(P.current,z)};return $.jsx(x,{appear:a,in:c,nodeRef:P,onEnter:k,onEntered:A,onEntering:O,onExit:R,onExited:L,onExiting:I,addEndListener:F,timeout:w,...S,children:(z,_)=>y.cloneElement(s,{style:{opacity:0,visibility:z==="exited"&&!c?"hidden":void 0,...kTe[z],...v,...s.props.style},ref:T,..._})})});function MTe(e){return Ne("MuiBackdrop",e)}Le("MuiBackdrop",["root","invisible"]);const ATe=e=>{const{ownerState:t,...n}=e;return n},$Te=e=>{const{classes:t,invisible:n}=e;return Te({root:["root",n&&"invisible"]},MTe,t)},RTe=oe("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),CJ=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiBackdrop"}),{children:o,className:i,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:d={},slots:f={},TransitionComponent:p,transitionDuration:m,...g}=r,v={...r,component:a,invisible:s},w=$Te(v),x={transition:p,root:c.Root,...f},S={...u,...d},P={slots:x,slotProps:S},[T,E]=Kn("root",{elementType:RTe,externalForwardedProps:P,className:fe(w.root,i),ownerState:v}),[O,k]=Kn("transition",{elementType:Cv,externalForwardedProps:P,ownerState:v}),A=ATe(k);return $.jsx(O,{in:l,timeout:m,...g,...A,children:$.jsx(T,{"aria-hidden":!0,...E,classes:w,ref:n,children:o})})});function _Te(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=yL({badgeContent:t,max:r});let a=n;n===!1&&t===0&&!o&&(a=!0);const{badgeContent:s,max:l=r}=a?i:e,c=s&&Number(s)>l?`${l}+`:s;return{badgeContent:s,invisible:a,max:l,displayValue:c}}function DTe(e){return Ne("MuiBadge",e)}const yd=Le("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),JA=10,ZA=4,NTe=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Se(n.vertical)}${Se(n.horizontal)}`,`anchorOrigin${Se(n.vertical)}${Se(n.horizontal)}${Se(o)}`,`overlap${Se(o)}`,t!=="default"&&`color${Se(t)}`]};return Te(s,DTe,a)},LTe=oe("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),FTe=oe("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Se(n.anchorOrigin.vertical)}${Se(n.anchorOrigin.horizontal)}${Se(n.overlap)}`],n.color!=="default"&&t[`color${Se(n.color)}`],n.invisible&&t.invisible]}})(rt(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:JA*2,lineHeight:1,padding:"0 6px",height:JA*2,borderRadius:JA,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(Bn(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:ZA,height:ZA*2,minWidth:ZA*2,padding:0}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function E3(e){return{vertical:(e==null?void 0:e.vertical)??"top",horizontal:(e==null?void 0:e.horizontal)??"right"}}const jTe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiBadge"}),{anchorOrigin:o,className:i,classes:a,component:s,components:l={},componentsProps:c={},children:u,overlap:d="rectangular",color:f="default",invisible:p=!1,max:m=99,badgeContent:g,slots:v,slotProps:w,showZero:x=!1,variant:S="standard",...P}=r,{badgeContent:T,invisible:E,max:O,displayValue:k}=_Te({max:m,invisible:p,badgeContent:g,showZero:x}),A=yL({anchorOrigin:E3(o),color:f,overlap:d,variant:S,badgeContent:g}),I=E||T==null&&S!=="dot",{color:R=f,overlap:L=d,anchorOrigin:F,variant:z=S}=I?A:r,_=E3(F),D=z!=="dot"?k:void 0,H={...r,badgeContent:T,invisible:I,max:O,displayValue:D,showZero:x,anchorOrigin:_,color:R,overlap:L,variant:z},B=NTe(H),V=(v==null?void 0:v.root)??l.Root??LTe,W=(v==null?void 0:v.badge)??l.Badge??FTe,G=(w==null?void 0:w.root)??c.root,Q=(w==null?void 0:w.badge)??c.badge,Y=on({elementType:V,externalSlotProps:G,externalForwardedProps:P,additionalProps:{ref:n,as:s},ownerState:H,className:fe(G==null?void 0:G.className,B.root,i)}),ne=on({elementType:W,externalSlotProps:Q,ownerState:H,className:fe(B.badge,Q==null?void 0:Q.className)});return $.jsxs(V,{...Y,children:[u,$.jsx(W,{...ne,children:D})]})}),BTe=Le("MuiBox",["root"]),zTe=rS(),$n=Sbe({themeId:Us,defaultTheme:zTe,defaultClassName:BTe.root,generateClassName:vY.generate});function VTe(e){return Ne("MuiButton",e)}const km=Le("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),PJ=y.createContext({}),TJ=y.createContext(void 0),HTe=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e,s={root:["root",i,`${i}${Se(t)}`,`size${Se(o)}`,`${i}Size${Se(o)}`,`color${Se(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${Se(o)}`],endIcon:["icon","endIcon",`iconSize${Se(o)}`]},l=Te(s,VTe,a);return{...a,...l}},EJ=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],UTe=oe(Hi,{shouldForwardProp:e=>ri(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Se(n.color)}`],t[`size${Se(n.size)}`],t[`${n.variant}Size${Se(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(rt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${km.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${km.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${km.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${km.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(Bn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[r].mainChannel} / 0.5)`:vt(e.palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette[r].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette[r].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${km.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${km.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}}]}})),WTe=oe("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Se(n.size)}`]]}})({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},...EJ]}),GTe=oe("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Se(n.size)}`]]}})({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},...EJ]}),yt=y.forwardRef(function(t,n){const r=y.useContext(PJ),o=y.useContext(TJ),i=ih(r,t),a=at({props:i,name:"MuiButton"}),{children:s,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:f=!1,disableFocusRipple:p=!1,endIcon:m,focusVisibleClassName:g,fullWidth:v=!1,size:w="medium",startIcon:x,type:S,variant:P="text",...T}=a,E={...a,color:l,component:c,disabled:d,disableElevation:f,disableFocusRipple:p,fullWidth:v,size:w,type:S,variant:P},O=HTe(E),k=x&&$.jsx(WTe,{className:O.startIcon,ownerState:E,children:x}),A=m&&$.jsx(GTe,{className:O.endIcon,ownerState:E,children:m}),I=o||"";return $.jsxs(UTe,{ownerState:E,className:fe(r.className,O.root,u,I),component:c,disabled:d,focusRipple:!p,focusVisibleClassName:fe(O.focusVisible,g),ref:n,type:S,...T,classes:O,children:[k,s,A]})});function qTe(e){return Ne("MuiButtonGroup",e)}const cn=Le("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),KTe=(e,t)=>{const{ownerState:n}=e;return[{[`& .${cn.grouped}`]:t.grouped},{[`& .${cn.grouped}`]:t[`grouped${Se(n.orientation)}`]},{[`& .${cn.grouped}`]:t[`grouped${Se(n.variant)}`]},{[`& .${cn.grouped}`]:t[`grouped${Se(n.variant)}${Se(n.orientation)}`]},{[`& .${cn.grouped}`]:t[`grouped${Se(n.variant)}${Se(n.color)}`]},{[`& .${cn.firstButton}`]:t.firstButton},{[`& .${cn.lastButton}`]:t.lastButton},{[`& .${cn.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},YTe=e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:i,orientation:a,variant:s}=e,l={root:["root",s,a,i&&"fullWidth",o&&"disableElevation",`color${Se(n)}`],grouped:["grouped",`grouped${Se(a)}`,`grouped${Se(s)}`,`grouped${Se(s)}${Se(a)}`,`grouped${Se(s)}${Se(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Te(l,qTe,t)},XTe=oe("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:KTe})(rt(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${cn.lastButton},& .${cn.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${cn.lastButton},& .${cn.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${cn.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${cn.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(Bn()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:vt(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${cn.lastButton},& .${cn.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${cn.lastButton},& .${cn.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${cn.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${cn.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(Bn(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${cn.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),QTe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiButtonGroup"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:d=!1,fullWidth:f=!1,orientation:p="horizontal",size:m="medium",variant:g="outlined",...v}=r,w={...r,color:a,component:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,orientation:p,size:m,variant:g},x=YTe(w),S=y.useMemo(()=>({className:x.grouped,color:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,size:m,variant:g}),[a,l,c,u,d,f,m,g,x.grouped]),P=MY(o),T=P.length,E=O=>{const k=O===0,A=O===T-1;return k&&A?"":k?x.firstButton:A?x.lastButton:x.middleButton};return $.jsx(XTe,{as:s,role:"group",className:fe(x.root,i),ref:n,ownerState:w,...v,children:$.jsx(PJ.Provider,{value:S,children:P.map((O,k)=>$.jsx(TJ.Provider,{value:E(k),children:O},k))})})});function JTe(e){return Ne("MuiCard",e)}Le("MuiCard",["root"]);const ZTe=e=>{const{classes:t}=e;return Te({root:["root"]},JTe,t)},eEe=oe(io,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),no=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiCard"}),{className:o,raised:i=!1,...a}=r,s={...r,raised:i},l=ZTe(s);return $.jsx(eEe,{className:fe(l.root,o),elevation:i?8:void 0,ref:n,ownerState:s,...a})});function tEe(e){return Ne("MuiCardActionArea",e)}const e$=Le("MuiCardActionArea",["root","focusVisible","focusHighlight"]),nEe=e=>{const{classes:t}=e;return Te({root:["root"],focusHighlight:["focusHighlight"]},tEe,t)},rEe=oe(Hi,{name:"MuiCardActionArea",slot:"Root",overridesResolver:(e,t)=>t.root})(rt(({theme:e})=>({display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${e$.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${e$.focusVisible} .${e$.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}}))),oEe=oe("span",{name:"MuiCardActionArea",slot:"FocusHighlight",overridesResolver:(e,t)=>t.focusHighlight})(rt(({theme:e})=>({overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}))),iEe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardActionArea"}),{children:o,className:i,focusVisibleClassName:a,...s}=r,l=r,c=nEe(l);return $.jsxs(rEe,{className:fe(c.root,i),focusVisibleClassName:fe(a,c.focusVisible),ref:n,ownerState:l,...s,children:[o,$.jsx(oEe,{className:c.focusHighlight,ownerState:l})]})});function aEe(e){return Ne("MuiCardActions",e)}Le("MuiCardActions",["root","spacing"]);const sEe=e=>{const{classes:t,disableSpacing:n}=e;return Te({root:["root",!n&&"spacing"]},aEe,t)},lEe=oe("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),as=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardActions"}),{disableSpacing:o=!1,className:i,...a}=r,s={...r,disableSpacing:o},l=sEe(s);return $.jsx(lEe,{className:fe(l.root,i),ownerState:s,ref:n,...a})});function cEe(e){return Ne("MuiCardContent",e)}Le("MuiCardContent",["root"]);const uEe=e=>{const{classes:t}=e;return Te({root:["root"]},cEe,t)},dEe=oe("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),bi=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardContent"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=uEe(s);return $.jsx(dEe,{as:i,className:fe(l.root,o),ownerState:s,ref:n,...a})});function fEe(e){return Ne("MuiCardHeader",e)}const OT=Le("MuiCardHeader",["root","avatar","action","content","title","subheader"]),pEe=e=>{const{classes:t}=e;return Te({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},fEe,t)},hEe=oe("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>({[`& .${OT.title}`]:t.title,[`& .${OT.subheader}`]:t.subheader,...t.root})})({display:"flex",alignItems:"center",padding:16}),mEe=oe("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),gEe=oe("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),yEe=oe("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto",[`.${CT.root}:where(& .${OT.title})`]:{display:"block"},[`.${CT.root}:where(& .${OT.subheader})`]:{display:"block"}}),ec=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardHeader"}),{action:o,avatar:i,className:a,component:s="div",disableTypography:l=!1,subheader:c,subheaderTypographyProps:u,title:d,titleTypographyProps:f,...p}=r,m={...r,component:s,disableTypography:l},g=pEe(m);let v=d;v!=null&&v.type!==dt&&!l&&(v=$.jsx(dt,{variant:i?"body2":"h5",className:g.title,component:"span",...f,children:v}));let w=c;return w!=null&&w.type!==dt&&!l&&(w=$.jsx(dt,{variant:i?"body2":"body1",className:g.subheader,color:"textSecondary",component:"span",...u,children:w})),$.jsxs(hEe,{className:fe(g.root,a),as:s,ref:n,ownerState:m,...p,children:[i&&$.jsx(mEe,{className:g.avatar,ownerState:m,children:i}),$.jsxs(yEe,{className:g.content,ownerState:m,children:[v,w]}),o&&$.jsx(gEe,{className:g.action,ownerState:m,children:o})]})});function vEe(e){return Ne("MuiCardMedia",e)}Le("MuiCardMedia",["root","media","img"]);const bEe=e=>{const{classes:t,isMediaComponent:n,isImageComponent:r}=e;return Te({root:["root",n&&"media",r&&"img"]},vEe,t)},wEe=oe("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{isMediaComponent:r,isImageComponent:o}=n;return[t.root,r&&t.media,o&&t.img]}})({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",variants:[{props:{isMediaComponent:!0},style:{width:"100%"}},{props:{isImageComponent:!0},style:{objectFit:"cover"}}]}),xEe=["video","audio","picture","iframe","img"],SEe=["picture","img"],Dc=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiCardMedia"}),{children:o,className:i,component:a="div",image:s,src:l,style:c,...u}=r,d=xEe.includes(a),f=!d&&s?{backgroundImage:`url("${s}")`,...c}:c,p={...r,component:a,isMediaComponent:d,isImageComponent:SEe.includes(a)},m=bEe(p);return $.jsx(wEe,{className:fe(m.root,i),as:a,role:!d&&s?"img":void 0,ref:n,style:f,ownerState:p,src:d?s||l:void 0,...u,children:o})});function CEe(e){return Ne("PrivateSwitchBase",e)}Le("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const PEe=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${Se(o)}`],input:["input"]};return Te(i,CEe,t)},TEe=oe(Hi)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),EEe=oe("input",{shouldForwardProp:ri})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),OJ=y.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,className:a,defaultChecked:s,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:d,id:f,inputProps:p,inputRef:m,name:g,onBlur:v,onChange:w,onFocus:x,readOnly:S,required:P=!1,tabIndex:T,type:E,value:O,...k}=t,[A,I]=vi({controlled:o,default:!!s,name:"SwitchBase",state:"checked"}),R=wa(),L=V=>{x&&x(V),R&&R.onFocus&&R.onFocus(V)},F=V=>{v&&v(V),R&&R.onBlur&&R.onBlur(V)},z=V=>{if(V.nativeEvent.defaultPrevented)return;const W=V.target.checked;I(W),w&&w(V,W)};let _=l;R&&typeof _>"u"&&(_=R.disabled);const D=E==="checkbox"||E==="radio",H={...t,checked:A,disabled:_,disableFocusRipple:c,edge:u},B=PEe(H);return $.jsxs(TEe,{component:"span",className:fe(B.root,a),centerRipple:!0,focusRipple:!c,disabled:_,tabIndex:null,role:void 0,onFocus:L,onBlur:F,ownerState:H,ref:n,...k,children:[$.jsx(EEe,{autoFocus:r,checked:o,defaultChecked:s,className:B.input,disabled:_,id:D?f:void 0,name:g,onChange:z,readOnly:S,ref:m,required:P,ownerState:H,tabIndex:T,type:E,...E==="checkbox"&&O===void 0?{}:{value:O},...p}),A?i:d]})}),OEe=ut($.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),IEe=ut($.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),kEe=ut($.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function MEe(e){return Ne("MuiCheckbox",e)}const t$=Le("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),AEe=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${Se(r)}`,`size${Se(o)}`]},a=Te(i,MEe,t);return{...t,...a}},$Ee=oe(OJ,{shouldForwardProp:e=>ri(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Se(n.size)}`],n.color!=="default"&&t[`color${Se(n.color)}`]]}})(rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{[`&.${t$.checked}, &.${t$.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${t$.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),REe=$.jsx(IEe,{}),_Ee=$.jsx(OEe,{}),DEe=$.jsx(kEe,{}),NEe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiCheckbox"}),{checkedIcon:o=REe,color:i="primary",icon:a=_Ee,indeterminate:s=!1,indeterminateIcon:l=DEe,inputProps:c,size:u="medium",disableRipple:d=!1,className:f,...p}=r,m=s?l:a,g=s?l:o,v={...r,disableRipple:d,color:i,indeterminate:s,size:u},w=AEe(v);return $.jsx($Ee,{type:"checkbox",inputProps:{"data-indeterminate":s,...c},icon:y.cloneElement(m,{fontSize:m.props.fontSize??u}),checkedIcon:y.cloneElement(g,{fontSize:g.props.fontSize??u}),ownerState:v,ref:n,className:fe(w.root,f),disableRipple:d,...p,classes:w})});function LEe(e){return Ne("MuiCircularProgress",e)}Le("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const vd=44,Y2=jc` +`,D1e=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=r,[l,c]=v.useState([]),u=v.useRef(0),d=v.useRef(null);v.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=v.useRef(!1),p=la(),m=v.useRef(null),g=v.useRef(null),y=v.useCallback(P=>{const{pulsate:E,rippleX:T,rippleY:O,rippleSize:k,cb:M}=P;c(I=>[...I,$.jsx(R1e,{classes:{ripple:pe(i.ripple,As.ripple),rippleVisible:pe(i.rippleVisible,As.rippleVisible),ripplePulsate:pe(i.ripplePulsate,As.ripplePulsate),child:pe(i.child,As.child),childLeaving:pe(i.childLeaving,As.childLeaving),childPulsate:pe(i.childPulsate,As.childPulsate)},timeout:V2,pulsate:E,rippleX:T,rippleY:O,rippleSize:k},u.current)]),u.current+=1,d.current=M},[i]),b=v.useCallback((P={},E={},T=()=>{})=>{const{pulsate:O=!1,center:k=o||E.pulsate,fakeElement:M=!1}=E;if((P==null?void 0:P.type)==="mousedown"&&f.current){f.current=!1;return}(P==null?void 0:P.type)==="touchstart"&&(f.current=!0);const I=M?null:g.current,R=I?I.getBoundingClientRect():{width:0,height:0,left:0,top:0};let _,N,B;if(k||P===void 0||P.clientX===0&&P.clientY===0||!P.clientX&&!P.touches)_=Math.round(R.width/2),N=Math.round(R.height/2);else{const{clientX:L,clientY:F}=P.touches&&P.touches.length>0?P.touches[0]:P;_=Math.round(L-R.left),N=Math.round(F-R.top)}if(k)B=Math.sqrt((2*R.width**2+R.height**2)/3),B%2===0&&(B+=1);else{const L=Math.max(Math.abs((I?I.clientWidth:0)-_),_)*2+2,F=Math.max(Math.abs((I?I.clientHeight:0)-N),N)*2+2;B=Math.sqrt(L**2+F**2)}P!=null&&P.touches?m.current===null&&(m.current=()=>{y({pulsate:O,rippleX:_,rippleY:N,rippleSize:B,cb:T})},p.start(I1e,()=>{m.current&&(m.current(),m.current=null)})):y({pulsate:O,rippleX:_,rippleY:N,rippleSize:B,cb:T})},[o,y,p]),x=v.useCallback(()=>{b({},{pulsate:!0})},[b]),S=v.useCallback((P,E)=>{if(p.clear(),(P==null?void 0:P.type)==="touchend"&&m.current){m.current(),m.current=null,p.start(0,()=>{S(P,E)});return}m.current=null,c(T=>T.length>0?T.slice(1):T),d.current=E},[p]);return v.useImperativeHandle(n,()=>({pulsate:x,start:b,stop:S}),[x,b,S]),$.jsx($1e,{className:pe(As.root,i.root,a),ref:g,...s,children:$.jsx(cS,{component:null,exit:!0,children:l})})});function _1e(e){return _e("MuiButtonBase",e)}const L1e=Le("MuiButtonBase",["root","disabled","focusVisible"]),N1e=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=Te({root:["root",t&&"disabled",n&&"focusVisible"]},_1e,o);return n&&r&&(a.root+=` ${r}`),a},F1e=ie("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${L1e.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Hi=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,focusVisibleClassName:p,LinkComponent:m="a",onBlur:g,onClick:y,onContextMenu:b,onDragLeave:x,onFocus:S,onFocusVisible:P,onKeyDown:E,onKeyUp:T,onMouseDown:O,onMouseLeave:k,onMouseUp:M,onTouchEnd:I,onTouchMove:R,onTouchStart:_,tabIndex:N=0,TouchRippleProps:B,touchRippleRef:L,type:F,...U}=r,V=v.useRef(null),z=E1e(),W=Wt(z.ref,L),[G,J]=v.useState(!1);c&&G&&J(!1),v.useImperativeHandle(o,()=>({focusVisible:()=>{J(!0),V.current.focus()}}),[]);const K=z.shouldMount&&!u&&!c;v.useEffect(()=>{G&&f&&!u&&z.pulsate()},[u,f,G,z]);const ne=ou(z,"start",O,d),re=ou(z,"stop",b,d),oe=ou(z,"stop",x,d),fe=ou(z,"stop",M,d),se=ou(z,"stop",de=>{G&&de.preventDefault(),k&&k(de)},d),ee=ou(z,"start",_,d),ce=ou(z,"stop",I,d),le=ou(z,"stop",R,d),Q=ou(z,"stop",de=>{UP(de.target)||J(!1),g&&g(de)},!1),ue=Ze(de=>{V.current||(V.current=de.currentTarget),UP(de.target)&&(J(!0),P&&P(de)),S&&S(de)}),ge=()=>{const de=V.current;return l&&l!=="button"&&!(de.tagName==="A"&&de.href)},xe=Ze(de=>{f&&!de.repeat&&G&&de.key===" "&&z.stop(de,()=>{z.start(de)}),de.target===de.currentTarget&&ge()&&de.key===" "&&de.preventDefault(),E&&E(de),de.target===de.currentTarget&&ge()&&de.key==="Enter"&&!c&&(de.preventDefault(),y&&y(de))}),me=Ze(de=>{f&&de.key===" "&&G&&!de.defaultPrevented&&z.stop(de,()=>{z.pulsate(de)}),T&&T(de),y&&de.target===de.currentTarget&&ge()&&de.key===" "&&!de.defaultPrevented&&y(de)});let be=l;be==="button"&&(U.href||U.to)&&(be=m);const we={};be==="button"?(we.type=F===void 0?"button":F,we.disabled=c):(!U.href&&!U.to&&(we.role="button"),c&&(we["aria-disabled"]=c));const Oe=Wt(n,V),ke={...r,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:N,focusVisible:G},je=N1e(ke);return $.jsxs(F1e,{as:be,className:pe(je.root,s),ownerState:ke,onBlur:Q,onClick:y,onContextMenu:re,onFocus:ue,onKeyDown:xe,onKeyUp:me,onMouseDown:ne,onMouseLeave:se,onMouseUp:fe,onDragLeave:oe,onTouchEnd:ce,onTouchMove:le,onTouchStart:ee,ref:Oe,tabIndex:c?-1:N,type:F,...we,...U,children:[a,K?$.jsx(D1e,{ref:W,center:i,...B}):null]})});function ou(e,t,n,r=!1){return Ze(o=>(n&&n(o),r||e[t](o),!0))}function j1e(e){return _e("MuiAccordionSummary",e)}const gg=Le("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),B1e=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e;return Te({root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},j1e,t)},z1e=ie(Hi,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(tt(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",width:"100%",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${gg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${gg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${gg.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${gg.expanded}`]:{minHeight:64}}}]}})),V1e=ie("span",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(tt(({theme:e})=>({display:"flex",textAlign:"start",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${gg.expanded}`]:{margin:"20px 0"}}}]}))),H1e=ie("span",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(tt(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${gg.expanded}`]:{transform:"rotate(180deg)"}}))),gF=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiAccordionSummary"}),{children:o,className:i,expandIcon:a,focusVisibleClassName:s,onClick:l,...c}=r,{disabled:u=!1,disableGutters:d,expanded:f,toggle:p}=v.useContext(iJ),m=b=>{p&&p(b),l&&l(b)},g={...r,expanded:f,disabled:u,disableGutters:d},y=B1e(g);return $.jsxs(z1e,{focusRipple:!1,disableRipple:!0,disabled:u,"aria-expanded":f,className:pe(y.root,i),focusVisibleClassName:pe(y.focusVisible,s),onClick:m,ref:n,ownerState:g,...c,children:[$.jsx(V1e,{className:y.content,ownerState:g,children:o}),a&&$.jsx(H1e,{className:y.expandIconWrapper,ownerState:g,children:a})]})});function U1e(e){return typeof e.main=="string"}function W1e(e,t=[]){if(!U1e(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Hn(e=[]){return([,t])=>t&&W1e(t,e)}function G1e(e){return _e("MuiAlert",e)}const o3=Le("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function q1e(e){return _e("MuiIconButton",e)}const K1e=Le("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Y1e=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,a={root:["root",n&&"disabled",r!=="default"&&`color${Se(r)}`,o&&`edge${Se(o)}`,`size${Se(i)}`]};return Te(a,q1e,t)},X1e=ie(Hi,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Se(n.color)}`],n.edge&&t[`edge${Se(n.edge)}`],t[`size${Se(n.size)}`]]}})(tt(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),tt(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Hn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Hn()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${K1e.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}}))),An=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium",...d}=r,f={...r,edge:o,color:s,disabled:l,disableFocusRipple:c,size:u},p=Y1e(f);return $.jsx(X1e,{className:pe(p.root,a),centerRipple:!0,focusRipple:!c,disabled:l,ref:n,...d,ownerState:f,children:i})}),Q1e=lt($.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),J1e=lt($.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Z1e=lt($.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),eCe=lt($.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),aJ=lt($.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),tCe=e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root",`color${Se(n||r)}`,`${t}${Se(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return Te(i,G1e,o)},nCe=ie(so,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Se(n.color||n.severity)}`]]}})(tt(({theme:e})=>{const t=e.palette.mode==="light"?Ru:Du,n=e.palette.mode==="light"?Du:Ru;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(Hn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${o3.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Hn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${o3.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Hn(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),rCe=ie("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),oCe=ie("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),i3=ie("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),a3={success:$.jsx(Q1e,{fontSize:"inherit"}),warning:$.jsx(J1e,{fontSize:"inherit"}),error:$.jsx(Z1e,{fontSize:"inherit"}),info:$.jsx(eCe,{fontSize:"inherit"})},Bu=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiAlert"}),{action:o,children:i,className:a,closeText:s="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:f=a3,onClose:p,role:m="alert",severity:g="success",slotProps:y={},slots:b={},variant:x="standard",...S}=r,P={...r,color:l,severity:g,variant:x,colorSeverity:l||g},E=tCe(P),T={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...b},slotProps:{...u,...y}},[O,k]=dn("closeButton",{elementType:An,externalForwardedProps:T,ownerState:P}),[M,I]=dn("closeIcon",{elementType:aJ,externalForwardedProps:T,ownerState:P});return $.jsxs(nCe,{role:m,elevation:0,ownerState:P,className:pe(E.root,a),ref:n,...S,children:[d!==!1?$.jsx(rCe,{ownerState:P,className:E.icon,children:d||f[g]||a3[g]}):null,$.jsx(oCe,{ownerState:P,className:E.message,children:i}),o!=null?$.jsx(i3,{ownerState:P,className:E.action,children:o}):null,o==null&&p?$.jsx(i3,{ownerState:P,className:E.action,children:$.jsx(O,{size:"small","aria-label":s,title:s,color:"inherit",onClick:p,...k,children:$.jsx(M,{fontSize:"small",...I})})}):null]})});function iCe(e){return _e("MuiTypography",e)}const SE=Le("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),aCe={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},sCe=qwe(),lCe=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${Se(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Te(s,iCe,a)},cCe=ie("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Se(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(tt(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(e.palette).filter(Hn()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${Se(n)}`},style:{color:(e.vars||e).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),s3={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},ut=v.forwardRef(function(t,n){const{color:r,...o}=rt({props:t,name:"MuiTypography"}),i=!aCe[r],a=sCe({...o,...i&&{color:r}}),{align:s="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:d=!1,paragraph:f=!1,variant:p="body1",variantMapping:m=s3,...g}=a,y={...a,align:s,color:r,className:l,component:c,gutterBottom:u,noWrap:d,paragraph:f,variant:p,variantMapping:m},b=c||(f?"p":m[p]||s3[p])||"span",x=lCe(y);return $.jsx(cCe,{as:b,ref:n,className:pe(x.root,l),...g,ownerState:y,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...g.style}})});function uCe(e){return _e("MuiAlertTitle",e)}Le("MuiAlertTitle",["root"]);const dCe=e=>{const{classes:t}=e;return Te({root:["root"]},uCe,t)},fCe=ie(ut,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})(tt(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),CE=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiAlertTitle"}),{className:o,...i}=r,a=r,s=dCe(a);return $.jsx(fCe,{gutterBottom:!0,component:"div",ownerState:a,ref:n,className:pe(s.root,o),...i})});function pCe(e){return _e("MuiAppBar",e)}Le("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const hCe=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${Se(t)}`,`position${Se(n)}`]};return Te(o,pCe,r)},l3=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,mCe=ie(so,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Se(n.position)}`],t[`color${Se(n.color)}`]]}})(tt(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Hn(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?l3(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?l3(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),gCe=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiAppBar"}),{className:o,color:i="primary",enableColorOnDark:a=!1,position:s="fixed",...l}=r,c={...r,color:i,position:s,enableColorOnDark:a},u=hCe(c);return $.jsx(mCe,{square:!0,component:"header",ownerState:c,elevation:4,className:pe(u.root,o,s==="fixed"&&"mui-fixed"),ref:n,...l})});function c3(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function sJ(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(s,{inputValue:l,getOptionLabel:c})=>{let u=a?l.trim():l;n&&(u=u.toLowerCase()),t&&(u=c3(u));const d=u?s.filter(f=>{let p=(i||c)(f);return n&&(p=p.toLowerCase()),t&&(p=c3(p)),o==="start"?p.startsWith(u):p.includes(u)}):s;return typeof r=="number"?d.slice(0,r):d}}const yCe=sJ(),u3=5,vCe=e=>{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))},bCe=[];function wCe(e){const{unstable_isActiveElementInListbox:t=vCe,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:u=e.multiple?bCe:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:p,disabledItemsFocusable:m=!1,disableListWrap:g=!1,filterOptions:y=yCe,filterSelectedOptions:b=!1,freeSolo:x=!1,getOptionDisabled:S,getOptionKey:P,getOptionLabel:E=Ke=>Ke.label??Ke,groupBy:T,handleHomeEndKeys:O=!e.freeSolo,id:k,includeInputInList:M=!1,inputValue:I,isOptionEqualToValue:R=(Ke,Be)=>Ke===Be,multiple:_=!1,onChange:N,onClose:B,onHighlightChange:L,onInputChange:F,onOpen:U,open:V,openOnFocus:z=!1,options:W,readOnly:G=!1,selectOnFocus:J=!e.freeSolo,value:K}=e,ne=_n(k);let re=E;re=Ke=>{const Be=E(Ke);return typeof Be!="string"?String(Be):Be};const oe=v.useRef(!1),fe=v.useRef(!0),se=v.useRef(null),ee=v.useRef(null),[ce,le]=v.useState(null),[Q,ue]=v.useState(-1),ge=o?0:-1,xe=v.useRef(ge),[me,be]=bi({controlled:K,default:u,name:c}),[we,Oe]=bi({controlled:I,default:"",name:c,state:"inputValue"}),[ke,je]=v.useState(!1),de=v.useCallback((Ke,Be,St)=>{if(!(_?me.length!(b&&(_?me:[me]).some(Be=>Be!==null&&R(Ke,Be)))),{inputValue:Je&&Ae?"":we,getOptionLabel:re}):[],$t=pN({filteredOptions:st,value:me,inputValue:we});v.useEffect(()=>{const Ke=me!==$t.value;ke&&!Ke||x&&!Ke||de(null,me,"reset")},[me,de,ke,$t.value,x]);const ct=Re&&st.length>0&&!G,_t=Ze(Ke=>{Ke===-1?se.current.focus():ce.querySelector(`[data-tag-index="${Ke}"]`).focus()});v.useEffect(()=>{_&&Q>me.length-1&&(ue(-1),_t(-1))},[me,_,Q,_t]);function pt(Ke,Be){if(!ee.current||Ke<0||Ke>=st.length)return-1;let St=Ke;for(;;){const Zt=ee.current.querySelector(`[data-option-index="${St}"]`),ln=m?!1:!Zt||Zt.disabled||Zt.getAttribute("aria-disabled")==="true";if(Zt&&Zt.hasAttribute("tabindex")&&!ln)return St;if(Be==="next"?St=(St+1)%st.length:St=(St-1+st.length)%st.length,St===Ke)return-1}}const ot=Ze(({event:Ke,index:Be,reason:St="auto"})=>{if(xe.current=Be,Be===-1?se.current.removeAttribute("aria-activedescendant"):se.current.setAttribute("aria-activedescendant",`${ne}-option-${Be}`),L&&L(Ke,Be===-1?null:st[Be],St),!ee.current)return;const Zt=ee.current.querySelector(`[role="option"].${n}-focused`);Zt&&(Zt.classList.remove(`${n}-focused`),Zt.classList.remove(`${n}-focusVisible`));let ln=ee.current;if(ee.current.getAttribute("role")!=="listbox"&&(ln=ee.current.parentElement.querySelector('[role="listbox"]')),!ln)return;if(Be===-1){ln.scrollTop=0;return}const Rr=ee.current.querySelector(`[data-option-index="${Be}"]`);if(Rr&&(Rr.classList.add(`${n}-focused`),St==="keyboard"&&Rr.classList.add(`${n}-focusVisible`),ln.scrollHeight>ln.clientHeight&&St!=="mouse"&&St!=="touch")){const Gn=Rr,Ca=ln.clientHeight+ln.scrollTop,qc=Gn.offsetTop+Gn.offsetHeight;qc>Ca?ln.scrollTop=qc-ln.clientHeight:Gn.offsetTop-Gn.offsetHeight*(T?1.3:0){if(!nt)return;const Rr=pt((()=>{const Gn=st.length-1;if(Be==="reset")return ge;if(Be==="start")return 0;if(Be==="end")return Gn;const Ca=xe.current+Be;return Ca<0?Ca===-1&&M?-1:g&&xe.current!==-1||Math.abs(Be)>1?0:Gn:Ca>Gn?Ca===Gn+1&&M?-1:g||Math.abs(Be)>1?Gn:0:Ca})(),St);if(ot({index:Rr,reason:Zt,event:Ke}),r&&Be!=="reset")if(Rr===-1)se.current.value=we;else{const Gn=re(st[Rr]);se.current.value=Gn,Gn.toLowerCase().indexOf(we.toLowerCase())===0&&we.length>0&&se.current.setSelectionRange(we.length,Gn.length)}}),We=()=>{const Ke=(Be,St)=>{const Zt=Be?re(Be):"",ln=St?re(St):"";return Zt===ln};if(xe.current!==-1&&$t.filteredOptions&&$t.filteredOptions.length!==st.length&&$t.inputValue===we&&(_?me.length===$t.value.length&&$t.value.every((Be,St)=>re(me[St])===re(Be)):Ke($t.value,me))){const Be=$t.filteredOptions[xe.current];if(Be)return st.findIndex(St=>re(St)===re(Be))}return-1},ft=v.useCallback(()=>{if(!nt)return;const Ke=We();if(Ke!==-1){xe.current=Ke;return}const Be=_?me[0]:me;if(st.length===0||Be==null){Pe({diff:"reset"});return}if(ee.current){if(Be!=null){const St=st[xe.current];if(_&&St&&me.findIndex(ln=>R(St,ln))!==-1)return;const Zt=st.findIndex(ln=>R(ln,Be));Zt===-1?Pe({diff:"reset"}):ot({index:Zt});return}if(xe.current>=st.length-1){ot({index:st.length-1});return}ot({index:xe.current})}},[st.length,_?!1:me,b,Pe,ot,nt,we,_]),Ot=Ze(Ke=>{HP(ee,Ke),Ke&&ft()});v.useEffect(()=>{ft()},[ft]);const xt=Ke=>{Re||(Me(!0),Ne(!0),U&&U(Ke))},vn=(Ke,Be)=>{Re&&(Me(!1),B&&B(Ke,Be))},zn=(Ke,Be,St,Zt)=>{if(_){if(me.length===Be.length&&me.every((ln,Rr)=>ln===Be[Rr]))return}else if(me===Be)return;N&&N(Ke,Be,St,Zt),be(Be)},Wn=v.useRef(!1),xo=(Ke,Be,St="selectOption",Zt="options")=>{let ln=St,Rr=Be;if(_){Rr=Array.isArray(me)?me.slice():[];const Gn=Rr.findIndex(Ca=>R(Be,Ca));Gn===-1?Rr.push(Be):Zt!=="freeSolo"&&(Rr.splice(Gn,1),ln="removeOption")}de(Ke,Rr,ln),zn(Ke,Rr,ln,{option:Be}),!f&&(!Ke||!Ke.ctrlKey&&!Ke.metaKey)&&vn(Ke,ln),(a===!0||a==="touch"&&Wn.current||a==="mouse"&&!Wn.current)&&se.current.blur()};function So(Ke,Be){if(Ke===-1)return-1;let St=Ke;for(;;){if(Be==="next"&&St===me.length||Be==="previous"&&St===-1)return-1;const Zt=ce.querySelector(`[data-tag-index="${St}"]`);if(!Zt||!Zt.hasAttribute("tabindex")||Zt.disabled||Zt.getAttribute("aria-disabled")==="true")St+=Be==="next"?1:-1;else return St}}const ai=(Ke,Be)=>{if(!_)return;we===""&&vn(Ke,"toggleInput");let St=Q;Q===-1?we===""&&Be==="previous"&&(St=me.length-1):(St+=Be==="next"?1:-1,St<0&&(St=0),St===me.length&&(St=-1)),St=So(St,Be),ue(St),_t(St)},Sa=Ke=>{oe.current=!0,Oe(""),F&&F(Ke,"","clear"),zn(Ke,_?[]:null,"clear")},Nt=Ke=>Be=>{if(Ke.onKeyDown&&Ke.onKeyDown(Be),!Be.defaultMuiPrevented&&(Q!==-1&&!["ArrowLeft","ArrowRight"].includes(Be.key)&&(ue(-1),_t(-1)),Be.which!==229))switch(Be.key){case"Home":nt&&O&&(Be.preventDefault(),Pe({diff:"start",direction:"next",reason:"keyboard",event:Be}));break;case"End":nt&&O&&(Be.preventDefault(),Pe({diff:"end",direction:"previous",reason:"keyboard",event:Be}));break;case"PageUp":Be.preventDefault(),Pe({diff:-u3,direction:"previous",reason:"keyboard",event:Be}),xt(Be);break;case"PageDown":Be.preventDefault(),Pe({diff:u3,direction:"next",reason:"keyboard",event:Be}),xt(Be);break;case"ArrowDown":Be.preventDefault(),Pe({diff:1,direction:"next",reason:"keyboard",event:Be}),xt(Be);break;case"ArrowUp":Be.preventDefault(),Pe({diff:-1,direction:"previous",reason:"keyboard",event:Be}),xt(Be);break;case"ArrowLeft":ai(Be,"previous");break;case"ArrowRight":ai(Be,"next");break;case"Enter":if(xe.current!==-1&&nt){const St=st[xe.current],Zt=S?S(St):!1;if(Be.preventDefault(),Zt)return;xo(Be,St,"selectOption"),r&&se.current.setSelectionRange(se.current.value.length,se.current.value.length)}else x&&we!==""&&Je===!1&&(_&&Be.preventDefault(),xo(Be,we,"createOption","freeSolo"));break;case"Escape":nt?(Be.preventDefault(),Be.stopPropagation(),vn(Be,"escape")):l&&(we!==""||_&&me.length>0)&&(Be.preventDefault(),Be.stopPropagation(),Sa(Be));break;case"Backspace":if(_&&!G&&we===""&&me.length>0){const St=Q===-1?me.length-1:Q,Zt=me.slice();Zt.splice(St,1),zn(Be,Zt,"removeOption",{option:me[St]})}break;case"Delete":if(_&&!G&&we===""&&me.length>0&&Q!==-1){const St=Q,Zt=me.slice();Zt.splice(St,1),zn(Be,Zt,"removeOption",{option:me[St]})}break}},Co=Ke=>{je(!0),z&&!oe.current&&xt(Ke)},ss=Ke=>{if(t(ee)){se.current.focus();return}je(!1),fe.current=!0,oe.current=!1,i&&xe.current!==-1&&nt?xo(Ke,st[xe.current],"blur"):i&&x&&we!==""?xo(Ke,we,"blur","freeSolo"):s&&de(Ke,me,"blur"),vn(Ke,"blur")},ad=Ke=>{const Be=Ke.target.value;we!==Be&&(Oe(Be),Ne(!1),F&&F(Ke,Be,"input")),Be===""?!d&&!_&&zn(Ke,null,"clear"):xt(Ke)},Gc=Ke=>{const Be=Number(Ke.currentTarget.getAttribute("data-option-index"));xe.current!==Be&&ot({event:Ke,index:Be,reason:"mouse"})},Kf=Ke=>{ot({event:Ke,index:Number(Ke.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Wn.current=!0},Yf=Ke=>{const Be=Number(Ke.currentTarget.getAttribute("data-option-index"));xo(Ke,st[Be],"selectOption"),Wn.current=!1},mb=Ke=>Be=>{const St=me.slice();St.splice(Ke,1),zn(Be,St,"removeOption",{option:me[Ke]})},rm=Ke=>{Re?vn(Ke,"toggleInput"):xt(Ke)},o1=Ke=>{Ke.currentTarget.contains(Ke.target)&&Ke.target.getAttribute("id")!==ne&&Ke.preventDefault()},Xf=Ke=>{Ke.currentTarget.contains(Ke.target)&&(se.current.focus(),J&&fe.current&&se.current.selectionEnd-se.current.selectionStart===0&&se.current.select(),fe.current=!1)},Do=Ke=>{!p&&(we===""||!Re)&&rm(Ke)};let Wr=x&&we.length>0;Wr=Wr||(_?me.length>0:me!==null);let hl=st;return T&&(hl=st.reduce((Ke,Be,St)=>{const Zt=T(Be);return Ke.length>0&&Ke[Ke.length-1].group===Zt?Ke[Ke.length-1].options.push(Be):Ke.push({key:St,index:St,group:Zt,options:[Be]}),Ke},[])),p&&ke&&ss(),{getRootProps:(Ke={})=>({"aria-owns":ct?`${ne}-listbox`:null,...Ke,onKeyDown:Nt(Ke),onMouseDown:o1,onClick:Xf}),getInputLabelProps:()=>({id:`${ne}-label`,htmlFor:ne}),getInputProps:()=>({id:ne,value:we,onBlur:ss,onFocus:Co,onChange:ad,onMouseDown:Do,"aria-activedescendant":nt?"":null,"aria-autocomplete":r?"both":"list","aria-controls":ct?`${ne}-listbox`:void 0,"aria-expanded":ct,autoComplete:"off",ref:se,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:p}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Sa}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:rm}),getTagProps:({index:Ke})=>({key:Ke,"data-tag-index":Ke,tabIndex:-1,...!G&&{onDelete:mb(Ke)}}),getListboxProps:()=>({role:"listbox",id:`${ne}-listbox`,"aria-labelledby":`${ne}-label`,ref:Ot,onMouseDown:Ke=>{Ke.preventDefault()}}),getOptionProps:({index:Ke,option:Be})=>{const St=(_?me:[me]).some(ln=>ln!=null&&R(Be,ln)),Zt=S?S(Be):!1;return{key:(P==null?void 0:P(Be))??re(Be),tabIndex:-1,role:"option",id:`${ne}-option-${Ke}`,onMouseMove:Gc,onClick:Yf,onTouchStart:Kf,"data-option-index":Ke,"aria-disabled":Zt,"aria-selected":St}},id:ne,inputValue:we,value:me,dirty:Wr,expanded:nt&&ce,popupOpen:nt,focused:ke||Q!==-1,anchorEl:ce,setAnchorEl:le,focusedTag:Q,groupedOptions:hl}}var ha="top",Zs="bottom",el="right",ma="left",yF="auto",uS=[ha,Zs,el,ma],Sy="start",Bw="end",xCe="clippingParents",lJ="viewport",zb="popper",SCe="reference",d3=uS.reduce(function(e,t){return e.concat([t+"-"+Sy,t+"-"+Bw])},[]),cJ=[].concat(uS,[yF]).reduce(function(e,t){return e.concat([t,t+"-"+Sy,t+"-"+Bw])},[]),CCe="beforeRead",PCe="read",ECe="afterRead",TCe="beforeMain",OCe="main",ICe="afterMain",kCe="beforeWrite",MCe="write",ACe="afterWrite",$Ce=[CCe,PCe,ECe,TCe,OCe,ICe,kCe,MCe,ACe];function Dc(e){return e?(e.nodeName||"").toLowerCase():null}function Xa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ph(e){var t=Xa(e).Element;return e instanceof t||e instanceof Element}function Gs(e){var t=Xa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function vF(e){if(typeof ShadowRoot>"u")return!1;var t=Xa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function RCe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!Gs(i)||!Dc(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function DCe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Gs(o)||!Dc(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const _Ce={name:"applyStyles",enabled:!0,phase:"write",fn:RCe,effect:DCe,requires:["computeStyles"]};function Oc(e){return e.split("-")[0]}var Yp=Math.max,PE=Math.min,Cy=Math.round;function H2(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function uJ(){return!/^((?!chrome|android).)*safari/i.test(H2())}function Py(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Gs(e)&&(o=e.offsetWidth>0&&Cy(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Cy(r.height)/e.offsetHeight||1);var a=ph(e)?Xa(e):window,s=a.visualViewport,l=!uJ()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/o,u=(r.top+(l&&s?s.offsetTop:0))/i,d=r.width/o,f=r.height/i;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function bF(e){var t=Py(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function dJ(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&vF(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function zu(e){return Xa(e).getComputedStyle(e)}function LCe(e){return["table","td","th"].indexOf(Dc(e))>=0}function Af(e){return((ph(e)?e.ownerDocument:e.document)||window.document).documentElement}function tI(e){return Dc(e)==="html"?e:e.assignedSlot||e.parentNode||(vF(e)?e.host:null)||Af(e)}function f3(e){return!Gs(e)||zu(e).position==="fixed"?null:e.offsetParent}function NCe(e){var t=/firefox/i.test(H2()),n=/Trident/i.test(H2());if(n&&Gs(e)){var r=zu(e);if(r.position==="fixed")return null}var o=tI(e);for(vF(o)&&(o=o.host);Gs(o)&&["html","body"].indexOf(Dc(o))<0;){var i=zu(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function dS(e){for(var t=Xa(e),n=f3(e);n&&LCe(n)&&zu(n).position==="static";)n=f3(n);return n&&(Dc(n)==="html"||Dc(n)==="body"&&zu(n).position==="static")?t:n||NCe(e)||t}function wF(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function K0(e,t,n){return Yp(e,PE(t,n))}function FCe(e,t,n){var r=K0(e,t,n);return r>n?n:r}function fJ(){return{top:0,right:0,bottom:0,left:0}}function pJ(e){return Object.assign({},fJ(),e)}function hJ(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var jCe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,pJ(typeof t!="number"?t:hJ(t,uS))};function BCe(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Oc(n.placement),l=wF(s),c=[ma,el].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var d=jCe(o.padding,n),f=bF(i),p=l==="y"?ha:ma,m=l==="y"?Zs:el,g=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],y=a[l]-n.rects.reference[l],b=dS(i),x=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,S=g/2-y/2,P=d[p],E=x-f[u]-d[m],T=x/2-f[u]/2+S,O=K0(P,T,E),k=l;n.modifiersData[r]=(t={},t[k]=O,t.centerOffset=O-T,t)}}function zCe(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||dJ(t.elements.popper,o)&&(t.elements.arrow=o))}const VCe={name:"arrow",enabled:!0,phase:"main",fn:BCe,effect:zCe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ey(e){return e.split("-")[1]}var HCe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function UCe(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Cy(n*o)/o||0,y:Cy(r*o)/o||0}}function p3(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=f===void 0?0:f,m=a.y,g=m===void 0?0:m,y=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=y.x,g=y.y;var b=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),S=ma,P=ha,E=window;if(c){var T=dS(n),O="clientHeight",k="clientWidth";if(T===Xa(n)&&(T=Af(n),zu(T).position!=="static"&&s==="absolute"&&(O="scrollHeight",k="scrollWidth")),T=T,o===ha||(o===ma||o===el)&&i===Bw){P=Zs;var M=d&&T===E&&E.visualViewport?E.visualViewport.height:T[O];g-=M-r.height,g*=l?1:-1}if(o===ma||(o===ha||o===Zs)&&i===Bw){S=el;var I=d&&T===E&&E.visualViewport?E.visualViewport.width:T[k];p-=I-r.width,p*=l?1:-1}}var R=Object.assign({position:s},c&&HCe),_=u===!0?UCe({x:p,y:g},Xa(n)):{x:p,y:g};if(p=_.x,g=_.y,l){var N;return Object.assign({},R,(N={},N[P]=x?"0":"",N[S]=b?"0":"",N.transform=(E.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",N))}return Object.assign({},R,(t={},t[P]=x?g+"px":"",t[S]=b?p+"px":"",t.transform="",t))}function WCe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:Oc(t.placement),variation:Ey(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,p3(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,p3(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const GCe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:WCe,data:{}};var yC={passive:!0};function qCe(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=Xa(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,yC)}),s&&l.addEventListener("resize",n.update,yC),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,yC)}),s&&l.removeEventListener("resize",n.update,yC)}}const KCe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qCe,data:{}};var YCe={left:"right",right:"left",bottom:"top",top:"bottom"};function SP(e){return e.replace(/left|right|bottom|top/g,function(t){return YCe[t]})}var XCe={start:"end",end:"start"};function h3(e){return e.replace(/start|end/g,function(t){return XCe[t]})}function xF(e){var t=Xa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function SF(e){return Py(Af(e)).left+xF(e).scrollLeft}function QCe(e,t){var n=Xa(e),r=Af(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=uJ();(c||!c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+SF(e),y:l}}function JCe(e){var t,n=Af(e),r=xF(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Yp(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Yp(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+SF(e),l=-r.scrollTop;return zu(o||n).direction==="rtl"&&(s+=Yp(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function CF(e){var t=zu(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function mJ(e){return["html","body","#document"].indexOf(Dc(e))>=0?e.ownerDocument.body:Gs(e)&&CF(e)?e:mJ(tI(e))}function Y0(e,t){var n;t===void 0&&(t=[]);var r=mJ(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=Xa(r),a=o?[i].concat(i.visualViewport||[],CF(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Y0(tI(a)))}function U2(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ZCe(e,t){var n=Py(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function m3(e,t,n){return t===lJ?U2(QCe(e,n)):ph(t)?ZCe(t,n):U2(JCe(Af(e)))}function ePe(e){var t=Y0(tI(e)),n=["absolute","fixed"].indexOf(zu(e).position)>=0,r=n&&Gs(e)?dS(e):e;return ph(r)?t.filter(function(o){return ph(o)&&dJ(o,r)&&Dc(o)!=="body"}):[]}function tPe(e,t,n,r){var o=t==="clippingParents"?ePe(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(l,c){var u=m3(e,c,r);return l.top=Yp(u.top,l.top),l.right=PE(u.right,l.right),l.bottom=PE(u.bottom,l.bottom),l.left=Yp(u.left,l.left),l},m3(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function gJ(e){var t=e.reference,n=e.element,r=e.placement,o=r?Oc(r):null,i=r?Ey(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case ha:l={x:a,y:t.y-n.height};break;case Zs:l={x:a,y:t.y+t.height};break;case el:l={x:t.x+t.width,y:s};break;case ma:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=o?wF(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case Sy:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Bw:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function zw(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?xCe:s,c=n.rootBoundary,u=c===void 0?lJ:c,d=n.elementContext,f=d===void 0?zb:d,p=n.altBoundary,m=p===void 0?!1:p,g=n.padding,y=g===void 0?0:g,b=pJ(typeof y!="number"?y:hJ(y,uS)),x=f===zb?SCe:zb,S=e.rects.popper,P=e.elements[m?x:f],E=tPe(ph(P)?P:P.contextElement||Af(e.elements.popper),l,u,a),T=Py(e.elements.reference),O=gJ({reference:T,element:S,strategy:"absolute",placement:o}),k=U2(Object.assign({},S,O)),M=f===zb?k:T,I={top:E.top-M.top+b.top,bottom:M.bottom-E.bottom+b.bottom,left:E.left-M.left+b.left,right:M.right-E.right+b.right},R=e.modifiersData.offset;if(f===zb&&R){var _=R[o];Object.keys(I).forEach(function(N){var B=[el,Zs].indexOf(N)>=0?1:-1,L=[ha,Zs].indexOf(N)>=0?"y":"x";I[N]+=_[L]*B})}return I}function nPe(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?cJ:l,u=Ey(r),d=u?s?d3:d3.filter(function(m){return Ey(m)===u}):uS,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var p=f.reduce(function(m,g){return m[g]=zw(e,{placement:g,boundary:o,rootBoundary:i,padding:a})[Oc(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function rPe(e){if(Oc(e)===yF)return[];var t=SP(e);return[h3(e),t,h3(t)]}function oPe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,g=n.allowedAutoPlacements,y=t.options.placement,b=Oc(y),x=b===y,S=l||(x||!m?[SP(y)]:rPe(y)),P=[y].concat(S).reduce(function(ne,re){return ne.concat(Oc(re)===yF?nPe(t,{placement:re,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:g}):re)},[]),E=t.rects.reference,T=t.rects.popper,O=new Map,k=!0,M=P[0],I=0;I=0,L=B?"width":"height",F=zw(t,{placement:R,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),U=B?N?el:ma:N?Zs:ha;E[L]>T[L]&&(U=SP(U));var V=SP(U),z=[];if(i&&z.push(F[_]<=0),s&&z.push(F[U]<=0,F[V]<=0),z.every(function(ne){return ne})){M=R,k=!1;break}O.set(R,z)}if(k)for(var W=m?3:1,G=function(re){var oe=P.find(function(fe){var se=O.get(fe);if(se)return se.slice(0,re).every(function(ee){return ee})});if(oe)return M=oe,"break"},J=W;J>0;J--){var K=G(J);if(K==="break")break}t.placement!==M&&(t.modifiersData[r]._skip=!0,t.placement=M,t.reset=!0)}}const iPe={name:"flip",enabled:!0,phase:"main",fn:oPe,requiresIfExists:["offset"],data:{_skip:!1}};function g3(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function y3(e){return[ha,el,Zs,ma].some(function(t){return e[t]>=0})}function aPe(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=zw(t,{elementContext:"reference"}),s=zw(t,{altBoundary:!0}),l=g3(a,r),c=g3(s,o,i),u=y3(l),d=y3(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const sPe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:aPe};function lPe(e,t,n){var r=Oc(e),o=[ma,ha].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[ma,el].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function cPe(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=cJ.reduce(function(u,d){return u[d]=lPe(d,t.rects,i),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const uPe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:cPe};function dPe(e){var t=e.state,n=e.name;t.modifiersData[n]=gJ({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const fPe={name:"popperOffsets",enabled:!0,phase:"read",fn:dPe,data:{}};function pPe(e){return e==="x"?"y":"x"}function hPe(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,g=m===void 0?0:m,y=zw(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=Oc(t.placement),x=Ey(t.placement),S=!x,P=wF(b),E=pPe(P),T=t.modifiersData.popperOffsets,O=t.rects.reference,k=t.rects.popper,M=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,I=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,_={x:0,y:0};if(T){if(i){var N,B=P==="y"?ha:ma,L=P==="y"?Zs:el,F=P==="y"?"height":"width",U=T[P],V=U+y[B],z=U-y[L],W=p?-k[F]/2:0,G=x===Sy?O[F]:k[F],J=x===Sy?-k[F]:-O[F],K=t.elements.arrow,ne=p&&K?bF(K):{width:0,height:0},re=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:fJ(),oe=re[B],fe=re[L],se=K0(0,O[F],ne[F]),ee=S?O[F]/2-W-se-oe-I.mainAxis:G-se-oe-I.mainAxis,ce=S?-O[F]/2+W+se+fe+I.mainAxis:J+se+fe+I.mainAxis,le=t.elements.arrow&&dS(t.elements.arrow),Q=le?P==="y"?le.clientTop||0:le.clientLeft||0:0,ue=(N=R==null?void 0:R[P])!=null?N:0,ge=U+ee-ue-Q,xe=U+ce-ue,me=K0(p?PE(V,ge):V,U,p?Yp(z,xe):z);T[P]=me,_[P]=me-U}if(s){var be,we=P==="x"?ha:ma,Oe=P==="x"?Zs:el,ke=T[E],je=E==="y"?"height":"width",de=ke+y[we],Re=ke-y[Oe],Me=[ha,ma].indexOf(b)!==-1,Ae=(be=R==null?void 0:R[E])!=null?be:0,Ne=Me?de:ke-O[je]-k[je]-Ae+I.altAxis,Je=Me?ke+O[je]+k[je]-Ae-I.altAxis:Re,nt=p&&Me?FCe(Ne,ke,Je):K0(p?Ne:de,ke,p?Je:Re);T[E]=nt,_[E]=nt-ke}t.modifiersData[r]=_}}const mPe={name:"preventOverflow",enabled:!0,phase:"main",fn:hPe,requiresIfExists:["offset"]};function gPe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function yPe(e){return e===Xa(e)||!Gs(e)?xF(e):gPe(e)}function vPe(e){var t=e.getBoundingClientRect(),n=Cy(t.width)/e.offsetWidth||1,r=Cy(t.height)/e.offsetHeight||1;return n!==1||r!==1}function bPe(e,t,n){n===void 0&&(n=!1);var r=Gs(t),o=Gs(t)&&vPe(t),i=Af(t),a=Py(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Dc(t)!=="body"||CF(i))&&(s=yPe(t)),Gs(t)?(l=Py(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=SF(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function wPe(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function xPe(e){var t=wPe(e);return $Ce.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function SPe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function CPe(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var v3={placement:"bottom",modifiers:[],strategy:"absolute"};function b3(){for(var e=arguments.length,t=new Array(e),n=0;n{i||s(OPe(o)||document.body)},[o,i]),xn(()=>{if(a&&!i)return HP(n,a),()=>{HP(n,null)}},[n,a,i]),i){if(v.isValidElement(r)){const c={ref:l};return v.cloneElement(r,c)}return r}return a&&eI.createPortal(r,a)});function IPe(e){return _e("MuiPopper",e)}Le("MuiPopper",["root"]);function kPe(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function W2(e){return typeof e=="function"?e():e}function MPe(e){return e.nodeType!==void 0}const APe=e=>{const{classes:t}=e;return Te({root:["root"]},IPe,t)},$Pe={},RPe=v.forwardRef(function(t,n){const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:f={},slots:p={},TransitionProps:m,ownerState:g,...y}=t,b=v.useRef(null),x=Wt(b,n),S=v.useRef(null),P=Wt(S,d),E=v.useRef(P);xn(()=>{E.current=P},[P]),v.useImperativeHandle(d,()=>S.current,[]);const T=kPe(c,i),[O,k]=v.useState(T),[M,I]=v.useState(W2(r));v.useEffect(()=>{S.current&&S.current.forceUpdate()}),v.useEffect(()=>{r&&I(W2(r))},[r]),xn(()=>{if(!M||!l)return;const L=V=>{k(V.placement)};let F=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:V})=>{L(V)}}];s!=null&&(F=F.concat(s)),u&&u.modifiers!=null&&(F=F.concat(u.modifiers));const U=TPe(M,b.current,{placement:T,...u,modifiers:F});return E.current(U),()=>{U.destroy(),E.current(null)}},[M,a,s,l,u,T]);const R={placement:O};m!==null&&(R.TransitionProps=m);const _=APe(t),N=p.root??"div",B=on({elementType:N,externalSlotProps:f.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:x},ownerState:t,className:_.root});return $.jsx(N,{...B,children:typeof o=="function"?o(R):o})}),DPe=v.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=$Pe,popperRef:p,style:m,transition:g=!1,slotProps:y={},slots:b={},...x}=t,[S,P]=v.useState(!0),E=()=>{P(!1)},T=()=>{P(!0)};if(!l&&!u&&(!g||S))return null;let O;if(i)O=i;else if(r){const I=W2(r);O=I&&MPe(I)?mr(I).body:mr(null).body}const k=!u&&l&&(!g||S)?"none":void 0,M=g?{in:u,onEnter:E,onExited:T}:void 0;return $.jsx(yJ,{disablePortal:s,container:O,children:$.jsx(RPe,{anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:g?!S:u,placement:d,popperOptions:f,popperRef:p,slotProps:y,slots:b,...x,style:{position:"fixed",top:0,left:0,display:k,...m},TransitionProps:M,children:o})})}),_Pe=ie(DPe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),$f=v.forwardRef(function(t,n){const r=nr(),o=rt({props:t,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:m,popperOptions:g,popperRef:y,transition:b,slots:x,slotProps:S,...P}=o,E=(x==null?void 0:x.root)??(s==null?void 0:s.Root),T={anchorEl:i,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:m,popperOptions:g,popperRef:y,transition:b,...P};return $.jsx(_Pe,{as:a,direction:r?"rtl":"ltr",slots:{root:E},slotProps:S??l,...T,ref:n})});function LPe(e){return _e("MuiListSubheader",e)}Le("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const NPe=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e,a={root:["root",n!=="default"&&`color${Se(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]};return Te(a,LPe,t)},FPe=ie("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Se(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(tt(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),G2=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiListSubheader"}),{className:o,color:i="default",component:a="li",disableGutters:s=!1,disableSticky:l=!1,inset:c=!1,...u}=r,d={...r,color:i,component:a,disableGutters:s,disableSticky:l,inset:c},f=NPe(d);return $.jsx(FPe,{as:a,className:pe(f.root,o),ref:n,ownerState:d,...u})});G2&&(G2.muiSkipListHighlight=!0);const jPe=lt($.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function BPe(e){return _e("MuiChip",e)}const On=Le("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),zPe=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e,c={root:["root",l,n&&"disabled",`size${Se(r)}`,`color${Se(o)}`,s&&"clickable",s&&`clickableColor${Se(o)}`,a&&"deletable",a&&`deletableColor${Se(o)}`,`${l}${Se(o)}`],label:["label",`label${Se(r)}`],avatar:["avatar",`avatar${Se(r)}`,`avatarColor${Se(o)}`],icon:["icon",`icon${Se(r)}`,`iconColor${Se(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Se(r)}`,`deleteIconColor${Se(o)}`,`deleteIcon${Se(l)}Color${Se(o)}`]};return Te(c,BPe,t)},VPe=ie("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${On.avatar}`]:t.avatar},{[`& .${On.avatar}`]:t[`avatar${Se(s)}`]},{[`& .${On.avatar}`]:t[`avatarColor${Se(r)}`]},{[`& .${On.icon}`]:t.icon},{[`& .${On.icon}`]:t[`icon${Se(s)}`]},{[`& .${On.icon}`]:t[`iconColor${Se(o)}`]},{[`& .${On.deleteIcon}`]:t.deleteIcon},{[`& .${On.deleteIcon}`]:t[`deleteIcon${Se(s)}`]},{[`& .${On.deleteIcon}`]:t[`deleteIconColor${Se(r)}`]},{[`& .${On.deleteIcon}`]:t[`deleteIcon${Se(l)}Color${Se(r)}`]},t.root,t[`size${Se(s)}`],t[`color${Se(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${Se(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${Se(r)}`],t[l],t[`${l}${Se(r)}`]]}})(tt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${On.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${On.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${On.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${On.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${On.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${On.icon}`]:{marginLeft:5,marginRight:-6},[`& .${On.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:vt(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:vt(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${On.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${On.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Hn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${On.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].contrastTextChannel} / 0.7)`:vt(e.palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${On.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${On.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${On.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(Hn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${On.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${On.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(Hn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${On.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${On.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${On.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${On.avatar}`]:{marginLeft:4},[`& .${On.avatarSmall}`]:{marginLeft:2},[`& .${On.icon}`]:{marginLeft:4},[`& .${On.iconSmall}`]:{marginLeft:2},[`& .${On.deleteIcon}`]:{marginRight:5},[`& .${On.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Hn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:vt(e.palette[n].main,.7)}`,[`&.${On.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette[n].main,e.palette.action.hoverOpacity)},[`&.${On.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.focusOpacity})`:vt(e.palette[n].main,e.palette.action.focusOpacity)},[`& .${On.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:vt(e.palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),HPe=ie("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${Se(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function w3(e){return e.key==="Backspace"||e.key==="Delete"}const hh=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:s="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:f,onClick:p,onDelete:m,onKeyDown:g,onKeyUp:y,size:b="medium",variant:x="filled",tabIndex:S,skipFocusWhenDisabled:P=!1,...E}=r,T=v.useRef(null),O=Wt(T,n),k=z=>{z.stopPropagation(),m&&m(z)},M=z=>{z.currentTarget===z.target&&w3(z)&&z.preventDefault(),g&&g(z)},I=z=>{z.currentTarget===z.target&&m&&w3(z)&&m(z),y&&y(z)},R=a!==!1&&p?!0:a,_=R||m?Hi:l||"div",N={...r,component:_,disabled:u,size:b,color:s,iconColor:v.isValidElement(d)&&d.props.color||s,onDelete:!!m,clickable:R,variant:x},B=zPe(N),L=_===Hi?{component:l||"div",focusVisibleClassName:B.focusVisible,...m&&{disableRipple:!0}}:{};let F=null;m&&(F=c&&v.isValidElement(c)?v.cloneElement(c,{className:pe(c.props.className,B.deleteIcon),onClick:k}):$.jsx(jPe,{className:pe(B.deleteIcon),onClick:k}));let U=null;o&&v.isValidElement(o)&&(U=v.cloneElement(o,{className:pe(B.avatar,o.props.className)}));let V=null;return d&&v.isValidElement(d)&&(V=v.cloneElement(d,{className:pe(B.icon,d.props.className)})),$.jsxs(VPe,{as:_,className:pe(B.root,i),disabled:R&&u?!0:void 0,onClick:p,onKeyDown:M,onKeyUp:I,ref:O,tabIndex:P&&u?-1:S,ownerState:N,...L,...E,children:[U||V,$.jsx(HPe,{className:pe(B.label),ownerState:N,children:f}),F]})});function vC(e){return parseInt(e,10)||0}const UPe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function WPe(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const GPe=v.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:a,value:s,...l}=t,{current:c}=v.useRef(s!=null),u=v.useRef(null),d=Wt(n,u),f=v.useRef(null),p=v.useRef(null),m=v.useCallback(()=>{const b=u.current,S=ba(b).getComputedStyle(b);if(S.width==="0px")return{outerHeightStyle:0,overflowing:!1};const P=p.current;P.style.width=S.width,P.value=b.value||t.placeholder||"x",P.value.slice(-1)===` +`&&(P.value+=" ");const E=S.boxSizing,T=vC(S.paddingBottom)+vC(S.paddingTop),O=vC(S.borderBottomWidth)+vC(S.borderTopWidth),k=P.scrollHeight;P.value="x";const M=P.scrollHeight;let I=k;i&&(I=Math.max(Number(i)*M,I)),o&&(I=Math.min(Number(o)*M,I)),I=Math.max(I,M);const R=I+(E==="border-box"?T+O:0),_=Math.abs(I-k)<=1;return{outerHeightStyle:R,overflowing:_}},[o,i,t.placeholder]),g=v.useCallback(()=>{const b=m();if(WPe(b))return;const x=b.outerHeightStyle,S=u.current;f.current!==x&&(f.current=x,S.style.height=`${x}px`),S.style.overflow=b.overflowing?"hidden":""},[m]);xn(()=>{const b=()=>{g()};let x;const S=nS(b),P=u.current,E=ba(P);E.addEventListener("resize",S);let T;return typeof ResizeObserver<"u"&&(T=new ResizeObserver(b),T.observe(P)),()=>{S.clear(),cancelAnimationFrame(x),E.removeEventListener("resize",S),T&&T.disconnect()}},[m,g]),xn(()=>{g()});const y=b=>{c||g(),r&&r(b)};return $.jsxs(v.Fragment,{children:[$.jsx("textarea",{value:s,onChange:y,ref:d,rows:i,style:a,...l}),$.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:{...UPe.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function Vw(e){return typeof e=="string"}function Rf({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const nI=v.createContext(void 0);function wa(){return v.useContext(nI)}function x3(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function EE(e,t=!1){return e&&(x3(e.value)&&e.value!==""||t&&x3(e.defaultValue)&&e.defaultValue!=="")}function qPe(e){return e.startAdornment}function KPe(e){return _e("MuiInputBase",e)}const zo=Le("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var S3;const rI=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Se(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},oI=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},YPe=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e,g={root:["root",`color${Se(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",f&&f!=="medium"&&`size${Se(f)}`,u&&"multiline",p&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",m==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]};return Te(g,KPe,t)},iI=ie("div",{name:"MuiInputBase",slot:"Root",overridesResolver:rI})(tt(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${zo.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),aI=ie("input",{name:"MuiInputBase",slot:"Input",overridesResolver:oI})(tt(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${zo.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${zo.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),C3=Gwe({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),wv=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:s,color:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:p,endAdornment:m,error:g,fullWidth:y=!1,id:b,inputComponent:x="input",inputProps:S={},inputRef:P,margin:E,maxRows:T,minRows:O,multiline:k=!1,name:M,onBlur:I,onChange:R,onClick:_,onFocus:N,onKeyDown:B,onKeyUp:L,placeholder:F,readOnly:U,renderSuffix:V,rows:z,size:W,slotProps:G={},slots:J={},startAdornment:K,type:ne="text",value:re,...oe}=r,fe=S.value!=null?S.value:re,{current:se}=v.useRef(fe!=null),ee=v.useRef(),ce=v.useCallback(ct=>{},[]),le=Wt(ee,P,S.ref,ce),[Q,ue]=v.useState(!1),ge=wa(),xe=Rf({props:r,muiFormControl:ge,states:["color","disabled","error","hiddenLabel","size","required","filled"]});xe.focused=ge?ge.focused:Q,v.useEffect(()=>{!ge&&f&&Q&&(ue(!1),I&&I())},[ge,f,Q,I]);const me=ge&&ge.onFilled,be=ge&&ge.onEmpty,we=v.useCallback(ct=>{EE(ct)?me&&me():be&&be()},[me,be]);xn(()=>{se&&we({value:fe})},[fe,we,se]);const Oe=ct=>{N&&N(ct),S.onFocus&&S.onFocus(ct),ge&&ge.onFocus?ge.onFocus(ct):ue(!0)},ke=ct=>{I&&I(ct),S.onBlur&&S.onBlur(ct),ge&&ge.onBlur?ge.onBlur(ct):ue(!1)},je=(ct,..._t)=>{if(!se){const pt=ct.target||ee.current;if(pt==null)throw new Error($u(1));we({value:pt.value})}S.onChange&&S.onChange(ct,..._t),R&&R(ct,..._t)};v.useEffect(()=>{we(ee.current)},[]);const de=ct=>{ee.current&&ct.currentTarget===ct.target&&ee.current.focus(),_&&_(ct)};let Re=x,Me=S;k&&Re==="input"&&(z?Me={type:void 0,minRows:z,maxRows:z,...Me}:Me={type:void 0,maxRows:T,minRows:O,...Me},Re=GPe);const Ae=ct=>{we(ct.animationName==="mui-auto-fill-cancel"?ee.current:{value:"x"})};v.useEffect(()=>{ge&&ge.setAdornedStart(!!K)},[ge,K]);const Ne={...r,color:xe.color||"primary",disabled:xe.disabled,endAdornment:m,error:xe.error,focused:xe.focused,formControl:ge,fullWidth:y,hiddenLabel:xe.hiddenLabel,multiline:k,size:xe.size,startAdornment:K,type:ne},Je=YPe(Ne),nt=J.root||c.Root||iI,st=G.root||u.root||{},$t=J.input||c.Input||aI;return Me={...Me,...G.input??u.input},$.jsxs(v.Fragment,{children:[!p&&typeof C3=="function"&&(S3||(S3=$.jsx(C3,{}))),$.jsxs(nt,{...st,ref:n,onClick:de,...oe,...!Vw(nt)&&{ownerState:{...Ne,...st.ownerState}},className:pe(Je.root,st.className,s,U&&"MuiInputBase-readOnly"),children:[K,$.jsx(nI.Provider,{value:null,children:$.jsx($t,{"aria-invalid":xe.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:d,disabled:xe.disabled,id:b,onAnimationStart:Ae,name:M,placeholder:F,readOnly:U,required:xe.required,rows:z,value:fe,onKeyDown:B,onKeyUp:L,type:ne,...Me,...!Vw($t)&&{as:Re,ownerState:{...Ne,...Me.ownerState}},ref:le,className:pe(Je.input,Me.className,U&&"MuiInputBase-readOnly"),onBlur:ke,onChange:je,onFocus:Oe})}),m,V?V({...xe,startAdornment:K}):null]})]})});function XPe(e){return _e("MuiInput",e)}const Rd={...zo,...Le("MuiInput",["root","underline","input"])};function QPe(e){return _e("MuiOutlinedInput",e)}const Ps={...zo,...Le("MuiOutlinedInput",["root","notchedOutline","input"])};function JPe(e){return _e("MuiFilledInput",e)}const Fa={...zo,...Le("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},vJ=lt($.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function ZPe(e){return _e("MuiAutocomplete",e)}const mn=Le("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var P3,E3;const eEe=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:c,size:u}=e,d={root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${Se(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Te(d,ZPe,t)},tEe=ie("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${mn.tag}`]:t.tag},{[`& .${mn.tag}`]:t[`tagSize${Se(s)}`]},{[`& .${mn.inputRoot}`]:t.inputRoot},{[`& .${mn.input}`]:t.input},{[`& .${mn.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${mn.focused} .${mn.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${mn.clearIndicator}`]:{visibility:"visible"}},[`& .${mn.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${mn.inputRoot}`]:{[`.${mn.hasPopupIcon}&, .${mn.hasClearIcon}&`]:{paddingRight:30},[`.${mn.hasPopupIcon}.${mn.hasClearIcon}&`]:{paddingRight:56},[`& .${mn.input}`]:{width:0,minWidth:30}},[`& .${Rd.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Rd.root}.${zo.sizeSmall}`]:{[`& .${Rd.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Ps.root}`]:{padding:9,[`.${mn.hasPopupIcon}&, .${mn.hasClearIcon}&`]:{paddingRight:39},[`.${mn.hasPopupIcon}.${mn.hasClearIcon}&`]:{paddingRight:65},[`& .${mn.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${mn.endAdornment}`]:{right:9}},[`& .${Ps.root}.${zo.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${mn.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Fa.root}`]:{paddingTop:19,paddingLeft:8,[`.${mn.hasPopupIcon}&, .${mn.hasClearIcon}&`]:{paddingRight:39},[`.${mn.hasPopupIcon}.${mn.hasClearIcon}&`]:{paddingRight:65},[`& .${Fa.input}`]:{padding:"7px 4px"},[`& .${mn.endAdornment}`]:{right:9}},[`& .${Fa.root}.${zo.sizeSmall}`]:{paddingBottom:1,[`& .${Fa.input}`]:{padding:"2.5px 4px"}},[`& .${zo.hiddenLabel}`]:{paddingTop:8},[`& .${Fa.root}.${zo.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${mn.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Fa.root}.${zo.hiddenLabel}.${zo.sizeSmall}`]:{[`& .${mn.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${mn.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${mn.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${mn.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${mn.inputRoot}`]:{flexWrap:"wrap"}}}]}),nEe=ie("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),rEe=ie(An,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),oEe=ie(An,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),iEe=ie($f,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${mn.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(tt(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),aEe=ie(so,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(tt(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),sEe=ie("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(tt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),lEe=ie("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(tt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),cEe=ie("ul",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(tt(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${mn.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${mn.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${mn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${mn.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${mn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),uEe=ie(G2,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(tt(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),dEe=ie("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${mn.option}`]:{paddingLeft:24}}),Kl=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiAutocomplete"}),{autoComplete:o=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:s=!1,ChipProps:l,className:c,clearIcon:u=P3||(P3=$.jsx(aJ,{fontSize:"small"})),clearOnBlur:d=!r.freeSolo,clearOnEscape:f=!1,clearText:p="Clear",closeText:m="Close",componentsProps:g,defaultValue:y=r.multiple?[]:null,disableClearable:b=!1,disableCloseOnSelect:x=!1,disabled:S=!1,disabledItemsFocusable:P=!1,disableListWrap:E=!1,disablePortal:T=!1,filterOptions:O,filterSelectedOptions:k=!1,forcePopupIcon:M="auto",freeSolo:I=!1,fullWidth:R=!1,getLimitTagsText:_=kn=>`+${kn}`,getOptionDisabled:N,getOptionKey:B,getOptionLabel:L,isOptionEqualToValue:F,groupBy:U,handleHomeEndKeys:V=!r.freeSolo,id:z,includeInputInList:W=!1,inputValue:G,limitTags:J=-1,ListboxComponent:K,ListboxProps:ne,loading:re=!1,loadingText:oe="Loading…",multiple:fe=!1,noOptionsText:se="No options",onChange:ee,onClose:ce,onHighlightChange:le,onInputChange:Q,onOpen:ue,open:ge,openOnFocus:xe=!1,openText:me="Open",options:be,PaperComponent:we,PopperComponent:Oe,popupIcon:ke=E3||(E3=$.jsx(vJ,{})),readOnly:je=!1,renderGroup:de,renderInput:Re,renderOption:Me,renderTags:Ae,selectOnFocus:Ne=!r.freeSolo,size:Je="medium",slots:nt={},slotProps:st={},value:$t,...ct}=r,{getRootProps:_t,getInputProps:pt,getInputLabelProps:ot,getPopupIndicatorProps:Pe,getClearProps:We,getTagProps:ft,getListboxProps:Ot,getOptionProps:xt,value:vn,dirty:zn,expanded:Wn,id:xo,popupOpen:So,focused:ai,focusedTag:Sa,anchorEl:Nt,setAnchorEl:Co,inputValue:ss,groupedOptions:ad}=wCe({...r,componentName:"Autocomplete"}),Gc=!b&&!S&&zn&&!je,Kf=(!I||M===!0)&&M!==!1,{onMouseDown:Yf}=pt(),{ref:mb,...rm}=Ot(),Xf=L||(kn=>kn.label??kn),Do={...r,disablePortal:T,expanded:Wn,focused:ai,fullWidth:R,getOptionLabel:Xf,hasClearIcon:Gc,hasPopupIcon:Kf,inputFocused:Sa===-1,popupOpen:So,size:Je},Wr=eEe(Do),hl={slots:{paper:we,popper:Oe,...nt},slotProps:{chip:l,listbox:ne,...g,...st}},[Ke,Be]=dn("listbox",{elementType:cEe,externalForwardedProps:hl,ownerState:Do,className:Wr.listbox,additionalProps:rm,ref:mb}),[St,Zt]=dn("paper",{elementType:so,externalForwardedProps:hl,ownerState:Do,className:Wr.paper}),[ln,Rr]=dn("popper",{elementType:$f,externalForwardedProps:hl,ownerState:Do,className:Wr.popper,additionalProps:{disablePortal:T,style:{width:Nt?Nt.clientWidth:null},role:"presentation",anchorEl:Nt,open:So}});let Gn;if(fe&&vn.length>0){const kn=ls=>({className:Wr.tag,disabled:S,...ft(ls)});Ae?Gn=Ae(vn,kn,Do):Gn=vn.map((ls,nc)=>{const{key:Jf,...oM}=kn({index:nc});return $.jsx(hh,{label:Xf(ls),size:Je,...oM,...hl.slotProps.chip},Jf)})}if(J>-1&&Array.isArray(Gn)){const kn=Gn.length-J;!ai&&kn>0&&(Gn=Gn.splice(0,J),Gn.push($.jsx("span",{className:Wr.tag,children:_(kn)},Gn.length)))}const qc=de||(kn=>$.jsxs("li",{children:[$.jsx(uEe,{className:Wr.groupLabel,ownerState:Do,component:"div",children:kn.group}),$.jsx(dEe,{className:Wr.groupUl,ownerState:Do,children:kn.children})]},kn.key)),om=Me||((kn,ls)=>{const{key:nc,...Jf}=kn;return $.jsx("li",{...Jf,children:Xf(ls)},nc)}),i1=(kn,ls)=>{const nc=xt({option:kn,index:ls});return om({...nc,className:Wr.option},kn,{selected:nc["aria-selected"],index:ls,inputValue:ss},Do)},im=hl.slotProps.clearIndicator,am=hl.slotProps.popupIndicator,sm=kn=>$.jsx(iEe,{as:ln,...Rr,children:$.jsx(aEe,{as:St,...Zt,children:kn})});let Qf=null;return ad.length>0?Qf=sm($.jsx(Ke,{as:K,...Be,children:ad.map((kn,ls)=>U?qc({key:kn.key,group:kn.group,children:kn.options.map((nc,Jf)=>i1(nc,kn.index+Jf))}):i1(kn,ls))})):re&&ad.length===0?Qf=sm($.jsx(sEe,{className:Wr.loading,ownerState:Do,children:oe})):ad.length===0&&!I&&!re&&(Qf=sm($.jsx(lEe,{className:Wr.noOptions,ownerState:Do,role:"presentation",onMouseDown:kn=>{kn.preventDefault()},children:se}))),$.jsxs(v.Fragment,{children:[$.jsx(tEe,{ref:n,className:pe(Wr.root,c),ownerState:Do,..._t(ct),children:Re({id:xo,disabled:S,fullWidth:!0,size:Je==="small"?"small":void 0,InputLabelProps:ot(),InputProps:{ref:Co,className:Wr.inputRoot,startAdornment:Gn,onMouseDown:kn=>{kn.target===kn.currentTarget&&Yf(kn)},...(Gc||Kf)&&{endAdornment:$.jsxs(nEe,{className:Wr.endAdornment,ownerState:Do,children:[Gc?$.jsx(rEe,{...We(),"aria-label":p,title:p,ownerState:Do,...im,className:pe(Wr.clearIndicator,im==null?void 0:im.className),children:u}):null,Kf?$.jsx(oEe,{...Pe(),disabled:S,"aria-label":So?m:me,title:So?m:me,ownerState:Do,...am,className:pe(Wr.popupIndicator,am==null?void 0:am.className),children:ke}):null]})}},inputProps:{className:Wr.input,disabled:S,readOnly:je,...pt()}})}),Nt?Qf:null]})}),fEe=lt($.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function pEe(e){return _e("MuiAvatar",e)}const hEe=Le("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]),mEe=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Te({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},pEe,t)},gEe=ie("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(tt(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),yEe=ie("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),vEe=ie(fEe,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function bEe({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,i]=v.useState(!1);return v.useEffect(()=>{if(!n&&!r)return;i(!1);let a=!0;const s=new Image;return s.onload=()=>{a&&i("loaded")},s.onerror=()=>{a&&i("error")},s.crossOrigin=e,s.referrerPolicy=t,s.src=n,r&&(s.srcset=r),()=>{a=!1}},[e,t,n,r]),o}const Yl=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiAvatar"}),{alt:o,children:i,className:a,component:s="div",slots:l={},slotProps:c={},imgProps:u,sizes:d,src:f,srcSet:p,variant:m="circular",...g}=r;let y=null;const b={...r,component:s,variant:m},x=bEe({...u,...typeof c.img=="function"?c.img(b):c.img,src:f,srcSet:p}),S=f||p,P=S&&x!=="error";b.colorDefault=!P,delete b.ownerState;const E=mEe(b),[T,O]=dn("img",{className:E.img,elementType:yEe,externalForwardedProps:{slots:l,slotProps:{img:{...u,...c.img}}},additionalProps:{alt:o,src:f,srcSet:p,sizes:d},ownerState:b});return P?y=$.jsx(T,{...O}):i||i===0?y=i:S&&o?y=o[0]:y=$.jsx(vEe,{ownerState:b,className:E.fallback}),$.jsx(gEe,{as:s,className:pe(E.root,a),ref:n,...g,ownerState:b,children:y})});function wEe(e){return _e("MuiAvatarGroup",e)}const xEe=Le("MuiAvatarGroup",["root","avatar"]),T3={small:-16,medium:-8},SEe=e=>{const{classes:t}=e;return Te({root:["root"],avatar:["avatar"]},wEe,t)},CEe=ie("div",{name:"MuiAvatarGroup",slot:"Root",overridesResolver:(e,t)=>[{[`& .${xEe.avatar}`]:t.avatar},t.root]})(tt(({theme:e})=>({display:"flex",flexDirection:"row-reverse",[`& .${hEe.root}`]:{border:`2px solid ${(e.vars||e).palette.background.default}`,boxSizing:"content-box",marginLeft:"var(--AvatarGroup-spacing, -8px)","&:last-child":{marginLeft:0}}}))),PEe=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiAvatarGroup"}),{children:o,className:i,component:a="div",componentsProps:s,max:l=5,renderSurplus:c,slotProps:u={},slots:d={},spacing:f="medium",total:p,variant:m="circular",...g}=r;let y=l<2?2:l;const b={...r,max:l,spacing:f,component:a,variant:m},x=SEe(b),S=v.Children.toArray(o).filter(_=>v.isValidElement(_)),P=p||S.length;P===y&&(y+=1),y=Math.min(P+1,y);const E=Math.min(S.length,y-1),T=Math.max(P-y,P-E,0),O=c?c(T):`+${T}`,k=b.spacing&&T3[b.spacing]!==void 0?T3[b.spacing]:-b.spacing||-8,M={slots:d,slotProps:{surplus:u.additionalAvatar??(s==null?void 0:s.additionalAvatar),...s,...u}},[I,R]=dn("surplus",{elementType:Yl,externalForwardedProps:M,className:x.avatar,ownerState:b,additionalProps:{variant:m}});return $.jsxs(CEe,{as:a,ownerState:b,className:pe(x.root,i),ref:n,...g,style:{"--AvatarGroup-spacing":k?`${k}px`:void 0,...g.style},children:[T?$.jsx(I,{...R,children:O}):null,S.slice(0,E).reverse().map(_=>v.cloneElement(_,{className:pe(_.props.className,x.avatar),variant:_.props.variant||m}))]})}),EEe={entering:{opacity:1},entered:{opacity:1}},xv=v.forwardRef(function(t,n){const r=Ao(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:g,style:y,timeout:b=o,TransitionComponent:x=rs,...S}=t,P=v.useRef(null),E=Wt(P,Tf(s),n),T=B=>L=>{if(B){const F=P.current;L===void 0?B(F):B(F,L)}},O=T(f),k=T((B,L)=>{pF(B);const F=vf({style:y,timeout:b,easing:l},{mode:"enter"});B.style.webkitTransition=r.transitions.create("opacity",F),B.style.transition=r.transitions.create("opacity",F),u&&u(B,L)}),M=T(d),I=T(g),R=T(B=>{const L=vf({style:y,timeout:b,easing:l},{mode:"exit"});B.style.webkitTransition=r.transitions.create("opacity",L),B.style.transition=r.transitions.create("opacity",L),p&&p(B)}),_=T(m),N=B=>{i&&i(P.current,B)};return $.jsx(x,{appear:a,in:c,nodeRef:P,onEnter:k,onEntered:M,onEntering:O,onExit:R,onExited:_,onExiting:I,addEndListener:N,timeout:b,...S,children:(B,{ownerState:L,...F})=>v.cloneElement(s,{style:{opacity:0,visibility:B==="exited"&&!c?"hidden":void 0,...EEe[B],...y,...s.props.style},ref:E,...F})})});function TEe(e){return _e("MuiBackdrop",e)}Le("MuiBackdrop",["root","invisible"]);const OEe=e=>{const{classes:t,invisible:n}=e;return Te({root:["root",n&&"invisible"]},TEe,t)},IEe=ie("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),bJ=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiBackdrop"}),{children:o,className:i,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:d={},slots:f={},TransitionComponent:p,transitionDuration:m,...g}=r,y={...r,component:a,invisible:s},b=OEe(y),x={transition:p,root:c.Root,...f},S={...u,...d},P={slots:x,slotProps:S},[E,T]=dn("root",{elementType:IEe,externalForwardedProps:P,className:pe(b.root,i),ownerState:y}),[O,k]=dn("transition",{elementType:xv,externalForwardedProps:P,ownerState:y});return $.jsx(O,{in:l,timeout:m,...g,...k,children:$.jsx(E,{"aria-hidden":!0,...T,classes:b,ref:n,children:o})})});function kEe(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=pN({badgeContent:t,max:r});let a=n;n===!1&&t===0&&!o&&(a=!0);const{badgeContent:s,max:l=r}=a?i:e,c=s&&Number(s)>l?`${l}+`:s;return{badgeContent:s,invisible:a,max:l,displayValue:c}}function MEe(e){return _e("MuiBadge",e)}const yd=Le("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),YA=10,XA=4,AEe=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Se(n.vertical)}${Se(n.horizontal)}`,`anchorOrigin${Se(n.vertical)}${Se(n.horizontal)}${Se(o)}`,`overlap${Se(o)}`,t!=="default"&&`color${Se(t)}`]};return Te(s,MEe,a)},$Ee=ie("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),REe=ie("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Se(n.anchorOrigin.vertical)}${Se(n.anchorOrigin.horizontal)}${Se(n.overlap)}`],n.color!=="default"&&t[`color${Se(n.color)}`],n.invisible&&t.invisible]}})(tt(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:YA*2,lineHeight:1,padding:"0 6px",height:YA*2,borderRadius:YA,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(Hn(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:XA,height:XA*2,minWidth:XA*2,padding:0}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${yd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function O3(e){return{vertical:(e==null?void 0:e.vertical)??"top",horizontal:(e==null?void 0:e.horizontal)??"right"}}const DEe=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiBadge"}),{anchorOrigin:o,className:i,classes:a,component:s,components:l={},componentsProps:c={},children:u,overlap:d="rectangular",color:f="default",invisible:p=!1,max:m=99,badgeContent:g,slots:y,slotProps:b,showZero:x=!1,variant:S="standard",...P}=r,{badgeContent:E,invisible:T,max:O,displayValue:k}=kEe({max:m,invisible:p,badgeContent:g,showZero:x}),M=pN({anchorOrigin:O3(o),color:f,overlap:d,variant:S,badgeContent:g}),I=T||E==null&&S!=="dot",{color:R=f,overlap:_=d,anchorOrigin:N,variant:B=S}=I?M:r,L=O3(N),F=B!=="dot"?k:void 0,U={...r,badgeContent:E,invisible:I,max:O,displayValue:F,showZero:x,anchorOrigin:L,color:R,overlap:_,variant:B},V=AEe(U),z=(y==null?void 0:y.root)??l.Root??$Ee,W=(y==null?void 0:y.badge)??l.Badge??REe,G=(b==null?void 0:b.root)??c.root,J=(b==null?void 0:b.badge)??c.badge,K=on({elementType:z,externalSlotProps:G,externalForwardedProps:P,additionalProps:{ref:n,as:s},ownerState:U,className:pe(G==null?void 0:G.className,V.root,i)}),ne=on({elementType:W,externalSlotProps:J,ownerState:U,className:pe(V.badge,J==null?void 0:J.className)});return $.jsxs(z,{...K,children:[u,$.jsx(W,{...ne,children:F})]})}),_Ee=Le("MuiBox",["root"]),LEe=rS(),Ln=vbe({themeId:Hs,defaultTheme:LEe,defaultClassName:_Ee.root,generateClassName:gY.generate});function NEe(e){return _e("MuiButton",e)}const km=Le("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),wJ=v.createContext({}),xJ=v.createContext(void 0),FEe=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e,s={root:["root",i,`${i}${Se(t)}`,`size${Se(o)}`,`${i}Size${Se(o)}`,`color${Se(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${Se(o)}`],endIcon:["icon","endIcon",`iconSize${Se(o)}`]},l=Te(s,NEe,a);return{...a,...l}},SJ=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],jEe=ie(Hi,{shouldForwardProp:e=>ii(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Se(n.color)}`],t[`size${Se(n.size)}`],t[`${n.variant}Size${Se(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(tt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${km.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${km.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${km.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${km.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(Hn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[r].mainChannel} / 0.5)`:vt(e.palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette[r].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette[r].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${km.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${km.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}}]}})),BEe=ie("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Se(n.size)}`]]}})({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},...SJ]}),zEe=ie("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Se(n.size)}`]]}})({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},...SJ]}),yt=v.forwardRef(function(t,n){const r=v.useContext(wJ),o=v.useContext(xJ),i=ih(r,t),a=rt({props:i,name:"MuiButton"}),{children:s,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:f=!1,disableFocusRipple:p=!1,endIcon:m,focusVisibleClassName:g,fullWidth:y=!1,size:b="medium",startIcon:x,type:S,variant:P="text",...E}=a,T={...a,color:l,component:c,disabled:d,disableElevation:f,disableFocusRipple:p,fullWidth:y,size:b,type:S,variant:P},O=FEe(T),k=x&&$.jsx(BEe,{className:O.startIcon,ownerState:T,children:x}),M=m&&$.jsx(zEe,{className:O.endIcon,ownerState:T,children:m}),I=o||"";return $.jsxs(jEe,{ownerState:T,className:pe(r.className,O.root,u,I),component:c,disabled:d,focusRipple:!p,focusVisibleClassName:pe(O.focusVisible,g),ref:n,type:S,...E,classes:O,children:[k,s,M]})});function VEe(e){return _e("MuiButtonGroup",e)}const un=Le("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),HEe=(e,t)=>{const{ownerState:n}=e;return[{[`& .${un.grouped}`]:t.grouped},{[`& .${un.grouped}`]:t[`grouped${Se(n.orientation)}`]},{[`& .${un.grouped}`]:t[`grouped${Se(n.variant)}`]},{[`& .${un.grouped}`]:t[`grouped${Se(n.variant)}${Se(n.orientation)}`]},{[`& .${un.grouped}`]:t[`grouped${Se(n.variant)}${Se(n.color)}`]},{[`& .${un.firstButton}`]:t.firstButton},{[`& .${un.lastButton}`]:t.lastButton},{[`& .${un.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},UEe=e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:i,orientation:a,variant:s}=e,l={root:["root",s,a,i&&"fullWidth",o&&"disableElevation",`color${Se(n)}`],grouped:["grouped",`grouped${Se(a)}`,`grouped${Se(s)}`,`grouped${Se(s)}${Se(a)}`,`grouped${Se(s)}${Se(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Te(l,VEe,t)},WEe=ie("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:HEe})(tt(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${un.lastButton},& .${un.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${un.firstButton},& .${un.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${un.firstButton},& .${un.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${un.lastButton},& .${un.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${un.firstButton},& .${un.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${un.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${un.firstButton},& .${un.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${un.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(Hn()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${un.firstButton},& .${un.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:vt(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${un.firstButton},& .${un.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${un.lastButton},& .${un.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${un.firstButton},& .${un.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${un.lastButton},& .${un.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${un.firstButton},& .${un.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${un.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${un.firstButton},& .${un.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${un.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(Hn(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${un.firstButton},& .${un.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${un.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),GEe=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiButtonGroup"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:d=!1,fullWidth:f=!1,orientation:p="horizontal",size:m="medium",variant:g="outlined",...y}=r,b={...r,color:a,component:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,orientation:p,size:m,variant:g},x=UEe(b),S=v.useMemo(()=>({className:x.grouped,color:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,size:m,variant:g}),[a,l,c,u,d,f,m,g,x.grouped]),P=TY(o),E=P.length,T=O=>{const k=O===0,M=O===E-1;return k&&M?"":k?x.firstButton:M?x.lastButton:x.middleButton};return $.jsx(WEe,{as:s,role:"group",className:pe(x.root,i),ref:n,ownerState:b,...y,children:$.jsx(wJ.Provider,{value:S,children:P.map((O,k)=>$.jsx(xJ.Provider,{value:T(k),children:O},k))})})});function qEe(e){return _e("MuiCard",e)}Le("MuiCard",["root"]);const KEe=e=>{const{classes:t}=e;return Te({root:["root"]},qEe,t)},YEe=ie(so,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),io=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiCard"}),{className:o,raised:i=!1,...a}=r,s={...r,raised:i},l=KEe(s);return $.jsx(YEe,{className:pe(l.root,o),elevation:i?8:void 0,ref:n,ownerState:s,...a})});function XEe(e){return _e("MuiCardActionArea",e)}const QA=Le("MuiCardActionArea",["root","focusVisible","focusHighlight"]),QEe=e=>{const{classes:t}=e;return Te({root:["root"],focusHighlight:["focusHighlight"]},XEe,t)},JEe=ie(Hi,{name:"MuiCardActionArea",slot:"Root",overridesResolver:(e,t)=>t.root})(tt(({theme:e})=>({display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${QA.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${QA.focusVisible} .${QA.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}}))),ZEe=ie("span",{name:"MuiCardActionArea",slot:"FocusHighlight",overridesResolver:(e,t)=>t.focusHighlight})(tt(({theme:e})=>({overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}))),eTe=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiCardActionArea"}),{children:o,className:i,focusVisibleClassName:a,...s}=r,l=r,c=QEe(l);return $.jsxs(JEe,{className:pe(c.root,i),focusVisibleClassName:pe(a,c.focusVisible),ref:n,ownerState:l,...s,children:[o,$.jsx(ZEe,{className:c.focusHighlight,ownerState:l})]})});function tTe(e){return _e("MuiCardActions",e)}Le("MuiCardActions",["root","spacing"]);const nTe=e=>{const{classes:t,disableSpacing:n}=e;return Te({root:["root",!n&&"spacing"]},tTe,t)},rTe=ie("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),os=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiCardActions"}),{disableSpacing:o=!1,className:i,...a}=r,s={...r,disableSpacing:o},l=nTe(s);return $.jsx(rTe,{className:pe(l.root,i),ownerState:s,ref:n,...a})});function oTe(e){return _e("MuiCardContent",e)}Le("MuiCardContent",["root"]);const iTe=e=>{const{classes:t}=e;return Te({root:["root"]},oTe,t)},aTe=ie("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),wi=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiCardContent"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=iTe(s);return $.jsx(aTe,{as:i,className:pe(l.root,o),ownerState:s,ref:n,...a})});function sTe(e){return _e("MuiCardHeader",e)}const TE=Le("MuiCardHeader",["root","avatar","action","content","title","subheader"]),lTe=e=>{const{classes:t}=e;return Te({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},sTe,t)},cTe=ie("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>[{[`& .${TE.title}`]:t.title},{[`& .${TE.subheader}`]:t.subheader},t.root]})({display:"flex",alignItems:"center",padding:16}),uTe=ie("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),dTe=ie("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),fTe=ie("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto",[`.${SE.root}:where(& .${TE.title})`]:{display:"block"},[`.${SE.root}:where(& .${TE.subheader})`]:{display:"block"}}),Zl=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiCardHeader"}),{action:o,avatar:i,className:a,component:s="div",disableTypography:l=!1,subheader:c,subheaderTypographyProps:u,title:d,titleTypographyProps:f,...p}=r,m={...r,component:s,disableTypography:l},g=lTe(m);let y=d;y!=null&&y.type!==ut&&!l&&(y=$.jsx(ut,{variant:i?"body2":"h5",className:g.title,component:"span",...f,children:y}));let b=c;return b!=null&&b.type!==ut&&!l&&(b=$.jsx(ut,{variant:i?"body2":"body1",className:g.subheader,color:"textSecondary",component:"span",...u,children:b})),$.jsxs(cTe,{className:pe(g.root,a),as:s,ref:n,ownerState:m,...p,children:[i&&$.jsx(uTe,{className:g.avatar,ownerState:m,children:i}),$.jsxs(fTe,{className:g.content,ownerState:m,children:[y,b]}),o&&$.jsx(dTe,{className:g.action,ownerState:m,children:o})]})});function pTe(e){return _e("MuiCardMedia",e)}Le("MuiCardMedia",["root","media","img"]);const hTe=e=>{const{classes:t,isMediaComponent:n,isImageComponent:r}=e;return Te({root:["root",n&&"media",r&&"img"]},pTe,t)},mTe=ie("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{isMediaComponent:r,isImageComponent:o}=n;return[t.root,r&&t.media,o&&t.img]}})({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",variants:[{props:{isMediaComponent:!0},style:{width:"100%"}},{props:{isImageComponent:!0},style:{objectFit:"cover"}}]}),gTe=["video","audio","picture","iframe","img"],yTe=["picture","img"],_c=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiCardMedia"}),{children:o,className:i,component:a="div",image:s,src:l,style:c,...u}=r,d=gTe.includes(a),f=!d&&s?{backgroundImage:`url("${s}")`,...c}:c,p={...r,component:a,isMediaComponent:d,isImageComponent:yTe.includes(a)},m=hTe(p);return $.jsx(mTe,{className:pe(m.root,i),as:a,role:!d&&s?"img":void 0,ref:n,style:f,ownerState:p,src:d?s||l:void 0,...u,children:o})});function vTe(e){return _e("PrivateSwitchBase",e)}Le("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const bTe=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${Se(o)}`],input:["input"]};return Te(i,vTe,t)},wTe=ie(Hi)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),xTe=ie("input",{shouldForwardProp:ii})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),CJ=v.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,className:a,defaultChecked:s,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:d,id:f,inputProps:p,inputRef:m,name:g,onBlur:y,onChange:b,onFocus:x,readOnly:S,required:P=!1,tabIndex:E,type:T,value:O,...k}=t,[M,I]=bi({controlled:o,default:!!s,name:"SwitchBase",state:"checked"}),R=wa(),_=z=>{x&&x(z),R&&R.onFocus&&R.onFocus(z)},N=z=>{y&&y(z),R&&R.onBlur&&R.onBlur(z)},B=z=>{if(z.nativeEvent.defaultPrevented)return;const W=z.target.checked;I(W),b&&b(z,W)};let L=l;R&&typeof L>"u"&&(L=R.disabled);const F=T==="checkbox"||T==="radio",U={...t,checked:M,disabled:L,disableFocusRipple:c,edge:u},V=bTe(U);return $.jsxs(wTe,{component:"span",className:pe(V.root,a),centerRipple:!0,focusRipple:!c,disabled:L,tabIndex:null,role:void 0,onFocus:_,onBlur:N,ownerState:U,ref:n,...k,children:[$.jsx(xTe,{autoFocus:r,checked:o,defaultChecked:s,className:V.input,disabled:L,id:F?f:void 0,name:g,onChange:B,readOnly:S,ref:m,required:P,ownerState:U,tabIndex:E,type:T,...T==="checkbox"&&O===void 0?{}:{value:O},...p}),M?i:d]})}),STe=lt($.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),CTe=lt($.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),PTe=lt($.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function ETe(e){return _e("MuiCheckbox",e)}const JA=Le("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),TTe=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${Se(r)}`,`size${Se(o)}`]},a=Te(i,ETe,t);return{...t,...a}},OTe=ie(CJ,{shouldForwardProp:e=>ii(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Se(n.size)}`],n.color!=="default"&&t[`color${Se(n.color)}`]]}})(tt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Hn()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Hn()).map(([t])=>({props:{color:t},style:{[`&.${JA.checked}, &.${JA.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${JA.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),ITe=$.jsx(CTe,{}),kTe=$.jsx(STe,{}),MTe=$.jsx(PTe,{}),ATe=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiCheckbox"}),{checkedIcon:o=ITe,color:i="primary",icon:a=kTe,indeterminate:s=!1,indeterminateIcon:l=MTe,inputProps:c,size:u="medium",disableRipple:d=!1,className:f,...p}=r,m=s?l:a,g=s?l:o,y={...r,disableRipple:d,color:i,indeterminate:s,size:u},b=TTe(y);return $.jsx(OTe,{type:"checkbox",inputProps:{"data-indeterminate":s,...c},icon:v.cloneElement(m,{fontSize:m.props.fontSize??u}),checkedIcon:v.cloneElement(g,{fontSize:g.props.fontSize??u}),ownerState:y,ref:n,className:pe(b.root,f),disableRipple:d,...p,classes:b})});function $Te(e){return _e("MuiCircularProgress",e)}Le("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const vd=44,q2=jc` 0% { transform: rotate(0deg); } @@ -175,7 +167,7 @@ Error generating stack: `+i.message+` 100% { transform: rotate(360deg); } -`,X2=jc` +`,K2=jc` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; @@ -190,11 +182,11 @@ Error generating stack: `+i.message+` stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } -`,FEe=typeof Y2!="string"?Tf` - animation: ${Y2} 1.4s linear infinite; - `:null,jEe=typeof X2!="string"?Tf` - animation: ${X2} 1.4s ease-in-out infinite; - `:null,BEe=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${Se(r)}`],svg:["svg"],circle:["circle",`circle${Se(n)}`,o&&"circleDisableShrink"]};return Te(i,LEe,t)},zEe=oe("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Se(n.color)}`]]}})(rt(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:FEe||{animation:`${Y2} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),VEe=oe("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),HEe=oe("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Se(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(rt(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:jEe||{animation:`${X2} 1.4s ease-in-out infinite`}}]}))),IJ=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate",...f}=r,p={...r,color:i,disableShrink:a,size:s,thickness:c,value:u,variant:d},m=BEe(p),g={},v={},w={};if(d==="determinate"){const x=2*Math.PI*((vd-c)/2);g.strokeDasharray=x.toFixed(3),w["aria-valuenow"]=Math.round(u),g.strokeDashoffset=`${((100-u)/100*x).toFixed(3)}px`,v.transform="rotate(-90deg)"}return $.jsx(zEe,{className:fe(m.root,o),style:{width:s,height:s,...v,...l},ownerState:p,ref:n,role:"progressbar",...w,...f,children:$.jsx(VEe,{className:m.svg,ownerState:p,viewBox:`${vd/2} ${vd/2} ${vd} ${vd}`,children:$.jsx(HEe,{className:m.circle,style:g,ownerState:p,cx:vd,cy:vd,r:(vd-c)/2,fill:"none",strokeWidth:c})})})});function O3(e){return e.substring(2).toLowerCase()}function UEe(e,t){return t.documentElement.clientWidth(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=Wt(Ef(t),s),d=et(m=>{const g=c.current;c.current=!1;const v=pr(s.current);if(!l.current||!s.current||"clientX"in m&&UEe(m,v))return;if(a.current){a.current=!1;return}let w;m.composedPath?w=m.composedPath().includes(s.current):w=!v.documentElement.contains(m.target)||s.current.contains(m.target),!w&&(n||!g)&&o(m)}),f=m=>g=>{c.current=!0;const v=t.props[m];v&&v(g)},p={ref:u};return i!==!1&&(p[i]=f(i)),y.useEffect(()=>{if(i!==!1){const m=O3(i),g=pr(s.current),v=()=>{a.current=!0};return g.addEventListener(m,d),g.addEventListener("touchmove",v),()=>{g.removeEventListener(m,d),g.removeEventListener("touchmove",v)}}},[d,i]),r!==!1&&(p[r]=f(r)),y.useEffect(()=>{if(r!==!1){const m=O3(r),g=pr(s.current);return g.addEventListener(m,d),()=>{g.removeEventListener(m,d)}}},[d,r]),y.cloneElement(t,p)}const Vu=g0e({createStyledComponent:oe("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Se(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>at({props:e,name:"MuiContainer"})});function WEe(e){const t=pr(e);return t.body===e?ba(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function X0(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function I3(e){return parseInt(ba(e).getComputedStyle(e).paddingRight,10)||0}function GEe(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function k3(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,a=>{const s=!i.includes(a),l=!GEe(a);s&&l&&X0(a,o)})}function n$(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function qEe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(WEe(r)){const a=kY(ba(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${I3(r)+a}px`;const s=pr(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${I3(l)+a}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=pr(r).body;else{const a=r.parentElement,s=ba(r);i=(a==null?void 0:a.nodeName)==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:s})=>{i?a.style.setProperty(s,i):a.style.removeProperty(s)})}}function KEe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class YEe{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&X0(t.modalRef,!1);const o=KEe(n);k3(n,t.mount,t.modalRef,o,!0);const i=n$(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=n$(this.containers,i=>i.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=qEe(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=n$(this.containers,a=>a.modals.includes(t)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&X0(t.modalRef,n),k3(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&X0(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const XEe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function QEe(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function JEe(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function ZEe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||JEe(e))}function eOe(e){const t=[],n=[];return Array.from(e.querySelectorAll(XEe)).forEach((r,o)=>{const i=QEe(r);i===-1||!ZEe(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function tOe(){return!0}function kF(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=eOe,isEnabled:a=tOe,open:s}=e,l=y.useRef(!1),c=y.useRef(null),u=y.useRef(null),d=y.useRef(null),f=y.useRef(null),p=y.useRef(!1),m=y.useRef(null),g=Wt(Ef(t),m),v=y.useRef(null);y.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),y.useEffect(()=>{if(!s||!m.current)return;const S=pr(m.current);return m.current.contains(S.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),p.current&&m.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),y.useEffect(()=>{if(!s||!m.current)return;const S=pr(m.current),P=O=>{v.current=O,!(r||!a()||O.key!=="Tab")&&S.activeElement===m.current&&O.shiftKey&&(l.current=!0,u.current&&u.current.focus())},T=()=>{var A,I;const O=m.current;if(O===null)return;if(!S.hasFocus()||!a()||l.current){l.current=!1;return}if(O.contains(S.activeElement)||r&&S.activeElement!==c.current&&S.activeElement!==u.current)return;if(S.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let k=[];if((S.activeElement===c.current||S.activeElement===u.current)&&(k=i(m.current)),k.length>0){const R=!!((A=v.current)!=null&&A.shiftKey&&((I=v.current)==null?void 0:I.key)==="Tab"),L=k[0],F=k[k.length-1];typeof L!="string"&&typeof F!="string"&&(R?F.focus():L.focus())}else O.focus()};S.addEventListener("focusin",T),S.addEventListener("keydown",P,!0);const E=setInterval(()=>{S.activeElement&&S.activeElement.tagName==="BODY"&&T()},50);return()=>{clearInterval(E),S.removeEventListener("focusin",T),S.removeEventListener("keydown",P,!0)}},[n,r,o,a,s,i]);const w=S=>{d.current===null&&(d.current=S.relatedTarget),p.current=!0,f.current=S.target;const P=t.props.onFocus;P&&P(S)},x=S=>{d.current===null&&(d.current=S.relatedTarget),p.current=!0};return $.jsxs(y.Fragment,{children:[$.jsx("div",{tabIndex:s?0:-1,onFocus:x,ref:c,"data-testid":"sentinelStart"}),y.cloneElement(t,{ref:g,onFocus:w}),$.jsx("div",{tabIndex:s?0:-1,onFocus:x,ref:u,"data-testid":"sentinelEnd"})]})}function nOe(e){return typeof e=="function"?e():e}function rOe(e){return e?e.props.hasOwnProperty("in"):!1}const M3=()=>{},wC=new YEe;function oOe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,d=y.useRef({}),f=y.useRef(null),p=y.useRef(null),m=Wt(p,u),[g,v]=y.useState(!c),w=rOe(s);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const S=()=>pr(f.current),P=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),T=()=>{wC.mount(P(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},E=et(()=>{const _=nOe(t)||S().body;wC.add(P(),_),p.current&&T()}),O=()=>wC.isTopModal(P()),k=et(_=>{f.current=_,_&&(c&&O()?T():p.current&&X0(p.current,x))}),A=y.useCallback(()=>{wC.remove(P(),x)},[x]);y.useEffect(()=>()=>{A()},[A]),y.useEffect(()=>{c?E():(!w||!o)&&A()},[c,A,w,o,E]);const I=_=>D=>{var H;(H=_.onKeyDown)==null||H.call(_,D),!(D.key!=="Escape"||D.which===229||!O())&&(n||(D.stopPropagation(),l&&l(D,"escapeKeyDown")))},R=_=>D=>{var H;(H=_.onClick)==null||H.call(_,D),D.target===D.currentTarget&&l&&l(D,"backdropClick")};return{getRootProps:(_={})=>{const D=qP(e);delete D.onTransitionEnter,delete D.onTransitionExited;const H={...D,..._};return{role:"presentation",...H,onKeyDown:I(H),ref:m}},getBackdropProps:(_={})=>{const D=_;return{"aria-hidden":!0,...D,onClick:R(D),open:c}},getTransitionProps:()=>{const _=()=>{v(!1),i&&i()},D=()=>{v(!0),a&&a(),o&&A()};return{onEnter:CH(_,(s==null?void 0:s.props.onEnter)??M3),onExited:CH(D,(s==null?void 0:s.props.onExited)??M3)}},rootRef:m,portalRef:k,isTopModal:O,exited:g,hasTransition:w}}function iOe(e){return Ne("MuiModal",e)}Le("MuiModal",["root","hidden","backdrop"]);const aOe=e=>{const{open:t,exited:n,classes:r}=e;return Te({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},iOe,r)},sOe=oe("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(rt(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),lOe=oe(CJ,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Pv=y.forwardRef(function(t,n){const r=at({name:"MuiModal",props:t}),{BackdropComponent:o=lOe,BackdropProps:i,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:d,components:f={},componentsProps:p={},disableAutoFocus:m=!1,disableEnforceFocus:g=!1,disableEscapeKeyDown:v=!1,disablePortal:w=!1,disableRestoreFocus:x=!1,disableScrollLock:S=!1,hideBackdrop:P=!1,keepMounted:T=!1,onBackdropClick:E,onClose:O,onTransitionEnter:k,onTransitionExited:A,open:I,slotProps:R={},slots:L={},theme:F,...z}=r,_={...r,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:g,disableEscapeKeyDown:v,disablePortal:w,disableRestoreFocus:x,disableScrollLock:S,hideBackdrop:P,keepMounted:T},{getRootProps:D,getBackdropProps:H,getTransitionProps:B,portalRef:V,isTopModal:W,exited:G,hasTransition:Q}=oOe({..._,rootRef:n}),Y={..._,exited:G},ne=aOe(Y),ie={};if(c.props.tabIndex===void 0&&(ie.tabIndex="-1"),Q){const{onEnter:Z,onExited:ue}=B();ie.onEnter=Z,ie.onExited=ue}const re={...z,slots:{root:f.Root,backdrop:f.Backdrop,...L},slotProps:{...p,...R}},[pe,le]=Kn("root",{elementType:sOe,externalForwardedProps:re,getSlotProps:D,additionalProps:{ref:n,as:d},ownerState:Y,className:fe(s,ne==null?void 0:ne.root,!Y.open&&Y.exited&&(ne==null?void 0:ne.hidden))}),[ee,ce]=Kn("backdrop",{elementType:o,externalForwardedProps:re,additionalProps:i,getSlotProps:Z=>H({...Z,onClick:ue=>{E&&E(ue),Z!=null&&Z.onClick&&Z.onClick(ue)}}),className:fe(i==null?void 0:i.className,ne==null?void 0:ne.backdrop),ownerState:Y}),se=Wt(i==null?void 0:i.ref,ce.ref);return!T&&!I&&(!Q||G)?null:$.jsx(xJ,{ref:V,container:u,disablePortal:w,children:$.jsxs(pe,{...le,children:[!P&&o?$.jsx(ee,{...ce,ref:se}):null,$.jsx(kF,{disableEnforceFocus:g,disableAutoFocus:m,disableRestoreFocus:x,isEnabled:W,open:I,children:y.cloneElement(c,ie)})]})})});function cOe(e){return Ne("MuiDialog",e)}const Q0=Le("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),kJ=y.createContext({}),uOe=oe(CJ,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),dOe=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${Se(n)}`],paper:["paper",`paperScroll${Se(n)}`,`paperWidth${Se(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Te(a,cOe,t)},fOe=oe(Pv,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),pOe=oe("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Se(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),hOe=oe(io,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Se(n.scroll)}`],t[`paperWidth${Se(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(rt(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Q0.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${Q0.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+32*2)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Q0.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),MJ=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiDialog"}),o=ko(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:u,children:d,className:f,disableEscapeKeyDown:p=!1,fullScreen:m=!1,fullWidth:g=!1,maxWidth:v="sm",onBackdropClick:w,onClick:x,onClose:S,open:P,PaperComponent:T=io,PaperProps:E={},scroll:O="paper",TransitionComponent:k=Cv,transitionDuration:A=i,TransitionProps:I,...R}=r,L={...r,disableEscapeKeyDown:p,fullScreen:m,fullWidth:g,maxWidth:v,scroll:O},F=dOe(L),z=y.useRef(),_=V=>{z.current=V.target===V.currentTarget},D=V=>{x&&x(V),z.current&&(z.current=null,w&&w(V),S&&S(V,"backdropClick"))},H=Ln(s),B=y.useMemo(()=>({titleId:H}),[H]);return $.jsx(fOe,{className:fe(F.root,f),closeAfterTransition:!0,components:{Backdrop:uOe},componentsProps:{backdrop:{transitionDuration:A,as:c,...u}},disableEscapeKeyDown:p,onClose:S,open:P,ref:n,onClick:D,ownerState:L,...R,children:$.jsx(k,{appear:!0,in:P,timeout:A,role:"presentation",...I,children:$.jsx(pOe,{className:fe(F.container),onMouseDown:_,ownerState:L,children:$.jsx(hOe,{as:T,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":H,"aria-modal":l,...E,className:fe(F.paper,E.className),ownerState:L,children:$.jsx(kJ.Provider,{value:B,children:d})})})})})});function mOe(e){return Ne("MuiDialogActions",e)}Le("MuiDialogActions",["root","spacing"]);const gOe=e=>{const{classes:t,disableSpacing:n}=e;return Te({root:["root",!n&&"spacing"]},mOe,t)},yOe=oe("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),AJ=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...a}=r,s={...r,disableSpacing:i},l=gOe(s);return $.jsx(yOe,{className:fe(l.root,o),ownerState:s,ref:n,...a})});function vOe(e){return Ne("MuiDialogContent",e)}Le("MuiDialogContent",["root","dividers"]);function bOe(e){return Ne("MuiDialogTitle",e)}const wOe=Le("MuiDialogTitle",["root"]),xOe=e=>{const{classes:t,dividers:n}=e;return Te({root:["root",n&&"dividers"]},vOe,t)},SOe=oe("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(rt(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${wOe.root} + &`]:{paddingTop:0}}}]}))),$J=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...a}=r,s={...r,dividers:i},l=xOe(s);return $.jsx(SOe,{className:fe(l.root,o),ownerState:s,ref:n,...a})}),COe=e=>{const{classes:t}=e;return Te({root:["root"]},bOe,t)},POe=oe(dt,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),TOe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiDialogTitle"}),{className:o,id:i,...a}=r,s=r,l=COe(s),{titleId:c=i}=y.useContext(kJ);return $.jsx(POe,{component:"h2",className:fe(l.root,o),ownerState:s,ref:n,variant:"h6",id:i??c,...a})});function EOe(e){return Ne("MuiDivider",e)}const A3=Le("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),OOe=e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return Te({root:["root",t&&"absolute",l,i&&"light",a==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",s==="right"&&a!=="vertical"&&"textAlignRight",s==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},EOe,r)},IOe=oe("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(rt(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:vt(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),kOe=oe("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(rt(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),Za=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:a,orientation:s="horizontal",component:l=i||s==="vertical"?"div":"hr",flexItem:c=!1,light:u=!1,role:d=l!=="hr"?"separator":void 0,textAlign:f="center",variant:p="fullWidth",...m}=r,g={...r,absolute:o,component:l,flexItem:c,light:u,orientation:s,role:d,textAlign:f,variant:p},v=OOe(g);return $.jsx(IOe,{as:l,className:fe(v.root,a),role:d,ref:n,ownerState:g,"aria-orientation":d==="separator"&&(l!=="hr"||s==="vertical")?s:void 0,...m,children:i?$.jsx(kOe,{className:v.wrapper,ownerState:g,children:i}):null})});Za&&(Za.muiSkipListHighlight=!0);function MOe(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=ba(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const c=i.getComputedStyle(t);a=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let s=0,l=0;if(a&&a!=="none"&&typeof a=="string"){const c=a.split("(")[1].split(")")[0].split(",");s=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?o?`translateX(${o.right+s-r.left}px)`:`translateX(${i.innerWidth+s-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:e==="up"?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function AOe(e){return typeof e=="function"?e():e}function xC(e,t,n){const r=AOe(n),o=MOe(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const $Oe=y.forwardRef(function(t,n){const r=ko(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:c,direction:u="down",easing:d=o,in:f,onEnter:p,onEntered:m,onEntering:g,onExit:v,onExited:w,onExiting:x,style:S,timeout:P=i,TransitionComponent:T=is,...E}=t,O=y.useRef(null),k=Wt(Ef(l),O,n),A=B=>V=>{B&&(V===void 0?B(O.current):B(O.current,V))},I=A((B,V)=>{xC(u,B,c),yF(B),p&&p(B,V)}),R=A((B,V)=>{const W=vf({timeout:P,style:S,easing:d},{mode:"enter"});B.style.webkitTransition=r.transitions.create("-webkit-transform",{...W}),B.style.transition=r.transitions.create("transform",{...W}),B.style.webkitTransform="none",B.style.transform="none",g&&g(B,V)}),L=A(m),F=A(x),z=A(B=>{const V=vf({timeout:P,style:S,easing:d},{mode:"exit"});B.style.webkitTransition=r.transitions.create("-webkit-transform",V),B.style.transition=r.transitions.create("transform",V),xC(u,B,c),v&&v(B)}),_=A(B=>{B.style.webkitTransition="",B.style.transition="",w&&w(B)}),D=B=>{a&&a(O.current,B)},H=y.useCallback(()=>{O.current&&xC(u,O.current,c)},[u,c]);return y.useEffect(()=>{if(f||u==="down"||u==="right")return;const B=nS(()=>{O.current&&xC(u,O.current,c)}),V=ba(O.current);return V.addEventListener("resize",B),()=>{B.clear(),V.removeEventListener("resize",B)}},[u,f,c]),y.useEffect(()=>{f||H()},[f,H]),$.jsx(T,{nodeRef:O,onEnter:I,onEntered:L,onEntering:R,onExit:z,onExited:_,onExiting:F,addEndListener:D,appear:s,in:f,timeout:P,...E,children:(B,V)=>y.cloneElement(l,{ref:k,style:{visibility:B==="exited"&&!f?"hidden":void 0,...S,...l.props.style},...V})})});function ROe(e){return Ne("MuiDrawer",e)}Le("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const RJ=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},_Oe=e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${Se(n)}`,r!=="temporary"&&`paperAnchorDocked${Se(n)}`]};return Te(o,ROe,t)},DOe=oe(Pv,{name:"MuiDrawer",slot:"Root",overridesResolver:RJ})(rt(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),$3=oe("div",{shouldForwardProp:ri,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:RJ})({flex:"0 0 auto"}),NOe=oe(io,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${Se(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${Se(n.anchor)}`]]}})(rt(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),_J={left:"right",right:"left",top:"down",bottom:"up"};function LOe(e){return["left","right"].includes(e)}function FOe({direction:e},t){return e==="rtl"&&LOe(t)?_J[t]:t}const jOe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiDrawer"}),o=ko(),i=er(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:p,...m}={},onClose:g,open:v=!1,PaperProps:w={},SlideProps:x,TransitionComponent:S=$Oe,transitionDuration:P=a,variant:T="temporary",...E}=r,O=y.useRef(!1);y.useEffect(()=>{O.current=!0},[]);const k=FOe({direction:i?"rtl":"ltr"},s),I={...r,anchor:s,elevation:d,open:v,variant:T,...E},R=_Oe(I),L=$.jsx(NOe,{elevation:T==="temporary"?d:0,square:!0,...w,className:fe(R.paper,w.className),ownerState:I,children:c});if(T==="permanent")return $.jsx($3,{className:fe(R.root,R.docked,u),ownerState:I,ref:n,...E,children:L});const F=$.jsx(S,{in:v,direction:_J[k],timeout:P,appear:O.current,...x,children:L});return T==="persistent"?$.jsx($3,{className:fe(R.root,R.docked,u),ownerState:I,ref:n,...E,children:F}):$.jsx(DOe,{BackdropProps:{...l,...p,transitionDuration:P},className:fe(R.root,R.modal,u),open:v,ownerState:I,onClose:g,hideBackdrop:f,ref:n,...E,...m,children:F})});function BOe(e){return Ne("MuiFab",e)}const R3=Le("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),zOe=e=>{const{color:t,variant:n,classes:r,size:o}=e,i={root:["root",n,`size${Se(o)}`,t==="inherit"?"colorInherit":t]},a=Te(i,BOe,r);return{...r,...a}},VOe=oe(Hi,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>ri(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Se(n.size)}`],n.color==="inherit"&&t.colorInherit,t[Se(n.size)],t[n.color]]}})(rt(({theme:e})=>{var t,n;return{...e.typography.button,minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:(n=(t=e.palette).getContrastText)==null?void 0:n.call(t,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${R3.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]}}),rt(({theme:e})=>({variants:[...Object.entries(e.palette).filter(Bn(["dark","contrastText"])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),rt(({theme:e})=>({[`&.${R3.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),Rh=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiFab"}),{children:o,className:i,color:a="default",component:s="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:d="large",variant:f="circular",...p}=r,m={...r,color:a,component:s,disabled:l,disableFocusRipple:c,size:d,variant:f},g=zOe(m);return $.jsx(VOe,{className:fe(g.root,i),component:s,disabled:l,focusRipple:!c,focusVisibleClassName:fe(g.focusVisible,u),ownerState:m,ref:n,...p,classes:g,children:o})}),HOe=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${Se(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},c=Te(l,nTe,t);return{...t,...c}},UOe=oe(bI,{shouldForwardProp:e=>ri(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...yI(e,t),!n.disableUnderline&&t.underline]}})(rt(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${La.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${La.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${La.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${La.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${La.disabled}, .${La.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${La.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Bn()).map(([a])=>{var s;return{props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),WOe=oe(wI,{name:"MuiFilledInput",slot:"Input",overridesResolver:vI})(rt(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),IT=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...m}=r,g={...r,disableUnderline:o,fullWidth:s,inputComponent:c,multiline:u,type:p},v=HOe(r),w={root:{ownerState:g},input:{ownerState:g}},x=d??a?po(w,d??a):w,S=f.root??i.Root??UOe,P=f.input??i.Input??WOe;return $.jsx(Sv,{slots:{root:S,input:P},slotProps:x,fullWidth:s,inputComponent:c,multiline:u,ref:n,type:p,...m,classes:v})});IT&&(IT.muiName="Input");function GOe(e){return Ne("MuiFormControl",e)}Le("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const qOe=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${Se(n)}`,r&&"fullWidth"]};return Te(o,GOe,t)},KOe=oe("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...t[`margin${Se(e.margin)}`],...e.fullWidth&&t.fullWidth})})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Tv=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:f=!1,margin:p="none",required:m=!1,size:g="medium",variant:v="outlined",...w}=r,x={...r,color:a,component:s,disabled:l,error:c,fullWidth:d,hiddenLabel:f,margin:p,required:m,size:g,variant:v},S=qOe(x),[P,T]=y.useState(()=>{let F=!1;return o&&y.Children.forEach(o,z=>{if(!$g(z,["Input","Select"]))return;const _=$g(z,["Select"])?z.props.input:z;_&&QPe(_.props)&&(F=!0)}),F}),[E,O]=y.useState(()=>{let F=!1;return o&&y.Children.forEach(o,z=>{$g(z,["Input","Select"])&&(ET(z.props,!0)||ET(z.props.inputProps,!0))&&(F=!0)}),F}),[k,A]=y.useState(!1);l&&k&&A(!1);const I=u!==void 0&&!l?u:k;let R;y.useRef(!1);const L=y.useMemo(()=>({adornedStart:P,setAdornedStart:T,color:a,disabled:l,error:c,filled:E,focused:I,fullWidth:d,hiddenLabel:f,size:g,onBlur:()=>{A(!1)},onEmpty:()=>{O(!1)},onFilled:()=>{O(!0)},onFocus:()=>{A(!0)},registerEffect:R,required:m,variant:v}),[P,a,l,c,E,I,d,f,R,m,g,v]);return $.jsx(gI.Provider,{value:L,children:$.jsx(KOe,{as:s,ownerState:x,className:fe(S.root,i),ref:n,...w,children:o})})});function YOe(e){return Ne("MuiFormControlLabel",e)}const E0=Le("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),XOe=e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e,a={root:["root",n&&"disabled",`labelPlacement${Se(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return Te(a,YOe,t)},QOe=oe("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${E0.label}`]:t.label},t.root,t[`labelPlacement${Se(n.labelPlacement)}`]]}})(rt(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${E0.disabled}`]:{cursor:"default"},[`& .${E0.label}`]:{[`&.${E0.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),JOe=oe("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(rt(({theme:e})=>({[`&.${E0.error}`]:{color:(e.vars||e).palette.error.main}}))),mh=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormControlLabel"}),{checked:o,className:i,componentsProps:a={},control:s,disabled:l,disableTypography:c,inputRef:u,label:d,labelPlacement:f="end",name:p,onChange:m,required:g,slots:v={},slotProps:w={},value:x,...S}=r,P=wa(),T=l??s.props.disabled??(P==null?void 0:P.disabled),E=g??s.props.required,O={disabled:T,required:E};["checked","name","onChange","value","inputRef"].forEach(_=>{typeof s.props[_]>"u"&&typeof r[_]<"u"&&(O[_]=r[_])});const k=Rf({props:r,muiFormControl:P,states:["error"]}),A={...r,disabled:T,labelPlacement:f,required:E,error:k.error},I=XOe(A),R={slots:v,slotProps:{...a,...w}},[L,F]=Kn("typography",{elementType:dt,externalForwardedProps:R,ownerState:A});let z=d;return z!=null&&z.type!==dt&&!c&&(z=$.jsx(L,{component:"span",...F,className:fe(I.label,F==null?void 0:F.className),children:z})),$.jsxs(QOe,{className:fe(I.root,i),ownerState:A,ref:n,...S,children:[y.cloneElement(s,O),E?$.jsxs("div",{children:[z,$.jsxs(JOe,{ownerState:A,"aria-hidden":!0,className:I.asterisk,children:[" ","*"]})]}):z]})});function ZOe(e){return Ne("MuiFormGroup",e)}Le("MuiFormGroup",["root","row","error"]);const eIe=e=>{const{classes:t,row:n,error:r}=e;return Te({root:["root",n&&"row",r&&"error"]},ZOe,t)},tIe=oe("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),Hw=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormGroup"}),{className:o,row:i=!1,...a}=r,s=wa(),l=Rf({props:r,muiFormControl:s,states:["error"]}),c={...r,row:i,error:l.error},u=eIe(c);return $.jsx(tIe,{className:fe(u.root,o),ownerState:c,ref:n,...a})});function nIe(e){return Ne("MuiFormHelperText",e)}const _3=Le("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var D3;const rIe=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e,c={root:["root",o&&"disabled",i&&"error",r&&`size${Se(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return Te(c,nIe,t)},oIe=oe("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Se(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${_3.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${_3.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),fS=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p",disabled:s,error:l,filled:c,focused:u,margin:d,required:f,variant:p,...m}=r,g=wa(),v=Rf({props:r,muiFormControl:g,states:["variant","size","disabled","error","filled","focused","required"]}),w={...r,component:a,contained:v.variant==="filled"||v.variant==="outlined",variant:v.variant,size:v.size,disabled:v.disabled,error:v.error,filled:v.filled,focused:v.focused,required:v.required};delete w.ownerState;const x=rIe(w);return $.jsx(oIe,{as:a,className:fe(x.root,i),ref:n,...m,ownerState:w,children:o===" "?D3||(D3=$.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):o})});function iIe(e){return Ne("MuiFormLabel",e)}const J0=Le("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),aIe=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e,l={root:["root",`color${Se(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return Te(l,iIe,t)},sIe=oe("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...e.color==="secondary"&&t.colorSecondary,...e.filled&&t.filled})})(rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{[`&.${J0.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${J0.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${J0.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),lIe=oe("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(rt(({theme:e})=>({[`&.${J0.error}`]:{color:(e.vars||e).palette.error.main}}))),cIe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiFormLabel"}),{children:o,className:i,color:a,component:s="label",disabled:l,error:c,filled:u,focused:d,required:f,...p}=r,m=wa(),g=Rf({props:r,muiFormControl:m,states:["color","required","focused","disabled","error","filled"]}),v={...r,color:g.color||"primary",component:s,disabled:g.disabled,error:g.error,filled:g.filled,focused:g.focused,required:g.required},w=aIe(v);return $.jsxs(sIe,{as:s,ownerState:v,className:fe(w.root,i),ref:n,...p,children:[o,g.required&&$.jsxs(lIe,{ownerState:v,"aria-hidden":!0,className:w.asterisk,children:[" ","*"]})]})}),He=A0e({createStyledComponent:oe("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid2",useThemeProps:e=>at({props:e,name:"MuiGrid2"}),useTheme:ko});function Q2(e){return`scale(${e}, ${e**2})`}const uIe={entering:{opacity:1,transform:Q2(1)},entered:{opacity:1,transform:"none"}},r$=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),gh=y.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:p,style:m,timeout:g="auto",TransitionComponent:v=is,...w}=t,x=ca(),S=y.useRef(),P=ko(),T=y.useRef(null),E=Wt(T,Ef(i),n),O=_=>D=>{if(_){const H=T.current;D===void 0?_(H):_(H,D)}},k=O(u),A=O((_,D)=>{yF(_);const{duration:H,delay:B,easing:V}=vf({style:m,timeout:g,easing:a},{mode:"enter"});let W;g==="auto"?(W=P.transitions.getAutoHeightDuration(_.clientHeight),S.current=W):W=H,_.style.transition=[P.transitions.create("opacity",{duration:W,delay:B}),P.transitions.create("transform",{duration:r$?W:W*.666,delay:B,easing:V})].join(","),l&&l(_,D)}),I=O(c),R=O(p),L=O(_=>{const{duration:D,delay:H,easing:B}=vf({style:m,timeout:g,easing:a},{mode:"exit"});let V;g==="auto"?(V=P.transitions.getAutoHeightDuration(_.clientHeight),S.current=V):V=D,_.style.transition=[P.transitions.create("opacity",{duration:V,delay:H}),P.transitions.create("transform",{duration:r$?V:V*.666,delay:r$?H:H||V*.333,easing:B})].join(","),_.style.opacity=0,_.style.transform=Q2(.75),d&&d(_)}),F=O(f),z=_=>{g==="auto"&&x.start(S.current||0,_),r&&r(T.current,_)};return $.jsx(v,{appear:o,in:s,nodeRef:T,onEnter:A,onEntered:I,onEntering:k,onExit:L,onExited:F,onExiting:R,addEndListener:z,timeout:g==="auto"?null:g,...w,children:(_,D)=>y.cloneElement(i,{style:{opacity:0,transform:Q2(.75),visibility:_==="exited"&&!s?"hidden":void 0,...uIe[_],...m,...i.props.style},ref:E,...D})})});gh&&(gh.muiSupportAuto=!0);const bf=Lbe({themeId:Us});function dIe(e){return Ne("MuiImageList",e)}Le("MuiImageList",["root","masonry","quilted","standard","woven"]);const DJ=y.createContext({}),fIe=e=>{const{classes:t,variant:n}=e;return Te({root:["root",n]},dIe,t)},pIe=oe("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch",variants:[{props:{variant:"masonry"},style:{display:"block"}}]}),NJ=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiImageList"}),{children:o,className:i,cols:a=2,component:s="ul",rowHeight:l="auto",gap:c=4,style:u,variant:d="standard",...f}=r,p=y.useMemo(()=>({rowHeight:l,gap:c,variant:d}),[l,c,d]),m=d==="masonry"?{columnCount:a,columnGap:c,...u}:{gridTemplateColumns:`repeat(${a}, 1fr)`,gap:c,...u},g={...r,component:s,gap:c,rowHeight:l,variant:d},v=fIe(g);return $.jsx(pIe,{as:s,className:fe(v.root,v[d],i),ref:n,style:m,ownerState:g,...f,children:$.jsx(DJ.Provider,{value:p,children:o})})});function hIe(e){return Ne("MuiImageListItem",e)}const o$=Le("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),mIe=e=>{const{classes:t,variant:n}=e;return Te({root:["root",n],img:["img"]},hIe,t)},gIe=oe("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${o$.img}`]:t.img},t.root,t[n.variant]]}})({display:"block",position:"relative",[`& .${o$.img}`]:{objectFit:"cover",width:"100%",height:"100%",display:"block"},variants:[{props:{variant:"standard"},style:{display:"flex",flexDirection:"column"}},{props:{variant:"woven"},style:{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}}},{props:{variant:"standard"},style:{[`& .${o$.img}`]:{height:"auto",flexGrow:1}}}]}),LJ=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiImageListItem"}),{children:o,className:i,cols:a=1,component:s="li",rows:l=1,style:c,...u}=r,{rowHeight:d="auto",gap:f,variant:p}=y.useContext(DJ);let m="auto";p==="woven"?m=void 0:d!=="auto"&&(m=d*l+f*(l-1));const g={...r,cols:a,component:s,gap:f,rowHeight:d,rows:l,variant:p},v=mIe(g);return $.jsx(gIe,{as:s,className:fe(v.root,v[p],i),ref:n,style:{height:m,gridColumnEnd:p!=="masonry"?`span ${a}`:void 0,gridRowEnd:p!=="masonry"?`span ${l}`:void 0,marginBottom:p==="masonry"?f:void 0,breakInside:p==="masonry"?"avoid":void 0,...c},ownerState:g,...u,children:y.Children.map(o,w=>y.isValidElement(w)?w.type==="img"||$g(w,["Image"])?y.cloneElement(w,{className:fe(v.img,w.props.className)}):w:null)})});function yIe(e){return Ne("MuiImageListItemBar",e)}Le("MuiImageListItemBar",["root","positionBottom","positionTop","positionBelow","actionPositionLeft","actionPositionRight","titleWrap","titleWrapBottom","titleWrapTop","titleWrapBelow","titleWrapActionPosLeft","titleWrapActionPosRight","title","subtitle","actionIcon","actionIconActionPosLeft","actionIconActionPosRight"]);const vIe=e=>{const{classes:t,position:n,actionIcon:r,actionPosition:o}=e,i={root:["root",`position${Se(n)}`,`actionPosition${Se(o)}`],titleWrap:["titleWrap",`titleWrap${Se(n)}`,r&&`titleWrapActionPos${Se(o)}`],title:["title"],subtitle:["subtitle"],actionIcon:["actionIcon",`actionIconActionPos${Se(o)}`]};return Te(i,yIe,t)},bIe=oe("div",{name:"MuiImageListItemBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Se(n.position)}`]]}})(rt(({theme:e})=>({position:"absolute",left:0,right:0,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily,variants:[{props:{position:"bottom"},style:{bottom:0}},{props:{position:"top"},style:{top:0}},{props:{position:"below"},style:{position:"relative",background:"transparent",alignItems:"normal"}}]}))),wIe=oe("div",{name:"MuiImageListItemBar",slot:"TitleWrap",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.titleWrap,t[`titleWrap${Se(n.position)}`],n.actionIcon&&t[`titleWrapActionPos${Se(n.actionPosition)}`]]}})(rt(({theme:e})=>({flexGrow:1,padding:"12px 16px",color:(e.vars||e).palette.common.white,overflow:"hidden",variants:[{props:{position:"below"},style:{padding:"6px 0 12px",color:"inherit"}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="left",style:{paddingLeft:0}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="right",style:{paddingRight:0}}]}))),xIe=oe("div",{name:"MuiImageListItemBar",slot:"Title",overridesResolver:(e,t)=>t.title})(rt(({theme:e})=>({fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),SIe=oe("div",{name:"MuiImageListItemBar",slot:"Subtitle",overridesResolver:(e,t)=>t.subtitle})(rt(({theme:e})=>({fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),CIe=oe("div",{name:"MuiImageListItemBar",slot:"ActionIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.actionIcon,t[`actionIconActionPos${Se(n.actionPosition)}`]]}})({variants:[{props:{actionPosition:"left"},style:{order:-1}}]}),PIe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiImageListItemBar"}),{actionIcon:o,actionPosition:i="right",className:a,subtitle:s,title:l,position:c="bottom",...u}=r,d={...r,position:c,actionPosition:i},f=vIe(d);return $.jsxs(bIe,{ownerState:d,className:fe(f.root,a),ref:n,...u,children:[$.jsxs(wIe,{ownerState:d,className:f.titleWrap,children:[$.jsx(xIe,{className:f.title,children:l}),s?$.jsx(SIe,{className:f.subtitle,children:s}):null]}),o?$.jsx(CIe,{ownerState:d,className:f.actionIcon,children:o}):null]})}),TIe=e=>{const{classes:t,disableUnderline:n}=e,o=Te({root:["root",!n&&"underline"],input:["input"]},eTe,t);return{...t,...o}},EIe=oe(bI,{shouldForwardProp:e=>ri(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...yI(e,t),!n.disableUnderline&&t.underline]}})(rt(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${_d.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${_d.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${_d.disabled}, .${_d.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${_d.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Bn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),OIe=oe(wI,{name:"MuiInput",slot:"Input",overridesResolver:vI})({}),kT=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:d={},type:f="text",...p}=r,m=TIe(r),v={root:{ownerState:{disableUnderline:o}}},w=u??a?po(u??a,v):v,x=d.root??i.Root??EIe,S=d.input??i.Input??OIe;return $.jsx(Sv,{slots:{root:x,input:S},slotProps:w,fullWidth:s,inputComponent:l,multiline:c,ref:n,type:f,...p,classes:m})});kT&&(kT.muiName="Input");function IIe(e){return Ne("MuiInputAdornment",e)}const N3=Le("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var L3;const kIe=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Se(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},MIe=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e,s={root:["root",n&&"disablePointerEvents",o&&`position${Se(o)}`,a,r&&"hiddenLabel",i&&`size${Se(i)}`]};return Te(s,IIe,t)},AIe=oe("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:kIe})(rt(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${N3.positionStart}&:not(.${N3.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),so=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u,...d}=r,f=wa()||{};let p=u;u&&f.variant,f&&!p&&(p=f.variant);const m={...r,hiddenLabel:f.hiddenLabel,size:f.size,disablePointerEvents:s,position:c,variant:p},g=MIe(m);return $.jsx(gI.Provider,{value:null,children:$.jsx(AIe,{as:a,ownerState:m,className:fe(g.root,i),ref:n,...d,children:typeof o=="string"&&!l?$.jsx(dt,{color:"textSecondary",children:o}):$.jsxs(y.Fragment,{children:[c==="start"?L3||(L3=$.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,o]})})})});function $Ie(e){return Ne("MuiInputLabel",e)}Le("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const RIe=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${Se(r)}`,a],asterisk:[s&&"asterisk"]},c=Te(l,$Ie,t);return{...t,...c}},_Ie=oe(cIe,{shouldForwardProp:e=>ri(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${J0.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(rt(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Ev=y.forwardRef(function(t,n){const r=at({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,margin:i,shrink:a,variant:s,className:l,...c}=r,u=wa();let d=a;typeof d>"u"&&u&&(d=u.filled||u.focused||u.adornedStart);const f=Rf({props:r,muiFormControl:u,states:["size","variant","required","focused"]}),p={...r,disableAnimation:o,formControl:u,shrink:d,size:f.size,variant:f.variant,required:f.required,focused:f.focused},m=RIe(p);return $.jsx(_Ie,{"data-shrink":d,ref:n,className:fe(m.root,l),...c,ownerState:p,classes:m})});function DIe(e){return Ne("MuiLinearProgress",e)}Le("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const J2=4,Z2=jc` +`,RTe=typeof q2!="string"?Ef` + animation: ${q2} 1.4s linear infinite; + `:null,DTe=typeof K2!="string"?Ef` + animation: ${K2} 1.4s ease-in-out infinite; + `:null,_Te=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${Se(r)}`],svg:["svg"],circle:["circle",`circle${Se(n)}`,o&&"circleDisableShrink"]};return Te(i,$Te,t)},LTe=ie("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Se(n.color)}`]]}})(tt(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:RTe||{animation:`${q2} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Hn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),NTe=ie("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),FTe=ie("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Se(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(tt(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:DTe||{animation:`${K2} 1.4s ease-in-out infinite`}}]}))),PJ=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate",...f}=r,p={...r,color:i,disableShrink:a,size:s,thickness:c,value:u,variant:d},m=_Te(p),g={},y={},b={};if(d==="determinate"){const x=2*Math.PI*((vd-c)/2);g.strokeDasharray=x.toFixed(3),b["aria-valuenow"]=Math.round(u),g.strokeDashoffset=`${((100-u)/100*x).toFixed(3)}px`,y.transform="rotate(-90deg)"}return $.jsx(LTe,{className:pe(m.root,o),style:{width:s,height:s,...y,...l},ownerState:p,ref:n,role:"progressbar",...b,...f,children:$.jsx(NTe,{className:m.svg,ownerState:p,viewBox:`${vd/2} ${vd/2} ${vd} ${vd}`,children:$.jsx(FTe,{className:m.circle,style:g,ownerState:p,cx:vd,cy:vd,r:(vd-c)/2,fill:"none",strokeWidth:c})})})});function I3(e){return e.substring(2).toLowerCase()}function jTe(e,t){return t.documentElement.clientWidth(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=Wt(Tf(t),s),d=Ze(m=>{const g=c.current;c.current=!1;const y=mr(s.current);if(!l.current||!s.current||"clientX"in m&&jTe(m,y))return;if(a.current){a.current=!1;return}let b;m.composedPath?b=m.composedPath().includes(s.current):b=!y.documentElement.contains(m.target)||s.current.contains(m.target),!b&&(n||!g)&&o(m)}),f=m=>g=>{c.current=!0;const y=t.props[m];y&&y(g)},p={ref:u};return i!==!1&&(p[i]=f(i)),v.useEffect(()=>{if(i!==!1){const m=I3(i),g=mr(s.current),y=()=>{a.current=!0};return g.addEventListener(m,d),g.addEventListener("touchmove",y),()=>{g.removeEventListener(m,d),g.removeEventListener("touchmove",y)}}},[d,i]),r!==!1&&(p[r]=f(r)),v.useEffect(()=>{if(r!==!1){const m=I3(r),g=mr(s.current);return g.addEventListener(m,d),()=>{g.removeEventListener(m,d)}}},[d,r]),v.cloneElement(t,p)}const Vu=c0e({createStyledComponent:ie("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Se(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>rt({props:e,name:"MuiContainer"})});function BTe(e){const t=mr(e);return t.body===e?ba(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function X0(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function k3(e){return parseInt(ba(e).getComputedStyle(e).paddingRight,10)||0}function zTe(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function M3(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,a=>{const s=!i.includes(a),l=!zTe(a);s&&l&&X0(a,o)})}function ZA(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function VTe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(BTe(r)){const a=EY(ba(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${k3(r)+a}px`;const s=mr(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${k3(l)+a}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=mr(r).body;else{const a=r.parentElement,s=ba(r);i=(a==null?void 0:a.nodeName)==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:s})=>{i?a.style.setProperty(s,i):a.style.removeProperty(s)})}}function HTe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class UTe{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&X0(t.modalRef,!1);const o=HTe(n);M3(n,t.mount,t.modalRef,o,!0);const i=ZA(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=ZA(this.containers,i=>i.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=VTe(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=ZA(this.containers,a=>a.modals.includes(t)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&X0(t.modalRef,n),M3(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&X0(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const WTe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function GTe(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function qTe(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function KTe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||qTe(e))}function YTe(e){const t=[],n=[];return Array.from(e.querySelectorAll(WTe)).forEach((r,o)=>{const i=GTe(r);i===-1||!KTe(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function XTe(){return!0}function EF(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=YTe,isEnabled:a=XTe,open:s}=e,l=v.useRef(!1),c=v.useRef(null),u=v.useRef(null),d=v.useRef(null),f=v.useRef(null),p=v.useRef(!1),m=v.useRef(null),g=Wt(Tf(t),m),y=v.useRef(null);v.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),v.useEffect(()=>{if(!s||!m.current)return;const S=mr(m.current);return m.current.contains(S.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),p.current&&m.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),v.useEffect(()=>{if(!s||!m.current)return;const S=mr(m.current),P=O=>{y.current=O,!(r||!a()||O.key!=="Tab")&&S.activeElement===m.current&&O.shiftKey&&(l.current=!0,u.current&&u.current.focus())},E=()=>{var M,I;const O=m.current;if(O===null)return;if(!S.hasFocus()||!a()||l.current){l.current=!1;return}if(O.contains(S.activeElement)||r&&S.activeElement!==c.current&&S.activeElement!==u.current)return;if(S.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let k=[];if((S.activeElement===c.current||S.activeElement===u.current)&&(k=i(m.current)),k.length>0){const R=!!((M=y.current)!=null&&M.shiftKey&&((I=y.current)==null?void 0:I.key)==="Tab"),_=k[0],N=k[k.length-1];typeof _!="string"&&typeof N!="string"&&(R?N.focus():_.focus())}else O.focus()};S.addEventListener("focusin",E),S.addEventListener("keydown",P,!0);const T=setInterval(()=>{S.activeElement&&S.activeElement.tagName==="BODY"&&E()},50);return()=>{clearInterval(T),S.removeEventListener("focusin",E),S.removeEventListener("keydown",P,!0)}},[n,r,o,a,s,i]);const b=S=>{d.current===null&&(d.current=S.relatedTarget),p.current=!0,f.current=S.target;const P=t.props.onFocus;P&&P(S)},x=S=>{d.current===null&&(d.current=S.relatedTarget),p.current=!0};return $.jsxs(v.Fragment,{children:[$.jsx("div",{tabIndex:s?0:-1,onFocus:x,ref:c,"data-testid":"sentinelStart"}),v.cloneElement(t,{ref:g,onFocus:b}),$.jsx("div",{tabIndex:s?0:-1,onFocus:x,ref:u,"data-testid":"sentinelEnd"})]})}function QTe(e){return typeof e=="function"?e():e}function JTe(e){return e?e.props.hasOwnProperty("in"):!1}const A3=()=>{},bC=new UTe;function ZTe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,d=v.useRef({}),f=v.useRef(null),p=v.useRef(null),m=Wt(p,u),[g,y]=v.useState(!c),b=JTe(s);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const S=()=>mr(f.current),P=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),E=()=>{bC.mount(P(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},T=Ze(()=>{const L=QTe(t)||S().body;bC.add(P(),L),p.current&&E()}),O=()=>bC.isTopModal(P()),k=Ze(L=>{f.current=L,L&&(c&&O()?E():p.current&&X0(p.current,x))}),M=v.useCallback(()=>{bC.remove(P(),x)},[x]);v.useEffect(()=>()=>{M()},[M]),v.useEffect(()=>{c?T():(!b||!o)&&M()},[c,M,b,o,T]);const I=L=>F=>{var U;(U=L.onKeyDown)==null||U.call(L,F),!(F.key!=="Escape"||F.which===229||!O())&&(n||(F.stopPropagation(),l&&l(F,"escapeKeyDown")))},R=L=>F=>{var U;(U=L.onClick)==null||U.call(L,F),F.target===F.currentTarget&&l&&l(F,"backdropClick")};return{getRootProps:(L={})=>{const F=WP(e);delete F.onTransitionEnter,delete F.onTransitionExited;const U={...F,...L};return{role:"presentation",...U,onKeyDown:I(U),ref:m}},getBackdropProps:(L={})=>{const F=L;return{"aria-hidden":!0,...F,onClick:R(F),open:c}},getTransitionProps:()=>{const L=()=>{y(!1),i&&i()},F=()=>{y(!0),a&&a(),o&&M()};return{onEnter:CH(L,(s==null?void 0:s.props.onEnter)??A3),onExited:CH(F,(s==null?void 0:s.props.onExited)??A3)}},rootRef:m,portalRef:k,isTopModal:O,exited:g,hasTransition:b}}function eOe(e){return _e("MuiModal",e)}Le("MuiModal",["root","hidden","backdrop"]);const tOe=e=>{const{open:t,exited:n,classes:r}=e;return Te({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},eOe,r)},nOe=ie("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(tt(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),rOe=ie(bJ,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Sv=v.forwardRef(function(t,n){const r=rt({name:"MuiModal",props:t}),{BackdropComponent:o=rOe,BackdropProps:i,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:d,components:f={},componentsProps:p={},disableAutoFocus:m=!1,disableEnforceFocus:g=!1,disableEscapeKeyDown:y=!1,disablePortal:b=!1,disableRestoreFocus:x=!1,disableScrollLock:S=!1,hideBackdrop:P=!1,keepMounted:E=!1,onBackdropClick:T,onClose:O,onTransitionEnter:k,onTransitionExited:M,open:I,slotProps:R={},slots:_={},theme:N,...B}=r,L={...r,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:g,disableEscapeKeyDown:y,disablePortal:b,disableRestoreFocus:x,disableScrollLock:S,hideBackdrop:P,keepMounted:E},{getRootProps:F,getBackdropProps:U,getTransitionProps:V,portalRef:z,isTopModal:W,exited:G,hasTransition:J}=ZTe({...L,rootRef:n}),K={...L,exited:G},ne=tOe(K),re={};if(c.props.tabIndex===void 0&&(re.tabIndex="-1"),J){const{onEnter:Q,onExited:ue}=V();re.onEnter=Q,re.onExited=ue}const oe={...B,slots:{root:f.Root,backdrop:f.Backdrop,..._},slotProps:{...p,...R}},[fe,se]=dn("root",{elementType:nOe,externalForwardedProps:oe,getSlotProps:F,additionalProps:{ref:n,as:d},ownerState:K,className:pe(s,ne==null?void 0:ne.root,!K.open&&K.exited&&(ne==null?void 0:ne.hidden))}),[ee,ce]=dn("backdrop",{elementType:o,externalForwardedProps:oe,additionalProps:i,getSlotProps:Q=>U({...Q,onClick:ue=>{T&&T(ue),Q!=null&&Q.onClick&&Q.onClick(ue)}}),className:pe(i==null?void 0:i.className,ne==null?void 0:ne.backdrop),ownerState:K}),le=Wt(i==null?void 0:i.ref,ce.ref);return!E&&!I&&(!J||G)?null:$.jsx(yJ,{ref:z,container:u,disablePortal:b,children:$.jsxs(fe,{...se,children:[!P&&o?$.jsx(ee,{...ce,ref:le}):null,$.jsx(EF,{disableEnforceFocus:g,disableAutoFocus:m,disableRestoreFocus:x,isEnabled:W,open:I,children:v.cloneElement(c,re)})]})})});function oOe(e){return _e("MuiDialog",e)}const Q0=Le("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),EJ=v.createContext({}),iOe=ie(bJ,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),aOe=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${Se(n)}`],paper:["paper",`paperScroll${Se(n)}`,`paperWidth${Se(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Te(a,oOe,t)},sOe=ie(Sv,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),lOe=ie("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Se(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),cOe=ie(so,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Se(n.scroll)}`],t[`paperWidth${Se(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(tt(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Q0.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${Q0.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+32*2)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Q0.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),TJ=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiDialog"}),o=Ao(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:u,children:d,className:f,disableEscapeKeyDown:p=!1,fullScreen:m=!1,fullWidth:g=!1,maxWidth:y="sm",onBackdropClick:b,onClick:x,onClose:S,open:P,PaperComponent:E=so,PaperProps:T={},scroll:O="paper",TransitionComponent:k=xv,transitionDuration:M=i,TransitionProps:I,...R}=r,_={...r,disableEscapeKeyDown:p,fullScreen:m,fullWidth:g,maxWidth:y,scroll:O},N=aOe(_),B=v.useRef(),L=z=>{B.current=z.target===z.currentTarget},F=z=>{x&&x(z),B.current&&(B.current=null,b&&b(z),S&&S(z,"backdropClick"))},U=_n(s),V=v.useMemo(()=>({titleId:U}),[U]);return $.jsx(sOe,{className:pe(N.root,f),closeAfterTransition:!0,components:{Backdrop:iOe},componentsProps:{backdrop:{transitionDuration:M,as:c,...u}},disableEscapeKeyDown:p,onClose:S,open:P,ref:n,onClick:F,ownerState:_,...R,children:$.jsx(k,{appear:!0,in:P,timeout:M,role:"presentation",...I,children:$.jsx(lOe,{className:pe(N.container),onMouseDown:L,ownerState:_,children:$.jsx(cOe,{as:E,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":U,"aria-modal":l,...T,className:pe(N.paper,T.className),ownerState:_,children:$.jsx(EJ.Provider,{value:V,children:d})})})})})});function uOe(e){return _e("MuiDialogActions",e)}Le("MuiDialogActions",["root","spacing"]);const dOe=e=>{const{classes:t,disableSpacing:n}=e;return Te({root:["root",!n&&"spacing"]},uOe,t)},fOe=ie("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),OJ=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...a}=r,s={...r,disableSpacing:i},l=dOe(s);return $.jsx(fOe,{className:pe(l.root,o),ownerState:s,ref:n,...a})});function pOe(e){return _e("MuiDialogContent",e)}Le("MuiDialogContent",["root","dividers"]);function hOe(e){return _e("MuiDialogTitle",e)}const mOe=Le("MuiDialogTitle",["root"]),gOe=e=>{const{classes:t,dividers:n}=e;return Te({root:["root",n&&"dividers"]},pOe,t)},yOe=ie("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(tt(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${mOe.root} + &`]:{paddingTop:0}}}]}))),IJ=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...a}=r,s={...r,dividers:i},l=gOe(s);return $.jsx(yOe,{className:pe(l.root,o),ownerState:s,ref:n,...a})}),vOe=e=>{const{classes:t}=e;return Te({root:["root"]},hOe,t)},bOe=ie(ut,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),wOe=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiDialogTitle"}),{className:o,id:i,...a}=r,s=r,l=vOe(s),{titleId:c=i}=v.useContext(EJ);return $.jsx(bOe,{component:"h2",className:pe(l.root,o),ownerState:s,ref:n,variant:"h6",id:i??c,...a})});function xOe(e){return _e("MuiDivider",e)}const $3=Le("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),SOe=e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return Te({root:["root",t&&"absolute",l,i&&"light",a==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",s==="right"&&a!=="vertical"&&"textAlignRight",s==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},xOe,r)},COe=ie("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(tt(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:vt(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),POe=ie("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(tt(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),Qa=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:a,orientation:s="horizontal",component:l=i||s==="vertical"?"div":"hr",flexItem:c=!1,light:u=!1,role:d=l!=="hr"?"separator":void 0,textAlign:f="center",variant:p="fullWidth",...m}=r,g={...r,absolute:o,component:l,flexItem:c,light:u,orientation:s,role:d,textAlign:f,variant:p},y=SOe(g);return $.jsx(COe,{as:l,className:pe(y.root,a),role:d,ref:n,ownerState:g,"aria-orientation":d==="separator"&&(l!=="hr"||s==="vertical")?s:void 0,...m,children:i?$.jsx(POe,{className:y.wrapper,ownerState:g,children:i}):null})});Qa&&(Qa.muiSkipListHighlight=!0);function EOe(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=ba(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const c=i.getComputedStyle(t);a=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let s=0,l=0;if(a&&a!=="none"&&typeof a=="string"){const c=a.split("(")[1].split(")")[0].split(",");s=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?o?`translateX(${o.right+s-r.left}px)`:`translateX(${i.innerWidth+s-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:e==="up"?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function TOe(e){return typeof e=="function"?e():e}function wC(e,t,n){const r=TOe(n),o=EOe(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const OOe=v.forwardRef(function(t,n){const r=Ao(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:c,direction:u="down",easing:d=o,in:f,onEnter:p,onEntered:m,onEntering:g,onExit:y,onExited:b,onExiting:x,style:S,timeout:P=i,TransitionComponent:E=rs,...T}=t,O=v.useRef(null),k=Wt(Tf(l),O,n),M=V=>z=>{V&&(z===void 0?V(O.current):V(O.current,z))},I=M((V,z)=>{wC(u,V,c),pF(V),p&&p(V,z)}),R=M((V,z)=>{const W=vf({timeout:P,style:S,easing:d},{mode:"enter"});V.style.webkitTransition=r.transitions.create("-webkit-transform",{...W}),V.style.transition=r.transitions.create("transform",{...W}),V.style.webkitTransform="none",V.style.transform="none",g&&g(V,z)}),_=M(m),N=M(x),B=M(V=>{const z=vf({timeout:P,style:S,easing:d},{mode:"exit"});V.style.webkitTransition=r.transitions.create("-webkit-transform",z),V.style.transition=r.transitions.create("transform",z),wC(u,V,c),y&&y(V)}),L=M(V=>{V.style.webkitTransition="",V.style.transition="",b&&b(V)}),F=V=>{a&&a(O.current,V)},U=v.useCallback(()=>{O.current&&wC(u,O.current,c)},[u,c]);return v.useEffect(()=>{if(f||u==="down"||u==="right")return;const V=nS(()=>{O.current&&wC(u,O.current,c)}),z=ba(O.current);return z.addEventListener("resize",V),()=>{V.clear(),z.removeEventListener("resize",V)}},[u,f,c]),v.useEffect(()=>{f||U()},[f,U]),$.jsx(E,{nodeRef:O,onEnter:I,onEntered:_,onEntering:R,onExit:B,onExited:L,onExiting:N,addEndListener:F,appear:s,in:f,timeout:P,...T,children:(V,{ownerState:z,...W})=>v.cloneElement(l,{ref:k,style:{visibility:V==="exited"&&!f?"hidden":void 0,...S,...l.props.style},...W})})});function IOe(e){return _e("MuiDrawer",e)}Le("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const kJ=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},kOe=e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${Se(n)}`,r!=="temporary"&&`paperAnchorDocked${Se(n)}`]};return Te(o,IOe,t)},MOe=ie(Sv,{name:"MuiDrawer",slot:"Root",overridesResolver:kJ})(tt(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),R3=ie("div",{shouldForwardProp:ii,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:kJ})({flex:"0 0 auto"}),AOe=ie(so,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${Se(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${Se(n.anchor)}`]]}})(tt(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),MJ={left:"right",right:"left",top:"down",bottom:"up"};function $Oe(e){return["left","right"].includes(e)}function ROe({direction:e},t){return e==="rtl"&&$Oe(t)?MJ[t]:t}const DOe=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiDrawer"}),o=Ao(),i=nr(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:p,...m}={},onClose:g,open:y=!1,PaperProps:b={},SlideProps:x,TransitionComponent:S=OOe,transitionDuration:P=a,variant:E="temporary",...T}=r,O=v.useRef(!1);v.useEffect(()=>{O.current=!0},[]);const k=ROe({direction:i?"rtl":"ltr"},s),I={...r,anchor:s,elevation:d,open:y,variant:E,...T},R=kOe(I),_=$.jsx(AOe,{elevation:E==="temporary"?d:0,square:!0,...b,className:pe(R.paper,b.className),ownerState:I,children:c});if(E==="permanent")return $.jsx(R3,{className:pe(R.root,R.docked,u),ownerState:I,ref:n,...T,children:_});const N=$.jsx(S,{in:y,direction:MJ[k],timeout:P,appear:O.current,...x,children:_});return E==="persistent"?$.jsx(R3,{className:pe(R.root,R.docked,u),ownerState:I,ref:n,...T,children:N}):$.jsx(MOe,{BackdropProps:{...l,...p,transitionDuration:P},className:pe(R.root,R.modal,u),open:y,ownerState:I,onClose:g,hideBackdrop:f,ref:n,...T,...m,children:N})});function _Oe(e){return _e("MuiFab",e)}const D3=Le("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),LOe=e=>{const{color:t,variant:n,classes:r,size:o}=e,i={root:["root",n,`size${Se(o)}`,t==="inherit"?"colorInherit":t]},a=Te(i,_Oe,r);return{...r,...a}},NOe=ie(Hi,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>ii(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Se(n.size)}`],n.color==="inherit"&&t.colorInherit,t[Se(n.size)],t[n.color]]}})(tt(({theme:e})=>{var t,n;return{...e.typography.button,minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:(n=(t=e.palette).getContrastText)==null?void 0:n.call(t,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${D3.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]}}),tt(({theme:e})=>({variants:[...Object.entries(e.palette).filter(Hn(["dark","contrastText"])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),tt(({theme:e})=>({[`&.${D3.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),Rh=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiFab"}),{children:o,className:i,color:a="default",component:s="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:d="large",variant:f="circular",...p}=r,m={...r,color:a,component:s,disabled:l,disableFocusRipple:c,size:d,variant:f},g=LOe(m);return $.jsx(NOe,{className:pe(g.root,i),component:s,disabled:l,focusRipple:!c,focusVisibleClassName:pe(g.focusVisible,u),ownerState:m,ref:n,...p,classes:g,children:o})}),FOe=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${Se(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},c=Te(l,JPe,t);return{...t,...c}},jOe=ie(iI,{shouldForwardProp:e=>ii(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...rI(e,t),!n.disableUnderline&&t.underline]}})(tt(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Fa.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Fa.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Fa.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Fa.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Fa.disabled}, .${Fa.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Fa.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Hn()).map(([a])=>{var s;return{props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),BOe=ie(aI,{name:"MuiFilledInput",slot:"Input",overridesResolver:oI})(tt(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),TF=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...m}=r,g={...r,disableUnderline:o,fullWidth:s,inputComponent:c,multiline:u,type:p},y=FOe(r),b={root:{ownerState:g},input:{ownerState:g}},x=d??a?mo(b,d??a):b,S=f.root??i.Root??jOe,P=f.input??i.Input??BOe;return $.jsx(wv,{slots:{root:S,input:P},slotProps:x,fullWidth:s,inputComponent:c,multiline:u,ref:n,type:p,...m,classes:y})});TF.muiName="Input";function zOe(e){return _e("MuiFormControl",e)}Le("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const VOe=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${Se(n)}`,r&&"fullWidth"]};return Te(o,zOe,t)},HOe=ie("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${Se(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Cv=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:f=!1,margin:p="none",required:m=!1,size:g="medium",variant:y="outlined",...b}=r,x={...r,color:a,component:s,disabled:l,error:c,fullWidth:d,hiddenLabel:f,margin:p,required:m,size:g,variant:y},S=VOe(x),[P,E]=v.useState(()=>{let N=!1;return o&&v.Children.forEach(o,B=>{if(!$g(B,["Input","Select"]))return;const L=$g(B,["Select"])?B.props.input:B;L&&qPe(L.props)&&(N=!0)}),N}),[T,O]=v.useState(()=>{let N=!1;return o&&v.Children.forEach(o,B=>{$g(B,["Input","Select"])&&(EE(B.props,!0)||EE(B.props.inputProps,!0))&&(N=!0)}),N}),[k,M]=v.useState(!1);l&&k&&M(!1);const I=u!==void 0&&!l?u:k;let R;v.useRef(!1);const _=v.useMemo(()=>({adornedStart:P,setAdornedStart:E,color:a,disabled:l,error:c,filled:T,focused:I,fullWidth:d,hiddenLabel:f,size:g,onBlur:()=>{M(!1)},onEmpty:()=>{O(!1)},onFilled:()=>{O(!0)},onFocus:()=>{M(!0)},registerEffect:R,required:m,variant:y}),[P,a,l,c,T,I,d,f,R,m,g,y]);return $.jsx(nI.Provider,{value:_,children:$.jsx(HOe,{as:s,ownerState:x,className:pe(S.root,i),ref:n,...b,children:o})})});function UOe(e){return _e("MuiFormControlLabel",e)}const T0=Le("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),WOe=e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e,a={root:["root",n&&"disabled",`labelPlacement${Se(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return Te(a,UOe,t)},GOe=ie("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${T0.label}`]:t.label},t.root,t[`labelPlacement${Se(n.labelPlacement)}`]]}})(tt(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${T0.disabled}`]:{cursor:"default"},[`& .${T0.label}`]:{[`&.${T0.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),qOe=ie("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(tt(({theme:e})=>({[`&.${T0.error}`]:{color:(e.vars||e).palette.error.main}}))),mh=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiFormControlLabel"}),{checked:o,className:i,componentsProps:a={},control:s,disabled:l,disableTypography:c,inputRef:u,label:d,labelPlacement:f="end",name:p,onChange:m,required:g,slots:y={},slotProps:b={},value:x,...S}=r,P=wa(),E=l??s.props.disabled??(P==null?void 0:P.disabled),T=g??s.props.required,O={disabled:E,required:T};["checked","name","onChange","value","inputRef"].forEach(L=>{typeof s.props[L]>"u"&&typeof r[L]<"u"&&(O[L]=r[L])});const k=Rf({props:r,muiFormControl:P,states:["error"]}),M={...r,disabled:E,labelPlacement:f,required:T,error:k.error},I=WOe(M),R={slots:y,slotProps:{...a,...b}},[_,N]=dn("typography",{elementType:ut,externalForwardedProps:R,ownerState:M});let B=d;return B!=null&&B.type!==ut&&!c&&(B=$.jsx(_,{component:"span",...N,className:pe(I.label,N==null?void 0:N.className),children:B})),$.jsxs(GOe,{className:pe(I.root,i),ownerState:M,ref:n,...S,children:[v.cloneElement(s,O),T?$.jsxs("div",{children:[B,$.jsxs(qOe,{ownerState:M,"aria-hidden":!0,className:I.asterisk,children:[" ","*"]})]}):B]})});function KOe(e){return _e("MuiFormGroup",e)}Le("MuiFormGroup",["root","row","error"]);const YOe=e=>{const{classes:t,row:n,error:r}=e;return Te({root:["root",n&&"row",r&&"error"]},KOe,t)},XOe=ie("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),Hw=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiFormGroup"}),{className:o,row:i=!1,...a}=r,s=wa(),l=Rf({props:r,muiFormControl:s,states:["error"]}),c={...r,row:i,error:l.error},u=YOe(c);return $.jsx(XOe,{className:pe(u.root,o),ownerState:c,ref:n,...a})});function QOe(e){return _e("MuiFormHelperText",e)}const _3=Le("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var L3;const JOe=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e,c={root:["root",o&&"disabled",i&&"error",r&&`size${Se(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return Te(c,QOe,t)},ZOe=ie("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Se(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(tt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${_3.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${_3.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),fS=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p",disabled:s,error:l,filled:c,focused:u,margin:d,required:f,variant:p,...m}=r,g=wa(),y=Rf({props:r,muiFormControl:g,states:["variant","size","disabled","error","filled","focused","required"]}),b={...r,component:a,contained:y.variant==="filled"||y.variant==="outlined",variant:y.variant,size:y.size,disabled:y.disabled,error:y.error,filled:y.filled,focused:y.focused,required:y.required};delete b.ownerState;const x=JOe(b);return $.jsx(ZOe,{as:a,className:pe(x.root,i),ref:n,...m,ownerState:b,children:o===" "?L3||(L3=$.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):o})});function eIe(e){return _e("MuiFormLabel",e)}const J0=Le("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),tIe=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e,l={root:["root",`color${Se(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return Te(l,eIe,t)},nIe=ie("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(tt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(Hn()).map(([t])=>({props:{color:t},style:{[`&.${J0.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${J0.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${J0.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),rIe=ie("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(tt(({theme:e})=>({[`&.${J0.error}`]:{color:(e.vars||e).palette.error.main}}))),oIe=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiFormLabel"}),{children:o,className:i,color:a,component:s="label",disabled:l,error:c,filled:u,focused:d,required:f,...p}=r,m=wa(),g=Rf({props:r,muiFormControl:m,states:["color","required","focused","disabled","error","filled"]}),y={...r,color:g.color||"primary",component:s,disabled:g.disabled,error:g.error,filled:g.filled,focused:g.focused,required:g.required},b=tIe(y);return $.jsxs(nIe,{as:s,ownerState:y,className:pe(b.root,i),ref:n,...p,children:[o,g.required&&$.jsxs(rIe,{ownerState:y,"aria-hidden":!0,className:b.asterisk,children:[" ","*"]})]})}),Fe=P0e({createStyledComponent:ie("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid2",useThemeProps:e=>rt({props:e,name:"MuiGrid2"}),useTheme:Ao});function Y2(e){return`scale(${e}, ${e**2})`}const iIe={entering:{opacity:1,transform:Y2(1)},entered:{opacity:1,transform:"none"}},e$=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),gh=v.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:p,style:m,timeout:g="auto",TransitionComponent:y=rs,...b}=t,x=la(),S=v.useRef(),P=Ao(),E=v.useRef(null),T=Wt(E,Tf(i),n),O=L=>F=>{if(L){const U=E.current;F===void 0?L(U):L(U,F)}},k=O(u),M=O((L,F)=>{pF(L);const{duration:U,delay:V,easing:z}=vf({style:m,timeout:g,easing:a},{mode:"enter"});let W;g==="auto"?(W=P.transitions.getAutoHeightDuration(L.clientHeight),S.current=W):W=U,L.style.transition=[P.transitions.create("opacity",{duration:W,delay:V}),P.transitions.create("transform",{duration:e$?W:W*.666,delay:V,easing:z})].join(","),l&&l(L,F)}),I=O(c),R=O(p),_=O(L=>{const{duration:F,delay:U,easing:V}=vf({style:m,timeout:g,easing:a},{mode:"exit"});let z;g==="auto"?(z=P.transitions.getAutoHeightDuration(L.clientHeight),S.current=z):z=F,L.style.transition=[P.transitions.create("opacity",{duration:z,delay:U}),P.transitions.create("transform",{duration:e$?z:z*.666,delay:e$?U:U||z*.333,easing:V})].join(","),L.style.opacity=0,L.style.transform=Y2(.75),d&&d(L)}),N=O(f),B=L=>{g==="auto"&&x.start(S.current||0,L),r&&r(E.current,L)};return $.jsx(y,{appear:o,in:s,nodeRef:E,onEnter:M,onEntered:I,onEntering:k,onExit:_,onExited:N,onExiting:R,addEndListener:B,timeout:g==="auto"?null:g,...b,children:(L,{ownerState:F,...U})=>v.cloneElement(i,{style:{opacity:0,transform:Y2(.75),visibility:L==="exited"&&!s?"hidden":void 0,...iIe[L],...m,...i.props.style},ref:T,...U})})});gh&&(gh.muiSupportAuto=!0);const bf=Mbe({themeId:Hs});function aIe(e){return _e("MuiImageList",e)}Le("MuiImageList",["root","masonry","quilted","standard","woven"]);const AJ=v.createContext({}),sIe=e=>{const{classes:t,variant:n}=e;return Te({root:["root",n]},aIe,t)},lIe=ie("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch",variants:[{props:{variant:"masonry"},style:{display:"block"}}]}),$J=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiImageList"}),{children:o,className:i,cols:a=2,component:s="ul",rowHeight:l="auto",gap:c=4,style:u,variant:d="standard",...f}=r,p=v.useMemo(()=>({rowHeight:l,gap:c,variant:d}),[l,c,d]),m=d==="masonry"?{columnCount:a,columnGap:c,...u}:{gridTemplateColumns:`repeat(${a}, 1fr)`,gap:c,...u},g={...r,component:s,gap:c,rowHeight:l,variant:d},y=sIe(g);return $.jsx(lIe,{as:s,className:pe(y.root,y[d],i),ref:n,style:m,ownerState:g,...f,children:$.jsx(AJ.Provider,{value:p,children:o})})});function cIe(e){return _e("MuiImageListItem",e)}const t$=Le("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),uIe=e=>{const{classes:t,variant:n}=e;return Te({root:["root",n],img:["img"]},cIe,t)},dIe=ie("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${t$.img}`]:t.img},t.root,t[n.variant]]}})({display:"block",position:"relative",[`& .${t$.img}`]:{objectFit:"cover",width:"100%",height:"100%",display:"block"},variants:[{props:{variant:"standard"},style:{display:"flex",flexDirection:"column"}},{props:{variant:"woven"},style:{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}}},{props:{variant:"standard"},style:{[`& .${t$.img}`]:{height:"auto",flexGrow:1}}}]}),RJ=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiImageListItem"}),{children:o,className:i,cols:a=1,component:s="li",rows:l=1,style:c,...u}=r,{rowHeight:d="auto",gap:f,variant:p}=v.useContext(AJ);let m="auto";p==="woven"?m=void 0:d!=="auto"&&(m=d*l+f*(l-1));const g={...r,cols:a,component:s,gap:f,rowHeight:d,rows:l,variant:p},y=uIe(g);return $.jsx(dIe,{as:s,className:pe(y.root,y[p],i),ref:n,style:{height:m,gridColumnEnd:p!=="masonry"?`span ${a}`:void 0,gridRowEnd:p!=="masonry"?`span ${l}`:void 0,marginBottom:p==="masonry"?f:void 0,breakInside:p==="masonry"?"avoid":void 0,...c},ownerState:g,...u,children:v.Children.map(o,b=>v.isValidElement(b)?b.type==="img"||$g(b,["Image"])?v.cloneElement(b,{className:pe(y.img,b.props.className)}):b:null)})});function fIe(e){return _e("MuiImageListItemBar",e)}Le("MuiImageListItemBar",["root","positionBottom","positionTop","positionBelow","actionPositionLeft","actionPositionRight","titleWrap","titleWrapBottom","titleWrapTop","titleWrapBelow","titleWrapActionPosLeft","titleWrapActionPosRight","title","subtitle","actionIcon","actionIconActionPosLeft","actionIconActionPosRight"]);const pIe=e=>{const{classes:t,position:n,actionIcon:r,actionPosition:o}=e,i={root:["root",`position${Se(n)}`,`actionPosition${Se(o)}`],titleWrap:["titleWrap",`titleWrap${Se(n)}`,r&&`titleWrapActionPos${Se(o)}`],title:["title"],subtitle:["subtitle"],actionIcon:["actionIcon",`actionIconActionPos${Se(o)}`]};return Te(i,fIe,t)},hIe=ie("div",{name:"MuiImageListItemBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Se(n.position)}`]]}})(tt(({theme:e})=>({position:"absolute",left:0,right:0,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily,variants:[{props:{position:"bottom"},style:{bottom:0}},{props:{position:"top"},style:{top:0}},{props:{position:"below"},style:{position:"relative",background:"transparent",alignItems:"normal"}}]}))),mIe=ie("div",{name:"MuiImageListItemBar",slot:"TitleWrap",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.titleWrap,t[`titleWrap${Se(n.position)}`],n.actionIcon&&t[`titleWrapActionPos${Se(n.actionPosition)}`]]}})(tt(({theme:e})=>({flexGrow:1,padding:"12px 16px",color:(e.vars||e).palette.common.white,overflow:"hidden",variants:[{props:{position:"below"},style:{padding:"6px 0 12px",color:"inherit"}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="left",style:{paddingLeft:0}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="right",style:{paddingRight:0}}]}))),gIe=ie("div",{name:"MuiImageListItemBar",slot:"Title",overridesResolver:(e,t)=>t.title})(tt(({theme:e})=>({fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),yIe=ie("div",{name:"MuiImageListItemBar",slot:"Subtitle",overridesResolver:(e,t)=>t.subtitle})(tt(({theme:e})=>({fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),vIe=ie("div",{name:"MuiImageListItemBar",slot:"ActionIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.actionIcon,t[`actionIconActionPos${Se(n.actionPosition)}`]]}})({variants:[{props:{actionPosition:"left"},style:{order:-1}}]}),bIe=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiImageListItemBar"}),{actionIcon:o,actionPosition:i="right",className:a,subtitle:s,title:l,position:c="bottom",...u}=r,d={...r,position:c,actionPosition:i},f=pIe(d);return $.jsxs(hIe,{ownerState:d,className:pe(f.root,a),ref:n,...u,children:[$.jsxs(mIe,{ownerState:d,className:f.titleWrap,children:[$.jsx(gIe,{className:f.title,children:l}),s?$.jsx(yIe,{className:f.subtitle,children:s}):null]}),o?$.jsx(vIe,{ownerState:d,className:f.actionIcon,children:o}):null]})}),wIe=e=>{const{classes:t,disableUnderline:n}=e,o=Te({root:["root",!n&&"underline"],input:["input"]},XPe,t);return{...t,...o}},xIe=ie(iI,{shouldForwardProp:e=>ii(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...rI(e,t),!n.disableUnderline&&t.underline]}})(tt(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Rd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Rd.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Rd.disabled}, .${Rd.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Rd.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Hn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),SIe=ie(aI,{name:"MuiInput",slot:"Input",overridesResolver:oI})({}),OF=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:d={},type:f="text",...p}=r,m=wIe(r),y={root:{ownerState:{disableUnderline:o}}},b=u??a?mo(u??a,y):y,x=d.root??i.Root??xIe,S=d.input??i.Input??SIe;return $.jsx(wv,{slots:{root:x,input:S},slotProps:b,fullWidth:s,inputComponent:l,multiline:c,ref:n,type:f,...p,classes:m})});OF.muiName="Input";function CIe(e){return _e("MuiInputAdornment",e)}const N3=Le("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var F3;const PIe=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Se(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},EIe=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e,s={root:["root",n&&"disablePointerEvents",o&&`position${Se(o)}`,a,r&&"hiddenLabel",i&&`size${Se(i)}`]};return Te(s,CIe,t)},TIe=ie("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:PIe})(tt(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${N3.positionStart}&:not(.${N3.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),co=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u,...d}=r,f=wa()||{};let p=u;u&&f.variant,f&&!p&&(p=f.variant);const m={...r,hiddenLabel:f.hiddenLabel,size:f.size,disablePointerEvents:s,position:c,variant:p},g=EIe(m);return $.jsx(nI.Provider,{value:null,children:$.jsx(TIe,{as:a,ownerState:m,className:pe(g.root,i),ref:n,...d,children:typeof o=="string"&&!l?$.jsx(ut,{color:"textSecondary",children:o}):$.jsxs(v.Fragment,{children:[c==="start"?F3||(F3=$.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,o]})})})});function OIe(e){return _e("MuiInputLabel",e)}Le("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const IIe=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${Se(r)}`,a],asterisk:[s&&"asterisk"]},c=Te(l,OIe,t);return{...t,...c}},kIe=ie(oIe,{shouldForwardProp:e=>ii(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${J0.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(tt(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Pv=v.forwardRef(function(t,n){const r=rt({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,margin:i,shrink:a,variant:s,className:l,...c}=r,u=wa();let d=a;typeof d>"u"&&u&&(d=u.filled||u.focused||u.adornedStart);const f=Rf({props:r,muiFormControl:u,states:["size","variant","required","focused"]}),p={...r,disableAnimation:o,formControl:u,shrink:d,size:f.size,variant:f.variant,required:f.required,focused:f.focused},m=IIe(p);return $.jsx(kIe,{"data-shrink":d,ref:n,className:pe(m.root,l),...c,ownerState:p,classes:m})});function MIe(e){return _e("MuiLinearProgress",e)}Le("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const X2=4,Q2=jc` 0% { left: -35%; right: 100%; @@ -209,9 +201,9 @@ Error generating stack: `+i.message+` left: 100%; right: -90%; } -`,NIe=typeof Z2!="string"?Tf` - animation: ${Z2} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; - `:null,e_=jc` +`,AIe=typeof Q2!="string"?Ef` + animation: ${Q2} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; + `:null,J2=jc` 0% { left: -200%; right: 100%; @@ -226,9 +218,9 @@ Error generating stack: `+i.message+` left: 107%; right: -8%; } -`,LIe=typeof e_!="string"?Tf` - animation: ${e_} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; - `:null,t_=jc` +`,$Ie=typeof J2!="string"?Ef` + animation: ${J2} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; + `:null,Z2=jc` 0% { opacity: 1; background-position: 0 -23px; @@ -243,9 +235,9 @@ Error generating stack: `+i.message+` opacity: 1; background-position: -200px -23px; } -`,FIe=typeof t_!="string"?Tf` - animation: ${t_} 3s infinite linear; - `:null,jIe=e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${Se(r)}`,n],dashed:["dashed",`dashedColor${Se(r)}`],bar1:["bar",`barColor${Se(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${Se(r)}`,n==="buffer"&&`color${Se(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return Te(o,DIe,t)},MF=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?_u(e.palette[t].main,.62):Ru(e.palette[t].main,.5),BIe=oe("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Se(n.color)}`],t[n.variant]]}})(rt(({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{backgroundColor:MF(e,t)}})),{props:({ownerState:t})=>t.color==="inherit"&&t.variant!=="buffer",style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),zIe=oe("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${Se(n.color)}`]]}})(rt(({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter(Bn()).map(([t])=>{const n=MF(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),FIe||{animation:`${t_} 3s infinite linear`}),VIe=oe("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Se(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar1Indeterminate,n.variant==="determinate"&&t.bar1Determinate,n.variant==="buffer"&&t.bar1Buffer]}})(rt(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:"determinate"},style:{transition:`transform .${J2}s linear`}},{props:{variant:"buffer"},style:{zIndex:1,transition:`transform .${J2}s linear`}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:NIe||{animation:`${Z2} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),HIe=oe("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Se(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(rt(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:t})=>t.variant!=="buffer"&&t.color!=="inherit",style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:t})=>t.variant!=="buffer"&&t.color==="inherit",style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:MF(e,t),transition:`transform .${J2}s linear`}})),{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:LIe||{animation:`${e_} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),FJ=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiLinearProgress"}),{className:o,color:i="primary",value:a,valueBuffer:s,variant:l="indeterminate",...c}=r,u={...r,color:i,variant:l},d=jIe(u),f=er(),p={},m={bar1:{},bar2:{}};if((l==="determinate"||l==="buffer")&&a!==void 0){p["aria-valuenow"]=Math.round(a),p["aria-valuemin"]=0,p["aria-valuemax"]=100;let g=a-100;f&&(g=-g),m.bar1.transform=`translateX(${g}%)`}if(l==="buffer"&&s!==void 0){let g=(s||0)-100;f&&(g=-g),m.bar2.transform=`translateX(${g}%)`}return $.jsxs(BIe,{className:fe(d.root,o),ownerState:u,role:"progressbar",...p,ref:n,...c,children:[l==="buffer"?$.jsx(zIe,{className:d.dashed,ownerState:u}):null,$.jsx(VIe,{className:d.bar1,ownerState:u,style:m.bar1}),l==="determinate"?null:$.jsx(HIe,{className:d.bar2,ownerState:u,style:m.bar2})]})}),Ks=y.createContext({});function UIe(e){return Ne("MuiList",e)}Le("MuiList",["root","padding","dense","subheader"]);const WIe=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Te({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},UIe,t)},GIe=oe("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),al=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=r,d=y.useMemo(()=>({dense:s}),[s]),f={...r,component:a,dense:s,disablePadding:l},p=WIe(f);return $.jsx(Ks.Provider,{value:d,children:$.jsxs(GIe,{as:a,className:fe(p.root,i),ref:n,ownerState:f,...u,children:[c,o]})})});function qIe(e){return Ne("MuiListItem",e)}Le("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function KIe(e){return Ne("MuiListItemButton",e)}const Qm=Le("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),YIe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},XIe=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:s}=e,c=Te({root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",s&&"selected"]},KIe,n);return{...n,...c}},QIe=oe(Hi,{shouldForwardProp:e=>ri(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:YIe})(rt(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Qm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Qm.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Qm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Qm.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Qm.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.dense,style:{paddingTop:4,paddingBottom:4}}]}))),_f=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:i=!1,component:a="div",children:s,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:f=!1,className:p,...m}=r,g=y.useContext(Ks),v=y.useMemo(()=>({dense:l||g.dense||!1,alignItems:o,disableGutters:c}),[o,g.dense,l,c]),w=y.useRef(null);wn(()=>{i&&w.current&&w.current.focus()},[i]);const x={...r,alignItems:o,dense:v.dense,disableGutters:c,divider:u,selected:f},S=XIe(x),P=Wt(w,n);return $.jsx(Ks.Provider,{value:v,children:$.jsx(QIe,{ref:P,href:m.href||m.to,component:(m.href||m.to)&&a==="div"?"button":a,focusVisibleClassName:fe(S.focusVisible,d),ownerState:x,className:fe(S.root,p),...m,classes:S,children:s})})});function JIe(e){return Ne("MuiListItemSecondaryAction",e)}Le("MuiListItemSecondaryAction",["root","disableGutters"]);const ZIe=e=>{const{disableGutters:t,classes:n}=e;return Te({root:["root",t&&"disableGutters"]},JIe,n)},eke=oe("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),jJ=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,a=y.useContext(Ks),s={...r,disableGutters:a.disableGutters},l=ZIe(s);return $.jsx(eke,{className:fe(l.root,o),ownerState:s,ref:n,...i})});jJ.muiName="ListItemSecondaryAction";const tke=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},nke=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return Te({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider",t==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},qIe,n)},rke=oe("div",{name:"MuiListItem",slot:"Root",overridesResolver:tke})(rt(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${Qm.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),oke=oe("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),es=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItem"}),{alignItems:o="center",children:i,className:a,component:s,components:l={},componentsProps:c={},ContainerComponent:u="li",ContainerProps:{className:d,...f}={},dense:p=!1,disableGutters:m=!1,disablePadding:g=!1,divider:v=!1,secondaryAction:w,slotProps:x={},slots:S={},...P}=r,T=y.useContext(Ks),E=y.useMemo(()=>({dense:p||T.dense||!1,alignItems:o,disableGutters:m}),[o,T.dense,p,m]),O=y.useRef(null),k=y.Children.toArray(i),A=k.length&&$g(k[k.length-1],["ListItemSecondaryAction"]),I={...r,alignItems:o,dense:E.dense,disableGutters:m,disablePadding:g,divider:v,hasSecondaryAction:A},R=nke(I),L=Wt(O,n),F=S.root||l.Root||rke,z=x.root||c.root||{},_={className:fe(R.root,z.className,a),...P};let D=s||"li";return A?(D=!_.component&&!s?"div":D,u==="li"&&(D==="li"?D="div":_.component==="li"&&(_.component="div")),$.jsx(Ks.Provider,{value:E,children:$.jsxs(oke,{as:u,className:fe(R.container,d),ref:L,ownerState:I,...f,children:[$.jsx(F,{...z,...!Oy(F)&&{as:D,ownerState:{...I,...z.ownerState}},..._,children:k}),k.pop()]})})):$.jsx(Ks.Provider,{value:E,children:$.jsxs(F,{...z,as:D,ref:L,...!Oy(F)&&{ownerState:{...I,...z.ownerState}},..._,children:[k,w&&$.jsx(jJ,{children:w})]})})});function ike(e){return Ne("MuiListItemAvatar",e)}Le("MuiListItemAvatar",["root","alignItemsFlexStart"]);const ake=e=>{const{alignItems:t,classes:n}=e;return Te({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},ike,n)},ske=oe("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),AF=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemAvatar"}),{className:o,...i}=r,a=y.useContext(Ks),s={...r,alignItems:a.alignItems},l=ake(s);return $.jsx(ske,{className:fe(l.root,o),ownerState:s,ref:n,...i})});function lke(e){return Ne("MuiListItemIcon",e)}const F3=Le("MuiListItemIcon",["root","alignItemsFlexStart"]),cke=e=>{const{alignItems:t,classes:n}=e;return Te({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},lke,n)},uke=oe("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(rt(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),zi=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemIcon"}),{className:o,...i}=r,a=y.useContext(Ks),s={...r,alignItems:a.alignItems},l=cke(s);return $.jsx(uke,{className:fe(l.root,o),ownerState:s,ref:n,...i})});function dke(e){return Ne("MuiListItemText",e)}const yg=Le("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),fke=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return Te({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},dke,t)},pke=oe("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${yg.primary}`]:t.primary},{[`& .${yg.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${CT.root}:where(& .${yg.primary})`]:{display:"block"},[`.${CT.root}:where(& .${yg.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),ho=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d,...f}=r,{dense:p}=y.useContext(Ks);let m=l??o,g=u;const v={...r,disableTypography:a,inset:s,primary:!!m,secondary:!!g,dense:p},w=fke(v);return m!=null&&m.type!==dt&&!a&&(m=$.jsx(dt,{variant:p?"body2":"body1",className:w.primary,component:c!=null&&c.variant?void 0:"span",...c,children:m})),g!=null&&g.type!==dt&&!a&&(g=$.jsx(dt,{variant:"body2",className:w.secondary,color:"textSecondary",...d,children:g})),$.jsxs(pke,{className:fe(w.root,i),ownerState:v,ref:n,...f,children:[m,g]})});function i$(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function j3(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function BJ(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function Vb(e,t,n,r,o,i){let a=!1,s=o(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!BJ(s,i)||l)s=o(e,s,n);else return s.focus(),!0}return!1}const pS=y.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu",...f}=t,p=y.useRef(null),m=y.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});wn(()=>{o&&p.current.focus()},[o]),y.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(S,{direction:P})=>{const T=!p.current.style.width;if(S.clientHeight{const P=p.current,T=S.key;if(S.ctrlKey||S.metaKey||S.altKey){u&&u(S);return}const O=pr(P).activeElement;if(T==="ArrowDown")S.preventDefault(),Vb(P,O,c,l,i$);else if(T==="ArrowUp")S.preventDefault(),Vb(P,O,c,l,j3);else if(T==="Home")S.preventDefault(),Vb(P,null,c,l,i$);else if(T==="End")S.preventDefault(),Vb(P,null,c,l,j3);else if(T.length===1){const k=m.current,A=T.toLowerCase(),I=performance.now();k.keys.length>0&&(I-k.lastTime>500?(k.keys=[],k.repeating=!0,k.previousKeyMatched=!0):k.repeating&&A!==k.keys[0]&&(k.repeating=!1)),k.lastTime=I,k.keys.push(A);const R=O&&!k.repeating&&BJ(O,k);k.previousKeyMatched&&(R||Vb(P,O,!1,l,i$,k))?S.preventDefault():k.previousKeyMatched=!1}u&&u(S)},v=Wt(p,n);let w=-1;y.Children.forEach(a,(S,P)=>{if(!y.isValidElement(S)){w===P&&(w+=1,w>=a.length&&(w=-1));return}S.props.disabled||(d==="selectedMenu"&&S.props.selected||w===-1)&&(w=P),w===P&&(S.props.disabled||S.props.muiSkipListHighlight||S.type.muiSkipListHighlight)&&(w+=1,w>=a.length&&(w=-1))});const x=y.Children.map(a,(S,P)=>{if(P===w){const T={};return i&&(T.autoFocus=!0),S.props.tabIndex===void 0&&d==="selectedMenu"&&(T.tabIndex=0),y.cloneElement(S,T)}return S});return $.jsx(al,{role:"menu",ref:v,className:s,onKeyDown:g,tabIndex:o?0:-1,...f,children:x})});function hke(e){return Ne("MuiPopover",e)}Le("MuiPopover",["root","paper"]);function B3(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function z3(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function V3(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function a$(e){return typeof e=="function"?e():e}const mke=e=>{const{classes:t}=e;return Te({root:["root"],paper:["paper"]},hke,t)},gke=oe(Pv,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),zJ=oe(io,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),yke=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:d,elevation:f=8,marginThreshold:p=16,open:m,PaperProps:g={},slots:v={},slotProps:w={},transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:S=gh,transitionDuration:P="auto",TransitionProps:{onEntering:T,...E}={},disableScrollLock:O=!1,...k}=r,A=(w==null?void 0:w.paper)??g,I=y.useRef(),R={...r,anchorOrigin:a,anchorReference:l,elevation:f,marginThreshold:p,externalPaperSlotProps:A,transformOrigin:x,TransitionComponent:S,transitionDuration:P,TransitionProps:E},L=mke(R),F=y.useCallback(()=>{if(l==="anchorPosition")return s;const ce=a$(i),Z=(ce&&ce.nodeType===1?ce:pr(I.current).body).getBoundingClientRect();return{top:Z.top+B3(Z,a.vertical),left:Z.left+z3(Z,a.horizontal)}},[i,a.horizontal,a.vertical,s,l]),z=y.useCallback(ce=>({vertical:B3(ce,x.vertical),horizontal:z3(ce,x.horizontal)}),[x.horizontal,x.vertical]),_=y.useCallback(ce=>{const se={width:ce.offsetWidth,height:ce.offsetHeight},Z=z(se);if(l==="none")return{top:null,left:null,transformOrigin:V3(Z)};const ue=F();let ge=ue.top-Z.vertical,we=ue.left-Z.horizontal;const me=ge+se.height,be=we+se.width,xe=ba(a$(i)),Ee=xe.innerHeight-p,Me=xe.innerWidth-p;if(p!==null&&geEe){const _e=me-Ee;ge-=_e,Z.vertical+=_e}if(p!==null&&weMe){const _e=be-Me;we-=_e,Z.horizontal+=_e}return{top:`${Math.round(ge)}px`,left:`${Math.round(we)}px`,transformOrigin:V3(Z)}},[i,l,F,z,p]),[D,H]=y.useState(m),B=y.useCallback(()=>{const ce=I.current;if(!ce)return;const se=_(ce);se.top!==null&&ce.style.setProperty("top",se.top),se.left!==null&&(ce.style.left=se.left),ce.style.transformOrigin=se.transformOrigin,H(!0)},[_]);y.useEffect(()=>(O&&window.addEventListener("scroll",B),()=>window.removeEventListener("scroll",B)),[i,O,B]);const V=(ce,se)=>{T&&T(ce,se),B()},W=()=>{H(!1)};y.useEffect(()=>{m&&B()}),y.useImperativeHandle(o,()=>m?{updatePosition:()=>{B()}}:null,[m,B]),y.useEffect(()=>{if(!m)return;const ce=nS(()=>{B()}),se=ba(i);return se.addEventListener("resize",ce),()=>{ce.clear(),se.removeEventListener("resize",ce)}},[i,m,B]);let G=P;P==="auto"&&!S.muiSupportAuto&&(G=void 0);const Q=d||(i?pr(a$(i)).body:void 0),Y={slots:v,slotProps:{...w,paper:A}},[ne,ie]=Kn("paper",{elementType:zJ,externalForwardedProps:Y,additionalProps:{elevation:f,className:fe(L.paper,A==null?void 0:A.className),style:D?A.style:{...A.style,opacity:0}},ownerState:R}),[re,{slotProps:pe,...le}]=Kn("root",{elementType:gke,externalForwardedProps:Y,additionalProps:{slotProps:{backdrop:{invisible:!0}},container:Q,open:m},ownerState:R,className:fe(L.root,u)}),ee=Wt(I,ie.ref);return $.jsx(re,{...le,...!Oy(re)&&{slotProps:pe,disableScrollLock:O},...k,ref:n,children:$.jsx(S,{appear:!0,in:m,onEntering:V,onExited:W,timeout:G,...E,children:$.jsx(ne,{...ie,ref:ee,children:c})})})});function vke(e){return Ne("MuiMenu",e)}Le("MuiMenu",["root","paper","list"]);const bke={vertical:"top",horizontal:"right"},wke={vertical:"top",horizontal:"left"},xke=e=>{const{classes:t}=e;return Te({root:["root"],paper:["paper"],list:["list"]},vke,t)},Ske=oe(yke,{shouldForwardProp:e=>ri(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Cke=oe(zJ,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Pke=oe(pS,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),ss=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:d={},PopoverClasses:f,transitionDuration:p="auto",TransitionProps:{onEntering:m,...g}={},variant:v="selectedMenu",slots:w={},slotProps:x={},...S}=r,P=er(),T={...r,autoFocus:o,disableAutoFocusItem:s,MenuListProps:l,onEntering:m,PaperProps:d,transitionDuration:p,TransitionProps:g,variant:v},E=xke(T),O=o&&!s&&u,k=y.useRef(null),A=(D,H)=>{k.current&&k.current.adjustStyleForScrollbar(D,{direction:P?"rtl":"ltr"}),m&&m(D,H)},I=D=>{D.key==="Tab"&&(D.preventDefault(),c&&c(D,"tabKeyDown"))};let R=-1;y.Children.map(i,(D,H)=>{y.isValidElement(D)&&(D.props.disabled||(v==="selectedMenu"&&D.props.selected||R===-1)&&(R=H))});const L=w.paper??Cke,F=x.paper??d,z=on({elementType:w.root,externalSlotProps:x.root,ownerState:T,className:[E.root,a]}),_=on({elementType:L,externalSlotProps:F,ownerState:T,className:E.paper});return $.jsx(Ske,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:P?"right":"left"},transformOrigin:P?bke:wke,slots:{paper:L,root:w.root},slotProps:{root:z,paper:_},open:u,ref:n,transitionDuration:p,TransitionProps:{onEntering:A,...g},ownerState:T,...S,classes:f,children:$.jsx(Pke,{onKeyDown:I,actions:k,autoFocus:o&&(R===-1||s),autoFocusItem:O,variant:v,...l,className:fe(E.list,l.className),children:i})})});function Tke(e){return Ne("MuiMenuItem",e)}const Hb=Le("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Eke=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Oke=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,l=Te({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Tke,a);return{...a,...l}},Ike=oe(Hi,{shouldForwardProp:e=>ri(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Eke})(rt(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Hb.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Hb.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Hb.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Hb.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Hb.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${A3.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${A3.inset}`]:{marginLeft:52},[`& .${yg.root}`]:{marginTop:0,marginBottom:0},[`& .${yg.inset}`]:{paddingLeft:36},[`& .${F3.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${F3.root} svg`]:{fontSize:"1.25rem"}}}]}))),tn=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:f,...p}=r,m=y.useContext(Ks),g=y.useMemo(()=>({dense:a||m.dense||!1,disableGutters:l}),[m.dense,a,l]),v=y.useRef(null);wn(()=>{o&&v.current&&v.current.focus()},[o]);const w={...r,dense:g.dense,divider:s,disableGutters:l},x=Oke(r),S=Wt(v,n);let P;return r.disabled||(P=d!==void 0?d:-1),$.jsx(Ks.Provider,{value:g,children:$.jsx(Ike,{ref:S,role:u,tabIndex:P,component:i,focusVisibleClassName:fe(x.focusVisible,c),className:fe(x.root,f),...p,ownerState:w,classes:x})})});function kke(e){return Ne("MuiNativeSelect",e)}const $F=Le("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Mke=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Se(n)}`,i&&"iconOpen",r&&"disabled"]};return Te(s,kke,t)},VJ=oe("select")(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${$F.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),Ake=oe(VJ,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ri,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${$F.multiple}`]:t.multiple}]}})({}),HJ=oe("svg")(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${$F.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),$ke=oe(HJ,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Se(n.variant)}`],n.open&&t.iconOpen]}})({}),Rke=y.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:o,variant:l,error:i},d=Mke(u);return $.jsxs(y.Fragment,{children:[$.jsx(Ake,{ownerState:u,className:fe(d.select,r),disabled:o,ref:s||n,...c}),t.multiple?null:$.jsx($ke,{as:a,ownerState:u,className:d.icon})]})});var H3;const _ke=oe("fieldset",{shouldForwardProp:ri})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Dke=oe("legend",{shouldForwardProp:ri})(rt(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Nke(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=o!=null&&o!=="",l={...e,notched:i,withLabel:s};return $.jsx(_ke,{"aria-hidden":!0,className:r,ownerState:l,...a,children:$.jsx(Dke,{ownerState:l,children:s?$.jsx("span",{children:o}):H3||(H3=$.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}const Lke=e=>{const{classes:t}=e,r=Te({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},tTe,t);return{...t,...r}},Fke=oe(bI,{shouldForwardProp:e=>ri(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:yI})(rt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Ts.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ts.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Ts.focused} .${Ts.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Bn()).map(([n])=>({props:{color:n},style:{[`&.${Ts.focused} .${Ts.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Ts.error} .${Ts.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Ts.disabled} .${Ts.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),jke=oe(Nke,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(rt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),Bke=oe(wI,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:vI})(rt(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),MT=y.forwardRef(function(t,n){var r;const o=at({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:a=!1,inputComponent:s="input",label:l,multiline:c=!1,notched:u,slots:d={},type:f="text",...p}=o,m=Lke(o),g=wa(),v=Rf({props:o,muiFormControl:g,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w={...o,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:g,fullWidth:a,hiddenLabel:v.hiddenLabel,multiline:c,size:v.size,type:f},x=d.root??i.Root??Fke,S=d.input??i.Input??Bke;return $.jsx(Sv,{slots:{root:x,input:S},renderSuffix:P=>$.jsx(jke,{ownerState:w,className:m.notchedOutline,label:l!=null&&l!==""&&v.required?r||(r=$.jsxs(y.Fragment,{children:[l," ","*"]})):l,notched:typeof u<"u"?u:!!(P.startAdornment||P.filled||P.focused)}),fullWidth:a,inputComponent:s,multiline:c,ref:n,type:f,...p,classes:{...m,notchedOutline:null}})});MT&&(MT.muiName="Input");function zke(e){return Ne("MuiPagination",e)}Le("MuiPagination",["root","ul","outlined","text"]);function Vke(e={}){const{boundaryCount:t=1,componentName:n="usePagination",count:r=1,defaultPage:o=1,disabled:i=!1,hideNextButton:a=!1,hidePrevButton:s=!1,onChange:l,page:c,showFirstButton:u=!1,showLastButton:d=!1,siblingCount:f=1,...p}=e,[m,g]=vi({controlled:c,default:o,name:n,state:"page"}),v=(A,I)=>{c||g(I),l&&l(A,I)},w=(A,I)=>{const R=I-A+1;return Array.from({length:R},(L,F)=>A+F)},x=w(1,Math.min(t,r)),S=w(Math.max(r-t+1,t+1),r),P=Math.max(Math.min(m-f,r-t-f*2-1),t+2),T=Math.min(Math.max(m+f,t+f*2+2),r-t-1),E=[...u?["first"]:[],...s?[]:["previous"],...x,...P>t+2?["start-ellipsis"]:t+1t?[r-t]:[],...S,...a?[]:["next"],...d?["last"]:[]],O=A=>{switch(A){case"first":return 1;case"previous":return m-1;case"next":return m+1;case"last":return r;default:return null}};return{items:E.map(A=>typeof A=="number"?{onClick:I=>{v(I,A)},type:"page",page:A,selected:A===m,disabled:i,"aria-current":A===m?"true":void 0}:{onClick:I=>{v(I,O(A))},type:A,page:O(A),selected:!1,disabled:i||!A.includes("ellipsis")&&(A==="next"||A==="last"?m>=r:m<=1)}),...p}}function Hke(e){return Ne("MuiPaginationItem",e)}const Ii=Le("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),UJ=ut($.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),WJ=ut($.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),Uke=ut($.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),Wke=ut($.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),GJ=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Se(n.size)}`],n.variant==="text"&&t[`text${Se(n.color)}`],n.variant==="outlined"&&t[`outlined${Se(n.color)}`],n.shape==="rounded"&&t.rounded,n.type==="page"&&t.page,(n.type==="start-ellipsis"||n.type==="end-ellipsis")&&t.ellipsis,(n.type==="previous"||n.type==="next")&&t.previousNext,(n.type==="first"||n.type==="last")&&t.firstLast]},Gke=e=>{const{classes:t,color:n,disabled:r,selected:o,size:i,shape:a,type:s,variant:l}=e,c={root:["root",`size${Se(i)}`,l,a,n!=="standard"&&`color${Se(n)}`,n!=="standard"&&`${l}${Se(n)}`,r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return Te(c,Hke,t)},qke=oe("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:GJ})(rt(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,height:"auto",[`&.${Ii.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:{size:"small"},style:{minWidth:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}}]}))),Kke=oe(Hi,{name:"MuiPaginationItem",slot:"Root",overridesResolver:GJ})(rt(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,[`&.${Ii.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ii.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},transition:e.transitions.create(["color","background-color"],{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ii.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Ii.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${Ii.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}},variants:[{props:{size:"small"},style:{minWidth:26,height:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,height:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}},{props:{shape:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"outlined"},style:{border:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Ii.selected}`]:{[`&.${Ii.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}}}},{props:{variant:"text"},style:{[`&.${Ii.selected}`]:{[`&.${Ii.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}},...Object.entries(e.palette).filter(Bn(["dark","contrastText"])).map(([t])=>({props:{variant:"text",color:t},style:{[`&.${Ii.selected}`]:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}},[`&.${Ii.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark},[`&.${Ii.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}})),...Object.entries(e.palette).filter(Bn(["light"])).map(([t])=>({props:{variant:"outlined",color:t},style:{[`&.${Ii.selected}`]:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:vt(e.palette[t].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:vt(e.palette[t].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ii.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}}}}))]}))),Yke=oe("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})(rt(({theme:e})=>({fontSize:e.typography.pxToRem(20),margin:"0 -8px",variants:[{props:{size:"small"},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{fontSize:e.typography.pxToRem(22)}}]}))),Xke=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiPaginationItem"}),{className:o,color:i="standard",component:a,components:s={},disabled:l=!1,page:c,selected:u=!1,shape:d="circular",size:f="medium",slots:p={},slotProps:m={},type:g="page",variant:v="text",...w}=r,x={...r,color:i,disabled:l,selected:u,shape:d,size:f,type:g,variant:v},S=er(),P=Gke(x),T={slots:{previous:p.previous??s.previous,next:p.next??s.next,first:p.first??s.first,last:p.last??s.last},slotProps:m},[E,O]=Kn("previous",{elementType:Uke,externalForwardedProps:T,ownerState:x}),[k,A]=Kn("next",{elementType:Wke,externalForwardedProps:T,ownerState:x}),[I,R]=Kn("first",{elementType:UJ,externalForwardedProps:T,ownerState:x}),[L,F]=Kn("last",{elementType:WJ,externalForwardedProps:T,ownerState:x}),z=S?{previous:"next",next:"previous",first:"last",last:"first"}[g]:g,_={previous:E,next:k,first:I,last:L}[z],D={previous:O,next:A,first:R,last:F}[z];return g==="start-ellipsis"||g==="end-ellipsis"?$.jsx(qke,{ref:n,ownerState:x,className:fe(P.root,o),children:"…"}):$.jsxs(Kke,{ref:n,ownerState:x,component:a,disabled:l,className:fe(P.root,o),...w,children:[g==="page"&&c,_?$.jsx(Yke,{...D,className:P.icon,as:_}):null]})}),Qke=e=>{const{classes:t,variant:n}=e;return Te({root:["root",n],ul:["ul"]},zke,t)},Jke=oe("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),Zke=oe("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function eMe(e,t,n){return e==="page"?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const tMe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiPagination"}),{boundaryCount:o=1,className:i,color:a="standard",count:s=1,defaultPage:l=1,disabled:c=!1,getItemAriaLabel:u=eMe,hideNextButton:d=!1,hidePrevButton:f=!1,onChange:p,page:m,renderItem:g=I=>$.jsx(Xke,{...I}),shape:v="circular",showFirstButton:w=!1,showLastButton:x=!1,siblingCount:S=1,size:P="medium",variant:T="text",...E}=r,{items:O}=Vke({...r,componentName:"Pagination"}),k={...r,boundaryCount:o,color:a,count:s,defaultPage:l,disabled:c,getItemAriaLabel:u,hideNextButton:d,hidePrevButton:f,renderItem:g,shape:v,showFirstButton:w,showLastButton:x,siblingCount:S,size:P,variant:T},A=Qke(k);return $.jsx(Jke,{"aria-label":"pagination navigation",className:fe(A.root,i),ownerState:k,ref:n,...E,children:$.jsx(Zke,{className:A.ul,ownerState:k,children:O.map((I,R)=>$.jsx("li",{children:g({...I,color:a,"aria-label":u(I.type,I.page,I.selected),shape:v,size:P,variant:T})},R))})})});function nMe(e){return Ne("MuiSelect",e)}const Ub=Le("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var U3;const rMe=oe(VJ,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Ub.select}`]:t.select},{[`&.${Ub.select}`]:t[n.variant]},{[`&.${Ub.error}`]:t.error},{[`&.${Ub.multiple}`]:t.multiple}]}})({[`&.${Ub.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),oMe=oe(HJ,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Se(n.variant)}`],n.open&&t.iconOpen]}})({}),iMe=oe("input",{shouldForwardProp:e=>GY(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function W3(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function aMe(e){return e==null||typeof e=="string"&&!e.trim()}const sMe=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Se(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Te(s,nMe,t)},lMe=y.forwardRef(function(t,n){var qt;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:f,error:p=!1,IconComponent:m,inputRef:g,labelId:v,MenuProps:w={},multiple:x,name:S,onBlur:P,onChange:T,onClose:E,onFocus:O,onOpen:k,open:A,readOnly:I,renderValue:R,SelectDisplayProps:L={},tabIndex:F,type:z,value:_,variant:D="standard",...H}=t,[B,V]=vi({controlled:_,default:u,name:"Select"}),[W,G]=vi({controlled:A,default:c,name:"Select"}),Q=y.useRef(null),Y=y.useRef(null),[ne,ie]=y.useState(null),{current:re}=y.useRef(A!=null),[pe,le]=y.useState(),ee=Wt(n,g),ce=y.useCallback(qe=>{Y.current=qe,qe&&ie(qe)},[]),se=ne==null?void 0:ne.parentNode;y.useImperativeHandle(ee,()=>({focus:()=>{Y.current.focus()},node:Q.current,value:B}),[B]),y.useEffect(()=>{c&&W&&ne&&!re&&(le(a?null:se.clientWidth),Y.current.focus())},[ne,a]),y.useEffect(()=>{i&&Y.current.focus()},[i]),y.useEffect(()=>{if(!v)return;const qe=pr(Y.current).getElementById(v);if(qe){const Re=()=>{getSelection().isCollapsed&&Y.current.focus()};return qe.addEventListener("click",Re),()=>{qe.removeEventListener("click",Re)}}},[v]);const Z=(qe,Re)=>{qe?k&&k(Re):E&&E(Re),re||(le(a?null:se.clientWidth),G(qe))},ue=qe=>{qe.button===0&&(qe.preventDefault(),Y.current.focus(),Z(!0,qe))},ge=qe=>{Z(!1,qe)},we=y.Children.toArray(s),me=qe=>{const Re=we.find(Ze=>Ze.props.value===qe.target.value);Re!==void 0&&(V(Re.props.value),T&&T(qe,Re))},be=qe=>Re=>{let Ze;if(Re.currentTarget.hasAttribute("tabindex")){if(x){Ze=Array.isArray(B)?B.slice():[];const Pt=B.indexOf(qe.props.value);Pt===-1?Ze.push(qe.props.value):Ze.splice(Pt,1)}else Ze=qe.props.value;if(qe.props.onClick&&qe.props.onClick(Re),B!==Ze&&(V(Ze),T)){const Pt=Re.nativeEvent||Re,_t=new Pt.constructor(Pt.type,Pt);Object.defineProperty(_t,"target",{writable:!0,value:{value:Ze,name:S}}),T(_t,qe)}x||Z(!1,Re)}},xe=qe=>{I||[" ","ArrowUp","ArrowDown","Enter"].includes(qe.key)&&(qe.preventDefault(),Z(!0,qe))},Ee=ne!==null&&W,Me=qe=>{!Ee&&P&&(Object.defineProperty(qe,"target",{writable:!0,value:{value:B,name:S}}),P(qe))};delete H["aria-invalid"];let _e,de;const Ae=[];let Oe=!1;(ET({value:B})||f)&&(R?_e=R(B):Oe=!0);const $e=we.map(qe=>{if(!y.isValidElement(qe))return null;let Re;if(x){if(!Array.isArray(B))throw new Error($u(2));Re=B.some(Ze=>W3(Ze,qe.props.value)),Re&&Oe&&Ae.push(qe.props.children)}else Re=W3(B,qe.props.value),Re&&Oe&&(de=qe.props.children);return y.cloneElement(qe,{"aria-selected":Re?"true":"false",onClick:be(qe),onKeyUp:Ze=>{Ze.key===" "&&Ze.preventDefault(),qe.props.onKeyUp&&qe.props.onKeyUp(Ze)},role:"option",selected:Re,value:void 0,"data-value":qe.props.value})});Oe&&(x?Ae.length===0?_e=null:_e=Ae.reduce((qe,Re,Ze)=>(qe.push(Re),Ze{const{classes:t}=e;return t},RF={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ri(e)&&e!=="variant",slot:"Root"},uMe=oe(kT,RF)(""),dMe=oe(MT,RF)(""),fMe=oe(IT,RF)(""),_h=y.forwardRef(function(t,n){const r=at({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=SJ,id:d,input:f,inputProps:p,label:m,labelId:g,MenuProps:v,multiple:w=!1,native:x=!1,onClose:S,onOpen:P,open:T,renderValue:E,SelectDisplayProps:O,variant:k="outlined",...A}=r,I=x?Rke:lMe,R=wa(),L=Rf({props:r,muiFormControl:R,states:["variant","error"]}),F=L.variant||k,z={...r,variant:F,classes:a},_=cMe(z),{root:D,...H}=_,B=f||{standard:$.jsx(uMe,{ownerState:z}),outlined:$.jsx(dMe,{label:m,ownerState:z}),filled:$.jsx(fMe,{ownerState:z})}[F],V=Wt(n,Ef(B));return $.jsx(y.Fragment,{children:y.cloneElement(B,{inputComponent:I,inputProps:{children:i,error:L.error,IconComponent:u,variant:F,type:void 0,multiple:w,...x?{id:d}:{autoWidth:o,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:v,onClose:S,onOpen:P,open:T,renderValue:E,SelectDisplayProps:{id:d,...O}},...p,classes:p?po(H,p.classes):H,...f?f.props.inputProps:{}},...(w&&x||c)&&F==="outlined"?{notched:!0}:{},ref:V,className:fe(B.props.className,s,_.root),...!f&&{variant:F},...A})})});_h.muiName="Select";function pMe(e){return Ne("MuiSkeleton",e)}Le("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const hMe=e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:i,height:a}=e;return Te({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},pMe,t)},n_=jc` +`,RIe=typeof Z2!="string"?Ef` + animation: ${Z2} 3s infinite linear; + `:null,DIe=e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${Se(r)}`,n],dashed:["dashed",`dashedColor${Se(r)}`],bar1:["bar",`barColor${Se(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${Se(r)}`,n==="buffer"&&`color${Se(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return Te(o,MIe,t)},IF=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?Du(e.palette[t].main,.62):Ru(e.palette[t].main,.5),_Ie=ie("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Se(n.color)}`],t[n.variant]]}})(tt(({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter(Hn()).map(([t])=>({props:{color:t},style:{backgroundColor:IF(e,t)}})),{props:({ownerState:t})=>t.color==="inherit"&&t.variant!=="buffer",style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),LIe=ie("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${Se(n.color)}`]]}})(tt(({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter(Hn()).map(([t])=>{const n=IF(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),RIe||{animation:`${Z2} 3s infinite linear`}),NIe=ie("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Se(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar1Indeterminate,n.variant==="determinate"&&t.bar1Determinate,n.variant==="buffer"&&t.bar1Buffer]}})(tt(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter(Hn()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:"determinate"},style:{transition:`transform .${X2}s linear`}},{props:{variant:"buffer"},style:{zIndex:1,transition:`transform .${X2}s linear`}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:AIe||{animation:`${Q2} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),FIe=ie("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Se(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(tt(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter(Hn()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:t})=>t.variant!=="buffer"&&t.color!=="inherit",style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:t})=>t.variant!=="buffer"&&t.color==="inherit",style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter(Hn()).map(([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:IF(e,t),transition:`transform .${X2}s linear`}})),{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:$Ie||{animation:`${J2} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),DJ=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiLinearProgress"}),{className:o,color:i="primary",value:a,valueBuffer:s,variant:l="indeterminate",...c}=r,u={...r,color:i,variant:l},d=DIe(u),f=nr(),p={},m={bar1:{},bar2:{}};if((l==="determinate"||l==="buffer")&&a!==void 0){p["aria-valuenow"]=Math.round(a),p["aria-valuemin"]=0,p["aria-valuemax"]=100;let g=a-100;f&&(g=-g),m.bar1.transform=`translateX(${g}%)`}if(l==="buffer"&&s!==void 0){let g=(s||0)-100;f&&(g=-g),m.bar2.transform=`translateX(${g}%)`}return $.jsxs(_Ie,{className:pe(d.root,o),ownerState:u,role:"progressbar",...p,ref:n,...c,children:[l==="buffer"?$.jsx(LIe,{className:d.dashed,ownerState:u}):null,$.jsx(NIe,{className:d.bar1,ownerState:u,style:m.bar1}),l==="determinate"?null:$.jsx(FIe,{className:d.bar2,ownerState:u,style:m.bar2})]})}),qs=v.createContext({});function jIe(e){return _e("MuiList",e)}Le("MuiList",["root","padding","dense","subheader"]);const BIe=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Te({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},jIe,t)},zIe=ie("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),ol=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=r,d=v.useMemo(()=>({dense:s}),[s]),f={...r,component:a,dense:s,disablePadding:l},p=BIe(f);return $.jsx(qs.Provider,{value:d,children:$.jsxs(zIe,{as:a,className:pe(p.root,i),ref:n,ownerState:f,...u,children:[c,o]})})});function VIe(e){return _e("MuiListItem",e)}Le("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function HIe(e){return _e("MuiListItemButton",e)}const Qm=Le("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),UIe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},WIe=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:s}=e,c=Te({root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",s&&"selected"]},HIe,n);return{...n,...c}},GIe=ie(Hi,{shouldForwardProp:e=>ii(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:UIe})(tt(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Qm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Qm.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Qm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Qm.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Qm.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.dense,style:{paddingTop:4,paddingBottom:4}}]}))),Df=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:i=!1,component:a="div",children:s,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:f=!1,className:p,...m}=r,g=v.useContext(qs),y=v.useMemo(()=>({dense:l||g.dense||!1,alignItems:o,disableGutters:c}),[o,g.dense,l,c]),b=v.useRef(null);xn(()=>{i&&b.current&&b.current.focus()},[i]);const x={...r,alignItems:o,dense:y.dense,disableGutters:c,divider:u,selected:f},S=WIe(x),P=Wt(b,n);return $.jsx(qs.Provider,{value:y,children:$.jsx(GIe,{ref:P,href:m.href||m.to,component:(m.href||m.to)&&a==="div"?"button":a,focusVisibleClassName:pe(S.focusVisible,d),ownerState:x,className:pe(S.root,p),...m,classes:S,children:s})})});function qIe(e){return _e("MuiListItemSecondaryAction",e)}Le("MuiListItemSecondaryAction",["root","disableGutters"]);const KIe=e=>{const{disableGutters:t,classes:n}=e;return Te({root:["root",t&&"disableGutters"]},qIe,n)},YIe=ie("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),_J=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,a=v.useContext(qs),s={...r,disableGutters:a.disableGutters},l=KIe(s);return $.jsx(YIe,{className:pe(l.root,o),ownerState:s,ref:n,...i})});_J.muiName="ListItemSecondaryAction";const XIe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},QIe=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return Te({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider",t==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},VIe,n)},JIe=ie("div",{name:"MuiListItem",slot:"Root",overridesResolver:XIe})(tt(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${Qm.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),ZIe=ie("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Ja=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiListItem"}),{alignItems:o="center",children:i,className:a,component:s,components:l={},componentsProps:c={},ContainerComponent:u="li",ContainerProps:{className:d,...f}={},dense:p=!1,disableGutters:m=!1,disablePadding:g=!1,divider:y=!1,secondaryAction:b,slotProps:x={},slots:S={},...P}=r,E=v.useContext(qs),T=v.useMemo(()=>({dense:p||E.dense||!1,alignItems:o,disableGutters:m}),[o,E.dense,p,m]),O=v.useRef(null),k=v.Children.toArray(i),M=k.length&&$g(k[k.length-1],["ListItemSecondaryAction"]),I={...r,alignItems:o,dense:T.dense,disableGutters:m,disablePadding:g,divider:y,hasSecondaryAction:M},R=QIe(I),_=Wt(O,n),N=S.root||l.Root||JIe,B=x.root||c.root||{},L={className:pe(R.root,B.className,a),...P};let F=s||"li";return M?(F=!L.component&&!s?"div":F,u==="li"&&(F==="li"?F="div":L.component==="li"&&(L.component="div")),$.jsx(qs.Provider,{value:T,children:$.jsxs(ZIe,{as:u,className:pe(R.container,d),ref:_,ownerState:I,...f,children:[$.jsx(N,{...B,...!Vw(N)&&{as:F,ownerState:{...I,...B.ownerState}},...L,children:k}),k.pop()]})})):$.jsx(qs.Provider,{value:T,children:$.jsxs(N,{...B,as:F,ref:_,...!Vw(N)&&{ownerState:{...I,...B.ownerState}},...L,children:[k,b&&$.jsx(_J,{children:b})]})})});function eke(e){return _e("MuiListItemAvatar",e)}Le("MuiListItemAvatar",["root","alignItemsFlexStart"]);const tke=e=>{const{alignItems:t,classes:n}=e;return Te({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},eke,n)},nke=ie("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),kF=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiListItemAvatar"}),{className:o,...i}=r,a=v.useContext(qs),s={...r,alignItems:a.alignItems},l=tke(s);return $.jsx(nke,{className:pe(l.root,o),ownerState:s,ref:n,...i})});function rke(e){return _e("MuiListItemIcon",e)}const j3=Le("MuiListItemIcon",["root","alignItemsFlexStart"]),oke=e=>{const{alignItems:t,classes:n}=e;return Te({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},rke,n)},ike=ie("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(tt(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),zi=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiListItemIcon"}),{className:o,...i}=r,a=v.useContext(qs),s={...r,alignItems:a.alignItems},l=oke(s);return $.jsx(ike,{className:pe(l.root,o),ownerState:s,ref:n,...i})});function ake(e){return _e("MuiListItemText",e)}const yg=Le("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),ske=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return Te({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},ake,t)},lke=ie("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${yg.primary}`]:t.primary},{[`& .${yg.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${SE.root}:where(& .${yg.primary})`]:{display:"block"},[`.${SE.root}:where(& .${yg.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),go=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d,slots:f={},slotProps:p={},...m}=r,{dense:g}=v.useContext(qs);let y=l??o,b=u;const x={...r,disableTypography:a,inset:s,primary:!!y,secondary:!!b,dense:g},S=ske(x),P={slots:f,slotProps:{primary:c,secondary:d,...p}},[E,T]=dn("primary",{className:S.primary,elementType:ut,externalForwardedProps:P,ownerState:x}),[O,k]=dn("secondary",{className:S.secondary,elementType:ut,externalForwardedProps:P,ownerState:x});return y!=null&&y.type!==ut&&!a&&(y=$.jsx(E,{variant:g?"body2":"body1",component:T!=null&&T.variant?void 0:"span",...T,children:y})),b!=null&&b.type!==ut&&!a&&(b=$.jsx(O,{variant:"body2",color:"textSecondary",...k,children:b})),$.jsxs(lke,{className:pe(S.root,i),ownerState:x,ref:n,...m,children:[y,b]})});function n$(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function B3(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function LJ(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function Vb(e,t,n,r,o,i){let a=!1,s=o(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!LJ(s,i)||l)s=o(e,s,n);else return s.focus(),!0}return!1}const Ev=v.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu",...f}=t,p=v.useRef(null),m=v.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});xn(()=>{o&&p.current.focus()},[o]),v.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(S,{direction:P})=>{const E=!p.current.style.width;if(S.clientHeight{const P=p.current,E=S.key;if(S.ctrlKey||S.metaKey||S.altKey){u&&u(S);return}const O=mr(P).activeElement;if(E==="ArrowDown")S.preventDefault(),Vb(P,O,c,l,n$);else if(E==="ArrowUp")S.preventDefault(),Vb(P,O,c,l,B3);else if(E==="Home")S.preventDefault(),Vb(P,null,c,l,n$);else if(E==="End")S.preventDefault(),Vb(P,null,c,l,B3);else if(E.length===1){const k=m.current,M=E.toLowerCase(),I=performance.now();k.keys.length>0&&(I-k.lastTime>500?(k.keys=[],k.repeating=!0,k.previousKeyMatched=!0):k.repeating&&M!==k.keys[0]&&(k.repeating=!1)),k.lastTime=I,k.keys.push(M);const R=O&&!k.repeating&&LJ(O,k);k.previousKeyMatched&&(R||Vb(P,O,!1,l,n$,k))?S.preventDefault():k.previousKeyMatched=!1}u&&u(S)},y=Wt(p,n);let b=-1;v.Children.forEach(a,(S,P)=>{if(!v.isValidElement(S)){b===P&&(b+=1,b>=a.length&&(b=-1));return}S.props.disabled||(d==="selectedMenu"&&S.props.selected||b===-1)&&(b=P),b===P&&(S.props.disabled||S.props.muiSkipListHighlight||S.type.muiSkipListHighlight)&&(b+=1,b>=a.length&&(b=-1))});const x=v.Children.map(a,(S,P)=>{if(P===b){const E={};return i&&(E.autoFocus=!0),S.props.tabIndex===void 0&&d==="selectedMenu"&&(E.tabIndex=0),v.cloneElement(S,E)}return S});return $.jsx(ol,{role:"menu",ref:y,className:s,onKeyDown:g,tabIndex:o?0:-1,...f,children:x})});function cke(e){return _e("MuiPopover",e)}Le("MuiPopover",["root","paper"]);function z3(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function V3(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function H3(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function r$(e){return typeof e=="function"?e():e}const uke=e=>{const{classes:t}=e;return Te({root:["root"],paper:["paper"]},cke,t)},dke=ie(Sv,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),NJ=ie(so,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),fke=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:d,elevation:f=8,marginThreshold:p=16,open:m,PaperProps:g={},slots:y={},slotProps:b={},transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:S=gh,transitionDuration:P="auto",TransitionProps:{onEntering:E,...T}={},disableScrollLock:O=!1,...k}=r,M=(b==null?void 0:b.paper)??g,I=v.useRef(),R={...r,anchorOrigin:a,anchorReference:l,elevation:f,marginThreshold:p,externalPaperSlotProps:M,transformOrigin:x,TransitionComponent:S,transitionDuration:P,TransitionProps:T},_=uke(R),N=v.useCallback(()=>{if(l==="anchorPosition")return s;const ce=r$(i),Q=(ce&&ce.nodeType===1?ce:mr(I.current).body).getBoundingClientRect();return{top:Q.top+z3(Q,a.vertical),left:Q.left+V3(Q,a.horizontal)}},[i,a.horizontal,a.vertical,s,l]),B=v.useCallback(ce=>({vertical:z3(ce,x.vertical),horizontal:V3(ce,x.horizontal)}),[x.horizontal,x.vertical]),L=v.useCallback(ce=>{const le={width:ce.offsetWidth,height:ce.offsetHeight},Q=B(le);if(l==="none")return{top:null,left:null,transformOrigin:H3(Q)};const ue=N();let ge=ue.top-Q.vertical,xe=ue.left-Q.horizontal;const me=ge+le.height,be=xe+le.width,we=ba(r$(i)),Oe=we.innerHeight-p,ke=we.innerWidth-p;if(p!==null&&geOe){const je=me-Oe;ge-=je,Q.vertical+=je}if(p!==null&&xeke){const je=be-ke;xe-=je,Q.horizontal+=je}return{top:`${Math.round(ge)}px`,left:`${Math.round(xe)}px`,transformOrigin:H3(Q)}},[i,l,N,B,p]),[F,U]=v.useState(m),V=v.useCallback(()=>{const ce=I.current;if(!ce)return;const le=L(ce);le.top!==null&&ce.style.setProperty("top",le.top),le.left!==null&&(ce.style.left=le.left),ce.style.transformOrigin=le.transformOrigin,U(!0)},[L]);v.useEffect(()=>(O&&window.addEventListener("scroll",V),()=>window.removeEventListener("scroll",V)),[i,O,V]);const z=(ce,le)=>{E&&E(ce,le),V()},W=()=>{U(!1)};v.useEffect(()=>{m&&V()}),v.useImperativeHandle(o,()=>m?{updatePosition:()=>{V()}}:null,[m,V]),v.useEffect(()=>{if(!m)return;const ce=nS(()=>{V()}),le=ba(i);return le.addEventListener("resize",ce),()=>{ce.clear(),le.removeEventListener("resize",ce)}},[i,m,V]);let G=P;P==="auto"&&!S.muiSupportAuto&&(G=void 0);const J=d||(i?mr(r$(i)).body:void 0),K={slots:y,slotProps:{...b,paper:M}},[ne,re]=dn("paper",{elementType:NJ,externalForwardedProps:K,additionalProps:{elevation:f,className:pe(_.paper,M==null?void 0:M.className),style:F?M.style:{...M.style,opacity:0}},ownerState:R}),[oe,{slotProps:fe,...se}]=dn("root",{elementType:dke,externalForwardedProps:K,additionalProps:{slotProps:{backdrop:{invisible:!0}},container:J,open:m},ownerState:R,className:pe(_.root,u)}),ee=Wt(I,re.ref);return $.jsx(oe,{...se,...!Vw(oe)&&{slotProps:fe,disableScrollLock:O},...k,ref:n,children:$.jsx(S,{appear:!0,in:m,onEntering:z,onExited:W,timeout:G,...T,children:$.jsx(ne,{...re,ref:ee,children:c})})})});function pke(e){return _e("MuiMenu",e)}Le("MuiMenu",["root","paper","list"]);const hke={vertical:"top",horizontal:"right"},mke={vertical:"top",horizontal:"left"},gke=e=>{const{classes:t}=e;return Te({root:["root"],paper:["paper"],list:["list"]},pke,t)},yke=ie(fke,{shouldForwardProp:e=>ii(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),vke=ie(NJ,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),bke=ie(Ev,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),is=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:d={},PopoverClasses:f,transitionDuration:p="auto",TransitionProps:{onEntering:m,...g}={},variant:y="selectedMenu",slots:b={},slotProps:x={},...S}=r,P=nr(),E={...r,autoFocus:o,disableAutoFocusItem:s,MenuListProps:l,onEntering:m,PaperProps:d,transitionDuration:p,TransitionProps:g,variant:y},T=gke(E),O=o&&!s&&u,k=v.useRef(null),M=(F,U)=>{k.current&&k.current.adjustStyleForScrollbar(F,{direction:P?"rtl":"ltr"}),m&&m(F,U)},I=F=>{F.key==="Tab"&&(F.preventDefault(),c&&c(F,"tabKeyDown"))};let R=-1;v.Children.map(i,(F,U)=>{v.isValidElement(F)&&(F.props.disabled||(y==="selectedMenu"&&F.props.selected||R===-1)&&(R=U))});const _=b.paper??vke,N=x.paper??d,B=on({elementType:b.root,externalSlotProps:x.root,ownerState:E,className:[T.root,a]}),L=on({elementType:_,externalSlotProps:N,ownerState:E,className:T.paper});return $.jsx(yke,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:P?"right":"left"},transformOrigin:P?hke:mke,slots:{paper:_,root:b.root},slotProps:{root:B,paper:L},open:u,ref:n,transitionDuration:p,TransitionProps:{onEntering:M,...g},ownerState:E,...S,classes:f,children:$.jsx(bke,{onKeyDown:I,actions:k,autoFocus:o&&(R===-1||s),autoFocusItem:O,variant:y,...l,className:pe(T.list,l.className),children:i})})});function wke(e){return _e("MuiMenuItem",e)}const Hb=Le("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),xke=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Ske=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,l=Te({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},wke,a);return{...a,...l}},Cke=ie(Hi,{shouldForwardProp:e=>ii(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:xke})(tt(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Hb.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Hb.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Hb.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Hb.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Hb.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${$3.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${$3.inset}`]:{marginLeft:52},[`& .${yg.root}`]:{marginTop:0,marginBottom:0},[`& .${yg.inset}`]:{paddingLeft:36},[`& .${j3.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${j3.root} svg`]:{fontSize:"1.25rem"}}}]}))),tn=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:f,...p}=r,m=v.useContext(qs),g=v.useMemo(()=>({dense:a||m.dense||!1,disableGutters:l}),[m.dense,a,l]),y=v.useRef(null);xn(()=>{o&&y.current&&y.current.focus()},[o]);const b={...r,dense:g.dense,divider:s,disableGutters:l},x=Ske(r),S=Wt(y,n);let P;return r.disabled||(P=d!==void 0?d:-1),$.jsx(qs.Provider,{value:g,children:$.jsx(Cke,{ref:S,role:u,tabIndex:P,component:i,focusVisibleClassName:pe(x.focusVisible,c),className:pe(x.root,f),...p,ownerState:b,classes:x})})});function Pke(e){return _e("MuiNativeSelect",e)}const MF=Le("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Eke=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Se(n)}`,i&&"iconOpen",r&&"disabled"]};return Te(s,Pke,t)},FJ=ie("select")(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${MF.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),Tke=ie(FJ,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ii,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${MF.multiple}`]:t.multiple}]}})({}),jJ=ie("svg")(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${MF.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),Oke=ie(jJ,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Se(n.variant)}`],n.open&&t.iconOpen]}})({}),Ike=v.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:o,variant:l,error:i},d=Eke(u);return $.jsxs(v.Fragment,{children:[$.jsx(Tke,{ownerState:u,className:pe(d.select,r),disabled:o,ref:s||n,...c}),t.multiple?null:$.jsx(Oke,{as:a,ownerState:u,className:d.icon})]})});var U3;const kke=ie("fieldset",{shouldForwardProp:ii})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Mke=ie("legend",{shouldForwardProp:ii})(tt(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Ake(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=o!=null&&o!=="",l={...e,notched:i,withLabel:s};return $.jsx(kke,{"aria-hidden":!0,className:r,ownerState:l,...a,children:$.jsx(Mke,{ownerState:l,children:s?$.jsx("span",{children:o}):U3||(U3=$.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}const $ke=e=>{const{classes:t}=e,r=Te({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},QPe,t);return{...t,...r}},Rke=ie(iI,{shouldForwardProp:e=>ii(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:rI})(tt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Ps.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ps.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Ps.focused} .${Ps.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Hn()).map(([n])=>({props:{color:n},style:{[`&.${Ps.focused} .${Ps.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Ps.error} .${Ps.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Ps.disabled} .${Ps.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),Dke=ie(Ake,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(tt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),_ke=ie(aI,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:oI})(tt(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),AF=v.forwardRef(function(t,n){var r;const o=rt({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:a=!1,inputComponent:s="input",label:l,multiline:c=!1,notched:u,slots:d={},type:f="text",...p}=o,m=$ke(o),g=wa(),y=Rf({props:o,muiFormControl:g,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b={...o,color:y.color||"primary",disabled:y.disabled,error:y.error,focused:y.focused,formControl:g,fullWidth:a,hiddenLabel:y.hiddenLabel,multiline:c,size:y.size,type:f},x=d.root??i.Root??Rke,S=d.input??i.Input??_ke;return $.jsx(wv,{slots:{root:x,input:S},renderSuffix:P=>$.jsx(Dke,{ownerState:b,className:m.notchedOutline,label:l!=null&&l!==""&&y.required?r||(r=$.jsxs(v.Fragment,{children:[l," ","*"]})):l,notched:typeof u<"u"?u:!!(P.startAdornment||P.filled||P.focused)}),fullWidth:a,inputComponent:s,multiline:c,ref:n,type:f,...p,classes:{...m,notchedOutline:null}})});AF.muiName="Input";function Lke(e){return _e("MuiPagination",e)}Le("MuiPagination",["root","ul","outlined","text"]);function Nke(e={}){const{boundaryCount:t=1,componentName:n="usePagination",count:r=1,defaultPage:o=1,disabled:i=!1,hideNextButton:a=!1,hidePrevButton:s=!1,onChange:l,page:c,showFirstButton:u=!1,showLastButton:d=!1,siblingCount:f=1,...p}=e,[m,g]=bi({controlled:c,default:o,name:n,state:"page"}),y=(M,I)=>{c||g(I),l&&l(M,I)},b=(M,I)=>{const R=I-M+1;return Array.from({length:R},(_,N)=>M+N)},x=b(1,Math.min(t,r)),S=b(Math.max(r-t+1,t+1),r),P=Math.max(Math.min(m-f,r-t-f*2-1),t+2),E=Math.min(Math.max(m+f,t+f*2+2),r-t-1),T=[...u?["first"]:[],...s?[]:["previous"],...x,...P>t+2?["start-ellipsis"]:t+1t?[r-t]:[],...S,...a?[]:["next"],...d?["last"]:[]],O=M=>{switch(M){case"first":return 1;case"previous":return m-1;case"next":return m+1;case"last":return r;default:return null}};return{items:T.map(M=>typeof M=="number"?{onClick:I=>{y(I,M)},type:"page",page:M,selected:M===m,disabled:i,"aria-current":M===m?"page":void 0}:{onClick:I=>{y(I,O(M))},type:M,page:O(M),selected:!1,disabled:i||!M.includes("ellipsis")&&(M==="next"||M==="last"?m>=r:m<=1)}),...p}}function Fke(e){return _e("MuiPaginationItem",e)}const ki=Le("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),BJ=lt($.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),zJ=lt($.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),jke=lt($.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),Bke=lt($.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),VJ=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Se(n.size)}`],n.variant==="text"&&t[`text${Se(n.color)}`],n.variant==="outlined"&&t[`outlined${Se(n.color)}`],n.shape==="rounded"&&t.rounded,n.type==="page"&&t.page,(n.type==="start-ellipsis"||n.type==="end-ellipsis")&&t.ellipsis,(n.type==="previous"||n.type==="next")&&t.previousNext,(n.type==="first"||n.type==="last")&&t.firstLast]},zke=e=>{const{classes:t,color:n,disabled:r,selected:o,size:i,shape:a,type:s,variant:l}=e,c={root:["root",`size${Se(i)}`,l,a,n!=="standard"&&`color${Se(n)}`,n!=="standard"&&`${l}${Se(n)}`,r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return Te(c,Fke,t)},Vke=ie("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:VJ})(tt(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,height:"auto",[`&.${ki.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:{size:"small"},style:{minWidth:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}}]}))),Hke=ie(Hi,{name:"MuiPaginationItem",slot:"Root",overridesResolver:VJ})(tt(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,[`&.${ki.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ki.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},transition:e.transitions.create(["color","background-color"],{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ki.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${ki.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${ki.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}},variants:[{props:{size:"small"},style:{minWidth:26,height:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,height:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}},{props:{shape:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"outlined"},style:{border:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ki.selected}`]:{[`&.${ki.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}}}},{props:{variant:"text"},style:{[`&.${ki.selected}`]:{[`&.${ki.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}},...Object.entries(e.palette).filter(Hn(["dark","contrastText"])).map(([t])=>({props:{variant:"text",color:t},style:{[`&.${ki.selected}`]:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}},[`&.${ki.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark},[`&.${ki.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}})),...Object.entries(e.palette).filter(Hn(["light"])).map(([t])=>({props:{variant:"outlined",color:t},style:{[`&.${ki.selected}`]:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:vt(e.palette[t].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:vt(e.palette[t].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ki.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vt(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}}}}))]}))),Uke=ie("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})(tt(({theme:e})=>({fontSize:e.typography.pxToRem(20),margin:"0 -8px",variants:[{props:{size:"small"},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{fontSize:e.typography.pxToRem(22)}}]}))),Wke=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiPaginationItem"}),{className:o,color:i="standard",component:a,components:s={},disabled:l=!1,page:c,selected:u=!1,shape:d="circular",size:f="medium",slots:p={},slotProps:m={},type:g="page",variant:y="text",...b}=r,x={...r,color:i,disabled:l,selected:u,shape:d,size:f,type:g,variant:y},S=nr(),P=zke(x),E={slots:{previous:p.previous??s.previous,next:p.next??s.next,first:p.first??s.first,last:p.last??s.last},slotProps:m},[T,O]=dn("previous",{elementType:jke,externalForwardedProps:E,ownerState:x}),[k,M]=dn("next",{elementType:Bke,externalForwardedProps:E,ownerState:x}),[I,R]=dn("first",{elementType:BJ,externalForwardedProps:E,ownerState:x}),[_,N]=dn("last",{elementType:zJ,externalForwardedProps:E,ownerState:x}),B=S?{previous:"next",next:"previous",first:"last",last:"first"}[g]:g,L={previous:T,next:k,first:I,last:_}[B],F={previous:O,next:M,first:R,last:N}[B];return g==="start-ellipsis"||g==="end-ellipsis"?$.jsx(Vke,{ref:n,ownerState:x,className:pe(P.root,o),children:"…"}):$.jsxs(Hke,{ref:n,ownerState:x,component:a,disabled:l,className:pe(P.root,o),...b,children:[g==="page"&&c,L?$.jsx(Uke,{...F,className:P.icon,as:L}):null]})}),Gke=e=>{const{classes:t,variant:n}=e;return Te({root:["root",n],ul:["ul"]},Lke,t)},qke=ie("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),Kke=ie("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function Yke(e,t,n){return e==="page"?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const Xke=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiPagination"}),{boundaryCount:o=1,className:i,color:a="standard",count:s=1,defaultPage:l=1,disabled:c=!1,getItemAriaLabel:u=Yke,hideNextButton:d=!1,hidePrevButton:f=!1,onChange:p,page:m,renderItem:g=I=>$.jsx(Wke,{...I}),shape:y="circular",showFirstButton:b=!1,showLastButton:x=!1,siblingCount:S=1,size:P="medium",variant:E="text",...T}=r,{items:O}=Nke({...r,componentName:"Pagination"}),k={...r,boundaryCount:o,color:a,count:s,defaultPage:l,disabled:c,getItemAriaLabel:u,hideNextButton:d,hidePrevButton:f,renderItem:g,shape:y,showFirstButton:b,showLastButton:x,siblingCount:S,size:P,variant:E},M=Gke(k);return $.jsx(qke,{"aria-label":"pagination navigation",className:pe(M.root,i),ownerState:k,ref:n,...T,children:$.jsx(Kke,{className:M.ul,ownerState:k,children:O.map((I,R)=>$.jsx("li",{children:g({...I,color:a,"aria-label":u(I.type,I.page,I.selected),shape:y,size:P,variant:E})},R))})})});function Qke(e){return _e("MuiSelect",e)}const Ub=Le("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var W3;const Jke=ie(FJ,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Ub.select}`]:t.select},{[`&.${Ub.select}`]:t[n.variant]},{[`&.${Ub.error}`]:t.error},{[`&.${Ub.multiple}`]:t.multiple}]}})({[`&.${Ub.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Zke=ie(jJ,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Se(n.variant)}`],n.open&&t.iconOpen]}})({}),eMe=ie("input",{shouldForwardProp:e=>VY(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function G3(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function tMe(e){return e==null||typeof e=="string"&&!e.trim()}const nMe=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Se(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Te(s,Qke,t)},rMe=v.forwardRef(function(t,n){var ot;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:f,error:p=!1,IconComponent:m,inputRef:g,labelId:y,MenuProps:b={},multiple:x,name:S,onBlur:P,onChange:E,onClose:T,onFocus:O,onOpen:k,open:M,readOnly:I,renderValue:R,required:_,SelectDisplayProps:N={},tabIndex:B,type:L,value:F,variant:U="standard",...V}=t,[z,W]=bi({controlled:F,default:u,name:"Select"}),[G,J]=bi({controlled:M,default:c,name:"Select"}),K=v.useRef(null),ne=v.useRef(null),[re,oe]=v.useState(null),{current:fe}=v.useRef(M!=null),[se,ee]=v.useState(),ce=Wt(n,g),le=v.useCallback(Pe=>{ne.current=Pe,Pe&&oe(Pe)},[]),Q=re==null?void 0:re.parentNode;v.useImperativeHandle(ce,()=>({focus:()=>{ne.current.focus()},node:K.current,value:z}),[z]),v.useEffect(()=>{c&&G&&re&&!fe&&(ee(a?null:Q.clientWidth),ne.current.focus())},[re,a]),v.useEffect(()=>{i&&ne.current.focus()},[i]),v.useEffect(()=>{if(!y)return;const Pe=mr(ne.current).getElementById(y);if(Pe){const We=()=>{getSelection().isCollapsed&&ne.current.focus()};return Pe.addEventListener("click",We),()=>{Pe.removeEventListener("click",We)}}},[y]);const ue=(Pe,We)=>{Pe?k&&k(We):T&&T(We),fe||(ee(a?null:Q.clientWidth),J(Pe))},ge=Pe=>{Pe.button===0&&(Pe.preventDefault(),ne.current.focus(),ue(!0,Pe))},xe=Pe=>{ue(!1,Pe)},me=v.Children.toArray(s),be=Pe=>{const We=me.find(ft=>ft.props.value===Pe.target.value);We!==void 0&&(W(We.props.value),E&&E(Pe,We))},we=Pe=>We=>{let ft;if(We.currentTarget.hasAttribute("tabindex")){if(x){ft=Array.isArray(z)?z.slice():[];const Ot=z.indexOf(Pe.props.value);Ot===-1?ft.push(Pe.props.value):ft.splice(Ot,1)}else ft=Pe.props.value;if(Pe.props.onClick&&Pe.props.onClick(We),z!==ft&&(W(ft),E)){const Ot=We.nativeEvent||We,xt=new Ot.constructor(Ot.type,Ot);Object.defineProperty(xt,"target",{writable:!0,value:{value:ft,name:S}}),E(xt,Pe)}x||ue(!1,We)}},Oe=Pe=>{I||[" ","ArrowUp","ArrowDown","Enter"].includes(Pe.key)&&(Pe.preventDefault(),ue(!0,Pe))},ke=re!==null&&G,je=Pe=>{!ke&&P&&(Object.defineProperty(Pe,"target",{writable:!0,value:{value:z,name:S}}),P(Pe))};delete V["aria-invalid"];let de,Re;const Me=[];let Ae=!1;(EE({value:z})||f)&&(R?de=R(z):Ae=!0);const Ne=me.map(Pe=>{if(!v.isValidElement(Pe))return null;let We;if(x){if(!Array.isArray(z))throw new Error($u(2));We=z.some(ft=>G3(ft,Pe.props.value)),We&&Ae&&Me.push(Pe.props.children)}else We=G3(z,Pe.props.value),We&&Ae&&(Re=Pe.props.children);return v.cloneElement(Pe,{"aria-selected":We?"true":"false",onClick:we(Pe),onKeyUp:ft=>{ft.key===" "&&ft.preventDefault(),Pe.props.onKeyUp&&Pe.props.onKeyUp(ft)},role:"option",selected:We,value:void 0,"data-value":Pe.props.value})});Ae&&(x?Me.length===0?de=null:de=Me.reduce((Pe,We,ft)=>(Pe.push(We),ft{const{classes:t}=e;return t},$F={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ii(e)&&e!=="variant",slot:"Root"},iMe=ie(OF,$F)(""),aMe=ie(AF,$F)(""),sMe=ie(TF,$F)(""),Dh=v.forwardRef(function(t,n){const r=rt({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=vJ,id:d,input:f,inputProps:p,label:m,labelId:g,MenuProps:y,multiple:b=!1,native:x=!1,onClose:S,onOpen:P,open:E,renderValue:T,SelectDisplayProps:O,variant:k="outlined",...M}=r,I=x?Ike:rMe,R=wa(),_=Rf({props:r,muiFormControl:R,states:["variant","error"]}),N=_.variant||k,B={...r,variant:N,classes:a},L=oMe(B),{root:F,...U}=L,V=f||{standard:$.jsx(iMe,{ownerState:B}),outlined:$.jsx(aMe,{label:m,ownerState:B}),filled:$.jsx(sMe,{ownerState:B})}[N],z=Wt(n,Tf(V));return $.jsx(v.Fragment,{children:v.cloneElement(V,{inputComponent:I,inputProps:{children:i,error:_.error,IconComponent:u,variant:N,type:void 0,multiple:b,...x?{id:d}:{autoWidth:o,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:y,onClose:S,onOpen:P,open:E,renderValue:T,SelectDisplayProps:{id:d,...O}},...p,classes:p?mo(U,p.classes):U,...f?f.props.inputProps:{}},...(b&&x||c)&&N==="outlined"?{notched:!0}:{},ref:z,className:pe(V.props.className,s,L.root),...!f&&{variant:N},...M})})});Dh.muiName="Select";function lMe(e){return _e("MuiSkeleton",e)}Le("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const cMe=e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:i,height:a}=e;return Te({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},lMe,t)},eD=jc` 0% { opacity: 1; } @@ -257,7 +249,7 @@ Error generating stack: `+i.message+` 100% { opacity: 1; } -`,r_=jc` +`,tD=jc` 0% { transform: translateX(-100%); } @@ -270,69 +262,77 @@ Error generating stack: `+i.message+` 100% { transform: translateX(100%); } -`,mMe=typeof n_!="string"?Tf` - animation: ${n_} 2s ease-in-out 0.5s infinite; - `:null,gMe=typeof r_!="string"?Tf` +`,uMe=typeof eD!="string"?Ef` + animation: ${eD} 2s ease-in-out 0.5s infinite; + `:null,dMe=typeof tD!="string"?Ef` &::after { - animation: ${r_} 2s linear 0.5s infinite; + animation: ${tD} 2s linear 0.5s infinite; } - `:null,yMe=oe("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.animation!==!1&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(rt(({theme:e})=>{const t=hwe(e.shape.borderRadius)||"px",n=mwe(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:vt(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:r})=>r.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:r})=>r.hasChildren&&!r.width,style:{maxWidth:"fit-content"}},{props:({ownerState:r})=>r.hasChildren&&!r.height,style:{height:"auto"}},{props:{animation:"pulse"},style:mMe||{animation:`${n_} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient( + `:null,fMe=ie("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.animation!==!1&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(tt(({theme:e})=>{const t=swe(e.shape.borderRadius)||"px",n=lwe(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:vt(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:r})=>r.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:r})=>r.hasChildren&&!r.width,style:{maxWidth:"fit-content"}},{props:({ownerState:r})=>r.hasChildren&&!r.height,style:{height:"auto"}},{props:{animation:"pulse"},style:uMe||{animation:`${eD} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient( 90deg, transparent, ${(e.vars||e).palette.action.hover}, transparent - )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:gMe||{"&::after":{animation:`${r_} 2s linear 0.5s infinite`}}}]}})),TP=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiSkeleton"}),{animation:o="pulse",className:i,component:a="span",height:s,style:l,variant:c="text",width:u,...d}=r,f={...r,animation:o,component:a,variant:c,hasChildren:!!d.children},p=hMe(f);return $.jsx(yMe,{as:a,ref:n,className:fe(p.root,i),ownerState:f,...d,style:{width:u,height:s,...l}})});function vMe(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:i}=e,a=ca();y.useEffect(()=>{if(!o)return;function w(x){x.defaultPrevented||x.key==="Escape"&&(r==null||r(x,"escapeKeyDown"))}return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[o,r]);const s=et((w,x)=>{r==null||r(w,x)}),l=et(w=>{!r||w==null||a.start(w,()=>{s(null,"timeout")})});y.useEffect(()=>(o&&l(t),a.clear),[o,t,l,a]);const c=w=>{r==null||r(w,"clickaway")},u=a.clear,d=y.useCallback(()=>{t!=null&&l(i??t*.5)},[t,i,l]),f=w=>x=>{const S=w.onBlur;S==null||S(x),d()},p=w=>x=>{const S=w.onFocus;S==null||S(x),u()},m=w=>x=>{const S=w.onMouseEnter;S==null||S(x),u()},g=w=>x=>{const S=w.onMouseLeave;S==null||S(x),d()};return y.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,o,d,u]),{getRootProps:(w={})=>{const x={...qP(e),...qP(w)};return{role:"presentation",...w,...x,onBlur:f(x),onFocus:p(x),onMouseEnter:m(x),onMouseLeave:g(x)}},onClickAway:c}}function bMe(e){return Ne("MuiSnackbarContent",e)}Le("MuiSnackbarContent",["root","message","action"]);const wMe=e=>{const{classes:t}=e;return Te({root:["root"],action:["action"],message:["message"]},bMe,t)},xMe=oe(io,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(rt(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=IY(e.palette.background.default,t);return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),SMe=oe("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),CMe=oe("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),PMe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiSnackbarContent"}),{action:o,className:i,message:a,role:s="alert",...l}=r,c=r,u=wMe(c);return $.jsxs(xMe,{role:s,square:!0,elevation:6,className:fe(u.root,i),ownerState:c,ref:n,...l,children:[$.jsx(SMe,{className:u.message,ownerState:c,children:a}),o?$.jsx(CMe,{className:u.action,ownerState:c,children:o}):null]})});function TMe(e){return Ne("MuiSnackbar",e)}Le("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const EMe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Se(n.vertical)}${Se(n.horizontal)}`]};return Te(r,TMe,t)},G3=oe("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Se(n.anchorOrigin.vertical)}${Se(n.anchorOrigin.horizontal)}`]]}})(rt(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),qJ=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiSnackbar"}),o=ko(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:f,ContentProps:p,disableWindowBlurListener:m=!1,message:g,onBlur:v,onClose:w,onFocus:x,onMouseEnter:S,onMouseLeave:P,open:T,resumeHideDuration:E,TransitionComponent:O=gh,transitionDuration:k=i,TransitionProps:{onEnter:A,onExited:I,...R}={},...L}=r,F={...r,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:c,disableWindowBlurListener:m,TransitionComponent:O,transitionDuration:k},z=EMe(F),{getRootProps:_,onClickAway:D}=vMe({...F}),[H,B]=y.useState(!0),V=on({elementType:G3,getSlotProps:_,externalForwardedProps:L,ownerState:F,additionalProps:{ref:n},className:[z.root,d]}),W=Q=>{B(!0),I&&I(Q)},G=(Q,Y)=>{B(!1),A&&A(Q,Y)};return!T&&H?null:$.jsx(IF,{onClickAway:D,...f,children:$.jsx(G3,{...V,children:$.jsx(O,{appear:!0,in:T,timeout:k,direction:s==="top"?"down":"up",onEnter:G,onExited:W,...R,children:u||$.jsx(PMe,{message:g,action:a,...p})})})})});function OMe(e){return Ne("MuiTooltip",e)}const Nr=Le("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function IMe(e){return Math.round(e*1e5)/1e5}const kMe=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Se(i.split("-")[0])}`],arrow:["arrow"]};return Te(a,OMe,t)},MMe=oe($f,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(rt(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${Nr.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Nr.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Nr.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Nr.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Nr.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Nr.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Nr.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Nr.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),AMe=oe("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Se(n.placement.split("-")[0])}`]]}})(rt(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:vt(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${Nr.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Nr.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Nr.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Nr.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${IMe(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${Nr.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Nr.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${Nr.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Nr.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${Nr.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Nr.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${Nr.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Nr.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Nr.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Nr.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),$Me=oe("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(rt(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:vt(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let SC=!1;const q3=new YO;let Wb={x:0,y:0};function CC(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Ql=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiTooltip"}),{arrow:o=!1,children:i,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:p=!1,enterDelay:m=100,enterNextDelay:g=0,enterTouchDelay:v=700,followCursor:w=!1,id:x,leaveDelay:S=0,leaveTouchDelay:P=1500,onClose:T,onOpen:E,open:O,placement:k="bottom",PopperComponent:A,PopperProps:I={},slotProps:R={},slots:L={},title:F,TransitionComponent:z,TransitionProps:_,...D}=r,H=y.isValidElement(i)?i:$.jsx("span",{children:i}),B=ko(),V=er(),[W,G]=y.useState(),[Q,Y]=y.useState(null),ne=y.useRef(!1),ie=f||w,re=ca(),pe=ca(),le=ca(),ee=ca(),[ce,se]=vi({controlled:O,default:!1,name:"Tooltip",state:"open"});let Z=ce;const ue=Ln(x),ge=y.useRef(),we=et(()=>{ge.current!==void 0&&(document.body.style.WebkitUserSelect=ge.current,ge.current=void 0),ee.clear()});y.useEffect(()=>we,[we]);const me=zt=>{q3.clear(),SC=!0,se(!0),E&&!Z&&E(zt)},be=et(zt=>{q3.start(800+S,()=>{SC=!1}),se(!1),T&&Z&&T(zt),re.start(B.transitions.duration.shortest,()=>{ne.current=!1})}),xe=zt=>{ne.current&&zt.type!=="touchstart"||(W&&W.removeAttribute("title"),pe.clear(),le.clear(),m||SC&&g?pe.start(SC?g:m,()=>{me(zt)}):me(zt))},Ee=zt=>{pe.clear(),le.start(S,()=>{be(zt)})},[,Me]=y.useState(!1),_e=zt=>{GP(zt.target)||(Me(!1),Ee(zt))},de=zt=>{W||G(zt.currentTarget),GP(zt.target)&&(Me(!0),xe(zt))},Ae=zt=>{ne.current=!0;const Wo=H.props;Wo.onTouchStart&&Wo.onTouchStart(zt)},Oe=zt=>{Ae(zt),le.clear(),re.clear(),we(),ge.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ee.start(v,()=>{document.body.style.WebkitUserSelect=ge.current,xe(zt)})},$e=zt=>{H.props.onTouchEnd&&H.props.onTouchEnd(zt),we(),le.start(P,()=>{be(zt)})};y.useEffect(()=>{if(!Z)return;function zt(Wo){Wo.key==="Escape"&&be(Wo)}return document.addEventListener("keydown",zt),()=>{document.removeEventListener("keydown",zt)}},[be,Z]);const Be=Wt(Ef(H),G,n);!F&&F!==0&&(Z=!1);const Je=y.useRef(),ot=zt=>{const Wo=H.props;Wo.onMouseMove&&Wo.onMouseMove(zt),Wb={x:zt.clientX,y:zt.clientY},Je.current&&Je.current.update()},lt={},it=typeof F=="string";c?(lt.title=!Z&&it&&!d?F:null,lt["aria-describedby"]=Z?ue:null):(lt["aria-label"]=it?F:null,lt["aria-labelledby"]=Z&&!it?ue:null);const tt={...lt,...D,...H.props,className:fe(D.className,H.props.className),onTouchStart:Ae,ref:Be,...w?{onMouseMove:ot}:{}},pt={};p||(tt.onTouchStart=Oe,tt.onTouchEnd=$e),d||(tt.onMouseOver=CC(xe,tt.onMouseOver),tt.onMouseLeave=CC(Ee,tt.onMouseLeave),ie||(pt.onMouseOver=xe,pt.onMouseLeave=Ee)),u||(tt.onFocus=CC(de,tt.onFocus),tt.onBlur=CC(_e,tt.onBlur),ie||(pt.onFocus=de,pt.onBlur=_e));const qt={...r,isRtl:V,arrow:o,disableInteractive:ie,placement:k,PopperComponentProp:A,touch:ne.current},qe=typeof R.popper=="function"?R.popper(qt):R.popper,Re=y.useMemo(()=>{var Wo,Gc;let zt=[{name:"arrow",enabled:!!Q,options:{element:Q,padding:4}}];return(Wo=I.popperOptions)!=null&&Wo.modifiers&&(zt=zt.concat(I.popperOptions.modifiers)),(Gc=qe==null?void 0:qe.popperOptions)!=null&&Gc.modifiers&&(zt=zt.concat(qe.popperOptions.modifiers)),{...I.popperOptions,...qe==null?void 0:qe.popperOptions,modifiers:zt}},[Q,I.popperOptions,qe==null?void 0:qe.popperOptions]),Ze=kMe(qt),Pt=typeof R.transition=="function"?R.transition(qt):R.transition,_t={slots:{popper:s.Popper,transition:s.Transition??z,tooltip:s.Tooltip,arrow:s.Arrow,...L},slotProps:{arrow:R.arrow??l.arrow,popper:{...I,...qe??l.popper},tooltip:R.tooltip??l.tooltip,transition:{..._,...Pt??l.transition}}},[kt,yn]=Kn("popper",{elementType:MMe,externalForwardedProps:_t,ownerState:qt,className:fe(Ze.popper,I==null?void 0:I.className)}),[Fn,Vn]=Kn("transition",{elementType:gh,externalForwardedProps:_t,ownerState:qt}),[wo,xo]=Kn("tooltip",{elementType:AMe,className:Ze.tooltip,externalForwardedProps:_t,ownerState:qt}),[oi,Xi]=Kn("arrow",{elementType:$Me,className:Ze.arrow,externalForwardedProps:_t,ownerState:qt,ref:Y});return $.jsxs(y.Fragment,{children:[y.cloneElement(H,tt),$.jsx(kt,{as:A??$f,placement:k,anchorEl:w?{getBoundingClientRect:()=>({top:Wb.y,left:Wb.x,right:Wb.x,bottom:Wb.y,width:0,height:0})}:W,popperRef:Je,open:W?Z:!1,id:ue,transition:!0,...pt,...yn,popperOptions:Re,children:({TransitionProps:zt})=>$.jsx(Fn,{timeout:B.transitions.duration.shorter,...zt,...Vn,children:$.jsxs(wo,{...xo,children:[F,o?$.jsx(oi,{...Xi}):null]})})})]})}),Ut=F0e({createStyledComponent:oe("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>at({props:e,name:"MuiStack"})}),hS=y.createContext({}),xI=y.createContext({});function RMe(e){return Ne("MuiStep",e)}Le("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const _Me=e=>{const{classes:t,orientation:n,alternativeLabel:r,completed:o}=e;return Te({root:["root",n,r&&"alternativeLabel",o&&"completed"]},RMe,t)},DMe=oe("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({variants:[{props:{orientation:"horizontal"},style:{paddingLeft:8,paddingRight:8}},{props:{alternativeLabel:!0},style:{flex:1,position:"relative"}}]}),Mm=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiStep"}),{active:o,children:i,className:a,component:s="div",completed:l,disabled:c,expanded:u=!1,index:d,last:f,...p}=r,{activeStep:m,connector:g,alternativeLabel:v,orientation:w,nonLinear:x}=y.useContext(hS);let[S=!1,P=!1,T=!1]=[o,l,c];m===d?S=o!==void 0?o:!0:!x&&m>d?P=l!==void 0?l:!0:!x&&m({index:d,last:f,expanded:u,icon:d+1,active:S,completed:P,disabled:T}),[d,f,u,S,P,T]),O={...r,active:S,orientation:w,alternativeLabel:v,completed:P,disabled:T,expanded:u,component:s},k=_Me(O),A=$.jsxs(DMe,{as:s,className:fe(k.root,a),ref:n,ownerState:O,...p,children:[g&&v&&d!==0?g:null,i]});return $.jsx(xI.Provider,{value:E,children:g&&!v&&d!==0?$.jsxs(y.Fragment,{children:[g,A]}):A})}),NMe=ut($.jsx("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),LMe=ut($.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");function FMe(e){return Ne("MuiStepIcon",e)}const s$=Le("MuiStepIcon",["root","active","completed","error","text"]);var K3;const jMe=e=>{const{classes:t,active:n,completed:r,error:o}=e;return Te({root:["root",n&&"active",r&&"completed",o&&"error"],text:["text"]},FMe,t)},l$=oe(Cw,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(rt(({theme:e})=>({display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${s$.completed}`]:{color:(e.vars||e).palette.primary.main},[`&.${s$.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${s$.error}`]:{color:(e.vars||e).palette.error.main}}))),BMe=oe("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})(rt(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}))),zMe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepIcon"}),{active:o=!1,className:i,completed:a=!1,error:s=!1,icon:l,...c}=r,u={...r,active:o,completed:a,error:s},d=jMe(u);if(typeof l=="number"||typeof l=="string"){const f=fe(i,d.root);return s?$.jsx(l$,{as:LMe,className:f,ref:n,ownerState:u,...c}):a?$.jsx(l$,{as:NMe,className:f,ref:n,ownerState:u,...c}):$.jsxs(l$,{className:f,ref:n,ownerState:u,...c,children:[K3||(K3=$.jsx("circle",{cx:"12",cy:"12",r:"12"})),$.jsx(BMe,{className:d.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:u,children:l})]})}return l});function VMe(e){return Ne("MuiStepLabel",e)}const Kd=Le("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),HMe=e=>{const{classes:t,orientation:n,active:r,completed:o,error:i,disabled:a,alternativeLabel:s}=e;return Te({root:["root",n,i&&"error",a&&"disabled",s&&"alternativeLabel"],label:["label",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]},VMe,t)},UMe=oe("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation]]}})({display:"flex",alignItems:"center",[`&.${Kd.alternativeLabel}`]:{flexDirection:"column"},[`&.${Kd.disabled}`]:{cursor:"default"},variants:[{props:{orientation:"vertical"},style:{textAlign:"left",padding:"8px 0"}}]}),WMe=oe("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})(rt(({theme:e})=>({...e.typography.body2,display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${Kd.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${Kd.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${Kd.alternativeLabel}`]:{marginTop:16},[`&.${Kd.error}`]:{color:(e.vars||e).palette.error.main}}))),GMe=oe("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({flexShrink:0,display:"flex",paddingRight:8,[`&.${Kd.alternativeLabel}`]:{paddingRight:0}}),qMe=oe("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(rt(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${Kd.alternativeLabel}`]:{textAlign:"center"}}))),Id=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepLabel"}),{children:o,className:i,componentsProps:a={},error:s=!1,icon:l,optional:c,slots:u={},slotProps:d={},StepIconComponent:f,StepIconProps:p,...m}=r,{alternativeLabel:g,orientation:v}=y.useContext(hS),{active:w,disabled:x,completed:S,icon:P}=y.useContext(xI),T=l||P;let E=f;T&&!E&&(E=zMe);const O={...r,active:w,alternativeLabel:g,completed:S,disabled:x,error:s,orientation:v},k=HMe(O),A={slots:u,slotProps:{stepIcon:p,...a,...d}},[I,R]=Kn("label",{elementType:WMe,externalForwardedProps:A,ownerState:O}),[L,F]=Kn("stepIcon",{elementType:E,externalForwardedProps:A,ownerState:O});return $.jsxs(UMe,{className:fe(k.root,i),ref:n,ownerState:O,...m,children:[T||L?$.jsx(GMe,{className:k.iconContainer,ownerState:O,children:$.jsx(L,{completed:S,active:w,error:s,icon:T,...F})}):null,$.jsxs(qMe,{className:k.labelContainer,ownerState:O,children:[o?$.jsx(I,{...R,className:fe(k.label,R==null?void 0:R.className),children:o}):null,c]})]})});Id&&(Id.muiName="StepLabel");function KMe(e){return Ne("MuiStepConnector",e)}Le("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);const YMe=e=>{const{classes:t,orientation:n,alternativeLabel:r,active:o,completed:i,disabled:a}=e,s={root:["root",n,r&&"alternativeLabel",o&&"active",i&&"completed",a&&"disabled"],line:["line",`line${Se(n)}`]};return Te(s,KMe,t)},XMe=oe("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({flex:"1 1 auto",variants:[{props:{orientation:"vertical"},style:{marginLeft:12}},{props:{alternativeLabel:!0},style:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"}}]}),QMe=oe("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.line,t[`line${Se(n.orientation)}`]]}})(rt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600];return{display:"block",borderColor:e.vars?e.vars.palette.StepConnector.border:t,variants:[{props:{orientation:"horizontal"},style:{borderTopStyle:"solid",borderTopWidth:1}},{props:{orientation:"vertical"},style:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}]}})),JMe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepConnector"}),{className:o,...i}=r,{alternativeLabel:a,orientation:s="horizontal"}=y.useContext(hS),{active:l,disabled:c,completed:u}=y.useContext(xI),d={...r,alternativeLabel:a,orientation:s,active:l,completed:u,disabled:c},f=YMe(d);return $.jsx(XMe,{className:fe(f.root,o),ref:n,ownerState:d,...i,children:$.jsx(QMe,{className:f.line,ownerState:d})})});function ZMe(e){return Ne("MuiStepContent",e)}Le("MuiStepContent",["root","last","transition"]);const eAe=e=>{const{classes:t,last:n}=e;return Te({root:["root",n&&"last"],transition:["transition"]},ZMe,t)},tAe=oe("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.last&&t.last]}})(rt(({theme:e})=>({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:e.vars?`1px solid ${e.vars.palette.StepContent.border}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}`,variants:[{props:{last:!0},style:{borderLeft:"none"}}]}))),nAe=oe(Gs,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),Am=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepContent"}),{children:o,className:i,TransitionComponent:a=Gs,transitionDuration:s="auto",TransitionProps:l,...c}=r;y.useContext(hS);const{active:u,last:d,expanded:f}=y.useContext(xI),p={...r,last:d},m=eAe(p);let g=s;return s==="auto"&&!a.muiSupportAuto&&(g=void 0),$.jsx(tAe,{className:fe(m.root,i),ref:n,ownerState:p,...c,children:$.jsx(nAe,{as:a,in:u||f,className:m.transition,ownerState:p,timeout:g,unmountOnExit:!0,...l,children:o})})});function rAe(e){return Ne("MuiStepper",e)}Le("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"]);const oAe=e=>{const{orientation:t,nonLinear:n,alternativeLabel:r,classes:o}=e;return Te({root:["root",t,n&&"nonLinear",r&&"alternativeLabel"]},rAe,o)},iAe=oe("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.nonLinear&&t.nonLinear]}})({display:"flex",variants:[{props:{orientation:"horizontal"},style:{flexDirection:"row",alignItems:"center"}},{props:{orientation:"vertical"},style:{flexDirection:"column"}},{props:{alternativeLabel:!0},style:{alignItems:"flex-start"}}]}),aAe=$.jsx(JMe,{}),sAe=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiStepper"}),{activeStep:o=0,alternativeLabel:i=!1,children:a,className:s,component:l="div",connector:c=aAe,nonLinear:u=!1,orientation:d="horizontal",...f}=r,p={...r,nonLinear:u,alternativeLabel:i,orientation:d,component:l},m=oAe(p),g=y.Children.toArray(a).filter(Boolean),v=g.map((x,S)=>y.cloneElement(x,{index:S,last:S+1===g.length,...x.props})),w=y.useMemo(()=>({activeStep:o,alternativeLabel:i,connector:c,nonLinear:u,orientation:d}),[o,i,c,u,d]);return $.jsx(hS.Provider,{value:w,children:$.jsx(iAe,{as:l,ownerState:p,className:fe(m.root,s),ref:n,...f,children:v})})});function lAe(e){return Ne("MuiSwitch",e)}const ki=Le("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),cAe=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,s={root:["root",n&&`edge${Se(n)}`,`size${Se(r)}`],switchBase:["switchBase",`color${Se(o)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=Te(s,lAe,t);return{...t,...l}},uAe=oe("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Se(n.edge)}`],t[`size${Se(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${ki.thumb}`]:{width:16,height:16},[`& .${ki.switchBase}`]:{padding:4,[`&.${ki.checked}`]:{transform:"translateX(16px)"}}}}]}),dAe=oe(OJ,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${ki.input}`]:t.input},n.color!=="default"&&t[`color${Se(n.color)}`]]}})(rt(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${ki.checked}`]:{transform:"translateX(20px)"},[`&.${ki.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${ki.checked} + .${ki.track}`]:{opacity:.5},[`&.${ki.disabled} + .${ki.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${ki.input}`]:{left:"-100%",width:"300%"}})),rt(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(Bn(["light"])).map(([t])=>({props:{color:t},style:{[`&.${ki.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ki.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?_u(e.palette[t].main,.62):Ru(e.palette[t].main,.55)}`}},[`&.${ki.checked} + .${ki.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),fAe=oe("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(rt(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),pAe=oe("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(rt(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),Hu=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiSwitch"}),{className:o,color:i="primary",edge:a=!1,size:s="medium",sx:l,...c}=r,u={...r,color:i,edge:a,size:s},d=cAe(u),f=$.jsx(pAe,{className:d.thumb,ownerState:u});return $.jsxs(uAe,{className:fe(d.root,o),sx:l,ownerState:u,children:[$.jsx(dAe,{type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:u,...c,classes:{...d,root:d.switchBase}}),$.jsx(fAe,{className:d.track,ownerState:u})]})});function hAe(e){return Ne("MuiTab",e)}const vs=Le("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),mAe=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:s,disabled:l}=e,c={root:["root",i&&a&&"labelIcon",`textColor${Se(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]};return Te(c,hAe,t)},gAe=oe(Hi,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Se(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${vs.iconWrapper}`]:t.iconWrapper},{[`& .${vs.icon}`]:t.icon}]}})(rt(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="top",style:{[`& > .${vs.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="bottom",style:{[`& > .${vs.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="start",style:{[`& > .${vs.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="end",style:{[`& > .${vs.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${vs.selected}`]:{opacity:1},[`&.${vs.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${vs.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${vs.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${vs.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${vs.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),Y3=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:s,icon:l,iconPosition:c="top",indicator:u,label:d,onChange:f,onClick:p,onFocus:m,selected:g,selectionFollowsFocus:v,textColor:w="inherit",value:x,wrapped:S=!1,...P}=r,T={...r,disabled:i,disableFocusRipple:a,selected:g,icon:!!l,iconPosition:c,label:!!d,fullWidth:s,textColor:w,wrapped:S},E=mAe(T),O=l&&d&&y.isValidElement(l)?y.cloneElement(l,{className:fe(E.icon,l.props.className)}):l,k=I=>{!g&&f&&f(I,x),p&&p(I)},A=I=>{v&&!g&&f&&f(I,x),m&&m(I)};return $.jsxs(gAe,{focusRipple:!a,className:fe(E.root,o),ref:n,role:"tab","aria-selected":g,disabled:i,onClick:k,onFocus:A,ownerState:T,tabIndex:g?0:-1,...P,children:[c==="top"||c==="start"?$.jsxs(y.Fragment,{children:[O,d]}):$.jsxs(y.Fragment,{children:[d,O]}),u]})}),KJ=y.createContext();function yAe(e){return Ne("MuiTable",e)}Le("MuiTable",["root","stickyHeader"]);const vAe=e=>{const{classes:t,stickyHeader:n}=e;return Te({root:["root",n&&"stickyHeader"]},yAe,t)},bAe=oe("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(rt(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:t})=>t.stickyHeader,style:{borderCollapse:"separate"}}]}))),X3="table",Uu=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiTable"}),{className:o,component:i=X3,padding:a="normal",size:s="medium",stickyHeader:l=!1,...c}=r,u={...r,component:i,padding:a,size:s,stickyHeader:l},d=vAe(u),f=y.useMemo(()=>({padding:a,size:s,stickyHeader:l}),[a,s,l]);return $.jsx(KJ.Provider,{value:f,children:$.jsx(bAe,{as:i,role:i===X3?null:"table",ref:n,className:fe(d.root,o),ownerState:u,...c})})}),SI=y.createContext();function wAe(e){return Ne("MuiTableBody",e)}Le("MuiTableBody",["root"]);const xAe=e=>{const{classes:t}=e;return Te({root:["root"]},wAe,t)},SAe=oe("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),CAe={variant:"body"},Q3="tbody",Wu=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableBody"}),{className:o,component:i=Q3,...a}=r,s={...r,component:i},l=xAe(s);return $.jsx(SI.Provider,{value:CAe,children:$.jsx(SAe,{className:fe(l.root,o),as:i,ref:n,role:i===Q3?null:"rowgroup",ownerState:s,...a})})});function PAe(e){return Ne("MuiTableCell",e)}const TAe=Le("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),EAe=e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e,s={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${Se(r)}`,o!=="normal"&&`padding${Se(o)}`,`size${Se(i)}`]};return Te(s,PAe,t)},OAe=oe("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Se(n.size)}`],n.padding!=="normal"&&t[`padding${Se(n.padding)}`],n.align!=="inherit"&&t[`align${Se(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(rt(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid - ${e.palette.mode==="light"?_u(vt(e.palette.divider,1),.88):Ru(vt(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${TAe.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:t})=>t.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),Ie=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:l,size:c,sortDirection:u,variant:d,...f}=r,p=y.useContext(KJ),m=y.useContext(SI),g=m&&m.variant==="head";let v;a?v=a:v=g?"th":"td";let w=l;v==="td"?w=void 0:!w&&g&&(w="col");const x=d||m&&m.variant,S={...r,align:o,component:v,padding:s||(p&&p.padding?p.padding:"normal"),size:c||(p&&p.size?p.size:"medium"),sortDirection:u,stickyHeader:x==="head"&&p&&p.stickyHeader,variant:x},P=EAe(S);let T=null;return u&&(T=u==="asc"?"ascending":"descending"),$.jsx(OAe,{as:v,ref:n,className:fe(P.root,i),"aria-sort":T,scope:w,ownerState:S,...f})});function IAe(e){return Ne("MuiTableContainer",e)}Le("MuiTableContainer",["root"]);const kAe=e=>{const{classes:t}=e;return Te({root:["root"]},IAe,t)},MAe=oe("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),Gu=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableContainer"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=kAe(s);return $.jsx(MAe,{ref:n,as:i,className:fe(l.root,o),ownerState:s,...a})});function AAe(e){return Ne("MuiTableHead",e)}Le("MuiTableHead",["root"]);const $Ae=e=>{const{classes:t}=e;return Te({root:["root"]},AAe,t)},RAe=oe("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),_Ae={variant:"head"},J3="thead",Dh=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableHead"}),{className:o,component:i=J3,...a}=r,s={...r,component:i},l=$Ae(s);return $.jsx(SI.Provider,{value:_Ae,children:$.jsx(RAe,{as:i,className:fe(l.root,o),ref:n,role:i===J3?null:"rowgroup",ownerState:s,...a})})});function DAe(e){return Ne("MuiToolbar",e)}Le("MuiToolbar",["root","gutters","regular","dense"]);const NAe=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Te({root:["root",!n&&"gutters",r]},DAe,t)},LAe=oe("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(rt(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),YJ=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:a=!1,variant:s="regular",...l}=r,c={...r,component:i,disableGutters:a,variant:s},u=NAe(c);return $.jsx(LAe,{as:i,className:fe(u.root,o),ref:n,ownerState:c,...l})}),XJ=ut($.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),QJ=ut($.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),FAe=y.forwardRef(function(t,n){const{backIconButtonProps:r,count:o,disabled:i=!1,getItemAriaLabel:a,nextIconButtonProps:s,onPageChange:l,page:c,rowsPerPage:u,showFirstButton:d,showLastButton:f,slots:p={},slotProps:m={},...g}=t,v=er(),w=G=>{l(G,0)},x=G=>{l(G,c-1)},S=G=>{l(G,c+1)},P=G=>{l(G,Math.max(0,Math.ceil(o/u)-1))},T=p.firstButton??kn,E=p.lastButton??kn,O=p.nextButton??kn,k=p.previousButton??kn,A=p.firstButtonIcon??UJ,I=p.lastButtonIcon??WJ,R=p.nextButtonIcon??QJ,L=p.previousButtonIcon??XJ,F=v?E:T,z=v?O:k,_=v?k:O,D=v?T:E,H=v?m.lastButton:m.firstButton,B=v?m.nextButton:m.previousButton,V=v?m.previousButton:m.nextButton,W=v?m.firstButton:m.lastButton;return $.jsxs("div",{ref:n,...g,children:[d&&$.jsx(F,{onClick:w,disabled:i||c===0,"aria-label":a("first",c),title:a("first",c),...H,children:v?$.jsx(I,{...m.lastButtonIcon}):$.jsx(A,{...m.firstButtonIcon})}),$.jsx(z,{onClick:x,disabled:i||c===0,color:"inherit","aria-label":a("previous",c),title:a("previous",c),...B??r,children:v?$.jsx(R,{...m.nextButtonIcon}):$.jsx(L,{...m.previousButtonIcon})}),$.jsx(_,{onClick:S,disabled:i||(o!==-1?c>=Math.ceil(o/u)-1:!1),color:"inherit","aria-label":a("next",c),title:a("next",c),...V??s,children:v?$.jsx(L,{...m.previousButtonIcon}):$.jsx(R,{...m.nextButtonIcon})}),f&&$.jsx(D,{onClick:P,disabled:i||c>=Math.ceil(o/u)-1,"aria-label":a("last",c),title:a("last",c),...W,children:v?$.jsx(A,{...m.firstButtonIcon}):$.jsx(I,{...m.lastButtonIcon})})]})});function jAe(e){return Ne("MuiTablePagination",e)}const Yp=Le("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var Z3;const BAe=oe(Ie,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(rt(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),zAe=oe(YJ,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${Yp.actions}`]:t.actions,...t.toolbar})})(rt(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${Yp.actions}`]:{flexShrink:0,marginLeft:20}}))),VAe=oe("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),HAe=oe("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(rt(({theme:e})=>({...e.typography.body2,flexShrink:0}))),UAe=oe(_h,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${Yp.selectIcon}`]:t.selectIcon,[`& .${Yp.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${Yp.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),WAe=oe(tn,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),GAe=oe("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(rt(({theme:e})=>({...e.typography.body2,flexShrink:0})));function qAe({from:e,to:t,count:n}){return`${e}–${t} of ${n!==-1?n:`more than ${t}`}`}function KAe(e){return`Go to ${e} page`}const YAe=e=>{const{classes:t}=e;return Te({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},jAe,t)},_F=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiTablePagination"}),{ActionsComponent:o=FAe,backIconButtonProps:i,className:a,colSpan:s,component:l=Ie,count:c,disabled:u=!1,getItemAriaLabel:d=KAe,labelDisplayedRows:f=qAe,labelRowsPerPage:p="Rows per page:",nextIconButtonProps:m,onPageChange:g,onRowsPerPageChange:v,page:w,rowsPerPage:x,rowsPerPageOptions:S=[10,25,50,100],SelectProps:P={},showFirstButton:T=!1,showLastButton:E=!1,slotProps:O={},slots:k={},...A}=r,I=r,R=YAe(I),L=(O==null?void 0:O.select)??P,F=L.native?"option":WAe;let z;(l===Ie||l==="td")&&(z=s||1e3);const _=Ln(L.id),D=Ln(L.labelId),H=()=>c===-1?(w+1)*x:x===-1?c:Math.min(c,(w+1)*x);return $.jsx(BAe,{colSpan:z,ref:n,as:l,ownerState:I,className:fe(R.root,a),...A,children:$.jsxs(zAe,{className:R.toolbar,children:[$.jsx(VAe,{className:R.spacer}),S.length>1&&$.jsx(HAe,{className:R.selectLabel,id:D,children:p}),S.length>1&&$.jsx(UAe,{variant:"standard",...!L.variant&&{input:Z3||(Z3=$.jsx(Sv,{}))},value:x,onChange:v,id:_,labelId:D,...L,classes:{...L.classes,root:fe(R.input,R.selectRoot,(L.classes||{}).root),select:fe(R.select,(L.classes||{}).select),icon:fe(R.selectIcon,(L.classes||{}).icon)},disabled:u,children:S.map(B=>y.createElement(F,{...!Oy(F)&&{ownerState:I},className:R.menuItem,key:B.label?B.label:B,value:B.value?B.value:B},B.label?B.label:B))}),$.jsx(GAe,{className:R.displayedRows,children:f({from:c===0?0:w*x+1,to:H(),count:c===-1?-1:c,page:w})}),$.jsx(o,{className:R.actions,backIconButtonProps:i,count:c,nextIconButtonProps:m,onPageChange:g,page:w,rowsPerPage:x,showFirstButton:T,showLastButton:E,slotProps:O.actions,slots:k.actions,getItemAriaLabel:d,disabled:u})]})})});function XAe(e){return Ne("MuiTableRow",e)}const eU=Le("MuiTableRow",["root","selected","hover","head","footer"]),QAe=e=>{const{classes:t,selected:n,hover:r,head:o,footer:i}=e;return Te({root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]},XAe,t)},JAe=oe("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(rt(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${eU.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${eU.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),tU="tr",Yt=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiTableRow"}),{className:o,component:i=tU,hover:a=!1,selected:s=!1,...l}=r,c=y.useContext(SI),u={...r,component:i,hover:a,selected:s,head:c&&c.variant==="head",footer:c&&c.variant==="footer"},d=QAe(u);return $.jsx(JAe,{as:i,ref:n,className:fe(d.root,o),role:i===tU?null:"row",ownerState:u,...l})});function ZAe(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function e$e(e,t,n,r={},o=()=>{}){const{ease:i=ZAe,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=f=>{if(c){o(new Error("Animation cancelled"));return}s===null&&(s=f);const p=Math.min(1,(f-s)/a);if(t[e]=i(p)*(n-l)+l,p>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(d)};return l===n?(o(new Error("Element already at target position")),u):(requestAnimationFrame(d),u)}const t$e={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function n$e(e){const{onChange:t,...n}=e,r=y.useRef(),o=y.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return wn(()=>{const a=nS(()=>{const l=r.current;i(),l!==r.current&&t(r.current)}),s=ba(o.current);return s.addEventListener("resize",a),()=>{a.clear(),s.removeEventListener("resize",a)}},[t]),y.useEffect(()=>{i(),t(r.current)},[t]),$.jsx("div",{style:t$e,...n,ref:o})}function r$e(e){return Ne("MuiTabScrollButton",e)}const o$e=Le("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),i$e=e=>{const{classes:t,orientation:n,disabled:r}=e;return Te({root:["root",n,r&&"disabled"]},r$e,t)},a$e=oe(Hi,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${o$e.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),s$e=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiTabScrollButton"}),{className:o,slots:i={},slotProps:a={},direction:s,orientation:l,disabled:c,...u}=r,d=er(),f={isRtl:d,...r},p=i$e(f),m=i.StartScrollButtonIcon??XJ,g=i.EndScrollButtonIcon??QJ,v=on({elementType:m,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f}),w=on({elementType:g,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f});return $.jsx(a$e,{component:"div",className:fe(p.root,o),ref:n,role:null,ownerState:f,tabIndex:null,...u,style:{...u.style,...l==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${d?-90:90}deg)`}},children:s==="left"?$.jsx(m,{...v}):$.jsx(g,{...w})})});function l$e(e){return Ne("MuiTabs",e)}const EP=Le("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),nU=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,rU=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,PC=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},c$e=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return Te({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},l$e,l)},u$e=oe("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${EP.scrollButtons}`]:t.scrollButtons},{[`& .${EP.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(rt(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${EP.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),d$e=oe("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),f$e=oe("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),p$e=oe("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(rt(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),h$e=oe(n$e)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),oU={},m$e=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiTabs"}),o=ko(),i=er(),{"aria-label":a,"aria-labelledby":s,action:l,centered:c=!1,children:u,className:d,component:f="div",allowScrollButtonsMobile:p=!1,indicatorColor:m="primary",onChange:g,orientation:v="horizontal",ScrollButtonComponent:w=s$e,scrollButtons:x="auto",selectionFollowsFocus:S,slots:P={},slotProps:T={},TabIndicatorProps:E={},TabScrollButtonProps:O={},textColor:k="primary",value:A,variant:I="standard",visibleScrollbar:R=!1,...L}=r,F=I==="scrollable",z=v==="vertical",_=z?"scrollTop":"scrollLeft",D=z?"top":"left",H=z?"bottom":"right",B=z?"clientHeight":"clientWidth",V=z?"height":"width",W={...r,component:f,allowScrollButtonsMobile:p,indicatorColor:m,orientation:v,vertical:z,scrollButtons:x,textColor:k,variant:I,visibleScrollbar:R,fixed:!F,hideScrollbar:F&&!R,scrollableX:F&&!z,scrollableY:F&&z,centered:c&&!F,scrollButtonsHideMobile:!p},G=c$e(W),Q=on({elementType:P.StartScrollButtonIcon,externalSlotProps:T.startScrollButtonIcon,ownerState:W}),Y=on({elementType:P.EndScrollButtonIcon,externalSlotProps:T.endScrollButtonIcon,ownerState:W}),[ne,ie]=y.useState(!1),[re,pe]=y.useState(oU),[le,ee]=y.useState(!1),[ce,se]=y.useState(!1),[Z,ue]=y.useState(!1),[ge,we]=y.useState({overflow:"hidden",scrollbarWidth:0}),me=new Map,be=y.useRef(null),xe=y.useRef(null),Ee=()=>{const Re=be.current;let Ze;if(Re){const _t=Re.getBoundingClientRect();Ze={clientWidth:Re.clientWidth,scrollLeft:Re.scrollLeft,scrollTop:Re.scrollTop,scrollWidth:Re.scrollWidth,top:_t.top,bottom:_t.bottom,left:_t.left,right:_t.right}}let Pt;if(Re&&A!==!1){const _t=xe.current.children;if(_t.length>0){const kt=_t[me.get(A)];Pt=kt?kt.getBoundingClientRect():null}}return{tabsMeta:Ze,tabMeta:Pt}},Me=et(()=>{const{tabsMeta:Re,tabMeta:Ze}=Ee();let Pt=0,_t;z?(_t="top",Ze&&Re&&(Pt=Ze.top-Re.top+Re.scrollTop)):(_t=i?"right":"left",Ze&&Re&&(Pt=(i?-1:1)*(Ze[_t]-Re[_t]+Re.scrollLeft)));const kt={[_t]:Pt,[V]:Ze?Ze[V]:0};if(typeof re[_t]!="number"||typeof re[V]!="number")pe(kt);else{const yn=Math.abs(re[_t]-kt[_t]),Fn=Math.abs(re[V]-kt[V]);(yn>=1||Fn>=1)&&pe(kt)}}),_e=(Re,{animation:Ze=!0}={})=>{Ze?e$e(_,be.current,Re,{duration:o.transitions.duration.standard}):be.current[_]=Re},de=Re=>{let Ze=be.current[_];z?Ze+=Re:Ze+=Re*(i?-1:1),_e(Ze)},Ae=()=>{const Re=be.current[B];let Ze=0;const Pt=Array.from(xe.current.children);for(let _t=0;_tRe){_t===0&&(Ze=Re);break}Ze+=kt[B]}return Ze},Oe=()=>{de(-1*Ae())},$e=()=>{de(Ae())},Be=y.useCallback(Re=>{we({overflow:null,scrollbarWidth:Re})},[]),Je=()=>{const Re={};Re.scrollbarSizeListener=F?$.jsx(h$e,{onChange:Be,className:fe(G.scrollableX,G.hideScrollbar)}):null;const Pt=F&&(x==="auto"&&(le||ce)||x===!0);return Re.scrollButtonStart=Pt?$.jsx(w,{slots:{StartScrollButtonIcon:P.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Q},orientation:v,direction:i?"right":"left",onClick:Oe,disabled:!le,...O,className:fe(G.scrollButtons,O.className)}):null,Re.scrollButtonEnd=Pt?$.jsx(w,{slots:{EndScrollButtonIcon:P.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Y},orientation:v,direction:i?"left":"right",onClick:$e,disabled:!ce,...O,className:fe(G.scrollButtons,O.className)}):null,Re},ot=et(Re=>{const{tabsMeta:Ze,tabMeta:Pt}=Ee();if(!(!Pt||!Ze)){if(Pt[D]Ze[H]){const _t=Ze[_]+(Pt[H]-Ze[H]);_e(_t,{animation:Re})}}}),lt=et(()=>{F&&x!==!1&&ue(!Z)});y.useEffect(()=>{const Re=nS(()=>{be.current&&Me()});let Ze;const Pt=yn=>{yn.forEach(Fn=>{Fn.removedNodes.forEach(Vn=>{Ze==null||Ze.unobserve(Vn)}),Fn.addedNodes.forEach(Vn=>{Ze==null||Ze.observe(Vn)})}),Re(),lt()},_t=ba(be.current);_t.addEventListener("resize",Re);let kt;return typeof ResizeObserver<"u"&&(Ze=new ResizeObserver(Re),Array.from(xe.current.children).forEach(yn=>{Ze.observe(yn)})),typeof MutationObserver<"u"&&(kt=new MutationObserver(Pt),kt.observe(xe.current,{childList:!0})),()=>{Re.clear(),_t.removeEventListener("resize",Re),kt==null||kt.disconnect(),Ze==null||Ze.disconnect()}},[Me,lt]),y.useEffect(()=>{const Re=Array.from(xe.current.children),Ze=Re.length;if(typeof IntersectionObserver<"u"&&Ze>0&&F&&x!==!1){const Pt=Re[0],_t=Re[Ze-1],kt={root:be.current,threshold:.99},yn=xo=>{ee(!xo[0].isIntersecting)},Fn=new IntersectionObserver(yn,kt);Fn.observe(Pt);const Vn=xo=>{se(!xo[0].isIntersecting)},wo=new IntersectionObserver(Vn,kt);return wo.observe(_t),()=>{Fn.disconnect(),wo.disconnect()}}},[F,x,Z,u==null?void 0:u.length]),y.useEffect(()=>{ie(!0)},[]),y.useEffect(()=>{Me()}),y.useEffect(()=>{ot(oU!==re)},[ot,re]),y.useImperativeHandle(l,()=>({updateIndicator:Me,updateScrollButtons:lt}),[Me,lt]);const it=$.jsx(p$e,{...E,className:fe(G.indicator,E.className),ownerState:W,style:{...re,...E.style}});let tt=0;const pt=y.Children.map(u,Re=>{if(!y.isValidElement(Re))return null;const Ze=Re.props.value===void 0?tt:Re.props.value;me.set(Ze,tt);const Pt=Ze===A;return tt+=1,y.cloneElement(Re,{fullWidth:I==="fullWidth",indicator:Pt&&!ne&&it,selected:Pt,selectionFollowsFocus:S,onChange:g,textColor:k,value:Ze,...tt===1&&A===!1&&!Re.props.tabIndex?{tabIndex:0}:{}})}),qt=Re=>{const Ze=xe.current,Pt=pr(Ze).activeElement;if(Pt.getAttribute("role")!=="tab")return;let kt=v==="horizontal"?"ArrowLeft":"ArrowUp",yn=v==="horizontal"?"ArrowRight":"ArrowDown";switch(v==="horizontal"&&i&&(kt="ArrowRight",yn="ArrowLeft"),Re.key){case kt:Re.preventDefault(),PC(Ze,Pt,rU);break;case yn:Re.preventDefault(),PC(Ze,Pt,nU);break;case"Home":Re.preventDefault(),PC(Ze,null,nU);break;case"End":Re.preventDefault(),PC(Ze,null,rU);break}},qe=Je();return $.jsxs(u$e,{className:fe(G.root,d),ownerState:W,ref:n,as:f,...L,children:[qe.scrollButtonStart,qe.scrollbarSizeListener,$.jsxs(d$e,{className:G.scroller,ownerState:W,style:{overflow:ge.overflow,[z?`margin${i?"Left":"Right"}`:"marginBottom"]:R?void 0:-ge.scrollbarWidth},ref:be,children:[$.jsx(f$e,{"aria-label":a,"aria-labelledby":s,"aria-orientation":v==="vertical"?"vertical":null,className:G.flexContainer,ownerState:W,onKeyDown:qt,ref:xe,role:"tablist",children:pt}),ne&&it]}),qe.scrollButtonEnd]})});function g$e(e){return Ne("MuiTextField",e)}Le("MuiTextField",["root"]);const y$e={standard:kT,filled:IT,outlined:MT},v$e=e=>{const{classes:t}=e;return Te({root:["root"]},g$e,t)},b$e=oe(Tv,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),hn=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:s,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:f,fullWidth:p=!1,helperText:m,id:g,InputLabelProps:v,inputProps:w,InputProps:x,inputRef:S,label:P,maxRows:T,minRows:E,multiline:O=!1,name:k,onBlur:A,onChange:I,onFocus:R,placeholder:L,required:F=!1,rows:z,select:_=!1,SelectProps:D,slots:H={},slotProps:B={},type:V,value:W,variant:G="outlined",...Q}=r,Y={...r,autoFocus:i,color:l,disabled:u,error:d,fullWidth:p,multiline:O,required:F,select:_,variant:G},ne=v$e(Y),ie=Ln(g),re=m&&ie?`${ie}-helper-text`:void 0,pe=P&&ie?`${ie}-label`:void 0,le=y$e[G],ee={slots:H,slotProps:{input:x,inputLabel:v,htmlInput:w,formHelperText:f,select:D,...B}},ce={},se=ee.slotProps.inputLabel;G==="outlined"&&(se&&typeof se.shrink<"u"&&(ce.notched=se.shrink),ce.label=P),_&&((!D||!D.native)&&(ce.id=void 0),ce["aria-describedby"]=void 0);const[Z,ue]=Kn("input",{elementType:le,externalForwardedProps:ee,additionalProps:ce,ownerState:Y}),[ge,we]=Kn("inputLabel",{elementType:Ev,externalForwardedProps:ee,ownerState:Y}),[me,be]=Kn("htmlInput",{elementType:"input",externalForwardedProps:ee,ownerState:Y}),[xe,Ee]=Kn("formHelperText",{elementType:fS,externalForwardedProps:ee,ownerState:Y}),[Me,_e]=Kn("select",{elementType:_h,externalForwardedProps:ee,ownerState:Y}),de=$.jsx(Z,{"aria-describedby":re,autoComplete:o,autoFocus:i,defaultValue:c,fullWidth:p,multiline:O,name:k,rows:z,maxRows:T,minRows:E,type:V,value:W,id:ie,inputRef:S,onBlur:A,onChange:I,onFocus:R,placeholder:L,inputProps:be,slots:{input:H.htmlInput?me:void 0},...ue});return $.jsxs(b$e,{className:fe(ne.root,s),disabled:u,error:d,fullWidth:p,ref:n,required:F,color:l,variant:G,ownerState:Y,...Q,children:[P!=null&&P!==""&&$.jsx(ge,{htmlFor:ie,id:pe,...we,children:P}),_?$.jsx(Me,{"aria-describedby":re,id:ie,labelId:pe,value:W,input:de,..._e,children:a}):de,m&&$.jsx(xe,{id:re,...Ee,children:m})]})});function w$e(e){return Ne("MuiToggleButton",e)}const Ap=Le("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),JJ=y.createContext({}),ZJ=y.createContext(void 0);function x$e(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}const S$e=e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:a}=e,s={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${Se(i)}`,a]};return Te(s,w$e,t)},C$e=oe(Hi,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${Se(n.size)}`]]}})(rt(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${Ap.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${Ap.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.text.primary,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette.text.primary,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.text.primary,e.palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{[`&.${Ap.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette[t].main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette[t].main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette[t].main,e.palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),Gb=y.forwardRef(function(t,n){const{value:r,...o}=y.useContext(JJ),i=y.useContext(ZJ),a=ih({...o,selected:x$e(t.value,r)},t),s=at({props:a,name:"MuiToggleButton"}),{children:l,className:c,color:u="standard",disabled:d=!1,disableFocusRipple:f=!1,fullWidth:p=!1,onChange:m,onClick:g,selected:v,size:w="medium",value:x,...S}=s,P={...s,color:u,disabled:d,disableFocusRipple:f,fullWidth:p,size:w},T=S$e(P),E=k=>{g&&(g(k,x),k.defaultPrevented)||m&&m(k,x)},O=i||"";return $.jsx(C$e,{className:fe(o.className,T.root,c,O),disabled:d,focusRipple:!f,ref:n,onClick:E,onChange:m,value:x,ownerState:P,"aria-pressed":v,...S,children:l})});function P$e(e){return Ne("MuiToggleButtonGroup",e)}const xr=Le("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),T$e=e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,i={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${Se(n)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Te(i,P$e,t)},E$e=oe("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${xr.grouped}`]:t.grouped},{[`& .${xr.grouped}`]:t[`grouped${Se(n.orientation)}`]},{[`& .${xr.firstButton}`]:t.firstButton},{[`& .${xr.lastButton}`]:t.lastButton},{[`& .${xr.middleButton}`]:t.middleButton},t.root,n.orientation==="vertical"&&t.vertical,n.fullWidth&&t.fullWidth]}})(rt(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${xr.grouped}`]:{[`&.${xr.selected} + .${xr.grouped}.${xr.selected}`]:{borderTop:0,marginTop:0}},[`& .${xr.firstButton},& .${xr.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${xr.lastButton},& .${xr.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${xr.lastButton}.${Ap.disabled},& .${xr.middleButton}.${Ap.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${xr.grouped}`]:{[`&.${xr.selected} + .${xr.grouped}.${xr.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${xr.firstButton},& .${xr.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${xr.lastButton},& .${xr.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${xr.lastButton}.${Ap.disabled},& .${xr.middleButton}.${Ap.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),O$e=y.forwardRef(function(t,n){const r=at({props:t,name:"MuiToggleButtonGroup"}),{children:o,className:i,color:a="standard",disabled:s=!1,exclusive:l=!1,fullWidth:c=!1,onChange:u,orientation:d="horizontal",size:f="medium",value:p,...m}=r,g={...r,disabled:s,fullWidth:c,orientation:d,size:f},v=T$e(g),w=y.useCallback((O,k)=>{if(!u)return;const A=p&&p.indexOf(k);let I;p&&A>=0?(I=p.slice(),I.splice(A,1)):I=p?p.concat(k):[k],u(O,I)},[u,p]),x=y.useCallback((O,k)=>{u&&u(O,p===k?null:k)},[u,p]),S=y.useMemo(()=>({className:v.grouped,onChange:l?x:w,value:p,size:f,fullWidth:c,color:a,disabled:s}),[v.grouped,l,x,w,p,f,c,a,s]),P=MY(o),T=P.length,E=O=>{const k=O===0,A=O===T-1;return k&&A?"":k?v.firstButton:A?v.lastButton:v.middleButton};return $.jsx(E$e,{role:"group",className:fe(v.root,i),ref:n,ownerState:g,...m,children:$.jsx(JJ.Provider,{value:S,children:P.map((O,k)=>$.jsx(ZJ.Provider,{value:E(k),children:O},k))})})}),I$e=(...e)=>{console!=null&&console.warn&&(Xp(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},iU={},o_=(...e)=>{Xp(e[0])&&iU[e[0]]||(Xp(e[0])&&(iU[e[0]]=new Date),I$e(...e))},eZ=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},i_=(e,t,n)=>{e.loadNamespaces(t,eZ(e,n))},aU=(e,t,n,r)=>{if(Xp(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return i_(e,n,r);n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,eZ(e,r))},k$e=(e,t,n={})=>!t.languages||!t.languages.length?(o_("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,o)=>{var i;if(((i=n.bindI18n)==null?void 0:i.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!o(r.isLanguageChangingTo,e))return!1}}),Xp=e=>typeof e=="string",M$e=e=>typeof e=="object"&&e!==null,A$e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,$$e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},R$e=e=>$$e[e],_$e=e=>e.replace(A$e,R$e);let a_={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:_$e};const D$e=(e={})=>{a_={...a_,...e}},N$e=()=>a_;let tZ;const L$e=e=>{tZ=e},F$e=()=>tZ,j$e={type:"3rdParty",init(e){D$e(e.options.react),L$e(e)}},B$e=y.createContext();class z$e{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const V$e=(e,t)=>{const n=y.useRef();return y.useEffect(()=>{n.current=e},[e,t]),n.current},nZ=(e,t,n,r)=>e.getFixedT(t,n,r),H$e=(e,t,n,r)=>y.useCallback(nZ(e,t,n,r),[e,t,n,r]),Ge=(e,t={})=>{var P,T,E,O;const{i18n:n}=t,{i18n:r,defaultNS:o}=y.useContext(B$e)||{},i=n||r||F$e();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new z$e),!i){o_("You will need to pass in an i18next instance by using initReactI18next");const k=(I,R)=>Xp(R)?R:M$e(R)&&Xp(R.defaultValue)?R.defaultValue:Array.isArray(I)?I[I.length-1]:I,A=[k,{},!1];return A.t=k,A.i18n={},A.ready=!1,A}(P=i.options.react)!=null&&P.wait&&o_("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...N$e(),...i.options.react,...t},{useSuspense:s,keyPrefix:l}=a;let c=o||((T=i.options)==null?void 0:T.defaultNS);c=Xp(c)?[c]:c||["translation"],(O=(E=i.reportNamespaces).addUsedNamespaces)==null||O.call(E,c);const u=(i.isInitialized||i.initializedStoreOnce)&&c.every(k=>k$e(k,i,a)),d=H$e(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),f=()=>d,p=()=>nZ(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),[m,g]=y.useState(f);let v=c.join();t.lng&&(v=`${t.lng}${v}`);const w=V$e(v),x=y.useRef(!0);y.useEffect(()=>{const{bindI18n:k,bindI18nStore:A}=a;x.current=!0,!u&&!s&&(t.lng?aU(i,t.lng,c,()=>{x.current&&g(p)}):i_(i,c,()=>{x.current&&g(p)})),u&&w&&w!==v&&x.current&&g(p);const I=()=>{x.current&&g(p)};return k&&(i==null||i.on(k,I)),A&&(i==null||i.store.on(A,I)),()=>{x.current=!1,i&&(k==null||k.split(" ").forEach(R=>i.off(R,I))),A&&i&&A.split(" ").forEach(R=>i.store.off(R,I))}},[i,v]),y.useEffect(()=>{x.current&&u&&g(f)},[i,l,u]);const S=[m,i,u];if(S.t=m,S.i18n=i,S.ready=u,u||!u&&!s)return S;throw new Promise(k=>{t.lng?aU(i,t.lng,c,()=>k()):i_(i,c,()=>k())})},qa=()=>{const[e]=Ge();return C($n,{sx:{textAlign:"center"},children:e("loading")})},vo=()=>C($n,{sx:{height:200,alignItems:"center",mt:2},component:Ut,direction:"column",justifyContent:"center",children:C(IJ,{})}),rZ=ut($.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),Ov=ut($.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),mS=ut($.jsx("path",{d:"M9 4v1.38c-.83-.33-1.72-.5-2.61-.5-1.79 0-3.58.68-4.95 2.05l3.33 3.33h1.11v1.11c.86.86 1.98 1.31 3.11 1.36V15H6v3c0 1.1.9 2 2 2h10c1.66 0 3-1.34 3-3V4zm-1.11 6.41V8.26H5.61L4.57 7.22a5.07 5.07 0 0 1 1.82-.34c1.34 0 2.59.52 3.54 1.46l1.41 1.41-.2.2c-.51.51-1.19.8-1.92.8-.47 0-.93-.12-1.33-.34M19 17c0 .55-.45 1-1 1s-1-.45-1-1v-2h-6v-2.59c.57-.23 1.1-.57 1.56-1.03l.2-.2L15.59 14H17v-1.41l-6-5.97V6h8z"}),"HistoryEdu"),Ju=ut($.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Photo"),gS=ut($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Yi=({title:e,subtitle:t,isOpen:n,closeFn:r,children:o})=>C(Pv,{open:n,onClose:r,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:X(no,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:2,minWidth:"400px"},children:[C(ec,{title:e,subheader:t,action:C(gS,{onClick:r})}),C(bi,{children:o}),C(as,{})]})}),CI=e=>{const[t]=Ge(),n=e.height?e.height:"50vh";return C(Mt,{children:X($n,{sx:{height:n,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"},children:[C(dt,{variant:"h6",mr:3,children:t("nothingHereYet")}),C(dt,{mr:3,children:t("nothingHereYetAction")})]})})},DF=e=>{const[t]=Ge(),[n,r]=K.useState(!1),o=()=>r(!0),i=()=>r(!1),a=e.link!==void 0?C(yt,{size:"small",variant:"contained",href:e.link,children:t("add")}):C(yt,{size:"small",variant:"contained",onClick:o,children:t("add")});return X(Mt,{children:[X(no,{children:[C(ec,{title:e.title,subheader:".",sx:{paddingBottom:0}}),C(bi,{sx:{paddingTop:0,height:"500px"},children:C(CI,{})}),C(as,{children:a})]}),C(Yi,{title:t("add"),isOpen:n,closeFn:i,children:e.modalContent})]})};function oZ(e,t){return function(){return e.apply(t,arguments)}}const{toString:U$e}=Object.prototype,{getPrototypeOf:NF}=Object,PI=(e=>t=>{const n=U$e.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),tc=e=>(e=e.toLowerCase(),t=>PI(t)===e),TI=e=>t=>typeof t===e,{isArray:Iv}=Array,Uw=TI("undefined");function W$e(e){return e!==null&&!Uw(e)&&e.constructor!==null&&!Uw(e.constructor)&&Ka(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const iZ=tc("ArrayBuffer");function G$e(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&iZ(e.buffer),t}const q$e=TI("string"),Ka=TI("function"),aZ=TI("number"),EI=e=>e!==null&&typeof e=="object",K$e=e=>e===!0||e===!1,OP=e=>{if(PI(e)!=="object")return!1;const t=NF(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Y$e=tc("Date"),X$e=tc("File"),Q$e=tc("Blob"),J$e=tc("FileList"),Z$e=e=>EI(e)&&Ka(e.pipe),eRe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ka(e.append)&&((t=PI(e))==="formdata"||t==="object"&&Ka(e.toString)&&e.toString()==="[object FormData]"))},tRe=tc("URLSearchParams"),[nRe,rRe,oRe,iRe]=["ReadableStream","Request","Response","Headers"].map(tc),aRe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function yS(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Iv(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const $p=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lZ=e=>!Uw(e)&&e!==$p;function s_(){const{caseless:e}=lZ(this)&&this||{},t={},n=(r,o)=>{const i=e&&sZ(t,o)||o;OP(t[i])&&OP(r)?t[i]=s_(t[i],r):OP(r)?t[i]=s_({},r):Iv(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(yS(t,(o,i)=>{n&&Ka(o)?e[i]=oZ(o,n):e[i]=o},{allOwnKeys:r}),e),lRe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),cRe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},uRe=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&NF(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},dRe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},fRe=e=>{if(!e)return null;if(Iv(e))return e;let t=e.length;if(!aZ(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},pRe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&NF(Uint8Array)),hRe=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},mRe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},gRe=tc("HTMLFormElement"),yRe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),sU=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),vRe=tc("RegExp"),cZ=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};yS(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},bRe=e=>{cZ(e,(t,n)=>{if(Ka(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ka(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},wRe=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Iv(e)?r(e):r(String(e).split(t)),n},xRe=()=>{},SRe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,c$="abcdefghijklmnopqrstuvwxyz",lU="0123456789",uZ={DIGIT:lU,ALPHA:c$,ALPHA_DIGIT:c$+c$.toUpperCase()+lU},CRe=(e=16,t=uZ.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function PRe(e){return!!(e&&Ka(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const TRe=e=>{const t=new Array(10),n=(r,o)=>{if(EI(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Iv(r)?[]:{};return yS(r,(a,s)=>{const l=n(a,o+1);!Uw(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)},ERe=tc("AsyncFunction"),ORe=e=>e&&(EI(e)||Ka(e))&&Ka(e.then)&&Ka(e.catch),dZ=((e,t)=>e?setImmediate:t?((n,r)=>($p.addEventListener("message",({source:o,data:i})=>{o===$p&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),$p.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ka($p.postMessage)),IRe=typeof queueMicrotask<"u"?queueMicrotask.bind($p):typeof process<"u"&&process.nextTick||dZ,De={isArray:Iv,isArrayBuffer:iZ,isBuffer:W$e,isFormData:eRe,isArrayBufferView:G$e,isString:q$e,isNumber:aZ,isBoolean:K$e,isObject:EI,isPlainObject:OP,isReadableStream:nRe,isRequest:rRe,isResponse:oRe,isHeaders:iRe,isUndefined:Uw,isDate:Y$e,isFile:X$e,isBlob:Q$e,isRegExp:vRe,isFunction:Ka,isStream:Z$e,isURLSearchParams:tRe,isTypedArray:pRe,isFileList:J$e,forEach:yS,merge:s_,extend:sRe,trim:aRe,stripBOM:lRe,inherits:cRe,toFlatObject:uRe,kindOf:PI,kindOfTest:tc,endsWith:dRe,toArray:fRe,forEachEntry:hRe,matchAll:mRe,isHTMLForm:gRe,hasOwnProperty:sU,hasOwnProp:sU,reduceDescriptors:cZ,freezeMethods:bRe,toObjectSet:wRe,toCamelCase:yRe,noop:xRe,toFiniteNumber:SRe,findKey:sZ,global:$p,isContextDefined:lZ,ALPHABET:uZ,generateString:CRe,isSpecCompliantForm:PRe,toJSONObject:TRe,isAsyncFn:ERe,isThenable:ORe,setImmediate:dZ,asap:IRe};function nn(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}De.inherits(nn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:De.toJSONObject(this.config),code:this.code,status:this.status}}});const fZ=nn.prototype,pZ={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{pZ[e]={value:e}});Object.defineProperties(nn,pZ);Object.defineProperty(fZ,"isAxiosError",{value:!0});nn.from=(e,t,n,r,o,i)=>{const a=Object.create(fZ);return De.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),nn.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const kRe=null;function l_(e){return De.isPlainObject(e)||De.isArray(e)}function hZ(e){return De.endsWith(e,"[]")?e.slice(0,-2):e}function cU(e,t,n){return e?e.concat(t).map(function(o,i){return o=hZ(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function MRe(e){return De.isArray(e)&&!e.some(l_)}const ARe=De.toFlatObject(De,{},null,function(t){return/^is[A-Z]/.test(t)});function OI(e,t,n){if(!De.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=De.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,v){return!De.isUndefined(v[g])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&De.isSpecCompliantForm(t);if(!De.isFunction(o))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(De.isDate(m))return m.toISOString();if(!l&&De.isBlob(m))throw new nn("Blob is not supported. Use a Buffer instead.");return De.isArrayBuffer(m)||De.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,g,v){let w=m;if(m&&!v&&typeof m=="object"){if(De.endsWith(g,"{}"))g=r?g:g.slice(0,-2),m=JSON.stringify(m);else if(De.isArray(m)&&MRe(m)||(De.isFileList(m)||De.endsWith(g,"[]"))&&(w=De.toArray(m)))return g=hZ(g),w.forEach(function(S,P){!(De.isUndefined(S)||S===null)&&t.append(a===!0?cU([g],P,i):a===null?g:g+"[]",c(S))}),!1}return l_(m)?!0:(t.append(cU(v,g,i),c(m)),!1)}const d=[],f=Object.assign(ARe,{defaultVisitor:u,convertValue:c,isVisitable:l_});function p(m,g){if(!De.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(m),De.forEach(m,function(w,x){(!(De.isUndefined(w)||w===null)&&o.call(t,w,De.isString(x)?x.trim():x,g,f))===!0&&p(w,g?g.concat(x):[x])}),d.pop()}}if(!De.isObject(e))throw new TypeError("data must be an object");return p(e),t}function uU(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function LF(e,t){this._pairs=[],e&&OI(e,this,t)}const mZ=LF.prototype;mZ.append=function(t,n){this._pairs.push([t,n])};mZ.toString=function(t){const n=t?function(r){return t.call(this,r,uU)}:uU;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function $Re(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gZ(e,t,n){if(!t)return e;const r=n&&n.encode||$Re;De.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=De.isURLSearchParams(t)?t.toString():new LF(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class dU{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){De.forEach(this.handlers,function(r){r!==null&&t(r)})}}const yZ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},RRe=typeof URLSearchParams<"u"?URLSearchParams:LF,_Re=typeof FormData<"u"?FormData:null,DRe=typeof Blob<"u"?Blob:null,NRe={isBrowser:!0,classes:{URLSearchParams:RRe,FormData:_Re,Blob:DRe},protocols:["http","https","file","blob","url","data"]},FF=typeof window<"u"&&typeof document<"u",c_=typeof navigator=="object"&&navigator||void 0,LRe=FF&&(!c_||["ReactNative","NativeScript","NS"].indexOf(c_.product)<0),FRe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jRe=FF&&window.location.href||"http://localhost",BRe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:FF,hasStandardBrowserEnv:LRe,hasStandardBrowserWebWorkerEnv:FRe,navigator:c_,origin:jRe},Symbol.toStringTag,{value:"Module"})),yi={...BRe,...NRe};function zRe(e,t){return OI(e,new yi.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return yi.isNode&&De.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function VRe(e){return De.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function HRe(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return a=!a&&De.isArray(o)?o.length:a,l?(De.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!De.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&De.isArray(o[a])&&(o[a]=HRe(o[a])),!s)}if(De.isFormData(e)&&De.isFunction(e.entries)){const n={};return De.forEachEntry(e,(r,o)=>{t(VRe(r),o,n,0)}),n}return null}function URe(e,t,n){if(De.isString(e))try{return(t||JSON.parse)(e),De.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const vS={transitional:yZ,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=De.isObject(t);if(i&&De.isHTMLForm(t)&&(t=new FormData(t)),De.isFormData(t))return o?JSON.stringify(vZ(t)):t;if(De.isArrayBuffer(t)||De.isBuffer(t)||De.isStream(t)||De.isFile(t)||De.isBlob(t)||De.isReadableStream(t))return t;if(De.isArrayBufferView(t))return t.buffer;if(De.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return zRe(t,this.formSerializer).toString();if((s=De.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return OI(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),URe(t)):t}],transformResponse:[function(t){const n=this.transitional||vS.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(De.isResponse(t)||De.isReadableStream(t))return t;if(t&&De.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?nn.from(s,nn.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yi.classes.FormData,Blob:yi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};De.forEach(["delete","get","head","post","put","patch"],e=>{vS.headers[e]={}});const WRe=De.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),GRe=e=>{const t={};let n,r,o;return e&&e.split(` -`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&WRe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},fU=Symbol("internals");function qb(e){return e&&String(e).trim().toLowerCase()}function IP(e){return e===!1||e==null?e:De.isArray(e)?e.map(IP):String(e)}function qRe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const KRe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function u$(e,t,n,r,o){if(De.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!De.isString(t)){if(De.isString(r))return t.indexOf(r)!==-1;if(De.isRegExp(r))return r.test(t)}}function YRe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function XRe(e,t){const n=De.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class ya{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,l,c){const u=qb(l);if(!u)throw new Error("header name must be a non-empty string");const d=De.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=IP(s))}const a=(s,l)=>De.forEach(s,(c,u)=>i(c,u,l));if(De.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(De.isString(t)&&(t=t.trim())&&!KRe(t))a(GRe(t),n);else if(De.isHeaders(t))for(const[s,l]of t.entries())i(l,s,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=qb(t),t){const r=De.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return qRe(o);if(De.isFunction(n))return n.call(this,o,r);if(De.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=qb(t),t){const r=De.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||u$(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=qb(a),a){const s=De.findKey(r,a);s&&(!n||u$(r,r[s],s,n))&&(delete r[s],o=!0)}}return De.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||u$(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return De.forEach(this,(o,i)=>{const a=De.findKey(r,i);if(a){n[a]=IP(o),delete n[i];return}const s=t?YRe(i):String(i).trim();s!==i&&delete n[i],n[s]=IP(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return De.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&De.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[fU]=this[fU]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=qb(a);r[s]||(XRe(o,a),r[s]=!0)}return De.isArray(t)?t.forEach(i):i(t),this}}ya.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);De.reduceDescriptors(ya.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});De.freezeMethods(ya);function d$(e,t){const n=this||vS,r=t||n,o=ya.from(r.headers);let i=r.data;return De.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function bZ(e){return!!(e&&e.__CANCEL__)}function kv(e,t,n){nn.call(this,e??"canceled",nn.ERR_CANCELED,t,n),this.name="CanceledError"}De.inherits(kv,nn,{__CANCEL__:!0});function wZ(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new nn("Request failed with status code "+n.status,[nn.ERR_BAD_REQUEST,nn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function QRe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function JRe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[i];a||(a=c),n[o]=l,r[o]=c;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a{n=u,o=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?a(c,u):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},r-d)))},()=>o&&a(o)]}const AT=(e,t,n=3)=>{let r=0;const o=JRe(50,250);return ZRe(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=a-r,c=o(l),u=a<=s;r=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},pU=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},hU=e=>(...t)=>De.asap(()=>e(...t)),e2e=yi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,yi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(yi.origin),yi.navigator&&/(msie|trident)/i.test(yi.navigator.userAgent)):()=>!0,t2e=yi.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];De.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),De.isString(r)&&a.push("path="+r),De.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function n2e(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function r2e(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function xZ(e,t){return e&&!n2e(t)?r2e(e,t):t}const mU=e=>e instanceof ya?{...e}:e;function yh(e,t){t=t||{};const n={};function r(c,u,d,f){return De.isPlainObject(c)&&De.isPlainObject(u)?De.merge.call({caseless:f},c,u):De.isPlainObject(u)?De.merge({},u):De.isArray(u)?u.slice():u}function o(c,u,d,f){if(De.isUndefined(u)){if(!De.isUndefined(c))return r(void 0,c,d,f)}else return r(c,u,d,f)}function i(c,u){if(!De.isUndefined(u))return r(void 0,u)}function a(c,u){if(De.isUndefined(u)){if(!De.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,u,d)=>o(mU(c),mU(u),d,!0)};return De.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||o,f=d(e[u],t[u],u);De.isUndefined(f)&&d!==s||(n[u]=f)}),n}const SZ=e=>{const t=yh({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=ya.from(a),t.url=gZ(xZ(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(De.isFormData(n)){if(yi.hasStandardBrowserEnv||yi.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(yi.hasStandardBrowserEnv&&(r&&De.isFunction(r)&&(r=r(t)),r||r!==!1&&e2e(t.url))){const c=o&&i&&t2e.read(i);c&&a.set(o,c)}return t},o2e=typeof XMLHttpRequest<"u",i2e=o2e&&function(e){return new Promise(function(n,r){const o=SZ(e);let i=o.data;const a=ya.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=o,u,d,f,p,m;function g(){p&&p(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function w(){if(!v)return;const S=ya.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:S,config:e,request:v};wZ(function(O){n(O),g()},function(O){r(O),g()},T),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(w)},v.onabort=function(){v&&(r(new nn("Request aborted",nn.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new nn("Network Error",nn.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let P=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||yZ;o.timeoutErrorMessage&&(P=o.timeoutErrorMessage),r(new nn(P,T.clarifyTimeoutError?nn.ETIMEDOUT:nn.ECONNABORTED,e,v)),v=null},i===void 0&&a.setContentType(null),"setRequestHeader"in v&&De.forEach(a.toJSON(),function(P,T){v.setRequestHeader(T,P)}),De.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),s&&s!=="json"&&(v.responseType=o.responseType),c&&([f,m]=AT(c,!0),v.addEventListener("progress",f)),l&&v.upload&&([d,p]=AT(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(u=S=>{v&&(r(!S||S.type?new kv(null,e,v):S),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const x=QRe(o.url);if(x&&yi.protocols.indexOf(x)===-1){r(new nn("Unsupported protocol "+x+":",nn.ERR_BAD_REQUEST,e));return}v.send(i||null)})},a2e=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(c){if(!o){o=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof nn?u:new kv(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,i(new nn(`timeout ${t} of ms exceeded`,nn.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>De.asap(s),l}},s2e=function*(e,t){let n=e.byteLength;if(n{const o=l2e(e,t);let i=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){s(),l.close();return}let d=u.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),o.return()}},{highWaterMark:2})},II=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",CZ=II&&typeof ReadableStream=="function",u2e=II&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),PZ=(e,...t)=>{try{return!!e(...t)}catch{return!1}},d2e=CZ&&PZ(()=>{let e=!1;const t=new Request(yi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),yU=64*1024,u_=CZ&&PZ(()=>De.isReadableStream(new Response("").body)),$T={stream:u_&&(e=>e.body)};II&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!$T[t]&&($T[t]=De.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new nn(`Response type '${t}' is not supported`,nn.ERR_NOT_SUPPORT,r)})})})(new Response);const f2e=async e=>{if(e==null)return 0;if(De.isBlob(e))return e.size;if(De.isSpecCompliantForm(e))return(await new Request(yi.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(De.isArrayBufferView(e)||De.isArrayBuffer(e))return e.byteLength;if(De.isURLSearchParams(e)&&(e=e+""),De.isString(e))return(await u2e(e)).byteLength},p2e=async(e,t)=>{const n=De.toFiniteNumber(e.getContentLength());return n??f2e(t)},h2e=II&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=SZ(e);c=c?(c+"").toLowerCase():"text";let p=a2e([o,i&&i.toAbortSignal()],a),m;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let v;try{if(l&&d2e&&n!=="get"&&n!=="head"&&(v=await p2e(u,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),E;if(De.isFormData(r)&&(E=T.headers.get("content-type"))&&u.setContentType(E),T.body){const[O,k]=pU(v,AT(hU(l)));r=gU(T.body,yU,O,k)}}De.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;m=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let x=await fetch(m);const S=u_&&(c==="stream"||c==="response");if(u_&&(s||S&&g)){const T={};["status","statusText","headers"].forEach(A=>{T[A]=x[A]});const E=De.toFiniteNumber(x.headers.get("content-length")),[O,k]=s&&pU(E,AT(hU(s),!0))||[];x=new Response(gU(x.body,yU,O,()=>{k&&k(),g&&g()}),T)}c=c||"text";let P=await $T[De.findKey($T,c)||"text"](x,e);return!S&&g&&g(),await new Promise((T,E)=>{wZ(T,E,{data:P,headers:ya.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(w){throw g&&g(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new nn("Network Error",nn.ERR_NETWORK,e,m),{cause:w.cause||w}):nn.from(w,w&&w.code,e,m)}}),d_={http:kRe,xhr:i2e,fetch:h2e};De.forEach(d_,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const vU=e=>`- ${e}`,m2e=e=>De.isFunction(e)||e===null||e===!1,TZ={getAdapter:e=>{e=De.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since : -`+i.map(vU).join(` -`):" "+vU(i[0]):"as no adapter specified";throw new nn("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:d_};function f$(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new kv(null,e)}function bU(e){return f$(e),e.headers=ya.from(e.headers),e.data=d$.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),TZ.getAdapter(e.adapter||vS.adapter)(e).then(function(r){return f$(e),r.data=d$.call(e,e.transformResponse,r),r.headers=ya.from(r.headers),r},function(r){return bZ(r)||(f$(e),r&&r.response&&(r.response.data=d$.call(e,e.transformResponse,r.response),r.response.headers=ya.from(r.response.headers))),Promise.reject(r)})}const EZ="1.7.9",kI={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{kI[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const wU={};kI.transitional=function(t,n,r){function o(i,a){return"[Axios v"+EZ+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new nn(o(a," has been removed"+(n?" in "+n:"")),nn.ERR_DEPRECATED);return n&&!wU[a]&&(wU[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};kI.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function g2e(e,t,n){if(typeof e!="object")throw new nn("options must be an object",nn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new nn("option "+i+" must be "+l,nn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new nn("Unknown option "+i,nn.ERR_BAD_OPTION)}}const kP={assertOptions:g2e,validators:kI},cc=kP.validators;class Qp{constructor(t){this.defaults=t,this.interceptors={request:new dU,response:new dU}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=yh(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&kP.assertOptions(r,{silentJSONParsing:cc.transitional(cc.boolean),forcedJSONParsing:cc.transitional(cc.boolean),clarifyTimeoutError:cc.transitional(cc.boolean)},!1),o!=null&&(De.isFunction(o)?n.paramsSerializer={serialize:o}:kP.assertOptions(o,{encode:cc.function,serialize:cc.function},!0)),kP.assertOptions(n,{baseUrl:cc.spelling("baseURL"),withXsrfToken:cc.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&De.merge(i.common,i[n.method]);i&&De.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=ya.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,d=0,f;if(!l){const m=[bU.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),f=m.length,u=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new kv(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new jF(function(o){t=o}),cancel:t}}}function y2e(e){return function(n){return e.apply(null,n)}}function v2e(e){return De.isObject(e)&&e.isAxiosError===!0}const f_={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(f_).forEach(([e,t])=>{f_[t]=e});function OZ(e){const t=new Qp(e),n=oZ(Qp.prototype.request,t);return De.extend(n,Qp.prototype,t,{allOwnKeys:!0}),De.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return OZ(yh(e,o))},n}const ft=OZ(vS);ft.Axios=Qp;ft.CanceledError=kv;ft.CancelToken=jF;ft.isCancel=bZ;ft.VERSION=EZ;ft.toFormData=OI;ft.AxiosError=nn;ft.Cancel=ft.CanceledError;ft.all=function(t){return Promise.all(t)};ft.spread=y2e;ft.isAxiosError=v2e;ft.mergeConfig=yh;ft.AxiosHeaders=ya;ft.formToJSON=e=>vZ(De.isHTMLForm(e)?new FormData(e):e);ft.getAdapter=TZ.getAdapter;ft.HttpStatusCode=f_;ft.default=ft;const zg={protein:4,carbohydrates:4,fat:9};class Ba{constructor(t){dn(this,"bodyWeight",0);dn(this,"energy",0);dn(this,"protein",0);dn(this,"carbohydrates",0);dn(this,"carbohydratesSugar",0);dn(this,"fat",0);dn(this,"fatSaturated",0);dn(this,"fiber",0);dn(this,"sodium",0);this.energy=(t==null?void 0:t.energy)??0,this.protein=(t==null?void 0:t.protein)??0,this.carbohydrates=(t==null?void 0:t.carbohydrates)??0,this.carbohydratesSugar=(t==null?void 0:t.carbohydratesSugar)??0,this.fat=(t==null?void 0:t.fat)??0,this.fatSaturated=(t==null?void 0:t.fatSaturated)??0,this.fiber=(t==null?void 0:t.fiber)??0,this.sodium=(t==null?void 0:t.sodium)??0,this.bodyWeight=(t==null?void 0:t.bodyWeight)??0}get energyKj(){return this.energy*4.184}get isEmpty(){return this.energy===0&&this.protein===0&&this.carbohydrates===0&&this.fat===0}get percent(){return{protein:this.protein>0?this.protein*zg.protein/this.energy*100:0,carbohydrates:this.carbohydrates>0?this.carbohydrates*zg.carbohydrates/this.energy*100:0,fat:this.fat>0?this.fat*zg.fat/this.energy*100:0}}get perBodyKg(){return{protein:this.bodyWeight>0?this.protein/this.bodyWeight:0,carbohydrates:this.bodyWeight>0?this.carbohydrates/this.bodyWeight:0,fat:this.bodyWeight>0?this.fat/this.bodyWeight:0}}static fromIngredient(t,n,r){const o=new Ba,i=r===null?n:n*r.amount*r.grams;return o.energy=t.energy*i/100,o.protein=t.protein*i/100,o.carbohydrates=t.carbohydrates*i/100,o.carbohydratesSugar=t.carbohydratesSugar?t.carbohydratesSugar*i/100:0,o.fat=t.fat*i/100,o.fatSaturated=t.fatSaturated?t.fatSaturated*i/100:0,o.fiber=t.fiber?t.fiber*i/100:0,o.sodium=t.sodium?t.sodium*i/100:0,o}add(t){return this.energy+=t.energy,this.protein+=t.protein,this.carbohydrates+=t.carbohydrates,this.carbohydratesSugar+=t.carbohydratesSugar,this.fat+=t.fat,this.fatSaturated+=t.fatSaturated,this.fiber+=t.fiber,this.sodium+=t.sodium,this}toString(){return`e: ${this.energy}, p: ${this.protein}, c: ${this.carbohydrates}, cS: ${this.carbohydratesSugar}, f: ${this.fat}, fS: ${this.fatSaturated}, fi: ${this.fiber}, s: ${this.sodium}`}equals(t){return this.energy===t.energy&&this.protein===t.protein&&this.carbohydrates===t.carbohydrates&&this.carbohydratesSugar===t.carbohydratesSugar&&this.fat===t.fat&&this.fatSaturated===t.fatSaturated&&this.fiber===t.fiber&&this.sodium===t.sodium}}function ei(e){return e.toISOString().split("T")[0]}const IZ=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];function cf(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function RT(e,t){return e==null?null:e.toLocaleTimeString(t?[t]:[],{hour:"2-digit",minute:"2-digit"})}function b2e(e){if(e==null)return null;const[t,n]=e.toTimeString().split(":");return`${t}:${n}`}function w2e(e){if(e==null)return null;const[t,n]=e.split(":"),r=new Date;return r.setHours(parseInt(t)),r.setMinutes(parseInt(n)),r}function x2e(e,t=new Date){const r={lastWeek:()=>t.setDate(t.getDate()-7),lastMonth:()=>t.setMonth(t.getMonth()-1),lastHalfYear:()=>t.setMonth(t.getMonth()-6),lastYear:()=>t.setFullYear(t.getFullYear()-1),"":void 0}[e];if(r)r();else return;return ei(t)}class kZ{constructor(t,n,r,o){dn(this,"items",[]);dn(this,"diaryEntries",[]);this.id=t,this.order=n,this.time=r,this.name=o}get timeHHMMLocale(){return RT(this.time)}get displayName(){return this.name?this.name:this.timeHHMMLocale}get diaryEntriesToday(){return this.diaryEntries.filter(t=>cf(t.datetime,new Date))}get plannedNutritionalValues(){const t=new Ba;for(const n of this.items)t.add(n.nutritionalValues);return t}get loggedNutritionalValuesToday(){const t=new Ba;for(const n of this.diaryEntriesToday)t.add(n.nutritionalValues);return t}}class BF{fromJson(t){return new kZ(t.id,t.order,w2e(t.time),t.name)}toJson(t){return{name:t.name,order:t.order,time:RT(t.time)}}}const MP=-1;class S2e{constructor(t,n,r,o=!1,i=null,a=null,s=null,l=null,c=null,u=null,d=null){dn(this,"meals",[]);dn(this,"diaryEntries",[]);this.id=t,this.creationDate=n,this.description=r,this.onlyLogging=o,this.goalEnergy=i,this.goalProtein=a,this.goalCarbohydrates=s,this.goalFiber=l,this.goalSodium=c,this.goalFat=u,this.goalFatsSaturated=d}get hasAnyGoals(){return this.goalEnergy!==null||this.goalProtein!==null||this.goalCarbohydrates!==null||this.goalFat!==null}get hasAnyAdvancedGoals(){return this.goalFiber!==null||this.goalSodium!==null||this.goalFatsSaturated!==null}get hasAnyPlanned(){return this.hasAnyGoals||this.plannedNutritionalValues.energy>0}get plannedNutritionalValues(){if(this.hasAnyGoals)return new Ba({energy:this.goalEnergy,carbohydrates:this.goalCarbohydrates,protein:this.goalProtein,fat:this.goalFat});const t=new Ba;for(const n of this.meals)t.add(n.plannedNutritionalValues);return t}get loggedNutritionalValues7DayAvg(){const t=new Date,n=new Date(t.getTime()-7*24*60*60*1e3),r=this.diaryEntries.filter(o=>o.datetime>=n);return this.getAverageNutritionalValuesFromDiaryEntries(r)}get loggedNutritionalValuesToday(){const t=this.diaryEntries.filter(n=>cf(n.datetime,new Date));return this.getNutritionalValuesFromDiaryEntries(t)}get groupDiaryEntries(){return this.diaryEntries.reduce((t,n)=>{const r=n.datetime.toISOString().split("T")[0],o=t.get(r)||{entries:[],nutritionalValues:new Ba};return o.entries.push(n),o.nutritionalValues.add(n.nutritionalValues),t.set(r,o),t},new Map)}get percentageValuesLoggedToday(){return new Ba({protein:this.loggedNutritionalValuesToday.protein/this.plannedNutritionalValues.protein*100,carbohydrates:this.loggedNutritionalValuesToday.carbohydrates/this.plannedNutritionalValues.carbohydrates*100,fat:this.loggedNutritionalValuesToday.fat/this.plannedNutritionalValues.fat*100})}pseudoMealOthers(t){const n=new kZ(MP,-1,null,t);return n.diaryEntries=this.diaryEntries.filter(r=>r.mealId===null),n}loggedNutritionalValuesDate(t){return this.getNutritionalValuesFromDiaryEntries(this.loggedEntriesDate(t))}loggedEntriesDate(t){return this.diaryEntries.filter(n=>cf(n.datetime,t))}getAverageNutritionalValuesFromDiaryEntries(t){const n=t.length,r=this.getNutritionalValuesFromDiaryEntries(t);return n===0||(r.energy=r.energy/n,r.protein=r.protein/n,r.carbohydrates=r.carbohydrates/n,r.carbohydratesSugar=r.carbohydratesSugar/n,r.fat=r.fat/n,r.fatSaturated=r.fatSaturated/n,r.fiber=r.fiber/n,r.sodium=r.sodium/n),r}getNutritionalValuesFromDiaryEntries(t){return t.reduce((n,r)=>n.add(r.nutritionalValues),new Ba)}}class MI{fromJson(t){return new S2e(t.id,new Date(t.creation_date),t.description,t.only_logging,t.goal_energy,t.goal_protein,t.goal_carbohydrates,t.goal_fiber,t.goal_fat)}toJson(t){return{description:t.description}}}class C2e{constructor(t,n,r,o,i,a,s,l){this.id=t,this.uuid=n,this.url=r,this.created=o,this.lastUpdate=i,this.size=a,this.width=s,this.height=l}}class P2e{fromJson(t){return new C2e(t.id,t.uuid,t.image,new Date(t.created),new Date(t.last_update),t.size,t.width,t.height)}}class T2e{constructor(t,n,r,o,i,a,s,l,c,u,d,f,p=null){this.id=t,this.uuid=n,this.code=r,this.name=o,this.energy=i,this.protein=a,this.carbohydrates=s,this.carbohydratesSugar=l,this.fat=c,this.fatSaturated=u,this.fiber=d,this.sodium=f,this.image=p}}class E2e{fromJson(t){return new T2e(t.id,t.uuid,t.code,t.name,t.energy,parseFloat(t.protein),parseFloat(t.carbohydrates),t.carbohydrates_sugar===null?null:parseFloat(t.carbohydrates_sugar),parseFloat(t.fat),t.fat_saturated===null?null:parseFloat(t.fat_saturated),t.fiber===null?null:parseFloat(t.fiber),t.sodium===null?null:parseFloat(t.sodium),t.image===null?null:new P2e().fromJson(t.image))}}class zF{constructor(t,n,r){this.id=t,this.nameShort=n,this.nameLong=r}}class O2e{fromJson(t){return new zF(t.id,t.short_name,t.full_name)}toJson(t){return{}}}var VF={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_API_SERVER:""};const I2e="/static/react",HF="",k2e=VF.TIME_ZONE,M2e=VF.MIN_ACCOUNT_AGE_TO_TRUST,A2e="",$2e=VF.VITE_API_KEY,vh=2,MZ="en",R2e=new zF(vh,MZ,"English"),_2e=M2e||21,AZ=1,D2e=2,N2e=1,L2e=2,F2e="exercises",j2e="variations",B2e="detail",z2e="languages",V2e="categories",H2e="equipment",U2e="muscles",W2e="permission",G2e="profile",q2e="routine",K2e="routines-shallow",Y2e="routines-active",X2e="routines-logs",Mv="measurements",Av="measurements-categories";var _r=(e=>(e.NUTRITIONAL_PLANS="nutritional-plans",e.NUTRITIONAL_PLAN="nutritional-plan",e.NUTRITIONAL_PLAN_LAST="nutritional-plan-last",e.INGREDIENT="ingredient",e.BODY_WEIGHT="body-weight",e))(_r||{}),Ui=(e=>(e.MEAL="meal",e.MEAL_ITEM="mealitem",e.NUTRITIONAL_DIARY="nutritiondiary",e.INGREDIENT_PATH="ingredientinfo",e.INGREDIENT_SEARCH_PATH="ingredient/search",e.INGREDIENT_WEIGHT_UNIT="ingredientweightunit",e))(Ui||{});const $Z="999",Q2e=["#2a4c7d","#5b5291","#8e5298","#bf5092","#e7537e","#ff6461","#ff813d","#ffa600"],J2e=["#2a4c7d","#825298","#d45089","#ff6a59","#ffa600"],Z2e=["#2a4c7d","#d45089","#ffa600"],xU={pageSizeOptions:[5,10,25,50,100],pageSize:10},e_e=k2e||"Europe/Berlin",Iy="en",RZ=3e3;var _Z={exports:{}};(function(e){(function(t){let n;function r(u,d){const f=u.charCodeAt(d);if(isNaN(f))throw new RangeError("Index "+d+' out of range for string "'+u+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(f<55296||f>57343)return[u.charAt(d),d];if(f>=55296&&f<=56319){if(u.length<=d+1)return[" ",d];const m=u.charCodeAt(d+1);return m<56320||m>57343?[" ",d]:[u.charAt(d)+u.charAt(d+1),d+1]}if(d===0)return[" ",d];const p=u.charCodeAt(d-1);if(p<55296||p>56319)return[" ",d];throw new Error('String "'+u+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?n=function(u){return btoa(unescape(encodeURIComponent(u)))}:n=function(u){const d=unescape(encodeURIComponent(u+""));let f="";for(let p,m,g=0,v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";d.charAt(g|0)||(v="=",g%1);f+=v.charAt(63&p>>8-g%1*8)){if(m=d.charCodeAt(g+=3/4),m>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");p=p<<8|m}return f}:n=function(u){return Buffer.from(u).toString("base64")};function o(u,d){let f=s(u,d);if((d&&d.fallback!==void 0?d.fallback:o.defaults.fallback)===!0&&f===""){let m="";for(let g=0;g1?f[d[m]]=u[d[m]]:p[d[m]]=u[d[m]];Object.assign(o.charmap,p),Object.assign(o.multicharmap,f)},o.setLocale=function(u){a=i[u]||{}},e.exports?e.exports=o:t.slug=o})(Di)})(_Z);var t_e=_Z.exports;const DZ=_n(t_e);function Ct(e,t){t=t||{};const r=[t.server||A2e,"api","v2",e];if(t.objectMethod&&r.push(t.objectMethod),t.id&&r.push(t.id.toString()),r.push(""),t.query){const o=[];for(const i in t.query)t.query.hasOwnProperty(i)&&o.push(`${encodeURIComponent(i)}=${encodeURIComponent(t.query[i])}`);r.pop(),r.push(`?${o.join("&")}`)}return r.join("/")}var bn=(e=>(e[e.DASHBOARD=0]="DASHBOARD",e[e.ROUTINE_OVERVIEW=1]="ROUTINE_OVERVIEW",e[e.ROUTINE_DETAIL=2]="ROUTINE_DETAIL",e[e.ROUTINE_ADD=3]="ROUTINE_ADD",e[e.ROUTINE_DELETE=4]="ROUTINE_DELETE",e[e.ROUTINE_ADD_LOG=5]="ROUTINE_ADD_LOG",e[e.ROUTINE_EDIT_LOG=6]="ROUTINE_EDIT_LOG",e[e.ROUTINE_DELETE_LOG=7]="ROUTINE_DELETE_LOG",e[e.ROUTINE_EDIT_DAY=8]="ROUTINE_EDIT_DAY",e[e.ROUTINE_ADD_DAY=9]="ROUTINE_ADD_DAY",e[e.ROUTINE_DELETE_DAY=10]="ROUTINE_DELETE_DAY",e[e.ROUTINE_ADD_SET=11]="ROUTINE_ADD_SET",e[e.ROUTINE_EDIT_SET=12]="ROUTINE_EDIT_SET",e[e.ROUTINE_DELETE_SET=13]="ROUTINE_DELETE_SET",e[e.EXERCISE_DETAIL=14]="EXERCISE_DETAIL",e[e.EXERCISE_OVERVIEW=15]="EXERCISE_OVERVIEW",e[e.EXERCISE_CONTRIBUTE=16]="EXERCISE_CONTRIBUTE",e[e.WEIGHT_OVERVIEW=17]="WEIGHT_OVERVIEW",e[e.WEIGHT_ADD=18]="WEIGHT_ADD",e[e.MEASUREMENT_OVERVIEW=19]="MEASUREMENT_OVERVIEW",e[e.MEASUREMENT_DETAIL=20]="MEASUREMENT_DETAIL",e[e.NUTRITION_OVERVIEW=21]="NUTRITION_OVERVIEW",e[e.NUTRITION_DETAIL=22]="NUTRITION_DETAIL",e[e.NUTRITION_PLAN_PDF=23]="NUTRITION_PLAN_PDF",e[e.NUTRITION_PLAN_COPY=24]="NUTRITION_PLAN_COPY",e[e.NUTRITION_DIARY=25]="NUTRITION_DIARY",e[e.INGREDIENT_DETAIL=26]="INGREDIENT_DETAIL",e[e.CALENDAR=27]="CALENDAR",e))(bn||{});function Cn(e,t,n){t=t||"en-us";const r=t.split("-")[0];switch(e){case 1:return`/${r}/routine/overview`;case 2:return`/${r}/routine/${n.id}/view`;case 3:return`/${r}/routine/add`;case 9:return`/${r}/routine/day/${n.id}/add`;case 5:return`/${r}/routine/day/${n.id}/log/add`;case 6:return`/${r}/routine/log/${n.id}/edit`;case 7:return`/${r}/routine/log/${n.id}/delete`;case 8:return`/${r}/routine/day/${n.id}/edit`;case 10:return`/${r}/routine/day/${n.id}/delete`;case 11:return`/${r}/routine/set/${n.id}/add`;case 12:return`/${r}/routine/set/${n.id}/edit`;case 13:return`/${r}/routine/set/${n.id}/delete`;case 27:return`/${r}/routine/calendar`;case 16:return`/${r}/exercise/contribute`;case 14:return n.slug?`/${r}/exercise/${n.id}/view-base/${DZ(n.slug)}`:`/${r}/exercise/${n.id}/view-base`;case 15:return`/${r}/exercise/overview`;case 17:return`/${r}/weight/overview`;case 18:return`/${r}/weight/add`;case 19:return`/${r}/measurement/overview`;case 20:return`/${r}/measurement/category/${n.id}`;case 21:return`/${r}/nutrition/overview`;case 22:return`/${r}/nutrition/${n.id}/view`;case 25:return`/${r}/nutrition/${n.id}/${n.date}`;case 23:return`/${r}/nutrition/${n.id}/pdf`;case 24:return`/${r}/nutrition/${n.id}/copy`;case 26:return`/${r}/nutrition/ingredient/${n.id}/view`;case 0:default:return"/"}}function n_e(e){let t=null;if(document.cookie&&document.cookie!==""){const n=document.cookie.split(";");for(let r=0;r{if(e.length===0)return[];const t=Ct(Ui.INGREDIENT_PATH,{query:{id__in:e.join(",")}}),n=new E2e,r=[];for await(const o of bS(t,It()))for(const i of o)r.push(n.fromJson(i));return r},r_e=async(e,t,n=!0)=>{const r=[t];t!==Iy&&n&&r.push(Iy);const o=Ct(Ui.INGREDIENT_SEARCH_PATH,{query:{term:e,language:r.join(",")}}),{data:i}=await ft.get(o);return i.suggestions};class o_e{constructor(t,n,r,o,i,a,s){dn(this,"ingredient",null);dn(this,"weightUnit",null);this.id=t,this.ingredientId=n,this.weightUnitId=r,this.amount=o,this.order=i,a&&(this.ingredient=a),s&&(this.weightUnit=s)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?Ba.fromIngredient(this.ingredient,this.amount,this.weightUnit):new Ba}}class UF{fromJson(t){return new o_e(t.id,t.ingredient,t.weight_unit,parseFloat(t.amount),t.order)}toJson(t){return{ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),order:t.order}}}class i_e{constructor(t,n,r,o=""){this.id=t,this.amount=n,this.grams=r,this.name=o}}class a_e{fromJson(t){return new i_e(t.id,parseFloat(t.amount),t.gram)}}const LZ=async e=>{if(e===null)return null;const{data:t}=await ft.get(Ct(Ui.INGREDIENT_WEIGHT_UNIT,{id:e}),{headers:It()});return new a_e().fromJson(t)},s_e=async e=>{const t=await ft.post(Ct(Ui.MEAL),e,{headers:It()});return new BF().fromJson(t.data)},l_e=async e=>{const t=await ft.patch(Ct(Ui.MEAL,{id:e.id}),e,{headers:It()});return new BF().fromJson(t.data)},c_e=async e=>{await ft.delete(Ct(Ui.MEAL,{id:e}),{headers:It()})},u_e=async e=>{let t=[];const n=new BF,r=new UF,{data:o}=await ft.get(Ct(Ui.MEAL,{query:{plan:e}}),{headers:It()}),i=o.results.map(a=>n.fromJson(a));for(const a of i){t=[];const{data:s}=await ft.get(Ct(Ui.MEAL_ITEM,{query:{meal:a.id}}),{headers:It()}),l=s.results.map(u=>r.fromJson(u));for(const u of l)t.push(u.ingredientId);const c=await NZ(t);for(const u of l)u.weightUnit=await LZ(u.weightUnitId),u.ingredient=c.find(d=>d.id===u.ingredientId);a.items=l}return i};class d_e{constructor(t,n,r,o,i,a,s,l,c){dn(this,"ingredient",null);dn(this,"weightUnit",null);this.id=t,this.planId=n,this.mealId=r,this.ingredientId=o,this.weightUnitId=i,this.amount=a,this.datetime=s,l&&(this.ingredient=l),c&&(this.weightUnit=c)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?Ba.fromIngredient(this.ingredient,this.amount,this.weightUnit):(console.log("Diary entry has no ingredient, returning empty NutritionalValues object"),new Ba)}}class WF{fromJson(t){return new d_e(t.id,t.plan,t.meal,t.ingredient,t.weight_unit,parseFloat(t.amount),new Date(t.datetime))}toJson(t){return{plan:t.planId,meal:t.mealId,ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),datetime:t.datetime.toISOString()}}}const f_e=async(e,t)=>{const n=new WF,r={plan:e,limit:$Z};t&&(r.datetime__date=ei(t));const o=Ct(Ui.NUTRITIONAL_DIARY,{query:r}),i=[];for await(const a of bS(o,It()))for(const s of a){let l=n.fromJson(s);l.weightUnit=await LZ(l.weightUnitId),i.push(l)}return i},FZ=async e=>{const t=await ft.post(Ct(Ui.NUTRITIONAL_DIARY),e,{headers:It()});return new WF().fromJson(t.data)},p_e=async e=>{const t=await ft.patch(Ct(Ui.NUTRITIONAL_DIARY,{id:e.id}),e,{headers:It()});return new WF().fromJson(t.data)},$v="nutritionplan",h_e=async()=>{const{data:e}=await ft.get(Ct($v),{headers:It()}),t=new MI;return e.results.map(n=>t.fromJson(n))},m_e=async()=>{const{data:e}=await ft.get(Ct($v,{query:{limit:"1"}}),{headers:It()});return e.count===0?null:await GF(e.results[0].id)},GF=async(e,t)=>{if(e===null)return null;const{data:n}=await ft.get(Ct($v,{id:e}),{headers:It()}),r=[],i=new MI().fromJson(n),a=await Promise.all([u_e(e),f_e(e,t)]);i.meals=a[0],i.diaryEntries=a[1],i.diaryEntries.forEach(l=>{r.includes(l.ingredientId)||r.push(l.ingredientId)});const s=await NZ(r);return i.diaryEntries.forEach(l=>{l.ingredient=s.find(c=>c.id===l.ingredientId)}),i.meals.forEach(l=>{l.diaryEntries=i.diaryEntries.filter(c=>c.mealId===l.id)}),i},g_e=async e=>{const t=await ft.post(Ct($v),e,{headers:It()});return new MI().fromJson(t.data)},y_e=async e=>{const t=await ft.patch(Ct($v,{id:e.id}),e,{headers:It()});return new MI().fromJson(t.data)},v_e=async e=>{await ft.delete(Ct($v,{id:e}),{headers:It()})};function b_e(){return yo({queryKey:[_r.NUTRITIONAL_PLANS],queryFn:()=>h_e()})}function w_e(){return yo({queryKey:[_r.NUTRITIONAL_PLAN,"last"],queryFn:()=>m_e()})}function x_e(e){return yo({queryKey:[_r.NUTRITIONAL_PLAN,e],queryFn:()=>GF(e)})}function S_e(e,t,n=!0){return yo({queryKey:[_r.NUTRITIONAL_PLAN,e,t],queryFn:()=>GF(e,new Date(t)),enabled:n})}const C_e=()=>{const e=Vr();return oo({mutationFn:t=>g_e(t),onSuccess:()=>{e.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLANS]}),e.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLAN]})}})},P_e=e=>{const t=Vr();return oo({mutationFn:n=>v_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLANS]}),t.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLAN,e]})}})},T_e=e=>{const t=Vr();return oo({mutationFn:n=>y_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLAN,e]}),t.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLANS]})}})},E_e=e=>{const t=Vr();return oo({mutationFn:n=>FZ(n),onSuccess:()=>t.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLAN,e]})})},jZ=e=>{const t=Vr();return oo({mutationFn:n=>Promise.all(n.map(r=>FZ(r))),onSuccess:()=>t.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLAN,e]})})},O_e=e=>{const t=Vr();return oo({mutationFn:n=>p_e(n),onSuccess:()=>t.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLAN,e]})})},I_e=e=>{const t=Vr();return oo({mutationFn:n=>s_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLAN,e]})}})},k_e=e=>{const t=Vr();return oo({mutationFn:n=>c_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLAN,e]})}})},M_e=e=>{const t=Vr();return oo({mutationFn:n=>l_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLAN,e]})}})},A_e=async e=>{const t=await ft.post(Ct(Ui.MEAL_ITEM),e,{headers:It()});return new UF().fromJson(t.data)},$_e=async e=>{const t=await ft.patch(Ct(Ui.MEAL_ITEM,{id:e.id}),e,{headers:It()});return new UF().fromJson(t.data)},R_e=async e=>{await ft.delete(Ct(Ui.MEAL_ITEM,{id:e}),{headers:It()})},__e=e=>{const t=Vr();return oo({mutationFn:n=>A_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLAN,e]})}})},D_e=e=>{const t=Vr();return oo({mutationFn:n=>$_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLAN,e]})}})},N_e=e=>{const t=Vr();return oo({mutationFn:n=>R_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[_r.NUTRITIONAL_PLAN,e]})}})};class BZ{constructor(t,n,r){this.date=t,this.weight=n,this.id=r}}class qF{fromJson(t){return new BZ(new Date(t.date),parseFloat(t.weight),t.id)}toJson(t){return{id:t.id,date:ei(t.date),weight:t.weight}}}const AI="weightentry",L_e=async(e="")=>{const t=x2e(e),n=Ct(AI,{query:{ordering:"-date",limit:900,...t&&{date__gte:t}}}),{data:r}=await ft.get(n,{headers:It()}),o=new qF;return r.results.map(i=>o.fromJson(i))},F_e=async e=>(await ft.delete(Ct(AI,{id:e}),{headers:It()})).status,j_e=async e=>{const t=new qF,n=await ft.patch(Ct(AI,{id:e.id}),t.toJson(e),{headers:It()});return t.fromJson(n)},B_e=async e=>{const t=new qF,n=await ft.post(Ct(AI),t.toJson(e),{headers:It()});return t.fromJson(n.data)},z_e=22;function V_e(e,t=z_e){return e.length>t?e.slice(0,t)+"…":e}function H_e(e){return e.toLowerCase().replace(/\s/g,"_").replace("(","_").replace(")","_").replace("-","_")}function Wi(e){return`server.${H_e(e)}`}class U_e{constructor(t,n,r,o){this.id=t,this.name=n,this.nameEn=r,this.isFront=o}getName(t){return this.nameEn?`${this.name} (${t(Wi(this.nameEn))})`:this.name}}class zZ{fromJson(t){return new U_e(t.id,t.name,t.name_en,t.is_front)}toJson(t){return{}}}const W_e="muscle",G_e=async()=>{const e=Ct(W_e),{data:t}=await ft.get(e,{headers:It()}),n=new zZ;return t.results.map(r=>n.fromJson(r))};class q_e{constructor(t,n){this.id=t,this.name=n}}class VZ{fromJson(t){return new q_e(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const K_e="equipment",Y_e=async()=>{const e=Ct(K_e),{data:t}=await ft.get(e,{headers:It()}),n=new VZ;return t.results.map(r=>n.fromJson(r))};class X_e{constructor(t,n){this.id=t,this.name=n}}class HZ{fromJson(t){return new X_e(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const Q_e="exercisecategory",J_e=async()=>{const e=Ct(Q_e),{data:t}=await ft.get(e,{headers:It()}),n=new HZ;return t.results.map(r=>n.fromJson(r))};var hu=(e=>(e[e.LINE_ART=1]="LINE_ART",e[e.THREE_D=2]="THREE_D",e[e.LOW_POLY=3]="LOW_POLY",e[e.PHOTO=4]="PHOTO",e[e.OTHER=5]="OTHER",e))(hu||{});class Z_e{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class p_{fromJson(t){return new Z_e(t.id,t.uuid,t.image,t.is_main)}toJson(t){return{id:t.id,image:t.url,is_front:t.isMain}}}class eDe{constructor(t,n,r){this.id=t,this.uuid=n,this.alias=r}}class UZ{fromJson(t){return new eDe(t.id,t.uuid,t.alias)}toJson(t){return{id:t.id,name:t.alias}}}class h_{constructor(t,n,r){this.id=t,this.exercise=n,this.note=r}}class WZ{fromJson(t){return new h_(t.id,t.exercise,t.comment)}toJson(t){return{id:t.id,comment:t.note,exercise:t.exercise}}}class GZ{constructor(t,n,r,o,i,a,s,l){dn(this,"notes",[]);dn(this,"aliases",[]);dn(this,"authors",[]);this.id=t,this.uuid=n,this.name=r,this.description=o,this.language=i,a&&(this.notes=a),s&&(this.aliases=s),l&&(this.authors=l)}get nameLong(){return V_e(this.name)}get nameSlug(){return DZ(this.name)}}class KF{fromJson(t){var n,r;return new GZ(t.id,t.uuid,t.name,t.description,t.language,(n=t.notes)==null?void 0:n.map(o=>new WZ().fromJson(o)),(r=t.aliases)==null?void 0:r.map(o=>new UZ().fromJson(o)),t.author_history)}toJson(t){return{id:t.id,uuid:t.uuid,name:t.name,description:t.description,language:t.language}}}class tDe{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class qZ{fromJson(t){return new tDe(t.id,t.uuid,t.video,t.is_main)}toJson(t){return{id:t.id,video:t.url}}}class nDe{constructor(t,n,r,o,i,a,s,l,c,u,d){dn(this,"translations",[]);dn(this,"videos",[]);dn(this,"authors",[]);this.id=t,this.uuid=n,this.category=r,this.equipment=o,this.muscles=i,this.musclesSecondary=a,this.images=s,this.variationId=l,c&&(this.translations=c),u&&(this.videos=u),d&&(this.authors=d)}getTranslation(t){const n=t!=null?t.id:vh;let r=this.translations.find(o=>o.language===n);return r||(r=this.translations.find(o=>o.language===vh)),r||this.translations[0]}get availableLanguages(){return this.translations.map(t=>t.language)}get mainImage(){return this.images.find(t=>t.isMain)}get sideImages(){return this.images.filter(t=>!t.isMain)}}class KZ{fromJson(t){const n=new HZ,r=new VZ,o=new zZ,i=new p_,a=new KF,s=new qZ,l=new nDe(t.id,t.uuid,n.fromJson(t.category),t.equipment.map(c=>r.fromJson(c)),t.muscles.map(c=>o.fromJson(c)),t.muscles_secondary.map(c=>o.fromJson(c)),t.images.map(c=>i.fromJson(c)),t.variations,t.exercises.map(c=>a.fromJson(c)),t.videos.map(c=>s.fromJson(c)),t.author_history);if(l.translations.some(c=>c.language===vh)||console.info(`No english translation found for exercise base ${l.uuid}!`),l.translations.length===0)throw new Error(`No translations found for exercise base ${l.uuid}!`);return l}toJson(t){return{id:t.id,uuid:t.uuid,category:t.category.id,equipment:t.equipment.map(n=>n.id),muscles:t.muscles.map(n=>n.id),muscles_secondary:t.musclesSecondary.map(n=>n.id),images:t.images.map(n=>new p_().toJson(n))}}}const YF="exercisebaseinfo",XF="exercise-base";function YZ(e){const t=new KZ,n=[];for(const r of e.results)try{n.push(t.fromJson(r))}catch(o){console.error("An error happened, skipping base:",o)}return n}const rDe=async()=>{const e=Ct(YF,{query:{limit:900}}),t=await ft.get(e,{headers:It()});return YZ(t.data)},$I=async e=>{const t=new KZ,n=Ct(YF,{id:e}),r=await ft.get(n,{headers:It()});return t.fromJson(r.data)},oDe=async e=>{if(!e)return[];const t=Ct(YF,{query:{variations:e}}),n=await ft.get(t,{headers:It()});return YZ(n.data)},iDe=async(e,t,n,r,o,i)=>{const a=Ct(XF),s={category:e,equipment:t,muscles:n,muscles_secondary:r,variation_id:o,license_author:i};return(await ft.post(a,s,{headers:It()})).data.id},QF=async(e,t)=>{const n=Ct(XF,{id:e});return(await ft.patch(n,t,{headers:It()})).status},SU=async(e,t)=>{const r=Ct(XF,t===void 0?{id:e}:{id:e,query:{replaced_by:t}});return(await ft.delete(r,{headers:It()})).status},JF="exercise-translation",aDe="exercise/search",sDe=async(e,t=MZ,n=!0)=>{const r=[t];t!==Iy&&n&&r.push(Iy);const o=Ct(aDe,{query:{term:e,language:r.join(",")}}),{data:i}=await ft.get(o);return i.suggestions},m_=async(e,t,n,r,o)=>{const i=Ct(JF),a={exercise_base:e,language:t,name:n,description:r,license_author:o},s=await ft.post(i,a,{headers:It()});return new KF().fromJson(s.data)},lDe=async(e,t,n,r,o)=>{const i=Ct(JF,{id:e}),a={exercise_base:t,language:n,name:r,description:o},s=await ft.patch(i,a,{headers:It()});return new KF().fromJson(s.data)},cDe=async e=>{const t=Ct(JF,{id:e});return(await ft.delete(t,{headers:It()})).status},uDe="language",dDe=async()=>{const e=Ct(uDe),{data:t}=await ft.get(e,{headers:It()}),n=new O2e;return t.results.map(r=>n.fromJson(r))},g_=(e,t)=>{const n=e.split("-")[0],r=t.find(o=>o.nameShort===n);if(r)return r},XZ="exerciseimage",QZ=async e=>{const t=Ct(XZ),n=It();n["Content-Type"]="multipart/form-data";const r=await ft.post(t,{exercise_base:e.exerciseId,image:e.image,license_title:e.imageData.title,license_object_url:e.imageData.objectUrl,license_author:e.imageData.author,license_author_url:e.imageData.authorUrl,license_derivative_source_url:e.imageData.derivativeSourceUrl,style:e.imageData.style},{headers:n});return new p_().fromJson(r.data)},fDe=async e=>{const t=Ct(XZ,{id:e}),n=It();return(await ft.delete(t,{headers:n})).status},JZ="exercisealias",y_=async(e,t)=>{const n=Ct(JZ),r=await ft.post(n,{exercise:e,alias:t},{headers:It()});return new UZ().fromJson(r.data)},pDe=async e=>(await ft.delete(Ct(JZ,{id:e}),{headers:It()})).status,ZZ="video",hDe=async(e,t,n)=>{const r=Ct(ZZ),o=It();o["Content-Type"]="multipart/form-data";const i=await ft.post(r,{exercise_base:e,license_author:t,video:n},{headers:o});return new qZ().fromJson(i.data)},mDe=async e=>{const t=Ct(ZZ,{id:e}),n=It();return(await ft.delete(t,{headers:n})).status};class gDe{constructor(t,n,r,o){dn(this,"sets",[]);this.id=t,this.description=n,this.daysOfWeek=r,o&&(this.sets=o)}}class yDe{fromJson(t){return new gDe(t.id,t.description,t.day)}toJson(t){return{id:t.id,description:t.description,day:t.daysOfWeek}}}class vDe{constructor(t,n,r,o,i,a,s,l,c,u,d){this.id=t,this.date=n,this.exerciseId=r,this.repetitionUnit=o,this.reps=i,this.weight=a,this.weightUnit=s,this.rir=l,this.repetitionUnitObj=c,this.weightUnitObj=u,this.baseObj=d,c&&(this.repetitionUnitObj=c),u&&(this.weightUnitObj=u),d&&(this.baseObj=d)}get rirString(){return this.rir===null||this.rir===""?"-/-":this.rir}}class bDe{fromJson(t){return new vDe(t.id,new Date(t.date),t.exercise_base,t.repetition_unit,t.reps,t.weight===null?null:Number.parseFloat(t.weight),t.weight_unit,t.rir)}toJson(t){return{id:t.id,exercise_base:t.exerciseId,repetition_unit:t.repetitionUnit,reps:t.reps,weight:t.weight,weight_unit:t.weightUnit,rir:t.rir}}}class wDe{constructor(t,n,r,o,i){dn(this,"days",[]);this.id=t,this.name=n,this.description=r,this.date=o,i&&(this.days=i)}}class eee{fromJson(t){return new wDe(t.id,t.name,t.description,new Date(t.creation_date))}toJson(t){return{id:t.id,name:t.name,description:t.description,creation_date:ei(t.date)}}}function xDe(e,t,n){n=n||(s=>s);const r=s=>s.rir?`${s.rir} ${n("routines.rir")}`:"",o=s=>{if(s.repetitionUnit===D2e)return"∞";const l=s.repetitionUnit!==AZ?n(Wi(s.repetitionUnitObj.name)):"";return`${s.reps} ${l}`},i=s=>s===null?"":Number.isInteger(s)?s.toString():s.toFixed(2).toString(),a=(s,l=!1)=>{const c=o(s),u=s.weightUnitObj.name,d=i(s.weight),f=r(s);let p=l?c:`${e} × ${c}`.trim();if(d){const m=f?`, ${f}`:"";p+=` (${d} ${u}${m})`}else p+=f?` (${f})`:"";return p};return t.length===1?a(t[0]):t.map(s=>a(s,!0)).join(" – ")}class SDe{constructor(t,n,r,o,i,a){dn(this,"settings",[]);dn(this,"settingsComputed",[]);this.id=t,this.sets=n,this.order=r,this.comment=o,i&&(this.settings=i),a&&(this.settingsComputed=a)}get exercises(){return this.settingsFiltered.map(t=>t.base)}get settingsFiltered(){const t=[];for(const n of this.settings)t.filter(o=>o.exerciseId===n.exerciseId).length===0&&t.push(n);return t}filterSettingsByExercise(t){return this.settings.filter(n=>n.exerciseId===t.id)}getSettingsTextRepresentation(t,n){return n=n||(r=>r),xDe(this.sets,this.filterSettingsByExercise(t),n)}}class CDe{fromJson(t){return new SDe(t.id,t.sets,t.order,t.comment)}toJson(t){return{id:t.id,sets:t.sets,order:t.order,comment:t.order}}}class PDe{constructor(t,n,r,o,i,a,s,l,c,u,d,f){dn(this,"base");this.id=t,this.date=n,this.exerciseId=r,this.repetitionUnit=o,this.reps=i,this.weight=a,this.weightUnit=s,this.rir=l,this.order=c,this.comment=u,this.repetitionUnitObj=d,this.weightUnitObj=f,d&&(this.repetitionUnitObj=d),f&&(this.weightUnitObj=f)}}class TDe{fromJson(t){return new PDe(t.id,new Date(t.date),t.exercise_base,t.repetition_unit,t.reps,t.weight===null?null:Number.parseFloat(t.weight),t.weight_unit,t.rir,t.order,t.comment)}toJson(t){return{id:t.id,exercise_base:t.exerciseId,repetition_unit:t.repetitionUnit,reps:t.reps,weight:t.weight,weight_unit:t.weightUnit,rir:t.rir,order:t.order,comment:t.comment}}}class EDe{constructor(t,n){dn(this,"id");dn(this,"name");this.id=t,this.name=n}}class ODe{fromJson(t){return new EDe(t.id,t.name)}toJson(t){return{}}}class IDe{constructor(t,n){dn(this,"id");dn(this,"name");this.id=t,this.name=n}}class kDe{fromJson(t){return new IDe(t.id,t.name)}toJson(t){return{}}}const MDe="setting-repetitionunit",ADe="setting-weightunit",tee=async()=>{const e=Ct(MDe),{data:t}=await ft.get(e,{headers:It()}),n=new ODe;return t.results.map(r=>n.fromJson(r))},nee=async()=>{const e=Ct(ADe),{data:t}=await ft.get(e,{headers:It()}),n=new kDe;return t.results.map(r=>n.fromJson(r))},ZF="workout",$De="workoutlog",RDe="day",_De="set",DDe="setting",NDe=e=>new eee().fromJson(e),ree=async e=>{const t=new eee,n=new yDe,r=new CDe,o=new TDe,i=await ft.get(Ct(ZF,{id:e}),{headers:It()}),a=t.fromJson(i.data),s=await ft.get(Ct(RDe,{query:{training:a.id.toString()}}),{headers:It()}),l=await Promise.all([tee(),nee()]),c=l[0],u=l[1];for(const d of s.data.results){const f=n.fromJson(d),p=await ft.get(Ct(_De,{query:{exerciseday:f.id.toString()}}),{headers:It()});for(const v of p.data.results){const w=r.fromJson(v);f.sets.push(w)}const m=p.data.results.map(v=>ft.get(Ct(DDe,{query:{set:v.id}}),{headers:It()})),g=await Promise.all(m);for(const v of g)for(const w of v.data.results){const x=f.sets.find(O=>O.id===w.set),S=o.fromJson(w),P=u.find(O=>O.id===S.weightUnit),T=c.find(O=>O.id===S.repetitionUnit),E=x.settings.find(O=>O.exerciseId===S.exerciseId);S.base=E!==void 0?E.base:await $I(S.exerciseId),S.weightUnitObj=P,S.repetitionUnitObj=T,x.settings.push(S)}a.days.push(f)}return a},LDe=async()=>{const e=Ct(ZF,{query:{limit:"1"}}),t=await ft.get(e,{headers:It()});return t.data.count===0?null:await ree(t.data.results[0].id)},FDe=async e=>await ree(e),jDe=async()=>{const e=Ct(ZF),t=await ft.get(e,{headers:It()}),n=[];for(const r of t.data.results)n.push(await NDe(r));return n},BDe=async(e,t=!1)=>{const n=new bDe,r=Ct($De,{query:{workout:e.toString(),limit:$Z,ordering:"-date"}}),o=await Promise.all([tee(),nee()]),i=o[0],a=o[1],s=new Map,l=[];for await(const c of bS(r))for(const u of c){const d=n.fromJson(u);d.repetitionUnitObj=i.find(f=>f.id===d.repetitionUnit),d.weightUnitObj=a.find(f=>f.id===d.weightUnit),t&&(s.get(d.exerciseId)===void 0&&s.set(d.exerciseId,await $I(d.exerciseId)),d.baseObj=s.get(d.exerciseId)),l.push(d)}return l};class zDe{constructor(t,n,r,o){dn(this,"entries",[]);this.id=t,this.name=n,this.unit=r,o&&(this.entries=o)}}class RI{fromJson(t){return new zDe(t.id,t.name,t.unit)}toJson(t){return{id:t.id,name:t.name,unit:t.unit}}}class VDe{constructor(t,n,r,o,i){this.id=t,this.category=n,this.date=r,this.value=o,this.notes=i}}class _I{fromJson(t){return new VDe(t.id,t.category,new Date(t.date),t.value,t.notes)}toJson(t){return{id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes}}}const wS="measurement-category",xS="measurement",HDe=async()=>{const e=new RI,t=new _I,{data:n}=await ft.get(Ct(wS),{headers:It()}),r=n.results.map(s=>e.fromJson(s)),o=r.map(async s=>{const l=[],c=Ct(xS,{query:{category:s.id}});for await(const u of bS(c,It()))for(const d of u)l.push(t.fromJson(d));return l}),i=await Promise.all(o);let a;return i.forEach(s=>{s.length>0&&(a=s[0].category,r.findLast(l=>l.id===a).entries=s)}),r},UDe=async e=>{const{data:t}=await ft.get(Ct(wS,{id:e}),{headers:It()}),n=new RI().fromJson(t),r=new _I,o=[],i=Ct(xS,{query:{category:n.id}});for await(const a of bS(i,It()))for(const s of a)o.push(r.fromJson(s));return n.entries=o,n},WDe=async e=>{const t=await ft.post(Ct(wS),{name:e.name,unit:e.unit},{headers:It()});return new RI().fromJson(t.data)},GDe=async e=>{const t=await ft.patch(Ct(wS,{id:e.id}),{name:e.name,unit:e.unit},{headers:It()});return new RI().fromJson(t.data)},qDe=async e=>{await ft.delete(Ct(wS,{id:e}),{headers:It()})},KDe=async e=>{await ft.delete(Ct(xS,{id:e}),{headers:It()})},YDe=async e=>{const t=await ft.patch(Ct(xS,{id:e.id}),{date:ei(e.date),value:e.value,notes:e.notes},{headers:It()});return new _I().fromJson(t.data)},XDe=async e=>{const t=await ft.post(Ct(xS),{category:e.categoryId,date:ei(e.date),value:e.value,notes:e.notes},{headers:It()});return new _I().fromJson(t.data)};function hi(e,t){return e.toLocaleString(t,{maximumFractionDigits:0})}function oee(e,t,n){return e.toLocaleString(t,{maximumFractionDigits:0,unit:n.valueOf(),style:"unit"})}function Sn(e,t){return oee(e,t,"gram")}function p$(e,t){return oee(e,t,"percent")}const Vg=e=>{const{i18n:t}=Ge(),n=e.planned>0;return X(Mt,{children:[C(FJ,{variant:"determinate",value:e.percentage<100?e.percentage:100}),X(dt,{variant:"caption",children:[e.title," — ",Sn(e.logged,t.language),n&&X(Mt,{children:[" / ",Sn(e.planned,t.language)]})]})]})};var QDe=Array.isArray,xa=QDe,JDe=typeof Di=="object"&&Di&&Di.Object===Object&&Di,iee=JDe,ZDe=iee,eNe=typeof self=="object"&&self&&self.Object===Object&&self,tNe=ZDe||eNe||Function("return this")(),Bc=tNe,nNe=Bc,rNe=nNe.Symbol,SS=rNe,CU=SS,aee=Object.prototype,oNe=aee.hasOwnProperty,iNe=aee.toString,Kb=CU?CU.toStringTag:void 0;function aNe(e){var t=oNe.call(e,Kb),n=e[Kb];try{e[Kb]=void 0;var r=!0}catch{}var o=iNe.call(e);return r&&(t?e[Kb]=n:delete e[Kb]),o}var sNe=aNe,lNe=Object.prototype,cNe=lNe.toString;function uNe(e){return cNe.call(e)}var dNe=uNe,PU=SS,fNe=sNe,pNe=dNe,hNe="[object Null]",mNe="[object Undefined]",TU=PU?PU.toStringTag:void 0;function gNe(e){return e==null?e===void 0?mNe:hNe:TU&&TU in Object(e)?fNe(e):pNe(e)}var Zu=gNe;function yNe(e){return e!=null&&typeof e=="object"}var ed=yNe,vNe=Zu,bNe=ed,wNe="[object Symbol]";function xNe(e){return typeof e=="symbol"||bNe(e)&&vNe(e)==wNe}var Rv=xNe,SNe=xa,CNe=Rv,PNe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,TNe=/^\w*$/;function ENe(e,t){if(SNe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||CNe(e)?!0:TNe.test(e)||!PNe.test(e)||t!=null&&e in Object(t)}var ej=ENe;function ONe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Df=ONe;const _v=_n(Df);var INe=Zu,kNe=Df,MNe="[object AsyncFunction]",ANe="[object Function]",$Ne="[object GeneratorFunction]",RNe="[object Proxy]";function _Ne(e){if(!kNe(e))return!1;var t=INe(e);return t==ANe||t==$Ne||t==MNe||t==RNe}var tj=_Ne;const Vt=_n(tj);var DNe=Bc,NNe=DNe["__core-js_shared__"],LNe=NNe,h$=LNe,EU=function(){var e=/[^.]+$/.exec(h$&&h$.keys&&h$.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function FNe(e){return!!EU&&EU in e}var jNe=FNe,BNe=Function.prototype,zNe=BNe.toString;function VNe(e){if(e!=null){try{return zNe.call(e)}catch{}try{return e+""}catch{}}return""}var see=VNe,HNe=tj,UNe=jNe,WNe=Df,GNe=see,qNe=/[\\^$.*+?()[\]{}|]/g,KNe=/^\[object .+?Constructor\]$/,YNe=Function.prototype,XNe=Object.prototype,QNe=YNe.toString,JNe=XNe.hasOwnProperty,ZNe=RegExp("^"+QNe.call(JNe).replace(qNe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function eLe(e){if(!WNe(e)||UNe(e))return!1;var t=HNe(e)?ZNe:KNe;return t.test(GNe(e))}var tLe=eLe;function nLe(e,t){return e==null?void 0:e[t]}var rLe=nLe,oLe=tLe,iLe=rLe;function aLe(e,t){var n=iLe(e,t);return oLe(n)?n:void 0}var Nh=aLe,sLe=Nh,lLe=sLe(Object,"create"),DI=lLe,OU=DI;function cLe(){this.__data__=OU?OU(null):{},this.size=0}var uLe=cLe;function dLe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var fLe=dLe,pLe=DI,hLe="__lodash_hash_undefined__",mLe=Object.prototype,gLe=mLe.hasOwnProperty;function yLe(e){var t=this.__data__;if(pLe){var n=t[e];return n===hLe?void 0:n}return gLe.call(t,e)?t[e]:void 0}var vLe=yLe,bLe=DI,wLe=Object.prototype,xLe=wLe.hasOwnProperty;function SLe(e){var t=this.__data__;return bLe?t[e]!==void 0:xLe.call(t,e)}var CLe=SLe,PLe=DI,TLe="__lodash_hash_undefined__";function ELe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=PLe&&t===void 0?TLe:t,this}var OLe=ELe,ILe=uLe,kLe=fLe,MLe=vLe,ALe=CLe,$Le=OLe;function Dv(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var YLe=KLe,XLe=NI;function QLe(e,t){var n=this.__data__,r=XLe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var JLe=QLe,ZLe=DLe,eFe=HLe,tFe=GLe,nFe=YLe,rFe=JLe;function Nv(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Rp=function(t){return CS(t)&&t.indexOf("%")===t.length-1},ct=function(t){return Sje(t)&&!Fv(t)},Io=function(t){return ct(t)||CS(t)},Eje=0,Nf=function(t){var n=++Eje;return"".concat(t||"").concat(n)},Li=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ct(t)&&!CS(t))return r;var i;if(Rp(t)){var a=t.indexOf("%");i=n*parseFloat(t.slice(0,a))/100}else i=+t;return Fv(i)&&(i=r),o&&i>n&&(i=n),i},Dd=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Oje=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _je(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function b_(e){"@babel/helpers - typeof";return b_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b_(e)}var _U={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},Cu=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},DU=null,g$=null,cj=function e(t){if(t===DU&&Array.isArray(g$))return g$;var n=[];return y.Children.forEach(t,function(r){Ft(r)||(Ebe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),g$=n,DU=t,n};function Vi(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(o){return Cu(o)}):r=[Cu(t)],cj(e).forEach(function(o){var i=Ya(o,"type.displayName")||Ya(o,"type.name");r.indexOf(i)!==-1&&n.push(o)}),n}function Da(e,t){var n=Vi(e,t);return n&&n[0]}var NU=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,o=n.height;return!(!ct(r)||r<=0||!ct(o)||o<=0)},Dje=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Nje=function(t){return t&&t.type&&CS(t.type)&&Dje.indexOf(t.type)>=0},mee=function(t){return t&&b_(t)==="object"&&"clipDot"in t},Lje=function(t,n,r,o){var i,a=(i=m$==null?void 0:m$[o])!==null&&i!==void 0?i:[];return!Vt(t)&&(o&&a.includes(n)||Mje.includes(n))||r&&lj.includes(n)},At=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var o=t;if(y.isValidElement(t)&&(o=t.props),!_v(o))return null;var i={};return Object.keys(o).forEach(function(a){var s;Lje((s=o)===null||s===void 0?void 0:s[a],a,n,r)&&(i[a]=o[a])}),i},w_=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return LU(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function S_(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,i=e.className,a=e.style,s=e.title,l=e.desc,c=zje(e,Bje),u=o||{width:n,height:r,x:0,y:0},d=fe("recharts-surface",i);return K.createElement("svg",x_({},At(c,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),K.createElement("title",null,s),K.createElement("desc",null,l),t)}var Hje=["children","className"];function C_(){return C_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var rn=K.forwardRef(function(e,t){var n=e.children,r=e.className,o=Uje(e,Hje),i=fe("recharts-layer",r);return K.createElement("g",C_({className:i},At(o,!0),{ref:t}),n)}),Hl=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;io?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r=r?e:Kje(e,t,n)}var Xje=Yje,Qje="\\ud800-\\udfff",Jje="\\u0300-\\u036f",Zje="\\ufe20-\\ufe2f",eBe="\\u20d0-\\u20ff",tBe=Jje+Zje+eBe,nBe="\\ufe0e\\ufe0f",rBe="\\u200d",oBe=RegExp("["+rBe+Qje+tBe+nBe+"]");function iBe(e){return oBe.test(e)}var gee=iBe;function aBe(e){return e.split("")}var sBe=aBe,yee="\\ud800-\\udfff",lBe="\\u0300-\\u036f",cBe="\\ufe20-\\ufe2f",uBe="\\u20d0-\\u20ff",dBe=lBe+cBe+uBe,fBe="\\ufe0e\\ufe0f",pBe="["+yee+"]",P_="["+dBe+"]",T_="\\ud83c[\\udffb-\\udfff]",hBe="(?:"+P_+"|"+T_+")",vee="[^"+yee+"]",bee="(?:\\ud83c[\\udde6-\\uddff]){2}",wee="[\\ud800-\\udbff][\\udc00-\\udfff]",mBe="\\u200d",xee=hBe+"?",See="["+fBe+"]?",gBe="(?:"+mBe+"(?:"+[vee,bee,wee].join("|")+")"+See+xee+")*",yBe=See+xee+gBe,vBe="(?:"+[vee+P_+"?",P_,bee,wee,pBe].join("|")+")",bBe=RegExp(T_+"(?="+T_+")|"+vBe+yBe,"g");function wBe(e){return e.match(bBe)||[]}var xBe=wBe,SBe=sBe,CBe=gee,PBe=xBe;function TBe(e){return CBe(e)?PBe(e):SBe(e)}var EBe=TBe,OBe=Xje,IBe=gee,kBe=EBe,MBe=dee;function ABe(e){return function(t){t=MBe(t);var n=IBe(t)?kBe(t):void 0,r=n?n[0]:t.charAt(0),o=n?OBe(n,1).join(""):t.slice(1);return r[e]()+o}}var $Be=ABe,RBe=$Be,_Be=RBe("toUpperCase"),DBe=_Be;const BI=_n(DBe);function yr(e){return function(){return e}}const Cee=Math.cos,NT=Math.sin,nc=Math.sqrt,LT=Math.PI,zI=2*LT,E_=Math.PI,O_=2*E_,xp=1e-6,NBe=O_-xp;function Pee(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Pee;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;oxp)if(!(Math.abs(d*l-c*u)>xp)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,m=o-s,g=l*l+c*c,v=p*p+m*m,w=Math.sqrt(g),x=Math.sqrt(f),S=i*Math.tan((E_-Math.acos((g+f-v)/(2*w*x)))/2),P=S/x,T=S/w;Math.abs(P-1)>xp&&this._append`L${t+P*u},${n+P*d}`,this._append`A${i},${i},0,0,${+(d*p>u*m)},${this._x1=t+T*l},${this._y1=n+T*c}`}}arc(t,n,r,o,i,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(o),l=r*Math.sin(o),c=t+s,u=n+l,d=1^a,f=a?o-i:i-o;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>xp||Math.abs(this._y1-u)>xp)&&this._append`L${c},${u}`,r&&(f<0&&(f=f%O_+O_),f>NBe?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:f>xp&&this._append`A${r},${r},0,${+(f>=E_)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function uj(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new FBe(t)}function dj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Tee(e){this._context=e}Tee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function VI(e){return new Tee(e)}function Eee(e){return e[0]}function Oee(e){return e[1]}function Iee(e,t){var n=yr(!0),r=null,o=VI,i=null,a=uj(s);e=typeof e=="function"?e:e===void 0?Eee:yr(e),t=typeof t=="function"?t:t===void 0?Oee:yr(t);function s(l){var c,u=(l=dj(l)).length,d,f=!1,p;for(r==null&&(i=o(p=a())),c=0;c<=u;++c)!(c=p;--m)s.point(S[m],P[m]);s.lineEnd(),s.areaEnd()}w&&(S[f]=+e(v,f,d),P[f]=+t(v,f,d),s.point(r?+r(v,f,d):S[f],n?+n(v,f,d):P[f]))}if(x)return s=null,x+""||null}function u(){return Iee().defined(o).curve(a).context(i)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:yr(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:yr(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:yr(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:yr(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:yr(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:yr(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(o=typeof d=="function"?d:yr(!!d),c):o},c.curve=function(d){return arguments.length?(a=d,i!=null&&(s=a(i)),c):a},c.context=function(d){return arguments.length?(d==null?i=s=null:s=a(i=d),c):i},c}class kee{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function jBe(e){return new kee(e,!0)}function BBe(e){return new kee(e,!1)}const fj={draw(e,t){const n=nc(t/LT);e.moveTo(n,0),e.arc(0,0,n,0,zI)}},zBe={draw(e,t){const n=nc(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Mee=nc(1/3),VBe=Mee*2,HBe={draw(e,t){const n=nc(t/VBe),r=n*Mee;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},UBe={draw(e,t){const n=nc(t),r=-n/2;e.rect(r,r,n,n)}},WBe=.8908130915292852,Aee=NT(LT/10)/NT(7*LT/10),GBe=NT(zI/10)*Aee,qBe=-Cee(zI/10)*Aee,KBe={draw(e,t){const n=nc(t*WBe),r=GBe*n,o=qBe*n;e.moveTo(0,-n),e.lineTo(r,o);for(let i=1;i<5;++i){const a=zI*i/5,s=Cee(a),l=NT(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*o,l*r+s*o)}e.closePath()}},y$=nc(3),YBe={draw(e,t){const n=-nc(t/(y$*3));e.moveTo(0,n*2),e.lineTo(-y$*n,-n),e.lineTo(y$*n,-n),e.closePath()}},bs=-.5,ws=nc(3)/2,I_=1/nc(12),XBe=(I_/2+1)*3,QBe={draw(e,t){const n=nc(t/XBe),r=n/2,o=n*I_,i=r,a=n*I_+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(bs*r-ws*o,ws*r+bs*o),e.lineTo(bs*i-ws*a,ws*i+bs*a),e.lineTo(bs*s-ws*l,ws*s+bs*l),e.lineTo(bs*r+ws*o,bs*o-ws*r),e.lineTo(bs*i+ws*a,bs*a-ws*i),e.lineTo(bs*s+ws*l,bs*l-ws*s),e.closePath()}};function JBe(e,t){let n=null,r=uj(o);e=typeof e=="function"?e:yr(e||fj),t=typeof t=="function"?t:yr(t===void 0?64:+t);function o(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return o.type=function(i){return arguments.length?(e=typeof i=="function"?i:yr(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:yr(+i),o):t},o.context=function(i){return arguments.length?(n=i??null,o):n},o}function FT(){}function jT(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function $ee(e){this._context=e}$ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:jT(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:jT(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ZBe(e){return new $ee(e)}function Ree(e){this._context=e}Ree.prototype={areaStart:FT,areaEnd:FT,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:jT(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function eze(e){return new Ree(e)}function _ee(e){this._context=e}_ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:jT(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function tze(e){return new _ee(e)}function Dee(e){this._context=e}Dee.prototype={areaStart:FT,areaEnd:FT,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function nze(e){return new Dee(e)}function jU(e){return e<0?-1:1}function BU(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(jU(i)+jU(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function zU(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function v$(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function BT(e){this._context=e}BT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:v$(this,this._t0,zU(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,v$(this,zU(this,n=BU(this,e,t)),n);break;default:v$(this,this._t0,n=BU(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Nee(e){this._context=new Lee(e)}(Nee.prototype=Object.create(BT.prototype)).point=function(e,t){BT.prototype.point.call(this,t,e)};function Lee(e){this._context=e}Lee.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}};function rze(e){return new BT(e)}function oze(e){return new Nee(e)}function Fee(e){this._context=e}Fee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=VU(e),o=VU(t),i=0,a=1;a=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[n-1]=(e[n]+o[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function aze(e){return new HI(e,.5)}function sze(e){return new HI(e,0)}function lze(e){return new HI(e,1)}function ky(e,t){if((a=e.length)>1)for(var n=1,r,o,i=e[t[0]],a,s=i.length;n=0;)n[t]=t;return n}function cze(e,t){return e[t]}function uze(e){const t=[];return t.key=e,t}function dze(){var e=yr([]),t=k_,n=ky,r=cze;function o(i){var a=Array.from(e.apply(this,arguments),uze),s,l=a.length,c=-1,u;for(const d of i)for(s=0,++c;s0){for(var n,r,o=0,i=e[0].length,a;o0){for(var n=0,r=e[t[0]],o,i=r.length;n0)||!((i=(o=e[t[0]]).length)>0))){for(var n=0,r=1,o,i,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wze(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var jee={symbolCircle:fj,symbolCross:zBe,symbolDiamond:HBe,symbolSquare:UBe,symbolStar:KBe,symbolTriangle:YBe,symbolWye:QBe},xze=Math.PI/180,Sze=function(t){var n="symbol".concat(BI(t));return jee[n]||fj},Cze=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var o=18*xze;return 1.25*t*t*(Math.tan(o)-Math.tan(o*2)*Math.pow(Math.tan(o),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},Pze=function(t,n){jee["symbol".concat(BI(t))]=n},UI=function(t){var n=t.type,r=n===void 0?"circle":n,o=t.size,i=o===void 0?64:o,a=t.sizeType,s=a===void 0?"area":a,l=bze(t,mze),c=UU(UU({},l),{},{type:r,size:i,sizeType:s}),u=function(){var v=Sze(r),w=JBe().type(v).size(Cze(i,s,r));return w()},d=c.className,f=c.cx,p=c.cy,m=At(c,!0);return f===+f&&p===+p&&i===+i?K.createElement("path",M_({},m,{className:fe("recharts-symbols",d),transform:"translate(".concat(f,", ").concat(p,")"),d:u()})):null};UI.registerSymbol=Pze;function My(e){"@babel/helpers - typeof";return My=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},My(e)}function A_(){return A_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(!o)return;function b(x){x.defaultPrevented||x.key==="Escape"&&(r==null||r(x,"escapeKeyDown"))}return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[o,r]);const s=Ze((b,x)=>{r==null||r(b,x)}),l=Ze(b=>{!r||b==null||a.start(b,()=>{s(null,"timeout")})});v.useEffect(()=>(o&&l(t),a.clear),[o,t,l,a]);const c=b=>{r==null||r(b,"clickaway")},u=a.clear,d=v.useCallback(()=>{t!=null&&l(i??t*.5)},[t,i,l]),f=b=>x=>{const S=b.onBlur;S==null||S(x),d()},p=b=>x=>{const S=b.onFocus;S==null||S(x),u()},m=b=>x=>{const S=b.onMouseEnter;S==null||S(x),u()},g=b=>x=>{const S=b.onMouseLeave;S==null||S(x),d()};return v.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,o,d,u]),{getRootProps:(b={})=>{const x={...WP(e),...WP(b)};return{role:"presentation",...b,...x,onBlur:f(x),onFocus:p(x),onMouseEnter:m(x),onMouseLeave:g(x)}},onClickAway:c}}function hMe(e){return _e("MuiSnackbarContent",e)}Le("MuiSnackbarContent",["root","message","action"]);const mMe=e=>{const{classes:t}=e;return Te({root:["root"],action:["action"],message:["message"]},hMe,t)},gMe=ie(so,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(tt(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=PY(e.palette.background.default,t);return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),yMe=ie("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),vMe=ie("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),bMe=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiSnackbarContent"}),{action:o,className:i,message:a,role:s="alert",...l}=r,c=r,u=mMe(c);return $.jsxs(gMe,{role:s,square:!0,elevation:6,className:pe(u.root,i),ownerState:c,ref:n,...l,children:[$.jsx(yMe,{className:u.message,ownerState:c,children:a}),o?$.jsx(vMe,{className:u.action,ownerState:c,children:o}):null]})});function wMe(e){return _e("MuiSnackbar",e)}Le("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const xMe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Se(n.vertical)}${Se(n.horizontal)}`]};return Te(r,wMe,t)},q3=ie("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Se(n.anchorOrigin.vertical)}${Se(n.anchorOrigin.horizontal)}`]]}})(tt(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),HJ=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiSnackbar"}),o=Ao(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:f,ContentProps:p,disableWindowBlurListener:m=!1,message:g,onBlur:y,onClose:b,onFocus:x,onMouseEnter:S,onMouseLeave:P,open:E,resumeHideDuration:T,TransitionComponent:O=gh,transitionDuration:k=i,TransitionProps:{onEnter:M,onExited:I,...R}={},..._}=r,N={...r,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:c,disableWindowBlurListener:m,TransitionComponent:O,transitionDuration:k},B=xMe(N),{getRootProps:L,onClickAway:F}=pMe({...N}),[U,V]=v.useState(!0),z=on({elementType:q3,getSlotProps:L,externalForwardedProps:_,ownerState:N,additionalProps:{ref:n},className:[B.root,d]}),W=J=>{V(!0),I&&I(J)},G=(J,K)=>{V(!1),M&&M(J,K)};return!E&&U?null:$.jsx(PF,{onClickAway:F,...f,children:$.jsx(q3,{...z,children:$.jsx(O,{appear:!0,in:E,timeout:k,direction:s==="top"?"down":"up",onEnter:G,onExited:W,...R,children:u||$.jsx(bMe,{message:g,action:a,...p})})})})});function SMe(e){return _e("MuiTooltip",e)}const jr=Le("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function CMe(e){return Math.round(e*1e5)/1e5}const PMe=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Se(i.split("-")[0])}`],arrow:["arrow"]};return Te(a,SMe,t)},EMe=ie($f,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(tt(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${jr.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${jr.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${jr.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${jr.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${jr.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${jr.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${jr.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${jr.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),TMe=ie("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Se(n.placement.split("-")[0])}`]]}})(tt(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:vt(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${jr.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${jr.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${jr.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${jr.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${CMe(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${jr.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${jr.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${jr.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${jr.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${jr.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${jr.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${jr.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${jr.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${jr.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${jr.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),OMe=ie("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(tt(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:vt(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let xC=!1;const K3=new _O;let Wb={x:0,y:0};function SC(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Xl=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiTooltip"}),{arrow:o=!1,children:i,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:p=!1,enterDelay:m=100,enterNextDelay:g=0,enterTouchDelay:y=700,followCursor:b=!1,id:x,leaveDelay:S=0,leaveTouchDelay:P=1500,onClose:E,onOpen:T,open:O,placement:k="bottom",PopperComponent:M,PopperProps:I={},slotProps:R={},slots:_={},title:N,TransitionComponent:B,TransitionProps:L,...F}=r,U=v.isValidElement(i)?i:$.jsx("span",{children:i}),V=Ao(),z=nr(),[W,G]=v.useState(),[J,K]=v.useState(null),ne=v.useRef(!1),re=f||b,oe=la(),fe=la(),se=la(),ee=la(),[ce,le]=bi({controlled:O,default:!1,name:"Tooltip",state:"open"});let Q=ce;const ue=_n(x),ge=v.useRef(),xe=Ze(()=>{ge.current!==void 0&&(document.body.style.WebkitUserSelect=ge.current,ge.current=void 0),ee.clear()});v.useEffect(()=>xe,[xe]);const me=Nt=>{K3.clear(),xC=!0,le(!0),T&&!Q&&T(Nt)},be=Ze(Nt=>{K3.start(800+S,()=>{xC=!1}),le(!1),E&&Q&&E(Nt),oe.start(V.transitions.duration.shortest,()=>{ne.current=!1})}),we=Nt=>{ne.current&&Nt.type!=="touchstart"||(W&&W.removeAttribute("title"),fe.clear(),se.clear(),m||xC&&g?fe.start(xC?g:m,()=>{me(Nt)}):me(Nt))},Oe=Nt=>{fe.clear(),se.start(S,()=>{be(Nt)})},[,ke]=v.useState(!1),je=Nt=>{UP(Nt.target)||(ke(!1),Oe(Nt))},de=Nt=>{W||G(Nt.currentTarget),UP(Nt.target)&&(ke(!0),we(Nt))},Re=Nt=>{ne.current=!0;const Co=U.props;Co.onTouchStart&&Co.onTouchStart(Nt)},Me=Nt=>{Re(Nt),se.clear(),oe.clear(),xe(),ge.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ee.start(y,()=>{document.body.style.WebkitUserSelect=ge.current,we(Nt)})},Ae=Nt=>{U.props.onTouchEnd&&U.props.onTouchEnd(Nt),xe(),se.start(P,()=>{be(Nt)})};v.useEffect(()=>{if(!Q)return;function Nt(Co){Co.key==="Escape"&&be(Co)}return document.addEventListener("keydown",Nt),()=>{document.removeEventListener("keydown",Nt)}},[be,Q]);const Ne=Wt(Tf(U),G,n);!N&&N!==0&&(Q=!1);const Je=v.useRef(),nt=Nt=>{const Co=U.props;Co.onMouseMove&&Co.onMouseMove(Nt),Wb={x:Nt.clientX,y:Nt.clientY},Je.current&&Je.current.update()},st={},$t=typeof N=="string";c?(st.title=!Q&&$t&&!d?N:null,st["aria-describedby"]=Q?ue:null):(st["aria-label"]=$t?N:null,st["aria-labelledby"]=Q&&!$t?ue:null);const ct={...st,...F,...U.props,className:pe(F.className,U.props.className),onTouchStart:Re,ref:Ne,...b?{onMouseMove:nt}:{}},_t={};p||(ct.onTouchStart=Me,ct.onTouchEnd=Ae),d||(ct.onMouseOver=SC(we,ct.onMouseOver),ct.onMouseLeave=SC(Oe,ct.onMouseLeave),re||(_t.onMouseOver=we,_t.onMouseLeave=Oe)),u||(ct.onFocus=SC(de,ct.onFocus),ct.onBlur=SC(je,ct.onBlur),re||(_t.onFocus=de,_t.onBlur=je));const pt={...r,isRtl:z,arrow:o,disableInteractive:re,placement:k,PopperComponentProp:M,touch:ne.current},ot=typeof R.popper=="function"?R.popper(pt):R.popper,Pe=v.useMemo(()=>{var Co,ss;let Nt=[{name:"arrow",enabled:!!J,options:{element:J,padding:4}}];return(Co=I.popperOptions)!=null&&Co.modifiers&&(Nt=Nt.concat(I.popperOptions.modifiers)),(ss=ot==null?void 0:ot.popperOptions)!=null&&ss.modifiers&&(Nt=Nt.concat(ot.popperOptions.modifiers)),{...I.popperOptions,...ot==null?void 0:ot.popperOptions,modifiers:Nt}},[J,I.popperOptions,ot==null?void 0:ot.popperOptions]),We=PMe(pt),ft=typeof R.transition=="function"?R.transition(pt):R.transition,Ot={slots:{popper:s.Popper,transition:s.Transition??B,tooltip:s.Tooltip,arrow:s.Arrow,..._},slotProps:{arrow:R.arrow??l.arrow,popper:{...I,...ot??l.popper},tooltip:R.tooltip??l.tooltip,transition:{...L,...ft??l.transition}}},[xt,vn]=dn("popper",{elementType:EMe,externalForwardedProps:Ot,ownerState:pt,className:pe(We.popper,I==null?void 0:I.className)}),[zn,Wn]=dn("transition",{elementType:gh,externalForwardedProps:Ot,ownerState:pt}),[xo,So]=dn("tooltip",{elementType:TMe,className:We.tooltip,externalForwardedProps:Ot,ownerState:pt}),[ai,Sa]=dn("arrow",{elementType:OMe,className:We.arrow,externalForwardedProps:Ot,ownerState:pt,ref:K});return $.jsxs(v.Fragment,{children:[v.cloneElement(U,ct),$.jsx(xt,{as:M??$f,placement:k,anchorEl:b?{getBoundingClientRect:()=>({top:Wb.y,left:Wb.x,right:Wb.x,bottom:Wb.y,width:0,height:0})}:W,popperRef:Je,open:W?Q:!1,id:ue,transition:!0,..._t,...vn,popperOptions:Pe,children:({TransitionProps:Nt})=>$.jsx(zn,{timeout:V.transitions.duration.shorter,...Nt,...Wn,children:$.jsxs(xo,{...So,children:[N,o?$.jsx(ai,{...Sa}):null]})})})]})}),Gt=A0e({createStyledComponent:ie("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>rt({props:e,name:"MuiStack"})}),pS=v.createContext({}),sI=v.createContext({});function IMe(e){return _e("MuiStep",e)}Le("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const kMe=e=>{const{classes:t,orientation:n,alternativeLabel:r,completed:o}=e;return Te({root:["root",n,r&&"alternativeLabel",o&&"completed"]},IMe,t)},MMe=ie("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({variants:[{props:{orientation:"horizontal"},style:{paddingLeft:8,paddingRight:8}},{props:{alternativeLabel:!0},style:{flex:1,position:"relative"}}]}),Mm=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiStep"}),{active:o,children:i,className:a,component:s="div",completed:l,disabled:c,expanded:u=!1,index:d,last:f,...p}=r,{activeStep:m,connector:g,alternativeLabel:y,orientation:b,nonLinear:x}=v.useContext(pS);let[S=!1,P=!1,E=!1]=[o,l,c];m===d?S=o!==void 0?o:!0:!x&&m>d?P=l!==void 0?l:!0:!x&&m({index:d,last:f,expanded:u,icon:d+1,active:S,completed:P,disabled:E}),[d,f,u,S,P,E]),O={...r,active:S,orientation:b,alternativeLabel:y,completed:P,disabled:E,expanded:u,component:s},k=kMe(O),M=$.jsxs(MMe,{as:s,className:pe(k.root,a),ref:n,ownerState:O,...p,children:[g&&y&&d!==0?g:null,i]});return $.jsx(sI.Provider,{value:T,children:g&&!y&&d!==0?$.jsxs(v.Fragment,{children:[g,M]}):M})}),AMe=lt($.jsx("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),$Me=lt($.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");function RMe(e){return _e("MuiStepIcon",e)}const o$=Le("MuiStepIcon",["root","active","completed","error","text"]);var Y3;const DMe=e=>{const{classes:t,active:n,completed:r,error:o}=e;return Te({root:["root",n&&"active",r&&"completed",o&&"error"],text:["text"]},RMe,t)},i$=ie(YP,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(tt(({theme:e})=>({display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${o$.completed}`]:{color:(e.vars||e).palette.primary.main},[`&.${o$.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${o$.error}`]:{color:(e.vars||e).palette.error.main}}))),_Me=ie("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})(tt(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}))),LMe=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiStepIcon"}),{active:o=!1,className:i,completed:a=!1,error:s=!1,icon:l,...c}=r,u={...r,active:o,completed:a,error:s},d=DMe(u);if(typeof l=="number"||typeof l=="string"){const f=pe(i,d.root);return s?$.jsx(i$,{as:$Me,className:f,ref:n,ownerState:u,...c}):a?$.jsx(i$,{as:AMe,className:f,ref:n,ownerState:u,...c}):$.jsxs(i$,{className:f,ref:n,ownerState:u,...c,children:[Y3||(Y3=$.jsx("circle",{cx:"12",cy:"12",r:"12"})),$.jsx(_Me,{className:d.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:u,children:l})]})}return l});function NMe(e){return _e("MuiStepLabel",e)}const Kd=Le("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),FMe=e=>{const{classes:t,orientation:n,active:r,completed:o,error:i,disabled:a,alternativeLabel:s}=e;return Te({root:["root",n,i&&"error",a&&"disabled",s&&"alternativeLabel"],label:["label",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]},NMe,t)},jMe=ie("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation]]}})({display:"flex",alignItems:"center",[`&.${Kd.alternativeLabel}`]:{flexDirection:"column"},[`&.${Kd.disabled}`]:{cursor:"default"},variants:[{props:{orientation:"vertical"},style:{textAlign:"left",padding:"8px 0"}}]}),BMe=ie("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})(tt(({theme:e})=>({...e.typography.body2,display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${Kd.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${Kd.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${Kd.alternativeLabel}`]:{marginTop:16},[`&.${Kd.error}`]:{color:(e.vars||e).palette.error.main}}))),zMe=ie("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({flexShrink:0,display:"flex",paddingRight:8,[`&.${Kd.alternativeLabel}`]:{paddingRight:0}}),VMe=ie("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(tt(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${Kd.alternativeLabel}`]:{textAlign:"center"}}))),xp=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiStepLabel"}),{children:o,className:i,componentsProps:a={},error:s=!1,icon:l,optional:c,slots:u={},slotProps:d={},StepIconComponent:f,StepIconProps:p,...m}=r,{alternativeLabel:g,orientation:y}=v.useContext(pS),{active:b,disabled:x,completed:S,icon:P}=v.useContext(sI),E=l||P;let T=f;E&&!T&&(T=LMe);const O={...r,active:b,alternativeLabel:g,completed:S,disabled:x,error:s,orientation:y},k=FMe(O),M={slots:u,slotProps:{stepIcon:p,...a,...d}},[I,R]=dn("label",{elementType:BMe,externalForwardedProps:M,ownerState:O}),[_,N]=dn("stepIcon",{elementType:T,externalForwardedProps:M,ownerState:O});return $.jsxs(jMe,{className:pe(k.root,i),ref:n,ownerState:O,...m,children:[E||_?$.jsx(zMe,{className:k.iconContainer,ownerState:O,children:$.jsx(_,{completed:S,active:b,error:s,icon:E,...N})}):null,$.jsxs(VMe,{className:k.labelContainer,ownerState:O,children:[o?$.jsx(I,{...R,className:pe(k.label,R==null?void 0:R.className),children:o}):null,c]})]})});xp.muiName="StepLabel";function HMe(e){return _e("MuiStepConnector",e)}Le("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);const UMe=e=>{const{classes:t,orientation:n,alternativeLabel:r,active:o,completed:i,disabled:a}=e,s={root:["root",n,r&&"alternativeLabel",o&&"active",i&&"completed",a&&"disabled"],line:["line",`line${Se(n)}`]};return Te(s,HMe,t)},WMe=ie("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({flex:"1 1 auto",variants:[{props:{orientation:"vertical"},style:{marginLeft:12}},{props:{alternativeLabel:!0},style:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"}}]}),GMe=ie("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.line,t[`line${Se(n.orientation)}`]]}})(tt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600];return{display:"block",borderColor:e.vars?e.vars.palette.StepConnector.border:t,variants:[{props:{orientation:"horizontal"},style:{borderTopStyle:"solid",borderTopWidth:1}},{props:{orientation:"vertical"},style:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}]}})),qMe=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiStepConnector"}),{className:o,...i}=r,{alternativeLabel:a,orientation:s="horizontal"}=v.useContext(pS),{active:l,disabled:c,completed:u}=v.useContext(sI),d={...r,alternativeLabel:a,orientation:s,active:l,completed:u,disabled:c},f=UMe(d);return $.jsx(WMe,{className:pe(f.root,o),ref:n,ownerState:d,...i,children:$.jsx(GMe,{className:f.line,ownerState:d})})});function KMe(e){return _e("MuiStepContent",e)}Le("MuiStepContent",["root","last","transition"]);const YMe=e=>{const{classes:t,last:n}=e;return Te({root:["root",n&&"last"],transition:["transition"]},KMe,t)},XMe=ie("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.last&&t.last]}})(tt(({theme:e})=>({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:e.vars?`1px solid ${e.vars.palette.StepContent.border}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}`,variants:[{props:{last:!0},style:{borderLeft:"none"}}]}))),QMe=ie(Ws,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),Am=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiStepContent"}),{children:o,className:i,TransitionComponent:a=Ws,transitionDuration:s="auto",TransitionProps:l,slots:c={},slotProps:u={},...d}=r;v.useContext(pS);const{active:f,last:p,expanded:m}=v.useContext(sI),g={...r,last:p},y=YMe(g);let b=s;s==="auto"&&!a.muiSupportAuto&&(b=void 0);const x={slots:c,slotProps:{transition:l,...u}},[S,P]=dn("transition",{elementType:QMe,externalForwardedProps:x,ownerState:g,className:y.transition,additionalProps:{in:f||m,timeout:b,unmountOnExit:!0}});return $.jsx(XMe,{className:pe(y.root,i),ref:n,ownerState:g,...d,children:$.jsx(S,{as:a,...P,children:o})})});function JMe(e){return _e("MuiStepper",e)}Le("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"]);const ZMe=e=>{const{orientation:t,nonLinear:n,alternativeLabel:r,classes:o}=e;return Te({root:["root",t,n&&"nonLinear",r&&"alternativeLabel"]},JMe,o)},eAe=ie("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.nonLinear&&t.nonLinear]}})({display:"flex",variants:[{props:{orientation:"horizontal"},style:{flexDirection:"row",alignItems:"center"}},{props:{orientation:"vertical"},style:{flexDirection:"column"}},{props:{alternativeLabel:!0},style:{alignItems:"flex-start"}}]}),tAe=$.jsx(qMe,{}),nAe=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiStepper"}),{activeStep:o=0,alternativeLabel:i=!1,children:a,className:s,component:l="div",connector:c=tAe,nonLinear:u=!1,orientation:d="horizontal",...f}=r,p={...r,nonLinear:u,alternativeLabel:i,orientation:d,component:l},m=ZMe(p),g=v.Children.toArray(a).filter(Boolean),y=g.map((x,S)=>v.cloneElement(x,{index:S,last:S+1===g.length,...x.props})),b=v.useMemo(()=>({activeStep:o,alternativeLabel:i,connector:c,nonLinear:u,orientation:d}),[o,i,c,u,d]);return $.jsx(pS.Provider,{value:b,children:$.jsx(eAe,{as:l,ownerState:p,className:pe(m.root,s),ref:n,...f,children:y})})});function rAe(e){return _e("MuiSwitch",e)}const Mi=Le("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),oAe=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,s={root:["root",n&&`edge${Se(n)}`,`size${Se(r)}`],switchBase:["switchBase",`color${Se(o)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=Te(s,rAe,t);return{...t,...l}},iAe=ie("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Se(n.edge)}`],t[`size${Se(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Mi.thumb}`]:{width:16,height:16},[`& .${Mi.switchBase}`]:{padding:4,[`&.${Mi.checked}`]:{transform:"translateX(16px)"}}}}]}),aAe=ie(CJ,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Mi.input}`]:t.input},n.color!=="default"&&t[`color${Se(n.color)}`]]}})(tt(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Mi.checked}`]:{transform:"translateX(20px)"},[`&.${Mi.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Mi.checked} + .${Mi.track}`]:{opacity:.5},[`&.${Mi.disabled} + .${Mi.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Mi.input}`]:{left:"-100%",width:"300%"}})),tt(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(Hn(["light"])).map(([t])=>({props:{color:t},style:{[`&.${Mi.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Mi.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?Du(e.palette[t].main,.62):Ru(e.palette[t].main,.55)}`}},[`&.${Mi.checked} + .${Mi.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),sAe=ie("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(tt(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),lAe=ie("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(tt(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),Hu=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiSwitch"}),{className:o,color:i="primary",edge:a=!1,size:s="medium",sx:l,...c}=r,u={...r,color:i,edge:a,size:s},d=oAe(u),f=$.jsx(lAe,{className:d.thumb,ownerState:u});return $.jsxs(iAe,{className:pe(d.root,o),sx:l,ownerState:u,children:[$.jsx(aAe,{type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:u,...c,classes:{...d,root:d.switchBase}}),$.jsx(sAe,{className:d.track,ownerState:u})]})});function cAe(e){return _e("MuiTab",e)}const ys=Le("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),uAe=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:s,disabled:l}=e,c={root:["root",i&&a&&"labelIcon",`textColor${Se(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]};return Te(c,cAe,t)},dAe=ie(Hi,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Se(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${ys.iconWrapper}`]:t.iconWrapper},{[`& .${ys.icon}`]:t.icon}]}})(tt(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="top",style:{[`& > .${ys.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="bottom",style:{[`& > .${ys.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="start",style:{[`& > .${ys.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="end",style:{[`& > .${ys.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${ys.selected}`]:{opacity:1},[`&.${ys.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${ys.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${ys.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${ys.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${ys.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),X3=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:s,icon:l,iconPosition:c="top",indicator:u,label:d,onChange:f,onClick:p,onFocus:m,selected:g,selectionFollowsFocus:y,textColor:b="inherit",value:x,wrapped:S=!1,...P}=r,E={...r,disabled:i,disableFocusRipple:a,selected:g,icon:!!l,iconPosition:c,label:!!d,fullWidth:s,textColor:b,wrapped:S},T=uAe(E),O=l&&d&&v.isValidElement(l)?v.cloneElement(l,{className:pe(T.icon,l.props.className)}):l,k=I=>{!g&&f&&f(I,x),p&&p(I)},M=I=>{y&&!g&&f&&f(I,x),m&&m(I)};return $.jsxs(dAe,{focusRipple:!a,className:pe(T.root,o),ref:n,role:"tab","aria-selected":g,disabled:i,onClick:k,onFocus:M,ownerState:E,tabIndex:g?0:-1,...P,children:[c==="top"||c==="start"?$.jsxs(v.Fragment,{children:[O,d]}):$.jsxs(v.Fragment,{children:[d,O]}),u]})}),UJ=v.createContext();function fAe(e){return _e("MuiTable",e)}Le("MuiTable",["root","stickyHeader"]);const pAe=e=>{const{classes:t,stickyHeader:n}=e;return Te({root:["root",n&&"stickyHeader"]},fAe,t)},hAe=ie("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(tt(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:t})=>t.stickyHeader,style:{borderCollapse:"separate"}}]}))),Q3="table",Uu=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiTable"}),{className:o,component:i=Q3,padding:a="normal",size:s="medium",stickyHeader:l=!1,...c}=r,u={...r,component:i,padding:a,size:s,stickyHeader:l},d=pAe(u),f=v.useMemo(()=>({padding:a,size:s,stickyHeader:l}),[a,s,l]);return $.jsx(UJ.Provider,{value:f,children:$.jsx(hAe,{as:i,role:i===Q3?null:"table",ref:n,className:pe(d.root,o),ownerState:u,...c})})}),lI=v.createContext();function mAe(e){return _e("MuiTableBody",e)}Le("MuiTableBody",["root"]);const gAe=e=>{const{classes:t}=e;return Te({root:["root"]},mAe,t)},yAe=ie("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),vAe={variant:"body"},J3="tbody",Wu=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiTableBody"}),{className:o,component:i=J3,...a}=r,s={...r,component:i},l=gAe(s);return $.jsx(lI.Provider,{value:vAe,children:$.jsx(yAe,{className:pe(l.root,o),as:i,ref:n,role:i===J3?null:"rowgroup",ownerState:s,...a})})});function bAe(e){return _e("MuiTableCell",e)}const wAe=Le("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),xAe=e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e,s={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${Se(r)}`,o!=="normal"&&`padding${Se(o)}`,`size${Se(i)}`]};return Te(s,bAe,t)},SAe=ie("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Se(n.size)}`],n.padding!=="normal"&&t[`padding${Se(n.padding)}`],n.align!=="inherit"&&t[`align${Se(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(tt(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid + ${e.palette.mode==="light"?Du(vt(e.palette.divider,1),.88):Ru(vt(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${wAe.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:t})=>t.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),Ie=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:l,size:c,sortDirection:u,variant:d,...f}=r,p=v.useContext(UJ),m=v.useContext(lI),g=m&&m.variant==="head";let y;a?y=a:y=g?"th":"td";let b=l;y==="td"?b=void 0:!b&&g&&(b="col");const x=d||m&&m.variant,S={...r,align:o,component:y,padding:s||(p&&p.padding?p.padding:"normal"),size:c||(p&&p.size?p.size:"medium"),sortDirection:u,stickyHeader:x==="head"&&p&&p.stickyHeader,variant:x},P=xAe(S);let E=null;return u&&(E=u==="asc"?"ascending":"descending"),$.jsx(SAe,{as:y,ref:n,className:pe(P.root,i),"aria-sort":E,scope:b,ownerState:S,...f})});function CAe(e){return _e("MuiTableContainer",e)}Le("MuiTableContainer",["root"]);const PAe=e=>{const{classes:t}=e;return Te({root:["root"]},CAe,t)},EAe=ie("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),Gu=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiTableContainer"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=PAe(s);return $.jsx(EAe,{ref:n,as:i,className:pe(l.root,o),ownerState:s,...a})});function TAe(e){return _e("MuiTableHead",e)}Le("MuiTableHead",["root"]);const OAe=e=>{const{classes:t}=e;return Te({root:["root"]},TAe,t)},IAe=ie("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),kAe={variant:"head"},Z3="thead",_h=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiTableHead"}),{className:o,component:i=Z3,...a}=r,s={...r,component:i},l=OAe(s);return $.jsx(lI.Provider,{value:kAe,children:$.jsx(IAe,{as:i,className:pe(l.root,o),ref:n,role:i===Z3?null:"rowgroup",ownerState:s,...a})})});function MAe(e){return _e("MuiToolbar",e)}Le("MuiToolbar",["root","gutters","regular","dense"]);const AAe=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Te({root:["root",!n&&"gutters",r]},MAe,t)},$Ae=ie("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(tt(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),WJ=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:a=!1,variant:s="regular",...l}=r,c={...r,component:i,disableGutters:a,variant:s},u=AAe(c);return $.jsx($Ae,{as:i,className:pe(u.root,o),ref:n,ownerState:c,...l})}),GJ=lt($.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),qJ=lt($.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),RAe=v.forwardRef(function(t,n){const{backIconButtonProps:r,count:o,disabled:i=!1,getItemAriaLabel:a,nextIconButtonProps:s,onPageChange:l,page:c,rowsPerPage:u,showFirstButton:d,showLastButton:f,slots:p={},slotProps:m={},...g}=t,y=nr(),b=G=>{l(G,0)},x=G=>{l(G,c-1)},S=G=>{l(G,c+1)},P=G=>{l(G,Math.max(0,Math.ceil(o/u)-1))},E=p.firstButton??An,T=p.lastButton??An,O=p.nextButton??An,k=p.previousButton??An,M=p.firstButtonIcon??BJ,I=p.lastButtonIcon??zJ,R=p.nextButtonIcon??qJ,_=p.previousButtonIcon??GJ,N=y?T:E,B=y?O:k,L=y?k:O,F=y?E:T,U=y?m.lastButton:m.firstButton,V=y?m.nextButton:m.previousButton,z=y?m.previousButton:m.nextButton,W=y?m.firstButton:m.lastButton;return $.jsxs("div",{ref:n,...g,children:[d&&$.jsx(N,{onClick:b,disabled:i||c===0,"aria-label":a("first",c),title:a("first",c),...U,children:y?$.jsx(I,{...m.lastButtonIcon}):$.jsx(M,{...m.firstButtonIcon})}),$.jsx(B,{onClick:x,disabled:i||c===0,color:"inherit","aria-label":a("previous",c),title:a("previous",c),...V??r,children:y?$.jsx(R,{...m.nextButtonIcon}):$.jsx(_,{...m.previousButtonIcon})}),$.jsx(L,{onClick:S,disabled:i||(o!==-1?c>=Math.ceil(o/u)-1:!1),color:"inherit","aria-label":a("next",c),title:a("next",c),...z??s,children:y?$.jsx(_,{...m.previousButtonIcon}):$.jsx(R,{...m.nextButtonIcon})}),f&&$.jsx(F,{onClick:P,disabled:i||c>=Math.ceil(o/u)-1,"aria-label":a("last",c),title:a("last",c),...W,children:y?$.jsx(M,{...m.firstButtonIcon}):$.jsx(I,{...m.lastButtonIcon})})]})});function DAe(e){return _e("MuiTablePagination",e)}const Xp=Le("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var eU;const _Ae=ie(Ie,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(tt(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),LAe=ie(WJ,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${Xp.actions}`]:t.actions,...t.toolbar})})(tt(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${Xp.actions}`]:{flexShrink:0,marginLeft:20}}))),NAe=ie("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),FAe=ie("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(tt(({theme:e})=>({...e.typography.body2,flexShrink:0}))),jAe=ie(Dh,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${Xp.selectIcon}`]:t.selectIcon,[`& .${Xp.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${Xp.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),BAe=ie(tn,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),zAe=ie("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(tt(({theme:e})=>({...e.typography.body2,flexShrink:0})));function VAe({from:e,to:t,count:n}){return`${e}–${t} of ${n!==-1?n:`more than ${t}`}`}function HAe(e){return`Go to ${e} page`}const UAe=e=>{const{classes:t}=e;return Te({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},DAe,t)},RF=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiTablePagination"}),{ActionsComponent:o=RAe,backIconButtonProps:i,colSpan:a,component:s=Ie,count:l,disabled:c=!1,getItemAriaLabel:u=HAe,labelDisplayedRows:d=VAe,labelRowsPerPage:f="Rows per page:",nextIconButtonProps:p,onPageChange:m,onRowsPerPageChange:g,page:y,rowsPerPage:b,rowsPerPageOptions:x=[10,25,50,100],SelectProps:S={},showFirstButton:P=!1,showLastButton:E=!1,slotProps:T={},slots:O={},...k}=r,M=r,I=UAe(M),R=(T==null?void 0:T.select)??S,_=R.native?"option":BAe;let N;(s===Ie||s==="td")&&(N=a||1e3);const B=_n(R.id),L=_n(R.labelId),F=()=>l===-1?(y+1)*b:b===-1?l:Math.min(l,(y+1)*b),U={slots:O,slotProps:T},[V,z]=dn("root",{ref:n,className:I.root,elementType:_Ae,externalForwardedProps:{...U,component:s,...k},ownerState:M,additionalProps:{colSpan:N}}),[W,G]=dn("toolbar",{className:I.toolbar,elementType:LAe,externalForwardedProps:U,ownerState:M}),[J,K]=dn("spacer",{className:I.spacer,elementType:NAe,externalForwardedProps:U,ownerState:M}),[ne,re]=dn("selectLabel",{className:I.selectLabel,elementType:FAe,externalForwardedProps:U,ownerState:M,additionalProps:{id:L}}),[oe,fe]=dn("select",{className:I.select,elementType:jAe,externalForwardedProps:U,ownerState:M}),[se,ee]=dn("menuItem",{className:I.menuItem,elementType:_,externalForwardedProps:U,ownerState:M}),[ce,le]=dn("displayedRows",{className:I.displayedRows,elementType:zAe,externalForwardedProps:U,ownerState:M});return $.jsx(V,{...z,children:$.jsxs(W,{...G,children:[$.jsx(J,{...K}),x.length>1&&$.jsx(ne,{...re,children:f}),x.length>1&&$.jsx(oe,{variant:"standard",...!R.variant&&{input:eU||(eU=$.jsx(wv,{}))},value:b,onChange:g,id:B,labelId:L,...R,classes:{...R.classes,root:pe(I.input,I.selectRoot,(R.classes||{}).root),select:pe(I.select,(R.classes||{}).select),icon:pe(I.selectIcon,(R.classes||{}).icon)},disabled:c,...fe,children:x.map(Q=>v.createElement(se,{...ee,key:Q.label?Q.label:Q,value:Q.value?Q.value:Q},Q.label?Q.label:Q))}),$.jsx(ce,{...le,children:d({from:l===0?0:y*b+1,to:F(),count:l===-1?-1:l,page:y})}),$.jsx(o,{className:I.actions,backIconButtonProps:i,count:l,nextIconButtonProps:p,onPageChange:m,page:y,rowsPerPage:b,showFirstButton:P,showLastButton:E,slotProps:T.actions,slots:O.actions,getItemAriaLabel:u,disabled:c})]})})});function WAe(e){return _e("MuiTableRow",e)}const tU=Le("MuiTableRow",["root","selected","hover","head","footer"]),GAe=e=>{const{classes:t,selected:n,hover:r,head:o,footer:i}=e;return Te({root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]},WAe,t)},qAe=ie("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(tt(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${tU.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${tU.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),nU="tr",Yt=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiTableRow"}),{className:o,component:i=nU,hover:a=!1,selected:s=!1,...l}=r,c=v.useContext(lI),u={...r,component:i,hover:a,selected:s,head:c&&c.variant==="head",footer:c&&c.variant==="footer"},d=GAe(u);return $.jsx(qAe,{as:i,ref:n,className:pe(d.root,o),role:i===nU?null:"row",ownerState:u,...l})});function KAe(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function YAe(e,t,n,r={},o=()=>{}){const{ease:i=KAe,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=f=>{if(c){o(new Error("Animation cancelled"));return}s===null&&(s=f);const p=Math.min(1,(f-s)/a);if(t[e]=i(p)*(n-l)+l,p>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(d)};return l===n?(o(new Error("Element already at target position")),u):(requestAnimationFrame(d),u)}const XAe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function QAe(e){const{onChange:t,...n}=e,r=v.useRef(),o=v.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return xn(()=>{const a=nS(()=>{const l=r.current;i(),l!==r.current&&t(r.current)}),s=ba(o.current);return s.addEventListener("resize",a),()=>{a.clear(),s.removeEventListener("resize",a)}},[t]),v.useEffect(()=>{i(),t(r.current)},[t]),$.jsx("div",{style:XAe,...n,ref:o})}function JAe(e){return _e("MuiTabScrollButton",e)}const ZAe=Le("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),e$e=e=>{const{classes:t,orientation:n,disabled:r}=e;return Te({root:["root",n,r&&"disabled"]},JAe,t)},t$e=ie(Hi,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${ZAe.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),n$e=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiTabScrollButton"}),{className:o,slots:i={},slotProps:a={},direction:s,orientation:l,disabled:c,...u}=r,d=nr(),f={isRtl:d,...r},p=e$e(f),m=i.StartScrollButtonIcon??GJ,g=i.EndScrollButtonIcon??qJ,y=on({elementType:m,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f}),b=on({elementType:g,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f});return $.jsx(t$e,{component:"div",className:pe(p.root,o),ref:n,role:null,ownerState:f,tabIndex:null,...u,style:{...u.style,...l==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${d?-90:90}deg)`}},children:s==="left"?$.jsx(m,{...y}):$.jsx(g,{...b})})});function r$e(e){return _e("MuiTabs",e)}const PP=Le("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),rU=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,oU=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,CC=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},o$e=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return Te({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},r$e,l)},i$e=ie("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${PP.scrollButtons}`]:t.scrollButtons},{[`& .${PP.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(tt(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${PP.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),a$e=ie("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),s$e=ie("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),l$e=ie("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(tt(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),c$e=ie(QAe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),iU={},u$e=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiTabs"}),o=Ao(),i=nr(),{"aria-label":a,"aria-labelledby":s,action:l,centered:c=!1,children:u,className:d,component:f="div",allowScrollButtonsMobile:p=!1,indicatorColor:m="primary",onChange:g,orientation:y="horizontal",ScrollButtonComponent:b=n$e,scrollButtons:x="auto",selectionFollowsFocus:S,slots:P={},slotProps:E={},TabIndicatorProps:T={},TabScrollButtonProps:O={},textColor:k="primary",value:M,variant:I="standard",visibleScrollbar:R=!1,..._}=r,N=I==="scrollable",B=y==="vertical",L=B?"scrollTop":"scrollLeft",F=B?"top":"left",U=B?"bottom":"right",V=B?"clientHeight":"clientWidth",z=B?"height":"width",W={...r,component:f,allowScrollButtonsMobile:p,indicatorColor:m,orientation:y,vertical:B,scrollButtons:x,textColor:k,variant:I,visibleScrollbar:R,fixed:!N,hideScrollbar:N&&!R,scrollableX:N&&!B,scrollableY:N&&B,centered:c&&!N,scrollButtonsHideMobile:!p},G=o$e(W),J=on({elementType:P.StartScrollButtonIcon,externalSlotProps:E.startScrollButtonIcon,ownerState:W}),K=on({elementType:P.EndScrollButtonIcon,externalSlotProps:E.endScrollButtonIcon,ownerState:W}),[ne,re]=v.useState(!1),[oe,fe]=v.useState(iU),[se,ee]=v.useState(!1),[ce,le]=v.useState(!1),[Q,ue]=v.useState(!1),[ge,xe]=v.useState({overflow:"hidden",scrollbarWidth:0}),me=new Map,be=v.useRef(null),we=v.useRef(null),Oe=()=>{const Pe=be.current;let We;if(Pe){const Ot=Pe.getBoundingClientRect();We={clientWidth:Pe.clientWidth,scrollLeft:Pe.scrollLeft,scrollTop:Pe.scrollTop,scrollWidth:Pe.scrollWidth,top:Ot.top,bottom:Ot.bottom,left:Ot.left,right:Ot.right}}let ft;if(Pe&&M!==!1){const Ot=we.current.children;if(Ot.length>0){const xt=Ot[me.get(M)];ft=xt?xt.getBoundingClientRect():null}}return{tabsMeta:We,tabMeta:ft}},ke=Ze(()=>{const{tabsMeta:Pe,tabMeta:We}=Oe();let ft=0,Ot;B?(Ot="top",We&&Pe&&(ft=We.top-Pe.top+Pe.scrollTop)):(Ot=i?"right":"left",We&&Pe&&(ft=(i?-1:1)*(We[Ot]-Pe[Ot]+Pe.scrollLeft)));const xt={[Ot]:ft,[z]:We?We[z]:0};if(typeof oe[Ot]!="number"||typeof oe[z]!="number")fe(xt);else{const vn=Math.abs(oe[Ot]-xt[Ot]),zn=Math.abs(oe[z]-xt[z]);(vn>=1||zn>=1)&&fe(xt)}}),je=(Pe,{animation:We=!0}={})=>{We?YAe(L,be.current,Pe,{duration:o.transitions.duration.standard}):be.current[L]=Pe},de=Pe=>{let We=be.current[L];B?We+=Pe:We+=Pe*(i?-1:1),je(We)},Re=()=>{const Pe=be.current[V];let We=0;const ft=Array.from(we.current.children);for(let Ot=0;OtPe){Ot===0&&(We=Pe);break}We+=xt[V]}return We},Me=()=>{de(-1*Re())},Ae=()=>{de(Re())},Ne=v.useCallback(Pe=>{xe({overflow:null,scrollbarWidth:Pe})},[]),Je=()=>{const Pe={};Pe.scrollbarSizeListener=N?$.jsx(c$e,{onChange:Ne,className:pe(G.scrollableX,G.hideScrollbar)}):null;const ft=N&&(x==="auto"&&(se||ce)||x===!0);return Pe.scrollButtonStart=ft?$.jsx(b,{slots:{StartScrollButtonIcon:P.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:J},orientation:y,direction:i?"right":"left",onClick:Me,disabled:!se,...O,className:pe(G.scrollButtons,O.className)}):null,Pe.scrollButtonEnd=ft?$.jsx(b,{slots:{EndScrollButtonIcon:P.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:K},orientation:y,direction:i?"left":"right",onClick:Ae,disabled:!ce,...O,className:pe(G.scrollButtons,O.className)}):null,Pe},nt=Ze(Pe=>{const{tabsMeta:We,tabMeta:ft}=Oe();if(!(!ft||!We)){if(ft[F]We[U]){const Ot=We[L]+(ft[U]-We[U]);je(Ot,{animation:Pe})}}}),st=Ze(()=>{N&&x!==!1&&ue(!Q)});v.useEffect(()=>{const Pe=nS(()=>{be.current&&ke()});let We;const ft=vn=>{vn.forEach(zn=>{zn.removedNodes.forEach(Wn=>{We==null||We.unobserve(Wn)}),zn.addedNodes.forEach(Wn=>{We==null||We.observe(Wn)})}),Pe(),st()},Ot=ba(be.current);Ot.addEventListener("resize",Pe);let xt;return typeof ResizeObserver<"u"&&(We=new ResizeObserver(Pe),Array.from(we.current.children).forEach(vn=>{We.observe(vn)})),typeof MutationObserver<"u"&&(xt=new MutationObserver(ft),xt.observe(we.current,{childList:!0})),()=>{Pe.clear(),Ot.removeEventListener("resize",Pe),xt==null||xt.disconnect(),We==null||We.disconnect()}},[ke,st]),v.useEffect(()=>{const Pe=Array.from(we.current.children),We=Pe.length;if(typeof IntersectionObserver<"u"&&We>0&&N&&x!==!1){const ft=Pe[0],Ot=Pe[We-1],xt={root:be.current,threshold:.99},vn=So=>{ee(!So[0].isIntersecting)},zn=new IntersectionObserver(vn,xt);zn.observe(ft);const Wn=So=>{le(!So[0].isIntersecting)},xo=new IntersectionObserver(Wn,xt);return xo.observe(Ot),()=>{zn.disconnect(),xo.disconnect()}}},[N,x,Q,u==null?void 0:u.length]),v.useEffect(()=>{re(!0)},[]),v.useEffect(()=>{ke()}),v.useEffect(()=>{nt(iU!==oe)},[nt,oe]),v.useImperativeHandle(l,()=>({updateIndicator:ke,updateScrollButtons:st}),[ke,st]);const $t=$.jsx(l$e,{...T,className:pe(G.indicator,T.className),ownerState:W,style:{...oe,...T.style}});let ct=0;const _t=v.Children.map(u,Pe=>{if(!v.isValidElement(Pe))return null;const We=Pe.props.value===void 0?ct:Pe.props.value;me.set(We,ct);const ft=We===M;return ct+=1,v.cloneElement(Pe,{fullWidth:I==="fullWidth",indicator:ft&&!ne&&$t,selected:ft,selectionFollowsFocus:S,onChange:g,textColor:k,value:We,...ct===1&&M===!1&&!Pe.props.tabIndex?{tabIndex:0}:{}})}),pt=Pe=>{const We=we.current,ft=mr(We).activeElement;if(ft.getAttribute("role")!=="tab")return;let xt=y==="horizontal"?"ArrowLeft":"ArrowUp",vn=y==="horizontal"?"ArrowRight":"ArrowDown";switch(y==="horizontal"&&i&&(xt="ArrowRight",vn="ArrowLeft"),Pe.key){case xt:Pe.preventDefault(),CC(We,ft,oU);break;case vn:Pe.preventDefault(),CC(We,ft,rU);break;case"Home":Pe.preventDefault(),CC(We,null,rU);break;case"End":Pe.preventDefault(),CC(We,null,oU);break}},ot=Je();return $.jsxs(i$e,{className:pe(G.root,d),ownerState:W,ref:n,as:f,..._,children:[ot.scrollButtonStart,ot.scrollbarSizeListener,$.jsxs(a$e,{className:G.scroller,ownerState:W,style:{overflow:ge.overflow,[B?`margin${i?"Left":"Right"}`:"marginBottom"]:R?void 0:-ge.scrollbarWidth},ref:be,children:[$.jsx(s$e,{"aria-label":a,"aria-labelledby":s,"aria-orientation":y==="vertical"?"vertical":null,className:G.flexContainer,ownerState:W,onKeyDown:pt,ref:we,role:"tablist",children:_t}),ne&&$t]}),ot.scrollButtonEnd]})});function d$e(e){return _e("MuiTextField",e)}Le("MuiTextField",["root"]);const f$e={standard:OF,filled:TF,outlined:AF},p$e=e=>{const{classes:t}=e;return Te({root:["root"]},d$e,t)},h$e=ie(Cv,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),gn=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:s,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:f,fullWidth:p=!1,helperText:m,id:g,InputLabelProps:y,inputProps:b,InputProps:x,inputRef:S,label:P,maxRows:E,minRows:T,multiline:O=!1,name:k,onBlur:M,onChange:I,onFocus:R,placeholder:_,required:N=!1,rows:B,select:L=!1,SelectProps:F,slots:U={},slotProps:V={},type:z,value:W,variant:G="outlined",...J}=r,K={...r,autoFocus:i,color:l,disabled:u,error:d,fullWidth:p,multiline:O,required:N,select:L,variant:G},ne=p$e(K),re=_n(g),oe=m&&re?`${re}-helper-text`:void 0,fe=P&&re?`${re}-label`:void 0,se=f$e[G],ee={slots:U,slotProps:{input:x,inputLabel:y,htmlInput:b,formHelperText:f,select:F,...V}},ce={},le=ee.slotProps.inputLabel;G==="outlined"&&(le&&typeof le.shrink<"u"&&(ce.notched=le.shrink),ce.label=P),L&&((!F||!F.native)&&(ce.id=void 0),ce["aria-describedby"]=void 0);const[Q,ue]=dn("input",{elementType:se,externalForwardedProps:ee,additionalProps:ce,ownerState:K}),[ge,xe]=dn("inputLabel",{elementType:Pv,externalForwardedProps:ee,ownerState:K}),[me,be]=dn("htmlInput",{elementType:"input",externalForwardedProps:ee,ownerState:K}),[we,Oe]=dn("formHelperText",{elementType:fS,externalForwardedProps:ee,ownerState:K}),[ke,je]=dn("select",{elementType:Dh,externalForwardedProps:ee,ownerState:K}),de=$.jsx(Q,{"aria-describedby":oe,autoComplete:o,autoFocus:i,defaultValue:c,fullWidth:p,multiline:O,name:k,rows:B,maxRows:E,minRows:T,type:z,value:W,id:re,inputRef:S,onBlur:M,onChange:I,onFocus:R,placeholder:_,inputProps:be,slots:{input:U.htmlInput?me:void 0},...ue});return $.jsxs(h$e,{className:pe(ne.root,s),disabled:u,error:d,fullWidth:p,ref:n,required:N,color:l,variant:G,ownerState:K,...J,children:[P!=null&&P!==""&&$.jsx(ge,{htmlFor:re,id:fe,...xe,children:P}),L?$.jsx(ke,{"aria-describedby":oe,id:re,labelId:fe,value:W,input:de,...je,children:a}):de,m&&$.jsx(we,{id:oe,...Oe,children:m})]})});function m$e(e){return _e("MuiToggleButton",e)}const $p=Le("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),KJ=v.createContext({}),YJ=v.createContext(void 0);function g$e(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}const y$e=e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:a}=e,s={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${Se(i)}`,a]};return Te(s,m$e,t)},v$e=ie(Hi,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${Se(n.size)}`]]}})(tt(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${$p.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${$p.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.text.primary,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette.text.primary,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette.text.primary,e.palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(Hn()).map(([t])=>({props:{color:t},style:{[`&.${$p.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette[t].main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vt(e.palette[t].main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vt(e.palette[t].main,e.palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),Gb=v.forwardRef(function(t,n){const{value:r,...o}=v.useContext(KJ),i=v.useContext(YJ),a=ih({...o,selected:g$e(t.value,r)},t),s=rt({props:a,name:"MuiToggleButton"}),{children:l,className:c,color:u="standard",disabled:d=!1,disableFocusRipple:f=!1,fullWidth:p=!1,onChange:m,onClick:g,selected:y,size:b="medium",value:x,...S}=s,P={...s,color:u,disabled:d,disableFocusRipple:f,fullWidth:p,size:b},E=y$e(P),T=k=>{g&&(g(k,x),k.defaultPrevented)||m&&m(k,x)},O=i||"";return $.jsx(v$e,{className:pe(o.className,E.root,c,O),disabled:d,focusRipple:!f,ref:n,onClick:T,onChange:m,value:x,ownerState:P,"aria-pressed":y,...S,children:l})});function b$e(e){return _e("MuiToggleButtonGroup",e)}const Pr=Le("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),w$e=e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,i={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${Se(n)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Te(i,b$e,t)},x$e=ie("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Pr.grouped}`]:t.grouped},{[`& .${Pr.grouped}`]:t[`grouped${Se(n.orientation)}`]},{[`& .${Pr.firstButton}`]:t.firstButton},{[`& .${Pr.lastButton}`]:t.lastButton},{[`& .${Pr.middleButton}`]:t.middleButton},t.root,n.orientation==="vertical"&&t.vertical,n.fullWidth&&t.fullWidth]}})(tt(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${Pr.grouped}`]:{[`&.${Pr.selected} + .${Pr.grouped}.${Pr.selected}`]:{borderTop:0,marginTop:0}},[`& .${Pr.firstButton},& .${Pr.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${Pr.lastButton},& .${Pr.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${Pr.lastButton}.${$p.disabled},& .${Pr.middleButton}.${$p.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${Pr.grouped}`]:{[`&.${Pr.selected} + .${Pr.grouped}.${Pr.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${Pr.firstButton},& .${Pr.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${Pr.lastButton},& .${Pr.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${Pr.lastButton}.${$p.disabled},& .${Pr.middleButton}.${$p.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),S$e=v.forwardRef(function(t,n){const r=rt({props:t,name:"MuiToggleButtonGroup"}),{children:o,className:i,color:a="standard",disabled:s=!1,exclusive:l=!1,fullWidth:c=!1,onChange:u,orientation:d="horizontal",size:f="medium",value:p,...m}=r,g={...r,disabled:s,fullWidth:c,orientation:d,size:f},y=w$e(g),b=v.useCallback((O,k)=>{if(!u)return;const M=p&&p.indexOf(k);let I;p&&M>=0?(I=p.slice(),I.splice(M,1)):I=p?p.concat(k):[k],u(O,I)},[u,p]),x=v.useCallback((O,k)=>{u&&u(O,p===k?null:k)},[u,p]),S=v.useMemo(()=>({className:y.grouped,onChange:l?x:b,value:p,size:f,fullWidth:c,color:a,disabled:s}),[y.grouped,l,x,b,p,f,c,a,s]),P=TY(o),E=P.length,T=O=>{const k=O===0,M=O===E-1;return k&&M?"":k?y.firstButton:M?y.lastButton:y.middleButton};return $.jsx(x$e,{role:"group",className:pe(y.root,i),ref:n,ownerState:g,...m,children:$.jsx(KJ.Provider,{value:S,children:P.map((O,k)=>$.jsx(YJ.Provider,{value:T(k),children:O},k))})})}),C$e=(...e)=>{console!=null&&console.warn&&(Qp(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},aU={},nD=(...e)=>{Qp(e[0])&&aU[e[0]]||(Qp(e[0])&&(aU[e[0]]=new Date),C$e(...e))},XJ=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},rD=(e,t,n)=>{e.loadNamespaces(t,XJ(e,n))},sU=(e,t,n,r)=>{if(Qp(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return rD(e,n,r);n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,XJ(e,r))},P$e=(e,t,n={})=>!t.languages||!t.languages.length?(nD("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,o)=>{var i;if(((i=n.bindI18n)==null?void 0:i.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!o(r.isLanguageChangingTo,e))return!1}}),Qp=e=>typeof e=="string",E$e=e=>typeof e=="object"&&e!==null,T$e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,O$e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},I$e=e=>O$e[e],k$e=e=>e.replace(T$e,I$e);let oD={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:k$e};const M$e=(e={})=>{oD={...oD,...e}},A$e=()=>oD;let QJ;const $$e=e=>{QJ=e},R$e=()=>QJ,D$e={type:"3rdParty",init(e){M$e(e.options.react),$$e(e)}},_$e=v.createContext();class L$e{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const N$e=(e,t)=>{const n=v.useRef();return v.useEffect(()=>{n.current=e},[e,t]),n.current},JJ=(e,t,n,r)=>e.getFixedT(t,n,r),F$e=(e,t,n,r)=>v.useCallback(JJ(e,t,n,r),[e,t,n,r]),qe=(e,t={})=>{var P,E,T,O;const{i18n:n}=t,{i18n:r,defaultNS:o}=v.useContext(_$e)||{},i=n||r||R$e();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new L$e),!i){nD("You will need to pass in an i18next instance by using initReactI18next");const k=(I,R)=>Qp(R)?R:E$e(R)&&Qp(R.defaultValue)?R.defaultValue:Array.isArray(I)?I[I.length-1]:I,M=[k,{},!1];return M.t=k,M.i18n={},M.ready=!1,M}(P=i.options.react)!=null&&P.wait&&nD("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...A$e(),...i.options.react,...t},{useSuspense:s,keyPrefix:l}=a;let c=o||((E=i.options)==null?void 0:E.defaultNS);c=Qp(c)?[c]:c||["translation"],(O=(T=i.reportNamespaces).addUsedNamespaces)==null||O.call(T,c);const u=(i.isInitialized||i.initializedStoreOnce)&&c.every(k=>P$e(k,i,a)),d=F$e(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),f=()=>d,p=()=>JJ(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),[m,g]=v.useState(f);let y=c.join();t.lng&&(y=`${t.lng}${y}`);const b=N$e(y),x=v.useRef(!0);v.useEffect(()=>{const{bindI18n:k,bindI18nStore:M}=a;x.current=!0,!u&&!s&&(t.lng?sU(i,t.lng,c,()=>{x.current&&g(p)}):rD(i,c,()=>{x.current&&g(p)})),u&&b&&b!==y&&x.current&&g(p);const I=()=>{x.current&&g(p)};return k&&(i==null||i.on(k,I)),M&&(i==null||i.store.on(M,I)),()=>{x.current=!1,i&&(k==null||k.split(" ").forEach(R=>i.off(R,I))),M&&i&&M.split(" ").forEach(R=>i.store.off(R,I))}},[i,y]),v.useEffect(()=>{x.current&&u&&g(f)},[i,l,u]);const S=[m,i,u];if(S.t=m,S.i18n=i,S.ready=u,u||!u&&!s)return S;throw new Promise(k=>{t.lng?sU(i,t.lng,c,()=>k()):rD(i,c,()=>k())})},ga=()=>{const[e]=qe();return C(Ln,{sx:{textAlign:"center"},children:e("loading")})},bo=()=>C(Ln,{sx:{height:200,alignItems:"center",mt:2},component:Gt,direction:"column",justifyContent:"center",children:C(PJ,{})}),ZJ=lt($.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),Tv=lt($.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),hS=lt($.jsx("path",{d:"M9 4v1.38c-.83-.33-1.72-.5-2.61-.5-1.79 0-3.58.68-4.95 2.05l3.33 3.33h1.11v1.11c.86.86 1.98 1.31 3.11 1.36V15H6v3c0 1.1.9 2 2 2h10c1.66 0 3-1.34 3-3V4zm-1.11 6.41V8.26H5.61L4.57 7.22a5.07 5.07 0 0 1 1.82-.34c1.34 0 2.59.52 3.54 1.46l1.41 1.41-.2.2c-.51.51-1.19.8-1.92.8-.47 0-.93-.12-1.33-.34M19 17c0 .55-.45 1-1 1s-1-.45-1-1v-2h-6v-2.59c.57-.23 1.1-.57 1.56-1.03l.2-.2L15.59 14H17v-1.41l-6-5.97V6h8z"}),"HistoryEdu"),Ju=lt($.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Photo"),mS=lt($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Yi=({title:e,subtitle:t,isOpen:n,closeFn:r,children:o})=>C(Sv,{open:n,onClose:r,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:X(io,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:2,minWidth:"400px"},children:[C(Zl,{title:e,subheader:t,action:C(mS,{onClick:r})}),C(wi,{children:o}),C(os,{})]})}),cI=e=>{const[t]=qe(),n=e.height?e.height:"50vh";return C(Mt,{children:X(Ln,{sx:{height:n,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"},children:[C(ut,{variant:"h6",mr:3,children:t("nothingHereYet")}),C(ut,{mr:3,children:t("nothingHereYetAction")})]})})},DF=e=>{const[t]=qe(),[n,r]=Y.useState(!1),o=()=>r(!0),i=()=>r(!1),a=e.link!==void 0?C(yt,{size:"small",variant:"contained",href:e.link,children:t("add")}):C(yt,{size:"small",variant:"contained",onClick:o,children:t("add")});return X(Mt,{children:[X(io,{children:[C(Zl,{title:e.title,subheader:".",sx:{paddingBottom:0}}),C(wi,{sx:{paddingTop:0,height:"500px"},children:C(cI,{})}),C(os,{children:a})]}),C(Yi,{title:t("add"),isOpen:n,closeFn:i,children:e.modalContent})]})};function eZ(e,t){return function(){return e.apply(t,arguments)}}const{toString:j$e}=Object.prototype,{getPrototypeOf:_F}=Object,uI=(e=>t=>{const n=j$e.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ec=e=>(e=e.toLowerCase(),t=>uI(t)===e),dI=e=>t=>typeof t===e,{isArray:Ov}=Array,Uw=dI("undefined");function B$e(e){return e!==null&&!Uw(e)&&e.constructor!==null&&!Uw(e.constructor)&&Ga(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const tZ=ec("ArrayBuffer");function z$e(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tZ(e.buffer),t}const V$e=dI("string"),Ga=dI("function"),nZ=dI("number"),fI=e=>e!==null&&typeof e=="object",H$e=e=>e===!0||e===!1,EP=e=>{if(uI(e)!=="object")return!1;const t=_F(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},U$e=ec("Date"),W$e=ec("File"),G$e=ec("Blob"),q$e=ec("FileList"),K$e=e=>fI(e)&&Ga(e.pipe),Y$e=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ga(e.append)&&((t=uI(e))==="formdata"||t==="object"&&Ga(e.toString)&&e.toString()==="[object FormData]"))},X$e=ec("URLSearchParams"),[Q$e,J$e,Z$e,eRe]=["ReadableStream","Request","Response","Headers"].map(ec),tRe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gS(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Ov(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Rp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,oZ=e=>!Uw(e)&&e!==Rp;function iD(){const{caseless:e}=oZ(this)&&this||{},t={},n=(r,o)=>{const i=e&&rZ(t,o)||o;EP(t[i])&&EP(r)?t[i]=iD(t[i],r):EP(r)?t[i]=iD({},r):Ov(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(gS(t,(o,i)=>{n&&Ga(o)?e[i]=eZ(o,n):e[i]=o},{allOwnKeys:r}),e),rRe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),oRe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},iRe=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&_F(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},aRe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},sRe=e=>{if(!e)return null;if(Ov(e))return e;let t=e.length;if(!nZ(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},lRe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_F(Uint8Array)),cRe=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},uRe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},dRe=ec("HTMLFormElement"),fRe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),lU=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),pRe=ec("RegExp"),iZ=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};gS(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},hRe=e=>{iZ(e,(t,n)=>{if(Ga(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ga(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},mRe=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Ov(e)?r(e):r(String(e).split(t)),n},gRe=()=>{},yRe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,a$="abcdefghijklmnopqrstuvwxyz",cU="0123456789",aZ={DIGIT:cU,ALPHA:a$,ALPHA_DIGIT:a$+a$.toUpperCase()+cU},vRe=(e=16,t=aZ.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function bRe(e){return!!(e&&Ga(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const wRe=e=>{const t=new Array(10),n=(r,o)=>{if(fI(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Ov(r)?[]:{};return gS(r,(a,s)=>{const l=n(a,o+1);!Uw(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)},xRe=ec("AsyncFunction"),SRe=e=>e&&(fI(e)||Ga(e))&&Ga(e.then)&&Ga(e.catch),sZ=((e,t)=>e?setImmediate:t?((n,r)=>(Rp.addEventListener("message",({source:o,data:i})=>{o===Rp&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Rp.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ga(Rp.postMessage)),CRe=typeof queueMicrotask<"u"?queueMicrotask.bind(Rp):typeof process<"u"&&process.nextTick||sZ,De={isArray:Ov,isArrayBuffer:tZ,isBuffer:B$e,isFormData:Y$e,isArrayBufferView:z$e,isString:V$e,isNumber:nZ,isBoolean:H$e,isObject:fI,isPlainObject:EP,isReadableStream:Q$e,isRequest:J$e,isResponse:Z$e,isHeaders:eRe,isUndefined:Uw,isDate:U$e,isFile:W$e,isBlob:G$e,isRegExp:pRe,isFunction:Ga,isStream:K$e,isURLSearchParams:X$e,isTypedArray:lRe,isFileList:q$e,forEach:gS,merge:iD,extend:nRe,trim:tRe,stripBOM:rRe,inherits:oRe,toFlatObject:iRe,kindOf:uI,kindOfTest:ec,endsWith:aRe,toArray:sRe,forEachEntry:cRe,matchAll:uRe,isHTMLForm:dRe,hasOwnProperty:lU,hasOwnProp:lU,reduceDescriptors:iZ,freezeMethods:hRe,toObjectSet:mRe,toCamelCase:fRe,noop:gRe,toFiniteNumber:yRe,findKey:rZ,global:Rp,isContextDefined:oZ,ALPHABET:aZ,generateString:vRe,isSpecCompliantForm:bRe,toJSONObject:wRe,isAsyncFn:xRe,isThenable:SRe,setImmediate:sZ,asap:CRe};function nn(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}De.inherits(nn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:De.toJSONObject(this.config),code:this.code,status:this.status}}});const lZ=nn.prototype,cZ={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{cZ[e]={value:e}});Object.defineProperties(nn,cZ);Object.defineProperty(lZ,"isAxiosError",{value:!0});nn.from=(e,t,n,r,o,i)=>{const a=Object.create(lZ);return De.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),nn.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const PRe=null;function aD(e){return De.isPlainObject(e)||De.isArray(e)}function uZ(e){return De.endsWith(e,"[]")?e.slice(0,-2):e}function uU(e,t,n){return e?e.concat(t).map(function(o,i){return o=uZ(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function ERe(e){return De.isArray(e)&&!e.some(aD)}const TRe=De.toFlatObject(De,{},null,function(t){return/^is[A-Z]/.test(t)});function pI(e,t,n){if(!De.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=De.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,y){return!De.isUndefined(y[g])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&De.isSpecCompliantForm(t);if(!De.isFunction(o))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(De.isDate(m))return m.toISOString();if(!l&&De.isBlob(m))throw new nn("Blob is not supported. Use a Buffer instead.");return De.isArrayBuffer(m)||De.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,g,y){let b=m;if(m&&!y&&typeof m=="object"){if(De.endsWith(g,"{}"))g=r?g:g.slice(0,-2),m=JSON.stringify(m);else if(De.isArray(m)&&ERe(m)||(De.isFileList(m)||De.endsWith(g,"[]"))&&(b=De.toArray(m)))return g=uZ(g),b.forEach(function(S,P){!(De.isUndefined(S)||S===null)&&t.append(a===!0?uU([g],P,i):a===null?g:g+"[]",c(S))}),!1}return aD(m)?!0:(t.append(uU(y,g,i),c(m)),!1)}const d=[],f=Object.assign(TRe,{defaultVisitor:u,convertValue:c,isVisitable:aD});function p(m,g){if(!De.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(m),De.forEach(m,function(b,x){(!(De.isUndefined(b)||b===null)&&o.call(t,b,De.isString(x)?x.trim():x,g,f))===!0&&p(b,g?g.concat(x):[x])}),d.pop()}}if(!De.isObject(e))throw new TypeError("data must be an object");return p(e),t}function dU(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function LF(e,t){this._pairs=[],e&&pI(e,this,t)}const dZ=LF.prototype;dZ.append=function(t,n){this._pairs.push([t,n])};dZ.toString=function(t){const n=t?function(r){return t.call(this,r,dU)}:dU;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function ORe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function fZ(e,t,n){if(!t)return e;const r=n&&n.encode||ORe;De.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=De.isURLSearchParams(t)?t.toString():new LF(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class fU{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){De.forEach(this.handlers,function(r){r!==null&&t(r)})}}const pZ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},IRe=typeof URLSearchParams<"u"?URLSearchParams:LF,kRe=typeof FormData<"u"?FormData:null,MRe=typeof Blob<"u"?Blob:null,ARe={isBrowser:!0,classes:{URLSearchParams:IRe,FormData:kRe,Blob:MRe},protocols:["http","https","file","blob","url","data"]},NF=typeof window<"u"&&typeof document<"u",sD=typeof navigator=="object"&&navigator||void 0,$Re=NF&&(!sD||["ReactNative","NativeScript","NS"].indexOf(sD.product)<0),RRe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",DRe=NF&&window.location.href||"http://localhost",_Re=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:NF,hasStandardBrowserEnv:$Re,hasStandardBrowserWebWorkerEnv:RRe,navigator:sD,origin:DRe},Symbol.toStringTag,{value:"Module"})),vi={..._Re,...ARe};function LRe(e,t){return pI(e,new vi.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return vi.isNode&&De.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function NRe(e){return De.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function FRe(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return a=!a&&De.isArray(o)?o.length:a,l?(De.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!De.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&De.isArray(o[a])&&(o[a]=FRe(o[a])),!s)}if(De.isFormData(e)&&De.isFunction(e.entries)){const n={};return De.forEachEntry(e,(r,o)=>{t(NRe(r),o,n,0)}),n}return null}function jRe(e,t,n){if(De.isString(e))try{return(t||JSON.parse)(e),De.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const yS={transitional:pZ,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=De.isObject(t);if(i&&De.isHTMLForm(t)&&(t=new FormData(t)),De.isFormData(t))return o?JSON.stringify(hZ(t)):t;if(De.isArrayBuffer(t)||De.isBuffer(t)||De.isStream(t)||De.isFile(t)||De.isBlob(t)||De.isReadableStream(t))return t;if(De.isArrayBufferView(t))return t.buffer;if(De.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return LRe(t,this.formSerializer).toString();if((s=De.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return pI(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),jRe(t)):t}],transformResponse:[function(t){const n=this.transitional||yS.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(De.isResponse(t)||De.isReadableStream(t))return t;if(t&&De.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?nn.from(s,nn.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:vi.classes.FormData,Blob:vi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};De.forEach(["delete","get","head","post","put","patch"],e=>{yS.headers[e]={}});const BRe=De.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),zRe=e=>{const t={};let n,r,o;return e&&e.split(` +`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&BRe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},pU=Symbol("internals");function qb(e){return e&&String(e).trim().toLowerCase()}function TP(e){return e===!1||e==null?e:De.isArray(e)?e.map(TP):String(e)}function VRe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const HRe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function s$(e,t,n,r,o){if(De.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!De.isString(t)){if(De.isString(r))return t.indexOf(r)!==-1;if(De.isRegExp(r))return r.test(t)}}function URe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function WRe(e,t){const n=De.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class ya{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,l,c){const u=qb(l);if(!u)throw new Error("header name must be a non-empty string");const d=De.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=TP(s))}const a=(s,l)=>De.forEach(s,(c,u)=>i(c,u,l));if(De.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(De.isString(t)&&(t=t.trim())&&!HRe(t))a(zRe(t),n);else if(De.isHeaders(t))for(const[s,l]of t.entries())i(l,s,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=qb(t),t){const r=De.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return VRe(o);if(De.isFunction(n))return n.call(this,o,r);if(De.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=qb(t),t){const r=De.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||s$(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=qb(a),a){const s=De.findKey(r,a);s&&(!n||s$(r,r[s],s,n))&&(delete r[s],o=!0)}}return De.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||s$(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return De.forEach(this,(o,i)=>{const a=De.findKey(r,i);if(a){n[a]=TP(o),delete n[i];return}const s=t?URe(i):String(i).trim();s!==i&&delete n[i],n[s]=TP(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return De.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&De.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[pU]=this[pU]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=qb(a);r[s]||(WRe(o,a),r[s]=!0)}return De.isArray(t)?t.forEach(i):i(t),this}}ya.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);De.reduceDescriptors(ya.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});De.freezeMethods(ya);function l$(e,t){const n=this||yS,r=t||n,o=ya.from(r.headers);let i=r.data;return De.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function mZ(e){return!!(e&&e.__CANCEL__)}function Iv(e,t,n){nn.call(this,e??"canceled",nn.ERR_CANCELED,t,n),this.name="CanceledError"}De.inherits(Iv,nn,{__CANCEL__:!0});function gZ(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new nn("Request failed with status code "+n.status,[nn.ERR_BAD_REQUEST,nn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function GRe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function qRe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[i];a||(a=c),n[o]=l,r[o]=c;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a{n=u,o=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?a(c,u):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},r-d)))},()=>o&&a(o)]}const OE=(e,t,n=3)=>{let r=0;const o=qRe(50,250);return KRe(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=a-r,c=o(l),u=a<=s;r=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},hU=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},mU=e=>(...t)=>De.asap(()=>e(...t)),YRe=vi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,vi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(vi.origin),vi.navigator&&/(msie|trident)/i.test(vi.navigator.userAgent)):()=>!0,XRe=vi.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];De.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),De.isString(r)&&a.push("path="+r),De.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function QRe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function JRe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function yZ(e,t){return e&&!QRe(t)?JRe(e,t):t}const gU=e=>e instanceof ya?{...e}:e;function yh(e,t){t=t||{};const n={};function r(c,u,d,f){return De.isPlainObject(c)&&De.isPlainObject(u)?De.merge.call({caseless:f},c,u):De.isPlainObject(u)?De.merge({},u):De.isArray(u)?u.slice():u}function o(c,u,d,f){if(De.isUndefined(u)){if(!De.isUndefined(c))return r(void 0,c,d,f)}else return r(c,u,d,f)}function i(c,u){if(!De.isUndefined(u))return r(void 0,u)}function a(c,u){if(De.isUndefined(u)){if(!De.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,u,d)=>o(gU(c),gU(u),d,!0)};return De.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||o,f=d(e[u],t[u],u);De.isUndefined(f)&&d!==s||(n[u]=f)}),n}const vZ=e=>{const t=yh({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=ya.from(a),t.url=fZ(yZ(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(De.isFormData(n)){if(vi.hasStandardBrowserEnv||vi.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(vi.hasStandardBrowserEnv&&(r&&De.isFunction(r)&&(r=r(t)),r||r!==!1&&YRe(t.url))){const c=o&&i&&XRe.read(i);c&&a.set(o,c)}return t},ZRe=typeof XMLHttpRequest<"u",e2e=ZRe&&function(e){return new Promise(function(n,r){const o=vZ(e);let i=o.data;const a=ya.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=o,u,d,f,p,m;function g(){p&&p(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function b(){if(!y)return;const S=ya.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),E={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:S,config:e,request:y};gZ(function(O){n(O),g()},function(O){r(O),g()},E),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(r(new nn("Request aborted",nn.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new nn("Network Error",nn.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let P=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||pZ;o.timeoutErrorMessage&&(P=o.timeoutErrorMessage),r(new nn(P,E.clarifyTimeoutError?nn.ETIMEDOUT:nn.ECONNABORTED,e,y)),y=null},i===void 0&&a.setContentType(null),"setRequestHeader"in y&&De.forEach(a.toJSON(),function(P,E){y.setRequestHeader(E,P)}),De.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),s&&s!=="json"&&(y.responseType=o.responseType),c&&([f,m]=OE(c,!0),y.addEventListener("progress",f)),l&&y.upload&&([d,p]=OE(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(u=S=>{y&&(r(!S||S.type?new Iv(null,e,y):S),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const x=GRe(o.url);if(x&&vi.protocols.indexOf(x)===-1){r(new nn("Unsupported protocol "+x+":",nn.ERR_BAD_REQUEST,e));return}y.send(i||null)})},t2e=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(c){if(!o){o=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof nn?u:new Iv(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,i(new nn(`timeout ${t} of ms exceeded`,nn.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>De.asap(s),l}},n2e=function*(e,t){let n=e.byteLength;if(n{const o=r2e(e,t);let i=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){s(),l.close();return}let d=u.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),o.return()}},{highWaterMark:2})},hI=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",bZ=hI&&typeof ReadableStream=="function",i2e=hI&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),wZ=(e,...t)=>{try{return!!e(...t)}catch{return!1}},a2e=bZ&&wZ(()=>{let e=!1;const t=new Request(vi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),vU=64*1024,lD=bZ&&wZ(()=>De.isReadableStream(new Response("").body)),IE={stream:lD&&(e=>e.body)};hI&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!IE[t]&&(IE[t]=De.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new nn(`Response type '${t}' is not supported`,nn.ERR_NOT_SUPPORT,r)})})})(new Response);const s2e=async e=>{if(e==null)return 0;if(De.isBlob(e))return e.size;if(De.isSpecCompliantForm(e))return(await new Request(vi.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(De.isArrayBufferView(e)||De.isArrayBuffer(e))return e.byteLength;if(De.isURLSearchParams(e)&&(e=e+""),De.isString(e))return(await i2e(e)).byteLength},l2e=async(e,t)=>{const n=De.toFiniteNumber(e.getContentLength());return n??s2e(t)},c2e=hI&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=vZ(e);c=c?(c+"").toLowerCase():"text";let p=t2e([o,i&&i.toAbortSignal()],a),m;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(l&&a2e&&n!=="get"&&n!=="head"&&(y=await l2e(u,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),T;if(De.isFormData(r)&&(T=E.headers.get("content-type"))&&u.setContentType(T),E.body){const[O,k]=hU(y,OE(mU(l)));r=yU(E.body,vU,O,k)}}De.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;m=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:b?d:void 0});let x=await fetch(m);const S=lD&&(c==="stream"||c==="response");if(lD&&(s||S&&g)){const E={};["status","statusText","headers"].forEach(M=>{E[M]=x[M]});const T=De.toFiniteNumber(x.headers.get("content-length")),[O,k]=s&&hU(T,OE(mU(s),!0))||[];x=new Response(yU(x.body,vU,O,()=>{k&&k(),g&&g()}),E)}c=c||"text";let P=await IE[De.findKey(IE,c)||"text"](x,e);return!S&&g&&g(),await new Promise((E,T)=>{gZ(E,T,{data:P,headers:ya.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(b){throw g&&g(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new nn("Network Error",nn.ERR_NETWORK,e,m),{cause:b.cause||b}):nn.from(b,b&&b.code,e,m)}}),cD={http:PRe,xhr:e2e,fetch:c2e};De.forEach(cD,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const bU=e=>`- ${e}`,u2e=e=>De.isFunction(e)||e===null||e===!1,xZ={getAdapter:e=>{e=De.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since : +`+i.map(bU).join(` +`):" "+bU(i[0]):"as no adapter specified";throw new nn("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:cD};function c$(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Iv(null,e)}function wU(e){return c$(e),e.headers=ya.from(e.headers),e.data=l$.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xZ.getAdapter(e.adapter||yS.adapter)(e).then(function(r){return c$(e),r.data=l$.call(e,e.transformResponse,r),r.headers=ya.from(r.headers),r},function(r){return mZ(r)||(c$(e),r&&r.response&&(r.response.data=l$.call(e,e.transformResponse,r.response),r.response.headers=ya.from(r.response.headers))),Promise.reject(r)})}const SZ="1.7.9",mI={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{mI[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const xU={};mI.transitional=function(t,n,r){function o(i,a){return"[Axios v"+SZ+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new nn(o(a," has been removed"+(n?" in "+n:"")),nn.ERR_DEPRECATED);return n&&!xU[a]&&(xU[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};mI.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function d2e(e,t,n){if(typeof e!="object")throw new nn("options must be an object",nn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new nn("option "+i+" must be "+l,nn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new nn("Unknown option "+i,nn.ERR_BAD_OPTION)}}const OP={assertOptions:d2e,validators:mI},lc=OP.validators;class Jp{constructor(t){this.defaults=t,this.interceptors={request:new fU,response:new fU}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=yh(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&OP.assertOptions(r,{silentJSONParsing:lc.transitional(lc.boolean),forcedJSONParsing:lc.transitional(lc.boolean),clarifyTimeoutError:lc.transitional(lc.boolean)},!1),o!=null&&(De.isFunction(o)?n.paramsSerializer={serialize:o}:OP.assertOptions(o,{encode:lc.function,serialize:lc.function},!0)),OP.assertOptions(n,{baseUrl:lc.spelling("baseURL"),withXsrfToken:lc.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&De.merge(i.common,i[n.method]);i&&De.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=ya.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,d=0,f;if(!l){const m=[wU.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),f=m.length,u=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new Iv(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new FF(function(o){t=o}),cancel:t}}}function f2e(e){return function(n){return e.apply(null,n)}}function p2e(e){return De.isObject(e)&&e.isAxiosError===!0}const uD={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(uD).forEach(([e,t])=>{uD[t]=e});function CZ(e){const t=new Jp(e),n=eZ(Jp.prototype.request,t);return De.extend(n,Jp.prototype,t,{allOwnKeys:!0}),De.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return CZ(yh(e,o))},n}const dt=CZ(yS);dt.Axios=Jp;dt.CanceledError=Iv;dt.CancelToken=FF;dt.isCancel=mZ;dt.VERSION=SZ;dt.toFormData=pI;dt.AxiosError=nn;dt.Cancel=dt.CanceledError;dt.all=function(t){return Promise.all(t)};dt.spread=f2e;dt.isAxiosError=p2e;dt.mergeConfig=yh;dt.AxiosHeaders=ya;dt.formToJSON=e=>hZ(De.isHTMLForm(e)?new FormData(e):e);dt.getAdapter=xZ.getAdapter;dt.HttpStatusCode=uD;dt.default=dt;const zg={protein:4,carbohydrates:4,fat:9};class za{constructor(t){pn(this,"bodyWeight",0);pn(this,"energy",0);pn(this,"protein",0);pn(this,"carbohydrates",0);pn(this,"carbohydratesSugar",0);pn(this,"fat",0);pn(this,"fatSaturated",0);pn(this,"fiber",0);pn(this,"sodium",0);this.energy=(t==null?void 0:t.energy)??0,this.protein=(t==null?void 0:t.protein)??0,this.carbohydrates=(t==null?void 0:t.carbohydrates)??0,this.carbohydratesSugar=(t==null?void 0:t.carbohydratesSugar)??0,this.fat=(t==null?void 0:t.fat)??0,this.fatSaturated=(t==null?void 0:t.fatSaturated)??0,this.fiber=(t==null?void 0:t.fiber)??0,this.sodium=(t==null?void 0:t.sodium)??0,this.bodyWeight=(t==null?void 0:t.bodyWeight)??0}get energyKj(){return this.energy*4.184}get isEmpty(){return this.energy===0&&this.protein===0&&this.carbohydrates===0&&this.fat===0}get percent(){return{protein:this.protein>0?this.protein*zg.protein/this.energy*100:0,carbohydrates:this.carbohydrates>0?this.carbohydrates*zg.carbohydrates/this.energy*100:0,fat:this.fat>0?this.fat*zg.fat/this.energy*100:0}}get perBodyKg(){return{protein:this.bodyWeight>0?this.protein/this.bodyWeight:0,carbohydrates:this.bodyWeight>0?this.carbohydrates/this.bodyWeight:0,fat:this.bodyWeight>0?this.fat/this.bodyWeight:0}}static fromIngredient(t,n,r){const o=new za,i=r===null?n:n*r.amount*r.grams;return o.energy=t.energy*i/100,o.protein=t.protein*i/100,o.carbohydrates=t.carbohydrates*i/100,o.carbohydratesSugar=t.carbohydratesSugar?t.carbohydratesSugar*i/100:0,o.fat=t.fat*i/100,o.fatSaturated=t.fatSaturated?t.fatSaturated*i/100:0,o.fiber=t.fiber?t.fiber*i/100:0,o.sodium=t.sodium?t.sodium*i/100:0,o}add(t){return this.energy+=t.energy,this.protein+=t.protein,this.carbohydrates+=t.carbohydrates,this.carbohydratesSugar+=t.carbohydratesSugar,this.fat+=t.fat,this.fatSaturated+=t.fatSaturated,this.fiber+=t.fiber,this.sodium+=t.sodium,this}toString(){return`e: ${this.energy}, p: ${this.protein}, c: ${this.carbohydrates}, cS: ${this.carbohydratesSugar}, f: ${this.fat}, fS: ${this.fatSaturated}, fi: ${this.fiber}, s: ${this.sodium}`}equals(t){return this.energy===t.energy&&this.protein===t.protein&&this.carbohydrates===t.carbohydrates&&this.carbohydratesSugar===t.carbohydratesSugar&&this.fat===t.fat&&this.fatSaturated===t.fatSaturated&&this.fiber===t.fiber&&this.sodium===t.sodium}}function ni(e){return e.toISOString().split("T")[0]}const PZ=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];function cf(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function kE(e,t){return e==null?null:e.toLocaleTimeString(t?[t]:[],{hour:"2-digit",minute:"2-digit"})}function h2e(e){if(e==null)return null;const[t,n]=e.toTimeString().split(":");return`${t}:${n}`}function m2e(e){if(e==null)return null;const[t,n]=e.split(":"),r=new Date;return r.setHours(parseInt(t)),r.setMinutes(parseInt(n)),r}function g2e(e,t=new Date){const r={lastWeek:()=>t.setDate(t.getDate()-7),lastMonth:()=>t.setMonth(t.getMonth()-1),lastHalfYear:()=>t.setMonth(t.getMonth()-6),lastYear:()=>t.setFullYear(t.getFullYear()-1),"":void 0}[e];if(r)r();else return;return ni(t)}class EZ{constructor(t,n,r,o){pn(this,"items",[]);pn(this,"diaryEntries",[]);this.id=t,this.order=n,this.time=r,this.name=o}get timeHHMMLocale(){return kE(this.time)}get displayName(){return this.name?this.name:this.timeHHMMLocale}get diaryEntriesToday(){return this.diaryEntries.filter(t=>cf(t.datetime,new Date))}get plannedNutritionalValues(){const t=new za;for(const n of this.items)t.add(n.nutritionalValues);return t}get loggedNutritionalValuesToday(){const t=new za;for(const n of this.diaryEntriesToday)t.add(n.nutritionalValues);return t}}class jF{fromJson(t){return new EZ(t.id,t.order,m2e(t.time),t.name)}toJson(t){return{name:t.name,order:t.order,time:kE(t.time)}}}const IP=-1;class y2e{constructor(t,n,r,o=!1,i=null,a=null,s=null,l=null,c=null,u=null,d=null){pn(this,"meals",[]);pn(this,"diaryEntries",[]);this.id=t,this.creationDate=n,this.description=r,this.onlyLogging=o,this.goalEnergy=i,this.goalProtein=a,this.goalCarbohydrates=s,this.goalFiber=l,this.goalSodium=c,this.goalFat=u,this.goalFatsSaturated=d}get hasAnyGoals(){return this.goalEnergy!==null||this.goalProtein!==null||this.goalCarbohydrates!==null||this.goalFat!==null}get hasAnyAdvancedGoals(){return this.goalFiber!==null||this.goalSodium!==null||this.goalFatsSaturated!==null}get hasAnyPlanned(){return this.hasAnyGoals||this.plannedNutritionalValues.energy>0}get plannedNutritionalValues(){if(this.hasAnyGoals)return new za({energy:this.goalEnergy,carbohydrates:this.goalCarbohydrates,protein:this.goalProtein,fat:this.goalFat});const t=new za;for(const n of this.meals)t.add(n.plannedNutritionalValues);return t}get loggedNutritionalValues7DayAvg(){const t=new Date,n=new Date(t.getTime()-7*24*60*60*1e3),r=this.diaryEntries.filter(o=>o.datetime>=n);return this.getAverageNutritionalValuesFromDiaryEntries(r)}get loggedNutritionalValuesToday(){const t=this.diaryEntries.filter(n=>cf(n.datetime,new Date));return this.getNutritionalValuesFromDiaryEntries(t)}get groupDiaryEntries(){return this.diaryEntries.reduce((t,n)=>{const r=n.datetime.toISOString().split("T")[0],o=t.get(r)||{entries:[],nutritionalValues:new za};return o.entries.push(n),o.nutritionalValues.add(n.nutritionalValues),t.set(r,o),t},new Map)}get percentageValuesLoggedToday(){return new za({protein:this.loggedNutritionalValuesToday.protein/this.plannedNutritionalValues.protein*100,carbohydrates:this.loggedNutritionalValuesToday.carbohydrates/this.plannedNutritionalValues.carbohydrates*100,fat:this.loggedNutritionalValuesToday.fat/this.plannedNutritionalValues.fat*100})}pseudoMealOthers(t){const n=new EZ(IP,-1,null,t);return n.diaryEntries=this.diaryEntries.filter(r=>r.mealId===null),n}loggedNutritionalValuesDate(t){return this.getNutritionalValuesFromDiaryEntries(this.loggedEntriesDate(t))}loggedEntriesDate(t){return this.diaryEntries.filter(n=>cf(n.datetime,t))}getAverageNutritionalValuesFromDiaryEntries(t){const n=t.length,r=this.getNutritionalValuesFromDiaryEntries(t);return n===0||(r.energy=r.energy/n,r.protein=r.protein/n,r.carbohydrates=r.carbohydrates/n,r.carbohydratesSugar=r.carbohydratesSugar/n,r.fat=r.fat/n,r.fatSaturated=r.fatSaturated/n,r.fiber=r.fiber/n,r.sodium=r.sodium/n),r}getNutritionalValuesFromDiaryEntries(t){return t.reduce((n,r)=>n.add(r.nutritionalValues),new za)}}class gI{fromJson(t){return new y2e(t.id,new Date(t.creation_date),t.description,t.only_logging,t.goal_energy,t.goal_protein,t.goal_carbohydrates,t.goal_fiber,t.goal_fat)}toJson(t){return{description:t.description}}}class v2e{constructor(t,n,r,o,i,a,s,l){this.id=t,this.uuid=n,this.url=r,this.created=o,this.lastUpdate=i,this.size=a,this.width=s,this.height=l}}class b2e{fromJson(t){return new v2e(t.id,t.uuid,t.image,new Date(t.created),new Date(t.last_update),t.size,t.width,t.height)}}class w2e{constructor(t,n,r,o,i,a,s,l,c,u,d,f,p=null){this.id=t,this.uuid=n,this.code=r,this.name=o,this.energy=i,this.protein=a,this.carbohydrates=s,this.carbohydratesSugar=l,this.fat=c,this.fatSaturated=u,this.fiber=d,this.sodium=f,this.image=p}}class x2e{fromJson(t){return new w2e(t.id,t.uuid,t.code,t.name,t.energy,parseFloat(t.protein),parseFloat(t.carbohydrates),t.carbohydrates_sugar===null?null:parseFloat(t.carbohydrates_sugar),parseFloat(t.fat),t.fat_saturated===null?null:parseFloat(t.fat_saturated),t.fiber===null?null:parseFloat(t.fiber),t.sodium===null?null:parseFloat(t.sodium),t.image===null?null:new b2e().fromJson(t.image))}}class BF{constructor(t,n,r){this.id=t,this.nameShort=n,this.nameLong=r}}class S2e{fromJson(t){return new BF(t.id,t.short_name,t.full_name)}toJson(t){return{}}}var yI={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_API_SERVER:""};const C2e="/static/react",zF="",P2e=yI.TIME_ZONE,E2e=yI.MIN_ACCOUNT_AGE_TO_TRUST,T2e="",O2e=yI.VITE_API_KEY;console.log(yI);const vh=2,TZ="en",I2e=new BF(vh,TZ,"English"),k2e=E2e||21,OZ=1,M2e=2,A2e=1,$2e=2,R2e="variations",D2e="detail",_2e="permission",L2e="profile",N2e="routine",F2e="routines-shallow",j2e="routines-active",B2e="routines-logs",kv="measurements",Mv="measurements-categories";var En=(e=>(e.NUTRITIONAL_PLANS="nutritional-plans",e.NUTRITIONAL_PLAN="nutritional-plan",e.NUTRITIONAL_PLAN_LAST="nutritional-plan-last",e.INGREDIENT="ingredient",e.BODY_WEIGHT="body-weight",e.EXERCISES="exercises",e.EXERCISE_VARIATIONS="variations",e.EXERCISE_DETAIL="detail",e.LANGUAGES="languages",e.CATEGORIES="categories",e.EQUIPMENT="equipment",e.MUSCLES="muscles",e.QUERY_NOTES="notes",e))(En||{}),Ui=(e=>(e.MEAL="meal",e.MEAL_ITEM="mealitem",e.NUTRITIONAL_DIARY="nutritiondiary",e.INGREDIENT_PATH="ingredientinfo",e.INGREDIENT_SEARCH_PATH="ingredient/search",e.INGREDIENT_WEIGHT_UNIT="ingredientweightunit",e))(Ui||{});const IZ="999",z2e=["#2a4c7d","#5b5291","#8e5298","#bf5092","#e7537e","#ff6461","#ff813d","#ffa600"],V2e=["#2a4c7d","#825298","#d45089","#ff6a59","#ffa600"],H2e=["#2a4c7d","#d45089","#ffa600"],SU={pageSizeOptions:[5,10,25,50,100],pageSize:10},U2e=P2e||"Europe/Berlin",Ty="en",kZ=3e3;var MZ={exports:{}};(function(e){(function(t){let n;function r(u,d){const f=u.charCodeAt(d);if(isNaN(f))throw new RangeError("Index "+d+' out of range for string "'+u+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(f<55296||f>57343)return[u.charAt(d),d];if(f>=55296&&f<=56319){if(u.length<=d+1)return[" ",d];const m=u.charCodeAt(d+1);return m<56320||m>57343?[" ",d]:[u.charAt(d)+u.charAt(d+1),d+1]}if(d===0)return[" ",d];const p=u.charCodeAt(d-1);if(p<55296||p>56319)return[" ",d];throw new Error('String "'+u+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?n=function(u){return btoa(unescape(encodeURIComponent(u)))}:n=function(u){const d=unescape(encodeURIComponent(u+""));let f="";for(let p,m,g=0,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";d.charAt(g|0)||(y="=",g%1);f+=y.charAt(63&p>>8-g%1*8)){if(m=d.charCodeAt(g+=3/4),m>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");p=p<<8|m}return f}:n=function(u){return Buffer.from(u).toString("base64")};function o(u,d){let f=s(u,d);if((d&&d.fallback!==void 0?d.fallback:o.defaults.fallback)===!0&&f===""){let m="";for(let g=0;g1?f[d[m]]=u[d[m]]:p[d[m]]=u[d[m]];Object.assign(o.charmap,p),Object.assign(o.multicharmap,f)},o.setLocale=function(u){a=i[u]||{}},e.exports?e.exports=o:t.slug=o})(yc)})(MZ);var W2e=MZ.exports;const AZ=Bn(W2e);function Pt(e,t){t=t||{};const r=[t.server||T2e,"api","v2",e];if(t.objectMethod&&r.push(t.objectMethod),t.id&&r.push(t.id.toString()),r.push(""),t.query){const o=[];for(const i in t.query)t.query.hasOwnProperty(i)&&o.push(`${encodeURIComponent(i)}=${encodeURIComponent(t.query[i])}`);r.pop(),r.push(`?${o.join("&")}`)}return r.join("/")}var wn=(e=>(e[e.DASHBOARD=0]="DASHBOARD",e[e.ROUTINE_OVERVIEW=1]="ROUTINE_OVERVIEW",e[e.ROUTINE_DETAIL=2]="ROUTINE_DETAIL",e[e.ROUTINE_ADD=3]="ROUTINE_ADD",e[e.ROUTINE_DELETE=4]="ROUTINE_DELETE",e[e.ROUTINE_ADD_LOG=5]="ROUTINE_ADD_LOG",e[e.ROUTINE_EDIT_LOG=6]="ROUTINE_EDIT_LOG",e[e.ROUTINE_DELETE_LOG=7]="ROUTINE_DELETE_LOG",e[e.ROUTINE_EDIT_DAY=8]="ROUTINE_EDIT_DAY",e[e.ROUTINE_ADD_DAY=9]="ROUTINE_ADD_DAY",e[e.ROUTINE_DELETE_DAY=10]="ROUTINE_DELETE_DAY",e[e.ROUTINE_ADD_SET=11]="ROUTINE_ADD_SET",e[e.ROUTINE_EDIT_SET=12]="ROUTINE_EDIT_SET",e[e.ROUTINE_DELETE_SET=13]="ROUTINE_DELETE_SET",e[e.EXERCISE_DETAIL=14]="EXERCISE_DETAIL",e[e.EXERCISE_OVERVIEW=15]="EXERCISE_OVERVIEW",e[e.EXERCISE_CONTRIBUTE=16]="EXERCISE_CONTRIBUTE",e[e.WEIGHT_OVERVIEW=17]="WEIGHT_OVERVIEW",e[e.WEIGHT_ADD=18]="WEIGHT_ADD",e[e.MEASUREMENT_OVERVIEW=19]="MEASUREMENT_OVERVIEW",e[e.MEASUREMENT_DETAIL=20]="MEASUREMENT_DETAIL",e[e.NUTRITION_OVERVIEW=21]="NUTRITION_OVERVIEW",e[e.NUTRITION_DETAIL=22]="NUTRITION_DETAIL",e[e.NUTRITION_PLAN_PDF=23]="NUTRITION_PLAN_PDF",e[e.NUTRITION_PLAN_COPY=24]="NUTRITION_PLAN_COPY",e[e.NUTRITION_DIARY=25]="NUTRITION_DIARY",e[e.INGREDIENT_DETAIL=26]="INGREDIENT_DETAIL",e[e.CALENDAR=27]="CALENDAR",e))(wn||{});function Pn(e,t,n){t=t||"en-us";const r=t.split("-")[0];switch(e){case 1:return`/${r}/routine/overview`;case 2:return`/${r}/routine/${n.id}/view`;case 3:return`/${r}/routine/add`;case 9:return`/${r}/routine/day/${n.id}/add`;case 5:return`/${r}/routine/day/${n.id}/log/add`;case 6:return`/${r}/routine/log/${n.id}/edit`;case 7:return`/${r}/routine/log/${n.id}/delete`;case 8:return`/${r}/routine/day/${n.id}/edit`;case 10:return`/${r}/routine/day/${n.id}/delete`;case 11:return`/${r}/routine/set/${n.id}/add`;case 12:return`/${r}/routine/set/${n.id}/edit`;case 13:return`/${r}/routine/set/${n.id}/delete`;case 27:return`/${r}/routine/calendar`;case 16:return`/${r}/exercise/contribute`;case 14:return n.slug?`/${r}/exercise/${n.id}/view-base/${AZ(n.slug)}`:`/${r}/exercise/${n.id}/view-base`;case 15:return`/${r}/exercise/overview`;case 17:return`/${r}/weight/overview`;case 18:return`/${r}/weight/add`;case 19:return`/${r}/measurement/overview`;case 20:return`/${r}/measurement/category/${n.id}`;case 21:return`/${r}/nutrition/overview`;case 22:return`/${r}/nutrition/${n.id}/view`;case 25:return`/${r}/nutrition/${n.id}/${n.date}`;case 23:return`/${r}/nutrition/${n.id}/pdf`;case 24:return`/${r}/nutrition/${n.id}/copy`;case 26:return`/${r}/nutrition/ingredient/${n.id}/view`;case 0:default:return"/"}}function G2e(e){let t=null;if(document.cookie&&document.cookie!==""){const n=document.cookie.split(";");for(let r=0;r{if(e.length===0)return[];const t=Pt(Ui.INGREDIENT_PATH,{query:{id__in:e.join(",")}}),n=new x2e,r=[];for await(const o of vS(t,kt()))for(const i of o)r.push(n.fromJson(i));return r},q2e=async(e,t,n=!0)=>{const r=[t];t!==Ty&&n&&r.push(Ty);const o=Pt(Ui.INGREDIENT_SEARCH_PATH,{query:{term:e,language:r.join(",")}}),{data:i}=await dt.get(o);return i.suggestions};class K2e{constructor(t,n,r,o,i,a,s){pn(this,"ingredient",null);pn(this,"weightUnit",null);this.id=t,this.ingredientId=n,this.weightUnitId=r,this.amount=o,this.order=i,a&&(this.ingredient=a),s&&(this.weightUnit=s)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?za.fromIngredient(this.ingredient,this.amount,this.weightUnit):new za}}class VF{fromJson(t){return new K2e(t.id,t.ingredient,t.weight_unit,parseFloat(t.amount),t.order)}toJson(t){return{ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),order:t.order}}}class Y2e{constructor(t,n,r,o=""){this.id=t,this.amount=n,this.grams=r,this.name=o}}class X2e{fromJson(t){return new Y2e(t.id,parseFloat(t.amount),t.gram)}}const RZ=async e=>{if(e===null)return null;const{data:t}=await dt.get(Pt(Ui.INGREDIENT_WEIGHT_UNIT,{id:e}),{headers:kt()});return new X2e().fromJson(t)},Q2e=async e=>{const t=await dt.post(Pt(Ui.MEAL),e,{headers:kt()});return new jF().fromJson(t.data)},J2e=async e=>{const t=await dt.patch(Pt(Ui.MEAL,{id:e.id}),e,{headers:kt()});return new jF().fromJson(t.data)},Z2e=async e=>{await dt.delete(Pt(Ui.MEAL,{id:e}),{headers:kt()})},eDe=async e=>{let t=[];const n=new jF,r=new VF,{data:o}=await dt.get(Pt(Ui.MEAL,{query:{plan:e}}),{headers:kt()}),i=o.results.map(a=>n.fromJson(a));for(const a of i){t=[];const{data:s}=await dt.get(Pt(Ui.MEAL_ITEM,{query:{meal:a.id}}),{headers:kt()}),l=s.results.map(u=>r.fromJson(u));for(const u of l)t.push(u.ingredientId);const c=await $Z(t);for(const u of l)u.weightUnit=await RZ(u.weightUnitId),u.ingredient=c.find(d=>d.id===u.ingredientId);a.items=l}return i};class tDe{constructor(t,n,r,o,i,a,s,l,c){pn(this,"ingredient",null);pn(this,"weightUnit",null);this.id=t,this.planId=n,this.mealId=r,this.ingredientId=o,this.weightUnitId=i,this.amount=a,this.datetime=s,l&&(this.ingredient=l),c&&(this.weightUnit=c)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?za.fromIngredient(this.ingredient,this.amount,this.weightUnit):(console.log("Diary entry has no ingredient, returning empty NutritionalValues object"),new za)}}class HF{fromJson(t){return new tDe(t.id,t.plan,t.meal,t.ingredient,t.weight_unit,parseFloat(t.amount),new Date(t.datetime))}toJson(t){return{plan:t.planId,meal:t.mealId,ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),datetime:t.datetime.toISOString()}}}const nDe=async(e,t)=>{const n=new HF,r={plan:e,limit:IZ};t&&(r.datetime__date=ni(t));const o=Pt(Ui.NUTRITIONAL_DIARY,{query:r}),i=[];for await(const a of vS(o,kt()))for(const s of a){let l=n.fromJson(s);l.weightUnit=await RZ(l.weightUnitId),i.push(l)}return i},DZ=async e=>{const t=await dt.post(Pt(Ui.NUTRITIONAL_DIARY),e,{headers:kt()});return new HF().fromJson(t.data)},rDe=async e=>{const t=await dt.patch(Pt(Ui.NUTRITIONAL_DIARY,{id:e.id}),e,{headers:kt()});return new HF().fromJson(t.data)},Av="nutritionplan",oDe=async()=>{const{data:e}=await dt.get(Pt(Av),{headers:kt()}),t=new gI;return e.results.map(n=>t.fromJson(n))},iDe=async()=>{const{data:e}=await dt.get(Pt(Av,{query:{limit:"1"}}),{headers:kt()});return e.count===0?null:await UF(e.results[0].id)},UF=async(e,t)=>{if(e===null)return null;const{data:n}=await dt.get(Pt(Av,{id:e}),{headers:kt()}),r=[],i=new gI().fromJson(n),a=await Promise.all([eDe(e),nDe(e,t)]);i.meals=a[0],i.diaryEntries=a[1],i.diaryEntries.forEach(l=>{r.includes(l.ingredientId)||r.push(l.ingredientId)});const s=await $Z(r);return i.diaryEntries.forEach(l=>{l.ingredient=s.find(c=>c.id===l.ingredientId)}),i.meals.forEach(l=>{l.diaryEntries=i.diaryEntries.filter(c=>c.mealId===l.id)}),i},aDe=async e=>{const t=await dt.post(Pt(Av),e,{headers:kt()});return new gI().fromJson(t.data)},sDe=async e=>{const t=await dt.patch(Pt(Av,{id:e.id}),e,{headers:kt()});return new gI().fromJson(t.data)},lDe=async e=>{await dt.delete(Pt(Av,{id:e}),{headers:kt()})};function cDe(){return oo({queryKey:[En.NUTRITIONAL_PLANS],queryFn:()=>oDe()})}function uDe(){return oo({queryKey:[En.NUTRITIONAL_PLAN,"last"],queryFn:()=>iDe()})}function dDe(e){return oo({queryKey:[En.NUTRITIONAL_PLAN,e],queryFn:()=>UF(e)})}function fDe(e,t,n=!0){return oo({queryKey:[En.NUTRITIONAL_PLAN,e,t],queryFn:()=>UF(e,new Date(t)),enabled:n})}const pDe=()=>{const e=gr();return $r({mutationFn:t=>aDe(t),onSuccess:()=>{e.invalidateQueries({queryKey:[En.NUTRITIONAL_PLANS]}),e.invalidateQueries({queryKey:[En.NUTRITIONAL_PLAN]})}})},hDe=e=>{const t=gr();return $r({mutationFn:n=>lDe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[En.NUTRITIONAL_PLANS]}),t.invalidateQueries({queryKey:[En.NUTRITIONAL_PLAN,e]})}})},mDe=e=>{const t=gr();return $r({mutationFn:n=>sDe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[En.NUTRITIONAL_PLAN,e]}),t.invalidateQueries({queryKey:[En.NUTRITIONAL_PLANS]})}})},gDe=e=>{const t=gr();return $r({mutationFn:n=>DZ(n),onSuccess:()=>t.invalidateQueries({queryKey:[En.NUTRITIONAL_PLAN,e]})})},_Z=e=>{const t=gr();return $r({mutationFn:n=>Promise.all(n.map(r=>DZ(r))),onSuccess:()=>t.invalidateQueries({queryKey:[En.NUTRITIONAL_PLAN,e]})})},yDe=e=>{const t=gr();return $r({mutationFn:n=>rDe(n),onSuccess:()=>t.invalidateQueries({queryKey:[En.NUTRITIONAL_PLAN,e]})})},vDe=e=>{const t=gr();return $r({mutationFn:n=>Q2e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[En.NUTRITIONAL_PLAN,e]})}})},bDe=e=>{const t=gr();return $r({mutationFn:n=>Z2e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[En.NUTRITIONAL_PLAN,e]})}})},wDe=e=>{const t=gr();return $r({mutationFn:n=>J2e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[En.NUTRITIONAL_PLAN,e]})}})},xDe=async e=>{const t=await dt.post(Pt(Ui.MEAL_ITEM),e,{headers:kt()});return new VF().fromJson(t.data)},SDe=async e=>{const t=await dt.patch(Pt(Ui.MEAL_ITEM,{id:e.id}),e,{headers:kt()});return new VF().fromJson(t.data)},CDe=async e=>{await dt.delete(Pt(Ui.MEAL_ITEM,{id:e}),{headers:kt()})},PDe=e=>{const t=gr();return $r({mutationFn:n=>xDe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[En.NUTRITIONAL_PLAN,e]})}})},EDe=e=>{const t=gr();return $r({mutationFn:n=>SDe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[En.NUTRITIONAL_PLAN,e]})}})},TDe=e=>{const t=gr();return $r({mutationFn:n=>CDe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[En.NUTRITIONAL_PLAN,e]})}})};class LZ{constructor(t,n,r){this.date=t,this.weight=n,this.id=r}}class WF{fromJson(t){return new LZ(new Date(t.date),parseFloat(t.weight),t.id)}toJson(t){return{id:t.id,date:ni(t.date),weight:t.weight}}}const vI="weightentry",ODe=async(e="")=>{const t=g2e(e),n=Pt(vI,{query:{ordering:"-date",limit:900,...t&&{date__gte:t}}}),{data:r}=await dt.get(n,{headers:kt()}),o=new WF;return r.results.map(i=>o.fromJson(i))},IDe=async e=>(await dt.delete(Pt(vI,{id:e}),{headers:kt()})).status,kDe=async e=>{const t=new WF,n=await dt.patch(Pt(vI,{id:e.id}),t.toJson(e),{headers:kt()});return t.fromJson(n)},MDe=async e=>{const t=new WF,n=await dt.post(Pt(vI),t.toJson(e),{headers:kt()});return t.fromJson(n.data)},ADe=22;function $De(e,t=ADe){return e.length>t?e.slice(0,t)+"…":e}function RDe(e){return e.toLowerCase().replace(/\s/g,"_").replace("(","_").replace(")","_").replace("-","_")}function Wi(e){return`server.${RDe(e)}`}class DDe{constructor(t,n,r,o){this.id=t,this.name=n,this.nameEn=r,this.isFront=o}getName(t){return this.nameEn?`${this.name} (${t(Wi(this.nameEn))})`:this.name}}class NZ{fromJson(t){return new DDe(t.id,t.name,t.name_en,t.is_front)}toJson(t){return{}}}const _De="muscle",LDe=async()=>{const e=Pt(_De),{data:t}=await dt.get(e,{headers:kt()}),n=new NZ;return t.results.map(r=>n.fromJson(r))};class NDe{constructor(t,n){this.id=t,this.name=n}}class FZ{fromJson(t){return new NDe(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const FDe="equipment",jDe=async()=>{const e=Pt(FDe),{data:t}=await dt.get(e,{headers:kt()}),n=new FZ;return t.results.map(r=>n.fromJson(r))};class BDe{constructor(t,n){this.id=t,this.name=n}}class jZ{fromJson(t){return new BDe(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const zDe="exercisecategory",VDe=async()=>{const e=Pt(zDe),{data:t}=await dt.get(e,{headers:kt()}),n=new jZ;return t.results.map(r=>n.fromJson(r))};var pu=(e=>(e[e.LINE_ART=1]="LINE_ART",e[e.THREE_D=2]="THREE_D",e[e.LOW_POLY=3]="LOW_POLY",e[e.PHOTO=4]="PHOTO",e[e.OTHER=5]="OTHER",e))(pu||{});class HDe{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class dD{fromJson(t){return new HDe(t.id,t.uuid,t.image,t.is_main)}toJson(t){return{id:t.id,image:t.url,is_front:t.isMain}}}class UDe{constructor(t,n,r){this.id=t,this.uuid=n,this.alias=r}}class BZ{fromJson(t){return new UDe(t.id,t.uuid,t.alias)}toJson(t){return{id:t.id,name:t.alias}}}class fD{constructor(t,n,r){this.id=t,this.exercise=n,this.note=r}}class zZ{fromJson(t){return new fD(t.id,t.exercise,t.comment)}toJson(t){return{id:t.id,comment:t.note,exercise:t.exercise}}}class VZ{constructor(t,n,r,o,i,a,s,l){pn(this,"notes",[]);pn(this,"aliases",[]);pn(this,"authors",[]);this.id=t,this.uuid=n,this.name=r,this.description=o,this.language=i,a&&(this.notes=a),s&&(this.aliases=s),l&&(this.authors=l)}get nameLong(){return $De(this.name)}get nameSlug(){return AZ(this.name)}}class GF{fromJson(t){var n,r;return new VZ(t.id,t.uuid,t.name,t.description,t.language,(n=t.notes)==null?void 0:n.map(o=>new zZ().fromJson(o)),(r=t.aliases)==null?void 0:r.map(o=>new BZ().fromJson(o)),t.author_history)}toJson(t){return{id:t.id,uuid:t.uuid,name:t.name,description:t.description,language:t.language}}}class WDe{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class HZ{fromJson(t){return new WDe(t.id,t.uuid,t.video,t.is_main)}toJson(t){return{id:t.id,video:t.url}}}class GDe{constructor(t,n,r,o,i,a,s,l,c,u,d){pn(this,"translations",[]);pn(this,"videos",[]);pn(this,"authors",[]);this.id=t,this.uuid=n,this.category=r,this.equipment=o,this.muscles=i,this.musclesSecondary=a,this.images=s,this.variationId=l,c&&(this.translations=c),u&&(this.videos=u),d&&(this.authors=d)}getTranslation(t){const n=t!=null?t.id:vh;let r=this.translations.find(o=>o.language===n);return r||(r=this.translations.find(o=>o.language===vh)),r||this.translations[0]}get availableLanguages(){return this.translations.map(t=>t.language)}get mainImage(){return this.images.find(t=>t.isMain)}get sideImages(){return this.images.filter(t=>!t.isMain)}}class UZ{fromJson(t){const n=new jZ,r=new FZ,o=new NZ,i=new dD,a=new GF,s=new HZ,l=new GDe(t.id,t.uuid,n.fromJson(t.category),t.equipment.map(c=>r.fromJson(c)),t.muscles.map(c=>o.fromJson(c)),t.muscles_secondary.map(c=>o.fromJson(c)),t.images.map(c=>i.fromJson(c)),t.variations,t.exercises.map(c=>a.fromJson(c)),t.videos.map(c=>s.fromJson(c)),t.author_history);if(l.translations.some(c=>c.language===vh)||console.info(`No english translation found for exercise base ${l.uuid}!`),l.translations.length===0)throw new Error(`No translations found for exercise base ${l.uuid}!`);return l}toJson(t){return{id:t.id,uuid:t.uuid,category:t.category.id,equipment:t.equipment.map(n=>n.id),muscles:t.muscles.map(n=>n.id),muscles_secondary:t.musclesSecondary.map(n=>n.id),images:t.images.map(n=>new dD().toJson(n))}}}const qF="exercisebaseinfo",KF="exercise-base";function WZ(e){const t=new UZ,n=[];for(const r of e.results)try{n.push(t.fromJson(r))}catch(o){console.error("An error happened, skipping base:",o)}return n}const qDe=async()=>{const e=Pt(qF,{query:{limit:900}}),t=await dt.get(e,{headers:kt()});return WZ(t.data)},bS=async e=>{const t=new UZ,n=Pt(qF,{id:e}),r=await dt.get(n,{headers:kt()});return t.fromJson(r.data)},KDe=async e=>{if(!e)return[];const t=Pt(qF,{query:{variations:e}}),n=await dt.get(t,{headers:kt()});return WZ(n.data)},YDe=async(e,t,n,r,o,i)=>{const a=Pt(KF),s={category:e,equipment:t,muscles:n,muscles_secondary:r,variation_id:o,license_author:i};return(await dt.post(a,s,{headers:kt()})).data.id},YF=async(e,t)=>{const n=Pt(KF,{id:e});return(await dt.patch(n,t,{headers:kt()})).status},CU=async(e,t)=>{const r=Pt(KF,t===void 0?{id:e}:{id:e,query:{replaced_by:t}});return(await dt.delete(r,{headers:kt()})).status},XF="exercise-translation",XDe="exercise/search",QDe=async(e,t=TZ,n=!0)=>{const r=[t];t!==Ty&&n&&r.push(Ty);const o=Pt(XDe,{query:{term:e,language:r.join(",")}}),{data:i}=await dt.get(o);return i.suggestions},pD=async e=>{const{exerciseId:t,languageId:n,name:r,description:o,author:i}=e,a=Pt(XF),s={exercise_base:t,language:n,name:r,description:o,license_author:i},l=await dt.post(a,s,{headers:kt()});return new GF().fromJson(l.data)},JDe=async e=>{const{id:t,exerciseId:n,languageId:r,name:o,description:i}=e,a=Pt(XF,{id:t}),s={exercise_base:n,language:r,name:o,description:i},l=await dt.patch(a,s,{headers:kt()});return new GF().fromJson(l.data)},ZDe=async e=>{const t=Pt(XF,{id:e});return(await dt.delete(t,{headers:kt()})).status},e_e="language",t_e=async()=>{const e=Pt(e_e),{data:t}=await dt.get(e,{headers:kt()}),n=new S2e;return t.results.map(r=>n.fromJson(r))},hD=(e,t)=>{const n=e.split("-")[0],r=t.find(o=>o.nameShort===n);if(r)return r},GZ="exerciseimage",qZ=async e=>{const t=Pt(GZ),n=kt();n["Content-Type"]="multipart/form-data";const r=await dt.post(t,{exercise_base:e.exerciseId,image:e.image,license_title:e.imageData.title,license_object_url:e.imageData.objectUrl,license_author:e.imageData.author,license_author_url:e.imageData.authorUrl,license_derivative_source_url:e.imageData.derivativeSourceUrl,style:e.imageData.style},{headers:n});return new dD().fromJson(r.data)},n_e=async e=>{const t=Pt(GZ,{id:e}),n=kt();return(await dt.delete(t,{headers:n})).status},KZ="exercisealias",mD=async(e,t)=>{const n=Pt(KZ),r=await dt.post(n,{exercise:e,alias:t},{headers:kt()});return new BZ().fromJson(r.data)},r_e=async e=>(await dt.delete(Pt(KZ,{id:e}),{headers:kt()})).status,YZ="video",o_e=async(e,t,n)=>{const r=Pt(YZ),o=kt();o["Content-Type"]="multipart/form-data";const i=await dt.post(r,{exercise_base:e,license_author:t,video:n},{headers:o});return new HZ().fromJson(i.data)},i_e=async e=>{const t=Pt(YZ,{id:e}),n=kt();return(await dt.delete(t,{headers:n})).status};class a_e{constructor(t,n,r,o){pn(this,"sets",[]);this.id=t,this.description=n,this.daysOfWeek=r,o&&(this.sets=o)}}class s_e{fromJson(t){return new a_e(t.id,t.description,t.day)}toJson(t){return{id:t.id,description:t.description,day:t.daysOfWeek}}}class l_e{constructor(t,n,r,o,i,a,s,l,c,u,d){this.id=t,this.date=n,this.exerciseId=r,this.repetitionUnit=o,this.reps=i,this.weight=a,this.weightUnit=s,this.rir=l,this.repetitionUnitObj=c,this.weightUnitObj=u,this.baseObj=d,c&&(this.repetitionUnitObj=c),u&&(this.weightUnitObj=u),d&&(this.baseObj=d)}get rirString(){return this.rir===null||this.rir===""?"-/-":this.rir}}class c_e{fromJson(t){return new l_e(t.id,new Date(t.date),t.exercise_base,t.repetition_unit,t.reps,t.weight===null?null:Number.parseFloat(t.weight),t.weight_unit,t.rir)}toJson(t){return{id:t.id,exercise_base:t.exerciseId,repetition_unit:t.repetitionUnit,reps:t.reps,weight:t.weight,weight_unit:t.weightUnit,rir:t.rir}}}class u_e{constructor(t,n,r,o,i){pn(this,"days",[]);this.id=t,this.name=n,this.description=r,this.date=o,i&&(this.days=i)}}class XZ{fromJson(t){return new u_e(t.id,t.name,t.description,new Date(t.creation_date))}toJson(t){return{id:t.id,name:t.name,description:t.description,creation_date:ni(t.date)}}}function d_e(e,t,n){n=n||(s=>s);const r=s=>s.rir?`${s.rir} ${n("routines.rir")}`:"",o=s=>{if(s.repetitionUnit===M2e)return"∞";const l=s.repetitionUnit!==OZ?n(Wi(s.repetitionUnitObj.name)):"";return`${s.reps} ${l}`},i=s=>s===null?"":Number.isInteger(s)?s.toString():s.toFixed(2).toString(),a=(s,l=!1)=>{const c=o(s),u=s.weightUnitObj.name,d=i(s.weight),f=r(s);let p=l?c:`${e} × ${c}`.trim();if(d){const m=f?`, ${f}`:"";p+=` (${d} ${u}${m})`}else p+=f?` (${f})`:"";return p};return t.length===1?a(t[0]):t.map(s=>a(s,!0)).join(" – ")}class f_e{constructor(t,n,r,o,i,a){pn(this,"settings",[]);pn(this,"settingsComputed",[]);this.id=t,this.sets=n,this.order=r,this.comment=o,i&&(this.settings=i),a&&(this.settingsComputed=a)}get exercises(){return this.settingsFiltered.map(t=>t.base)}get settingsFiltered(){const t=[];for(const n of this.settings)t.filter(o=>o.exerciseId===n.exerciseId).length===0&&t.push(n);return t}filterSettingsByExercise(t){return this.settings.filter(n=>n.exerciseId===t.id)}getSettingsTextRepresentation(t,n){return n=n||(r=>r),d_e(this.sets,this.filterSettingsByExercise(t),n)}}class p_e{fromJson(t){return new f_e(t.id,t.sets,t.order,t.comment)}toJson(t){return{id:t.id,sets:t.sets,order:t.order,comment:t.order}}}class h_e{constructor(t,n,r,o,i,a,s,l,c,u,d,f){pn(this,"base");this.id=t,this.date=n,this.exerciseId=r,this.repetitionUnit=o,this.reps=i,this.weight=a,this.weightUnit=s,this.rir=l,this.order=c,this.comment=u,this.repetitionUnitObj=d,this.weightUnitObj=f,d&&(this.repetitionUnitObj=d),f&&(this.weightUnitObj=f)}}class m_e{fromJson(t){return new h_e(t.id,new Date(t.date),t.exercise_base,t.repetition_unit,t.reps,t.weight===null?null:Number.parseFloat(t.weight),t.weight_unit,t.rir,t.order,t.comment)}toJson(t){return{id:t.id,exercise_base:t.exerciseId,repetition_unit:t.repetitionUnit,reps:t.reps,weight:t.weight,weight_unit:t.weightUnit,rir:t.rir,order:t.order,comment:t.comment}}}class g_e{constructor(t,n){pn(this,"id");pn(this,"name");this.id=t,this.name=n}}class y_e{fromJson(t){return new g_e(t.id,t.name)}toJson(t){return{}}}class v_e{constructor(t,n){pn(this,"id");pn(this,"name");this.id=t,this.name=n}}class b_e{fromJson(t){return new v_e(t.id,t.name)}toJson(t){return{}}}const w_e="setting-repetitionunit",x_e="setting-weightunit",QZ=async()=>{const e=Pt(w_e),{data:t}=await dt.get(e,{headers:kt()}),n=new y_e;return t.results.map(r=>n.fromJson(r))},JZ=async()=>{const e=Pt(x_e),{data:t}=await dt.get(e,{headers:kt()}),n=new b_e;return t.results.map(r=>n.fromJson(r))},QF="workout",S_e="workoutlog",C_e="day",P_e="set",E_e="setting",T_e=e=>new XZ().fromJson(e),ZZ=async e=>{const t=new XZ,n=new s_e,r=new p_e,o=new m_e,i=await dt.get(Pt(QF,{id:e}),{headers:kt()}),a=t.fromJson(i.data),s=await dt.get(Pt(C_e,{query:{training:a.id.toString()}}),{headers:kt()}),l=await Promise.all([QZ(),JZ()]),c=l[0],u=l[1];for(const d of s.data.results){const f=n.fromJson(d),p=await dt.get(Pt(P_e,{query:{exerciseday:f.id.toString()}}),{headers:kt()});for(const y of p.data.results){const b=r.fromJson(y);f.sets.push(b)}const m=p.data.results.map(y=>dt.get(Pt(E_e,{query:{set:y.id}}),{headers:kt()})),g=await Promise.all(m);for(const y of g)for(const b of y.data.results){const x=f.sets.find(O=>O.id===b.set),S=o.fromJson(b),P=u.find(O=>O.id===S.weightUnit),E=c.find(O=>O.id===S.repetitionUnit),T=x.settings.find(O=>O.exerciseId===S.exerciseId);S.base=T!==void 0?T.base:await bS(S.exerciseId),S.weightUnitObj=P,S.repetitionUnitObj=E,x.settings.push(S)}a.days.push(f)}return a},O_e=async()=>{const e=Pt(QF,{query:{limit:"1"}}),t=await dt.get(e,{headers:kt()});return t.data.count===0?null:await ZZ(t.data.results[0].id)},I_e=async e=>await ZZ(e),k_e=async()=>{const e=Pt(QF),t=await dt.get(e,{headers:kt()}),n=[];for(const r of t.data.results)n.push(await T_e(r));return n},M_e=async(e,t=!1)=>{const n=new c_e,r=Pt(S_e,{query:{workout:e.toString(),limit:IZ,ordering:"-date"}}),o=await Promise.all([QZ(),JZ()]),i=o[0],a=o[1],s=new Map,l=[];for await(const c of vS(r))for(const u of c){const d=n.fromJson(u);d.repetitionUnitObj=i.find(f=>f.id===d.repetitionUnit),d.weightUnitObj=a.find(f=>f.id===d.weightUnit),t&&(s.get(d.exerciseId)===void 0&&s.set(d.exerciseId,await bS(d.exerciseId)),d.baseObj=s.get(d.exerciseId)),l.push(d)}return l};class A_e{constructor(t,n,r,o){pn(this,"entries",[]);this.id=t,this.name=n,this.unit=r,o&&(this.entries=o)}}class bI{fromJson(t){return new A_e(t.id,t.name,t.unit)}toJson(t){return{id:t.id,name:t.name,unit:t.unit}}}class $_e{constructor(t,n,r,o,i){this.id=t,this.category=n,this.date=r,this.value=o,this.notes=i}}class wI{fromJson(t){return new $_e(t.id,t.category,new Date(t.date),t.value,t.notes)}toJson(t){return{id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes}}}const wS="measurement-category",xS="measurement",R_e=async()=>{const e=new bI,t=new wI,{data:n}=await dt.get(Pt(wS),{headers:kt()}),r=n.results.map(s=>e.fromJson(s)),o=r.map(async s=>{const l=[],c=Pt(xS,{query:{category:s.id}});for await(const u of vS(c,kt()))for(const d of u)l.push(t.fromJson(d));return l}),i=await Promise.all(o);let a;return i.forEach(s=>{s.length>0&&(a=s[0].category,r.findLast(l=>l.id===a).entries=s)}),r},D_e=async e=>{const{data:t}=await dt.get(Pt(wS,{id:e}),{headers:kt()}),n=new bI().fromJson(t),r=new wI,o=[],i=Pt(xS,{query:{category:n.id}});for await(const a of vS(i,kt()))for(const s of a)o.push(r.fromJson(s));return n.entries=o,n},__e=async e=>{const t=await dt.post(Pt(wS),{name:e.name,unit:e.unit},{headers:kt()});return new bI().fromJson(t.data)},L_e=async e=>{const t=await dt.patch(Pt(wS,{id:e.id}),{name:e.name,unit:e.unit},{headers:kt()});return new bI().fromJson(t.data)},N_e=async e=>{await dt.delete(Pt(wS,{id:e}),{headers:kt()})},F_e=async e=>{await dt.delete(Pt(xS,{id:e}),{headers:kt()})},j_e=async e=>{const t=await dt.patch(Pt(xS,{id:e.id}),{date:ni(e.date),value:e.value,notes:e.notes},{headers:kt()});return new wI().fromJson(t.data)},B_e=async e=>{const t=await dt.post(Pt(xS),{category:e.categoryId,date:ni(e.date),value:e.value,notes:e.notes},{headers:kt()});return new wI().fromJson(t.data)};function gi(e,t){return e.toLocaleString(t,{maximumFractionDigits:0})}function eee(e,t,n){return e.toLocaleString(t,{maximumFractionDigits:0,unit:n.valueOf(),style:"unit"})}function Cn(e,t){return eee(e,t,"gram")}function u$(e,t){return eee(e,t,"percent")}const Vg=e=>{const{i18n:t}=qe(),n=e.planned>0;return X(Mt,{children:[C(DJ,{variant:"determinate",value:e.percentage<100?e.percentage:100}),X(ut,{variant:"caption",children:[e.title," — ",Cn(e.logged,t.language),n&&X(Mt,{children:[" / ",Cn(e.planned,t.language)]})]})]})};var z_e=Array.isArray,xa=z_e,V_e=typeof yc=="object"&&yc&&yc.Object===Object&&yc,tee=V_e,H_e=tee,U_e=typeof self=="object"&&self&&self.Object===Object&&self,W_e=H_e||U_e||Function("return this")(),Bc=W_e,G_e=Bc,q_e=G_e.Symbol,SS=q_e,PU=SS,nee=Object.prototype,K_e=nee.hasOwnProperty,Y_e=nee.toString,Kb=PU?PU.toStringTag:void 0;function X_e(e){var t=K_e.call(e,Kb),n=e[Kb];try{e[Kb]=void 0;var r=!0}catch{}var o=Y_e.call(e);return r&&(t?e[Kb]=n:delete e[Kb]),o}var Q_e=X_e,J_e=Object.prototype,Z_e=J_e.toString;function eLe(e){return Z_e.call(e)}var tLe=eLe,EU=SS,nLe=Q_e,rLe=tLe,oLe="[object Null]",iLe="[object Undefined]",TU=EU?EU.toStringTag:void 0;function aLe(e){return e==null?e===void 0?iLe:oLe:TU&&TU in Object(e)?nLe(e):rLe(e)}var Zu=aLe;function sLe(e){return e!=null&&typeof e=="object"}var ed=sLe,lLe=Zu,cLe=ed,uLe="[object Symbol]";function dLe(e){return typeof e=="symbol"||cLe(e)&&lLe(e)==uLe}var $v=dLe,fLe=xa,pLe=$v,hLe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mLe=/^\w*$/;function gLe(e,t){if(fLe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||pLe(e)?!0:mLe.test(e)||!hLe.test(e)||t!=null&&e in Object(t)}var JF=gLe;function yLe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var _f=yLe;const Rv=Bn(_f);var vLe=Zu,bLe=_f,wLe="[object AsyncFunction]",xLe="[object Function]",SLe="[object GeneratorFunction]",CLe="[object Proxy]";function PLe(e){if(!bLe(e))return!1;var t=vLe(e);return t==xLe||t==SLe||t==wLe||t==CLe}var ZF=PLe;const Ht=Bn(ZF);var ELe=Bc,TLe=ELe["__core-js_shared__"],OLe=TLe,d$=OLe,OU=function(){var e=/[^.]+$/.exec(d$&&d$.keys&&d$.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ILe(e){return!!OU&&OU in e}var kLe=ILe,MLe=Function.prototype,ALe=MLe.toString;function $Le(e){if(e!=null){try{return ALe.call(e)}catch{}try{return e+""}catch{}}return""}var ree=$Le,RLe=ZF,DLe=kLe,_Le=_f,LLe=ree,NLe=/[\\^$.*+?()[\]{}|]/g,FLe=/^\[object .+?Constructor\]$/,jLe=Function.prototype,BLe=Object.prototype,zLe=jLe.toString,VLe=BLe.hasOwnProperty,HLe=RegExp("^"+zLe.call(VLe).replace(NLe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ULe(e){if(!_Le(e)||DLe(e))return!1;var t=RLe(e)?HLe:FLe;return t.test(LLe(e))}var WLe=ULe;function GLe(e,t){return e==null?void 0:e[t]}var qLe=GLe,KLe=WLe,YLe=qLe;function XLe(e,t){var n=YLe(e,t);return KLe(n)?n:void 0}var Lh=XLe,QLe=Lh,JLe=QLe(Object,"create"),xI=JLe,IU=xI;function ZLe(){this.__data__=IU?IU(null):{},this.size=0}var eNe=ZLe;function tNe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var nNe=tNe,rNe=xI,oNe="__lodash_hash_undefined__",iNe=Object.prototype,aNe=iNe.hasOwnProperty;function sNe(e){var t=this.__data__;if(rNe){var n=t[e];return n===oNe?void 0:n}return aNe.call(t,e)?t[e]:void 0}var lNe=sNe,cNe=xI,uNe=Object.prototype,dNe=uNe.hasOwnProperty;function fNe(e){var t=this.__data__;return cNe?t[e]!==void 0:dNe.call(t,e)}var pNe=fNe,hNe=xI,mNe="__lodash_hash_undefined__";function gNe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=hNe&&t===void 0?mNe:t,this}var yNe=gNe,vNe=eNe,bNe=nNe,wNe=lNe,xNe=pNe,SNe=yNe;function Dv(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var jNe=FNe,BNe=SI;function zNe(e,t){var n=this.__data__,r=BNe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var VNe=zNe,HNe=ENe,UNe=RNe,WNe=LNe,GNe=jNe,qNe=VNe;function _v(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Dp=function(t){return CS(t)&&t.indexOf("%")===t.length-1},at=function(t){return mje(t)&&!Nv(t)},Mo=function(t){return at(t)||CS(t)},bje=0,Lf=function(t){var n=++bje;return"".concat(t||"").concat(n)},Ni=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!at(t)&&!CS(t))return r;var i;if(Dp(t)){var a=t.indexOf("%");i=n*parseFloat(t.slice(0,a))/100}else i=+t;return Nv(i)&&(i=r),o&&i>n&&(i=n),i},Dd=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},wje=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Oje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function yD(e){"@babel/helpers - typeof";return yD=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yD(e)}var _U={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},Cu=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},LU=null,p$=null,cj=function e(t){if(t===LU&&Array.isArray(p$))return p$;var n=[];return v.Children.forEach(t,function(r){Bt(r)||(uje.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),p$=n,LU=t,n};function Vi(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(o){return Cu(o)}):r=[Cu(t)],cj(e).forEach(function(o){var i=qa(o,"type.displayName")||qa(o,"type.name");r.indexOf(i)!==-1&&n.push(o)}),n}function La(e,t){var n=Vi(e,t);return n&&n[0]}var NU=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,o=n.height;return!(!at(r)||r<=0||!at(o)||o<=0)},Ije=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],kje=function(t){return t&&t.type&&CS(t.type)&&Ije.indexOf(t.type)>=0},pee=function(t){return t&&yD(t)==="object"&&"clipDot"in t},Mje=function(t,n,r,o){var i,a=(i=f$==null?void 0:f$[o])!==null&&i!==void 0?i:[];return!Ht(t)&&(o&&a.includes(n)||Cje.includes(n))||r&&lj.includes(n)},At=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var o=t;if(v.isValidElement(t)&&(o=t.props),!Rv(o))return null;var i={};return Object.keys(o).forEach(function(a){var s;Mje((s=o)===null||s===void 0?void 0:s[a],a,n,r)&&(i[a]=o[a])}),i},vD=function e(t,n){if(t===n)return!0;var r=v.Children.count(t);if(r!==v.Children.count(n))return!1;if(r===0)return!0;if(r===1)return FU(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _je(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function wD(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,i=e.className,a=e.style,s=e.title,l=e.desc,c=Dje(e,Rje),u=o||{width:n,height:r,x:0,y:0},d=pe("recharts-surface",i);return Y.createElement("svg",bD({},At(c,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),Y.createElement("title",null,s),Y.createElement("desc",null,l),t)}var Lje=["children","className"];function xD(){return xD=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var rn=Y.forwardRef(function(e,t){var n=e.children,r=e.className,o=Nje(e,Lje),i=pe("recharts-layer",r);return Y.createElement("g",xD({className:i},At(o,!0),{ref:t}),n)}),Vl=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;io?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r=r?e:zje(e,t,n)}var Hje=Vje,Uje="\\ud800-\\udfff",Wje="\\u0300-\\u036f",Gje="\\ufe20-\\ufe2f",qje="\\u20d0-\\u20ff",Kje=Wje+Gje+qje,Yje="\\ufe0e\\ufe0f",Xje="\\u200d",Qje=RegExp("["+Xje+Uje+Kje+Yje+"]");function Jje(e){return Qje.test(e)}var hee=Jje;function Zje(e){return e.split("")}var eBe=Zje,mee="\\ud800-\\udfff",tBe="\\u0300-\\u036f",nBe="\\ufe20-\\ufe2f",rBe="\\u20d0-\\u20ff",oBe=tBe+nBe+rBe,iBe="\\ufe0e\\ufe0f",aBe="["+mee+"]",SD="["+oBe+"]",CD="\\ud83c[\\udffb-\\udfff]",sBe="(?:"+SD+"|"+CD+")",gee="[^"+mee+"]",yee="(?:\\ud83c[\\udde6-\\uddff]){2}",vee="[\\ud800-\\udbff][\\udc00-\\udfff]",lBe="\\u200d",bee=sBe+"?",wee="["+iBe+"]?",cBe="(?:"+lBe+"(?:"+[gee,yee,vee].join("|")+")"+wee+bee+")*",uBe=wee+bee+cBe,dBe="(?:"+[gee+SD+"?",SD,yee,vee,aBe].join("|")+")",fBe=RegExp(CD+"(?="+CD+")|"+dBe+uBe,"g");function pBe(e){return e.match(fBe)||[]}var hBe=pBe,mBe=eBe,gBe=hee,yBe=hBe;function vBe(e){return gBe(e)?yBe(e):mBe(e)}var bBe=vBe,wBe=Hje,xBe=hee,SBe=bBe,CBe=see;function PBe(e){return function(t){t=CBe(t);var n=xBe(t)?SBe(t):void 0,r=n?n[0]:t.charAt(0),o=n?wBe(n,1).join(""):t.slice(1);return r[e]()+o}}var EBe=PBe,TBe=EBe,OBe=TBe("toUpperCase"),IBe=OBe;const LI=Bn(IBe);function wr(e){return function(){return e}}const xee=Math.cos,$E=Math.sin,tc=Math.sqrt,RE=Math.PI,NI=2*RE,PD=Math.PI,ED=2*PD,Sp=1e-6,kBe=ED-Sp;function See(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return See;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;oSp)if(!(Math.abs(d*l-c*u)>Sp)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,m=o-s,g=l*l+c*c,y=p*p+m*m,b=Math.sqrt(g),x=Math.sqrt(f),S=i*Math.tan((PD-Math.acos((g+f-y)/(2*b*x)))/2),P=S/x,E=S/b;Math.abs(P-1)>Sp&&this._append`L${t+P*u},${n+P*d}`,this._append`A${i},${i},0,0,${+(d*p>u*m)},${this._x1=t+E*l},${this._y1=n+E*c}`}}arc(t,n,r,o,i,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(o),l=r*Math.sin(o),c=t+s,u=n+l,d=1^a,f=a?o-i:i-o;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Sp||Math.abs(this._y1-u)>Sp)&&this._append`L${c},${u}`,r&&(f<0&&(f=f%ED+ED),f>kBe?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:f>Sp&&this._append`A${r},${r},0,${+(f>=PD)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function uj(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new ABe(t)}function dj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Cee(e){this._context=e}Cee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function FI(e){return new Cee(e)}function Pee(e){return e[0]}function Eee(e){return e[1]}function Tee(e,t){var n=wr(!0),r=null,o=FI,i=null,a=uj(s);e=typeof e=="function"?e:e===void 0?Pee:wr(e),t=typeof t=="function"?t:t===void 0?Eee:wr(t);function s(l){var c,u=(l=dj(l)).length,d,f=!1,p;for(r==null&&(i=o(p=a())),c=0;c<=u;++c)!(c=p;--m)s.point(S[m],P[m]);s.lineEnd(),s.areaEnd()}b&&(S[f]=+e(y,f,d),P[f]=+t(y,f,d),s.point(r?+r(y,f,d):S[f],n?+n(y,f,d):P[f]))}if(x)return s=null,x+""||null}function u(){return Tee().defined(o).curve(a).context(i)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:wr(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:wr(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:wr(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:wr(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:wr(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:wr(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(o=typeof d=="function"?d:wr(!!d),c):o},c.curve=function(d){return arguments.length?(a=d,i!=null&&(s=a(i)),c):a},c.context=function(d){return arguments.length?(d==null?i=s=null:s=a(i=d),c):i},c}class Oee{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function $Be(e){return new Oee(e,!0)}function RBe(e){return new Oee(e,!1)}const fj={draw(e,t){const n=tc(t/RE);e.moveTo(n,0),e.arc(0,0,n,0,NI)}},DBe={draw(e,t){const n=tc(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Iee=tc(1/3),_Be=Iee*2,LBe={draw(e,t){const n=tc(t/_Be),r=n*Iee;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},NBe={draw(e,t){const n=tc(t),r=-n/2;e.rect(r,r,n,n)}},FBe=.8908130915292852,kee=$E(RE/10)/$E(7*RE/10),jBe=$E(NI/10)*kee,BBe=-xee(NI/10)*kee,zBe={draw(e,t){const n=tc(t*FBe),r=jBe*n,o=BBe*n;e.moveTo(0,-n),e.lineTo(r,o);for(let i=1;i<5;++i){const a=NI*i/5,s=xee(a),l=$E(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*o,l*r+s*o)}e.closePath()}},h$=tc(3),VBe={draw(e,t){const n=-tc(t/(h$*3));e.moveTo(0,n*2),e.lineTo(-h$*n,-n),e.lineTo(h$*n,-n),e.closePath()}},vs=-.5,bs=tc(3)/2,TD=1/tc(12),HBe=(TD/2+1)*3,UBe={draw(e,t){const n=tc(t/HBe),r=n/2,o=n*TD,i=r,a=n*TD+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(vs*r-bs*o,bs*r+vs*o),e.lineTo(vs*i-bs*a,bs*i+vs*a),e.lineTo(vs*s-bs*l,bs*s+vs*l),e.lineTo(vs*r+bs*o,vs*o-bs*r),e.lineTo(vs*i+bs*a,vs*a-bs*i),e.lineTo(vs*s+bs*l,vs*l-bs*s),e.closePath()}};function WBe(e,t){let n=null,r=uj(o);e=typeof e=="function"?e:wr(e||fj),t=typeof t=="function"?t:wr(t===void 0?64:+t);function o(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return o.type=function(i){return arguments.length?(e=typeof i=="function"?i:wr(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:wr(+i),o):t},o.context=function(i){return arguments.length?(n=i??null,o):n},o}function DE(){}function _E(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Mee(e){this._context=e}Mee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:_E(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:_E(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function GBe(e){return new Mee(e)}function Aee(e){this._context=e}Aee.prototype={areaStart:DE,areaEnd:DE,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:_E(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qBe(e){return new Aee(e)}function $ee(e){this._context=e}$ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:_E(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function KBe(e){return new $ee(e)}function Ree(e){this._context=e}Ree.prototype={areaStart:DE,areaEnd:DE,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function YBe(e){return new Ree(e)}function BU(e){return e<0?-1:1}function zU(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(BU(i)+BU(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function VU(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function m$(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function LE(e){this._context=e}LE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:m$(this,this._t0,VU(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,m$(this,VU(this,n=zU(this,e,t)),n);break;default:m$(this,this._t0,n=zU(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Dee(e){this._context=new _ee(e)}(Dee.prototype=Object.create(LE.prototype)).point=function(e,t){LE.prototype.point.call(this,t,e)};function _ee(e){this._context=e}_ee.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}};function XBe(e){return new LE(e)}function QBe(e){return new Dee(e)}function Lee(e){this._context=e}Lee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=HU(e),o=HU(t),i=0,a=1;a=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[n-1]=(e[n]+o[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function ZBe(e){return new jI(e,.5)}function eze(e){return new jI(e,0)}function tze(e){return new jI(e,1)}function Oy(e,t){if((a=e.length)>1)for(var n=1,r,o,i=e[t[0]],a,s=i.length;n=0;)n[t]=t;return n}function nze(e,t){return e[t]}function rze(e){const t=[];return t.key=e,t}function oze(){var e=wr([]),t=OD,n=Oy,r=nze;function o(i){var a=Array.from(e.apply(this,arguments),rze),s,l=a.length,c=-1,u;for(const d of i)for(s=0,++c;s0){for(var n,r,o=0,i=e[0].length,a;o0){for(var n=0,r=e[t[0]],o,i=r.length;n0)||!((i=(o=e[t[0]]).length)>0))){for(var n=0,r=1,o,i,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pze(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Nee={symbolCircle:fj,symbolCross:DBe,symbolDiamond:LBe,symbolSquare:NBe,symbolStar:zBe,symbolTriangle:VBe,symbolWye:UBe},hze=Math.PI/180,mze=function(t){var n="symbol".concat(LI(t));return Nee[n]||fj},gze=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var o=18*hze;return 1.25*t*t*(Math.tan(o)-Math.tan(o*2)*Math.pow(Math.tan(o),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},yze=function(t,n){Nee["symbol".concat(LI(t))]=n},BI=function(t){var n=t.type,r=n===void 0?"circle":n,o=t.size,i=o===void 0?64:o,a=t.sizeType,s=a===void 0?"area":a,l=fze(t,lze),c=WU(WU({},l),{},{type:r,size:i,sizeType:s}),u=function(){var y=mze(r),b=WBe().type(y).size(gze(i,s,r));return b()},d=c.className,f=c.cx,p=c.cy,m=At(c,!0);return f===+f&&p===+p&&i===+i?Y.createElement("path",ID({},m,{className:pe("recharts-symbols",d),transform:"translate(".concat(f,", ").concat(p,")"),d:u()})):null};BI.registerSymbol=yze;function Iy(e){"@babel/helpers - typeof";return Iy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iy(e)}function kD(){return kD=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var x=p.inactive?c:p.color;return K.createElement("li",A_({className:v,style:d,key:"legend-item-".concat(m)},wf(r.props,p,m)),K.createElement(S_,{width:a,height:a,viewBox:u,style:f},r.renderIcon(p)),K.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},g?g(w,p,m):w))})}},{key:"render",value:function(){var r=this.props,o=r.payload,i=r.layout,a=r.align;if(!o||!o.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?a:"left"};return K.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(y.PureComponent);Gw(pj,"displayName","Legend");Gw(pj,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var _ze=LI;function Dze(){this.__data__=new _ze,this.size=0}var Nze=Dze;function Lze(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Fze=Lze;function jze(e){return this.__data__.get(e)}var Bze=jze;function zze(e){return this.__data__.has(e)}var Vze=zze,Hze=LI,Uze=rj,Wze=oj,Gze=200;function qze(e,t){var n=this.__data__;if(n instanceof Hze){var r=n.__data__;if(!Uze||r.lengths))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=n&mVe?new dVe:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=b5e}var yj=w5e,x5e=Zu,S5e=yj,C5e=ed,P5e="[object Arguments]",T5e="[object Array]",E5e="[object Boolean]",O5e="[object Date]",I5e="[object Error]",k5e="[object Function]",M5e="[object Map]",A5e="[object Number]",$5e="[object Object]",R5e="[object RegExp]",_5e="[object Set]",D5e="[object String]",N5e="[object WeakMap]",L5e="[object ArrayBuffer]",F5e="[object DataView]",j5e="[object Float32Array]",B5e="[object Float64Array]",z5e="[object Int8Array]",V5e="[object Int16Array]",H5e="[object Int32Array]",U5e="[object Uint8Array]",W5e="[object Uint8ClampedArray]",G5e="[object Uint16Array]",q5e="[object Uint32Array]",Cr={};Cr[j5e]=Cr[B5e]=Cr[z5e]=Cr[V5e]=Cr[H5e]=Cr[U5e]=Cr[W5e]=Cr[G5e]=Cr[q5e]=!0;Cr[P5e]=Cr[T5e]=Cr[L5e]=Cr[E5e]=Cr[F5e]=Cr[O5e]=Cr[I5e]=Cr[k5e]=Cr[M5e]=Cr[A5e]=Cr[$5e]=Cr[R5e]=Cr[_5e]=Cr[D5e]=Cr[N5e]=!1;function K5e(e){return C5e(e)&&S5e(e.length)&&!!Cr[x5e(e)]}var Y5e=K5e;function X5e(e){return function(t){return e(t)}}var Xee=X5e,UT={exports:{}};UT.exports;(function(e,t){var n=iee,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,s=function(){try{var l=o&&o.require&&o.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(UT,UT.exports);var Q5e=UT.exports,J5e=Y5e,Z5e=Xee,QU=Q5e,JU=QU&&QU.isTypedArray,eHe=JU?Z5e(JU):J5e,Qee=eHe,tHe=o5e,nHe=mj,rHe=xa,oHe=Yee,iHe=gj,aHe=Qee,sHe=Object.prototype,lHe=sHe.hasOwnProperty;function cHe(e,t){var n=rHe(e),r=!n&&nHe(e),o=!n&&!r&&oHe(e),i=!n&&!r&&!o&&aHe(e),a=n||r||o||i,s=a?tHe(e.length,String):[],l=s.length;for(var c in e)(t||lHe.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||iHe(c,l)))&&s.push(c);return s}var uHe=cHe,dHe=Object.prototype;function fHe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||dHe;return e===n}var pHe=fHe;function hHe(e,t){return function(n){return e(t(n))}}var Jee=hHe,mHe=Jee,gHe=mHe(Object.keys,Object),yHe=gHe,vHe=pHe,bHe=yHe,wHe=Object.prototype,xHe=wHe.hasOwnProperty;function SHe(e){if(!vHe(e))return bHe(e);var t=[];for(var n in Object(e))xHe.call(e,n)&&n!="constructor"&&t.push(n);return t}var CHe=SHe,PHe=tj,THe=yj;function EHe(e){return e!=null&&THe(e.length)&&!PHe(e)}var PS=EHe,OHe=uHe,IHe=CHe,kHe=PS;function MHe(e){return kHe(e)?OHe(e):IHe(e)}var WI=MHe,AHe=GVe,$He=n5e,RHe=WI;function _He(e){return AHe(e,RHe,$He)}var DHe=_He,ZU=DHe,NHe=1,LHe=Object.prototype,FHe=LHe.hasOwnProperty;function jHe(e,t,n,r,o,i){var a=n&NHe,s=ZU(e),l=s.length,c=ZU(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in t:FHe.call(t,f)))return!1}var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var g=!0;i.set(e,t),i.set(t,e);for(var v=a;++d-1}var L3e=N3e;function F3e(e,t,n){for(var r=-1,o=e==null?0:e.length;++r=Z3e){var c=t?null:Q3e(e);if(c)return J3e(c);a=!1,o=X3e,l=new q3e}else l=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mUe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gUe(e){return e.value}function yUe(e,t){if(K.isValidElement(e))return K.cloneElement(e,t);if(typeof e=="function")return K.createElement(e,t);t.ref;var n=hUe(t,aUe);return K.createElement(pj,n)}var mW=1,Pu=function(e){function t(){var n;sUe(this,t);for(var r=arguments.length,o=new Array(r),i=0;imW||Math.abs(o.height-this.lastBoundingBox.height)>mW)&&(this.lastBoundingBox.width=o.width,this.lastBoundingBox.height=o.height,r&&r(o)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?au({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var o=this.props,i=o.layout,a=o.align,s=o.verticalAlign,l=o.margin,c=o.chartWidth,u=o.chartHeight,d,f;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();d={left:((c||0)-p.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();f={top:((u||0)-m.height)/2}}else f=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return au(au({},d),f)}},{key:"render",value:function(){var r=this,o=this.props,i=o.content,a=o.width,s=o.height,l=o.wrapperStyle,c=o.payloadUniqBy,u=o.payload,d=au(au({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return K.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){r.wrapperNode=p}},yUe(i,au(au({},this.props),{},{payload:ite(u,c,gUe)})))}}],[{key:"getWithHeight",value:function(r,o){var i=au(au({},this.defaultProps),r.props),a=i.layout;return a==="vertical"&&ct(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||o}:null}}])}(y.PureComponent);GI(Pu,"displayName","Legend");GI(Pu,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var gW=SS,vUe=mj,bUe=xa,yW=gW?gW.isConcatSpreadable:void 0;function wUe(e){return bUe(e)||vUe(e)||!!(yW&&e&&e[yW])}var xUe=wUe,SUe=qee,CUe=xUe;function lte(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=CUe),o||(o=[]);++i0&&n(s)?t>1?lte(s,t-1,n,r,o):SUe(o,s):r||(o[o.length]=s)}return o}var cte=lte;function PUe(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(n(i[l],l,i)===!1)break}return t}}var TUe=PUe,EUe=TUe,OUe=EUe(),IUe=OUe,kUe=IUe,MUe=WI;function AUe(e,t){return e&&kUe(e,t,MUe)}var ute=AUe,$Ue=PS;function RUe(e,t){return function(n,r){if(n==null)return n;if(!$Ue(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++it||i&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!i&&!c&&e=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var qUe=GUe,S$=aj,KUe=sj,YUe=zc,XUe=dte,QUe=VUe,JUe=Xee,ZUe=qUe,eWe=zv,tWe=xa;function nWe(e,t,n){t.length?t=S$(t,function(i){return tWe(i)?function(a){return KUe(a,i.length===1?i[0]:i)}:i}):t=[eWe];var r=-1;t=S$(t,JUe(YUe));var o=XUe(e,function(i,a,s){var l=S$(t,function(c){return c(i)});return{criteria:l,index:++r,value:i}});return QUe(o,function(i,a){return ZUe(i,a,n)})}var rWe=nWe;function oWe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var iWe=oWe,aWe=iWe,bW=Math.max;function sWe(e,t,n){return t=bW(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=bW(r.length-t,0),a=Array(i);++o0){if(++t>=yWe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var xWe=wWe,SWe=gWe,CWe=xWe,PWe=CWe(SWe),TWe=PWe,EWe=zv,OWe=lWe,IWe=TWe;function kWe(e,t){return IWe(OWe(e,t,EWe),e+"")}var MWe=kWe,AWe=nj,$We=PS,RWe=gj,_We=Df;function DWe(e,t,n){if(!_We(n))return!1;var r=typeof t;return(r=="number"?$We(n)&&RWe(t,n.length):r=="string"&&t in n)?AWe(n[t],e):!1}var qI=DWe,NWe=cte,LWe=rWe,FWe=MWe,xW=qI,jWe=FWe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&xW(e,t[0],t[1])?t=[]:n>2&&xW(t[0],t[1],t[2])&&(t=[t[0]]),LWe(e,NWe(t,1),[])}),BWe=jWe;const wj=_n(BWe);function qw(e){"@babel/helpers - typeof";return qw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qw(e)}function j_(){return j_=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(Yb,"-left"),ct(n)&&t&&ct(t.x)&&n=t.y),"".concat(Yb,"-top"),ct(r)&&t&&ct(t.y)&&rg?Math.max(u,l[r]):Math.max(d,l[r])}function t6e(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function n6e(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,o=e.position,i=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,u,d;return a.height>0&&a.width>0&&n?(u=PW({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=PW({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=t6e({translateX:u,translateY:d,useTranslate3d:s})):c=ZWe,{cssProperties:c,cssClasses:e6e({translateX:u,translateY:d,coordinate:n})}}function $y(e){"@babel/helpers - typeof";return $y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$y(e)}function TW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function EW(e){for(var t=1;tOW||Math.abs(r.height-this.state.lastBoundingBox.height)>OW)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,o;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,o=this.props,i=o.active,a=o.allowEscapeViewBox,s=o.animationDuration,l=o.animationEasing,c=o.children,u=o.coordinate,d=o.hasPayload,f=o.isAnimationActive,p=o.offset,m=o.position,g=o.reverseDirection,v=o.useTranslate3d,w=o.viewBox,x=o.wrapperStyle,S=n6e({allowEscapeViewBox:a,coordinate:u,offsetTopLeft:p,position:m,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:w}),P=S.cssClasses,T=S.cssProperties,E=EW(EW({transition:f&&i?"transform ".concat(s,"ms ").concat(l):void 0},T),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},x);return K.createElement("div",{tabIndex:-1,className:P,style:E,ref:function(k){r.wrapperNode=k}},c)}}])}(y.PureComponent),f6e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ys={isSsr:f6e(),get:function(t){return Ys[t]},set:function(t,n){if(typeof t=="string")Ys[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(o){Ys[o]=t[o]})}}};function Ry(e){"@babel/helpers - typeof";return Ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ry(e)}function IW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function kW(e){for(var t=1;t0;return K.createElement(d6e,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:f,active:i,coordinate:u,hasPayload:E,offset:p,position:v,reverseDirection:w,useTranslate3d:x,viewBox:S,wrapperStyle:P},S6e(c,kW(kW({},this.props),{},{payload:T})))}}])}(y.PureComponent);xj(Fa,"displayName","Tooltip");xj(Fa,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ys.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var C6e=Bc,P6e=function(){return C6e.Date.now()},T6e=P6e,E6e=/\s/;function O6e(e){for(var t=e.length;t--&&E6e.test(e.charAt(t)););return t}var I6e=O6e,k6e=I6e,M6e=/^\s+/;function A6e(e){return e&&e.slice(0,k6e(e)+1).replace(M6e,"")}var $6e=A6e,R6e=$6e,MW=Df,_6e=Rv,AW=NaN,D6e=/^[-+]0x[0-9a-f]+$/i,N6e=/^0b[01]+$/i,L6e=/^0o[0-7]+$/i,F6e=parseInt;function j6e(e){if(typeof e=="number")return e;if(_6e(e))return AW;if(MW(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=MW(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=R6e(e);var n=N6e.test(e);return n||L6e.test(e)?F6e(e.slice(2),n?2:8):D6e.test(e)?AW:+e}var yte=j6e,B6e=Df,P$=T6e,$W=yte,z6e="Expected a function",V6e=Math.max,H6e=Math.min;function U6e(e,t,n){var r,o,i,a,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(z6e);t=$W(t)||0,B6e(n)&&(u=!!n.leading,d="maxWait"in n,i=d?V6e($W(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f);function p(E){var O=r,k=o;return r=o=void 0,c=E,a=e.apply(k,O),a}function m(E){return c=E,s=setTimeout(w,t),u?p(E):a}function g(E){var O=E-l,k=E-c,A=t-O;return d?H6e(A,i-k):A}function v(E){var O=E-l,k=E-c;return l===void 0||O>=t||O<0||d&&k>=i}function w(){var E=P$();if(v(E))return x(E);s=setTimeout(w,g(E))}function x(E){return s=void 0,f&&r?p(E):(r=o=void 0,a)}function S(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function P(){return s===void 0?a:x(P$())}function T(){var E=P$(),O=v(E);if(r=arguments,o=this,l=E,O){if(s===void 0)return m(l);if(d)return clearTimeout(s),s=setTimeout(w,t),p(l)}return s===void 0&&(s=setTimeout(w,t)),a}return T.cancel=S,T.flush=P,T}var W6e=U6e,G6e=W6e,q6e=Df,K6e="Expected a function";function Y6e(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(K6e);return q6e(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),G6e(e,t,{leading:r,maxWait:t,trailing:o})}var X6e=Y6e;const KI=_n(X6e);function Yw(e){"@babel/helpers - typeof";return Yw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yw(e)}function RW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function IC(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(F=KI(F,g,{trailing:!0,leading:!1}));var z=new ResizeObserver(F),_=T.current.getBoundingClientRect(),D=_.width,H=_.height;return R(D,H),z.observe(T.current),function(){z.disconnect()}},[R,g]);var L=y.useMemo(function(){var F=A.containerWidth,z=A.containerHeight;if(F<0||z<0)return null;Hl(Rp(a)||Rp(l),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,a,l),Hl(!n||n>0,"The aspect(%s) must be greater than zero.",n);var _=Rp(a)?F:a,D=Rp(l)?z:l;n&&n>0&&(_?D=_/n:D&&(_=D*n),f&&D>f&&(D=f)),Hl(_>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0, + H`).concat(ws,"M").concat(2*s,",").concat(i,` + A`).concat(a,",").concat(a,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(r.type==="rect")return Y.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(ws/8,"h").concat(ws,"v").concat(ws*3/4,"h").concat(-ws,"z"),className:"recharts-legend-icon"});if(Y.isValidElement(r.legendIcon)){var c=vze({},r);return delete c.legendIcon,Y.cloneElement(r.legendIcon,c)}return Y.createElement(BI,{fill:l,cx:i,cy:i,size:ws,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,o=this.props,i=o.payload,a=o.iconSize,s=o.layout,l=o.formatter,c=o.inactiveColor,u={x:0,y:0,width:ws,height:ws},d={display:s==="horizontal"?"inline-block":"block",marginRight:10},f={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(p,m){var g=p.formatter||l,y=pe(Gw(Gw({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",p.inactive));if(p.type==="none")return null;var b=Ht(p.value)?null:p.value;Vl(!Ht(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: `);var x=p.inactive?c:p.color;return Y.createElement("li",kD({className:y,style:d,key:"legend-item-".concat(m)},wf(r.props,p,m)),Y.createElement(wD,{width:a,height:a,viewBox:u,style:f},r.renderIcon(p)),Y.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},g?g(b,p,m):b))})}},{key:"render",value:function(){var r=this.props,o=r.payload,i=r.layout,a=r.align;if(!o||!o.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?a:"left"};return Y.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(v.PureComponent);Gw(pj,"displayName","Legend");Gw(pj,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Oze=CI;function Ize(){this.__data__=new Oze,this.size=0}var kze=Ize;function Mze(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Aze=Mze;function $ze(e){return this.__data__.get(e)}var Rze=$ze;function Dze(e){return this.__data__.has(e)}var _ze=Dze,Lze=CI,Nze=tj,Fze=nj,jze=200;function Bze(e,t){var n=this.__data__;if(n instanceof Lze){var r=n.__data__;if(!Nze||r.lengths))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=n&lVe?new oVe:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=f5e}var yj=p5e,h5e=Zu,m5e=yj,g5e=ed,y5e="[object Arguments]",v5e="[object Array]",b5e="[object Boolean]",w5e="[object Date]",x5e="[object Error]",S5e="[object Function]",C5e="[object Map]",P5e="[object Number]",E5e="[object Object]",T5e="[object RegExp]",O5e="[object Set]",I5e="[object String]",k5e="[object WeakMap]",M5e="[object ArrayBuffer]",A5e="[object DataView]",$5e="[object Float32Array]",R5e="[object Float64Array]",D5e="[object Int8Array]",_5e="[object Int16Array]",L5e="[object Int32Array]",N5e="[object Uint8Array]",F5e="[object Uint8ClampedArray]",j5e="[object Uint16Array]",B5e="[object Uint32Array]",Tr={};Tr[$5e]=Tr[R5e]=Tr[D5e]=Tr[_5e]=Tr[L5e]=Tr[N5e]=Tr[F5e]=Tr[j5e]=Tr[B5e]=!0;Tr[y5e]=Tr[v5e]=Tr[M5e]=Tr[b5e]=Tr[A5e]=Tr[w5e]=Tr[x5e]=Tr[S5e]=Tr[C5e]=Tr[P5e]=Tr[E5e]=Tr[T5e]=Tr[O5e]=Tr[I5e]=Tr[k5e]=!1;function z5e(e){return g5e(e)&&m5e(e.length)&&!!Tr[h5e(e)]}var V5e=z5e;function H5e(e){return function(t){return e(t)}}var Kee=H5e,BE={exports:{}};BE.exports;(function(e,t){var n=tee,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,s=function(){try{var l=o&&o.require&&o.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(BE,BE.exports);var U5e=BE.exports,W5e=V5e,G5e=Kee,JU=U5e,ZU=JU&&JU.isTypedArray,q5e=ZU?G5e(ZU):W5e,Yee=q5e,K5e=QVe,Y5e=mj,X5e=xa,Q5e=qee,J5e=gj,Z5e=Yee,eHe=Object.prototype,tHe=eHe.hasOwnProperty;function nHe(e,t){var n=X5e(e),r=!n&&Y5e(e),o=!n&&!r&&Q5e(e),i=!n&&!r&&!o&&Z5e(e),a=n||r||o||i,s=a?K5e(e.length,String):[],l=s.length;for(var c in e)(t||tHe.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||J5e(c,l)))&&s.push(c);return s}var rHe=nHe,oHe=Object.prototype;function iHe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||oHe;return e===n}var aHe=iHe;function sHe(e,t){return function(n){return e(t(n))}}var Xee=sHe,lHe=Xee,cHe=lHe(Object.keys,Object),uHe=cHe,dHe=aHe,fHe=uHe,pHe=Object.prototype,hHe=pHe.hasOwnProperty;function mHe(e){if(!dHe(e))return fHe(e);var t=[];for(var n in Object(e))hHe.call(e,n)&&n!="constructor"&&t.push(n);return t}var gHe=mHe,yHe=ZF,vHe=yj;function bHe(e){return e!=null&&vHe(e.length)&&!yHe(e)}var PS=bHe,wHe=rHe,xHe=gHe,SHe=PS;function CHe(e){return SHe(e)?wHe(e):xHe(e)}var zI=CHe,PHe=jVe,EHe=YVe,THe=zI;function OHe(e){return PHe(e,THe,EHe)}var IHe=OHe,eW=IHe,kHe=1,MHe=Object.prototype,AHe=MHe.hasOwnProperty;function $He(e,t,n,r,o,i){var a=n&kHe,s=eW(e),l=s.length,c=eW(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in t:AHe.call(t,f)))return!1}var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var g=!0;i.set(e,t),i.set(t,e);for(var y=a;++d-1}var M3e=k3e;function A3e(e,t,n){for(var r=-1,o=e==null?0:e.length;++r=G3e){var c=t?null:U3e(e);if(c)return W3e(c);a=!1,o=H3e,l=new B3e}else l=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lUe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function cUe(e){return e.value}function uUe(e,t){if(Y.isValidElement(e))return Y.cloneElement(e,t);if(typeof e=="function")return Y.createElement(e,t);t.ref;var n=sUe(t,Z3e);return Y.createElement(pj,n)}var gW=1,Pu=function(e){function t(){var n;eUe(this,t);for(var r=arguments.length,o=new Array(r),i=0;igW||Math.abs(o.height-this.lastBoundingBox.height)>gW)&&(this.lastBoundingBox.width=o.width,this.lastBoundingBox.height=o.height,r&&r(o)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?iu({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var o=this.props,i=o.layout,a=o.align,s=o.verticalAlign,l=o.margin,c=o.chartWidth,u=o.chartHeight,d,f;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();d={left:((c||0)-p.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();f={top:((u||0)-m.height)/2}}else f=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return iu(iu({},d),f)}},{key:"render",value:function(){var r=this,o=this.props,i=o.content,a=o.width,s=o.height,l=o.wrapperStyle,c=o.payloadUniqBy,u=o.payload,d=iu(iu({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return Y.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){r.wrapperNode=p}},uUe(i,iu(iu({},this.props),{},{payload:rte(u,c,cUe)})))}}],[{key:"getWithHeight",value:function(r,o){var i=iu(iu({},this.defaultProps),r.props),a=i.layout;return a==="vertical"&&at(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||o}:null}}])}(v.PureComponent);VI(Pu,"displayName","Legend");VI(Pu,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var yW=SS,dUe=mj,fUe=xa,vW=yW?yW.isConcatSpreadable:void 0;function pUe(e){return fUe(e)||dUe(e)||!!(vW&&e&&e[vW])}var hUe=pUe,mUe=Wee,gUe=hUe;function ate(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=gUe),o||(o=[]);++i0&&n(s)?t>1?ate(s,t-1,n,r,o):mUe(o,s):r||(o[o.length]=s)}return o}var ste=ate;function yUe(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(n(i[l],l,i)===!1)break}return t}}var vUe=yUe,bUe=vUe,wUe=bUe(),xUe=wUe,SUe=xUe,CUe=zI;function PUe(e,t){return e&&SUe(e,t,CUe)}var lte=PUe,EUe=PS;function TUe(e,t){return function(n,r){if(n==null)return n;if(!EUe(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++it||i&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!i&&!c&&e=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var BUe=jUe,b$=oj,zUe=ij,VUe=zc,HUe=cte,UUe=_Ue,WUe=Kee,GUe=BUe,qUe=Bv,KUe=xa;function YUe(e,t,n){t.length?t=b$(t,function(i){return KUe(i)?function(a){return zUe(a,i.length===1?i[0]:i)}:i}):t=[qUe];var r=-1;t=b$(t,WUe(VUe));var o=HUe(e,function(i,a,s){var l=b$(t,function(c){return c(i)});return{criteria:l,index:++r,value:i}});return UUe(o,function(i,a){return GUe(i,a,n)})}var XUe=YUe;function QUe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var JUe=QUe,ZUe=JUe,wW=Math.max;function eWe(e,t,n){return t=wW(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=wW(r.length-t,0),a=Array(i);++o0){if(++t>=uWe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var hWe=pWe,mWe=cWe,gWe=hWe,yWe=gWe(mWe),vWe=yWe,bWe=Bv,wWe=tWe,xWe=vWe;function SWe(e,t){return xWe(wWe(e,t,bWe),e+"")}var CWe=SWe,PWe=ej,EWe=PS,TWe=gj,OWe=_f;function IWe(e,t,n){if(!OWe(n))return!1;var r=typeof t;return(r=="number"?EWe(n)&&TWe(t,n.length):r=="string"&&t in n)?PWe(n[t],e):!1}var HI=IWe,kWe=ste,MWe=XUe,AWe=CWe,SW=HI,$We=AWe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&SW(e,t[0],t[1])?t=[]:n>2&&SW(t[0],t[1],t[2])&&(t=[t[0]]),MWe(e,kWe(t,1),[])}),RWe=$We;const wj=Bn(RWe);function qw(e){"@babel/helpers - typeof";return qw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qw(e)}function ND(){return ND=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(Yb,"-left"),at(n)&&t&&at(t.x)&&n=t.y),"".concat(Yb,"-top"),at(r)&&t&&at(t.y)&&rg?Math.max(u,l[r]):Math.max(d,l[r])}function KWe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function YWe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,o=e.position,i=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,u,d;return a.height>0&&a.width>0&&n?(u=EW({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=EW({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=KWe({translateX:u,translateY:d,useTranslate3d:s})):c=GWe,{cssProperties:c,cssClasses:qWe({translateX:u,translateY:d,coordinate:n})}}function My(e){"@babel/helpers - typeof";return My=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},My(e)}function TW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function OW(e){for(var t=1;tIW||Math.abs(r.height-this.state.lastBoundingBox.height)>IW)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,o;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,o=this.props,i=o.active,a=o.allowEscapeViewBox,s=o.animationDuration,l=o.animationEasing,c=o.children,u=o.coordinate,d=o.hasPayload,f=o.isAnimationActive,p=o.offset,m=o.position,g=o.reverseDirection,y=o.useTranslate3d,b=o.viewBox,x=o.wrapperStyle,S=YWe({allowEscapeViewBox:a,coordinate:u,offsetTopLeft:p,position:m,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:b}),P=S.cssClasses,E=S.cssProperties,T=OW(OW({transition:f&&i?"transform ".concat(s,"ms ").concat(l):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},x);return Y.createElement("div",{tabIndex:-1,className:P,style:T,ref:function(k){r.wrapperNode=k}},c)}}])}(v.PureComponent),i6e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ks={isSsr:i6e(),get:function(t){return Ks[t]},set:function(t,n){if(typeof t=="string")Ks[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(o){Ks[o]=t[o]})}}};function Ay(e){"@babel/helpers - typeof";return Ay=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ay(e)}function kW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function MW(e){for(var t=1;t0;return Y.createElement(o6e,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:f,active:i,coordinate:u,hasPayload:T,offset:p,position:y,reverseDirection:b,useTranslate3d:x,viewBox:S,wrapperStyle:P},m6e(c,MW(MW({},this.props),{},{payload:E})))}}])}(v.PureComponent);xj(ja,"displayName","Tooltip");xj(ja,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ks.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var g6e=Bc,y6e=function(){return g6e.Date.now()},v6e=y6e,b6e=/\s/;function w6e(e){for(var t=e.length;t--&&b6e.test(e.charAt(t)););return t}var x6e=w6e,S6e=x6e,C6e=/^\s+/;function P6e(e){return e&&e.slice(0,S6e(e)+1).replace(C6e,"")}var E6e=P6e,T6e=E6e,AW=_f,O6e=$v,$W=NaN,I6e=/^[-+]0x[0-9a-f]+$/i,k6e=/^0b[01]+$/i,M6e=/^0o[0-7]+$/i,A6e=parseInt;function $6e(e){if(typeof e=="number")return e;if(O6e(e))return $W;if(AW(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=AW(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=T6e(e);var n=k6e.test(e);return n||M6e.test(e)?A6e(e.slice(2),n?2:8):I6e.test(e)?$W:+e}var mte=$6e,R6e=_f,x$=v6e,RW=mte,D6e="Expected a function",_6e=Math.max,L6e=Math.min;function N6e(e,t,n){var r,o,i,a,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(D6e);t=RW(t)||0,R6e(n)&&(u=!!n.leading,d="maxWait"in n,i=d?_6e(RW(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f);function p(T){var O=r,k=o;return r=o=void 0,c=T,a=e.apply(k,O),a}function m(T){return c=T,s=setTimeout(b,t),u?p(T):a}function g(T){var O=T-l,k=T-c,M=t-O;return d?L6e(M,i-k):M}function y(T){var O=T-l,k=T-c;return l===void 0||O>=t||O<0||d&&k>=i}function b(){var T=x$();if(y(T))return x(T);s=setTimeout(b,g(T))}function x(T){return s=void 0,f&&r?p(T):(r=o=void 0,a)}function S(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function P(){return s===void 0?a:x(x$())}function E(){var T=x$(),O=y(T);if(r=arguments,o=this,l=T,O){if(s===void 0)return m(l);if(d)return clearTimeout(s),s=setTimeout(b,t),p(l)}return s===void 0&&(s=setTimeout(b,t)),a}return E.cancel=S,E.flush=P,E}var F6e=N6e,j6e=F6e,B6e=_f,z6e="Expected a function";function V6e(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(z6e);return B6e(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),j6e(e,t,{leading:r,maxWait:t,trailing:o})}var H6e=V6e;const UI=Bn(H6e);function Yw(e){"@babel/helpers - typeof";return Yw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yw(e)}function DW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function OC(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(N=UI(N,g,{trailing:!0,leading:!1}));var B=new ResizeObserver(N),L=E.current.getBoundingClientRect(),F=L.width,U=L.height;return R(F,U),B.observe(E.current),function(){B.disconnect()}},[R,g]);var _=v.useMemo(function(){var N=M.containerWidth,B=M.containerHeight;if(N<0||B<0)return null;Vl(Dp(a)||Dp(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,a,l),Vl(!n||n>0,"The aspect(%s) must be greater than zero.",n);var L=Dp(a)?N:a,F=Dp(l)?B:l;n&&n>0&&(L?F=L/n:F&&(L=F*n),f&&F>f&&(F=f)),Vl(L>0||F>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,_,D,a,l,u,d,n);var H=!Array.isArray(p)&&Cu(p.type).endsWith("Chart");return K.Children.map(p,function(B){return K.isValidElement(B)?y.cloneElement(B,IC({width:_,height:D},H?{style:IC({height:"100%",width:"100%",maxHeight:D,maxWidth:_},B.props.style)}:{})):B})},[n,p,l,f,d,u,A,a]);return K.createElement("div",{id:v?"".concat(v):void 0,className:fe("recharts-responsive-container",w),style:IC(IC({},P),{},{width:a,height:l,minWidth:u,minHeight:d,maxHeight:f}),ref:T},L)}),Vv=function(t){return null};Vv.displayName="Cell";function Xw(e){"@babel/helpers - typeof";return Xw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xw(e)}function DW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function H_(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ys.isSsr)return{width:0,height:0};var r=uGe(n),o=JSON.stringify({text:t,copyStyle:r});if($m.widthCache[o])return $m.widthCache[o];try{var i=document.getElementById(NW);i||(i=document.createElement("span"),i.setAttribute("id",NW),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var a=H_(H_({},cGe),r);Object.assign(i.style,a),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return $m.widthCache[o]=l,++$m.cacheCount>lGe&&($m.cacheCount=0,$m.widthCache={}),l}catch{return{width:0,height:0}}},dGe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Qw(e){"@babel/helpers - typeof";return Qw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qw(e)}function KT(e,t){return mGe(e)||hGe(e,t)||pGe(e,t)||fGe()}function fGe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pGe(e,t){if(e){if(typeof e=="string")return LW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return LW(e,t)}}function LW(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kGe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function HW(e,t){return RGe(e)||$Ge(e,t)||AGe(e,t)||MGe()}function MGe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AGe(e,t){if(e){if(typeof e=="string")return UW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UW(e,t)}}function UW(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return _.reduce(function(D,H){var B=H.word,V=H.width,W=D[D.length-1];if(W&&(o==null||i||W.width+V+rH.width?D:H})};if(!u)return p;for(var g="…",v=function(_){var D=d.slice(0,_),H=xte({breakAll:c,style:l,children:D+g}).wordsWithComputedWidth,B=f(H),V=B.length>a||m(B).width>Number(o);return[V,B]},w=0,x=d.length-1,S=0,P;w<=x&&S<=d.length-1;){var T=Math.floor((w+x)/2),E=T-1,O=v(E),k=HW(O,2),A=k[0],I=k[1],R=v(T),L=HW(R,1),F=L[0];if(!A&&!F&&(w=T+1),A&&F&&(x=T-1),!A&&F){P=I;break}S++}return P||p},WW=function(t){var n=Ft(t)?[]:t.toString().split(wte);return[{words:n}]},DGe=function(t){var n=t.width,r=t.scaleToFit,o=t.children,i=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!Ys.isSsr){var l,c,u=xte({breakAll:a,children:o,style:i});if(u){var d=u.wordsWithComputedWidth,f=u.spaceWidth;l=d,c=f}else return WW(o);return _Ge({breakAll:a,children:o,maxLines:s,style:i},l,c,n,r)}return WW(o)},GW="#808080",bh=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,c=l===void 0?"0.71em":l,u=t.scaleToFit,d=u===void 0?!1:u,f=t.textAnchor,p=f===void 0?"start":f,m=t.verticalAnchor,g=m===void 0?"end":m,v=t.fill,w=v===void 0?GW:v,x=VW(t,OGe),S=y.useMemo(function(){return DGe({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:d,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,d,x.style,x.width]),P=x.dx,T=x.dy,E=x.angle,O=x.className,k=x.breakAll,A=VW(x,IGe);if(!Io(r)||!Io(i))return null;var I=r+(ct(P)?P:0),R=i+(ct(T)?T:0),L;switch(g){case"start":L=T$("calc(".concat(c,")"));break;case"middle":L=T$("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:L=T$("calc(".concat(S.length-1," * -").concat(s,")"));break}var F=[];if(d){var z=S[0].width,_=x.width;F.push("scale(".concat((ct(_)?_/z:1)/z,")"))}return E&&F.push("rotate(".concat(E,", ").concat(I,", ").concat(R,")")),F.length&&(A.transform=F.join(" ")),K.createElement("text",U_({},At(A,!0),{x:I,y:R,className:fe("recharts-text",O),textAnchor:p,fill:w.includes("url")?GW:w}),S.map(function(D,H){var B=D.words.join(k?"":" ");return K.createElement("tspan",{x:I,dy:H===0?L:s,key:"".concat(B,"-").concat(H)},B)}))};function uf(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function NGe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Sj(e){let t,n,r;e.length!==2?(t=uf,n=(s,l)=>uf(e(s),l),r=(s,l)=>e(s)-l):(t=e===uf||e===NGe?e:LGe,n=e,r=e);function o(s,l,c=0,u=s.length){if(c>>1;n(s[d],l)<0?c=d+1:u=d}while(c>>1;n(s[d],l)<=0?c=d+1:u=d}while(cc&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:o,center:a,right:i}}function LGe(){return 0}function Ste(e){return e===null?NaN:+e}function*FGe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const jGe=Sj(uf),TS=jGe.right;Sj(Ste).center;class qW extends Map{constructor(t,n=VGe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(KW(this,t))}has(t){return super.has(KW(this,t))}set(t,n){return super.set(BGe(this,t),n)}delete(t){return super.delete(zGe(this,t))}}function KW({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function BGe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function zGe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function VGe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function HGe(e=uf){if(e===uf)return Cte;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Cte(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const UGe=Math.sqrt(50),WGe=Math.sqrt(10),GGe=Math.sqrt(2);function YT(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=UGe?10:i>=WGe?5:i>=GGe?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/ct&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*ct&&--l),l0))return[];if(e===t)return[e];const r=t=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let c=0;c=r)&&(n=r);return n}function XW(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Pte(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=o===void 0?Cte:HGe(o);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+f)),m=Math.min(r,Math.floor(t+(l-c)*d/l+f));Pte(e,t,p,m,o)}const i=e[t];let a=n,s=r;for(Xb(e,n,t),o(e[r],i)>0&&Xb(e,n,r);a0;)--s}o(e[n],i)===0?Xb(e,n,s):(++s,Xb(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Xb(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function qGe(e,t,n){if(e=Float64Array.from(FGe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return XW(e);if(t>=1)return YW(e);var r,o=(r-1)*t,i=Math.floor(o),a=YW(Pte(e,i).subarray(0,i+1)),s=XW(e.subarray(i+1));return a+(s-a)*(o-i)}}function KGe(e,t,n=Ste){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e),s=+n(e[i+1],i+1,e);return a+(s-a)*(o-i)}}function YGe(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?MC(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?MC(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=QGe.exec(e))?new da(t[1],t[2],t[3],1):(t=JGe.exec(e))?new da(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ZGe.exec(e))?MC(t[1],t[2],t[3],t[4]):(t=e8e.exec(e))?MC(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=t8e.exec(e))?r6(t[1],t[2]/100,t[3]/100,1):(t=n8e.exec(e))?r6(t[1],t[2]/100,t[3]/100,t[4]):QW.hasOwnProperty(e)?e6(QW[e]):e==="transparent"?new da(NaN,NaN,NaN,0):null}function e6(e){return new da(e>>16&255,e>>8&255,e&255,1)}function MC(e,t,n,r){return r<=0&&(e=t=n=NaN),new da(e,t,n,r)}function i8e(e){return e instanceof ES||(e=tx(e)),e?(e=e.rgb(),new da(e.r,e.g,e.b,e.opacity)):new da}function Y_(e,t,n,r){return arguments.length===1?i8e(e):new da(e,t,n,r??1)}function da(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Pj(da,Y_,Ete(ES,{brighter(e){return e=e==null?XT:Math.pow(XT,e),new da(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Zw:Math.pow(Zw,e),new da(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new da(Jp(this.r),Jp(this.g),Jp(this.b),QT(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:t6,formatHex:t6,formatHex8:a8e,formatRgb:n6,toString:n6}));function t6(){return`#${_p(this.r)}${_p(this.g)}${_p(this.b)}`}function a8e(){return`#${_p(this.r)}${_p(this.g)}${_p(this.b)}${_p((isNaN(this.opacity)?1:this.opacity)*255)}`}function n6(){const e=QT(this.opacity);return`${e===1?"rgb(":"rgba("}${Jp(this.r)}, ${Jp(this.g)}, ${Jp(this.b)}${e===1?")":`, ${e})`}`}function QT(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jp(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _p(e){return e=Jp(e),(e<16?"0":"")+e.toString(16)}function r6(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Nl(e,t,n,r)}function Ote(e){if(e instanceof Nl)return new Nl(e.h,e.s,e.l,e.opacity);if(e instanceof ES||(e=tx(e)),!e)return new Nl;if(e instanceof Nl)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(n-r)/s+(n0&&l<1?0:a,new Nl(a,s,l,e.opacity)}function s8e(e,t,n,r){return arguments.length===1?Ote(e):new Nl(e,t,n,r??1)}function Nl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Pj(Nl,s8e,Ete(ES,{brighter(e){return e=e==null?XT:Math.pow(XT,e),new Nl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Zw:Math.pow(Zw,e),new Nl(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new da(E$(e>=240?e-240:e+120,o,r),E$(e,o,r),E$(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Nl(o6(this.h),AC(this.s),AC(this.l),QT(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=QT(this.opacity);return`${e===1?"hsl(":"hsla("}${o6(this.h)}, ${AC(this.s)*100}%, ${AC(this.l)*100}%${e===1?")":`, ${e})`}`}}));function o6(e){return e=(e||0)%360,e<0?e+360:e}function AC(e){return Math.max(0,Math.min(1,e||0))}function E$(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Tj=e=>()=>e;function l8e(e,t){return function(n){return e+n*t}}function c8e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function u8e(e){return(e=+e)==1?Ite:function(t,n){return n-t?c8e(t,n,e):Tj(isNaN(t)?n:t)}}function Ite(e,t){var n=t-e;return n?l8e(e,n):Tj(isNaN(e)?t:e)}const i6=function e(t){var n=u8e(t);function r(o,i){var a=n((o=Y_(o)).r,(i=Y_(i)).r),s=n(o.g,i.g),l=n(o.b,i.b),c=Ite(o.opacity,i.opacity);return function(u){return o.r=a(u),o.g=s(u),o.b=l(u),o.opacity=c(u),o+""}}return r.gamma=e,r}(1);function d8e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;on&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:JT(r,o)})),n=O$.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function S8e(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o2?C8e:S8e,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?i:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(o((c||(c=s(t,e.map(r),JT)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,ZT),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=Ej,u()},d.clamp=function(f){return arguments.length?(a=f?!0:Fi,u()):a!==Fi},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(i=f,d):i},function(f,p){return r=f,o=p,u()}}function Oj(){return YI()(Fi,Fi)}function P8e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function eE(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function _y(e){return e=eE(Math.abs(e)),e?e[1]:NaN}function T8e(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function E8e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var O8e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function nx(e){if(!(t=O8e.exec(e)))throw new Error("invalid format: "+e);var t;return new Ij({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}nx.prototype=Ij.prototype;function Ij(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Ij.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function I8e(e){e:for(var t=e.length,n=1,r=-1,o;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var kte;function k8e(e,t){var n=eE(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(kte=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+eE(e,Math.max(0,t+i-1))[0]}function s6(e,t){var n=eE(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const l6={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:P8e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>s6(e*100,t),r:s6,s:k8e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function c6(e){return e}var u6=Array.prototype.map,d6=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function M8e(e){var t=e.grouping===void 0||e.thousands===void 0?c6:T8e(u6.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?c6:E8e(u6.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=nx(d);var f=d.fill,p=d.align,m=d.sign,g=d.symbol,v=d.zero,w=d.width,x=d.comma,S=d.precision,P=d.trim,T=d.type;T==="n"?(x=!0,T="g"):l6[T]||(S===void 0&&(S=12),P=!0,T="g"),(v||f==="0"&&p==="=")&&(v=!0,f="0",p="=");var E=g==="$"?n:g==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",O=g==="$"?r:/[%p]/.test(T)?a:"",k=l6[T],A=/[defgprs%]/.test(T);S=S===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function I(R){var L=E,F=O,z,_,D;if(T==="c")F=k(R)+F,R="";else{R=+R;var H=R<0||1/R<0;if(R=isNaN(R)?l:k(Math.abs(R),S),P&&(R=I8e(R)),H&&+R==0&&m!=="+"&&(H=!1),L=(H?m==="("?m:s:m==="-"||m==="("?"":m)+L,F=(T==="s"?d6[8+kte/3]:"")+F+(H&&m==="("?")":""),A){for(z=-1,_=R.length;++z<_;)if(D=R.charCodeAt(z),48>D||D>57){F=(D===46?o+R.slice(z+1):R.slice(z))+F,R=R.slice(0,z);break}}}x&&!v&&(R=t(R,1/0));var B=L.length+R.length+F.length,V=B>1)+L+R+F+V.slice(B);break;default:R=V+L+R+F;break}return i(R)}return I.toString=function(){return d+""},I}function u(d,f){var p=c((d=nx(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(_y(f)/3)))*3,g=Math.pow(10,-m),v=d6[8+m/3];return function(w){return p(g*w)+v}}return{format:c,formatPrefix:u}}var $C,kj,Mte;A8e({thousands:",",grouping:[3],currency:["$",""]});function A8e(e){return $C=M8e(e),kj=$C.format,Mte=$C.formatPrefix,$C}function $8e(e){return Math.max(0,-_y(Math.abs(e)))}function R8e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_y(t)/3)))*3-_y(Math.abs(e)))}function _8e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_y(t)-_y(e))+1}function Ate(e,t,n,r){var o=q_(e,t,n),i;switch(r=nx(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=R8e(o,a))&&(r.precision=i),Mte(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=_8e(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=$8e(o))&&(r.precision=i-(r.type==="%")*2);break}}return kj(r)}function Ff(e){var t=e.domain;return e.ticks=function(n){var r=t();return W_(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return Ate(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],s=r[i],l,c,u=10;for(s0;){if(c=G_(a,s,n),c===l)return r[o]=a,r[i]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function tE(){var e=Oj();return e.copy=function(){return OS(e,tE())},sl.apply(e,arguments),Ff(e)}function $te(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,ZT),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return $te(e).unknown(t)},e=arguments.length?Array.from(e,ZT):[0,1],Ff(n)}function Rte(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return iMath.pow(e,t)}function j8e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function h6(e){return(t,n)=>-e(-t,n)}function Mj(e){const t=e(f6,p6),n=t.domain;let r=10,o,i;function a(){return o=j8e(r),i=F8e(r),n()[0]<0?(o=h6(o),i=h6(i),e(D8e,N8e)):e(f6,p6),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u0){for(;f<=p;++f)for(m=1;mu)break;w.push(g)}}else for(;f<=p;++f)for(m=r-1;m>=1;--m)if(g=f>0?m/i(-f):m*i(f),!(gu)break;w.push(g)}w.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=nx(l)).precision==null&&(l.trim=!0),l=kj(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/i(Math.round(o(u)));return d*rn(Rte(n(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function _te(){const e=Mj(YI()).domain([1,10]);return e.copy=()=>OS(e,_te()).base(e.base()),sl.apply(e,arguments),e}function m6(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function g6(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Aj(e){var t=1,n=e(m6(t),g6(t));return n.constant=function(r){return arguments.length?e(m6(t=+r),g6(t)):t},Ff(n)}function Dte(){var e=Aj(YI());return e.copy=function(){return OS(e,Dte()).constant(e.constant())},sl.apply(e,arguments)}function y6(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function B8e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function z8e(e){return e<0?-e*e:e*e}function $j(e){var t=e(Fi,Fi),n=1;function r(){return n===1?e(Fi,Fi):n===.5?e(B8e,z8e):e(y6(n),y6(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},Ff(t)}function Rj(){var e=$j(YI());return e.copy=function(){return OS(e,Rj()).exponent(e.exponent())},sl.apply(e,arguments),e}function V8e(){return Rj.apply(null,arguments).exponent(.5)}function v6(e){return Math.sign(e)*e*e}function H8e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Nte(){var e=Oj(),t=[0,1],n=!1,r;function o(i){var a=H8e(e(i));return isNaN(a)?r:n?Math.round(a):a}return o.invert=function(i){return e.invert(v6(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,ZT)).map(v6)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(n=!!i,o):n},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return Nte(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},sl.apply(o,arguments),Ff(o)}function Lte(){var e=[],t=[],n=[],r;function o(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(i=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Fte().domain([e,t]).range(o).unknown(i)},sl.apply(Ff(a),arguments)}function jte(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[TS(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return jte().domain(e).range(t).unknown(n)},sl.apply(o,arguments)}const I$=new Date,k$=new Date;function Mo(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const l=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i0))return l;let c;do l.push(c=new Date(+i)),t(i,s),e(i);while(cMo(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(I$.setTime(+i),k$.setTime(+a),e(I$),e(k$),Math.floor(n(I$,k$))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const nE=Mo(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);nE.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Mo(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):nE);nE.range;const bu=1e3,js=bu*60,wu=js*60,qu=wu*24,_j=qu*7,b6=qu*30,M$=qu*365,Dp=Mo(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*bu)},(e,t)=>(t-e)/bu,e=>e.getUTCSeconds());Dp.range;const Dj=Mo(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*bu)},(e,t)=>{e.setTime(+e+t*js)},(e,t)=>(t-e)/js,e=>e.getMinutes());Dj.range;const Nj=Mo(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*js)},(e,t)=>(t-e)/js,e=>e.getUTCMinutes());Nj.range;const Lj=Mo(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*bu-e.getMinutes()*js)},(e,t)=>{e.setTime(+e+t*wu)},(e,t)=>(t-e)/wu,e=>e.getHours());Lj.range;const Fj=Mo(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*wu)},(e,t)=>(t-e)/wu,e=>e.getUTCHours());Fj.range;const IS=Mo(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*js)/qu,e=>e.getDate()-1);IS.range;const XI=Mo(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qu,e=>e.getUTCDate()-1);XI.range;const Bte=Mo(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qu,e=>Math.floor(e/qu));Bte.range;function Lh(e){return Mo(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*js)/_j)}const QI=Lh(0),rE=Lh(1),U8e=Lh(2),W8e=Lh(3),Dy=Lh(4),G8e=Lh(5),q8e=Lh(6);QI.range;rE.range;U8e.range;W8e.range;Dy.range;G8e.range;q8e.range;function Fh(e){return Mo(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/_j)}const JI=Fh(0),oE=Fh(1),K8e=Fh(2),Y8e=Fh(3),Ny=Fh(4),X8e=Fh(5),Q8e=Fh(6);JI.range;oE.range;K8e.range;Y8e.range;Ny.range;X8e.range;Q8e.range;const jj=Mo(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());jj.range;const Bj=Mo(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Bj.range;const Ku=Mo(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ku.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Mo(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Ku.range;const Yu=Mo(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Yu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Mo(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Yu.range;function zte(e,t,n,r,o,i){const a=[[Dp,1,bu],[Dp,5,5*bu],[Dp,15,15*bu],[Dp,30,30*bu],[i,1,js],[i,5,5*js],[i,15,15*js],[i,30,30*js],[o,1,wu],[o,3,3*wu],[o,6,6*wu],[o,12,12*wu],[r,1,qu],[r,2,2*qu],[n,1,_j],[t,1,b6],[t,3,3*b6],[e,1,M$]];function s(c,u,d){const f=uv).right(a,f);if(p===a.length)return e.every(q_(c/M$,u/M$,d));if(p===0)return nE.every(Math.max(q_(c,u,d),1));const[m,g]=a[f/a[p-1][2]53)return null;"w"in Z||(Z.w=1),"Z"in Z?(ge=$$(Qb(Z.y,0,1)),we=ge.getUTCDay(),ge=we>4||we===0?oE.ceil(ge):oE(ge),ge=XI.offset(ge,(Z.V-1)*7),Z.y=ge.getUTCFullYear(),Z.m=ge.getUTCMonth(),Z.d=ge.getUTCDate()+(Z.w+6)%7):(ge=A$(Qb(Z.y,0,1)),we=ge.getDay(),ge=we>4||we===0?rE.ceil(ge):rE(ge),ge=IS.offset(ge,(Z.V-1)*7),Z.y=ge.getFullYear(),Z.m=ge.getMonth(),Z.d=ge.getDate()+(Z.w+6)%7)}else("W"in Z||"U"in Z)&&("w"in Z||(Z.w="u"in Z?Z.u%7:"W"in Z?1:0),we="Z"in Z?$$(Qb(Z.y,0,1)).getUTCDay():A$(Qb(Z.y,0,1)).getDay(),Z.m=0,Z.d="W"in Z?(Z.w+6)%7+Z.W*7-(we+5)%7:Z.w+Z.U*7-(we+6)%7);return"Z"in Z?(Z.H+=Z.Z/100|0,Z.M+=Z.Z%100,$$(Z)):A$(Z)}}function k(ee,ce,se,Z){for(var ue=0,ge=ce.length,we=se.length,me,be;ue=we)return-1;if(me=ce.charCodeAt(ue++),me===37){if(me=ce.charAt(ue++),be=T[me in w6?ce.charAt(ue++):me],!be||(Z=be(ee,se,Z))<0)return-1}else if(me!=se.charCodeAt(Z++))return-1}return Z}function A(ee,ce,se){var Z=c.exec(ce.slice(se));return Z?(ee.p=u.get(Z[0].toLowerCase()),se+Z[0].length):-1}function I(ee,ce,se){var Z=p.exec(ce.slice(se));return Z?(ee.w=m.get(Z[0].toLowerCase()),se+Z[0].length):-1}function R(ee,ce,se){var Z=d.exec(ce.slice(se));return Z?(ee.w=f.get(Z[0].toLowerCase()),se+Z[0].length):-1}function L(ee,ce,se){var Z=w.exec(ce.slice(se));return Z?(ee.m=x.get(Z[0].toLowerCase()),se+Z[0].length):-1}function F(ee,ce,se){var Z=g.exec(ce.slice(se));return Z?(ee.m=v.get(Z[0].toLowerCase()),se+Z[0].length):-1}function z(ee,ce,se){return k(ee,t,ce,se)}function _(ee,ce,se){return k(ee,n,ce,se)}function D(ee,ce,se){return k(ee,r,ce,se)}function H(ee){return a[ee.getDay()]}function B(ee){return i[ee.getDay()]}function V(ee){return l[ee.getMonth()]}function W(ee){return s[ee.getMonth()]}function G(ee){return o[+(ee.getHours()>=12)]}function Q(ee){return 1+~~(ee.getMonth()/3)}function Y(ee){return a[ee.getUTCDay()]}function ne(ee){return i[ee.getUTCDay()]}function ie(ee){return l[ee.getUTCMonth()]}function re(ee){return s[ee.getUTCMonth()]}function pe(ee){return o[+(ee.getUTCHours()>=12)]}function le(ee){return 1+~~(ee.getUTCMonth()/3)}return{format:function(ee){var ce=E(ee+="",S);return ce.toString=function(){return ee},ce},parse:function(ee){var ce=O(ee+="",!1);return ce.toString=function(){return ee},ce},utcFormat:function(ee){var ce=E(ee+="",P);return ce.toString=function(){return ee},ce},utcParse:function(ee){var ce=O(ee+="",!0);return ce.toString=function(){return ee},ce}}}var w6={"-":"",_:" ",0:"0"},Uo=/^\s*\d+/,r9e=/^%/,o9e=/[\\^$*+?|[\]().{}]/g;function zn(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i[t.toLowerCase(),n]))}function a9e(e,t,n){var r=Uo.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function s9e(e,t,n){var r=Uo.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function l9e(e,t,n){var r=Uo.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function c9e(e,t,n){var r=Uo.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function u9e(e,t,n){var r=Uo.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function x6(e,t,n){var r=Uo.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function S6(e,t,n){var r=Uo.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function d9e(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function f9e(e,t,n){var r=Uo.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function p9e(e,t,n){var r=Uo.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function C6(e,t,n){var r=Uo.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function h9e(e,t,n){var r=Uo.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function P6(e,t,n){var r=Uo.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function m9e(e,t,n){var r=Uo.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function g9e(e,t,n){var r=Uo.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function y9e(e,t,n){var r=Uo.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function v9e(e,t,n){var r=Uo.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function b9e(e,t,n){var r=r9e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function w9e(e,t,n){var r=Uo.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function x9e(e,t,n){var r=Uo.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function T6(e,t){return zn(e.getDate(),t,2)}function S9e(e,t){return zn(e.getHours(),t,2)}function C9e(e,t){return zn(e.getHours()%12||12,t,2)}function P9e(e,t){return zn(1+IS.count(Ku(e),e),t,3)}function Vte(e,t){return zn(e.getMilliseconds(),t,3)}function T9e(e,t){return Vte(e,t)+"000"}function E9e(e,t){return zn(e.getMonth()+1,t,2)}function O9e(e,t){return zn(e.getMinutes(),t,2)}function I9e(e,t){return zn(e.getSeconds(),t,2)}function k9e(e){var t=e.getDay();return t===0?7:t}function M9e(e,t){return zn(QI.count(Ku(e)-1,e),t,2)}function Hte(e){var t=e.getDay();return t>=4||t===0?Dy(e):Dy.ceil(e)}function A9e(e,t){return e=Hte(e),zn(Dy.count(Ku(e),e)+(Ku(e).getDay()===4),t,2)}function $9e(e){return e.getDay()}function R9e(e,t){return zn(rE.count(Ku(e)-1,e),t,2)}function _9e(e,t){return zn(e.getFullYear()%100,t,2)}function D9e(e,t){return e=Hte(e),zn(e.getFullYear()%100,t,2)}function N9e(e,t){return zn(e.getFullYear()%1e4,t,4)}function L9e(e,t){var n=e.getDay();return e=n>=4||n===0?Dy(e):Dy.ceil(e),zn(e.getFullYear()%1e4,t,4)}function F9e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+zn(t/60|0,"0",2)+zn(t%60,"0",2)}function E6(e,t){return zn(e.getUTCDate(),t,2)}function j9e(e,t){return zn(e.getUTCHours(),t,2)}function B9e(e,t){return zn(e.getUTCHours()%12||12,t,2)}function z9e(e,t){return zn(1+XI.count(Yu(e),e),t,3)}function Ute(e,t){return zn(e.getUTCMilliseconds(),t,3)}function V9e(e,t){return Ute(e,t)+"000"}function H9e(e,t){return zn(e.getUTCMonth()+1,t,2)}function U9e(e,t){return zn(e.getUTCMinutes(),t,2)}function W9e(e,t){return zn(e.getUTCSeconds(),t,2)}function G9e(e){var t=e.getUTCDay();return t===0?7:t}function q9e(e,t){return zn(JI.count(Yu(e)-1,e),t,2)}function Wte(e){var t=e.getUTCDay();return t>=4||t===0?Ny(e):Ny.ceil(e)}function K9e(e,t){return e=Wte(e),zn(Ny.count(Yu(e),e)+(Yu(e).getUTCDay()===4),t,2)}function Y9e(e){return e.getUTCDay()}function X9e(e,t){return zn(oE.count(Yu(e)-1,e),t,2)}function Q9e(e,t){return zn(e.getUTCFullYear()%100,t,2)}function J9e(e,t){return e=Wte(e),zn(e.getUTCFullYear()%100,t,2)}function Z9e(e,t){return zn(e.getUTCFullYear()%1e4,t,4)}function e7e(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ny(e):Ny.ceil(e),zn(e.getUTCFullYear()%1e4,t,4)}function t7e(){return"+0000"}function O6(){return"%"}function I6(e){return+e}function k6(e){return Math.floor(+e/1e3)}var Rm,Gte,qte;n7e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function n7e(e){return Rm=n9e(e),Gte=Rm.format,Rm.parse,qte=Rm.utcFormat,Rm.utcParse,Rm}function r7e(e){return new Date(e)}function o7e(e){return e instanceof Date?+e:+new Date(+e)}function zj(e,t,n,r,o,i,a,s,l,c){var u=Oj(),d=u.invert,f=u.domain,p=c(".%L"),m=c(":%S"),g=c("%I:%M"),v=c("%I %p"),w=c("%a %d"),x=c("%b %d"),S=c("%B"),P=c("%Y");function T(E){return(l(E)t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,i)=>qGe(e,i/r))},n.copy=function(){return Qte(t).domain(e)},td.apply(n,arguments)}function ek(){var e=0,t=.5,n=1,r=1,o,i,a,s,l,c=Fi,u,d=!1,f;function p(g){return isNaN(g=+g)?f:(g=.5+((g=+u(g))-i)*(r*gt}var tne=d7e,f7e=tk,p7e=tne,h7e=zv;function m7e(e){return e&&e.length?f7e(e,h7e,p7e):void 0}var g7e=m7e;const Yd=_n(g7e);function y7e(e,t){return ee.e^i.s<0?1:-1;for(r=i.d.length,o=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1};Et.decimalPlaces=Et.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Tr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Et.dividedBy=Et.div=function(e){return Tu(this,new this.constructor(e))};Et.dividedToIntegerBy=Et.idiv=function(e){var t=this,n=t.constructor;return fr(Tu(t,new n(e),0,1),n.precision)};Et.equals=Et.eq=function(e){return!this.cmp(e)};Et.exponent=function(){return mo(this)};Et.greaterThan=Et.gt=function(e){return this.cmp(e)>0};Et.greaterThanOrEqualTo=Et.gte=function(e){return this.cmp(e)>=0};Et.isInteger=Et.isint=function(){return this.e>this.d.length-2};Et.isNegative=Et.isneg=function(){return this.s<0};Et.isPositive=Et.ispos=function(){return this.s>0};Et.isZero=function(){return this.s===0};Et.lessThan=Et.lt=function(e){return this.cmp(e)<0};Et.lessThanOrEqualTo=Et.lte=function(e){return this.cmp(e)<1};Et.logarithm=Et.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(za))throw Error(nl+"NaN");if(n.s<1)throw Error(nl+(n.s?"NaN":"-Infinity"));return n.eq(za)?new r(0):(Rr=!1,t=Tu(rx(n,i),rx(e,i),i),Rr=!0,fr(t,o))};Et.minus=Et.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?ane(t,e):one(t,(e.s=-e.s,e))};Et.modulo=Et.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(nl+"NaN");return n.s?(Rr=!1,t=Tu(n,e,0,1).times(e),Rr=!0,n.minus(t)):fr(new r(n),o)};Et.naturalExponential=Et.exp=function(){return ine(this)};Et.naturalLogarithm=Et.ln=function(){return rx(this)};Et.negated=Et.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Et.plus=Et.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?one(t,e):ane(t,(e.s=-e.s,e))};Et.precision=Et.sd=function(e){var t,n,r,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Zp+e);if(t=mo(o)+1,r=o.d.length-1,n=r*Tr+1,r=o.d[r],r){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Et.squareRoot=Et.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(nl+"NaN")}for(e=mo(s),Rr=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=xc(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=Wv((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(o.toString()),n=l.precision,o=a=n+3;;)if(i=r,r=i.plus(Tu(s,i,a+2)).times(.5),xc(i.d).slice(0,a)===(t=xc(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(fr(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if(t!="9999")break;a+=4}return Rr=!0,fr(r,n)};Et.times=Et.mul=function(e){var t,n,r,o,i,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,l=f.length,c=p.length,l=0;){for(t=0,o=l+r;o>r;)s=i[o]+p[r]*f[o-r-1]+t,i[o--]=s%No|0,t=s/No|0;i[o]=(i[o]+t)%No|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Rr?fr(e,d.precision):e};Et.toDecimalPlaces=Et.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Nc(e,0,Uv),t===void 0?t=r.rounding:Nc(t,0,8),fr(n,e+mo(n)+1,t))};Et.toExponential=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=wh(r,!0):(Nc(e,0,Uv),t===void 0?t=o.rounding:Nc(t,0,8),r=fr(new o(r),e+1,t),n=wh(r,!0,e+1)),n};Et.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?wh(o):(Nc(e,0,Uv),t===void 0?t=i.rounding:Nc(t,0,8),r=fr(new i(o),e+mo(o)+1,t),n=wh(r.abs(),!1,e+mo(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)};Et.toInteger=Et.toint=function(){var e=this,t=e.constructor;return fr(new t(e),mo(e)+1,t.rounding)};Et.toNumber=function(){return+this};Et.toPower=Et.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(za);if(s=new l(s),!s.s){if(e.s<1)throw Error(nl+"Infinity");return s}if(s.eq(za))return s;if(r=l.precision,e.eq(za))return fr(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,i=s.s,a){if((n=u<0?-u:u)<=rne){for(o=new l(za),t=Math.ceil(r/Tr+4),Rr=!1;n%2&&(o=o.times(s),$6(o.d,t)),n=Wv(n/2),n!==0;)s=s.times(s),$6(s.d,t);return Rr=!0,e.s<0?new l(za).div(o):fr(o,r)}}else if(i<0)throw Error(nl+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Rr=!1,o=e.times(rx(s,r+c)),Rr=!0,o=ine(o),o.s=i,o};Et.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?(n=mo(o),r=wh(o,n<=i.toExpNeg||n>=i.toExpPos)):(Nc(e,1,Uv),t===void 0?t=i.rounding:Nc(t,0,8),o=fr(new i(o),e,t),n=mo(o),r=wh(o,e<=n||n<=i.toExpNeg,e)),r};Et.toSignificantDigits=Et.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Nc(e,1,Uv),t===void 0?t=r.rounding:Nc(t,0,8)),fr(new r(n),e,t)};Et.toString=Et.valueOf=Et.val=Et.toJSON=Et[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=mo(e),n=e.constructor;return wh(e,t<=n.toExpNeg||t>=n.toExpPos)};function one(e,t){var n,r,o,i,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),Rr?fr(t,d):t;if(l=e.d,c=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o,i){for(i<0?(r=l,i=-i,s=c.length):(r=c,o=a,s=l.length),a=Math.ceil(d/Tr),s=a>s?a+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=c.length,s-i<0&&(i=s,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/No|0,l[i]%=No;for(n&&(l.unshift(n),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,Rr?fr(t,d):t}function Nc(e,t,n){if(e!==~~e||en)throw Error(Zp+e)}function xc(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;ta?1:-1;else for(s=l=0;so[s]?1:-1;break}return l}function n(r,o,i){for(var a=0;i--;)r[i]-=a,a=r[i]1;)r.shift()}return function(r,o,i,a){var s,l,c,u,d,f,p,m,g,v,w,x,S,P,T,E,O,k,A=r.constructor,I=r.s==o.s?1:-1,R=r.d,L=o.d;if(!r.s)return new A(r);if(!o.s)throw Error(nl+"Division by zero");for(l=r.e-o.e,O=L.length,T=R.length,p=new A(I),m=p.d=[],c=0;L[c]==(R[c]||0);)++c;if(L[c]>(R[c]||0)&&--l,i==null?x=i=A.precision:a?x=i+(mo(r)-mo(o))+1:x=i,x<0)return new A(0);if(x=x/Tr+2|0,c=0,O==1)for(u=0,L=L[0],x++;(c1&&(L=e(L,u),R=e(R,u),O=L.length,T=R.length),P=O,g=R.slice(0,O),v=g.length;v=No/2&&++E;do u=0,s=t(L,g,O,v),s<0?(w=g[0],O!=v&&(w=w*No+(g[1]||0)),u=w/E|0,u>1?(u>=No&&(u=No-1),d=e(L,u),f=d.length,v=g.length,s=t(d,g,f,v),s==1&&(u--,n(d,O16)throw Error(Uj+mo(e));if(!e.s)return new u(za);for(t==null?(Rr=!1,s=d):s=t,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(Cp(2,c))/Math.LN10*2+5|0,s+=r,n=o=i=new u(za),u.precision=s;;){if(o=fr(o.times(e),s),n=n.times(++l),a=i.plus(Tu(o,n,s)),xc(a.d).slice(0,s)===xc(i.d).slice(0,s)){for(;c--;)i=fr(i.times(i),s);return u.precision=d,t==null?(Rr=!0,fr(i,d)):i}i=a}}function mo(e){for(var t=e.e*Tr,n=e.d[0];n>=10;n/=10)t++;return t}function R$(e,t,n){if(t>e.LN10.sd())throw Rr=!0,n&&(e.precision=n),Error(nl+"LN10 precision limit exceeded");return fr(new e(e.LN10),t)}function kd(e){for(var t="";e--;)t+="0";return t}function rx(e,t){var n,r,o,i,a,s,l,c,u,d=1,f=10,p=e,m=p.d,g=p.constructor,v=g.precision;if(p.s<1)throw Error(nl+(p.s?"NaN":"-Infinity"));if(p.eq(za))return new g(0);if(t==null?(Rr=!1,c=v):c=t,p.eq(10))return t==null&&(Rr=!0),R$(g,c);if(c+=f,g.precision=c,n=xc(m),r=n.charAt(0),i=mo(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=xc(p.d),r=n.charAt(0),d++;i=mo(p),r>1?(p=new g("0."+n),i++):p=new g(r+"."+n.slice(1))}else return l=R$(g,c+2,v).times(i+""),p=rx(new g(r+"."+n.slice(1)),c-f).plus(l),g.precision=v,t==null?(Rr=!0,fr(p,v)):p;for(s=a=p=Tu(p.minus(za),p.plus(za),c),u=fr(p.times(p),c),o=3;;){if(a=fr(a.times(u),c),l=s.plus(Tu(a,new g(o),c)),xc(l.d).slice(0,c)===xc(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(R$(g,c+2,v).times(i+""))),s=Tu(s,new g(d),c),g.precision=v,t==null?(Rr=!0,fr(s,v)):s;s=l,o+=2}}function A6(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(r,o),t){if(o-=r,n=n-r-1,e.e=Wv(n/Tr),e.d=[],r=(n+1)%Tr,n<0&&(r+=Tr),riE||e.e<-iE))throw Error(Uj+n)}else e.s=0,e.e=0,e.d=[0];return e}function fr(e,t,n){var r,o,i,a,s,l,c,u,d=e.d;for(a=1,i=d[0];i>=10;i/=10)a++;if(r=t-a,r<0)r+=Tr,o=t,c=d[u=0];else{if(u=Math.ceil((r+1)/Tr),i=d.length,u>=i)return e;for(c=i=d[u],a=1;i>=10;i/=10)a++;r%=Tr,o=r-Tr+a}if(n!==void 0&&(i=Cp(10,a-o-1),s=c/i%10|0,l=t<0||d[u+1]!==void 0||c%i,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?o>0?c/Cp(10,a-o):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=mo(e),d.length=1,t=t-i-1,d[0]=Cp(10,(Tr-t%Tr)%Tr),e.e=Wv(-t/Tr)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=u,i=1,u--):(d.length=u+1,i=Cp(10,Tr-r),d[u]=o>0?(c/Cp(10,a-o)%Cp(10,o)|0)*i:0),l)for(;;)if(u==0){(d[0]+=i)==No&&(d[0]=1,++e.e);break}else{if(d[u]+=i,d[u]!=No)break;d[u--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(Rr&&(e.e>iE||e.e<-iE))throw Error(Uj+mo(e));return e}function ane(e,t){var n,r,o,i,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),Rr?fr(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),o=Math.max(Math.ceil(p/Tr),s)+2,a>o&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for(o=l.length,s=d.length,u=o0;--o)l[s++]=0;for(o=d.length;o>a;){if(l[--o]0?i=i.charAt(0)+"."+i.slice(1)+kd(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+kd(-o-1)+i,n&&(r=n-a)>0&&(i+=kd(r))):o>=a?(i+=kd(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+kd(r))):((r=o+1)0&&(o+1===a&&(i+="."),i+=kd(r))),e.s<0?"-"+i:i}function $6(e,t){if(e.length>t)return e.length=t,!0}function sne(e){var t,n,r;function o(i){var a=this;if(!(a instanceof o))return new o(i);if(a.constructor=o,i instanceof o){a.s=i.s,a.e=i.e,a.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Zp+i);if(i>0)a.s=1;else if(i<0)i=-i,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(i===~~i&&i<1e7){a.e=0,a.d=[i];return}return A6(a,i.toString())}else if(typeof i!="string")throw Error(Zp+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,F7e.test(i))A6(a,i);else throw Error(Zp+i)}if(o.prototype=Et,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=sne,o.config=o.set=j7e,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(Zp+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Zp+n+": "+r);return this}var Wj=sne(L7e);za=new Wj(1);const sr=Wj;function B7e(e){return U7e(e)||H7e(e)||V7e(e)||z7e()}function z7e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V7e(e,t){if(e){if(typeof e=="string")return J_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J_(e,t)}}function H7e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function U7e(e){if(Array.isArray(e))return J_(e)}function J_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,o):e(t-a,R6(function(){for(var s=arguments.length,l=new Array(s),c=0;ce.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,i=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(o)throw i}}return n}}function iqe(e){if(Array.isArray(e))return e}function fne(e){var t=ox(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function pne(e,t,n){if(e.lte(0))return new sr(0);var r=ok.getDigitCount(e.toNumber()),o=new sr(10).pow(r),i=e.div(o),a=r!==1?.05:.1,s=new sr(Math.ceil(i.div(a).toNumber())).add(n).mul(a),l=s.mul(o);return t?l:new sr(Math.ceil(l))}function aqe(e,t,n){var r=1,o=new sr(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new sr(10).pow(ok.getDigitCount(e)-1),o=new sr(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new sr(Math.floor(e)))}else e===0?o=new sr(Math.floor((t-1)/2)):n||(o=new sr(Math.floor(e)));var a=Math.floor((t-1)/2),s=K7e(q7e(function(l){return o.add(new sr(l-a).mul(r)).toNumber()}),Z_);return s(0,t)}function hne(e,t,n,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new sr(0),tickMin:new sr(0),tickMax:new sr(0)};var i=pne(new sr(t).sub(e).div(n-1),r,o),a;e<=0&&t>=0?a=new sr(0):(a=new sr(e).add(t).div(2),a=a.sub(new sr(a).mod(i)));var s=Math.ceil(a.sub(e).div(i).toNumber()),l=Math.ceil(new sr(t).sub(a).div(i).toNumber()),c=s+l+1;return c>n?hne(e,t,n,r,o+1):(c0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:i,tickMin:a.sub(new sr(s).mul(i)),tickMax:a.add(new sr(l).mul(i))})}function sqe(e){var t=ox(e,2),n=t[0],r=t[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(o,2),s=fne([n,r]),l=ox(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var d=u===1/0?[c].concat(tD(Z_(0,o-1).map(function(){return 1/0}))):[].concat(tD(Z_(0,o-1).map(function(){return-1/0})),[u]);return n>r?eD(d):d}if(c===u)return aqe(c,o,i);var f=hne(c,u,a,i),p=f.step,m=f.tickMin,g=f.tickMax,v=ok.rangeStep(m,g.add(new sr(.1).mul(p)),p);return n>r?eD(v):v}function lqe(e,t){var n=ox(e,2),r=n[0],o=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=fne([r,o]),s=ox(a,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,o];if(l===c)return[l];var u=Math.max(t,2),d=pne(new sr(c).sub(l).div(u-1),i,0),f=[].concat(tD(ok.rangeStep(new sr(l),new sr(c).sub(new sr(.99).mul(d)),d)),[c]);return r>o?eD(f):f}var cqe=une(sqe),uqe=une(lqe),dqe="Invariant failed";function xh(e,t){throw new Error(dqe)}var fqe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Ly(e){"@babel/helpers - typeof";return Ly=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ly(e)}function aE(){return aE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function wqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xqe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,c=0;c0?o[c-1].coordinate:o[s-1].coordinate,d=o[c].coordinate,f=c>=s-1?o[0].coordinate:o[c+1].coordinate,p=void 0;if(Ni(d-u)!==Ni(f-d)){var m=[];if(Ni(f-d)===Ni(l[1]-l[0])){p=f;var g=d+l[1]-l[0];m[0]=Math.min(g,(g+u)/2),m[1]=Math.max(g,(g+u)/2)}else{p=u;var v=f+l[1]-l[0];m[0]=Math.min(d,(v+d)/2),m[1]=Math.max(d,(v+d)/2)}var w=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(t>w[0]&&t<=w[1]||t>=m[0]&&t<=m[1]){a=o[c].index;break}}else{var x=Math.min(u,f),S=Math.max(u,f);if(t>(x+d)/2&&t<=(S+d)/2){a=o[c].index;break}}}else for(var P=0;P0&&P(r[P].coordinate+r[P-1].coordinate)/2&&t<=(r[P].coordinate+r[P+1].coordinate)/2||P===s-1&&t>(r[P].coordinate+r[P-1].coordinate)/2){a=r[P].index;break}return a},Gj=function(t){var n,r=t,o=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Xr(Xr({},t.type.defaultProps),t.props):t.props,a=i.stroke,s=i.fill,l;switch(o){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:s;break;default:l=s;break}return l},Fqe=function(t){var n=t.barSize,r=t.totalSize,o=t.stackGroups,i=o===void 0?{}:o;if(!i)return{};for(var a={},s=Object.keys(i),l=0,c=s.length;l=0});if(w&&w.length){var x=w[0].type.defaultProps,S=x!==void 0?Xr(Xr({},x),w[0].props):w[0].props,P=S.barSize,T=S[v];a[T]||(a[T]=[]);var E=Ft(P)?n:P;a[T].push({item:w[0],stackList:w.slice(1),barSize:Ft(E)?void 0:Li(E,r,0)})}}return a},jqe=function(t){var n=t.barGap,r=t.barCategoryGap,o=t.bandSize,i=t.sizeList,a=i===void 0?[]:i,s=t.maxBarSize,l=a.length;if(l<1)return null;var c=Li(n,o,0,!0),u,d=[];if(a[0].barSize===+a[0].barSize){var f=!1,p=o/l,m=a.reduce(function(P,T){return P+T.barSize||0},0);m+=(l-1)*c,m>=o&&(m-=(l-1)*c,c=0),m>=o&&p>0&&(f=!0,p*=.9,m=l*p);var g=(o-m)/2>>0,v={offset:g-c,size:0};u=a.reduce(function(P,T){var E={item:T.item,position:{offset:v.offset+v.size+c,size:f?p:T.barSize}},O=[].concat(N6(P),[E]);return v=O[O.length-1].position,T.stackList&&T.stackList.length&&T.stackList.forEach(function(k){O.push({item:k,position:v})}),O},d)}else{var w=Li(r,o,0,!0);o-2*w-(l-1)*c<=0&&(c=0);var x=(o-2*w-(l-1)*c)/l;x>1&&(x>>=0);var S=s===+s?Math.min(x,s):x;u=a.reduce(function(P,T,E){var O=[].concat(N6(P),[{item:T.item,position:{offset:w+(x+c)*E+(x-S)/2,size:S}}]);return T.stackList&&T.stackList.length&&T.stackList.forEach(function(k){O.push({item:k,position:O[O.length-1].position})}),O},d)}return u},Bqe=function(t,n,r,o){var i=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),c=vne({children:i,legendWidth:l});if(c){var u=o||{},d=u.width,f=u.height,p=c.align,m=c.verticalAlign,g=c.layout;if((g==="vertical"||g==="horizontal"&&m==="middle")&&p!=="center"&&ct(t[p]))return Xr(Xr({},t),{},Wg({},p,t[p]+(d||0)));if((g==="horizontal"||g==="vertical"&&p==="center")&&m!=="middle"&&ct(t[m]))return Xr(Xr({},t),{},Wg({},m,t[m]+(f||0)))}return t},zqe=function(t,n,r){return Ft(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},bne=function(t,n,r,o,i){var a=n.props.children,s=Vi(a,Gv).filter(function(c){return zqe(o,i,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,u){var d=Er(u,r);if(Ft(d))return c;var f=Array.isArray(d)?[nk(d),Yd(d)]:[d,d],p=l.reduce(function(m,g){var v=Er(u,g,0),w=f[0]-Math.abs(Array.isArray(v)?v[0]:v),x=f[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(w,m[0]),Math.max(x,m[1])]},[1/0,-1/0]);return[Math.min(p[0],c[0]),Math.max(p[1],c[1])]},[1/0,-1/0])}return null},Vqe=function(t,n,r,o,i){var a=n.map(function(s){return bne(t,s,r,i,o)}).filter(function(s){return!Ft(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},wne=function(t,n,r,o,i){var a=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&bne(t,l,c,o)||tw(t,c,r,i)});if(r==="number")return a.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,c){for(var u=0,d=c.length;u=2?Ni(s[0]-s[1])*2*c:c,n&&(t.ticks||t.niceTicks)){var u=(t.ticks||t.niceTicks).map(function(d){var f=i?i.indexOf(d):d;return{coordinate:o(f)+c,value:d,offset:c}});return u.filter(function(d){return!Fv(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,f){return{coordinate:o(d)+c,value:d,index:f,offset:c}}):o.ticks&&!r?o.ticks(t.tickCount).map(function(d){return{coordinate:o(d)+c,value:d,offset:c}}):o.domain().map(function(d,f){return{coordinate:o(d)+c,value:i?i[d]:d,index:f,offset:c}})},_$=new WeakMap,RC=function(t,n){if(typeof n!="function")return t;_$.has(t)||_$.set(t,new WeakMap);var r=_$.get(t);if(r.has(n))return r.get(n);var o=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,o),o},Cne=function(t,n,r){var o=t.scale,i=t.type,a=t.layout,s=t.axisType;if(o==="auto")return a==="radial"&&s==="radiusAxis"?{scale:Jw(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:tE(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:ew(),realScaleType:"point"}:i==="category"?{scale:Jw(),realScaleType:"band"}:{scale:tE(),realScaleType:"linear"};if(CS(o)){var l="scale".concat(BI(o));return{scale:(M6[l]||ew)(),realScaleType:M6[l]?l:"point"}}return Vt(o)?{scale:o}:{scale:ew(),realScaleType:"point"}},F6=1e-4,Pne=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,o=t.range(),i=Math.min(o[0],o[1])-F6,a=Math.max(o[0],o[1])+F6,s=t(n[0]),l=t(n[r-1]);(sa||la)&&t.domain([n[0],n[r-1]])}},Hqe=function(t,n){if(!t)return null;for(var r=0,o=t.length;ro)&&(i[1]=o),i[0]>o&&(i[0]=o),i[1]=0?(t[s][r][0]=i,t[s][r][1]=i+l,i=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1])}},Gqe=function(t){var n=t.length;if(!(n<=0))for(var r=0,o=t[0].length;r=0?(t[a][r][0]=i,t[a][r][1]=i+s,i=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},qqe={sign:Wqe,expand:fze,none:ky,silhouette:pze,wiggle:hze,positive:Gqe},Kqe=function(t,n,r){var o=n.map(function(s){return s.props.dataKey}),i=qqe[r],a=dze().keys(o).value(function(s,l){return+Er(s,l,0)}).order(k_).offset(i);return a(t)},Yqe=function(t,n,r,o,i,a){if(!t)return null;var s=a?n.reverse():n,l={},c=s.reduce(function(d,f){var p,m=(p=f.type)!==null&&p!==void 0&&p.defaultProps?Xr(Xr({},f.type.defaultProps),f.props):f.props,g=m.stackId,v=m.hide;if(v)return d;var w=m[r],x=d[w]||{hasStack:!1,stackGroups:{}};if(Io(g)){var S=x.stackGroups[g]||{numericAxisId:r,cateAxisId:o,items:[]};S.items.push(f),x.hasStack=!0,x.stackGroups[g]=S}else x.stackGroups[Nf("_stackId_")]={numericAxisId:r,cateAxisId:o,items:[f]};return Xr(Xr({},d),{},Wg({},w,x))},l),u={};return Object.keys(c).reduce(function(d,f){var p=c[f];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(g,v){var w=p.stackGroups[v];return Xr(Xr({},g),{},Wg({},v,{numericAxisId:r,cateAxisId:o,items:w.items,stackedData:Kqe(t,w.items,i)}))},m)}return Xr(Xr({},d),{},Wg({},f,p))},u)},Tne=function(t,n){var r=n.realScaleType,o=n.type,i=n.tickCount,a=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&o==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var c=t.domain();if(!c.length)return null;var u=cqe(c,i,s);return t.domain([nk(u),Yd(u)]),{niceTicks:u}}if(i&&o==="number"){var d=t.domain(),f=uqe(d,i,s);return{niceTicks:f}}return null};function Fy(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ft(o[t.dataKey])){var s=_T(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=Er(o,Ft(a)?t.dataKey:a);return Ft(l)?null:t.scale(l)}var j6=function(t){var n=t.axis,r=t.ticks,o=t.offset,i=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+o:null;var l=Er(a,n.dataKey,n.domain[s]);return Ft(l)?null:n.scale(l)-i/2+o},Xqe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var o=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return o<=0&&i>=0?0:i<0?i:o}return r[0]},Qqe=function(t,n){var r,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Xr(Xr({},t.type.defaultProps),t.props):t.props,i=o.stackId;if(Io(i)){var a=n[i];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},Jqe=function(t){return t.reduce(function(n,r){return[nk(r.concat([n[0]]).filter(ct)),Yd(r.concat([n[1]]).filter(ct))]},[1/0,-1/0])},Ene=function(t,n,r){return Object.keys(t).reduce(function(o,i){var a=t[i],s=a.stackedData,l=s.reduce(function(c,u){var d=Jqe(u.slice(n,r+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],o[0]),Math.max(l[1],o[1])]},[1/0,-1/0]).map(function(o){return o===1/0||o===-1/0?0:o})},B6=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,z6=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,iD=function(t,n,r){if(Vt(t))return t(n,r);if(!Array.isArray(t))return n;var o=[];if(ct(t[0]))o[0]=r?t[0]:Math.min(t[0],n[0]);else if(B6.test(t[0])){var i=+B6.exec(t[0])[1];o[0]=n[0]-i}else Vt(t[0])?o[0]=t[0](n[0]):o[0]=n[0];if(ct(t[1]))o[1]=r?t[1]:Math.max(t[1],n[1]);else if(z6.test(t[1])){var a=+z6.exec(t[1])[1];o[1]=n[1]+a}else Vt(t[1])?o[1]=t[1](n[1]):o[1]=n[1];return o},lE=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var o=t.scale.bandwidth();if(!r||o>0)return o}if(t&&n&&n.length>=2){for(var i=wj(n,function(d){return d.coordinate}),a=1/0,s=1,l=i.length;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},sKe=function(t,n,r,o,i){var a=t.width,s=t.height,l=t.startAngle,c=t.endAngle,u=Li(t.cx,a,a/2),d=Li(t.cy,s,s/2),f=kne(a,s,r),p=Li(t.innerRadius,f,0),m=Li(t.outerRadius,f,f*.8),g=Object.keys(n);return g.reduce(function(v,w){var x=n[w],S=x.domain,P=x.reversed,T;if(Ft(x.range))o==="angleAxis"?T=[l,c]:o==="radiusAxis"&&(T=[p,m]),P&&(T=[T[1],T[0]]);else{T=x.range;var E=T,O=tKe(E,2);l=O[0],c=O[1]}var k=Cne(x,i),A=k.realScaleType,I=k.scale;I.domain(S).range(T),Pne(I);var R=Tne(I,du(du({},x),{},{realScaleType:A})),L=du(du(du({},x),R),{},{range:T,radius:m,realScaleType:A,scale:I,cx:u,cy:d,innerRadius:p,outerRadius:m,startAngle:l,endAngle:c});return du(du({},v),{},Ine({},w,L))},{})},lKe=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(o-a,2))},cKe=function(t,n){var r=t.x,o=t.y,i=n.cx,a=n.cy,s=lKe({x:r,y:o},{x:i,y:a});if(s<=0)return{radius:s};var l=(r-i)/s,c=Math.acos(l);return o>a&&(c=2*Math.PI-c),{radius:s,angle:aKe(c),angleInRadian:c}},uKe=function(t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360),a=Math.min(o,i);return{startAngle:n-a*360,endAngle:r-a*360}},dKe=function(t,n){var r=n.startAngle,o=n.endAngle,i=Math.floor(r/360),a=Math.floor(o/360),s=Math.min(i,a);return t+s*360},W6=function(t,n){var r=t.x,o=t.y,i=cKe({x:r,y:o},n),a=i.radius,s=i.angle,l=n.innerRadius,c=n.outerRadius;if(ac)return!1;if(a===0)return!0;var u=uKe(n),d=u.startAngle,f=u.endAngle,p=s,m;if(d<=f){for(;p>f;)p-=360;for(;p=d&&p<=f}else{for(;p>d;)p-=360;for(;p=f&&p<=d}return m?du(du({},n),{},{radius:a,angle:dKe(p,n)}):null},Mne=function(t){return!y.isValidElement(t)&&!Vt(t)&&typeof t!="boolean"?t.className:""};function lx(e){"@babel/helpers - typeof";return lx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lx(e)}var fKe=["offset"];function pKe(e){return yKe(e)||gKe(e)||mKe(e)||hKe()}function hKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mKe(e,t){if(e){if(typeof e=="string")return aD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aD(e,t)}}function gKe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yKe(e){if(Array.isArray(e))return aD(e)}function aD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bKe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function G6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Po(e){for(var t=1;t=0?1:-1,S,P;o==="insideStart"?(S=p+x*a,P=g):o==="insideEnd"?(S=m-x*a,P=!g):o==="end"&&(S=m+x*a,P=g),P=w<=0?P:!P;var T=br(c,u,v,S),E=br(c,u,v,S+(P?1:-1)*359),O="M".concat(T.x,",").concat(T.y,` - A`).concat(v,",").concat(v,",0,1,").concat(P?0:1,`, - `).concat(E.x,",").concat(E.y),k=Ft(t.id)?Nf("recharts-radial-line-"):t.id;return K.createElement("text",cx({},r,{dominantBaseline:"central",className:fe("recharts-radial-bar-label",s)}),K.createElement("defs",null,K.createElement("path",{id:k,d:O})),K.createElement("textPath",{xlinkHref:"#".concat(k)},n))},EKe=function(t){var n=t.viewBox,r=t.offset,o=t.position,i=n,a=i.cx,s=i.cy,l=i.innerRadius,c=i.outerRadius,u=i.startAngle,d=i.endAngle,f=(u+d)/2;if(o==="outside"){var p=br(a,s,c+r,f),m=p.x,g=p.y;return{x:m,y:g,textAnchor:m>=a?"start":"end",verticalAnchor:"middle"}}if(o==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(o==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(o==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var v=(l+c)/2,w=br(a,s,v,f),x=w.x,S=w.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},OKe=function(t){var n=t.viewBox,r=t.parentViewBox,o=t.offset,i=t.position,a=n,s=a.x,l=a.y,c=a.width,u=a.height,d=u>=0?1:-1,f=d*o,p=d>0?"end":"start",m=d>0?"start":"end",g=c>=0?1:-1,v=g*o,w=g>0?"end":"start",x=g>0?"start":"end";if(i==="top"){var S={x:s+c/2,y:l-d*o,textAnchor:"middle",verticalAnchor:p};return Po(Po({},S),r?{height:Math.max(l-r.y,0),width:c}:{})}if(i==="bottom"){var P={x:s+c/2,y:l+u+f,textAnchor:"middle",verticalAnchor:m};return Po(Po({},P),r?{height:Math.max(r.y+r.height-(l+u),0),width:c}:{})}if(i==="left"){var T={x:s-v,y:l+u/2,textAnchor:w,verticalAnchor:"middle"};return Po(Po({},T),r?{width:Math.max(T.x-r.x,0),height:u}:{})}if(i==="right"){var E={x:s+c+v,y:l+u/2,textAnchor:x,verticalAnchor:"middle"};return Po(Po({},E),r?{width:Math.max(r.x+r.width-E.x,0),height:u}:{})}var O=r?{width:c,height:u}:{};return i==="insideLeft"?Po({x:s+v,y:l+u/2,textAnchor:x,verticalAnchor:"middle"},O):i==="insideRight"?Po({x:s+c-v,y:l+u/2,textAnchor:w,verticalAnchor:"middle"},O):i==="insideTop"?Po({x:s+c/2,y:l+f,textAnchor:"middle",verticalAnchor:m},O):i==="insideBottom"?Po({x:s+c/2,y:l+u-f,textAnchor:"middle",verticalAnchor:p},O):i==="insideTopLeft"?Po({x:s+v,y:l+f,textAnchor:x,verticalAnchor:m},O):i==="insideTopRight"?Po({x:s+c-v,y:l+f,textAnchor:w,verticalAnchor:m},O):i==="insideBottomLeft"?Po({x:s+v,y:l+u-f,textAnchor:x,verticalAnchor:p},O):i==="insideBottomRight"?Po({x:s+c-v,y:l+u-f,textAnchor:w,verticalAnchor:p},O):_v(i)&&(ct(i.x)||Rp(i.x))&&(ct(i.y)||Rp(i.y))?Po({x:s+Li(i.x,c),y:l+Li(i.y,u),textAnchor:"end",verticalAnchor:"end"},O):Po({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},O)},IKe=function(t){return"cx"in t&&ct(t.cx)};function Bo(e){var t=e.offset,n=t===void 0?5:t,r=vKe(e,fKe),o=Po({offset:n},r),i=o.viewBox,a=o.position,s=o.value,l=o.children,c=o.content,u=o.className,d=u===void 0?"":u,f=o.textBreakAll;if(!i||Ft(s)&&Ft(l)&&!y.isValidElement(c)&&!Vt(c))return null;if(y.isValidElement(c))return y.cloneElement(c,o);var p;if(Vt(c)){if(p=y.createElement(c,o),y.isValidElement(p))return p}else p=CKe(o);var m=IKe(i),g=At(o,!0);if(m&&(a==="insideStart"||a==="insideEnd"||a==="end"))return TKe(o,p,g);var v=m?EKe(o):OKe(o);return K.createElement(bh,cx({className:fe("recharts-label",d)},g,v,{breakAll:f}),p)}Bo.displayName="Label";var Ane=function(t){var n=t.cx,r=t.cy,o=t.angle,i=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,u=t.outerRadius,d=t.x,f=t.y,p=t.top,m=t.left,g=t.width,v=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(ct(g)&&ct(v)){if(ct(d)&&ct(f))return{x:d,y:f,width:g,height:v};if(ct(p)&&ct(m))return{x:p,y:m,width:g,height:v}}return ct(d)&&ct(f)?{x:d,y:f,width:0,height:0}:ct(n)&&ct(r)?{cx:n,cy:r,startAngle:i||o||0,endAngle:a||o||0,innerRadius:c||0,outerRadius:u||l||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},kKe=function(t,n){return t?t===!0?K.createElement(Bo,{key:"label-implicit",viewBox:n}):Io(t)?K.createElement(Bo,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===Bo?y.cloneElement(t,{key:"label-implicit",viewBox:n}):K.createElement(Bo,{key:"label-implicit",content:t,viewBox:n}):Vt(t)?K.createElement(Bo,{key:"label-implicit",content:t,viewBox:n}):_v(t)?K.createElement(Bo,cx({viewBox:n},t,{key:"label-implicit"})):null:null},MKe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var o=t.children,i=Ane(t),a=Vi(o,Bo).map(function(l,c){return y.cloneElement(l,{viewBox:n||i,key:"label-".concat(c)})});if(!r)return a;var s=kKe(t.label,n||i);return[s].concat(pKe(a))};Bo.parseViewBox=Ane;Bo.renderCallByParent=MKe;function AKe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var $Ke=AKe;const RKe=_n($Ke);function ux(e){"@babel/helpers - typeof";return ux=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ux(e)}var _Ke=["valueAccessor"],DKe=["data","dataKey","clockWise","id","textBreakAll"];function NKe(e){return BKe(e)||jKe(e)||FKe(e)||LKe()}function LKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FKe(e,t){if(e){if(typeof e=="string")return sD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sD(e,t)}}function jKe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BKe(e){if(Array.isArray(e))return sD(e)}function sD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UKe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var WKe=function(t){return Array.isArray(t.value)?RKe(t.value):t.value};function Ul(e){var t=e.valueAccessor,n=t===void 0?WKe:t,r=Y6(e,_Ke),o=r.data,i=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,c=Y6(r,DKe);return!o||!o.length?null:K.createElement(rn,{className:"recharts-label-list"},o.map(function(u,d){var f=Ft(i)?n(u,d):Er(u&&u.payload,i),p=Ft(s)?{}:{id:"".concat(s,"-").concat(d)};return K.createElement(Bo,uE({},At(u,!0),c,p,{parentViewBox:u.parentViewBox,value:f,textBreakAll:l,viewBox:Bo.parseViewBox(Ft(a)?u:K6(K6({},u),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Ul.displayName="LabelList";function GKe(e,t){return e?e===!0?K.createElement(Ul,{key:"labelList-implicit",data:t}):K.isValidElement(e)||Vt(e)?K.createElement(Ul,{key:"labelList-implicit",data:t,content:e}):_v(e)?K.createElement(Ul,uE({data:t},e,{key:"labelList-implicit"})):null:null}function qKe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=Vi(r,Ul).map(function(a,s){return y.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return o;var i=GKe(e.label,t);return[i].concat(NKe(o))}Ul.renderCallByParent=qKe;function dx(e){"@babel/helpers - typeof";return dx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dx(e)}function lD(){return lD=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ks.isSsr)return{width:0,height:0};var r=rGe(n),o=JSON.stringify({text:t,copyStyle:r});if($m.widthCache[o])return $m.widthCache[o];try{var i=document.getElementById(NW);i||(i=document.createElement("span"),i.setAttribute("id",NW),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var a=zD(zD({},nGe),r);Object.assign(i.style,a),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return $m.widthCache[o]=l,++$m.cacheCount>tGe&&($m.cacheCount=0,$m.widthCache={}),l}catch{return{width:0,height:0}}},oGe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Qw(e){"@babel/helpers - typeof";return Qw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qw(e)}function UE(e,t){return lGe(e)||sGe(e,t)||aGe(e,t)||iGe()}function iGe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aGe(e,t){if(e){if(typeof e=="string")return FW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FW(e,t)}}function FW(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SGe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function UW(e,t){return TGe(e)||EGe(e,t)||PGe(e,t)||CGe()}function CGe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PGe(e,t){if(e){if(typeof e=="string")return WW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WW(e,t)}}function WW(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return L.reduce(function(F,U){var V=U.word,z=U.width,W=F[F.length-1];if(W&&(o==null||i||W.width+z+rU.width?F:U})};if(!u)return p;for(var g="…",y=function(L){var F=d.slice(0,L),U=bte({breakAll:c,style:l,children:F+g}).wordsWithComputedWidth,V=f(U),z=V.length>a||m(V).width>Number(o);return[z,V]},b=0,x=d.length-1,S=0,P;b<=x&&S<=d.length-1;){var E=Math.floor((b+x)/2),T=E-1,O=y(T),k=UW(O,2),M=k[0],I=k[1],R=y(E),_=UW(R,1),N=_[0];if(!M&&!N&&(b=E+1),M&&N&&(x=E-1),!M&&N){P=I;break}S++}return P||p},GW=function(t){var n=Bt(t)?[]:t.toString().split(vte);return[{words:n}]},IGe=function(t){var n=t.width,r=t.scaleToFit,o=t.children,i=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!Ks.isSsr){var l,c,u=bte({breakAll:a,children:o,style:i});if(u){var d=u.wordsWithComputedWidth,f=u.spaceWidth;l=d,c=f}else return GW(o);return OGe({breakAll:a,children:o,maxLines:s,style:i},l,c,n,r)}return GW(o)},qW="#808080",bh=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,c=l===void 0?"0.71em":l,u=t.scaleToFit,d=u===void 0?!1:u,f=t.textAnchor,p=f===void 0?"start":f,m=t.verticalAnchor,g=m===void 0?"end":m,y=t.fill,b=y===void 0?qW:y,x=HW(t,wGe),S=v.useMemo(function(){return IGe({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:d,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,d,x.style,x.width]),P=x.dx,E=x.dy,T=x.angle,O=x.className,k=x.breakAll,M=HW(x,xGe);if(!Mo(r)||!Mo(i))return null;var I=r+(at(P)?P:0),R=i+(at(E)?E:0),_;switch(g){case"start":_=S$("calc(".concat(c,")"));break;case"middle":_=S$("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:_=S$("calc(".concat(S.length-1," * -").concat(s,")"));break}var N=[];if(d){var B=S[0].width,L=x.width;N.push("scale(".concat((at(L)?L/B:1)/B,")"))}return T&&N.push("rotate(".concat(T,", ").concat(I,", ").concat(R,")")),N.length&&(M.transform=N.join(" ")),Y.createElement("text",VD({},At(M,!0),{x:I,y:R,className:pe("recharts-text",O),textAnchor:p,fill:b.includes("url")?qW:b}),S.map(function(F,U){var V=F.words.join(k?"":" ");return Y.createElement("tspan",{x:I,dy:U===0?_:s,key:"".concat(V,"-").concat(U)},V)}))};function uf(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function kGe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Sj(e){let t,n,r;e.length!==2?(t=uf,n=(s,l)=>uf(e(s),l),r=(s,l)=>e(s)-l):(t=e===uf||e===kGe?e:MGe,n=e,r=e);function o(s,l,c=0,u=s.length){if(c>>1;n(s[d],l)<0?c=d+1:u=d}while(c>>1;n(s[d],l)<=0?c=d+1:u=d}while(cc&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:o,center:a,right:i}}function MGe(){return 0}function wte(e){return e===null?NaN:+e}function*AGe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const $Ge=Sj(uf),ES=$Ge.right;Sj(wte).center;class KW extends Map{constructor(t,n=_Ge){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(YW(this,t))}has(t){return super.has(YW(this,t))}set(t,n){return super.set(RGe(this,t),n)}delete(t){return super.delete(DGe(this,t))}}function YW({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function RGe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function DGe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function _Ge(e){return e!==null&&typeof e=="object"?e.valueOf():e}function LGe(e=uf){if(e===uf)return xte;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function xte(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const NGe=Math.sqrt(50),FGe=Math.sqrt(10),jGe=Math.sqrt(2);function WE(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=NGe?10:i>=FGe?5:i>=jGe?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/ct&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*ct&&--l),l0))return[];if(e===t)return[e];const r=t=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let c=0;c=r)&&(n=r);return n}function QW(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Ste(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=o===void 0?xte:LGe(o);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+f)),m=Math.min(r,Math.floor(t+(l-c)*d/l+f));Ste(e,t,p,m,o)}const i=e[t];let a=n,s=r;for(Xb(e,n,t),o(e[r],i)>0&&Xb(e,n,r);a0;)--s}o(e[n],i)===0?Xb(e,n,s):(++s,Xb(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Xb(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function BGe(e,t,n){if(e=Float64Array.from(AGe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return QW(e);if(t>=1)return XW(e);var r,o=(r-1)*t,i=Math.floor(o),a=XW(Ste(e,i).subarray(0,i+1)),s=QW(e.subarray(i+1));return a+(s-a)*(o-i)}}function zGe(e,t,n=wte){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e),s=+n(e[i+1],i+1,e);return a+(s-a)*(o-i)}}function VGe(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?kC(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?kC(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=UGe.exec(e))?new ua(t[1],t[2],t[3],1):(t=WGe.exec(e))?new ua(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=GGe.exec(e))?kC(t[1],t[2],t[3],t[4]):(t=qGe.exec(e))?kC(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=KGe.exec(e))?o6(t[1],t[2]/100,t[3]/100,1):(t=YGe.exec(e))?o6(t[1],t[2]/100,t[3]/100,t[4]):JW.hasOwnProperty(e)?t6(JW[e]):e==="transparent"?new ua(NaN,NaN,NaN,0):null}function t6(e){return new ua(e>>16&255,e>>8&255,e&255,1)}function kC(e,t,n,r){return r<=0&&(e=t=n=NaN),new ua(e,t,n,r)}function JGe(e){return e instanceof TS||(e=tx(e)),e?(e=e.rgb(),new ua(e.r,e.g,e.b,e.opacity)):new ua}function qD(e,t,n,r){return arguments.length===1?JGe(e):new ua(e,t,n,r??1)}function ua(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Pj(ua,qD,Pte(TS,{brighter(e){return e=e==null?GE:Math.pow(GE,e),new ua(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Zw:Math.pow(Zw,e),new ua(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ua(Zp(this.r),Zp(this.g),Zp(this.b),qE(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:n6,formatHex:n6,formatHex8:ZGe,formatRgb:r6,toString:r6}));function n6(){return`#${_p(this.r)}${_p(this.g)}${_p(this.b)}`}function ZGe(){return`#${_p(this.r)}${_p(this.g)}${_p(this.b)}${_p((isNaN(this.opacity)?1:this.opacity)*255)}`}function r6(){const e=qE(this.opacity);return`${e===1?"rgb(":"rgba("}${Zp(this.r)}, ${Zp(this.g)}, ${Zp(this.b)}${e===1?")":`, ${e})`}`}function qE(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Zp(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _p(e){return e=Zp(e),(e<16?"0":"")+e.toString(16)}function o6(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new _l(e,t,n,r)}function Ete(e){if(e instanceof _l)return new _l(e.h,e.s,e.l,e.opacity);if(e instanceof TS||(e=tx(e)),!e)return new _l;if(e instanceof _l)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(n-r)/s+(n0&&l<1?0:a,new _l(a,s,l,e.opacity)}function e8e(e,t,n,r){return arguments.length===1?Ete(e):new _l(e,t,n,r??1)}function _l(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Pj(_l,e8e,Pte(TS,{brighter(e){return e=e==null?GE:Math.pow(GE,e),new _l(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Zw:Math.pow(Zw,e),new _l(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new ua(C$(e>=240?e-240:e+120,o,r),C$(e,o,r),C$(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new _l(i6(this.h),MC(this.s),MC(this.l),qE(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=qE(this.opacity);return`${e===1?"hsl(":"hsla("}${i6(this.h)}, ${MC(this.s)*100}%, ${MC(this.l)*100}%${e===1?")":`, ${e})`}`}}));function i6(e){return e=(e||0)%360,e<0?e+360:e}function MC(e){return Math.max(0,Math.min(1,e||0))}function C$(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Ej=e=>()=>e;function t8e(e,t){return function(n){return e+n*t}}function n8e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function r8e(e){return(e=+e)==1?Tte:function(t,n){return n-t?n8e(t,n,e):Ej(isNaN(t)?n:t)}}function Tte(e,t){var n=t-e;return n?t8e(e,n):Ej(isNaN(e)?t:e)}const a6=function e(t){var n=r8e(t);function r(o,i){var a=n((o=qD(o)).r,(i=qD(i)).r),s=n(o.g,i.g),l=n(o.b,i.b),c=Tte(o.opacity,i.opacity);return function(u){return o.r=a(u),o.g=s(u),o.b=l(u),o.opacity=c(u),o+""}}return r.gamma=e,r}(1);function o8e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;on&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:KE(r,o)})),n=P$.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function m8e(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o2?g8e:m8e,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?i:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(o((c||(c=s(t,e.map(r),KE)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,YE),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=Tj,u()},d.clamp=function(f){return arguments.length?(a=f?!0:Fi,u()):a!==Fi},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(i=f,d):i},function(f,p){return r=f,o=p,u()}}function Oj(){return WI()(Fi,Fi)}function y8e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function XE(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function $y(e){return e=XE(Math.abs(e)),e?e[1]:NaN}function v8e(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function b8e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var w8e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function nx(e){if(!(t=w8e.exec(e)))throw new Error("invalid format: "+e);var t;return new Ij({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}nx.prototype=Ij.prototype;function Ij(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Ij.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function x8e(e){e:for(var t=e.length,n=1,r=-1,o;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var Ote;function S8e(e,t){var n=XE(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(Ote=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+XE(e,Math.max(0,t+i-1))[0]}function l6(e,t){var n=XE(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const c6={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:y8e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>l6(e*100,t),r:l6,s:S8e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function u6(e){return e}var d6=Array.prototype.map,f6=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function C8e(e){var t=e.grouping===void 0||e.thousands===void 0?u6:v8e(d6.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?u6:b8e(d6.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=nx(d);var f=d.fill,p=d.align,m=d.sign,g=d.symbol,y=d.zero,b=d.width,x=d.comma,S=d.precision,P=d.trim,E=d.type;E==="n"?(x=!0,E="g"):c6[E]||(S===void 0&&(S=12),P=!0,E="g"),(y||f==="0"&&p==="=")&&(y=!0,f="0",p="=");var T=g==="$"?n:g==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",O=g==="$"?r:/[%p]/.test(E)?a:"",k=c6[E],M=/[defgprs%]/.test(E);S=S===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function I(R){var _=T,N=O,B,L,F;if(E==="c")N=k(R)+N,R="";else{R=+R;var U=R<0||1/R<0;if(R=isNaN(R)?l:k(Math.abs(R),S),P&&(R=x8e(R)),U&&+R==0&&m!=="+"&&(U=!1),_=(U?m==="("?m:s:m==="-"||m==="("?"":m)+_,N=(E==="s"?f6[8+Ote/3]:"")+N+(U&&m==="("?")":""),M){for(B=-1,L=R.length;++BF||F>57){N=(F===46?o+R.slice(B+1):R.slice(B))+N,R=R.slice(0,B);break}}}x&&!y&&(R=t(R,1/0));var V=_.length+R.length+N.length,z=V>1)+_+R+N+z.slice(V);break;default:R=z+_+R+N;break}return i(R)}return I.toString=function(){return d+""},I}function u(d,f){var p=c((d=nx(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor($y(f)/3)))*3,g=Math.pow(10,-m),y=f6[8+m/3];return function(b){return p(g*b)+y}}return{format:c,formatPrefix:u}}var AC,kj,Ite;P8e({thousands:",",grouping:[3],currency:["$",""]});function P8e(e){return AC=C8e(e),kj=AC.format,Ite=AC.formatPrefix,AC}function E8e(e){return Math.max(0,-$y(Math.abs(e)))}function T8e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($y(t)/3)))*3-$y(Math.abs(e)))}function O8e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$y(t)-$y(e))+1}function kte(e,t,n,r){var o=WD(e,t,n),i;switch(r=nx(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=T8e(o,a))&&(r.precision=i),Ite(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=O8e(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=E8e(o))&&(r.precision=i-(r.type==="%")*2);break}}return kj(r)}function Ff(e){var t=e.domain;return e.ticks=function(n){var r=t();return HD(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return kte(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],s=r[i],l,c,u=10;for(s0;){if(c=UD(a,s,n),c===l)return r[o]=a,r[i]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function QE(){var e=Oj();return e.copy=function(){return OS(e,QE())},al.apply(e,arguments),Ff(e)}function Mte(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,YE),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Mte(e).unknown(t)},e=arguments.length?Array.from(e,YE):[0,1],Ff(n)}function Ate(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return iMath.pow(e,t)}function $8e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function m6(e){return(t,n)=>-e(-t,n)}function Mj(e){const t=e(p6,h6),n=t.domain;let r=10,o,i;function a(){return o=$8e(r),i=A8e(r),n()[0]<0?(o=m6(o),i=m6(i),e(I8e,k8e)):e(p6,h6),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u0){for(;f<=p;++f)for(m=1;mu)break;b.push(g)}}else for(;f<=p;++f)for(m=r-1;m>=1;--m)if(g=f>0?m/i(-f):m*i(f),!(gu)break;b.push(g)}b.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=nx(l)).precision==null&&(l.trim=!0),l=kj(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/i(Math.round(o(u)));return d*rn(Ate(n(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function $te(){const e=Mj(WI()).domain([1,10]);return e.copy=()=>OS(e,$te()).base(e.base()),al.apply(e,arguments),e}function g6(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function y6(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Aj(e){var t=1,n=e(g6(t),y6(t));return n.constant=function(r){return arguments.length?e(g6(t=+r),y6(t)):t},Ff(n)}function Rte(){var e=Aj(WI());return e.copy=function(){return OS(e,Rte()).constant(e.constant())},al.apply(e,arguments)}function v6(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function R8e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function D8e(e){return e<0?-e*e:e*e}function $j(e){var t=e(Fi,Fi),n=1;function r(){return n===1?e(Fi,Fi):n===.5?e(R8e,D8e):e(v6(n),v6(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},Ff(t)}function Rj(){var e=$j(WI());return e.copy=function(){return OS(e,Rj()).exponent(e.exponent())},al.apply(e,arguments),e}function _8e(){return Rj.apply(null,arguments).exponent(.5)}function b6(e){return Math.sign(e)*e*e}function L8e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Dte(){var e=Oj(),t=[0,1],n=!1,r;function o(i){var a=L8e(e(i));return isNaN(a)?r:n?Math.round(a):a}return o.invert=function(i){return e.invert(b6(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,YE)).map(b6)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(n=!!i,o):n},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return Dte(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},al.apply(o,arguments),Ff(o)}function _te(){var e=[],t=[],n=[],r;function o(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(i=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Lte().domain([e,t]).range(o).unknown(i)},al.apply(Ff(a),arguments)}function Nte(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[ES(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return Nte().domain(e).range(t).unknown(n)},al.apply(o,arguments)}const E$=new Date,T$=new Date;function $o(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const l=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i0))return l;let c;do l.push(c=new Date(+i)),t(i,s),e(i);while(c$o(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(E$.setTime(+i),T$.setTime(+a),e(E$),e(T$),Math.floor(n(E$,T$))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const JE=$o(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);JE.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?$o(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):JE);JE.range;const bu=1e3,Fs=bu*60,wu=Fs*60,qu=wu*24,Dj=qu*7,w6=qu*30,O$=qu*365,Lp=$o(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*bu)},(e,t)=>(t-e)/bu,e=>e.getUTCSeconds());Lp.range;const _j=$o(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*bu)},(e,t)=>{e.setTime(+e+t*Fs)},(e,t)=>(t-e)/Fs,e=>e.getMinutes());_j.range;const Lj=$o(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Fs)},(e,t)=>(t-e)/Fs,e=>e.getUTCMinutes());Lj.range;const Nj=$o(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*bu-e.getMinutes()*Fs)},(e,t)=>{e.setTime(+e+t*wu)},(e,t)=>(t-e)/wu,e=>e.getHours());Nj.range;const Fj=$o(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*wu)},(e,t)=>(t-e)/wu,e=>e.getUTCHours());Fj.range;const IS=$o(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Fs)/qu,e=>e.getDate()-1);IS.range;const GI=$o(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qu,e=>e.getUTCDate()-1);GI.range;const Fte=$o(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qu,e=>Math.floor(e/qu));Fte.range;function Nh(e){return $o(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Fs)/Dj)}const qI=Nh(0),ZE=Nh(1),N8e=Nh(2),F8e=Nh(3),Ry=Nh(4),j8e=Nh(5),B8e=Nh(6);qI.range;ZE.range;N8e.range;F8e.range;Ry.range;j8e.range;B8e.range;function Fh(e){return $o(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Dj)}const KI=Fh(0),eT=Fh(1),z8e=Fh(2),V8e=Fh(3),Dy=Fh(4),H8e=Fh(5),U8e=Fh(6);KI.range;eT.range;z8e.range;V8e.range;Dy.range;H8e.range;U8e.range;const jj=$o(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());jj.range;const Bj=$o(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Bj.range;const Ku=$o(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ku.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:$o(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Ku.range;const Yu=$o(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Yu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:$o(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Yu.range;function jte(e,t,n,r,o,i){const a=[[Lp,1,bu],[Lp,5,5*bu],[Lp,15,15*bu],[Lp,30,30*bu],[i,1,Fs],[i,5,5*Fs],[i,15,15*Fs],[i,30,30*Fs],[o,1,wu],[o,3,3*wu],[o,6,6*wu],[o,12,12*wu],[r,1,qu],[r,2,2*qu],[n,1,Dj],[t,1,w6],[t,3,3*w6],[e,1,O$]];function s(c,u,d){const f=uy).right(a,f);if(p===a.length)return e.every(WD(c/O$,u/O$,d));if(p===0)return JE.every(Math.max(WD(c,u,d),1));const[m,g]=a[f/a[p-1][2]53)return null;"w"in Q||(Q.w=1),"Z"in Q?(ge=k$(Qb(Q.y,0,1)),xe=ge.getUTCDay(),ge=xe>4||xe===0?eT.ceil(ge):eT(ge),ge=GI.offset(ge,(Q.V-1)*7),Q.y=ge.getUTCFullYear(),Q.m=ge.getUTCMonth(),Q.d=ge.getUTCDate()+(Q.w+6)%7):(ge=I$(Qb(Q.y,0,1)),xe=ge.getDay(),ge=xe>4||xe===0?ZE.ceil(ge):ZE(ge),ge=IS.offset(ge,(Q.V-1)*7),Q.y=ge.getFullYear(),Q.m=ge.getMonth(),Q.d=ge.getDate()+(Q.w+6)%7)}else("W"in Q||"U"in Q)&&("w"in Q||(Q.w="u"in Q?Q.u%7:"W"in Q?1:0),xe="Z"in Q?k$(Qb(Q.y,0,1)).getUTCDay():I$(Qb(Q.y,0,1)).getDay(),Q.m=0,Q.d="W"in Q?(Q.w+6)%7+Q.W*7-(xe+5)%7:Q.w+Q.U*7-(xe+6)%7);return"Z"in Q?(Q.H+=Q.Z/100|0,Q.M+=Q.Z%100,k$(Q)):I$(Q)}}function k(ee,ce,le,Q){for(var ue=0,ge=ce.length,xe=le.length,me,be;ue=xe)return-1;if(me=ce.charCodeAt(ue++),me===37){if(me=ce.charAt(ue++),be=E[me in x6?ce.charAt(ue++):me],!be||(Q=be(ee,le,Q))<0)return-1}else if(me!=le.charCodeAt(Q++))return-1}return Q}function M(ee,ce,le){var Q=c.exec(ce.slice(le));return Q?(ee.p=u.get(Q[0].toLowerCase()),le+Q[0].length):-1}function I(ee,ce,le){var Q=p.exec(ce.slice(le));return Q?(ee.w=m.get(Q[0].toLowerCase()),le+Q[0].length):-1}function R(ee,ce,le){var Q=d.exec(ce.slice(le));return Q?(ee.w=f.get(Q[0].toLowerCase()),le+Q[0].length):-1}function _(ee,ce,le){var Q=b.exec(ce.slice(le));return Q?(ee.m=x.get(Q[0].toLowerCase()),le+Q[0].length):-1}function N(ee,ce,le){var Q=g.exec(ce.slice(le));return Q?(ee.m=y.get(Q[0].toLowerCase()),le+Q[0].length):-1}function B(ee,ce,le){return k(ee,t,ce,le)}function L(ee,ce,le){return k(ee,n,ce,le)}function F(ee,ce,le){return k(ee,r,ce,le)}function U(ee){return a[ee.getDay()]}function V(ee){return i[ee.getDay()]}function z(ee){return l[ee.getMonth()]}function W(ee){return s[ee.getMonth()]}function G(ee){return o[+(ee.getHours()>=12)]}function J(ee){return 1+~~(ee.getMonth()/3)}function K(ee){return a[ee.getUTCDay()]}function ne(ee){return i[ee.getUTCDay()]}function re(ee){return l[ee.getUTCMonth()]}function oe(ee){return s[ee.getUTCMonth()]}function fe(ee){return o[+(ee.getUTCHours()>=12)]}function se(ee){return 1+~~(ee.getUTCMonth()/3)}return{format:function(ee){var ce=T(ee+="",S);return ce.toString=function(){return ee},ce},parse:function(ee){var ce=O(ee+="",!1);return ce.toString=function(){return ee},ce},utcFormat:function(ee){var ce=T(ee+="",P);return ce.toString=function(){return ee},ce},utcParse:function(ee){var ce=O(ee+="",!0);return ce.toString=function(){return ee},ce}}}var x6={"-":"",_:" ",0:"0"},Go=/^\s*\d+/,X8e=/^%/,Q8e=/[\\^$*+?|[\]().{}]/g;function Un(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i[t.toLowerCase(),n]))}function Z8e(e,t,n){var r=Go.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function e9e(e,t,n){var r=Go.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function t9e(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function n9e(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function r9e(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function S6(e,t,n){var r=Go.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function C6(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function o9e(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function i9e(e,t,n){var r=Go.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function a9e(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function P6(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function s9e(e,t,n){var r=Go.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function E6(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function l9e(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function c9e(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function u9e(e,t,n){var r=Go.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function d9e(e,t,n){var r=Go.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function f9e(e,t,n){var r=X8e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function p9e(e,t,n){var r=Go.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function h9e(e,t,n){var r=Go.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function T6(e,t){return Un(e.getDate(),t,2)}function m9e(e,t){return Un(e.getHours(),t,2)}function g9e(e,t){return Un(e.getHours()%12||12,t,2)}function y9e(e,t){return Un(1+IS.count(Ku(e),e),t,3)}function Bte(e,t){return Un(e.getMilliseconds(),t,3)}function v9e(e,t){return Bte(e,t)+"000"}function b9e(e,t){return Un(e.getMonth()+1,t,2)}function w9e(e,t){return Un(e.getMinutes(),t,2)}function x9e(e,t){return Un(e.getSeconds(),t,2)}function S9e(e){var t=e.getDay();return t===0?7:t}function C9e(e,t){return Un(qI.count(Ku(e)-1,e),t,2)}function zte(e){var t=e.getDay();return t>=4||t===0?Ry(e):Ry.ceil(e)}function P9e(e,t){return e=zte(e),Un(Ry.count(Ku(e),e)+(Ku(e).getDay()===4),t,2)}function E9e(e){return e.getDay()}function T9e(e,t){return Un(ZE.count(Ku(e)-1,e),t,2)}function O9e(e,t){return Un(e.getFullYear()%100,t,2)}function I9e(e,t){return e=zte(e),Un(e.getFullYear()%100,t,2)}function k9e(e,t){return Un(e.getFullYear()%1e4,t,4)}function M9e(e,t){var n=e.getDay();return e=n>=4||n===0?Ry(e):Ry.ceil(e),Un(e.getFullYear()%1e4,t,4)}function A9e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Un(t/60|0,"0",2)+Un(t%60,"0",2)}function O6(e,t){return Un(e.getUTCDate(),t,2)}function $9e(e,t){return Un(e.getUTCHours(),t,2)}function R9e(e,t){return Un(e.getUTCHours()%12||12,t,2)}function D9e(e,t){return Un(1+GI.count(Yu(e),e),t,3)}function Vte(e,t){return Un(e.getUTCMilliseconds(),t,3)}function _9e(e,t){return Vte(e,t)+"000"}function L9e(e,t){return Un(e.getUTCMonth()+1,t,2)}function N9e(e,t){return Un(e.getUTCMinutes(),t,2)}function F9e(e,t){return Un(e.getUTCSeconds(),t,2)}function j9e(e){var t=e.getUTCDay();return t===0?7:t}function B9e(e,t){return Un(KI.count(Yu(e)-1,e),t,2)}function Hte(e){var t=e.getUTCDay();return t>=4||t===0?Dy(e):Dy.ceil(e)}function z9e(e,t){return e=Hte(e),Un(Dy.count(Yu(e),e)+(Yu(e).getUTCDay()===4),t,2)}function V9e(e){return e.getUTCDay()}function H9e(e,t){return Un(eT.count(Yu(e)-1,e),t,2)}function U9e(e,t){return Un(e.getUTCFullYear()%100,t,2)}function W9e(e,t){return e=Hte(e),Un(e.getUTCFullYear()%100,t,2)}function G9e(e,t){return Un(e.getUTCFullYear()%1e4,t,4)}function q9e(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Dy(e):Dy.ceil(e),Un(e.getUTCFullYear()%1e4,t,4)}function K9e(){return"+0000"}function I6(){return"%"}function k6(e){return+e}function M6(e){return Math.floor(+e/1e3)}var Rm,Ute,Wte;Y9e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Y9e(e){return Rm=Y8e(e),Ute=Rm.format,Rm.parse,Wte=Rm.utcFormat,Rm.utcParse,Rm}function X9e(e){return new Date(e)}function Q9e(e){return e instanceof Date?+e:+new Date(+e)}function zj(e,t,n,r,o,i,a,s,l,c){var u=Oj(),d=u.invert,f=u.domain,p=c(".%L"),m=c(":%S"),g=c("%I:%M"),y=c("%I %p"),b=c("%a %d"),x=c("%b %d"),S=c("%B"),P=c("%Y");function E(T){return(l(T)t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,i)=>BGe(e,i/r))},n.copy=function(){return Yte(t).domain(e)},td.apply(n,arguments)}function XI(){var e=0,t=.5,n=1,r=1,o,i,a,s,l,c=Fi,u,d=!1,f;function p(g){return isNaN(g=+g)?f:(g=.5+((g=+u(g))-i)*(r*gt}var Zte=o7e,i7e=QI,a7e=Zte,s7e=Bv;function l7e(e){return e&&e.length?i7e(e,s7e,a7e):void 0}var c7e=l7e;const Yd=Bn(c7e);function u7e(e,t){return ee.e^i.s<0?1:-1;for(r=i.d.length,o=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1};Tt.decimalPlaces=Tt.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Ir;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Tt.dividedBy=Tt.div=function(e){return Eu(this,new this.constructor(e))};Tt.dividedToIntegerBy=Tt.idiv=function(e){var t=this,n=t.constructor;return hr(Eu(t,new n(e),0,1),n.precision)};Tt.equals=Tt.eq=function(e){return!this.cmp(e)};Tt.exponent=function(){return yo(this)};Tt.greaterThan=Tt.gt=function(e){return this.cmp(e)>0};Tt.greaterThanOrEqualTo=Tt.gte=function(e){return this.cmp(e)>=0};Tt.isInteger=Tt.isint=function(){return this.e>this.d.length-2};Tt.isNegative=Tt.isneg=function(){return this.s<0};Tt.isPositive=Tt.ispos=function(){return this.s>0};Tt.isZero=function(){return this.s===0};Tt.lessThan=Tt.lt=function(e){return this.cmp(e)<0};Tt.lessThanOrEqualTo=Tt.lte=function(e){return this.cmp(e)<1};Tt.logarithm=Tt.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Va))throw Error(tl+"NaN");if(n.s<1)throw Error(tl+(n.s?"NaN":"-Infinity"));return n.eq(Va)?new r(0):(Nr=!1,t=Eu(rx(n,i),rx(e,i),i),Nr=!0,hr(t,o))};Tt.minus=Tt.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?one(t,e):nne(t,(e.s=-e.s,e))};Tt.modulo=Tt.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(tl+"NaN");return n.s?(Nr=!1,t=Eu(n,e,0,1).times(e),Nr=!0,n.minus(t)):hr(new r(n),o)};Tt.naturalExponential=Tt.exp=function(){return rne(this)};Tt.naturalLogarithm=Tt.ln=function(){return rx(this)};Tt.negated=Tt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Tt.plus=Tt.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?nne(t,e):one(t,(e.s=-e.s,e))};Tt.precision=Tt.sd=function(e){var t,n,r,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(eh+e);if(t=yo(o)+1,r=o.d.length-1,n=r*Ir+1,r=o.d[r],r){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Tt.squareRoot=Tt.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(tl+"NaN")}for(e=yo(s),Nr=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=xc(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=Uv((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(o.toString()),n=l.precision,o=a=n+3;;)if(i=r,r=i.plus(Eu(s,i,a+2)).times(.5),xc(i.d).slice(0,a)===(t=xc(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(hr(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if(t!="9999")break;a+=4}return Nr=!0,hr(r,n)};Tt.times=Tt.mul=function(e){var t,n,r,o,i,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,l=f.length,c=p.length,l=0;){for(t=0,o=l+r;o>r;)s=i[o]+p[r]*f[o-r-1]+t,i[o--]=s%Fo|0,t=s/Fo|0;i[o]=(i[o]+t)%Fo|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Nr?hr(e,d.precision):e};Tt.toDecimalPlaces=Tt.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Lc(e,0,Hv),t===void 0?t=r.rounding:Lc(t,0,8),hr(n,e+yo(n)+1,t))};Tt.toExponential=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=wh(r,!0):(Lc(e,0,Hv),t===void 0?t=o.rounding:Lc(t,0,8),r=hr(new o(r),e+1,t),n=wh(r,!0,e+1)),n};Tt.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?wh(o):(Lc(e,0,Hv),t===void 0?t=i.rounding:Lc(t,0,8),r=hr(new i(o),e+yo(o)+1,t),n=wh(r.abs(),!1,e+yo(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)};Tt.toInteger=Tt.toint=function(){var e=this,t=e.constructor;return hr(new t(e),yo(e)+1,t.rounding)};Tt.toNumber=function(){return+this};Tt.toPower=Tt.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(Va);if(s=new l(s),!s.s){if(e.s<1)throw Error(tl+"Infinity");return s}if(s.eq(Va))return s;if(r=l.precision,e.eq(Va))return hr(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,i=s.s,a){if((n=u<0?-u:u)<=tne){for(o=new l(Va),t=Math.ceil(r/Ir+4),Nr=!1;n%2&&(o=o.times(s),R6(o.d,t)),n=Uv(n/2),n!==0;)s=s.times(s),R6(s.d,t);return Nr=!0,e.s<0?new l(Va).div(o):hr(o,r)}}else if(i<0)throw Error(tl+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Nr=!1,o=e.times(rx(s,r+c)),Nr=!0,o=rne(o),o.s=i,o};Tt.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?(n=yo(o),r=wh(o,n<=i.toExpNeg||n>=i.toExpPos)):(Lc(e,1,Hv),t===void 0?t=i.rounding:Lc(t,0,8),o=hr(new i(o),e,t),n=yo(o),r=wh(o,e<=n||n<=i.toExpNeg,e)),r};Tt.toSignificantDigits=Tt.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Lc(e,1,Hv),t===void 0?t=r.rounding:Lc(t,0,8)),hr(new r(n),e,t)};Tt.toString=Tt.valueOf=Tt.val=Tt.toJSON=Tt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=yo(e),n=e.constructor;return wh(e,t<=n.toExpNeg||t>=n.toExpPos)};function nne(e,t){var n,r,o,i,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),Nr?hr(t,d):t;if(l=e.d,c=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o,i){for(i<0?(r=l,i=-i,s=c.length):(r=c,o=a,s=l.length),a=Math.ceil(d/Ir),s=a>s?a+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=c.length,s-i<0&&(i=s,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/Fo|0,l[i]%=Fo;for(n&&(l.unshift(n),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,Nr?hr(t,d):t}function Lc(e,t,n){if(e!==~~e||en)throw Error(eh+e)}function xc(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;ta?1:-1;else for(s=l=0;so[s]?1:-1;break}return l}function n(r,o,i){for(var a=0;i--;)r[i]-=a,a=r[i]1;)r.shift()}return function(r,o,i,a){var s,l,c,u,d,f,p,m,g,y,b,x,S,P,E,T,O,k,M=r.constructor,I=r.s==o.s?1:-1,R=r.d,_=o.d;if(!r.s)return new M(r);if(!o.s)throw Error(tl+"Division by zero");for(l=r.e-o.e,O=_.length,E=R.length,p=new M(I),m=p.d=[],c=0;_[c]==(R[c]||0);)++c;if(_[c]>(R[c]||0)&&--l,i==null?x=i=M.precision:a?x=i+(yo(r)-yo(o))+1:x=i,x<0)return new M(0);if(x=x/Ir+2|0,c=0,O==1)for(u=0,_=_[0],x++;(c1&&(_=e(_,u),R=e(R,u),O=_.length,E=R.length),P=O,g=R.slice(0,O),y=g.length;y=Fo/2&&++T;do u=0,s=t(_,g,O,y),s<0?(b=g[0],O!=y&&(b=b*Fo+(g[1]||0)),u=b/T|0,u>1?(u>=Fo&&(u=Fo-1),d=e(_,u),f=d.length,y=g.length,s=t(d,g,f,y),s==1&&(u--,n(d,O16)throw Error(Uj+yo(e));if(!e.s)return new u(Va);for(t==null?(Nr=!1,s=d):s=t,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(Pp(2,c))/Math.LN10*2+5|0,s+=r,n=o=i=new u(Va),u.precision=s;;){if(o=hr(o.times(e),s),n=n.times(++l),a=i.plus(Eu(o,n,s)),xc(a.d).slice(0,s)===xc(i.d).slice(0,s)){for(;c--;)i=hr(i.times(i),s);return u.precision=d,t==null?(Nr=!0,hr(i,d)):i}i=a}}function yo(e){for(var t=e.e*Ir,n=e.d[0];n>=10;n/=10)t++;return t}function M$(e,t,n){if(t>e.LN10.sd())throw Nr=!0,n&&(e.precision=n),Error(tl+"LN10 precision limit exceeded");return hr(new e(e.LN10),t)}function Id(e){for(var t="";e--;)t+="0";return t}function rx(e,t){var n,r,o,i,a,s,l,c,u,d=1,f=10,p=e,m=p.d,g=p.constructor,y=g.precision;if(p.s<1)throw Error(tl+(p.s?"NaN":"-Infinity"));if(p.eq(Va))return new g(0);if(t==null?(Nr=!1,c=y):c=t,p.eq(10))return t==null&&(Nr=!0),M$(g,c);if(c+=f,g.precision=c,n=xc(m),r=n.charAt(0),i=yo(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=xc(p.d),r=n.charAt(0),d++;i=yo(p),r>1?(p=new g("0."+n),i++):p=new g(r+"."+n.slice(1))}else return l=M$(g,c+2,y).times(i+""),p=rx(new g(r+"."+n.slice(1)),c-f).plus(l),g.precision=y,t==null?(Nr=!0,hr(p,y)):p;for(s=a=p=Eu(p.minus(Va),p.plus(Va),c),u=hr(p.times(p),c),o=3;;){if(a=hr(a.times(u),c),l=s.plus(Eu(a,new g(o),c)),xc(l.d).slice(0,c)===xc(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(M$(g,c+2,y).times(i+""))),s=Eu(s,new g(d),c),g.precision=y,t==null?(Nr=!0,hr(s,y)):s;s=l,o+=2}}function $6(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(r,o),t){if(o-=r,n=n-r-1,e.e=Uv(n/Ir),e.d=[],r=(n+1)%Ir,n<0&&(r+=Ir),rtT||e.e<-tT))throw Error(Uj+n)}else e.s=0,e.e=0,e.d=[0];return e}function hr(e,t,n){var r,o,i,a,s,l,c,u,d=e.d;for(a=1,i=d[0];i>=10;i/=10)a++;if(r=t-a,r<0)r+=Ir,o=t,c=d[u=0];else{if(u=Math.ceil((r+1)/Ir),i=d.length,u>=i)return e;for(c=i=d[u],a=1;i>=10;i/=10)a++;r%=Ir,o=r-Ir+a}if(n!==void 0&&(i=Pp(10,a-o-1),s=c/i%10|0,l=t<0||d[u+1]!==void 0||c%i,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?o>0?c/Pp(10,a-o):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=yo(e),d.length=1,t=t-i-1,d[0]=Pp(10,(Ir-t%Ir)%Ir),e.e=Uv(-t/Ir)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=u,i=1,u--):(d.length=u+1,i=Pp(10,Ir-r),d[u]=o>0?(c/Pp(10,a-o)%Pp(10,o)|0)*i:0),l)for(;;)if(u==0){(d[0]+=i)==Fo&&(d[0]=1,++e.e);break}else{if(d[u]+=i,d[u]!=Fo)break;d[u--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(Nr&&(e.e>tT||e.e<-tT))throw Error(Uj+yo(e));return e}function one(e,t){var n,r,o,i,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),Nr?hr(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),o=Math.max(Math.ceil(p/Ir),s)+2,a>o&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for(o=l.length,s=d.length,u=o0;--o)l[s++]=0;for(o=d.length;o>a;){if(l[--o]0?i=i.charAt(0)+"."+i.slice(1)+Id(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+Id(-o-1)+i,n&&(r=n-a)>0&&(i+=Id(r))):o>=a?(i+=Id(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+Id(r))):((r=o+1)0&&(o+1===a&&(i+="."),i+=Id(r))),e.s<0?"-"+i:i}function R6(e,t){if(e.length>t)return e.length=t,!0}function ine(e){var t,n,r;function o(i){var a=this;if(!(a instanceof o))return new o(i);if(a.constructor=o,i instanceof o){a.s=i.s,a.e=i.e,a.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(eh+i);if(i>0)a.s=1;else if(i<0)i=-i,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(i===~~i&&i<1e7){a.e=0,a.d=[i];return}return $6(a,i.toString())}else if(typeof i!="string")throw Error(eh+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,A7e.test(i))$6(a,i);else throw Error(eh+i)}if(o.prototype=Tt,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=ine,o.config=o.set=$7e,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(eh+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(eh+n+": "+r);return this}var Wj=ine(M7e);Va=new Wj(1);const cr=Wj;function R7e(e){return N7e(e)||L7e(e)||_7e(e)||D7e()}function D7e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _7e(e,t){if(e){if(typeof e=="string")return XD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XD(e,t)}}function L7e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function N7e(e){if(Array.isArray(e))return XD(e)}function XD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,o):e(t-a,D6(function(){for(var s=arguments.length,l=new Array(s),c=0;ce.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,i=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(o)throw i}}return n}}function J7e(e){if(Array.isArray(e))return e}function une(e){var t=ox(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function dne(e,t,n){if(e.lte(0))return new cr(0);var r=ek.getDigitCount(e.toNumber()),o=new cr(10).pow(r),i=e.div(o),a=r!==1?.05:.1,s=new cr(Math.ceil(i.div(a).toNumber())).add(n).mul(a),l=s.mul(o);return t?l:new cr(Math.ceil(l))}function Z7e(e,t,n){var r=1,o=new cr(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new cr(10).pow(ek.getDigitCount(e)-1),o=new cr(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new cr(Math.floor(e)))}else e===0?o=new cr(Math.floor((t-1)/2)):n||(o=new cr(Math.floor(e)));var a=Math.floor((t-1)/2),s=z7e(B7e(function(l){return o.add(new cr(l-a).mul(r)).toNumber()}),QD);return s(0,t)}function fne(e,t,n,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new cr(0),tickMin:new cr(0),tickMax:new cr(0)};var i=dne(new cr(t).sub(e).div(n-1),r,o),a;e<=0&&t>=0?a=new cr(0):(a=new cr(e).add(t).div(2),a=a.sub(new cr(a).mod(i)));var s=Math.ceil(a.sub(e).div(i).toNumber()),l=Math.ceil(new cr(t).sub(a).div(i).toNumber()),c=s+l+1;return c>n?fne(e,t,n,r,o+1):(c0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:i,tickMin:a.sub(new cr(s).mul(i)),tickMax:a.add(new cr(l).mul(i))})}function eqe(e){var t=ox(e,2),n=t[0],r=t[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(o,2),s=une([n,r]),l=ox(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var d=u===1/0?[c].concat(ZD(QD(0,o-1).map(function(){return 1/0}))):[].concat(ZD(QD(0,o-1).map(function(){return-1/0})),[u]);return n>r?JD(d):d}if(c===u)return Z7e(c,o,i);var f=fne(c,u,a,i),p=f.step,m=f.tickMin,g=f.tickMax,y=ek.rangeStep(m,g.add(new cr(.1).mul(p)),p);return n>r?JD(y):y}function tqe(e,t){var n=ox(e,2),r=n[0],o=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=une([r,o]),s=ox(a,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,o];if(l===c)return[l];var u=Math.max(t,2),d=dne(new cr(c).sub(l).div(u-1),i,0),f=[].concat(ZD(ek.rangeStep(new cr(l),new cr(c).sub(new cr(.99).mul(d)),d)),[c]);return r>o?JD(f):f}var nqe=lne(eqe),rqe=lne(tqe),oqe="Invariant failed";function xh(e,t){throw new Error(oqe)}var iqe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function _y(e){"@babel/helpers - typeof";return _y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_y(e)}function nT(){return nT=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function pqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hqe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,c=0;c0?o[c-1].coordinate:o[s-1].coordinate,d=o[c].coordinate,f=c>=s-1?o[0].coordinate:o[c+1].coordinate,p=void 0;if(Li(d-u)!==Li(f-d)){var m=[];if(Li(f-d)===Li(l[1]-l[0])){p=f;var g=d+l[1]-l[0];m[0]=Math.min(g,(g+u)/2),m[1]=Math.max(g,(g+u)/2)}else{p=u;var y=f+l[1]-l[0];m[0]=Math.min(d,(y+d)/2),m[1]=Math.max(d,(y+d)/2)}var b=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(t>b[0]&&t<=b[1]||t>=m[0]&&t<=m[1]){a=o[c].index;break}}else{var x=Math.min(u,f),S=Math.max(u,f);if(t>(x+d)/2&&t<=(S+d)/2){a=o[c].index;break}}}else for(var P=0;P0&&P(r[P].coordinate+r[P-1].coordinate)/2&&t<=(r[P].coordinate+r[P+1].coordinate)/2||P===s-1&&t>(r[P].coordinate+r[P-1].coordinate)/2){a=r[P].index;break}return a},Gj=function(t){var n,r=t,o=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Jr(Jr({},t.type.defaultProps),t.props):t.props,a=i.stroke,s=i.fill,l;switch(o){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:s;break;default:l=s;break}return l},Aqe=function(t){var n=t.barSize,r=t.totalSize,o=t.stackGroups,i=o===void 0?{}:o;if(!i)return{};for(var a={},s=Object.keys(i),l=0,c=s.length;l=0});if(b&&b.length){var x=b[0].type.defaultProps,S=x!==void 0?Jr(Jr({},x),b[0].props):b[0].props,P=S.barSize,E=S[y];a[E]||(a[E]=[]);var T=Bt(P)?n:P;a[E].push({item:b[0],stackList:b.slice(1),barSize:Bt(T)?void 0:Ni(T,r,0)})}}return a},$qe=function(t){var n=t.barGap,r=t.barCategoryGap,o=t.bandSize,i=t.sizeList,a=i===void 0?[]:i,s=t.maxBarSize,l=a.length;if(l<1)return null;var c=Ni(n,o,0,!0),u,d=[];if(a[0].barSize===+a[0].barSize){var f=!1,p=o/l,m=a.reduce(function(P,E){return P+E.barSize||0},0);m+=(l-1)*c,m>=o&&(m-=(l-1)*c,c=0),m>=o&&p>0&&(f=!0,p*=.9,m=l*p);var g=(o-m)/2>>0,y={offset:g-c,size:0};u=a.reduce(function(P,E){var T={item:E.item,position:{offset:y.offset+y.size+c,size:f?p:E.barSize}},O=[].concat(N6(P),[T]);return y=O[O.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(k){O.push({item:k,position:y})}),O},d)}else{var b=Ni(r,o,0,!0);o-2*b-(l-1)*c<=0&&(c=0);var x=(o-2*b-(l-1)*c)/l;x>1&&(x>>=0);var S=s===+s?Math.min(x,s):x;u=a.reduce(function(P,E,T){var O=[].concat(N6(P),[{item:E.item,position:{offset:b+(x+c)*T+(x-S)/2,size:S}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(k){O.push({item:k,position:O[O.length-1].position})}),O},d)}return u},Rqe=function(t,n,r,o){var i=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),c=gne({children:i,legendWidth:l});if(c){var u=o||{},d=u.width,f=u.height,p=c.align,m=c.verticalAlign,g=c.layout;if((g==="vertical"||g==="horizontal"&&m==="middle")&&p!=="center"&&at(t[p]))return Jr(Jr({},t),{},Wg({},p,t[p]+(d||0)));if((g==="horizontal"||g==="vertical"&&p==="center")&&m!=="middle"&&at(t[m]))return Jr(Jr({},t),{},Wg({},m,t[m]+(f||0)))}return t},Dqe=function(t,n,r){return Bt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},yne=function(t,n,r,o,i){var a=n.props.children,s=Vi(a,Wv).filter(function(c){return Dqe(o,i,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,u){var d=kr(u,r);if(Bt(d))return c;var f=Array.isArray(d)?[JI(d),Yd(d)]:[d,d],p=l.reduce(function(m,g){var y=kr(u,g,0),b=f[0]-Math.abs(Array.isArray(y)?y[0]:y),x=f[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(b,m[0]),Math.max(x,m[1])]},[1/0,-1/0]);return[Math.min(p[0],c[0]),Math.max(p[1],c[1])]},[1/0,-1/0])}return null},_qe=function(t,n,r,o,i){var a=n.map(function(s){return yne(t,s,r,i,o)}).filter(function(s){return!Bt(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},vne=function(t,n,r,o,i){var a=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&yne(t,l,c,o)||tw(t,c,r,i)});if(r==="number")return a.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,c){for(var u=0,d=c.length;u=2?Li(s[0]-s[1])*2*c:c,n&&(t.ticks||t.niceTicks)){var u=(t.ticks||t.niceTicks).map(function(d){var f=i?i.indexOf(d):d;return{coordinate:o(f)+c,value:d,offset:c}});return u.filter(function(d){return!Nv(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,f){return{coordinate:o(d)+c,value:d,index:f,offset:c}}):o.ticks&&!r?o.ticks(t.tickCount).map(function(d){return{coordinate:o(d)+c,value:d,offset:c}}):o.domain().map(function(d,f){return{coordinate:o(d)+c,value:i?i[d]:d,index:f,offset:c}})},A$=new WeakMap,$C=function(t,n){if(typeof n!="function")return t;A$.has(t)||A$.set(t,new WeakMap);var r=A$.get(t);if(r.has(n))return r.get(n);var o=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,o),o},xne=function(t,n,r){var o=t.scale,i=t.type,a=t.layout,s=t.axisType;if(o==="auto")return a==="radial"&&s==="radiusAxis"?{scale:Jw(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:QE(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:ew(),realScaleType:"point"}:i==="category"?{scale:Jw(),realScaleType:"band"}:{scale:QE(),realScaleType:"linear"};if(CS(o)){var l="scale".concat(LI(o));return{scale:(A6[l]||ew)(),realScaleType:A6[l]?l:"point"}}return Ht(o)?{scale:o}:{scale:ew(),realScaleType:"point"}},j6=1e-4,Sne=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,o=t.range(),i=Math.min(o[0],o[1])-j6,a=Math.max(o[0],o[1])+j6,s=t(n[0]),l=t(n[r-1]);(sa||la)&&t.domain([n[0],n[r-1]])}},Lqe=function(t,n){if(!t)return null;for(var r=0,o=t.length;ro)&&(i[1]=o),i[0]>o&&(i[0]=o),i[1]=0?(t[s][r][0]=i,t[s][r][1]=i+l,i=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1])}},jqe=function(t){var n=t.length;if(!(n<=0))for(var r=0,o=t[0].length;r=0?(t[a][r][0]=i,t[a][r][1]=i+s,i=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},Bqe={sign:Fqe,expand:ize,none:Oy,silhouette:aze,wiggle:sze,positive:jqe},zqe=function(t,n,r){var o=n.map(function(s){return s.props.dataKey}),i=Bqe[r],a=oze().keys(o).value(function(s,l){return+kr(s,l,0)}).order(OD).offset(i);return a(t)},Vqe=function(t,n,r,o,i,a){if(!t)return null;var s=a?n.reverse():n,l={},c=s.reduce(function(d,f){var p,m=(p=f.type)!==null&&p!==void 0&&p.defaultProps?Jr(Jr({},f.type.defaultProps),f.props):f.props,g=m.stackId,y=m.hide;if(y)return d;var b=m[r],x=d[b]||{hasStack:!1,stackGroups:{}};if(Mo(g)){var S=x.stackGroups[g]||{numericAxisId:r,cateAxisId:o,items:[]};S.items.push(f),x.hasStack=!0,x.stackGroups[g]=S}else x.stackGroups[Lf("_stackId_")]={numericAxisId:r,cateAxisId:o,items:[f]};return Jr(Jr({},d),{},Wg({},b,x))},l),u={};return Object.keys(c).reduce(function(d,f){var p=c[f];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(g,y){var b=p.stackGroups[y];return Jr(Jr({},g),{},Wg({},y,{numericAxisId:r,cateAxisId:o,items:b.items,stackedData:zqe(t,b.items,i)}))},m)}return Jr(Jr({},d),{},Wg({},f,p))},u)},Cne=function(t,n){var r=n.realScaleType,o=n.type,i=n.tickCount,a=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&o==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var c=t.domain();if(!c.length)return null;var u=nqe(c,i,s);return t.domain([JI(u),Yd(u)]),{niceTicks:u}}if(i&&o==="number"){var d=t.domain(),f=rqe(d,i,s);return{niceTicks:f}}return null};function Ly(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Bt(o[t.dataKey])){var s=ME(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=kr(o,Bt(a)?t.dataKey:a);return Bt(l)?null:t.scale(l)}var B6=function(t){var n=t.axis,r=t.ticks,o=t.offset,i=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+o:null;var l=kr(a,n.dataKey,n.domain[s]);return Bt(l)?null:n.scale(l)-i/2+o},Hqe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var o=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return o<=0&&i>=0?0:i<0?i:o}return r[0]},Uqe=function(t,n){var r,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Jr(Jr({},t.type.defaultProps),t.props):t.props,i=o.stackId;if(Mo(i)){var a=n[i];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},Wqe=function(t){return t.reduce(function(n,r){return[JI(r.concat([n[0]]).filter(at)),Yd(r.concat([n[1]]).filter(at))]},[1/0,-1/0])},Pne=function(t,n,r){return Object.keys(t).reduce(function(o,i){var a=t[i],s=a.stackedData,l=s.reduce(function(c,u){var d=Wqe(u.slice(n,r+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],o[0]),Math.max(l[1],o[1])]},[1/0,-1/0]).map(function(o){return o===1/0||o===-1/0?0:o})},z6=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,V6=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,r_=function(t,n,r){if(Ht(t))return t(n,r);if(!Array.isArray(t))return n;var o=[];if(at(t[0]))o[0]=r?t[0]:Math.min(t[0],n[0]);else if(z6.test(t[0])){var i=+z6.exec(t[0])[1];o[0]=n[0]-i}else Ht(t[0])?o[0]=t[0](n[0]):o[0]=n[0];if(at(t[1]))o[1]=r?t[1]:Math.max(t[1],n[1]);else if(V6.test(t[1])){var a=+V6.exec(t[1])[1];o[1]=n[1]+a}else Ht(t[1])?o[1]=t[1](n[1]):o[1]=n[1];return o},oT=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var o=t.scale.bandwidth();if(!r||o>0)return o}if(t&&n&&n.length>=2){for(var i=wj(n,function(d){return d.coordinate}),a=1/0,s=1,l=i.length;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},eKe=function(t,n,r,o,i){var a=t.width,s=t.height,l=t.startAngle,c=t.endAngle,u=Ni(t.cx,a,a/2),d=Ni(t.cy,s,s/2),f=One(a,s,r),p=Ni(t.innerRadius,f,0),m=Ni(t.outerRadius,f,f*.8),g=Object.keys(n);return g.reduce(function(y,b){var x=n[b],S=x.domain,P=x.reversed,E;if(Bt(x.range))o==="angleAxis"?E=[l,c]:o==="radiusAxis"&&(E=[p,m]),P&&(E=[E[1],E[0]]);else{E=x.range;var T=E,O=Kqe(T,2);l=O[0],c=O[1]}var k=xne(x,i),M=k.realScaleType,I=k.scale;I.domain(S).range(E),Sne(I);var R=Cne(I,uu(uu({},x),{},{realScaleType:M})),_=uu(uu(uu({},x),R),{},{range:E,radius:m,realScaleType:M,scale:I,cx:u,cy:d,innerRadius:p,outerRadius:m,startAngle:l,endAngle:c});return uu(uu({},y),{},Tne({},b,_))},{})},tKe=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(o-a,2))},nKe=function(t,n){var r=t.x,o=t.y,i=n.cx,a=n.cy,s=tKe({x:r,y:o},{x:i,y:a});if(s<=0)return{radius:s};var l=(r-i)/s,c=Math.acos(l);return o>a&&(c=2*Math.PI-c),{radius:s,angle:Zqe(c),angleInRadian:c}},rKe=function(t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360),a=Math.min(o,i);return{startAngle:n-a*360,endAngle:r-a*360}},oKe=function(t,n){var r=n.startAngle,o=n.endAngle,i=Math.floor(r/360),a=Math.floor(o/360),s=Math.min(i,a);return t+s*360},G6=function(t,n){var r=t.x,o=t.y,i=nKe({x:r,y:o},n),a=i.radius,s=i.angle,l=n.innerRadius,c=n.outerRadius;if(ac)return!1;if(a===0)return!0;var u=rKe(n),d=u.startAngle,f=u.endAngle,p=s,m;if(d<=f){for(;p>f;)p-=360;for(;p=d&&p<=f}else{for(;p>d;)p-=360;for(;p=f&&p<=d}return m?uu(uu({},n),{},{radius:a,angle:oKe(p,n)}):null},Ine=function(t){return!v.isValidElement(t)&&!Ht(t)&&typeof t!="boolean"?t.className:""};function lx(e){"@babel/helpers - typeof";return lx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lx(e)}var iKe=["offset"];function aKe(e){return uKe(e)||cKe(e)||lKe(e)||sKe()}function sKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lKe(e,t){if(e){if(typeof e=="string")return o_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o_(e,t)}}function cKe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uKe(e){if(Array.isArray(e))return o_(e)}function o_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fKe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function q6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function To(e){for(var t=1;t=0?1:-1,S,P;o==="insideStart"?(S=p+x*a,P=g):o==="insideEnd"?(S=m-x*a,P=!g):o==="end"&&(S=m+x*a,P=g),P=b<=0?P:!P;var E=Sr(c,u,y,S),T=Sr(c,u,y,S+(P?1:-1)*359),O="M".concat(E.x,",").concat(E.y,` + A`).concat(y,",").concat(y,",0,1,").concat(P?0:1,`, + `).concat(T.x,",").concat(T.y),k=Bt(t.id)?Lf("recharts-radial-line-"):t.id;return Y.createElement("text",cx({},r,{dominantBaseline:"central",className:pe("recharts-radial-bar-label",s)}),Y.createElement("defs",null,Y.createElement("path",{id:k,d:O})),Y.createElement("textPath",{xlinkHref:"#".concat(k)},n))},bKe=function(t){var n=t.viewBox,r=t.offset,o=t.position,i=n,a=i.cx,s=i.cy,l=i.innerRadius,c=i.outerRadius,u=i.startAngle,d=i.endAngle,f=(u+d)/2;if(o==="outside"){var p=Sr(a,s,c+r,f),m=p.x,g=p.y;return{x:m,y:g,textAnchor:m>=a?"start":"end",verticalAnchor:"middle"}}if(o==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(o==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(o==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(l+c)/2,b=Sr(a,s,y,f),x=b.x,S=b.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},wKe=function(t){var n=t.viewBox,r=t.parentViewBox,o=t.offset,i=t.position,a=n,s=a.x,l=a.y,c=a.width,u=a.height,d=u>=0?1:-1,f=d*o,p=d>0?"end":"start",m=d>0?"start":"end",g=c>=0?1:-1,y=g*o,b=g>0?"end":"start",x=g>0?"start":"end";if(i==="top"){var S={x:s+c/2,y:l-d*o,textAnchor:"middle",verticalAnchor:p};return To(To({},S),r?{height:Math.max(l-r.y,0),width:c}:{})}if(i==="bottom"){var P={x:s+c/2,y:l+u+f,textAnchor:"middle",verticalAnchor:m};return To(To({},P),r?{height:Math.max(r.y+r.height-(l+u),0),width:c}:{})}if(i==="left"){var E={x:s-y,y:l+u/2,textAnchor:b,verticalAnchor:"middle"};return To(To({},E),r?{width:Math.max(E.x-r.x,0),height:u}:{})}if(i==="right"){var T={x:s+c+y,y:l+u/2,textAnchor:x,verticalAnchor:"middle"};return To(To({},T),r?{width:Math.max(r.x+r.width-T.x,0),height:u}:{})}var O=r?{width:c,height:u}:{};return i==="insideLeft"?To({x:s+y,y:l+u/2,textAnchor:x,verticalAnchor:"middle"},O):i==="insideRight"?To({x:s+c-y,y:l+u/2,textAnchor:b,verticalAnchor:"middle"},O):i==="insideTop"?To({x:s+c/2,y:l+f,textAnchor:"middle",verticalAnchor:m},O):i==="insideBottom"?To({x:s+c/2,y:l+u-f,textAnchor:"middle",verticalAnchor:p},O):i==="insideTopLeft"?To({x:s+y,y:l+f,textAnchor:x,verticalAnchor:m},O):i==="insideTopRight"?To({x:s+c-y,y:l+f,textAnchor:b,verticalAnchor:m},O):i==="insideBottomLeft"?To({x:s+y,y:l+u-f,textAnchor:x,verticalAnchor:p},O):i==="insideBottomRight"?To({x:s+c-y,y:l+u-f,textAnchor:b,verticalAnchor:p},O):Rv(i)&&(at(i.x)||Dp(i.x))&&(at(i.y)||Dp(i.y))?To({x:s+Ni(i.x,c),y:l+Ni(i.y,u),textAnchor:"end",verticalAnchor:"end"},O):To({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},O)},xKe=function(t){return"cx"in t&&at(t.cx)};function Vo(e){var t=e.offset,n=t===void 0?5:t,r=dKe(e,iKe),o=To({offset:n},r),i=o.viewBox,a=o.position,s=o.value,l=o.children,c=o.content,u=o.className,d=u===void 0?"":u,f=o.textBreakAll;if(!i||Bt(s)&&Bt(l)&&!v.isValidElement(c)&&!Ht(c))return null;if(v.isValidElement(c))return v.cloneElement(c,o);var p;if(Ht(c)){if(p=v.createElement(c,o),v.isValidElement(p))return p}else p=gKe(o);var m=xKe(i),g=At(o,!0);if(m&&(a==="insideStart"||a==="insideEnd"||a==="end"))return vKe(o,p,g);var y=m?bKe(o):wKe(o);return Y.createElement(bh,cx({className:pe("recharts-label",d)},g,y,{breakAll:f}),p)}Vo.displayName="Label";var kne=function(t){var n=t.cx,r=t.cy,o=t.angle,i=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,u=t.outerRadius,d=t.x,f=t.y,p=t.top,m=t.left,g=t.width,y=t.height,b=t.clockWise,x=t.labelViewBox;if(x)return x;if(at(g)&&at(y)){if(at(d)&&at(f))return{x:d,y:f,width:g,height:y};if(at(p)&&at(m))return{x:p,y:m,width:g,height:y}}return at(d)&&at(f)?{x:d,y:f,width:0,height:0}:at(n)&&at(r)?{cx:n,cy:r,startAngle:i||o||0,endAngle:a||o||0,innerRadius:c||0,outerRadius:u||l||s||0,clockWise:b}:t.viewBox?t.viewBox:{}},SKe=function(t,n){return t?t===!0?Y.createElement(Vo,{key:"label-implicit",viewBox:n}):Mo(t)?Y.createElement(Vo,{key:"label-implicit",viewBox:n,value:t}):v.isValidElement(t)?t.type===Vo?v.cloneElement(t,{key:"label-implicit",viewBox:n}):Y.createElement(Vo,{key:"label-implicit",content:t,viewBox:n}):Ht(t)?Y.createElement(Vo,{key:"label-implicit",content:t,viewBox:n}):Rv(t)?Y.createElement(Vo,cx({viewBox:n},t,{key:"label-implicit"})):null:null},CKe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var o=t.children,i=kne(t),a=Vi(o,Vo).map(function(l,c){return v.cloneElement(l,{viewBox:n||i,key:"label-".concat(c)})});if(!r)return a;var s=SKe(t.label,n||i);return[s].concat(aKe(a))};Vo.parseViewBox=kne;Vo.renderCallByParent=CKe;function PKe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var EKe=PKe;const TKe=Bn(EKe);function ux(e){"@babel/helpers - typeof";return ux=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ux(e)}var OKe=["valueAccessor"],IKe=["data","dataKey","clockWise","id","textBreakAll"];function kKe(e){return RKe(e)||$Ke(e)||AKe(e)||MKe()}function MKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AKe(e,t){if(e){if(typeof e=="string")return i_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i_(e,t)}}function $Ke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function RKe(e){if(Array.isArray(e))return i_(e)}function i_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NKe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var FKe=function(t){return Array.isArray(t.value)?TKe(t.value):t.value};function Hl(e){var t=e.valueAccessor,n=t===void 0?FKe:t,r=X6(e,OKe),o=r.data,i=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,c=X6(r,IKe);return!o||!o.length?null:Y.createElement(rn,{className:"recharts-label-list"},o.map(function(u,d){var f=Bt(i)?n(u,d):kr(u&&u.payload,i),p=Bt(s)?{}:{id:"".concat(s,"-").concat(d)};return Y.createElement(Vo,aT({},At(u,!0),c,p,{parentViewBox:u.parentViewBox,value:f,textBreakAll:l,viewBox:Vo.parseViewBox(Bt(a)?u:Y6(Y6({},u),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Hl.displayName="LabelList";function jKe(e,t){return e?e===!0?Y.createElement(Hl,{key:"labelList-implicit",data:t}):Y.isValidElement(e)||Ht(e)?Y.createElement(Hl,{key:"labelList-implicit",data:t,content:e}):Rv(e)?Y.createElement(Hl,aT({data:t},e,{key:"labelList-implicit"})):null:null}function BKe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=Vi(r,Hl).map(function(a,s){return v.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return o;var i=jKe(e.label,t);return[i].concat(kKe(o))}Hl.renderCallByParent=BKe;function dx(e){"@babel/helpers - typeof";return dx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dx(e)}function a_(){return a_=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>c),`, `).concat(d.x,",").concat(d.y,` - `);if(o>0){var p=br(n,r,o,a),m=br(n,r,o,c);f+="L ".concat(m.x,",").concat(m.y,` + `);if(o>0){var p=Sr(n,r,o,a),m=Sr(n,r,o,c);f+="L ".concat(m.x,",").concat(m.y,` A `).concat(o,",").concat(o,`,0, `).concat(+(Math.abs(l)>180),",").concat(+(a<=c),`, - `).concat(p.x,",").concat(p.y," Z")}else f+="L ".concat(n,",").concat(r," Z");return f},JKe=function(t){var n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,u=t.endAngle,d=Ni(u-c),f=_C({cx:n,cy:r,radius:i,angle:c,sign:d,cornerRadius:a,cornerIsExternal:l}),p=f.circleTangency,m=f.lineTangency,g=f.theta,v=_C({cx:n,cy:r,radius:i,angle:u,sign:-d,cornerRadius:a,cornerIsExternal:l}),w=v.circleTangency,x=v.lineTangency,S=v.theta,P=l?Math.abs(c-u):Math.abs(c-u)-g-S;if(P<0)return s?"M ".concat(m.x,",").concat(m.y,` + `).concat(p.x,",").concat(p.y," Z")}else f+="L ".concat(n,",").concat(r," Z");return f},WKe=function(t){var n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,u=t.endAngle,d=Li(u-c),f=RC({cx:n,cy:r,radius:i,angle:c,sign:d,cornerRadius:a,cornerIsExternal:l}),p=f.circleTangency,m=f.lineTangency,g=f.theta,y=RC({cx:n,cy:r,radius:i,angle:u,sign:-d,cornerRadius:a,cornerIsExternal:l}),b=y.circleTangency,x=y.lineTangency,S=y.theta,P=l?Math.abs(c-u):Math.abs(c-u)-g-S;if(P<0)return s?"M ".concat(m.x,",").concat(m.y,` a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 - `):$ne({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:c,endAngle:u});var T="M ".concat(m.x,",").concat(m.y,` + `):Mne({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:c,endAngle:u});var E="M ".concat(m.x,",").concat(m.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(p.x,",").concat(p.y,` - A`).concat(i,",").concat(i,",0,").concat(+(P>180),",").concat(+(d<0),",").concat(w.x,",").concat(w.y,` + A`).concat(i,",").concat(i,",0,").concat(+(P>180),",").concat(+(d<0),",").concat(b.x,",").concat(b.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(x.x,",").concat(x.y,` - `);if(o>0){var E=_C({cx:n,cy:r,radius:o,angle:c,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),O=E.circleTangency,k=E.lineTangency,A=E.theta,I=_C({cx:n,cy:r,radius:o,angle:u,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),R=I.circleTangency,L=I.lineTangency,F=I.theta,z=l?Math.abs(c-u):Math.abs(c-u)-A-F;if(z<0&&a===0)return"".concat(T,"L").concat(n,",").concat(r,"Z");T+="L".concat(L.x,",").concat(L.y,` + `);if(o>0){var T=RC({cx:n,cy:r,radius:o,angle:c,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),O=T.circleTangency,k=T.lineTangency,M=T.theta,I=RC({cx:n,cy:r,radius:o,angle:u,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),R=I.circleTangency,_=I.lineTangency,N=I.theta,B=l?Math.abs(c-u):Math.abs(c-u)-M-N;if(B<0&&a===0)return"".concat(E,"L").concat(n,",").concat(r,"Z");E+="L".concat(_.x,",").concat(_.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(R.x,",").concat(R.y,` - A`).concat(o,",").concat(o,",0,").concat(+(z>180),",").concat(+(d>0),",").concat(O.x,",").concat(O.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(k.x,",").concat(k.y,"Z")}else T+="L".concat(n,",").concat(r,"Z");return T},ZKe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Rne=function(t){var n=Q6(Q6({},ZKe),t),r=n.cx,o=n.cy,i=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,d=n.endAngle,f=n.className;if(a0&&Math.abs(u-d)<360?v=JKe({cx:r,cy:o,innerRadius:i,outerRadius:a,cornerRadius:Math.min(g,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):v=$ne({cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d}),K.createElement("path",lD({},At(n,!0),{className:p,d:v,role:"img"}))};function fx(e){"@babel/helpers - typeof";return fx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fx(e)}function cD(){return cD=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function cYe(e,t){return qv(e.getTime(),t.getTime())}function iG(e,t,n){if(e.size!==t.size)return!1;for(var r={},o=e.entries(),i=0,a,s;(a=o.next())&&!a.done;){for(var l=t.entries(),c=!1,u=0;(s=l.next())&&!s.done;){var d=a.value,f=d[0],p=d[1],m=s.value,g=m[0],v=m[1];!c&&!r[u]&&(c=n.equals(f,g,i,u,e,t,n)&&n.equals(p,v,f,g,e,t,n))&&(r[u]=!0),u++}if(!c)return!1;i++}return!0}function uYe(e,t,n){var r=oG(e),o=r.length;if(oG(t).length!==o)return!1;for(var i;o-- >0;)if(i=r[o],i===Dne&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!_ne(t,i)||!n.equals(e[i],t[i],i,i,e,t,n))return!1;return!0}function n0(e,t,n){var r=nG(e),o=r.length;if(nG(t).length!==o)return!1;for(var i,a,s;o-- >0;)if(i=r[o],i===Dne&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!_ne(t,i)||!n.equals(e[i],t[i],i,i,e,t,n)||(a=rG(e,i),s=rG(t,i),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function dYe(e,t){return qv(e.valueOf(),t.valueOf())}function fYe(e,t){return e.source===t.source&&e.flags===t.flags}function aG(e,t,n){if(e.size!==t.size)return!1;for(var r={},o=e.values(),i,a;(i=o.next())&&!i.done;){for(var s=t.values(),l=!1,c=0;(a=s.next())&&!a.done;)!l&&!r[c]&&(l=n.equals(i.value,a.value,i.value,a.value,e,t,n))&&(r[c]=!0),c++;if(!l)return!1}return!0}function pYe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var hYe="[object Arguments]",mYe="[object Boolean]",gYe="[object Date]",yYe="[object Map]",vYe="[object Number]",bYe="[object Object]",wYe="[object RegExp]",xYe="[object Set]",SYe="[object String]",CYe=Array.isArray,sG=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,lG=Object.assign,PYe=Object.prototype.toString.call.bind(Object.prototype.toString);function TYe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(u,d,f){if(u===d)return!0;if(u==null||d==null||typeof u!="object"||typeof d!="object")return u!==u&&d!==d;var p=u.constructor;if(p!==d.constructor)return!1;if(p===Object)return o(u,d,f);if(CYe(u))return t(u,d,f);if(sG!=null&&sG(u))return l(u,d,f);if(p===Date)return n(u,d,f);if(p===RegExp)return a(u,d,f);if(p===Map)return r(u,d,f);if(p===Set)return s(u,d,f);var m=PYe(u);return m===gYe?n(u,d,f):m===wYe?a(u,d,f):m===yYe?r(u,d,f):m===xYe?s(u,d,f):m===bYe?typeof u.then!="function"&&typeof d.then!="function"&&o(u,d,f):m===hYe?o(u,d,f):m===mYe||m===vYe||m===SYe?i(u,d,f):!1}}function EYe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?n0:lYe,areDatesEqual:cYe,areMapsEqual:r?tG(iG,n0):iG,areObjectsEqual:r?n0:uYe,arePrimitiveWrappersEqual:dYe,areRegExpsEqual:fYe,areSetsEqual:r?tG(aG,n0):aG,areTypedArraysEqual:r?n0:pYe};if(n&&(o=lG({},o,n(o))),t){var i=NC(o.areArraysEqual),a=NC(o.areMapsEqual),s=NC(o.areObjectsEqual),l=NC(o.areSetsEqual);o=lG({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return o}function OYe(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}function IYe(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(l,c){var u=r(),d=u.cache,f=d===void 0?t?new WeakMap:void 0:d,p=u.meta;return n(l,c,{cache:f,equals:o,meta:p,strict:i})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(l,c){return n(l,c,a)}}var kYe=Bf();Bf({strict:!0});Bf({circular:!0});Bf({circular:!0,strict:!0});Bf({createInternalComparator:function(){return qv}});Bf({strict:!0,createInternalComparator:function(){return qv}});Bf({circular:!0,createInternalComparator:function(){return qv}});Bf({circular:!0,createInternalComparator:function(){return qv},strict:!0});function Bf(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,i=e.strict,a=i===void 0?!1:i,s=EYe(e),l=TYe(s),c=r?r(l):OYe(l);return IYe({circular:n,comparator:l,createState:o,equals:c,strict:a})}function MYe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function cG(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function o(i){n<0&&(n=i),i-n>t?(e(i),n=-1):MYe(o)};requestAnimationFrame(r)}function uD(e){"@babel/helpers - typeof";return uD=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uD(e)}function AYe(e){return DYe(e)||_Ye(e)||RYe(e)||$Ye()}function $Ye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RYe(e,t){if(e){if(typeof e=="string")return uG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uG(e,t)}}function uG(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:w<0?0:w},g=function(w){for(var x=w>1?1:w,S=x,P=0;P<8;++P){var T=d(S)-x,E=p(S);if(Math.abs(T-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,o=t.damping,i=o===void 0?8:o,a=t.dt,s=a===void 0?17:a,l=function(u,d,f){var p=-(u-d)*r,m=f*i,g=f+(p-m)*s/1e3,v=f*s/1e3+u;return Math.abs(v-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fXe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}function D$(e){return gXe(e)||mXe(e)||hXe(e)||pXe()}function pXe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hXe(e,t){if(e){if(typeof e=="string")return mD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mD(e,t)}}function mXe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gXe(e){if(Array.isArray(e))return mD(e)}function mD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pE(e){return pE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pE(e)}var rl=function(e){xXe(n,e);var t=SXe(n);function n(r,o){var i;yXe(this,n),i=t.call(this,r,o);var a=i.props,s=a.isActive,l=a.attributeName,c=a.from,u=a.to,d=a.steps,f=a.children,p=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(vD(i)),i.changeStyle=i.changeStyle.bind(vD(i)),!s||p<=0)return i.state={style:{}},typeof f=="function"&&(i.state={style:u}),yD(i);if(d&&d.length)i.state={style:d[0].style};else if(c){if(typeof f=="function")return i.state={style:c},yD(i);i.state={style:l?O0({},l,c):c}}else i.state={style:{}};return i}return bXe(n,[{key:"componentDidMount",value:function(){var o=this.props,i=o.isActive,a=o.canBegin;this.mounted=!0,!(!i||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(o){var i=this.props,a=i.isActive,s=i.canBegin,l=i.attributeName,c=i.shouldReAnimate,u=i.to,d=i.from,f=this.state.style;if(s){if(!a){var p={style:l?O0({},l,u):u};this.state&&f&&(l&&f[l]!==u||!l&&f!==u)&&this.setState(p);return}if(!(kYe(o.to,u)&&o.canBegin&&o.isActive)){var m=!o.canBegin||!o.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=m||c?d:o.to;if(this.state&&f){var v={style:l?O0({},l,g):g};(l&&f[l]!==g||!l&&f!==g)&&this.setState(v)}this.runAnimation(xl(xl({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var o=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),o&&o()}},{key:"handleStyleChange",value:function(o){this.changeStyle(o)}},{key:"changeStyle",value:function(o){this.mounted&&this.setState({style:o})}},{key:"runJSAnimation",value:function(o){var i=this,a=o.from,s=o.to,l=o.duration,c=o.easing,u=o.begin,d=o.onAnimationEnd,f=o.onAnimationStart,p=cXe(a,s,JYe(c),l,this.changeStyle),m=function(){i.stopJSAnimation=p()};this.manager.start([f,u,m,l,d])}},{key:"runStepAnimation",value:function(o){var i=this,a=o.steps,s=o.begin,l=o.onAnimationStart,c=a[0],u=c.style,d=c.duration,f=d===void 0?0:d,p=function(g,v,w){if(w===0)return g;var x=v.duration,S=v.easing,P=S===void 0?"ease":S,T=v.style,E=v.properties,O=v.onAnimationEnd,k=w>0?a[w-1]:v,A=E||Object.keys(T);if(typeof P=="function"||P==="spring")return[].concat(D$(g),[i.runJSAnimation.bind(i,{from:k.style,to:T,duration:x,easing:P}),x]);var I=pG(A,x,P),R=xl(xl(xl({},k.style),T),{},{transition:I});return[].concat(D$(g),[R,x,O]).filter(BYe)};return this.manager.start([l].concat(D$(a.reduce(p,[u,Math.max(f,s)])),[o.onAnimationEnd]))}},{key:"runAnimation",value:function(o){this.manager||(this.manager=NYe());var i=o.begin,a=o.duration,s=o.attributeName,l=o.to,c=o.easing,u=o.onAnimationStart,d=o.onAnimationEnd,f=o.steps,p=o.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof c=="function"||typeof p=="function"||c==="spring"){this.runJSAnimation(o);return}if(f.length>1){this.runStepAnimation(o);return}var g=s?O0({},s,l):l,v=pG(Object.keys(g),a,c);m.start([u,i,xl(xl({},g),{},{transition:v}),a,d])}},{key:"render",value:function(){var o=this.props,i=o.children;o.begin;var a=o.duration;o.attributeName,o.easing;var s=o.isActive;o.steps,o.from,o.to,o.canBegin,o.onAnimationEnd,o.shouldReAnimate,o.onAnimationReStart;var l=dXe(o,uXe),c=y.Children.count(i),u=this.state.style;if(typeof i=="function")return i(u);if(!s||c===0||a<=0)return i;var d=function(p){var m=p.props,g=m.style,v=g===void 0?{}:g,w=m.className,x=y.cloneElement(p,xl(xl({},l),{},{style:xl(xl({},v),u),className:w}));return x};return c===1?d(y.Children.only(i)):K.createElement("div",null,y.Children.map(i,function(f){return d(f)}))}}]),n}(y.PureComponent);rl.displayName="Animate";rl.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};rl.propTypes={from:j.oneOfType([j.object,j.string]),to:j.oneOfType([j.object,j.string]),attributeName:j.string,duration:j.number,begin:j.number,easing:j.oneOfType([j.string,j.func]),steps:j.arrayOf(j.shape({duration:j.number.isRequired,style:j.object.isRequired,easing:j.oneOfType([j.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),j.func]),properties:j.arrayOf("string"),onAnimationEnd:j.func})),children:j.oneOfType([j.node,j.func]),isActive:j.bool,canBegin:j.bool,onAnimationEnd:j.func,shouldReAnimate:j.bool,onAnimationStart:j.func,onAnimationReStart:j.func};j.object,j.object,j.object,j.element;j.object,j.object,j.object,j.oneOfType([j.array,j.element]),j.any;function mx(e){"@babel/helpers - typeof";return mx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mx(e)}function hE(){return hE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,c=o>=0&&r>=0||o<0&&r<0?1:0,u;if(a>0&&i instanceof Array){for(var d=[0,0,0,0],f=0,p=4;fa?a:i[f];u="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(u+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(t+l*d[0],",").concat(n)),u+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(u+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, + A`).concat(o,",").concat(o,",0,").concat(+(B>180),",").concat(+(d>0),",").concat(O.x,",").concat(O.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(k.x,",").concat(k.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},GKe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Ane=function(t){var n=J6(J6({},GKe),t),r=n.cx,o=n.cy,i=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,d=n.endAngle,f=n.className;if(a0&&Math.abs(u-d)<360?y=WKe({cx:r,cy:o,innerRadius:i,outerRadius:a,cornerRadius:Math.min(g,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):y=Mne({cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d}),Y.createElement("path",a_({},At(n,!0),{className:p,d:y,role:"img"}))};function fx(e){"@babel/helpers - typeof";return fx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fx(e)}function s_(){return s_=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function nYe(e,t){return Gv(e.getTime(),t.getTime())}function aG(e,t,n){if(e.size!==t.size)return!1;for(var r={},o=e.entries(),i=0,a,s;(a=o.next())&&!a.done;){for(var l=t.entries(),c=!1,u=0;(s=l.next())&&!s.done;){var d=a.value,f=d[0],p=d[1],m=s.value,g=m[0],y=m[1];!c&&!r[u]&&(c=n.equals(f,g,i,u,e,t,n)&&n.equals(p,y,f,g,e,t,n))&&(r[u]=!0),u++}if(!c)return!1;i++}return!0}function rYe(e,t,n){var r=iG(e),o=r.length;if(iG(t).length!==o)return!1;for(var i;o-- >0;)if(i=r[o],i===Rne&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!$ne(t,i)||!n.equals(e[i],t[i],i,i,e,t,n))return!1;return!0}function n0(e,t,n){var r=rG(e),o=r.length;if(rG(t).length!==o)return!1;for(var i,a,s;o-- >0;)if(i=r[o],i===Rne&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!$ne(t,i)||!n.equals(e[i],t[i],i,i,e,t,n)||(a=oG(e,i),s=oG(t,i),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function oYe(e,t){return Gv(e.valueOf(),t.valueOf())}function iYe(e,t){return e.source===t.source&&e.flags===t.flags}function sG(e,t,n){if(e.size!==t.size)return!1;for(var r={},o=e.values(),i,a;(i=o.next())&&!i.done;){for(var s=t.values(),l=!1,c=0;(a=s.next())&&!a.done;)!l&&!r[c]&&(l=n.equals(i.value,a.value,i.value,a.value,e,t,n))&&(r[c]=!0),c++;if(!l)return!1}return!0}function aYe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var sYe="[object Arguments]",lYe="[object Boolean]",cYe="[object Date]",uYe="[object Map]",dYe="[object Number]",fYe="[object Object]",pYe="[object RegExp]",hYe="[object Set]",mYe="[object String]",gYe=Array.isArray,lG=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,cG=Object.assign,yYe=Object.prototype.toString.call.bind(Object.prototype.toString);function vYe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(u,d,f){if(u===d)return!0;if(u==null||d==null||typeof u!="object"||typeof d!="object")return u!==u&&d!==d;var p=u.constructor;if(p!==d.constructor)return!1;if(p===Object)return o(u,d,f);if(gYe(u))return t(u,d,f);if(lG!=null&&lG(u))return l(u,d,f);if(p===Date)return n(u,d,f);if(p===RegExp)return a(u,d,f);if(p===Map)return r(u,d,f);if(p===Set)return s(u,d,f);var m=yYe(u);return m===cYe?n(u,d,f):m===pYe?a(u,d,f):m===uYe?r(u,d,f):m===hYe?s(u,d,f):m===fYe?typeof u.then!="function"&&typeof d.then!="function"&&o(u,d,f):m===sYe?o(u,d,f):m===lYe||m===dYe||m===mYe?i(u,d,f):!1}}function bYe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?n0:tYe,areDatesEqual:nYe,areMapsEqual:r?nG(aG,n0):aG,areObjectsEqual:r?n0:rYe,arePrimitiveWrappersEqual:oYe,areRegExpsEqual:iYe,areSetsEqual:r?nG(sG,n0):sG,areTypedArraysEqual:r?n0:aYe};if(n&&(o=cG({},o,n(o))),t){var i=_C(o.areArraysEqual),a=_C(o.areMapsEqual),s=_C(o.areObjectsEqual),l=_C(o.areSetsEqual);o=cG({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return o}function wYe(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}function xYe(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(l,c){var u=r(),d=u.cache,f=d===void 0?t?new WeakMap:void 0:d,p=u.meta;return n(l,c,{cache:f,equals:o,meta:p,strict:i})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(l,c){return n(l,c,a)}}var SYe=Bf();Bf({strict:!0});Bf({circular:!0});Bf({circular:!0,strict:!0});Bf({createInternalComparator:function(){return Gv}});Bf({strict:!0,createInternalComparator:function(){return Gv}});Bf({circular:!0,createInternalComparator:function(){return Gv}});Bf({circular:!0,createInternalComparator:function(){return Gv},strict:!0});function Bf(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,i=e.strict,a=i===void 0?!1:i,s=bYe(e),l=vYe(s),c=r?r(l):wYe(l);return xYe({circular:n,comparator:l,createState:o,equals:c,strict:a})}function CYe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function uG(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function o(i){n<0&&(n=i),i-n>t?(e(i),n=-1):CYe(o)};requestAnimationFrame(r)}function l_(e){"@babel/helpers - typeof";return l_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l_(e)}function PYe(e){return IYe(e)||OYe(e)||TYe(e)||EYe()}function EYe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TYe(e,t){if(e){if(typeof e=="string")return dG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dG(e,t)}}function dG(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:b<0?0:b},g=function(b){for(var x=b>1?1:b,S=x,P=0;P<8;++P){var E=d(S)-x,T=p(S);if(Math.abs(E-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,o=t.damping,i=o===void 0?8:o,a=t.dt,s=a===void 0?17:a,l=function(u,d,f){var p=-(u-d)*r,m=f*i,g=f+(p-m)*s/1e3,y=f*s/1e3+u;return Math.abs(y-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iXe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}function $$(e){return cXe(e)||lXe(e)||sXe(e)||aXe()}function aXe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sXe(e,t){if(e){if(typeof e=="string")return p_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p_(e,t)}}function lXe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cXe(e){if(Array.isArray(e))return p_(e)}function p_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cT(e){return cT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cT(e)}var nl=function(e){hXe(n,e);var t=mXe(n);function n(r,o){var i;uXe(this,n),i=t.call(this,r,o);var a=i.props,s=a.isActive,l=a.attributeName,c=a.from,u=a.to,d=a.steps,f=a.children,p=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(g_(i)),i.changeStyle=i.changeStyle.bind(g_(i)),!s||p<=0)return i.state={style:{}},typeof f=="function"&&(i.state={style:u}),m_(i);if(d&&d.length)i.state={style:d[0].style};else if(c){if(typeof f=="function")return i.state={style:c},m_(i);i.state={style:l?O0({},l,c):c}}else i.state={style:{}};return i}return fXe(n,[{key:"componentDidMount",value:function(){var o=this.props,i=o.isActive,a=o.canBegin;this.mounted=!0,!(!i||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(o){var i=this.props,a=i.isActive,s=i.canBegin,l=i.attributeName,c=i.shouldReAnimate,u=i.to,d=i.from,f=this.state.style;if(s){if(!a){var p={style:l?O0({},l,u):u};this.state&&f&&(l&&f[l]!==u||!l&&f!==u)&&this.setState(p);return}if(!(SYe(o.to,u)&&o.canBegin&&o.isActive)){var m=!o.canBegin||!o.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=m||c?d:o.to;if(this.state&&f){var y={style:l?O0({},l,g):g};(l&&f[l]!==g||!l&&f!==g)&&this.setState(y)}this.runAnimation(wl(wl({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var o=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),o&&o()}},{key:"handleStyleChange",value:function(o){this.changeStyle(o)}},{key:"changeStyle",value:function(o){this.mounted&&this.setState({style:o})}},{key:"runJSAnimation",value:function(o){var i=this,a=o.from,s=o.to,l=o.duration,c=o.easing,u=o.begin,d=o.onAnimationEnd,f=o.onAnimationStart,p=nXe(a,s,WYe(c),l,this.changeStyle),m=function(){i.stopJSAnimation=p()};this.manager.start([f,u,m,l,d])}},{key:"runStepAnimation",value:function(o){var i=this,a=o.steps,s=o.begin,l=o.onAnimationStart,c=a[0],u=c.style,d=c.duration,f=d===void 0?0:d,p=function(g,y,b){if(b===0)return g;var x=y.duration,S=y.easing,P=S===void 0?"ease":S,E=y.style,T=y.properties,O=y.onAnimationEnd,k=b>0?a[b-1]:y,M=T||Object.keys(E);if(typeof P=="function"||P==="spring")return[].concat($$(g),[i.runJSAnimation.bind(i,{from:k.style,to:E,duration:x,easing:P}),x]);var I=hG(M,x,P),R=wl(wl(wl({},k.style),E),{},{transition:I});return[].concat($$(g),[R,x,O]).filter(RYe)};return this.manager.start([l].concat($$(a.reduce(p,[u,Math.max(f,s)])),[o.onAnimationEnd]))}},{key:"runAnimation",value:function(o){this.manager||(this.manager=kYe());var i=o.begin,a=o.duration,s=o.attributeName,l=o.to,c=o.easing,u=o.onAnimationStart,d=o.onAnimationEnd,f=o.steps,p=o.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof c=="function"||typeof p=="function"||c==="spring"){this.runJSAnimation(o);return}if(f.length>1){this.runStepAnimation(o);return}var g=s?O0({},s,l):l,y=hG(Object.keys(g),a,c);m.start([u,i,wl(wl({},g),{},{transition:y}),a,d])}},{key:"render",value:function(){var o=this.props,i=o.children;o.begin;var a=o.duration;o.attributeName,o.easing;var s=o.isActive;o.steps,o.from,o.to,o.canBegin,o.onAnimationEnd,o.shouldReAnimate,o.onAnimationReStart;var l=oXe(o,rXe),c=v.Children.count(i),u=this.state.style;if(typeof i=="function")return i(u);if(!s||c===0||a<=0)return i;var d=function(p){var m=p.props,g=m.style,y=g===void 0?{}:g,b=m.className,x=v.cloneElement(p,wl(wl({},l),{},{style:wl(wl({},y),u),className:b}));return x};return c===1?d(v.Children.only(i)):Y.createElement("div",null,v.Children.map(i,function(f){return d(f)}))}}]),n}(v.PureComponent);nl.displayName="Animate";nl.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};nl.propTypes={from:j.oneOfType([j.object,j.string]),to:j.oneOfType([j.object,j.string]),attributeName:j.string,duration:j.number,begin:j.number,easing:j.oneOfType([j.string,j.func]),steps:j.arrayOf(j.shape({duration:j.number.isRequired,style:j.object.isRequired,easing:j.oneOfType([j.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),j.func]),properties:j.arrayOf("string"),onAnimationEnd:j.func})),children:j.oneOfType([j.node,j.func]),isActive:j.bool,canBegin:j.bool,onAnimationEnd:j.func,shouldReAnimate:j.bool,onAnimationStart:j.func,onAnimationReStart:j.func};j.object,j.object,j.object,j.element;j.object,j.object,j.object,j.oneOfType([j.array,j.element]),j.any;function mx(e){"@babel/helpers - typeof";return mx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mx(e)}function uT(){return uT=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,c=o>=0&&r>=0||o<0&&r<0?1:0,u;if(a>0&&i instanceof Array){for(var d=[0,0,0,0],f=0,p=4;fa?a:i[f];u="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(u+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(t+l*d[0],",").concat(n)),u+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(u+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, `).concat(t+r,",").concat(n+s*d[1])),u+="L ".concat(t+r,",").concat(n+o-s*d[2]),d[2]>0&&(u+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`, `).concat(t+r-l*d[2],",").concat(n+o)),u+="L ".concat(t+l*d[3],",").concat(n+o),d[3]>0&&(u+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`, `).concat(t,",").concat(n+o-s*d[3])),u+="Z"}else if(a>0&&i===+i&&i>0){var m=Math.min(a,i);u="M ".concat(t,",").concat(n+s*m,` @@ -342,24 +342,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho L `).concat(t+r,",").concat(n+o-s*m,` A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(t+r-l*m,",").concat(n+o,` L `).concat(t+l*m,",").concat(n+o,` - A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(t,",").concat(n+o-s*m," Z")}else u="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(o," h ").concat(-r," Z");return u},$Xe=function(t,n){if(!t||!n)return!1;var r=t.x,o=t.y,i=n.x,a=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(i,i+s),u=Math.max(i,i+s),d=Math.min(a,a+l),f=Math.max(a,a+l);return r>=c&&r<=u&&o>=d&&o<=f}return!1},RXe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},qj=function(t){var n=xG(xG({},RXe),t),r=y.useRef(),o=y.useState(-1),i=PXe(o,2),a=i[0],s=i[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var P=r.current.getTotalLength();P&&s(P)}catch{}},[]);var l=n.x,c=n.y,u=n.width,d=n.height,f=n.radius,p=n.className,m=n.animationEasing,g=n.animationDuration,v=n.animationBegin,w=n.isAnimationActive,x=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||d!==+d||u===0||d===0)return null;var S=fe("recharts-rectangle",p);return x?K.createElement(rl,{canBegin:a>0,from:{width:u,height:d,x:l,y:c},to:{width:u,height:d,x:l,y:c},duration:g,animationEasing:m,isActive:x},function(P){var T=P.width,E=P.height,O=P.x,k=P.y;return K.createElement(rl,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,isActive:w,easing:m},K.createElement("path",hE({},At(n,!0),{className:S,d:SG(O,k,T,E,f),ref:r})))}):K.createElement("path",hE({},At(n,!0),{className:S,d:SG(l,c,u,d,f)}))},_Xe=["points","className","baseLinePoints","connectNulls"];function bg(){return bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NXe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function CG(e){return BXe(e)||jXe(e)||FXe(e)||LXe()}function LXe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FXe(e,t){if(e){if(typeof e=="string")return bD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bD(e,t)}}function jXe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BXe(e){if(Array.isArray(e))return bD(e)}function bD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){PG(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),PG(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},rw=function(t,n){var r=zXe(t);n&&(r=[r.reduce(function(i,a){return[].concat(CG(i),CG(a))},[])]);var o=r.map(function(i){return i.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(o,"Z"):o},VXe=function(t,n,r){var o=rw(t,r);return"".concat(o.slice(-1)==="Z"?o.slice(0,-1):o,"L").concat(rw(n.reverse(),r).slice(1))},HXe=function(t){var n=t.points,r=t.className,o=t.baseLinePoints,i=t.connectNulls,a=DXe(t,_Xe);if(!n||!n.length)return null;var s=fe("recharts-polygon",r);if(o&&o.length){var l=a.stroke&&a.stroke!=="none",c=VXe(n,o,i);return K.createElement("g",{className:s},K.createElement("path",bg({},At(a,!0),{fill:c.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:c})),l?K.createElement("path",bg({},At(a,!0),{fill:"none",d:rw(n,i)})):null,l?K.createElement("path",bg({},At(a,!0),{fill:"none",d:rw(o,i)})):null)}var u=rw(n,i);return K.createElement("path",bg({},At(a,!0),{fill:u.slice(-1)==="Z"?a.fill:"none",className:s,d:u}))};function wD(){return wD=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XXe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var QXe=function(t,n,r,o,i,a){return"M".concat(t,",").concat(i,"v").concat(o,"M").concat(a,",").concat(n,"h").concat(r)},JXe=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.top,s=a===void 0?0:a,l=t.left,c=l===void 0?0:l,u=t.width,d=u===void 0?0:u,f=t.height,p=f===void 0?0:f,m=t.className,g=YXe(t,UXe),v=WXe({x:r,y:i,top:s,left:c,width:d,height:p},g);return!ct(r)||!ct(i)||!ct(d)||!ct(p)||!ct(s)||!ct(c)?null:K.createElement("path",xD({},At(v,!0),{className:fe("recharts-cross",m),d:QXe(r,i,d,p,s,c)}))},ZXe=tk,eQe=tne,tQe=zc;function nQe(e,t){return e&&e.length?ZXe(e,tQe(t),eQe):void 0}var rQe=nQe;const oQe=_n(rQe);var iQe=tk,aQe=zc,sQe=nne;function lQe(e,t){return e&&e.length?iQe(e,aQe(t),sQe):void 0}var cQe=lQe;const uQe=_n(cQe);var dQe=["cx","cy","angle","ticks","axisLine"],fQe=["ticks","tick","angle","tickFormatter","stroke"];function By(e){"@babel/helpers - typeof";return By=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},By(e)}function ow(){return ow=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pQe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function hQe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IG(e,t){for(var n=0;nAG?a=o==="outer"?"start":"end":i<-AG?a=o==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var r=this.props,o=r.cx,i=r.cy,a=r.radius,s=r.axisLine,l=r.axisLineType,c=up(up({},At(this.props,!1)),{},{fill:"none"},At(s,!1));if(l==="circle")return K.createElement(kS,Tp({className:"recharts-polar-angle-axis-line"},c,{cx:o,cy:i,r:a}));var u=this.props.ticks,d=u.map(function(f){return br(o,i,a,f.coordinate)});return K.createElement(HXe,Tp({className:"recharts-polar-angle-axis-line"},c,{points:d}))}},{key:"renderTicks",value:function(){var r=this,o=this.props,i=o.ticks,a=o.tick,s=o.tickLine,l=o.tickFormatter,c=o.stroke,u=At(this.props,!1),d=At(a,!1),f=up(up({},u),{},{fill:"none"},At(s,!1)),p=i.map(function(m,g){var v=r.getTickLineCoord(m),w=r.getTickTextAnchor(m),x=up(up(up({textAnchor:w},u),{},{stroke:"none",fill:c},d),{},{index:g,payload:m,x:v.x2,y:v.y2});return K.createElement(rn,Tp({className:fe("recharts-polar-angle-axis-tick",Mne(a)),key:"tick-".concat(m.coordinate)},wf(r.props,m,g)),s&&K.createElement("line",Tp({className:"recharts-polar-angle-axis-tick-line"},f,v)),a&&t.renderTickItem(a,x,l?l(m.value,g):m.value))});return K.createElement(rn,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var r=this.props,o=r.ticks,i=r.radius,a=r.axisLine;return i<=0||!o||!o.length?null:K.createElement(rn,{className:fe("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,o,i){var a;return K.isValidElement(r)?a=K.cloneElement(r,o):Vt(r)?a=r(o):a=K.createElement(bh,Tp({},o,{className:"recharts-polar-angle-axis-tick-value"}),i),a}}])}(y.PureComponent);sk(lk,"displayName","PolarAngleAxis");sk(lk,"axisType","angleAxis");sk(lk,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var kQe=Jee,MQe=kQe(Object.getPrototypeOf,Object),AQe=MQe,$Qe=Zu,RQe=AQe,_Qe=ed,DQe="[object Object]",NQe=Function.prototype,LQe=Object.prototype,Gne=NQe.toString,FQe=LQe.hasOwnProperty,jQe=Gne.call(Object);function BQe(e){if(!_Qe(e)||$Qe(e)!=DQe)return!1;var t=RQe(e);if(t===null)return!0;var n=FQe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Gne.call(n)==jQe}var zQe=BQe;const VQe=_n(zQe);var HQe=Zu,UQe=ed,WQe="[object Boolean]";function GQe(e){return e===!0||e===!1||UQe(e)&&HQe(e)==WQe}var qQe=GQe;const KQe=_n(qQe);function yx(e){"@babel/helpers - typeof";return yx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yx(e)}function yE(){return yE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:f,x:l,y:c},to:{upperWidth:u,lowerWidth:d,height:f,x:l,y:c},duration:g,animationEasing:m,isActive:w},function(S){var P=S.upperWidth,T=S.lowerWidth,E=S.height,O=S.x,k=S.y;return K.createElement(rl,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,easing:m},K.createElement("path",yE({},At(n,!0),{className:x,d:DG(O,k,P,T,E),ref:r})))}):K.createElement("g",null,K.createElement("path",yE({},At(n,!0),{className:x,d:DG(l,c,u,d,f)})))},iJe=["option","shapeType","propTransformer","activeClassName","isActive"];function vx(e){"@babel/helpers - typeof";return vx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vx(e)}function aJe(e,t){if(e==null)return{};var n=sJe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sJe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function NG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vE(e){for(var t=1;t0?Ya(S,"paddingAngle",0):0;if(T){var O=jr(T.endAngle-T.startAngle,S.endAngle-S.startAngle),k=gr(gr({},S),{},{startAngle:x+E,endAngle:x+O(g)+E});v.push(k),x=k.endAngle}else{var A=S.endAngle,I=S.startAngle,R=jr(0,A-I),L=R(g),F=gr(gr({},S),{},{startAngle:x+E,endAngle:x+L+E});v.push(F),x=F.endAngle}}),K.createElement(rn,null,r.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(r){var o=this;r.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var a=++o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[a].focus(),o.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--o.state.sectorToFocus<0?o.sectorRefs.length-1:o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[s].focus(),o.setState({sectorToFocus:s});break}case"Escape":{o.sectorRefs[o.state.sectorToFocus].blur(),o.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,o=r.sectors,i=r.isAnimationActive,a=this.state.prevSectors;return i&&o&&o.length&&(!a||!xf(a,o))?this.renderSectorsWithAnimation():this.renderSectorsStatically(o)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,o=this.props,i=o.hide,a=o.sectors,s=o.className,l=o.label,c=o.cx,u=o.cy,d=o.innerRadius,f=o.outerRadius,p=o.isAnimationActive,m=this.state.isAnimationFinished;if(i||!a||!a.length||!ct(c)||!ct(u)||!ct(d)||!ct(f))return null;var g=fe("recharts-pie",s);return K.createElement(rn,{tabIndex:this.props.rootTabIndex,className:g,ref:function(w){r.pieRef=w}},this.renderSectors(),l&&this.renderLabels(a),Bo.renderCallByParent(this.props,null,!1),(!p||m)&&Ul.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return o.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:o.curSectors,isAnimationFinished:!0}:r.sectors!==o.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,o){return r>o?"start":r=360?x:x-1)*l,P=v-x*p-S,T=o.reduce(function(k,A){var I=Er(A,w,0);return k+(ct(I)?I:0)},0),E;if(T>0){var O;E=o.map(function(k,A){var I=Er(k,w,0),R=Er(k,u,A),L=(ct(I)?I:0)/T,F;A?F=O.endAngle+Ni(g)*l*(I!==0?1:0):F=a;var z=F+Ni(g)*((I!==0?p:0)+L*P),_=(F+z)/2,D=(m.innerRadius+m.outerRadius)/2,H=[{name:R,value:I,payload:k,dataKey:w,type:f}],B=br(m.cx,m.cy,D,_);return O=gr(gr(gr({percent:L,cornerRadius:i,name:R,tooltipPayload:H,midAngle:_,middleRadius:D,tooltipPosition:B},k),m),{},{value:Er(k,w),startAngle:F,endAngle:z,payload:k,paddingAngle:Ni(g)*l}),O})}return gr(gr({},m),{},{sectors:E,data:o})});var IJe=Math.ceil,kJe=Math.max;function MJe(e,t,n,r){for(var o=-1,i=kJe(IJe((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a}var AJe=MJe,$Je=yte,BG=1/0,RJe=17976931348623157e292;function _Je(e){if(!e)return e===0?e:0;if(e=$Je(e),e===BG||e===-BG){var t=e<0?-1:1;return t*RJe}return e===e?e:0}var Yne=_Je,DJe=AJe,NJe=qI,N$=Yne;function LJe(e){return function(t,n,r){return r&&typeof r!="number"&&NJe(t,n,r)&&(n=r=void 0),t=N$(t),n===void 0?(n=t,t=0):n=N$(n),r=r===void 0?t0&&r.handleDrag(o.changedTouches[0])}),Aa(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var o=r.props,i=o.endIndex,a=o.onDragEnd,s=o.startIndex;a==null||a({endIndex:i,startIndex:s})}),r.detachDragEndListener()}),Aa(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Aa(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Aa(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Aa(r,"handleSlideDragStart",function(o){var i=WG(o)?o.changedTouches[0]:o;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return QJe(t,e),qJe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var o=r.startX,i=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,u=c.length-1,d=Math.min(o,i),f=Math.max(o,i),p=t.getIndexInRange(a,d),m=t.getIndexInRange(a,f);return{startIndex:p-p%l,endIndex:m===u?u:m-m%l}}},{key:"getTextOfTick",value:function(r){var o=this.props,i=o.data,a=o.tickFormatter,s=o.dataKey,l=Er(i[r],s,r);return Vt(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var o=this.state,i=o.slideMoveStartX,a=o.startX,s=o.endX,l=this.props,c=l.x,u=l.width,d=l.travellerWidth,f=l.startIndex,p=l.endIndex,m=l.onChange,g=r.pageX-i;g>0?g=Math.min(g,c+u-d-s,c+u-d-a):g<0&&(g=Math.max(g,c-a,c-s));var v=this.getIndex({startX:a+g,endX:s+g});(v.startIndex!==f||v.endIndex!==p)&&m&&m(v),this.setState({startX:a+g,endX:s+g,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,o){var i=WG(o)?o.changedTouches[0]:o;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var o=this.state,i=o.brushMoveStartX,a=o.movingTravellerId,s=o.endX,l=o.startX,c=this.state[a],u=this.props,d=u.x,f=u.width,p=u.travellerWidth,m=u.onChange,g=u.gap,v=u.data,w={startX:this.state.startX,endX:this.state.endX},x=r.pageX-i;x>0?x=Math.min(x,d+f-p-c):x<0&&(x=Math.max(x,d-c)),w[a]=c+x;var S=this.getIndex(w),P=S.startIndex,T=S.endIndex,E=function(){var k=v.length-1;return a==="startX"&&(s>l?P%g===0:T%g===0)||sl?T%g===0:P%g===0)||s>l&&T===k};this.setState(Aa(Aa({},a,c+x),"brushMoveStartX",r.pageX),function(){m&&E()&&m(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,o){var i=this,a=this.state,s=a.scaleValues,l=a.startX,c=a.endX,u=this.state[o],d=s.indexOf(u);if(d!==-1){var f=d+r;if(!(f===-1||f>=s.length)){var p=s[f];o==="startX"&&p>=c||o==="endX"&&p<=l||this.setState(Aa({},o,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.fill,c=r.stroke;return K.createElement("rect",{stroke:c,fill:l,x:o,y:i,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.data,c=r.children,u=r.padding,d=y.Children.only(c);return d?K.cloneElement(d,{x:o,y:i,width:a,height:s,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,o){var i,a,s=this,l=this.props,c=l.y,u=l.travellerWidth,d=l.height,f=l.traveller,p=l.ariaLabel,m=l.data,g=l.startIndex,v=l.endIndex,w=Math.max(r,this.props.x),x=L$(L$({},At(this.props,!1)),{},{x:w,y:c,width:u,height:d}),S=p||"Min value: ".concat((i=m[g])===null||i===void 0?void 0:i.name,", Max value: ").concat((a=m[v])===null||a===void 0?void 0:a.name);return K.createElement(rn,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[o],onTouchStart:this.travellerDragStartHandlers[o],onKeyDown:function(T){["ArrowLeft","ArrowRight"].includes(T.key)&&(T.preventDefault(),T.stopPropagation(),s.handleTravellerMoveKeyboard(T.key==="ArrowRight"?1:-1,o))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(f,x))}},{key:"renderSlide",value:function(r,o){var i=this.props,a=i.y,s=i.height,l=i.stroke,c=i.travellerWidth,u=Math.min(r,o)+c,d=Math.max(Math.abs(o-r)-c,0);return K.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:a,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,o=r.startIndex,i=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,u=this.state,d=u.startX,f=u.endX,p=5,m={pointerEvents:"none",fill:c};return K.createElement(rn,{className:"recharts-brush-texts"},K.createElement(bh,SE({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,f)-p,y:a+s/2},m),this.getTextOfTick(o)),K.createElement(bh,SE({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,f)+l+p,y:a+s/2},m),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,o=r.data,i=r.className,a=r.children,s=r.x,l=r.y,c=r.width,u=r.height,d=r.alwaysShowText,f=this.state,p=f.startX,m=f.endX,g=f.isTextActive,v=f.isSlideMoving,w=f.isTravellerMoving,x=f.isTravellerFocused;if(!o||!o.length||!ct(s)||!ct(l)||!ct(c)||!ct(u)||c<=0||u<=0)return null;var S=fe("recharts-brush",i),P=K.Children.count(a)===1,T=WJe("userSelect","none");return K.createElement(rn,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:T},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(g||v||w||x||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var o=r.x,i=r.y,a=r.width,s=r.height,l=r.stroke,c=Math.floor(i+s/2)-1;return K.createElement(K.Fragment,null,K.createElement("rect",{x:o,y:i,width:a,height:s,fill:l,stroke:"none"}),K.createElement("line",{x1:o+1,y1:c,x2:o+a-1,y2:c,fill:"none",stroke:"#fff"}),K.createElement("line",{x1:o+1,y1:c+2,x2:o+a-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,o){var i;return K.isValidElement(r)?i=K.cloneElement(r,o):Vt(r)?i=r(o):i=t.renderDefaultTraveller(o),i}},{key:"getDerivedStateFromProps",value:function(r,o){var i=r.data,a=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,u=r.startIndex,d=r.endIndex;if(i!==o.prevData||c!==o.prevUpdateId)return L$({prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a},i&&i.length?ZJe({data:i,width:a,x:s,travellerWidth:l,startIndex:u,endIndex:d}):{scale:null,scaleValues:null});if(o.scale&&(a!==o.prevWidth||s!==o.prevX||l!==o.prevTravellerWidth)){o.scale.range([s,s+a-l]);var f=o.scale.domain().map(function(p){return o.scale(p)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a,startX:o.scale(r.startIndex),endX:o.scale(r.endIndex),scaleValues:f}}return null}},{key:"getIndexInRange",value:function(r,o){for(var i=r.length,a=0,s=i-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>o?s=l:a=l}return o>=r[s]?s:a}}])}(y.PureComponent);Aa(Uy,"displayName","Brush");Aa(Uy,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var eZe=bj;function tZe(e,t){var n;return eZe(e,function(r,o,i){return n=t(r,o,i),!n}),!!n}var nZe=tZe,rZe=Uee,oZe=zc,iZe=nZe,aZe=xa,sZe=qI;function lZe(e,t,n){var r=aZe(e)?rZe:iZe;return n&&sZe(e,t,n)&&(t=void 0),r(e,oZe(t))}var cZe=lZe;const uZe=_n(cZe);var kc=function(t,n){var r=t.alwaysShow,o=t.ifOverflow;return r&&(o="extendDomain"),o===n},GG=fte;function dZe(e,t,n){t=="__proto__"&&GG?GG(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var fZe=dZe,pZe=fZe,hZe=ute,mZe=zc;function gZe(e,t){var n={};return t=mZe(t),hZe(e,function(r,o,i){pZe(n,o,t(r,o,i))}),n}var yZe=gZe;const vZe=_n(yZe);function bZe(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NZe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function LZe(e,t){var n=e.x,r=e.y,o=DZe(e,AZe),i="".concat(n),a=parseInt(i,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||o.height),u=parseInt(c,10),d="".concat(t.width||o.width),f=parseInt(d,10);return r0(r0(r0(r0(r0({},t),o),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function KG(e){return K.createElement(bE,ED({shapeType:"rectangle",propTransformer:LZe,activeClassName:"recharts-active-bar"},e))}var FZe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,o){if(typeof t=="number")return t;var i=typeof r=="number";return i?t(r,o):(i||xh(),n)}},jZe=["value","background"],ere;function Wy(e){"@babel/helpers - typeof";return Wy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wy(e)}function BZe(e,t){if(e==null)return{};var n=zZe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zZe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function PE(){return PE=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(_)0&&Math.abs(z)0&&(F=Math.min((ne||0)-(z[ie-1]||0),F))}),Number.isFinite(F)){var _=F/L,D=g.layout==="vertical"?r.height:r.width;if(g.padding==="gap"&&(O=_*D/2),g.padding==="no-gap"){var H=Li(t.barCategoryGap,_*D),B=_*D/2;O=B-H-(B-H)/D*H}}}o==="xAxis"?k=[r.left+(S.left||0)+(O||0),r.left+r.width-(S.right||0)-(O||0)]:o==="yAxis"?k=l==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(O||0),r.top+r.height-(S.bottom||0)-(O||0)]:k=g.range,T&&(k=[k[1],k[0]]);var V=Cne(g,i,f),W=V.scale,G=V.realScaleType;W.domain(w).range(k),Pne(W);var Q=Tne(W,Ml(Ml({},g),{},{realScaleType:G}));o==="xAxis"?(R=v==="top"&&!P||v==="bottom"&&P,A=r.left,I=d[E]-R*g.height):o==="yAxis"&&(R=v==="left"&&!P||v==="right"&&P,A=d[E]-R*g.width,I=r.top);var Y=Ml(Ml(Ml({},g),Q),{},{realScaleType:G,x:A,y:I,scale:W,width:o==="xAxis"?r.width:g.width,height:o==="yAxis"?r.height:g.height});return Y.bandSize=lE(Y,Q),!g.hide&&o==="xAxis"?d[E]+=(R?-1:1)*Y.height:g.hide||(d[E]+=(R?-1:1)*Y.width),Ml(Ml({},p),{},dk({},m,Y))},{})},ore=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return{x:Math.min(r,i),y:Math.min(o,a),width:Math.abs(i-r),height:Math.abs(a-o)}},JZe=function(t){var n=t.x1,r=t.y1,o=t.x2,i=t.y2;return ore({x:n,y:r},{x:o,y:i})},ire=function(){function e(t){YZe(this,e),this.scale=t}return XZe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(o){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),o=r[0],i=r[r.length-1];return o<=i?n>=o&&n<=i:n>=i&&n<=o}}],[{key:"create",value:function(n){return new e(n)}}])}();dk(ire,"EPS",1e-4);var Kj=function(t){var n=Object.keys(t).reduce(function(r,o){return Ml(Ml({},r),{},dk({},o,ire.create(t[o])))},{});return Ml(Ml({},n),{},{apply:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.bandAware,s=i.position;return vZe(o,function(l,c){return n[c].apply(l,{bandAware:a,position:s})})},isInRange:function(o){return Zne(o,function(i,a){return n[a].isInRange(i)})}})};function ZZe(e){return(e%180+180)%180}var eet=function(t){var n=t.width,r=t.height,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=ZZe(o),a=i*Math.PI/180,s=Math.atan(r/n),l=a>s&&a-1?o[i?t[a]:a]:void 0}}var iet=oet,aet=Yne;function set(e){var t=aet(e),n=t%1;return t===t?n?t-n:t:0}var cet=set,uet=ote,det=zc,fet=cet,pet=Math.max;function het(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var o=n==null?0:fet(n);return o<0&&(o=pet(r+o,0)),uet(e,det(t),o)}var met=het,get=iet,yet=met,vet=get(yet),bet=vet;const wet=_n(bet);var xet=RFe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),Yj=y.createContext(void 0),Xj=y.createContext(void 0),are=y.createContext(void 0),sre=y.createContext({}),lre=y.createContext(void 0),cre=y.createContext(0),ure=y.createContext(0),ZG=function(t){var n=t.state,r=n.xAxisMap,o=n.yAxisMap,i=n.offset,a=t.clipPathId,s=t.children,l=t.width,c=t.height,u=xet(i);return K.createElement(Yj.Provider,{value:r},K.createElement(Xj.Provider,{value:o},K.createElement(sre.Provider,{value:i},K.createElement(are.Provider,{value:u},K.createElement(lre.Provider,{value:a},K.createElement(cre.Provider,{value:c},K.createElement(ure.Provider,{value:l},s)))))))},Cet=function(){return y.useContext(lre)},dre=function(t){var n=y.useContext(Yj);n==null&&xh();var r=n[t];return r==null&&xh(),r},Pet=function(){var t=y.useContext(Yj);return Dd(t)},Tet=function(){var t=y.useContext(Xj),n=wet(t,function(r){return Zne(r.domain,Number.isFinite)});return n||Dd(t)},fre=function(t){var n=y.useContext(Xj);n==null&&xh();var r=n[t];return r==null&&xh(),r},Eet=function(){var t=y.useContext(are);return t},Oet=function(){return y.useContext(sre)},Qj=function(){return y.useContext(ure)},Jj=function(){return y.useContext(cre)};function Gy(e){"@babel/helpers - typeof";return Gy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gy(e)}function Iet(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ket(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function utt(e,t){return bre(e,t+1)}function dtt(e,t,n,r,o){for(var i=(r||[]).slice(),a=t.start,s=t.end,l=0,c=1,u=a,d=function(){var m=r==null?void 0:r[l];if(m===void 0)return{v:bre(r,c)};var g=l,v,w=function(){return v===void 0&&(v=n(m,g)),v},x=m.coordinate,S=l===0||kE(e,x,w,u,s);S||(l=0,u=a,c+=1),S&&(u=x+e*(w()/2+o),l+=c)},f;c<=i.length;)if(f=d(),f)return f.v;return[]}function Cx(e){"@babel/helpers - typeof";return Cx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cx(e)}function s8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function di(e){for(var t=1;t0?p.coordinate-v*e:p.coordinate})}else i[f]=p=di(di({},p),{},{tickCoord:p.coordinate});var w=kE(e,p.tickCoord,g,s,l);w&&(l=p.tickCoord-e*(g()/2+o),i[f]=di(di({},p),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return i}function gtt(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(i){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=di(di({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate});var p=kE(e,u.tickCoord,function(){return d},l,c);p&&(c=u.tickCoord-e*(d/2+o),a[s-1]=di(di({},u),{},{isShow:!0}))}for(var m=i?s-1:s,g=function(x){var S=a[x],P,T=function(){return P===void 0&&(P=n(S,x)),P};if(x===0){var E=e*(S.coordinate-e*T()/2-l);a[x]=S=di(di({},S),{},{tickCoord:E<0?S.coordinate-E*e:S.coordinate})}else a[x]=S=di(di({},S),{},{tickCoord:S.coordinate});var O=kE(e,S.tickCoord,T,l,c);O&&(l=S.tickCoord+e*(T()/2+o),a[x]=di(di({},S),{},{isShow:!0}))},v=0;v=2?Ni(o[1].coordinate-o[0].coordinate):1,w=ctt(i,v,p);return l==="equidistantPreserveStart"?dtt(v,w,g,o,a):(l==="preserveStart"||l==="preserveStartEnd"?f=gtt(v,w,g,o,a,l==="preserveStartEnd"):f=mtt(v,w,g,o,a),f.filter(function(x){return x.isShow}))}var ytt=["viewBox"],vtt=["viewBox"],btt=["ticks"];function Yy(e){"@babel/helpers - typeof";return Yy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yy(e)}function xg(){return xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wtt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function xtt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c8(e,t){for(var n=0;n0?l(this.props):l(p)),a<=0||s<=0||!m||!m.length?null:K.createElement(rn,{className:fe("recharts-cartesian-axis",c),ref:function(v){r.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),Bo.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,o,i){var a;return K.isValidElement(r)?a=K.cloneElement(r,o):Vt(r)?a=r(o):a=K.createElement(bh,xg({},o,{className:"recharts-cartesian-axis-tick-value"}),i),a}}])}(y.Component);nB(Kv,"displayName","CartesianAxis");nB(Kv,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Itt=["x1","y1","x2","y2","key"],ktt=["offset"];function Sh(e){"@babel/helpers - typeof";return Sh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sh(e)}function u8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function mi(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rtt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var _tt=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,o=t.x,i=t.y,a=t.width,s=t.height,l=t.ry;return K.createElement("rect",{x:o,y:i,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Sre(e,t){var n;if(K.isValidElement(e))n=K.cloneElement(e,t);else if(Vt(e))n=e(t);else{var r=t.x1,o=t.y1,i=t.x2,a=t.y2,s=t.key,l=d8(t,Itt),c=At(l,!1);c.offset;var u=d8(c,ktt);n=K.createElement("line",Np({},u,{x1:r,y1:o,x2:i,y2:a,fill:"none",key:s}))}return n}function Dtt(e){var t=e.x,n=e.width,r=e.horizontal,o=r===void 0?!0:r,i=e.horizontalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=mi(mi({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return Sre(o,c)});return K.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function Ntt(e){var t=e.y,n=e.height,r=e.vertical,o=r===void 0?!0:r,i=e.verticalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=mi(mi({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return Sre(o,c)});return K.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function Ltt(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,o=e.y,i=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var u=s.map(function(f){return Math.round(f+o-o)}).sort(function(f,p){return f-p});o!==u[0]&&u.unshift(0);var d=u.map(function(f,p){var m=!u[p+1],g=m?o+a-f:u[p+1]-f;if(g<=0)return null;var v=p%t.length;return K.createElement("rect",{key:"react-".concat(p),y:f,x:r,height:g,width:i,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return K.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function Ftt(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,o=e.fillOpacity,i=e.x,a=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var u=c.map(function(f){return Math.round(f+i-i)}).sort(function(f,p){return f-p});i!==u[0]&&u.unshift(0);var d=u.map(function(f,p){var m=!u[p+1],g=m?i+s-f:u[p+1]-f;if(g<=0)return null;var v=p%r.length;return K.createElement("rect",{key:"react-".concat(p),x:f,y:a,width:g,height:l,stroke:"none",fill:r[v],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return K.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var jtt=function(t,n){var r=t.xAxis,o=t.width,i=t.height,a=t.offset;return Sne(tB(mi(mi(mi({},Kv.defaultProps),r),{},{ticks:xu(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.left,a.left+a.width,n)},Btt=function(t,n){var r=t.yAxis,o=t.width,i=t.height,a=t.offset;return Sne(tB(mi(mi(mi({},Kv.defaultProps),r),{},{ticks:xu(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.top,a.top+a.height,n)},_m={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function jh(e){var t,n,r,o,i,a,s=Qj(),l=Jj(),c=Oet(),u=mi(mi({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:_m.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:_m.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:_m.horizontal,horizontalFill:(o=e.horizontalFill)!==null&&o!==void 0?o:_m.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:_m.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:_m.verticalFill,x:ct(e.x)?e.x:c.left,y:ct(e.y)?e.y:c.top,width:ct(e.width)?e.width:c.width,height:ct(e.height)?e.height:c.height}),d=u.x,f=u.y,p=u.width,m=u.height,g=u.syncWithTicks,v=u.horizontalValues,w=u.verticalValues,x=Pet(),S=Tet();if(!ct(p)||p<=0||!ct(m)||m<=0||!ct(d)||d!==+d||!ct(f)||f!==+f)return null;var P=u.verticalCoordinatesGenerator||jtt,T=u.horizontalCoordinatesGenerator||Btt,E=u.horizontalPoints,O=u.verticalPoints;if((!E||!E.length)&&Vt(T)){var k=v&&v.length,A=T({yAxis:S?mi(mi({},S),{},{ticks:k?v:S.ticks}):void 0,width:s,height:l,offset:c},k?!0:g);Hl(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Sh(A),"]")),Array.isArray(A)&&(E=A)}if((!O||!O.length)&&Vt(P)){var I=w&&w.length,R=P({xAxis:x?mi(mi({},x),{},{ticks:I?w:x.ticks}):void 0,width:s,height:l,offset:c},I?!0:g);Hl(Array.isArray(R),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Sh(R),"]")),Array.isArray(R)&&(O=R)}return K.createElement("g",{className:"recharts-cartesian-grid"},K.createElement(_tt,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),K.createElement(Dtt,Np({},u,{offset:c,horizontalPoints:E,xAxis:x,yAxis:S})),K.createElement(Ntt,Np({},u,{offset:c,verticalPoints:O,xAxis:x,yAxis:S})),K.createElement(Ltt,Np({},u,{horizontalPoints:E})),K.createElement(Ftt,Np({},u,{verticalPoints:O})))}jh.displayName="CartesianGrid";var ztt=["type","layout","connectNulls","ref"],Vtt=["key"];function Xy(e){"@babel/helpers - typeof";return Xy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xy(e)}function f8(e,t){if(e==null)return{};var n=Htt(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Htt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function iw(){return iw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){p=[].concat(Dm(l.slice(0,m)),[d-g]);break}var v=p.length%2===0?[0,f]:[f];return[].concat(Dm(t.repeat(l,u)),Dm(p),v).map(function(w){return"".concat(w,"px")}).join(", ")}),Al(n,"id",Nf("recharts-line-")),Al(n,"pathRef",function(a){n.mainCurve=a}),Al(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Al(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return Ztt(t,e),Ytt(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.points,s=i.xAxis,l=i.yAxis,c=i.layout,u=i.children,d=Vi(u,Gv);if(!d)return null;var f=function(g,v){return{x:g.x,y:g.y,value:g.value,errorVal:Er(g.payload,v)}},p={clipPath:r?"url(#clipPath-".concat(o,")"):null};return K.createElement(rn,p,d.map(function(m){return K.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,dataPointFormatter:f})}))}},{key:"renderDots",value:function(r,o,i){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,u=s.dataKey,d=At(this.props,!1),f=At(l,!0),p=c.map(function(g,v){var w=ka(ka(ka({key:"dot-".concat(v),r:3},d),f),{},{value:g.value,dataKey:u,cx:g.x,cy:g.y,index:v,payload:g.payload});return t.renderDotItem(l,w)}),m={clipPath:r?"url(#clipPath-".concat(o?"":"dots-").concat(i,")"):null};return K.createElement(rn,iw({className:"recharts-line-dots",key:"dots"},m),p)}},{key:"renderCurveStatically",value:function(r,o,i,a){var s=this.props,l=s.type,c=s.layout,u=s.connectNulls;s.ref;var d=f8(s,ztt),f=ka(ka(ka({},At(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:o?"url(#clipPath-".concat(i,")"):null,points:r},a),{},{type:l,layout:c,connectNulls:u});return K.createElement(df,iw({},f,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,o){var i=this,a=this.props,s=a.points,l=a.strokeDasharray,c=a.isAnimationActive,u=a.animationBegin,d=a.animationDuration,f=a.animationEasing,p=a.animationId,m=a.animateNewValues,g=a.width,v=a.height,w=this.state,x=w.prevPoints,S=w.totalLength;return K.createElement(rl,{begin:u,duration:d,isActive:c,easing:f,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(P){var T=P.t;if(x){var E=x.length/s.length,O=s.map(function(L,F){var z=Math.floor(F*E);if(x[z]){var _=x[z],D=jr(_.x,L.x),H=jr(_.y,L.y);return ka(ka({},L),{},{x:D(T),y:H(T)})}if(m){var B=jr(g*2,L.x),V=jr(v/2,L.y);return ka(ka({},L),{},{x:B(T),y:V(T)})}return ka(ka({},L),{},{x:L.x,y:L.y})});return i.renderCurveStatically(O,r,o)}var k=jr(0,S),A=k(T),I;if(l){var R="".concat(l).split(/[,\s]+/gim).map(function(L){return parseFloat(L)});I=i.getStrokeDasharray(A,S,R)}else I=i.generateSimpleStrokeDasharray(S,A);return i.renderCurveStatically(s,r,o,{strokeDasharray:I})})}},{key:"renderCurve",value:function(r,o){var i=this.props,a=i.points,s=i.isAnimationActive,l=this.state,c=l.prevPoints,u=l.totalLength;return s&&a&&a.length&&(!c&&u>0||!xf(c,a))?this.renderCurveWithAnimation(r,o):this.renderCurveStatically(a,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.xAxis,u=o.yAxis,d=o.top,f=o.left,p=o.width,m=o.height,g=o.isAnimationActive,v=o.id;if(i||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=fe("recharts-line",l),P=c&&c.allowDataOverflow,T=u&&u.allowDataOverflow,E=P||T,O=Ft(v)?this.id:v,k=(r=At(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},A=k.r,I=A===void 0?3:A,R=k.strokeWidth,L=R===void 0?2:R,F=mee(a)?a:{},z=F.clipDot,_=z===void 0?!0:z,D=I*2+L;return K.createElement(rn,{className:S},P||T?K.createElement("defs",null,K.createElement("clipPath",{id:"clipPath-".concat(O)},K.createElement("rect",{x:P?f:f-p/2,y:T?d:d-m/2,width:P?p:p*2,height:T?m:m*2})),!_&&K.createElement("clipPath",{id:"clipPath-dots-".concat(O)},K.createElement("rect",{x:f-D/2,y:d-D/2,width:p+D,height:m+D}))):null,!x&&this.renderCurve(E,O),this.renderErrorBar(E,O),(x||a)&&this.renderDots(E,_,O),(!g||w)&&Ul.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:o.curPoints}:r.points!==o.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,o){for(var i=r.length%2!==0?[].concat(Dm(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rnt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Lp(){return Lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!xf(u,a)||!xf(d,s))?this.renderAreaWithAnimation(r,o):this.renderAreaStatically(a,s,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.top,u=o.left,d=o.xAxis,f=o.yAxis,p=o.width,m=o.height,g=o.isAnimationActive,v=o.id;if(i||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=fe("recharts-area",l),P=d&&d.allowDataOverflow,T=f&&f.allowDataOverflow,E=P||T,O=Ft(v)?this.id:v,k=(r=At(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},A=k.r,I=A===void 0?3:A,R=k.strokeWidth,L=R===void 0?2:R,F=mee(a)?a:{},z=F.clipDot,_=z===void 0?!0:z,D=I*2+L;return K.createElement(rn,{className:S},P||T?K.createElement("defs",null,K.createElement("clipPath",{id:"clipPath-".concat(O)},K.createElement("rect",{x:P?u:u-p/2,y:T?c:c-m/2,width:P?p:p*2,height:T?m:m*2})),!_&&K.createElement("clipPath",{id:"clipPath-dots-".concat(O)},K.createElement("rect",{x:u-D/2,y:c-D/2,width:p+D,height:m+D}))):null,x?null:this.renderArea(E,O),(a||x)&&this.renderDots(E,_,O),(!g||w)&&Ul.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:o.curPoints,prevBaseLine:o.curBaseLine}:r.points!==o.curPoints||r.baseLine!==o.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(y.PureComponent);Tre=zf;Sc(zf,"displayName","Area");Sc(zf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ys.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Sc(zf,"getBaseValue",function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue,s=a??i;if(ct(s)&&typeof s=="number")return s;var l=o==="horizontal"?r:n,c=l.scale.domain();if(l.type==="number"){var u=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return s==="dataMin"?d:s==="dataMax"||u<0?u:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});Sc(zf,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,o=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=t.layout,m=c&&c.length,g=Tre.getBaseValue(t,n,r,o),v=p==="horizontal",w=!1,x=d.map(function(P,T){var E;m?E=c[u+T]:(E=Er(P,l),Array.isArray(E)?w=!0:E=[g,E]);var O=E[1]==null||m&&Er(P,l)==null;return v?{x:Fy({axis:r,ticks:i,bandSize:s,entry:P,index:T}),y:O?null:o.scale(E[1]),value:E,payload:P}:{x:O?null:r.scale(E[1]),y:Fy({axis:o,ticks:a,bandSize:s,entry:P,index:T}),value:E,payload:P}}),S;return m||w?S=x.map(function(P){var T=Array.isArray(P.value)?P.value[0]:null;return v?{x:P.x,y:T!=null&&P.y!=null?o.scale(T):null}:{x:T!=null?r.scale(T):null,y:P.y}}):S=v?o.scale(g):r.scale(g),Sd({points:x,baseLine:S,layout:p,isRange:w},f)});Sc(zf,"renderDotItem",function(e,t){var n;if(K.isValidElement(e))n=K.cloneElement(e,t);else if(Vt(e))n=e(t);else{var r=fe("recharts-area-dot",typeof e!="boolean"?e.className:""),o=t.key,i=Ere(t,nnt);n=K.createElement(kS,Lp({},i,{key:o,className:r}))}return n});function Jy(e){"@babel/helpers - typeof";return Jy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jy(e)}function dnt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fnt(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xnt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Snt(e){var t=e.option,n=e.isActive,r=wnt(e,bnt);return typeof t=="string"?K.createElement(bE,aw({option:K.createElement(UI,aw({type:t},r)),isActive:n,shapeType:"symbols"},r)):K.createElement(bE,aw({option:t,isActive:n,shapeType:"symbols"},r))}function Zy(e){"@babel/helpers - typeof";return Zy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zy(e)}function sw(){return sw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yrt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function vrt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function brt(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&ct(o)&&ct(i)?t.slice(o,i+1):[]};function qre(e){return e==="number"?[0,"auto"]:void 0}var KD=function(t,n,r,o){var i=t.graphicalItems,a=t.tooltipAxis,s=yk(n,t);return r<0||!i||!i.length||r>=s.length?null:i.reduce(function(l,c){var u,d=(u=c.props.data)!==null&&u!==void 0?u:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(a.dataKey&&!a.allowDuplicatedCategory){var p=d===void 0?s:d;f=_T(p,a.dataKey,o)}else f=d&&d[r]||s[r];return f?[].concat(rv(l),[One(c,f)]):l},[])},P8=function(t,n,r,o){var i=o||{x:t.chartX,y:t.chartY},a=Art(i,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=Lqe(a,s,c,l);if(u>=0&&c){var d=c[u]&&c[u].value,f=KD(t,n,u,d),p=$rt(r,s,u,i);return{activeTooltipIndex:u,activeLabel:d,activePayload:f,activeCoordinate:p}}return null},Rrt=function(t,n){var r=n.axes,o=n.graphicalItems,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,d=t.children,f=t.stackOffset,p=xne(u,i);return r.reduce(function(m,g){var v,w=g.type.defaultProps!==void 0?ze(ze({},g.type.defaultProps),g.props):g.props,x=w.type,S=w.dataKey,P=w.allowDataOverflow,T=w.allowDuplicatedCategory,E=w.scale,O=w.ticks,k=w.includeHidden,A=w[a];if(m[A])return m;var I=yk(t.data,{graphicalItems:o.filter(function(Q){var Y,ne=a in Q.props?Q.props[a]:(Y=Q.type.defaultProps)===null||Y===void 0?void 0:Y[a];return ne===A}),dataStartIndex:l,dataEndIndex:c}),R=I.length,L,F,z;irt(w.domain,P,x)&&(L=iD(w.domain,null,P),p&&(x==="number"||E!=="auto")&&(z=tw(I,S,"category")));var _=qre(x);if(!L||L.length===0){var D,H=(D=w.domain)!==null&&D!==void 0?D:_;if(S){if(L=tw(I,S,x),x==="category"&&p){var B=Oje(L);T&&B?(F=L,L=xE(0,R)):T||(L=V6(H,L,g).reduce(function(Q,Y){return Q.indexOf(Y)>=0?Q:[].concat(rv(Q),[Y])},[]))}else if(x==="category")T?L=L.filter(function(Q){return Q!==""&&!Ft(Q)}):L=V6(H,L,g).reduce(function(Q,Y){return Q.indexOf(Y)>=0||Y===""||Ft(Y)?Q:[].concat(rv(Q),[Y])},[]);else if(x==="number"){var V=Vqe(I,o.filter(function(Q){var Y,ne,ie=a in Q.props?Q.props[a]:(Y=Q.type.defaultProps)===null||Y===void 0?void 0:Y[a],re="hide"in Q.props?Q.props.hide:(ne=Q.type.defaultProps)===null||ne===void 0?void 0:ne.hide;return ie===A&&(k||!re)}),S,i,u);V&&(L=V)}p&&(x==="number"||E!=="auto")&&(z=tw(I,S,"category"))}else p?L=xE(0,R):s&&s[A]&&s[A].hasStack&&x==="number"?L=f==="expand"?[0,1]:Ene(s[A].stackGroups,l,c):L=wne(I,o.filter(function(Q){var Y=a in Q.props?Q.props[a]:Q.type.defaultProps[a],ne="hide"in Q.props?Q.props.hide:Q.type.defaultProps.hide;return Y===A&&(k||!ne)}),x,u,!0);if(x==="number")L=WD(d,L,A,i,O),H&&(L=iD(H,L,P));else if(x==="category"&&H){var W=H,G=L.every(function(Q){return W.indexOf(Q)>=0});G&&(L=W)}}return ze(ze({},m),{},Ht({},A,ze(ze({},w),{},{axisType:i,domain:L,categoricalDomain:z,duplicateDomain:F,originalDomain:(v=w.domain)!==null&&v!==void 0?v:_,isCategorical:p,layout:u})))},{})},_rt=function(t,n){var r=n.graphicalItems,o=n.Axis,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,d=t.children,f=yk(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),p=f.length,m=xne(u,i),g=-1;return r.reduce(function(v,w){var x=w.type.defaultProps!==void 0?ze(ze({},w.type.defaultProps),w.props):w.props,S=x[a],P=qre("number");if(!v[S]){g++;var T;return m?T=xE(0,p):s&&s[S]&&s[S].hasStack?(T=Ene(s[S].stackGroups,l,c),T=WD(d,T,S,i)):(T=iD(P,wne(f,r.filter(function(E){var O,k,A=a in E.props?E.props[a]:(O=E.type.defaultProps)===null||O===void 0?void 0:O[a],I="hide"in E.props?E.props.hide:(k=E.type.defaultProps)===null||k===void 0?void 0:k.hide;return A===S&&!I}),"number",u),o.defaultProps.allowDataOverflow),T=WD(d,T,S,i)),ze(ze({},v),{},Ht({},S,ze(ze({axisType:i},o.defaultProps),{},{hide:!0,orientation:Ya(krt,"".concat(i,".").concat(g%2),null),domain:T,originalDomain:P,isCategorical:m,layout:u})))}return v},{})},Drt=function(t,n){var r=n.axisType,o=r===void 0?"xAxis":r,i=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.children,d="".concat(o,"Id"),f=Vi(u,i),p={};return f&&f.length?p=Rrt(t,{axes:f,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):a&&a.length&&(p=_rt(t,{Axis:i,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),p},Nrt=function(t){var n=Dd(t),r=xu(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:wj(r,function(o){return o.coordinate}),tooltipAxis:n,tooltipAxisBandSize:lE(n,r)}},T8=function(t){var n=t.children,r=t.defaultShowTooltip,o=Da(n,Uy),i=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(i=o.props.startIndex),o.props.endIndex>=0&&(a=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},Lrt=function(t){return!t||!t.length?!1:t.some(function(n){var r=Cu(n&&n.type);return r&&r.indexOf("Bar")>=0})},E8=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Frt=function(t,n){var r=t.props,o=t.graphicalItems,i=t.xAxisMap,a=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,u=r.height,d=r.children,f=r.margin||{},p=Da(d,Uy),m=Da(d,Pu),g=Object.keys(l).reduce(function(T,E){var O=l[E],k=O.orientation;return!O.mirror&&!O.hide?ze(ze({},T),{},Ht({},k,T[k]+O.width)):T},{left:f.left||0,right:f.right||0}),v=Object.keys(a).reduce(function(T,E){var O=a[E],k=O.orientation;return!O.mirror&&!O.hide?ze(ze({},T),{},Ht({},k,Ya(T,"".concat(k))+O.height)):T},{top:f.top||0,bottom:f.bottom||0}),w=ze(ze({},v),g),x=w.bottom;p&&(w.bottom+=p.props.height||Uy.defaultProps.height),m&&n&&(w=Bqe(w,o,r,n));var S=c-w.left-w.right,P=u-w.top-w.bottom;return ze(ze({brushBottom:x},w),{},{width:Math.max(S,0),height:Math.max(P,0)})},jrt=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},$S=function(t){var n=t.chartName,r=t.GraphicalChild,o=t.defaultTooltipEventType,i=o===void 0?"axis":o,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,d=t.defaultProps,f=function(w,x){var S=x.graphicalItems,P=x.stackGroups,T=x.offset,E=x.updateId,O=x.dataStartIndex,k=x.dataEndIndex,A=w.barSize,I=w.layout,R=w.barGap,L=w.barCategoryGap,F=w.maxBarSize,z=E8(I),_=z.numericAxisName,D=z.cateAxisName,H=Lrt(S),B=[];return S.forEach(function(V,W){var G=yk(w.data,{graphicalItems:[V],dataStartIndex:O,dataEndIndex:k}),Q=V.type.defaultProps!==void 0?ze(ze({},V.type.defaultProps),V.props):V.props,Y=Q.dataKey,ne=Q.maxBarSize,ie=Q["".concat(_,"Id")],re=Q["".concat(D,"Id")],pe={},le=l.reduce(function(_e,de){var Ae=x["".concat(de.axisType,"Map")],Oe=Q["".concat(de.axisType,"Id")];Ae&&Ae[Oe]||de.axisType==="zAxis"||xh();var $e=Ae[Oe];return ze(ze({},_e),{},Ht(Ht({},de.axisType,$e),"".concat(de.axisType,"Ticks"),xu($e)))},pe),ee=le[D],ce=le["".concat(D,"Ticks")],se=P&&P[ie]&&P[ie].hasStack&&Qqe(V,P[ie].stackGroups),Z=Cu(V.type).indexOf("Bar")>=0,ue=lE(ee,ce),ge=[],we=H&&Fqe({barSize:A,stackGroups:P,totalSize:jrt(le,D)});if(Z){var me,be,xe=Ft(ne)?F:ne,Ee=(me=(be=lE(ee,ce,!0))!==null&&be!==void 0?be:xe)!==null&&me!==void 0?me:0;ge=jqe({barGap:R,barCategoryGap:L,bandSize:Ee!==ue?Ee:ue,sizeList:we[re],maxBarSize:xe}),Ee!==ue&&(ge=ge.map(function(_e){return ze(ze({},_e),{},{position:ze(ze({},_e.position),{},{offset:_e.position.offset-Ee/2})})}))}var Me=V&&V.type&&V.type.getComposedData;Me&&B.push({props:ze(ze({},Me(ze(ze({},le),{},{displayedData:G,props:w,dataKey:Y,item:V,bandSize:ue,barPosition:ge,offset:T,stackedData:se,layout:I,dataStartIndex:O,dataEndIndex:k}))),{},Ht(Ht(Ht({key:V.key||"item-".concat(W)},_,le[_]),D,le[D]),"animationId",E)),childIndex:jje(V,w.children),item:V})}),B},p=function(w,x){var S=w.props,P=w.dataStartIndex,T=w.dataEndIndex,E=w.updateId;if(!NU({props:S}))return null;var O=S.children,k=S.layout,A=S.stackOffset,I=S.data,R=S.reverseStackOrder,L=E8(k),F=L.numericAxisName,z=L.cateAxisName,_=Vi(O,r),D=Yqe(I,_,"".concat(F,"Id"),"".concat(z,"Id"),A,R),H=l.reduce(function(Q,Y){var ne="".concat(Y.axisType,"Map");return ze(ze({},Q),{},Ht({},ne,Drt(S,ze(ze({},Y),{},{graphicalItems:_,stackGroups:Y.axisType===F&&D,dataStartIndex:P,dataEndIndex:T}))))},{}),B=Frt(ze(ze({},H),{},{props:S,graphicalItems:_}),x==null?void 0:x.legendBBox);Object.keys(H).forEach(function(Q){H[Q]=u(S,H[Q],B,Q.replace("Map",""),n)});var V=H["".concat(z,"Map")],W=Nrt(V),G=f(S,ze(ze({},H),{},{dataStartIndex:P,dataEndIndex:T,updateId:E,graphicalItems:_,stackGroups:D,offset:B}));return ze(ze({formattedGraphicalItems:G,graphicalItems:_,offset:B,stackGroups:D},W),H)},m=function(v){function w(x){var S,P,T;return vrt(this,w),T=xrt(this,w,[x]),Ht(T,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ht(T,"accessibilityManager",new ort),Ht(T,"handleLegendBBoxUpdate",function(E){if(E){var O=T.state,k=O.dataStartIndex,A=O.dataEndIndex,I=O.updateId;T.setState(ze({legendBBox:E},p({props:T.props,dataStartIndex:k,dataEndIndex:A,updateId:I},ze(ze({},T.state),{},{legendBBox:E}))))}}),Ht(T,"handleReceiveSyncEvent",function(E,O,k){if(T.props.syncId===E){if(k===T.eventEmitterSymbol&&typeof T.props.syncMethod!="function")return;T.applySyncEvent(O)}}),Ht(T,"handleBrushChange",function(E){var O=E.startIndex,k=E.endIndex;if(O!==T.state.dataStartIndex||k!==T.state.dataEndIndex){var A=T.state.updateId;T.setState(function(){return ze({dataStartIndex:O,dataEndIndex:k},p({props:T.props,dataStartIndex:O,dataEndIndex:k,updateId:A},T.state))}),T.triggerSyncEvent({dataStartIndex:O,dataEndIndex:k})}}),Ht(T,"handleMouseEnter",function(E){var O=T.getMouseInfo(E);if(O){var k=ze(ze({},O),{},{isTooltipActive:!0});T.setState(k),T.triggerSyncEvent(k);var A=T.props.onMouseEnter;Vt(A)&&A(k,E)}}),Ht(T,"triggeredAfterMouseMove",function(E){var O=T.getMouseInfo(E),k=O?ze(ze({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};T.setState(k),T.triggerSyncEvent(k);var A=T.props.onMouseMove;Vt(A)&&A(k,E)}),Ht(T,"handleItemMouseEnter",function(E){T.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),Ht(T,"handleItemMouseLeave",function(){T.setState(function(){return{isTooltipActive:!1}})}),Ht(T,"handleMouseMove",function(E){E.persist(),T.throttleTriggeredAfterMouseMove(E)}),Ht(T,"handleMouseLeave",function(E){T.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};T.setState(O),T.triggerSyncEvent(O);var k=T.props.onMouseLeave;Vt(k)&&k(O,E)}),Ht(T,"handleOuterEvent",function(E){var O=Fje(E),k=Ya(T.props,"".concat(O));if(O&&Vt(k)){var A,I;/.*touch.*/i.test(O)?I=T.getMouseInfo(E.changedTouches[0]):I=T.getMouseInfo(E),k((A=I)!==null&&A!==void 0?A:{},E)}}),Ht(T,"handleClick",function(E){var O=T.getMouseInfo(E);if(O){var k=ze(ze({},O),{},{isTooltipActive:!0});T.setState(k),T.triggerSyncEvent(k);var A=T.props.onClick;Vt(A)&&A(k,E)}}),Ht(T,"handleMouseDown",function(E){var O=T.props.onMouseDown;if(Vt(O)){var k=T.getMouseInfo(E);O(k,E)}}),Ht(T,"handleMouseUp",function(E){var O=T.props.onMouseUp;if(Vt(O)){var k=T.getMouseInfo(E);O(k,E)}}),Ht(T,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&T.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),Ht(T,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&T.handleMouseDown(E.changedTouches[0])}),Ht(T,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&T.handleMouseUp(E.changedTouches[0])}),Ht(T,"triggerSyncEvent",function(E){T.props.syncId!==void 0&&j$.emit(B$,T.props.syncId,E,T.eventEmitterSymbol)}),Ht(T,"applySyncEvent",function(E){var O=T.props,k=O.layout,A=O.syncMethod,I=T.state.updateId,R=E.dataStartIndex,L=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)T.setState(ze({dataStartIndex:R,dataEndIndex:L},p({props:T.props,dataStartIndex:R,dataEndIndex:L,updateId:I},T.state)));else if(E.activeTooltipIndex!==void 0){var F=E.chartX,z=E.chartY,_=E.activeTooltipIndex,D=T.state,H=D.offset,B=D.tooltipTicks;if(!H)return;if(typeof A=="function")_=A(B,E);else if(A==="value"){_=-1;for(var V=0;V=0){var se,Z;if(F.dataKey&&!F.allowDuplicatedCategory){var ue=typeof F.dataKey=="function"?ce:"payload.".concat(F.dataKey.toString());se=_T(V,ue,_),Z=W&&G&&_T(G,ue,_)}else se=V==null?void 0:V[z],Z=W&&G&&G[z];if(re||ie){var ge=E.props.activeIndex!==void 0?E.props.activeIndex:z;return[y.cloneElement(E,ze(ze(ze({},A.props),le),{},{activeIndex:ge})),null,null]}if(!Ft(se))return[ee].concat(rv(T.renderActivePoints({item:A,activePoint:se,basePoint:Z,childIndex:z,isRange:W})))}else{var we,me=(we=T.getItemByXY(T.state.activeCoordinate))!==null&&we!==void 0?we:{graphicalItem:ee},be=me.graphicalItem,xe=be.item,Ee=xe===void 0?E:xe,Me=be.childIndex,_e=ze(ze(ze({},A.props),le),{},{activeIndex:Me});return[y.cloneElement(Ee,_e),null,null]}return W?[ee,null,null]:[ee,null]}),Ht(T,"renderCustomized",function(E,O,k){return y.cloneElement(E,ze(ze({key:"recharts-customized-".concat(k)},T.props),T.state))}),Ht(T,"renderMap",{CartesianGrid:{handler:FC,once:!0},ReferenceArea:{handler:T.renderReferenceElement},ReferenceLine:{handler:FC},ReferenceDot:{handler:T.renderReferenceElement},XAxis:{handler:FC},YAxis:{handler:FC},Brush:{handler:T.renderBrush,once:!0},Bar:{handler:T.renderGraphicChild},Line:{handler:T.renderGraphicChild},Area:{handler:T.renderGraphicChild},Radar:{handler:T.renderGraphicChild},RadialBar:{handler:T.renderGraphicChild},Scatter:{handler:T.renderGraphicChild},Pie:{handler:T.renderGraphicChild},Funnel:{handler:T.renderGraphicChild},Tooltip:{handler:T.renderCursor,once:!0},PolarGrid:{handler:T.renderPolarGrid,once:!0},PolarAngleAxis:{handler:T.renderPolarAxis},PolarRadiusAxis:{handler:T.renderPolarAxis},Customized:{handler:T.renderCustomized}}),T.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:Nf("recharts"),"-clip"),T.throttleTriggeredAfterMouseMove=KI(T.triggeredAfterMouseMove,(P=x.throttleDelay)!==null&&P!==void 0?P:1e3/60),T.state={},T}return Prt(w,v),wrt(w,[{key:"componentDidMount",value:function(){var S,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,P=S.children,T=S.data,E=S.height,O=S.layout,k=Da(P,Fa);if(k){var A=k.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var I=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,R=KD(this.state,T,A,I),L=this.state.tooltipTicks[A].coordinate,F=(this.state.offset.top+E)/2,z=O==="horizontal",_=z?{x:L,y:F}:{y:L,x:F},D=this.state.formattedGraphicalItems.find(function(B){var V=B.item;return V.type.name==="Scatter"});D&&(_=ze(ze({},_),D.props.points[A].tooltipPosition),R=D.props.points[A].tooltipPayload);var H={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:I,activePayload:R,activeCoordinate:_};this.setState(H),this.renderCursor(k),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var T,E;this.accessibilityManager.setDetails({offset:{left:(T=this.props.margin.left)!==null&&T!==void 0?T:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(S){w_([Da(S.children,Fa)],[Da(this.props.children,Fa)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=Da(this.props.children,Fa);if(S&&typeof S.props.shared=="boolean"){var P=S.props.shared?"axis":"item";return s.indexOf(P)>=0?P:i}return i}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var P=this.container,T=P.getBoundingClientRect(),E=dGe(T),O={chartX:Math.round(S.pageX-E.left),chartY:Math.round(S.pageY-E.top)},k=T.width/P.offsetWidth||1,A=this.inRange(O.chartX,O.chartY,k);if(!A)return null;var I=this.state,R=I.xAxisMap,L=I.yAxisMap,F=this.getTooltipEventType();if(F!=="axis"&&R&&L){var z=Dd(R).scale,_=Dd(L).scale,D=z&&z.invert?z.invert(O.chartX):null,H=_&&_.invert?_.invert(O.chartY):null;return ze(ze({},O),{},{xValue:D,yValue:H})}var B=P8(this.state,this.props.data,this.props.layout,A);return B?ze(ze({},O),B):null}},{key:"inRange",value:function(S,P){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,O=S/T,k=P/T;if(E==="horizontal"||E==="vertical"){var A=this.state.offset,I=O>=A.left&&O<=A.left+A.width&&k>=A.top&&k<=A.top+A.height;return I?{x:O,y:k}:null}var R=this.state,L=R.angleAxisMap,F=R.radiusAxisMap;if(L&&F){var z=Dd(L);return W6({x:O,y:k},z)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,P=this.getTooltipEventType(),T=Da(S,Fa),E={};T&&P==="axis"&&(T.props.trigger==="click"?E={onClick:this.handleClick}:E={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var O=DT(this.props,this.handleOuterEvent);return ze(ze({},O),E)}},{key:"addListener",value:function(){j$.on(B$,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){j$.removeListener(B$,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,P,T){for(var E=this.state.formattedGraphicalItems,O=0,k=E.length;O{const t=e.planned.energy>0?e.logged.energy/e.planned.energy*100:100,n=e.planned.energy>0?e.planned.energy-e.logged.energy:e.logged.energy,r=ko(),[o,i]=Ge(),a=[{name:"",value:t},{name:"",value:t<100?100-t:0}],s=[r.palette.primary.main,"#C5C5C5"];return X(Ut,{direction:"row",children:[C(Lf,{width:"50%",height:140,children:X(Xre,{children:[C(Vc,{height:100,data:a,startAngle:200,endAngle:-20,innerRadius:60,outerRadius:70,paddingAngle:2,dataKey:"value",children:a.map((l,c)=>C(Vv,{fill:s[c%s.length]},`cell-${c}`))}),X("g",{children:[C("text",{x:"50%",y:"45%",fontSize:"1.25em",textAnchor:"middle",children:o("nutrition.valueEnergyKcal",{value:hi(n,i.language)})}),C("text",{x:"50%",y:"60%",fontSize:"1em",textAnchor:"middle",children:e.planned.energy>0&&o(t<100?"nutrition.valueRemaining":"nutrition.valueTooMany")})]})]})}),X(Ut,{width:"50%",spacing:1,children:[C(Vg,{title:o("nutrition.protein"),percentage:e.percentage.protein,logged:e.logged.protein,planned:e.planned.protein}),C(Vg,{title:o("nutrition.carbohydrates"),percentage:e.percentage.carbohydrates,logged:e.logged.carbohydrates,planned:e.planned.carbohydrates}),C(Vg,{title:o("nutrition.fat"),percentage:e.percentage.fat,logged:e.logged.fat,planned:e.planned.fat})]})]})},Hrt=["localeText"],YD=y.createContext(null),RS=function(t){const{localeText:n}=t,r=Ue(t,Hrt),{utils:o,localeText:i}=y.useContext(YD)??{utils:void 0,localeText:void 0},a=Jt({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:c,dateLibInstance:u,adapterLocale:d,localeText:f}=a,p=y.useMemo(()=>N({},f,i,n),[f,i,n]),m=y.useMemo(()=>{if(!l)return o||null;const w=new l({locale:d,formats:c,instance:u});if(!w.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(` -`));return w},[l,d,c,u,o]),g=y.useMemo(()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null,[m]),v=y.useMemo(()=>({utils:m,defaultDates:g,localeText:p}),[g,m,p]);return $.jsx(YD.Provider,{value:v,children:s})},Urt=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:N({},e)}}}}),Xv=e=>{const{utils:t,formatKey:n,contextTranslation:r,propsTranslation:o}=e;return i=>{const a=i!==null&&t.isValid(i)?t.format(i,n):null;return(o??r)(i,t,a)}},Qre={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${!r&&(t===null||!n.isValid(t))?"No time selected":`Selected time is ${r??n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},Wrt=Qre;Urt(Qre);const Bh=()=>{const e=y.useContext(YD);if(e===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(` + A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(t,",").concat(n+o-s*m," Z")}else u="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(o," h ").concat(-r," Z");return u},EXe=function(t,n){if(!t||!n)return!1;var r=t.x,o=t.y,i=n.x,a=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(i,i+s),u=Math.max(i,i+s),d=Math.min(a,a+l),f=Math.max(a,a+l);return r>=c&&r<=u&&o>=d&&o<=f}return!1},TXe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},qj=function(t){var n=SG(SG({},TXe),t),r=v.useRef(),o=v.useState(-1),i=yXe(o,2),a=i[0],s=i[1];v.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var P=r.current.getTotalLength();P&&s(P)}catch{}},[]);var l=n.x,c=n.y,u=n.width,d=n.height,f=n.radius,p=n.className,m=n.animationEasing,g=n.animationDuration,y=n.animationBegin,b=n.isAnimationActive,x=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||d!==+d||u===0||d===0)return null;var S=pe("recharts-rectangle",p);return x?Y.createElement(nl,{canBegin:a>0,from:{width:u,height:d,x:l,y:c},to:{width:u,height:d,x:l,y:c},duration:g,animationEasing:m,isActive:x},function(P){var E=P.width,T=P.height,O=P.x,k=P.y;return Y.createElement(nl,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:g,isActive:b,easing:m},Y.createElement("path",uT({},At(n,!0),{className:S,d:CG(O,k,E,T,f),ref:r})))}):Y.createElement("path",uT({},At(n,!0),{className:S,d:CG(l,c,u,d,f)}))},OXe=["points","className","baseLinePoints","connectNulls"];function bg(){return bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kXe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function PG(e){return RXe(e)||$Xe(e)||AXe(e)||MXe()}function MXe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AXe(e,t){if(e){if(typeof e=="string")return y_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y_(e,t)}}function $Xe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function RXe(e){if(Array.isArray(e))return y_(e)}function y_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){EG(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),EG(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},rw=function(t,n){var r=DXe(t);n&&(r=[r.reduce(function(i,a){return[].concat(PG(i),PG(a))},[])]);var o=r.map(function(i){return i.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(o,"Z"):o},_Xe=function(t,n,r){var o=rw(t,r);return"".concat(o.slice(-1)==="Z"?o.slice(0,-1):o,"L").concat(rw(n.reverse(),r).slice(1))},LXe=function(t){var n=t.points,r=t.className,o=t.baseLinePoints,i=t.connectNulls,a=IXe(t,OXe);if(!n||!n.length)return null;var s=pe("recharts-polygon",r);if(o&&o.length){var l=a.stroke&&a.stroke!=="none",c=_Xe(n,o,i);return Y.createElement("g",{className:s},Y.createElement("path",bg({},At(a,!0),{fill:c.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:c})),l?Y.createElement("path",bg({},At(a,!0),{fill:"none",d:rw(n,i)})):null,l?Y.createElement("path",bg({},At(a,!0),{fill:"none",d:rw(o,i)})):null)}var u=rw(n,i);return Y.createElement("path",bg({},At(a,!0),{fill:u.slice(-1)==="Z"?a.fill:"none",className:s,d:u}))};function v_(){return v_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HXe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var UXe=function(t,n,r,o,i,a){return"M".concat(t,",").concat(i,"v").concat(o,"M").concat(a,",").concat(n,"h").concat(r)},WXe=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.top,s=a===void 0?0:a,l=t.left,c=l===void 0?0:l,u=t.width,d=u===void 0?0:u,f=t.height,p=f===void 0?0:f,m=t.className,g=VXe(t,NXe),y=FXe({x:r,y:i,top:s,left:c,width:d,height:p},g);return!at(r)||!at(i)||!at(d)||!at(p)||!at(s)||!at(c)?null:Y.createElement("path",b_({},At(y,!0),{className:pe("recharts-cross",m),d:UXe(r,i,d,p,s,c)}))},GXe=QI,qXe=Zte,KXe=zc;function YXe(e,t){return e&&e.length?GXe(e,KXe(t),qXe):void 0}var XXe=YXe;const QXe=Bn(XXe);var JXe=QI,ZXe=zc,eQe=ene;function tQe(e,t){return e&&e.length?JXe(e,ZXe(t),eQe):void 0}var nQe=tQe;const rQe=Bn(nQe);var oQe=["cx","cy","angle","ticks","axisLine"],iQe=["ticks","tick","angle","tickFormatter","stroke"];function Fy(e){"@babel/helpers - typeof";return Fy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fy(e)}function ow(){return ow=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function aQe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function sQe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kG(e,t){for(var n=0;n$G?a=o==="outer"?"start":"end":i<-$G?a=o==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var r=this.props,o=r.cx,i=r.cy,a=r.radius,s=r.axisLine,l=r.axisLineType,c=up(up({},At(this.props,!1)),{},{fill:"none"},At(s,!1));if(l==="circle")return Y.createElement(kS,Tp({className:"recharts-polar-angle-axis-line"},c,{cx:o,cy:i,r:a}));var u=this.props.ticks,d=u.map(function(f){return Sr(o,i,a,f.coordinate)});return Y.createElement(LXe,Tp({className:"recharts-polar-angle-axis-line"},c,{points:d}))}},{key:"renderTicks",value:function(){var r=this,o=this.props,i=o.ticks,a=o.tick,s=o.tickLine,l=o.tickFormatter,c=o.stroke,u=At(this.props,!1),d=At(a,!1),f=up(up({},u),{},{fill:"none"},At(s,!1)),p=i.map(function(m,g){var y=r.getTickLineCoord(m),b=r.getTickTextAnchor(m),x=up(up(up({textAnchor:b},u),{},{stroke:"none",fill:c},d),{},{index:g,payload:m,x:y.x2,y:y.y2});return Y.createElement(rn,Tp({className:pe("recharts-polar-angle-axis-tick",Ine(a)),key:"tick-".concat(m.coordinate)},wf(r.props,m,g)),s&&Y.createElement("line",Tp({className:"recharts-polar-angle-axis-tick-line"},f,y)),a&&t.renderTickItem(a,x,l?l(m.value,g):m.value))});return Y.createElement(rn,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var r=this.props,o=r.ticks,i=r.radius,a=r.axisLine;return i<=0||!o||!o.length?null:Y.createElement(rn,{className:pe("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,o,i){var a;return Y.isValidElement(r)?a=Y.cloneElement(r,o):Ht(r)?a=r(o):a=Y.createElement(bh,Tp({},o,{className:"recharts-polar-angle-axis-tick-value"}),i),a}}])}(v.PureComponent);rk(ok,"displayName","PolarAngleAxis");rk(ok,"axisType","angleAxis");rk(ok,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var SQe=Xee,CQe=SQe(Object.getPrototypeOf,Object),PQe=CQe,EQe=Zu,TQe=PQe,OQe=ed,IQe="[object Object]",kQe=Function.prototype,MQe=Object.prototype,Une=kQe.toString,AQe=MQe.hasOwnProperty,$Qe=Une.call(Object);function RQe(e){if(!OQe(e)||EQe(e)!=IQe)return!1;var t=TQe(e);if(t===null)return!0;var n=AQe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Une.call(n)==$Qe}var DQe=RQe;const _Qe=Bn(DQe);var LQe=Zu,NQe=ed,FQe="[object Boolean]";function jQe(e){return e===!0||e===!1||NQe(e)&&LQe(e)==FQe}var BQe=jQe;const zQe=Bn(BQe);function yx(e){"@babel/helpers - typeof";return yx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yx(e)}function pT(){return pT=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:f,x:l,y:c},to:{upperWidth:u,lowerWidth:d,height:f,x:l,y:c},duration:g,animationEasing:m,isActive:b},function(S){var P=S.upperWidth,E=S.lowerWidth,T=S.height,O=S.x,k=S.y;return Y.createElement(nl,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:g,easing:m},Y.createElement("path",pT({},At(n,!0),{className:x,d:LG(O,k,P,E,T),ref:r})))}):Y.createElement("g",null,Y.createElement("path",pT({},At(n,!0),{className:x,d:LG(l,c,u,d,f)})))},JQe=["option","shapeType","propTransformer","activeClassName","isActive"];function vx(e){"@babel/helpers - typeof";return vx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vx(e)}function ZQe(e,t){if(e==null)return{};var n=eJe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eJe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function NG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function hT(e){for(var t=1;t0?qa(S,"paddingAngle",0):0;if(E){var O=Vr(E.endAngle-E.startAngle,S.endAngle-S.startAngle),k=br(br({},S),{},{startAngle:x+T,endAngle:x+O(g)+T});y.push(k),x=k.endAngle}else{var M=S.endAngle,I=S.startAngle,R=Vr(0,M-I),_=R(g),N=br(br({},S),{},{startAngle:x+T,endAngle:x+_+T});y.push(N),x=N.endAngle}}),Y.createElement(rn,null,r.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(r){var o=this;r.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var a=++o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[a].focus(),o.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--o.state.sectorToFocus<0?o.sectorRefs.length-1:o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[s].focus(),o.setState({sectorToFocus:s});break}case"Escape":{o.sectorRefs[o.state.sectorToFocus].blur(),o.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,o=r.sectors,i=r.isAnimationActive,a=this.state.prevSectors;return i&&o&&o.length&&(!a||!xf(a,o))?this.renderSectorsWithAnimation():this.renderSectorsStatically(o)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,o=this.props,i=o.hide,a=o.sectors,s=o.className,l=o.label,c=o.cx,u=o.cy,d=o.innerRadius,f=o.outerRadius,p=o.isAnimationActive,m=this.state.isAnimationFinished;if(i||!a||!a.length||!at(c)||!at(u)||!at(d)||!at(f))return null;var g=pe("recharts-pie",s);return Y.createElement(rn,{tabIndex:this.props.rootTabIndex,className:g,ref:function(b){r.pieRef=b}},this.renderSectors(),l&&this.renderLabels(a),Vo.renderCallByParent(this.props,null,!1),(!p||m)&&Hl.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return o.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:o.curSectors,isAnimationFinished:!0}:r.sectors!==o.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,o){return r>o?"start":r=360?x:x-1)*l,P=y-x*p-S,E=o.reduce(function(k,M){var I=kr(M,b,0);return k+(at(I)?I:0)},0),T;if(E>0){var O;T=o.map(function(k,M){var I=kr(k,b,0),R=kr(k,u,M),_=(at(I)?I:0)/E,N;M?N=O.endAngle+Li(g)*l*(I!==0?1:0):N=a;var B=N+Li(g)*((I!==0?p:0)+_*P),L=(N+B)/2,F=(m.innerRadius+m.outerRadius)/2,U=[{name:R,value:I,payload:k,dataKey:b,type:f}],V=Sr(m.cx,m.cy,F,L);return O=br(br(br({percent:_,cornerRadius:i,name:R,tooltipPayload:U,midAngle:L,middleRadius:F,tooltipPosition:V},k),m),{},{value:kr(k,b),startAngle:N,endAngle:B,payload:k,paddingAngle:Li(g)*l}),O})}return br(br({},m),{},{sectors:T,data:o})});var xJe=Math.ceil,SJe=Math.max;function CJe(e,t,n,r){for(var o=-1,i=SJe(xJe((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a}var PJe=CJe,EJe=mte,zG=1/0,TJe=17976931348623157e292;function OJe(e){if(!e)return e===0?e:0;if(e=EJe(e),e===zG||e===-zG){var t=e<0?-1:1;return t*TJe}return e===e?e:0}var qne=OJe,IJe=PJe,kJe=HI,R$=qne;function MJe(e){return function(t,n,r){return r&&typeof r!="number"&&kJe(t,n,r)&&(n=r=void 0),t=R$(t),n===void 0?(n=t,t=0):n=R$(n),r=r===void 0?t0&&r.handleDrag(o.changedTouches[0])}),$a(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var o=r.props,i=o.endIndex,a=o.onDragEnd,s=o.startIndex;a==null||a({endIndex:i,startIndex:s})}),r.detachDragEndListener()}),$a(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),$a(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),$a(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),$a(r,"handleSlideDragStart",function(o){var i=GG(o)?o.changedTouches[0]:o;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return UJe(t,e),BJe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var o=r.startX,i=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,u=c.length-1,d=Math.min(o,i),f=Math.max(o,i),p=t.getIndexInRange(a,d),m=t.getIndexInRange(a,f);return{startIndex:p-p%l,endIndex:m===u?u:m-m%l}}},{key:"getTextOfTick",value:function(r){var o=this.props,i=o.data,a=o.tickFormatter,s=o.dataKey,l=kr(i[r],s,r);return Ht(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var o=this.state,i=o.slideMoveStartX,a=o.startX,s=o.endX,l=this.props,c=l.x,u=l.width,d=l.travellerWidth,f=l.startIndex,p=l.endIndex,m=l.onChange,g=r.pageX-i;g>0?g=Math.min(g,c+u-d-s,c+u-d-a):g<0&&(g=Math.max(g,c-a,c-s));var y=this.getIndex({startX:a+g,endX:s+g});(y.startIndex!==f||y.endIndex!==p)&&m&&m(y),this.setState({startX:a+g,endX:s+g,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,o){var i=GG(o)?o.changedTouches[0]:o;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var o=this.state,i=o.brushMoveStartX,a=o.movingTravellerId,s=o.endX,l=o.startX,c=this.state[a],u=this.props,d=u.x,f=u.width,p=u.travellerWidth,m=u.onChange,g=u.gap,y=u.data,b={startX:this.state.startX,endX:this.state.endX},x=r.pageX-i;x>0?x=Math.min(x,d+f-p-c):x<0&&(x=Math.max(x,d-c)),b[a]=c+x;var S=this.getIndex(b),P=S.startIndex,E=S.endIndex,T=function(){var k=y.length-1;return a==="startX"&&(s>l?P%g===0:E%g===0)||sl?E%g===0:P%g===0)||s>l&&E===k};this.setState($a($a({},a,c+x),"brushMoveStartX",r.pageX),function(){m&&T()&&m(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,o){var i=this,a=this.state,s=a.scaleValues,l=a.startX,c=a.endX,u=this.state[o],d=s.indexOf(u);if(d!==-1){var f=d+r;if(!(f===-1||f>=s.length)){var p=s[f];o==="startX"&&p>=c||o==="endX"&&p<=l||this.setState($a({},o,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.fill,c=r.stroke;return Y.createElement("rect",{stroke:c,fill:l,x:o,y:i,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.data,c=r.children,u=r.padding,d=v.Children.only(c);return d?Y.cloneElement(d,{x:o,y:i,width:a,height:s,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,o){var i,a,s=this,l=this.props,c=l.y,u=l.travellerWidth,d=l.height,f=l.traveller,p=l.ariaLabel,m=l.data,g=l.startIndex,y=l.endIndex,b=Math.max(r,this.props.x),x=D$(D$({},At(this.props,!1)),{},{x:b,y:c,width:u,height:d}),S=p||"Min value: ".concat((i=m[g])===null||i===void 0?void 0:i.name,", Max value: ").concat((a=m[y])===null||a===void 0?void 0:a.name);return Y.createElement(rn,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[o],onTouchStart:this.travellerDragStartHandlers[o],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),s.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,o))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(f,x))}},{key:"renderSlide",value:function(r,o){var i=this.props,a=i.y,s=i.height,l=i.stroke,c=i.travellerWidth,u=Math.min(r,o)+c,d=Math.max(Math.abs(o-r)-c,0);return Y.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:a,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,o=r.startIndex,i=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,u=this.state,d=u.startX,f=u.endX,p=5,m={pointerEvents:"none",fill:c};return Y.createElement(rn,{className:"recharts-brush-texts"},Y.createElement(bh,vT({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,f)-p,y:a+s/2},m),this.getTextOfTick(o)),Y.createElement(bh,vT({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,f)+l+p,y:a+s/2},m),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,o=r.data,i=r.className,a=r.children,s=r.x,l=r.y,c=r.width,u=r.height,d=r.alwaysShowText,f=this.state,p=f.startX,m=f.endX,g=f.isTextActive,y=f.isSlideMoving,b=f.isTravellerMoving,x=f.isTravellerFocused;if(!o||!o.length||!at(s)||!at(l)||!at(c)||!at(u)||c<=0||u<=0)return null;var S=pe("recharts-brush",i),P=Y.Children.count(a)===1,E=FJe("userSelect","none");return Y.createElement(rn,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(g||y||b||x||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var o=r.x,i=r.y,a=r.width,s=r.height,l=r.stroke,c=Math.floor(i+s/2)-1;return Y.createElement(Y.Fragment,null,Y.createElement("rect",{x:o,y:i,width:a,height:s,fill:l,stroke:"none"}),Y.createElement("line",{x1:o+1,y1:c,x2:o+a-1,y2:c,fill:"none",stroke:"#fff"}),Y.createElement("line",{x1:o+1,y1:c+2,x2:o+a-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,o){var i;return Y.isValidElement(r)?i=Y.cloneElement(r,o):Ht(r)?i=r(o):i=t.renderDefaultTraveller(o),i}},{key:"getDerivedStateFromProps",value:function(r,o){var i=r.data,a=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,u=r.startIndex,d=r.endIndex;if(i!==o.prevData||c!==o.prevUpdateId)return D$({prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a},i&&i.length?GJe({data:i,width:a,x:s,travellerWidth:l,startIndex:u,endIndex:d}):{scale:null,scaleValues:null});if(o.scale&&(a!==o.prevWidth||s!==o.prevX||l!==o.prevTravellerWidth)){o.scale.range([s,s+a-l]);var f=o.scale.domain().map(function(p){return o.scale(p)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a,startX:o.scale(r.startIndex),endX:o.scale(r.endIndex),scaleValues:f}}return null}},{key:"getIndexInRange",value:function(r,o){for(var i=r.length,a=0,s=i-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>o?s=l:a=l}return o>=r[s]?s:a}}])}(v.PureComponent);$a(Vy,"displayName","Brush");$a(Vy,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var qJe=bj;function KJe(e,t){var n;return qJe(e,function(r,o,i){return n=t(r,o,i),!n}),!!n}var YJe=KJe,XJe=Vee,QJe=zc,JJe=YJe,ZJe=xa,eZe=HI;function tZe(e,t,n){var r=ZJe(e)?XJe:JJe;return n&&eZe(e,t,n)&&(t=void 0),r(e,QJe(t))}var nZe=tZe;const rZe=Bn(nZe);var kc=function(t,n){var r=t.alwaysShow,o=t.ifOverflow;return r&&(o="extendDomain"),o===n},qG=ute;function oZe(e,t,n){t=="__proto__"&&qG?qG(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var iZe=oZe,aZe=iZe,sZe=lte,lZe=zc;function cZe(e,t){var n={};return t=lZe(t),sZe(e,function(r,o,i){aZe(n,o,t(r,o,i))}),n}var uZe=cZe;const dZe=Bn(uZe);function fZe(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kZe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function MZe(e,t){var n=e.x,r=e.y,o=IZe(e,PZe),i="".concat(n),a=parseInt(i,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||o.height),u=parseInt(c,10),d="".concat(t.width||o.width),f=parseInt(d,10);return r0(r0(r0(r0(r0({},t),o),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function YG(e){return Y.createElement(mT,P_({shapeType:"rectangle",propTransformer:MZe,activeClassName:"recharts-active-bar"},e))}var AZe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,o){if(typeof t=="number")return t;var i=typeof r=="number";return i?t(r,o):(i||xh(),n)}},$Ze=["value","background"],Jne;function Hy(e){"@babel/helpers - typeof";return Hy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hy(e)}function RZe(e,t){if(e==null)return{};var n=DZe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DZe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function wT(){return wT=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(L)0&&Math.abs(B)0&&(N=Math.min((ne||0)-(B[re-1]||0),N))}),Number.isFinite(N)){var L=N/_,F=g.layout==="vertical"?r.height:r.width;if(g.padding==="gap"&&(O=L*F/2),g.padding==="no-gap"){var U=Ni(t.barCategoryGap,L*F),V=L*F/2;O=V-U-(V-U)/F*U}}}o==="xAxis"?k=[r.left+(S.left||0)+(O||0),r.left+r.width-(S.right||0)-(O||0)]:o==="yAxis"?k=l==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(O||0),r.top+r.height-(S.bottom||0)-(O||0)]:k=g.range,E&&(k=[k[1],k[0]]);var z=xne(g,i,f),W=z.scale,G=z.realScaleType;W.domain(b).range(k),Sne(W);var J=Cne(W,kl(kl({},g),{},{realScaleType:G}));o==="xAxis"?(R=y==="top"&&!P||y==="bottom"&&P,M=r.left,I=d[T]-R*g.height):o==="yAxis"&&(R=y==="left"&&!P||y==="right"&&P,M=d[T]-R*g.width,I=r.top);var K=kl(kl(kl({},g),J),{},{realScaleType:G,x:M,y:I,scale:W,width:o==="xAxis"?r.width:g.width,height:o==="yAxis"?r.height:g.height});return K.bandSize=oT(K,J),!g.hide&&o==="xAxis"?d[T]+=(R?-1:1)*K.height:g.hide||(d[T]+=(R?-1:1)*K.width),kl(kl({},p),{},sk({},m,K))},{})},nre=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return{x:Math.min(r,i),y:Math.min(o,a),width:Math.abs(i-r),height:Math.abs(a-o)}},WZe=function(t){var n=t.x1,r=t.y1,o=t.x2,i=t.y2;return nre({x:n,y:r},{x:o,y:i})},rre=function(){function e(t){VZe(this,e),this.scale=t}return HZe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(o){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),o=r[0],i=r[r.length-1];return o<=i?n>=o&&n<=i:n>=i&&n<=o}}],[{key:"create",value:function(n){return new e(n)}}])}();sk(rre,"EPS",1e-4);var Kj=function(t){var n=Object.keys(t).reduce(function(r,o){return kl(kl({},r),{},sk({},o,rre.create(t[o])))},{});return kl(kl({},n),{},{apply:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.bandAware,s=i.position;return dZe(o,function(l,c){return n[c].apply(l,{bandAware:a,position:s})})},isInRange:function(o){return Qne(o,function(i,a){return n[a].isInRange(i)})}})};function GZe(e){return(e%180+180)%180}var qZe=function(t){var n=t.width,r=t.height,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=GZe(o),a=i*Math.PI/180,s=Math.atan(r/n),l=a>s&&a-1?o[i?t[a]:a]:void 0}}var JZe=QZe,ZZe=qne;function eet(e){var t=ZZe(e),n=t%1;return t===t?n?t-n:t:0}var tet=eet,net=nte,ret=zc,oet=tet,iet=Math.max;function aet(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var o=n==null?0:oet(n);return o<0&&(o=iet(r+o,0)),net(e,ret(t),o)}var set=aet,cet=JZe,uet=set,det=cet(uet),fet=det;const pet=Bn(fet);var het=CFe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),Yj=v.createContext(void 0),Xj=v.createContext(void 0),ore=v.createContext(void 0),ire=v.createContext({}),are=v.createContext(void 0),sre=v.createContext(0),lre=v.createContext(0),e8=function(t){var n=t.state,r=n.xAxisMap,o=n.yAxisMap,i=n.offset,a=t.clipPathId,s=t.children,l=t.width,c=t.height,u=het(i);return Y.createElement(Yj.Provider,{value:r},Y.createElement(Xj.Provider,{value:o},Y.createElement(ire.Provider,{value:i},Y.createElement(ore.Provider,{value:u},Y.createElement(are.Provider,{value:a},Y.createElement(sre.Provider,{value:c},Y.createElement(lre.Provider,{value:l},s)))))))},met=function(){return v.useContext(are)},cre=function(t){var n=v.useContext(Yj);n==null&&xh();var r=n[t];return r==null&&xh(),r},get=function(){var t=v.useContext(Yj);return Dd(t)},yet=function(){var t=v.useContext(Xj),n=pet(t,function(r){return Qne(r.domain,Number.isFinite)});return n||Dd(t)},ure=function(t){var n=v.useContext(Xj);n==null&&xh();var r=n[t];return r==null&&xh(),r},vet=function(){var t=v.useContext(ore);return t},bet=function(){return v.useContext(ire)},Qj=function(){return v.useContext(lre)},Jj=function(){return v.useContext(sre)};function Uy(e){"@babel/helpers - typeof";return Uy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uy(e)}function wet(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xet(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function rtt(e,t){return yre(e,t+1)}function ott(e,t,n,r,o){for(var i=(r||[]).slice(),a=t.start,s=t.end,l=0,c=1,u=a,d=function(){var m=r==null?void 0:r[l];if(m===void 0)return{v:yre(r,c)};var g=l,y,b=function(){return y===void 0&&(y=n(m,g)),y},x=m.coordinate,S=l===0||ET(e,x,b,u,s);S||(l=0,u=a,c+=1),S&&(u=x+e*(b()/2+o),l+=c)},f;c<=i.length;)if(f=d(),f)return f.v;return[]}function Cx(e){"@babel/helpers - typeof";return Cx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cx(e)}function l8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function pi(e){for(var t=1;t0?p.coordinate-y*e:p.coordinate})}else i[f]=p=pi(pi({},p),{},{tickCoord:p.coordinate});var b=ET(e,p.tickCoord,g,s,l);b&&(l=p.tickCoord-e*(g()/2+o),i[f]=pi(pi({},p),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return i}function ctt(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(i){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=pi(pi({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate});var p=ET(e,u.tickCoord,function(){return d},l,c);p&&(c=u.tickCoord-e*(d/2+o),a[s-1]=pi(pi({},u),{},{isShow:!0}))}for(var m=i?s-1:s,g=function(x){var S=a[x],P,E=function(){return P===void 0&&(P=n(S,x)),P};if(x===0){var T=e*(S.coordinate-e*E()/2-l);a[x]=S=pi(pi({},S),{},{tickCoord:T<0?S.coordinate-T*e:S.coordinate})}else a[x]=S=pi(pi({},S),{},{tickCoord:S.coordinate});var O=ET(e,S.tickCoord,E,l,c);O&&(l=S.tickCoord+e*(E()/2+o),a[x]=pi(pi({},S),{},{isShow:!0}))},y=0;y=2?Li(o[1].coordinate-o[0].coordinate):1,b=ntt(i,y,p);return l==="equidistantPreserveStart"?ott(y,b,g,o,a):(l==="preserveStart"||l==="preserveStartEnd"?f=ctt(y,b,g,o,a,l==="preserveStartEnd"):f=ltt(y,b,g,o,a),f.filter(function(x){return x.isShow}))}var utt=["viewBox"],dtt=["viewBox"],ftt=["ticks"];function qy(e){"@babel/helpers - typeof";return qy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qy(e)}function xg(){return xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ptt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function htt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u8(e,t){for(var n=0;n0?l(this.props):l(p)),a<=0||s<=0||!m||!m.length?null:Y.createElement(rn,{className:pe("recharts-cartesian-axis",c),ref:function(y){r.layerReference=y}},i&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),Vo.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,o,i){var a;return Y.isValidElement(r)?a=Y.cloneElement(r,o):Ht(r)?a=r(o):a=Y.createElement(bh,xg({},o,{className:"recharts-cartesian-axis-tick-value"}),i),a}}])}(v.Component);nB(qv,"displayName","CartesianAxis");nB(qv,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var xtt=["x1","y1","x2","y2","key"],Stt=["offset"];function Sh(e){"@babel/helpers - typeof";return Sh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sh(e)}function d8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function yi(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ttt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ott=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,o=t.x,i=t.y,a=t.width,s=t.height,l=t.ry;return Y.createElement("rect",{x:o,y:i,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function wre(e,t){var n;if(Y.isValidElement(e))n=Y.cloneElement(e,t);else if(Ht(e))n=e(t);else{var r=t.x1,o=t.y1,i=t.x2,a=t.y2,s=t.key,l=f8(t,xtt),c=At(l,!1);c.offset;var u=f8(c,Stt);n=Y.createElement("line",Np({},u,{x1:r,y1:o,x2:i,y2:a,fill:"none",key:s}))}return n}function Itt(e){var t=e.x,n=e.width,r=e.horizontal,o=r===void 0?!0:r,i=e.horizontalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=yi(yi({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return wre(o,c)});return Y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function ktt(e){var t=e.y,n=e.height,r=e.vertical,o=r===void 0?!0:r,i=e.verticalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=yi(yi({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return wre(o,c)});return Y.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function Mtt(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,o=e.y,i=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var u=s.map(function(f){return Math.round(f+o-o)}).sort(function(f,p){return f-p});o!==u[0]&&u.unshift(0);var d=u.map(function(f,p){var m=!u[p+1],g=m?o+a-f:u[p+1]-f;if(g<=0)return null;var y=p%t.length;return Y.createElement("rect",{key:"react-".concat(p),y:f,x:r,height:g,width:i,stroke:"none",fill:t[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return Y.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function Att(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,o=e.fillOpacity,i=e.x,a=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var u=c.map(function(f){return Math.round(f+i-i)}).sort(function(f,p){return f-p});i!==u[0]&&u.unshift(0);var d=u.map(function(f,p){var m=!u[p+1],g=m?i+s-f:u[p+1]-f;if(g<=0)return null;var y=p%r.length;return Y.createElement("rect",{key:"react-".concat(p),x:f,y:a,width:g,height:l,stroke:"none",fill:r[y],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return Y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var $tt=function(t,n){var r=t.xAxis,o=t.width,i=t.height,a=t.offset;return wne(tB(yi(yi(yi({},qv.defaultProps),r),{},{ticks:xu(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.left,a.left+a.width,n)},Rtt=function(t,n){var r=t.yAxis,o=t.width,i=t.height,a=t.offset;return wne(tB(yi(yi(yi({},qv.defaultProps),r),{},{ticks:xu(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.top,a.top+a.height,n)},Dm={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function jh(e){var t,n,r,o,i,a,s=Qj(),l=Jj(),c=bet(),u=yi(yi({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Dm.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Dm.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Dm.horizontal,horizontalFill:(o=e.horizontalFill)!==null&&o!==void 0?o:Dm.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Dm.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Dm.verticalFill,x:at(e.x)?e.x:c.left,y:at(e.y)?e.y:c.top,width:at(e.width)?e.width:c.width,height:at(e.height)?e.height:c.height}),d=u.x,f=u.y,p=u.width,m=u.height,g=u.syncWithTicks,y=u.horizontalValues,b=u.verticalValues,x=get(),S=yet();if(!at(p)||p<=0||!at(m)||m<=0||!at(d)||d!==+d||!at(f)||f!==+f)return null;var P=u.verticalCoordinatesGenerator||$tt,E=u.horizontalCoordinatesGenerator||Rtt,T=u.horizontalPoints,O=u.verticalPoints;if((!T||!T.length)&&Ht(E)){var k=y&&y.length,M=E({yAxis:S?yi(yi({},S),{},{ticks:k?y:S.ticks}):void 0,width:s,height:l,offset:c},k?!0:g);Vl(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Sh(M),"]")),Array.isArray(M)&&(T=M)}if((!O||!O.length)&&Ht(P)){var I=b&&b.length,R=P({xAxis:x?yi(yi({},x),{},{ticks:I?b:x.ticks}):void 0,width:s,height:l,offset:c},I?!0:g);Vl(Array.isArray(R),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Sh(R),"]")),Array.isArray(R)&&(O=R)}return Y.createElement("g",{className:"recharts-cartesian-grid"},Y.createElement(Ott,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),Y.createElement(Itt,Np({},u,{offset:c,horizontalPoints:T,xAxis:x,yAxis:S})),Y.createElement(ktt,Np({},u,{offset:c,verticalPoints:O,xAxis:x,yAxis:S})),Y.createElement(Mtt,Np({},u,{horizontalPoints:T})),Y.createElement(Att,Np({},u,{verticalPoints:O})))}jh.displayName="CartesianGrid";var Dtt=["type","layout","connectNulls","ref"],_tt=["key"];function Ky(e){"@babel/helpers - typeof";return Ky=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ky(e)}function p8(e,t){if(e==null)return{};var n=Ltt(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ltt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function iw(){return iw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){p=[].concat(_m(l.slice(0,m)),[d-g]);break}var y=p.length%2===0?[0,f]:[f];return[].concat(_m(t.repeat(l,u)),_m(p),y).map(function(b){return"".concat(b,"px")}).join(", ")}),Ml(n,"id",Lf("recharts-line-")),Ml(n,"pathRef",function(a){n.mainCurve=a}),Ml(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Ml(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return Gtt(t,e),Vtt(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.points,s=i.xAxis,l=i.yAxis,c=i.layout,u=i.children,d=Vi(u,Wv);if(!d)return null;var f=function(g,y){return{x:g.x,y:g.y,value:g.value,errorVal:kr(g.payload,y)}},p={clipPath:r?"url(#clipPath-".concat(o,")"):null};return Y.createElement(rn,p,d.map(function(m){return Y.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,dataPointFormatter:f})}))}},{key:"renderDots",value:function(r,o,i){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,u=s.dataKey,d=At(this.props,!1),f=At(l,!0),p=c.map(function(g,y){var b=Ma(Ma(Ma({key:"dot-".concat(y),r:3},d),f),{},{value:g.value,dataKey:u,cx:g.x,cy:g.y,index:y,payload:g.payload});return t.renderDotItem(l,b)}),m={clipPath:r?"url(#clipPath-".concat(o?"":"dots-").concat(i,")"):null};return Y.createElement(rn,iw({className:"recharts-line-dots",key:"dots"},m),p)}},{key:"renderCurveStatically",value:function(r,o,i,a){var s=this.props,l=s.type,c=s.layout,u=s.connectNulls;s.ref;var d=p8(s,Dtt),f=Ma(Ma(Ma({},At(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:o?"url(#clipPath-".concat(i,")"):null,points:r},a),{},{type:l,layout:c,connectNulls:u});return Y.createElement(df,iw({},f,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,o){var i=this,a=this.props,s=a.points,l=a.strokeDasharray,c=a.isAnimationActive,u=a.animationBegin,d=a.animationDuration,f=a.animationEasing,p=a.animationId,m=a.animateNewValues,g=a.width,y=a.height,b=this.state,x=b.prevPoints,S=b.totalLength;return Y.createElement(nl,{begin:u,duration:d,isActive:c,easing:f,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(P){var E=P.t;if(x){var T=x.length/s.length,O=s.map(function(_,N){var B=Math.floor(N*T);if(x[B]){var L=x[B],F=Vr(L.x,_.x),U=Vr(L.y,_.y);return Ma(Ma({},_),{},{x:F(E),y:U(E)})}if(m){var V=Vr(g*2,_.x),z=Vr(y/2,_.y);return Ma(Ma({},_),{},{x:V(E),y:z(E)})}return Ma(Ma({},_),{},{x:_.x,y:_.y})});return i.renderCurveStatically(O,r,o)}var k=Vr(0,S),M=k(E),I;if(l){var R="".concat(l).split(/[,\s]+/gim).map(function(_){return parseFloat(_)});I=i.getStrokeDasharray(M,S,R)}else I=i.generateSimpleStrokeDasharray(S,M);return i.renderCurveStatically(s,r,o,{strokeDasharray:I})})}},{key:"renderCurve",value:function(r,o){var i=this.props,a=i.points,s=i.isAnimationActive,l=this.state,c=l.prevPoints,u=l.totalLength;return s&&a&&a.length&&(!c&&u>0||!xf(c,a))?this.renderCurveWithAnimation(r,o):this.renderCurveStatically(a,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.xAxis,u=o.yAxis,d=o.top,f=o.left,p=o.width,m=o.height,g=o.isAnimationActive,y=o.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,x=s.length===1,S=pe("recharts-line",l),P=c&&c.allowDataOverflow,E=u&&u.allowDataOverflow,T=P||E,O=Bt(y)?this.id:y,k=(r=At(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},M=k.r,I=M===void 0?3:M,R=k.strokeWidth,_=R===void 0?2:R,N=pee(a)?a:{},B=N.clipDot,L=B===void 0?!0:B,F=I*2+_;return Y.createElement(rn,{className:S},P||E?Y.createElement("defs",null,Y.createElement("clipPath",{id:"clipPath-".concat(O)},Y.createElement("rect",{x:P?f:f-p/2,y:E?d:d-m/2,width:P?p:p*2,height:E?m:m*2})),!L&&Y.createElement("clipPath",{id:"clipPath-dots-".concat(O)},Y.createElement("rect",{x:f-F/2,y:d-F/2,width:p+F,height:m+F}))):null,!x&&this.renderCurve(T,O),this.renderErrorBar(T,O),(x||a)&&this.renderDots(T,L,O),(!g||b)&&Hl.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:o.curPoints}:r.points!==o.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,o){for(var i=r.length%2!==0?[].concat(_m(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xtt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Fp(){return Fp=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!xf(u,a)||!xf(d,s))?this.renderAreaWithAnimation(r,o):this.renderAreaStatically(a,s,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.top,u=o.left,d=o.xAxis,f=o.yAxis,p=o.width,m=o.height,g=o.isAnimationActive,y=o.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,x=s.length===1,S=pe("recharts-area",l),P=d&&d.allowDataOverflow,E=f&&f.allowDataOverflow,T=P||E,O=Bt(y)?this.id:y,k=(r=At(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},M=k.r,I=M===void 0?3:M,R=k.strokeWidth,_=R===void 0?2:R,N=pee(a)?a:{},B=N.clipDot,L=B===void 0?!0:B,F=I*2+_;return Y.createElement(rn,{className:S},P||E?Y.createElement("defs",null,Y.createElement("clipPath",{id:"clipPath-".concat(O)},Y.createElement("rect",{x:P?u:u-p/2,y:E?c:c-m/2,width:P?p:p*2,height:E?m:m*2})),!L&&Y.createElement("clipPath",{id:"clipPath-dots-".concat(O)},Y.createElement("rect",{x:u-F/2,y:c-F/2,width:p+F,height:m+F}))):null,x?null:this.renderArea(T,O),(a||x)&&this.renderDots(T,L,O),(!g||b)&&Hl.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:o.curPoints,prevBaseLine:o.curBaseLine}:r.points!==o.curPoints||r.baseLine!==o.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(v.PureComponent);Cre=zf;Sc(zf,"displayName","Area");Sc(zf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ks.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Sc(zf,"getBaseValue",function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue,s=a??i;if(at(s)&&typeof s=="number")return s;var l=o==="horizontal"?r:n,c=l.scale.domain();if(l.type==="number"){var u=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return s==="dataMin"?d:s==="dataMax"||u<0?u:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});Sc(zf,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,o=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=t.layout,m=c&&c.length,g=Cre.getBaseValue(t,n,r,o),y=p==="horizontal",b=!1,x=d.map(function(P,E){var T;m?T=c[u+E]:(T=kr(P,l),Array.isArray(T)?b=!0:T=[g,T]);var O=T[1]==null||m&&kr(P,l)==null;return y?{x:Ly({axis:r,ticks:i,bandSize:s,entry:P,index:E}),y:O?null:o.scale(T[1]),value:T,payload:P}:{x:O?null:r.scale(T[1]),y:Ly({axis:o,ticks:a,bandSize:s,entry:P,index:E}),value:T,payload:P}}),S;return m||b?S=x.map(function(P){var E=Array.isArray(P.value)?P.value[0]:null;return y?{x:P.x,y:E!=null&&P.y!=null?o.scale(E):null}:{x:E!=null?r.scale(E):null,y:P.y}}):S=y?o.scale(g):r.scale(g),Sd({points:x,baseLine:S,layout:p,isRange:b},f)});Sc(zf,"renderDotItem",function(e,t){var n;if(Y.isValidElement(e))n=Y.cloneElement(e,t);else if(Ht(e))n=e(t);else{var r=pe("recharts-area-dot",typeof e!="boolean"?e.className:""),o=t.key,i=Pre(t,Ytt);n=Y.createElement(kS,Fp({},i,{key:o,className:r}))}return n});function Xy(e){"@babel/helpers - typeof";return Xy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xy(e)}function ont(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function int(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hnt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function mnt(e){var t=e.option,n=e.isActive,r=pnt(e,fnt);return typeof t=="string"?Y.createElement(mT,aw({option:Y.createElement(BI,aw({type:t},r)),isActive:n,shapeType:"symbols"},r)):Y.createElement(mT,aw({option:t,isActive:n,shapeType:"symbols"},r))}function Qy(e){"@babel/helpers - typeof";return Qy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qy(e)}function sw(){return sw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function urt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function drt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function frt(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&at(o)&&at(i)?t.slice(o,i+1):[]};function Wre(e){return e==="number"?[0,"auto"]:void 0}var G_=function(t,n,r,o){var i=t.graphicalItems,a=t.tooltipAxis,s=pk(n,t);return r<0||!i||!i.length||r>=s.length?null:i.reduce(function(l,c){var u,d=(u=c.props.data)!==null&&u!==void 0?u:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(a.dataKey&&!a.allowDuplicatedCategory){var p=d===void 0?s:d;f=ME(p,a.dataKey,o)}else f=d&&d[r]||s[r];return f?[].concat(tv(l),[Ene(c,f)]):l},[])},E8=function(t,n,r,o){var i=o||{x:t.chartX,y:t.chartY},a=Prt(i,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=Mqe(a,s,c,l);if(u>=0&&c){var d=c[u]&&c[u].value,f=G_(t,n,u,d),p=Ert(r,s,u,i);return{activeTooltipIndex:u,activeLabel:d,activePayload:f,activeCoordinate:p}}return null},Trt=function(t,n){var r=n.axes,o=n.graphicalItems,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,d=t.children,f=t.stackOffset,p=bne(u,i);return r.reduce(function(m,g){var y,b=g.type.defaultProps!==void 0?Ve(Ve({},g.type.defaultProps),g.props):g.props,x=b.type,S=b.dataKey,P=b.allowDataOverflow,E=b.allowDuplicatedCategory,T=b.scale,O=b.ticks,k=b.includeHidden,M=b[a];if(m[M])return m;var I=pk(t.data,{graphicalItems:o.filter(function(J){var K,ne=a in J.props?J.props[a]:(K=J.type.defaultProps)===null||K===void 0?void 0:K[a];return ne===M}),dataStartIndex:l,dataEndIndex:c}),R=I.length,_,N,B;Jnt(b.domain,P,x)&&(_=r_(b.domain,null,P),p&&(x==="number"||T!=="auto")&&(B=tw(I,S,"category")));var L=Wre(x);if(!_||_.length===0){var F,U=(F=b.domain)!==null&&F!==void 0?F:L;if(S){if(_=tw(I,S,x),x==="category"&&p){var V=wje(_);E&&V?(N=_,_=yT(0,R)):E||(_=H6(U,_,g).reduce(function(J,K){return J.indexOf(K)>=0?J:[].concat(tv(J),[K])},[]))}else if(x==="category")E?_=_.filter(function(J){return J!==""&&!Bt(J)}):_=H6(U,_,g).reduce(function(J,K){return J.indexOf(K)>=0||K===""||Bt(K)?J:[].concat(tv(J),[K])},[]);else if(x==="number"){var z=_qe(I,o.filter(function(J){var K,ne,re=a in J.props?J.props[a]:(K=J.type.defaultProps)===null||K===void 0?void 0:K[a],oe="hide"in J.props?J.props.hide:(ne=J.type.defaultProps)===null||ne===void 0?void 0:ne.hide;return re===M&&(k||!oe)}),S,i,u);z&&(_=z)}p&&(x==="number"||T!=="auto")&&(B=tw(I,S,"category"))}else p?_=yT(0,R):s&&s[M]&&s[M].hasStack&&x==="number"?_=f==="expand"?[0,1]:Pne(s[M].stackGroups,l,c):_=vne(I,o.filter(function(J){var K=a in J.props?J.props[a]:J.type.defaultProps[a],ne="hide"in J.props?J.props.hide:J.type.defaultProps.hide;return K===M&&(k||!ne)}),x,u,!0);if(x==="number")_=H_(d,_,M,i,O),U&&(_=r_(U,_,P));else if(x==="category"&&U){var W=U,G=_.every(function(J){return W.indexOf(J)>=0});G&&(_=W)}}return Ve(Ve({},m),{},Ut({},M,Ve(Ve({},b),{},{axisType:i,domain:_,categoricalDomain:B,duplicateDomain:N,originalDomain:(y=b.domain)!==null&&y!==void 0?y:L,isCategorical:p,layout:u})))},{})},Ort=function(t,n){var r=n.graphicalItems,o=n.Axis,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,d=t.children,f=pk(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),p=f.length,m=bne(u,i),g=-1;return r.reduce(function(y,b){var x=b.type.defaultProps!==void 0?Ve(Ve({},b.type.defaultProps),b.props):b.props,S=x[a],P=Wre("number");if(!y[S]){g++;var E;return m?E=yT(0,p):s&&s[S]&&s[S].hasStack?(E=Pne(s[S].stackGroups,l,c),E=H_(d,E,S,i)):(E=r_(P,vne(f,r.filter(function(T){var O,k,M=a in T.props?T.props[a]:(O=T.type.defaultProps)===null||O===void 0?void 0:O[a],I="hide"in T.props?T.props.hide:(k=T.type.defaultProps)===null||k===void 0?void 0:k.hide;return M===S&&!I}),"number",u),o.defaultProps.allowDataOverflow),E=H_(d,E,S,i)),Ve(Ve({},y),{},Ut({},S,Ve(Ve({axisType:i},o.defaultProps),{},{hide:!0,orientation:qa(Srt,"".concat(i,".").concat(g%2),null),domain:E,originalDomain:P,isCategorical:m,layout:u})))}return y},{})},Irt=function(t,n){var r=n.axisType,o=r===void 0?"xAxis":r,i=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.children,d="".concat(o,"Id"),f=Vi(u,i),p={};return f&&f.length?p=Trt(t,{axes:f,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):a&&a.length&&(p=Ort(t,{Axis:i,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),p},krt=function(t){var n=Dd(t),r=xu(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:wj(r,function(o){return o.coordinate}),tooltipAxis:n,tooltipAxisBandSize:oT(n,r)}},T8=function(t){var n=t.children,r=t.defaultShowTooltip,o=La(n,Vy),i=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(i=o.props.startIndex),o.props.endIndex>=0&&(a=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},Mrt=function(t){return!t||!t.length?!1:t.some(function(n){var r=Cu(n&&n.type);return r&&r.indexOf("Bar")>=0})},O8=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Art=function(t,n){var r=t.props,o=t.graphicalItems,i=t.xAxisMap,a=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,u=r.height,d=r.children,f=r.margin||{},p=La(d,Vy),m=La(d,Pu),g=Object.keys(l).reduce(function(E,T){var O=l[T],k=O.orientation;return!O.mirror&&!O.hide?Ve(Ve({},E),{},Ut({},k,E[k]+O.width)):E},{left:f.left||0,right:f.right||0}),y=Object.keys(a).reduce(function(E,T){var O=a[T],k=O.orientation;return!O.mirror&&!O.hide?Ve(Ve({},E),{},Ut({},k,qa(E,"".concat(k))+O.height)):E},{top:f.top||0,bottom:f.bottom||0}),b=Ve(Ve({},y),g),x=b.bottom;p&&(b.bottom+=p.props.height||Vy.defaultProps.height),m&&n&&(b=Rqe(b,o,r,n));var S=c-b.left-b.right,P=u-b.top-b.bottom;return Ve(Ve({brushBottom:x},b),{},{width:Math.max(S,0),height:Math.max(P,0)})},$rt=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},$S=function(t){var n=t.chartName,r=t.GraphicalChild,o=t.defaultTooltipEventType,i=o===void 0?"axis":o,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,d=t.defaultProps,f=function(b,x){var S=x.graphicalItems,P=x.stackGroups,E=x.offset,T=x.updateId,O=x.dataStartIndex,k=x.dataEndIndex,M=b.barSize,I=b.layout,R=b.barGap,_=b.barCategoryGap,N=b.maxBarSize,B=O8(I),L=B.numericAxisName,F=B.cateAxisName,U=Mrt(S),V=[];return S.forEach(function(z,W){var G=pk(b.data,{graphicalItems:[z],dataStartIndex:O,dataEndIndex:k}),J=z.type.defaultProps!==void 0?Ve(Ve({},z.type.defaultProps),z.props):z.props,K=J.dataKey,ne=J.maxBarSize,re=J["".concat(L,"Id")],oe=J["".concat(F,"Id")],fe={},se=l.reduce(function(je,de){var Re=x["".concat(de.axisType,"Map")],Me=J["".concat(de.axisType,"Id")];Re&&Re[Me]||de.axisType==="zAxis"||xh();var Ae=Re[Me];return Ve(Ve({},je),{},Ut(Ut({},de.axisType,Ae),"".concat(de.axisType,"Ticks"),xu(Ae)))},fe),ee=se[F],ce=se["".concat(F,"Ticks")],le=P&&P[re]&&P[re].hasStack&&Uqe(z,P[re].stackGroups),Q=Cu(z.type).indexOf("Bar")>=0,ue=oT(ee,ce),ge=[],xe=U&&Aqe({barSize:M,stackGroups:P,totalSize:$rt(se,F)});if(Q){var me,be,we=Bt(ne)?N:ne,Oe=(me=(be=oT(ee,ce,!0))!==null&&be!==void 0?be:we)!==null&&me!==void 0?me:0;ge=$qe({barGap:R,barCategoryGap:_,bandSize:Oe!==ue?Oe:ue,sizeList:xe[oe],maxBarSize:we}),Oe!==ue&&(ge=ge.map(function(je){return Ve(Ve({},je),{},{position:Ve(Ve({},je.position),{},{offset:je.position.offset-Oe/2})})}))}var ke=z&&z.type&&z.type.getComposedData;ke&&V.push({props:Ve(Ve({},ke(Ve(Ve({},se),{},{displayedData:G,props:b,dataKey:K,item:z,bandSize:ue,barPosition:ge,offset:E,stackedData:le,layout:I,dataStartIndex:O,dataEndIndex:k}))),{},Ut(Ut(Ut({key:z.key||"item-".concat(W)},L,se[L]),F,se[F]),"animationId",T)),childIndex:$je(z,b.children),item:z})}),V},p=function(b,x){var S=b.props,P=b.dataStartIndex,E=b.dataEndIndex,T=b.updateId;if(!NU({props:S}))return null;var O=S.children,k=S.layout,M=S.stackOffset,I=S.data,R=S.reverseStackOrder,_=O8(k),N=_.numericAxisName,B=_.cateAxisName,L=Vi(O,r),F=Vqe(I,L,"".concat(N,"Id"),"".concat(B,"Id"),M,R),U=l.reduce(function(J,K){var ne="".concat(K.axisType,"Map");return Ve(Ve({},J),{},Ut({},ne,Irt(S,Ve(Ve({},K),{},{graphicalItems:L,stackGroups:K.axisType===N&&F,dataStartIndex:P,dataEndIndex:E}))))},{}),V=Art(Ve(Ve({},U),{},{props:S,graphicalItems:L}),x==null?void 0:x.legendBBox);Object.keys(U).forEach(function(J){U[J]=u(S,U[J],V,J.replace("Map",""),n)});var z=U["".concat(B,"Map")],W=krt(z),G=f(S,Ve(Ve({},U),{},{dataStartIndex:P,dataEndIndex:E,updateId:T,graphicalItems:L,stackGroups:F,offset:V}));return Ve(Ve({formattedGraphicalItems:G,graphicalItems:L,offset:V,stackGroups:F},W),U)},m=function(y){function b(x){var S,P,E;return drt(this,b),E=hrt(this,b,[x]),Ut(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ut(E,"accessibilityManager",new Qnt),Ut(E,"handleLegendBBoxUpdate",function(T){if(T){var O=E.state,k=O.dataStartIndex,M=O.dataEndIndex,I=O.updateId;E.setState(Ve({legendBBox:T},p({props:E.props,dataStartIndex:k,dataEndIndex:M,updateId:I},Ve(Ve({},E.state),{},{legendBBox:T}))))}}),Ut(E,"handleReceiveSyncEvent",function(T,O,k){if(E.props.syncId===T){if(k===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(O)}}),Ut(E,"handleBrushChange",function(T){var O=T.startIndex,k=T.endIndex;if(O!==E.state.dataStartIndex||k!==E.state.dataEndIndex){var M=E.state.updateId;E.setState(function(){return Ve({dataStartIndex:O,dataEndIndex:k},p({props:E.props,dataStartIndex:O,dataEndIndex:k,updateId:M},E.state))}),E.triggerSyncEvent({dataStartIndex:O,dataEndIndex:k})}}),Ut(E,"handleMouseEnter",function(T){var O=E.getMouseInfo(T);if(O){var k=Ve(Ve({},O),{},{isTooltipActive:!0});E.setState(k),E.triggerSyncEvent(k);var M=E.props.onMouseEnter;Ht(M)&&M(k,T)}}),Ut(E,"triggeredAfterMouseMove",function(T){var O=E.getMouseInfo(T),k=O?Ve(Ve({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(k),E.triggerSyncEvent(k);var M=E.props.onMouseMove;Ht(M)&&M(k,T)}),Ut(E,"handleItemMouseEnter",function(T){E.setState(function(){return{isTooltipActive:!0,activeItem:T,activePayload:T.tooltipPayload,activeCoordinate:T.tooltipPosition||{x:T.cx,y:T.cy}}})}),Ut(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),Ut(E,"handleMouseMove",function(T){T.persist(),E.throttleTriggeredAfterMouseMove(T)}),Ut(E,"handleMouseLeave",function(T){E.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};E.setState(O),E.triggerSyncEvent(O);var k=E.props.onMouseLeave;Ht(k)&&k(O,T)}),Ut(E,"handleOuterEvent",function(T){var O=Aje(T),k=qa(E.props,"".concat(O));if(O&&Ht(k)){var M,I;/.*touch.*/i.test(O)?I=E.getMouseInfo(T.changedTouches[0]):I=E.getMouseInfo(T),k((M=I)!==null&&M!==void 0?M:{},T)}}),Ut(E,"handleClick",function(T){var O=E.getMouseInfo(T);if(O){var k=Ve(Ve({},O),{},{isTooltipActive:!0});E.setState(k),E.triggerSyncEvent(k);var M=E.props.onClick;Ht(M)&&M(k,T)}}),Ut(E,"handleMouseDown",function(T){var O=E.props.onMouseDown;if(Ht(O)){var k=E.getMouseInfo(T);O(k,T)}}),Ut(E,"handleMouseUp",function(T){var O=E.props.onMouseUp;if(Ht(O)){var k=E.getMouseInfo(T);O(k,T)}}),Ut(E,"handleTouchMove",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(T.changedTouches[0])}),Ut(E,"handleTouchStart",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&E.handleMouseDown(T.changedTouches[0])}),Ut(E,"handleTouchEnd",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&E.handleMouseUp(T.changedTouches[0])}),Ut(E,"triggerSyncEvent",function(T){E.props.syncId!==void 0&&L$.emit(N$,E.props.syncId,T,E.eventEmitterSymbol)}),Ut(E,"applySyncEvent",function(T){var O=E.props,k=O.layout,M=O.syncMethod,I=E.state.updateId,R=T.dataStartIndex,_=T.dataEndIndex;if(T.dataStartIndex!==void 0||T.dataEndIndex!==void 0)E.setState(Ve({dataStartIndex:R,dataEndIndex:_},p({props:E.props,dataStartIndex:R,dataEndIndex:_,updateId:I},E.state)));else if(T.activeTooltipIndex!==void 0){var N=T.chartX,B=T.chartY,L=T.activeTooltipIndex,F=E.state,U=F.offset,V=F.tooltipTicks;if(!U)return;if(typeof M=="function")L=M(V,T);else if(M==="value"){L=-1;for(var z=0;z=0){var le,Q;if(N.dataKey&&!N.allowDuplicatedCategory){var ue=typeof N.dataKey=="function"?ce:"payload.".concat(N.dataKey.toString());le=ME(z,ue,L),Q=W&&G&&ME(G,ue,L)}else le=z==null?void 0:z[B],Q=W&&G&&G[B];if(oe||re){var ge=T.props.activeIndex!==void 0?T.props.activeIndex:B;return[v.cloneElement(T,Ve(Ve(Ve({},M.props),se),{},{activeIndex:ge})),null,null]}if(!Bt(le))return[ee].concat(tv(E.renderActivePoints({item:M,activePoint:le,basePoint:Q,childIndex:B,isRange:W})))}else{var xe,me=(xe=E.getItemByXY(E.state.activeCoordinate))!==null&&xe!==void 0?xe:{graphicalItem:ee},be=me.graphicalItem,we=be.item,Oe=we===void 0?T:we,ke=be.childIndex,je=Ve(Ve(Ve({},M.props),se),{},{activeIndex:ke});return[v.cloneElement(Oe,je),null,null]}return W?[ee,null,null]:[ee,null]}),Ut(E,"renderCustomized",function(T,O,k){return v.cloneElement(T,Ve(Ve({key:"recharts-customized-".concat(k)},E.props),E.state))}),Ut(E,"renderMap",{CartesianGrid:{handler:NC,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:NC},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:NC},YAxis:{handler:NC},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:Lf("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=UI(E.triggeredAfterMouseMove,(P=x.throttleDelay)!==null&&P!==void 0?P:1e3/60),E.state={},E}return yrt(b,y),prt(b,[{key:"componentDidMount",value:function(){var S,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,P=S.children,E=S.data,T=S.height,O=S.layout,k=La(P,ja);if(k){var M=k.props.defaultIndex;if(!(typeof M!="number"||M<0||M>this.state.tooltipTicks.length-1)){var I=this.state.tooltipTicks[M]&&this.state.tooltipTicks[M].value,R=G_(this.state,E,M,I),_=this.state.tooltipTicks[M].coordinate,N=(this.state.offset.top+T)/2,B=O==="horizontal",L=B?{x:_,y:N}:{y:_,x:N},F=this.state.formattedGraphicalItems.find(function(V){var z=V.item;return z.type.name==="Scatter"});F&&(L=Ve(Ve({},L),F.props.points[M].tooltipPosition),R=F.props.points[M].tooltipPayload);var U={activeTooltipIndex:M,isTooltipActive:!0,activeLabel:I,activePayload:R,activeCoordinate:L};this.setState(U),this.renderCursor(k),this.accessibilityManager.setIndex(M)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var E,T;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0}})}return null}},{key:"componentDidUpdate",value:function(S){vD([La(S.children,ja)],[La(this.props.children,ja)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=La(this.props.children,ja);if(S&&typeof S.props.shared=="boolean"){var P=S.props.shared?"axis":"item";return s.indexOf(P)>=0?P:i}return i}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var P=this.container,E=P.getBoundingClientRect(),T=oGe(E),O={chartX:Math.round(S.pageX-T.left),chartY:Math.round(S.pageY-T.top)},k=E.width/P.offsetWidth||1,M=this.inRange(O.chartX,O.chartY,k);if(!M)return null;var I=this.state,R=I.xAxisMap,_=I.yAxisMap,N=this.getTooltipEventType();if(N!=="axis"&&R&&_){var B=Dd(R).scale,L=Dd(_).scale,F=B&&B.invert?B.invert(O.chartX):null,U=L&&L.invert?L.invert(O.chartY):null;return Ve(Ve({},O),{},{xValue:F,yValue:U})}var V=E8(this.state,this.props.data,this.props.layout,M);return V?Ve(Ve({},O),V):null}},{key:"inRange",value:function(S,P){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,T=this.props.layout,O=S/E,k=P/E;if(T==="horizontal"||T==="vertical"){var M=this.state.offset,I=O>=M.left&&O<=M.left+M.width&&k>=M.top&&k<=M.top+M.height;return I?{x:O,y:k}:null}var R=this.state,_=R.angleAxisMap,N=R.radiusAxisMap;if(_&&N){var B=Dd(_);return G6({x:O,y:k},B)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,P=this.getTooltipEventType(),E=La(S,ja),T={};E&&P==="axis"&&(E.props.trigger==="click"?T={onClick:this.handleClick}:T={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var O=AE(this.props,this.handleOuterEvent);return Ve(Ve({},O),T)}},{key:"addListener",value:function(){L$.on(N$,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){L$.removeListener(N$,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,P,E){for(var T=this.state.formattedGraphicalItems,O=0,k=T.length;O{const t=e.planned.energy>0?e.logged.energy/e.planned.energy*100:100,n=e.planned.energy>0?e.planned.energy-e.logged.energy:e.logged.energy,r=Ao(),[o,i]=qe(),a=[{name:"",value:t},{name:"",value:t<100?100-t:0}],s=[r.palette.primary.main,"#C5C5C5"];return X(Gt,{direction:"row",children:[C(Nf,{width:"50%",height:140,children:X(Kre,{children:[C(Vc,{height:100,data:a,startAngle:200,endAngle:-20,innerRadius:60,outerRadius:70,paddingAngle:2,dataKey:"value",children:a.map((l,c)=>C(zv,{fill:s[c%s.length]},`cell-${c}`))}),X("g",{children:[C("text",{x:"50%",y:"45%",fontSize:"1.25em",textAnchor:"middle",children:o("nutrition.valueEnergyKcal",{value:gi(n,i.language)})}),C("text",{x:"50%",y:"60%",fontSize:"1em",textAnchor:"middle",children:e.planned.energy>0&&o(t<100?"nutrition.valueRemaining":"nutrition.valueTooMany")})]})]})}),X(Gt,{width:"50%",spacing:1,children:[C(Vg,{title:o("nutrition.protein"),percentage:e.percentage.protein,logged:e.logged.protein,planned:e.planned.protein}),C(Vg,{title:o("nutrition.carbohydrates"),percentage:e.percentage.carbohydrates,logged:e.logged.carbohydrates,planned:e.planned.carbohydrates}),C(Vg,{title:o("nutrition.fat"),percentage:e.percentage.fat,logged:e.logged.fat,planned:e.planned.fat})]})]})},Lrt=["localeText"],q_=v.createContext(null),RS=function(t){const{localeText:n}=t,r=Ue(t,Lrt),{utils:o,localeText:i}=v.useContext(q_)??{utils:void 0,localeText:void 0},a=Jt({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:c,dateLibInstance:u,adapterLocale:d,localeText:f}=a,p=v.useMemo(()=>D({},f,i,n),[f,i,n]),m=v.useMemo(()=>{if(!l)return o||null;const b=new l({locale:d,formats:c,instance:u});if(!b.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(` +`));return b},[l,d,c,u,o]),g=v.useMemo(()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null,[m]),y=v.useMemo(()=>({utils:m,defaultDates:g,localeText:p}),[g,m,p]);return $.jsx(q_.Provider,{value:y,children:s})},Nrt=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:D({},e)}}}}),Yv=e=>{const{utils:t,formatKey:n,contextTranslation:r,propsTranslation:o}=e;return i=>{const a=i!==null&&t.isValid(i)?t.format(i,n):null;return(o??r)(i,t,a)}},Yre={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${!r&&(t===null||!n.isValid(t))?"No time selected":`Selected time is ${r??n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},Frt=Yre;Nrt(Yre);const Bh=()=>{const e=v.useContext(q_);if(e===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(` `));if(e.utils===null)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(` -`));const t=y.useMemo(()=>N({},Wrt,e.localeText),[e.localeText]);return y.useMemo(()=>N({},e,{localeText:t}),[e,t])},mn=()=>Bh().utils,zh=()=>Bh().defaultDates,Vh=e=>{const t=mn(),n=y.useRef();return n.current===void 0&&(n.current=t.date(void 0,e)),n.current},bo=()=>Bh().localeText,Grt=ut($.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),qrt=ut($.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),Krt=ut($.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),Jre=ut($.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),Yrt=ut($.jsxs(y.Fragment,{children:[$.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),$.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),Xrt=ut($.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),Qrt=ut($.jsxs(y.Fragment,{children:[$.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),$.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),Jrt=ut($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function Zrt(e){return Ne("MuiPickersArrowSwitcher",e)}Le("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const eot=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],tot=["ownerState"],not=["ownerState"],rot=oe("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),oot=oe("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),O8=oe(kn,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),iot=e=>{const{classes:t}=e;return Te({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},Zrt,t)},Zre=y.forwardRef(function(t,n){const r=er(),o=Jt({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:s,slotProps:l,isNextDisabled:c,isNextHidden:u,onGoToNext:d,nextLabel:f,isPreviousDisabled:p,isPreviousHidden:m,onGoToPrevious:g,previousLabel:v,labelId:w}=o,x=Ue(o,eot),S=o,P=iot(S),T={isDisabled:c,isHidden:u,goTo:d,label:f},E={isDisabled:p,isHidden:m,goTo:g,label:v},O=(s==null?void 0:s.previousIconButton)??O8,k=on({elementType:O,externalSlotProps:l==null?void 0:l.previousIconButton,additionalProps:{size:"medium",title:E.label,"aria-label":E.label,disabled:E.isDisabled,edge:"end",onClick:E.goTo},ownerState:N({},S,{hidden:E.isHidden}),className:fe(P.button,P.previousIconButton)}),A=(s==null?void 0:s.nextIconButton)??O8,I=on({elementType:A,externalSlotProps:l==null?void 0:l.nextIconButton,additionalProps:{size:"medium",title:T.label,"aria-label":T.label,disabled:T.isDisabled,edge:"start",onClick:T.goTo},ownerState:N({},S,{hidden:T.isHidden}),className:fe(P.button,P.nextIconButton)}),R=(s==null?void 0:s.leftArrowIcon)??qrt,L=on({elementType:R,externalSlotProps:l==null?void 0:l.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:S,className:P.leftArrowIcon}),F=Ue(L,tot),z=(s==null?void 0:s.rightArrowIcon)??Krt,_=on({elementType:z,externalSlotProps:l==null?void 0:l.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:S,className:P.rightArrowIcon}),D=Ue(_,not);return $.jsxs(rot,N({ref:n,className:fe(P.root,a),ownerState:S},x,{children:[$.jsx(O,N({},k,{children:r?$.jsx(z,N({},D)):$.jsx(R,N({},F))})),i?$.jsx(dt,{variant:"subtitle1",component:"span",id:w,children:i}):$.jsx(oot,{className:P.spacer,ownerState:S}),$.jsx(A,N({},I,{children:r?$.jsx(R,N({},F)):$.jsx(z,N({},D))}))]}))}),wc=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),rB=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(e!=null)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},eoe=["hours","minutes","seconds"],ov=e=>eoe.includes(e),I0=e=>eoe.includes(e)||e==="meridiem",aot=(e,t)=>e?t.getHours(e)>=12?"pm":"am":null,Ex=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?t==="am"?e-12:e+12:e,sot=(e,t,n,r)=>{const o=Ex(r.getHours(e),t,n);return r.setHours(e,o)},I8=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),_S=(e,t)=>(n,r)=>e?t.isAfter(n,r):I8(n,t)>I8(r,t),FE=(e,{format:t,views:n,ampm:r})=>{if(t!=null)return t;const o=e.formats;return wc(n,["hours"])?r?`${o.hours12h} ${o.meridiem}`:o.hours24h:wc(n,["minutes"])?o.minutes:wc(n,["seconds"])?o.seconds:wc(n,["minutes","seconds"])?`${o.minutes}:${o.seconds}`:wc(n,["hours","minutes","seconds"])?r?`${o.hours12h}:${o.minutes}:${o.seconds} ${o.meridiem}`:`${o.hours24h}:${o.minutes}:${o.seconds}`:r?`${o.hours12h}:${o.minutes} ${o.meridiem}`:`${o.hours24h}:${o.minutes}`};function DS({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:i,focusedView:a,onFocusedViewChange:s}){const l=y.useRef(n),c=y.useRef(o),u=y.useRef(o.includes(n)?n:o[0]),[d,f]=vi({name:"useViews",state:"view",controlled:r,default:u.current}),p=y.useRef(i?d:null),[m,g]=vi({name:"useViews",state:"focusedView",controlled:a,default:p.current});y.useEffect(()=>{(l.current&&l.current!==n||c.current&&c.current.some(O=>!o.includes(O)))&&(f(o.includes(n)?n:o[0]),c.current=o,l.current=n)},[n,f,d,o]);const v=o.indexOf(d),w=o[v-1]??null,x=o[v+1]??null,S=et((O,k)=>{g(k?O:A=>O===A?null:A),s==null||s(O,k)}),P=et(O=>{S(O,!0),O!==d&&(f(O),t&&t(O))}),T=et(()=>{x&&P(x)}),E=et((O,k,A)=>{const I=k==="finish",R=A?o.indexOf(A){const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function cot(e,{disablePast:t,minDate:n,timezone:r}){const o=mn();return y.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}function vk(e,t,n,r){const o=mn(),i=aot(e,o),a=y.useCallback(s=>{const l=e==null?null:sot(e,s,!!t,o);n(l,r??"partial")},[t,e,n,r,o]);return{meridiemMode:i,handleMeridiemChange:a}}const Ox=36,bk=2,wk=320,uot=280,xk=336,toe=232,k0=48,Sk=oe("div")({overflow:"hidden",width:wk,maxHeight:xk,display:"flex",flexDirection:"column",margin:"0 auto"});function dot(e){return Ne("MuiTimeClock",e)}Le("MuiTimeClock",["root","arrowSwitcher"]);const iv=220,Eu=36,Ix={x:iv/2,y:iv/2},noe={x:Ix.x,y:0},fot=noe.x-Ix.x,pot=noe.y-Ix.y,hot=e=>e*(180/Math.PI),roe=(e,t,n)=>{const r=t-Ix.x,o=n-Ix.y,i=Math.atan2(fot,pot)-Math.atan2(r,o);let a=hot(i);a=Math.round(a/e)*e,a%=360;const s=Math.floor(a/e)||0,l=r**2+o**2,c=Math.sqrt(l);return{value:s,distance:c}},mot=(e,t,n=1)=>{const r=n*6;let{value:o}=roe(r,e,t);return o=o*n%60,o},got=(e,t,n)=>{const{value:r,distance:o}=roe(30,e,t);let i=r||12;return n?i%=12:o{const{classes:t}=e;return Te({root:["root"],thumb:["thumb"]},yot,t)},wot=oe("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{shouldAnimate:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),xot=oe("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:`calc(50% - ${Eu/2}px)`,border:`${(Eu-4)/2}px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{hasSelected:!0},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function Sot(e){const t=Jt({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:o,viewValue:i}=t,a=Ue(t,vot),s=y.useRef(o);y.useEffect(()=>{s.current=o},[o]);const l=N({},t,{shouldAnimate:s.current!==o}),c=bot(l),u=()=>{let f=360/(o==="hours"?12:60)*i;return o==="hours"&&i>12&&(f-=360),{height:Math.round((r?.26:.4)*iv),transform:`rotateZ(${f}deg)`}};return $.jsx(wot,N({style:u(),className:fe(c.root,n),ownerState:l},a,{children:$.jsx(xot,{ownerState:l,className:c.thumb})}))}function Cot(e){return Ne("MuiClock",e)}Le("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const jE=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},lw=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:s})=>{const l=jE(a,a.date(void 0,s),e);n&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(r,l)&&(r=l);let c=e,u=e;for(a.isBefore(e,o)&&(c=o,u=null),a.isAfter(e,r)&&(u&&(u=r),c=null);c||u;){if(c&&a.isAfter(c,r)&&(c=null),u&&a.isBefore(u,o)&&(u=null),c){if(!i(c))return c;c=a.addDays(c,1)}if(u){if(!i(u))return u;u=a.addDays(u,-1)}}return null},Pot=(e,t)=>t==null||!e.isValid(t)?null:t,xi=(e,t,n)=>t==null||!e.isValid(t)?n:t,Tot=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),oB=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const o=r[r.length-1];r.push(e.addMonths(o,1))}return r},iB=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),Fl=(e,t)=>{const n=e.setHours(e.date(),t==="am"?2:14);return e.format(n,"meridiem")},Eot=["year","month","day"],av=e=>Eot.includes(e),kx=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return wc(n,["year"])?o.year:wc(n,["month"])?o.month:wc(n,["day"])?o.dayOfMonth:wc(n,["month","year"])?`${o.month} ${o.year}`:wc(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},Oot=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},Iot=e=>{const{classes:t,meridiemMode:n}=e;return Te({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton",n==="am"&&"selected"],pmButton:["pmButton",n==="pm"&&"selected"],meridiemText:["meridiemText"]},Cot,t)},kot=oe("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),Mot=oe("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),Aot=oe("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),$ot=oe("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{disabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),Rot=oe("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),ooe=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:Eu,variants:[{props:{meridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),_ot=oe(kn,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})(({theme:e})=>N({},ooe(e,"am"),{position:"absolute",left:8})),Dot=oe(kn,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})(({theme:e})=>N({},ooe(e,"pm"),{position:"absolute",right:8})),k8=oe(dt,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function Not(e){const t=Jt({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:i,value:a,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:c,minutesStep:u=1,onChange:d,selectedId:f,type:p,viewValue:m,disabled:g=!1,readOnly:v,className:w}=t,x=t,S=mn(),P=bo(),T=y.useRef(!1),E=Iot(x),O=l(m,p),k=!n&&p==="hours"&&(m<1||m>12),A=(V,W)=>{g||v||l(V,p)||d(V,W)},I=(V,W)=>{let{offsetX:G,offsetY:Q}=V;if(G===void 0){const ne=V.target.getBoundingClientRect();G=V.changedTouches[0].clientX-ne.left,Q=V.changedTouches[0].clientY-ne.top}const Y=p==="seconds"||p==="minutes"?mot(G,Q,u):got(G,Q,!!n);A(Y,W)},R=V=>{T.current=!0,I(V,"shallow")},L=V=>{T.current&&(I(V,"finish"),T.current=!1)},F=V=>{V.buttons>0&&I(V.nativeEvent,"shallow")},z=V=>{T.current&&(T.current=!1),I(V.nativeEvent,"finish")},_=y.useMemo(()=>p==="hours"?!0:m%5===0,[p,m]),D=p==="minutes"?u:1,H=y.useRef(null);wn(()=>{o&&H.current.focus()},[o]);const B=V=>{if(!T.current)switch(V.key){case"Home":A(0,"partial"),V.preventDefault();break;case"End":A(p==="minutes"?59:23,"partial"),V.preventDefault();break;case"ArrowUp":A(m+D,"partial"),V.preventDefault();break;case"ArrowDown":A(m-D,"partial"),V.preventDefault();break;case"PageUp":A(m+5,"partial"),V.preventDefault();break;case"PageDown":A(m-5,"partial"),V.preventDefault();break;case"Enter":case" ":A(m,"finish"),V.preventDefault();break}};return $.jsxs(kot,{className:fe(E.root,w),children:[$.jsxs(Mot,{className:E.clock,children:[$.jsx($ot,{onTouchMove:R,onTouchStart:R,onTouchEnd:L,onMouseUp:z,onMouseMove:F,ownerState:{disabled:g},className:E.squareMask}),!O&&$.jsxs(y.Fragment,{children:[$.jsx(Rot,{className:E.pin}),a!=null&&$.jsx(Sot,{type:p,viewValue:m,isInner:k,hasSelected:_})]}),$.jsx(Aot,{"aria-activedescendant":f,"aria-label":P.clockLabelText(p,a,S,a==null?null:S.format(a,"fullTime")),ref:H,role:"listbox",onKeyDown:B,tabIndex:0,className:E.wrapper,children:i})]}),n&&r&&$.jsxs(y.Fragment,{children:[$.jsx(_ot,{onClick:v?void 0:()=>s("am"),disabled:g||c===null,ownerState:x,className:E.amButton,title:Fl(S,"am"),children:$.jsx(k8,{variant:"caption",className:E.meridiemText,children:Fl(S,"am")})}),$.jsx(Dot,{disabled:g||c===null,onClick:v?void 0:()=>s("pm"),ownerState:x,className:E.pmButton,title:Fl(S,"pm"),children:$.jsx(k8,{variant:"caption",className:E.meridiemText,children:Fl(S,"pm")})})]})]})}function Lot(e){return Ne("MuiClockNumber",e)}const jC=Le("MuiClockNumber",["root","selected","disabled"]),Fot=["className","disabled","index","inner","label","selected"],jot=e=>{const{classes:t,selected:n,disabled:r}=e;return Te({root:["root",n&&"selected",r&&"disabled"]},Lot,t)},Bot=oe("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${jC.disabled}`]:t.disabled},{[`&.${jC.selected}`]:t.selected}]})(({theme:e})=>({height:Eu,width:Eu,position:"absolute",left:`calc((100% - ${Eu}px) / 2)`,display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${jC.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${jC.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{inner:!0},style:N({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function ioe(e){const t=Jt({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:o,inner:i,label:a,selected:s}=t,l=Ue(t,Fot),c=t,u=jot(c),d=o%12/12*Math.PI*2-Math.PI/2,f=(iv-Eu-2)/2*(i?.65:1),p=Math.round(Math.cos(d)*f),m=Math.round(Math.sin(d)*f);return $.jsx(Bot,N({className:fe(u.root,n),"aria-disabled":r?!0:void 0,"aria-selected":s?!0:void 0,role:"option",style:{transform:`translate(${p}px, ${m+(iv-Eu)/2}px`},ownerState:c},l,{children:a}))}const zot=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:o,utils:i})=>{const a=t?i.getHours(t):null,s=[],l=e?1:0,c=e?12:23,u=d=>a===null?!1:e?d===12?a===12||a===0:a===d||a-12===d:a===d;for(let d=l;d<=c;d+=1){let f=d.toString();d===0&&(f="00");const p=!e&&(d===0||d>12);f=i.formatNumber(f);const m=u(d);s.push($.jsx(ioe,{id:m?o:void 0,index:d,inner:p,selected:m,disabled:r(d),label:f,"aria-label":n(f)},d))}return s},M8=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const i=e.formatNumber;return[[5,i("05")],[10,i("10")],[15,i("15")],[20,i("20")],[25,i("25")],[30,i("30")],[35,i("35")],[40,i("40")],[45,i("45")],[50,i("50")],[55,i("55")],[0,i("00")]].map(([a,s],l)=>{const c=a===t;return $.jsx(ioe,{label:s,id:c?o:void 0,index:l+1,inner:!1,disabled:n(a),selected:c,"aria-label":r(s)},a)})},aB=({timezone:e,value:t,defaultValue:n,referenceDate:r,onChange:o,valueManager:i})=>{const a=mn(),s=y.useRef(n),l=t??s.current??i.emptyValue,c=y.useMemo(()=>i.getTimezone(a,l),[a,i,l]),u=et(m=>c==null?m:i.setTimezone(a,c,m));let d;e?d=e:c?d=c:r?d=a.getTimezone(r):d="default";const f=y.useMemo(()=>i.setTimezone(a,d,l),[i,a,d,l]),p=et((m,...g)=>{const v=u(m);o==null||o(v,...g)});return{value:f,handleValueChange:p,timezone:d}},Qv=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:a})=>{const[s,l]=vi({name:e,state:"value",controlled:n,default:r??a.emptyValue}),c=et((u,...d)=>{l(u),i==null||i(u,...d)});return aB({timezone:t,value:s,defaultValue:void 0,referenceDate:o,onChange:c,valueManager:a})},Dl={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},Vot=e=>Math.max(...e.map(t=>Dl[t.type]??1)),o0=(e,t,n)=>{if(t===Dl.year)return e.startOfYear(n);if(t===Dl.month)return e.startOfMonth(n);if(t===Dl.day)return e.startOfDay(n);let r=n;return t{let i=o?o():o0(t,n,iB(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=o0(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=o0(t,n,e.maxDate));const a=_S(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=o0(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:jE(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=o0(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:jE(t,i,e.maxTime))),i},aoe=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(` -`));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},Uot=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},Ck=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map(s=>e.formatByString(s,t))},soe=(e,t,n,r)=>{switch(n){case"month":return oB(e,e.date(void 0,t)).map(o=>e.formatByString(o,r));case"weekDay":return Ck(e,r);case"meridiem":{const o=e.date(void 0,t);return[e.startOfDay(o),e.endOfDay(o)].map(i=>e.formatByString(i,r))}default:return[]}},A8="s",Wot=["0","1","2","3","4","5","6","7","8","9"],Got=e=>{const t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),A8)==="0"?Wot:Array.from({length:10}).map((r,o)=>e.formatByString(e.setSeconds(t,o),A8))},Ch=(e,t)=>{if(t[0]==="0")return e;const n=[];let r="";for(let o=0;o-1&&(n.push(i.toString()),r="")}return n.join("")},sB=(e,t)=>t[0]==="0"?e:e.split("").map(n=>t[Number(n)]).join(""),$8=(e,t)=>{const n=Ch(e,t);return n!==" "&&!Number.isNaN(Number(n))},loe=(e,t)=>{let n=e;for(n=Number(n).toString();n.length{if(o.type==="day"&&o.contentType==="digit-with-letter"){const a=e.setDate(n.longestMonth,t);return e.formatByString(a,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=loe(i,o.maxLength)),sB(i,r)},qot=(e,t,n,r,o,i,a,s)=>{const l=Uot(r),c=r==="Home",u=r==="End",d=n.value===""||c||u,f=()=>{const m=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),g=S=>coe(e,S,m,i,n),v=n.type==="minutes"&&(s!=null&&s.minutesStep)?s.minutesStep:1;let x=parseInt(Ch(n.value,i),10)+l*v;if(d){if(n.type==="year"&&!u&&!c)return e.formatByString(e.date(void 0,t),n.format);l>0||c?x=m.minimum:x=m.maximum}return x%v!==0&&((l<0||c)&&(x+=v-(v+x)%v),(l>0||u)&&(x-=x%v)),x>m.maximum?g(m.minimum+(x-m.maximum-1)%(m.maximum-m.minimum+1)):x{const m=soe(e,t,n.type,n.format);if(m.length===0)return n.value;if(d)return l>0||c?m[0]:m[m.length-1];const w=((m.indexOf(n.value)+l)%m.length+m.length)%m.length;return m[w]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?f():p()},lB=(e,t,n)=>{let r=e.value||e.placeholder;const o=t==="non-input"?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t==="non-input"&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(Ch(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!o&&r.length===1&&(r=`${r}‎`),t==="input-rtl"&&(r=`⁨${r}⁩`),r},R8=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),uoe=(e,t)=>e.formatByString(e.date(void 0,"system"),t).length===4,doe=(e,t,n,r)=>{if(t!=="digit")return!1;const o=e.date(void 0,"default");switch(n){case"year":return uoe(e,r)?e.formatByString(e.setYear(o,1),r)==="0001":e.formatByString(e.setYear(o,2001),r)==="01";case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},Kot=(e,t,n)=>{const r=t.some(l=>l.type==="day"),o=[],i=[];for(let l=0;le.map(t=>`${t.startSeparator}${t.value||t.placeholder}${t.endSeparator}`).join(""),Xot=(e,t,n)=>{const o=e.map(i=>{const a=lB(i,n?"input-rtl":"input-ltr",t);return`${i.startSeparator}${a}${i.endSeparator}`}).join("");return n?`⁦${o}⁩`:o},Qot=(e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=oB(e,r).reduce((l,c)=>{const u=e.getDaysInMonth(c);return u>l.maxDaysInMonth?{maxDaysInMonth:u,longestMonth:c}:l},{maxDaysInMonth:0,longestMonth:null});return{year:({format:l})=>({minimum:0,maximum:uoe(e,l)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(o)+1}),day:({currentDate:l})=>({minimum:1,maximum:l!=null&&e.isValid(l)?e.getDaysInMonth(l):a,longestMonth:s}),weekDay:({format:l,contentType:c})=>{if(c==="digit"){const u=Ck(e,l).map(Number);return{minimum:Math.min(...u),maximum:Math.max(...u)}}return{minimum:1,maximum:7}},hours:({format:l})=>{const c=e.getHours(i);return Ch(e.formatByString(e.endOfDay(r),l),t)!==c.toString()?{minimum:1,maximum:Number(Ch(e.formatByString(e.startOfDay(r),l),t))}:{minimum:0,maximum:c}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},Jot=(e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{const o=Ck(e,t.format),i=e.formatByString(n,t.format),a=o.indexOf(i),l=o.indexOf(t.value)-a;return e.addDays(n,l)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const o=e.getHours(n)<12,i=e.getHours(r);return o&&i>=12?e.addHours(r,-12):!o&&i<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}},_8={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},D8=(e,t,n,r,o)=>[...n].sort((i,a)=>_8[i.type]-_8[a.type]).reduce((i,a)=>!o||a.modified?Jot(e,a,t,i):i,r),Zot=()=>navigator.userAgent.toLowerCase().includes("android"),eit=(e,t)=>{const n={};if(!t)return e.forEach((l,c)=>{const u=c===0?null:c-1,d=c===e.length-1?null:c+1;n[c]={leftIndex:u,rightIndex:d}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex((l,c)=>{var u;return c>=i&&((u=l.endSeparator)==null?void 0:u.includes(" "))&&l.endSeparator!==" / "}),a===-1&&(a=e.length-1);for(let l=a;l>=i;l-=1)o[l]=s,r[s]=l,s-=1;i=a+1}return e.forEach((l,c)=>{const u=o[c],d=u===0?null:r[u-1],f=u===e.length-1?null:r[u+1];n[c]={leftIndex:d,rightIndex:f}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}},XD=(e,t)=>{if(e==null)return null;if(e==="all")return"all";if(typeof e=="string"){const n=t.findIndex(r=>r.type===e);return n===-1?null:n}return e},tit=(e,t)=>{if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}},nit=(e,t)=>{if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}},rit=["value","referenceDate"],Qr={emptyValue:null,getTodayValue:iB,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=Ue(e,rit);return t!=null&&r.utils.isValid(t)?t:n??Hot(r)},cleanValue:Pot,areValuesEqual:Tot,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>t==null||!e.isValid(t)?null:e.getTimezone(t),setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},cB={updateReferenceValue:(e,t,n)=>t==null||!e.isValid(t)?n:t,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&!!n?n:r(t),getV7HiddenInputValueFromSections:Yot,getV6InputValueFromSections:Xot,getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:n=>n,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:n==null||!e.isValid(n)?t.referenceValue:n})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},uB=({value:e,referenceDate:t,utils:n,props:r,timezone:o})=>{const i=y.useMemo(()=>Qr.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:Dl.day,timezone:o,getTodayDate:()=>iB(n,o,"date")}),[]);return e??i},oit=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],iit=e=>{const{classes:t}=e;return Te({root:["root"],arrowSwitcher:["arrowSwitcher"]},dot,t)},ait=oe(Sk,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),sit=oe(Zre,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),lit=["hours","minutes"],cit=y.forwardRef(function(t,n){const r=mn(),o=Jt({props:t,name:"MuiTimeClock"}),{ampm:i=r.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:s,slots:l,slotProps:c,value:u,defaultValue:d,referenceDate:f,disableIgnoringDatePartForTimeValidation:p=!1,maxTime:m,minTime:g,disableFuture:v,disablePast:w,minutesStep:x=1,shouldDisableTime:S,showViewSwitcher:P,onChange:T,view:E,views:O=lit,openTo:k,onViewChange:A,focusedView:I,onFocusedViewChange:R,className:L,disabled:F,readOnly:z,timezone:_}=o,D=Ue(o,oit),{value:H,handleValueChange:B,timezone:V}=Qv({name:"TimeClock",timezone:_,value:u,defaultValue:d,referenceDate:f,onChange:T,valueManager:Qr}),W=uB({value:H,referenceDate:f,utils:r,props:o,timezone:V}),G=bo(),Q=Vh(V),{view:Y,setView:ne,previousView:ie,nextView:re,setValueAndGoToNextView:pe}=DS({view:E,views:O,openTo:k,onViewChange:A,onChange:B,focusedView:I,onFocusedViewChange:R}),{meridiemMode:le,handleMeridiemChange:ee}=vk(W,i,pe),ce=y.useCallback((we,me)=>{const be=_S(p,r),xe=me==="hours"||me==="minutes"&&O.includes("seconds"),Ee=({start:_e,end:de})=>!(g&&be(g,de)||m&&be(_e,m)||v&&be(_e,Q)||w&&be(Q,xe?de:_e)),Me=(_e,de=1)=>{if(_e%de!==0)return!1;if(S)switch(me){case"hours":return!S(r.setHours(W,_e),"hours");case"minutes":return!S(r.setMinutes(W,_e),"minutes");case"seconds":return!S(r.setSeconds(W,_e),"seconds");default:return!1}return!0};switch(me){case"hours":{const _e=Ex(we,le,i),de=r.setHours(W,_e),Ae=r.setSeconds(r.setMinutes(de,0),0),Oe=r.setSeconds(r.setMinutes(de,59),59);return!Ee({start:Ae,end:Oe})||!Me(_e)}case"minutes":{const _e=r.setMinutes(W,we),de=r.setSeconds(_e,0),Ae=r.setSeconds(_e,59);return!Ee({start:de,end:Ae})||!Me(we,x)}case"seconds":{const _e=r.setSeconds(W,we);return!Ee({start:_e,end:_e})||!Me(we)}default:throw new Error("not supported")}},[i,W,p,m,le,g,x,S,r,v,w,Q,O]),se=Ln(),Z=y.useMemo(()=>{switch(Y){case"hours":{const we=(me,be)=>{const xe=Ex(me,le,i);pe(r.setHours(W,xe),be,"hours")};return{onChange:we,viewValue:r.getHours(W),children:zot({value:H,utils:r,ampm:i,onChange:we,getClockNumberText:G.hoursClockNumberText,isDisabled:me=>F||ce(me,"hours"),selectedId:se})}}case"minutes":{const we=r.getMinutes(W),me=(be,xe)=>{pe(r.setMinutes(W,be),xe,"minutes")};return{viewValue:we,onChange:me,children:M8({utils:r,value:we,onChange:me,getClockNumberText:G.minutesClockNumberText,isDisabled:be=>F||ce(be,"minutes"),selectedId:se})}}case"seconds":{const we=r.getSeconds(W),me=(be,xe)=>{pe(r.setSeconds(W,be),xe,"seconds")};return{viewValue:we,onChange:me,children:M8({utils:r,value:we,onChange:me,getClockNumberText:G.secondsClockNumberText,isDisabled:be=>F||ce(be,"seconds"),selectedId:se})}}default:throw new Error("You must provide the type for ClockView")}},[Y,r,H,i,G.hoursClockNumberText,G.minutesClockNumberText,G.secondsClockNumberText,le,pe,W,ce,se,F]),ue=o,ge=iit(ue);return $.jsxs(ait,N({ref:n,className:fe(ge.root,L),ownerState:ue},D,{children:[$.jsx(Not,N({autoFocus:s??!!I,ampmInClock:a&&O.includes("hours"),value:H,type:Y,ampm:i,minutesStep:x,isTimeDisabled:ce,meridiemMode:le,handleMeridiemChange:ee,selectedId:se,disabled:F,readOnly:z},Z)),P&&$.jsx(sit,{className:ge.arrowSwitcher,slots:l,slotProps:c,onGoToPrevious:()=>ne(ie),isPreviousDisabled:!ie,previousLabel:G.openPreviousView,onGoToNext:()=>ne(re),isNextDisabled:!re,nextLabel:G.openNextView,ownerState:ue})]}))});function uit(e){return Ne("MuiDigitalClock",e)}const dit=Le("MuiDigitalClock",["root","list","item"]);function Jm(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const fit=(e,t)=>n=>{(n.key==="Enter"||n.key===" ")&&(e(n),n.preventDefault(),n.stopPropagation())},ia=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?ia(t.shadowRoot):t:null},BE=e=>Array.from(e.children).indexOf(ia(document)),dB="@media (pointer: fine)",pit=["ampm","timeStep","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","views","skipDisabled","timezone"],hit=e=>{const{classes:t}=e;return Te({root:["root"],list:["list"],item:["item"]},uit,t)},mit=oe(Sk,{name:"MuiDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})({overflowY:"auto",width:"100%","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:toe,variants:[{props:{alreadyRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),git=oe(pS,{name:"MuiDigitalClock",slot:"List",overridesResolver:(e,t)=>t.list})({padding:0}),yit=oe(tn,{name:"MuiDigitalClock",slot:"Item",overridesResolver:(e,t)=>t.item})(({theme:e})=>({padding:"8px 16px",margin:"2px 4px","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:vt(e.palette.primary.main,e.palette.action.focusOpacity)}})),vit=y.forwardRef(function(t,n){const r=mn(),o=y.useRef(null),i=Wt(n,o),a=y.useRef(null),s=Jt({props:t,name:"MuiDigitalClock"}),{ampm:l=r.is12HourCycleInCurrentLocale(),timeStep:c=30,autoFocus:u,slots:d,slotProps:f,value:p,defaultValue:m,referenceDate:g,disableIgnoringDatePartForTimeValidation:v=!1,maxTime:w,minTime:x,disableFuture:S,disablePast:P,minutesStep:T=1,shouldDisableTime:E,onChange:O,view:k,openTo:A,onViewChange:I,focusedView:R,onFocusedViewChange:L,className:F,disabled:z,readOnly:_,views:D=["hours"],skipDisabled:H=!1,timezone:B}=s,V=Ue(s,pit),{value:W,handleValueChange:G,timezone:Q}=Qv({name:"DigitalClock",timezone:B,value:p,defaultValue:m,referenceDate:g,onChange:O,valueManager:Qr}),Y=bo(),ne=Vh(Q),ie=y.useMemo(()=>N({},s,{alreadyRendered:!!o.current}),[s]),re=hit(ie),pe=(d==null?void 0:d.digitalClockItem)??yit,le=on({elementType:pe,externalSlotProps:f==null?void 0:f.digitalClockItem,ownerState:{},className:re.item}),ee=uB({value:W,referenceDate:g,utils:r,props:s,timezone:Q}),ce=et(be=>G(be,"finish","hours")),{setValueAndGoToNextView:se}=DS({view:k,views:D,openTo:A,onViewChange:I,onChange:ce,focusedView:R,onFocusedViewChange:L}),Z=et(be=>{se(be,"finish")});y.useEffect(()=>{if(o.current===null)return;const be=o.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!be)return;const xe=be.offsetTop;(u||R)&&be.focus(),o.current.scrollTop=xe-4});const ue=y.useCallback(be=>{const xe=_S(v,r),Ee=()=>!(x&&xe(x,be)||w&&xe(be,w)||S&&xe(be,ne)||P&&xe(ne,be)),Me=()=>r.getMinutes(be)%T!==0?!1:E?!E(be,"hours"):!0;return!Ee()||!Me()},[v,r,x,w,S,ne,P,T,E]),ge=y.useMemo(()=>{const be=[];let Ee=r.startOfDay(ee);for(;r.isSameDay(ee,Ee);)be.push(Ee),Ee=r.addMinutes(Ee,c);return be},[ee,c,r]),we=ge.findIndex(be=>r.isEqual(be,ee)),me=be=>{switch(be.key){case"PageUp":{const xe=BE(a.current)-5,Ee=a.current.children,Me=Math.max(0,xe),_e=Ee[Me];_e&&_e.focus(),be.preventDefault();break}case"PageDown":{const xe=BE(a.current)+5,Ee=a.current.children,Me=Math.min(Ee.length-1,xe),_e=Ee[Me];_e&&_e.focus(),be.preventDefault();break}}};return $.jsx(mit,N({ref:i,className:fe(re.root,F),ownerState:ie},V,{children:$.jsx(git,{ref:a,role:"listbox","aria-label":Y.timePickerToolbarTitle,className:re.list,onKeyDown:me,children:ge.map((be,xe)=>{if(H&&ue(be))return null;const Ee=r.isEqual(be,W),Me=r.format(be,l?"fullTime12h":"fullTime24h"),_e=we===xe||we===-1&&xe===0?0:-1;return $.jsx(pe,N({onClick:()=>!_&&Z(be),selected:Ee,disabled:z||ue(be),disableRipple:_,role:"option","aria-disabled":_,"aria-selected":Ee,tabIndex:_e},le,{children:Me}),`${be.valueOf()}-${Me}`)})})}))});function bit(e){return Ne("MuiMultiSectionDigitalClock",e)}const N8=Le("MuiMultiSectionDigitalClock",["root"]);function wit(e){return Ne("MuiMultiSectionDigitalClockSection",e)}const xit=Le("MuiMultiSectionDigitalClockSection",["root","item"]),Sit=["autoFocus","onChange","className","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],Cit=e=>{const{classes:t}=e;return Te({root:["root"],item:["item"]},wit,t)},Pit=oe(pS,{name:"MuiMultiSectionDigitalClockSection",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({maxHeight:toe,width:56,padding:0,overflow:"hidden","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},"@media (pointer: fine)":{"&:hover":{overflowY:"auto"}},"@media (pointer: none), (pointer: coarse)":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"&::after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"},variants:[{props:{alreadyRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]})),Tit=oe(tn,{name:"MuiMultiSectionDigitalClockSection",slot:"Item",overridesResolver:(e,t)=>t.item})(({theme:e})=>({padding:8,margin:"2px 4px",width:k0,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:vt(e.palette.primary.main,e.palette.action.focusOpacity)}})),Eit=y.forwardRef(function(t,n){const r=y.useRef(null),o=Wt(n,r),i=y.useRef(null),a=Jt({props:t,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:s,onChange:l,className:c,disabled:u,readOnly:d,items:f,active:p,slots:m,slotProps:g,skipDisabled:v}=a,w=Ue(a,Sit),x=y.useMemo(()=>N({},a,{alreadyRendered:!!r.current}),[a]),S=Cit(x),P=(m==null?void 0:m.digitalClockSectionItem)??Tit;y.useEffect(()=>{if(r.current===null)return;const O=r.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(p&&s&&O&&O.focus(),!O||i.current===O)return;i.current=O;const k=O.offsetTop;r.current.scrollTop=k-4});const T=f.findIndex(O=>O.isFocused(O.value)),E=O=>{switch(O.key){case"PageUp":{const k=BE(r.current)-5,A=r.current.children,I=Math.max(0,k),R=A[I];R&&R.focus(),O.preventDefault();break}case"PageDown":{const k=BE(r.current)+5,A=r.current.children,I=Math.min(A.length-1,k),R=A[I];R&&R.focus(),O.preventDefault();break}}};return $.jsx(Pit,N({ref:o,className:fe(S.root,c),ownerState:x,autoFocusItem:s&&p,role:"listbox",onKeyDown:E},w,{children:f.map((O,k)=>{var F;const A=(F=O.isDisabled)==null?void 0:F.call(O,O.value),I=u||A;if(v&&I)return null;const R=O.isSelected(O.value),L=T===k||T===-1&&k===0?0:-1;return $.jsx(P,N({onClick:()=>!d&&l(O.value),selected:R,disabled:I,disableRipple:d,role:"option","aria-disabled":d||I||void 0,"aria-label":O.ariaLabel,"aria-selected":R,tabIndex:L,className:S.item},g==null?void 0:g.digitalClockSectionItem,{children:O.label}),O.label)})}))}),Oit=({now:e,value:t,utils:n,ampm:r,isDisabled:o,resolveAriaLabel:i,timeStep:a,valueOrReferenceDate:s})=>{const l=t?n.getHours(t):null,c=[],u=(p,m)=>{const g=m??l;return g===null?!1:r?p===12?g===12||g===0:g===p||g-12===p:g===p},d=p=>u(p,n.getHours(s)),f=r?11:23;for(let p=0;p<=f;p+=a){let m=n.format(n.setHours(e,p),r?"hours12h":"hours24h");const g=i(parseInt(m,10).toString());m=n.formatNumber(m),c.push({value:p,label:m,isSelected:u,isDisabled:o,isFocused:d,ariaLabel:g})}return c},L8=({value:e,utils:t,isDisabled:n,timeStep:r,resolveLabel:o,resolveAriaLabel:i,hasValue:a=!0})=>{const s=c=>e===null?!1:a&&e===c,l=c=>e===c;return[...Array.from({length:Math.ceil(60/r)},(c,u)=>{const d=r*u;return{value:d,label:t.formatNumber(o(d)),isDisabled:n,isSelected:s,isFocused:l,ariaLabel:i(d.toString())}})]},Iit=["ampm","timeSteps","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","skipDisabled","timezone"],kit=e=>{const{classes:t}=e;return Te({root:["root"]},bit,t)},Mit=oe(Sk,{name:"MuiMultiSectionDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),Ait=y.forwardRef(function(t,n){const r=mn(),o=er(),i=Jt({props:t,name:"MuiMultiSectionDigitalClock"}),{ampm:a=r.is12HourCycleInCurrentLocale(),timeSteps:s,autoFocus:l,slots:c,slotProps:u,value:d,defaultValue:f,referenceDate:p,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:g,minTime:v,disableFuture:w,disablePast:x,minutesStep:S=1,shouldDisableTime:P,onChange:T,view:E,views:O=["hours","minutes"],openTo:k,onViewChange:A,focusedView:I,onFocusedViewChange:R,className:L,disabled:F,readOnly:z,skipDisabled:_=!1,timezone:D}=i,H=Ue(i,Iit),{value:B,handleValueChange:V,timezone:W}=Qv({name:"MultiSectionDigitalClock",timezone:D,value:d,defaultValue:f,referenceDate:p,onChange:T,valueManager:Qr}),G=bo(),Q=Vh(W),Y=y.useMemo(()=>N({hours:1,minutes:5,seconds:5},s),[s]),ne=uB({value:B,referenceDate:p,utils:r,props:i,timezone:W}),ie=et((Ee,Me,_e)=>V(Ee,Me,_e)),re=y.useMemo(()=>!a||!O.includes("hours")||O.includes("meridiem")?O:[...O,"meridiem"],[a,O]),{view:pe,setValueAndGoToNextView:le,focusedView:ee}=DS({view:E,views:re,openTo:k,onViewChange:A,onChange:ie,focusedView:I,onFocusedViewChange:R}),ce=et(Ee=>{le(Ee,"finish","meridiem")}),{meridiemMode:se,handleMeridiemChange:Z}=vk(ne,a,ce,"finish"),ue=y.useCallback((Ee,Me)=>{const _e=_S(m,r),de=Me==="hours"||Me==="minutes"&&re.includes("seconds"),Ae=({start:$e,end:Be})=>!(v&&_e(v,Be)||g&&_e($e,g)||w&&_e($e,Q)||x&&_e(Q,de?Be:$e)),Oe=($e,Be=1)=>{if($e%Be!==0)return!1;if(P)switch(Me){case"hours":return!P(r.setHours(ne,$e),"hours");case"minutes":return!P(r.setMinutes(ne,$e),"minutes");case"seconds":return!P(r.setSeconds(ne,$e),"seconds");default:return!1}return!0};switch(Me){case"hours":{const $e=Ex(Ee,se,a),Be=r.setHours(ne,$e),Je=r.setSeconds(r.setMinutes(Be,0),0),ot=r.setSeconds(r.setMinutes(Be,59),59);return!Ae({start:Je,end:ot})||!Oe($e)}case"minutes":{const $e=r.setMinutes(ne,Ee),Be=r.setSeconds($e,0),Je=r.setSeconds($e,59);return!Ae({start:Be,end:Je})||!Oe(Ee,S)}case"seconds":{const $e=r.setSeconds(ne,Ee);return!Ae({start:$e,end:$e})||!Oe(Ee)}default:throw new Error("not supported")}},[a,ne,m,g,se,v,S,P,r,w,x,Q,re]),ge=y.useCallback(Ee=>{switch(Ee){case"hours":return{onChange:Me=>{const _e=Ex(Me,se,a);le(r.setHours(ne,_e),"finish","hours")},items:Oit({now:Q,value:B,ampm:a,utils:r,isDisabled:Me=>ue(Me,"hours"),timeStep:Y.hours,resolveAriaLabel:G.hoursClockNumberText,valueOrReferenceDate:ne})};case"minutes":return{onChange:Me=>{le(r.setMinutes(ne,Me),"finish","minutes")},items:L8({value:r.getMinutes(ne),utils:r,isDisabled:Me=>ue(Me,"minutes"),resolveLabel:Me=>r.format(r.setMinutes(Q,Me),"minutes"),timeStep:Y.minutes,hasValue:!!B,resolveAriaLabel:G.minutesClockNumberText})};case"seconds":return{onChange:Me=>{le(r.setSeconds(ne,Me),"finish","seconds")},items:L8({value:r.getSeconds(ne),utils:r,isDisabled:Me=>ue(Me,"seconds"),resolveLabel:Me=>r.format(r.setSeconds(Q,Me),"seconds"),timeStep:Y.seconds,hasValue:!!B,resolveAriaLabel:G.secondsClockNumberText})};case"meridiem":{const Me=Fl(r,"am"),_e=Fl(r,"pm");return{onChange:Z,items:[{value:"am",label:Me,isSelected:()=>!!B&&se==="am",isFocused:()=>!!ne&&se==="am",ariaLabel:Me},{value:"pm",label:_e,isSelected:()=>!!B&&se==="pm",isFocused:()=>!!ne&&se==="pm",ariaLabel:_e}]}}default:throw new Error(`Unknown view: ${Ee} found.`)}},[Q,B,a,r,Y.hours,Y.minutes,Y.seconds,G.hoursClockNumberText,G.minutesClockNumberText,G.secondsClockNumberText,se,le,ne,ue,Z]),we=y.useMemo(()=>{if(!o)return re;const Ee=re.filter(Me=>Me!=="meridiem");return Ee.reverse(),re.includes("meridiem")&&Ee.push("meridiem"),Ee},[o,re]),me=y.useMemo(()=>re.reduce((Ee,Me)=>N({},Ee,{[Me]:ge(Me)}),{}),[re,ge]),be=i,xe=kit(be);return $.jsx(Mit,N({ref:n,className:fe(xe.root,L),ownerState:be,role:"group"},H,{children:we.map(Ee=>$.jsx(Eit,{items:me[Ee].items,onChange:me[Ee].onChange,active:pe===Ee,autoFocus:l??ee===Ee,disabled:F,readOnly:z,slots:c,slotProps:u,skipDisabled:_,"aria-label":G.selectViewText(Ee)},Ee))}))});function $it(e){return Ne("MuiPickersDay",e)}const dp=Le("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),Rit=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],_it=e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,c=a&&!s;return Te({root:["root",t&&!c&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",a&&s&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},$it,l)},foe=({theme:e})=>N({},e.typography.caption,{width:Ox,height:Ox,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:vt(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${dp.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${dp.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${dp.disabled}:not(.${dp.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${dp.disabled}&.${dp.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${bk}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${dp.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),poe=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},Dit=oe(Hi,{name:"MuiPickersDay",slot:"Root",overridesResolver:poe})(foe),Nit=oe("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:poe})(({theme:e})=>N({},foe({theme:e}),{opacity:0,pointerEvents:"none"})),i0=()=>{},Lit=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,day:a,disabled:s=!1,disableHighlightToday:l=!1,disableMargin:c=!1,isAnimating:u,onClick:d,onDaySelect:f,onFocus:p=i0,onBlur:m=i0,onKeyDown:g=i0,onMouseDown:v=i0,onMouseEnter:w=i0,outsideCurrentMonth:x,selected:S=!1,showDaysOutsideCurrentMonth:P=!1,children:T,today:E=!1}=r,O=Ue(r,Rit),k=N({},r,{autoFocus:o,disabled:s,disableHighlightToday:l,disableMargin:c,selected:S,showDaysOutsideCurrentMonth:P,today:E}),A=_it(k),I=mn(),R=y.useRef(null),L=Wt(R,n);wn(()=>{o&&!s&&!u&&!x&&R.current.focus()},[o,s,u,x]);const F=_=>{v(_),x&&_.preventDefault()},z=_=>{s||f(a),x&&_.currentTarget.focus(),d&&d(_)};return x&&!P?$.jsx(Nit,{className:fe(A.root,A.hiddenDaySpacingFiller,i),ownerState:k,role:O.role}):$.jsx(Dit,N({className:fe(A.root,i),ref:L,centerRipple:!0,disabled:s,tabIndex:S?0:-1,onKeyDown:_=>g(_,a),onFocus:_=>p(_,a),onBlur:_=>m(_,a),onMouseEnter:_=>w(_,a),onClick:z,onMouseDown:F},O,{ownerState:k,children:T||I.format(a,"dayOfMonth")}))}),Fit=y.memo(Lit),Jv=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,c=r.utils.date(void 0,n),u=xi(r.utils,e.minDate,r.defaultDates.minDate),d=xi(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(o&&o(t)):return"shouldDisableDate";case!!(i&&i(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,c)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,c)):return"disablePast";case!!(u&&r.utils.isBeforeDay(t,u)):return"minDate";case!!(d&&r.utils.isAfterDay(t,d)):return"maxDate";default:return null}};Jv.valueManager=Qr;const NS=({adapter:e,value:t,timezone:n,props:r})=>{if(t===null)return null;const{minTime:o,maxTime:i,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:c,disableFuture:u}=r,d=e.utils.date(void 0,n),f=_S(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(o&&f(o,t)):return"minTime";case!!(i&&f(t,i)):return"maxTime";case!!(u&&e.utils.isAfter(t,d)):return"disableFuture";case!!(c&&e.utils.isBefore(t,d)):return"disablePast";case!!(s&&s(t,"hours")):return"shouldDisableTime-hours";case!!(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case!!(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case!!(a&&e.utils.getMinutes(t)%a!==0):return"minutesStep";default:return null}};NS.valueManager=Qr;const Pk=({adapter:e,value:t,timezone:n,props:r})=>{const o=Jv({adapter:e,value:t,timezone:n,props:r});return o!==null?o:NS({adapter:e,value:t,timezone:n,props:r})};Pk.valueManager=Qr;const QD=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],JD=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],hoe=["minDateTime","maxDateTime"],jit=[...QD,...JD,...hoe],Zv=e=>jit.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function moe(e){const{props:t,validator:n,value:r,timezone:o,onError:i}=e,a=Bh(),s=y.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:o,props:t}),c=n.valueManager.hasError(l);y.useEffect(()=>{i&&!n.valueManager.isSameError(l,s.current)&&i(l,r),s.current=l},[n,i,l,r]);const u=et(d=>n({adapter:a,value:d,timezone:o,props:t}));return{validationError:l,hasValidationError:c,getValidationErrorForNewValue:u}}const Bit=({utils:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return o},zit=({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n},Vit=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},Hit=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:a,startSeparator:s})=>{if(a==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=aoe(e,a),c=doe(e,l.contentType,l.type,a),u=n?c:l.contentType==="digit",d=t!=null&&e.isValid(t);let f=d?e.formatByString(t,a):"",p=null;if(u)if(c)p=f===""?e.formatByString(i,a).length:f.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);p=l.maxLength,d&&(f=sB(loe(Ch(f,o),p),o))}return N({},l,{format:a,maxLength:p,value:f,placeholder:Vit(e,r,l,a),hasLeadingZerosInFormat:c,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:"",modified:!1})},Uit=e=>{var p;const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort((m,g)=>g.length-m.length),l=/^([a-zA-Z]+)/,c=new RegExp(`^(${s.join("|")})*$`),u=new RegExp(`^(${s.join("|")})`),d=m=>r.find(g=>g.start<=m&&g.end>=m);let f=0;for(;f0;){const x=u.exec(w)[1];w=w.slice(x.length),i.push(Hit(N({},e,{now:o,token:x,startSeparator:a}))),a=""}f+=v.length}else{const w=n[f];g&&(m==null?void 0:m.start)===f||(m==null?void 0:m.end)===f||(i.length===0?a+=w:i[i.length-1].endSeparator+=w),f+=1}}return i.length===0&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i},Wit=({isRtl:e,formatDensity:t,sections:n})=>n.map(r=>{const o=i=>{let a=i;return e&&a!==null&&a.includes(" ")&&(a=`⁩${a}⁦`),t==="spacious"&&["/",".","-"].includes(a)&&(a=` ${a} `),a};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),F8=e=>{let t=Bit(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=zit(N({},e,{expandedFormat:t})),r=Uit(N({},e,{expandedFormat:t,escapedParts:n}));return Wit(N({},e,{sections:r}))},Git=e=>{const t=mn(),n=bo(),r=Bh(),o=er(),{valueManager:i,fieldValueManager:a,valueType:s,validator:l,internalProps:c,internalProps:{value:u,defaultValue:d,referenceDate:f,onChange:p,format:m,formatDensity:g="dense",selectedSections:v,onSelectedSectionsChange:w,shouldRespectLeadingZeros:x=!1,timezone:S,enableAccessibleFieldDOMStructure:P=!1}}=e,{timezone:T,value:E,handleValueChange:O}=aB({timezone:S,value:u,defaultValue:d,referenceDate:f,onChange:p,valueManager:i}),k=y.useMemo(()=>Got(t),[t]),A=y.useMemo(()=>Qot(t,k,T),[t,k,T]),I=y.useCallback((ie,re=null)=>a.getSectionsFromValue(t,ie,re,pe=>F8({utils:t,localeText:n,localizedDigits:k,format:m,date:pe,formatDensity:g,shouldRespectLeadingZeros:x,enableAccessibleFieldDOMStructure:P,isRtl:o})),[a,m,n,k,o,x,t,g,P]),[R,L]=y.useState(()=>{const ie=I(E),re={sections:ie,value:E,referenceValue:i.emptyValue,tempValueStrAndroid:null},pe=Vot(ie),le=i.getInitialReferenceValue({referenceDate:f,value:E,utils:t,props:c,granularity:pe,timezone:T});return N({},re,{referenceValue:le})}),[F,z]=vi({controlled:v,default:null,name:"useField",state:"selectedSections"}),_=ie=>{z(ie),w==null||w(ie)},D=y.useMemo(()=>XD(F,R.sections),[F,R.sections]),H=D==="all"?0:D,B=({value:ie,referenceValue:re,sections:pe})=>{if(L(ee=>N({},ee,{sections:pe,value:ie,referenceValue:re,tempValueStrAndroid:null})),i.areValuesEqual(t,R.value,ie))return;const le={validationError:l({adapter:r,value:ie,timezone:T,props:c})};O(ie,le)},V=(ie,re)=>{const pe=[...R.sections];return pe[ie]=N({},pe[ie],{value:re,modified:!0}),pe},W=()=>{B({value:i.emptyValue,referenceValue:R.referenceValue,sections:I(i.emptyValue)})},G=()=>{if(H==null)return;const ie=R.sections[H],re=a.getActiveDateManager(t,R,ie),le=re.getSections(R.sections).filter(Z=>Z.value!=="").length===(ie.value===""?0:1),ee=V(H,""),ce=le?null:t.getInvalidDate(),se=re.getNewValuesFromNewActiveDate(ce);B(N({},se,{sections:ee}))},Q=ie=>{const re=(ee,ce)=>{const se=t.parse(ee,m);if(se==null||!t.isValid(se))return null;const Z=F8({utils:t,localeText:n,localizedDigits:k,format:m,date:se,formatDensity:g,shouldRespectLeadingZeros:x,enableAccessibleFieldDOMStructure:P,isRtl:o});return D8(t,se,Z,ce,!1)},pe=a.parseValueStr(ie,R.referenceValue,re),le=a.updateReferenceValue(t,pe,R.referenceValue);B({value:pe,referenceValue:le,sections:I(pe,R.sections)})},Y=({activeSection:ie,newSectionValue:re,shouldGoToNextSection:pe})=>{pe&&HN({},ge,Z,{sections:ee,tempValueStrAndroid:null}))},ne=ie=>L(re=>N({},re,{tempValueStrAndroid:ie}));return y.useEffect(()=>{const ie=I(R.value);L(re=>N({},re,{sections:ie}))},[m,t.locale,o]),y.useEffect(()=>{let ie;i.areValuesEqual(t,R.value,E)?ie=i.getTimezone(t,R.value)!==i.getTimezone(t,E):ie=!0,ie&&L(re=>N({},re,{value:E,referenceValue:a.updateReferenceValue(t,E,re.referenceValue),sections:I(E)}))},[E]),{state:R,activeSectionIndex:H,parsedSelectedSections:D,setSelectedSections:_,clearValue:W,clearActiveSection:G,updateSectionValue:Y,updateValueFromValueStr:Q,setTempAndroidValueStr:ne,getSectionsFromValue:I,sectionsValueBoundaries:A,localizedDigits:k,timezone:T}},qit=5e3,Nm=e=>e.saveQuery!=null,Kit=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:i})=>{const a=mn(),[s,l]=y.useState(null),c=et(()=>l(null));y.useEffect(()=>{var m;s!=null&&((m=e[s.sectionIndex])==null?void 0:m.type)!==s.sectionType&&c()},[e,s,c]),y.useEffect(()=>{if(s!=null){const m=setTimeout(()=>c(),qit);return()=>{clearTimeout(m)}}return()=>{}},[s,c]);const u=({keyPressed:m,sectionIndex:g},v,w)=>{const x=m.toLowerCase(),S=e[g];if(s!=null&&(!w||w(s.value))&&s.sectionIndex===g){const T=`${s.value}${x}`,E=v(T,S);if(!Nm(E))return l({sectionIndex:g,value:T,sectionType:S.type}),E}const P=v(x,S);return Nm(P)&&!P.saveQuery?(c(),null):(l({sectionIndex:g,value:x,sectionType:S.type}),Nm(P)?null:P)},d=m=>{const g=(x,S,P)=>{const T=S.filter(E=>E.toLowerCase().startsWith(P));return T.length===0?{saveQuery:!1}:{sectionValue:T[0],shouldGoToNextSection:T.length===1}},v=(x,S,P,T)=>{const E=O=>soe(a,i,S.type,O);if(S.contentType==="letter")return g(S.format,E(S.format),x);if(P&&T!=null&&aoe(a,P).contentType==="letter"){const O=E(P),k=g(P,O,x);return Nm(k)?{saveQuery:!1}:N({},k,{sectionValue:T(k.sectionValue,O)})}return{saveQuery:!1}};return u(m,(x,S)=>{switch(S.type){case"month":{const P=T=>R8(a,T,a.formats.month,S.format);return v(x,S,a.formats.month,P)}case"weekDay":{const P=(T,E)=>E.indexOf(T).toString();return v(x,S,a.formats.weekday,P)}case"meridiem":return v(x,S);default:return{saveQuery:!1}}})},f=m=>{const g=(w,x)=>{const S=Ch(w,r),P=Number(S),T=n[x.type]({currentDate:null,format:x.format,contentType:x.contentType});if(P>T.maximum)return{saveQuery:!1};if(PT.maximum||S.length===T.maximum.toString().length;return{sectionValue:coe(a,P,T,r,x),shouldGoToNextSection:E}};return u(m,(w,x)=>{if(x.contentType==="digit"||x.contentType==="digit-with-letter")return g(w,x);if(x.type==="month"){const S=doe(a,"digit","month","MM"),P=g(w,{type:x.type,format:"MM",hasLeadingZerosInFormat:S,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Nm(P))return P;const T=R8(a,P.sectionValue,"MM",x.format);return N({},P,{sectionValue:T})}if(x.type==="weekDay"){const S=g(w,x);if(Nm(S))return S;const P=Ck(a,x.format)[Number(S.sectionValue)-1];return N({},S,{sectionValue:P})}return{saveQuery:!1}},w=>$8(w,r))};return{applyCharacterEditing:et(m=>{const g=e[m.sectionIndex],w=$8(m.keyPressed,r)?f(N({},m,{keyPressed:sB(m.keyPressed,r)})):d(m);if(w==null){o(null);return}t({activeSection:g,newSectionValue:w.sectionValue,shouldGoToNextSection:w.shouldGoToNextSection})}),resetCharacterQuery:c}},Yit=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:i,onFocus:a,onInput:s,onPaste:l,focused:c,autoFocus:u=!1},fieldValueManager:d,applyCharacterEditing:f,resetCharacterQuery:p,setSelectedSections:m,parsedSelectedSections:g,state:v,clearActiveSection:w,clearValue:x,updateSectionValue:S,updateValueFromValueStr:P,sectionOrder:T,areAllSectionsEmpty:E,sectionsValueBoundaries:O}=e,k=y.useRef(null),A=Wt(r,k),I=bo(),R=mn(),L=Ln(),[F,z]=y.useState(!1),_=y.useMemo(()=>({syncSelectionToDOM:()=>{if(!k.current)return;const ue=document.getSelection();if(!ue)return;if(g==null){ue.rangeCount>0&&k.current.getRoot().contains(ue.getRangeAt(0).startContainer)&&ue.removeAllRanges(),F&&k.current.getRoot().blur();return}if(!k.current.getRoot().contains(ia(document)))return;const ge=new window.Range;let we;g==="all"?we=k.current.getRoot():v.sections[g].type==="empty"?we=k.current.getSectionContainer(g):we=k.current.getSectionContent(g),ge.selectNodeContents(we),we.focus(),ue.removeAllRanges(),ue.addRange(ge)},getActiveSectionIndexFromDOM:()=>{const ue=ia(document);return!ue||!k.current||!k.current.getRoot().contains(ue)?null:k.current.getSectionIndexFromDOMElement(ue)},focusField:(ue=0)=>{if(!k.current)return;const ge=XD(ue,v.sections);z(!0),k.current.getSectionContent(ge).focus()},setSelectedSections:ue=>{if(!k.current)return;const ge=XD(ue,v.sections);z((ge==="all"?0:ge)!==null),m(ue)},isFieldFocused:()=>{const ue=ia(document);return!!k.current&&k.current.getRoot().contains(ue)}}),[g,m,v.sections,F]),D=et(ue=>{if(!k.current)return;const ge=v.sections[ue];k.current.getSectionContent(ue).innerHTML=ge.value||ge.placeholder,_.syncSelectionToDOM()}),H=et((ue,...ge)=>{ue.isDefaultPrevented()||!k.current||(z(!0),i==null||i(ue,...ge),g==="all"?setTimeout(()=>{const we=document.getSelection().getRangeAt(0).startOffset;if(we===0){m(T.startIndex);return}let me=0,be=0;for(;be{if(s==null||s(ue),!k.current||g!=="all")return;const we=ue.target.textContent??"";k.current.getRoot().innerHTML=v.sections.map(me=>`${me.startSeparator}${me.value||me.placeholder}${me.endSeparator}`).join(""),_.syncSelectionToDOM(),we.length===0||we.charCodeAt(0)===10?(p(),x(),m("all")):we.length>1?P(we):f({keyPressed:we,sectionIndex:0})}),V=et(ue=>{if(l==null||l(ue),n||g!=="all"){ue.preventDefault();return}const ge=ue.clipboardData.getData("text");ue.preventDefault(),p(),P(ge)}),W=et((...ue)=>{if(a==null||a(...ue),F||!k.current)return;z(!0),k.current.getSectionIndexFromDOMElement(ia(document))!=null||m(T.startIndex)}),G=et((...ue)=>{o==null||o(...ue),setTimeout(()=>{if(!k.current)return;const ge=ia(document);!k.current.getRoot().contains(ge)&&(z(!1),m(null))})}),Q=et(ue=>ge=>{ge.isDefaultPrevented()||m(ue)}),Y=et(ue=>{ue.preventDefault()}),ne=et(ue=>()=>{m(ue)}),ie=et(ue=>{if(ue.preventDefault(),n||t||typeof g!="number")return;const ge=v.sections[g],we=ue.clipboardData.getData("text"),me=/^[a-zA-Z]+$/.test(we),be=/^[0-9]+$/.test(we),xe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(we);ge.contentType==="letter"&&me||ge.contentType==="digit"&&be||ge.contentType==="digit-with-letter"&&xe?(p(),S({activeSection:ge,newSectionValue:we,shouldGoToNextSection:!0})):!me&&!be&&(p(),P(we))}),re=et(ue=>{ue.preventDefault(),ue.dataTransfer.dropEffect="none"}),pe=et(ue=>{if(!k.current)return;const ge=ue.target,we=ge.textContent??"",me=k.current.getSectionIndexFromDOMElement(ge),be=v.sections[me];if(n||!k.current){D(me);return}if(we.length===0){if(be.value===""){D(me);return}const xe=ue.nativeEvent.inputType;if(xe==="insertParagraph"||xe==="insertLineBreak"){D(me);return}p(),w();return}f({keyPressed:we,sectionIndex:me}),D(me)});wn(()=>{if(!(!F||!k.current)){if(g==="all")k.current.getRoot().focus();else if(typeof g=="number"){const ue=k.current.getSectionContent(g);ue&&ue.focus()}}},[g,F]);const le=y.useMemo(()=>v.sections.reduce((ue,ge)=>(ue[ge.type]=O[ge.type]({currentDate:null,contentType:ge.contentType,format:ge.format}),ue),{}),[O,v.sections]),ee=g==="all",ce=y.useMemo(()=>v.sections.map((ue,ge)=>{const we=!ee&&!t&&!n;return{container:{"data-sectionindex":ge,onClick:Q(ge)},content:{tabIndex:ee||ge>0?-1:0,contentEditable:!ee&&!t&&!n,role:"spinbutton",id:`${L}-${ue.type}`,"aria-labelledby":`${L}-${ue.type}`,"aria-readonly":n,"aria-valuenow":nit(ue,R),"aria-valuemin":le[ue.type].minimum,"aria-valuemax":le[ue.type].maximum,"aria-valuetext":ue.value?tit(ue,R):I.empty,"aria-label":I[ue.type],"aria-disabled":t,spellCheck:we?!1:void 0,autoCapitalize:we?"off":void 0,autoCorrect:we?"off":void 0,[parseInt(y.version,10)>=17?"enterKeyHint":"enterkeyhint"]:we?"next":void 0,children:ue.value||ue.placeholder,onInput:pe,onPaste:ie,onFocus:ne(ge),onDragOver:re,onMouseUp:Y,inputMode:ue.contentType==="letter"?"text":"numeric"},before:{children:ue.startSeparator},after:{children:ue.endSeparator}}}),[v.sections,ne,ie,re,pe,Q,Y,t,n,ee,I,R,le,L]),se=et(ue=>{P(ue.target.value)}),Z=y.useMemo(()=>E?"":d.getV7HiddenInputValueFromSections(v.sections),[E,v.sections,d]);return y.useEffect(()=>{if(k.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `` element instead of a `PickersSectionList`.","","If you want to keep using an `` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(` -`));u&&k.current&&k.current.getSectionContent(T.startIndex).focus()},[]),{interactions:_,returnedValue:{autoFocus:u,readOnly:n,focused:c??F,sectionListRef:A,onBlur:G,onClick:H,onFocus:W,onInput:B,onPaste:V,enableAccessibleFieldDOMStructure:!0,elements:ce,tabIndex:g===0?-1:0,contentEditable:ee,value:Z,onChange:se,areAllSectionsEmpty:E}}},Cg=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),Xit=(e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a{const t=er(),n=y.useRef(),r=y.useRef(),{forwardedProps:{onFocus:o,onClick:i,onPaste:a,onBlur:s,inputRef:l,placeholder:c},internalProps:{readOnly:u=!1,disabled:d=!1},parsedSelectedSections:f,activeSectionIndex:p,state:m,fieldValueManager:g,valueManager:v,applyCharacterEditing:w,resetCharacterQuery:x,updateSectionValue:S,updateValueFromValueStr:P,clearActiveSection:T,clearValue:E,setTempAndroidValueStr:O,setSelectedSections:k,getSectionsFromValue:A,areAllSectionsEmpty:I,localizedDigits:R}=e,L=y.useRef(null),F=Wt(l,L),z=y.useMemo(()=>Xit(m.sections,R,t),[m.sections,R,t]),_=y.useMemo(()=>({syncSelectionToDOM:()=>{if(!L.current)return;if(f==null){L.current.scrollLeft&&(L.current.scrollLeft=0);return}if(L.current!==ia(document))return;const pe=L.current.scrollTop;if(f==="all")L.current.select();else{const le=z[f],ee=le.type==="empty"?le.startInInput-le.startSeparator.length:le.startInInput,ce=le.type==="empty"?le.endInInput+le.endSeparator.length:le.endInInput;(ee!==L.current.selectionStart||ce!==L.current.selectionEnd)&&L.current===ia(document)&&L.current.setSelectionRange(ee,ce),clearTimeout(r.current),r.current=setTimeout(()=>{L.current&&L.current===ia(document)&&L.current.selectionStart===L.current.selectionEnd&&(L.current.selectionStart!==ee||L.current.selectionEnd!==ce)&&_.syncSelectionToDOM()})}L.current.scrollTop=pe},getActiveSectionIndexFromDOM:()=>{const pe=L.current.selectionStart??0,le=L.current.selectionEnd??0;if(pe===0&&le===0)return null;const ee=pe<=z[0].startInInput?1:z.findIndex(ce=>ce.startInInput-ce.startSeparator.length>pe);return ee===-1?z.length-1:ee-1},focusField:(pe=0)=>{var le;(le=L.current)==null||le.focus(),k(pe)},setSelectedSections:pe=>k(pe),isFieldFocused:()=>L.current===ia(document)}),[L,f,z,k]),D=()=>{const pe=L.current.selectionStart??0;let le;pe<=z[0].startInInput||pe>=z[z.length-1].endInInput?le=1:le=z.findIndex(ce=>ce.startInInput-ce.startSeparator.length>pe);const ee=le===-1?z.length-1:le-1;k(ee)},H=et((...pe)=>{o==null||o(...pe);const le=L.current;clearTimeout(n.current),n.current=setTimeout(()=>{!le||le!==L.current||p==null&&(le.value.length&&Number(le.selectionEnd)-Number(le.selectionStart)===le.value.length?k("all"):D())})}),B=et((pe,...le)=>{pe.isDefaultPrevented()||(i==null||i(pe,...le),D())}),V=et(pe=>{if(a==null||a(pe),pe.preventDefault(),u||d)return;const le=pe.clipboardData.getData("text");if(typeof f=="number"){const ee=m.sections[f],ce=/^[a-zA-Z]+$/.test(le),se=/^[0-9]+$/.test(le),Z=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(le);if(ee.contentType==="letter"&&ce||ee.contentType==="digit"&&se||ee.contentType==="digit-with-letter"&&Z){x(),S({activeSection:ee,newSectionValue:le,shouldGoToNextSection:!0});return}if(ce||se)return}x(),P(le)}),W=et((...pe)=>{s==null||s(...pe),k(null)}),G=et(pe=>{if(u)return;const le=pe.target.value;if(le===""){x(),E();return}const ee=pe.nativeEvent.data,ce=ee&&ee.length>1,se=ce?ee:le,Z=Cg(se);if(p==null||ce){P(ce?ee:Z);return}let ue;if(f==="all"&&Z.length===1)ue=Z;else{const ge=Cg(g.getV6InputValueFromSections(z,R,t));let we=-1,me=-1;for(let Me=0;Mebe.end)return;const Ee=Z.length-ge.length+be.end-Cg(be.endSeparator||"").length;ue=Z.slice(be.start+Cg(be.startSeparator||"").length,Ee)}if(ue.length===0){Zot()&&O(se),x(),T();return}w({keyPressed:ue,sectionIndex:p})}),Q=y.useMemo(()=>c!==void 0?c:g.getV6InputValueFromSections(A(v.emptyValue),R,t),[c,g,A,v.emptyValue,R,t]),Y=y.useMemo(()=>m.tempValueStrAndroid??g.getV6InputValueFromSections(m.sections,R,t),[m.sections,g,m.tempValueStrAndroid,R,t]);y.useEffect(()=>(L.current&&L.current===ia(document)&&k("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const ne=y.useMemo(()=>p==null||m.sections[p].contentType==="letter"?"text":"numeric",[p,m.sections]),re=!(L.current&&L.current===ia(document))&&I;return{interactions:_,returnedValue:{readOnly:u,onBlur:W,onClick:B,onFocus:H,onPaste:V,inputRef:F,enableAccessibleFieldDOMStructure:!1,placeholder:Q,inputMode:ne,autoComplete:"off",value:re?"":Y,onChange:G}}},fB=e=>{const t=mn(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:i=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:c,clearable:u,onClear:d},fieldValueManager:f,valueManager:p,validator:m}=e,g=er(),v=Git(e),{state:w,activeSectionIndex:x,parsedSelectedSections:S,setSelectedSections:P,clearValue:T,clearActiveSection:E,updateSectionValue:O,setTempAndroidValueStr:k,sectionsValueBoundaries:A,localizedDigits:I,timezone:R}=v,L=Kit({sections:w.sections,updateSectionValue:O,sectionsValueBoundaries:A,localizedDigits:I,setTempAndroidValueStr:k,timezone:R}),{resetCharacterQuery:F}=L,z=p.areValuesEqual(t,w.value,p.emptyValue),_=i?Yit:Qit,D=y.useMemo(()=>eit(w.sections,g&&!i),[w.sections,g,i]),{returnedValue:H,interactions:B}=_(N({},e,v,L,{areAllSectionsEmpty:z,sectionOrder:D})),V=et(ie=>{if(l==null||l(ie),!a)switch(!0){case((ie.ctrlKey||ie.metaKey)&&String.fromCharCode(ie.keyCode)==="A"&&!ie.shiftKey&&!ie.altKey):{ie.preventDefault(),P("all");break}case ie.key==="ArrowRight":{if(ie.preventDefault(),S==null)P(D.startIndex);else if(S==="all")P(D.endIndex);else{const re=D.neighbors[S].rightIndex;re!==null&&P(re)}break}case ie.key==="ArrowLeft":{if(ie.preventDefault(),S==null)P(D.endIndex);else if(S==="all")P(D.startIndex);else{const re=D.neighbors[S].leftIndex;re!==null&&P(re)}break}case ie.key==="Delete":{if(ie.preventDefault(),s)break;S==null||S==="all"?T():E(),F();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(ie.key):{if(ie.preventDefault(),s||x==null)break;const re=w.sections[x],pe=f.getActiveDateManager(t,w,re),le=qot(t,R,re,ie.key,A,I,pe.date,{minutesStep:o});O({activeSection:re,newSectionValue:le,shouldGoToNextSection:!1});break}}});wn(()=>{B.syncSelectionToDOM()});const{hasValidationError:W}=moe({props:n,validator:m,timezone:R,value:w.value,onError:n.onError}),G=y.useMemo(()=>c!==void 0?c:W,[W,c]);y.useEffect(()=>{!G&&x==null&&F()},[w.referenceValue,x,G]),y.useEffect(()=>{w.tempValueStrAndroid!=null&&x!=null&&(F(),E())},[w.sections]),y.useImperativeHandle(r,()=>({getSections:()=>w.sections,getActiveSectionIndex:B.getActiveSectionIndexFromDOM,setSelectedSections:B.setSelectedSections,focusField:B.focusField,isFieldFocused:B.isFieldFocused}));const Q=et((ie,...re)=>{ie.preventDefault(),d==null||d(ie,...re),T(),B.isFieldFocused()?P(D.startIndex):B.focusField(0)}),Y={onKeyDown:V,onClear:Q,error:G,clearable:!!(u&&!z&&!s&&!a)},ne={disabled:a,readOnly:s};return N({},e.forwardedProps,Y,ne,H)},Jit=["clearable","onClear","InputProps","sx","slots","slotProps"],Zit=["ownerState"],pB=e=>{const t=bo(),{clearable:n,onClear:r,InputProps:o,sx:i,slots:a,slotProps:s}=e,l=Ue(e,Jit),c=(a==null?void 0:a.clearButton)??kn,u=on({elementType:c,externalSlotProps:s==null?void 0:s.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),d=Ue(u,Zit),f=(a==null?void 0:a.clearIcon)??Jrt,p=on({elementType:f,externalSlotProps:s==null?void 0:s.clearIcon,ownerState:{}});return N({},l,{InputProps:N({},o,{endAdornment:$.jsxs(y.Fragment,{children:[n&&$.jsx(so,{position:"end",sx:{marginRight:o!=null&&o.endAdornment?-1:-1.5},children:$.jsx(c,N({},d,{onClick:r,children:$.jsx(f,N({fontSize:"small"},p))}))}),o==null?void 0:o.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(i)?i:[i]]})},eat=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],hB=(e,t)=>y.useMemo(()=>{const n=N({},e),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return eat.forEach(o),t==="date"?QD.forEach(o):t==="time"?JD.forEach(o):t==="date-time"&&(QD.forEach(o),JD.forEach(o),hoe.forEach(o)),{forwardedProps:n,internalProps:r}},[e,t]),tat=y.createContext(null);function goe(e){const{contextValue:t,localeText:n,children:r}=e;return $.jsx(tat.Provider,{value:t,children:$.jsx(RS,{localeText:n,children:r})})}const nat=e=>{const t=mn(),n=zh();return N({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:xi(t,e.minDate,n.minDate),maxDate:xi(t,e.maxDate,n.maxDate)})},rat=e=>{const t=mn(),r=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.fullTime12h:t.formats.fullTime24h;return N({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??r})},oat=e=>{const t=mn(),n=zh(),o=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h;return N({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??o,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime),minDate:xi(t,e.minDateTime??e.minDate,n.minDate),maxDate:xi(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime})},iat=e=>{const t=nat(e),{forwardedProps:n,internalProps:r}=hB(t,"date");return fB({forwardedProps:n,internalProps:r,valueManager:Qr,fieldValueManager:cB,validator:Jv,valueType:"date"})};function aat(e){return Ne("MuiPickersTextField",e)}Le("MuiPickersTextField",["root","focused","disabled","error","required"]);function sat(e){return Ne("MuiPickersInputBase",e)}const Gg=Le("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function lat(e){return Ne("MuiPickersSectionList",e)}const a0=Le("MuiPickersSectionList",["root","section","sectionContent"]),cat=["slots","slotProps","elements","sectionListRef"],yoe=oe("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),voe=oe("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),boe=oe("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),woe=oe("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),uat=e=>{const{classes:t}=e;return Te({root:["root"],section:["section"],sectionContent:["sectionContent"]},lat,t)};function dat(e){const{slots:t,slotProps:n,element:r,classes:o}=e,i=(t==null?void 0:t.section)??voe,a=on({elementType:i,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),s=(t==null?void 0:t.sectionContent)??woe,l=on({elementType:s,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),c=(t==null?void 0:t.sectionSeparator)??boe,u=on({elementType:c,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),d=on({elementType:c,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return $.jsxs(i,N({},a,{children:[$.jsx(c,N({},u)),$.jsx(s,N({},l)),$.jsx(c,N({},d))]}))}const fat=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:a,sectionListRef:s}=r,l=Ue(r,cat),c=uat(r),u=y.useRef(null),d=Wt(n,u),f=g=>{if(!u.current)throw new Error(`MUI X: Cannot call sectionListRef.${g} before the mount of the component.`);return u.current};y.useImperativeHandle(s,()=>({getRoot(){return f("getRoot")},getSectionContainer(g){return f("getSectionContainer").querySelector(`.${a0.section}[data-sectionindex="${g}"]`)},getSectionContent(g){return f("getSectionContent").querySelector(`.${a0.section}[data-sectionindex="${g}"] .${a0.sectionContent}`)},getSectionIndexFromDOMElement(g){const v=f("getSectionIndexFromDOMElement");if(g==null||!v.contains(g))return null;let w=null;return g.classList.contains(a0.section)?w=g:g.classList.contains(a0.sectionContent)&&(w=g.parentElement),w==null?null:Number(w.dataset.sectionindex)}}));const p=(o==null?void 0:o.root)??yoe,m=on({elementType:p,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:l,additionalProps:{ref:d,suppressContentEditableWarning:!0},className:c.root,ownerState:{}});return $.jsx(p,N({},m,{children:m.contentEditable?a.map(({content:g,before:v,after:w})=>`${v.children}${g.children}${w.children}`).join(""):$.jsx(y.Fragment,{children:a.map((g,v)=>$.jsx(dat,{slots:o,slotProps:i,element:g,classes:c},v))})}))}),pat=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],hat=e=>Math.round(e*1e5)/1e5,Tk=oe("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>N({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${hat(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),mB=oe(yoe,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:t,focused:n,filled:r,label:o})=>!t&&!n&&!r&&o==null,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),mat=oe(voe,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"flex"})),gat=oe(woe,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),yat=oe(boe,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),vat=oe("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(N({},Wbe)),bat=e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:i,readOnly:a,color:s,size:l,endAdornment:c,startAdornment:u}=e,d={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",i&&"fullWidth",`color${Se(s)}`,l==="small"&&"inputSizeSmall",!!u&&"adornedStart",!!c&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Te(d,sat,o)},gB=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:a,onChange:s,id:l,endAdornment:c,startAdornment:u,renderSuffix:d,slots:f,slotProps:p,contentEditable:m,tabIndex:g,onInput:v,onPaste:w,onKeyDown:x,name:S,readOnly:P,inputProps:T,inputRef:E,sectionListRef:O}=r,k=Ue(r,pat),A=y.useRef(null),I=Wt(n,A),R=Wt(T==null?void 0:T.ref,E),L=er(),F=wa();if(!F)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const z=W=>{var G;if(F.disabled){W.stopPropagation();return}(G=F.onFocus)==null||G.call(F,W)};y.useEffect(()=>{F&&F.setAdornedStart(!!u)},[F,u]),y.useEffect(()=>{F&&(i?F.onEmpty():F.onFilled())},[F,i]);const _=N({},r,F,{isRtl:L}),D=bat(_),H=(f==null?void 0:f.root)||Tk,B=on({elementType:H,externalSlotProps:p==null?void 0:p.root,externalForwardedProps:k,additionalProps:{"aria-invalid":F.error,ref:I},className:D.root,ownerState:_}),V=(f==null?void 0:f.input)||mB;return $.jsxs(H,N({},B,{children:[u,$.jsx(fat,{sectionListRef:O,elements:o,contentEditable:m,tabIndex:g,className:D.sectionsContainer,onFocus:z,onBlur:F.onBlur,onInput:v,onPaste:w,onKeyDown:x,slots:{root:V,section:mat,sectionContent:gat,sectionSeparator:yat},slotProps:{root:{ownerState:_},sectionContent:{className:Gg.sectionContent},sectionSeparator:({position:W})=>({className:W==="before"?Gg.sectionBefore:Gg.sectionAfter})}}),c,d?d(N({},F)):null,$.jsx(vat,N({name:S,className:D.input,value:a,onChange:s,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:P,required:F.required,disabled:F.disabled},T,{ref:R}))]}))});function wat(e){return Ne("MuiPickersOutlinedInput",e)}const Sl=N({},Gg,Le("MuiPickersOutlinedInput",["root","notchedOutline","input"])),xat=["children","className","label","notched","shrink"],Sat=oe("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),j8=oe("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),Cat=oe("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function Pat(e){const{className:t,label:n}=e,r=Ue(e,xat),o=n!=null&&n!=="",i=N({},e,{withLabel:o});return $.jsx(Sat,N({"aria-hidden":!0,className:t},r,{ownerState:i,children:$.jsx(Cat,{ownerState:i,children:o?$.jsx(j8,{children:n}):$.jsx(j8,{className:"notranslate",children:"​"})})}))}const Tat=["label","autoFocus","ownerState","notched"],Eat=oe(Tk,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Sl.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Sl.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Sl.focused} .${Sl.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Sl.disabled}`]:{[`& .${Sl.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${Sl.error} .${Sl.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>{var r;return((r=(e.vars??e).palette[n])==null?void 0:r.main)??!1}).map(n=>({props:{color:n},style:{[`&.${Sl.focused}:not(.${Sl.error}) .${Sl.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),Oat=oe(mB,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),Iat=e=>{const{classes:t}=e,r=Te({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},wat,t);return N({},t,r)},xoe=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:i,notched:a}=r,s=Ue(r,Tat),l=wa(),c=N({},r,i,l,{color:(l==null?void 0:l.color)||"primary"}),u=Iat(c);return $.jsx(gB,N({slots:{root:Eat,input:Oat},renderSuffix:d=>$.jsx(Pat,{shrink:!!(a||d.adornedStart||d.focused||d.filled),notched:!!(a||d.adornedStart||d.focused||d.filled),className:u.notchedOutline,label:o!=null&&o!==""&&(l!=null&&l.required)?$.jsxs(y.Fragment,{children:[o," ","*"]}):o,ownerState:c})},s,{label:o,classes:u,ref:n}))});xoe.muiName="Input";function kat(e){return Ne("MuiPickersFilledInput",e)}const fp=N({},Gg,Le("MuiPickersFilledInput",["root","underline","input"])),Mat=["label","autoFocus","disableUnderline","ownerState"],Aat=oe(Tk,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>dP(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${fp.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${fp.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>{var s;return{props:{color:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${fp.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${fp.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${fp.disabled}, .${fp.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${fp.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:a})=>!!a,style:{paddingLeft:12}},{props:({endAdornment:a})=>!!a,style:{paddingRight:12}}]}}),$at=oe(mB,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),Rat=e=>{const{classes:t,disableUnderline:n}=e,o=Te({root:["root",!n&&"underline"],input:["input"]},kat,t);return N({},t,o)},Soe=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=Ue(r,Mat),l=wa(),c=N({},r,a,l,{color:(l==null?void 0:l.color)||"primary"}),u=Rat(c);return $.jsx(gB,N({slots:{root:Aat,input:$at},slotProps:{root:{disableUnderline:i}}},s,{label:o,classes:u,ref:n}))});Soe.muiName="Input";function _at(e){return Ne("MuiPickersFilledInput",e)}const s0=N({},Gg,Le("MuiPickersInput",["root","input"])),Dat=["label","autoFocus","disableUnderline","ownerState"],Nat=oe(Tk,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{color:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${s0.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${s0.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${s0.disabled}, .${s0.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${s0.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),Lat=e=>{const{classes:t,disableUnderline:n}=e,o=Te({root:["root",!n&&"underline"],input:["input"]},_at,t);return N({},t,o)},Coe=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=Ue(r,Dat),l=wa(),c=N({},r,a,l,{disableUnderline:i,color:(l==null?void 0:l.color)||"primary"}),u=Lat(c);return $.jsx(gB,N({slots:{root:Nat}},s,{label:o,classes:u,ref:n}))});Coe.muiName="Input";const Fat=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],jat={standard:Coe,filled:Soe,outlined:xoe},Bat=oe(Tv,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),zat=e=>{const{focused:t,disabled:n,classes:r,required:o}=e;return Te({root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]},aat,r)},yB=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:a,color:s="primary",disabled:l=!1,error:c=!1,variant:u="outlined",required:d=!1,InputProps:f,inputProps:p,inputRef:m,sectionListRef:g,elements:v,areAllSectionsEmpty:w,onClick:x,onKeyDown:S,onKeyUp:P,onPaste:T,onInput:E,endAdornment:O,startAdornment:k,tabIndex:A,contentEditable:I,focused:R,value:L,onChange:F,fullWidth:z,id:_,name:D,helperText:H,FormHelperTextProps:B,label:V,InputLabelProps:W}=r,G=Ue(r,Fat),Q=y.useRef(null),Y=Wt(n,Q),ne=Ln(_),ie=H&&ne?`${ne}-helper-text`:void 0,re=V&&ne?`${ne}-label`:void 0,pe=N({},r,{color:s,disabled:l,error:c,focused:R,required:d,variant:u}),le=zat(pe),ee=jat[u];return $.jsxs(Bat,N({className:fe(le.root,a),ref:Y,focused:R,onFocus:o,onBlur:i,disabled:l,variant:u,error:c,color:s,fullWidth:z,required:d,ownerState:pe},G,{children:[$.jsx(Ev,N({htmlFor:ne,id:re},W,{children:V})),$.jsx(ee,N({elements:v,areAllSectionsEmpty:w,onClick:x,onKeyDown:S,onKeyUp:P,onInput:E,onPaste:T,endAdornment:O,startAdornment:k,tabIndex:A,contentEditable:I,value:L,onChange:F,id:ne,fullWidth:z,inputProps:p,inputRef:m,sectionListRef:g,label:V,name:D,role:"group","aria-labelledby":re},f)),H&&$.jsx(fS,N({id:ie},B,{children:H}))]}))}),Vat=["enableAccessibleFieldDOMStructure"],Hat=["InputProps","readOnly"],Uat=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],vB=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=Ue(e,Vat);if(t){const{InputProps:d,readOnly:f}=n,p=Ue(n,Hat);return N({},p,{InputProps:N({},d??{},{readOnly:f})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:c}=n,u=Ue(n,Uat);return N({},u,{InputProps:N({},s??{},{readOnly:a}),inputProps:N({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:c})})},Wat=["slots","slotProps","InputProps","inputProps"],Poe=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiDateField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=Ue(r,Wat),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?yB:hn),d=on({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:c});d.inputProps=N({},s,d.inputProps),d.InputProps=N({},a,d.InputProps);const f=iat(d),p=vB(f),m=pB(N({},p,{slots:o,slotProps:i}));return $.jsx(u,N({},m))}),Gat=e=>{const t=rat(e),{forwardedProps:n,internalProps:r}=hB(t,"time");return fB({forwardedProps:n,internalProps:r,valueManager:Qr,fieldValueManager:cB,validator:NS,valueType:"time"})},qat=["slots","slotProps","InputProps","inputProps"],Toe=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiTimeField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=Ue(r,qat),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?yB:hn),d=on({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,ownerState:c,additionalProps:{ref:n}});d.inputProps=N({},s,d.inputProps),d.InputProps=N({},a,d.InputProps);const f=Gat(d),p=vB(f),m=pB(N({},p,{slots:o,slotProps:i}));return $.jsx(u,N({},m))}),Kat=e=>{const t=oat(e),{forwardedProps:n,internalProps:r}=hB(t,"date-time");return fB({forwardedProps:n,internalProps:r,valueManager:Qr,fieldValueManager:cB,validator:Pk,valueType:"date-time"})},Yat=["slots","slotProps","InputProps","inputProps"],Eoe=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiDateTimeField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=Ue(r,Yat),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?yB:hn),d=on({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,ownerState:c,additionalProps:{ref:n}});d.inputProps=N({},s,d.inputProps),d.InputProps=N({},a,d.InputProps);const f=Kat(d),p=vB(f),m=pB(N({},p,{slots:o,slotProps:i}));return $.jsx(u,N({},m))}),Ooe=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:s})=>{const l=Bh();return y.useCallback(c=>Jv({adapter:l,value:c,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})!==null,[l,e,t,n,r,o,i,a,s])},Xat=(e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return N({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const i=o.newTimezone;if(n.getTimezone(r.currentMonth)===i)return r;let a=n.setTimezone(r.currentMonth,i);return n.getMonth(a)!==n.getMonth(r.currentMonth)&&(a=n.setMonth(a,n.getMonth(r.currentMonth))),N({},r,{currentMonth:a})}case"finishMonthSwitchingAnimation":return N({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=o.focusedDay!=null&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return N({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},Qat=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:i=!1,maxDate:a,minDate:s,onMonthChange:l,reduceAnimations:c,shouldDisableDate:u,timezone:d}=e,f=mn(),p=y.useRef(Xat(!!c,i,f)).current,m=y.useMemo(()=>Qr.getInitialReferenceValue({value:t,utils:f,timezone:d,props:e,referenceDate:n,granularity:Dl.day}),[n,d]),[g,v]=y.useReducer(p,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:f.startOfMonth(m),slideDirection:"left"});y.useEffect(()=>{v({type:"changeMonthTimezone",newTimezone:f.getTimezone(m)})},[m,f]);const w=y.useCallback(E=>{v(N({type:"changeMonth"},E)),l&&l(E.newMonth)},[l]),x=y.useCallback(E=>{const O=E;f.isSameMonth(O,g.currentMonth)||w({newMonth:f.startOfMonth(O),direction:f.isAfterDay(O,g.currentMonth)?"left":"right"})},[g.currentMonth,w,f]),S=Ooe({shouldDisableDate:u,minDate:s,maxDate:a,disableFuture:r,disablePast:o,timezone:d}),P=y.useCallback(()=>{v({type:"finishMonthSwitchingAnimation"})},[]),T=et((E,O)=>{S(E)||v({type:"changeFocusedDay",focusedDay:E,withoutMonthSwitchingAnimation:O})});return{referenceDate:m,calendarState:g,changeMonth:x,changeFocusedDay:T,isDateDisabled:S,onMonthSwitchingAnimationEnd:P,handleChangeMonth:w}},Jat=e=>Ne("MuiPickersFadeTransitionGroup",e);Le("MuiPickersFadeTransitionGroup",["root"]);const Zat=e=>{const{classes:t}=e;return Te({root:["root"]},Jat,t)},est=oe(cS,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function Ioe(e){const t=Jt({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=Zat(t),s=ko();return o?n:$.jsx(est,{className:fe(a.root,r),children:$.jsx(Cv,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},i)})}const tst=e=>Ne("MuiPickersSlideTransition",e),Ss=Le("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),nst=["children","className","reduceAnimations","slideDirection","transKey","classes"],rst=e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Te(r,tst,t)},ost=oe(cS,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Ss["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Ss["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Ss.slideEnterActive}`]:t.slideEnterActive},{[`.${Ss.slideExit}`]:t.slideExit},{[`.${Ss["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Ss["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Ss["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Ss["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Ss.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Ss.slideExit}`]:{transform:"translate(0%)"},[`& .${Ss["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Ss["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function ist(e){const t=Jt({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=Ue(t,nst),s=rst(t),l=ko();if(o)return $.jsx("div",{className:fe(s.root,r),children:n});const c={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return $.jsx(ost,{className:fe(s.root,r),childFactory:u=>y.cloneElement(u,{classNames:c}),role:"presentation",children:$.jsx(mF,N({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:c},a,{children:n}),i)})}const ast=e=>Ne("MuiDayCalendar",e);Le("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const sst=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],lst=["ownerState"],cst=e=>{const{classes:t}=e;return Te({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},ast,t)},koe=(Ox+bk*2)*6,ust=oe("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),dst=oe("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),fst=oe(dt,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),pst=oe(dt,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),hst=oe(dt,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>N({},e.typography.caption,{width:Ox,height:Ox,padding:0,margin:`0 ${bk}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),mst=oe("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:koe}),gst=oe(ist,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:koe}),yst=oe("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),vst=oe("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${bk}px 0`,display:"flex",justifyContent:"center"});function bst(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:s}=e,l=Ue(e,sst);const{disabled:c,disableHighlightToday:u,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:f,slots:p,slotProps:m,timezone:g}=t,v=mn(),w=Vh(g),x=r!==null&&v.isSameDay(n,r),S=o.some(L=>v.isSameDay(L,n)),P=v.isSameDay(n,w),T=(p==null?void 0:p.day)??Fit,E=on({elementType:T,externalSlotProps:m==null?void 0:m.day,additionalProps:N({disableHighlightToday:u,showDaysOutsideCurrentMonth:f,role:"gridcell",isAnimating:d,"data-timestamp":v.toJsDate(n).valueOf()},l),ownerState:N({},t,{day:n,selected:S})}),O=Ue(E,lst),k=y.useMemo(()=>c||i(n),[c,i,n]),A=y.useMemo(()=>v.getMonth(n)!==a,[v,n,a]),I=y.useMemo(()=>{const L=v.startOfMonth(v.setMonth(n,a));return f?v.isSameDay(n,v.startOfWeek(L)):v.isSameDay(n,L)},[a,n,f,v]),R=y.useMemo(()=>{const L=v.endOfMonth(v.setMonth(n,a));return f?v.isSameDay(n,v.endOfWeek(L)):v.isSameDay(n,L)},[a,n,f,v]);return $.jsx(T,N({},O,{day:n,disabled:k,autoFocus:s&&x,today:P,outsideCurrentMonth:A,isFirstVisibleCell:I,isLastVisibleCell:R,selected:S,tabIndex:x?0:-1,"aria-selected":S,"aria-current":P?"date":void 0}))}function wst(e){const t=Jt({props:e,name:"MuiDayCalendar"}),n=mn(),{onFocusedDayChange:r,className:o,currentMonth:i,selectedDays:a,focusedDay:s,loading:l,onSelectedDaysChange:c,onMonthSwitchingAnimationEnd:u,readOnly:d,reduceAnimations:f,renderLoading:p=()=>$.jsx("span",{children:"..."}),slideDirection:m,TransitionProps:g,disablePast:v,disableFuture:w,minDate:x,maxDate:S,shouldDisableDate:P,shouldDisableMonth:T,shouldDisableYear:E,dayOfWeekFormatter:O=me=>n.format(me,"weekdayShort").charAt(0).toUpperCase(),hasFocus:k,onFocusedViewChange:A,gridLabelId:I,displayWeekNumber:R,fixedWeekNumber:L,autoFocus:F,timezone:z}=t,_=Vh(z),D=cst(t),H=er(),B=Ooe({shouldDisableDate:P,shouldDisableMonth:T,shouldDisableYear:E,minDate:x,maxDate:S,disablePast:v,disableFuture:w,timezone:z}),V=bo(),[W,G]=vi({name:"DayCalendar",state:"hasFocus",controlled:k,default:F??!1}),[Q,Y]=y.useState(()=>s||_),ne=et(me=>{d||c(me)}),ie=me=>{B(me)||(r(me),Y(me),A==null||A(!0),G(!0))},re=et((me,be)=>{switch(me.key){case"ArrowUp":ie(n.addDays(be,-7)),me.preventDefault();break;case"ArrowDown":ie(n.addDays(be,7)),me.preventDefault();break;case"ArrowLeft":{const xe=n.addDays(be,H?1:-1),Ee=n.addMonths(be,H?1:-1),Me=lw({utils:n,date:xe,minDate:H?xe:n.startOfMonth(Ee),maxDate:H?n.endOfMonth(Ee):xe,isDateDisabled:B,timezone:z});ie(Me||xe),me.preventDefault();break}case"ArrowRight":{const xe=n.addDays(be,H?-1:1),Ee=n.addMonths(be,H?-1:1),Me=lw({utils:n,date:xe,minDate:H?n.startOfMonth(Ee):xe,maxDate:H?xe:n.endOfMonth(Ee),isDateDisabled:B,timezone:z});ie(Me||xe),me.preventDefault();break}case"Home":ie(n.startOfWeek(be)),me.preventDefault();break;case"End":ie(n.endOfWeek(be)),me.preventDefault();break;case"PageUp":ie(n.addMonths(be,1)),me.preventDefault();break;case"PageDown":ie(n.addMonths(be,-1)),me.preventDefault();break}}),pe=et((me,be)=>ie(be)),le=et((me,be)=>{W&&n.isSameDay(Q,be)&&(A==null||A(!1))}),ee=n.getMonth(i),ce=n.getYear(i),se=y.useMemo(()=>a.filter(me=>!!me).map(me=>n.startOfDay(me)),[n,a]),Z=`${ce}-${ee}`,ue=y.useMemo(()=>y.createRef(),[Z]),ge=y.useMemo(()=>{const me=n.startOfMonth(i),be=n.endOfMonth(i);return B(Q)||n.isAfterDay(Q,be)||n.isBeforeDay(Q,me)?lw({utils:n,date:Q,minDate:me,maxDate:be,disablePast:v,disableFuture:w,isDateDisabled:B,timezone:z}):Q},[i,w,v,Q,B,n,z]),we=y.useMemo(()=>{const me=n.getWeekArray(i);let be=n.addMonths(i,1);for(;L&&me.length{me.length$.jsx(fst,{variant:"caption",role:"columnheader","aria-label":n.format(me,"weekday"),className:D.weekDayLabel,children:O(me)},be.toString()))]}),l?$.jsx(mst,{className:D.loadingContainer,children:p()}):$.jsx(gst,N({transKey:Z,onExited:u,reduceAnimations:f,slideDirection:m,className:fe(o,D.slideTransition)},g,{nodeRef:ue,children:$.jsx(yst,{ref:ue,role:"rowgroup",className:D.monthContainer,children:we.map((me,be)=>$.jsxs(vst,{role:"row",className:D.weekContainer,"aria-rowindex":be+1,children:[R&&$.jsx(hst,{className:D.weekNumber,role:"rowheader","aria-label":V.calendarWeekNumberAriaLabelText(n.getWeekNumber(me[0])),children:V.calendarWeekNumberText(n.getWeekNumber(me[0]))}),me.map((xe,Ee)=>$.jsx(bst,{parentProps:t,day:xe,selectedDays:se,focusableDay:ge,onKeyDown:re,onFocus:pe,onBlur:le,onDaySelect:ne,isDateDisabled:B,currentMonthNumber:ee,isViewFocused:W,"aria-colindex":Ee+1},xe.toString()))]},`week-${me[0]}`))})}))]})}function xst(e){return Ne("MuiPickersMonth",e)}const BC=Le("MuiPickersMonth",["root","monthButton","disabled","selected"]),Sst=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],Cst=e=>{const{disabled:t,selected:n,classes:r}=e;return Te({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},xst,r)},Pst=oe("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),Tst=oe("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${BC.disabled}`]:t.disabled},{[`&.${BC.selected}`]:t.selected}]})(({theme:e})=>N({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${BC.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${BC.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Est=y.memo(function(t){const n=Jt({props:t,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:f,onBlur:p,"aria-current":m,"aria-label":g,slots:v,slotProps:w}=n,x=Ue(n,Sst),S=y.useRef(null),P=Cst(n);wn(()=>{var O;r&&((O=S.current)==null||O.focus())},[r]);const T=(v==null?void 0:v.monthButton)??Tst,E=on({elementType:T,externalSlotProps:w==null?void 0:w.monthButton,additionalProps:{children:i,disabled:a,tabIndex:c,ref:S,type:"button",role:"radio","aria-current":m,"aria-checked":s,"aria-label":g,onClick:O=>u(O,l),onKeyDown:O=>d(O,l),onFocus:O=>f(O,l),onBlur:O=>p(O,l)},ownerState:n,className:P.monthButton});return $.jsx(Pst,N({className:fe(P.root,o),ownerState:n},x,{children:$.jsx(T,N({},E))}))});function Ost(e){return Ne("MuiMonthCalendar",e)}Le("MuiMonthCalendar",["root"]);const Ist=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],kst=e=>{const{classes:t}=e;return Te({root:["root"]},Ost,t)};function Mst(e,t){const n=mn(),r=zh(),o=Jt({props:e,name:t});return N({disableFuture:!1,disablePast:!1},o,{minDate:xi(n,o.minDate,r.minDate),maxDate:xi(n,o.maxDate,r.maxDate)})}const Ast=oe("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:wk,boxSizing:"border-box"}),$st=y.forwardRef(function(t,n){const r=Mst(t,"MuiMonthCalendar"),{className:o,value:i,defaultValue:a,referenceDate:s,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:f,onChange:p,shouldDisableMonth:m,readOnly:g,autoFocus:v=!1,onMonthFocus:w,hasFocus:x,onFocusedViewChange:S,monthsPerRow:P=3,timezone:T,gridLabelId:E,slots:O,slotProps:k}=r,A=Ue(r,Ist),{value:I,handleValueChange:R,timezone:L}=Qv({name:"MonthCalendar",timezone:T,value:i,defaultValue:a,referenceDate:s,onChange:p,valueManager:Qr}),F=Vh(L),z=er(),_=mn(),D=y.useMemo(()=>Qr.getInitialReferenceValue({value:I,utils:_,props:r,timezone:L,referenceDate:s,granularity:Dl.month}),[]),H=r,B=kst(H),V=y.useMemo(()=>_.getMonth(F),[_,F]),W=y.useMemo(()=>I!=null?_.getMonth(I):null,[I,_]),[G,Q]=y.useState(()=>W||_.getMonth(D)),[Y,ne]=vi({name:"MonthCalendar",state:"hasFocus",controlled:x,default:v??!1}),ie=et(Z=>{ne(Z),S&&S(Z)}),re=y.useCallback(Z=>{const ue=_.startOfMonth(u&&_.isAfter(F,f)?F:f),ge=_.startOfMonth(c&&_.isBefore(F,d)?F:d),we=_.startOfMonth(Z);return _.isBefore(we,ue)||_.isAfter(we,ge)?!0:m?m(we):!1},[c,u,d,f,F,m,_]),pe=et((Z,ue)=>{if(g)return;const ge=_.setMonth(I??D,ue);R(ge)}),le=et(Z=>{re(_.setMonth(I??D,Z))||(Q(Z),ie(!0),w&&w(Z))});y.useEffect(()=>{Q(Z=>W!==null&&Z!==W?W:Z)},[W]);const ee=et((Z,ue)=>{switch(Z.key){case"ArrowUp":le((12+ue-3)%12),Z.preventDefault();break;case"ArrowDown":le((12+ue+3)%12),Z.preventDefault();break;case"ArrowLeft":le((12+ue+(z?1:-1))%12),Z.preventDefault();break;case"ArrowRight":le((12+ue+(z?-1:1))%12),Z.preventDefault();break}}),ce=et((Z,ue)=>{le(ue)}),se=et((Z,ue)=>{G===ue&&ie(!1)});return $.jsx(Ast,N({ref:n,className:fe(B.root,o),ownerState:H,role:"radiogroup","aria-labelledby":E},A,{children:oB(_,I??D).map(Z=>{const ue=_.getMonth(Z),ge=_.format(Z,"monthShort"),we=_.format(Z,"month"),me=ue===W,be=l||re(Z);return $.jsx(Est,{selected:me,value:ue,onClick:pe,onKeyDown:ee,autoFocus:Y&&ue===G,disabled:be,tabIndex:ue===G&&!be?0:-1,onFocus:ce,onBlur:se,"aria-current":V===ue?"date":void 0,"aria-label":we,monthsPerRow:P,slots:O,slotProps:k,children:ge},ge)})}))});function Rst(e){return Ne("MuiPickersYear",e)}const zC=Le("MuiPickersYear",["root","yearButton","selected","disabled"]),_st=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],Dst=e=>{const{disabled:t,selected:n,classes:r}=e;return Te({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},Rst,r)},Nst=oe("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),Lst=oe("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${zC.disabled}`]:t.disabled},{[`&.${zC.selected}`]:t.selected}]})(({theme:e})=>N({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:vt(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${zC.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${zC.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Fst=y.memo(function(t){const n=Jt({props:t,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:f,onBlur:p,"aria-current":m,slots:g,slotProps:v}=n,w=Ue(n,_st),x=y.useRef(null),S=Dst(n);wn(()=>{var E;r&&((E=x.current)==null||E.focus())},[r]);const P=(g==null?void 0:g.yearButton)??Lst,T=on({elementType:P,externalSlotProps:v==null?void 0:v.yearButton,additionalProps:{children:i,disabled:a,tabIndex:c,ref:x,type:"button",role:"radio","aria-current":m,"aria-checked":s,onClick:E=>u(E,l),onKeyDown:E=>d(E,l),onFocus:E=>f(E,l),onBlur:E=>p(E,l)},ownerState:n,className:S.yearButton});return $.jsx(Nst,N({className:fe(S.root,o),ownerState:n},w,{children:$.jsx(P,N({},T))}))});function jst(e){return Ne("MuiYearCalendar",e)}Le("MuiYearCalendar",["root"]);const Bst=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],zst=e=>{const{classes:t}=e;return Te({root:["root"]},jst,t)};function Vst(e,t){const n=mn(),r=zh(),o=Jt({props:e,name:t});return N({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:xi(n,o.minDate,r.minDate),maxDate:xi(n,o.maxDate,r.maxDate)})}const Hst=oe("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:wk,maxHeight:uot,boxSizing:"border-box",position:"relative"}),Ust=y.forwardRef(function(t,n){const r=Vst(t,"MuiYearCalendar"),{autoFocus:o,className:i,value:a,defaultValue:s,referenceDate:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:p,onChange:m,readOnly:g,shouldDisableYear:v,onYearFocus:w,hasFocus:x,onFocusedViewChange:S,yearsOrder:P="asc",yearsPerRow:T,timezone:E,gridLabelId:O,slots:k,slotProps:A}=r,I=Ue(r,Bst),{value:R,handleValueChange:L,timezone:F}=Qv({name:"YearCalendar",timezone:E,value:a,defaultValue:s,referenceDate:l,onChange:m,valueManager:Qr}),z=Vh(F),_=er(),D=mn(),H=y.useMemo(()=>Qr.getInitialReferenceValue({value:R,utils:D,props:r,timezone:F,referenceDate:l,granularity:Dl.year}),[]),B=r,V=zst(B),W=y.useMemo(()=>D.getYear(z),[D,z]),G=y.useMemo(()=>R!=null?D.getYear(R):null,[R,D]),[Q,Y]=y.useState(()=>G||D.getYear(H)),[ne,ie]=vi({name:"YearCalendar",state:"hasFocus",controlled:x,default:o??!1}),re=et(xe=>{ie(xe),S&&S(xe)}),pe=y.useCallback(xe=>{if(d&&D.isBeforeYear(xe,z)||u&&D.isAfterYear(xe,z)||p&&D.isBeforeYear(xe,p)||f&&D.isAfterYear(xe,f))return!0;if(!v)return!1;const Ee=D.startOfYear(xe);return v(Ee)},[u,d,f,p,z,v,D]),le=et((xe,Ee)=>{if(g)return;const Me=D.setYear(R??H,Ee);L(Me)}),ee=et(xe=>{pe(D.setYear(R??H,xe))||(Y(xe),re(!0),w==null||w(xe))});y.useEffect(()=>{Y(xe=>G!==null&&xe!==G?G:xe)},[G]);const ce=P!=="desc"?T*1:T*-1,se=_&&P==="asc"||!_&&P==="desc"?-1:1,Z=et((xe,Ee)=>{switch(xe.key){case"ArrowUp":ee(Ee-ce),xe.preventDefault();break;case"ArrowDown":ee(Ee+ce),xe.preventDefault();break;case"ArrowLeft":ee(Ee-se),xe.preventDefault();break;case"ArrowRight":ee(Ee+se),xe.preventDefault();break}}),ue=et((xe,Ee)=>{ee(Ee)}),ge=et((xe,Ee)=>{Q===Ee&&re(!1)}),we=y.useRef(null),me=Wt(n,we);y.useEffect(()=>{if(o||we.current===null)return;const xe=we.current.querySelector('[tabindex="0"]');if(!xe)return;const Ee=xe.offsetHeight,Me=xe.offsetTop,_e=we.current.clientHeight,de=we.current.scrollTop,Ae=Me+Ee;Ee>_e||Me{const Ee=D.getYear(xe),Me=Ee===G,_e=c||pe(xe);return $.jsx(Fst,{selected:Me,value:Ee,onClick:le,onKeyDown:Z,autoFocus:ne&&Ee===Q,disabled:_e,tabIndex:Ee===Q&&!_e?0:-1,onFocus:ue,onBlur:ge,"aria-current":W===Ee?"date":void 0,yearsPerRow:T,slots:k,slotProps:A,children:D.format(xe,"year")},D.format(xe,"year"))})}))}),Wst=e=>Ne("MuiPickersCalendarHeader",e),Gst=Le("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),qst=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],Kst=["ownerState"],Yst=e=>{const{classes:t}=e;return Te({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},Wst,t)},Xst=oe("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),Qst=oe("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>N({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),Jst=oe("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),Zst=oe(kn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${Gst.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),elt=oe(Grt,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),tlt=y.forwardRef(function(t,n){const r=bo(),o=mn(),i=Jt({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:s,currentMonth:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:p,onMonthChange:m,onViewChange:g,view:v,reduceAnimations:w,views:x,labelId:S,className:P,timezone:T,format:E=`${o.formats.month} ${o.formats.year}`}=i,O=Ue(i,qst),k=i,A=Yst(i),I=(a==null?void 0:a.switchViewButton)??Zst,R=on({elementType:I,externalSlotProps:s==null?void 0:s.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(v)},ownerState:k,className:A.switchViewButton}),L=(a==null?void 0:a.switchViewIcon)??elt,F=on({elementType:L,externalSlotProps:s==null?void 0:s.switchViewIcon,ownerState:k,className:A.switchViewIcon}),z=Ue(F,Kst),_=()=>m(o.addMonths(l,1),"left"),D=()=>m(o.addMonths(l,-1),"right"),H=lot(l,{disableFuture:u,maxDate:f,timezone:T}),B=cot(l,{disablePast:d,minDate:p,timezone:T}),V=()=>{if(!(x.length===1||!g||c))if(x.length===2)g(x.find(G=>G!==v)||x[0]);else{const G=x.indexOf(v)!==0?0:1;g(x[G])}};if(x.length===1&&x[0]==="year")return null;const W=o.formatByString(l,E);return $.jsxs(Xst,N({},O,{ownerState:k,className:fe(A.root,P),ref:n,children:[$.jsxs(Qst,{role:"presentation",onClick:V,ownerState:k,"aria-live":"polite",className:A.labelContainer,children:[$.jsx(Ioe,{reduceAnimations:w,transKey:W,children:$.jsx(Jst,{id:S,ownerState:k,className:A.label,children:W})}),x.length>1&&!c&&$.jsx(I,N({},R,{children:$.jsx(L,N({},z))}))]}),$.jsx(Cv,{in:v==="day",children:$.jsx(Zre,{slots:a,slotProps:s,onGoToPrevious:D,isPreviousDisabled:B,previousLabel:r.previousMonth,onGoToNext:_,isNextDisabled:H,nextLabel:r.nextMonth})})]}))}),nlt="@media (prefers-reduced-motion: reduce)",qg=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),B8=qg&&qg[1]?parseInt(qg[1],10):null,z8=qg&&qg[2]?parseInt(qg[2],10):null,rlt=B8&&B8<10||z8&&z8<13||!1,Moe=()=>bf(nlt,{defaultMatches:!1})||rlt,olt=e=>Ne("MuiDateCalendar",e);Le("MuiDateCalendar",["root","viewTransitionContainer"]);const ilt=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],alt=e=>{const{classes:t}=e;return Te({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},olt,t)};function slt(e,t){const n=mn(),r=zh(),o=Moe(),i=Jt({props:e,name:t});return N({},i,{loading:i.loading??!1,disablePast:i.disablePast??!1,disableFuture:i.disableFuture??!1,openTo:i.openTo??"day",views:i.views??["year","day"],reduceAnimations:i.reduceAnimations??o,renderLoading:i.renderLoading??(()=>$.jsx("span",{children:"..."})),minDate:xi(n,i.minDate,r.minDate),maxDate:xi(n,i.maxDate,r.maxDate)})}const llt=oe(Sk,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:xk}),clt=oe(Ioe,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),ult=y.forwardRef(function(t,n){const r=mn(),o=Ln(),i=slt(t,"MuiDateCalendar"),{autoFocus:a,onViewChange:s,value:l,defaultValue:c,referenceDate:u,disableFuture:d,disablePast:f,onChange:p,onYearChange:m,onMonthChange:g,reduceAnimations:v,shouldDisableDate:w,shouldDisableMonth:x,shouldDisableYear:S,view:P,views:T,openTo:E,className:O,disabled:k,readOnly:A,minDate:I,maxDate:R,disableHighlightToday:L,focusedView:F,onFocusedViewChange:z,showDaysOutsideCurrentMonth:_,fixedWeekNumber:D,dayOfWeekFormatter:H,slots:B,slotProps:V,loading:W,renderLoading:G,displayWeekNumber:Q,yearsOrder:Y,yearsPerRow:ne,monthsPerRow:ie,timezone:re}=i,pe=Ue(i,ilt),{value:le,handleValueChange:ee,timezone:ce}=Qv({name:"DateCalendar",timezone:re,value:l,defaultValue:c,referenceDate:u,onChange:p,valueManager:Qr}),{view:se,setView:Z,focusedView:ue,setFocusedView:ge,goToNextView:we,setValueAndGoToNextView:me}=DS({view:P,views:T,openTo:E,onChange:ee,onViewChange:s,autoFocus:a,focusedView:F,onFocusedViewChange:z}),{referenceDate:be,calendarState:xe,changeFocusedDay:Ee,changeMonth:Me,handleChangeMonth:_e,isDateDisabled:de,onMonthSwitchingAnimationEnd:Ae}=Qat({value:le,referenceDate:u,reduceAnimations:v,onMonthChange:g,minDate:I,maxDate:R,shouldDisableDate:w,disablePast:f,disableFuture:d,timezone:ce}),Oe=k&&le||I,$e=k&&le||R,Be=`${o}-grid-label`,Je=ue!==null,ot=(B==null?void 0:B.calendarHeader)??tlt,lt=on({elementType:ot,externalSlotProps:V==null?void 0:V.calendarHeader,additionalProps:{views:T,view:se,currentMonth:xe.currentMonth,onViewChange:Z,onMonthChange:(kt,yn)=>_e({newMonth:kt,direction:yn}),minDate:Oe,maxDate:$e,disabled:k,disablePast:f,disableFuture:d,reduceAnimations:v,timezone:ce,labelId:Be},ownerState:i}),it=et(kt=>{const yn=r.startOfMonth(kt),Fn=r.endOfMonth(kt),Vn=de(kt)?lw({utils:r,date:kt,minDate:r.isBefore(I,yn)?yn:I,maxDate:r.isAfter(R,Fn)?Fn:R,disablePast:f,disableFuture:d,isDateDisabled:de,timezone:ce}):kt;Vn?(me(Vn,"finish"),g==null||g(yn)):(we(),Me(yn)),Ee(Vn,!0)}),tt=et(kt=>{const yn=r.startOfYear(kt),Fn=r.endOfYear(kt),Vn=de(kt)?lw({utils:r,date:kt,minDate:r.isBefore(I,yn)?yn:I,maxDate:r.isAfter(R,Fn)?Fn:R,disablePast:f,disableFuture:d,isDateDisabled:de,timezone:ce}):kt;Vn?(me(Vn,"finish"),m==null||m(Vn)):(we(),Me(yn)),Ee(Vn,!0)}),pt=et(kt=>ee(kt&&jE(r,kt,le??be),"finish",se));y.useEffect(()=>{le!=null&&r.isValid(le)&&Me(le)},[le]);const qt=i,qe=alt(qt),Re={disablePast:f,disableFuture:d,maxDate:R,minDate:I},Ze={disableHighlightToday:L,readOnly:A,disabled:k,timezone:ce,gridLabelId:Be,slots:B,slotProps:V},Pt=y.useRef(se);y.useEffect(()=>{Pt.current!==se&&(ue===Pt.current&&ge(se,!0),Pt.current=se)},[ue,ge,se]);const _t=y.useMemo(()=>[le],[le]);return $.jsxs(llt,N({ref:n,className:fe(qe.root,O),ownerState:qt},pe,{children:[$.jsx(ot,N({},lt,{slots:B,slotProps:V})),$.jsx(clt,{reduceAnimations:v,className:qe.viewTransitionContainer,transKey:se,ownerState:qt,children:$.jsxs("div",{children:[se==="year"&&$.jsx(Ust,N({},Re,Ze,{value:le,onChange:tt,shouldDisableYear:S,hasFocus:Je,onFocusedViewChange:kt=>ge("year",kt),yearsOrder:Y,yearsPerRow:ne,referenceDate:be})),se==="month"&&$.jsx($st,N({},Re,Ze,{hasFocus:Je,className:O,value:le,onChange:it,shouldDisableMonth:x,onFocusedViewChange:kt=>ge("month",kt),monthsPerRow:ie,referenceDate:be})),se==="day"&&$.jsx(wst,N({},xe,Re,Ze,{onMonthSwitchingAnimationEnd:Ae,onFocusedDayChange:Ee,reduceAnimations:v,selectedDays:_t,onSelectedDaysChange:pt,shouldDisableDate:w,shouldDisableMonth:x,shouldDisableYear:S,hasFocus:Je,onFocusedViewChange:kt=>ge("day",kt),showDaysOutsideCurrentMonth:_,fixedWeekNumber:D,dayOfWeekFormatter:H,displayWeekNumber:Q,loading:W,renderLoading:G}))]})})]}))});function Aoe(e){return Ne("MuiPickersToolbar",e)}const dlt=Le("MuiPickersToolbar",["root","content"]),flt=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],plt=e=>{const{classes:t}=e;return Te({root:["root"],content:["content"]},Aoe,t)},hlt=oe("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),mlt=oe("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),bB=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:a,hidden:s,titleId:l}=r,c=Ue(r,flt),u=r,d=plt(u);return s?null:$.jsxs(hlt,N({ref:n,className:fe(d.root,i),ownerState:u},c,{children:[$.jsx(dt,{color:"text.secondary",variant:"overline",id:l,children:a}),$.jsx(mlt,{className:d.content,ownerState:u,children:o})]}))});function glt(e){return Ne("MuiDatePickerToolbar",e)}Le("MuiDatePickerToolbar",["root","title"]);const ylt=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],vlt=e=>{const{classes:t}=e;return Te({root:["root"],title:["title"]},glt,t)},blt=oe(bB,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),wlt=oe(dt,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),xlt=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:a,toolbarPlaceholder:s="––",views:l,className:c}=r,u=Ue(r,ylt),d=mn(),f=bo(),p=vlt(r),m=y.useMemo(()=>{if(!o)return s;const v=kx(d,{format:a,views:l},!0);return d.formatByString(o,v)},[o,a,s,d,l]),g=r;return $.jsx(blt,N({ref:n,toolbarTitle:f.datePickerToolbarTitle,isLandscape:i,className:fe(p.root,c)},u,{children:$.jsx(wlt,{variant:"h4",align:i?"left":"center",ownerState:g,className:p.title,children:m})}))});function $oe(e,t){const n=mn(),r=zh(),o=Jt({props:e,name:t}),i=y.useMemo(()=>{var a;return((a=o.localeText)==null?void 0:a.toolbarTitle)==null?o.localeText:N({},o.localeText,{datePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return N({},o,{localeText:i},rB({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:xi(n,o.minDate,r.minDate),maxDate:xi(n,o.maxDate,r.maxDate),slots:N({toolbar:xlt},o.slots)})}function Slt(e){return Ne("MuiPickersPopper",e)}Le("MuiPickersPopper",["root","paper"]);const Clt=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],Plt=e=>{const{classes:t}=e;return Te({root:["root"],paper:["paper"]},Slt,t)},Tlt=oe($f,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),Elt=oe(io,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:e})=>["top","top-start","top-end"].includes(e),style:{transformOrigin:"bottom center"}}]});function Olt(e,t){return t.documentElement.clientWidth{if(!e)return;function l(){i.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),i.current=!1}},[e]);const a=et(l=>{if(!i.current)return;const c=r.current;r.current=!1;const u=pr(o.current);if(!o.current||"clientX"in l&&Olt(l,u))return;if(n.current){n.current=!1;return}let d;l.composedPath?d=l.composedPath().indexOf(o.current)>-1:d=!u.documentElement.contains(l.target)||o.current.contains(l.target),!d&&!c&&t(l)}),s=()=>{r.current=!0};return y.useEffect(()=>{if(e){const l=pr(o.current),c=()=>{n.current=!0};return l.addEventListener("touchstart",a),l.addEventListener("touchmove",c),()=>{l.removeEventListener("touchstart",a),l.removeEventListener("touchmove",c)}}},[e,a]),y.useEffect(()=>{if(e){const l=pr(o.current);return l.addEventListener("click",a),()=>{l.removeEventListener("click",a),r.current=!1}}},[e,a]),[o,s,s]}const klt=y.forwardRef((e,t)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:i,paperSlotProps:a,paperClasses:s,onPaperClick:l,onPaperTouchStart:c}=e,u=Ue(e,Clt),d=N({},o,{placement:r}),f=on({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:s,ownerState:d});return $.jsx(n,N({},u,f,{onClick:p=>{var m;l(p),(m=f.onClick)==null||m.call(f,p)},onTouchStart:p=>{var m;c(p),(m=f.onTouchStart)==null||m.call(f,p)},ownerState:d,children:i}))});function Mlt(e){const t=Jt({props:e,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:i,onBlur:a,onDismiss:s,open:l,role:c,placement:u,slots:d,slotProps:f,reduceAnimations:p}=t;y.useEffect(()=>{function _(D){l&&D.key==="Escape"&&s()}return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[s,l]);const m=y.useRef(null);y.useEffect(()=>{c==="tooltip"||i&&!i()||(l?m.current=ia(document):m.current&&m.current instanceof HTMLElement&&setTimeout(()=>{m.current instanceof HTMLElement&&m.current.focus()}))},[l,c,i]);const[g,v,w]=Ilt(l,a??s),x=y.useRef(null),S=Wt(x,o),P=Wt(S,g),T=t,E=Plt(T),O=Moe(),k=p??O,A=_=>{_.key==="Escape"&&(_.stopPropagation(),s())},I=(d==null?void 0:d.desktopTransition)??k?Cv:gh,R=(d==null?void 0:d.desktopTrapFocus)??kF,L=(d==null?void 0:d.desktopPaper)??Elt,F=(d==null?void 0:d.popper)??Tlt,z=on({elementType:F,externalSlotProps:f==null?void 0:f.popper,additionalProps:{transition:!0,role:c,open:l,anchorEl:n,placement:u,onKeyDown:A},className:E.root,ownerState:t});return $.jsx(F,N({},z,{children:({TransitionProps:_,placement:D})=>$.jsx(R,N({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:c==="tooltip",isEnabled:()=>!0},f==null?void 0:f.desktopTrapFocus,{children:$.jsx(I,N({},_,f==null?void 0:f.desktopTransition,{children:$.jsx(klt,{PaperComponent:L,ownerState:T,popperPlacement:D,ref:P,onPaperClick:v,onPaperTouchStart:w,paperClasses:E.paper,paperSlotProps:f==null?void 0:f.desktopPaper,children:r})}))}))}))}const Alt=({open:e,onOpen:t,onClose:n})=>{const r=y.useRef(typeof e=="boolean").current,[o,i]=y.useState(!1);y.useEffect(()=>{if(r){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}},[r,e]);const a=y.useCallback(s=>{r||i(s),s&&t&&t(),!s&&n&&n()},[r,t,n]);return{isOpen:o,setIsOpen:a}},$lt=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,i=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?i&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?i?!0:n(r.lastPublishedValue):!1},Rlt=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=e,a=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&i?a?!0:n(r.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&n(r.lastCommittedValue):!1},_lt=e=>{const{action:t,closeOnSelect:n}=e;return t.name==="setValueFromAction"?!0:t.name==="setValueFromView"?t.selectionState==="finish"&&n:t.name==="setValueFromShortcut"?t.changeImportance==="accept":!1},Dlt=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:i,onChange:a,value:s,defaultValue:l,closeOnSelect:c=r==="desktop",timezone:u,referenceDate:d}=e,{current:f}=y.useRef(l),{current:p}=y.useRef(s!==void 0),[m,g]=y.useState(u),v=mn(),w=Bh(),{isOpen:x,setIsOpen:S}=Alt(e),{timezone:P,value:T,handleValueChange:E}=aB({timezone:u,value:s,defaultValue:f,referenceDate:d,onChange:a,valueManager:t}),[O,k]=y.useState(()=>{let ee;return T!==void 0?ee=T:f!==void 0?ee=f:ee=t.emptyValue,{draft:ee,lastPublishedValue:ee,lastCommittedValue:ee,lastControlledValue:s,hasBeenModifiedSinceMount:!1}}),A=t.getTimezone(v,O.draft);m!==u&&(g(u),u&&A&&u!==A&&k(ee=>N({},ee,{draft:t.setTimezone(v,u,ee.draft)})));const{getValidationErrorForNewValue:I}=moe({props:e,validator:o,timezone:P,value:O.draft,onError:e.onError}),R=et(ee=>{const ce={action:ee,dateState:O,hasChanged:me=>!t.areValuesEqual(v,ee.value,me),isControlled:p,closeOnSelect:c},se=$lt(ce),Z=Rlt(ce),ue=_lt(ce);k(me=>N({},me,{draft:ee.value,lastPublishedValue:se?ee.value:me.lastPublishedValue,lastCommittedValue:Z?ee.value:me.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let ge=null;const we=()=>(ge||(ge={validationError:ee.name==="setValueFromField"?ee.context.validationError:I(ee.value)},ee.name==="setValueFromShortcut"&&(ge.shortcut=ee.shortcut)),ge);se&&E(ee.value,we()),Z&&i&&i(ee.value,we()),ue&&S(!1)});if(O.lastControlledValue!==s){const ee=t.areValuesEqual(v,O.draft,T);k(ce=>N({},ce,{lastControlledValue:s},ee?{}:{lastCommittedValue:T,lastPublishedValue:T,draft:T,hasBeenModifiedSinceMount:!0}))}const L=et(()=>{R({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),F=et(()=>{R({value:O.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),z=et(()=>{R({value:O.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),_=et(()=>{R({value:O.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),D=et(()=>{R({value:t.getTodayValue(v,P,n),name:"setValueFromAction",pickerAction:"today"})}),H=et(ee=>{ee.preventDefault(),S(!0)}),B=et(ee=>{ee==null||ee.preventDefault(),S(!1)}),V=et((ee,ce="partial")=>R({name:"setValueFromView",value:ee,selectionState:ce})),W=et((ee,ce,se)=>R({name:"setValueFromShortcut",value:ee,changeImportance:ce,shortcut:se})),G=et((ee,ce)=>R({name:"setValueFromField",value:ee,context:ce})),Q={onClear:L,onAccept:F,onDismiss:z,onCancel:_,onSetToday:D,onOpen:H,onClose:B},Y={value:O.draft,onChange:G},ne=y.useMemo(()=>t.cleanValue(v,O.draft),[v,t,O.draft]),ie={value:ne,onChange:V,onClose:B,open:x},pe=N({},Q,{value:ne,onChange:V,onSelectShortcut:W,isValid:ee=>{const ce=o({adapter:w,value:ee,timezone:P,props:e});return!t.hasError(ce)}}),le=y.useMemo(()=>({onOpen:H,onClose:B,open:x}),[x,B,H]);return{open:x,fieldProps:Y,viewProps:ie,layoutProps:pe,actions:Q,contextValue:le}},Nlt=["className","sx"],Llt=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:i})=>{const{onChange:a,open:s,onClose:l}=t,{view:c,views:u,openTo:d,onViewChange:f,viewRenderers:p,timezone:m}=e,g=Ue(e,Nlt),{view:v,setView:w,defaultView:x,focusedView:S,setFocusedView:P,setValueAndGoToNextView:T}=DS({view:c,views:u,openTo:d,onChange:a,onViewChange:f,autoFocus:r}),{hasUIView:E,viewModeLookup:O}=y.useMemo(()=>u.reduce((z,_)=>{let D;return p[_]!=null?D="UI":D="field",z.viewModeLookup[_]=D,D==="UI"&&(z.hasUIView=!0),z},{hasUIView:!1,viewModeLookup:{}}),[p,u]),k=y.useMemo(()=>u.reduce((z,_)=>p[_]!=null&&ov(_)?z+1:z,0),[p,u]),A=O[v],I=et(()=>A==="UI"),[R,L]=y.useState(A==="UI"?v:null);return R!==v&&O[v]==="UI"&&L(v),wn(()=>{A==="field"&&s&&(l(),setTimeout(()=>{var z,_;(z=i==null?void 0:i.current)==null||z.setSelectedSections(v),(_=i==null?void 0:i.current)==null||_.focusField(v)}))},[v]),wn(()=>{if(!s)return;let z=v;A==="field"&&R!=null&&(z=R),z!==x&&O[z]==="UI"&&O[x]==="UI"&&(z=x),z!==v&&w(z),P(z,!0)},[s]),{hasUIView:E,shouldRestoreFocus:I,layoutProps:{views:u,view:R,onViewChange:w},renderCurrentView:()=>{if(R==null)return null;const z=p[R];if(z==null)return null;const _=N({},g,n,t,{views:u,timezone:m,onChange:T,view:R,onViewChange:w,focusedView:S,onFocusedViewChange:P,showViewSwitcher:k>1,timeViewsCount:k});return o?o(p,R,_):z(_)}}};function V8(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const Flt=(e,t)=>{const[n,r]=y.useState(V8);return wn(()=>{const i=()=>{r(V8())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),Jm(e,["hours","minutes","seconds"])?!1:(t||n)==="landscape"},jlt=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,i=Flt(n.views,o),a=er();return{layoutProps:N({},n,t,{isLandscape:i,isRtl:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}};function Blt(e){const{props:t,pickerValueResponse:n}=e;return y.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}const Roe=({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:i,autoFocusView:a,rendererInterceptor:s,fieldRef:l})=>{const c=Dlt({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i}),u=Llt({props:e,additionalViewProps:o,autoFocusView:a,fieldRef:l,propsFromPickerValue:c.viewProps,rendererInterceptor:s}),d=jlt({props:e,wrapperVariant:r,propsFromPickerValue:c.layoutProps,propsFromPickerViews:u.layoutProps}),f=Blt({props:e,pickerValueResponse:c});return{open:c.open,actions:c.actions,fieldProps:c.fieldProps,renderCurrentView:u.renderCurrentView,hasUIView:u.hasUIView,shouldRestoreFocus:u.shouldRestoreFocus,layoutProps:d.layoutProps,contextValue:c.contextValue,ownerState:f}};function _oe(e){return Ne("MuiPickersLayout",e)}const $l=Le("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),zlt=["onAccept","onClear","onCancel","onSetToday","actions"];function Vlt(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:i}=e,a=Ue(e,zlt),s=bo();if(i==null||i.length===0)return null;const l=i==null?void 0:i.map(c=>{switch(c){case"clear":return $.jsx(yt,{onClick:n,children:s.clearButtonLabel},c);case"cancel":return $.jsx(yt,{onClick:r,children:s.cancelButtonLabel},c);case"accept":return $.jsx(yt,{onClick:t,children:s.okButtonLabel},c);case"today":return $.jsx(yt,{onClick:o,children:s.todayButtonLabel},c);default:return null}});return $.jsx(AJ,N({},a,{children:l}))}const Hlt=["items","changeImportance","isLandscape","onChange","isValid"],Ult=["getValue"];function Wlt(e){const{items:t,changeImportance:n="accept",onChange:r,isValid:o}=e,i=Ue(e,Hlt);if(t==null||t.length===0)return null;const a=t.map(s=>{let{getValue:l}=s,c=Ue(s,Ult);const u=l({isValid:o});return N({},c,{label:c.label,onClick:()=>{r(u,n,c)},disabled:!o(u)})});return $.jsx(al,N({dense:!0,sx:[{maxHeight:xk,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:a.map(s=>$.jsx(es,{children:$.jsx(hh,N({},s))},s.id??s.label))}))}function Glt(e){return e.view!==null}const qlt=e=>{const{classes:t,isLandscape:n}=e;return Te({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},_oe,t)},Doe=e=>{const{wrapperVariant:t,onAccept:n,onClear:r,onCancel:o,onSetToday:i,view:a,views:s,onViewChange:l,value:c,onChange:u,onSelectShortcut:d,isValid:f,isLandscape:p,disabled:m,readOnly:g,children:v,slots:w,slotProps:x}=e,S=qlt(e),P=(w==null?void 0:w.actionBar)??Vlt,T=on({elementType:P,externalSlotProps:x==null?void 0:x.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:i,actions:t==="desktop"?[]:["cancel","accept"]},className:S.actionBar,ownerState:N({},e,{wrapperVariant:t})}),E=$.jsx(P,N({},T)),O=w==null?void 0:w.toolbar,k=on({elementType:O,externalSlotProps:x==null?void 0:x.toolbar,additionalProps:{isLandscape:p,onChange:u,value:c,view:a,onViewChange:l,views:s,disabled:m,readOnly:g},className:S.toolbar,ownerState:N({},e,{wrapperVariant:t})}),A=Glt(k)&&O?$.jsx(O,N({},k)):null,I=v,R=w==null?void 0:w.tabs,L=a&&R?$.jsx(R,N({view:a,onViewChange:l,className:S.tabs},x==null?void 0:x.tabs)):null,F=(w==null?void 0:w.shortcuts)??Wlt,z=on({elementType:F,externalSlotProps:x==null?void 0:x.shortcuts,additionalProps:{isValid:f,isLandscape:p,onChange:d},className:S.shortcuts,ownerState:{isValid:f,isLandscape:p,onChange:d,wrapperVariant:t}}),_=a&&F?$.jsx(F,N({},z)):null;return{toolbar:A,content:I,tabs:L,actionBar:E,shortcuts:_}},Klt=e=>{const{isLandscape:t,classes:n}=e;return Te({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},_oe,n)},Noe=oe("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${$l.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${$l.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${$l.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${$l.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${$l.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${$l.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${$l.shortcuts}`]:{gridColumn:3}}}]}),Loe=oe("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Foe=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:a,actionBar:s,shortcuts:l}=Doe(r),{sx:c,className:u,isLandscape:d,wrapperVariant:f}=r,p=Klt(r);return $.jsxs(Noe,{ref:n,sx:c,className:fe(p.root,u),ownerState:r,children:[d?l:o,d?o:l,$.jsx(Loe,{className:p.contentWrapper,children:f==="desktop"?$.jsxs(y.Fragment,{children:[i,a]}):$.jsxs(y.Fragment,{children:[a,i]})}),s]})}),Ylt=["props","getOpenDialogAriaText"],Xlt=["ownerState"],Qlt=["ownerState"],wB=e=>{var we;let{props:t,getOpenDialogAriaText:n}=e,r=Ue(e,Ylt);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,name:m,label:g,inputRef:v,readOnly:w,disabled:x,autoFocus:S,localeText:P,reduceAnimations:T}=t,E=y.useRef(null),O=y.useRef(null),k=Ln(),A=((we=i==null?void 0:i.toolbar)==null?void 0:we.hidden)??!1,{open:I,actions:R,hasUIView:L,layoutProps:F,renderCurrentView:z,shouldRestoreFocus:_,fieldProps:D,contextValue:H,ownerState:B}=Roe(N({},r,{props:t,fieldRef:O,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),V=o.inputAdornment??so,W=on({elementType:V,externalSlotProps:i==null?void 0:i.inputAdornment,additionalProps:{position:"end"},ownerState:t}),G=Ue(W,Xlt),Q=o.openPickerButton??kn,Y=on({elementType:Q,externalSlotProps:i==null?void 0:i.openPickerButton,additionalProps:{disabled:x||w,onClick:I?R.onClose:R.onOpen,"aria-label":n(D.value),edge:G.position},ownerState:t}),ne=Ue(Y,Qlt),ie=o.openPickerIcon,re=on({elementType:ie,externalSlotProps:i==null?void 0:i.openPickerIcon,ownerState:B}),pe=o.field,le=on({elementType:pe,externalSlotProps:i==null?void 0:i.field,additionalProps:N({},D,A&&{id:k},{readOnly:w,disabled:x,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,label:g,name:m,autoFocus:S&&!t.open,focused:I?!0:void 0},v?{inputRef:v}:{}),ownerState:t});L&&(le.InputProps=N({},le.InputProps,{ref:E},!t.disableOpenPicker&&{[`${G.position}Adornment`]:$.jsx(V,N({},G,{children:$.jsx(Q,N({},ne,{children:$.jsx(ie,N({},re))}))}))}));const ee=N({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},le.slots),ce=o.layout??Foe;let se=k;A&&(g?se=`${k}-label`:se=void 0);const Z=N({},i,{toolbar:N({},i==null?void 0:i.toolbar,{titleId:k}),popper:N({"aria-labelledby":se},i==null?void 0:i.popper)}),ue=Wt(O,le.unstableFieldRef);return{renderPicker:()=>$.jsxs(goe,{contextValue:H,localeText:P,children:[$.jsx(pe,N({},le,{slots:ee,slotProps:Z,unstableFieldRef:ue})),$.jsx(Mlt,N({role:"dialog",placement:"bottom-start",anchorEl:E.current},R,{open:I,slots:o,slotProps:Z,shouldRestoreFocus:_,reduceAnimations:T,children:$.jsx(ce,N({},F,Z==null?void 0:Z.layout,{slots:o,slotProps:Z,children:z()}))}))]})}},Xs=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:w,reduceAnimations:x,onMonthChange:S,monthsPerRow:P,onYearChange:T,yearsOrder:E,yearsPerRow:O,slots:k,slotProps:A,loading:I,renderLoading:R,disableHighlightToday:L,readOnly:F,disabled:z,showDaysOutsideCurrentMonth:_,dayOfWeekFormatter:D,sx:H,autoFocus:B,fixedWeekNumber:V,displayWeekNumber:W,timezone:G})=>$.jsx(ult,{view:e,onViewChange:t,views:n.filter(av),focusedView:r&&av(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:w,reduceAnimations:x,onMonthChange:S,monthsPerRow:P,onYearChange:T,yearsOrder:E,yearsPerRow:O,slots:k,slotProps:A,loading:I,renderLoading:R,disableHighlightToday:L,readOnly:F,disabled:z,showDaysOutsideCurrentMonth:_,dayOfWeekFormatter:D,sx:H,autoFocus:B,fixedWeekNumber:V,displayWeekNumber:W,timezone:G}),joe=y.forwardRef(function(t,n){var c,u;const r=bo(),o=mn(),i=$oe(t,"MuiDesktopDatePicker"),a=N({day:Xs,month:Xs,year:Xs},i.viewRenderers),s=N({},i,{viewRenderers:a,format:kx(o,i,!1),yearsPerRow:i.yearsPerRow??4,slots:N({openPickerIcon:Jre,field:Poe},i.slots),slotProps:N({},i.slotProps,{field:d=>{var f;return N({},Du((f=i.slotProps)==null?void 0:f.field,d),Zv(i),{ref:n})},toolbar:N({hidden:!0},(c=i.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=wB({props:s,valueManager:Qr,valueType:"date",getOpenDialogAriaText:Xv({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(u=s.localeText)==null?void 0:u.openDatePickerDialogue}),validator:Jv});return l()});joe.propTypes={autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,dayOfWeekFormatter:j.func,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableHighlightToday:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,displayWeekNumber:j.bool,enableAccessibleFieldDOMStructure:j.any,fixedWeekNumber:j.number,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:yv,label:j.node,loading:j.bool,localeText:j.object,maxDate:j.object,minDate:j.object,monthsPerRow:j.oneOf([3,4]),name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onMonthChange:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,onYearChange:j.func,open:j.bool,openTo:j.oneOf(["day","month","year"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,renderLoading:j.func,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableDate:j.func,shouldDisableMonth:j.func,shouldDisableYear:j.func,showDaysOutsideCurrentMonth:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),timezone:j.string,value:j.object,view:j.oneOf(["day","month","year"]),viewRenderers:j.shape({day:j.func,month:j.func,year:j.func}),views:j.arrayOf(j.oneOf(["day","month","year"]).isRequired),yearsOrder:j.oneOf(["asc","desc"]),yearsPerRow:j.oneOf([3,4])};const Jlt=oe(MJ)({[`& .${Q0.container}`]:{outline:0},[`& .${Q0.paper}`]:{outline:0,minWidth:wk}}),Zlt=oe($J)({"&:first-of-type":{padding:0}});function ect(e){const{children:t,onDismiss:n,open:r,slots:o,slotProps:i}=e,a=(o==null?void 0:o.dialog)??Jlt,s=(o==null?void 0:o.mobileTransition)??Cv;return $.jsx(a,N({open:r,onClose:n},i==null?void 0:i.dialog,{TransitionComponent:s,TransitionProps:i==null?void 0:i.mobileTransition,PaperComponent:o==null?void 0:o.mobilePaper,PaperProps:i==null?void 0:i.mobilePaper,children:$.jsx(Zlt,{children:t})}))}const tct=["props","getOpenDialogAriaText"],xB=e=>{var G;let{props:t,getOpenDialogAriaText:n}=e,r=Ue(e,tct);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,name:m,label:g,inputRef:v,readOnly:w,disabled:x,localeText:S}=t,P=y.useRef(null),T=Ln(),E=((G=i==null?void 0:i.toolbar)==null?void 0:G.hidden)??!1,{open:O,actions:k,layoutProps:A,renderCurrentView:I,fieldProps:R,contextValue:L}=Roe(N({},r,{props:t,fieldRef:P,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),F=o.field,z=on({elementType:F,externalSlotProps:i==null?void 0:i.field,additionalProps:N({},R,E&&{id:T},!(x||w)&&{onClick:k.onOpen,onKeyDown:fit(k.onOpen)},{readOnly:w??!0,disabled:x,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,label:g,name:m},v?{inputRef:v}:{}),ownerState:t});z.inputProps=N({},z.inputProps,{"aria-label":n(R.value)});const _=N({textField:o.textField},z.slots),D=o.layout??Foe;let H=T;E&&(g?H=`${T}-label`:H=void 0);const B=N({},i,{toolbar:N({},i==null?void 0:i.toolbar,{titleId:T}),mobilePaper:N({"aria-labelledby":H},i==null?void 0:i.mobilePaper)}),V=Wt(P,z.unstableFieldRef);return{renderPicker:()=>$.jsxs(goe,{contextValue:L,localeText:S,children:[$.jsx(F,N({},z,{slots:_,slotProps:B,unstableFieldRef:V})),$.jsx(ect,N({},k,{open:O,slots:o,slotProps:B,children:$.jsx(D,N({},A,B==null?void 0:B.layout,{slots:o,slotProps:B,children:I()}))}))]})}},Boe=y.forwardRef(function(t,n){var c,u;const r=bo(),o=mn(),i=$oe(t,"MuiMobileDatePicker"),a=N({day:Xs,month:Xs,year:Xs},i.viewRenderers),s=N({},i,{viewRenderers:a,format:kx(o,i,!1),slots:N({field:Poe},i.slots),slotProps:N({},i.slotProps,{field:d=>{var f;return N({},Du((f=i.slotProps)==null?void 0:f.field,d),Zv(i),{ref:n})},toolbar:N({hidden:!1},(c=i.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=xB({props:s,valueManager:Qr,valueType:"date",getOpenDialogAriaText:Xv({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(u=s.localeText)==null?void 0:u.openDatePickerDialogue}),validator:Jv});return l()});Boe.propTypes={autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,dayOfWeekFormatter:j.func,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableHighlightToday:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,displayWeekNumber:j.bool,enableAccessibleFieldDOMStructure:j.any,fixedWeekNumber:j.number,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:yv,label:j.node,loading:j.bool,localeText:j.object,maxDate:j.object,minDate:j.object,monthsPerRow:j.oneOf([3,4]),name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onMonthChange:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,onYearChange:j.func,open:j.bool,openTo:j.oneOf(["day","month","year"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,renderLoading:j.func,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableDate:j.func,shouldDisableMonth:j.func,shouldDisableYear:j.func,showDaysOutsideCurrentMonth:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),timezone:j.string,value:j.object,view:j.oneOf(["day","month","year"]),viewRenderers:j.shape({day:j.func,month:j.func,year:j.func}),views:j.arrayOf(j.oneOf(["day","month","year"]).isRequired),yearsOrder:j.oneOf(["asc","desc"]),yearsPerRow:j.oneOf([3,4])};const nct=["desktopModeMediaQuery"],zoe=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=dB}=r,i=Ue(r,nct);return bf(o,{defaultMatches:!0})?$.jsx(joe,N({ref:n},i)):$.jsx(Boe,N({ref:n},i))});function rct(e){return Ne("MuiPickersToolbarText",e)}const ZD=Le("MuiPickersToolbarText",["root","selected"]),oct=["className","selected","value"],ict=e=>{const{classes:t,selected:n}=e;return Te({root:["root",n&&"selected"]},rct,t)},act=oe(dt,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${ZD.selected}`]:t.selected}]})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${ZD.selected}`]:{color:(e.vars||e).palette.text.primary}})),SB=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersToolbarText"}),{className:o,value:i}=r,a=Ue(r,oct),s=ict(r);return $.jsx(act,N({ref:n,className:fe(s.root,o),component:"span"},a,{children:i}))}),sct=["align","className","selected","typographyClassName","value","variant","width"],lct=e=>{const{classes:t}=e;return Te({root:["root"]},Aoe,t)},cct=oe(yt,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),Na=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersToolbarButton"}),{align:o,className:i,selected:a,typographyClassName:s,value:l,variant:c,width:u}=r,d=Ue(r,sct),f=lct(r);return $.jsx(cct,N({variant:"text",ref:n,className:fe(f.root,i)},u?{sx:{width:u}}:{},d,{children:$.jsx(SB,{align:o,className:s,variant:c,value:l,selected:a})}))});function uct(e){return Ne("MuiTimePickerToolbar",e)}const cw=Le("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),dct=["ampm","ampmInClock","value","isLandscape","onChange","view","onViewChange","views","disabled","readOnly","className"],fct=e=>{const{isLandscape:t,classes:n,isRtl:r}=e;return Te({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",t&&"hourMinuteLabelLandscape",r&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",t&&"ampmLandscape"],ampmLabel:["ampmLabel"]},uct,n)},pct=oe(bB,{name:"MuiTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),hct=oe(SB,{name:"MuiTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),mct=oe("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${cw.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${cw.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{isLandscape:!0},style:{marginTop:"auto"}}]}),gct=oe("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${cw.ampmLabel}`]:t.ampmLabel},{[`&.${cw.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${cw.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function yct(e){const t=Jt({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,isLandscape:i,onChange:a,view:s,onViewChange:l,views:c,disabled:u,readOnly:d,className:f}=t,p=Ue(t,dct),m=mn(),g=bo(),v=er(),w=!!(n&&!r&&c.includes("hours")),{meridiemMode:x,handleMeridiemChange:S}=vk(o,n,a),P=k=>n?m.format(k,"hours12h"):m.format(k,"hours24h"),T=N({},t,{isRtl:v}),E=fct(T),O=$.jsx(hct,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:E.separator});return $.jsxs(pct,N({landscapeDirection:"row",toolbarTitle:g.timePickerToolbarTitle,isLandscape:i,ownerState:T,className:fe(E.root,f)},p,{children:[$.jsxs(mct,{className:E.hourMinuteLabel,ownerState:T,children:[Jm(c,"hours")&&$.jsx(Na,{tabIndex:-1,variant:"h3",onClick:()=>l("hours"),selected:s==="hours",value:o?P(o):"--"}),Jm(c,["hours","minutes"])&&O,Jm(c,"minutes")&&$.jsx(Na,{tabIndex:-1,variant:"h3",onClick:()=>l("minutes"),selected:s==="minutes",value:o?m.format(o,"minutes"):"--"}),Jm(c,["minutes","seconds"])&&O,Jm(c,"seconds")&&$.jsx(Na,{variant:"h3",onClick:()=>l("seconds"),selected:s==="seconds",value:o?m.format(o,"seconds"):"--"})]}),w&&$.jsxs(gct,{className:E.ampmSelection,ownerState:T,children:[$.jsx(Na,{disableRipple:!0,variant:"subtitle2",selected:x==="am",typographyClassName:E.ampmLabel,value:Fl(m,"am"),onClick:d?void 0:()=>S("am"),disabled:u}),$.jsx(Na,{disableRipple:!0,variant:"subtitle2",selected:x==="pm",typographyClassName:E.ampmLabel,value:Fl(m,"pm"),onClick:d?void 0:()=>S("pm"),disabled:u})]})]}))}function Voe(e,t){var a;const n=mn(),r=Jt({props:e,name:t}),o=r.ampm??n.is12HourCycleInCurrentLocale(),i=y.useMemo(()=>{var s;return((s=r.localeText)==null?void 0:s.toolbarTitle)==null?r.localeText:N({},r.localeText,{timePickerToolbarTitle:r.localeText.toolbarTitle})},[r.localeText]);return N({},r,{ampm:o,localeText:i},rB({views:r.views,openTo:r.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{disableFuture:r.disableFuture??!1,disablePast:r.disablePast??!1,slots:N({toolbar:yct},r.slots),slotProps:N({},r.slotProps,{toolbar:N({ampm:o,ampmInClock:r.ampmInClock},(a=r.slotProps)==null?void 0:a.toolbar)})})}const Kg=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,ampmInClock:x,slots:S,slotProps:P,readOnly:T,disabled:E,sx:O,autoFocus:k,showViewSwitcher:A,disableIgnoringDatePartForTimeValidation:I,timezone:R})=>$.jsx(cit,{view:e,onViewChange:t,focusedView:n&&ov(n)?n:null,onFocusedViewChange:r,views:o.filter(ov),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,ampmInClock:x,slots:S,slotProps:P,readOnly:T,disabled:E,sx:O,autoFocus:k,showViewSwitcher:A,disableIgnoringDatePartForTimeValidation:I,timezone:R}),Hoe=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,slots:x,slotProps:S,readOnly:P,disabled:T,sx:E,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeSteps:A,skipDisabled:I,timezone:R})=>$.jsx(vit,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(ov),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,slots:x,slotProps:S,readOnly:P,disabled:T,sx:E,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeStep:A==null?void 0:A.minutes,skipDisabled:I,timezone:R}),zE=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,slots:x,slotProps:S,readOnly:P,disabled:T,sx:E,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeSteps:A,skipDisabled:I,timezone:R})=>$.jsx(Ait,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(ov),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,slots:x,slotProps:S,readOnly:P,disabled:T,sx:E,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeSteps:A,skipDisabled:I,timezone:R}),vct=["views","format"],Uoe=(e,t,n)=>{let{views:r,format:o}=t,i=Ue(t,vct);if(o)return o;const a=[],s=[];if(r.forEach(u=>{ov(u)?s.push(u):av(u)&&a.push(u)}),s.length===0)return kx(e,N({views:a},i),!1);if(a.length===0)return FE(e,N({views:s},i));const l=FE(e,N({views:s},i));return`${kx(e,N({views:a},i),!1)} ${l}`},bct=(e,t,n)=>n?t.filter(r=>!I0(r)||r==="hours"):e?[...t,"meridiem"]:t,wct=(e,t)=>24*60/((e.hours??1)*(e.minutes??5))<=t;function Woe({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){const o=e??24,i=N({hours:1,minutes:5,seconds:5},n),a=wct(i,o);return{thresholdToRenderTimeInASingleColumn:o,timeSteps:i,shouldRenderTimeInASingleColumn:a,views:bct(t,r,a)}}const Goe=y.forwardRef(function(t,n){var w,x,S,P;const r=bo(),o=mn(),i=Voe(t,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:a,views:s,timeSteps:l}=Woe(i),c=a?Hoe:zE,u=N({hours:c,minutes:c,seconds:c,meridiem:c},i.viewRenderers),d=i.ampmInClock??!0,f=a?[]:["accept"],m=((w=u.hours)==null?void 0:w.name)===zE.name?s:s.filter(T=>T!=="meridiem"),g=N({},i,{ampmInClock:d,timeSteps:l,viewRenderers:u,format:FE(o,i),views:a?["hours"]:m,slots:N({field:Toe,openPickerIcon:Yrt},i.slots),slotProps:N({},i.slotProps,{field:T=>{var E;return N({},Du((E=i.slotProps)==null?void 0:E.field,T),Zv(i),{ref:n})},toolbar:N({hidden:!0,ampmInClock:d},(x=i.slotProps)==null?void 0:x.toolbar),actionBar:N({actions:f},(S=i.slotProps)==null?void 0:S.actionBar)})}),{renderPicker:v}=wB({props:g,valueManager:Qr,valueType:"time",getOpenDialogAriaText:Xv({utils:o,formatKey:"fullTime",contextTranslation:r.openTimePickerDialogue,propsTranslation:(P=g.localeText)==null?void 0:P.openTimePickerDialogue}),validator:NS});return v()});Goe.propTypes={ampm:j.bool,ampmInClock:j.bool,autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableIgnoringDatePartForTimeValidation:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,enableAccessibleFieldDOMStructure:j.any,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:yv,label:j.node,localeText:j.object,maxTime:j.object,minTime:j.object,minutesStep:j.number,name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,open:j.bool,openTo:j.oneOf(["hours","meridiem","minutes","seconds"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableTime:j.func,skipDisabled:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),thresholdToRenderTimeInASingleColumn:j.number,timeSteps:j.shape({hours:j.number,minutes:j.number,seconds:j.number}),timezone:j.string,value:j.object,view:j.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:j.shape({hours:j.func,meridiem:j.func,minutes:j.func,seconds:j.func}),views:j.arrayOf(j.oneOf(["hours","minutes","seconds"]).isRequired)};const qoe=y.forwardRef(function(t,n){var u,d;const r=bo(),o=mn(),i=Voe(t,"MuiMobileTimePicker"),a=N({hours:Kg,minutes:Kg,seconds:Kg},i.viewRenderers),s=i.ampmInClock??!1,l=N({},i,{ampmInClock:s,viewRenderers:a,format:FE(o,i),slots:N({field:Toe},i.slots),slotProps:N({},i.slotProps,{field:f=>{var p;return N({},Du((p=i.slotProps)==null?void 0:p.field,f),Zv(i),{ref:n})},toolbar:N({hidden:!1,ampmInClock:s},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:c}=xB({props:l,valueManager:Qr,valueType:"time",getOpenDialogAriaText:Xv({utils:o,formatKey:"fullTime",contextTranslation:r.openTimePickerDialogue,propsTranslation:(d=l.localeText)==null?void 0:d.openTimePickerDialogue}),validator:NS});return c()});qoe.propTypes={ampm:j.bool,ampmInClock:j.bool,autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableIgnoringDatePartForTimeValidation:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,enableAccessibleFieldDOMStructure:j.any,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:yv,label:j.node,localeText:j.object,maxTime:j.object,minTime:j.object,minutesStep:j.number,name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,open:j.bool,openTo:j.oneOf(["hours","minutes","seconds"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableTime:j.func,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),timezone:j.string,value:j.object,view:j.oneOf(["hours","minutes","seconds"]),viewRenderers:j.shape({hours:j.func,minutes:j.func,seconds:j.func}),views:j.arrayOf(j.oneOf(["hours","minutes","seconds"]).isRequired)};const xct=["desktopModeMediaQuery"],Sct=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiTimePicker"}),{desktopModeMediaQuery:o=dB}=r,i=Ue(r,xct);return bf(o,{defaultMatches:!0})?$.jsx(Goe,N({ref:n},i)):$.jsx(qoe,N({ref:n},i))});function Cct(e){return Ne("MuiDateTimePickerTabs",e)}Le("MuiDateTimePickerTabs",["root"]);const Pct=e=>av(e)?"date":"time",Tct=e=>e==="date"?"day":"hours",Ect=e=>{const{classes:t}=e;return Te({root:["root"]},Cct,t)},Oct=oe(m$e,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${EP.indicator}`]:{bottom:"auto",top:0}}})),Ict=function(t){const n=Jt({props:t,name:"MuiDateTimePickerTabs"}),{dateIcon:r=$.jsx(Xrt,{}),onViewChange:o,timeIcon:i=$.jsx(Qrt,{}),view:a,hidden:s=typeof window>"u"||window.innerHeight<667,className:l,sx:c}=n,u=bo(),d=Ect(n),f=(p,m)=>{o(Tct(m))};return s?null:$.jsxs(Oct,{ownerState:n,variant:"fullWidth",value:Pct(a),onChange:f,className:fe(l,d.root),sx:c,children:[$.jsx(Y3,{value:"date","aria-label":u.dateTableLabel,icon:$.jsx(y.Fragment,{children:r})}),$.jsx(Y3,{value:"time","aria-label":u.timeTableLabel,icon:$.jsx(y.Fragment,{children:i})})]})};function kct(e){return Ne("MuiDateTimePickerToolbar",e)}const V$=Le("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),Mct=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],Act=e=>{const{classes:t,isLandscape:n,isRtl:r}=e;return Te({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},kct,t)},$ct=oe(bB,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${dlt.content} .${ZD.selected}`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",isLandscape:!0},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{paddingLeft:24,paddingRight:0}}]})),Rct=oe("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),_ct=oe("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex",flexDirection:"row",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({isLandscape:e,toolbarVariant:t})=>e&&t!=="desktop",style:{flexDirection:"column"}},{props:({isLandscape:e,toolbarVariant:t,isRtl:n})=>e&&t!=="desktop"&&n,style:{flexDirection:"column-reverse"}}]}),Dct=oe("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(e,t)=>t.timeDigitsContainer})({display:"flex",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),H8=oe(SB,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),Nct=oe("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${V$.ampmLabel}`]:t.ampmLabel},{[`&.${V$.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${V$.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function Lct(e){const t=Jt({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,onChange:i,view:a,isLandscape:s,onViewChange:l,toolbarFormat:c,toolbarPlaceholder:u="––",views:d,disabled:f,readOnly:p,toolbarVariant:m="mobile",toolbarTitle:g,className:v}=t,w=Ue(t,Mct),x=er(),S=N({},t,{isRtl:x}),P=mn(),{meridiemMode:T,handleMeridiemChange:E}=vk(o,n,i),O=!!(n&&!r),k=m==="desktop",A=bo(),I=Act(S),R=g??A.dateTimePickerToolbarTitle,L=z=>n?P.format(z,"hours12h"):P.format(z,"hours24h"),F=y.useMemo(()=>o?c?P.formatByString(o,c):P.format(o,"shortDate"):u,[o,c,u,P]);return $.jsxs($ct,N({isLandscape:s,className:fe(I.root,v),toolbarTitle:R},w,{ownerState:S,children:[$.jsxs(Rct,{className:I.dateContainer,ownerState:S,children:[d.includes("year")&&$.jsx(Na,{tabIndex:-1,variant:"subtitle1",onClick:()=>l("year"),selected:a==="year",value:o?P.format(o,"year"):"–"}),d.includes("day")&&$.jsx(Na,{tabIndex:-1,variant:k?"h5":"h4",onClick:()=>l("day"),selected:a==="day",value:F})]}),$.jsxs(_ct,{className:I.timeContainer,ownerState:S,children:[$.jsxs(Dct,{className:I.timeDigitsContainer,ownerState:S,children:[d.includes("hours")&&$.jsxs(y.Fragment,{children:[$.jsx(Na,{variant:k?"h5":"h3",width:k&&!s?k0:void 0,onClick:()=>l("hours"),selected:a==="hours",value:o?L(o):"--"}),$.jsx(H8,{variant:k?"h5":"h3",value:":",className:I.separator,ownerState:S}),$.jsx(Na,{variant:k?"h5":"h3",width:k&&!s?k0:void 0,onClick:()=>l("minutes"),selected:a==="minutes"||!d.includes("minutes")&&a==="hours",value:o?P.format(o,"minutes"):"--",disabled:!d.includes("minutes")})]}),d.includes("seconds")&&$.jsxs(y.Fragment,{children:[$.jsx(H8,{variant:k?"h5":"h3",value:":",className:I.separator,ownerState:S}),$.jsx(Na,{variant:k?"h5":"h3",width:k&&!s?k0:void 0,onClick:()=>l("seconds"),selected:a==="seconds",value:o?P.format(o,"seconds"):"--"})]})]}),O&&!k&&$.jsxs(Nct,{className:I.ampmSelection,ownerState:S,children:[$.jsx(Na,{variant:"subtitle2",selected:T==="am",typographyClassName:I.ampmLabel,value:Fl(P,"am"),onClick:p?void 0:()=>E("am"),disabled:f}),$.jsx(Na,{variant:"subtitle2",selected:T==="pm",typographyClassName:I.ampmLabel,value:Fl(P,"pm"),onClick:p?void 0:()=>E("pm"),disabled:f})]}),n&&k&&$.jsx(Na,{variant:"h5",onClick:()=>l("meridiem"),selected:a==="meridiem",value:o&&T?Fl(P,T):"--",width:k0})]})]}))}function Koe(e,t){var s;const n=mn(),r=zh(),o=Jt({props:e,name:t}),i=o.ampm??n.is12HourCycleInCurrentLocale(),a=y.useMemo(()=>{var l;return((l=o.localeText)==null?void 0:l.toolbarTitle)==null?o.localeText:N({},o.localeText,{dateTimePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return N({},o,rB({views:o.views,openTo:o.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:i,localeText:a,orientation:o.orientation??"portrait",disableIgnoringDatePartForTimeValidation:o.disableIgnoringDatePartForTimeValidation??!!(o.minDateTime||o.maxDateTime||o.disablePast||o.disableFuture),disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:xi(n,o.minDateTime??o.minDate,r.minDate),maxDate:xi(n,o.maxDateTime??o.maxDate,r.maxDate),minTime:o.minDateTime??o.minTime,maxTime:o.maxDateTime??o.maxTime,slots:N({toolbar:Lct,tabs:Ict},o.slots),slotProps:N({},o.slotProps,{toolbar:N({ampm:i},(s=o.slotProps)==null?void 0:s.toolbar)})})}const Fct=y.forwardRef(function(t,n){var g;const r=er(),{toolbar:o,tabs:i,content:a,actionBar:s,shortcuts:l}=Doe(t),{sx:c,className:u,isLandscape:d,classes:f}=t,p=s&&(((g=s.props.actions)==null?void 0:g.length)??0)>0,m=N({},t,{isRtl:r});return $.jsxs(Noe,{ref:n,className:fe($l.root,f==null?void 0:f.root,u),sx:[{[`& .${$l.tabs}`]:{gridRow:4,gridColumn:"1 / 4"},[`& .${$l.actionBar}`]:{gridRow:5}},...Array.isArray(c)?c:[c]],ownerState:m,children:[d?l:o,d?o:l,$.jsxs(Loe,{className:fe($l.contentWrapper,f==null?void 0:f.contentWrapper),sx:{display:"grid"},children:[a,i,p&&$.jsx(Za,{sx:{gridRow:3,gridColumn:"1 / 4"}})]}),s]})}),jct=["openTo","focusedView","timeViewsCount"],Bct=function(t,n,r){var u,d;const{openTo:o,focusedView:i,timeViewsCount:a}=r,s=Ue(r,jct),l=N({},s,{focusedView:null,sx:[{[`&.${N8.root}`]:{borderBottom:0},[`&.${N8.root}, .${xit.root}, &.${dit.root}`]:{maxHeight:xk}}]}),c=I0(n);return $.jsxs(y.Fragment,{children:[(u=t[c?"day":n])==null?void 0:u.call(t,N({},r,{view:c?"day":n,focusedView:i&&av(i)?i:null,views:r.views.filter(av),sx:[{gridColumn:1},...l.sx]})),a>0&&$.jsxs(y.Fragment,{children:[$.jsx(Za,{orientation:"vertical",sx:{gridColumn:2}}),(d=t[c?n:"hours"])==null?void 0:d.call(t,N({},l,{view:c?n:"hours",focusedView:i&&I0(i)?i:null,openTo:I0(o)?o:"hours",views:r.views.filter(I0),sx:[{gridColumn:3},...l.sx]}))]})]})},Yoe=y.forwardRef(function(t,n){var x,S,P,T;const r=bo(),o=mn(),i=Koe(t,"MuiDesktopDateTimePicker"),{shouldRenderTimeInASingleColumn:a,thresholdToRenderTimeInASingleColumn:s,views:l,timeSteps:c}=Woe(i),u=a?Hoe:zE,d=N({day:Xs,month:Xs,year:Xs,hours:u,minutes:u,seconds:u,meridiem:u},i.viewRenderers),f=i.ampmInClock??!0,m=((x=d.hours)==null?void 0:x.name)===zE.name?l:l.filter(E=>E!=="meridiem"),g=a?[]:["accept"],v=N({},i,{viewRenderers:d,format:Uoe(o,i),views:m,yearsPerRow:i.yearsPerRow??4,ampmInClock:f,timeSteps:c,thresholdToRenderTimeInASingleColumn:s,shouldRenderTimeInASingleColumn:a,slots:N({field:Eoe,layout:Fct,openPickerIcon:Jre},i.slots),slotProps:N({},i.slotProps,{field:E=>{var O;return N({},Du((O=i.slotProps)==null?void 0:O.field,E),Zv(i),{ref:n})},toolbar:N({hidden:!0,ampmInClock:f,toolbarVariant:"desktop"},(S=i.slotProps)==null?void 0:S.toolbar),tabs:N({hidden:!0},(P=i.slotProps)==null?void 0:P.tabs),actionBar:E=>{var O;return N({actions:g},Du((O=i.slotProps)==null?void 0:O.actionBar,E))}})}),{renderPicker:w}=wB({props:v,valueManager:Qr,valueType:"date-time",getOpenDialogAriaText:Xv({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(T=v.localeText)==null?void 0:T.openDatePickerDialogue}),validator:Pk,rendererInterceptor:Bct});return w()});Yoe.propTypes={ampm:j.bool,ampmInClock:j.bool,autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,dayOfWeekFormatter:j.func,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableHighlightToday:j.bool,disableIgnoringDatePartForTimeValidation:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,displayWeekNumber:j.bool,enableAccessibleFieldDOMStructure:j.any,fixedWeekNumber:j.number,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:yv,label:j.node,loading:j.bool,localeText:j.object,maxDate:j.object,maxDateTime:j.object,maxTime:j.object,minDate:j.object,minDateTime:j.object,minTime:j.object,minutesStep:j.number,monthsPerRow:j.oneOf([3,4]),name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onMonthChange:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,onYearChange:j.func,open:j.bool,openTo:j.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,renderLoading:j.func,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableDate:j.func,shouldDisableMonth:j.func,shouldDisableTime:j.func,shouldDisableYear:j.func,showDaysOutsideCurrentMonth:j.bool,skipDisabled:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),thresholdToRenderTimeInASingleColumn:j.number,timeSteps:j.shape({hours:j.number,minutes:j.number,seconds:j.number}),timezone:j.string,value:j.object,view:j.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:j.shape({day:j.func,hours:j.func,meridiem:j.func,minutes:j.func,month:j.func,seconds:j.func,year:j.func}),views:j.arrayOf(j.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:j.oneOf(["asc","desc"]),yearsPerRow:j.oneOf([3,4])};const Xoe=y.forwardRef(function(t,n){var u,d,f;const r=bo(),o=mn(),i=Koe(t,"MuiMobileDateTimePicker"),a=N({day:Xs,month:Xs,year:Xs,hours:Kg,minutes:Kg,seconds:Kg},i.viewRenderers),s=i.ampmInClock??!1,l=N({},i,{viewRenderers:a,format:Uoe(o,i),ampmInClock:s,slots:N({field:Eoe},i.slots),slotProps:N({},i.slotProps,{field:p=>{var m;return N({},Du((m=i.slotProps)==null?void 0:m.field,p),Zv(i),{ref:n})},toolbar:N({hidden:!1,ampmInClock:s},(u=i.slotProps)==null?void 0:u.toolbar),tabs:N({hidden:!1},(d=i.slotProps)==null?void 0:d.tabs)})}),{renderPicker:c}=xB({props:l,valueManager:Qr,valueType:"date-time",getOpenDialogAriaText:Xv({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=l.localeText)==null?void 0:f.openDatePickerDialogue}),validator:Pk});return c()});Xoe.propTypes={ampm:j.bool,ampmInClock:j.bool,autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,dayOfWeekFormatter:j.func,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableHighlightToday:j.bool,disableIgnoringDatePartForTimeValidation:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,displayWeekNumber:j.bool,enableAccessibleFieldDOMStructure:j.any,fixedWeekNumber:j.number,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:yv,label:j.node,loading:j.bool,localeText:j.object,maxDate:j.object,maxDateTime:j.object,maxTime:j.object,minDate:j.object,minDateTime:j.object,minTime:j.object,minutesStep:j.number,monthsPerRow:j.oneOf([3,4]),name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onMonthChange:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,onYearChange:j.func,open:j.bool,openTo:j.oneOf(["day","hours","minutes","month","seconds","year"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,renderLoading:j.func,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableDate:j.func,shouldDisableMonth:j.func,shouldDisableTime:j.func,shouldDisableYear:j.func,showDaysOutsideCurrentMonth:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),timezone:j.string,value:j.object,view:j.oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:j.shape({day:j.func,hours:j.func,minutes:j.func,month:j.func,seconds:j.func,year:j.func}),views:j.arrayOf(j.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:j.oneOf(["asc","desc"]),yearsPerRow:j.oneOf([3,4])};const zct=["desktopModeMediaQuery"],Vct=y.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiDateTimePicker"}),{desktopModeMediaQuery:o=dB}=r,i=Ue(r,zct);return bf(o,{defaultMatches:!0})?$.jsx(Yoe,N({ref:n},i)):$.jsx(Xoe,N({ref:n},i))});class Hh extends Error{}class Hct extends Hh{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Uct extends Hh{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Wct extends Hh{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Pg extends Hh{}class Qoe extends Hh{constructor(t){super(`Invalid unit ${t}`)}}class fi extends Hh{}class bd extends Hh{constructor(){super("Zone is an abstract class")}}const mt="numeric",Jl="short",Xa="long",VE={year:mt,month:mt,day:mt},Joe={year:mt,month:Jl,day:mt},Gct={year:mt,month:Jl,day:mt,weekday:Jl},Zoe={year:mt,month:Xa,day:mt},eie={year:mt,month:Xa,day:mt,weekday:Xa},tie={hour:mt,minute:mt},nie={hour:mt,minute:mt,second:mt},rie={hour:mt,minute:mt,second:mt,timeZoneName:Jl},oie={hour:mt,minute:mt,second:mt,timeZoneName:Xa},iie={hour:mt,minute:mt,hourCycle:"h23"},aie={hour:mt,minute:mt,second:mt,hourCycle:"h23"},sie={hour:mt,minute:mt,second:mt,hourCycle:"h23",timeZoneName:Jl},lie={hour:mt,minute:mt,second:mt,hourCycle:"h23",timeZoneName:Xa},cie={year:mt,month:mt,day:mt,hour:mt,minute:mt},uie={year:mt,month:mt,day:mt,hour:mt,minute:mt,second:mt},die={year:mt,month:Jl,day:mt,hour:mt,minute:mt},fie={year:mt,month:Jl,day:mt,hour:mt,minute:mt,second:mt},qct={year:mt,month:Jl,day:mt,weekday:Jl,hour:mt,minute:mt},pie={year:mt,month:Xa,day:mt,hour:mt,minute:mt,timeZoneName:Jl},hie={year:mt,month:Xa,day:mt,hour:mt,minute:mt,second:mt,timeZoneName:Jl},mie={year:mt,month:Xa,day:mt,weekday:Xa,hour:mt,minute:mt,timeZoneName:Xa},gie={year:mt,month:Xa,day:mt,weekday:Xa,hour:mt,minute:mt,second:mt,timeZoneName:Xa};class LS{get type(){throw new bd}get name(){throw new bd}get ianaName(){return this.name}get isUniversal(){throw new bd}offsetName(t,n){throw new bd}formatOffset(t,n){throw new bd}offset(t){throw new bd}equals(t){throw new bd}get isValid(){throw new bd}}let H$=null;class Ek extends LS{static get instance(){return H$===null&&(H$=new Ek),H$}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Tie(t,n,r)}formatOffset(t,n){return uw(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let $P={};function Kct(e){return $P[e]||($P[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),$P[e]}const Yct={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Xct(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,a,s,l,c,u]=r;return[a,o,i,s,l,c,u]}function Qct(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o=0?m:1e3+m,(f-p)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let U8={};function Jct(e,t={}){const n=JSON.stringify([e,t]);let r=U8[n];return r||(r=new Intl.ListFormat(e,t),U8[n]=r),r}let eN={};function tN(e,t={}){const n=JSON.stringify([e,t]);let r=eN[n];return r||(r=new Intl.DateTimeFormat(e,t),eN[n]=r),r}let nN={};function Zct(e,t={}){const n=JSON.stringify([e,t]);let r=nN[n];return r||(r=new Intl.NumberFormat(e,t),nN[n]=r),r}let rN={};function eut(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=rN[o];return i||(i=new Intl.RelativeTimeFormat(e,t),rN[o]=i),i}let M0=null;function tut(){return M0||(M0=new Intl.DateTimeFormat().resolvedOptions().locale,M0)}let W8={};function nut(e){let t=W8[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,W8[e]=t}return t}function rut(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=tN(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);r=tN(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:a}=r;return[o,i,a]}}function out(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function iut(e){const t=[];for(let n=1;n<=12;n++){const r=Ot.utc(2009,n,1);t.push(e(r))}return t}function aut(e){const t=[];for(let n=1;n<=7;n++){const r=Ot.utc(2016,11,13+n);t.push(e(r))}return t}function HC(e,t,n,r){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):r(t)}function sut(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class lut{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...a}=r;if(!n||Object.keys(a).length>0){const s={useGrouping:!1,...r};r.padTo>0&&(s.minimumIntegerDigits=r.padTo),this.inf=Zct(t,s)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):OB(t,3);return lo(n,this.padTo)}}}class cut{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const a=-1*(t.offset/60),s=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&Xu.create(s).valid?(o=s,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=tN(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class uut{constructor(t,n,r){this.opts={style:"long",...r},!n&&Cie()&&(this.rtf=eut(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):Rut(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const dut={firstDay:1,minimalDays:4,weekend:[6,7]};class Jn{static fromOpts(t){return Jn.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,o,i=!1){const a=t||Lr.defaultLocale,s=a||(i?"en-US":tut()),l=n||Lr.defaultNumberingSystem,c=r||Lr.defaultOutputCalendar,u=oN(o)||Lr.defaultWeekSettings;return new Jn(s,l,c,u,a)}static resetCache(){M0=null,eN={},nN={},rN={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return Jn.create(t,n,r,o)}constructor(t,n,r,o,i){const[a,s,l]=rut(t);this.locale=a,this.numberingSystem=n||s||null,this.outputCalendar=r||l||null,this.weekSettings=o,this.intl=out(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=sut(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:Jn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,oN(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return HC(this,t,Iie,()=>{const r=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=iut(i=>this.extract(i,r,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1){return HC(this,t,Aie,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=aut(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return HC(this,void 0,()=>$ie,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ot.utc(2016,11,13,9),Ot.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return HC(this,t,Rie,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[Ot.utc(-40,1,1),Ot.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),a=i.find(s=>s.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new lut(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new cut(t,this.intl,n)}relFormatter(t={}){return new uut(this.intl,this.isEnglish(),t)}listFormatter(t={}){return Jct(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Pie()?nut(this.locale):dut}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let U$=null;class ji extends LS{static get utcInstance(){return U$===null&&(U$=new ji(0)),U$}static instance(t){return t===0?ji.utcInstance:new ji(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new ji(kk(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${uw(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${uw(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return uw(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class fut extends LS{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Nd(e,t){if(Gt(e)||e===null)return t;if(e instanceof LS)return e;if(vut(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?Ek.instance:n==="utc"||n==="gmt"?ji.utcInstance:ji.parseSpecifier(n)||Xu.create(e)}else return ff(e)?ji.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new fut(e)}const CB={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},G8={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},put=CB.hanidec.replace(/[\[|\]]/g,"").split("");function hut(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=i&&r<=a&&(t+=r-i)}}return parseInt(t,10)}else return t}let Zm={};function mut(){Zm={}}function Cl({numberingSystem:e},t=""){const n=e||"latn";return Zm[n]||(Zm[n]={}),Zm[n][t]||(Zm[n][t]=new RegExp(`${CB[n]}${t}`)),Zm[n][t]}let q8=()=>Date.now(),K8="system",Y8=null,X8=null,Q8=null,J8=60,Z8,e9=null;class Lr{static get now(){return q8}static set now(t){q8=t}static set defaultZone(t){K8=t}static get defaultZone(){return Nd(K8,Ek.instance)}static get defaultLocale(){return Y8}static set defaultLocale(t){Y8=t}static get defaultNumberingSystem(){return X8}static set defaultNumberingSystem(t){X8=t}static get defaultOutputCalendar(){return Q8}static set defaultOutputCalendar(t){Q8=t}static get defaultWeekSettings(){return e9}static set defaultWeekSettings(t){e9=oN(t)}static get twoDigitCutoffYear(){return J8}static set twoDigitCutoffYear(t){J8=t%100}static get throwOnInvalid(){return Z8}static set throwOnInvalid(t){Z8=t}static resetCaches(){Jn.resetCache(),Xu.resetCache(),Ot.resetCache(),mut()}}class jl{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const yie=[0,31,59,90,120,151,181,212,243,273,304,334],vie=[0,31,60,91,121,152,182,213,244,274,305,335];function Bs(e,t){return new jl("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function PB(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function bie(e,t,n){return n+(FS(e)?vie:yie)[t-1]}function wie(e,t){const n=FS(e)?vie:yie,r=n.findIndex(i=>iMx(r,t,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:s,...Mk(e)}}function t9(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:i}=e,a=TB(PB(r,1,t),n),s=Yg(r);let l=o*7+i-a-7+t,c;l<1?(c=r-1,l+=Yg(c)):l>s?(c=r+1,l-=Yg(r)):c=r;const{month:u,day:d}=wie(c,l);return{year:c,month:u,day:d,...Mk(e)}}function W$(e){const{year:t,month:n,day:r}=e,o=bie(t,n,r);return{year:t,ordinal:o,...Mk(e)}}function n9(e){const{year:t,ordinal:n}=e,{month:r,day:o}=wie(t,n);return{year:t,month:r,day:o,...Mk(e)}}function r9(e,t){if(!Gt(e.localWeekday)||!Gt(e.localWeekNumber)||!Gt(e.localWeekYear)){if(!Gt(e.weekday)||!Gt(e.weekNumber)||!Gt(e.weekYear))throw new Pg("Cannot mix locale-based week fields with ISO-based week fields");return Gt(e.localWeekday)||(e.weekday=e.localWeekday),Gt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Gt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function gut(e,t=4,n=1){const r=Ok(e.weekYear),o=zs(e.weekNumber,1,Mx(e.weekYear,t,n)),i=zs(e.weekday,1,7);return r?o?i?!1:Bs("weekday",e.weekday):Bs("week",e.weekNumber):Bs("weekYear",e.weekYear)}function yut(e){const t=Ok(e.year),n=zs(e.ordinal,1,Yg(e.year));return t?n?!1:Bs("ordinal",e.ordinal):Bs("year",e.year)}function xie(e){const t=Ok(e.year),n=zs(e.month,1,12),r=zs(e.day,1,UE(e.year,e.month));return t?n?r?!1:Bs("day",e.day):Bs("month",e.month):Bs("year",e.year)}function Sie(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=zs(t,0,23)||t===24&&n===0&&r===0&&o===0,a=zs(n,0,59),s=zs(r,0,59),l=zs(o,0,999);return i?a?s?l?!1:Bs("millisecond",o):Bs("second",r):Bs("minute",n):Bs("hour",t)}function Gt(e){return typeof e>"u"}function ff(e){return typeof e=="number"}function Ok(e){return typeof e=="number"&&e%1===0}function vut(e){return typeof e=="string"}function but(e){return Object.prototype.toString.call(e)==="[object Date]"}function Cie(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Pie(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function wut(e){return Array.isArray(e)?e:[e]}function o9(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function xut(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function sv(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function oN(e){if(e==null)return null;if(typeof e!="object")throw new fi("Week settings must be an object");if(!zs(e.firstDay,1,7)||!zs(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!zs(t,1,7)))throw new fi("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function zs(e,t,n){return Ok(e)&&e>=t&&e<=n}function Sut(e,t){return e-t*Math.floor(e/t)}function lo(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function Md(e){if(!(Gt(e)||e===null||e===""))return parseInt(e,10)}function pp(e){if(!(Gt(e)||e===null||e===""))return parseFloat(e)}function EB(e){if(!(Gt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function OB(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function FS(e){return e%4===0&&(e%100!==0||e%400===0)}function Yg(e){return FS(e)?366:365}function UE(e,t){const n=Sut(t-1,12)+1,r=e+(t-n)/12;return n===2?FS(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Ik(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function i9(e,t,n){return-TB(PB(e,1,t),n)+t-1}function Mx(e,t=4,n=1){const r=i9(e,t,n),o=i9(e+1,t,n);return(Yg(e)-r+o)/7}function iN(e){return e>99?e:e>Lr.twoDigitCutoffYear?1900+e:2e3+e}function Tie(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},s=new Intl.DateTimeFormat(n,a).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function kk(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function Eie(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new fi(`Invalid unit value ${e}`);return t}function WE(e,t){const n={};for(const r in e)if(sv(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=Eie(o)}return n}function uw(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${lo(n,2)}:${lo(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${lo(n,2)}${lo(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Mk(e){return xut(e,["hour","minute","second","millisecond"])}const Cut=["January","February","March","April","May","June","July","August","September","October","November","December"],Oie=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Put=["J","F","M","A","M","J","J","A","S","O","N","D"];function Iie(e){switch(e){case"narrow":return[...Put];case"short":return[...Oie];case"long":return[...Cut];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const kie=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Mie=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Tut=["M","T","W","T","F","S","S"];function Aie(e){switch(e){case"narrow":return[...Tut];case"short":return[...Mie];case"long":return[...kie];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const $ie=["AM","PM"],Eut=["Before Christ","Anno Domini"],Out=["BC","AD"],Iut=["B","A"];function Rie(e){switch(e){case"narrow":return[...Iut];case"short":return[...Out];case"long":return[...Eut];default:return null}}function kut(e){return $ie[e.hour<12?0:1]}function Mut(e,t){return Aie(t)[e.weekday-1]}function Aut(e,t){return Iie(t)[e.month-1]}function $ut(e,t){return Rie(t)[e.year<0?0:1]}function Rut(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${o[e][0]}`;case-1:return d?"yesterday":`last ${o[e][0]}`;case 0:return d?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,s=Math.abs(t),l=s===1,c=o[e],u=r?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return a?`${s} ${u} ago`:`in ${s} ${u}`}function a9(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const _ut={D:VE,DD:Joe,DDD:Zoe,DDDD:eie,t:tie,tt:nie,ttt:rie,tttt:oie,T:iie,TT:aie,TTT:sie,TTTT:lie,f:cie,ff:die,fff:pie,ffff:mie,F:uie,FF:fie,FFF:hie,FFFF:gie};let Ll=class A0{static create(t,n={}){return new A0(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let a=0;a0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||s===n?r+=s:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=s,n=s)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return _ut[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return lo(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(p,m)=>this.loc.extract(t,p,m),a=p=>t.isOffsetFixed&&t.offset===0&&p.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,p.format):"",s=()=>r?kut(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(p,m)=>r?Aut(t,p):i(m?{month:p}:{month:p,day:"numeric"},"month"),c=(p,m)=>r?Mut(t,p):i(m?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),u=p=>{const m=A0.macroTokenToFormatOpts(p);return m?this.formatWithSystemDefault(t,m):p},d=p=>r?$ut(t,p):i({era:p},"era"),f=p=>{switch(p){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return s();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return u(p)}};return a9(A0.parseFormat(n),f)}formatDurationFromString(t,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=l=>c=>{const u=r(c);return u?this.num(l.get(u),c.length):c},i=A0.parseFormat(n),a=i.reduce((l,{literal:c,val:u})=>c?l:l.concat(u),[]),s=t.shiftTo(...a.map(r).filter(l=>l));return a9(i,o(s))}};const _ie=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function eb(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function tb(...e){return t=>e.reduce(([n,r,o],i)=>{const[a,s,l]=i(t,o);return[{...n,...a},s||r,l]},[{},null,1]).slice(0,2)}function nb(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function Die(...e){return(t,n)=>{const r={};let o;for(o=0;op!==void 0&&(m||p&&u)?-p:p;return[{years:f(pp(n)),months:f(pp(r)),weeks:f(pp(o)),days:f(pp(i)),hours:f(pp(a)),minutes:f(pp(s)),seconds:f(pp(l),l==="-0"),milliseconds:f(EB(c),d)}]}const qut={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function MB(e,t,n,r,o,i,a){const s={year:t.length===2?iN(Md(t)):Md(t),month:Oie.indexOf(n)+1,day:Md(r),hour:Md(o),minute:Md(i)};return a&&(s.second=Md(a)),e&&(s.weekday=e.length>3?kie.indexOf(e)+1:Mie.indexOf(e)+1),s}const Kut=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Yut(e){const[,t,n,r,o,i,a,s,l,c,u,d]=e,f=MB(t,o,r,n,i,a,s);let p;return l?p=qut[l]:c?p=0:p=kk(u,d),[f,new ji(p)]}function Xut(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Qut=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Jut=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Zut=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function s9(e){const[,t,n,r,o,i,a,s]=e;return[MB(t,o,r,n,i,a,s),ji.utcInstance]}function edt(e){const[,t,n,r,o,i,a,s]=e;return[MB(t,s,n,r,o,i,a),ji.utcInstance]}const tdt=eb(Nut,kB),ndt=eb(Lut,kB),rdt=eb(Fut,kB),odt=eb(Lie),jie=tb(Hut,rb,jS,BS),idt=tb(jut,rb,jS,BS),adt=tb(But,rb,jS,BS),sdt=tb(rb,jS,BS);function ldt(e){return nb(e,[tdt,jie],[ndt,idt],[rdt,adt],[odt,sdt])}function cdt(e){return nb(Xut(e),[Kut,Yut])}function udt(e){return nb(e,[Qut,s9],[Jut,s9],[Zut,edt])}function ddt(e){return nb(e,[Wut,Gut])}const fdt=tb(rb);function pdt(e){return nb(e,[Uut,fdt])}const hdt=eb(zut,Vut),mdt=eb(Fie),gdt=tb(rb,jS,BS);function ydt(e){return nb(e,[hdt,jie],[mdt,gdt])}const l9="Invalid Duration",Bie={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},vdt={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Bie},Cs=146097/400,Lm=146097/4800,bdt={years:{quarters:4,months:12,weeks:Cs/7,days:Cs,hours:Cs*24,minutes:Cs*24*60,seconds:Cs*24*60*60,milliseconds:Cs*24*60*60*1e3},quarters:{months:3,weeks:Cs/28,days:Cs/4,hours:Cs*24/4,minutes:Cs*24*60/4,seconds:Cs*24*60*60/4,milliseconds:Cs*24*60*60*1e3/4},months:{weeks:Lm/7,days:Lm,hours:Lm*24,minutes:Lm*24*60,seconds:Lm*24*60*60,milliseconds:Lm*24*60*60*1e3},...Bie},Fp=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],wdt=Fp.slice(0).reverse();function wd(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Dn(r)}function zie(e,t){let n=t.milliseconds??0;for(const r of wdt.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function c9(e,t){const n=zie(e,t)<0?-1:1;Fp.reduceRight((r,o)=>{if(Gt(t[o]))return r;if(r){const i=t[r]*n,a=e[o][r],s=Math.floor(i/a);t[o]+=s*n,t[r]-=s*a*n}return o},null),Fp.reduce((r,o)=>{if(Gt(t[o]))return r;if(r){const i=t[r]%1;t[r]-=i,t[o]+=i*e[r][o]}return o},null)}function xdt(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class Dn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?bdt:vdt;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||Jn.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return Dn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new fi(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Dn({values:WE(t,Dn.normalizeUnit),loc:Jn.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(ff(t))return Dn.fromMillis(t);if(Dn.isDuration(t))return t;if(typeof t=="object")return Dn.fromObject(t);throw new fi(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=ddt(t);return r?Dn.fromObject(r,n):Dn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=pdt(t);return r?Dn.fromObject(r,n):Dn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new fi("need to specify a reason the Duration is invalid");const r=t instanceof jl?t:new jl(t,n);if(Lr.throwOnInvalid)throw new Wct(r);return new Dn({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new Qoe(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Ll.create(this.loc,r).formatDurationFromString(this,t):l9}toHuman(t={}){if(!this.isValid)return l9;const n=Fp.map(r=>{const o=this.values[r];return Gt(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=OB(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},Ot.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?zie(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Dn.fromDurationLike(t),r={};for(const o of Fp)(sv(n.values,o)||sv(this.values,o))&&(r[o]=n.get(o)+this.get(o));return wd(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=Dn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=Eie(t(this.values[r],r));return wd(this,{values:n},!0)}get(t){return this[Dn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...WE(t,Dn.normalizeUnit)};return wd(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const a={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return wd(this,a)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return c9(this.matrix,t),wd(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=xdt(this.normalize().shiftToAll().toObject());return wd(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>Dn.normalizeUnit(a));const n={},r={},o=this.toObject();let i;for(const a of Fp)if(t.indexOf(a)>=0){i=a;let s=0;for(const c in r)s+=this.matrix[c][a]*r[c],r[c]=0;ff(o[a])&&(s+=o[a]);const l=Math.trunc(s);n[a]=l,r[a]=(s*1e3-l*1e3)/1e3}else ff(o[a])&&(r[a]=o[a]);for(const a in r)r[a]!==0&&(n[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return c9(this.matrix,n),wd(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return wd(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of Fp)if(!n(this.values[r],t.values[r]))return!1;return!0}}const Fm="Invalid Interval";function Sdt(e,t){return!e||!e.isValid?Kr.invalid("missing or invalid start"):!t||!t.isValid?Kr.invalid("missing or invalid end"):tt:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Kr.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(l0).filter(a=>this.contains(a)).sort((a,s)=>a.toMillis()-s.toMillis()),r=[];let{s:o}=this,i=0;for(;o+this.e?this.e:a;r.push(Kr.fromDateTimes(o,s)),o=s,i+=1}return r}splitBy(t){const n=Dn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const a=[];for(;rl*o));i=+s>+this.e?this.e:s,a.push(Kr.fromDateTimes(r,i)),r=i,o+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e=r?null:Kr.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.st.e?this.e:t.e;return Kr.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[o,i.union(a)]:[o.concat([i]),a]:[o,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...i),s=a.sort((l,c)=>l.time-c.time);for(const l of s)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&o.push(Kr.fromDateTimes(n,l.time)),n=null);return Kr.merge(o)}difference(...t){return Kr.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Fm}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=VE,n={}){return this.isValid?Ll.create(this.s.loc.clone(n),t).formatInterval(this):Fm}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Fm}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Fm}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Fm}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Fm}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Dn.invalid(this.invalidReason)}mapEndpoints(t){return Kr.fromDateTimes(t(this.s),t(this.e))}}class $0{static hasDST(t=Lr.defaultZone){const n=Ot.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Xu.isValidZone(t)}static normalizeZone(t){return Nd(t,Lr.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||Jn.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||Jn.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||Jn.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||Jn.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||Jn.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||Jn.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||Jn.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Jn.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return Jn.create(n,null,"gregory").eras(t)}static features(){return{relative:Cie(),localeWeek:Pie()}}}function u9(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Dn.fromMillis(r).as("days"))}function Cdt(e,t,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const u=u9(l,c);return(u-u%7)/7}],["days",u9]],o={},i=e;let a,s;for(const[l,c]of r)n.indexOf(l)>=0&&(a=l,o[l]=c(e,t),s=i.plus(o),s>t?(o[l]--,e=i.plus(o),e>t&&(s=e,o[l]--,e=i.plus(o))):e=s);return[e,o,s,a]}function Pdt(e,t,n,r){let[o,i,a,s]=Cdt(e,t,n);const l=t-o,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(a0?Dn.fromMillis(l,r).shiftTo(...c).plus(u):u}const Tdt="missing Intl.DateTimeFormat.formatToParts support";function Wn(e,t=n=>n){return{regex:e,deser:([n])=>t(hut(n))}}const Edt=" ",Vie=`[ ${Edt}]`,Hie=new RegExp(Vie,"g");function Odt(e){return e.replace(/\./g,"\\.?").replace(Hie,Vie)}function d9(e){return e.replace(/\./g,"").replace(Hie," ").toLowerCase()}function Pl(e,t){return e===null?null:{regex:RegExp(e.map(Odt).join("|")),deser:([n])=>e.findIndex(r=>d9(n)===d9(r))+t}}function f9(e,t){return{regex:e,deser:([,n,r])=>kk(n,r),groups:t}}function UC(e){return{regex:e,deser:([t])=>t}}function Idt(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function kdt(e,t){const n=Cl(t),r=Cl(t,"{2}"),o=Cl(t,"{3}"),i=Cl(t,"{4}"),a=Cl(t,"{6}"),s=Cl(t,"{1,2}"),l=Cl(t,"{1,3}"),c=Cl(t,"{1,6}"),u=Cl(t,"{1,9}"),d=Cl(t,"{2,4}"),f=Cl(t,"{4,6}"),p=v=>({regex:RegExp(Idt(v.val)),deser:([w])=>w,literal:!0}),g=(v=>{if(e.literal)return p(v);switch(v.val){case"G":return Pl(t.eras("short"),0);case"GG":return Pl(t.eras("long"),0);case"y":return Wn(c);case"yy":return Wn(d,iN);case"yyyy":return Wn(i);case"yyyyy":return Wn(f);case"yyyyyy":return Wn(a);case"M":return Wn(s);case"MM":return Wn(r);case"MMM":return Pl(t.months("short",!0),1);case"MMMM":return Pl(t.months("long",!0),1);case"L":return Wn(s);case"LL":return Wn(r);case"LLL":return Pl(t.months("short",!1),1);case"LLLL":return Pl(t.months("long",!1),1);case"d":return Wn(s);case"dd":return Wn(r);case"o":return Wn(l);case"ooo":return Wn(o);case"HH":return Wn(r);case"H":return Wn(s);case"hh":return Wn(r);case"h":return Wn(s);case"mm":return Wn(r);case"m":return Wn(s);case"q":return Wn(s);case"qq":return Wn(r);case"s":return Wn(s);case"ss":return Wn(r);case"S":return Wn(l);case"SSS":return Wn(o);case"u":return UC(u);case"uu":return UC(s);case"uuu":return Wn(n);case"a":return Pl(t.meridiems(),0);case"kkkk":return Wn(i);case"kk":return Wn(d,iN);case"W":return Wn(s);case"WW":return Wn(r);case"E":case"c":return Wn(n);case"EEE":return Pl(t.weekdays("short",!1),1);case"EEEE":return Pl(t.weekdays("long",!1),1);case"ccc":return Pl(t.weekdays("short",!0),1);case"cccc":return Pl(t.weekdays("long",!0),1);case"Z":case"ZZ":return f9(new RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case"ZZZ":return f9(new RegExp(`([+-]${s.source})(${r.source})?`),2);case"z":return UC(/[a-z_+-/]{1,256}?/i);case" ":return UC(/[^\S\n\r]/);default:return p(v)}})(e)||{invalidReason:Tdt};return g.token=e,g}const Mdt={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Adt(e,t,n){const{type:r,value:o}=e;if(r==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const i=t[r];let a=r;r==="hour"&&(t.hour12!=null?a=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let s=Mdt[a];if(typeof s=="object"&&(s=s[i]),s)return{literal:!1,val:s}}function $dt(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function Rdt(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const a in n)if(sv(n,a)){const s=n[a],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(o[s.token.val[0]]=s.deser(r.slice(i,i+l))),i+=l}return[r,o]}else return[r,{}]}function _dt(e){const t=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return Gt(e.z)||(n=Xu.create(e.z)),Gt(e.Z)||(n||(n=new ji(e.Z)),r=e.Z),Gt(e.q)||(e.M=(e.q-1)*3+1),Gt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Gt(e.u)||(e.S=EB(e.u)),[Object.keys(e).reduce((i,a)=>{const s=t(a);return s&&(i[s]=e[a]),i},{}),n,r]}let G$=null;function Ddt(){return G$||(G$=Ot.fromMillis(1555555555555)),G$}function Ndt(e,t){if(e.literal)return e;const n=Ll.macroTokenToFormatOpts(e.val),r=qie(n,t);return r==null||r.includes(void 0)?e:r}function Uie(e,t){return Array.prototype.concat(...e.map(n=>Ndt(n,t)))}class Wie{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=Uie(Ll.parseFormat(n),t),this.units=this.tokens.map(r=>kdt(r,t)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,o]=$dt(this.units);this.regex=RegExp(r,"i"),this.handlers=o}}explainFromTokens(t){if(this.isValid){const[n,r]=Rdt(t,this.regex,this.handlers),[o,i,a]=r?_dt(r):[null,null,void 0];if(sv(r,"a")&&sv(r,"H"))throw new Pg("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:o,zone:i,specificOffset:a}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Gie(e,t,n){return new Wie(e,n).explainFromTokens(t)}function Ldt(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:a}=Gie(e,t,n);return[r,o,i,a]}function qie(e,t){if(!e)return null;const r=Ll.create(t,e).dtFormatter(Ddt()),o=r.formatToParts(),i=r.resolvedOptions();return o.map(a=>Adt(a,e,i))}const q$="Invalid DateTime",p9=864e13;function R0(e){return new jl("unsupported zone",`the zone "${e.name}" is not supported`)}function K$(e){return e.weekData===null&&(e.weekData=HE(e.c)),e.weekData}function Y$(e){return e.localWeekData===null&&(e.localWeekData=HE(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function hp(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Ot({...n,...t,old:n})}function Kie(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function WC(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function RP(e,t,n){return Kie(Ik(e),t,n)}function h9(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,UE(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=Dn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=Ik(i);let[l,c]=Kie(s,n,e.zone);return a!==0&&(l+=a,c=e.zone.offset(l)),{ts:l,o:c}}function jm(e,t,n,r,o,i){const{setZone:a,zone:s}=n;if(e&&Object.keys(e).length!==0||t){const l=t||s,c=Ot.fromObject(e,{...n,zone:l,specificOffset:i});return a?c:c.setZone(s)}else return Ot.invalid(new jl("unparsable",`the input "${o}" can't be parsed as ${r}`))}function GC(e,t,n=!0){return e.isValid?Ll.create(Jn.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function X$(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=lo(e.c.year,n?6:4),t?(r+="-",r+=lo(e.c.month),r+="-",r+=lo(e.c.day)):(r+=lo(e.c.month),r+=lo(e.c.day)),r}function m9(e,t,n,r,o,i){let a=lo(e.c.hour);return t?(a+=":",a+=lo(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=":")):a+=lo(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=lo(e.c.second),(e.c.millisecond!==0||!r)&&(a+=".",a+=lo(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?a+="Z":e.o<0?(a+="-",a+=lo(Math.trunc(-e.o/60)),a+=":",a+=lo(Math.trunc(-e.o%60))):(a+="+",a+=lo(Math.trunc(e.o/60)),a+=":",a+=lo(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const Yie={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Fdt={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},jdt={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Xie=["year","month","day","hour","minute","second","millisecond"],Bdt=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],zdt=["year","ordinal","hour","minute","second","millisecond"];function Vdt(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Qoe(e);return t}function g9(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Vdt(e)}}function Hdt(e){return DP[e]||(_P===void 0&&(_P=Lr.now()),DP[e]=e.offset(_P)),DP[e]}function y9(e,t){const n=Nd(t.zone,Lr.defaultZone);if(!n.isValid)return Ot.invalid(R0(n));const r=Jn.fromObject(t);let o,i;if(Gt(e.year))o=Lr.now();else{for(const l of Xie)Gt(e[l])&&(e[l]=Yie[l]);const a=xie(e)||Sie(e);if(a)return Ot.invalid(a);const s=Hdt(n);[o,i]=RP(e,s,n)}return new Ot({ts:o,zone:n,loc:r,o:i})}function v9(e,t,n){const r=Gt(n.round)?!0:n.round,o=(a,s)=>(a=OB(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,s)),i=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return o(i(n.unit),n.unit);for(const a of n.units){const s=i(a);if(Math.abs(s)>=1)return o(s,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function b9(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let _P,DP={};class Ot{constructor(t){const n=t.zone||Lr.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new jl("invalid input"):null)||(n.isValid?null:R0(n));this.ts=Gt(t.ts)?Lr.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const s=ff(t.o)&&!t.old?t.o:n.offset(this.ts);o=WC(this.ts,s),r=Number.isNaN(o.year)?new jl("invalid input"):null,o=r?null:o,i=r?null:s}this._zone=n,this.loc=t.loc||Jn.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new Ot({})}static local(){const[t,n]=b9(arguments),[r,o,i,a,s,l,c]=n;return y9({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static utc(){const[t,n]=b9(arguments),[r,o,i,a,s,l,c]=n;return t.zone=ji.utcInstance,y9({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static fromJSDate(t,n={}){const r=but(t)?t.valueOf():NaN;if(Number.isNaN(r))return Ot.invalid("invalid input");const o=Nd(n.zone,Lr.defaultZone);return o.isValid?new Ot({ts:r,zone:o,loc:Jn.fromObject(n)}):Ot.invalid(R0(o))}static fromMillis(t,n={}){if(ff(t))return t<-p9||t>p9?Ot.invalid("Timestamp out of range"):new Ot({ts:t,zone:Nd(n.zone,Lr.defaultZone),loc:Jn.fromObject(n)});throw new fi(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(ff(t))return new Ot({ts:t*1e3,zone:Nd(n.zone,Lr.defaultZone),loc:Jn.fromObject(n)});throw new fi("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=Nd(n.zone,Lr.defaultZone);if(!r.isValid)return Ot.invalid(R0(r));const o=Jn.fromObject(n),i=WE(t,g9),{minDaysInFirstWeek:a,startOfWeek:s}=r9(i,o),l=Lr.now(),c=Gt(n.specificOffset)?r.offset(l):n.specificOffset,u=!Gt(i.ordinal),d=!Gt(i.year),f=!Gt(i.month)||!Gt(i.day),p=d||f,m=i.weekYear||i.weekNumber;if((p||u)&&m)throw new Pg("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&u)throw new Pg("Can't mix ordinal dates with month/day");const g=m||i.weekday&&!p;let v,w,x=WC(l,c);g?(v=Bdt,w=Fdt,x=HE(x,a,s)):u?(v=zdt,w=jdt,x=W$(x)):(v=Xie,w=Yie);let S=!1;for(const I of v){const R=i[I];Gt(R)?S?i[I]=w[I]:i[I]=x[I]:S=!0}const P=g?gut(i,a,s):u?yut(i):xie(i),T=P||Sie(i);if(T)return Ot.invalid(T);const E=g?t9(i,a,s):u?n9(i):i,[O,k]=RP(E,c,r),A=new Ot({ts:O,zone:r,o:k,loc:o});return i.weekday&&p&&t.weekday!==A.weekday?Ot.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${A.toISO()}`):A.isValid?A:Ot.invalid(A.invalid)}static fromISO(t,n={}){const[r,o]=ldt(t);return jm(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=cdt(t);return jm(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=udt(t);return jm(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(Gt(t)||Gt(n))throw new fi("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,a=Jn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[s,l,c,u]=Ldt(a,t,n);return u?Ot.invalid(u):jm(s,l,r,`format ${n}`,t,c)}static fromString(t,n,r={}){return Ot.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=ydt(t);return jm(r,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new fi("need to specify a reason the DateTime is invalid");const r=t instanceof jl?t:new jl(t,n);if(Lr.throwOnInvalid)throw new Hct(r);return new Ot({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=qie(t,Jn.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return Uie(Ll.parseFormat(t),Jn.fromObject(n)).map(o=>o.val).join("")}static resetCache(){_P=void 0,DP={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?K$(this).weekYear:NaN}get weekNumber(){return this.isValid?K$(this).weekNumber:NaN}get weekday(){return this.isValid?K$(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Y$(this).weekday:NaN}get localWeekNumber(){return this.isValid?Y$(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Y$(this).weekYear:NaN}get ordinal(){return this.isValid?W$(this.c).ordinal:NaN}get monthShort(){return this.isValid?$0.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?$0.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?$0.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?$0.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=Ik(this.c),o=this.zone.offset(r-t),i=this.zone.offset(r+t),a=this.zone.offset(r-o*n),s=this.zone.offset(r-i*n);if(a===s)return[this];const l=r-a*n,c=r-s*n,u=WC(l,a),d=WC(c,s);return u.hour===d.hour&&u.minute===d.minute&&u.second===d.second&&u.millisecond===d.millisecond?[hp(this,{ts:l}),hp(this,{ts:c})]:[this]}get isInLeapYear(){return FS(this.year)}get daysInMonth(){return UE(this.year,this.month)}get daysInYear(){return this.isValid?Yg(this.year):NaN}get weeksInWeekYear(){return this.isValid?Mx(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Mx(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=Ll.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(ji.instance(t),n)}toLocal(){return this.setZone(Lr.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Nd(t,Lr.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),a=this.toObject();[o]=RP(a,i,t)}return hp(this,{ts:o,zone:t})}else return Ot.invalid(R0(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return hp(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=WE(t,g9),{minDaysInFirstWeek:r,startOfWeek:o}=r9(n,this.loc),i=!Gt(n.weekYear)||!Gt(n.weekNumber)||!Gt(n.weekday),a=!Gt(n.ordinal),s=!Gt(n.year),l=!Gt(n.month)||!Gt(n.day),c=s||l,u=n.weekYear||n.weekNumber;if((c||a)&&u)throw new Pg("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&a)throw new Pg("Can't mix ordinal dates with month/day");let d;i?d=t9({...HE(this.c,r,o),...n},r,o):Gt(n.ordinal)?(d={...this.toObject(),...n},Gt(n.day)&&(d.day=Math.min(UE(d.year,d.month),d.day))):d=n9({...W$(this.c),...n});const[f,p]=RP(d,this.o,this.zone);return hp(this,{ts:f,o:p})}plus(t){if(!this.isValid)return this;const n=Dn.fromDurationLike(t);return hp(this,h9(this,n))}minus(t){if(!this.isValid)return this;const n=Dn.fromDurationLike(t).negate();return hp(this,h9(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},o=Dn.normalizeUnit(t);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;athis.valueOf(),s=a?this:t,l=a?t:this,c=Pdt(s,l,i,o);return a?c.negate():c}diffNow(t="milliseconds",n={}){return this.diff(Ot.now(),t,n)}until(t){return this.isValid?Kr.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||Ot.fromObject({},{zone:this.zone}),r=t.padding?thisn.valueOf(),Math.min)}static max(...t){if(!t.every(Ot.isDateTime))throw new fi("max requires all arguments be DateTimes");return o9(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,a=Jn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return Gie(a,t,n)}static fromStringExplain(t,n,r={}){return Ot.fromFormatExplain(t,n,r)}static buildFormatParser(t,n={}){const{locale:r=null,numberingSystem:o=null}=n,i=Jn.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});return new Wie(i,t)}static fromFormatParser(t,n,r={}){if(Gt(t)||Gt(n))throw new fi("fromFormatParser requires an input string and a format parser");const{locale:o=null,numberingSystem:i=null}=r,a=Jn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});if(!a.equals(n.locale))throw new fi(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${n.locale}`);const{result:s,zone:l,specificOffset:c,invalidReason:u}=n.explainFromTokens(t);return u?Ot.invalid(u):jm(s,l,r,`format ${n.format}`,t,c)}static get DATE_SHORT(){return VE}static get DATE_MED(){return Joe}static get DATE_MED_WITH_WEEKDAY(){return Gct}static get DATE_FULL(){return Zoe}static get DATE_HUGE(){return eie}static get TIME_SIMPLE(){return tie}static get TIME_WITH_SECONDS(){return nie}static get TIME_WITH_SHORT_OFFSET(){return rie}static get TIME_WITH_LONG_OFFSET(){return oie}static get TIME_24_SIMPLE(){return iie}static get TIME_24_WITH_SECONDS(){return aie}static get TIME_24_WITH_SHORT_OFFSET(){return sie}static get TIME_24_WITH_LONG_OFFSET(){return lie}static get DATETIME_SHORT(){return cie}static get DATETIME_SHORT_WITH_SECONDS(){return uie}static get DATETIME_MED(){return die}static get DATETIME_MED_WITH_SECONDS(){return fie}static get DATETIME_MED_WITH_WEEKDAY(){return qct}static get DATETIME_FULL(){return pie}static get DATETIME_FULL_WITH_SECONDS(){return hie}static get DATETIME_HUGE(){return mie}static get DATETIME_HUGE_WITH_SECONDS(){return gie}}function l0(e){if(Ot.isDateTime(e))return e;if(e&&e.valueOf&&ff(e.valueOf()))return Ot.fromJSDate(e);if(e&&typeof e=="object")return Ot.fromObject(e);throw new fi(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const Udt={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyyy:{sectionType:"year",contentType:"digit",maxLength:4},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",c:{sectionType:"weekDay",contentType:"digit",maxLength:1},ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:2},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Wdt={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"d",weekday:"cccc",weekdayShort:"ccccc",hours24h:"HH",hours12h:"hh",meridiem:"a",minutes:"mm",seconds:"ss",fullDate:"DD",keyboardDate:"D",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"t",fullTime12h:"hh:mm a",fullTime24h:"HH:mm",keyboardDateTime:"D t",keyboardDateTime12h:"D hh:mm a",keyboardDateTime24h:"D T"};class Ak{constructor({locale:t,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="luxon",this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"'",end:"'"},this.formatTokenMap=Udt,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale?r:r.setLocale(o)},this.date=(r,o="default")=>r===null?null:typeof r>"u"?Ot.fromJSDate(new Date,{locale:this.locale,zone:o}):Ot.fromISO(r,{locale:this.locale,zone:o}),this.getInvalidDate=()=>Ot.fromJSDate(new Date("Invalid Date")),this.getTimezone=r=>r.zone.type==="system"?"system":r.zoneName,this.setTimezone=(r,o)=>r.zone.equals($0.normalizeZone(o))?r:r.setZone(o),this.toJsDate=r=>r.toJSDate(),this.parse=(r,o)=>r===""?null:Ot.fromFormat(r,o,{locale:this.locale}),this.getCurrentLocaleCode=()=>this.locale,this.is12HourCycleInCurrentLocale=()=>{var r,o;return typeof Intl>"u"||typeof Intl.DateTimeFormat>"u"?!0:!!((o=(r=new Intl.DateTimeFormat(this.locale,{hour:"numeric"}))==null?void 0:r.resolvedOptions())!=null&&o.hour12)},this.expandFormat=r=>{const o=/''|'(''|[^'])+('|$)|[^']*/g,i=[...Object.keys(this.formatTokenMap),"yyyyy"],a=new RegExp(`^(${i.join("|")})+$`),s=/(?:^|[^a-z])([a-z]+)(?:[^a-z]|$)|([a-z]+)/gi;return r.match(o).map(l=>l[0]==="'"?l:Ot.expandFormat(l,{locale:this.locale}).replace(s,(d,f,p)=>{const m=f||p;return a.test(m)?d:`'${d}'`})).join("").replace("yyyyy","yyyy")},this.isValid=r=>r===null?!1:r.isValid,this.format=(r,o)=>this.formatByString(r,this.formats[o]),this.formatByString=(r,o)=>r.setLocale(this.locale).toFormat(o),this.formatNumber=r=>r,this.isEqual=(r,o)=>r===null&&o===null?!0:r===null||o===null?!1:+r==+o,this.isSameYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"year")},this.isSameMonth=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"month")},this.isSameDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"day")},this.isSameHour=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"hour")},this.isAfter=(r,o)=>r>o,this.isAfterYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfYear(i),"years").toObject().years>0},this.isAfterDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfDay(i),"days").toObject().days>0},this.isBefore=(r,o)=>r{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfYear(i),"years").toObject().years<0},this.isBeforeDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfDay(i),"days").toObject().days<0},this.isWithinRange=(r,[o,i])=>this.isEqual(r,o)||this.isEqual(r,i)||this.isAfter(r,o)&&this.isBefore(r,i),this.startOfYear=r=>r.startOf("year"),this.startOfMonth=r=>r.startOf("month"),this.startOfWeek=r=>this.setLocaleToValue(r).startOf("week",{useLocaleWeeks:!0}),this.startOfDay=r=>r.startOf("day"),this.endOfYear=r=>r.endOf("year"),this.endOfMonth=r=>r.endOf("month"),this.endOfWeek=r=>this.setLocaleToValue(r).endOf("week",{useLocaleWeeks:!0}),this.endOfDay=r=>r.endOf("day"),this.addYears=(r,o)=>r.plus({years:o}),this.addMonths=(r,o)=>r.plus({months:o}),this.addWeeks=(r,o)=>r.plus({weeks:o}),this.addDays=(r,o)=>r.plus({days:o}),this.addHours=(r,o)=>r.plus({hours:o}),this.addMinutes=(r,o)=>r.plus({minutes:o}),this.addSeconds=(r,o)=>r.plus({seconds:o}),this.getYear=r=>r.get("year"),this.getMonth=r=>r.get("month")-1,this.getDate=r=>r.get("day"),this.getHours=r=>r.get("hour"),this.getMinutes=r=>r.get("minute"),this.getSeconds=r=>r.get("second"),this.getMilliseconds=r=>r.get("millisecond"),this.setYear=(r,o)=>r.set({year:o}),this.setMonth=(r,o)=>r.set({month:o+1}),this.setDate=(r,o)=>r.set({day:o}),this.setHours=(r,o)=>r.set({hour:o}),this.setMinutes=(r,o)=>r.set({minute:o}),this.setSeconds=(r,o)=>r.set({second:o}),this.setMilliseconds=(r,o)=>r.set({millisecond:o}),this.getDaysInMonth=r=>r.daysInMonth,this.getWeekArray=r=>{const o=this.startOfWeek(this.startOfMonth(r)),i=this.endOfWeek(this.endOfMonth(r)),{days:a}=i.diff(o,"days").toObject(),s=[];return new Array(Math.round(a)).fill(0).map((l,c)=>c).map(l=>o.plus({days:l})).forEach((l,c)=>{if(c===0||c%7===0&&c>6){s.push([l]);return}s[s.length-1].push(l)}),s},this.getWeekNumber=r=>r.localWeekNumber??r.weekNumber,this.getDayOfWeek=r=>r.weekday,this.getYearRange=([r,o])=>{const i=this.startOfYear(r),a=this.endOfYear(o),s=[];let l=i;for(;this.isBefore(l,a);)s.push(l),l=this.addYears(l,1);return s},this.locale=t||"en-US",this.formats=N({},Wdt,n)}}const AB=ut($.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");function $B({callback:e,initialIngredient:t}){const n=t?{value:t,data:{id:-1,name:t,image:null,image_thumbnail:null}}:null,[r,o]=y.useState(!0),[i,a]=y.useState(n),[s,l]=y.useState(""),[c,u]=y.useState([]),[d,f]=Ge(),p=y.useMemo(()=>KI(m=>r_e(m,f.language,r).then(g=>u(g)),200),[f.language,r]);return y.useEffect(()=>{if(s===""){u(i?[i]:[]);return}return p(s),()=>{}},[i,s,p]),X(Ut,{children:[C(Yl,{id:"ingredient-autocomplete",getOptionLabel:m=>m.value,"data-testid":"autocomplete",filterOptions:m=>m,options:c,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:i,noOptionsText:d("noResults"),isOptionEqualToValue:(m,g)=>m.value===g.value,onChange:(m,g)=>{u(g?[g,...c]:c),a(g),e(g)},onInputChange:(m,g)=>{l(g)},renderInput:m=>C(hn,{...m,label:d("nutrition.searchIngredientName"),fullWidth:!0,InputProps:{...m.InputProps,startAdornment:X(Mt,{children:[C(so,{position:"start",children:C(AB,{})}),m.InputProps.startAdornment]})}}),renderOption:(m,g)=>sY("li",{...m,key:`ingredient-${g.data.id}`},X(es,{disablePadding:!0,component:"div",children:[C(zi,{children:C(Xl,{alt:"",src:`${HF}${g.data.image}`,variant:"rounded",children:C(Ju,{})})}),C(ho,{primary:g.value,primaryTypographyProps:{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})]}))}),f.language!==Iy&&C(Hw,{children:C(mh,{control:C(Hu,{checked:r,onChange:(m,g)=>o(g)}),label:d("alsoSearchEnglish")})})]})}var Gdt=function(t){return qdt(t)&&!Kdt(t)};function qdt(e){return!!e&&typeof e=="object"}function Kdt(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Qdt(e)}var Ydt=typeof Symbol=="function"&&Symbol.for,Xdt=Ydt?Symbol.for("react.element"):60103;function Qdt(e){return e.$$typeof===Xdt}function Jdt(e){return Array.isArray(e)?[]:{}}function GE(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ax(Jdt(e),e,t):e}function Zdt(e,t,n){return e.concat(t).map(function(r){return GE(r,n)})}function eft(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(o){r[o]=GE(e[o],n)}),Object.keys(t).forEach(function(o){!n.isMergeableObject(t[o])||!e[o]?r[o]=GE(t[o],n):r[o]=Ax(e[o],t[o],n)}),r}function Ax(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Zdt,n.isMergeableObject=n.isMergeableObject||Gdt;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):eft(e,t,n):GE(t,n)}Ax.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return Ax(r,o,n)},{})};var aN=Ax,Qie=typeof global=="object"&&global&&global.Object===Object&&global,tft=typeof self=="object"&&self&&self.Object===Object&&self,Hc=Qie||tft||Function("return this")(),Sf=Hc.Symbol,Jie=Object.prototype,nft=Jie.hasOwnProperty,rft=Jie.toString,c0=Sf?Sf.toStringTag:void 0;function oft(e){var t=nft.call(e,c0),n=e[c0];try{e[c0]=void 0;var r=!0}catch{}var o=rft.call(e);return r&&(t?e[c0]=n:delete e[c0]),o}var ift=Object.prototype,aft=ift.toString;function sft(e){return aft.call(e)}var lft="[object Null]",cft="[object Undefined]",w9=Sf?Sf.toStringTag:void 0;function Uh(e){return e==null?e===void 0?cft:lft:w9&&w9 in Object(e)?oft(e):sft(e)}function Zie(e,t){return function(n){return e(t(n))}}var RB=Zie(Object.getPrototypeOf,Object);function Wh(e){return e!=null&&typeof e=="object"}var uft="[object Object]",dft=Function.prototype,fft=Object.prototype,eae=dft.toString,pft=fft.hasOwnProperty,hft=eae.call(Object);function x9(e){if(!Wh(e)||Uh(e)!=uft)return!1;var t=RB(e);if(t===null)return!0;var n=pft.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&eae.call(n)==hft}function mft(){this.__data__=[],this.size=0}function tae(e,t){return e===t||e!==e&&t!==t}function $k(e,t){for(var n=e.length;n--;)if(tae(e[n][0],t))return n;return-1}var gft=Array.prototype,yft=gft.splice;function vft(e){var t=this.__data__,n=$k(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():yft.call(t,n,1),--this.size,!0}function bft(e){var t=this.__data__,n=$k(t,e);return n<0?void 0:t[n][1]}function wft(e){return $k(this.__data__,e)>-1}function xft(e,t){var n=this.__data__,r=$k(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function nd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=xpt}var Spt="[object Arguments]",Cpt="[object Array]",Ppt="[object Boolean]",Tpt="[object Date]",Ept="[object Error]",Opt="[object Function]",Ipt="[object Map]",kpt="[object Number]",Mpt="[object Object]",Apt="[object RegExp]",$pt="[object Set]",Rpt="[object String]",_pt="[object WeakMap]",Dpt="[object ArrayBuffer]",Npt="[object DataView]",Lpt="[object Float32Array]",Fpt="[object Float64Array]",jpt="[object Int8Array]",Bpt="[object Int16Array]",zpt="[object Int32Array]",Vpt="[object Uint8Array]",Hpt="[object Uint8ClampedArray]",Upt="[object Uint16Array]",Wpt="[object Uint32Array]",Pr={};Pr[Lpt]=Pr[Fpt]=Pr[jpt]=Pr[Bpt]=Pr[zpt]=Pr[Vpt]=Pr[Hpt]=Pr[Upt]=Pr[Wpt]=!0;Pr[Spt]=Pr[Cpt]=Pr[Dpt]=Pr[Ppt]=Pr[Npt]=Pr[Tpt]=Pr[Ept]=Pr[Opt]=Pr[Ipt]=Pr[kpt]=Pr[Mpt]=Pr[Apt]=Pr[$pt]=Pr[Rpt]=Pr[_pt]=!1;function Gpt(e){return Wh(e)&&lae(e.length)&&!!Pr[Uh(e)]}function _B(e){return function(t){return e(t)}}var cae=typeof Ha=="object"&&Ha&&!Ha.nodeType&&Ha,dw=cae&&typeof Ua=="object"&&Ua&&!Ua.nodeType&&Ua,qpt=dw&&dw.exports===cae,J$=qpt&&Qie.process,lv=function(){try{var e=dw&&dw.require&&dw.require("util").types;return e||J$&&J$.binding&&J$.binding("util")}catch{}}(),O9=lv&&lv.isTypedArray,Kpt=O9?_B(O9):Gpt,Ypt=Object.prototype,Xpt=Ypt.hasOwnProperty;function uae(e,t){var n=VS(e),r=!n&&hpt(e),o=!n&&!r&&sae(e),i=!n&&!r&&!o&&Kpt(e),a=n||r||o||i,s=a?upt(e.length,String):[],l=s.length;for(var c in e)(t||Xpt.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||wpt(c,l)))&&s.push(c);return s}var Qpt=Object.prototype;function DB(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Qpt;return e===n}var Jpt=Zie(Object.keys,Object),Zpt=Object.prototype,eht=Zpt.hasOwnProperty;function tht(e){if(!DB(e))return Jpt(e);var t=[];for(var n in Object(e))eht.call(e,n)&&n!="constructor"&&t.push(n);return t}function dae(e){return e!=null&&lae(e.length)&&!nae(e)}function NB(e){return dae(e)?uae(e):tht(e)}function nht(e,t){return e&&_k(t,NB(t),e)}function rht(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var oht=Object.prototype,iht=oht.hasOwnProperty;function aht(e){if(!zS(e))return rht(e);var t=DB(e),n=[];for(var r in e)r=="constructor"&&(t||!iht.call(e,r))||n.push(r);return n}function LB(e){return dae(e)?uae(e,!0):aht(e)}function sht(e,t){return e&&_k(t,LB(t),e)}var fae=typeof Ha=="object"&&Ha&&!Ha.nodeType&&Ha,I9=fae&&typeof Ua=="object"&&Ua&&!Ua.nodeType&&Ua,lht=I9&&I9.exports===fae,k9=lht?Hc.Buffer:void 0,M9=k9?k9.allocUnsafe:void 0;function cht(e,t){if(t)return e.slice();var n=e.length,r=M9?M9(n):new e.constructor(n);return e.copy(r),r}function pae(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0)&&(n[o]=e[o]);return n}var Dk=y.createContext(void 0);Dk.displayName="FormikContext";var Ymt=Dk.Provider;Dk.Consumer;function Tae(){var e=y.useContext(Dk);return e}var Es=function(t){return typeof t=="function"},HS=function(t){return t!==null&&typeof t=="object"},Xmt=function(t){return String(Math.floor(Number(t)))===t},Z$=function(t){return Object.prototype.toString.call(t)==="[object String]"},Qmt=function(t){return y.Children.count(t)===0},eR=function(t){return HS(t)&&Es(t.then)};function Ma(e,t,n,r){r===void 0&&(r=0);for(var o=Cae(t);e&&r=0?[]:{}}}return(i===0?e:o)[a[i]]===n?e:(n===void 0?delete o[a[i]]:o[a[i]]=n,i===0&&n===void 0&&delete r[a[i]],r)}function Eae(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var o=0,i=Object.keys(e);o0?Ae.map(function($e){return I($e,Ma(de,$e))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(Oe).then(function($e){return $e.reduce(function(Be,Je,ot){return Je==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||Je&&(Be=eh(Be,Ae[ot],Je)),Be},{})})},[I]),L=y.useCallback(function(de){return Promise.all([R(de),f.validationSchema?A(de):{},f.validate?k(de):{}]).then(function(Ae){var Oe=Ae[0],$e=Ae[1],Be=Ae[2],Je=aN.all([Oe,$e,Be],{arrayMerge:ngt});return Je})},[f.validate,f.validationSchema,R,k,A]),F=Ps(function(de){return de===void 0&&(de=E.values),O({type:"SET_ISVALIDATING",payload:!0}),L(de).then(function(Ae){return w.current&&(O({type:"SET_ISVALIDATING",payload:!1}),O({type:"SET_ERRORS",payload:Ae})),Ae})});y.useEffect(function(){a&&w.current===!0&&Pp(p.current,f.initialValues)&&F(p.current)},[a,F]);var z=y.useCallback(function(de){var Ae=de&&de.values?de.values:p.current,Oe=de&&de.errors?de.errors:m.current?m.current:f.initialErrors||{},$e=de&&de.touched?de.touched:g.current?g.current:f.initialTouched||{},Be=de&&de.status?de.status:v.current?v.current:f.initialStatus;p.current=Ae,m.current=Oe,g.current=$e,v.current=Be;var Je=function(){O({type:"RESET_FORM",payload:{isSubmitting:!!de&&!!de.isSubmitting,errors:Oe,touched:$e,status:Be,values:Ae,isValidating:!!de&&!!de.isValidating,submitCount:de&&de.submitCount&&typeof de.submitCount=="number"?de.submitCount:0}})};if(f.onReset){var ot=f.onReset(E.values,ue);eR(ot)?ot.then(Je):Je()}else Je()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);y.useEffect(function(){w.current===!0&&!Pp(p.current,f.initialValues)&&c&&(p.current=f.initialValues,z(),a&&F(p.current))},[c,f.initialValues,z,a,F]),y.useEffect(function(){c&&w.current===!0&&!Pp(m.current,f.initialErrors)&&(m.current=f.initialErrors||mp,O({type:"SET_ERRORS",payload:f.initialErrors||mp}))},[c,f.initialErrors]),y.useEffect(function(){c&&w.current===!0&&!Pp(g.current,f.initialTouched)&&(g.current=f.initialTouched||KC,O({type:"SET_TOUCHED",payload:f.initialTouched||KC}))},[c,f.initialTouched]),y.useEffect(function(){c&&w.current===!0&&!Pp(v.current,f.initialStatus)&&(v.current=f.initialStatus,O({type:"SET_STATUS",payload:f.initialStatus}))},[c,f.initialStatus,f.initialTouched]);var _=Ps(function(de){if(x.current[de]&&Es(x.current[de].validate)){var Ae=Ma(E.values,de),Oe=x.current[de].validate(Ae);return eR(Oe)?(O({type:"SET_ISVALIDATING",payload:!0}),Oe.then(function($e){return $e}).then(function($e){O({type:"SET_FIELD_ERROR",payload:{field:de,value:$e}}),O({type:"SET_ISVALIDATING",payload:!1})})):(O({type:"SET_FIELD_ERROR",payload:{field:de,value:Oe}}),Promise.resolve(Oe))}else if(f.validationSchema)return O({type:"SET_ISVALIDATING",payload:!0}),A(E.values,de).then(function($e){return $e}).then(function($e){O({type:"SET_FIELD_ERROR",payload:{field:de,value:Ma($e,de)}}),O({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),D=y.useCallback(function(de,Ae){var Oe=Ae.validate;x.current[de]={validate:Oe}},[]),H=y.useCallback(function(de){delete x.current[de]},[]),B=Ps(function(de,Ae){O({type:"SET_TOUCHED",payload:de});var Oe=Ae===void 0?o:Ae;return Oe?F(E.values):Promise.resolve()}),V=y.useCallback(function(de){O({type:"SET_ERRORS",payload:de})},[]),W=Ps(function(de,Ae){var Oe=Es(de)?de(E.values):de;O({type:"SET_VALUES",payload:Oe});var $e=Ae===void 0?n:Ae;return $e?F(Oe):Promise.resolve()}),G=y.useCallback(function(de,Ae){O({type:"SET_FIELD_ERROR",payload:{field:de,value:Ae}})},[]),Q=Ps(function(de,Ae,Oe){O({type:"SET_FIELD_VALUE",payload:{field:de,value:Ae}});var $e=Oe===void 0?n:Oe;return $e?F(eh(E.values,de,Ae)):Promise.resolve()}),Y=y.useCallback(function(de,Ae){var Oe=Ae,$e=de,Be;if(!Z$(de)){de.persist&&de.persist();var Je=de.target?de.target:de.currentTarget,ot=Je.type,lt=Je.name,it=Je.id,tt=Je.value,pt=Je.checked,qt=Je.outerHTML,qe=Je.options,Re=Je.multiple;Oe=Ae||lt||it,$e=/number|range/.test(ot)?(Be=parseFloat(tt),isNaN(Be)?"":Be):/checkbox/.test(ot)?ogt(Ma(E.values,Oe),pt,tt):qe&&Re?rgt(qe):tt}Oe&&Q(Oe,$e)},[Q,E.values]),ne=Ps(function(de){if(Z$(de))return function(Ae){return Y(Ae,de)};Y(de)}),ie=Ps(function(de,Ae,Oe){Ae===void 0&&(Ae=!0),O({type:"SET_FIELD_TOUCHED",payload:{field:de,value:Ae}});var $e=Oe===void 0?o:Oe;return $e?F(E.values):Promise.resolve()}),re=y.useCallback(function(de,Ae){de.persist&&de.persist();var Oe=de.target,$e=Oe.name,Be=Oe.id,Je=Oe.outerHTML,ot=Ae||$e||Be;ie(ot,!0)},[ie]),pe=Ps(function(de){if(Z$(de))return function(Ae){return re(Ae,de)};re(de)}),le=y.useCallback(function(de){Es(de)?O({type:"SET_FORMIK_STATE",payload:de}):O({type:"SET_FORMIK_STATE",payload:function(){return de}})},[]),ee=y.useCallback(function(de){O({type:"SET_STATUS",payload:de})},[]),ce=y.useCallback(function(de){O({type:"SET_ISSUBMITTING",payload:de})},[]),se=Ps(function(){return O({type:"SUBMIT_ATTEMPT"}),F().then(function(de){var Ae=de instanceof Error,Oe=!Ae&&Object.keys(de).length===0;if(Oe){var $e;try{if($e=ge(),$e===void 0)return}catch(Be){throw Be}return Promise.resolve($e).then(function(Be){return w.current&&O({type:"SUBMIT_SUCCESS"}),Be}).catch(function(Be){if(w.current)throw O({type:"SUBMIT_FAILURE"}),Be})}else if(w.current&&(O({type:"SUBMIT_FAILURE"}),Ae))throw de})}),Z=Ps(function(de){de&&de.preventDefault&&Es(de.preventDefault)&&de.preventDefault(),de&&de.stopPropagation&&Es(de.stopPropagation)&&de.stopPropagation(),se().catch(function(Ae){console.warn("Warning: An unhandled error was caught from submitForm()",Ae)})}),ue={resetForm:z,validateForm:F,validateField:_,setErrors:V,setFieldError:G,setFieldTouched:ie,setFieldValue:Q,setStatus:ee,setSubmitting:ce,setTouched:B,setValues:W,setFormikState:le,submitForm:se},ge=Ps(function(){return u(E.values,ue)}),we=Ps(function(de){de&&de.preventDefault&&Es(de.preventDefault)&&de.preventDefault(),de&&de.stopPropagation&&Es(de.stopPropagation)&&de.stopPropagation(),z()}),me=y.useCallback(function(de){return{value:Ma(E.values,de),error:Ma(E.errors,de),touched:!!Ma(E.touched,de),initialValue:Ma(p.current,de),initialTouched:!!Ma(g.current,de),initialError:Ma(m.current,de)}},[E.errors,E.touched,E.values]),be=y.useCallback(function(de){return{setValue:function(Oe,$e){return Q(de,Oe,$e)},setTouched:function(Oe,$e){return ie(de,Oe,$e)},setError:function(Oe){return G(de,Oe)}}},[Q,ie,G]),xe=y.useCallback(function(de){var Ae=HS(de),Oe=Ae?de.name:de,$e=Ma(E.values,Oe),Be={name:Oe,value:$e,onChange:ne,onBlur:pe};if(Ae){var Je=de.type,ot=de.value,lt=de.as,it=de.multiple;Je==="checkbox"?ot===void 0?Be.checked=!!$e:(Be.checked=!!(Array.isArray($e)&&~$e.indexOf(ot)),Be.value=ot):Je==="radio"?(Be.checked=$e===ot,Be.value=ot):lt==="select"&&it&&(Be.value=Be.value||[],Be.multiple=!0)}return Be},[pe,ne,E.values]),Ee=y.useMemo(function(){return!Pp(p.current,E.values)},[p.current,E.values]),Me=y.useMemo(function(){return typeof s<"u"?Ee?E.errors&&Object.keys(E.errors).length===0:s!==!1&&Es(s)?s(f):s:E.errors&&Object.keys(E.errors).length===0},[s,Ee,E.errors,f]),_e=Do({},E,{initialValues:p.current,initialErrors:m.current,initialTouched:g.current,initialStatus:v.current,handleBlur:pe,handleChange:ne,handleReset:we,handleSubmit:Z,resetForm:z,setErrors:V,setFormikState:le,setFieldTouched:ie,setFieldValue:Q,setFieldError:G,setStatus:ee,setSubmitting:ce,setTouched:B,setValues:W,submitForm:se,validateForm:F,validateField:_,isValid:Me,dirty:Ee,unregisterField:H,registerField:D,getFieldProps:xe,getFieldMeta:me,getFieldHelpers:be,validateOnBlur:o,validateOnChange:n,validateOnMount:a});return _e}function ul(e){var t=Zmt(e),n=e.component,r=e.children,o=e.render,i=e.innerRef;return y.useImperativeHandle(i,function(){return t}),y.createElement(Ymt,{value:t},n?y.createElement(n,t):o?o(t):r?Es(r)?r(t):Qmt(r)?null:y.Children.only(r):null)}function egt(e){var t={};if(e.inner){if(e.inner.length===0)return eh(t,e.path,e.message);for(var o=e.inner,n=Array.isArray(o),r=0,o=n?o:o[Symbol.iterator]();;){var i;if(n){if(r>=o.length)break;i=o[r++]}else{if(r=o.next(),r.done)break;i=r.value}var a=i;Ma(t,a.path)||(t=eh(t,a.path,a.message))}}return t}function tgt(e,t,n,r){n===void 0&&(n=!1);var o=fN(e);return t[n?"validateSync":"validate"](o,{abortEarly:!1,context:o})}function fN(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(o){return Array.isArray(o)===!0||x9(o)?fN(o):o!==""?o:void 0}):x9(e[r])?t[r]=fN(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function ngt(e,t,n){var r=e.slice();return t.forEach(function(i,a){if(typeof r[a]>"u"){var s=n.clone!==!1,l=s&&n.isMergeableObject(i);r[a]=l?aN(Array.isArray(i)?[]:{},i,n):i}else n.isMergeableObject(i)?r[a]=aN(e[a],i,n):e.indexOf(i)===-1&&r.push(i)}),r}function rgt(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function ogt(e,t,n){if(typeof e=="boolean")return!!t;var r=[],o=!1,i=-1;if(Array.isArray(e))r=e,i=e.indexOf(n),o=i>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!o?r.concat(n):o?r.slice(0,i).concat(r.slice(i+1)):r}var igt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?y.useLayoutEffect:y.useEffect;function Ps(e){var t=y.useRef(e);return igt(function(){t.current=e}),y.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var agt=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Oae=/^\d+$/,sgt=/^\d/,lgt=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,cgt=/^\s*(['"]?)(.*?)(\1)\s*$/,VB=512,K9=new Kh(VB),Y9=new Kh(VB),X9=new Kh(VB),th={Cache:Kh,split:pN,normalizePath:tR,setter:function(e){var t=tR(e);return Y9.get(e)||Y9.set(e,function(r,o){for(var i=0,a=t.length,s=r;ie.match(hgt)||[],Lk=e=>e[0].toUpperCase()+e.slice(1),UB=(e,t)=>Nk(e).join(t).toLowerCase(),Iae=e=>Nk(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),mgt=e=>Lk(Iae(e)),ggt=e=>UB(e,"_"),ygt=e=>UB(e,"-"),vgt=e=>Lk(UB(e," ")),bgt=e=>Nk(e).map(Lk).join(" ");var nR={words:Nk,upperFirst:Lk,camelCase:Iae,pascalCase:mgt,snakeCase:ggt,kebabCase:ygt,sentenceCase:vgt,titleCase:bgt},WB={exports:{}};WB.exports=function(e){return kae(wgt(e),e)};WB.exports.array=kae;function kae(e,t){var n=e.length,r=new Array(n),o={},i=n,a=xgt(t),s=Sgt(e);for(t.forEach(function(c){if(!s.has(c[0])||!s.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||l(e[i],i,new Set);return r;function l(c,u,d){if(d.has(c)){var f;try{f=", node was:"+JSON.stringify(c)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!s.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!o[u]){o[u]=!0;var p=a.get(c)||new Set;if(p=Array.from(p),u=p.length){d.add(c);do{var m=p[--u];l(m,s.get(m),d)}while(u);d.delete(c)}r[--n]=c}}}function wgt(e){for(var t=new Set,n=0,r=e.length;n"",kgt=/^Symbol\((.*)\)(.*)$/;function Mgt(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Q9(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return Mgt(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return Igt.call(e).replace(kgt,"Symbol($1)");const r=Tgt.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+Egt.call(e)+"]":r==="RegExp"?Ogt.call(e):null}function Ou(e,t){let n=Q9(e,t);return n!==null?n:JSON.stringify(e,function(r,o){let i=Q9(this[r],t);return i!==null?i:o},2)}function Mae(e){return e==null?[]:[].concat(e)}let Aae,$ae,Rae,Agt=/\$\{\s*(\w+)\s*\}/g;Aae=Symbol.toStringTag;class J9{constructor(t,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Aae]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],Mae(t).forEach(i=>{if(aa.isError(i)){this.errors.push(...i.errors);const a=i.inner.length?i.inner:[i];this.inner.push(...a)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}$ae=Symbol.hasInstance;Rae=Symbol.toStringTag;class aa extends Error{static formatError(t,n){const r=n.label||n.path||"this";return r!==n.path&&(n=Object.assign({},n,{path:r})),typeof t=="string"?t.replace(Agt,(o,i)=>Ou(n[i])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,o,i){const a=new J9(t,n,r,o);if(i)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Rae]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,aa)}static[$ae](t){return J9[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let dc={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${Ou(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ou(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Ou(n,!0)}\``+o}},ta={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Cd={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},hN={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},mN={isValue:"${path} field must be ${value}"},gN={noUnknown:"${path} field has unspecified keys: ${unknown}"},NP={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},$gt={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.lengtho)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${Ou(n,!0)}\``}return aa.formatError(dc.notType,e)}};Object.assign(Object.create(null),{mixed:dc,string:ta,number:Cd,date:hN,object:gN,array:NP,boolean:mN,tuple:$gt});const Fk=e=>e&&e.__isYupSchema__;class qE{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,a=typeof r=="function"?r:(...s)=>s.every(l=>l===r);return new qE(t,(s,l)=>{var c;let u=a(...s)?o:i;return(c=u==null?void 0:u(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,t,n);if(o===void 0||o===t)return t;if(!Fk(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const YC={context:"$",value:"."};class Yh{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===YC.context,this.isValue=this.key[0]===YC.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?YC.context:this.isValue?YC.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&th.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let o=this.isContext?r:this.isValue?t:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Yh.prototype.__isYupRef=!0;const Bl=e=>e==null;function Bm(e){function t({value:n,path:r="",options:o,originalValue:i,schema:a},s,l){const{name:c,test:u,params:d,message:f,skipAbsent:p}=e;let{parent:m,context:g,abortEarly:v=a.spec.abortEarly,disableStackTrace:w=a.spec.disableStackTrace}=o;function x(R){return Yh.isRef(R)?R.getValue(n,m,g):R}function S(R={}){const L=Object.assign({value:n,originalValue:i,label:a.spec.label,path:R.path||r,spec:a.spec,disableStackTrace:R.disableStackTrace||w},d,R.params);for(const z of Object.keys(L))L[z]=x(L[z]);const F=new aa(aa.formatError(R.message||f,L),n,L.path,R.type||c,L.disableStackTrace);return F.params=L,F}const P=v?s:l;let T={path:r,parent:m,type:c,from:o.from,createError:S,resolve:x,options:o,originalValue:i,schema:a};const E=R=>{aa.isError(R)?P(R):R?l(null):P(S())},O=R=>{aa.isError(R)?P(R):s(R)};if(p&&Bl(n))return E(!0);let A;try{var I;if(A=u.call(T,n,T),typeof((I=A)==null?void 0:I.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${T.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(A).then(E,O)}}catch(R){O(R);return}E(A)}return t.OPTIONS=e,t}function Rgt(e,t,n,r=n){let o,i,a;return t?(th.forEach(t,(s,l,c)=>{let u=l?s.slice(1,s.length-1):s;e=e.resolve({context:r,parent:o,value:n});let d=e.type==="tuple",f=c?parseInt(u,10):0;if(e.innerType||d){if(d&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[f],e=d?e.spec.types[f]:e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);o=n,n=n&&n[u],e=e.fields[u]}i=u,a=l?"["+s+"]":"."+s}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class KE extends Set{describe(){const t=[];for(const n of this.values())t.push(Yh.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new KE(this.values())}merge(t,n){const r=this.clone();return t.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function Tg(e,t=new Map){if(Fk(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r{this.typeError(dc.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Tg(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{t.tests.forEach(a=>{i.test(a.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,o,i;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),o=n.assert==="ignore-optionality",i=r._cast(t,n);if(n.assert!==!1&&!r.isType(i)){if(o&&Bl(i))return i;let a=Ou(t),s=Ou(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". +`));const t=v.useMemo(()=>D({},Frt,e.localeText),[e.localeText]);return v.useMemo(()=>D({},e,{localeText:t}),[e,t])},yn=()=>Bh().utils,zh=()=>Bh().defaultDates,Vh=e=>{const t=yn(),n=v.useRef();return n.current===void 0&&(n.current=t.date(void 0,e)),n.current},wo=()=>Bh().localeText,jrt=lt($.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Brt=lt($.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),zrt=lt($.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),Xre=lt($.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),Vrt=lt($.jsxs(v.Fragment,{children:[$.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),$.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),Hrt=lt($.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),Urt=lt($.jsxs(v.Fragment,{children:[$.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),$.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),Wrt=lt($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function Grt(e){return _e("MuiPickersArrowSwitcher",e)}Le("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const qrt=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],Krt=["ownerState"],Yrt=["ownerState"],Xrt=ie("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Qrt=ie("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),I8=ie(An,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),Jrt=e=>{const{classes:t}=e;return Te({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},Grt,t)},Qre=v.forwardRef(function(t,n){const r=nr(),o=Jt({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:s,slotProps:l,isNextDisabled:c,isNextHidden:u,onGoToNext:d,nextLabel:f,isPreviousDisabled:p,isPreviousHidden:m,onGoToPrevious:g,previousLabel:y,labelId:b}=o,x=Ue(o,qrt),S=o,P=Jrt(S),E={isDisabled:c,isHidden:u,goTo:d,label:f},T={isDisabled:p,isHidden:m,goTo:g,label:y},O=(s==null?void 0:s.previousIconButton)??I8,k=on({elementType:O,externalSlotProps:l==null?void 0:l.previousIconButton,additionalProps:{size:"medium",title:T.label,"aria-label":T.label,disabled:T.isDisabled,edge:"end",onClick:T.goTo},ownerState:D({},S,{hidden:T.isHidden}),className:pe(P.button,P.previousIconButton)}),M=(s==null?void 0:s.nextIconButton)??I8,I=on({elementType:M,externalSlotProps:l==null?void 0:l.nextIconButton,additionalProps:{size:"medium",title:E.label,"aria-label":E.label,disabled:E.isDisabled,edge:"start",onClick:E.goTo},ownerState:D({},S,{hidden:E.isHidden}),className:pe(P.button,P.nextIconButton)}),R=(s==null?void 0:s.leftArrowIcon)??Brt,_=on({elementType:R,externalSlotProps:l==null?void 0:l.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:S,className:P.leftArrowIcon}),N=Ue(_,Krt),B=(s==null?void 0:s.rightArrowIcon)??zrt,L=on({elementType:B,externalSlotProps:l==null?void 0:l.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:S,className:P.rightArrowIcon}),F=Ue(L,Yrt);return $.jsxs(Xrt,D({ref:n,className:pe(P.root,a),ownerState:S},x,{children:[$.jsx(O,D({},k,{children:r?$.jsx(B,D({},F)):$.jsx(R,D({},N))})),i?$.jsx(ut,{variant:"subtitle1",component:"span",id:b,children:i}):$.jsx(Qrt,{className:P.spacer,ownerState:S}),$.jsx(M,D({},I,{children:r?$.jsx(R,D({},N)):$.jsx(B,D({},F))}))]}))}),wc=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),rB=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(e!=null)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},Jre=["hours","minutes","seconds"],nv=e=>Jre.includes(e),I0=e=>Jre.includes(e)||e==="meridiem",Zrt=(e,t)=>e?t.getHours(e)>=12?"pm":"am":null,Tx=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?t==="am"?e-12:e+12:e,eot=(e,t,n,r)=>{const o=Tx(r.getHours(e),t,n);return r.setHours(e,o)},k8=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),DS=(e,t)=>(n,r)=>e?t.isAfter(n,r):k8(n,t)>k8(r,t),DT=(e,{format:t,views:n,ampm:r})=>{if(t!=null)return t;const o=e.formats;return wc(n,["hours"])?r?`${o.hours12h} ${o.meridiem}`:o.hours24h:wc(n,["minutes"])?o.minutes:wc(n,["seconds"])?o.seconds:wc(n,["minutes","seconds"])?`${o.minutes}:${o.seconds}`:wc(n,["hours","minutes","seconds"])?r?`${o.hours12h}:${o.minutes}:${o.seconds} ${o.meridiem}`:`${o.hours24h}:${o.minutes}:${o.seconds}`:r?`${o.hours12h}:${o.minutes} ${o.meridiem}`:`${o.hours24h}:${o.minutes}`};function _S({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:i,focusedView:a,onFocusedViewChange:s}){const l=v.useRef(n),c=v.useRef(o),u=v.useRef(o.includes(n)?n:o[0]),[d,f]=bi({name:"useViews",state:"view",controlled:r,default:u.current}),p=v.useRef(i?d:null),[m,g]=bi({name:"useViews",state:"focusedView",controlled:a,default:p.current});v.useEffect(()=>{(l.current&&l.current!==n||c.current&&c.current.some(O=>!o.includes(O)))&&(f(o.includes(n)?n:o[0]),c.current=o,l.current=n)},[n,f,d,o]);const y=o.indexOf(d),b=o[y-1]??null,x=o[y+1]??null,S=Ze((O,k)=>{g(k?O:M=>O===M?null:M),s==null||s(O,k)}),P=Ze(O=>{S(O,!0),O!==d&&(f(O),t&&t(O))}),E=Ze(()=>{x&&P(x)}),T=Ze((O,k,M)=>{const I=k==="finish",R=M?o.indexOf(M){const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function not(e,{disablePast:t,minDate:n,timezone:r}){const o=yn();return v.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}function hk(e,t,n,r){const o=yn(),i=Zrt(e,o),a=v.useCallback(s=>{const l=e==null?null:eot(e,s,!!t,o);n(l,r??"partial")},[t,e,n,r,o]);return{meridiemMode:i,handleMeridiemChange:a}}const Ox=36,mk=2,gk=320,rot=280,yk=336,Zre=232,k0=48,vk=ie("div")({overflow:"hidden",width:gk,maxHeight:yk,display:"flex",flexDirection:"column",margin:"0 auto"});function oot(e){return _e("MuiTimeClock",e)}Le("MuiTimeClock",["root","arrowSwitcher"]);const rv=220,Tu=36,Ix={x:rv/2,y:rv/2},eoe={x:Ix.x,y:0},iot=eoe.x-Ix.x,aot=eoe.y-Ix.y,sot=e=>e*(180/Math.PI),toe=(e,t,n)=>{const r=t-Ix.x,o=n-Ix.y,i=Math.atan2(iot,aot)-Math.atan2(r,o);let a=sot(i);a=Math.round(a/e)*e,a%=360;const s=Math.floor(a/e)||0,l=r**2+o**2,c=Math.sqrt(l);return{value:s,distance:c}},lot=(e,t,n=1)=>{const r=n*6;let{value:o}=toe(r,e,t);return o=o*n%60,o},cot=(e,t,n)=>{const{value:r,distance:o}=toe(30,e,t);let i=r||12;return n?i%=12:o{const{classes:t}=e;return Te({root:["root"],thumb:["thumb"]},uot,t)},pot=ie("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{shouldAnimate:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),hot=ie("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:`calc(50% - ${Tu/2}px)`,border:`${(Tu-4)/2}px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{hasSelected:!0},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function mot(e){const t=Jt({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:o,viewValue:i}=t,a=Ue(t,dot),s=v.useRef(o);v.useEffect(()=>{s.current=o},[o]);const l=D({},t,{shouldAnimate:s.current!==o}),c=fot(l),u=()=>{let f=360/(o==="hours"?12:60)*i;return o==="hours"&&i>12&&(f-=360),{height:Math.round((r?.26:.4)*rv),transform:`rotateZ(${f}deg)`}};return $.jsx(pot,D({style:u(),className:pe(c.root,n),ownerState:l},a,{children:$.jsx(hot,{ownerState:l,className:c.thumb})}))}function got(e){return _e("MuiClock",e)}Le("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const _T=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},lw=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:s})=>{const l=_T(a,a.date(void 0,s),e);n&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(r,l)&&(r=l);let c=e,u=e;for(a.isBefore(e,o)&&(c=o,u=null),a.isAfter(e,r)&&(u&&(u=r),c=null);c||u;){if(c&&a.isAfter(c,r)&&(c=null),u&&a.isBefore(u,o)&&(u=null),c){if(!i(c))return c;c=a.addDays(c,1)}if(u){if(!i(u))return u;u=a.addDays(u,-1)}}return null},yot=(e,t)=>t==null||!e.isValid(t)?null:t,Si=(e,t,n)=>t==null||!e.isValid(t)?n:t,vot=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),oB=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const o=r[r.length-1];r.push(e.addMonths(o,1))}return r},iB=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),Nl=(e,t)=>{const n=e.setHours(e.date(),t==="am"?2:14);return e.format(n,"meridiem")},bot=["year","month","day"],ov=e=>bot.includes(e),kx=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return wc(n,["year"])?o.year:wc(n,["month"])?o.month:wc(n,["day"])?o.dayOfMonth:wc(n,["month","year"])?`${o.month} ${o.year}`:wc(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},wot=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},xot=e=>{const{classes:t,meridiemMode:n}=e;return Te({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton",n==="am"&&"selected"],pmButton:["pmButton",n==="pm"&&"selected"],meridiemText:["meridiemText"]},got,t)},Sot=ie("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),Cot=ie("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),Pot=ie("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),Eot=ie("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{disabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),Tot=ie("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),noe=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:Tu,variants:[{props:{meridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),Oot=ie(An,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})(({theme:e})=>D({},noe(e,"am"),{position:"absolute",left:8})),Iot=ie(An,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})(({theme:e})=>D({},noe(e,"pm"),{position:"absolute",right:8})),M8=ie(ut,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function kot(e){const t=Jt({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:i,value:a,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:c,minutesStep:u=1,onChange:d,selectedId:f,type:p,viewValue:m,viewRange:[g,y],disabled:b=!1,readOnly:x,className:S}=t,P=t,E=yn(),T=wo(),O=v.useRef(!1),k=xot(P),M=l(m,p),I=!n&&p==="hours"&&(m<1||m>12),R=(K,ne)=>{b||x||l(K,p)||d(K,ne)},_=(K,ne)=>{let{offsetX:re,offsetY:oe}=K;if(re===void 0){const se=K.target.getBoundingClientRect();re=K.changedTouches[0].clientX-se.left,oe=K.changedTouches[0].clientY-se.top}const fe=p==="seconds"||p==="minutes"?lot(re,oe,u):cot(re,oe,!!n);R(fe,ne)},N=K=>{O.current=!0,_(K,"shallow")},B=K=>{O.current&&(_(K,"finish"),O.current=!1),K.preventDefault()},L=K=>{K.buttons>0&&_(K.nativeEvent,"shallow")},F=K=>{O.current&&(O.current=!1),_(K.nativeEvent,"finish")},U=v.useMemo(()=>p==="hours"?!0:m%5===0,[p,m]),V=p==="minutes"?u:1,z=v.useRef(null);xn(()=>{o&&z.current.focus()},[o]);const W=K=>Math.max(g,Math.min(y,K)),G=K=>(K+(y+1))%(y+1),J=K=>{if(!O.current)switch(K.key){case"Home":R(g,"partial"),K.preventDefault();break;case"End":R(y,"partial"),K.preventDefault();break;case"ArrowUp":R(G(m+V),"partial"),K.preventDefault();break;case"ArrowDown":R(G(m-V),"partial"),K.preventDefault();break;case"PageUp":R(W(m+5),"partial"),K.preventDefault();break;case"PageDown":R(W(m-5),"partial"),K.preventDefault();break;case"Enter":case" ":R(m,"finish"),K.preventDefault();break}};return $.jsxs(Sot,{className:pe(k.root,S),children:[$.jsxs(Cot,{className:k.clock,children:[$.jsx(Eot,{onTouchMove:N,onTouchStart:N,onTouchEnd:B,onMouseUp:F,onMouseMove:L,ownerState:{disabled:b},className:k.squareMask}),!M&&$.jsxs(v.Fragment,{children:[$.jsx(Tot,{className:k.pin}),a!=null&&$.jsx(mot,{type:p,viewValue:m,isInner:I,hasSelected:U})]}),$.jsx(Pot,{"aria-activedescendant":f,"aria-label":T.clockLabelText(p,a,E,a==null?null:E.format(a,"fullTime")),ref:z,role:"listbox",onKeyDown:J,tabIndex:0,className:k.wrapper,children:i})]}),n&&r&&$.jsxs(v.Fragment,{children:[$.jsx(Oot,{onClick:x?void 0:()=>s("am"),disabled:b||c===null,ownerState:P,className:k.amButton,title:Nl(E,"am"),children:$.jsx(M8,{variant:"caption",className:k.meridiemText,children:Nl(E,"am")})}),$.jsx(Iot,{disabled:b||c===null,onClick:x?void 0:()=>s("pm"),ownerState:P,className:k.pmButton,title:Nl(E,"pm"),children:$.jsx(M8,{variant:"caption",className:k.meridiemText,children:Nl(E,"pm")})})]})]})}function Mot(e){return _e("MuiClockNumber",e)}const FC=Le("MuiClockNumber",["root","selected","disabled"]),Aot=["className","disabled","index","inner","label","selected"],$ot=e=>{const{classes:t,selected:n,disabled:r}=e;return Te({root:["root",n&&"selected",r&&"disabled"]},Mot,t)},Rot=ie("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${FC.disabled}`]:t.disabled},{[`&.${FC.selected}`]:t.selected}]})(({theme:e})=>({height:Tu,width:Tu,position:"absolute",left:`calc((100% - ${Tu}px) / 2)`,display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${FC.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${FC.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{inner:!0},style:D({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function roe(e){const t=Jt({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:o,inner:i,label:a,selected:s}=t,l=Ue(t,Aot),c=t,u=$ot(c),d=o%12/12*Math.PI*2-Math.PI/2,f=(rv-Tu-2)/2*(i?.65:1),p=Math.round(Math.cos(d)*f),m=Math.round(Math.sin(d)*f);return $.jsx(Rot,D({className:pe(u.root,n),"aria-disabled":r?!0:void 0,"aria-selected":s?!0:void 0,role:"option",style:{transform:`translate(${p}px, ${m+(rv-Tu)/2}px`},ownerState:c},l,{children:a}))}const Dot=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:o,utils:i})=>{const a=t?i.getHours(t):null,s=[],l=e?1:0,c=e?12:23,u=d=>a===null?!1:e?d===12?a===12||a===0:a===d||a-12===d:a===d;for(let d=l;d<=c;d+=1){let f=d.toString();d===0&&(f="00");const p=!e&&(d===0||d>12);f=i.formatNumber(f);const m=u(d);s.push($.jsx(roe,{id:m?o:void 0,index:d,inner:p,selected:m,disabled:r(d),label:f,"aria-label":n(f)},d))}return s},A8=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const i=e.formatNumber;return[[5,i("05")],[10,i("10")],[15,i("15")],[20,i("20")],[25,i("25")],[30,i("30")],[35,i("35")],[40,i("40")],[45,i("45")],[50,i("50")],[55,i("55")],[0,i("00")]].map(([a,s],l)=>{const c=a===t;return $.jsx(roe,{label:s,id:c?o:void 0,index:l+1,inner:!1,disabled:n(a),selected:c,"aria-label":r(s)},a)})},aB=({timezone:e,value:t,defaultValue:n,referenceDate:r,onChange:o,valueManager:i})=>{const a=yn(),s=v.useRef(n),l=t??s.current??i.emptyValue,c=v.useMemo(()=>i.getTimezone(a,l),[a,i,l]),u=Ze(m=>c==null?m:i.setTimezone(a,c,m));let d;e?d=e:c?d=c:r?d=a.getTimezone(r):d="default";const f=v.useMemo(()=>i.setTimezone(a,d,l),[i,a,d,l]),p=Ze((m,...g)=>{const y=u(m);o==null||o(y,...g)});return{value:f,handleValueChange:p,timezone:d}},Xv=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:a})=>{const[s,l]=bi({name:e,state:"value",controlled:n,default:r??a.emptyValue}),c=Ze((u,...d)=>{l(u),i==null||i(u,...d)});return aB({timezone:t,value:s,defaultValue:void 0,referenceDate:o,onChange:c,valueManager:a})},Dl={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},_ot=e=>Math.max(...e.map(t=>Dl[t.type]??1)),o0=(e,t,n)=>{if(t===Dl.year)return e.startOfYear(n);if(t===Dl.month)return e.startOfMonth(n);if(t===Dl.day)return e.startOfDay(n);let r=n;return t{let i=o?o():o0(t,n,iB(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=o0(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=o0(t,n,e.maxDate));const a=DS(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=o0(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:_T(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=o0(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:_T(t,i,e.maxTime))),i},ooe=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(` +`));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},Not=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},bk=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map(s=>e.formatByString(s,t))},ioe=(e,t,n,r)=>{switch(n){case"month":return oB(e,e.date(void 0,t)).map(o=>e.formatByString(o,r));case"weekDay":return bk(e,r);case"meridiem":{const o=e.date(void 0,t);return[e.startOfDay(o),e.endOfDay(o)].map(i=>e.formatByString(i,r))}default:return[]}},$8="s",Fot=["0","1","2","3","4","5","6","7","8","9"],jot=e=>{const t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),$8)==="0"?Fot:Array.from({length:10}).map((r,o)=>e.formatByString(e.setSeconds(t,o),$8))},Ch=(e,t)=>{if(t[0]==="0")return e;const n=[];let r="";for(let o=0;o-1&&(n.push(i.toString()),r="")}return n.join("")},sB=(e,t)=>t[0]==="0"?e:e.split("").map(n=>t[Number(n)]).join(""),R8=(e,t)=>{const n=Ch(e,t);return n!==" "&&!Number.isNaN(Number(n))},aoe=(e,t)=>{let n=e;for(n=Number(n).toString();n.length{if(o.type==="day"&&o.contentType==="digit-with-letter"){const a=e.setDate(n.longestMonth,t);return e.formatByString(a,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=aoe(i,o.maxLength)),sB(i,r)},Bot=(e,t,n,r,o,i,a,s)=>{const l=Not(r),c=r==="Home",u=r==="End",d=n.value===""||c||u,f=()=>{const m=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),g=S=>soe(e,S,m,i,n),y=n.type==="minutes"&&(s!=null&&s.minutesStep)?s.minutesStep:1;let x=parseInt(Ch(n.value,i),10)+l*y;if(d){if(n.type==="year"&&!u&&!c)return e.formatByString(e.date(void 0,t),n.format);l>0||c?x=m.minimum:x=m.maximum}return x%y!==0&&((l<0||c)&&(x+=y-(y+x)%y),(l>0||u)&&(x-=x%y)),x>m.maximum?g(m.minimum+(x-m.maximum-1)%(m.maximum-m.minimum+1)):x{const m=ioe(e,t,n.type,n.format);if(m.length===0)return n.value;if(d)return l>0||c?m[0]:m[m.length-1];const b=((m.indexOf(n.value)+l)%m.length+m.length)%m.length;return m[b]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?f():p()},lB=(e,t,n)=>{let r=e.value||e.placeholder;const o=t==="non-input"?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t==="non-input"&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(Ch(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!o&&r.length===1&&(r=`${r}‎`),t==="input-rtl"&&(r=`⁨${r}⁩`),r},D8=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),loe=(e,t)=>e.formatByString(e.date(void 0,"system"),t).length===4,coe=(e,t,n,r)=>{if(t!=="digit")return!1;const o=e.date(void 0,"default");switch(n){case"year":return loe(e,r)?e.formatByString(e.setYear(o,1),r)==="0001":e.formatByString(e.setYear(o,2001),r)==="01";case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},zot=(e,t,n)=>{const r=t.some(l=>l.type==="day"),o=[],i=[];for(let l=0;le.map(t=>`${t.startSeparator}${t.value||t.placeholder}${t.endSeparator}`).join(""),Hot=(e,t,n)=>{const o=e.map(i=>{const a=lB(i,n?"input-rtl":"input-ltr",t);return`${i.startSeparator}${a}${i.endSeparator}`}).join("");return n?`⁦${o}⁩`:o},Uot=(e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=oB(e,r).reduce((l,c)=>{const u=e.getDaysInMonth(c);return u>l.maxDaysInMonth?{maxDaysInMonth:u,longestMonth:c}:l},{maxDaysInMonth:0,longestMonth:null});return{year:({format:l})=>({minimum:0,maximum:loe(e,l)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(o)+1}),day:({currentDate:l})=>({minimum:1,maximum:l!=null&&e.isValid(l)?e.getDaysInMonth(l):a,longestMonth:s}),weekDay:({format:l,contentType:c})=>{if(c==="digit"){const u=bk(e,l).map(Number);return{minimum:Math.min(...u),maximum:Math.max(...u)}}return{minimum:1,maximum:7}},hours:({format:l})=>{const c=e.getHours(i);return Ch(e.formatByString(e.endOfDay(r),l),t)!==c.toString()?{minimum:1,maximum:Number(Ch(e.formatByString(e.startOfDay(r),l),t))}:{minimum:0,maximum:c}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},Wot=(e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{const o=bk(e,t.format),i=e.formatByString(n,t.format),a=o.indexOf(i),l=o.indexOf(t.value)-a;return e.addDays(n,l)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const o=e.getHours(n)<12,i=e.getHours(r);return o&&i>=12?e.addHours(r,-12):!o&&i<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}},_8={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},L8=(e,t,n,r,o)=>[...n].sort((i,a)=>_8[i.type]-_8[a.type]).reduce((i,a)=>!o||a.modified?Wot(e,a,t,i):i,r),Got=()=>navigator.userAgent.toLowerCase().includes("android"),qot=(e,t)=>{const n={};if(!t)return e.forEach((l,c)=>{const u=c===0?null:c-1,d=c===e.length-1?null:c+1;n[c]={leftIndex:u,rightIndex:d}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex((l,c)=>{var u;return c>=i&&((u=l.endSeparator)==null?void 0:u.includes(" "))&&l.endSeparator!==" / "}),a===-1&&(a=e.length-1);for(let l=a;l>=i;l-=1)o[l]=s,r[s]=l,s-=1;i=a+1}return e.forEach((l,c)=>{const u=o[c],d=u===0?null:r[u-1],f=u===e.length-1?null:r[u+1];n[c]={leftIndex:d,rightIndex:f}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}},K_=(e,t)=>{if(e==null)return null;if(e==="all")return"all";if(typeof e=="string"){const n=t.findIndex(r=>r.type===e);return n===-1?null:n}return e},Kot=(e,t)=>{if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}},Yot=(e,t)=>{if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}},Xot=["value","referenceDate"],Zr={emptyValue:null,getTodayValue:iB,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=Ue(e,Xot);return t!=null&&r.utils.isValid(t)?t:n??Lot(r)},cleanValue:yot,areValuesEqual:vot,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>t==null||!e.isValid(t)?null:e.getTimezone(t),setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},cB={updateReferenceValue:(e,t,n)=>t==null||!e.isValid(t)?n:t,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&!!n?n:r(t),getV7HiddenInputValueFromSections:Vot,getV6InputValueFromSections:Hot,getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:n=>n,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:n==null||!e.isValid(n)?t.referenceValue:n})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},uB=({value:e,referenceDate:t,utils:n,props:r,timezone:o})=>{const i=v.useMemo(()=>Zr.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:Dl.day,timezone:o,getTodayDate:()=>iB(n,o,"date")}),[]);return e??i},Qot=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],Jot=e=>{const{classes:t}=e;return Te({root:["root"],arrowSwitcher:["arrowSwitcher"]},oot,t)},Zot=ie(vk,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),eit=ie(Qre,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),tit=["hours","minutes"],nit=v.forwardRef(function(t,n){const r=yn(),o=Jt({props:t,name:"MuiTimeClock"}),{ampm:i=r.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:s,slots:l,slotProps:c,value:u,defaultValue:d,referenceDate:f,disableIgnoringDatePartForTimeValidation:p=!1,maxTime:m,minTime:g,disableFuture:y,disablePast:b,minutesStep:x=1,shouldDisableTime:S,showViewSwitcher:P,onChange:E,view:T,views:O=tit,openTo:k,onViewChange:M,focusedView:I,onFocusedViewChange:R,className:_,disabled:N,readOnly:B,timezone:L}=o,F=Ue(o,Qot),{value:U,handleValueChange:V,timezone:z}=Xv({name:"TimeClock",timezone:L,value:u,defaultValue:d,referenceDate:f,onChange:E,valueManager:Zr}),W=uB({value:U,referenceDate:f,utils:r,props:o,timezone:z}),G=wo(),J=Vh(z),{view:K,setView:ne,previousView:re,nextView:oe,setValueAndGoToNextView:fe}=_S({view:T,views:O,openTo:k,onViewChange:M,onChange:V,focusedView:I,onFocusedViewChange:R}),{meridiemMode:se,handleMeridiemChange:ee}=hk(W,i,fe),ce=v.useCallback((xe,me)=>{const be=DS(p,r),we=me==="hours"||me==="minutes"&&O.includes("seconds"),Oe=({start:je,end:de})=>!(g&&be(g,de)||m&&be(je,m)||y&&be(je,J)||b&&be(J,we?de:je)),ke=(je,de=1)=>{if(je%de!==0)return!1;if(S)switch(me){case"hours":return!S(r.setHours(W,je),"hours");case"minutes":return!S(r.setMinutes(W,je),"minutes");case"seconds":return!S(r.setSeconds(W,je),"seconds");default:return!1}return!0};switch(me){case"hours":{const je=Tx(xe,se,i),de=r.setHours(W,je);if(r.getHours(de)!==je)return!0;const Re=r.setSeconds(r.setMinutes(de,0),0),Me=r.setSeconds(r.setMinutes(de,59),59);return!Oe({start:Re,end:Me})||!ke(je)}case"minutes":{const je=r.setMinutes(W,xe),de=r.setSeconds(je,0),Re=r.setSeconds(je,59);return!Oe({start:de,end:Re})||!ke(xe,x)}case"seconds":{const je=r.setSeconds(W,xe);return!Oe({start:je,end:je})||!ke(xe)}default:throw new Error("not supported")}},[i,W,p,m,se,g,x,S,r,y,b,J,O]),le=_n(),Q=v.useMemo(()=>{switch(K){case"hours":{const xe=(we,Oe)=>{const ke=Tx(we,se,i);fe(r.setHours(W,ke),Oe,"hours")},me=r.getHours(W);let be;return i?me>12?be=[12,23]:be=[0,11]:be=[0,23],{onChange:xe,viewValue:me,children:Dot({value:U,utils:r,ampm:i,onChange:xe,getClockNumberText:G.hoursClockNumberText,isDisabled:we=>N||ce(we,"hours"),selectedId:le}),viewRange:be}}case"minutes":{const xe=r.getMinutes(W),me=(be,we)=>{fe(r.setMinutes(W,be),we,"minutes")};return{viewValue:xe,onChange:me,children:A8({utils:r,value:xe,onChange:me,getClockNumberText:G.minutesClockNumberText,isDisabled:be=>N||ce(be,"minutes"),selectedId:le}),viewRange:[0,59]}}case"seconds":{const xe=r.getSeconds(W),me=(be,we)=>{fe(r.setSeconds(W,be),we,"seconds")};return{viewValue:xe,onChange:me,children:A8({utils:r,value:xe,onChange:me,getClockNumberText:G.secondsClockNumberText,isDisabled:be=>N||ce(be,"seconds"),selectedId:le}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}},[K,r,U,i,G.hoursClockNumberText,G.minutesClockNumberText,G.secondsClockNumberText,se,fe,W,ce,le,N]),ue=o,ge=Jot(ue);return $.jsxs(Zot,D({ref:n,className:pe(ge.root,_),ownerState:ue},F,{children:[$.jsx(kot,D({autoFocus:s??!!I,ampmInClock:a&&O.includes("hours"),value:U,type:K,ampm:i,minutesStep:x,isTimeDisabled:ce,meridiemMode:se,handleMeridiemChange:ee,selectedId:le,disabled:N,readOnly:B},Q)),P&&$.jsx(eit,{className:ge.arrowSwitcher,slots:l,slotProps:c,onGoToPrevious:()=>ne(re),isPreviousDisabled:!re,previousLabel:G.openPreviousView,onGoToNext:()=>ne(oe),isNextDisabled:!oe,nextLabel:G.openNextView,ownerState:ue})]}))});function rit(e){return _e("MuiDigitalClock",e)}const oit=Le("MuiDigitalClock",["root","list","item"]);function Jm(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const iit=(e,t)=>n=>{(n.key==="Enter"||n.key===" ")&&(e(n),n.preventDefault(),n.stopPropagation())},oa=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?oa(t.shadowRoot):t:null},LT=e=>Array.from(e.children).indexOf(oa(document)),dB="@media (pointer: fine)",ait=["ampm","timeStep","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","views","skipDisabled","timezone"],sit=e=>{const{classes:t}=e;return Te({root:["root"],list:["list"],item:["item"]},rit,t)},lit=ie(vk,{name:"MuiDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})({overflowY:"auto",width:"100%","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:Zre,variants:[{props:{alreadyRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),cit=ie(Ev,{name:"MuiDigitalClock",slot:"List",overridesResolver:(e,t)=>t.list})({padding:0}),uit=ie(tn,{name:"MuiDigitalClock",slot:"Item",overridesResolver:(e,t)=>t.item})(({theme:e})=>({padding:"8px 16px",margin:"2px 4px","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:vt(e.palette.primary.main,e.palette.action.focusOpacity)}})),dit=v.forwardRef(function(t,n){const r=yn(),o=v.useRef(null),i=Wt(n,o),a=v.useRef(null),s=Jt({props:t,name:"MuiDigitalClock"}),{ampm:l=r.is12HourCycleInCurrentLocale(),timeStep:c=30,autoFocus:u,slots:d,slotProps:f,value:p,defaultValue:m,referenceDate:g,disableIgnoringDatePartForTimeValidation:y=!1,maxTime:b,minTime:x,disableFuture:S,disablePast:P,minutesStep:E=1,shouldDisableTime:T,onChange:O,view:k,openTo:M,onViewChange:I,focusedView:R,onFocusedViewChange:_,className:N,disabled:B,readOnly:L,views:F=["hours"],skipDisabled:U=!1,timezone:V}=s,z=Ue(s,ait),{value:W,handleValueChange:G,timezone:J}=Xv({name:"DigitalClock",timezone:V,value:p,defaultValue:m,referenceDate:g,onChange:O,valueManager:Zr}),K=wo(),ne=Vh(J),re=v.useMemo(()=>D({},s,{alreadyRendered:!!o.current}),[s]),oe=sit(re),fe=(d==null?void 0:d.digitalClockItem)??uit,se=on({elementType:fe,externalSlotProps:f==null?void 0:f.digitalClockItem,ownerState:{},className:oe.item}),ee=uB({value:W,referenceDate:g,utils:r,props:s,timezone:J}),ce=Ze(be=>G(be,"finish","hours")),{setValueAndGoToNextView:le}=_S({view:k,views:F,openTo:M,onViewChange:I,onChange:ce,focusedView:R,onFocusedViewChange:_}),Q=Ze(be=>{le(be,"finish")});v.useEffect(()=>{if(o.current===null)return;const be=o.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!be)return;const we=be.offsetTop;(u||R)&&be.focus(),o.current.scrollTop=we-4});const ue=v.useCallback(be=>{const we=DS(y,r),Oe=()=>!(x&&we(x,be)||b&&we(be,b)||S&&we(be,ne)||P&&we(ne,be)),ke=()=>r.getMinutes(be)%E!==0?!1:T?!T(be,"hours"):!0;return!Oe()||!ke()},[y,r,x,b,S,ne,P,E,T]),ge=v.useMemo(()=>{const be=[];let Oe=r.startOfDay(ee);for(;r.isSameDay(ee,Oe);)be.push(Oe),Oe=r.addMinutes(Oe,c);return be},[ee,c,r]),xe=ge.findIndex(be=>r.isEqual(be,ee)),me=be=>{switch(be.key){case"PageUp":{const we=LT(a.current)-5,Oe=a.current.children,ke=Math.max(0,we),je=Oe[ke];je&&je.focus(),be.preventDefault();break}case"PageDown":{const we=LT(a.current)+5,Oe=a.current.children,ke=Math.min(Oe.length-1,we),je=Oe[ke];je&&je.focus(),be.preventDefault();break}}};return $.jsx(lit,D({ref:i,className:pe(oe.root,N),ownerState:re},z,{children:$.jsx(cit,{ref:a,role:"listbox","aria-label":K.timePickerToolbarTitle,className:oe.list,onKeyDown:me,children:ge.map((be,we)=>{if(U&&ue(be))return null;const Oe=r.isEqual(be,W),ke=r.format(be,l?"fullTime12h":"fullTime24h"),je=xe===we||xe===-1&&we===0?0:-1;return $.jsx(fe,D({onClick:()=>!L&&Q(be),selected:Oe,disabled:B||ue(be),disableRipple:L,role:"option","aria-disabled":L,"aria-selected":Oe,tabIndex:je},se,{children:ke}),`${be.valueOf()}-${ke}`)})})}))});function fit(e){return _e("MuiMultiSectionDigitalClock",e)}const N8=Le("MuiMultiSectionDigitalClock",["root"]);function pit(e){return _e("MuiMultiSectionDigitalClockSection",e)}const hit=Le("MuiMultiSectionDigitalClockSection",["root","item"]),mit=["autoFocus","onChange","className","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],git=e=>{const{classes:t}=e;return Te({root:["root"],item:["item"]},pit,t)},yit=ie(Ev,{name:"MuiMultiSectionDigitalClockSection",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({maxHeight:Zre,width:56,padding:0,overflow:"hidden","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},"@media (pointer: fine)":{"&:hover":{overflowY:"auto"}},"@media (pointer: none), (pointer: coarse)":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"&::after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"},variants:[{props:{alreadyRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]})),vit=ie(tn,{name:"MuiMultiSectionDigitalClockSection",slot:"Item",overridesResolver:(e,t)=>t.item})(({theme:e})=>({padding:8,margin:"2px 4px",width:k0,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:vt(e.palette.primary.main,e.palette.action.focusOpacity)}})),bit=v.forwardRef(function(t,n){const r=v.useRef(null),o=Wt(n,r),i=v.useRef(null),a=Jt({props:t,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:s,onChange:l,className:c,disabled:u,readOnly:d,items:f,active:p,slots:m,slotProps:g,skipDisabled:y}=a,b=Ue(a,mit),x=v.useMemo(()=>D({},a,{alreadyRendered:!!r.current}),[a]),S=git(x),P=(m==null?void 0:m.digitalClockSectionItem)??vit;v.useEffect(()=>{if(r.current===null)return;const O=r.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(p&&s&&O&&O.focus(),!O||i.current===O)return;i.current=O;const k=O.offsetTop;r.current.scrollTop=k-4});const E=f.findIndex(O=>O.isFocused(O.value)),T=O=>{switch(O.key){case"PageUp":{const k=LT(r.current)-5,M=r.current.children,I=Math.max(0,k),R=M[I];R&&R.focus(),O.preventDefault();break}case"PageDown":{const k=LT(r.current)+5,M=r.current.children,I=Math.min(M.length-1,k),R=M[I];R&&R.focus(),O.preventDefault();break}}};return $.jsx(yit,D({ref:o,className:pe(S.root,c),ownerState:x,autoFocusItem:s&&p,role:"listbox",onKeyDown:T},b,{children:f.map((O,k)=>{var N;const M=(N=O.isDisabled)==null?void 0:N.call(O,O.value),I=u||M;if(y&&I)return null;const R=O.isSelected(O.value),_=E===k||E===-1&&k===0?0:-1;return $.jsx(P,D({onClick:()=>!d&&l(O.value),selected:R,disabled:I,disableRipple:d,role:"option","aria-disabled":d||I||void 0,"aria-label":O.ariaLabel,"aria-selected":R,tabIndex:_,className:S.item},g==null?void 0:g.digitalClockSectionItem,{children:O.label}),O.label)})}))}),wit=({now:e,value:t,utils:n,ampm:r,isDisabled:o,resolveAriaLabel:i,timeStep:a,valueOrReferenceDate:s})=>{const l=t?n.getHours(t):null,c=[],u=(p,m)=>{const g=m??l;return g===null?!1:r?p===12?g===12||g===0:g===p||g-12===p:g===p},d=p=>u(p,n.getHours(s)),f=r?11:23;for(let p=0;p<=f;p+=a){let m=n.format(n.setHours(e,p),r?"hours12h":"hours24h");const g=i(parseInt(m,10).toString());m=n.formatNumber(m),c.push({value:p,label:m,isSelected:u,isDisabled:o,isFocused:d,ariaLabel:g})}return c},F8=({value:e,utils:t,isDisabled:n,timeStep:r,resolveLabel:o,resolveAriaLabel:i,hasValue:a=!0})=>{const s=c=>e===null?!1:a&&e===c,l=c=>e===c;return[...Array.from({length:Math.ceil(60/r)},(c,u)=>{const d=r*u;return{value:d,label:t.formatNumber(o(d)),isDisabled:n,isSelected:s,isFocused:l,ariaLabel:i(d.toString())}})]},xit=["ampm","timeSteps","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","skipDisabled","timezone"],Sit=e=>{const{classes:t}=e;return Te({root:["root"]},fit,t)},Cit=ie(vk,{name:"MuiMultiSectionDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),Pit=v.forwardRef(function(t,n){const r=yn(),o=nr(),i=Jt({props:t,name:"MuiMultiSectionDigitalClock"}),{ampm:a=r.is12HourCycleInCurrentLocale(),timeSteps:s,autoFocus:l,slots:c,slotProps:u,value:d,defaultValue:f,referenceDate:p,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:g,minTime:y,disableFuture:b,disablePast:x,minutesStep:S=1,shouldDisableTime:P,onChange:E,view:T,views:O=["hours","minutes"],openTo:k,onViewChange:M,focusedView:I,onFocusedViewChange:R,className:_,disabled:N,readOnly:B,skipDisabled:L=!1,timezone:F}=i,U=Ue(i,xit),{value:V,handleValueChange:z,timezone:W}=Xv({name:"MultiSectionDigitalClock",timezone:F,value:d,defaultValue:f,referenceDate:p,onChange:E,valueManager:Zr}),G=wo(),J=Vh(W),K=v.useMemo(()=>D({hours:1,minutes:5,seconds:5},s),[s]),ne=uB({value:V,referenceDate:p,utils:r,props:i,timezone:W}),re=Ze((Oe,ke,je)=>z(Oe,ke,je)),oe=v.useMemo(()=>!a||!O.includes("hours")||O.includes("meridiem")?O:[...O,"meridiem"],[a,O]),{view:fe,setValueAndGoToNextView:se,focusedView:ee}=_S({view:T,views:oe,openTo:k,onViewChange:M,onChange:re,focusedView:I,onFocusedViewChange:R}),ce=Ze(Oe=>{se(Oe,"finish","meridiem")}),{meridiemMode:le,handleMeridiemChange:Q}=hk(ne,a,ce,"finish"),ue=v.useCallback((Oe,ke)=>{const je=DS(m,r),de=ke==="hours"||ke==="minutes"&&oe.includes("seconds"),Re=({start:Ae,end:Ne})=>!(y&&je(y,Ne)||g&&je(Ae,g)||b&&je(Ae,J)||x&&je(J,de?Ne:Ae)),Me=(Ae,Ne=1)=>{if(Ae%Ne!==0)return!1;if(P)switch(ke){case"hours":return!P(r.setHours(ne,Ae),"hours");case"minutes":return!P(r.setMinutes(ne,Ae),"minutes");case"seconds":return!P(r.setSeconds(ne,Ae),"seconds");default:return!1}return!0};switch(ke){case"hours":{const Ae=Tx(Oe,le,a),Ne=r.setHours(ne,Ae);if(r.getHours(Ne)!==Ae)return!0;const Je=r.setSeconds(r.setMinutes(Ne,0),0),nt=r.setSeconds(r.setMinutes(Ne,59),59);return!Re({start:Je,end:nt})||!Me(Ae)}case"minutes":{const Ae=r.setMinutes(ne,Oe),Ne=r.setSeconds(Ae,0),Je=r.setSeconds(Ae,59);return!Re({start:Ne,end:Je})||!Me(Oe,S)}case"seconds":{const Ae=r.setSeconds(ne,Oe);return!Re({start:Ae,end:Ae})||!Me(Oe)}default:throw new Error("not supported")}},[a,ne,m,g,le,y,S,P,r,b,x,J,oe]),ge=v.useCallback(Oe=>{switch(Oe){case"hours":return{onChange:ke=>{const je=Tx(ke,le,a);se(r.setHours(ne,je),"finish","hours")},items:wit({now:J,value:V,ampm:a,utils:r,isDisabled:ke=>ue(ke,"hours"),timeStep:K.hours,resolveAriaLabel:G.hoursClockNumberText,valueOrReferenceDate:ne})};case"minutes":return{onChange:ke=>{se(r.setMinutes(ne,ke),"finish","minutes")},items:F8({value:r.getMinutes(ne),utils:r,isDisabled:ke=>ue(ke,"minutes"),resolveLabel:ke=>r.format(r.setMinutes(J,ke),"minutes"),timeStep:K.minutes,hasValue:!!V,resolveAriaLabel:G.minutesClockNumberText})};case"seconds":return{onChange:ke=>{se(r.setSeconds(ne,ke),"finish","seconds")},items:F8({value:r.getSeconds(ne),utils:r,isDisabled:ke=>ue(ke,"seconds"),resolveLabel:ke=>r.format(r.setSeconds(J,ke),"seconds"),timeStep:K.seconds,hasValue:!!V,resolveAriaLabel:G.secondsClockNumberText})};case"meridiem":{const ke=Nl(r,"am"),je=Nl(r,"pm");return{onChange:Q,items:[{value:"am",label:ke,isSelected:()=>!!V&&le==="am",isFocused:()=>!!ne&&le==="am",ariaLabel:ke},{value:"pm",label:je,isSelected:()=>!!V&&le==="pm",isFocused:()=>!!ne&&le==="pm",ariaLabel:je}]}}default:throw new Error(`Unknown view: ${Oe} found.`)}},[J,V,a,r,K.hours,K.minutes,K.seconds,G.hoursClockNumberText,G.minutesClockNumberText,G.secondsClockNumberText,le,se,ne,ue,Q]),xe=v.useMemo(()=>{if(!o)return oe;const Oe=oe.filter(ke=>ke!=="meridiem");return Oe.reverse(),oe.includes("meridiem")&&Oe.push("meridiem"),Oe},[o,oe]),me=v.useMemo(()=>oe.reduce((Oe,ke)=>D({},Oe,{[ke]:ge(ke)}),{}),[oe,ge]),be=i,we=Sit(be);return $.jsx(Cit,D({ref:n,className:pe(we.root,_),ownerState:be,role:"group"},U,{children:xe.map(Oe=>$.jsx(bit,{items:me[Oe].items,onChange:me[Oe].onChange,active:fe===Oe,autoFocus:l??ee===Oe,disabled:N,readOnly:B,slots:c,slotProps:u,skipDisabled:L,"aria-label":G.selectViewText(Oe)},Oe))}))});function Eit(e){return _e("MuiPickersDay",e)}const dp=Le("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),Tit=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],Oit=e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,c=a&&!s;return Te({root:["root",t&&!c&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",a&&s&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},Eit,l)},uoe=({theme:e})=>D({},e.typography.caption,{width:Ox,height:Ox,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:vt(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${dp.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${dp.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${dp.disabled}:not(.${dp.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${dp.disabled}&.${dp.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${mk}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${dp.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),doe=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},Iit=ie(Hi,{name:"MuiPickersDay",slot:"Root",overridesResolver:doe})(uoe),kit=ie("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:doe})(({theme:e})=>D({},uoe({theme:e}),{opacity:0,pointerEvents:"none"})),i0=()=>{},Mit=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,day:a,disabled:s=!1,disableHighlightToday:l=!1,disableMargin:c=!1,isAnimating:u,onClick:d,onDaySelect:f,onFocus:p=i0,onBlur:m=i0,onKeyDown:g=i0,onMouseDown:y=i0,onMouseEnter:b=i0,outsideCurrentMonth:x,selected:S=!1,showDaysOutsideCurrentMonth:P=!1,children:E,today:T=!1}=r,O=Ue(r,Tit),k=D({},r,{autoFocus:o,disabled:s,disableHighlightToday:l,disableMargin:c,selected:S,showDaysOutsideCurrentMonth:P,today:T}),M=Oit(k),I=yn(),R=v.useRef(null),_=Wt(R,n);xn(()=>{o&&!s&&!u&&!x&&R.current.focus()},[o,s,u,x]);const N=L=>{y(L),x&&L.preventDefault()},B=L=>{s||f(a),x&&L.currentTarget.focus(),d&&d(L)};return x&&!P?$.jsx(kit,{className:pe(M.root,M.hiddenDaySpacingFiller,i),ownerState:k,role:O.role}):$.jsx(Iit,D({className:pe(M.root,i),ref:_,centerRipple:!0,disabled:s,tabIndex:S?0:-1,onKeyDown:L=>g(L,a),onFocus:L=>p(L,a),onBlur:L=>m(L,a),onMouseEnter:L=>b(L,a),onClick:B,onMouseDown:N},O,{ownerState:k,children:E||I.format(a,"dayOfMonth")}))}),Ait=v.memo(Mit),Qv=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,c=r.utils.date(void 0,n),u=Si(r.utils,e.minDate,r.defaultDates.minDate),d=Si(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(o&&o(t)):return"shouldDisableDate";case!!(i&&i(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,c)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,c)):return"disablePast";case!!(u&&r.utils.isBeforeDay(t,u)):return"minDate";case!!(d&&r.utils.isAfterDay(t,d)):return"maxDate";default:return null}};Qv.valueManager=Zr;const LS=({adapter:e,value:t,timezone:n,props:r})=>{if(t===null)return null;const{minTime:o,maxTime:i,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:c,disableFuture:u}=r,d=e.utils.date(void 0,n),f=DS(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(o&&f(o,t)):return"minTime";case!!(i&&f(t,i)):return"maxTime";case!!(u&&e.utils.isAfter(t,d)):return"disableFuture";case!!(c&&e.utils.isBefore(t,d)):return"disablePast";case!!(s&&s(t,"hours")):return"shouldDisableTime-hours";case!!(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case!!(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case!!(a&&e.utils.getMinutes(t)%a!==0):return"minutesStep";default:return null}};LS.valueManager=Zr;const wk=({adapter:e,value:t,timezone:n,props:r})=>{const o=Qv({adapter:e,value:t,timezone:n,props:r});return o!==null?o:LS({adapter:e,value:t,timezone:n,props:r})};wk.valueManager=Zr;const Y_=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],X_=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],foe=["minDateTime","maxDateTime"],$it=[...Y_,...X_,...foe],Jv=e=>$it.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function poe(e){const{props:t,validator:n,value:r,timezone:o,onError:i}=e,a=Bh(),s=v.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:o,props:t}),c=n.valueManager.hasError(l);v.useEffect(()=>{i&&!n.valueManager.isSameError(l,s.current)&&i(l,r),s.current=l},[n,i,l,r]);const u=Ze(d=>n({adapter:a,value:d,timezone:o,props:t}));return{validationError:l,hasValidationError:c,getValidationErrorForNewValue:u}}const Rit=({utils:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return o},Dit=({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n},_it=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},Lit=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:a,startSeparator:s})=>{if(a==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=ooe(e,a),c=coe(e,l.contentType,l.type,a),u=n?c:l.contentType==="digit",d=t!=null&&e.isValid(t);let f=d?e.formatByString(t,a):"",p=null;if(u)if(c)p=f===""?e.formatByString(i,a).length:f.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);p=l.maxLength,d&&(f=sB(aoe(Ch(f,o),p),o))}return D({},l,{format:a,maxLength:p,value:f,placeholder:_it(e,r,l,a),hasLeadingZerosInFormat:c,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:"",modified:!1})},Nit=e=>{var p;const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort((m,g)=>g.length-m.length),l=/^([a-zA-Z]+)/,c=new RegExp(`^(${s.join("|")})*$`),u=new RegExp(`^(${s.join("|")})`),d=m=>r.find(g=>g.start<=m&&g.end>=m);let f=0;for(;f0;){const x=u.exec(b)[1];b=b.slice(x.length),i.push(Lit(D({},e,{now:o,token:x,startSeparator:a}))),a=""}f+=y.length}else{const b=n[f];g&&(m==null?void 0:m.start)===f||(m==null?void 0:m.end)===f||(i.length===0?a+=b:i[i.length-1].endSeparator+=b),f+=1}}return i.length===0&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i},Fit=({isRtl:e,formatDensity:t,sections:n})=>n.map(r=>{const o=i=>{let a=i;return e&&a!==null&&a.includes(" ")&&(a=`⁩${a}⁦`),t==="spacious"&&["/",".","-"].includes(a)&&(a=` ${a} `),a};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),j8=e=>{let t=Rit(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=Dit(D({},e,{expandedFormat:t})),r=Nit(D({},e,{expandedFormat:t,escapedParts:n}));return Fit(D({},e,{sections:r}))},jit=e=>{const t=yn(),n=wo(),r=Bh(),o=nr(),{valueManager:i,fieldValueManager:a,valueType:s,validator:l,internalProps:c,internalProps:{value:u,defaultValue:d,referenceDate:f,onChange:p,format:m,formatDensity:g="dense",selectedSections:y,onSelectedSectionsChange:b,shouldRespectLeadingZeros:x=!1,timezone:S,enableAccessibleFieldDOMStructure:P=!1}}=e,{timezone:E,value:T,handleValueChange:O}=aB({timezone:S,value:u,defaultValue:d,referenceDate:f,onChange:p,valueManager:i}),k=v.useMemo(()=>jot(t),[t]),M=v.useMemo(()=>Uot(t,k,E),[t,k,E]),I=v.useCallback((re,oe=null)=>a.getSectionsFromValue(t,re,oe,fe=>j8({utils:t,localeText:n,localizedDigits:k,format:m,date:fe,formatDensity:g,shouldRespectLeadingZeros:x,enableAccessibleFieldDOMStructure:P,isRtl:o})),[a,m,n,k,o,x,t,g,P]),[R,_]=v.useState(()=>{const re=I(T),oe={sections:re,value:T,referenceValue:i.emptyValue,tempValueStrAndroid:null},fe=_ot(re),se=i.getInitialReferenceValue({referenceDate:f,value:T,utils:t,props:c,granularity:fe,timezone:E});return D({},oe,{referenceValue:se})}),[N,B]=bi({controlled:y,default:null,name:"useField",state:"selectedSections"}),L=re=>{B(re),b==null||b(re)},F=v.useMemo(()=>K_(N,R.sections),[N,R.sections]),U=F==="all"?0:F,V=({value:re,referenceValue:oe,sections:fe})=>{if(_(ee=>D({},ee,{sections:fe,value:re,referenceValue:oe,tempValueStrAndroid:null})),i.areValuesEqual(t,R.value,re))return;const se={validationError:l({adapter:r,value:re,timezone:E,props:c})};O(re,se)},z=(re,oe)=>{const fe=[...R.sections];return fe[re]=D({},fe[re],{value:oe,modified:!0}),fe},W=()=>{V({value:i.emptyValue,referenceValue:R.referenceValue,sections:I(i.emptyValue)})},G=()=>{if(U==null)return;const re=R.sections[U],oe=a.getActiveDateManager(t,R,re),se=oe.getSections(R.sections).filter(Q=>Q.value!=="").length===(re.value===""?0:1),ee=z(U,""),ce=se?null:t.getInvalidDate(),le=oe.getNewValuesFromNewActiveDate(ce);V(D({},le,{sections:ee}))},J=re=>{const oe=(ee,ce)=>{const le=t.parse(ee,m);if(le==null||!t.isValid(le))return null;const Q=j8({utils:t,localeText:n,localizedDigits:k,format:m,date:le,formatDensity:g,shouldRespectLeadingZeros:x,enableAccessibleFieldDOMStructure:P,isRtl:o});return L8(t,le,Q,ce,!1)},fe=a.parseValueStr(re,R.referenceValue,oe),se=a.updateReferenceValue(t,fe,R.referenceValue);V({value:fe,referenceValue:se,sections:I(fe,R.sections)})},K=({activeSection:re,newSectionValue:oe,shouldGoToNextSection:fe})=>{fe&&UD({},ge,Q,{sections:ee,tempValueStrAndroid:null}))},ne=re=>_(oe=>D({},oe,{tempValueStrAndroid:re}));return v.useEffect(()=>{const re=I(R.value);_(oe=>D({},oe,{sections:re}))},[m,t.locale,o]),v.useEffect(()=>{let re;i.areValuesEqual(t,R.value,T)?re=i.getTimezone(t,R.value)!==i.getTimezone(t,T):re=!0,re&&_(oe=>D({},oe,{value:T,referenceValue:a.updateReferenceValue(t,T,oe.referenceValue),sections:I(T)}))},[T]),{state:R,activeSectionIndex:U,parsedSelectedSections:F,setSelectedSections:L,clearValue:W,clearActiveSection:G,updateSectionValue:K,updateValueFromValueStr:J,setTempAndroidValueStr:ne,getSectionsFromValue:I,sectionsValueBoundaries:M,localizedDigits:k,timezone:E}},Bit=5e3,Lm=e=>e.saveQuery!=null,zit=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:i})=>{const a=yn(),[s,l]=v.useState(null),c=Ze(()=>l(null));v.useEffect(()=>{var m;s!=null&&((m=e[s.sectionIndex])==null?void 0:m.type)!==s.sectionType&&c()},[e,s,c]),v.useEffect(()=>{if(s!=null){const m=setTimeout(()=>c(),Bit);return()=>{clearTimeout(m)}}return()=>{}},[s,c]);const u=({keyPressed:m,sectionIndex:g},y,b)=>{const x=m.toLowerCase(),S=e[g];if(s!=null&&(!b||b(s.value))&&s.sectionIndex===g){const E=`${s.value}${x}`,T=y(E,S);if(!Lm(T))return l({sectionIndex:g,value:E,sectionType:S.type}),T}const P=y(x,S);return Lm(P)&&!P.saveQuery?(c(),null):(l({sectionIndex:g,value:x,sectionType:S.type}),Lm(P)?null:P)},d=m=>{const g=(x,S,P)=>{const E=S.filter(T=>T.toLowerCase().startsWith(P));return E.length===0?{saveQuery:!1}:{sectionValue:E[0],shouldGoToNextSection:E.length===1}},y=(x,S,P,E)=>{const T=O=>ioe(a,i,S.type,O);if(S.contentType==="letter")return g(S.format,T(S.format),x);if(P&&E!=null&&ooe(a,P).contentType==="letter"){const O=T(P),k=g(P,O,x);return Lm(k)?{saveQuery:!1}:D({},k,{sectionValue:E(k.sectionValue,O)})}return{saveQuery:!1}};return u(m,(x,S)=>{switch(S.type){case"month":{const P=E=>D8(a,E,a.formats.month,S.format);return y(x,S,a.formats.month,P)}case"weekDay":{const P=(E,T)=>T.indexOf(E).toString();return y(x,S,a.formats.weekday,P)}case"meridiem":return y(x,S);default:return{saveQuery:!1}}})},f=m=>{const g=(b,x)=>{const S=Ch(b,r),P=Number(S),E=n[x.type]({currentDate:null,format:x.format,contentType:x.contentType});if(P>E.maximum)return{saveQuery:!1};if(PE.maximum||S.length===E.maximum.toString().length;return{sectionValue:soe(a,P,E,r,x),shouldGoToNextSection:T}};return u(m,(b,x)=>{if(x.contentType==="digit"||x.contentType==="digit-with-letter")return g(b,x);if(x.type==="month"){const S=coe(a,"digit","month","MM"),P=g(b,{type:x.type,format:"MM",hasLeadingZerosInFormat:S,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Lm(P))return P;const E=D8(a,P.sectionValue,"MM",x.format);return D({},P,{sectionValue:E})}if(x.type==="weekDay"){const S=g(b,x);if(Lm(S))return S;const P=bk(a,x.format)[Number(S.sectionValue)-1];return D({},S,{sectionValue:P})}return{saveQuery:!1}},b=>R8(b,r))};return{applyCharacterEditing:Ze(m=>{const g=e[m.sectionIndex],b=R8(m.keyPressed,r)?f(D({},m,{keyPressed:sB(m.keyPressed,r)})):d(m);if(b==null){o(null);return}t({activeSection:g,newSectionValue:b.sectionValue,shouldGoToNextSection:b.shouldGoToNextSection})}),resetCharacterQuery:c}},Vit=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:i,onFocus:a,onInput:s,onPaste:l,focused:c,autoFocus:u=!1},fieldValueManager:d,applyCharacterEditing:f,resetCharacterQuery:p,setSelectedSections:m,parsedSelectedSections:g,state:y,clearActiveSection:b,clearValue:x,updateSectionValue:S,updateValueFromValueStr:P,sectionOrder:E,areAllSectionsEmpty:T,sectionsValueBoundaries:O}=e,k=v.useRef(null),M=Wt(r,k),I=wo(),R=yn(),_=_n(),[N,B]=v.useState(!1),L=v.useMemo(()=>({syncSelectionToDOM:()=>{if(!k.current)return;const ue=document.getSelection();if(!ue)return;if(g==null){ue.rangeCount>0&&k.current.getRoot().contains(ue.getRangeAt(0).startContainer)&&ue.removeAllRanges(),N&&k.current.getRoot().blur();return}if(!k.current.getRoot().contains(oa(document)))return;const ge=new window.Range;let xe;g==="all"?xe=k.current.getRoot():y.sections[g].type==="empty"?xe=k.current.getSectionContainer(g):xe=k.current.getSectionContent(g),ge.selectNodeContents(xe),xe.focus(),ue.removeAllRanges(),ue.addRange(ge)},getActiveSectionIndexFromDOM:()=>{const ue=oa(document);return!ue||!k.current||!k.current.getRoot().contains(ue)?null:k.current.getSectionIndexFromDOMElement(ue)},focusField:(ue=0)=>{if(!k.current)return;const ge=K_(ue,y.sections);B(!0),k.current.getSectionContent(ge).focus()},setSelectedSections:ue=>{if(!k.current)return;const ge=K_(ue,y.sections);B((ge==="all"?0:ge)!==null),m(ue)},isFieldFocused:()=>{const ue=oa(document);return!!k.current&&k.current.getRoot().contains(ue)}}),[g,m,y.sections,N]),F=Ze(ue=>{if(!k.current)return;const ge=y.sections[ue];k.current.getSectionContent(ue).innerHTML=ge.value||ge.placeholder,L.syncSelectionToDOM()}),U=Ze((ue,...ge)=>{ue.isDefaultPrevented()||!k.current||(B(!0),i==null||i(ue,...ge),g==="all"?setTimeout(()=>{const xe=document.getSelection().getRangeAt(0).startOffset;if(xe===0){m(E.startIndex);return}let me=0,be=0;for(;be{if(s==null||s(ue),!k.current||g!=="all")return;const xe=ue.target.textContent??"";k.current.getRoot().innerHTML=y.sections.map(me=>`${me.startSeparator}${me.value||me.placeholder}${me.endSeparator}`).join(""),L.syncSelectionToDOM(),xe.length===0||xe.charCodeAt(0)===10?(p(),x(),m("all")):xe.length>1?P(xe):f({keyPressed:xe,sectionIndex:0})}),z=Ze(ue=>{if(l==null||l(ue),n||g!=="all"){ue.preventDefault();return}const ge=ue.clipboardData.getData("text");ue.preventDefault(),p(),P(ge)}),W=Ze((...ue)=>{if(a==null||a(...ue),N||!k.current)return;B(!0),k.current.getSectionIndexFromDOMElement(oa(document))!=null||m(E.startIndex)}),G=Ze((...ue)=>{o==null||o(...ue),setTimeout(()=>{if(!k.current)return;const ge=oa(document);!k.current.getRoot().contains(ge)&&(B(!1),m(null))})}),J=Ze(ue=>ge=>{ge.isDefaultPrevented()||m(ue)}),K=Ze(ue=>{ue.preventDefault()}),ne=Ze(ue=>()=>{m(ue)}),re=Ze(ue=>{if(ue.preventDefault(),n||t||typeof g!="number")return;const ge=y.sections[g],xe=ue.clipboardData.getData("text"),me=/^[a-zA-Z]+$/.test(xe),be=/^[0-9]+$/.test(xe),we=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(xe);ge.contentType==="letter"&&me||ge.contentType==="digit"&&be||ge.contentType==="digit-with-letter"&&we?(p(),S({activeSection:ge,newSectionValue:xe,shouldGoToNextSection:!0})):!me&&!be&&(p(),P(xe))}),oe=Ze(ue=>{ue.preventDefault(),ue.dataTransfer.dropEffect="none"}),fe=Ze(ue=>{if(!k.current)return;const ge=ue.target,xe=ge.textContent??"",me=k.current.getSectionIndexFromDOMElement(ge),be=y.sections[me];if(n||!k.current){F(me);return}if(xe.length===0){if(be.value===""){F(me);return}const we=ue.nativeEvent.inputType;if(we==="insertParagraph"||we==="insertLineBreak"){F(me);return}p(),b();return}f({keyPressed:xe,sectionIndex:me}),F(me)});xn(()=>{if(!(!N||!k.current)){if(g==="all")k.current.getRoot().focus();else if(typeof g=="number"){const ue=k.current.getSectionContent(g);ue&&ue.focus()}}},[g,N]);const se=v.useMemo(()=>y.sections.reduce((ue,ge)=>(ue[ge.type]=O[ge.type]({currentDate:null,contentType:ge.contentType,format:ge.format}),ue),{}),[O,y.sections]),ee=g==="all",ce=v.useMemo(()=>y.sections.map((ue,ge)=>{const xe=!ee&&!t&&!n;return{container:{"data-sectionindex":ge,onClick:J(ge)},content:{tabIndex:ee||ge>0?-1:0,contentEditable:!ee&&!t&&!n,role:"spinbutton",id:`${_}-${ue.type}`,"aria-labelledby":`${_}-${ue.type}`,"aria-readonly":n,"aria-valuenow":Yot(ue,R),"aria-valuemin":se[ue.type].minimum,"aria-valuemax":se[ue.type].maximum,"aria-valuetext":ue.value?Kot(ue,R):I.empty,"aria-label":I[ue.type],"aria-disabled":t,spellCheck:xe?!1:void 0,autoCapitalize:xe?"off":void 0,autoCorrect:xe?"off":void 0,[parseInt(v.version,10)>=17?"enterKeyHint":"enterkeyhint"]:xe?"next":void 0,children:ue.value||ue.placeholder,onInput:fe,onPaste:re,onFocus:ne(ge),onDragOver:oe,onMouseUp:K,inputMode:ue.contentType==="letter"?"text":"numeric"},before:{children:ue.startSeparator},after:{children:ue.endSeparator}}}),[y.sections,ne,re,oe,fe,J,K,t,n,ee,I,R,se,_]),le=Ze(ue=>{P(ue.target.value)}),Q=v.useMemo(()=>T?"":d.getV7HiddenInputValueFromSections(y.sections),[T,y.sections,d]);return v.useEffect(()=>{if(k.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `` element instead of a `PickersSectionList`.","","If you want to keep using an `` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(` +`));u&&k.current&&k.current.getSectionContent(E.startIndex).focus()},[]),{interactions:L,returnedValue:{autoFocus:u,readOnly:n,focused:c??N,sectionListRef:M,onBlur:G,onClick:U,onFocus:W,onInput:V,onPaste:z,enableAccessibleFieldDOMStructure:!0,elements:ce,tabIndex:g===0?-1:0,contentEditable:ee,value:Q,onChange:le,areAllSectionsEmpty:T}}},Cg=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),Hit=(e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a{const t=nr(),n=v.useRef(),r=v.useRef(),{forwardedProps:{onFocus:o,onClick:i,onPaste:a,onBlur:s,inputRef:l,placeholder:c},internalProps:{readOnly:u=!1,disabled:d=!1},parsedSelectedSections:f,activeSectionIndex:p,state:m,fieldValueManager:g,valueManager:y,applyCharacterEditing:b,resetCharacterQuery:x,updateSectionValue:S,updateValueFromValueStr:P,clearActiveSection:E,clearValue:T,setTempAndroidValueStr:O,setSelectedSections:k,getSectionsFromValue:M,areAllSectionsEmpty:I,localizedDigits:R}=e,_=v.useRef(null),N=Wt(l,_),B=v.useMemo(()=>Hit(m.sections,R,t),[m.sections,R,t]),L=v.useMemo(()=>({syncSelectionToDOM:()=>{if(!_.current)return;if(f==null){_.current.scrollLeft&&(_.current.scrollLeft=0);return}if(_.current!==oa(document))return;const fe=_.current.scrollTop;if(f==="all")_.current.select();else{const se=B[f],ee=se.type==="empty"?se.startInInput-se.startSeparator.length:se.startInInput,ce=se.type==="empty"?se.endInInput+se.endSeparator.length:se.endInInput;(ee!==_.current.selectionStart||ce!==_.current.selectionEnd)&&_.current===oa(document)&&_.current.setSelectionRange(ee,ce),clearTimeout(r.current),r.current=setTimeout(()=>{_.current&&_.current===oa(document)&&_.current.selectionStart===_.current.selectionEnd&&(_.current.selectionStart!==ee||_.current.selectionEnd!==ce)&&L.syncSelectionToDOM()})}_.current.scrollTop=fe},getActiveSectionIndexFromDOM:()=>{const fe=_.current.selectionStart??0,se=_.current.selectionEnd??0;if(fe===0&&se===0)return null;const ee=fe<=B[0].startInInput?1:B.findIndex(ce=>ce.startInInput-ce.startSeparator.length>fe);return ee===-1?B.length-1:ee-1},focusField:(fe=0)=>{var se;(se=_.current)==null||se.focus(),k(fe)},setSelectedSections:fe=>k(fe),isFieldFocused:()=>_.current===oa(document)}),[_,f,B,k]),F=()=>{const fe=_.current.selectionStart??0;let se;fe<=B[0].startInInput||fe>=B[B.length-1].endInInput?se=1:se=B.findIndex(ce=>ce.startInInput-ce.startSeparator.length>fe);const ee=se===-1?B.length-1:se-1;k(ee)},U=Ze((...fe)=>{o==null||o(...fe);const se=_.current;clearTimeout(n.current),n.current=setTimeout(()=>{!se||se!==_.current||p==null&&(se.value.length&&Number(se.selectionEnd)-Number(se.selectionStart)===se.value.length?k("all"):F())})}),V=Ze((fe,...se)=>{fe.isDefaultPrevented()||(i==null||i(fe,...se),F())}),z=Ze(fe=>{if(a==null||a(fe),fe.preventDefault(),u||d)return;const se=fe.clipboardData.getData("text");if(typeof f=="number"){const ee=m.sections[f],ce=/^[a-zA-Z]+$/.test(se),le=/^[0-9]+$/.test(se),Q=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(se);if(ee.contentType==="letter"&&ce||ee.contentType==="digit"&&le||ee.contentType==="digit-with-letter"&&Q){x(),S({activeSection:ee,newSectionValue:se,shouldGoToNextSection:!0});return}if(ce||le)return}x(),P(se)}),W=Ze((...fe)=>{s==null||s(...fe),k(null)}),G=Ze(fe=>{if(u)return;const se=fe.target.value;if(se===""){x(),T();return}const ee=fe.nativeEvent.data,ce=ee&&ee.length>1,le=ce?ee:se,Q=Cg(le);if(p==null||ce){P(ce?ee:Q);return}let ue;if(f==="all"&&Q.length===1)ue=Q;else{const ge=Cg(g.getV6InputValueFromSections(B,R,t));let xe=-1,me=-1;for(let ke=0;kebe.end)return;const Oe=Q.length-ge.length+be.end-Cg(be.endSeparator||"").length;ue=Q.slice(be.start+Cg(be.startSeparator||"").length,Oe)}if(ue.length===0){Got()&&O(le),x(),E();return}b({keyPressed:ue,sectionIndex:p})}),J=v.useMemo(()=>c!==void 0?c:g.getV6InputValueFromSections(M(y.emptyValue),R,t),[c,g,M,y.emptyValue,R,t]),K=v.useMemo(()=>m.tempValueStrAndroid??g.getV6InputValueFromSections(m.sections,R,t),[m.sections,g,m.tempValueStrAndroid,R,t]);v.useEffect(()=>(_.current&&_.current===oa(document)&&k("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const ne=v.useMemo(()=>p==null||m.sections[p].contentType==="letter"?"text":"numeric",[p,m.sections]),oe=!(_.current&&_.current===oa(document))&&I;return{interactions:L,returnedValue:{readOnly:u,onBlur:W,onClick:V,onFocus:U,onPaste:z,inputRef:N,enableAccessibleFieldDOMStructure:!1,placeholder:J,inputMode:ne,autoComplete:"off",value:oe?"":K,onChange:G}}},fB=e=>{const t=yn(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:i=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:c,clearable:u,onClear:d},fieldValueManager:f,valueManager:p,validator:m}=e,g=nr(),y=jit(e),{state:b,activeSectionIndex:x,parsedSelectedSections:S,setSelectedSections:P,clearValue:E,clearActiveSection:T,updateSectionValue:O,setTempAndroidValueStr:k,sectionsValueBoundaries:M,localizedDigits:I,timezone:R}=y,_=zit({sections:b.sections,updateSectionValue:O,sectionsValueBoundaries:M,localizedDigits:I,setTempAndroidValueStr:k,timezone:R}),{resetCharacterQuery:N}=_,B=p.areValuesEqual(t,b.value,p.emptyValue),L=i?Vit:Uit,F=v.useMemo(()=>qot(b.sections,g&&!i),[b.sections,g,i]),{returnedValue:U,interactions:V}=L(D({},e,y,_,{areAllSectionsEmpty:B,sectionOrder:F})),z=Ze(re=>{if(l==null||l(re),!a)switch(!0){case((re.ctrlKey||re.metaKey)&&String.fromCharCode(re.keyCode)==="A"&&!re.shiftKey&&!re.altKey):{re.preventDefault(),P("all");break}case re.key==="ArrowRight":{if(re.preventDefault(),S==null)P(F.startIndex);else if(S==="all")P(F.endIndex);else{const oe=F.neighbors[S].rightIndex;oe!==null&&P(oe)}break}case re.key==="ArrowLeft":{if(re.preventDefault(),S==null)P(F.endIndex);else if(S==="all")P(F.startIndex);else{const oe=F.neighbors[S].leftIndex;oe!==null&&P(oe)}break}case re.key==="Delete":{if(re.preventDefault(),s)break;S==null||S==="all"?E():T(),N();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(re.key):{if(re.preventDefault(),s||x==null)break;const oe=b.sections[x],fe=f.getActiveDateManager(t,b,oe),se=Bot(t,R,oe,re.key,M,I,fe.date,{minutesStep:o});O({activeSection:oe,newSectionValue:se,shouldGoToNextSection:!1});break}}});xn(()=>{V.syncSelectionToDOM()});const{hasValidationError:W}=poe({props:n,validator:m,timezone:R,value:b.value,onError:n.onError}),G=v.useMemo(()=>c!==void 0?c:W,[W,c]);v.useEffect(()=>{!G&&x==null&&N()},[b.referenceValue,x,G]),v.useEffect(()=>{b.tempValueStrAndroid!=null&&x!=null&&(N(),T())},[b.sections]),v.useImperativeHandle(r,()=>({getSections:()=>b.sections,getActiveSectionIndex:V.getActiveSectionIndexFromDOM,setSelectedSections:V.setSelectedSections,focusField:V.focusField,isFieldFocused:V.isFieldFocused}));const J=Ze((re,...oe)=>{re.preventDefault(),d==null||d(re,...oe),E(),V.isFieldFocused()?P(F.startIndex):V.focusField(0)}),K={onKeyDown:z,onClear:J,error:G,clearable:!!(u&&!B&&!s&&!a)},ne={disabled:a,readOnly:s};return D({},e.forwardedProps,K,ne,U)},Wit=["clearable","onClear","InputProps","sx","slots","slotProps"],Git=["ownerState"],pB=e=>{const t=wo(),{clearable:n,onClear:r,InputProps:o,sx:i,slots:a,slotProps:s}=e,l=Ue(e,Wit),c=(a==null?void 0:a.clearButton)??An,u=on({elementType:c,externalSlotProps:s==null?void 0:s.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),d=Ue(u,Git),f=(a==null?void 0:a.clearIcon)??Wrt,p=on({elementType:f,externalSlotProps:s==null?void 0:s.clearIcon,ownerState:{}});return D({},l,{InputProps:D({},o,{endAdornment:$.jsxs(v.Fragment,{children:[n&&$.jsx(co,{position:"end",sx:{marginRight:o!=null&&o.endAdornment?-1:-1.5},children:$.jsx(c,D({},d,{onClick:r,children:$.jsx(f,D({fontSize:"small"},p))}))}),o==null?void 0:o.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(i)?i:[i]]})},qit=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],hB=(e,t)=>v.useMemo(()=>{const n=D({},e),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return qit.forEach(o),t==="date"?Y_.forEach(o):t==="time"?X_.forEach(o):t==="date-time"&&(Y_.forEach(o),X_.forEach(o),foe.forEach(o)),{forwardedProps:n,internalProps:r}},[e,t]),Kit=v.createContext(null);function hoe(e){const{contextValue:t,localeText:n,children:r}=e;return $.jsx(Kit.Provider,{value:t,children:$.jsx(RS,{localeText:n,children:r})})}const Yit=e=>{const t=yn(),n=zh();return D({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:Si(t,e.minDate,n.minDate),maxDate:Si(t,e.maxDate,n.maxDate)})},Xit=e=>{const t=yn(),r=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.fullTime12h:t.formats.fullTime24h;return D({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??r})},Qit=e=>{const t=yn(),n=zh(),o=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h;return D({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??o,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime),minDate:Si(t,e.minDateTime??e.minDate,n.minDate),maxDate:Si(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime})},Jit=e=>{const t=Yit(e),{forwardedProps:n,internalProps:r}=hB(t,"date");return fB({forwardedProps:n,internalProps:r,valueManager:Zr,fieldValueManager:cB,validator:Qv,valueType:"date"})};function Zit(e){return _e("MuiPickersTextField",e)}Le("MuiPickersTextField",["root","focused","disabled","error","required"]);function eat(e){return _e("MuiPickersInputBase",e)}const Gg=Le("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function tat(e){return _e("MuiPickersSectionList",e)}const a0=Le("MuiPickersSectionList",["root","section","sectionContent"]),nat=["slots","slotProps","elements","sectionListRef"],moe=ie("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),goe=ie("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),yoe=ie("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),voe=ie("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),rat=e=>{const{classes:t}=e;return Te({root:["root"],section:["section"],sectionContent:["sectionContent"]},tat,t)};function oat(e){const{slots:t,slotProps:n,element:r,classes:o}=e,i=(t==null?void 0:t.section)??goe,a=on({elementType:i,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),s=(t==null?void 0:t.sectionContent)??voe,l=on({elementType:s,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),c=(t==null?void 0:t.sectionSeparator)??yoe,u=on({elementType:c,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),d=on({elementType:c,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return $.jsxs(i,D({},a,{children:[$.jsx(c,D({},u)),$.jsx(s,D({},l)),$.jsx(c,D({},d))]}))}const iat=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:a,sectionListRef:s}=r,l=Ue(r,nat),c=rat(r),u=v.useRef(null),d=Wt(n,u),f=g=>{if(!u.current)throw new Error(`MUI X: Cannot call sectionListRef.${g} before the mount of the component.`);return u.current};v.useImperativeHandle(s,()=>({getRoot(){return f("getRoot")},getSectionContainer(g){return f("getSectionContainer").querySelector(`.${a0.section}[data-sectionindex="${g}"]`)},getSectionContent(g){return f("getSectionContent").querySelector(`.${a0.section}[data-sectionindex="${g}"] .${a0.sectionContent}`)},getSectionIndexFromDOMElement(g){const y=f("getSectionIndexFromDOMElement");if(g==null||!y.contains(g))return null;let b=null;return g.classList.contains(a0.section)?b=g:g.classList.contains(a0.sectionContent)&&(b=g.parentElement),b==null?null:Number(b.dataset.sectionindex)}}));const p=(o==null?void 0:o.root)??moe,m=on({elementType:p,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:l,additionalProps:{ref:d,suppressContentEditableWarning:!0},className:c.root,ownerState:{}});return $.jsx(p,D({},m,{children:m.contentEditable?a.map(({content:g,before:y,after:b})=>`${y.children}${g.children}${b.children}`).join(""):$.jsx(v.Fragment,{children:a.map((g,y)=>$.jsx(oat,{slots:o,slotProps:i,element:g,classes:c},y))})}))}),aat=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],sat=e=>Math.round(e*1e5)/1e5,xk=ie("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>D({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${sat(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),mB=ie(moe,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:t,focused:n,filled:r,label:o})=>!t&&!n&&!r&&o==null,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),lat=ie(goe,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"flex"})),cat=ie(voe,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),uat=ie(yoe,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),dat=ie("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(D({},Fbe)),fat=e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:i,readOnly:a,color:s,size:l,endAdornment:c,startAdornment:u}=e,d={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",i&&"fullWidth",`color${Se(s)}`,l==="small"&&"inputSizeSmall",!!u&&"adornedStart",!!c&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Te(d,eat,o)},gB=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:a,onChange:s,id:l,endAdornment:c,startAdornment:u,renderSuffix:d,slots:f,slotProps:p,contentEditable:m,tabIndex:g,onInput:y,onPaste:b,onKeyDown:x,name:S,readOnly:P,inputProps:E,inputRef:T,sectionListRef:O}=r,k=Ue(r,aat),M=v.useRef(null),I=Wt(n,M),R=Wt(E==null?void 0:E.ref,T),_=nr(),N=wa();if(!N)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const B=W=>{var G;if(N.disabled){W.stopPropagation();return}(G=N.onFocus)==null||G.call(N,W)};v.useEffect(()=>{N&&N.setAdornedStart(!!u)},[N,u]),v.useEffect(()=>{N&&(i?N.onEmpty():N.onFilled())},[N,i]);const L=D({},r,N,{isRtl:_}),F=fat(L),U=(f==null?void 0:f.root)||xk,V=on({elementType:U,externalSlotProps:p==null?void 0:p.root,externalForwardedProps:k,additionalProps:{"aria-invalid":N.error,ref:I},className:F.root,ownerState:L}),z=(f==null?void 0:f.input)||mB;return $.jsxs(U,D({},V,{children:[u,$.jsx(iat,{sectionListRef:O,elements:o,contentEditable:m,tabIndex:g,className:F.sectionsContainer,onFocus:B,onBlur:N.onBlur,onInput:y,onPaste:b,onKeyDown:x,slots:{root:z,section:lat,sectionContent:cat,sectionSeparator:uat},slotProps:{root:{ownerState:L},sectionContent:{className:Gg.sectionContent},sectionSeparator:({position:W})=>({className:W==="before"?Gg.sectionBefore:Gg.sectionAfter})}}),c,d?d(D({},N)):null,$.jsx(dat,D({name:S,className:F.input,value:a,onChange:s,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:P,required:N.required,disabled:N.disabled},E,{ref:R}))]}))});function pat(e){return _e("MuiPickersOutlinedInput",e)}const xl=D({},Gg,Le("MuiPickersOutlinedInput",["root","notchedOutline","input"])),hat=["children","className","label","notched","shrink"],mat=ie("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),B8=ie("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),gat=ie("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function yat(e){const{className:t,label:n}=e,r=Ue(e,hat),o=n!=null&&n!=="",i=D({},e,{withLabel:o});return $.jsx(mat,D({"aria-hidden":!0,className:t},r,{ownerState:i,children:$.jsx(gat,{ownerState:i,children:o?$.jsx(B8,{children:n}):$.jsx(B8,{className:"notranslate",children:"​"})})}))}const vat=["label","autoFocus","ownerState","notched"],bat=ie(xk,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${xl.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${xl.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${xl.focused} .${xl.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${xl.disabled}`]:{[`& .${xl.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${xl.error} .${xl.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>{var r;return((r=(e.vars??e).palette[n])==null?void 0:r.main)??!1}).map(n=>({props:{color:n},style:{[`&.${xl.focused}:not(.${xl.error}) .${xl.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),wat=ie(mB,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),xat=e=>{const{classes:t}=e,r=Te({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},pat,t);return D({},t,r)},boe=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:i,notched:a}=r,s=Ue(r,vat),l=wa(),c=D({},r,i,l,{color:(l==null?void 0:l.color)||"primary"}),u=xat(c);return $.jsx(gB,D({slots:{root:bat,input:wat},renderSuffix:d=>$.jsx(yat,{shrink:!!(a||d.adornedStart||d.focused||d.filled),notched:!!(a||d.adornedStart||d.focused||d.filled),className:u.notchedOutline,label:o!=null&&o!==""&&(l!=null&&l.required)?$.jsxs(v.Fragment,{children:[o," ","*"]}):o,ownerState:c})},s,{label:o,classes:u,ref:n}))});boe.muiName="Input";function Sat(e){return _e("MuiPickersFilledInput",e)}const fp=D({},Gg,Le("MuiPickersFilledInput",["root","underline","input"])),Cat=["label","autoFocus","disableUnderline","ownerState"],Pat=ie(xk,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>cP(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${fp.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${fp.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>{var s;return{props:{color:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${fp.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${fp.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${fp.disabled}, .${fp.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${fp.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:a})=>!!a,style:{paddingLeft:12}},{props:({endAdornment:a})=>!!a,style:{paddingRight:12}}]}}),Eat=ie(mB,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),Tat=e=>{const{classes:t,disableUnderline:n}=e,o=Te({root:["root",!n&&"underline"],input:["input"]},Sat,t);return D({},t,o)},woe=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=Ue(r,Cat),l=wa(),c=D({},r,a,l,{color:(l==null?void 0:l.color)||"primary"}),u=Tat(c);return $.jsx(gB,D({slots:{root:Pat,input:Eat},slotProps:{root:{disableUnderline:i}}},s,{label:o,classes:u,ref:n}))});woe.muiName="Input";function Oat(e){return _e("MuiPickersFilledInput",e)}const s0=D({},Gg,Le("MuiPickersInput",["root","input"])),Iat=["label","autoFocus","disableUnderline","ownerState"],kat=ie(xk,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{color:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${s0.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${s0.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${s0.disabled}, .${s0.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${s0.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),Mat=e=>{const{classes:t,disableUnderline:n}=e,o=Te({root:["root",!n&&"underline"],input:["input"]},Oat,t);return D({},t,o)},xoe=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=Ue(r,Iat),l=wa(),c=D({},r,a,l,{disableUnderline:i,color:(l==null?void 0:l.color)||"primary"}),u=Mat(c);return $.jsx(gB,D({slots:{root:kat}},s,{label:o,classes:u,ref:n}))});xoe.muiName="Input";const Aat=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],$at={standard:xoe,filled:woe,outlined:boe},Rat=ie(Cv,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Dat=e=>{const{focused:t,disabled:n,classes:r,required:o}=e;return Te({root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]},Zit,r)},yB=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:a,color:s="primary",disabled:l=!1,error:c=!1,variant:u="outlined",required:d=!1,InputProps:f,inputProps:p,inputRef:m,sectionListRef:g,elements:y,areAllSectionsEmpty:b,onClick:x,onKeyDown:S,onKeyUp:P,onPaste:E,onInput:T,endAdornment:O,startAdornment:k,tabIndex:M,contentEditable:I,focused:R,value:_,onChange:N,fullWidth:B,id:L,name:F,helperText:U,FormHelperTextProps:V,label:z,InputLabelProps:W}=r,G=Ue(r,Aat),J=v.useRef(null),K=Wt(n,J),ne=_n(L),re=U&&ne?`${ne}-helper-text`:void 0,oe=z&&ne?`${ne}-label`:void 0,fe=D({},r,{color:s,disabled:l,error:c,focused:R,required:d,variant:u}),se=Dat(fe),ee=$at[u];return $.jsxs(Rat,D({className:pe(se.root,a),ref:K,focused:R,onFocus:o,onBlur:i,disabled:l,variant:u,error:c,color:s,fullWidth:B,required:d,ownerState:fe},G,{children:[$.jsx(Pv,D({htmlFor:ne,id:oe},W,{children:z})),$.jsx(ee,D({elements:y,areAllSectionsEmpty:b,onClick:x,onKeyDown:S,onKeyUp:P,onInput:T,onPaste:E,endAdornment:O,startAdornment:k,tabIndex:M,contentEditable:I,value:_,onChange:N,id:ne,fullWidth:B,inputProps:p,inputRef:m,sectionListRef:g,label:z,name:F,role:"group","aria-labelledby":oe},f)),U&&$.jsx(fS,D({id:re},V,{children:U}))]}))}),_at=["enableAccessibleFieldDOMStructure"],Lat=["InputProps","readOnly"],Nat=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],vB=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=Ue(e,_at);if(t){const{InputProps:d,readOnly:f}=n,p=Ue(n,Lat);return D({},p,{InputProps:D({},d??{},{readOnly:f})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:c}=n,u=Ue(n,Nat);return D({},u,{InputProps:D({},s??{},{readOnly:a}),inputProps:D({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:c})})},Fat=["slots","slotProps","InputProps","inputProps"],Soe=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiDateField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=Ue(r,Fat),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?yB:gn),d=on({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:c});d.inputProps=D({},s,d.inputProps),d.InputProps=D({},a,d.InputProps);const f=Jit(d),p=vB(f),m=pB(D({},p,{slots:o,slotProps:i}));return $.jsx(u,D({},m))}),jat=e=>{const t=Xit(e),{forwardedProps:n,internalProps:r}=hB(t,"time");return fB({forwardedProps:n,internalProps:r,valueManager:Zr,fieldValueManager:cB,validator:LS,valueType:"time"})},Bat=["slots","slotProps","InputProps","inputProps"],Coe=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiTimeField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=Ue(r,Bat),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?yB:gn),d=on({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,ownerState:c,additionalProps:{ref:n}});d.inputProps=D({},s,d.inputProps),d.InputProps=D({},a,d.InputProps);const f=jat(d),p=vB(f),m=pB(D({},p,{slots:o,slotProps:i}));return $.jsx(u,D({},m))}),zat=e=>{const t=Qit(e),{forwardedProps:n,internalProps:r}=hB(t,"date-time");return fB({forwardedProps:n,internalProps:r,valueManager:Zr,fieldValueManager:cB,validator:wk,valueType:"date-time"})},Vat=["slots","slotProps","InputProps","inputProps"],Poe=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiDateTimeField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=Ue(r,Vat),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?yB:gn),d=on({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,ownerState:c,additionalProps:{ref:n}});d.inputProps=D({},s,d.inputProps),d.InputProps=D({},a,d.InputProps);const f=zat(d),p=vB(f),m=pB(D({},p,{slots:o,slotProps:i}));return $.jsx(u,D({},m))}),Eoe=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:s})=>{const l=Bh();return v.useCallback(c=>Qv({adapter:l,value:c,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})!==null,[l,e,t,n,r,o,i,a,s])},Hat=(e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return D({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const i=o.newTimezone;if(n.getTimezone(r.currentMonth)===i)return r;let a=n.setTimezone(r.currentMonth,i);return n.getMonth(a)!==n.getMonth(r.currentMonth)&&(a=n.setMonth(a,n.getMonth(r.currentMonth))),D({},r,{currentMonth:a})}case"finishMonthSwitchingAnimation":return D({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=o.focusedDay!=null&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return D({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},Uat=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:i=!1,maxDate:a,minDate:s,onMonthChange:l,reduceAnimations:c,shouldDisableDate:u,timezone:d}=e,f=yn(),p=v.useRef(Hat(!!c,i,f)).current,m=v.useMemo(()=>Zr.getInitialReferenceValue({value:t,utils:f,timezone:d,props:e,referenceDate:n,granularity:Dl.day}),[n,d]),[g,y]=v.useReducer(p,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:f.startOfMonth(m),slideDirection:"left"});v.useEffect(()=>{y({type:"changeMonthTimezone",newTimezone:f.getTimezone(m)})},[m,f]);const b=v.useCallback(T=>{y(D({type:"changeMonth"},T)),l&&l(T.newMonth)},[l]),x=v.useCallback(T=>{const O=T;f.isSameMonth(O,g.currentMonth)||b({newMonth:f.startOfMonth(O),direction:f.isAfterDay(O,g.currentMonth)?"left":"right"})},[g.currentMonth,b,f]),S=Eoe({shouldDisableDate:u,minDate:s,maxDate:a,disableFuture:r,disablePast:o,timezone:d}),P=v.useCallback(()=>{y({type:"finishMonthSwitchingAnimation"})},[]),E=Ze((T,O)=>{S(T)||y({type:"changeFocusedDay",focusedDay:T,withoutMonthSwitchingAnimation:O})});return{referenceDate:m,calendarState:g,changeMonth:x,changeFocusedDay:E,isDateDisabled:S,onMonthSwitchingAnimationEnd:P,handleChangeMonth:b}},Wat=e=>_e("MuiPickersFadeTransitionGroup",e);Le("MuiPickersFadeTransitionGroup",["root"]);const Gat=e=>{const{classes:t}=e;return Te({root:["root"]},Wat,t)},qat=ie(cS,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function Toe(e){const t=Jt({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=Gat(t),s=Ao();return o?n:$.jsx(qat,{className:pe(a.root,r),children:$.jsx(xv,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},i)})}const Kat=e=>_e("MuiPickersSlideTransition",e),xs=Le("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Yat=["children","className","reduceAnimations","slideDirection","transKey","classes"],Xat=e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Te(r,Kat,t)},Qat=ie(cS,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${xs["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${xs["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${xs.slideEnterActive}`]:t.slideEnterActive},{[`.${xs.slideExit}`]:t.slideExit},{[`.${xs["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${xs["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${xs["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${xs["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${xs.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${xs.slideExit}`]:{transform:"translate(0%)"},[`& .${xs["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${xs["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function Jat(e){const t=Jt({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=Ue(t,Yat),s=Xat(t),l=Ao();if(o)return $.jsx("div",{className:pe(s.root,r),children:n});const c={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return $.jsx(Qat,{className:pe(s.root,r),childFactory:u=>v.cloneElement(u,{classNames:c}),role:"presentation",children:$.jsx(dF,D({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:c},a,{children:n}),i)})}const Zat=e=>_e("MuiDayCalendar",e);Le("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const est=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],tst=["ownerState"],nst=e=>{const{classes:t}=e;return Te({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Zat,t)},Ooe=(Ox+mk*2)*6,rst=ie("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ost=ie("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),ist=ie(ut,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),ast=ie(ut,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),sst=ie(ut,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>D({},e.typography.caption,{width:Ox,height:Ox,padding:0,margin:`0 ${mk}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),lst=ie("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Ooe}),cst=ie(Jat,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:Ooe}),ust=ie("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),dst=ie("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${mk}px 0`,display:"flex",justifyContent:"center"});function fst(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:s}=e,l=Ue(e,est);const{disabled:c,disableHighlightToday:u,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:f,slots:p,slotProps:m,timezone:g}=t,y=yn(),b=Vh(g),x=r!==null&&y.isSameDay(n,r),S=o.some(_=>y.isSameDay(_,n)),P=y.isSameDay(n,b),E=(p==null?void 0:p.day)??Ait,T=on({elementType:E,externalSlotProps:m==null?void 0:m.day,additionalProps:D({disableHighlightToday:u,showDaysOutsideCurrentMonth:f,role:"gridcell",isAnimating:d,"data-timestamp":y.toJsDate(n).valueOf()},l),ownerState:D({},t,{day:n,selected:S})}),O=Ue(T,tst),k=v.useMemo(()=>c||i(n),[c,i,n]),M=v.useMemo(()=>y.getMonth(n)!==a,[y,n,a]),I=v.useMemo(()=>{const _=y.startOfMonth(y.setMonth(n,a));return f?y.isSameDay(n,y.startOfWeek(_)):y.isSameDay(n,_)},[a,n,f,y]),R=v.useMemo(()=>{const _=y.endOfMonth(y.setMonth(n,a));return f?y.isSameDay(n,y.endOfWeek(_)):y.isSameDay(n,_)},[a,n,f,y]);return $.jsx(E,D({},O,{day:n,disabled:k,autoFocus:s&&x,today:P,outsideCurrentMonth:M,isFirstVisibleCell:I,isLastVisibleCell:R,selected:S,tabIndex:x?0:-1,"aria-selected":S,"aria-current":P?"date":void 0}))}function pst(e){const t=Jt({props:e,name:"MuiDayCalendar"}),n=yn(),{onFocusedDayChange:r,className:o,currentMonth:i,selectedDays:a,focusedDay:s,loading:l,onSelectedDaysChange:c,onMonthSwitchingAnimationEnd:u,readOnly:d,reduceAnimations:f,renderLoading:p=()=>$.jsx("span",{children:"..."}),slideDirection:m,TransitionProps:g,disablePast:y,disableFuture:b,minDate:x,maxDate:S,shouldDisableDate:P,shouldDisableMonth:E,shouldDisableYear:T,dayOfWeekFormatter:O=me=>n.format(me,"weekdayShort").charAt(0).toUpperCase(),hasFocus:k,onFocusedViewChange:M,gridLabelId:I,displayWeekNumber:R,fixedWeekNumber:_,autoFocus:N,timezone:B}=t,L=Vh(B),F=nst(t),U=nr(),V=Eoe({shouldDisableDate:P,shouldDisableMonth:E,shouldDisableYear:T,minDate:x,maxDate:S,disablePast:y,disableFuture:b,timezone:B}),z=wo(),[W,G]=bi({name:"DayCalendar",state:"hasFocus",controlled:k,default:N??!1}),[J,K]=v.useState(()=>s||L),ne=Ze(me=>{d||c(me)}),re=me=>{V(me)||(r(me),K(me),M==null||M(!0),G(!0))},oe=Ze((me,be)=>{switch(me.key){case"ArrowUp":re(n.addDays(be,-7)),me.preventDefault();break;case"ArrowDown":re(n.addDays(be,7)),me.preventDefault();break;case"ArrowLeft":{const we=n.addDays(be,U?1:-1),Oe=n.addMonths(be,U?1:-1),ke=lw({utils:n,date:we,minDate:U?we:n.startOfMonth(Oe),maxDate:U?n.endOfMonth(Oe):we,isDateDisabled:V,timezone:B});re(ke||we),me.preventDefault();break}case"ArrowRight":{const we=n.addDays(be,U?-1:1),Oe=n.addMonths(be,U?-1:1),ke=lw({utils:n,date:we,minDate:U?n.startOfMonth(Oe):we,maxDate:U?we:n.endOfMonth(Oe),isDateDisabled:V,timezone:B});re(ke||we),me.preventDefault();break}case"Home":re(n.startOfWeek(be)),me.preventDefault();break;case"End":re(n.endOfWeek(be)),me.preventDefault();break;case"PageUp":re(n.addMonths(be,1)),me.preventDefault();break;case"PageDown":re(n.addMonths(be,-1)),me.preventDefault();break}}),fe=Ze((me,be)=>re(be)),se=Ze((me,be)=>{W&&n.isSameDay(J,be)&&(M==null||M(!1))}),ee=n.getMonth(i),ce=n.getYear(i),le=v.useMemo(()=>a.filter(me=>!!me).map(me=>n.startOfDay(me)),[n,a]),Q=`${ce}-${ee}`,ue=v.useMemo(()=>v.createRef(),[Q]),ge=v.useMemo(()=>{const me=n.startOfMonth(i),be=n.endOfMonth(i);return V(J)||n.isAfterDay(J,be)||n.isBeforeDay(J,me)?lw({utils:n,date:J,minDate:me,maxDate:be,disablePast:y,disableFuture:b,isDateDisabled:V,timezone:B}):J},[i,b,y,J,V,n,B]),xe=v.useMemo(()=>{const me=n.getWeekArray(i);let be=n.addMonths(i,1);for(;_&&me.length<_;){const we=n.getWeekArray(be),Oe=n.isSameDay(me[me.length-1][0],we[0][0]);we.slice(Oe?1:0).forEach(ke=>{me.length<_&&me.push(ke)}),be=n.addMonths(be,1)}return me},[i,_,n]);return $.jsxs(rst,{role:"grid","aria-labelledby":I,className:F.root,children:[$.jsxs(ost,{role:"row",className:F.header,children:[R&&$.jsx(ast,{variant:"caption",role:"columnheader","aria-label":z.calendarWeekNumberHeaderLabel,className:F.weekNumberLabel,children:z.calendarWeekNumberHeaderText}),wot(n,L).map((me,be)=>$.jsx(ist,{variant:"caption",role:"columnheader","aria-label":n.format(me,"weekday"),className:F.weekDayLabel,children:O(me)},be.toString()))]}),l?$.jsx(lst,{className:F.loadingContainer,children:p()}):$.jsx(cst,D({transKey:Q,onExited:u,reduceAnimations:f,slideDirection:m,className:pe(o,F.slideTransition)},g,{nodeRef:ue,children:$.jsx(ust,{ref:ue,role:"rowgroup",className:F.monthContainer,children:xe.map((me,be)=>$.jsxs(dst,{role:"row",className:F.weekContainer,"aria-rowindex":be+1,children:[R&&$.jsx(sst,{className:F.weekNumber,role:"rowheader","aria-label":z.calendarWeekNumberAriaLabelText(n.getWeekNumber(me[0])),children:z.calendarWeekNumberText(n.getWeekNumber(me[0]))}),me.map((we,Oe)=>$.jsx(fst,{parentProps:t,day:we,selectedDays:le,focusableDay:ge,onKeyDown:oe,onFocus:fe,onBlur:se,onDaySelect:ne,isDateDisabled:V,currentMonthNumber:ee,isViewFocused:W,"aria-colindex":Oe+1},we.toString()))]},`week-${me[0]}`))})}))]})}function hst(e){return _e("MuiPickersMonth",e)}const jC=Le("MuiPickersMonth",["root","monthButton","disabled","selected"]),mst=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],gst=e=>{const{disabled:t,selected:n,classes:r}=e;return Te({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},hst,r)},yst=ie("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),vst=ie("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${jC.disabled}`]:t.disabled},{[`&.${jC.selected}`]:t.selected}]})(({theme:e})=>D({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${jC.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${jC.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),bst=v.memo(function(t){const n=Jt({props:t,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:f,onBlur:p,"aria-current":m,"aria-label":g,slots:y,slotProps:b}=n,x=Ue(n,mst),S=v.useRef(null),P=gst(n);xn(()=>{var O;r&&((O=S.current)==null||O.focus())},[r]);const E=(y==null?void 0:y.monthButton)??vst,T=on({elementType:E,externalSlotProps:b==null?void 0:b.monthButton,additionalProps:{children:i,disabled:a,tabIndex:c,ref:S,type:"button",role:"radio","aria-current":m,"aria-checked":s,"aria-label":g,onClick:O=>u(O,l),onKeyDown:O=>d(O,l),onFocus:O=>f(O,l),onBlur:O=>p(O,l)},ownerState:n,className:P.monthButton});return $.jsx(yst,D({className:pe(P.root,o),ownerState:n},x,{children:$.jsx(E,D({},T))}))});function wst(e){return _e("MuiMonthCalendar",e)}Le("MuiMonthCalendar",["root"]);const xst=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],Sst=e=>{const{classes:t}=e;return Te({root:["root"]},wst,t)};function Cst(e,t){const n=yn(),r=zh(),o=Jt({props:e,name:t});return D({disableFuture:!1,disablePast:!1},o,{minDate:Si(n,o.minDate,r.minDate),maxDate:Si(n,o.maxDate,r.maxDate)})}const Pst=ie("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:gk,boxSizing:"border-box"}),Est=v.forwardRef(function(t,n){const r=Cst(t,"MuiMonthCalendar"),{className:o,value:i,defaultValue:a,referenceDate:s,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:f,onChange:p,shouldDisableMonth:m,readOnly:g,autoFocus:y=!1,onMonthFocus:b,hasFocus:x,onFocusedViewChange:S,monthsPerRow:P=3,timezone:E,gridLabelId:T,slots:O,slotProps:k}=r,M=Ue(r,xst),{value:I,handleValueChange:R,timezone:_}=Xv({name:"MonthCalendar",timezone:E,value:i,defaultValue:a,referenceDate:s,onChange:p,valueManager:Zr}),N=Vh(_),B=nr(),L=yn(),F=v.useMemo(()=>Zr.getInitialReferenceValue({value:I,utils:L,props:r,timezone:_,referenceDate:s,granularity:Dl.month}),[]),U=r,V=Sst(U),z=v.useMemo(()=>L.getMonth(N),[L,N]),W=v.useMemo(()=>I!=null?L.getMonth(I):null,[I,L]),[G,J]=v.useState(()=>W||L.getMonth(F)),[K,ne]=bi({name:"MonthCalendar",state:"hasFocus",controlled:x,default:y??!1}),re=Ze(Q=>{ne(Q),S&&S(Q)}),oe=v.useCallback(Q=>{const ue=L.startOfMonth(u&&L.isAfter(N,f)?N:f),ge=L.startOfMonth(c&&L.isBefore(N,d)?N:d),xe=L.startOfMonth(Q);return L.isBefore(xe,ue)||L.isAfter(xe,ge)?!0:m?m(xe):!1},[c,u,d,f,N,m,L]),fe=Ze((Q,ue)=>{if(g)return;const ge=L.setMonth(I??F,ue);R(ge)}),se=Ze(Q=>{oe(L.setMonth(I??F,Q))||(J(Q),re(!0),b&&b(Q))});v.useEffect(()=>{J(Q=>W!==null&&Q!==W?W:Q)},[W]);const ee=Ze((Q,ue)=>{switch(Q.key){case"ArrowUp":se((12+ue-3)%12),Q.preventDefault();break;case"ArrowDown":se((12+ue+3)%12),Q.preventDefault();break;case"ArrowLeft":se((12+ue+(B?1:-1))%12),Q.preventDefault();break;case"ArrowRight":se((12+ue+(B?-1:1))%12),Q.preventDefault();break}}),ce=Ze((Q,ue)=>{se(ue)}),le=Ze((Q,ue)=>{G===ue&&re(!1)});return $.jsx(Pst,D({ref:n,className:pe(V.root,o),ownerState:U,role:"radiogroup","aria-labelledby":T},M,{children:oB(L,I??F).map(Q=>{const ue=L.getMonth(Q),ge=L.format(Q,"monthShort"),xe=L.format(Q,"month"),me=ue===W,be=l||oe(Q);return $.jsx(bst,{selected:me,value:ue,onClick:fe,onKeyDown:ee,autoFocus:K&&ue===G,disabled:be,tabIndex:ue===G&&!be?0:-1,onFocus:ce,onBlur:le,"aria-current":z===ue?"date":void 0,"aria-label":xe,monthsPerRow:P,slots:O,slotProps:k,children:ge},ge)})}))});function Tst(e){return _e("MuiPickersYear",e)}const BC=Le("MuiPickersYear",["root","yearButton","selected","disabled"]),Ost=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],Ist=e=>{const{disabled:t,selected:n,classes:r}=e;return Te({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},Tst,r)},kst=ie("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),Mst=ie("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${BC.disabled}`]:t.disabled},{[`&.${BC.selected}`]:t.selected}]})(({theme:e})=>D({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:vt(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:vt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${BC.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${BC.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Ast=v.memo(function(t){const n=Jt({props:t,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:f,onBlur:p,"aria-current":m,slots:g,slotProps:y}=n,b=Ue(n,Ost),x=v.useRef(null),S=Ist(n);xn(()=>{var T;r&&((T=x.current)==null||T.focus())},[r]);const P=(g==null?void 0:g.yearButton)??Mst,E=on({elementType:P,externalSlotProps:y==null?void 0:y.yearButton,additionalProps:{children:i,disabled:a,tabIndex:c,ref:x,type:"button",role:"radio","aria-current":m,"aria-checked":s,onClick:T=>u(T,l),onKeyDown:T=>d(T,l),onFocus:T=>f(T,l),onBlur:T=>p(T,l)},ownerState:n,className:S.yearButton});return $.jsx(kst,D({className:pe(S.root,o),ownerState:n},b,{children:$.jsx(P,D({},E))}))});function $st(e){return _e("MuiYearCalendar",e)}Le("MuiYearCalendar",["root"]);const Rst=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],Dst=e=>{const{classes:t}=e;return Te({root:["root"]},$st,t)};function _st(e,t){const n=yn(),r=zh(),o=Jt({props:e,name:t});return D({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Si(n,o.minDate,r.minDate),maxDate:Si(n,o.maxDate,r.maxDate)})}const Lst=ie("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:gk,maxHeight:rot,boxSizing:"border-box",position:"relative"}),Nst=v.forwardRef(function(t,n){const r=_st(t,"MuiYearCalendar"),{autoFocus:o,className:i,value:a,defaultValue:s,referenceDate:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:p,onChange:m,readOnly:g,shouldDisableYear:y,onYearFocus:b,hasFocus:x,onFocusedViewChange:S,yearsOrder:P="asc",yearsPerRow:E,timezone:T,gridLabelId:O,slots:k,slotProps:M}=r,I=Ue(r,Rst),{value:R,handleValueChange:_,timezone:N}=Xv({name:"YearCalendar",timezone:T,value:a,defaultValue:s,referenceDate:l,onChange:m,valueManager:Zr}),B=Vh(N),L=nr(),F=yn(),U=v.useMemo(()=>Zr.getInitialReferenceValue({value:R,utils:F,props:r,timezone:N,referenceDate:l,granularity:Dl.year}),[]),V=r,z=Dst(V),W=v.useMemo(()=>F.getYear(B),[F,B]),G=v.useMemo(()=>R!=null?F.getYear(R):null,[R,F]),[J,K]=v.useState(()=>G||F.getYear(U)),[ne,re]=bi({name:"YearCalendar",state:"hasFocus",controlled:x,default:o??!1}),oe=Ze(we=>{re(we),S&&S(we)}),fe=v.useCallback(we=>{if(d&&F.isBeforeYear(we,B)||u&&F.isAfterYear(we,B)||p&&F.isBeforeYear(we,p)||f&&F.isAfterYear(we,f))return!0;if(!y)return!1;const Oe=F.startOfYear(we);return y(Oe)},[u,d,f,p,B,y,F]),se=Ze((we,Oe)=>{if(g)return;const ke=F.setYear(R??U,Oe);_(ke)}),ee=Ze(we=>{fe(F.setYear(R??U,we))||(K(we),oe(!0),b==null||b(we))});v.useEffect(()=>{K(we=>G!==null&&we!==G?G:we)},[G]);const ce=P!=="desc"?E*1:E*-1,le=L&&P==="asc"||!L&&P==="desc"?-1:1,Q=Ze((we,Oe)=>{switch(we.key){case"ArrowUp":ee(Oe-ce),we.preventDefault();break;case"ArrowDown":ee(Oe+ce),we.preventDefault();break;case"ArrowLeft":ee(Oe-le),we.preventDefault();break;case"ArrowRight":ee(Oe+le),we.preventDefault();break}}),ue=Ze((we,Oe)=>{ee(Oe)}),ge=Ze((we,Oe)=>{J===Oe&&oe(!1)}),xe=v.useRef(null),me=Wt(n,xe);v.useEffect(()=>{if(o||xe.current===null)return;const we=xe.current.querySelector('[tabindex="0"]');if(!we)return;const Oe=we.offsetHeight,ke=we.offsetTop,je=xe.current.clientHeight,de=xe.current.scrollTop,Re=ke+Oe;Oe>je||ke{const Oe=F.getYear(we),ke=Oe===G,je=c||fe(we);return $.jsx(Ast,{selected:ke,value:Oe,onClick:se,onKeyDown:Q,autoFocus:ne&&Oe===J,disabled:je,tabIndex:Oe===J&&!je?0:-1,onFocus:ue,onBlur:ge,"aria-current":W===Oe?"date":void 0,yearsPerRow:E,slots:k,slotProps:M,children:F.format(we,"year")},F.format(we,"year"))})}))}),Fst=e=>_e("MuiPickersCalendarHeader",e),jst=Le("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),Bst=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],zst=["ownerState"],Vst=e=>{const{classes:t}=e;return Te({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},Fst,t)},Hst=ie("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),Ust=ie("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>D({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),Wst=ie("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),Gst=ie(An,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${jst.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),qst=ie(jrt,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),Kst=v.forwardRef(function(t,n){const r=wo(),o=yn(),i=Jt({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:s,currentMonth:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:p,onMonthChange:m,onViewChange:g,view:y,reduceAnimations:b,views:x,labelId:S,className:P,timezone:E,format:T=`${o.formats.month} ${o.formats.year}`}=i,O=Ue(i,Bst),k=i,M=Vst(i),I=(a==null?void 0:a.switchViewButton)??Gst,R=on({elementType:I,externalSlotProps:s==null?void 0:s.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(y)},ownerState:k,className:M.switchViewButton}),_=(a==null?void 0:a.switchViewIcon)??qst,N=on({elementType:_,externalSlotProps:s==null?void 0:s.switchViewIcon,ownerState:k,className:M.switchViewIcon}),B=Ue(N,zst),L=()=>m(o.addMonths(l,1),"left"),F=()=>m(o.addMonths(l,-1),"right"),U=tot(l,{disableFuture:u,maxDate:f,timezone:E}),V=not(l,{disablePast:d,minDate:p,timezone:E}),z=()=>{if(!(x.length===1||!g||c))if(x.length===2)g(x.find(G=>G!==y)||x[0]);else{const G=x.indexOf(y)!==0?0:1;g(x[G])}};if(x.length===1&&x[0]==="year")return null;const W=o.formatByString(l,T);return $.jsxs(Hst,D({},O,{ownerState:k,className:pe(M.root,P),ref:n,children:[$.jsxs(Ust,{role:"presentation",onClick:z,ownerState:k,"aria-live":"polite",className:M.labelContainer,children:[$.jsx(Toe,{reduceAnimations:b,transKey:W,children:$.jsx(Wst,{id:S,ownerState:k,className:M.label,children:W})}),x.length>1&&!c&&$.jsx(I,D({},R,{children:$.jsx(_,D({},B))}))]}),$.jsx(xv,{in:y==="day",children:$.jsx(Qre,{slots:a,slotProps:s,onGoToPrevious:F,isPreviousDisabled:V,previousLabel:r.previousMonth,onGoToNext:L,isNextDisabled:U,nextLabel:r.nextMonth})})]}))}),Yst="@media (prefers-reduced-motion: reduce)",qg=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),z8=qg&&qg[1]?parseInt(qg[1],10):null,V8=qg&&qg[2]?parseInt(qg[2],10):null,Xst=z8&&z8<10||V8&&V8<13||!1,Ioe=()=>bf(Yst,{defaultMatches:!1})||Xst,Qst=e=>_e("MuiDateCalendar",e);Le("MuiDateCalendar",["root","viewTransitionContainer"]);const Jst=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],Zst=e=>{const{classes:t}=e;return Te({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Qst,t)};function elt(e,t){const n=yn(),r=zh(),o=Ioe(),i=Jt({props:e,name:t});return D({},i,{loading:i.loading??!1,disablePast:i.disablePast??!1,disableFuture:i.disableFuture??!1,openTo:i.openTo??"day",views:i.views??["year","day"],reduceAnimations:i.reduceAnimations??o,renderLoading:i.renderLoading??(()=>$.jsx("span",{children:"..."})),minDate:Si(n,i.minDate,r.minDate),maxDate:Si(n,i.maxDate,r.maxDate)})}const tlt=ie(vk,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:yk}),nlt=ie(Toe,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),rlt=v.forwardRef(function(t,n){const r=yn(),o=_n(),i=elt(t,"MuiDateCalendar"),{autoFocus:a,onViewChange:s,value:l,defaultValue:c,referenceDate:u,disableFuture:d,disablePast:f,onChange:p,onYearChange:m,onMonthChange:g,reduceAnimations:y,shouldDisableDate:b,shouldDisableMonth:x,shouldDisableYear:S,view:P,views:E,openTo:T,className:O,disabled:k,readOnly:M,minDate:I,maxDate:R,disableHighlightToday:_,focusedView:N,onFocusedViewChange:B,showDaysOutsideCurrentMonth:L,fixedWeekNumber:F,dayOfWeekFormatter:U,slots:V,slotProps:z,loading:W,renderLoading:G,displayWeekNumber:J,yearsOrder:K,yearsPerRow:ne,monthsPerRow:re,timezone:oe}=i,fe=Ue(i,Jst),{value:se,handleValueChange:ee,timezone:ce}=Xv({name:"DateCalendar",timezone:oe,value:l,defaultValue:c,referenceDate:u,onChange:p,valueManager:Zr}),{view:le,setView:Q,focusedView:ue,setFocusedView:ge,goToNextView:xe,setValueAndGoToNextView:me}=_S({view:P,views:E,openTo:T,onChange:ee,onViewChange:s,autoFocus:a,focusedView:N,onFocusedViewChange:B}),{referenceDate:be,calendarState:we,changeFocusedDay:Oe,changeMonth:ke,handleChangeMonth:je,isDateDisabled:de,onMonthSwitchingAnimationEnd:Re}=Uat({value:se,referenceDate:u,reduceAnimations:y,onMonthChange:g,minDate:I,maxDate:R,shouldDisableDate:b,disablePast:f,disableFuture:d,timezone:ce}),Me=k&&se||I,Ae=k&&se||R,Ne=`${o}-grid-label`,Je=ue!==null,nt=(V==null?void 0:V.calendarHeader)??Kst,st=on({elementType:nt,externalSlotProps:z==null?void 0:z.calendarHeader,additionalProps:{views:E,view:le,currentMonth:we.currentMonth,onViewChange:Q,onMonthChange:(xt,vn)=>je({newMonth:xt,direction:vn}),minDate:Me,maxDate:Ae,disabled:k,disablePast:f,disableFuture:d,reduceAnimations:y,timezone:ce,labelId:Ne},ownerState:i}),$t=Ze(xt=>{const vn=r.startOfMonth(xt),zn=r.endOfMonth(xt),Wn=de(xt)?lw({utils:r,date:xt,minDate:r.isBefore(I,vn)?vn:I,maxDate:r.isAfter(R,zn)?zn:R,disablePast:f,disableFuture:d,isDateDisabled:de,timezone:ce}):xt;Wn?(me(Wn,"finish"),g==null||g(vn)):(xe(),ke(vn)),Oe(Wn,!0)}),ct=Ze(xt=>{const vn=r.startOfYear(xt),zn=r.endOfYear(xt),Wn=de(xt)?lw({utils:r,date:xt,minDate:r.isBefore(I,vn)?vn:I,maxDate:r.isAfter(R,zn)?zn:R,disablePast:f,disableFuture:d,isDateDisabled:de,timezone:ce}):xt;Wn?(me(Wn,"finish"),m==null||m(Wn)):(xe(),ke(vn)),Oe(Wn,!0)}),_t=Ze(xt=>ee(xt&&_T(r,xt,se??be),"finish",le));v.useEffect(()=>{se!=null&&r.isValid(se)&&ke(se)},[se]);const pt=i,ot=Zst(pt),Pe={disablePast:f,disableFuture:d,maxDate:R,minDate:I},We={disableHighlightToday:_,readOnly:M,disabled:k,timezone:ce,gridLabelId:Ne,slots:V,slotProps:z},ft=v.useRef(le);v.useEffect(()=>{ft.current!==le&&(ue===ft.current&&ge(le,!0),ft.current=le)},[ue,ge,le]);const Ot=v.useMemo(()=>[se],[se]);return $.jsxs(tlt,D({ref:n,className:pe(ot.root,O),ownerState:pt},fe,{children:[$.jsx(nt,D({},st,{slots:V,slotProps:z})),$.jsx(nlt,{reduceAnimations:y,className:ot.viewTransitionContainer,transKey:le,ownerState:pt,children:$.jsxs("div",{children:[le==="year"&&$.jsx(Nst,D({},Pe,We,{value:se,onChange:ct,shouldDisableYear:S,hasFocus:Je,onFocusedViewChange:xt=>ge("year",xt),yearsOrder:K,yearsPerRow:ne,referenceDate:be})),le==="month"&&$.jsx(Est,D({},Pe,We,{hasFocus:Je,className:O,value:se,onChange:$t,shouldDisableMonth:x,onFocusedViewChange:xt=>ge("month",xt),monthsPerRow:re,referenceDate:be})),le==="day"&&$.jsx(pst,D({},we,Pe,We,{onMonthSwitchingAnimationEnd:Re,onFocusedDayChange:Oe,reduceAnimations:y,selectedDays:Ot,onSelectedDaysChange:_t,shouldDisableDate:b,shouldDisableMonth:x,shouldDisableYear:S,hasFocus:Je,onFocusedViewChange:xt=>ge("day",xt),showDaysOutsideCurrentMonth:L,fixedWeekNumber:F,dayOfWeekFormatter:U,displayWeekNumber:J,loading:W,renderLoading:G}))]})})]}))});function koe(e){return _e("MuiPickersToolbar",e)}const olt=Le("MuiPickersToolbar",["root","content"]),ilt=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],alt=e=>{const{classes:t}=e;return Te({root:["root"],content:["content"]},koe,t)},slt=ie("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),llt=ie("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),bB=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:a,hidden:s,titleId:l}=r,c=Ue(r,ilt),u=r,d=alt(u);return s?null:$.jsxs(slt,D({ref:n,className:pe(d.root,i),ownerState:u},c,{children:[$.jsx(ut,{color:"text.secondary",variant:"overline",id:l,children:a}),$.jsx(llt,{className:d.content,ownerState:u,children:o})]}))});function clt(e){return _e("MuiDatePickerToolbar",e)}Le("MuiDatePickerToolbar",["root","title"]);const ult=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],dlt=e=>{const{classes:t}=e;return Te({root:["root"],title:["title"]},clt,t)},flt=ie(bB,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),plt=ie(ut,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),hlt=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:a,toolbarPlaceholder:s="––",views:l,className:c}=r,u=Ue(r,ult),d=yn(),f=wo(),p=dlt(r),m=v.useMemo(()=>{if(!o)return s;const y=kx(d,{format:a,views:l},!0);return d.formatByString(o,y)},[o,a,s,d,l]),g=r;return $.jsx(flt,D({ref:n,toolbarTitle:f.datePickerToolbarTitle,isLandscape:i,className:pe(p.root,c)},u,{children:$.jsx(plt,{variant:"h4",align:i?"left":"center",ownerState:g,className:p.title,children:m})}))});function Moe(e,t){const n=yn(),r=zh(),o=Jt({props:e,name:t}),i=v.useMemo(()=>{var a;return((a=o.localeText)==null?void 0:a.toolbarTitle)==null?o.localeText:D({},o.localeText,{datePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return D({},o,{localeText:i},rB({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Si(n,o.minDate,r.minDate),maxDate:Si(n,o.maxDate,r.maxDate),slots:D({toolbar:hlt},o.slots)})}function mlt(e){return _e("MuiPickersPopper",e)}Le("MuiPickersPopper",["root","paper"]);const glt=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],ylt=e=>{const{classes:t}=e;return Te({root:["root"],paper:["paper"]},mlt,t)},vlt=ie($f,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),blt=ie(so,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:e})=>["top","top-start","top-end"].includes(e),style:{transformOrigin:"bottom center"}}]});function wlt(e,t){return t.documentElement.clientWidth{if(!e)return;function l(){i.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),i.current=!1}},[e]);const a=Ze(l=>{if(!i.current)return;const c=r.current;r.current=!1;const u=mr(o.current);if(!o.current||"clientX"in l&&wlt(l,u))return;if(n.current){n.current=!1;return}let d;l.composedPath?d=l.composedPath().indexOf(o.current)>-1:d=!u.documentElement.contains(l.target)||o.current.contains(l.target),!d&&!c&&t(l)}),s=()=>{r.current=!0};return v.useEffect(()=>{if(e){const l=mr(o.current),c=()=>{n.current=!0};return l.addEventListener("touchstart",a),l.addEventListener("touchmove",c),()=>{l.removeEventListener("touchstart",a),l.removeEventListener("touchmove",c)}}},[e,a]),v.useEffect(()=>{if(e){const l=mr(o.current);return l.addEventListener("click",a),()=>{l.removeEventListener("click",a),r.current=!1}}},[e,a]),[o,s,s]}const Slt=v.forwardRef((e,t)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:i,paperSlotProps:a,paperClasses:s,onPaperClick:l,onPaperTouchStart:c}=e,u=Ue(e,glt),d=D({},o,{placement:r}),f=on({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:s,ownerState:d});return $.jsx(n,D({},u,f,{onClick:p=>{var m;l(p),(m=f.onClick)==null||m.call(f,p)},onTouchStart:p=>{var m;c(p),(m=f.onTouchStart)==null||m.call(f,p)},ownerState:d,children:i}))});function Clt(e){const t=Jt({props:e,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:i,onBlur:a,onDismiss:s,open:l,role:c,placement:u,slots:d,slotProps:f,reduceAnimations:p}=t;v.useEffect(()=>{function L(F){l&&F.key==="Escape"&&s()}return document.addEventListener("keydown",L),()=>{document.removeEventListener("keydown",L)}},[s,l]);const m=v.useRef(null);v.useEffect(()=>{c==="tooltip"||i&&!i()||(l?m.current=oa(document):m.current&&m.current instanceof HTMLElement&&setTimeout(()=>{m.current instanceof HTMLElement&&m.current.focus()}))},[l,c,i]);const[g,y,b]=xlt(l,a??s),x=v.useRef(null),S=Wt(x,o),P=Wt(S,g),E=t,T=ylt(E),O=Ioe(),k=p??O,M=L=>{L.key==="Escape"&&(L.stopPropagation(),s())},I=(d==null?void 0:d.desktopTransition)??k?xv:gh,R=(d==null?void 0:d.desktopTrapFocus)??EF,_=(d==null?void 0:d.desktopPaper)??blt,N=(d==null?void 0:d.popper)??vlt,B=on({elementType:N,externalSlotProps:f==null?void 0:f.popper,additionalProps:{transition:!0,role:c,open:l,anchorEl:n,placement:u,onKeyDown:M},className:T.root,ownerState:t});return $.jsx(N,D({},B,{children:({TransitionProps:L,placement:F})=>$.jsx(R,D({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:c==="tooltip",isEnabled:()=>!0},f==null?void 0:f.desktopTrapFocus,{children:$.jsx(I,D({},L,f==null?void 0:f.desktopTransition,{children:$.jsx(Slt,{PaperComponent:_,ownerState:E,popperPlacement:F,ref:P,onPaperClick:y,onPaperTouchStart:b,paperClasses:T.paper,paperSlotProps:f==null?void 0:f.desktopPaper,children:r})}))}))}))}const Plt=({open:e,onOpen:t,onClose:n})=>{const r=v.useRef(typeof e=="boolean").current,[o,i]=v.useState(!1);v.useEffect(()=>{if(r){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}},[r,e]);const a=v.useCallback(s=>{r||i(s),s&&t&&t(),!s&&n&&n()},[r,t,n]);return{isOpen:o,setIsOpen:a}},Elt=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,i=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?i&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?i?!0:n(r.lastPublishedValue):!1},Tlt=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=e,a=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&i?a?!0:n(r.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&n(r.lastCommittedValue):!1},Olt=e=>{const{action:t,closeOnSelect:n}=e;return t.name==="setValueFromAction"?!0:t.name==="setValueFromView"?t.selectionState==="finish"&&n:t.name==="setValueFromShortcut"?t.changeImportance==="accept":!1},Ilt=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:i,onChange:a,value:s,defaultValue:l,closeOnSelect:c=r==="desktop",timezone:u,referenceDate:d}=e,{current:f}=v.useRef(l),{current:p}=v.useRef(s!==void 0),[m,g]=v.useState(u),y=yn(),b=Bh(),{isOpen:x,setIsOpen:S}=Plt(e),{timezone:P,value:E,handleValueChange:T}=aB({timezone:u,value:s,defaultValue:f,referenceDate:d,onChange:a,valueManager:t}),[O,k]=v.useState(()=>{let ee;return E!==void 0?ee=E:f!==void 0?ee=f:ee=t.emptyValue,{draft:ee,lastPublishedValue:ee,lastCommittedValue:ee,lastControlledValue:s,hasBeenModifiedSinceMount:!1}}),M=t.getTimezone(y,O.draft);m!==u&&(g(u),u&&M&&u!==M&&k(ee=>D({},ee,{draft:t.setTimezone(y,u,ee.draft)})));const{getValidationErrorForNewValue:I}=poe({props:e,validator:o,timezone:P,value:O.draft,onError:e.onError}),R=Ze(ee=>{const ce={action:ee,dateState:O,hasChanged:me=>!t.areValuesEqual(y,ee.value,me),isControlled:p,closeOnSelect:c},le=Elt(ce),Q=Tlt(ce),ue=Olt(ce);k(me=>D({},me,{draft:ee.value,lastPublishedValue:le?ee.value:me.lastPublishedValue,lastCommittedValue:Q?ee.value:me.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let ge=null;const xe=()=>(ge||(ge={validationError:ee.name==="setValueFromField"?ee.context.validationError:I(ee.value)},ee.name==="setValueFromShortcut"&&(ge.shortcut=ee.shortcut)),ge);le&&T(ee.value,xe()),Q&&i&&i(ee.value,xe()),ue&&S(!1)});if(O.lastControlledValue!==s){const ee=t.areValuesEqual(y,O.draft,E);k(ce=>D({},ce,{lastControlledValue:s},ee?{}:{lastCommittedValue:E,lastPublishedValue:E,draft:E,hasBeenModifiedSinceMount:!0}))}const _=Ze(()=>{R({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),N=Ze(()=>{R({value:O.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),B=Ze(()=>{R({value:O.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),L=Ze(()=>{R({value:O.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),F=Ze(()=>{R({value:t.getTodayValue(y,P,n),name:"setValueFromAction",pickerAction:"today"})}),U=Ze(ee=>{ee.preventDefault(),S(!0)}),V=Ze(ee=>{ee==null||ee.preventDefault(),S(!1)}),z=Ze((ee,ce="partial")=>R({name:"setValueFromView",value:ee,selectionState:ce})),W=Ze((ee,ce,le)=>R({name:"setValueFromShortcut",value:ee,changeImportance:ce,shortcut:le})),G=Ze((ee,ce)=>R({name:"setValueFromField",value:ee,context:ce})),J={onClear:_,onAccept:N,onDismiss:B,onCancel:L,onSetToday:F,onOpen:U,onClose:V},K={value:O.draft,onChange:G},ne=v.useMemo(()=>t.cleanValue(y,O.draft),[y,t,O.draft]),re={value:ne,onChange:z,onClose:V,open:x},fe=D({},J,{value:ne,onChange:z,onSelectShortcut:W,isValid:ee=>{const ce=o({adapter:b,value:ee,timezone:P,props:e});return!t.hasError(ce)}}),se=v.useMemo(()=>({onOpen:U,onClose:V,open:x}),[x,V,U]);return{open:x,fieldProps:K,viewProps:re,layoutProps:fe,actions:J,contextValue:se}},klt=["className","sx"],Mlt=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:i})=>{const{onChange:a,open:s,onClose:l}=t,{view:c,views:u,openTo:d,onViewChange:f,viewRenderers:p,timezone:m}=e,g=Ue(e,klt),{view:y,setView:b,defaultView:x,focusedView:S,setFocusedView:P,setValueAndGoToNextView:E}=_S({view:c,views:u,openTo:d,onChange:a,onViewChange:f,autoFocus:r}),{hasUIView:T,viewModeLookup:O}=v.useMemo(()=>u.reduce((B,L)=>{let F;return p[L]!=null?F="UI":F="field",B.viewModeLookup[L]=F,F==="UI"&&(B.hasUIView=!0),B},{hasUIView:!1,viewModeLookup:{}}),[p,u]),k=v.useMemo(()=>u.reduce((B,L)=>p[L]!=null&&nv(L)?B+1:B,0),[p,u]),M=O[y],I=Ze(()=>M==="UI"),[R,_]=v.useState(M==="UI"?y:null);return R!==y&&O[y]==="UI"&&_(y),xn(()=>{M==="field"&&s&&(l(),setTimeout(()=>{var B,L;(B=i==null?void 0:i.current)==null||B.setSelectedSections(y),(L=i==null?void 0:i.current)==null||L.focusField(y)}))},[y]),xn(()=>{if(!s)return;let B=y;M==="field"&&R!=null&&(B=R),B!==x&&O[B]==="UI"&&O[x]==="UI"&&(B=x),B!==y&&b(B),P(B,!0)},[s]),{hasUIView:T,shouldRestoreFocus:I,layoutProps:{views:u,view:R,onViewChange:b},renderCurrentView:()=>{if(R==null)return null;const B=p[R];if(B==null)return null;const L=D({},g,n,t,{views:u,timezone:m,onChange:E,view:R,onViewChange:b,focusedView:S,onFocusedViewChange:P,showViewSwitcher:k>1,timeViewsCount:k});return o?o(p,R,L):B(L)}}};function H8(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const Alt=(e,t)=>{const[n,r]=v.useState(H8);return xn(()=>{const i=()=>{r(H8())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),Jm(e,["hours","minutes","seconds"])?!1:(t||n)==="landscape"},$lt=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,i=Alt(n.views,o),a=nr();return{layoutProps:D({},n,t,{isLandscape:i,isRtl:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}};function Rlt(e){const{props:t,pickerValueResponse:n}=e;return v.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}const Aoe=({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:i,autoFocusView:a,rendererInterceptor:s,fieldRef:l})=>{const c=Ilt({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i}),u=Mlt({props:e,additionalViewProps:o,autoFocusView:a,fieldRef:l,propsFromPickerValue:c.viewProps,rendererInterceptor:s}),d=$lt({props:e,wrapperVariant:r,propsFromPickerValue:c.layoutProps,propsFromPickerViews:u.layoutProps}),f=Rlt({props:e,pickerValueResponse:c});return{open:c.open,actions:c.actions,fieldProps:c.fieldProps,renderCurrentView:u.renderCurrentView,hasUIView:u.hasUIView,shouldRestoreFocus:u.shouldRestoreFocus,layoutProps:d.layoutProps,contextValue:c.contextValue,ownerState:f}};function $oe(e){return _e("MuiPickersLayout",e)}const Al=Le("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),Dlt=["onAccept","onClear","onCancel","onSetToday","actions"];function _lt(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:i}=e,a=Ue(e,Dlt),s=wo();if(i==null||i.length===0)return null;const l=i==null?void 0:i.map(c=>{switch(c){case"clear":return $.jsx(yt,{onClick:n,children:s.clearButtonLabel},c);case"cancel":return $.jsx(yt,{onClick:r,children:s.cancelButtonLabel},c);case"accept":return $.jsx(yt,{onClick:t,children:s.okButtonLabel},c);case"today":return $.jsx(yt,{onClick:o,children:s.todayButtonLabel},c);default:return null}});return $.jsx(OJ,D({},a,{children:l}))}const Llt=["items","changeImportance","isLandscape","onChange","isValid"],Nlt=["getValue"];function Flt(e){const{items:t,changeImportance:n="accept",onChange:r,isValid:o}=e,i=Ue(e,Llt);if(t==null||t.length===0)return null;const a=t.map(s=>{let{getValue:l}=s,c=Ue(s,Nlt);const u=l({isValid:o});return D({},c,{label:c.label,onClick:()=>{r(u,n,c)},disabled:!o(u)})});return $.jsx(ol,D({dense:!0,sx:[{maxHeight:yk,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:a.map(s=>$.jsx(Ja,{children:$.jsx(hh,D({},s))},s.id??s.label))}))}function jlt(e){return e.view!==null}const Blt=e=>{const{classes:t,isLandscape:n}=e;return Te({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},$oe,t)},Roe=e=>{const{wrapperVariant:t,onAccept:n,onClear:r,onCancel:o,onSetToday:i,view:a,views:s,onViewChange:l,value:c,onChange:u,onSelectShortcut:d,isValid:f,isLandscape:p,disabled:m,readOnly:g,children:y,slots:b,slotProps:x}=e,S=Blt(e),P=(b==null?void 0:b.actionBar)??_lt,E=on({elementType:P,externalSlotProps:x==null?void 0:x.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:i,actions:t==="desktop"?[]:["cancel","accept"]},className:S.actionBar,ownerState:D({},e,{wrapperVariant:t})}),T=$.jsx(P,D({},E)),O=b==null?void 0:b.toolbar,k=on({elementType:O,externalSlotProps:x==null?void 0:x.toolbar,additionalProps:{isLandscape:p,onChange:u,value:c,view:a,onViewChange:l,views:s,disabled:m,readOnly:g},className:S.toolbar,ownerState:D({},e,{wrapperVariant:t})}),M=jlt(k)&&O?$.jsx(O,D({},k)):null,I=y,R=b==null?void 0:b.tabs,_=a&&R?$.jsx(R,D({view:a,onViewChange:l,className:S.tabs},x==null?void 0:x.tabs)):null,N=(b==null?void 0:b.shortcuts)??Flt,B=on({elementType:N,externalSlotProps:x==null?void 0:x.shortcuts,additionalProps:{isValid:f,isLandscape:p,onChange:d},className:S.shortcuts,ownerState:{isValid:f,isLandscape:p,onChange:d,wrapperVariant:t}}),L=a&&N?$.jsx(N,D({},B)):null;return{toolbar:M,content:I,tabs:_,actionBar:T,shortcuts:L}},zlt=e=>{const{isLandscape:t,classes:n}=e;return Te({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},$oe,n)},Doe=ie("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Al.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${Al.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Al.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${Al.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${Al.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Al.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${Al.shortcuts}`]:{gridColumn:3}}}]}),_oe=ie("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Loe=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:a,actionBar:s,shortcuts:l}=Roe(r),{sx:c,className:u,isLandscape:d,wrapperVariant:f}=r,p=zlt(r);return $.jsxs(Doe,{ref:n,sx:c,className:pe(p.root,u),ownerState:r,children:[d?l:o,d?o:l,$.jsx(_oe,{className:p.contentWrapper,children:f==="desktop"?$.jsxs(v.Fragment,{children:[i,a]}):$.jsxs(v.Fragment,{children:[a,i]})}),s]})}),Vlt=["props","getOpenDialogAriaText"],Hlt=["ownerState"],Ult=["ownerState"],wB=e=>{var xe;let{props:t,getOpenDialogAriaText:n}=e,r=Ue(e,Vlt);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,name:m,label:g,inputRef:y,readOnly:b,disabled:x,autoFocus:S,localeText:P,reduceAnimations:E}=t,T=v.useRef(null),O=v.useRef(null),k=_n(),M=((xe=i==null?void 0:i.toolbar)==null?void 0:xe.hidden)??!1,{open:I,actions:R,hasUIView:_,layoutProps:N,renderCurrentView:B,shouldRestoreFocus:L,fieldProps:F,contextValue:U,ownerState:V}=Aoe(D({},r,{props:t,fieldRef:O,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),z=o.inputAdornment??co,W=on({elementType:z,externalSlotProps:i==null?void 0:i.inputAdornment,additionalProps:{position:"end"},ownerState:t}),G=Ue(W,Hlt),J=o.openPickerButton??An,K=on({elementType:J,externalSlotProps:i==null?void 0:i.openPickerButton,additionalProps:{disabled:x||b,onClick:I?R.onClose:R.onOpen,"aria-label":n(F.value),edge:G.position},ownerState:t}),ne=Ue(K,Ult),re=o.openPickerIcon,oe=on({elementType:re,externalSlotProps:i==null?void 0:i.openPickerIcon,ownerState:V}),fe=o.field,se=on({elementType:fe,externalSlotProps:i==null?void 0:i.field,additionalProps:D({},F,M&&{id:k},{readOnly:b,disabled:x,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,label:g,name:m,autoFocus:S&&!t.open,focused:I?!0:void 0},y?{inputRef:y}:{}),ownerState:t});_&&(se.InputProps=D({},se.InputProps,{ref:T},!t.disableOpenPicker&&{[`${G.position}Adornment`]:$.jsx(z,D({},G,{children:$.jsx(J,D({},ne,{children:$.jsx(re,D({},oe))}))}))}));const ee=D({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},se.slots),ce=o.layout??Loe;let le=k;M&&(g?le=`${k}-label`:le=void 0);const Q=D({},i,{toolbar:D({},i==null?void 0:i.toolbar,{titleId:k}),popper:D({"aria-labelledby":le},i==null?void 0:i.popper)}),ue=Wt(O,se.unstableFieldRef);return{renderPicker:()=>$.jsxs(hoe,{contextValue:U,localeText:P,children:[$.jsx(fe,D({},se,{slots:ee,slotProps:Q,unstableFieldRef:ue})),$.jsx(Clt,D({role:"dialog",placement:"bottom-start",anchorEl:T.current},R,{open:I,slots:o,slotProps:Q,shouldRestoreFocus:L,reduceAnimations:E,children:$.jsx(ce,D({},N,Q==null?void 0:Q.layout,{slots:o,slotProps:Q,children:B()}))}))]})}},Ys=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:g,shouldDisableMonth:y,shouldDisableYear:b,reduceAnimations:x,onMonthChange:S,monthsPerRow:P,onYearChange:E,yearsOrder:T,yearsPerRow:O,slots:k,slotProps:M,loading:I,renderLoading:R,disableHighlightToday:_,readOnly:N,disabled:B,showDaysOutsideCurrentMonth:L,dayOfWeekFormatter:F,sx:U,autoFocus:V,fixedWeekNumber:z,displayWeekNumber:W,timezone:G})=>$.jsx(rlt,{view:e,onViewChange:t,views:n.filter(ov),focusedView:r&&ov(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:g,shouldDisableMonth:y,shouldDisableYear:b,reduceAnimations:x,onMonthChange:S,monthsPerRow:P,onYearChange:E,yearsOrder:T,yearsPerRow:O,slots:k,slotProps:M,loading:I,renderLoading:R,disableHighlightToday:_,readOnly:N,disabled:B,showDaysOutsideCurrentMonth:L,dayOfWeekFormatter:F,sx:U,autoFocus:V,fixedWeekNumber:z,displayWeekNumber:W,timezone:G}),Noe=v.forwardRef(function(t,n){var c,u;const r=wo(),o=yn(),i=Moe(t,"MuiDesktopDatePicker"),a=D({day:Ys,month:Ys,year:Ys},i.viewRenderers),s=D({},i,{viewRenderers:a,format:kx(o,i,!1),yearsPerRow:i.yearsPerRow??4,slots:D({openPickerIcon:Xre,field:Soe},i.slots),slotProps:D({},i.slotProps,{field:d=>{var f;return D({},_u((f=i.slotProps)==null?void 0:f.field,d),Jv(i),{ref:n})},toolbar:D({hidden:!0},(c=i.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=wB({props:s,valueManager:Zr,valueType:"date",getOpenDialogAriaText:Yv({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(u=s.localeText)==null?void 0:u.openDatePickerDialogue}),validator:Qv});return l()});Noe.propTypes={autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,dayOfWeekFormatter:j.func,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableHighlightToday:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,displayWeekNumber:j.bool,enableAccessibleFieldDOMStructure:j.any,fixedWeekNumber:j.number,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:mv,label:j.node,loading:j.bool,localeText:j.object,maxDate:j.object,minDate:j.object,monthsPerRow:j.oneOf([3,4]),name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onMonthChange:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,onYearChange:j.func,open:j.bool,openTo:j.oneOf(["day","month","year"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,renderLoading:j.func,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableDate:j.func,shouldDisableMonth:j.func,shouldDisableYear:j.func,showDaysOutsideCurrentMonth:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),timezone:j.string,value:j.object,view:j.oneOf(["day","month","year"]),viewRenderers:j.shape({day:j.func,month:j.func,year:j.func}),views:j.arrayOf(j.oneOf(["day","month","year"]).isRequired),yearsOrder:j.oneOf(["asc","desc"]),yearsPerRow:j.oneOf([3,4])};const Wlt=ie(TJ)({[`& .${Q0.container}`]:{outline:0},[`& .${Q0.paper}`]:{outline:0,minWidth:gk}}),Glt=ie(IJ)({"&:first-of-type":{padding:0}});function qlt(e){const{children:t,onDismiss:n,open:r,slots:o,slotProps:i}=e,a=(o==null?void 0:o.dialog)??Wlt,s=(o==null?void 0:o.mobileTransition)??xv;return $.jsx(a,D({open:r,onClose:n},i==null?void 0:i.dialog,{TransitionComponent:s,TransitionProps:i==null?void 0:i.mobileTransition,PaperComponent:o==null?void 0:o.mobilePaper,PaperProps:i==null?void 0:i.mobilePaper,children:$.jsx(Glt,{children:t})}))}const Klt=["props","getOpenDialogAriaText"],xB=e=>{var G;let{props:t,getOpenDialogAriaText:n}=e,r=Ue(e,Klt);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,name:m,label:g,inputRef:y,readOnly:b,disabled:x,localeText:S}=t,P=v.useRef(null),E=_n(),T=((G=i==null?void 0:i.toolbar)==null?void 0:G.hidden)??!1,{open:O,actions:k,layoutProps:M,renderCurrentView:I,fieldProps:R,contextValue:_}=Aoe(D({},r,{props:t,fieldRef:P,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),N=o.field,B=on({elementType:N,externalSlotProps:i==null?void 0:i.field,additionalProps:D({},R,T&&{id:E},!(x||b)&&{onClick:k.onOpen,onKeyDown:iit(k.onOpen)},{readOnly:b??!0,disabled:x,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,label:g,name:m},y?{inputRef:y}:{}),ownerState:t});B.inputProps=D({},B.inputProps,{"aria-label":n(R.value)});const L=D({textField:o.textField},B.slots),F=o.layout??Loe;let U=E;T&&(g?U=`${E}-label`:U=void 0);const V=D({},i,{toolbar:D({},i==null?void 0:i.toolbar,{titleId:E}),mobilePaper:D({"aria-labelledby":U},i==null?void 0:i.mobilePaper)}),z=Wt(P,B.unstableFieldRef);return{renderPicker:()=>$.jsxs(hoe,{contextValue:_,localeText:S,children:[$.jsx(N,D({},B,{slots:L,slotProps:V,unstableFieldRef:z})),$.jsx(qlt,D({},k,{open:O,slots:o,slotProps:V,children:$.jsx(F,D({},M,V==null?void 0:V.layout,{slots:o,slotProps:V,children:I()}))}))]})}},Foe=v.forwardRef(function(t,n){var c,u;const r=wo(),o=yn(),i=Moe(t,"MuiMobileDatePicker"),a=D({day:Ys,month:Ys,year:Ys},i.viewRenderers),s=D({},i,{viewRenderers:a,format:kx(o,i,!1),slots:D({field:Soe},i.slots),slotProps:D({},i.slotProps,{field:d=>{var f;return D({},_u((f=i.slotProps)==null?void 0:f.field,d),Jv(i),{ref:n})},toolbar:D({hidden:!1},(c=i.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=xB({props:s,valueManager:Zr,valueType:"date",getOpenDialogAriaText:Yv({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(u=s.localeText)==null?void 0:u.openDatePickerDialogue}),validator:Qv});return l()});Foe.propTypes={autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,dayOfWeekFormatter:j.func,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableHighlightToday:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,displayWeekNumber:j.bool,enableAccessibleFieldDOMStructure:j.any,fixedWeekNumber:j.number,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:mv,label:j.node,loading:j.bool,localeText:j.object,maxDate:j.object,minDate:j.object,monthsPerRow:j.oneOf([3,4]),name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onMonthChange:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,onYearChange:j.func,open:j.bool,openTo:j.oneOf(["day","month","year"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,renderLoading:j.func,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableDate:j.func,shouldDisableMonth:j.func,shouldDisableYear:j.func,showDaysOutsideCurrentMonth:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),timezone:j.string,value:j.object,view:j.oneOf(["day","month","year"]),viewRenderers:j.shape({day:j.func,month:j.func,year:j.func}),views:j.arrayOf(j.oneOf(["day","month","year"]).isRequired),yearsOrder:j.oneOf(["asc","desc"]),yearsPerRow:j.oneOf([3,4])};const Ylt=["desktopModeMediaQuery"],joe=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=dB}=r,i=Ue(r,Ylt);return bf(o,{defaultMatches:!0})?$.jsx(Noe,D({ref:n},i)):$.jsx(Foe,D({ref:n},i))});function Xlt(e){return _e("MuiPickersToolbarText",e)}const Q_=Le("MuiPickersToolbarText",["root","selected"]),Qlt=["className","selected","value"],Jlt=e=>{const{classes:t,selected:n}=e;return Te({root:["root",n&&"selected"]},Xlt,t)},Zlt=ie(ut,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${Q_.selected}`]:t.selected}]})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${Q_.selected}`]:{color:(e.vars||e).palette.text.primary}})),SB=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersToolbarText"}),{className:o,value:i}=r,a=Ue(r,Qlt),s=Jlt(r);return $.jsx(Zlt,D({ref:n,className:pe(s.root,o),component:"span"},a,{children:i}))}),ect=["align","className","selected","typographyClassName","value","variant","width"],tct=e=>{const{classes:t}=e;return Te({root:["root"]},koe,t)},nct=ie(yt,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),Na=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiPickersToolbarButton"}),{align:o,className:i,selected:a,typographyClassName:s,value:l,variant:c,width:u}=r,d=Ue(r,ect),f=tct(r);return $.jsx(nct,D({variant:"text",ref:n,className:pe(f.root,i)},u?{sx:{width:u}}:{},d,{children:$.jsx(SB,{align:o,className:s,variant:c,value:l,selected:a})}))});function rct(e){return _e("MuiTimePickerToolbar",e)}const cw=Le("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),oct=["ampm","ampmInClock","value","isLandscape","onChange","view","onViewChange","views","disabled","readOnly","className"],ict=e=>{const{isLandscape:t,classes:n,isRtl:r}=e;return Te({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",t&&"hourMinuteLabelLandscape",r&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",t&&"ampmLandscape"],ampmLabel:["ampmLabel"]},rct,n)},act=ie(bB,{name:"MuiTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),sct=ie(SB,{name:"MuiTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),lct=ie("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${cw.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${cw.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{isLandscape:!0},style:{marginTop:"auto"}}]}),cct=ie("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${cw.ampmLabel}`]:t.ampmLabel},{[`&.${cw.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${cw.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function uct(e){const t=Jt({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,isLandscape:i,onChange:a,view:s,onViewChange:l,views:c,disabled:u,readOnly:d,className:f}=t,p=Ue(t,oct),m=yn(),g=wo(),y=nr(),b=!!(n&&!r&&c.includes("hours")),{meridiemMode:x,handleMeridiemChange:S}=hk(o,n,a),P=k=>n?m.format(k,"hours12h"):m.format(k,"hours24h"),E=D({},t,{isRtl:y}),T=ict(E),O=$.jsx(sct,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:T.separator});return $.jsxs(act,D({landscapeDirection:"row",toolbarTitle:g.timePickerToolbarTitle,isLandscape:i,ownerState:E,className:pe(T.root,f)},p,{children:[$.jsxs(lct,{className:T.hourMinuteLabel,ownerState:E,children:[Jm(c,"hours")&&$.jsx(Na,{tabIndex:-1,variant:"h3",onClick:()=>l("hours"),selected:s==="hours",value:o?P(o):"--"}),Jm(c,["hours","minutes"])&&O,Jm(c,"minutes")&&$.jsx(Na,{tabIndex:-1,variant:"h3",onClick:()=>l("minutes"),selected:s==="minutes",value:o?m.format(o,"minutes"):"--"}),Jm(c,["minutes","seconds"])&&O,Jm(c,"seconds")&&$.jsx(Na,{variant:"h3",onClick:()=>l("seconds"),selected:s==="seconds",value:o?m.format(o,"seconds"):"--"})]}),b&&$.jsxs(cct,{className:T.ampmSelection,ownerState:E,children:[$.jsx(Na,{disableRipple:!0,variant:"subtitle2",selected:x==="am",typographyClassName:T.ampmLabel,value:Nl(m,"am"),onClick:d?void 0:()=>S("am"),disabled:u}),$.jsx(Na,{disableRipple:!0,variant:"subtitle2",selected:x==="pm",typographyClassName:T.ampmLabel,value:Nl(m,"pm"),onClick:d?void 0:()=>S("pm"),disabled:u})]})]}))}function Boe(e,t){var a;const n=yn(),r=Jt({props:e,name:t}),o=r.ampm??n.is12HourCycleInCurrentLocale(),i=v.useMemo(()=>{var s;return((s=r.localeText)==null?void 0:s.toolbarTitle)==null?r.localeText:D({},r.localeText,{timePickerToolbarTitle:r.localeText.toolbarTitle})},[r.localeText]);return D({},r,{ampm:o,localeText:i},rB({views:r.views,openTo:r.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{disableFuture:r.disableFuture??!1,disablePast:r.disablePast??!1,slots:D({toolbar:uct},r.slots),slotProps:D({},r.slotProps,{toolbar:D({ampm:o,ampmInClock:r.ampmInClock},(a=r.slotProps)==null?void 0:a.toolbar)})})}const Kg=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:y,ampm:b,ampmInClock:x,slots:S,slotProps:P,readOnly:E,disabled:T,sx:O,autoFocus:k,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:I,timezone:R})=>$.jsx(nit,{view:e,onViewChange:t,focusedView:n&&nv(n)?n:null,onFocusedViewChange:r,views:o.filter(nv),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:y,ampm:b,ampmInClock:x,slots:S,slotProps:P,readOnly:E,disabled:T,sx:O,autoFocus:k,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:I,timezone:R}),zoe=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:y,ampm:b,slots:x,slotProps:S,readOnly:P,disabled:E,sx:T,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeSteps:M,skipDisabled:I,timezone:R})=>$.jsx(dit,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(nv),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:y,ampm:b,slots:x,slotProps:S,readOnly:P,disabled:E,sx:T,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeStep:M==null?void 0:M.minutes,skipDisabled:I,timezone:R}),NT=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:y,ampm:b,slots:x,slotProps:S,readOnly:P,disabled:E,sx:T,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeSteps:M,skipDisabled:I,timezone:R})=>$.jsx(Pit,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(nv),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:y,ampm:b,slots:x,slotProps:S,readOnly:P,disabled:E,sx:T,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeSteps:M,skipDisabled:I,timezone:R}),dct=["views","format"],Voe=(e,t,n)=>{let{views:r,format:o}=t,i=Ue(t,dct);if(o)return o;const a=[],s=[];if(r.forEach(u=>{nv(u)?s.push(u):ov(u)&&a.push(u)}),s.length===0)return kx(e,D({views:a},i),!1);if(a.length===0)return DT(e,D({views:s},i));const l=DT(e,D({views:s},i));return`${kx(e,D({views:a},i),!1)} ${l}`},fct=(e,t,n)=>n?t.filter(r=>!I0(r)||r==="hours"):e?[...t,"meridiem"]:t,pct=(e,t)=>24*60/((e.hours??1)*(e.minutes??5))<=t;function Hoe({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){const o=e??24,i=D({hours:1,minutes:5,seconds:5},n),a=pct(i,o);return{thresholdToRenderTimeInASingleColumn:o,timeSteps:i,shouldRenderTimeInASingleColumn:a,views:fct(t,r,a)}}const Uoe=v.forwardRef(function(t,n){var b,x,S,P;const r=wo(),o=yn(),i=Boe(t,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:a,views:s,timeSteps:l}=Hoe(i),c=a?zoe:NT,u=D({hours:c,minutes:c,seconds:c,meridiem:c},i.viewRenderers),d=i.ampmInClock??!0,f=a?[]:["accept"],m=((b=u.hours)==null?void 0:b.name)===NT.name?s:s.filter(E=>E!=="meridiem"),g=D({},i,{ampmInClock:d,timeSteps:l,viewRenderers:u,format:DT(o,i),views:a?["hours"]:m,slots:D({field:Coe,openPickerIcon:Vrt},i.slots),slotProps:D({},i.slotProps,{field:E=>{var T;return D({},_u((T=i.slotProps)==null?void 0:T.field,E),Jv(i),{ref:n})},toolbar:D({hidden:!0,ampmInClock:d},(x=i.slotProps)==null?void 0:x.toolbar),actionBar:D({actions:f},(S=i.slotProps)==null?void 0:S.actionBar)})}),{renderPicker:y}=wB({props:g,valueManager:Zr,valueType:"time",getOpenDialogAriaText:Yv({utils:o,formatKey:"fullTime",contextTranslation:r.openTimePickerDialogue,propsTranslation:(P=g.localeText)==null?void 0:P.openTimePickerDialogue}),validator:LS});return y()});Uoe.propTypes={ampm:j.bool,ampmInClock:j.bool,autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableIgnoringDatePartForTimeValidation:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,enableAccessibleFieldDOMStructure:j.any,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:mv,label:j.node,localeText:j.object,maxTime:j.object,minTime:j.object,minutesStep:j.number,name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,open:j.bool,openTo:j.oneOf(["hours","meridiem","minutes","seconds"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableTime:j.func,skipDisabled:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),thresholdToRenderTimeInASingleColumn:j.number,timeSteps:j.shape({hours:j.number,minutes:j.number,seconds:j.number}),timezone:j.string,value:j.object,view:j.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:j.shape({hours:j.func,meridiem:j.func,minutes:j.func,seconds:j.func}),views:j.arrayOf(j.oneOf(["hours","minutes","seconds"]).isRequired)};const Woe=v.forwardRef(function(t,n){var u,d;const r=wo(),o=yn(),i=Boe(t,"MuiMobileTimePicker"),a=D({hours:Kg,minutes:Kg,seconds:Kg},i.viewRenderers),s=i.ampmInClock??!1,l=D({},i,{ampmInClock:s,viewRenderers:a,format:DT(o,i),slots:D({field:Coe},i.slots),slotProps:D({},i.slotProps,{field:f=>{var p;return D({},_u((p=i.slotProps)==null?void 0:p.field,f),Jv(i),{ref:n})},toolbar:D({hidden:!1,ampmInClock:s},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:c}=xB({props:l,valueManager:Zr,valueType:"time",getOpenDialogAriaText:Yv({utils:o,formatKey:"fullTime",contextTranslation:r.openTimePickerDialogue,propsTranslation:(d=l.localeText)==null?void 0:d.openTimePickerDialogue}),validator:LS});return c()});Woe.propTypes={ampm:j.bool,ampmInClock:j.bool,autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableIgnoringDatePartForTimeValidation:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,enableAccessibleFieldDOMStructure:j.any,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:mv,label:j.node,localeText:j.object,maxTime:j.object,minTime:j.object,minutesStep:j.number,name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,open:j.bool,openTo:j.oneOf(["hours","minutes","seconds"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableTime:j.func,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),timezone:j.string,value:j.object,view:j.oneOf(["hours","minutes","seconds"]),viewRenderers:j.shape({hours:j.func,minutes:j.func,seconds:j.func}),views:j.arrayOf(j.oneOf(["hours","minutes","seconds"]).isRequired)};const hct=["desktopModeMediaQuery"],mct=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiTimePicker"}),{desktopModeMediaQuery:o=dB}=r,i=Ue(r,hct);return bf(o,{defaultMatches:!0})?$.jsx(Uoe,D({ref:n},i)):$.jsx(Woe,D({ref:n},i))});function gct(e){return _e("MuiDateTimePickerTabs",e)}Le("MuiDateTimePickerTabs",["root"]);const yct=e=>ov(e)?"date":"time",vct=e=>e==="date"?"day":"hours",bct=e=>{const{classes:t}=e;return Te({root:["root"]},gct,t)},wct=ie(u$e,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${PP.indicator}`]:{bottom:"auto",top:0}}})),xct=function(t){const n=Jt({props:t,name:"MuiDateTimePickerTabs"}),{dateIcon:r=$.jsx(Hrt,{}),onViewChange:o,timeIcon:i=$.jsx(Urt,{}),view:a,hidden:s=typeof window>"u"||window.innerHeight<667,className:l,sx:c}=n,u=wo(),d=bct(n),f=(p,m)=>{o(vct(m))};return s?null:$.jsxs(wct,{ownerState:n,variant:"fullWidth",value:yct(a),onChange:f,className:pe(l,d.root),sx:c,children:[$.jsx(X3,{value:"date","aria-label":u.dateTableLabel,icon:$.jsx(v.Fragment,{children:r})}),$.jsx(X3,{value:"time","aria-label":u.timeTableLabel,icon:$.jsx(v.Fragment,{children:i})})]})};function Sct(e){return _e("MuiDateTimePickerToolbar",e)}const j$=Le("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),Cct=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],Pct=e=>{const{classes:t,isLandscape:n,isRtl:r}=e;return Te({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},Sct,t)},Ect=ie(bB,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${olt.content} .${Q_.selected}`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",isLandscape:!0},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{paddingLeft:24,paddingRight:0}}]})),Tct=ie("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),Oct=ie("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex",flexDirection:"row",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({isLandscape:e,toolbarVariant:t})=>e&&t!=="desktop",style:{flexDirection:"column"}},{props:({isLandscape:e,toolbarVariant:t,isRtl:n})=>e&&t!=="desktop"&&n,style:{flexDirection:"column-reverse"}}]}),Ict=ie("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(e,t)=>t.timeDigitsContainer})({display:"flex",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),U8=ie(SB,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),kct=ie("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${j$.ampmLabel}`]:t.ampmLabel},{[`&.${j$.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${j$.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function Mct(e){const t=Jt({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,onChange:i,view:a,isLandscape:s,onViewChange:l,toolbarFormat:c,toolbarPlaceholder:u="––",views:d,disabled:f,readOnly:p,toolbarVariant:m="mobile",toolbarTitle:g,className:y}=t,b=Ue(t,Cct),x=nr(),S=D({},t,{isRtl:x}),P=yn(),{meridiemMode:E,handleMeridiemChange:T}=hk(o,n,i),O=!!(n&&!r),k=m==="desktop",M=wo(),I=Pct(S),R=g??M.dateTimePickerToolbarTitle,_=B=>n?P.format(B,"hours12h"):P.format(B,"hours24h"),N=v.useMemo(()=>o?c?P.formatByString(o,c):P.format(o,"shortDate"):u,[o,c,u,P]);return $.jsxs(Ect,D({isLandscape:s,className:pe(I.root,y),toolbarTitle:R},b,{ownerState:S,children:[$.jsxs(Tct,{className:I.dateContainer,ownerState:S,children:[d.includes("year")&&$.jsx(Na,{tabIndex:-1,variant:"subtitle1",onClick:()=>l("year"),selected:a==="year",value:o?P.format(o,"year"):"–"}),d.includes("day")&&$.jsx(Na,{tabIndex:-1,variant:k?"h5":"h4",onClick:()=>l("day"),selected:a==="day",value:N})]}),$.jsxs(Oct,{className:I.timeContainer,ownerState:S,children:[$.jsxs(Ict,{className:I.timeDigitsContainer,ownerState:S,children:[d.includes("hours")&&$.jsxs(v.Fragment,{children:[$.jsx(Na,{variant:k?"h5":"h3",width:k&&!s?k0:void 0,onClick:()=>l("hours"),selected:a==="hours",value:o?_(o):"--"}),$.jsx(U8,{variant:k?"h5":"h3",value:":",className:I.separator,ownerState:S}),$.jsx(Na,{variant:k?"h5":"h3",width:k&&!s?k0:void 0,onClick:()=>l("minutes"),selected:a==="minutes"||!d.includes("minutes")&&a==="hours",value:o?P.format(o,"minutes"):"--",disabled:!d.includes("minutes")})]}),d.includes("seconds")&&$.jsxs(v.Fragment,{children:[$.jsx(U8,{variant:k?"h5":"h3",value:":",className:I.separator,ownerState:S}),$.jsx(Na,{variant:k?"h5":"h3",width:k&&!s?k0:void 0,onClick:()=>l("seconds"),selected:a==="seconds",value:o?P.format(o,"seconds"):"--"})]})]}),O&&!k&&$.jsxs(kct,{className:I.ampmSelection,ownerState:S,children:[$.jsx(Na,{variant:"subtitle2",selected:E==="am",typographyClassName:I.ampmLabel,value:Nl(P,"am"),onClick:p?void 0:()=>T("am"),disabled:f}),$.jsx(Na,{variant:"subtitle2",selected:E==="pm",typographyClassName:I.ampmLabel,value:Nl(P,"pm"),onClick:p?void 0:()=>T("pm"),disabled:f})]}),n&&k&&$.jsx(Na,{variant:"h5",onClick:()=>l("meridiem"),selected:a==="meridiem",value:o&&E?Nl(P,E):"--",width:k0})]})]}))}function Goe(e,t){var s;const n=yn(),r=zh(),o=Jt({props:e,name:t}),i=o.ampm??n.is12HourCycleInCurrentLocale(),a=v.useMemo(()=>{var l;return((l=o.localeText)==null?void 0:l.toolbarTitle)==null?o.localeText:D({},o.localeText,{dateTimePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return D({},o,rB({views:o.views,openTo:o.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:i,localeText:a,orientation:o.orientation??"portrait",disableIgnoringDatePartForTimeValidation:o.disableIgnoringDatePartForTimeValidation??!!(o.minDateTime||o.maxDateTime||o.disablePast||o.disableFuture),disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Si(n,o.minDateTime??o.minDate,r.minDate),maxDate:Si(n,o.maxDateTime??o.maxDate,r.maxDate),minTime:o.minDateTime??o.minTime,maxTime:o.maxDateTime??o.maxTime,slots:D({toolbar:Mct,tabs:xct},o.slots),slotProps:D({},o.slotProps,{toolbar:D({ampm:i},(s=o.slotProps)==null?void 0:s.toolbar)})})}const Act=v.forwardRef(function(t,n){var g;const r=nr(),{toolbar:o,tabs:i,content:a,actionBar:s,shortcuts:l}=Roe(t),{sx:c,className:u,isLandscape:d,classes:f}=t,p=s&&(((g=s.props.actions)==null?void 0:g.length)??0)>0,m=D({},t,{isRtl:r});return $.jsxs(Doe,{ref:n,className:pe(Al.root,f==null?void 0:f.root,u),sx:[{[`& .${Al.tabs}`]:{gridRow:4,gridColumn:"1 / 4"},[`& .${Al.actionBar}`]:{gridRow:5}},...Array.isArray(c)?c:[c]],ownerState:m,children:[d?l:o,d?o:l,$.jsxs(_oe,{className:pe(Al.contentWrapper,f==null?void 0:f.contentWrapper),sx:{display:"grid"},children:[a,i,p&&$.jsx(Qa,{sx:{gridRow:3,gridColumn:"1 / 4"}})]}),s]})}),$ct=["openTo","focusedView","timeViewsCount"],Rct=function(t,n,r){var u,d;const{openTo:o,focusedView:i,timeViewsCount:a}=r,s=Ue(r,$ct),l=D({},s,{focusedView:null,sx:[{[`&.${N8.root}`]:{borderBottom:0},[`&.${N8.root}, .${hit.root}, &.${oit.root}`]:{maxHeight:yk}}]}),c=I0(n);return $.jsxs(v.Fragment,{children:[(u=t[c?"day":n])==null?void 0:u.call(t,D({},r,{view:c?"day":n,focusedView:i&&ov(i)?i:null,views:r.views.filter(ov),sx:[{gridColumn:1},...l.sx]})),a>0&&$.jsxs(v.Fragment,{children:[$.jsx(Qa,{orientation:"vertical",sx:{gridColumn:2}}),(d=t[c?n:"hours"])==null?void 0:d.call(t,D({},l,{view:c?n:"hours",focusedView:i&&I0(i)?i:null,openTo:I0(o)?o:"hours",views:r.views.filter(I0),sx:[{gridColumn:3},...l.sx]}))]})]})},qoe=v.forwardRef(function(t,n){var x,S,P,E;const r=wo(),o=yn(),i=Goe(t,"MuiDesktopDateTimePicker"),{shouldRenderTimeInASingleColumn:a,thresholdToRenderTimeInASingleColumn:s,views:l,timeSteps:c}=Hoe(i),u=a?zoe:NT,d=D({day:Ys,month:Ys,year:Ys,hours:u,minutes:u,seconds:u,meridiem:u},i.viewRenderers),f=i.ampmInClock??!0,m=((x=d.hours)==null?void 0:x.name)===NT.name?l:l.filter(T=>T!=="meridiem"),g=a?[]:["accept"],y=D({},i,{viewRenderers:d,format:Voe(o,i),views:m,yearsPerRow:i.yearsPerRow??4,ampmInClock:f,timeSteps:c,thresholdToRenderTimeInASingleColumn:s,shouldRenderTimeInASingleColumn:a,slots:D({field:Poe,layout:Act,openPickerIcon:Xre},i.slots),slotProps:D({},i.slotProps,{field:T=>{var O;return D({},_u((O=i.slotProps)==null?void 0:O.field,T),Jv(i),{ref:n})},toolbar:D({hidden:!0,ampmInClock:f,toolbarVariant:"desktop"},(S=i.slotProps)==null?void 0:S.toolbar),tabs:D({hidden:!0},(P=i.slotProps)==null?void 0:P.tabs),actionBar:T=>{var O;return D({actions:g},_u((O=i.slotProps)==null?void 0:O.actionBar,T))}})}),{renderPicker:b}=wB({props:y,valueManager:Zr,valueType:"date-time",getOpenDialogAriaText:Yv({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(E=y.localeText)==null?void 0:E.openDatePickerDialogue}),validator:wk,rendererInterceptor:Rct});return b()});qoe.propTypes={ampm:j.bool,ampmInClock:j.bool,autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,dayOfWeekFormatter:j.func,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableHighlightToday:j.bool,disableIgnoringDatePartForTimeValidation:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,displayWeekNumber:j.bool,enableAccessibleFieldDOMStructure:j.any,fixedWeekNumber:j.number,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:mv,label:j.node,loading:j.bool,localeText:j.object,maxDate:j.object,maxDateTime:j.object,maxTime:j.object,minDate:j.object,minDateTime:j.object,minTime:j.object,minutesStep:j.number,monthsPerRow:j.oneOf([3,4]),name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onMonthChange:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,onYearChange:j.func,open:j.bool,openTo:j.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,renderLoading:j.func,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableDate:j.func,shouldDisableMonth:j.func,shouldDisableTime:j.func,shouldDisableYear:j.func,showDaysOutsideCurrentMonth:j.bool,skipDisabled:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),thresholdToRenderTimeInASingleColumn:j.number,timeSteps:j.shape({hours:j.number,minutes:j.number,seconds:j.number}),timezone:j.string,value:j.object,view:j.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:j.shape({day:j.func,hours:j.func,meridiem:j.func,minutes:j.func,month:j.func,seconds:j.func,year:j.func}),views:j.arrayOf(j.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:j.oneOf(["asc","desc"]),yearsPerRow:j.oneOf([3,4])};const Koe=v.forwardRef(function(t,n){var u,d,f;const r=wo(),o=yn(),i=Goe(t,"MuiMobileDateTimePicker"),a=D({day:Ys,month:Ys,year:Ys,hours:Kg,minutes:Kg,seconds:Kg},i.viewRenderers),s=i.ampmInClock??!1,l=D({},i,{viewRenderers:a,format:Voe(o,i),ampmInClock:s,slots:D({field:Poe},i.slots),slotProps:D({},i.slotProps,{field:p=>{var m;return D({},_u((m=i.slotProps)==null?void 0:m.field,p),Jv(i),{ref:n})},toolbar:D({hidden:!1,ampmInClock:s},(u=i.slotProps)==null?void 0:u.toolbar),tabs:D({hidden:!1},(d=i.slotProps)==null?void 0:d.tabs)})}),{renderPicker:c}=xB({props:l,valueManager:Zr,valueType:"date-time",getOpenDialogAriaText:Yv({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=l.localeText)==null?void 0:f.openDatePickerDialogue}),validator:wk});return c()});Koe.propTypes={ampm:j.bool,ampmInClock:j.bool,autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,dayOfWeekFormatter:j.func,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableHighlightToday:j.bool,disableIgnoringDatePartForTimeValidation:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,displayWeekNumber:j.bool,enableAccessibleFieldDOMStructure:j.any,fixedWeekNumber:j.number,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:mv,label:j.node,loading:j.bool,localeText:j.object,maxDate:j.object,maxDateTime:j.object,maxTime:j.object,minDate:j.object,minDateTime:j.object,minTime:j.object,minutesStep:j.number,monthsPerRow:j.oneOf([3,4]),name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onMonthChange:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,onYearChange:j.func,open:j.bool,openTo:j.oneOf(["day","hours","minutes","month","seconds","year"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,renderLoading:j.func,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableDate:j.func,shouldDisableMonth:j.func,shouldDisableTime:j.func,shouldDisableYear:j.func,showDaysOutsideCurrentMonth:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),timezone:j.string,value:j.object,view:j.oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:j.shape({day:j.func,hours:j.func,minutes:j.func,month:j.func,seconds:j.func,year:j.func}),views:j.arrayOf(j.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:j.oneOf(["asc","desc"]),yearsPerRow:j.oneOf([3,4])};const Dct=["desktopModeMediaQuery"],_ct=v.forwardRef(function(t,n){const r=Jt({props:t,name:"MuiDateTimePicker"}),{desktopModeMediaQuery:o=dB}=r,i=Ue(r,Dct);return bf(o,{defaultMatches:!0})?$.jsx(qoe,D({ref:n},i)):$.jsx(Koe,D({ref:n},i))});class Hh extends Error{}class Lct extends Hh{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Nct extends Hh{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Fct extends Hh{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Pg extends Hh{}class Yoe extends Hh{constructor(t){super(`Invalid unit ${t}`)}}class hi extends Hh{}class bd extends Hh{constructor(){super("Zone is an abstract class")}}const mt="numeric",Ql="short",Ka="long",FT={year:mt,month:mt,day:mt},Xoe={year:mt,month:Ql,day:mt},jct={year:mt,month:Ql,day:mt,weekday:Ql},Qoe={year:mt,month:Ka,day:mt},Joe={year:mt,month:Ka,day:mt,weekday:Ka},Zoe={hour:mt,minute:mt},eie={hour:mt,minute:mt,second:mt},tie={hour:mt,minute:mt,second:mt,timeZoneName:Ql},nie={hour:mt,minute:mt,second:mt,timeZoneName:Ka},rie={hour:mt,minute:mt,hourCycle:"h23"},oie={hour:mt,minute:mt,second:mt,hourCycle:"h23"},iie={hour:mt,minute:mt,second:mt,hourCycle:"h23",timeZoneName:Ql},aie={hour:mt,minute:mt,second:mt,hourCycle:"h23",timeZoneName:Ka},sie={year:mt,month:mt,day:mt,hour:mt,minute:mt},lie={year:mt,month:mt,day:mt,hour:mt,minute:mt,second:mt},cie={year:mt,month:Ql,day:mt,hour:mt,minute:mt},uie={year:mt,month:Ql,day:mt,hour:mt,minute:mt,second:mt},Bct={year:mt,month:Ql,day:mt,weekday:Ql,hour:mt,minute:mt},die={year:mt,month:Ka,day:mt,hour:mt,minute:mt,timeZoneName:Ql},fie={year:mt,month:Ka,day:mt,hour:mt,minute:mt,second:mt,timeZoneName:Ql},pie={year:mt,month:Ka,day:mt,weekday:Ka,hour:mt,minute:mt,timeZoneName:Ka},hie={year:mt,month:Ka,day:mt,weekday:Ka,hour:mt,minute:mt,second:mt,timeZoneName:Ka};class NS{get type(){throw new bd}get name(){throw new bd}get ianaName(){return this.name}get isUniversal(){throw new bd}offsetName(t,n){throw new bd}formatOffset(t,n){throw new bd}offset(t){throw new bd}equals(t){throw new bd}get isValid(){throw new bd}}let B$=null;class Sk extends NS{static get instance(){return B$===null&&(B$=new Sk),B$}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Cie(t,n,r)}formatOffset(t,n){return uw(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let MP={};function zct(e){return MP[e]||(MP[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),MP[e]}const Vct={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Hct(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,a,s,l,c,u]=r;return[a,o,i,s,l,c,u]}function Uct(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o=0?m:1e3+m,(f-p)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let W8={};function Wct(e,t={}){const n=JSON.stringify([e,t]);let r=W8[n];return r||(r=new Intl.ListFormat(e,t),W8[n]=r),r}let J_={};function Z_(e,t={}){const n=JSON.stringify([e,t]);let r=J_[n];return r||(r=new Intl.DateTimeFormat(e,t),J_[n]=r),r}let eL={};function Gct(e,t={}){const n=JSON.stringify([e,t]);let r=eL[n];return r||(r=new Intl.NumberFormat(e,t),eL[n]=r),r}let tL={};function qct(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=tL[o];return i||(i=new Intl.RelativeTimeFormat(e,t),tL[o]=i),i}let M0=null;function Kct(){return M0||(M0=new Intl.DateTimeFormat().resolvedOptions().locale,M0)}let G8={};function Yct(e){let t=G8[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,G8[e]=t}return t}function Xct(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=Z_(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);r=Z_(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:a}=r;return[o,i,a]}}function Qct(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function Jct(e){const t=[];for(let n=1;n<=12;n++){const r=It.utc(2009,n,1);t.push(e(r))}return t}function Zct(e){const t=[];for(let n=1;n<=7;n++){const r=It.utc(2016,11,13+n);t.push(e(r))}return t}function VC(e,t,n,r){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):r(t)}function eut(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class tut{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...a}=r;if(!n||Object.keys(a).length>0){const s={useGrouping:!1,...r};r.padTo>0&&(s.minimumIntegerDigits=r.padTo),this.inf=Gct(t,s)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):OB(t,3);return uo(n,this.padTo)}}}class nut{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const a=-1*(t.offset/60),s=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&Xu.create(s).valid?(o=s,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=Z_(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class rut{constructor(t,n,r){this.opts={style:"long",...r},!n&&xie()&&(this.rtf=qct(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):Tut(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const out={firstDay:1,minimalDays:4,weekend:[6,7]};class er{static fromOpts(t){return er.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,o,i=!1){const a=t||Br.defaultLocale,s=a||(i?"en-US":Kct()),l=n||Br.defaultNumberingSystem,c=r||Br.defaultOutputCalendar,u=nL(o)||Br.defaultWeekSettings;return new er(s,l,c,u,a)}static resetCache(){M0=null,J_={},eL={},tL={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return er.create(t,n,r,o)}constructor(t,n,r,o,i){const[a,s,l]=Xct(t);this.locale=a,this.numberingSystem=n||s||null,this.outputCalendar=r||l||null,this.weekSettings=o,this.intl=Qct(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=eut(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:er.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,nL(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return VC(this,t,Tie,()=>{const r=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=Jct(i=>this.extract(i,r,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1){return VC(this,t,kie,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=Zct(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return VC(this,void 0,()=>Mie,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[It.utc(2016,11,13,9),It.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return VC(this,t,Aie,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[It.utc(-40,1,1),It.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),a=i.find(s=>s.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new tut(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new nut(t,this.intl,n)}relFormatter(t={}){return new rut(this.intl,this.isEnglish(),t)}listFormatter(t={}){return Wct(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Sie()?Yct(this.locale):out}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let z$=null;class ji extends NS{static get utcInstance(){return z$===null&&(z$=new ji(0)),z$}static instance(t){return t===0?ji.utcInstance:new ji(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new ji(Ek(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${uw(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${uw(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return uw(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class iut extends NS{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function _d(e,t){if(qt(e)||e===null)return t;if(e instanceof NS)return e;if(dut(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?Sk.instance:n==="utc"||n==="gmt"?ji.utcInstance:ji.parseSpecifier(n)||Xu.create(e)}else return ff(e)?ji.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new iut(e)}const CB={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},q8={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},aut=CB.hanidec.replace(/[\[|\]]/g,"").split("");function sut(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=i&&r<=a&&(t+=r-i)}}return parseInt(t,10)}else return t}let Zm={};function lut(){Zm={}}function Sl({numberingSystem:e},t=""){const n=e||"latn";return Zm[n]||(Zm[n]={}),Zm[n][t]||(Zm[n][t]=new RegExp(`${CB[n]}${t}`)),Zm[n][t]}let K8=()=>Date.now(),Y8="system",X8=null,Q8=null,J8=null,Z8=60,e9,t9=null;class Br{static get now(){return K8}static set now(t){K8=t}static set defaultZone(t){Y8=t}static get defaultZone(){return _d(Y8,Sk.instance)}static get defaultLocale(){return X8}static set defaultLocale(t){X8=t}static get defaultNumberingSystem(){return Q8}static set defaultNumberingSystem(t){Q8=t}static get defaultOutputCalendar(){return J8}static set defaultOutputCalendar(t){J8=t}static get defaultWeekSettings(){return t9}static set defaultWeekSettings(t){t9=nL(t)}static get twoDigitCutoffYear(){return Z8}static set twoDigitCutoffYear(t){Z8=t%100}static get throwOnInvalid(){return e9}static set throwOnInvalid(t){e9=t}static resetCaches(){er.resetCache(),Xu.resetCache(),It.resetCache(),lut()}}class Fl{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const mie=[0,31,59,90,120,151,181,212,243,273,304,334],gie=[0,31,60,91,121,152,182,213,244,274,305,335];function js(e,t){return new Fl("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function PB(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function yie(e,t,n){return n+(FS(e)?gie:mie)[t-1]}function vie(e,t){const n=FS(e)?gie:mie,r=n.findIndex(i=>iMx(r,t,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:s,...Tk(e)}}function n9(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:i}=e,a=EB(PB(r,1,t),n),s=Yg(r);let l=o*7+i-a-7+t,c;l<1?(c=r-1,l+=Yg(c)):l>s?(c=r+1,l-=Yg(r)):c=r;const{month:u,day:d}=vie(c,l);return{year:c,month:u,day:d,...Tk(e)}}function V$(e){const{year:t,month:n,day:r}=e,o=yie(t,n,r);return{year:t,ordinal:o,...Tk(e)}}function r9(e){const{year:t,ordinal:n}=e,{month:r,day:o}=vie(t,n);return{year:t,month:r,day:o,...Tk(e)}}function o9(e,t){if(!qt(e.localWeekday)||!qt(e.localWeekNumber)||!qt(e.localWeekYear)){if(!qt(e.weekday)||!qt(e.weekNumber)||!qt(e.weekYear))throw new Pg("Cannot mix locale-based week fields with ISO-based week fields");return qt(e.localWeekday)||(e.weekday=e.localWeekday),qt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),qt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function cut(e,t=4,n=1){const r=Ck(e.weekYear),o=Bs(e.weekNumber,1,Mx(e.weekYear,t,n)),i=Bs(e.weekday,1,7);return r?o?i?!1:js("weekday",e.weekday):js("week",e.weekNumber):js("weekYear",e.weekYear)}function uut(e){const t=Ck(e.year),n=Bs(e.ordinal,1,Yg(e.year));return t?n?!1:js("ordinal",e.ordinal):js("year",e.year)}function bie(e){const t=Ck(e.year),n=Bs(e.month,1,12),r=Bs(e.day,1,BT(e.year,e.month));return t?n?r?!1:js("day",e.day):js("month",e.month):js("year",e.year)}function wie(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=Bs(t,0,23)||t===24&&n===0&&r===0&&o===0,a=Bs(n,0,59),s=Bs(r,0,59),l=Bs(o,0,999);return i?a?s?l?!1:js("millisecond",o):js("second",r):js("minute",n):js("hour",t)}function qt(e){return typeof e>"u"}function ff(e){return typeof e=="number"}function Ck(e){return typeof e=="number"&&e%1===0}function dut(e){return typeof e=="string"}function fut(e){return Object.prototype.toString.call(e)==="[object Date]"}function xie(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Sie(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function put(e){return Array.isArray(e)?e:[e]}function i9(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function hut(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function iv(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function nL(e){if(e==null)return null;if(typeof e!="object")throw new hi("Week settings must be an object");if(!Bs(e.firstDay,1,7)||!Bs(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Bs(t,1,7)))throw new hi("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Bs(e,t,n){return Ck(e)&&e>=t&&e<=n}function mut(e,t){return e-t*Math.floor(e/t)}function uo(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function kd(e){if(!(qt(e)||e===null||e===""))return parseInt(e,10)}function pp(e){if(!(qt(e)||e===null||e===""))return parseFloat(e)}function TB(e){if(!(qt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function OB(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function FS(e){return e%4===0&&(e%100!==0||e%400===0)}function Yg(e){return FS(e)?366:365}function BT(e,t){const n=mut(t-1,12)+1,r=e+(t-n)/12;return n===2?FS(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Pk(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function a9(e,t,n){return-EB(PB(e,1,t),n)+t-1}function Mx(e,t=4,n=1){const r=a9(e,t,n),o=a9(e+1,t,n);return(Yg(e)-r+o)/7}function rL(e){return e>99?e:e>Br.twoDigitCutoffYear?1900+e:2e3+e}function Cie(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},s=new Intl.DateTimeFormat(n,a).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function Ek(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function Pie(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new hi(`Invalid unit value ${e}`);return t}function zT(e,t){const n={};for(const r in e)if(iv(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=Pie(o)}return n}function uw(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${uo(n,2)}:${uo(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${uo(n,2)}${uo(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Tk(e){return hut(e,["hour","minute","second","millisecond"])}const gut=["January","February","March","April","May","June","July","August","September","October","November","December"],Eie=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yut=["J","F","M","A","M","J","J","A","S","O","N","D"];function Tie(e){switch(e){case"narrow":return[...yut];case"short":return[...Eie];case"long":return[...gut];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Oie=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Iie=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],vut=["M","T","W","T","F","S","S"];function kie(e){switch(e){case"narrow":return[...vut];case"short":return[...Iie];case"long":return[...Oie];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Mie=["AM","PM"],but=["Before Christ","Anno Domini"],wut=["BC","AD"],xut=["B","A"];function Aie(e){switch(e){case"narrow":return[...xut];case"short":return[...wut];case"long":return[...but];default:return null}}function Sut(e){return Mie[e.hour<12?0:1]}function Cut(e,t){return kie(t)[e.weekday-1]}function Put(e,t){return Tie(t)[e.month-1]}function Eut(e,t){return Aie(t)[e.year<0?0:1]}function Tut(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${o[e][0]}`;case-1:return d?"yesterday":`last ${o[e][0]}`;case 0:return d?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,s=Math.abs(t),l=s===1,c=o[e],u=r?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return a?`${s} ${u} ago`:`in ${s} ${u}`}function s9(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Out={D:FT,DD:Xoe,DDD:Qoe,DDDD:Joe,t:Zoe,tt:eie,ttt:tie,tttt:nie,T:rie,TT:oie,TTT:iie,TTTT:aie,f:sie,ff:cie,fff:die,ffff:pie,F:lie,FF:uie,FFF:fie,FFFF:hie};let Ll=class A0{static create(t,n={}){return new A0(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let a=0;a0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||s===n?r+=s:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=s,n=s)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return Out[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return uo(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(p,m)=>this.loc.extract(t,p,m),a=p=>t.isOffsetFixed&&t.offset===0&&p.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,p.format):"",s=()=>r?Sut(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(p,m)=>r?Put(t,p):i(m?{month:p}:{month:p,day:"numeric"},"month"),c=(p,m)=>r?Cut(t,p):i(m?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),u=p=>{const m=A0.macroTokenToFormatOpts(p);return m?this.formatWithSystemDefault(t,m):p},d=p=>r?Eut(t,p):i({era:p},"era"),f=p=>{switch(p){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return s();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return u(p)}};return s9(A0.parseFormat(n),f)}formatDurationFromString(t,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=l=>c=>{const u=r(c);return u?this.num(l.get(u),c.length):c},i=A0.parseFormat(n),a=i.reduce((l,{literal:c,val:u})=>c?l:l.concat(u),[]),s=t.shiftTo(...a.map(r).filter(l=>l));return s9(i,o(s))}};const $ie=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Zv(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function eb(...e){return t=>e.reduce(([n,r,o],i)=>{const[a,s,l]=i(t,o);return[{...n,...a},s||r,l]},[{},null,1]).slice(0,2)}function tb(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function Rie(...e){return(t,n)=>{const r={};let o;for(o=0;op!==void 0&&(m||p&&u)?-p:p;return[{years:f(pp(n)),months:f(pp(r)),weeks:f(pp(o)),days:f(pp(i)),hours:f(pp(a)),minutes:f(pp(s)),seconds:f(pp(l),l==="-0"),milliseconds:f(TB(c),d)}]}const But={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function MB(e,t,n,r,o,i,a){const s={year:t.length===2?rL(kd(t)):kd(t),month:Eie.indexOf(n)+1,day:kd(r),hour:kd(o),minute:kd(i)};return a&&(s.second=kd(a)),e&&(s.weekday=e.length>3?Oie.indexOf(e)+1:Iie.indexOf(e)+1),s}const zut=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Vut(e){const[,t,n,r,o,i,a,s,l,c,u,d]=e,f=MB(t,o,r,n,i,a,s);let p;return l?p=But[l]:c?p=0:p=Ek(u,d),[f,new ji(p)]}function Hut(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Uut=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Wut=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Gut=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function l9(e){const[,t,n,r,o,i,a,s]=e;return[MB(t,o,r,n,i,a,s),ji.utcInstance]}function qut(e){const[,t,n,r,o,i,a,s]=e;return[MB(t,s,n,r,o,i,a),ji.utcInstance]}const Kut=Zv(kut,kB),Yut=Zv(Mut,kB),Xut=Zv(Aut,kB),Qut=Zv(_ie),Nie=eb(Lut,nb,jS,BS),Jut=eb($ut,nb,jS,BS),Zut=eb(Rut,nb,jS,BS),edt=eb(nb,jS,BS);function tdt(e){return tb(e,[Kut,Nie],[Yut,Jut],[Xut,Zut],[Qut,edt])}function ndt(e){return tb(Hut(e),[zut,Vut])}function rdt(e){return tb(e,[Uut,l9],[Wut,l9],[Gut,qut])}function odt(e){return tb(e,[Fut,jut])}const idt=eb(nb);function adt(e){return tb(e,[Nut,idt])}const sdt=Zv(Dut,_ut),ldt=Zv(Lie),cdt=eb(nb,jS,BS);function udt(e){return tb(e,[sdt,Nie],[ldt,cdt])}const c9="Invalid Duration",Fie={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},ddt={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Fie},Ss=146097/400,Nm=146097/4800,fdt={years:{quarters:4,months:12,weeks:Ss/7,days:Ss,hours:Ss*24,minutes:Ss*24*60,seconds:Ss*24*60*60,milliseconds:Ss*24*60*60*1e3},quarters:{months:3,weeks:Ss/28,days:Ss/4,hours:Ss*24/4,minutes:Ss*24*60/4,seconds:Ss*24*60*60/4,milliseconds:Ss*24*60*60*1e3/4},months:{weeks:Nm/7,days:Nm,hours:Nm*24,minutes:Nm*24*60,seconds:Nm*24*60*60,milliseconds:Nm*24*60*60*1e3},...Fie},jp=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],pdt=jp.slice(0).reverse();function wd(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Fn(r)}function jie(e,t){let n=t.milliseconds??0;for(const r of pdt.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function u9(e,t){const n=jie(e,t)<0?-1:1;jp.reduceRight((r,o)=>{if(qt(t[o]))return r;if(r){const i=t[r]*n,a=e[o][r],s=Math.floor(i/a);t[o]+=s*n,t[r]-=s*a*n}return o},null),jp.reduce((r,o)=>{if(qt(t[o]))return r;if(r){const i=t[r]%1;t[r]-=i,t[o]+=i*e[r][o]}return o},null)}function hdt(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class Fn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?fdt:ddt;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||er.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return Fn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new hi(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Fn({values:zT(t,Fn.normalizeUnit),loc:er.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(ff(t))return Fn.fromMillis(t);if(Fn.isDuration(t))return t;if(typeof t=="object")return Fn.fromObject(t);throw new hi(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=odt(t);return r?Fn.fromObject(r,n):Fn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=adt(t);return r?Fn.fromObject(r,n):Fn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new hi("need to specify a reason the Duration is invalid");const r=t instanceof Fl?t:new Fl(t,n);if(Br.throwOnInvalid)throw new Fct(r);return new Fn({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new Yoe(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Ll.create(this.loc,r).formatDurationFromString(this,t):c9}toHuman(t={}){if(!this.isValid)return c9;const n=jp.map(r=>{const o=this.values[r];return qt(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=OB(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},It.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?jie(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Fn.fromDurationLike(t),r={};for(const o of jp)(iv(n.values,o)||iv(this.values,o))&&(r[o]=n.get(o)+this.get(o));return wd(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=Fn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=Pie(t(this.values[r],r));return wd(this,{values:n},!0)}get(t){return this[Fn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...zT(t,Fn.normalizeUnit)};return wd(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const a={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return wd(this,a)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return u9(this.matrix,t),wd(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=hdt(this.normalize().shiftToAll().toObject());return wd(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>Fn.normalizeUnit(a));const n={},r={},o=this.toObject();let i;for(const a of jp)if(t.indexOf(a)>=0){i=a;let s=0;for(const c in r)s+=this.matrix[c][a]*r[c],r[c]=0;ff(o[a])&&(s+=o[a]);const l=Math.trunc(s);n[a]=l,r[a]=(s*1e3-l*1e3)/1e3}else ff(o[a])&&(r[a]=o[a]);for(const a in r)r[a]!==0&&(n[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return u9(this.matrix,n),wd(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return wd(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of jp)if(!n(this.values[r],t.values[r]))return!1;return!0}}const Fm="Invalid Interval";function mdt(e,t){return!e||!e.isValid?Xr.invalid("missing or invalid start"):!t||!t.isValid?Xr.invalid("missing or invalid end"):tt:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Xr.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(l0).filter(a=>this.contains(a)).sort((a,s)=>a.toMillis()-s.toMillis()),r=[];let{s:o}=this,i=0;for(;o+this.e?this.e:a;r.push(Xr.fromDateTimes(o,s)),o=s,i+=1}return r}splitBy(t){const n=Fn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const a=[];for(;rl*o));i=+s>+this.e?this.e:s,a.push(Xr.fromDateTimes(r,i)),r=i,o+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e=r?null:Xr.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.st.e?this.e:t.e;return Xr.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[o,i.union(a)]:[o.concat([i]),a]:[o,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...i),s=a.sort((l,c)=>l.time-c.time);for(const l of s)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&o.push(Xr.fromDateTimes(n,l.time)),n=null);return Xr.merge(o)}difference(...t){return Xr.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Fm}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=FT,n={}){return this.isValid?Ll.create(this.s.loc.clone(n),t).formatInterval(this):Fm}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Fm}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Fm}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Fm}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Fm}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Fn.invalid(this.invalidReason)}mapEndpoints(t){return Xr.fromDateTimes(t(this.s),t(this.e))}}class $0{static hasDST(t=Br.defaultZone){const n=It.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Xu.isValidZone(t)}static normalizeZone(t){return _d(t,Br.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||er.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||er.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||er.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||er.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||er.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||er.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||er.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return er.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return er.create(n,null,"gregory").eras(t)}static features(){return{relative:xie(),localeWeek:Sie()}}}function d9(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Fn.fromMillis(r).as("days"))}function gdt(e,t,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const u=d9(l,c);return(u-u%7)/7}],["days",d9]],o={},i=e;let a,s;for(const[l,c]of r)n.indexOf(l)>=0&&(a=l,o[l]=c(e,t),s=i.plus(o),s>t?(o[l]--,e=i.plus(o),e>t&&(s=e,o[l]--,e=i.plus(o))):e=s);return[e,o,s,a]}function ydt(e,t,n,r){let[o,i,a,s]=gdt(e,t,n);const l=t-o,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(a0?Fn.fromMillis(l,r).shiftTo(...c).plus(u):u}const vdt="missing Intl.DateTimeFormat.formatToParts support";function Kn(e,t=n=>n){return{regex:e,deser:([n])=>t(sut(n))}}const bdt=" ",Bie=`[ ${bdt}]`,zie=new RegExp(Bie,"g");function wdt(e){return e.replace(/\./g,"\\.?").replace(zie,Bie)}function f9(e){return e.replace(/\./g,"").replace(zie," ").toLowerCase()}function Cl(e,t){return e===null?null:{regex:RegExp(e.map(wdt).join("|")),deser:([n])=>e.findIndex(r=>f9(n)===f9(r))+t}}function p9(e,t){return{regex:e,deser:([,n,r])=>Ek(n,r),groups:t}}function HC(e){return{regex:e,deser:([t])=>t}}function xdt(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Sdt(e,t){const n=Sl(t),r=Sl(t,"{2}"),o=Sl(t,"{3}"),i=Sl(t,"{4}"),a=Sl(t,"{6}"),s=Sl(t,"{1,2}"),l=Sl(t,"{1,3}"),c=Sl(t,"{1,6}"),u=Sl(t,"{1,9}"),d=Sl(t,"{2,4}"),f=Sl(t,"{4,6}"),p=y=>({regex:RegExp(xdt(y.val)),deser:([b])=>b,literal:!0}),g=(y=>{if(e.literal)return p(y);switch(y.val){case"G":return Cl(t.eras("short"),0);case"GG":return Cl(t.eras("long"),0);case"y":return Kn(c);case"yy":return Kn(d,rL);case"yyyy":return Kn(i);case"yyyyy":return Kn(f);case"yyyyyy":return Kn(a);case"M":return Kn(s);case"MM":return Kn(r);case"MMM":return Cl(t.months("short",!0),1);case"MMMM":return Cl(t.months("long",!0),1);case"L":return Kn(s);case"LL":return Kn(r);case"LLL":return Cl(t.months("short",!1),1);case"LLLL":return Cl(t.months("long",!1),1);case"d":return Kn(s);case"dd":return Kn(r);case"o":return Kn(l);case"ooo":return Kn(o);case"HH":return Kn(r);case"H":return Kn(s);case"hh":return Kn(r);case"h":return Kn(s);case"mm":return Kn(r);case"m":return Kn(s);case"q":return Kn(s);case"qq":return Kn(r);case"s":return Kn(s);case"ss":return Kn(r);case"S":return Kn(l);case"SSS":return Kn(o);case"u":return HC(u);case"uu":return HC(s);case"uuu":return Kn(n);case"a":return Cl(t.meridiems(),0);case"kkkk":return Kn(i);case"kk":return Kn(d,rL);case"W":return Kn(s);case"WW":return Kn(r);case"E":case"c":return Kn(n);case"EEE":return Cl(t.weekdays("short",!1),1);case"EEEE":return Cl(t.weekdays("long",!1),1);case"ccc":return Cl(t.weekdays("short",!0),1);case"cccc":return Cl(t.weekdays("long",!0),1);case"Z":case"ZZ":return p9(new RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case"ZZZ":return p9(new RegExp(`([+-]${s.source})(${r.source})?`),2);case"z":return HC(/[a-z_+-/]{1,256}?/i);case" ":return HC(/[^\S\n\r]/);default:return p(y)}})(e)||{invalidReason:vdt};return g.token=e,g}const Cdt={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Pdt(e,t,n){const{type:r,value:o}=e;if(r==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const i=t[r];let a=r;r==="hour"&&(t.hour12!=null?a=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let s=Cdt[a];if(typeof s=="object"&&(s=s[i]),s)return{literal:!1,val:s}}function Edt(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function Tdt(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const a in n)if(iv(n,a)){const s=n[a],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(o[s.token.val[0]]=s.deser(r.slice(i,i+l))),i+=l}return[r,o]}else return[r,{}]}function Odt(e){const t=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return qt(e.z)||(n=Xu.create(e.z)),qt(e.Z)||(n||(n=new ji(e.Z)),r=e.Z),qt(e.q)||(e.M=(e.q-1)*3+1),qt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),qt(e.u)||(e.S=TB(e.u)),[Object.keys(e).reduce((i,a)=>{const s=t(a);return s&&(i[s]=e[a]),i},{}),n,r]}let H$=null;function Idt(){return H$||(H$=It.fromMillis(1555555555555)),H$}function kdt(e,t){if(e.literal)return e;const n=Ll.macroTokenToFormatOpts(e.val),r=Wie(n,t);return r==null||r.includes(void 0)?e:r}function Vie(e,t){return Array.prototype.concat(...e.map(n=>kdt(n,t)))}class Hie{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=Vie(Ll.parseFormat(n),t),this.units=this.tokens.map(r=>Sdt(r,t)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,o]=Edt(this.units);this.regex=RegExp(r,"i"),this.handlers=o}}explainFromTokens(t){if(this.isValid){const[n,r]=Tdt(t,this.regex,this.handlers),[o,i,a]=r?Odt(r):[null,null,void 0];if(iv(r,"a")&&iv(r,"H"))throw new Pg("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:o,zone:i,specificOffset:a}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Uie(e,t,n){return new Hie(e,n).explainFromTokens(t)}function Mdt(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:a}=Uie(e,t,n);return[r,o,i,a]}function Wie(e,t){if(!e)return null;const r=Ll.create(t,e).dtFormatter(Idt()),o=r.formatToParts(),i=r.resolvedOptions();return o.map(a=>Pdt(a,e,i))}const U$="Invalid DateTime",h9=864e13;function R0(e){return new Fl("unsupported zone",`the zone "${e.name}" is not supported`)}function W$(e){return e.weekData===null&&(e.weekData=jT(e.c)),e.weekData}function G$(e){return e.localWeekData===null&&(e.localWeekData=jT(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function hp(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new It({...n,...t,old:n})}function Gie(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function UC(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function AP(e,t,n){return Gie(Pk(e),t,n)}function m9(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,BT(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=Fn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=Pk(i);let[l,c]=Gie(s,n,e.zone);return a!==0&&(l+=a,c=e.zone.offset(l)),{ts:l,o:c}}function jm(e,t,n,r,o,i){const{setZone:a,zone:s}=n;if(e&&Object.keys(e).length!==0||t){const l=t||s,c=It.fromObject(e,{...n,zone:l,specificOffset:i});return a?c:c.setZone(s)}else return It.invalid(new Fl("unparsable",`the input "${o}" can't be parsed as ${r}`))}function WC(e,t,n=!0){return e.isValid?Ll.create(er.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function q$(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=uo(e.c.year,n?6:4),t?(r+="-",r+=uo(e.c.month),r+="-",r+=uo(e.c.day)):(r+=uo(e.c.month),r+=uo(e.c.day)),r}function g9(e,t,n,r,o,i){let a=uo(e.c.hour);return t?(a+=":",a+=uo(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=":")):a+=uo(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=uo(e.c.second),(e.c.millisecond!==0||!r)&&(a+=".",a+=uo(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?a+="Z":e.o<0?(a+="-",a+=uo(Math.trunc(-e.o/60)),a+=":",a+=uo(Math.trunc(-e.o%60))):(a+="+",a+=uo(Math.trunc(e.o/60)),a+=":",a+=uo(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const qie={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Adt={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},$dt={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Kie=["year","month","day","hour","minute","second","millisecond"],Rdt=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Ddt=["year","ordinal","hour","minute","second","millisecond"];function _dt(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Yoe(e);return t}function y9(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return _dt(e)}}function Ldt(e){return RP[e]||($P===void 0&&($P=Br.now()),RP[e]=e.offset($P)),RP[e]}function v9(e,t){const n=_d(t.zone,Br.defaultZone);if(!n.isValid)return It.invalid(R0(n));const r=er.fromObject(t);let o,i;if(qt(e.year))o=Br.now();else{for(const l of Kie)qt(e[l])&&(e[l]=qie[l]);const a=bie(e)||wie(e);if(a)return It.invalid(a);const s=Ldt(n);[o,i]=AP(e,s,n)}return new It({ts:o,zone:n,loc:r,o:i})}function b9(e,t,n){const r=qt(n.round)?!0:n.round,o=(a,s)=>(a=OB(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,s)),i=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return o(i(n.unit),n.unit);for(const a of n.units){const s=i(a);if(Math.abs(s)>=1)return o(s,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function w9(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let $P,RP={};class It{constructor(t){const n=t.zone||Br.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new Fl("invalid input"):null)||(n.isValid?null:R0(n));this.ts=qt(t.ts)?Br.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const s=ff(t.o)&&!t.old?t.o:n.offset(this.ts);o=UC(this.ts,s),r=Number.isNaN(o.year)?new Fl("invalid input"):null,o=r?null:o,i=r?null:s}this._zone=n,this.loc=t.loc||er.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new It({})}static local(){const[t,n]=w9(arguments),[r,o,i,a,s,l,c]=n;return v9({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static utc(){const[t,n]=w9(arguments),[r,o,i,a,s,l,c]=n;return t.zone=ji.utcInstance,v9({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static fromJSDate(t,n={}){const r=fut(t)?t.valueOf():NaN;if(Number.isNaN(r))return It.invalid("invalid input");const o=_d(n.zone,Br.defaultZone);return o.isValid?new It({ts:r,zone:o,loc:er.fromObject(n)}):It.invalid(R0(o))}static fromMillis(t,n={}){if(ff(t))return t<-h9||t>h9?It.invalid("Timestamp out of range"):new It({ts:t,zone:_d(n.zone,Br.defaultZone),loc:er.fromObject(n)});throw new hi(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(ff(t))return new It({ts:t*1e3,zone:_d(n.zone,Br.defaultZone),loc:er.fromObject(n)});throw new hi("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=_d(n.zone,Br.defaultZone);if(!r.isValid)return It.invalid(R0(r));const o=er.fromObject(n),i=zT(t,y9),{minDaysInFirstWeek:a,startOfWeek:s}=o9(i,o),l=Br.now(),c=qt(n.specificOffset)?r.offset(l):n.specificOffset,u=!qt(i.ordinal),d=!qt(i.year),f=!qt(i.month)||!qt(i.day),p=d||f,m=i.weekYear||i.weekNumber;if((p||u)&&m)throw new Pg("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&u)throw new Pg("Can't mix ordinal dates with month/day");const g=m||i.weekday&&!p;let y,b,x=UC(l,c);g?(y=Rdt,b=Adt,x=jT(x,a,s)):u?(y=Ddt,b=$dt,x=V$(x)):(y=Kie,b=qie);let S=!1;for(const I of y){const R=i[I];qt(R)?S?i[I]=b[I]:i[I]=x[I]:S=!0}const P=g?cut(i,a,s):u?uut(i):bie(i),E=P||wie(i);if(E)return It.invalid(E);const T=g?n9(i,a,s):u?r9(i):i,[O,k]=AP(T,c,r),M=new It({ts:O,zone:r,o:k,loc:o});return i.weekday&&p&&t.weekday!==M.weekday?It.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${M.toISO()}`):M.isValid?M:It.invalid(M.invalid)}static fromISO(t,n={}){const[r,o]=tdt(t);return jm(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=ndt(t);return jm(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=rdt(t);return jm(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(qt(t)||qt(n))throw new hi("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,a=er.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[s,l,c,u]=Mdt(a,t,n);return u?It.invalid(u):jm(s,l,r,`format ${n}`,t,c)}static fromString(t,n,r={}){return It.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=udt(t);return jm(r,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new hi("need to specify a reason the DateTime is invalid");const r=t instanceof Fl?t:new Fl(t,n);if(Br.throwOnInvalid)throw new Lct(r);return new It({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=Wie(t,er.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return Vie(Ll.parseFormat(t),er.fromObject(n)).map(o=>o.val).join("")}static resetCache(){$P=void 0,RP={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?W$(this).weekYear:NaN}get weekNumber(){return this.isValid?W$(this).weekNumber:NaN}get weekday(){return this.isValid?W$(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?G$(this).weekday:NaN}get localWeekNumber(){return this.isValid?G$(this).weekNumber:NaN}get localWeekYear(){return this.isValid?G$(this).weekYear:NaN}get ordinal(){return this.isValid?V$(this.c).ordinal:NaN}get monthShort(){return this.isValid?$0.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?$0.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?$0.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?$0.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=Pk(this.c),o=this.zone.offset(r-t),i=this.zone.offset(r+t),a=this.zone.offset(r-o*n),s=this.zone.offset(r-i*n);if(a===s)return[this];const l=r-a*n,c=r-s*n,u=UC(l,a),d=UC(c,s);return u.hour===d.hour&&u.minute===d.minute&&u.second===d.second&&u.millisecond===d.millisecond?[hp(this,{ts:l}),hp(this,{ts:c})]:[this]}get isInLeapYear(){return FS(this.year)}get daysInMonth(){return BT(this.year,this.month)}get daysInYear(){return this.isValid?Yg(this.year):NaN}get weeksInWeekYear(){return this.isValid?Mx(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Mx(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=Ll.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(ji.instance(t),n)}toLocal(){return this.setZone(Br.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=_d(t,Br.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),a=this.toObject();[o]=AP(a,i,t)}return hp(this,{ts:o,zone:t})}else return It.invalid(R0(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return hp(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=zT(t,y9),{minDaysInFirstWeek:r,startOfWeek:o}=o9(n,this.loc),i=!qt(n.weekYear)||!qt(n.weekNumber)||!qt(n.weekday),a=!qt(n.ordinal),s=!qt(n.year),l=!qt(n.month)||!qt(n.day),c=s||l,u=n.weekYear||n.weekNumber;if((c||a)&&u)throw new Pg("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&a)throw new Pg("Can't mix ordinal dates with month/day");let d;i?d=n9({...jT(this.c,r,o),...n},r,o):qt(n.ordinal)?(d={...this.toObject(),...n},qt(n.day)&&(d.day=Math.min(BT(d.year,d.month),d.day))):d=r9({...V$(this.c),...n});const[f,p]=AP(d,this.o,this.zone);return hp(this,{ts:f,o:p})}plus(t){if(!this.isValid)return this;const n=Fn.fromDurationLike(t);return hp(this,m9(this,n))}minus(t){if(!this.isValid)return this;const n=Fn.fromDurationLike(t).negate();return hp(this,m9(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},o=Fn.normalizeUnit(t);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;athis.valueOf(),s=a?this:t,l=a?t:this,c=ydt(s,l,i,o);return a?c.negate():c}diffNow(t="milliseconds",n={}){return this.diff(It.now(),t,n)}until(t){return this.isValid?Xr.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||It.fromObject({},{zone:this.zone}),r=t.padding?thisn.valueOf(),Math.min)}static max(...t){if(!t.every(It.isDateTime))throw new hi("max requires all arguments be DateTimes");return i9(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,a=er.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return Uie(a,t,n)}static fromStringExplain(t,n,r={}){return It.fromFormatExplain(t,n,r)}static buildFormatParser(t,n={}){const{locale:r=null,numberingSystem:o=null}=n,i=er.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});return new Hie(i,t)}static fromFormatParser(t,n,r={}){if(qt(t)||qt(n))throw new hi("fromFormatParser requires an input string and a format parser");const{locale:o=null,numberingSystem:i=null}=r,a=er.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});if(!a.equals(n.locale))throw new hi(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${n.locale}`);const{result:s,zone:l,specificOffset:c,invalidReason:u}=n.explainFromTokens(t);return u?It.invalid(u):jm(s,l,r,`format ${n.format}`,t,c)}static get DATE_SHORT(){return FT}static get DATE_MED(){return Xoe}static get DATE_MED_WITH_WEEKDAY(){return jct}static get DATE_FULL(){return Qoe}static get DATE_HUGE(){return Joe}static get TIME_SIMPLE(){return Zoe}static get TIME_WITH_SECONDS(){return eie}static get TIME_WITH_SHORT_OFFSET(){return tie}static get TIME_WITH_LONG_OFFSET(){return nie}static get TIME_24_SIMPLE(){return rie}static get TIME_24_WITH_SECONDS(){return oie}static get TIME_24_WITH_SHORT_OFFSET(){return iie}static get TIME_24_WITH_LONG_OFFSET(){return aie}static get DATETIME_SHORT(){return sie}static get DATETIME_SHORT_WITH_SECONDS(){return lie}static get DATETIME_MED(){return cie}static get DATETIME_MED_WITH_SECONDS(){return uie}static get DATETIME_MED_WITH_WEEKDAY(){return Bct}static get DATETIME_FULL(){return die}static get DATETIME_FULL_WITH_SECONDS(){return fie}static get DATETIME_HUGE(){return pie}static get DATETIME_HUGE_WITH_SECONDS(){return hie}}function l0(e){if(It.isDateTime(e))return e;if(e&&e.valueOf&&ff(e.valueOf()))return It.fromJSDate(e);if(e&&typeof e=="object")return It.fromObject(e);throw new hi(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const Ndt={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyyy:{sectionType:"year",contentType:"digit",maxLength:4},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",c:{sectionType:"weekDay",contentType:"digit",maxLength:1},ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:2},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Fdt={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"d",weekday:"cccc",weekdayShort:"ccccc",hours24h:"HH",hours12h:"hh",meridiem:"a",minutes:"mm",seconds:"ss",fullDate:"DD",keyboardDate:"D",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"t",fullTime12h:"hh:mm a",fullTime24h:"HH:mm",keyboardDateTime:"D t",keyboardDateTime12h:"D hh:mm a",keyboardDateTime24h:"D T"};class Ok{constructor({locale:t,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="luxon",this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"'",end:"'"},this.formatTokenMap=Ndt,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale?r:r.setLocale(o)},this.date=(r,o="default")=>r===null?null:typeof r>"u"?It.fromJSDate(new Date,{locale:this.locale,zone:o}):It.fromISO(r,{locale:this.locale,zone:o}),this.getInvalidDate=()=>It.fromJSDate(new Date("Invalid Date")),this.getTimezone=r=>r.zone.type==="system"?"system":r.zoneName,this.setTimezone=(r,o)=>r.zone.equals($0.normalizeZone(o))?r:r.setZone(o),this.toJsDate=r=>r.toJSDate(),this.parse=(r,o)=>r===""?null:It.fromFormat(r,o,{locale:this.locale}),this.getCurrentLocaleCode=()=>this.locale,this.is12HourCycleInCurrentLocale=()=>{var r,o;return typeof Intl>"u"||typeof Intl.DateTimeFormat>"u"?!0:!!((o=(r=new Intl.DateTimeFormat(this.locale,{hour:"numeric"}))==null?void 0:r.resolvedOptions())!=null&&o.hour12)},this.expandFormat=r=>{const o=/''|'(''|[^'])+('|$)|[^']*/g,i=[...Object.keys(this.formatTokenMap),"yyyyy"],a=new RegExp(`^(${i.join("|")})+$`),s=/(?:^|[^a-z])([a-z]+)(?:[^a-z]|$)|([a-z]+)/gi;return r.match(o).map(l=>l[0]==="'"?l:It.expandFormat(l,{locale:this.locale}).replace(s,(d,f,p)=>{const m=f||p;return a.test(m)?d:`'${d}'`})).join("").replace("yyyyy","yyyy")},this.isValid=r=>r===null?!1:r.isValid,this.format=(r,o)=>this.formatByString(r,this.formats[o]),this.formatByString=(r,o)=>r.setLocale(this.locale).toFormat(o),this.formatNumber=r=>r,this.isEqual=(r,o)=>r===null&&o===null?!0:r===null||o===null?!1:+r==+o,this.isSameYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"year")},this.isSameMonth=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"month")},this.isSameDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"day")},this.isSameHour=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"hour")},this.isAfter=(r,o)=>r>o,this.isAfterYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfYear(i),"years").toObject().years>0},this.isAfterDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfDay(i),"days").toObject().days>0},this.isBefore=(r,o)=>r{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfYear(i),"years").toObject().years<0},this.isBeforeDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfDay(i),"days").toObject().days<0},this.isWithinRange=(r,[o,i])=>this.isEqual(r,o)||this.isEqual(r,i)||this.isAfter(r,o)&&this.isBefore(r,i),this.startOfYear=r=>r.startOf("year"),this.startOfMonth=r=>r.startOf("month"),this.startOfWeek=r=>this.setLocaleToValue(r).startOf("week",{useLocaleWeeks:!0}),this.startOfDay=r=>r.startOf("day"),this.endOfYear=r=>r.endOf("year"),this.endOfMonth=r=>r.endOf("month"),this.endOfWeek=r=>this.setLocaleToValue(r).endOf("week",{useLocaleWeeks:!0}),this.endOfDay=r=>r.endOf("day"),this.addYears=(r,o)=>r.plus({years:o}),this.addMonths=(r,o)=>r.plus({months:o}),this.addWeeks=(r,o)=>r.plus({weeks:o}),this.addDays=(r,o)=>r.plus({days:o}),this.addHours=(r,o)=>r.plus({hours:o}),this.addMinutes=(r,o)=>r.plus({minutes:o}),this.addSeconds=(r,o)=>r.plus({seconds:o}),this.getYear=r=>r.get("year"),this.getMonth=r=>r.get("month")-1,this.getDate=r=>r.get("day"),this.getHours=r=>r.get("hour"),this.getMinutes=r=>r.get("minute"),this.getSeconds=r=>r.get("second"),this.getMilliseconds=r=>r.get("millisecond"),this.setYear=(r,o)=>r.set({year:o}),this.setMonth=(r,o)=>r.set({month:o+1}),this.setDate=(r,o)=>r.set({day:o}),this.setHours=(r,o)=>r.set({hour:o}),this.setMinutes=(r,o)=>r.set({minute:o}),this.setSeconds=(r,o)=>r.set({second:o}),this.setMilliseconds=(r,o)=>r.set({millisecond:o}),this.getDaysInMonth=r=>r.daysInMonth,this.getWeekArray=r=>{const o=this.startOfWeek(this.startOfMonth(r)),i=this.endOfWeek(this.endOfMonth(r)),{days:a}=i.diff(o,"days").toObject(),s=[];return new Array(Math.round(a)).fill(0).map((l,c)=>c).map(l=>o.plus({days:l})).forEach((l,c)=>{if(c===0||c%7===0&&c>6){s.push([l]);return}s[s.length-1].push(l)}),s},this.getWeekNumber=r=>r.localWeekNumber??r.weekNumber,this.getDayOfWeek=r=>r.weekday,this.getYearRange=([r,o])=>{const i=this.startOfYear(r),a=this.endOfYear(o),s=[];let l=i;for(;this.isBefore(l,a);)s.push(l),l=this.addYears(l,1);return s},this.locale=t||"en-US",this.formats=D({},Fdt,n)}}const AB=lt($.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");function $B({callback:e,initialIngredient:t}){const n=t?{value:t,data:{id:-1,name:t,image:null,image_thumbnail:null}}:null,[r,o]=v.useState(!0),[i,a]=v.useState(n),[s,l]=v.useState(""),[c,u]=v.useState([]),[d,f]=qe(),p=v.useMemo(()=>UI(m=>q2e(m,f.language,r).then(g=>u(g)),200),[f.language,r]);return v.useEffect(()=>{if(s===""){u(i?[i]:[]);return}return p(s),()=>{}},[i,s,p]),X(Gt,{children:[C(Kl,{id:"ingredient-autocomplete",getOptionLabel:m=>m.value,"data-testid":"autocomplete",filterOptions:m=>m,options:c,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:i,noOptionsText:d("noResults"),isOptionEqualToValue:(m,g)=>m.value===g.value,onChange:(m,g)=>{u(g?[g,...c]:c),a(g),e(g)},onInputChange:(m,g)=>{l(g)},renderInput:m=>C(gn,{...m,label:d("nutrition.searchIngredientName"),fullWidth:!0,InputProps:{...m.InputProps,startAdornment:X(Mt,{children:[C(co,{position:"start",children:C(AB,{})}),m.InputProps.startAdornment]})}}),renderOption:(m,g)=>sN("li",{...m,key:`ingredient-${g.data.id}`},X(Ja,{disablePadding:!0,component:"div",children:[C(zi,{children:C(Yl,{alt:"",src:`${zF}${g.data.image}`,variant:"rounded",children:C(Ju,{})})}),C(go,{primary:g.value,primaryTypographyProps:{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})]}))}),f.language!==Ty&&C(Hw,{children:C(mh,{control:C(Hu,{checked:r,onChange:(m,g)=>o(g)}),label:d("alsoSearchEnglish")})})]})}var jdt=function(t){return Bdt(t)&&!zdt(t)};function Bdt(e){return!!e&&typeof e=="object"}function zdt(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Udt(e)}var Vdt=typeof Symbol=="function"&&Symbol.for,Hdt=Vdt?Symbol.for("react.element"):60103;function Udt(e){return e.$$typeof===Hdt}function Wdt(e){return Array.isArray(e)?[]:{}}function VT(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ax(Wdt(e),e,t):e}function Gdt(e,t,n){return e.concat(t).map(function(r){return VT(r,n)})}function qdt(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(o){r[o]=VT(e[o],n)}),Object.keys(t).forEach(function(o){!n.isMergeableObject(t[o])||!e[o]?r[o]=VT(t[o],n):r[o]=Ax(e[o],t[o],n)}),r}function Ax(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Gdt,n.isMergeableObject=n.isMergeableObject||jdt;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):qdt(e,t,n):VT(t,n)}Ax.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return Ax(r,o,n)},{})};var oL=Ax,Yie=typeof global=="object"&&global&&global.Object===Object&&global,Kdt=typeof self=="object"&&self&&self.Object===Object&&self,Hc=Yie||Kdt||Function("return this")(),Sf=Hc.Symbol,Xie=Object.prototype,Ydt=Xie.hasOwnProperty,Xdt=Xie.toString,c0=Sf?Sf.toStringTag:void 0;function Qdt(e){var t=Ydt.call(e,c0),n=e[c0];try{e[c0]=void 0;var r=!0}catch{}var o=Xdt.call(e);return r&&(t?e[c0]=n:delete e[c0]),o}var Jdt=Object.prototype,Zdt=Jdt.toString;function eft(e){return Zdt.call(e)}var tft="[object Null]",nft="[object Undefined]",x9=Sf?Sf.toStringTag:void 0;function Uh(e){return e==null?e===void 0?nft:tft:x9&&x9 in Object(e)?Qdt(e):eft(e)}function Qie(e,t){return function(n){return e(t(n))}}var RB=Qie(Object.getPrototypeOf,Object);function Wh(e){return e!=null&&typeof e=="object"}var rft="[object Object]",oft=Function.prototype,ift=Object.prototype,Jie=oft.toString,aft=ift.hasOwnProperty,sft=Jie.call(Object);function S9(e){if(!Wh(e)||Uh(e)!=rft)return!1;var t=RB(e);if(t===null)return!0;var n=aft.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Jie.call(n)==sft}function lft(){this.__data__=[],this.size=0}function Zie(e,t){return e===t||e!==e&&t!==t}function Ik(e,t){for(var n=e.length;n--;)if(Zie(e[n][0],t))return n;return-1}var cft=Array.prototype,uft=cft.splice;function dft(e){var t=this.__data__,n=Ik(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():uft.call(t,n,1),--this.size,!0}function fft(e){var t=this.__data__,n=Ik(t,e);return n<0?void 0:t[n][1]}function pft(e){return Ik(this.__data__,e)>-1}function hft(e,t){var n=this.__data__,r=Ik(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function nd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=hpt}var mpt="[object Arguments]",gpt="[object Array]",ypt="[object Boolean]",vpt="[object Date]",bpt="[object Error]",wpt="[object Function]",xpt="[object Map]",Spt="[object Number]",Cpt="[object Object]",Ppt="[object RegExp]",Ept="[object Set]",Tpt="[object String]",Opt="[object WeakMap]",Ipt="[object ArrayBuffer]",kpt="[object DataView]",Mpt="[object Float32Array]",Apt="[object Float64Array]",$pt="[object Int8Array]",Rpt="[object Int16Array]",Dpt="[object Int32Array]",_pt="[object Uint8Array]",Lpt="[object Uint8ClampedArray]",Npt="[object Uint16Array]",Fpt="[object Uint32Array]",Or={};Or[Mpt]=Or[Apt]=Or[$pt]=Or[Rpt]=Or[Dpt]=Or[_pt]=Or[Lpt]=Or[Npt]=Or[Fpt]=!0;Or[mpt]=Or[gpt]=Or[Ipt]=Or[ypt]=Or[kpt]=Or[vpt]=Or[bpt]=Or[wpt]=Or[xpt]=Or[Spt]=Or[Cpt]=Or[Ppt]=Or[Ept]=Or[Tpt]=Or[Opt]=!1;function jpt(e){return Wh(e)&&aae(e.length)&&!!Or[Uh(e)]}function DB(e){return function(t){return e(t)}}var sae=typeof exports=="object"&&exports&&!exports.nodeType&&exports,dw=sae&&typeof module=="object"&&module&&!module.nodeType&&module,Bpt=dw&&dw.exports===sae,Y$=Bpt&&Yie.process,av=function(){try{var e=dw&&dw.require&&dw.require("util").types;return e||Y$&&Y$.binding&&Y$.binding("util")}catch{}}(),I9=av&&av.isTypedArray,zpt=I9?DB(I9):jpt,Vpt=Object.prototype,Hpt=Vpt.hasOwnProperty;function lae(e,t){var n=VS(e),r=!n&&spt(e),o=!n&&!r&&iae(e),i=!n&&!r&&!o&&zpt(e),a=n||r||o||i,s=a?rpt(e.length,String):[],l=s.length;for(var c in e)(t||Hpt.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ppt(c,l)))&&s.push(c);return s}var Upt=Object.prototype;function _B(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Upt;return e===n}var Wpt=Qie(Object.keys,Object),Gpt=Object.prototype,qpt=Gpt.hasOwnProperty;function Kpt(e){if(!_B(e))return Wpt(e);var t=[];for(var n in Object(e))qpt.call(e,n)&&n!="constructor"&&t.push(n);return t}function cae(e){return e!=null&&aae(e.length)&&!eae(e)}function LB(e){return cae(e)?lae(e):Kpt(e)}function Ypt(e,t){return e&&Mk(t,LB(t),e)}function Xpt(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Qpt=Object.prototype,Jpt=Qpt.hasOwnProperty;function Zpt(e){if(!zS(e))return Xpt(e);var t=_B(e),n=[];for(var r in e)r=="constructor"&&(t||!Jpt.call(e,r))||n.push(r);return n}function NB(e){return cae(e)?lae(e,!0):Zpt(e)}function eht(e,t){return e&&Mk(t,NB(t),e)}var uae=typeof exports=="object"&&exports&&!exports.nodeType&&exports,k9=uae&&typeof module=="object"&&module&&!module.nodeType&&module,tht=k9&&k9.exports===uae,M9=tht?Hc.Buffer:void 0,A9=M9?M9.allocUnsafe:void 0;function nht(e,t){if(t)return e.slice();var n=e.length,r=A9?A9(n):new e.constructor(n);return e.copy(r),r}function dae(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0)&&(n[o]=e[o]);return n}var Ak=v.createContext(void 0);Ak.displayName="FormikContext";var Vmt=Ak.Provider;Ak.Consumer;function Cae(){var e=v.useContext(Ak);return e}var Es=function(t){return typeof t=="function"},HS=function(t){return t!==null&&typeof t=="object"},Hmt=function(t){return String(Math.floor(Number(t)))===t},X$=function(t){return Object.prototype.toString.call(t)==="[object String]"},Umt=function(t){return v.Children.count(t)===0},Q$=function(t){return HS(t)&&Es(t.then)};function Aa(e,t,n,r){r===void 0&&(r=0);for(var o=xae(t);e&&r=0?[]:{}}}return(i===0?e:o)[a[i]]===n?e:(n===void 0?delete o[a[i]]:o[a[i]]=n,i===0&&n===void 0&&delete r[a[i]],r)}function Pae(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var o=0,i=Object.keys(e);o0?Re.map(function(Ae){return I(Ae,Aa(de,Ae))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(Me).then(function(Ae){return Ae.reduce(function(Ne,Je,nt){return Je==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||Je&&(Ne=th(Ne,Re[nt],Je)),Ne},{})})},[I]),_=v.useCallback(function(de){return Promise.all([R(de),f.validationSchema?M(de):{},f.validate?k(de):{}]).then(function(Re){var Me=Re[0],Ae=Re[1],Ne=Re[2],Je=oL.all([Me,Ae,Ne],{arrayMerge:Ymt});return Je})},[f.validate,f.validationSchema,R,k,M]),N=Cs(function(de){return de===void 0&&(de=T.values),O({type:"SET_ISVALIDATING",payload:!0}),_(de).then(function(Re){return b.current&&(O({type:"SET_ISVALIDATING",payload:!1}),O({type:"SET_ERRORS",payload:Re})),Re})});v.useEffect(function(){a&&b.current===!0&&Ep(p.current,f.initialValues)&&N(p.current)},[a,N]);var B=v.useCallback(function(de){var Re=de&&de.values?de.values:p.current,Me=de&&de.errors?de.errors:m.current?m.current:f.initialErrors||{},Ae=de&&de.touched?de.touched:g.current?g.current:f.initialTouched||{},Ne=de&&de.status?de.status:y.current?y.current:f.initialStatus;p.current=Re,m.current=Me,g.current=Ae,y.current=Ne;var Je=function(){O({type:"RESET_FORM",payload:{isSubmitting:!!de&&!!de.isSubmitting,errors:Me,touched:Ae,status:Ne,values:Re,isValidating:!!de&&!!de.isValidating,submitCount:de&&de.submitCount&&typeof de.submitCount=="number"?de.submitCount:0}})};if(f.onReset){var nt=f.onReset(T.values,ue);Q$(nt)?nt.then(Je):Je()}else Je()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);v.useEffect(function(){b.current===!0&&!Ep(p.current,f.initialValues)&&c&&(p.current=f.initialValues,B(),a&&N(p.current))},[c,f.initialValues,B,a,N]),v.useEffect(function(){c&&b.current===!0&&!Ep(m.current,f.initialErrors)&&(m.current=f.initialErrors||mp,O({type:"SET_ERRORS",payload:f.initialErrors||mp}))},[c,f.initialErrors]),v.useEffect(function(){c&&b.current===!0&&!Ep(g.current,f.initialTouched)&&(g.current=f.initialTouched||qC,O({type:"SET_TOUCHED",payload:f.initialTouched||qC}))},[c,f.initialTouched]),v.useEffect(function(){c&&b.current===!0&&!Ep(y.current,f.initialStatus)&&(y.current=f.initialStatus,O({type:"SET_STATUS",payload:f.initialStatus}))},[c,f.initialStatus,f.initialTouched]);var L=Cs(function(de){if(x.current[de]&&Es(x.current[de].validate)){var Re=Aa(T.values,de),Me=x.current[de].validate(Re);return Q$(Me)?(O({type:"SET_ISVALIDATING",payload:!0}),Me.then(function(Ae){return Ae}).then(function(Ae){O({type:"SET_FIELD_ERROR",payload:{field:de,value:Ae}}),O({type:"SET_ISVALIDATING",payload:!1})})):(O({type:"SET_FIELD_ERROR",payload:{field:de,value:Me}}),Promise.resolve(Me))}else if(f.validationSchema)return O({type:"SET_ISVALIDATING",payload:!0}),M(T.values,de).then(function(Ae){return Ae}).then(function(Ae){O({type:"SET_FIELD_ERROR",payload:{field:de,value:Aa(Ae,de)}}),O({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),F=v.useCallback(function(de,Re){var Me=Re.validate;x.current[de]={validate:Me}},[]),U=v.useCallback(function(de){delete x.current[de]},[]),V=Cs(function(de,Re){O({type:"SET_TOUCHED",payload:de});var Me=Re===void 0?o:Re;return Me?N(T.values):Promise.resolve()}),z=v.useCallback(function(de){O({type:"SET_ERRORS",payload:de})},[]),W=Cs(function(de,Re){var Me=Es(de)?de(T.values):de;O({type:"SET_VALUES",payload:Me});var Ae=Re===void 0?n:Re;return Ae?N(Me):Promise.resolve()}),G=v.useCallback(function(de,Re){O({type:"SET_FIELD_ERROR",payload:{field:de,value:Re}})},[]),J=Cs(function(de,Re,Me){O({type:"SET_FIELD_VALUE",payload:{field:de,value:Re}});var Ae=Me===void 0?n:Me;return Ae?N(th(T.values,de,Re)):Promise.resolve()}),K=v.useCallback(function(de,Re){var Me=Re,Ae=de,Ne;if(!X$(de)){de.persist&&de.persist();var Je=de.target?de.target:de.currentTarget,nt=Je.type,st=Je.name,$t=Je.id,ct=Je.value,_t=Je.checked,pt=Je.outerHTML,ot=Je.options,Pe=Je.multiple;Me=Re||st||$t,Ae=/number|range/.test(nt)?(Ne=parseFloat(ct),isNaN(Ne)?"":Ne):/checkbox/.test(nt)?Qmt(Aa(T.values,Me),_t,ct):ot&&Pe?Xmt(ot):ct}Me&&J(Me,Ae)},[J,T.values]),ne=Cs(function(de){if(X$(de))return function(Re){return K(Re,de)};K(de)}),re=Cs(function(de,Re,Me){Re===void 0&&(Re=!0),O({type:"SET_FIELD_TOUCHED",payload:{field:de,value:Re}});var Ae=Me===void 0?o:Me;return Ae?N(T.values):Promise.resolve()}),oe=v.useCallback(function(de,Re){de.persist&&de.persist();var Me=de.target,Ae=Me.name,Ne=Me.id,Je=Me.outerHTML,nt=Re||Ae||Ne;re(nt,!0)},[re]),fe=Cs(function(de){if(X$(de))return function(Re){return oe(Re,de)};oe(de)}),se=v.useCallback(function(de){Es(de)?O({type:"SET_FORMIK_STATE",payload:de}):O({type:"SET_FORMIK_STATE",payload:function(){return de}})},[]),ee=v.useCallback(function(de){O({type:"SET_STATUS",payload:de})},[]),ce=v.useCallback(function(de){O({type:"SET_ISSUBMITTING",payload:de})},[]),le=Cs(function(){return O({type:"SUBMIT_ATTEMPT"}),N().then(function(de){var Re=de instanceof Error,Me=!Re&&Object.keys(de).length===0;if(Me){var Ae;try{if(Ae=ge(),Ae===void 0)return}catch(Ne){throw Ne}return Promise.resolve(Ae).then(function(Ne){return b.current&&O({type:"SUBMIT_SUCCESS"}),Ne}).catch(function(Ne){if(b.current)throw O({type:"SUBMIT_FAILURE"}),Ne})}else if(b.current&&(O({type:"SUBMIT_FAILURE"}),Re))throw de})}),Q=Cs(function(de){de&&de.preventDefault&&Es(de.preventDefault)&&de.preventDefault(),de&&de.stopPropagation&&Es(de.stopPropagation)&&de.stopPropagation(),le().catch(function(Re){console.warn("Warning: An unhandled error was caught from submitForm()",Re)})}),ue={resetForm:B,validateForm:N,validateField:L,setErrors:z,setFieldError:G,setFieldTouched:re,setFieldValue:J,setStatus:ee,setSubmitting:ce,setTouched:V,setValues:W,setFormikState:se,submitForm:le},ge=Cs(function(){return u(T.values,ue)}),xe=Cs(function(de){de&&de.preventDefault&&Es(de.preventDefault)&&de.preventDefault(),de&&de.stopPropagation&&Es(de.stopPropagation)&&de.stopPropagation(),B()}),me=v.useCallback(function(de){return{value:Aa(T.values,de),error:Aa(T.errors,de),touched:!!Aa(T.touched,de),initialValue:Aa(p.current,de),initialTouched:!!Aa(g.current,de),initialError:Aa(m.current,de)}},[T.errors,T.touched,T.values]),be=v.useCallback(function(de){return{setValue:function(Me,Ae){return J(de,Me,Ae)},setTouched:function(Me,Ae){return re(de,Me,Ae)},setError:function(Me){return G(de,Me)}}},[J,re,G]),we=v.useCallback(function(de){var Re=HS(de),Me=Re?de.name:de,Ae=Aa(T.values,Me),Ne={name:Me,value:Ae,onChange:ne,onBlur:fe};if(Re){var Je=de.type,nt=de.value,st=de.as,$t=de.multiple;Je==="checkbox"?nt===void 0?Ne.checked=!!Ae:(Ne.checked=!!(Array.isArray(Ae)&&~Ae.indexOf(nt)),Ne.value=nt):Je==="radio"?(Ne.checked=Ae===nt,Ne.value=nt):st==="select"&&$t&&(Ne.value=Ne.value||[],Ne.multiple=!0)}return Ne},[fe,ne,T.values]),Oe=v.useMemo(function(){return!Ep(p.current,T.values)},[p.current,T.values]),ke=v.useMemo(function(){return typeof s<"u"?Oe?T.errors&&Object.keys(T.errors).length===0:s!==!1&&Es(s)?s(f):s:T.errors&&Object.keys(T.errors).length===0},[s,Oe,T.errors,f]),je=No({},T,{initialValues:p.current,initialErrors:m.current,initialTouched:g.current,initialStatus:y.current,handleBlur:fe,handleChange:ne,handleReset:xe,handleSubmit:Q,resetForm:B,setErrors:z,setFormikState:se,setFieldTouched:re,setFieldValue:J,setFieldError:G,setStatus:ee,setSubmitting:ce,setTouched:V,setValues:W,submitForm:le,validateForm:N,validateField:L,isValid:ke,dirty:Oe,unregisterField:U,registerField:F,getFieldProps:we,getFieldMeta:me,getFieldHelpers:be,validateOnBlur:o,validateOnChange:n,validateOnMount:a});return je}function cl(e){var t=Gmt(e),n=e.component,r=e.children,o=e.render,i=e.innerRef;return v.useImperativeHandle(i,function(){return t}),v.createElement(Vmt,{value:t},n?v.createElement(n,t):o?o(t):r?Es(r)?r(t):Umt(r)?null:v.Children.only(r):null)}function qmt(e){var t={};if(e.inner){if(e.inner.length===0)return th(t,e.path,e.message);for(var o=e.inner,n=Array.isArray(o),r=0,o=n?o:o[Symbol.iterator]();;){var i;if(n){if(r>=o.length)break;i=o[r++]}else{if(r=o.next(),r.done)break;i=r.value}var a=i;Aa(t,a.path)||(t=th(t,a.path,a.message))}}return t}function Kmt(e,t,n,r){n===void 0&&(n=!1);var o=uL(e);return t[n?"validateSync":"validate"](o,{abortEarly:!1,context:o})}function uL(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(o){return Array.isArray(o)===!0||S9(o)?uL(o):o!==""?o:void 0}):S9(e[r])?t[r]=uL(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function Ymt(e,t,n){var r=e.slice();return t.forEach(function(i,a){if(typeof r[a]>"u"){var s=n.clone!==!1,l=s&&n.isMergeableObject(i);r[a]=l?oL(Array.isArray(i)?[]:{},i,n):i}else n.isMergeableObject(i)?r[a]=oL(e[a],i,n):e.indexOf(i)===-1&&r.push(i)}),r}function Xmt(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function Qmt(e,t,n){if(typeof e=="boolean")return!!t;var r=[],o=!1,i=-1;if(Array.isArray(e))r=e,i=e.indexOf(n),o=i>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!o?r.concat(n):o?r.slice(0,i).concat(r.slice(i+1)):r}var Jmt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function Cs(e){var t=v.useRef(e);return Jmt(function(){t.current=e}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Zmt=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Eae=/^\d+$/,egt=/^\d/,tgt=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,ngt=/^\s*(['"]?)(.*?)(\1)\s*$/,VB=512,Y9=new Kh(VB),X9=new Kh(VB),Q9=new Kh(VB),nh={Cache:Kh,split:dL,normalizePath:J$,setter:function(e){var t=J$(e);return X9.get(e)||X9.set(e,function(r,o){for(var i=0,a=t.length,s=r;ie.match(sgt)||[],Rk=e=>e[0].toUpperCase()+e.slice(1),UB=(e,t)=>$k(e).join(t).toLowerCase(),Tae=e=>$k(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),lgt=e=>Rk(Tae(e)),cgt=e=>UB(e,"_"),ugt=e=>UB(e,"-"),dgt=e=>Rk(UB(e," ")),fgt=e=>$k(e).map(Rk).join(" ");var Z$={words:$k,upperFirst:Rk,camelCase:Tae,pascalCase:lgt,snakeCase:cgt,kebabCase:ugt,sentenceCase:dgt,titleCase:fgt},WB={exports:{}};WB.exports=function(e){return Oae(pgt(e),e)};WB.exports.array=Oae;function Oae(e,t){var n=e.length,r=new Array(n),o={},i=n,a=hgt(t),s=mgt(e);for(t.forEach(function(c){if(!s.has(c[0])||!s.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||l(e[i],i,new Set);return r;function l(c,u,d){if(d.has(c)){var f;try{f=", node was:"+JSON.stringify(c)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!s.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!o[u]){o[u]=!0;var p=a.get(c)||new Set;if(p=Array.from(p),u=p.length){d.add(c);do{var m=p[--u];l(m,s.get(m),d)}while(u);d.delete(c)}r[--n]=c}}}function pgt(e){for(var t=new Set,n=0,r=e.length;n"",Sgt=/^Symbol\((.*)\)(.*)$/;function Cgt(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function J9(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return Cgt(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return xgt.call(e).replace(Sgt,"Symbol($1)");const r=vgt.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+bgt.call(e)+"]":r==="RegExp"?wgt.call(e):null}function Ou(e,t){let n=J9(e,t);return n!==null?n:JSON.stringify(e,function(r,o){let i=J9(this[r],t);return i!==null?i:o},2)}function Iae(e){return e==null?[]:[].concat(e)}let kae,Mae,Aae,Pgt=/\$\{\s*(\w+)\s*\}/g;kae=Symbol.toStringTag;class Z9{constructor(t,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[kae]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],Iae(t).forEach(i=>{if(ia.isError(i)){this.errors.push(...i.errors);const a=i.inner.length?i.inner:[i];this.inner.push(...a)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Mae=Symbol.hasInstance;Aae=Symbol.toStringTag;class ia extends Error{static formatError(t,n){const r=n.label||n.path||"this";return r!==n.path&&(n=Object.assign({},n,{path:r})),typeof t=="string"?t.replace(Pgt,(o,i)=>Ou(n[i])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,o,i){const a=new Z9(t,n,r,o);if(i)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Aae]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ia)}static[Mae](t){return Z9[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let uc={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${Ou(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ou(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Ou(n,!0)}\``+o}},ea={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Cd={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},fL={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},pL={isValue:"${path} field must be ${value}"},hL={noUnknown:"${path} field has unspecified keys: ${unknown}"},DP={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Egt={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.lengtho)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${Ou(n,!0)}\``}return ia.formatError(uc.notType,e)}};Object.assign(Object.create(null),{mixed:uc,string:ea,number:Cd,date:fL,object:hL,array:DP,boolean:pL,tuple:Egt});const Dk=e=>e&&e.__isYupSchema__;class HT{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,a=typeof r=="function"?r:(...s)=>s.every(l=>l===r);return new HT(t,(s,l)=>{var c;let u=a(...s)?o:i;return(c=u==null?void 0:u(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,t,n);if(o===void 0||o===t)return t;if(!Dk(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const KC={context:"$",value:"."};class Yh{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===KC.context,this.isValue=this.key[0]===KC.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?KC.context:this.isValue?KC.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&nh.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let o=this.isContext?r:this.isValue?t:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Yh.prototype.__isYupRef=!0;const jl=e=>e==null;function Bm(e){function t({value:n,path:r="",options:o,originalValue:i,schema:a},s,l){const{name:c,test:u,params:d,message:f,skipAbsent:p}=e;let{parent:m,context:g,abortEarly:y=a.spec.abortEarly,disableStackTrace:b=a.spec.disableStackTrace}=o;function x(R){return Yh.isRef(R)?R.getValue(n,m,g):R}function S(R={}){const _=Object.assign({value:n,originalValue:i,label:a.spec.label,path:R.path||r,spec:a.spec,disableStackTrace:R.disableStackTrace||b},d,R.params);for(const B of Object.keys(_))_[B]=x(_[B]);const N=new ia(ia.formatError(R.message||f,_),n,_.path,R.type||c,_.disableStackTrace);return N.params=_,N}const P=y?s:l;let E={path:r,parent:m,type:c,from:o.from,createError:S,resolve:x,options:o,originalValue:i,schema:a};const T=R=>{ia.isError(R)?P(R):R?l(null):P(S())},O=R=>{ia.isError(R)?P(R):s(R)};if(p&&jl(n))return T(!0);let M;try{var I;if(M=u.call(E,n,E),typeof((I=M)==null?void 0:I.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${E.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(M).then(T,O)}}catch(R){O(R);return}T(M)}return t.OPTIONS=e,t}function Tgt(e,t,n,r=n){let o,i,a;return t?(nh.forEach(t,(s,l,c)=>{let u=l?s.slice(1,s.length-1):s;e=e.resolve({context:r,parent:o,value:n});let d=e.type==="tuple",f=c?parseInt(u,10):0;if(e.innerType||d){if(d&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[f],e=d?e.spec.types[f]:e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);o=n,n=n&&n[u],e=e.fields[u]}i=u,a=l?"["+s+"]":"."+s}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class UT extends Set{describe(){const t=[];for(const n of this.values())t.push(Yh.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new UT(this.values())}merge(t,n){const r=this.clone();return t.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function Eg(e,t=new Map){if(Dk(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r{this.typeError(uc.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Eg(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{t.tests.forEach(a=>{i.test(a.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,o,i;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),o=n.assert==="ignore-optionality",i=r._cast(t,n);if(n.assert!==!1&&!r.isType(i)){if(o&&jl(i))return i;let a=Ou(t),s=Ou(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". attempted value: ${a} -`+(s!==a?`result of cast: ${s}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:i,originalValue:a=t,strict:s=this.spec.strict}=n,l=t;s||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let u of Object.values(this.internalTests))u&&c.push(u);this.runTests({path:i,value:l,originalValue:a,options:n,tests:c},r,u=>{if(u.length)return o(u,l);this.runTests({path:i,value:l,originalValue:a,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:i,value:a,originalValue:s,path:l,options:c}=t,u=g=>{o||(o=!0,n(g,a))},d=g=>{o||(o=!0,r(g,a))},f=i.length,p=[];if(!f)return d([]);let m={value:a,originalValue:s,path:l,options:c,schema:this};for(let g=0;gthis.resolve(u)._validate(c,u,f,p)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,s)=>o._validate(t,n,(l,c)=>{aa.isError(l)&&(l.value=c),s(l)},(l,c)=>{l.length?s(new aa(l,c,void 0,void 0,i)):a(c)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(s,l)=>{throw aa.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new aa(s,t,void 0,void 0,a);i=l}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(aa.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(aa.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Tg(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Bm({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Bm({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=dc.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=dc.notNull){return this.nullability(!1,t)}required(t=dc.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=dc.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=Bm(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(i||a.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=Mae(t).map(i=>new Yh(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new qE(o,n):qE.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Bm({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=dc.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=Bm({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,a=i.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:a}})}}),r}notOneOf(t,n=dc.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=Bm({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,a=i.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:i,nullable:a}=n.spec;return{meta:o,label:r,optional:i,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,u)=>u.findIndex(d=>d.name===l.name)===c)}}}ts.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ts.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:a}=Rgt(this,t,n,r.context);return a[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])ts.prototype[e]=ts.prototype.oneOf;for(const e of["not","nope"])ts.prototype[e]=ts.prototype.notOneOf;function _ae(){return new Dae}class Dae extends ts{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=mN.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return Bl(n)||n===!0}})}isFalse(t=mN.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return Bl(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}_ae.prototype=Dae.prototype;const _gt=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Dgt(e){const t=yN(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function yN(e){var t,n;const r=_gt.exec(e);return r?{year:su(r[1]),month:su(r[2],1)-1,day:su(r[3],1),hour:su(r[4]),minute:su(r[5]),second:su(r[6]),millisecond:r[7]?su(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:su(r[10]),minuteOffset:su(r[11])}:null}function su(e,t=0){return Number(e)||t}let Ngt=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Lgt=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Fgt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,jgt="^\\d{4}-\\d{2}-\\d{2}",Bgt="\\d{2}:\\d{2}:\\d{2}",zgt="(([+-]\\d{2}(:?\\d{2})?)|Z)",Vgt=new RegExp(`${jgt}T${Bgt}(\\.\\d+)?${zgt}$`),Hgt=e=>Bl(e)||e===e.trim(),Ugt={}.toString();function Lc(){return new Nae}class Nae extends ts{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===Ugt?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||dc.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=ta.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=ta.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=ta.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||ta.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=ta.email){return this.matches(Ngt,{name:"email",message:t,excludeEmptyString:!0})}url(t=ta.url){return this.matches(Lgt,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ta.uuid){return this.matches(Fgt,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(Vgt,{name:"datetime",message:n||ta.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||ta.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const a=yN(i);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||ta.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const a=yN(i);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ta.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Hgt})}lowercase(t=ta.lowercase){return this.transform(n=>Bl(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Bl(n)||n===n.toLowerCase()})}uppercase(t=ta.uppercase){return this.transform(n=>Bl(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Bl(n)||n===n.toUpperCase()})}}Lc.prototype=Nae.prototype;let Wgt=e=>e!=+e;function la(){return new Lae}class Lae extends ts{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Wgt(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=Cd.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=Cd.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=Cd.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return rthis.resolve(t)}})}positive(t=Cd.positive){return this.moreThan(0,t)}negative(t=Cd.negative){return this.lessThan(0,t)}integer(t=Cd.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>Bl(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>Bl(o)?o:Math[t](o))}}la.prototype=Lae.prototype;let Fae=new Date(""),Ggt=e=>Object.prototype.toString.call(e)==="[object Date]";function US(){return new WS}class WS extends ts{constructor(){super({type:"date",check(t){return Ggt(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=Dgt(t),isNaN(t)?WS.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Yh.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=hN.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=hN.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}WS.INVALID_DATE=Fae;US.prototype=WS.prototype;US.INVALID_DATE=Fae;function qgt(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([a,s])=>`${a}-${s}`));function i(a,s){let l=th.split(a)[0];r.add(l),o.has(`${s}-${l}`)||n.push([s,l])}for(const a of Object.keys(e)){let s=e[a];r.add(a),Yh.isRef(s)&&s.isSibling?i(s.path,a):Fk(s)&&"deps"in s&&s.deps.forEach(l=>i(l,a))}return Pgt.array(Array.from(r),n).reverse()}function Z9(e,t){let n=1/0;return e.some((r,o)=>{var i;if((i=t.path)!=null&&i.includes(r))return n=o,!0}),n}function jae(e){return(t,n)=>Z9(e,t)-Z9(e,n)}const Bae=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function LP(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=LP(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=LP(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(LP)}):"optional"in e?e.optional():e}const Kgt=(e,t)=>{const n=[...th.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=th.getter(th.join(n),!0)(e);return!!(o&&r in o)};let e7=e=>Object.prototype.toString.call(e)==="[object Object]";function Ygt(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const Xgt=jae([]);function fl(e){return new zae(e)}class zae extends ts{constructor(t){super({type:"object",check(n){return e7(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=Xgt,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(o).filter(d=>!this._nodes.includes(d))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),u=!1;for(const d of s){let f=i[d],p=d in o;if(f){let m,g=o[d];c.path=(n.path?`${n.path}.`:"")+d,f=f.resolve({value:g,context:n.context,parent:l});let v=f instanceof ts?f.spec:void 0,w=v==null?void 0:v.strict;if(v!=null&&v.strip){u=u||d in o;continue}m=!n.__validating||!w?f.cast(o[d],c):o[d],m!==void 0&&(l[d]=m)}else p&&!a&&(l[d]=o[d]);(p!==d in l||l[d]!==o[d])&&(u=!0)}return u?l:o}_validate(t,n={},r,o){let{from:i=[],originalValue:a=t,recursive:s=this.spec.recursive}=n;n.from=[{schema:this,value:a},...i],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(l,c)=>{if(!s||!e7(c)){o(l,c);return}a=a||c;let u=[];for(let d of this._nodes){let f=this.fields[d];!f||Yh.isRef(f)||u.push(f.asNestedTest({options:n,key:d,parent:c,parentPath:n.path,originalParent:a}))}this.runTests({tests:u,value:c,originalValue:a,options:n},r,d=>{o(d.sort(this._sortErrors).concat(l),c)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?i:a}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=qgt(t,n),r._sortErrors=jae(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return LP(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=th.getter(t,!0);return this.transform(i=>{if(!i)return i;let a=i;return Kgt(i,t)&&(a=Object.assign({},i),r||delete a[t],a[n]=o(i)),a})}json(){return this.transform(Bae)}noUnknown(t=!0,n=gN.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=Ygt(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=gN.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(nR.camelCase)}snakeCase(){return this.transformKeys(nR.snakeCase)}constantCase(){return this.transformKeys(t=>nR.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[i,a]of Object.entries(n.fields)){var o;let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[i]})),r.fields[i]=a.describe(s)}return r}}fl.prototype=zae.prototype;function GB(e){return new Vae(e)}class Vae extends ts{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const r=super._cast(t,n);if(!this._typeCheck(r)||!this.innerType)return r;let o=!1;const i=r.map((a,s)=>{const l=this.innerType.cast(a,Object.assign({},n,{path:`${n.path||""}[${s}]`}));return l!==a&&(o=!0),l});return o?i:r}_validate(t,n={},r,o){var i;let a=this.innerType,s=(i=n.recursive)!=null?i:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,r,(l,c)=>{var u;if(!s||!a||!this._typeCheck(c)){o(l,c);return}let d=new Array(c.length);for(let p=0;po(p.concat(l),c))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(Bae)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!Fk(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Ou(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=NP.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n){return n=n||NP.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n){return n=n||NP.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(r,o,i)=>!t(r,o,i):r=>!!r;return this.transform(r=>r!=null?r.filter(n):r)}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);if(n.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),r.innerType=n.innerType.describe(i)}return r}}GB.prototype=Vae.prototype;const qB=({planId:e,entry:t,mealId:n,meals:r,closeFn:o})=>{const i=n===void 0?null:n,a=r===void 0?[]:r,[s,l]=Ge(),c=E_e(e),u=O_e(e),[d,f]=y.useState(t?Ot.fromJSDate(t.datetime):Ot.now()),[p,m]=y.useState(i),g=fl({amount:la().required(s("forms.fieldRequired")).max(1e3,s("forms.maxValue",{value:"1000"})).min(1,s("forms.minValue",{value:"1"})),ingredient:la().required(s("forms.fieldRequired")),datetime:US().required(s("forms.fieldRequired"))});return C(ul,{initialValues:{datetime:new Date,amount:0,ingredient:0},validationSchema:g,onSubmit:async v=>{const w={...v,plan:e,meal:p,weight_unit:null,datetime:v.datetime.toISOString()};t?u.mutate({...w,id:t.id}):c.mutate(w),o&&o()},children:v=>C(ls,{children:X(Ut,{spacing:2,children:[C($B,{callback:w=>v.setFieldValue("ingredient",w==null?void 0:w.data.id)}),C(hn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:C(so,{position:"end",children:s("nutrition.gramShort")})},error:v.touched.amount&&!!v.errors.amount,helperText:v.touched.amount&&v.errors.amount,...v.getFieldProps("amount")}),a.length>0&&C(Yl,{value:p,options:a.map(w=>w.id),getOptionLabel:w=>a.find(x=>x.id===w).displayName,onChange:(w,x)=>m(x),renderInput:w=>C(hn,{label:s("nutrition.meal"),value:p,...w})}),C(RS,{dateAdapter:Ak,adapterLocale:l.language,children:C(Vct,{format:"yyyy-MM-dd HH:mm",label:s("date"),value:d,disableFuture:!0,onChange:w=>{v.setFieldValue("datetime",w==null?void 0:w.toJSDate()),f(w)},shouldDisableDate:w=>(t&&ei(t.datetime)===ei(w.toJSDate()),!1)})}),X(Ut,{direction:"row",justifyContent:"end",spacing:2,children:[o!==void 0&&C(yt,{color:"primary",variant:"outlined",onClick:()=>o(),children:s("close")}),C(yt,{color:"primary",variant:"contained",type:"submit",children:s("submit")})]})]})})})},KB=({plan:e,closeFn:t})=>{const[n]=Ge(),r=C_e(),o=T_e(e==null?void 0:e.id),[i,a]=y.useState(e==null?void 0:e.hasAnyGoals),s=fl({description:Lc().required().max(25,n("forms.maxLength",{chars:"25"})).min(3,n("forms.minLength",{chars:"3"})),only_logging:_ae(),goal_energy:la().notRequired().positive().max(6e3,n("forms.maxValue",{value:"6000kcal"})),goal_protein:la().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goal_carbohydrates:la().notRequired().positive().max(750,n("forms.maxValue",{value:"750"})),goal_fiber:la().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goal_fat:la().notRequired().positive().max(500,n("forms.maxValue",{value:"500"}))});return C(ul,{initialValues:{description:e?e.description:n("nutrition.plan"),only_logging:e?e.onlyLogging:!0,goal_energy:e?e.goalEnergy:null,goal_protein:e?e.goalProtein:null,goal_carbohydrates:e?e.goalCarbohydrates:null,goal_fiber:e?e.goalFiber:null,goal_fat:e?e.goalFat:null},validationSchema:s,onSubmit:async l=>{l.goal_energy=l.goal_energy?l.goal_energy:null,l.goal_protein=l.goal_protein?l.goal_protein:null,l.goal_carbohydrates=l.goal_carbohydrates?l.goal_carbohydrates:null,l.goal_fiber=l.goal_fiber?l.goal_fiber:null,l.goal_fat=l.goal_fat?l.goal_fat:null,i||(l.goal_energy=null,l.goal_protein=null,l.goal_carbohydrates=null,l.goal_fiber=null,l.goal_fat=null),e?o.mutate({...l,id:e.id}):r.mutate(l),t&&t()},children:l=>C(ls,{children:X(Ut,{spacing:2,children:[C(hn,{fullWidth:!0,id:"description",label:n("description"),error:l.touched.description&&!!l.errors.description,helperText:l.touched.description&&l.errors.description,...l.getFieldProps("description")}),C(Hw,{children:C(mh,{label:n("nutrition.onlyLoggingHelpText"),control:C(Hu,{id:"onlyLogging",checked:l.values.only_logging,...l.getFieldProps("only_logging")})})}),C(Hw,{children:C(mh,{label:n("nutrition.useGoalsHelpText"),control:C(Hu,{id:"goalEnergy",checked:i,onChange:()=>a(!i)})})}),C(fS,{children:n("nutrition.useGoalsHelpTextLong")}),i&&X(Mt,{children:[C(hn,{fullWidth:!0,id:"energy",label:n("nutrition.goalEnergy"),error:l.touched.goal_energy&&!!l.errors.goal_energy,helperText:l.touched.goal_energy&&l.errors.goal_energy,...l.getFieldProps("goal_energy"),InputProps:{endAdornment:C(so,{position:"end",children:n("nutrition.kcal")})}}),X(He,{container:!0,spacing:1,children:[C(He,{size:4,children:C(hn,{id:"protein",label:n("nutrition.goalProtein"),error:l.touched.goal_protein&&!!l.errors.goal_protein,helperText:l.touched.goal_protein&&l.errors.goal_protein,...l.getFieldProps("goal_protein"),InputProps:{startAdornment:C(so,{position:"start",children:l.values.goal_protein!==null&&l.values.goal_protein!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_protein*zg.protein}):""}),endAdornment:C(so,{position:"end",children:n("nutrition.gramShort")})}})}),C(He,{size:4,children:C(hn,{id:"carbohydrates",label:n("nutrition.goalCarbohydrates"),error:l.touched.goal_carbohydrates&&!!l.errors.goal_carbohydrates,helperText:l.touched.goal_carbohydrates&&l.errors.goal_carbohydrates,...l.getFieldProps("goal_carbohydrates"),InputProps:{startAdornment:C(so,{position:"start",children:l.values.goal_carbohydrates!==null&&l.values.goal_carbohydrates!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_carbohydrates*zg.carbohydrates}):""}),endAdornment:C(so,{position:"end",children:n("nutrition.gramShort")})}})}),C(He,{size:4,children:C(hn,{id:"fat",label:n("nutrition.goalFat"),error:l.touched.goal_fat&&!!l.errors.goal_fat,helperText:l.touched.goal_fat&&l.errors.goal_fat,...l.getFieldProps("goal_fat"),InputProps:{startAdornment:C(so,{position:"start",children:l.values.goal_fat!==null&&l.values.goal_fat!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_fat*zg.fat}):""}),endAdornment:C(so,{position:"end",children:n("nutrition.gramShort")})}})})]}),C(He,{container:!0,spacing:1,children:C(He,{size:4,children:C(hn,{id:"fiber",label:n("nutrition.goalFiber"),error:l.touched.goal_fiber&&!!l.errors.goal_fiber,helperText:l.touched.goal_fiber&&l.errors.goal_fiber,...l.getFieldProps("goal_fiber"),InputProps:{startAdornment:C(so,{position:"start",children:n("nutrition.valueEnergyKcal",{value:0})}),endAdornment:C(so,{position:"end",children:n("nutrition.gramShort")})}})})})]}),C(Ut,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(yt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})},Hae=()=>{const[e]=Ge(),t=w_e();return C(Mt,{children:t.isLoading?C(vo,{}):C(Mt,{children:t.data!==null?C(Qgt,{plan:t.data}):C(DF,{title:e("nutritionalPlan"),modalContent:C(KB,{}),modalTitle:e("add")})})})};function Qgt(e){const[t,n]=Ge(),[r,o]=K.useState(!1),i=()=>o(!0),a=()=>o(!1);return X(Mt,{children:[X(no,{children:[C(ec,{title:t("nutritionalPlan"),subheader:e.plan.description}),X(bi,{sx:{height:"500px",overflow:"auto"},children:[C(Vrt,{percentage:e.plan.percentageValuesLoggedToday,planned:e.plan.plannedNutritionalValues,logged:e.plan.loggedNutritionalValuesToday}),C(al,{children:e.plan.meals.map(s=>C(Jgt,{meal:s,planId:e.plan.id},s.id))})]}),X(as,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[C(yt,{size:"small",href:Cn(bn.NUTRITION_DETAIL,n.language,{id:e.plan.id}),children:t("seeDetails")}),C(Ql,{title:t("nutrition.logThisMealItem"),children:C(kn,{onClick:i,children:C(mS,{})})})]})]}),C(Yi,{title:t("nutrition.addNutritionalDiary"),isOpen:r,closeFn:a,children:C(qB,{closeFn:a,planId:e.plan.id,meals:e.plan.meals})})]})}const Jgt=e=>{const[t,n]=Ge(),r=jZ(e.planId),[o,i]=y.useState(!1),[a,s]=K.useState(!1),l=()=>i(!o),c=(p,m)=>{m!=="clickaway"&&s(!1)},u=p=>{const m=[{plan:e.planId,meal:e.meal.id,mealItem:p.id,ingredient:p.ingredientId,weight_unit:p.weightUnitId,datetime:new Date().toISOString(),amount:p.amount}];r.mutate(m),s(!0)},d=e.meal.name?e.meal.name:RT(e.meal.time,n.language),f=e.meal.name?RT(e.meal.time,n.language):null;return X(Mt,{children:[X(_f,{onClick:l,selected:o,children:[C(zi,{children:o?C(rZ,{}):C(Ov,{})}),C(ho,{primary:d,secondary:f})]}),C(Gs,{in:o,timeout:"auto",unmountOnExit:!0,children:C(al,{children:e.meal.items.map(p=>{var m,g,v,w;return X(es,{secondaryAction:C(Ql,{title:t("nutrition.logThisMealItem"),children:C(kn,{edge:"end",onClick:()=>u(p),children:C(mS,{})})}),children:[C(AF,{children:C(Xl,{alt:(m=p.ingredient)==null?void 0:m.name,src:(v=(g=p.ingredient)==null?void 0:g.image)==null?void 0:v.url,sx:{width:45,height:45},children:C(Ju,{})})}),C(ho,{primary:(w=p.ingredient)==null?void 0:w.name,secondary:Sn(p.amount,n.language)})]},p.id)})})}),C(qJ,{open:a,autoHideDuration:RZ,onClose:c,children:C(Bu,{onClose:c,severity:"success",sx:{width:"100%"},children:t("nutrition.diaryEntrySaved")})})]})},Gi=ut($.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Uae=ut($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddCircle"),Zgt=ut($.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),eyt=ut($.jsx("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos"),tyt=ut($.jsx("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4z"}),"Cached"),nyt=ut($.jsx("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z"}),"CalendarMonth"),ryt=ut([$.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),$.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"CameraAlt"),Wae=ut($.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),oyt=ut($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),iyt=ut($.jsx("path",{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2m-11-4 2.03 2.71L16 11l4 5H8zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6z"}),"Collections"),ayt=ut($.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),YB=ut($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),syt=ut($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),lyt=ut($.jsx("path",{d:"M16 9v10H8V9zm-1.5-6h-5l-1 1H5v2h14V4h-3.5zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2z"}),"DeleteOutlined"),Gae=ut($.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),cyt=ut($.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAlt"),qae=ut($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),Kae=ut($.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),uyt=ut($.jsx("path",{d:"m14 6-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22z"}),"Landscape"),dyt=ut($.jsx("path",{d:"m14 6-4.22 5.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22zM5 16l1.52-2.03L8.04 16z"}),"LandscapeOutlined"),fyt=ut([$.jsx("path",{d:"M5 16h3.04l-1.52-2.03z",opacity:".3"},"0"),$.jsx("path",{d:"m9.78 11.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22L14 6zM5 16l1.52-2.03L8.04 16z"},"1")],"LandscapeTwoTone"),pyt=ut($.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz"),GS=ut($.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),hyt=ut($.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),myt=ut([$.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),$.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"PhotoCamera"),gyt=ut($.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"}),"Redo"),yyt=ut($.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save"),Yae=ut($.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),vyt=e=>{var r;const t=e.avatarSize||40,n=e.iconSize||40;return C(Xl,{sx:{height:t,width:t},src:(r=e.image)==null?void 0:r.url,children:C(Ju,{sx:{height:n,width:n}})})};function Xae(e){return yo({queryKey:[q2e,e],queryFn:()=>FDe(e)})}function byt(e,t=!1){return yo({queryKey:[X2e,e,t],queryFn:()=>BDe(e,t)})}function wyt(){return yo({queryKey:[K2e],queryFn:()=>jDe()})}function xyt(){return yo({queryKey:[Y2e],queryFn:LDe})}/** +`+(s!==a?`result of cast: ${s}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:i,originalValue:a=t,strict:s=this.spec.strict}=n,l=t;s||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let u of Object.values(this.internalTests))u&&c.push(u);this.runTests({path:i,value:l,originalValue:a,options:n,tests:c},r,u=>{if(u.length)return o(u,l);this.runTests({path:i,value:l,originalValue:a,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:i,value:a,originalValue:s,path:l,options:c}=t,u=g=>{o||(o=!0,n(g,a))},d=g=>{o||(o=!0,r(g,a))},f=i.length,p=[];if(!f)return d([]);let m={value:a,originalValue:s,path:l,options:c,schema:this};for(let g=0;gthis.resolve(u)._validate(c,u,f,p)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,s)=>o._validate(t,n,(l,c)=>{ia.isError(l)&&(l.value=c),s(l)},(l,c)=>{l.length?s(new ia(l,c,void 0,void 0,i)):a(c)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(s,l)=>{throw ia.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new ia(s,t,void 0,void 0,a);i=l}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(ia.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(ia.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Eg(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Bm({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Bm({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=uc.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=uc.notNull){return this.nullability(!1,t)}required(t=uc.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=uc.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=Bm(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(i||a.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=Iae(t).map(i=>new Yh(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new HT(o,n):HT.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Bm({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=uc.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=Bm({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,a=i.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:a}})}}),r}notOneOf(t,n=uc.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=Bm({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,a=i.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:i,nullable:a}=n.spec;return{meta:o,label:r,optional:i,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,u)=>u.findIndex(d=>d.name===l.name)===c)}}}Za.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Za.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:a}=Tgt(this,t,n,r.context);return a[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])Za.prototype[e]=Za.prototype.oneOf;for(const e of["not","nope"])Za.prototype[e]=Za.prototype.notOneOf;function $ae(){return new Rae}class Rae extends Za{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=pL.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return jl(n)||n===!0}})}isFalse(t=pL.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return jl(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}$ae.prototype=Rae.prototype;const Ogt=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Igt(e){const t=mL(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function mL(e){var t,n;const r=Ogt.exec(e);return r?{year:au(r[1]),month:au(r[2],1)-1,day:au(r[3],1),hour:au(r[4]),minute:au(r[5]),second:au(r[6]),millisecond:r[7]?au(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:au(r[10]),minuteOffset:au(r[11])}:null}function au(e,t=0){return Number(e)||t}let kgt=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Mgt=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Agt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,$gt="^\\d{4}-\\d{2}-\\d{2}",Rgt="\\d{2}:\\d{2}:\\d{2}",Dgt="(([+-]\\d{2}(:?\\d{2})?)|Z)",_gt=new RegExp(`${$gt}T${Rgt}(\\.\\d+)?${Dgt}$`),Lgt=e=>jl(e)||e===e.trim(),Ngt={}.toString();function Nc(){return new Dae}class Dae extends Za{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===Ngt?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||uc.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=ea.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=ea.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=ea.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||ea.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=ea.email){return this.matches(kgt,{name:"email",message:t,excludeEmptyString:!0})}url(t=ea.url){return this.matches(Mgt,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ea.uuid){return this.matches(Agt,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(_gt,{name:"datetime",message:n||ea.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||ea.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const a=mL(i);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||ea.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const a=mL(i);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ea.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Lgt})}lowercase(t=ea.lowercase){return this.transform(n=>jl(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>jl(n)||n===n.toLowerCase()})}uppercase(t=ea.uppercase){return this.transform(n=>jl(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>jl(n)||n===n.toUpperCase()})}}Nc.prototype=Dae.prototype;let Fgt=e=>e!=+e;function sa(){return new _ae}class _ae extends Za{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Fgt(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=Cd.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=Cd.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=Cd.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return rthis.resolve(t)}})}positive(t=Cd.positive){return this.moreThan(0,t)}negative(t=Cd.negative){return this.lessThan(0,t)}integer(t=Cd.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>jl(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>jl(o)?o:Math[t](o))}}sa.prototype=_ae.prototype;let Lae=new Date(""),jgt=e=>Object.prototype.toString.call(e)==="[object Date]";function US(){return new WS}class WS extends Za{constructor(){super({type:"date",check(t){return jgt(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=Igt(t),isNaN(t)?WS.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Yh.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=fL.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=fL.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}WS.INVALID_DATE=Lae;US.prototype=WS.prototype;US.INVALID_DATE=Lae;function Bgt(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([a,s])=>`${a}-${s}`));function i(a,s){let l=nh.split(a)[0];r.add(l),o.has(`${s}-${l}`)||n.push([s,l])}for(const a of Object.keys(e)){let s=e[a];r.add(a),Yh.isRef(s)&&s.isSibling?i(s.path,a):Dk(s)&&"deps"in s&&s.deps.forEach(l=>i(l,a))}return ygt.array(Array.from(r),n).reverse()}function e7(e,t){let n=1/0;return e.some((r,o)=>{var i;if((i=t.path)!=null&&i.includes(r))return n=o,!0}),n}function Nae(e){return(t,n)=>e7(e,t)-e7(e,n)}const Fae=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function _P(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=_P(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=_P(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(_P)}):"optional"in e?e.optional():e}const zgt=(e,t)=>{const n=[...nh.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=nh.getter(nh.join(n),!0)(e);return!!(o&&r in o)};let t7=e=>Object.prototype.toString.call(e)==="[object Object]";function Vgt(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const Hgt=Nae([]);function dl(e){return new jae(e)}class jae extends Za{constructor(t){super({type:"object",check(n){return t7(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=Hgt,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(o).filter(d=>!this._nodes.includes(d))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),u=!1;for(const d of s){let f=i[d],p=d in o;if(f){let m,g=o[d];c.path=(n.path?`${n.path}.`:"")+d,f=f.resolve({value:g,context:n.context,parent:l});let y=f instanceof Za?f.spec:void 0,b=y==null?void 0:y.strict;if(y!=null&&y.strip){u=u||d in o;continue}m=!n.__validating||!b?f.cast(o[d],c):o[d],m!==void 0&&(l[d]=m)}else p&&!a&&(l[d]=o[d]);(p!==d in l||l[d]!==o[d])&&(u=!0)}return u?l:o}_validate(t,n={},r,o){let{from:i=[],originalValue:a=t,recursive:s=this.spec.recursive}=n;n.from=[{schema:this,value:a},...i],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(l,c)=>{if(!s||!t7(c)){o(l,c);return}a=a||c;let u=[];for(let d of this._nodes){let f=this.fields[d];!f||Yh.isRef(f)||u.push(f.asNestedTest({options:n,key:d,parent:c,parentPath:n.path,originalParent:a}))}this.runTests({tests:u,value:c,originalValue:a,options:n},r,d=>{o(d.sort(this._sortErrors).concat(l),c)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?i:a}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=Bgt(t,n),r._sortErrors=Nae(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return _P(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=nh.getter(t,!0);return this.transform(i=>{if(!i)return i;let a=i;return zgt(i,t)&&(a=Object.assign({},i),r||delete a[t],a[n]=o(i)),a})}json(){return this.transform(Fae)}noUnknown(t=!0,n=hL.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=Vgt(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=hL.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(Z$.camelCase)}snakeCase(){return this.transformKeys(Z$.snakeCase)}constantCase(){return this.transformKeys(t=>Z$.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[i,a]of Object.entries(n.fields)){var o;let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[i]})),r.fields[i]=a.describe(s)}return r}}dl.prototype=jae.prototype;function GB(e){return new Bae(e)}class Bae extends Za{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const r=super._cast(t,n);if(!this._typeCheck(r)||!this.innerType)return r;let o=!1;const i=r.map((a,s)=>{const l=this.innerType.cast(a,Object.assign({},n,{path:`${n.path||""}[${s}]`}));return l!==a&&(o=!0),l});return o?i:r}_validate(t,n={},r,o){var i;let a=this.innerType,s=(i=n.recursive)!=null?i:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,r,(l,c)=>{var u;if(!s||!a||!this._typeCheck(c)){o(l,c);return}let d=new Array(c.length);for(let p=0;po(p.concat(l),c))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(Fae)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!Dk(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Ou(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=DP.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n){return n=n||DP.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n){return n=n||DP.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(r,o,i)=>!t(r,o,i):r=>!!r;return this.transform(r=>r!=null?r.filter(n):r)}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);if(n.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),r.innerType=n.innerType.describe(i)}return r}}GB.prototype=Bae.prototype;const qB=({planId:e,entry:t,mealId:n,meals:r,closeFn:o})=>{const i=n===void 0?null:n,a=r===void 0?[]:r,[s,l]=qe(),c=gDe(e),u=yDe(e),[d,f]=v.useState(t?It.fromJSDate(t.datetime):It.now()),[p,m]=v.useState(i),g=dl({amount:sa().required(s("forms.fieldRequired")).max(1e3,s("forms.maxValue",{value:"1000"})).min(1,s("forms.minValue",{value:"1"})),ingredient:sa().required(s("forms.fieldRequired")),datetime:US().required(s("forms.fieldRequired"))});return C(cl,{initialValues:{datetime:new Date,amount:0,ingredient:0},validationSchema:g,onSubmit:async y=>{const b={...y,plan:e,meal:p,weight_unit:null,datetime:y.datetime.toISOString()};t?u.mutate({...b,id:t.id}):c.mutate(b),o&&o()},children:y=>C(as,{children:X(Gt,{spacing:2,children:[C($B,{callback:b=>y.setFieldValue("ingredient",b==null?void 0:b.data.id)}),C(gn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:C(co,{position:"end",children:s("nutrition.gramShort")})},error:y.touched.amount&&!!y.errors.amount,helperText:y.touched.amount&&y.errors.amount,...y.getFieldProps("amount")}),a.length>0&&C(Kl,{value:p,options:a.map(b=>b.id),getOptionLabel:b=>a.find(x=>x.id===b).displayName,onChange:(b,x)=>m(x),renderInput:b=>C(gn,{label:s("nutrition.meal"),value:p,...b})}),C(RS,{dateAdapter:Ok,adapterLocale:l.language,children:C(_ct,{format:"yyyy-MM-dd HH:mm",label:s("date"),value:d,disableFuture:!0,onChange:b=>{y.setFieldValue("datetime",b==null?void 0:b.toJSDate()),f(b)},shouldDisableDate:b=>(t&&ni(t.datetime)===ni(b.toJSDate()),!1)})}),X(Gt,{direction:"row",justifyContent:"end",spacing:2,children:[o!==void 0&&C(yt,{color:"primary",variant:"outlined",onClick:()=>o(),children:s("close")}),C(yt,{color:"primary",variant:"contained",type:"submit",children:s("submit")})]})]})})})},KB=({plan:e,closeFn:t})=>{const[n]=qe(),r=pDe(),o=mDe(e==null?void 0:e.id),[i,a]=v.useState(e==null?void 0:e.hasAnyGoals),s=dl({description:Nc().required().max(25,n("forms.maxLength",{chars:"25"})).min(3,n("forms.minLength",{chars:"3"})),only_logging:$ae(),goal_energy:sa().notRequired().positive().max(6e3,n("forms.maxValue",{value:"6000kcal"})),goal_protein:sa().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goal_carbohydrates:sa().notRequired().positive().max(750,n("forms.maxValue",{value:"750"})),goal_fiber:sa().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goal_fat:sa().notRequired().positive().max(500,n("forms.maxValue",{value:"500"}))});return C(cl,{initialValues:{description:e?e.description:n("nutrition.plan"),only_logging:e?e.onlyLogging:!0,goal_energy:e?e.goalEnergy:null,goal_protein:e?e.goalProtein:null,goal_carbohydrates:e?e.goalCarbohydrates:null,goal_fiber:e?e.goalFiber:null,goal_fat:e?e.goalFat:null},validationSchema:s,onSubmit:async l=>{l.goal_energy=l.goal_energy?l.goal_energy:null,l.goal_protein=l.goal_protein?l.goal_protein:null,l.goal_carbohydrates=l.goal_carbohydrates?l.goal_carbohydrates:null,l.goal_fiber=l.goal_fiber?l.goal_fiber:null,l.goal_fat=l.goal_fat?l.goal_fat:null,i||(l.goal_energy=null,l.goal_protein=null,l.goal_carbohydrates=null,l.goal_fiber=null,l.goal_fat=null),e?o.mutate({...l,id:e.id}):r.mutate(l),t&&t()},children:l=>C(as,{children:X(Gt,{spacing:2,children:[C(gn,{fullWidth:!0,id:"description",label:n("description"),error:l.touched.description&&!!l.errors.description,helperText:l.touched.description&&l.errors.description,...l.getFieldProps("description")}),C(Hw,{children:C(mh,{label:n("nutrition.onlyLoggingHelpText"),control:C(Hu,{id:"onlyLogging",checked:l.values.only_logging,...l.getFieldProps("only_logging")})})}),C(Hw,{children:C(mh,{label:n("nutrition.useGoalsHelpText"),control:C(Hu,{id:"goalEnergy",checked:i,onChange:()=>a(!i)})})}),C(fS,{children:n("nutrition.useGoalsHelpTextLong")}),i&&X(Mt,{children:[C(gn,{fullWidth:!0,id:"energy",label:n("nutrition.goalEnergy"),error:l.touched.goal_energy&&!!l.errors.goal_energy,helperText:l.touched.goal_energy&&l.errors.goal_energy,...l.getFieldProps("goal_energy"),InputProps:{endAdornment:C(co,{position:"end",children:n("nutrition.kcal")})}}),X(Fe,{container:!0,spacing:1,children:[C(Fe,{size:4,children:C(gn,{id:"protein",label:n("nutrition.goalProtein"),error:l.touched.goal_protein&&!!l.errors.goal_protein,helperText:l.touched.goal_protein&&l.errors.goal_protein,...l.getFieldProps("goal_protein"),InputProps:{startAdornment:C(co,{position:"start",children:l.values.goal_protein!==null&&l.values.goal_protein!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_protein*zg.protein}):""}),endAdornment:C(co,{position:"end",children:n("nutrition.gramShort")})}})}),C(Fe,{size:4,children:C(gn,{id:"carbohydrates",label:n("nutrition.goalCarbohydrates"),error:l.touched.goal_carbohydrates&&!!l.errors.goal_carbohydrates,helperText:l.touched.goal_carbohydrates&&l.errors.goal_carbohydrates,...l.getFieldProps("goal_carbohydrates"),InputProps:{startAdornment:C(co,{position:"start",children:l.values.goal_carbohydrates!==null&&l.values.goal_carbohydrates!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_carbohydrates*zg.carbohydrates}):""}),endAdornment:C(co,{position:"end",children:n("nutrition.gramShort")})}})}),C(Fe,{size:4,children:C(gn,{id:"fat",label:n("nutrition.goalFat"),error:l.touched.goal_fat&&!!l.errors.goal_fat,helperText:l.touched.goal_fat&&l.errors.goal_fat,...l.getFieldProps("goal_fat"),InputProps:{startAdornment:C(co,{position:"start",children:l.values.goal_fat!==null&&l.values.goal_fat!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_fat*zg.fat}):""}),endAdornment:C(co,{position:"end",children:n("nutrition.gramShort")})}})})]}),C(Fe,{container:!0,spacing:1,children:C(Fe,{size:4,children:C(gn,{id:"fiber",label:n("nutrition.goalFiber"),error:l.touched.goal_fiber&&!!l.errors.goal_fiber,helperText:l.touched.goal_fiber&&l.errors.goal_fiber,...l.getFieldProps("goal_fiber"),InputProps:{startAdornment:C(co,{position:"start",children:n("nutrition.valueEnergyKcal",{value:0})}),endAdornment:C(co,{position:"end",children:n("nutrition.gramShort")})}})})})]}),C(Gt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(yt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})},zae=()=>{const[e]=qe(),t=uDe();return C(Mt,{children:t.isLoading?C(bo,{}):C(Mt,{children:t.data!==null?C(Ugt,{plan:t.data}):C(DF,{title:e("nutritionalPlan"),modalContent:C(KB,{}),modalTitle:e("add")})})})};function Ugt(e){const[t,n]=qe(),[r,o]=Y.useState(!1),i=()=>o(!0),a=()=>o(!1);return X(Mt,{children:[X(io,{children:[C(Zl,{title:t("nutritionalPlan"),subheader:e.plan.description}),X(wi,{sx:{height:"500px",overflow:"auto"},children:[C(_rt,{percentage:e.plan.percentageValuesLoggedToday,planned:e.plan.plannedNutritionalValues,logged:e.plan.loggedNutritionalValuesToday}),C(ol,{children:e.plan.meals.map(s=>C(Wgt,{meal:s,planId:e.plan.id},s.id))})]}),X(os,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[C(yt,{size:"small",href:Pn(wn.NUTRITION_DETAIL,n.language,{id:e.plan.id}),children:t("seeDetails")}),C(Xl,{title:t("nutrition.logThisMealItem"),children:C(An,{onClick:i,children:C(hS,{})})})]})]}),C(Yi,{title:t("nutrition.addNutritionalDiary"),isOpen:r,closeFn:a,children:C(qB,{closeFn:a,planId:e.plan.id,meals:e.plan.meals})})]})}const Wgt=e=>{const[t,n]=qe(),r=_Z(e.planId),[o,i]=v.useState(!1),[a,s]=Y.useState(!1),l=()=>i(!o),c=(p,m)=>{m!=="clickaway"&&s(!1)},u=p=>{const m=[{plan:e.planId,meal:e.meal.id,mealItem:p.id,ingredient:p.ingredientId,weight_unit:p.weightUnitId,datetime:new Date().toISOString(),amount:p.amount}];r.mutate(m),s(!0)},d=e.meal.name?e.meal.name:kE(e.meal.time,n.language),f=e.meal.name?kE(e.meal.time,n.language):null;return X(Mt,{children:[X(Df,{onClick:l,selected:o,children:[C(zi,{children:o?C(ZJ,{}):C(Tv,{})}),C(go,{primary:d,secondary:f})]}),C(Ws,{in:o,timeout:"auto",unmountOnExit:!0,children:C(ol,{children:e.meal.items.map(p=>{var m,g,y,b;return X(Ja,{secondaryAction:C(Xl,{title:t("nutrition.logThisMealItem"),children:C(An,{edge:"end",onClick:()=>u(p),children:C(hS,{})})}),children:[C(kF,{children:C(Yl,{alt:(m=p.ingredient)==null?void 0:m.name,src:(y=(g=p.ingredient)==null?void 0:g.image)==null?void 0:y.url,sx:{width:45,height:45},children:C(Ju,{})})}),C(go,{primary:(b=p.ingredient)==null?void 0:b.name,secondary:Cn(p.amount,n.language)})]},p.id)})})}),C(HJ,{open:a,autoHideDuration:kZ,onClose:c,children:C(Bu,{onClose:c,severity:"success",sx:{width:"100%"},children:t("nutrition.diaryEntrySaved")})})]})},Gi=lt($.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Vae=lt($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddCircle"),Ggt=lt($.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),qgt=lt($.jsx("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos"),Kgt=lt($.jsx("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4z"}),"Cached"),Ygt=lt($.jsx("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z"}),"CalendarMonth"),Xgt=lt([$.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),$.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"CameraAlt"),Hae=lt($.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),Qgt=lt($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),Jgt=lt($.jsx("path",{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2m-11-4 2.03 2.71L16 11l4 5H8zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6z"}),"Collections"),Zgt=lt($.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),YB=lt($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),eyt=lt($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),tyt=lt($.jsx("path",{d:"M16 9v10H8V9zm-1.5-6h-5l-1 1H5v2h14V4h-3.5zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2z"}),"DeleteOutlined"),Uae=lt($.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),nyt=lt($.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAlt"),Wae=lt($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),Gae=lt($.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),ryt=lt($.jsx("path",{d:"m14 6-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22z"}),"Landscape"),oyt=lt($.jsx("path",{d:"m14 6-4.22 5.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22zM5 16l1.52-2.03L8.04 16z"}),"LandscapeOutlined"),iyt=lt([$.jsx("path",{d:"M5 16h3.04l-1.52-2.03z",opacity:".3"},"0"),$.jsx("path",{d:"m9.78 11.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22L14 6zM5 16l1.52-2.03L8.04 16z"},"1")],"LandscapeTwoTone"),ayt=lt($.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz"),GS=lt($.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),syt=lt($.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),lyt=lt([$.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),$.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"PhotoCamera"),cyt=lt($.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"}),"Redo"),uyt=lt($.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save"),qae=lt($.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),dyt=e=>{var r;const t=e.avatarSize||40,n=e.iconSize||40;return C(Yl,{sx:{height:t,width:t},src:(r=e.image)==null?void 0:r.url,children:C(Ju,{sx:{height:n,width:n}})})};function Kae(e){return oo({queryKey:[N2e,e],queryFn:()=>I_e(e)})}function fyt(e,t=!1){return oo({queryKey:[B2e,e,t],queryFn:()=>M_e(e,t)})}function pyt(){return oo({queryKey:[F2e],queryFn:()=>k_e()})}function hyt(){return oo({queryKey:[j2e],queryFn:O_e})}/** * @remix-run/router v1.20.0 * * Copyright (c) Remix Software Inc. @@ -368,7 +368,7 @@ attempted value: ${a} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function _x(){return _x=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Qae(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Cyt(){return Math.random().toString(36).substr(2,8)}function n7(e,t){return{usr:e.state,key:e.key,idx:t}}function vN(e,t,n,r){return n===void 0&&(n=null),_x({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ib(t):t,{state:n,key:t&&t.key||r||Cyt()})}function YE(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ib(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Pyt(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s=Jd.Pop,l=null,c=u();c==null&&(c=0,a.replaceState(_x({},a.state,{idx:c}),""));function u(){return(a.state||{idx:null}).idx}function d(){s=Jd.Pop;let v=u(),w=v==null?null:v-c;c=v,l&&l({action:s,location:g.location,delta:w})}function f(v,w){s=Jd.Push;let x=vN(g.location,v,w);c=u()+1;let S=n7(x,c),P=g.createHref(x);try{a.pushState(S,"",P)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;o.location.assign(P)}i&&l&&l({action:s,location:g.location,delta:1})}function p(v,w){s=Jd.Replace;let x=vN(g.location,v,w);c=u();let S=n7(x,c),P=g.createHref(x);a.replaceState(S,"",P),i&&l&&l({action:s,location:g.location,delta:0})}function m(v){let w=o.location.origin!=="null"?o.location.origin:o.location.href,x=typeof v=="string"?v:YE(v);return x=x.replace(/ $/,"%20"),go(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let g={get action(){return s},get location(){return e(o,a)},listen(v){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(t7,d),l=v,()=>{o.removeEventListener(t7,d),l=null}},createHref(v){return t(o,v)},createURL:m,encodeLocation(v){let w=m(v);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:f,replace:p,go(v){return a.go(v)}};return g}var r7;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(r7||(r7={}));function Tyt(e,t,n){return n===void 0&&(n="/"),Eyt(e,t,n,!1)}function Eyt(e,t,n,r){let o=typeof t=="string"?ib(t):t,i=XB(o.pathname||"/",n);if(i==null)return null;let a=Jae(e);Oyt(a);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(go(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=pf([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(go(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Jae(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:_yt(c,i.index),routesMeta:u})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of Zae(i.path))o(i,a,l)}),t}function Zae(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=Zae(r.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Oyt(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Dyt(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Iyt=/^:[\w-]+$/,kyt=3,Myt=2,Ayt=1,$yt=10,Ryt=-2,o7=e=>e==="*";function _yt(e,t){let n=e.split("/"),r=n.length;return n.some(o7)&&(r+=Ryt),t&&(r+=Myt),n.filter(o=>!o7(o)).reduce((o,i)=>o+(Iyt.test(i)?kyt:i===""?Ayt:$yt),r)}function Dyt(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Nyt(e,t,n){let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s{let{paramName:f,isOptional:p}=u;if(f==="*"){let g=s[d]||"";a=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const m=s[d];return p&&!m?c[f]=void 0:c[f]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function Lyt(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Qae(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Fyt(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Qae(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function XB(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function jyt(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?ib(e):e;return{pathname:n?n.startsWith("/")?n:Byt(n,t):t,search:Hyt(r),hash:Uyt(o)}}function Byt(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function rR(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function zyt(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ese(e,t){let n=zyt(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function tse(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=ib(e):(o=_x({},e),go(!o.pathname||!o.pathname.includes("?"),rR("?","pathname","search",o)),go(!o.pathname||!o.pathname.includes("#"),rR("#","pathname","hash",o)),go(!o.search||!o.search.includes("#"),rR("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}s=d>=0?t[d]:"/"}let l=jyt(o,s),c=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const pf=e=>e.join("/").replace(/\/\/+/g,"/"),Vyt=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Hyt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Uyt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Wyt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const nse=["post","put","patch","delete"];new Set(nse);const Gyt=["get",...nse];new Set(Gyt);/** + */function Dx(){return Dx=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Yae(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gyt(){return Math.random().toString(36).substr(2,8)}function r7(e,t){return{usr:e.state,key:e.key,idx:t}}function gL(e,t,n,r){return n===void 0&&(n=null),Dx({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ob(t):t,{state:n,key:t&&t.key||r||gyt()})}function WT(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ob(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function yyt(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s=Jd.Pop,l=null,c=u();c==null&&(c=0,a.replaceState(Dx({},a.state,{idx:c}),""));function u(){return(a.state||{idx:null}).idx}function d(){s=Jd.Pop;let y=u(),b=y==null?null:y-c;c=y,l&&l({action:s,location:g.location,delta:b})}function f(y,b){s=Jd.Push;let x=gL(g.location,y,b);c=u()+1;let S=r7(x,c),P=g.createHref(x);try{a.pushState(S,"",P)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;o.location.assign(P)}i&&l&&l({action:s,location:g.location,delta:1})}function p(y,b){s=Jd.Replace;let x=gL(g.location,y,b);c=u();let S=r7(x,c),P=g.createHref(x);a.replaceState(S,"",P),i&&l&&l({action:s,location:g.location,delta:0})}function m(y){let b=o.location.origin!=="null"?o.location.origin:o.location.href,x=typeof y=="string"?y:WT(y);return x=x.replace(/ $/,"%20"),vo(b,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,b)}let g={get action(){return s},get location(){return e(o,a)},listen(y){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(n7,d),l=y,()=>{o.removeEventListener(n7,d),l=null}},createHref(y){return t(o,y)},createURL:m,encodeLocation(y){let b=m(y);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:p,go(y){return a.go(y)}};return g}var o7;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(o7||(o7={}));function vyt(e,t,n){return n===void 0&&(n="/"),byt(e,t,n,!1)}function byt(e,t,n,r){let o=typeof t=="string"?ob(t):t,i=XB(o.pathname||"/",n);if(i==null)return null;let a=Xae(e);wyt(a);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(vo(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=pf([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(vo(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Xae(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:Oyt(c,i.index),routesMeta:u})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of Qae(i.path))o(i,a,l)}),t}function Qae(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=Qae(r.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function wyt(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Iyt(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const xyt=/^:[\w-]+$/,Syt=3,Cyt=2,Pyt=1,Eyt=10,Tyt=-2,i7=e=>e==="*";function Oyt(e,t){let n=e.split("/"),r=n.length;return n.some(i7)&&(r+=Tyt),t&&(r+=Cyt),n.filter(o=>!i7(o)).reduce((o,i)=>o+(xyt.test(i)?Syt:i===""?Pyt:Eyt),r)}function Iyt(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function kyt(e,t,n){let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s{let{paramName:f,isOptional:p}=u;if(f==="*"){let g=s[d]||"";a=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const m=s[d];return p&&!m?c[f]=void 0:c[f]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function Myt(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Yae(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Ayt(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Yae(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function XB(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function $yt(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?ob(e):e;return{pathname:n?n.startsWith("/")?n:Ryt(n,t):t,search:Lyt(r),hash:Nyt(o)}}function Ryt(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function eR(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Dyt(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Jae(e,t){let n=Dyt(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Zae(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=ob(e):(o=Dx({},e),vo(!o.pathname||!o.pathname.includes("?"),eR("?","pathname","search",o)),vo(!o.pathname||!o.pathname.includes("#"),eR("#","pathname","hash",o)),vo(!o.search||!o.search.includes("#"),eR("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}s=d>=0?t[d]:"/"}let l=$yt(o,s),c=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const pf=e=>e.join("/").replace(/\/\/+/g,"/"),_yt=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Lyt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Nyt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Fyt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ese=["post","put","patch","delete"];new Set(ese);const jyt=["get",...ese];new Set(jyt);/** * React Router v6.27.0 * * Copyright (c) Remix Software Inc. @@ -377,7 +377,7 @@ attempted value: ${a} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Dx(){return Dx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),y.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let d=tse(c,JSON.parse(a),i,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:pf([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,a,i,e])}function Jh(){let{matches:e}=y.useContext(Hf),t=e[e.length-1];return t?t.params:{}}function ise(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(Xh),{matches:o}=y.useContext(Hf),{pathname:i}=Bk(),a=JSON.stringify(ese(o,r.v7_relativeSplatPath));return y.useMemo(()=>tse(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function Xyt(e,t){return Qyt(e,t)}function Qyt(e,t,n,r){qS()||go(!1);let{navigator:o}=y.useContext(Xh),{matches:i}=y.useContext(Hf),a=i[i.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let c=Bk(),u;if(t){var d;let v=typeof t=="string"?ib(t):t;l==="/"||(d=v.pathname)!=null&&d.startsWith(l)||go(!1),u=v}else u=c;let f=u.pathname||"/",p=f;if(l!=="/"){let v=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let m=Tyt(e,{pathname:p}),g=nvt(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:pf([l,o.encodeLocation?o.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:pf([l,o.encodeLocation?o.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,n,r);return t&&g?y.createElement(jk.Provider,{value:{location:Dx({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Jd.Pop}},g):g}function Jyt(){let e=avt(),t=Wyt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:o},n):null,null)}const Zyt=y.createElement(Jyt,null);class evt extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Hf.Provider,{value:this.props.routeContext},y.createElement(rse.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function tvt(e){let{routeContext:t,match:n,children:r}=e,o=y.useContext(QB);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Hf.Provider,{value:t},r)}function nvt(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(o=n)==null?void 0:o.errors;if(s!=null){let u=a.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);u>=0||go(!1),a=a.slice(0,Math.min(a.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((u,d,f)=>{let p,m=!1,g=null,v=null;n&&(p=s&&d.route.id?s[d.route.id]:void 0,g=d.route.errorElement||Zyt,l&&(c<0&&f===0?(m=!0,v=null):c===f&&(m=!0,v=d.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,f+1)),x=()=>{let S;return p?S=g:m?S=v:d.route.Component?S=y.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=u,y.createElement(tvt,{match:d,routeContext:{outlet:u,matches:w,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?y.createElement(evt,{location:n.location,revalidation:n.revalidation,component:g,error:p,children:x(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):x()},null)}var ase=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ase||{}),XE=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(XE||{});function rvt(e){let t=y.useContext(QB);return t||go(!1),t}function ovt(e){let t=y.useContext(qyt);return t||go(!1),t}function ivt(e){let t=y.useContext(Hf);return t||go(!1),t}function sse(e){let t=ivt(),n=t.matches[t.matches.length-1];return n.route.id||go(!1),n.route.id}function avt(){var e;let t=y.useContext(rse),n=ovt(XE.UseRouteError),r=sse(XE.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function svt(){let{router:e}=rvt(ase.UseNavigateStable),t=sse(XE.UseNavigateStable),n=y.useRef(!1);return ose(()=>{n.current=!0}),y.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Dx({fromRouteId:t},i)))},[e,t])}function Dt(e){go(!1)}function lvt(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Jd.Pop,navigator:i,static:a=!1,future:s}=e;qS()&&go(!1);let l=t.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:i,static:a,future:Dx({v7_relativeSplatPath:!1},s)}),[l,s,i,a]);typeof r=="string"&&(r=ib(r));let{pathname:u="/",search:d="",hash:f="",state:p=null,key:m="default"}=r,g=y.useMemo(()=>{let v=XB(u,l);return v==null?null:{location:{pathname:v,search:d,hash:f,state:p,key:m},navigationType:o}},[l,u,d,f,p,m,o]);return g==null?null:y.createElement(Xh.Provider,{value:c},y.createElement(jk.Provider,{children:n,value:g}))}function cvt(e){let{children:t,location:n}=e;return Xyt(bN(t),n)}new Promise(()=>{});function bN(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,o)=>{if(!y.isValidElement(r))return;let i=[...t,o];if(r.type===y.Fragment){n.push.apply(n,bN(r.props.children,i));return}r.type!==Dt&&go(!1),!r.props.index||!r.props.children||go(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=bN(r.props.children,i)),n.push(a)}),n}/** + */function _x(){return _x=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),v.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let d=Zae(c,JSON.parse(a),i,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:pf([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,a,i,e])}function Jh(){let{matches:e}=v.useContext(Hf),t=e[e.length-1];return t?t.params:{}}function rse(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(Xh),{matches:o}=v.useContext(Hf),{pathname:i}=Lk(),a=JSON.stringify(Jae(o,r.v7_relativeSplatPath));return v.useMemo(()=>Zae(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function Hyt(e,t){return Uyt(e,t)}function Uyt(e,t,n,r){qS()||vo(!1);let{navigator:o}=v.useContext(Xh),{matches:i}=v.useContext(Hf),a=i[i.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let c=Lk(),u;if(t){var d;let y=typeof t=="string"?ob(t):t;l==="/"||(d=y.pathname)!=null&&d.startsWith(l)||vo(!1),u=y}else u=c;let f=u.pathname||"/",p=f;if(l!=="/"){let y=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let m=vyt(e,{pathname:p}),g=Yyt(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:pf([l,o.encodeLocation?o.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:pf([l,o.encodeLocation?o.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,r);return t&&g?v.createElement(_k.Provider,{value:{location:_x({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Jd.Pop}},g):g}function Wyt(){let e=Zyt(),t=Fyt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:o},n):null,null)}const Gyt=v.createElement(Wyt,null);class qyt extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?v.createElement(Hf.Provider,{value:this.props.routeContext},v.createElement(tse.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Kyt(e){let{routeContext:t,match:n,children:r}=e,o=v.useContext(QB);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Hf.Provider,{value:t},r)}function Yyt(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(o=n)==null?void 0:o.errors;if(s!=null){let u=a.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);u>=0||vo(!1),a=a.slice(0,Math.min(a.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((u,d,f)=>{let p,m=!1,g=null,y=null;n&&(p=s&&d.route.id?s[d.route.id]:void 0,g=d.route.errorElement||Gyt,l&&(c<0&&f===0?(m=!0,y=null):c===f&&(m=!0,y=d.route.hydrateFallbackElement||null)));let b=t.concat(a.slice(0,f+1)),x=()=>{let S;return p?S=g:m?S=y:d.route.Component?S=v.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=u,v.createElement(Kyt,{match:d,routeContext:{outlet:u,matches:b,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?v.createElement(qyt,{location:n.location,revalidation:n.revalidation,component:g,error:p,children:x(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):x()},null)}var ose=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ose||{}),GT=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(GT||{});function Xyt(e){let t=v.useContext(QB);return t||vo(!1),t}function Qyt(e){let t=v.useContext(Byt);return t||vo(!1),t}function Jyt(e){let t=v.useContext(Hf);return t||vo(!1),t}function ise(e){let t=Jyt(),n=t.matches[t.matches.length-1];return n.route.id||vo(!1),n.route.id}function Zyt(){var e;let t=v.useContext(tse),n=Qyt(GT.UseRouteError),r=ise(GT.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function evt(){let{router:e}=Xyt(ose.UseNavigateStable),t=ise(GT.UseNavigateStable),n=v.useRef(!1);return nse(()=>{n.current=!0}),v.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,_x({fromRouteId:t},i)))},[e,t])}function Lt(e){vo(!1)}function tvt(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Jd.Pop,navigator:i,static:a=!1,future:s}=e;qS()&&vo(!1);let l=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:l,navigator:i,static:a,future:_x({v7_relativeSplatPath:!1},s)}),[l,s,i,a]);typeof r=="string"&&(r=ob(r));let{pathname:u="/",search:d="",hash:f="",state:p=null,key:m="default"}=r,g=v.useMemo(()=>{let y=XB(u,l);return y==null?null:{location:{pathname:y,search:d,hash:f,state:p,key:m},navigationType:o}},[l,u,d,f,p,m,o]);return g==null?null:v.createElement(Xh.Provider,{value:c},v.createElement(_k.Provider,{children:n,value:g}))}function nvt(e){let{children:t,location:n}=e;return Hyt(yL(t),n)}new Promise(()=>{});function yL(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,o)=>{if(!v.isValidElement(r))return;let i=[...t,o];if(r.type===v.Fragment){n.push.apply(n,yL(r.props.children,i));return}r.type!==Lt&&vo(!1),!r.props.index||!r.props.children||vo(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=yL(r.props.children,i)),n.push(a)}),n}/** * React Router DOM v6.27.0 * * Copyright (c) Remix Software Inc. @@ -386,47 +386,47 @@ attempted value: ${a} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function wN(){return wN=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function dvt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fvt(e,t){return e.button===0&&(!t||t==="_self")&&!dvt(e)}const pvt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],hvt="6";try{window.__reactRouterVersion=hvt}catch{}const mvt="startTransition",a7=yw[mvt];function JB(e){let{basename:t,children:n,future:r,window:o}=e,i=y.useRef();i.current==null&&(i.current=Syt({window:o,v5Compat:!0}));let a=i.current,[s,l]=y.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},u=y.useCallback(d=>{c&&a7?a7(()=>l(d)):l(d)},[l,c]);return y.useLayoutEffect(()=>a.listen(u),[a,u]),y.createElement(lvt,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const gvt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yvt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vs=y.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,f=uvt(t,pvt),{basename:p}=y.useContext(Xh),m,g=!1;if(typeof c=="string"&&yvt.test(c)&&(m=c,gvt))try{let S=new URL(window.location.href),P=c.startsWith("//")?new URL(S.protocol+c):new URL(c),T=XB(P.pathname,p);P.origin===S.origin&&T!=null?c=T+P.search+P.hash:g=!0}catch{}let v=Kyt(c,{relative:o}),w=vvt(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o,viewTransition:d});function x(S){r&&r(S),S.defaultPrevented||w(S)}return y.createElement("a",wN({},f,{href:m||v,onClick:g||i?r:x,ref:n,target:l}))});var s7;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(s7||(s7={}));var l7;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(l7||(l7={}));function vvt(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,viewTransition:s}=t===void 0?{}:t,l=Qh(),c=Bk(),u=ise(e,{relative:a});return y.useCallback(d=>{if(fvt(d,n)){d.preventDefault();let f=r!==void 0?r:YE(c)===YE(u);l(e,{replace:f,state:o,preventScrollReset:i,relative:a,viewTransition:s})}},[c,l,u,r,o,n,e,i,a,s])}const c7=()=>{var a,s;const e=Jh(),t=e.routineId?parseInt(e.routineId):0,[n,r]=Ge(),o=Xae(t),i=()=>window.location.href=Cn(bn.ROUTINE_ADD_DAY,r.language,{id:t});return C(Mt,{children:C(Vu,{maxWidth:"lg",children:o.isLoading?C(vo,{}):X(Mt,{children:[C(dt,{variant:"caption",children:(a=o.data)==null?void 0:a.description}),C(Ut,{spacing:2,sx:{mt:2},children:(s=o.data)==null?void 0:s.days.map(l=>C(wvt,{day:l},l.id))}),C($n,{textAlign:"center",sx:{mt:4},children:C(yt,{variant:"outlined",onClick:i,children:n("routines.addDay")})})]})})})};function lse(e){var a,s;const[t]=Ge(),n=e.imageHeight||60,r=e.rowHeight||"100px",o=e.iconHeight||40,i=l=>t(l);return X(He,{container:!0,alignItems:"center",justifyContent:"center",sx:{height:r,p:0},children:[C(He,{size:{xs:3,md:2},children:C(vyt,{image:(a=e.setting.base)==null?void 0:a.mainImage,iconSize:o,avatarSize:n})}),C(He,{size:9,children:X(Ut,{spacing:0,children:[C(dt,{variant:"subtitle1",children:(s=e.setting.base)==null?void 0:s.getTranslation().name}),C(dt,{children:e.set.getSettingsTextRepresentation(e.setting.base,i)}),C(dt,{variant:"caption",children:e.set.comment})]})})]})}function bvt(e){const[t,n]=Ge(),[r,o]=K.useState(null),i=!!r,a=u=>{o(u.currentTarget)},s=()=>{o(null)},l=()=>window.location.href=Cn(bn.ROUTINE_EDIT_SET,n.language,{id:e.set.id}),c=()=>window.location.href=Cn(bn.ROUTINE_DELETE_SET,n.language,{id:e.set.id});return X(He,{container:!0,spacing:2,justifyContent:"space-between",alignItems:"flex-start",children:[C(He,{size:11,children:e.set.settingsFiltered.map(u=>C(lse,{setting:u,set:e.set},u.id))}),X(He,{textAlign:"right",size:1,children:[C(kn,{"aria-label":"settings",onClick:a,children:C(GS,{fontSize:"small"})}),X(ss,{id:"basic-menu",anchorEl:r,open:i,onClose:s,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(tn,{onClick:l,children:t("edit")}),C(tn,{onClick:c,children:t("delete")})]})]})]})}const wvt=e=>{const[t,n]=K.useState(null),r=!!t,o=f=>{n(f.currentTarget)},i=()=>{n(null)},[a,s]=Ge(),l=()=>window.location.href=Cn(bn.ROUTINE_EDIT_DAY,s.language,{id:e.day.id}),c=()=>window.location.href=Cn(bn.ROUTINE_ADD_LOG,s.language,{id:e.day.id}),u=()=>window.location.href=Cn(bn.ROUTINE_DELETE_DAY,s.language,{id:e.day.id}),d=()=>window.location.href=Cn(bn.ROUTINE_ADD_SET,s.language,{id:e.day.id});return X(no,{sx:{minWidth:275},children:[C(ec,{sx:{bgcolor:"lightgray"},action:C(kn,{"aria-label":"settings",onClick:o,children:C(GS,{})}),title:e.day.description,subheader:e.day.daysOfWeek.map(f=>IZ[f-1]).join(", ")}),X(ss,{id:"basic-menu",anchorEl:t,open:r,onClose:i,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(tn,{onClick:c,children:a("routines.addWeightLog")}),C(tn,{onClick:l,children:a("edit")}),C(Za,{}),X(tn,{onClick:u,children:[C(YB,{}),a("delete")]})]}),C(bi,{children:C(Ut,{divider:C(Za,{flexItem:!0}),children:e.day.sets.map((f,p)=>C(bvt,{set:f,index:p},f.id))})}),C(as,{children:C(kn,{onClick:d,children:C(Gi,{})})})]})},cse=()=>{const[e,t]=Ge(),n=xyt();return C(Mt,{children:n.isLoading?C(vo,{}):C(Mt,{children:n.data!==null?C(xvt,{routine:n.data}):C(DF,{title:e("routines.routine"),link:Cn(bn.ROUTINE_ADD,t.language)})})})},xvt=e=>{const[t,n]=Ge();return X(no,{children:[C(ec,{title:t("routines.routine"),subheader:e.routine.name??"."}),C(bi,{sx:{height:"510px",overflow:"auto"},children:C(al,{children:e.routine.days.map(r=>C(Svt,{day:r},r.id))})}),C(as,{children:C(yt,{size:"small",href:Cn(bn.ROUTINE_DETAIL,n.language,{id:e.routine.id}),children:t("seeDetails")})})]})},Svt=e=>{const[t,n]=y.useState(!1);return X(Mt,{children:[X(_f,{onClick:()=>n(!t),selected:t,children:[C(zi,{children:t?C(rZ,{}):C(Ov,{})}),C(ho,{primary:e.day.description,secondary:e.day.daysOfWeek.map(o=>IZ[o-1]).join(", ")})]}),C(Gs,{in:t,timeout:"auto",unmountOnExit:!0,children:e.day.sets.map(o=>C("div",{children:o.settingsFiltered.map(i=>C(lse,{setting:i,set:o,imageHeight:45,iconHeight:25,rowHeight:"70px"},i.id))},o.id))})]})};function KS(e="lastWeek"){return yo({queryKey:[_r.BODY_WEIGHT,e],queryFn:()=>L_e(e)})}const Cvt=()=>{const e=Vr();return oo({mutationFn:t=>F_e(t),onSuccess:()=>e.invalidateQueries({queryKey:[_r.BODY_WEIGHT]})})},Pvt=()=>{const e=Vr();return oo({mutationFn:t=>B_e(t),onError:t=>{console.log(t)},onSuccess:()=>e.invalidateQueries({queryKey:[_r.BODY_WEIGHT]})})},Tvt=()=>{const e=Vr();return oo({mutationFn:t=>j_e(t),onSuccess:()=>{e.invalidateQueries({queryKey:[_r.BODY_WEIGHT]})}})},ab=({weightEntry:e,closeFn:t})=>{const n=KS(),r=Pvt(),o=Tvt(),[i,a]=y.useState(e?Ot.fromJSDate(e.date):Ot.now),[s,l]=Ge(),c=fl({weight:la().min(30,"Min weight is 30 kg").max(300,"Max weight is 300 kg").required("Weight field is required")});return n.isLoading?C(vo,{}):C(ul,{initialValues:{weight:e?e.weight:0,date:ei(e?e.date:new Date)},validationSchema:c,onSubmit:async u=>{if(e){e.weight=u.weight,e.date=new Date(u.date);try{o.mutate(e)}catch{}}else{e=new BZ(new Date(u.date),u.weight);try{r.mutate(e)}catch{}}t&&t()},children:u=>C(ls,{children:X(Ut,{spacing:2,children:[C(hn,{fullWidth:!0,id:"weight",label:s("weight"),error:u.touched.weight&&!!u.touched.weight,helperText:u.touched.weight&&u.errors.weight,...u.getFieldProps("weight")}),C(RS,{dateAdapter:Ak,adapterLocale:l.language,children:C(zoe,{format:"yyyy-MM-dd",label:s("date"),value:i,slotProps:{textField:{variant:"outlined"}},disableFuture:!0,onChange:d=>{d&&u.setFieldValue("date",d.toJSDate()),a(d)},shouldDisableDate:d=>e&&ei(e.date)===d.toISODate()?!1:d?n.data.some(f=>ei(f.date)===d.toISODate()):!1})}),C(Ut,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(yt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:s("submit")})})]})})})},Evt=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function Ovt(e={}){const{disableGlobal:t=!1,productionPrefix:n="jss",seed:r=""}=e,o=r===""?"":`${r}-`;let i=0;const a=()=>(i+=1,i);return(s,l)=>{const c=l.options.name;if(c&&c.startsWith("Mui")&&!l.options.link&&!t){if(Evt.includes(s.key))return`Mui-${s.key}`;const u=`${o}${c}-${s.key}`;return!l.options.theme[_Y]||r!==""?u:`${u}-${a()}`}return`${o}${n}${a()}`}}var u7=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},YS=(typeof window>"u"?"undefined":u7(window))==="object"&&(typeof document>"u"?"undefined":u7(document))==="object"&&document.nodeType===9;function Nx(e){"@babel/helpers - typeof";return Nx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nx(e)}function Ivt(e,t){if(Nx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function cv(e){var t=Ivt(e,"string");return Nx(t)=="symbol"?t:t+""}function kvt(e,t){for(var n=0;n<+~=|^:(),"'`\s])/g,f7=typeof CSS<"u"&&CSS.escape,ez=function(e){return f7?f7(e):e.replace(Avt,"\\$1")},dse=function(){function e(n,r,o){this.type="style",this.isProcessed=!1;var i=o.sheet,a=o.Renderer;this.key=n,this.options=o,this.style=r,i?this.renderer=i.renderer:a&&(this.renderer=new a)}var t=e.prototype;return t.prop=function(r,o,i){if(o===void 0)return this.style[r];var a=i?i.force:!1;if(!a&&this.style[r]===o)return this;var s=o;(!i||i.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(o,r,this));var l=s==null||s===!1,c=r in this.style;if(l&&!c&&!a)return this;var u=l&&c;if(u?delete this.style[r]:this.style[r]=s,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,r):this.renderer.setProperty(this.renderable,r,s),this;var d=this.options.sheet;return d&&d.attached,this},e}(),SN=function(e){oS(t,e);function t(r,o,i){var a;a=e.call(this,r,o,i)||this;var s=i.selector,l=i.scoped,c=i.sheet,u=i.generateId;return s?a.selectorText=s:l!==!1&&(a.id=u(H2(H2(a)),c),a.selectorText="."+ez(a.id)),a}var n=t.prototype;return n.applyTo=function(o){var i=this.renderer;if(i){var a=this.toJSON();for(var s in a)i.setProperty(o,s,a[s])}return this},n.toJSON=function(){var o={};for(var i in this.style){var a=this.style[i];typeof a!="object"?o[i]=a:Array.isArray(a)&&(o[i]=nh(a))}return o},n.toString=function(o){var i=this.options.sheet,a=i?i.options.link:!1,s=a?N({},o,{allowEmpty:!0}):o;return Lx(this.selectorText,this.style,s)},use(t,[{key:"selector",set:function(o){if(o!==this.selectorText){this.selectorText=o;var i=this.renderer,a=this.renderable;if(!(!a||!i)){var s=i.setSelector(a,o);s||i.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),t}(dse),$vt={onCreateRule:function(t,n,r){return t[0]==="@"||r.parent&&r.parent.type==="keyframes"?null:new SN(t,n,r)}},oR={indent:1,children:!0},Rvt=/@([\w-]+)/,_vt=function(){function e(n,r,o){this.type="conditional",this.isProcessed=!1,this.key=n;var i=n.match(Rvt);this.at=i?i[1]:"unknown",this.query=o.name||"@"+this.at,this.options=o,this.rules=new zk(N({},o,{parent:this}));for(var a in r)this.rules.add(a,r[a]);this.rules.process()}var t=e.prototype;return t.getRule=function(r){return this.rules.get(r)},t.indexOf=function(r){return this.rules.indexOf(r)},t.addRule=function(r,o,i){var a=this.rules.add(r,o,i);return a?(this.options.jss.plugins.onProcessRule(a),a):null},t.replaceRule=function(r,o,i){var a=this.rules.replace(r,o,i);return a&&this.options.jss.plugins.onProcessRule(a),a},t.toString=function(r){r===void 0&&(r=oR);var o=sb(r),i=o.linebreak;if(r.indent==null&&(r.indent=oR.indent),r.children==null&&(r.children=oR.children),r.children===!1)return this.query+" {}";var a=this.rules.toString(r);return a?this.query+" {"+i+a+i+"}":""},e}(),Dvt=/@container|@media|@supports\s+/,Nvt={onCreateRule:function(t,n,r){return Dvt.test(t)?new _vt(t,n,r):null}},iR={indent:1,children:!0},Lvt=/@keyframes\s+([\w-]+)/,CN=function(){function e(n,r,o){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var i=n.match(Lvt);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=o;var a=o.scoped,s=o.sheet,l=o.generateId;this.id=a===!1?this.name:ez(l(this,s)),this.rules=new zk(N({},o,{parent:this}));for(var c in r)this.rules.add(c,r[c],N({},o,{parent:this}));this.rules.process()}var t=e.prototype;return t.toString=function(r){r===void 0&&(r=iR);var o=sb(r),i=o.linebreak;if(r.indent==null&&(r.indent=iR.indent),r.children==null&&(r.children=iR.children),r.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(r);return a&&(a=""+i+a+i),this.at+" "+this.id+" {"+a+"}"},e}(),Fvt=/@keyframes\s+/,jvt=/\$([\w-]+)/g,PN=function(t,n){return typeof t=="string"?t.replace(jvt,function(r,o){return o in n?n[o]:r}):t},p7=function(t,n,r){var o=t[n],i=PN(o,r);i!==o&&(t[n]=i)},Bvt={onCreateRule:function(t,n,r){return typeof t=="string"&&Fvt.test(t)?new CN(t,n,r):null},onProcessStyle:function(t,n,r){return n.type!=="style"||!r||("animation-name"in t&&p7(t,"animation-name",r.keyframes),"animation"in t&&p7(t,"animation",r.keyframes)),t},onChangeValue:function(t,n,r){var o=r.options.sheet;if(!o)return t;switch(n){case"animation":return PN(t,o.keyframes);case"animation-name":return PN(t,o.keyframes);default:return t}}},zvt=function(e){oS(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.toString=function(o){var i=this.options.sheet,a=i?i.options.link:!1,s=a?N({},o,{allowEmpty:!0}):o;return Lx(this.key,this.style,s)},t}(dse),Vvt={onCreateRule:function(t,n,r){return r.parent&&r.parent.type==="keyframes"?new zvt(t,n,r):null}},Hvt=function(){function e(n,r,o){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=r,this.options=o}var t=e.prototype;return t.toString=function(r){var o=sb(r),i=o.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s=this.index){o.push(r);return}for(var a=0;ai){o.splice(a,0,r);return}}},t.reset=function(){this.registry=[]},t.remove=function(r){var o=this.registry.indexOf(r);this.registry.splice(o,1)},t.toString=function(r){for(var o=r===void 0?{}:r,i=o.attached,a=Ue(o,["attached"]),s=sb(a),l=s.linebreak,c="",u=0;u-1?o.substr(0,i-1):o;t.style.setProperty(n,a,i>-1?"important":"")}}catch{return!1}return!0},nbt=function(t,n){try{t.attributeStyleMap?t.attributeStyleMap.delete(n):t.style.removeProperty(n)}catch{}},rbt=function(t,n){return t.selectorText=n,t.selectorText===n},hse=pse(function(){return document.querySelector("head")});function obt(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}function ibt(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}function abt(e){for(var t=hse(),n=0;n0){var n=obt(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=ibt(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&typeof r=="string"){var o=abt(r);if(o)return{parent:o.parentNode,node:o.nextSibling}}return!1}function lbt(e,t){var n=t.insertionPoint,r=sbt(t);if(r!==!1&&r.parent){r.parent.insertBefore(e,r.node);return}if(n&&typeof n.nodeType=="number"){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling);return}hse().appendChild(e)}var cbt=pse(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),v7=function(t,n,r){try{"insertRule"in t?t.insertRule(n,r):"appendRule"in t&&t.appendRule(n)}catch{return!1}return t.cssRules[r]},b7=function(t,n){var r=t.cssRules.length;return n===void 0||n>r?r:n},ubt=function(){var t=document.createElement("style");return t.textContent=` -`,t},dbt=function(){function e(n){this.getPropertyValue=ebt,this.setProperty=tbt,this.removeProperty=nbt,this.setSelector=rbt,this.hasInsertedRules=!1,this.cssRules=[],n&&pw.add(n),this.sheet=n;var r=this.sheet?this.sheet.options:{},o=r.media,i=r.meta,a=r.element;this.element=a||ubt(),this.element.setAttribute("data-jss",""),o&&this.element.setAttribute("media",o),i&&this.element.setAttribute("data-meta",i);var s=cbt();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){if(!(this.element.parentNode||!this.sheet)){lbt(this.element,this.sheet.options);var r=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&r&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var r=this.element.parentNode;r&&r.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=` + */function vL(){return vL=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function ovt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ivt(e,t){return e.button===0&&(!t||t==="_self")&&!ovt(e)}const avt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],svt="6";try{window.__reactRouterVersion=svt}catch{}const lvt="startTransition",s7=yw[lvt];function JB(e){let{basename:t,children:n,future:r,window:o}=e,i=v.useRef();i.current==null&&(i.current=myt({window:o,v5Compat:!0}));let a=i.current,[s,l]=v.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},u=v.useCallback(d=>{c&&s7?s7(()=>l(d)):l(d)},[l,c]);return v.useLayoutEffect(()=>a.listen(u),[a,u]),v.createElement(tvt,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const cvt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",uvt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zs=v.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,f=rvt(t,avt),{basename:p}=v.useContext(Xh),m,g=!1;if(typeof c=="string"&&uvt.test(c)&&(m=c,cvt))try{let S=new URL(window.location.href),P=c.startsWith("//")?new URL(S.protocol+c):new URL(c),E=XB(P.pathname,p);P.origin===S.origin&&E!=null?c=E+P.search+P.hash:g=!0}catch{}let y=zyt(c,{relative:o}),b=dvt(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o,viewTransition:d});function x(S){r&&r(S),S.defaultPrevented||b(S)}return v.createElement("a",vL({},f,{href:m||y,onClick:g||i?r:x,ref:n,target:l}))});var l7;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(l7||(l7={}));var c7;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(c7||(c7={}));function dvt(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,viewTransition:s}=t===void 0?{}:t,l=Qh(),c=Lk(),u=rse(e,{relative:a});return v.useCallback(d=>{if(ivt(d,n)){d.preventDefault();let f=r!==void 0?r:WT(c)===WT(u);l(e,{replace:f,state:o,preventScrollReset:i,relative:a,viewTransition:s})}},[c,l,u,r,o,n,e,i,a,s])}const u7=()=>{var a,s;const e=Jh(),t=e.routineId?parseInt(e.routineId):0,[n,r]=qe(),o=Kae(t),i=()=>window.location.href=Pn(wn.ROUTINE_ADD_DAY,r.language,{id:t});return C(Mt,{children:C(Vu,{maxWidth:"lg",children:o.isLoading?C(bo,{}):X(Mt,{children:[C(ut,{variant:"caption",children:(a=o.data)==null?void 0:a.description}),C(Gt,{spacing:2,sx:{mt:2},children:(s=o.data)==null?void 0:s.days.map(l=>C(pvt,{day:l},l.id))}),C(Ln,{textAlign:"center",sx:{mt:4},children:C(yt,{variant:"outlined",onClick:i,children:n("routines.addDay")})})]})})})};function ase(e){var a,s;const[t]=qe(),n=e.imageHeight||60,r=e.rowHeight||"100px",o=e.iconHeight||40,i=l=>t(l);return X(Fe,{container:!0,alignItems:"center",justifyContent:"center",sx:{height:r,p:0},children:[C(Fe,{size:{xs:3,md:2},children:C(dyt,{image:(a=e.setting.base)==null?void 0:a.mainImage,iconSize:o,avatarSize:n})}),C(Fe,{size:9,children:X(Gt,{spacing:0,children:[C(ut,{variant:"subtitle1",children:(s=e.setting.base)==null?void 0:s.getTranslation().name}),C(ut,{children:e.set.getSettingsTextRepresentation(e.setting.base,i)}),C(ut,{variant:"caption",children:e.set.comment})]})})]})}function fvt(e){const[t,n]=qe(),[r,o]=Y.useState(null),i=!!r,a=u=>{o(u.currentTarget)},s=()=>{o(null)},l=()=>window.location.href=Pn(wn.ROUTINE_EDIT_SET,n.language,{id:e.set.id}),c=()=>window.location.href=Pn(wn.ROUTINE_DELETE_SET,n.language,{id:e.set.id});return X(Fe,{container:!0,spacing:2,justifyContent:"space-between",alignItems:"flex-start",children:[C(Fe,{size:11,children:e.set.settingsFiltered.map(u=>C(ase,{setting:u,set:e.set},u.id))}),X(Fe,{textAlign:"right",size:1,children:[C(An,{"aria-label":"settings",onClick:a,children:C(GS,{fontSize:"small"})}),X(is,{id:"basic-menu",anchorEl:r,open:i,onClose:s,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(tn,{onClick:l,children:t("edit")}),C(tn,{onClick:c,children:t("delete")})]})]})]})}const pvt=e=>{const[t,n]=Y.useState(null),r=!!t,o=f=>{n(f.currentTarget)},i=()=>{n(null)},[a,s]=qe(),l=()=>window.location.href=Pn(wn.ROUTINE_EDIT_DAY,s.language,{id:e.day.id}),c=()=>window.location.href=Pn(wn.ROUTINE_ADD_LOG,s.language,{id:e.day.id}),u=()=>window.location.href=Pn(wn.ROUTINE_DELETE_DAY,s.language,{id:e.day.id}),d=()=>window.location.href=Pn(wn.ROUTINE_ADD_SET,s.language,{id:e.day.id});return X(io,{sx:{minWidth:275},children:[C(Zl,{sx:{bgcolor:"lightgray"},action:C(An,{"aria-label":"settings",onClick:o,children:C(GS,{})}),title:e.day.description,subheader:e.day.daysOfWeek.map(f=>PZ[f-1]).join(", ")}),X(is,{id:"basic-menu",anchorEl:t,open:r,onClose:i,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(tn,{onClick:c,children:a("routines.addWeightLog")}),C(tn,{onClick:l,children:a("edit")}),C(Qa,{}),X(tn,{onClick:u,children:[C(YB,{}),a("delete")]})]}),C(wi,{children:C(Gt,{divider:C(Qa,{flexItem:!0}),children:e.day.sets.map((f,p)=>C(fvt,{set:f,index:p},f.id))})}),C(os,{children:C(An,{onClick:d,children:C(Gi,{})})})]})},sse=()=>{const[e,t]=qe(),n=hyt();return C(Mt,{children:n.isLoading?C(bo,{}):C(Mt,{children:n.data!==null?C(hvt,{routine:n.data}):C(DF,{title:e("routines.routine"),link:Pn(wn.ROUTINE_ADD,t.language)})})})},hvt=e=>{const[t,n]=qe();return X(io,{children:[C(Zl,{title:t("routines.routine"),subheader:e.routine.name??"."}),C(wi,{sx:{height:"510px",overflow:"auto"},children:C(ol,{children:e.routine.days.map(r=>C(mvt,{day:r},r.id))})}),C(os,{children:C(yt,{size:"small",href:Pn(wn.ROUTINE_DETAIL,n.language,{id:e.routine.id}),children:t("seeDetails")})})]})},mvt=e=>{const[t,n]=v.useState(!1);return X(Mt,{children:[X(Df,{onClick:()=>n(!t),selected:t,children:[C(zi,{children:t?C(ZJ,{}):C(Tv,{})}),C(go,{primary:e.day.description,secondary:e.day.daysOfWeek.map(o=>PZ[o-1]).join(", ")})]}),C(Ws,{in:t,timeout:"auto",unmountOnExit:!0,children:e.day.sets.map(o=>C("div",{children:o.settingsFiltered.map(i=>C(ase,{setting:i,set:o,imageHeight:45,iconHeight:25,rowHeight:"70px"},i.id))},o.id))})]})};function KS(e="lastWeek"){return oo({queryKey:[En.BODY_WEIGHT,e],queryFn:()=>ODe(e)})}const gvt=()=>{const e=gr();return $r({mutationFn:t=>IDe(t),onSuccess:()=>e.invalidateQueries({queryKey:[En.BODY_WEIGHT]})})},yvt=()=>{const e=gr();return $r({mutationFn:t=>MDe(t),onError:t=>{console.log(t)},onSuccess:()=>e.invalidateQueries({queryKey:[En.BODY_WEIGHT]})})},vvt=()=>{const e=gr();return $r({mutationFn:t=>kDe(t),onSuccess:()=>{e.invalidateQueries({queryKey:[En.BODY_WEIGHT]})}})},ib=({weightEntry:e,closeFn:t})=>{const n=KS(),r=yvt(),o=vvt(),[i,a]=v.useState(e?It.fromJSDate(e.date):It.now),[s,l]=qe(),c=dl({weight:sa().min(30,"Min weight is 30 kg").max(300,"Max weight is 300 kg").required("Weight field is required")});return n.isLoading?C(bo,{}):C(cl,{initialValues:{weight:e?e.weight:0,date:ni(e?e.date:new Date)},validationSchema:c,onSubmit:async u=>{if(e){e.weight=u.weight,e.date=new Date(u.date);try{o.mutate(e)}catch{}}else{e=new LZ(new Date(u.date),u.weight);try{r.mutate(e)}catch{}}t&&t()},children:u=>C(as,{children:X(Gt,{spacing:2,children:[C(gn,{fullWidth:!0,id:"weight",label:s("weight"),error:u.touched.weight&&!!u.touched.weight,helperText:u.touched.weight&&u.errors.weight,...u.getFieldProps("weight")}),C(RS,{dateAdapter:Ok,adapterLocale:l.language,children:C(joe,{format:"yyyy-MM-dd",label:s("date"),value:i,slotProps:{textField:{variant:"outlined"}},disableFuture:!0,onChange:d=>{d&&u.setFieldValue("date",d.toJSDate()),a(d)},shouldDisableDate:d=>e&&ni(e.date)===d.toISODate()?!1:d?n.data.some(f=>ni(f.date)===d.toISODate()):!1})}),C(Gt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(yt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:s("submit")})})]})})})},bvt=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function wvt(e={}){const{disableGlobal:t=!1,productionPrefix:n="jss",seed:r=""}=e,o=r===""?"":`${r}-`;let i=0;const a=()=>(i+=1,i);return(s,l)=>{const c=l.options.name;if(c&&c.startsWith("Mui")&&!l.options.link&&!t){if(bvt.includes(s.key))return`Mui-${s.key}`;const u=`${o}${c}-${s.key}`;return!l.options.theme[MY]||r!==""?u:`${u}-${a()}`}return`${o}${n}${a()}`}}var d7=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},YS=(typeof window>"u"?"undefined":d7(window))==="object"&&(typeof document>"u"?"undefined":d7(document))==="object"&&document.nodeType===9;function Lx(e){"@babel/helpers - typeof";return Lx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lx(e)}function xvt(e,t){if(Lx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function sv(e){var t=xvt(e,"string");return Lx(t)=="symbol"?t:t+""}function Svt(e,t){for(var n=0;n<+~=|^:(),"'`\s])/g,p7=typeof CSS<"u"&&CSS.escape,ez=function(e){return p7?p7(e):e.replace(Pvt,"\\$1")},cse=function(){function e(n,r,o){this.type="style",this.isProcessed=!1;var i=o.sheet,a=o.Renderer;this.key=n,this.options=o,this.style=r,i?this.renderer=i.renderer:a&&(this.renderer=new a)}var t=e.prototype;return t.prop=function(r,o,i){if(o===void 0)return this.style[r];var a=i?i.force:!1;if(!a&&this.style[r]===o)return this;var s=o;(!i||i.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(o,r,this));var l=s==null||s===!1,c=r in this.style;if(l&&!c&&!a)return this;var u=l&&c;if(u?delete this.style[r]:this.style[r]=s,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,r):this.renderer.setProperty(this.renderable,r,s),this;var d=this.options.sheet;return d&&d.attached,this},e}(),wL=function(e){oS(t,e);function t(r,o,i){var a;a=e.call(this,r,o,i)||this;var s=i.selector,l=i.scoped,c=i.sheet,u=i.generateId;return s?a.selectorText=s:l!==!1&&(a.id=u(z2(z2(a)),c),a.selectorText="."+ez(a.id)),a}var n=t.prototype;return n.applyTo=function(o){var i=this.renderer;if(i){var a=this.toJSON();for(var s in a)i.setProperty(o,s,a[s])}return this},n.toJSON=function(){var o={};for(var i in this.style){var a=this.style[i];typeof a!="object"?o[i]=a:Array.isArray(a)&&(o[i]=rh(a))}return o},n.toString=function(o){var i=this.options.sheet,a=i?i.options.link:!1,s=a?D({},o,{allowEmpty:!0}):o;return Nx(this.selectorText,this.style,s)},lse(t,[{key:"selector",set:function(o){if(o!==this.selectorText){this.selectorText=o;var i=this.renderer,a=this.renderable;if(!(!a||!i)){var s=i.setSelector(a,o);s||i.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),t}(cse),Evt={onCreateRule:function(t,n,r){return t[0]==="@"||r.parent&&r.parent.type==="keyframes"?null:new wL(t,n,r)}},tR={indent:1,children:!0},Tvt=/@([\w-]+)/,Ovt=function(){function e(n,r,o){this.type="conditional",this.isProcessed=!1,this.key=n;var i=n.match(Tvt);this.at=i?i[1]:"unknown",this.query=o.name||"@"+this.at,this.options=o,this.rules=new Nk(D({},o,{parent:this}));for(var a in r)this.rules.add(a,r[a]);this.rules.process()}var t=e.prototype;return t.getRule=function(r){return this.rules.get(r)},t.indexOf=function(r){return this.rules.indexOf(r)},t.addRule=function(r,o,i){var a=this.rules.add(r,o,i);return a?(this.options.jss.plugins.onProcessRule(a),a):null},t.replaceRule=function(r,o,i){var a=this.rules.replace(r,o,i);return a&&this.options.jss.plugins.onProcessRule(a),a},t.toString=function(r){r===void 0&&(r=tR);var o=ab(r),i=o.linebreak;if(r.indent==null&&(r.indent=tR.indent),r.children==null&&(r.children=tR.children),r.children===!1)return this.query+" {}";var a=this.rules.toString(r);return a?this.query+" {"+i+a+i+"}":""},e}(),Ivt=/@container|@media|@supports\s+/,kvt={onCreateRule:function(t,n,r){return Ivt.test(t)?new Ovt(t,n,r):null}},nR={indent:1,children:!0},Mvt=/@keyframes\s+([\w-]+)/,xL=function(){function e(n,r,o){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var i=n.match(Mvt);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=o;var a=o.scoped,s=o.sheet,l=o.generateId;this.id=a===!1?this.name:ez(l(this,s)),this.rules=new Nk(D({},o,{parent:this}));for(var c in r)this.rules.add(c,r[c],D({},o,{parent:this}));this.rules.process()}var t=e.prototype;return t.toString=function(r){r===void 0&&(r=nR);var o=ab(r),i=o.linebreak;if(r.indent==null&&(r.indent=nR.indent),r.children==null&&(r.children=nR.children),r.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(r);return a&&(a=""+i+a+i),this.at+" "+this.id+" {"+a+"}"},e}(),Avt=/@keyframes\s+/,$vt=/\$([\w-]+)/g,SL=function(t,n){return typeof t=="string"?t.replace($vt,function(r,o){return o in n?n[o]:r}):t},h7=function(t,n,r){var o=t[n],i=SL(o,r);i!==o&&(t[n]=i)},Rvt={onCreateRule:function(t,n,r){return typeof t=="string"&&Avt.test(t)?new xL(t,n,r):null},onProcessStyle:function(t,n,r){return n.type!=="style"||!r||("animation-name"in t&&h7(t,"animation-name",r.keyframes),"animation"in t&&h7(t,"animation",r.keyframes)),t},onChangeValue:function(t,n,r){var o=r.options.sheet;if(!o)return t;switch(n){case"animation":return SL(t,o.keyframes);case"animation-name":return SL(t,o.keyframes);default:return t}}},Dvt=function(e){oS(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.toString=function(o){var i=this.options.sheet,a=i?i.options.link:!1,s=a?D({},o,{allowEmpty:!0}):o;return Nx(this.key,this.style,s)},t}(cse),_vt={onCreateRule:function(t,n,r){return r.parent&&r.parent.type==="keyframes"?new Dvt(t,n,r):null}},Lvt=function(){function e(n,r,o){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=r,this.options=o}var t=e.prototype;return t.toString=function(r){var o=ab(r),i=o.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s=this.index){o.push(r);return}for(var a=0;ai){o.splice(a,0,r);return}}},t.reset=function(){this.registry=[]},t.remove=function(r){var o=this.registry.indexOf(r);this.registry.splice(o,1)},t.toString=function(r){for(var o=r===void 0?{}:r,i=o.attached,a=Ue(o,["attached"]),s=ab(a),l=s.linebreak,c="",u=0;u-1?o.substr(0,i-1):o;t.style.setProperty(n,a,i>-1?"important":"")}}catch{return!1}return!0},Yvt=function(t,n){try{t.attributeStyleMap?t.attributeStyleMap.delete(n):t.style.removeProperty(n)}catch{}},Xvt=function(t,n){return t.selectorText=n,t.selectorText===n},fse=dse(function(){return document.querySelector("head")});function Qvt(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}function Jvt(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}function Zvt(e){for(var t=fse(),n=0;n0){var n=Qvt(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=Jvt(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&typeof r=="string"){var o=Zvt(r);if(o)return{parent:o.parentNode,node:o.nextSibling}}return!1}function tbt(e,t){var n=t.insertionPoint,r=ebt(t);if(r!==!1&&r.parent){r.parent.insertBefore(e,r.node);return}if(n&&typeof n.nodeType=="number"){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling);return}fse().appendChild(e)}var nbt=dse(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),b7=function(t,n,r){try{"insertRule"in t?t.insertRule(n,r):"appendRule"in t&&t.appendRule(n)}catch{return!1}return t.cssRules[r]},w7=function(t,n){var r=t.cssRules.length;return n===void 0||n>r?r:n},rbt=function(){var t=document.createElement("style");return t.textContent=` +`,t},obt=function(){function e(n){this.getPropertyValue=qvt,this.setProperty=Kvt,this.removeProperty=Yvt,this.setSelector=Xvt,this.hasInsertedRules=!1,this.cssRules=[],n&&pw.add(n),this.sheet=n;var r=this.sheet?this.sheet.options:{},o=r.media,i=r.meta,a=r.element;this.element=a||rbt(),this.element.setAttribute("data-jss",""),o&&this.element.setAttribute("media",o),i&&this.element.setAttribute("data-meta",i);var s=nbt();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){if(!(this.element.parentNode||!this.sheet)){tbt(this.element,this.sheet.options);var r=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&r&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var r=this.element.parentNode;r&&r.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=` `)}},t.deploy=function(){var r=this.sheet;if(r){if(r.options.link){this.insertRules(r.rules);return}this.element.textContent=` `+r.toString()+` -`}},t.insertRules=function(r,o){for(var i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n-1){var i=Cse[t];if(!Array.isArray(i))return an.js+Cf(i)in n?an.css+i:!1;if(!o)return!1;for(var a=0;ar?1:-1:n.length-r.length};return{onProcessStyle:function(n,r){if(r.type!=="style")return n;for(var o={},i=Object.keys(n).sort(e),a=0;a"u"?null:d0t(),f0t()]}}function Tse(e={}){const{baseClasses:t,newClasses:n,Component:r}=e;if(!n)return t;const o={...t};return Object.keys(n).forEach(i=>{n[i]&&(o[i]=`${t[i]} ${n[i]}`)}),o}const Eg={set:(e,t,n,r)=>{let o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}};function h0t(){const e=XO();return(e==null?void 0:e.$$material)??e}const m0t=mse(p0t()),g0t=Ovt(),y0t=new Map,v0t={disableGeneration:!1,generateClassName:g0t,jss:m0t,sheetsCache:null,sheetsManager:y0t,sheetsRegistry:null},b0t=y.createContext(v0t);let C7=-1e9;function w0t(){return C7+=1,C7}function P7(e){return e.length===0}function x0t(e){const{variant:t,...n}=e;let r=t||"";return Object.keys(n).sort().forEach(o=>{o==="color"?r+=P7(r)?e[o]:Se(e[o]):r+=`${P7(r)?o:Se(o)}${Se(e[o].toString())}`}),r}const S0t={};function C0t(e){const t=typeof e=="function";return{create:(n,r)=>{let o;try{o=t?e(n):e}catch(l){throw l}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return o;const i=n.components[r].styleOverrides||{},a=n.components[r].variants||[],s={...o};return Object.keys(i).forEach(l=>{s[l]=po(s[l]||{},i[l])}),a.forEach(l=>{const c=x0t(l.props);s[c]=po(s[c]||{},l.style)}),s},options:{}}}function P0t({state:e,stylesOptions:t},n,r){if(t.disableGeneration)return n||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let o=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,o=!0),n!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=n,o=!0),o&&(e.cacheClasses.value=Tse({baseClasses:e.cacheClasses.lastJSS,newClasses:n,Component:r})),e.cacheClasses.value}function T0t({state:e,theme:t,stylesOptions:n,stylesCreator:r,name:o},i){if(n.disableGeneration)return;let a=Eg.get(n.sheetsManager,r,t);a||(a={refs:0,staticSheet:null,dynamicStyles:null},Eg.set(n.sheetsManager,r,t,a));const s={...r.options,...n,theme:t,flip:typeof n.flip=="boolean"?n.flip:t.direction==="rtl"};s.generateId=s.serverGenerateClassName||s.generateClassName;const l=n.sheetsRegistry;if(a.refs===0){let c;n.sheetsCache&&(c=Eg.get(n.sheetsCache,r,t));const u=r.create(t,o);c||(c=n.jss.createStyleSheet(u,{link:!1,...s}),c.attach(),n.sheetsCache&&Eg.set(n.sheetsCache,r,t,c)),l&&l.add(c),a.staticSheet=c,a.dynamicStyles=gse(u)}if(a.dynamicStyles){const c=n.jss.createStyleSheet(a.dynamicStyles,{link:!0,...s});c.update(i),c.attach(),e.dynamicSheet=c,e.classes=Tse({baseClasses:a.staticSheet.classes,newClasses:c.classes}),l&&l.add(c)}else e.classes=a.staticSheet.classes;a.refs+=1}function E0t({state:e},t){e.dynamicSheet&&e.dynamicSheet.update(t)}function O0t({state:e,theme:t,stylesOptions:n,stylesCreator:r}){if(n.disableGeneration)return;const o=Eg.get(n.sheetsManager,r,t);o.refs-=1;const i=n.sheetsRegistry;o.refs===0&&(Eg.delete(n.sheetsManager,r,t),n.jss.removeStyleSheet(o.staticSheet),i&&i.remove(o.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),i&&i.remove(e.dynamicSheet))}function I0t(e,t){const n=y.useRef([]);let r;const o=y.useMemo(()=>({}),t);n.current!==o&&(n.current=o,r=e()),y.useEffect(()=>()=>{r&&r()},[o])}function Ese(e,t={}){const{name:n,classNamePrefix:r,Component:o,defaultTheme:i=S0t,...a}=t,s=C0t(e),l=n||r||"makeStyles";return s.options={index:w0t(),name:n,meta:l,classNamePrefix:l},(u={})=>{const d=h0t()||i,f={...y.useContext(b0t),...a},p=y.useRef(),m=y.useRef();return I0t(()=>{const v={name:n,state:{},stylesCreator:s,stylesOptions:f,theme:d};return T0t(v,u),m.current=!1,p.current=v,()=>{O0t(v)}},[d,s]),y.useEffect(()=>{m.current&&E0t(p.current,u),m.current=!0}),P0t(p.current,u.classes,o)}}const k0t=Ese(e=>({table:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),M0t=({weights:e})=>{const[t]=Ge(),n=k0t(),o=e.slice(0,5);return C("div",{className:n.table,children:C(Gu,{children:X(Uu,{size:"small",children:[C(Dh,{children:X(Yt,{children:[C(Ie,{align:"center",children:t("date")}),C(Ie,{align:"center",children:t("weight")})]})}),C(Wu,{children:o.map(i=>X(Yt,{children:[C(Ie,{align:"center",children:i.date.toLocaleDateString()}),C(Ie,{align:"center",children:i.weight})]},i.date.toLocaleDateString()))})]})})})},A0t=({active:e,payload:t,label:n})=>{const[r,o]=Ge();return e&&t&&t.length?X(io,{style:{padding:8},children:[C("p",{children:C("strong",{children:new Date(n).toLocaleDateString(o.language)})}),X("p",{children:[r("weight"),": ",t[0].value]})]}):null},Ose=({weights:e,height:t})=>{t=t||300;const r=ko(),[o,i]=Ge(),[a,s]=K.useState(!1),[l,c]=K.useState(),u=()=>s(!1),d=[...e].sort((p,m)=>p.date.getTime()-m.date.getTime()).map(p=>({date:p.date.getTime(),weight:p.weight,entry:p}));function f(p,m){c(m.payload.entry),s(!0)}return X("div",{children:[l&&C(Yi,{title:o("edit"),isOpen:a,closeFn:u,children:C(ab,{weightEntry:l})}),C(Lf,{height:t,children:X(Kre,{data:d,children:[C(Yv,{type:"monotone",dataKey:"weight",stroke:r.palette.secondary.main,strokeWidth:2,dot:d.length>30?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6,onClick:f}}),C(jh,{stroke:"#ccc",strokeDasharray:"5 5"}),C(ll,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:p=>new Date(p).toLocaleDateString(i.language)}),C(cl,{domain:["auto","auto"]}),C(Fa,{content:C(A0t,{})})]})})]})},Ise=()=>{var n,r;const[e]=Ge(),t=KS("lastYear");return C(Mt,{children:t.isLoading?C(vo,{}):C(Mt,{children:((n=t.data)==null?void 0:n.length)!==void 0&&((r=t.data)==null?void 0:r.length)>0?C($0t,{entries:t.data}):C(DF,{title:e("weight"),modalContent:C(ab,{})})})})},$0t=e=>{const[t,n]=K.useState(!1),r=()=>n(!0),o=()=>n(!1),[i,a]=Ge();return X(Mt,{children:[X(no,{children:[C(ec,{title:i("weight"),subheader:"."}),X(bi,{sx:{height:"500px",overflow:"auto"},children:[C(Ose,{weights:e.entries,height:200}),C($n,{sx:{mt:2},children:C(M0t,{weights:e.entries})})]}),X(as,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[C(yt,{size:"small",href:Cn(bn.WEIGHT_OVERVIEW,a.language),children:i("seeDetails")}),C(Ql,{title:i("addEntry"),children:C(kn,{onClick:r,children:C(Gi,{})})})]})]}),C(Yi,{title:i("add"),isOpen:t,closeFn:o,children:C(ab,{closeFn:o})})]})},R0t=()=>{const[e,t]=Ge();return C($B,{callback:r=>{r!==null&&(window.location.href=Cn(bn.INGREDIENT_DETAIL,t.language,{id:r.data.id}))}})},_0t=()=>C("div",{children:"About Page"});function rz(e){const[t]=Ge(),[n,r,o]=dl(e.fieldName);return C(Yl,{multiple:!0,freeSolo:!0,id:e.fieldName,value:n.value,options:n.value,onChange:(i,a)=>{o.setValue(a)},renderTags:(i,a)=>i.map((s,l)=>C(hh,{label:s,...a({index:l})})),onBlur:n.onBlur,renderInput:i=>C(hn,{...i,id:"exerciseAliases",variant:"standard",label:t("exercises.alternativeNames"),error:r.touched&&!!r.error,helperText:r.touched&&r.error,value:n.value})})}function D0t(e){const[t]=Ge(),[n,r,o]=dl(e.fieldName);return C(Yl,{multiple:!0,id:e.fieldName,options:e.options.map(i=>i.id),getOptionLabel:i=>t(Wi(e.options.find(a=>a.id===i).name)),...n,onChange:(i,a)=>{o.setValue(a)},renderInput:i=>C(hn,{variant:"standard",label:t("exercises.equipment"),value:n.value,...i})})}function oz(e){const[t]=Ge(),[n,r]=dl(e.fieldName);return C(hn,{fullWidth:!0,id:e.fieldName,label:t("name"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function N0t(e){const[t]=Ge(),[n,r]=dl(e.fieldName);return X(Tv,{fullWidth:!0,children:[C(Ev,{id:"label-category",children:t("category")}),C(_h,{labelId:"label-category",id:"category",label:t("category"),error:r.touched&&!!r.error,...n,children:e.options}),r.touched&&!!r.error&&C(fS,{error:!0,children:r.error})]})}const kse=5,Mse=40,iz=e=>Lc().min(kse,e("forms.valueTooShort")).max(Mse,e("forms.valueTooLong")).required(e("forms.fieldRequired")),az=e=>GB().ensure().compact().of(Lc().min(kse,e("forms.valueTooShort")).max(Mse,e("forms.valueTooLong"))),sz=e=>Lc().min(40,e("forms.valueTooShort")).required(e("forms.fieldRequired")),Ase=e=>GB().ensure().compact().of(Lc().min(15,e("forms.valueTooShort"))),L0t=e=>la().required(e("forms.fieldRequired"));function $se(){return yo({queryKey:[F2e],queryFn:rDe})}function Vk(){return yo({queryKey:[V2e],queryFn:J_e})}function XS(){return yo({queryKey:[U2e],queryFn:G_e})}function Hk(){return yo({queryKey:[H2e],queryFn:Y_e})}function Uk(){return yo({queryKey:[z2e],queryFn:dDe})}const Th=({primaryMuscles:e,secondaryMuscles:t,isFront:n})=>{const r=[];r.push(...e.filter(i=>i.isFront===n).map(i=>`/muscles/main/muscle-${i.id}.svg`)),r.push(...t.filter(i=>i.isFront===n).map(i=>`/muscles/secondary/muscle-${i.id}.svg`)),r.push(n?"/muscles/muscular_system_front.svg":"/muscles/muscular_system_back.svg");const o=r.map(i=>`url(${I2e}${i})`).join(", ");return C("div",{style:{height:"400px",width:"200px",backgroundImage:o,backgroundRepeat:"no-repeat"}})};var Rse=(e=>(e[e.SET_NOTIFICATION=0]="SET_NOTIFICATION",e))(Rse||{}),Rn=(e=>(e[e.RESET=0]="RESET",e[e.SET_NAME_EN=1]="SET_NAME_EN",e[e.SET_ALIASES_EN=2]="SET_ALIASES_EN",e[e.SET_DESCRIPTION_EN=3]="SET_DESCRIPTION_EN",e[e.SET_NOTES_EN=4]="SET_NOTES_EN",e[e.SET_CATEGORY=5]="SET_CATEGORY",e[e.SET_EQUIPMENT=6]="SET_EQUIPMENT",e[e.SET_PRIMARY_MUSCLES=7]="SET_PRIMARY_MUSCLES",e[e.SET_MUSCLES_SECONDARY=8]="SET_MUSCLES_SECONDARY",e[e.SET_VARIATION_ID=9]="SET_VARIATION_ID",e[e.SET_NEW_VARIATION_BASE_ID=10]="SET_NEW_VARIATION_BASE_ID",e[e.SET_LANGUAGE=11]="SET_LANGUAGE",e[e.SET_NAME_I18N=12]="SET_NAME_I18N",e[e.SET_ALIASES_I18N=13]="SET_ALIASES_I18N",e[e.SET_DESCRIPTION_I18N=14]="SET_DESCRIPTION_I18N",e[e.SET_NOTES_I18N=15]="SET_NOTES_I18N",e[e.SET_IMAGES=16]="SET_IMAGES",e))(Rn||{});const T7=e=>({type:Rse.SET_NOTIFICATION,payload:e}),E7={notification:{notify:!1,message:"",severity:void 0,title:"",type:void 0}},F0t=y.createContext([E7,()=>E7]),j0t=()=>y.useContext(F0t),B0t=e=>({type:Rn.SET_NAME_EN,payload:e}),z0t=e=>({type:Rn.SET_DESCRIPTION_EN,payload:e}),V0t=e=>({type:Rn.SET_NOTES_EN,payload:e}),H0t=e=>({type:Rn.SET_ALIASES_EN,payload:e}),U0t=e=>({type:Rn.SET_NAME_I18N,payload:e}),W0t=e=>({type:Rn.SET_DESCRIPTION_I18N,payload:e}),G0t=e=>({type:Rn.SET_NOTES_I18N,payload:e}),q0t=e=>({type:Rn.SET_ALIASES_I18N,payload:e}),K0t=e=>({type:Rn.SET_CATEGORY,payload:e}),Y0t=e=>({type:Rn.SET_EQUIPMENT,payload:e}),X0t=e=>({type:Rn.SET_PRIMARY_MUSCLES,payload:e}),Q0t=e=>({type:Rn.SET_MUSCLES_SECONDARY,payload:e}),J0t=e=>({type:Rn.SET_VARIATION_ID,payload:e}),Z0t=e=>({type:Rn.SET_NEW_VARIATION_BASE_ID,payload:e}),ewt=e=>({type:Rn.SET_LANGUAGE,payload:e}),twt=e=>({type:Rn.SET_IMAGES,payload:e}),nwt=(e,t)=>{if(t===void 0)return e;switch(t.type){case Rn.RESET:return JE;case Rn.SET_NAME_EN:return{...e,nameEn:t.payload};case Rn.SET_DESCRIPTION_EN:return{...e,descriptionEn:t.payload};case Rn.SET_NOTES_EN:return{...e,notesEn:t.payload};case Rn.SET_ALIASES_EN:return{...e,alternativeNamesEn:t.payload};case Rn.SET_CATEGORY:return{...e,category:t.payload};case Rn.SET_EQUIPMENT:return{...e,equipment:t.payload};case Rn.SET_PRIMARY_MUSCLES:return{...e,muscles:t.payload};case Rn.SET_MUSCLES_SECONDARY:return{...e,musclesSecondary:t.payload};case Rn.SET_VARIATION_ID:return{...e,variationId:t.payload};case Rn.SET_NEW_VARIATION_BASE_ID:return{...e,newVariationBaseId:t.payload};case Rn.SET_LANGUAGE:return{...e,languageId:t.payload};case Rn.SET_NAME_I18N:return{...e,nameI18n:t.payload};case Rn.SET_DESCRIPTION_I18N:return{...e,descriptionI18n:t.payload};case Rn.SET_NOTES_I18N:return{...e,notesI18n:t.payload};case Rn.SET_ALIASES_I18N:return{...e,alternativeNamesI18n:t.payload};case Rn.SET_IMAGES:return{...e,images:t.payload};default:return e}},JE={category:null,muscles:[],musclesSecondary:[],variationId:null,newVariationBaseId:null,languageId:null,equipment:[],nameEn:"",descriptionEn:"",alternativeNamesEn:[],notesEn:[],nameI18n:"",alternativeNamesI18n:[],descriptionI18n:"",notesI18n:[],images:[]},_se=y.createContext([JE,()=>JE]),rwt=({children:e})=>{const[t,n]=y.useReducer(nwt,JE);return C(_se.Provider,{value:[t,n],children:e})},lb=()=>y.useContext(_se),owt=({onContinue:e})=>{const[t]=Ge(),[n,r]=lb(),[o,i]=y.useState(n.muscles),[a,s]=y.useState(n.musclesSecondary);y.useEffect(()=>{r(X0t(o))},[r,o]),y.useEffect(()=>{r(Q0t(a))},[r,a]);const l=Vk(),c=XS(),u=Hk(),d=fl({nameEn:iz(t),newAlternativeNameEn:az(t),category:L0t(t)});return C(ul,{initialValues:{nameEn:n.nameEn,newAlternativeNameEn:n.alternativeNamesEn,category:n.category!==null?n.category:"",muscles:n.muscles,equipment:n.equipment,musclesSecondary:n.musclesSecondary},validationSchema:d,onSubmit:f=>{r(B0t(f.nameEn)),r(K0t(f.category)),r(H0t(f.newAlternativeNameEn)),r(Y0t(f.equipment)),e()},children:f=>X(ls,{children:[X(Ut,{spacing:2,children:[C(oz,{fieldName:"nameEn"}),C(rz,{fieldName:"newAlternativeNameEn"}),l.isLoading?X($n,{children:[" ",C(qa,{})," "]}):C(N0t,{fieldName:"category",options:l.data.map(p=>C(tn,{value:p.id,children:t(Wi(p.name))},p.id))}),u.isLoading?X($n,{children:[" ",C(qa,{})," "]}):C(D0t,{fieldName:"equipment",options:u.data}),c.isLoading?X($n,{children:[" ",C(qa,{})," "]}):X(Mt,{children:[C(Yl,{multiple:!0,id:"muscles",options:c.data.map(p=>p.id),getOptionDisabled:p=>a.includes(p),getOptionLabel:p=>c.data.find(m=>m.id===p).getName(t),value:o,onChange:(p,m)=>{i(m)},renderInput:p=>C(hn,{...p,variant:"standard",label:t("exercises.muscles"),value:f.getFieldProps("muscles").value,onChange:m=>{f.setFieldValue(f.getFieldProps("muscles").name,m.target.value)}})}),C(Yl,{multiple:!0,id:"secondary-muscles",options:c.data.map(p=>p.id),getOptionDisabled:p=>o.includes(p),getOptionLabel:p=>c.data.find(m=>m.id===p).getName(t),value:a,onChange:(p,m)=>{s(m)},renderInput:p=>C(hn,{...p,variant:"standard",label:t("exercises.secondaryMuscles"),value:f.getFieldProps("muscles").value})})]}),X(He,{container:!0,children:[C(He,{display:"flex",justifyContent:"center",size:6,children:C(Th,{primaryMuscles:o.map(p=>c.data.find(m=>m.id===p)),secondaryMuscles:a.map(p=>c.data.find(m=>m.id===p)),isFront:!0})}),C(He,{display:"flex",justifyContent:"center",size:6,children:C(Th,{primaryMuscles:o.map(p=>c.data.find(m=>m.id===p)),secondaryMuscles:a.map(p=>c.data.find(m=>m.id===p)),isFront:!1})})]})]}),C(He,{container:!0,children:C(He,{display:"flex",justifyContent:"end",size:12,children:C($n,{sx:{mb:2},children:C("div",{children:C(yt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:t("continue")})})})})})]})})};function iwt(e,t){const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o);i?i.push(r):n.set(o,[r])}),n}const O7=({exercises:e})=>{const r=e[0].variationId,o=e[0].id,[i,a]=lb(),[s,l]=y.useState(!1),[c,u]=y.useState(i.variationId),[d,f]=y.useState(i.newVariationBaseId);y.useEffect(()=>{a(J0t(c))},[a,c]),y.useEffect(()=>{a(Z0t(d))},[a,d]);const p=(g,v)=>()=>{g!==null?(v=null,g===i.variationId&&(g=null)):(g=null,v===i.newVariationBaseId&&(v=null)),u(g),f(v)};let m;return r===null?m=i.newVariationBaseId===o:m=r===i.variationId,C(es,{disableGutters:!0,children:C(_f,{onClick:p(r,o),children:X(He,{container:!0,children:[C(He,{display:"flex",justifyContent:"start",alignItems:"center",size:{xs:12,sm:3},children:C(ITe,{max:4,spacing:"small",children:e.map(g=>g.mainImage?C(Xl,{src:g.mainImage.url},g.id):C(Xl,{children:C(Ju,{})},g.id))})}),X(He,{size:{xs:10,sm:7},children:[e.slice(0,s?e.length:5).map(g=>C("p",{style:{margin:0},children:g.getTranslation().name},g.id)),!s&&e.length>5?C(Ov,{onMouseEnter:()=>l(!0)}):null]}),C(He,{display:"flex",justifyContent:"end",size:{xs:2,sm:2},children:C(Hu,{edge:"start",checked:m,tabIndex:-1,disableRipple:!0},`variation-${r}`)}),C(He,{size:12,children:C(Za,{sx:{pt:1}})})]})})})},awt=({onContinue:e,onBack:t})=>{const[n]=Ge(),r=$se(),[o,i]=y.useState("");let a=[],s=new Map;return r.isSuccess&&(a=r.data,o!==""&&(a=a.filter(l=>l.getTranslation().name.toLowerCase().includes(o.toLowerCase())))),s=iwt(a.filter(l=>l.variationId!==null),l=>l.variationId),X(Mt,{children:[X(He,{container:!0,children:[C(He,{size:{xs:12,sm:6},children:C(dt,{children:n("exercises.whatVariationsExist")})}),C(He,{display:"flex",justifyContent:"end",size:{xs:12,sm:6},children:C(hn,{label:n("exercises.filterVariations"),variant:"standard",onChange:l=>i(l.target.value),InputProps:{startAdornment:C(so,{position:"start",children:C(AB,{})})}})})]}),r.isLoading?C(vo,{}):C(io,{elevation:2,sx:{mt:2},children:X(al,{style:{maxHeight:"400px",overflowY:"scroll"},children:[a.filter(l=>l.variationId===null).map(l=>C(O7,{exercises:[l]},"base-"+l.id)),[...s.keys()].map(l=>C(O7,{exercises:s.get(l)},"variation-"+l))]})}),X(Bu,{severity:"info",variant:"filled",sx:{mt:2},children:[C(PT,{children:n("exercises.identicalExercise")}),n("exercises.identicalExercisePleaseDiscard")]}),C(He,{container:!0,children:C(He,{display:"flex",justifyContent:"end",size:12,children:C($n,{sx:{mb:2},children:X("div",{children:[C(yt,{disabled:!1,onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(yt,{variant:"contained",onClick:e,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})};class swt{constructor(t,n,r,o,i,a,s){this.username=t,this.email=n,this.emailVerified=r,this.dateJoined=o,this.isTrustworthy=i,this.useMetric=a,this.height=s}}class lwt{constructor(){dn(this,"fromJson",t=>new swt(t.username,t.email,t.email_verified,new Date(t.date_joined),t.is_trustworthy,t.weight_unit==="kg",t.height));dn(this,"toJson",t=>({email:t.email,height:t.height,weight_unit:t.useMetric?"kg":"lb"}))}}const cwt="userprofile",uwt=async()=>{const e=Ct(cwt),t=new lwt;try{const n=await ft.get(e,{headers:It()});return t.fromJson(n.data)}catch{return null}};function Uc(){return yo({queryKey:[G2e],queryFn:uwt})}function dwt(e){const{t}=Ge(),[n,r]=K.useState(e.initial.toString()),o=Vk(),i=Uc(),a=async s=>{r(s.target.value),await QF(e.exerciseId,{category:parseInt(s.target.value),license_author:i.data.username})};return o.isSuccess?X(Tv,{fullWidth:!0,children:[C(Ev,{id:"label-category",children:t("category")}),C(_h,{labelId:"label-category",id:"category",label:t("category"),value:n,onChange:a,children:o.data.map(s=>C(tn,{value:s.id,children:t(Wi(s.name))},s.id))})]}):null}function fwt(e){const{t}=Ge(),[n,r]=K.useState(e.initial),o=Hk(),i=Uc(),a=async s=>{r(s),await QF(e.exerciseId,{equipment:s,license_author:i.data.username})};return o.isSuccess?C(Yl,{multiple:!0,value:n,options:o.data.map(s=>s.id),getOptionLabel:s=>t(Wi(o.data.find(l=>l.id===s).name)),onChange:(s,l)=>a(l),renderInput:s=>C(hn,{variant:"standard",label:t("exercises.equipment"),value:n,...s})}):null}var zo=function(){return zo=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0)return e.getRangeAt(0).startContainer.parentNode||void 0}function k7(e){return e?e.replace(/ |\u202F|\u00A0/g," ").replace(/
/g,"
"):""}function hwt(e){var t=document.createTextNode("");e.appendChild(t);var n=document.activeElement===e;if(t!==null&&t.nodeValue!==null&&n){var r=window.getSelection();if(r!==null){var o=document.createRange();o.setStart(t,t.nodeValue.length),o.collapse(!0),r.removeAllRanges(),r.addRange(o)}e instanceof HTMLElement&&e.focus()}}function Nse(e,t){typeof t=="function"?t(e):typeof t=="object"&&t&&(t.current=e)}var mwt=K.memo(K.forwardRef(function(t,n){var r=t.className,o=t.disabled,i=t.tagName,a=t.value,s=a===void 0?"":a,l=t.placeholder,c=Wk(t,["className","disabled","tagName","value","placeholder"]),u=K.useRef(),d=K.useRef(s),f=K.useRef(c);return K.useEffect(function(){f.current=c;var p=u.current;p&&k7(d.current)!==k7(s)&&(d.current=s,p.innerHTML=s,hwt(p))}),K.useMemo(function(){function p(v){u.current=v,I7(v),Nse(v,n)}function m(v){var w,x,S=u.current;if(S){var P=S.innerHTML;P!==d.current&&((x=(w=f.current).onChange)===null||x===void 0||x.call(w,zo(zo({},v),{target:{value:P,name:c.name}}))),I7(S),d.current=P}}var g=Dse("rsw-ce",r);return K.createElement(i||"div",zo(zo({},c),{className:g,contentEditable:!o,dangerouslySetInnerHTML:{__html:s},onBlur:function(v){return(f.current.onBlur||m)(v)},onInput:m,onKeyDown:function(v){return(f.current.onKeyDown||m)(v)},onKeyUp:function(v){return(f.current.onKeyUp||m)(v)},placeholder:l,ref:p}))},[r,o,l,i])})),Lse=K.createContext(void 0);function Fse(e){var t=e.children,n=K.useState({htmlMode:!1,update:i}),r=n[0],o=n[1];function i(a){o(function(s){return zo(zo({},s),a)})}return K.createElement(Lse.Provider,{value:r},t)}function QS(){var e=K.useContext(Lse);if(!e)throw new Error("You should wrap your component by EditorProvider");return e}var M7=[],d0=[];function gwt(e,t){if(e&&typeof document<"u"){var n,r=t.prepend===!0?"prepend":"append",o=t.singleTag===!0,i=typeof t.container=="string"?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(o){var a=M7.indexOf(i);a===-1&&(a=M7.push(i)-1,d0[a]={}),n=d0[a]&&d0[a][r]?d0[a][r]:d0[a][r]=s()}else n=s();e.charCodeAt(0)===65279&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function s(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),t.attributes)for(var c=Object.keys(t.attributes),u=0;u")}function Og(){var e=QS();return e.htmlMode?null:K.createElement("div",{className:"rsw-separator"})}function qse(e){return K.createElement("div",zo({},e,{className:"rsw-toolbar"}))}K.forwardRef(function(t,n){return K.createElement(Fse,null,K.createElement(jse,zo({},t,{ref:n}),K.createElement(qse,null,K.createElement(Gse,null),K.createElement(Use,null),K.createElement(Og,null),K.createElement(Bse,null),K.createElement(Vse,null),K.createElement(Wse,null),K.createElement(xwt,null),K.createElement(Og,null),K.createElement(Hse,null),K.createElement(zse,null),K.createElement(Og,null),K.createElement(Swt,null),K.createElement(wwt,null),K.createElement(Ewt,null),K.createElement(Og,null),K.createElement(Cwt,null))))});function Owt(e){return C(Fse,{children:C(jse,{...e,children:X(qse,{children:[C(Bse,{}),C(Vse,{}),C(Wse,{}),C(Og,{}),C(zse,{}),C(Hse,{}),C(Og,{}),C(Gse,{}),C(Use,{})]})})})}function lz(e){const[t,n,r]=dl(e.fieldName);return X(Mt,{children:[C("div",{"data-testid":"jodit-editor",children:C(Owt,{value:t.value,onChange:o=>r.setValue(o.target.value)})}),n.touched&&!!n.error&&C(fS,{error:!0,children:n.error})]})}const Iwt=({image:e,canDelete:t})=>{const[n]=Ge();return X(no,{children:[C(Dc,{component:"img",image:e.url,sx:{height:120},alt:""}),C(as,{children:t&&C(yt,{color:"primary",onClick:()=>fDe(e.id),children:n("delete")})})]})},kwt=({exerciseId:e})=>{const[t]=Ge(),n=Uc(),r=async o=>{var a;if(!((a=o.target.files)!=null&&a.length))return;const[i]=o.target.files;n.isSuccess&&await QZ({exerciseId:e,image:i,imageData:{url:"",file:i,author:"",authorUrl:"",title:"",objectUrl:"",derivativeSourceUrl:"",style:""}})};return X(no,{children:[C(Dc,{children:C($n,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:C(Uae,{sx:{fontSize:80,color:"gray"}})})}),C(as,{children:X(yt,{component:"label",children:[t("add"),C("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:r})]})})]})};function A7(e){const{t}=Ge(),n=XS(),r=async o=>{e.setValue(o),await QF(e.exerciseId,e.isMain?{muscles:o}:{muscles_secondary:o})};return n.isSuccess?C(Yl,{multiple:!0,options:n.data.map(o=>o.id),getOptionDisabled:o=>e.blocked.includes(o),getOptionLabel:o=>n.data.find(i=>i.id===o).getName(t),value:e.value,onChange:(o,i)=>r(i),renderInput:o=>C(hn,{...o,variant:"standard",label:t(e.isMain?"exercises.muscles":"exercises.secondaryMuscles"),value:e.value})}):null}const Mwt=({video:e,canDelete:t})=>{const[n]=Ge();return X(no,{children:[C(Dc,{component:"video",src:e.url,sx:{height:120},controls:!0,preload:"metadata"}),C(as,{children:t&&C(yt,{color:"primary",onClick:()=>mDe(e.id),children:n("delete")})})]})},Awt=({exerciseId:e})=>{const[t]=Ge(),n=Uc(),r=async o=>{var a;if(!((a=o.target.files)!=null&&a.length))return;const[i]=o.target.files;n.isSuccess&&await hDe(e,n.data.username,i)};return X(no,{children:[C(Dc,{children:C($n,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:C(Uae,{sx:{fontSize:80,color:"gray"}})})}),C(as,{children:X(yt,{component:"label",children:[t("add"),C("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"video/*",capture:"environment",onChange:r})]})})]})},$wt="check-permission",Rwt=async e=>{const t=Ct($wt,{query:{permission:e}}),n=await ft.get(t,{headers:It()});return n.status===400?!1:n.data.result};function Qg(e){return yo({queryKey:[W2e,e],queryFn:()=>Rwt(e.valueOf())})}var rh=(e=>(e.EDIT_EXERCISE="exercises.change_exercise",e.DELETE_EXERCISE="exercises.delete_exercise",e.EDIT_IMAGE="exercises.change_exerciseimage",e.DELETE_IMAGE="exercises.delete_exerciseimage",e.EDIT_VIDEO="exercises.change_exercisevideo",e.DELETE_VIDEO="exercises.delete_exercisevideo",e))(rh||{});const _wt=({exercise:e,language:t})=>{const[n]=Ge(),[r,o]=K.useState(!1),[i,a]=K.useState(e.muscles.map(S=>S.id)),[s,l]=K.useState(e.musclesSecondary.map(S=>S.id)),c=e.getTranslation(t),d=t.id!==c.language?new GZ(null,null,"","",t.id):c,f=e.getTranslation(),p=Qg(rh.DELETE_IMAGE),m=Qg(rh.DELETE_VIDEO),g=Qg(rh.EDIT_EXERCISE),v=XS(),w=Uc(),x=fl({name:iz(n),alternativeNames:az(n),description:sz(n)});return X(Mt,{children:[C(ul,{initialValues:{name:d.name,alternativeNames:d.aliases.map(S=>S.alias),description:d.description},enableReinitialize:!0,validationSchema:x,onSubmit:async S=>{const P=d.id?await lDe(d.id,e.id,d.language,S.name,S.description):await m_(e.id,t.id,S.name,S.description,w.data.username),T=d.aliases.map(A=>A.alias),E=S.alternativeNames,O=E.filter(A=>!T.includes(A));let k=T.filter(A=>!E.includes(A));O.forEach(A=>{y_(P.id,A)}),k.forEach(A=>{pDe(d.aliases.find(I=>I.alias===A).id)}),o(!0)},children:C(ls,{children:X(He,{container:!0,children:[r&&X(He,{size:12,children:[C(Bu,{severity:"success",action:C(kn,{"aria-label":"close",size:"small",color:"inherit",onClick:()=>{o(!1)},children:C(gS,{fontSize:"inherit"})}),children:n("exercises.successfullyUpdated")}),C(Qo,{})]}),C(He,{size:6,children:C(dt,{variant:"h5",children:n("English")})}),C(He,{size:6,children:X(dt,{variant:"h5",children:[t.nameLong," (",t.nameShort,")"]})}),X(He,{size:12,children:[C(Qo,{}),C(dt,{variant:"h6",children:n("name")})]}),X(He,{size:6,children:[f.name,C("ul",{children:f.aliases.map(S=>C("li",{children:S.alias},S.id))})]}),X(He,{size:6,children:[C($n,{mb:2,children:C(oz,{fieldName:"name"})}),C(rz,{fieldName:"alternativeNames"})]}),C(He,{size:12,children:C(Qo,{})}),C(He,{size:12,children:C(dt,{variant:"h6",children:n("exercises.description")})}),C(He,{size:{xs:12,md:6},children:C("div",{dangerouslySetInnerHTML:{__html:f.description}})}),C(He,{size:{xs:12,md:6},children:C(lz,{fieldName:"description"})}),X(He,{size:12,children:[C(Qo,{}),C(yt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("save")})]})]})})}),C(Qo,{}),C(dt,{variant:"h5",children:n("exercises.basics")}),p.isSuccess&&X(Mt,{children:[C(Qo,{}),C(dt,{variant:"h6",children:n("images")}),X(He,{container:!0,spacing:2,mt:2,children:[C(He,{size:{md:3},children:C(kwt,{exerciseId:e.id})},"add"),e.images.map(S=>C(He,{size:{md:3},children:C(Iwt,{image:S,canDelete:p.data})},S.id))]})]}),m.isSuccess&&X(Mt,{children:[C(Qo,{}),C(dt,{variant:"h6",children:n("videos")}),X(He,{container:!0,spacing:2,mt:2,children:[m.data&&C(He,{size:{md:3},children:C(Awt,{exerciseId:e.id})},"add"),e.videos.map(S=>C(He,{size:{md:3},children:C(Mwt,{video:S,canDelete:m.data})},S.id))]})]}),g.isSuccess&&g.data&&v.isSuccess&&X(Mt,{children:[C(Qo,{}),C(dwt,{exerciseId:e.id,initial:e.category.id}),C(fwt,{exerciseId:e.id,initial:e.equipment.map(S=>S.id)}),X(He,{container:!0,mt:1,children:[X(He,{size:{sm:7},children:[C(A7,{exerciseId:e.id,value:i,setValue:a,blocked:s,isMain:!0}),C(A7,{exerciseId:e.id,value:s,setValue:l,blocked:i,isMain:!1})]}),C(He,{size:{sm:5},children:X(He,{container:!0,children:[C(He,{display:"flex",justifyContent:"center",size:6,children:C(Th,{primaryMuscles:i.map(S=>v.data.find(P=>P.id===S)),secondaryMuscles:s.map(S=>v.data.find(P=>P.id===S)),isFront:!0})}),C(He,{display:"flex",justifyContent:"center",size:6,children:C(Th,{primaryMuscles:i.map(S=>v.data.find(P=>P.id===S)),secondaryMuscles:s.map(S=>v.data.find(P=>P.id===S)),isFront:!1})})]})})]})]})]})},Dwt=e=>{const t=e.backgroundColor||"lightgray",n=e.iconColor||"gray",r=e.height||200;return C($n,{sx:{backgroundColor:t,height:r},display:"flex",alignItems:"center",justifyContent:"center",children:C(Ju,{sx:{fontSize:80,color:n}})})},Kse=({exercise:e,language:t})=>{const n=t?e.getTranslation(t):e.getTranslation(new zF(vh,"en","English")),[r,o]=Ge();return C(no,{sx:{width:"100%"},children:X(iEe,{href:Cn(bn.EXERCISE_DETAIL,o.language,{id:e.id,slug:n.nameSlug}),sx:{minHeight:330},children:[e.mainImage?C(Dc,{component:"img",image:e.mainImage.url,sx:{height:200},alt:""}):C(Dc,{children:C(Dwt,{})}),X(bi,{children:[C(Ql,{title:n.name,placement:"top",arrow:!0,children:C(dt,{gutterBottom:!0,variant:"h6",component:"div",noWrap:!0,children:n.name})}),C(hh,{label:r(Wi(e.category.name)),sx:{position:"absolute",top:8,left:8},color:"primary",size:"small"},e.category.id),e.equipment.map(i=>C(dt,{display:"inline",mr:1,children:r(Wi(i.name))},i.id)),e.equipment.length===0&&C(dt,{color:"text.secondary",display:"inline",mr:1,children:r("exercises.noEquipment")})]})]})},e.id)},Nwt=({mainImage:e,sideImages:t})=>X(He,{container:!0,spacing:1,children:[e&&C(He,{size:12,children:C(no,{children:C(Dc,{component:"img",image:e.url,alt:""})})}),t.map(n=>C(He,{size:6,children:C(no,{children:C(Dc,{component:"img",image:n.url,sx:{height:120},alt:""})})},n.id))]}),Lwt=({videos:e})=>C(He,{container:!0,spacing:1,children:e.map(t=>C(He,{size:6,children:C(no,{children:C(Dc,{component:"video",src:t.url,sx:{height:120},controls:!0,muted:!0,preload:"metadata"})})},t.id))});function cz(){var r,o;const e=Uc(),t=Qg(rh.EDIT_EXERCISE),n={canContribute:!1,anonymous:!0,emailVerified:!1,admin:!1};if(e.isSuccess&&t.isSuccess){if(e.data===null)return n;n.anonymous=!1,(r=e.data)!=null&&r.emailVerified&&(n.emailVerified=!0),t.data&&(n.admin=!0),(n.admin||(o=e.data)!=null&&o.isTrustworthy)&&(n.canContribute=!0)}return n}const Fwt=({setEditMode:e})=>{const[t]=Ge();return X($n,{mb:2,paddingY:2,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[C(dt,{variant:"h5",children:t("exercises.exerciseNotTranslated")}),C(dt,{gutterBottom:!0,variant:"body1",component:"div",children:t("exercises.exerciseNotTranslatedBody")}),C(yt,{variant:"contained",onClick:()=>e(!0),children:t("exercises.translateExerciseNow")})]})},jwt=({exercise:e,variations:t,language:n,setEditMode:r})=>{var l;const[o]=Ge(),i=cz(),a=e.getTranslation(n),s=n&&n.id!==a.language;return X(He,{container:!0,children:[s&&i.canContribute&&C(He,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:12},children:C(Fwt,{setEditMode:r})}),X(He,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:8},children:[(a==null?void 0:a.aliases.length)>0&&X(Mt,{children:[X("p",{children:[o("exercises.alsoKnownAs"),"  ",(l=a==null?void 0:a.aliases)==null?void 0:l.map(c=>c.alias).join(", ")]}),C(Qo,{})]}),C(dt,{variant:"h5",children:o("exercises.description")}),C("div",{dangerouslySetInnerHTML:{__html:a==null?void 0:a.description}}),C(Qo,{}),(a==null?void 0:a.notes.length)>0&&C(dt,{variant:"h5",children:o("exercises.notes")}),C("ul",{children:a==null?void 0:a.notes.map(c=>C("li",{children:c.note},c.id))}),C(Qo,{}),C(dt,{variant:"h5",children:o("exercises.muscles")}),X(He,{container:!0,children:[C(He,{order:{xs:1},size:{xs:6,md:3},children:C(Th,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!0})}),X(He,{order:{xs:2,md:3},size:{xs:6,md:3},children:[C("h3",{children:o("exercises.primaryMuscles")}),C("ul",{children:e.muscles.map(c=>C("li",{children:c.getName(o)},c.id))})]}),C(He,{order:{xs:3,md:2},size:{xs:6,md:3},children:C(Th,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!1})}),X(He,{order:{xs:4},size:{xs:6,md:3},children:[C("h3",{children:o("exercises.secondaryMuscles")}),C("ul",{children:e.musclesSecondary.map(c=>C("li",{children:c.getName(o)},c.id))})]})]}),C(Qo,{})]}),X(He,{order:{xs:1,sm:2},size:{xs:12,sm:5,md:4},children:[C(Nwt,{mainImage:e.mainImage,sideImages:e.sideImages}),C(Qo,{}),C(Lwt,{videos:e.videos})]}),X(He,{order:{xs:3},size:12,children:[C(Za,{}),C(Qo,{}),t.length>0&&C(dt,{variant:"h5",children:o("exercises.variations")}),C(He,{container:!0,spacing:2,children:t.map(c=>C(He,{size:{xs:6,md:2},children:C(Kse,{exercise:c,language:n},c.id)},c.id))})]}),C(He,{order:{xs:4},size:12,children:X(dt,{variant:"caption",display:"block",mt:2,children:["The text on this page is available under the ",C("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/deed",children:"CC BY-SA 4 License"}),"."]})})]})};var ZE={exports:{}};/** + */pse();var mse=Date.now(),rR="fnValues"+mse,oR="fnStyle"+ ++mse,sbt=function(){return{onCreateRule:function(n,r,o){if(typeof r!="function")return null;var i=ZB(n,{},o);return i[oR]=r,i},onProcessStyle:function(n,r){if(rR in r||oR in r)return n;var o={};for(var i in n){var a=n[i];typeof a=="function"&&(delete n[i],o[i]=a)}return r[rR]=o,n},onUpdate:function(n,r,o,i){var a=r,s=a[oR];s&&(a.style=s(n)||{});var l=a[rR];if(l)for(var c in l)a.prop(c,l[c](n),i)}}},hf="@global",EL="@global ",lbt=function(){function e(n,r,o){this.type="global",this.at=hf,this.isProcessed=!1,this.key=n,this.options=o,this.rules=new Nk(D({},o,{parent:this}));for(var i in r)this.rules.add(i,r[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(r){return this.rules.get(r)},t.addRule=function(r,o,i){var a=this.rules.add(r,o,i);return a&&this.options.jss.plugins.onProcessRule(a),a},t.replaceRule=function(r,o,i){var a=this.rules.replace(r,o,i);return a&&this.options.jss.plugins.onProcessRule(a),a},t.indexOf=function(r){return this.rules.indexOf(r)},t.toString=function(r){return this.rules.toString(r)},e}(),cbt=function(){function e(n,r,o){this.type="global",this.at=hf,this.isProcessed=!1,this.key=n,this.options=o;var i=n.substr(EL.length);this.rule=o.jss.createRule(i,r,D({},o,{parent:this}))}var t=e.prototype;return t.toString=function(r){return this.rule?this.rule.toString(r):""},e}(),ubt=/\s*,\s*/g;function gse(e,t){for(var n=e.split(ubt),r="",o=0;oe.length)&&(t=e.length);for(var n=0,r=Array(t);n-1){var i=xse[t];if(!Array.isArray(i))return an.js+Cf(i)in n?an.css+i:!1;if(!o)return!1;for(var a=0;ar?1:-1:n.length-r.length};return{onProcessStyle:function(n,r){if(r.type!=="style")return n;for(var o={},i=Object.keys(n).sort(e),a=0;a"u"?null:o0t(),i0t()]}}function Cse(e={}){const{baseClasses:t,newClasses:n,Component:r}=e;if(!n)return t;const o={...t};return Object.keys(n).forEach(i=>{n[i]&&(o[i]=`${t[i]} ${n[i]}`)}),o}const Tg={set:(e,t,n,r)=>{let o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}};function s0t(){const e=LO();return(e==null?void 0:e.$$material)??e}const l0t=pse(a0t()),c0t=wvt(),u0t=new Map,d0t={disableGeneration:!1,generateClassName:c0t,jss:l0t,sheetsCache:null,sheetsManager:u0t,sheetsRegistry:null},f0t=v.createContext(d0t);let P7=-1e9;function p0t(){return P7+=1,P7}function E7(e){return e.length===0}function h0t(e){const{variant:t,...n}=e;let r=t||"";return Object.keys(n).sort().forEach(o=>{o==="color"?r+=E7(r)?e[o]:Se(e[o]):r+=`${E7(r)?o:Se(o)}${Se(e[o].toString())}`}),r}const m0t={};function g0t(e){const t=typeof e=="function";return{create:(n,r)=>{let o;try{o=t?e(n):e}catch(l){throw l}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return o;const i=n.components[r].styleOverrides||{},a=n.components[r].variants||[],s={...o};return Object.keys(i).forEach(l=>{s[l]=mo(s[l]||{},i[l])}),a.forEach(l=>{const c=h0t(l.props);s[c]=mo(s[c]||{},l.style)}),s},options:{}}}function y0t({state:e,stylesOptions:t},n,r){if(t.disableGeneration)return n||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let o=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,o=!0),n!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=n,o=!0),o&&(e.cacheClasses.value=Cse({baseClasses:e.cacheClasses.lastJSS,newClasses:n,Component:r})),e.cacheClasses.value}function v0t({state:e,theme:t,stylesOptions:n,stylesCreator:r,name:o},i){if(n.disableGeneration)return;let a=Tg.get(n.sheetsManager,r,t);a||(a={refs:0,staticSheet:null,dynamicStyles:null},Tg.set(n.sheetsManager,r,t,a));const s={...r.options,...n,theme:t,flip:typeof n.flip=="boolean"?n.flip:t.direction==="rtl"};s.generateId=s.serverGenerateClassName||s.generateClassName;const l=n.sheetsRegistry;if(a.refs===0){let c;n.sheetsCache&&(c=Tg.get(n.sheetsCache,r,t));const u=r.create(t,o);c||(c=n.jss.createStyleSheet(u,{link:!1,...s}),c.attach(),n.sheetsCache&&Tg.set(n.sheetsCache,r,t,c)),l&&l.add(c),a.staticSheet=c,a.dynamicStyles=hse(u)}if(a.dynamicStyles){const c=n.jss.createStyleSheet(a.dynamicStyles,{link:!0,...s});c.update(i),c.attach(),e.dynamicSheet=c,e.classes=Cse({baseClasses:a.staticSheet.classes,newClasses:c.classes}),l&&l.add(c)}else e.classes=a.staticSheet.classes;a.refs+=1}function b0t({state:e},t){e.dynamicSheet&&e.dynamicSheet.update(t)}function w0t({state:e,theme:t,stylesOptions:n,stylesCreator:r}){if(n.disableGeneration)return;const o=Tg.get(n.sheetsManager,r,t);o.refs-=1;const i=n.sheetsRegistry;o.refs===0&&(Tg.delete(n.sheetsManager,r,t),n.jss.removeStyleSheet(o.staticSheet),i&&i.remove(o.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),i&&i.remove(e.dynamicSheet))}function x0t(e,t){const n=v.useRef([]);let r;const o=v.useMemo(()=>({}),t);n.current!==o&&(n.current=o,r=e()),v.useEffect(()=>()=>{r&&r()},[o])}function Pse(e,t={}){const{name:n,classNamePrefix:r,Component:o,defaultTheme:i=m0t,...a}=t,s=g0t(e),l=n||r||"makeStyles";return s.options={index:p0t(),name:n,meta:l,classNamePrefix:l},(u={})=>{const d=s0t()||i,f={...v.useContext(f0t),...a},p=v.useRef(),m=v.useRef();return x0t(()=>{const y={name:n,state:{},stylesCreator:s,stylesOptions:f,theme:d};return v0t(y,u),m.current=!1,p.current=y,()=>{w0t(y)}},[d,s]),v.useEffect(()=>{m.current&&b0t(p.current,u),m.current=!0}),y0t(p.current,u.classes,o)}}const S0t=Pse(e=>({table:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),C0t=({weights:e})=>{const[t]=qe(),n=S0t(),o=e.slice(0,5);return C("div",{className:n.table,children:C(Gu,{children:X(Uu,{size:"small",children:[C(_h,{children:X(Yt,{children:[C(Ie,{align:"center",children:t("date")}),C(Ie,{align:"center",children:t("weight")})]})}),C(Wu,{children:o.map(i=>X(Yt,{children:[C(Ie,{align:"center",children:i.date.toLocaleDateString()}),C(Ie,{align:"center",children:i.weight})]},i.date.toLocaleDateString()))})]})})})},P0t=({active:e,payload:t,label:n})=>{const[r,o]=qe();return e&&t&&t.length?X(so,{style:{padding:8},children:[C("p",{children:C("strong",{children:new Date(n).toLocaleDateString(o.language)})}),X("p",{children:[r("weight"),": ",t[0].value]})]}):null},Ese=({weights:e,height:t})=>{t=t||300;const r=Ao(),[o,i]=qe(),[a,s]=Y.useState(!1),[l,c]=Y.useState(),u=()=>s(!1),d=[...e].sort((p,m)=>p.date.getTime()-m.date.getTime()).map(p=>({date:p.date.getTime(),weight:p.weight,entry:p}));function f(p,m){c(m.payload.entry),s(!0)}return X("div",{children:[l&&C(Yi,{title:o("edit"),isOpen:a,closeFn:u,children:C(ib,{weightEntry:l})}),C(Nf,{height:t,children:X(Gre,{data:d,children:[C(Kv,{type:"monotone",dataKey:"weight",stroke:r.palette.secondary.main,strokeWidth:2,dot:d.length>30?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6,onClick:f}}),C(jh,{stroke:"#ccc",strokeDasharray:"5 5"}),C(sl,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:p=>new Date(p).toLocaleDateString(i.language)}),C(ll,{domain:["auto","auto"]}),C(ja,{content:C(P0t,{})})]})})]})},Tse=()=>{var n,r;const[e]=qe(),t=KS("lastYear");return C(Mt,{children:t.isLoading?C(bo,{}):C(Mt,{children:((n=t.data)==null?void 0:n.length)!==void 0&&((r=t.data)==null?void 0:r.length)>0?C(E0t,{entries:t.data}):C(DF,{title:e("weight"),modalContent:C(ib,{})})})})},E0t=e=>{const[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1),[i,a]=qe();return X(Mt,{children:[X(io,{children:[C(Zl,{title:i("weight"),subheader:"."}),X(wi,{sx:{height:"500px",overflow:"auto"},children:[C(Ese,{weights:e.entries,height:200}),C(Ln,{sx:{mt:2},children:C(C0t,{weights:e.entries})})]}),X(os,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[C(yt,{size:"small",href:Pn(wn.WEIGHT_OVERVIEW,a.language),children:i("seeDetails")}),C(Xl,{title:i("addEntry"),children:C(An,{onClick:r,children:C(Gi,{})})})]})]}),C(Yi,{title:i("add"),isOpen:t,closeFn:o,children:C(ib,{closeFn:o})})]})},T0t=()=>{const[e,t]=qe();return C($B,{callback:r=>{r!==null&&(window.location.href=Pn(wn.INGREDIENT_DETAIL,t.language,{id:r.data.id}))}})},O0t=()=>C("div",{children:"About Page"});function rz(e){const[t]=qe(),[n,r,o]=ul(e.fieldName);return C(Kl,{multiple:!0,freeSolo:!0,id:e.fieldName,value:n.value,options:n.value,onChange:(i,a)=>{o.setValue(a)},renderTags:(i,a)=>i.map((s,l)=>sN(hh,{label:s,...a({index:l}),key:l})),onBlur:n.onBlur,renderInput:i=>C(gn,{...i,id:"exerciseAliases",variant:"standard",label:t("exercises.alternativeNames"),error:r.touched&&!!r.error,helperText:r.touched&&r.error,value:n.value})})}function I0t(e){const[t]=qe(),[n,r,o]=ul(e.fieldName);return C(Kl,{multiple:!0,id:e.fieldName,options:e.options.map(i=>i.id),getOptionLabel:i=>t(Wi(e.options.find(a=>a.id===i).name)),...n,onChange:(i,a)=>{o.setValue(a)},renderInput:i=>C(gn,{variant:"standard",label:t("exercises.equipment"),value:n.value,...i})})}function oz(e){const[t]=qe(),[n,r]=ul(e.fieldName);return C(gn,{fullWidth:!0,id:e.fieldName,label:t("name"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function k0t(e){const[t]=qe(),[n,r]=ul(e.fieldName);return X(Cv,{fullWidth:!0,children:[C(Pv,{id:"label-category",children:t("category")}),C(Dh,{labelId:"label-category",id:"category",label:t("category"),error:r.touched&&!!r.error,...n,children:e.options}),r.touched&&!!r.error&&C(fS,{error:!0,children:r.error})]})}const Ose=5,Ise=40,iz=e=>Nc().min(Ose,e("forms.valueTooShort")).max(Ise,e("forms.valueTooLong")).required(e("forms.fieldRequired")),az=e=>GB().ensure().compact().of(Nc().min(Ose,e("forms.valueTooShort")).max(Ise,e("forms.valueTooLong"))),sz=e=>Nc().min(40,e("forms.valueTooShort")).required(e("forms.fieldRequired")),kse=e=>GB().ensure().compact().of(Nc().min(15,e("forms.valueTooShort"))),M0t=e=>sa().required(e("forms.fieldRequired"));function Mse(){return oo({queryKey:[En.EXERCISES],queryFn:qDe})}function A0t(e){return oo({queryKey:[En.EXERCISE_DETAIL,e],queryFn:()=>bS(e)})}function $0t(e){const t=gr();return $r({mutationFn:n=>pD(n),onSuccess:()=>{t.invalidateQueries({queryKey:[En.EXERCISES]}),t.invalidateQueries({queryKey:[En.EXERCISE_DETAIL,e]})}})}function R0t(e){const t=gr();return $r({mutationFn:n=>JDe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[En.EXERCISES]}),t.invalidateQueries({queryKey:[En.EXERCISE_DETAIL,e]})}})}function D0t(e){const t=gr();return $r({mutationFn:n=>n_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[En.EXERCISES]}),t.invalidateQueries({queryKey:[En.EXERCISE_DETAIL,e]})}})}function _0t(e){const t=gr();return $r({mutationFn:n=>qZ(n),onSuccess:()=>{t.invalidateQueries({queryKey:[En.EXERCISES]}),t.invalidateQueries({queryKey:[En.EXERCISE_DETAIL,e]})}})}function Fk(){return oo({queryKey:[En.CATEGORIES],queryFn:VDe})}function XS(){return oo({queryKey:[En.MUSCLES],queryFn:LDe})}function jk(){return oo({queryKey:[En.EQUIPMENT],queryFn:jDe})}function Bk(){return oo({queryKey:[En.LANGUAGES],queryFn:t_e})}const Eh=({primaryMuscles:e,secondaryMuscles:t,isFront:n})=>{const r=[];r.push(...e.filter(i=>i.isFront===n).map(i=>`/muscles/main/muscle-${i.id}.svg`)),r.push(...t.filter(i=>i.isFront===n).map(i=>`/muscles/secondary/muscle-${i.id}.svg`)),r.push(n?"/muscles/muscular_system_front.svg":"/muscles/muscular_system_back.svg");const o=r.map(i=>`url(${C2e}${i})`).join(", ");return C("div",{style:{height:"400px",width:"200px",backgroundImage:o,backgroundRepeat:"no-repeat"}})};var Ase=(e=>(e[e.SET_NOTIFICATION=0]="SET_NOTIFICATION",e))(Ase||{}),Nn=(e=>(e[e.RESET=0]="RESET",e[e.SET_NAME_EN=1]="SET_NAME_EN",e[e.SET_ALIASES_EN=2]="SET_ALIASES_EN",e[e.SET_DESCRIPTION_EN=3]="SET_DESCRIPTION_EN",e[e.SET_NOTES_EN=4]="SET_NOTES_EN",e[e.SET_CATEGORY=5]="SET_CATEGORY",e[e.SET_EQUIPMENT=6]="SET_EQUIPMENT",e[e.SET_PRIMARY_MUSCLES=7]="SET_PRIMARY_MUSCLES",e[e.SET_MUSCLES_SECONDARY=8]="SET_MUSCLES_SECONDARY",e[e.SET_VARIATION_ID=9]="SET_VARIATION_ID",e[e.SET_NEW_VARIATION_BASE_ID=10]="SET_NEW_VARIATION_BASE_ID",e[e.SET_LANGUAGE=11]="SET_LANGUAGE",e[e.SET_NAME_I18N=12]="SET_NAME_I18N",e[e.SET_ALIASES_I18N=13]="SET_ALIASES_I18N",e[e.SET_DESCRIPTION_I18N=14]="SET_DESCRIPTION_I18N",e[e.SET_NOTES_I18N=15]="SET_NOTES_I18N",e[e.SET_IMAGES=16]="SET_IMAGES",e))(Nn||{});const T7=e=>({type:Ase.SET_NOTIFICATION,payload:e}),O7={notification:{notify:!1,message:"",severity:void 0,title:"",type:void 0}},L0t=v.createContext([O7,()=>O7]),N0t=()=>v.useContext(L0t),F0t=e=>({type:Nn.SET_NAME_EN,payload:e}),j0t=e=>({type:Nn.SET_DESCRIPTION_EN,payload:e}),B0t=e=>({type:Nn.SET_NOTES_EN,payload:e}),z0t=e=>({type:Nn.SET_ALIASES_EN,payload:e}),V0t=e=>({type:Nn.SET_NAME_I18N,payload:e}),H0t=e=>({type:Nn.SET_DESCRIPTION_I18N,payload:e}),U0t=e=>({type:Nn.SET_NOTES_I18N,payload:e}),W0t=e=>({type:Nn.SET_ALIASES_I18N,payload:e}),G0t=e=>({type:Nn.SET_CATEGORY,payload:e}),q0t=e=>({type:Nn.SET_EQUIPMENT,payload:e}),K0t=e=>({type:Nn.SET_PRIMARY_MUSCLES,payload:e}),Y0t=e=>({type:Nn.SET_MUSCLES_SECONDARY,payload:e}),X0t=e=>({type:Nn.SET_VARIATION_ID,payload:e}),Q0t=e=>({type:Nn.SET_NEW_VARIATION_BASE_ID,payload:e}),J0t=e=>({type:Nn.SET_LANGUAGE,payload:e}),Z0t=e=>({type:Nn.SET_IMAGES,payload:e}),ewt=(e,t)=>{if(t===void 0)return e;switch(t.type){case Nn.RESET:return KT;case Nn.SET_NAME_EN:return{...e,nameEn:t.payload};case Nn.SET_DESCRIPTION_EN:return{...e,descriptionEn:t.payload};case Nn.SET_NOTES_EN:return{...e,notesEn:t.payload};case Nn.SET_ALIASES_EN:return{...e,alternativeNamesEn:t.payload};case Nn.SET_CATEGORY:return{...e,category:t.payload};case Nn.SET_EQUIPMENT:return{...e,equipment:t.payload};case Nn.SET_PRIMARY_MUSCLES:return{...e,muscles:t.payload};case Nn.SET_MUSCLES_SECONDARY:return{...e,musclesSecondary:t.payload};case Nn.SET_VARIATION_ID:return{...e,variationId:t.payload};case Nn.SET_NEW_VARIATION_BASE_ID:return{...e,newVariationBaseId:t.payload};case Nn.SET_LANGUAGE:return{...e,languageId:t.payload};case Nn.SET_NAME_I18N:return{...e,nameI18n:t.payload};case Nn.SET_DESCRIPTION_I18N:return{...e,descriptionI18n:t.payload};case Nn.SET_NOTES_I18N:return{...e,notesI18n:t.payload};case Nn.SET_ALIASES_I18N:return{...e,alternativeNamesI18n:t.payload};case Nn.SET_IMAGES:return{...e,images:t.payload};default:return e}},KT={category:null,muscles:[],musclesSecondary:[],variationId:null,newVariationBaseId:null,languageId:null,equipment:[],nameEn:"",descriptionEn:"",alternativeNamesEn:[],notesEn:[],nameI18n:"",alternativeNamesI18n:[],descriptionI18n:"",notesI18n:[],images:[]},$se=v.createContext([KT,()=>KT]),twt=({children:e})=>{const[t,n]=v.useReducer(ewt,KT);return C($se.Provider,{value:[t,n],children:e})},sb=()=>v.useContext($se),nwt=({onContinue:e})=>{const[t]=qe(),[n,r]=sb(),[o,i]=v.useState(n.muscles),[a,s]=v.useState(n.musclesSecondary);v.useEffect(()=>{r(K0t(o))},[r,o]),v.useEffect(()=>{r(Y0t(a))},[r,a]);const l=Fk(),c=XS(),u=jk(),d=dl({nameEn:iz(t),newAlternativeNameEn:az(t),category:M0t(t)});return C(cl,{initialValues:{nameEn:n.nameEn,newAlternativeNameEn:n.alternativeNamesEn,category:n.category!==null?n.category:"",muscles:n.muscles,equipment:n.equipment,musclesSecondary:n.musclesSecondary},validationSchema:d,onSubmit:f=>{r(F0t(f.nameEn)),r(G0t(f.category)),r(z0t(f.newAlternativeNameEn)),r(q0t(f.equipment)),e()},children:f=>X(as,{children:[X(Gt,{spacing:2,children:[C(oz,{fieldName:"nameEn"}),C(rz,{fieldName:"newAlternativeNameEn"}),l.isLoading?X(Ln,{children:[" ",C(ga,{})," "]}):C(k0t,{fieldName:"category",options:l.data.map(p=>C(tn,{value:p.id,children:t(Wi(p.name))},p.id))}),u.isLoading?X(Ln,{children:[" ",C(ga,{})," "]}):C(I0t,{fieldName:"equipment",options:u.data}),c.isLoading?X(Ln,{children:[" ",C(ga,{})," "]}):X(Mt,{children:[C(Kl,{multiple:!0,id:"muscles",options:c.data.map(p=>p.id),getOptionDisabled:p=>a.includes(p),getOptionLabel:p=>c.data.find(m=>m.id===p).getName(t),value:o,onChange:(p,m)=>{i(m)},renderInput:p=>C(gn,{...p,variant:"standard",label:t("exercises.muscles"),value:f.getFieldProps("muscles").value,onChange:m=>{f.setFieldValue(f.getFieldProps("muscles").name,m.target.value)}})}),C(Kl,{multiple:!0,id:"secondary-muscles",options:c.data.map(p=>p.id),getOptionDisabled:p=>o.includes(p),getOptionLabel:p=>c.data.find(m=>m.id===p).getName(t),value:a,onChange:(p,m)=>{s(m)},renderInput:p=>C(gn,{...p,variant:"standard",label:t("exercises.secondaryMuscles"),value:f.getFieldProps("muscles").value})})]}),X(Fe,{container:!0,children:[C(Fe,{display:"flex",justifyContent:"center",size:6,children:C(Eh,{primaryMuscles:o.map(p=>c.data.find(m=>m.id===p)),secondaryMuscles:a.map(p=>c.data.find(m=>m.id===p)),isFront:!0})}),C(Fe,{display:"flex",justifyContent:"center",size:6,children:C(Eh,{primaryMuscles:o.map(p=>c.data.find(m=>m.id===p)),secondaryMuscles:a.map(p=>c.data.find(m=>m.id===p)),isFront:!1})})]})]}),C(Fe,{container:!0,children:C(Fe,{display:"flex",justifyContent:"end",size:12,children:C(Ln,{sx:{mb:2},children:C("div",{children:C(yt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:t("continue")})})})})})]})})};function rwt(e,t){const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o);i?i.push(r):n.set(o,[r])}),n}const I7=({exercises:e})=>{const r=e[0].variationId,o=e[0].id,[i,a]=sb(),[s,l]=v.useState(!1),[c,u]=v.useState(i.variationId),[d,f]=v.useState(i.newVariationBaseId);v.useEffect(()=>{a(X0t(c))},[a,c]),v.useEffect(()=>{a(Q0t(d))},[a,d]);const p=(g,y)=>()=>{g!==null?(y=null,g===i.variationId&&(g=null)):(g=null,y===i.newVariationBaseId&&(y=null)),u(g),f(y)};let m;return r===null?m=i.newVariationBaseId===o:m=r===i.variationId,C(Ja,{disableGutters:!0,children:C(Df,{onClick:p(r,o),children:X(Fe,{container:!0,children:[C(Fe,{display:"flex",justifyContent:"start",alignItems:"center",size:{xs:12,sm:3},children:C(PEe,{max:4,spacing:"small",children:e.map(g=>g.mainImage?C(Yl,{src:g.mainImage.url},g.id):C(Yl,{children:C(Ju,{})},g.id))})}),X(Fe,{size:{xs:10,sm:7},children:[e.slice(0,s?e.length:5).map(g=>C("p",{style:{margin:0},children:g.getTranslation().name},g.id)),!s&&e.length>5?C(Tv,{onMouseEnter:()=>l(!0)}):null]}),C(Fe,{display:"flex",justifyContent:"end",size:{xs:2,sm:2},children:C(Hu,{edge:"start",checked:m,tabIndex:-1,disableRipple:!0},`variation-${r}`)}),C(Fe,{size:12,children:C(Qa,{sx:{pt:1}})})]})})})},owt=({onContinue:e,onBack:t})=>{const[n]=qe(),r=Mse(),[o,i]=v.useState("");let a=[],s=new Map;return r.isSuccess&&(a=r.data,o!==""&&(a=a.filter(l=>l.getTranslation().name.toLowerCase().includes(o.toLowerCase())))),s=rwt(a.filter(l=>l.variationId!==null),l=>l.variationId),X(Mt,{children:[X(Fe,{container:!0,children:[C(Fe,{size:{xs:12,sm:6},children:C(ut,{children:n("exercises.whatVariationsExist")})}),C(Fe,{display:"flex",justifyContent:"end",size:{xs:12,sm:6},children:C(gn,{label:n("exercises.filterVariations"),variant:"standard",onChange:l=>i(l.target.value),InputProps:{startAdornment:C(co,{position:"start",children:C(AB,{})})}})})]}),r.isLoading?C(bo,{}):C(so,{elevation:2,sx:{mt:2},children:X(ol,{style:{maxHeight:"400px",overflowY:"scroll"},children:[a.filter(l=>l.variationId===null).map(l=>C(I7,{exercises:[l]},"base-"+l.id)),[...s.keys()].map(l=>C(I7,{exercises:s.get(l)},"variation-"+l))]})}),X(Bu,{severity:"info",variant:"filled",sx:{mt:2},children:[C(CE,{children:n("exercises.identicalExercise")}),n("exercises.identicalExercisePleaseDiscard")]}),C(Fe,{container:!0,children:C(Fe,{display:"flex",justifyContent:"end",size:12,children:C(Ln,{sx:{mb:2},children:X("div",{children:[C(yt,{disabled:!1,onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(yt,{variant:"contained",onClick:e,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})};class iwt{constructor(t,n,r,o,i,a,s){this.username=t,this.email=n,this.emailVerified=r,this.dateJoined=o,this.isTrustworthy=i,this.useMetric=a,this.height=s}}class awt{constructor(){pn(this,"fromJson",t=>new iwt(t.username,t.email,t.email_verified,new Date(t.date_joined),t.is_trustworthy,t.weight_unit==="kg",t.height));pn(this,"toJson",t=>({email:t.email,height:t.height,weight_unit:t.useMetric?"kg":"lb"}))}}const swt="userprofile",lwt=async()=>{const e=Pt(swt),t=new awt;try{const n=await dt.get(e,{headers:kt()});return t.fromJson(n.data)}catch{return null}};function Uc(){return oo({queryKey:[L2e],queryFn:lwt})}function cwt(e){const{t}=qe(),[n,r]=Y.useState(e.initial.toString()),o=Fk(),i=Uc(),a=async s=>{r(s.target.value),await YF(e.exerciseId,{category:parseInt(s.target.value),license_author:i.data.username})};return o.isSuccess?X(Cv,{fullWidth:!0,children:[C(Pv,{id:"label-category",children:t("category")}),C(Dh,{labelId:"label-category",id:"category",label:t("category"),value:n,onChange:a,children:o.data.map(s=>C(tn,{value:s.id,children:t(Wi(s.name))},s.id))})]}):null}function uwt(e){const{t}=qe(),[n,r]=Y.useState(e.initial),o=jk(),i=Uc(),a=async s=>{r(s),await YF(e.exerciseId,{equipment:s,license_author:i.data.username})};return o.isSuccess?C(Kl,{multiple:!0,value:n,options:o.data.map(s=>s.id),getOptionLabel:s=>t(Wi(o.data.find(l=>l.id===s).name)),onChange:(s,l)=>a(l),renderInput:s=>C(gn,{variant:"standard",label:t("exercises.equipment"),value:n,...s})}):null}var Ho=function(){return Ho=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0)return e.getRangeAt(0).startContainer.parentNode||void 0}function M7(e){return e?e.replace(/ |\u202F|\u00A0/g," ").replace(/
/g,"
"):""}function fwt(e){var t=document.createTextNode("");e.appendChild(t);var n=document.activeElement===e;if(t!==null&&t.nodeValue!==null&&n){var r=window.getSelection();if(r!==null){var o=document.createRange();o.setStart(t,t.nodeValue.length),o.collapse(!0),r.removeAllRanges(),r.addRange(o)}e instanceof HTMLElement&&e.focus()}}function Dse(e,t){typeof t=="function"?t(e):typeof t=="object"&&t&&(t.current=e)}var pwt=Y.memo(Y.forwardRef(function(t,n){var r=t.className,o=t.disabled,i=t.tagName,a=t.value,s=a===void 0?"":a,l=t.placeholder,c=zk(t,["className","disabled","tagName","value","placeholder"]),u=Y.useRef(),d=Y.useRef(s),f=Y.useRef(c);return Y.useEffect(function(){f.current=c;var p=u.current;p&&M7(d.current)!==M7(s)&&(d.current=s,p.innerHTML=s,fwt(p))}),Y.useMemo(function(){function p(y){u.current=y,k7(y),Dse(y,n)}function m(y){var b,x,S=u.current;if(S){var P=S.innerHTML;P!==d.current&&((x=(b=f.current).onChange)===null||x===void 0||x.call(b,Ho(Ho({},y),{target:{value:P,name:c.name}}))),k7(S),d.current=P}}var g=Rse("rsw-ce",r);return Y.createElement(i||"div",Ho(Ho({},c),{className:g,contentEditable:!o,dangerouslySetInnerHTML:{__html:s},onBlur:function(y){return(f.current.onBlur||m)(y)},onInput:m,onKeyDown:function(y){return(f.current.onKeyDown||m)(y)},onKeyUp:function(y){return(f.current.onKeyUp||m)(y)},placeholder:l,ref:p}))},[r,o,l,i])})),_se=Y.createContext(void 0);function Lse(e){var t=e.children,n=Y.useState({htmlMode:!1,update:i}),r=n[0],o=n[1];function i(a){o(function(s){return Ho(Ho({},s),a)})}return Y.createElement(_se.Provider,{value:r},t)}function QS(){var e=Y.useContext(_se);if(!e)throw new Error("You should wrap your component by EditorProvider");return e}var A7=[],d0=[];function hwt(e,t){if(e&&typeof document<"u"){var n,r=t.prepend===!0?"prepend":"append",o=t.singleTag===!0,i=typeof t.container=="string"?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(o){var a=A7.indexOf(i);a===-1&&(a=A7.push(i)-1,d0[a]={}),n=d0[a]&&d0[a][r]?d0[a][r]:d0[a][r]=s()}else n=s();e.charCodeAt(0)===65279&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function s(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),t.attributes)for(var c=Object.keys(t.attributes),u=0;u")}function Og(){var e=QS();return e.htmlMode?null:Y.createElement("div",{className:"rsw-separator"})}function Wse(e){return Y.createElement("div",Ho({},e,{className:"rsw-toolbar"}))}Y.forwardRef(function(t,n){return Y.createElement(Lse,null,Y.createElement(Nse,Ho({},t,{ref:n}),Y.createElement(Wse,null,Y.createElement(Use,null),Y.createElement(Vse,null),Y.createElement(Og,null),Y.createElement(Fse,null),Y.createElement(Bse,null),Y.createElement(Hse,null),Y.createElement(bwt,null),Y.createElement(Og,null),Y.createElement(zse,null),Y.createElement(jse,null),Y.createElement(Og,null),Y.createElement(wwt,null),Y.createElement(vwt,null),Y.createElement(Pwt,null),Y.createElement(Og,null),Y.createElement(xwt,null))))});function Ewt(e){return C(Lse,{children:C(Nse,{...e,children:X(Wse,{children:[C(Fse,{}),C(Bse,{}),C(Hse,{}),C(Og,{}),C(jse,{}),C(zse,{}),C(Og,{}),C(Use,{}),C(Vse,{})]})})})}function lz(e){const[t,n,r]=ul(e.fieldName);return X(Mt,{children:[C("div",{"data-testid":"jodit-editor",children:C(Ewt,{value:t.value,onChange:o=>r.setValue(o.target.value)})}),n.touched&&!!n.error&&C(fS,{error:!0,children:n.error})]})}const Twt=({exerciseId:e,image:t,canDelete:n})=>{const[r]=qe(),o=D0t(e);return X(io,{children:[C(_c,{component:"img",image:t.url,sx:{height:120},alt:""}),C(os,{children:n&&C(yt,{color:"primary",onClick:()=>o.mutate(t.id),children:r("delete")})})]})},Owt=({exerciseId:e})=>{const[t]=qe(),n=Uc(),r=_0t(e),o=async i=>{var s;if(!((s=i.target.files)!=null&&s.length))return;const[a]=i.target.files;n.isSuccess&&await r.mutate({exerciseId:e,image:a,imageData:{url:"",file:a,author:"",authorUrl:"",title:"",objectUrl:"",derivativeSourceUrl:"",style:""}})};return X(io,{children:[C(_c,{children:C(Ln,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:C(Vae,{sx:{fontSize:80,color:"gray"}})})}),C(os,{children:X(yt,{component:"label",children:[t("add"),C("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:o})]})})]})};function $7(e){const{t}=qe(),n=XS(),r=async o=>{e.setValue(o),await YF(e.exerciseId,e.isMain?{muscles:o}:{muscles_secondary:o})};return n.isSuccess?C(Kl,{multiple:!0,options:n.data.map(o=>o.id),getOptionDisabled:o=>e.blocked.includes(o),getOptionLabel:o=>n.data.find(i=>i.id===o).getName(t),value:e.value,onChange:(o,i)=>r(i),renderInput:o=>C(gn,{...o,variant:"standard",label:t(e.isMain?"exercises.muscles":"exercises.secondaryMuscles"),value:e.value})}):null}const Iwt=({video:e,canDelete:t})=>{const[n]=qe();return X(io,{children:[C(_c,{component:"video",src:e.url,sx:{height:120},controls:!0,preload:"metadata"}),C(os,{children:t&&C(yt,{color:"primary",onClick:()=>i_e(e.id),children:n("delete")})})]})},kwt=({exerciseId:e})=>{const[t]=qe(),n=Uc(),r=async o=>{var a;if(!((a=o.target.files)!=null&&a.length))return;const[i]=o.target.files;n.isSuccess&&await o_e(e,n.data.username,i)};return X(io,{children:[C(_c,{children:C(Ln,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:C(Vae,{sx:{fontSize:80,color:"gray"}})})}),C(os,{children:X(yt,{component:"label",children:[t("add"),C("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"video/*",capture:"environment",onChange:r})]})})]})},Mwt="check-permission",Awt=async e=>{const t=Pt(Mwt,{query:{permission:e}}),n=await dt.get(t,{headers:kt()});return n.status===400?!1:n.data.result};function Ld(e){return oo({queryKey:[_2e,e],queryFn:()=>Awt(e.valueOf())})}var gu=(e=>(e.EDIT_EXERCISE="exercises.change_exercise",e.DELETE_EXERCISE="exercises.delete_exercise",e.ADD_IMAGE="exercises.add_exerciseimage",e.EDIT_IMAGE="exercises.change_exerciseimage",e.DELETE_IMAGE="exercises.delete_exerciseimage",e.ADD_VIDEO="exercises.add_exercisevideo",e.EDIT_VIDEO="exercises.change_exercisevideo",e.DELETE_VIDEO="exercises.delete_exercisevideo",e))(gu||{});const $wt=({exerciseId:e,language:t})=>{const[n]=qe(),[r,o]=v.useState(!1),[i,a]=v.useState([]),[s,l]=v.useState([]),c=A0t(e),u=$0t(e),d=R0t(e),f=Ld(gu.ADD_IMAGE),p=Ld(gu.DELETE_IMAGE),m=Ld(gu.ADD_VIDEO),g=Ld(gu.DELETE_VIDEO),y=Ld(gu.EDIT_EXERCISE),b=XS(),x=Uc(),S=c.data;if(v.useEffect(()=>{c.data!==void 0&&(a(S.muscles.map(M=>M.id)),l(S.musclesSecondary.map(M=>M.id)))},[c.data]),c.isLoading||b.isLoading||c.isLoading||x.isLoading||f.isLoading||p.isLoading||m.isLoading||g.isLoading||y.isLoading)return C(ga,{});const P=S.getTranslation(t),T=t.id!==(P==null?void 0:P.language)?new VZ(null,null,"","",t.id):P,O=S.getTranslation(),k=dl({name:iz(n),alternativeNames:az(n),description:sz(n)});return X(Mt,{children:[C(cl,{initialValues:{name:T.name,alternativeNames:T.aliases.map(M=>M.alias),description:T.description},enableReinitialize:!0,validationSchema:k,onSubmit:async M=>{const I=T.id?await d.mutateAsync({id:T.id,exerciseId:S.id,languageId:t.id,name:M.name,description:M.description,author:""}):await u.mutateAsync({exerciseId:S.id,languageId:t.id,name:M.name,description:M.description,author:x.data.username}),R=T.aliases.map(L=>L.alias),_=M.alternativeNames,N=_.filter(L=>!R.includes(L));let B=R.filter(L=>!_.includes(L));N.forEach(L=>{mD(I.id,L)}),B.forEach(L=>{r_e(T.aliases.find(F=>F.alias===L).id)}),o(!0)},children:C(as,{children:X(Fe,{container:!0,spacing:1,children:[r&&X(Fe,{size:12,children:[C(Bu,{severity:"success",action:C(An,{"aria-label":"close",size:"small",color:"inherit",onClick:()=>{o(!1)},children:C(mS,{fontSize:"inherit"})}),children:n("exercises.successfullyUpdated")}),C(Jo,{})]}),C(Fe,{size:6,children:C(ut,{variant:"h5",children:n("English")})}),C(Fe,{size:6,children:X(ut,{variant:"h5",children:[t.nameLong," (",t.nameShort,")"]})}),X(Fe,{size:12,children:[C(Jo,{}),C(ut,{variant:"h6",children:n("name")})]}),X(Fe,{size:6,children:[O.name,C("ul",{children:O.aliases.map(M=>C("li",{children:M.alias},M.id))})]}),X(Fe,{size:6,children:[C(Ln,{mb:2,children:C(oz,{fieldName:"name"})}),C(rz,{fieldName:"alternativeNames"})]}),C(Fe,{size:12,children:C(Jo,{})}),C(Fe,{size:12,children:C(ut,{variant:"h6",children:n("exercises.description")})}),C(Fe,{size:{xs:12,md:6},children:C("div",{dangerouslySetInnerHTML:{__html:O.description}})}),C(Fe,{size:{xs:12,md:6},children:C(lz,{fieldName:"description"})}),y.data&&X(Mt,{children:[C(Fe,{size:12,children:C(Jo,{})}),C(Fe,{size:{xs:12,md:6},children:C(cwt,{exerciseId:S.id,initial:S.category.id})}),C(Fe,{size:{xs:12,md:6},children:C(uwt,{exerciseId:S.id,initial:S.equipment.map(M=>M.id)})})]}),X(Fe,{size:12,children:[C(Jo,{}),C(yt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},disabled:c.isLoading||u.isPending||d.isPending,children:n("save")})]})]})})}),C(Jo,{}),C(ut,{variant:"h6",children:n("images")}),X(Fe,{container:!0,spacing:2,mt:2,children:[f.data&&C(Fe,{size:{md:3},children:C(Owt,{exerciseId:S.id})},"add"),S.images.map(M=>C(Fe,{size:{md:3},children:C(Twt,{exerciseId:S.id,image:M,canDelete:p.data})},M.id))]}),C(Jo,{}),C(ut,{variant:"h6",children:n("videos")}),X(Fe,{container:!0,spacing:2,mt:2,children:[m.data&&C(Fe,{size:{md:3},children:C(kwt,{exerciseId:S.id})},"add"),S.videos.map(M=>C(Fe,{size:{md:3},children:C(Iwt,{video:M,canDelete:g.data})},M.id))]}),y.data&&X(Mt,{children:[C(Jo,{}),C(ut,{variant:"h6",children:n("exercises.muscles")}),X(Fe,{container:!0,spacing:1,mt:2,children:[C(Fe,{size:{xs:12,md:6},children:C($7,{exerciseId:S.id,value:i,setValue:a,blocked:s,isMain:!0})}),C(Fe,{size:{xs:12,md:6},children:C($7,{exerciseId:S.id,value:s,setValue:l,blocked:i,isMain:!1})}),C(Fe,{size:{sm:6},offset:{md:3},children:X(Fe,{container:!0,children:[C(Fe,{display:"flex",justifyContent:"center",size:6,children:C(Eh,{primaryMuscles:i.map(M=>b.data.find(I=>I.id===M)),secondaryMuscles:s.map(M=>b.data.find(I=>I.id===M)),isFront:!0})}),C(Fe,{display:"flex",justifyContent:"center",size:6,children:C(Eh,{primaryMuscles:i.map(M=>b.data.find(I=>I.id===M)),secondaryMuscles:s.map(M=>b.data.find(I=>I.id===M)),isFront:!1})})]})})]})]})]})},Rwt=e=>{const t=e.backgroundColor||"lightgray",n=e.iconColor||"gray",r=e.height||200;return C(Ln,{sx:{backgroundColor:t,height:r},display:"flex",alignItems:"center",justifyContent:"center",children:C(Ju,{sx:{fontSize:80,color:n}})})},Gse=({exercise:e,language:t})=>{const n=t?e.getTranslation(t):e.getTranslation(new BF(vh,"en","English")),[r,o]=qe();return C(io,{sx:{width:"100%"},children:X(eTe,{href:Pn(wn.EXERCISE_DETAIL,o.language,{id:e.id,slug:n.nameSlug}),sx:{minHeight:330},children:[e.mainImage?C(_c,{component:"img",image:e.mainImage.url,sx:{height:200},alt:""}):C(_c,{children:C(Rwt,{})}),X(wi,{children:[C(Xl,{title:n.name,placement:"top",arrow:!0,children:C(ut,{gutterBottom:!0,variant:"h6",component:"div",noWrap:!0,children:n.name})}),C(hh,{label:r(Wi(e.category.name)),sx:{position:"absolute",top:8,left:8},color:"primary",size:"small"},e.category.id),e.equipment.map(i=>C(ut,{display:"inline",mr:1,children:r(Wi(i.name))},i.id)),e.equipment.length===0&&C(ut,{color:"text.secondary",display:"inline",mr:1,children:r("exercises.noEquipment")})]})]})},e.id)},Dwt=({mainImage:e,sideImages:t})=>X(Fe,{container:!0,spacing:1,children:[e&&C(Fe,{size:12,children:C(io,{children:C(_c,{component:"img",image:e.url,alt:""})})}),t.map(n=>C(Fe,{size:6,children:C(io,{children:C(_c,{component:"img",image:n.url,sx:{height:120},alt:""})})},n.id))]}),_wt=({videos:e})=>C(Fe,{container:!0,spacing:1,children:e.map(t=>C(Fe,{size:6,children:C(io,{children:C(_c,{component:"video",src:t.url,sx:{height:120},controls:!0,muted:!0,preload:"metadata"})})},t.id))});function cz(){var r,o;const e=Uc(),t=Ld(gu.EDIT_EXERCISE),n={canContribute:!1,anonymous:!0,emailVerified:!1,admin:!1};if(e.isSuccess&&t.isSuccess){if(e.data===null)return n;n.anonymous=!1,(r=e.data)!=null&&r.emailVerified&&(n.emailVerified=!0),t.data&&(n.admin=!0),(n.admin||(o=e.data)!=null&&o.isTrustworthy)&&(n.canContribute=!0)}return n}const Lwt=({setEditMode:e})=>{const[t]=qe();return X(Ln,{mb:2,paddingY:2,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[C(ut,{variant:"h5",children:t("exercises.exerciseNotTranslated")}),C(ut,{gutterBottom:!0,variant:"body1",component:"div",children:t("exercises.exerciseNotTranslatedBody")}),C(yt,{variant:"contained",onClick:()=>e(!0),children:t("exercises.translateExerciseNow")})]})},Nwt=({exercise:e,variations:t,language:n,setEditMode:r})=>{var l;const[o]=qe(),i=cz(),a=e.getTranslation(n),s=n&&n.id!==a.language;return X(Fe,{container:!0,children:[s&&i.canContribute&&C(Fe,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:12},children:C(Lwt,{setEditMode:r})}),X(Fe,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:8},children:[(a==null?void 0:a.aliases.length)>0&&X(Mt,{children:[X("p",{children:[o("exercises.alsoKnownAs"),"  ",(l=a==null?void 0:a.aliases)==null?void 0:l.map(c=>c.alias).join(", ")]}),C(Jo,{})]}),C(ut,{variant:"h5",children:o("exercises.description")}),C("div",{dangerouslySetInnerHTML:{__html:a==null?void 0:a.description}}),C(Jo,{}),(a==null?void 0:a.notes.length)>0&&C(ut,{variant:"h5",children:o("exercises.notes")}),C("ul",{children:a==null?void 0:a.notes.map(c=>C("li",{children:c.note},c.id))}),C(Jo,{}),C(ut,{variant:"h5",children:o("exercises.muscles")}),X(Fe,{container:!0,children:[C(Fe,{order:{xs:1},size:{xs:6,md:3},children:C(Eh,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!0})}),X(Fe,{order:{xs:2,md:3},size:{xs:6,md:3},children:[C("h3",{children:o("exercises.primaryMuscles")}),C("ul",{children:e.muscles.map(c=>C("li",{children:c.getName(o)},c.id))})]}),C(Fe,{order:{xs:3,md:2},size:{xs:6,md:3},children:C(Eh,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!1})}),X(Fe,{order:{xs:4},size:{xs:6,md:3},children:[C("h3",{children:o("exercises.secondaryMuscles")}),C("ul",{children:e.musclesSecondary.map(c=>C("li",{children:c.getName(o)},c.id))})]})]}),C(Jo,{})]}),X(Fe,{order:{xs:1,sm:2},size:{xs:12,sm:5,md:4},children:[C(Dwt,{mainImage:e.mainImage,sideImages:e.sideImages}),C(Jo,{}),C(_wt,{videos:e.videos})]}),X(Fe,{order:{xs:3},size:12,children:[C(Qa,{}),C(Jo,{}),t.length>0&&C(ut,{variant:"h5",children:o("exercises.variations")}),C(Fe,{container:!0,spacing:2,children:t.map(c=>C(Fe,{size:{xs:6,md:2},children:C(Gse,{exercise:c,language:n},c.id)},c.id))})]}),C(Fe,{order:{xs:4},size:12,children:X(ut,{variant:"caption",display:"block",mt:2,children:["The text on this page is available under the ",C("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/deed",children:"CC BY-SA 4 License"}),"."]})})]})};var YT={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ZE.exports;(function(e,t){(function(){var n,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,u="__lodash_placeholder__",d=1,f=2,p=4,m=1,g=2,v=1,w=2,x=4,S=8,P=16,T=32,E=64,O=128,k=256,A=512,I=30,R="...",L=800,F=16,z=1,_=2,D=3,H=1/0,B=9007199254740991,V=17976931348623157e292,W=NaN,G=4294967295,Q=G-1,Y=G>>>1,ne=[["ary",O],["bind",v],["bindKey",w],["curry",S],["curryRight",P],["flip",A],["partial",T],["partialRight",E],["rearg",k]],ie="[object Arguments]",re="[object Array]",pe="[object AsyncFunction]",le="[object Boolean]",ee="[object Date]",ce="[object DOMException]",se="[object Error]",Z="[object Function]",ue="[object GeneratorFunction]",ge="[object Map]",we="[object Number]",me="[object Null]",be="[object Object]",xe="[object Promise]",Ee="[object Proxy]",Me="[object RegExp]",_e="[object Set]",de="[object String]",Ae="[object Symbol]",Oe="[object Undefined]",$e="[object WeakMap]",Be="[object WeakSet]",Je="[object ArrayBuffer]",ot="[object DataView]",lt="[object Float32Array]",it="[object Float64Array]",tt="[object Int8Array]",pt="[object Int16Array]",qt="[object Int32Array]",qe="[object Uint8Array]",Re="[object Uint8ClampedArray]",Ze="[object Uint16Array]",Pt="[object Uint32Array]",_t=/\b__p \+= '';/g,kt=/\b(__p \+=) '' \+/g,yn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Fn=/&(?:amp|lt|gt|quot|#39);/g,Vn=/[&<>"']/g,wo=RegExp(Fn.source),xo=RegExp(Vn.source),oi=/<%-([\s\S]+?)%>/g,Xi=/<%([\s\S]+?)%>/g,zt=/<%=([\s\S]+?)%>/g,Wo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gc=/^\w*$/,ad=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qc=/[\\^$.*+?()[\]{}|]/g,Kf=RegExp(qc.source),Yf=/^\s+/,mb=/\s/,rm=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,i1=/\{\n\/\* \[wrapped with (.+)\] \*/,Xf=/,? & /,$o=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Hr=/[()=,{}\[\]\/\s]/,ml=/\\(\\)?/g,Ke=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fe=/\w*$/,wt=/^[-+]0x[0-9a-f]+$/i,Zt=/^0b[01]+$/i,sn=/^\[object .+?Constructor\]$/,kr=/^0o[0-7]+$/i,Hn=/^(?:0|[1-9]\d*)$/,Sa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kc=/($^)/,Nz=/['\n\r\u2028\u2029\\]/g,om="\\ud800-\\udfff",a1="\\u0300-\\u036f",im="\\ufe20-\\ufe2f",am="\\u20d0-\\u20ff",sm=a1+im+am,Qf="\\u2700-\\u27bf",On="a-z\\xdf-\\xf6\\xf8-\\xff",cs="\\xac\\xb1\\xd7\\xf7",rc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Jf="\\u2000-\\u206f",sM=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lz="A-Z\\xc0-\\xd6\\xd8-\\xde",Fz="\\ufe0e\\ufe0f",jz=cs+rc+Jf+sM,lM="['’]",jce="["+om+"]",Bz="["+jz+"]",s1="["+sm+"]",zz="\\d+",Bce="["+Qf+"]",Vz="["+On+"]",Hz="[^"+om+jz+zz+Qf+On+Lz+"]",cM="\\ud83c[\\udffb-\\udfff]",zce="(?:"+s1+"|"+cM+")",Uz="[^"+om+"]",uM="(?:\\ud83c[\\udde6-\\uddff]){2}",dM="[\\ud800-\\udbff][\\udc00-\\udfff]",lm="["+Lz+"]",Wz="\\u200d",Gz="(?:"+Vz+"|"+Hz+")",Vce="(?:"+lm+"|"+Hz+")",qz="(?:"+lM+"(?:d|ll|m|re|s|t|ve))?",Kz="(?:"+lM+"(?:D|LL|M|RE|S|T|VE))?",Yz=zce+"?",Xz="["+Fz+"]?",Hce="(?:"+Wz+"(?:"+[Uz,uM,dM].join("|")+")"+Xz+Yz+")*",Uce="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wce="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Qz=Xz+Yz+Hce,Gce="(?:"+[Bce,uM,dM].join("|")+")"+Qz,qce="(?:"+[Uz+s1+"?",s1,uM,dM,jce].join("|")+")",Kce=RegExp(lM,"g"),Yce=RegExp(s1,"g"),fM=RegExp(cM+"(?="+cM+")|"+qce+Qz,"g"),Xce=RegExp([lm+"?"+Vz+"+"+qz+"(?="+[Bz,lm,"$"].join("|")+")",Vce+"+"+Kz+"(?="+[Bz,lm+Gz,"$"].join("|")+")",lm+"?"+Gz+"+"+qz,lm+"+"+Kz,Wce,Uce,zz,Gce].join("|"),"g"),Qce=RegExp("["+Wz+om+sm+Fz+"]"),Jce=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zce=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eue=-1,wr={};wr[lt]=wr[it]=wr[tt]=wr[pt]=wr[qt]=wr[qe]=wr[Re]=wr[Ze]=wr[Pt]=!0,wr[ie]=wr[re]=wr[Je]=wr[le]=wr[ot]=wr[ee]=wr[se]=wr[Z]=wr[ge]=wr[we]=wr[be]=wr[Me]=wr[_e]=wr[de]=wr[$e]=!1;var hr={};hr[ie]=hr[re]=hr[Je]=hr[ot]=hr[le]=hr[ee]=hr[lt]=hr[it]=hr[tt]=hr[pt]=hr[qt]=hr[ge]=hr[we]=hr[be]=hr[Me]=hr[_e]=hr[de]=hr[Ae]=hr[qe]=hr[Re]=hr[Ze]=hr[Pt]=!0,hr[se]=hr[Z]=hr[$e]=!1;var tue={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},nue={"&":"&","<":"<",">":">",'"':""","'":"'"},rue={"&":"&","<":"<",">":">",""":'"',"'":"'"},oue={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},iue=parseFloat,aue=parseInt,Jz=typeof Di=="object"&&Di&&Di.Object===Object&&Di,sue=typeof self=="object"&&self&&self.Object===Object&&self,Go=Jz||sue||Function("return this")(),pM=t&&!t.nodeType&&t,Zf=pM&&!0&&e&&!e.nodeType&&e,Zz=Zf&&Zf.exports===pM,hM=Zz&&Jz.process,us=function(){try{var Ce=Zf&&Zf.require&&Zf.require("util").types;return Ce||hM&&hM.binding&&hM.binding("util")}catch{}}(),eV=us&&us.isArrayBuffer,tV=us&&us.isDate,nV=us&&us.isMap,rV=us&&us.isRegExp,oV=us&&us.isSet,iV=us&&us.isTypedArray;function Ca(Ce,Ve,ke){switch(ke.length){case 0:return Ce.call(Ve);case 1:return Ce.call(Ve,ke[0]);case 2:return Ce.call(Ve,ke[0],ke[1]);case 3:return Ce.call(Ve,ke[0],ke[1],ke[2])}return Ce.apply(Ve,ke)}function lue(Ce,Ve,ke,St){for(var Kt=-1,Un=Ce==null?0:Ce.length;++Kt-1}function mM(Ce,Ve,ke){for(var St=-1,Kt=Ce==null?0:Ce.length;++St-1;);return ke}function pV(Ce,Ve){for(var ke=Ce.length;ke--&&cm(Ve,Ce[ke],0)>-1;);return ke}function yue(Ce,Ve){for(var ke=Ce.length,St=0;ke--;)Ce[ke]===Ve&&++St;return St}var vue=bM(tue),bue=bM(nue);function wue(Ce){return"\\"+oue[Ce]}function xue(Ce,Ve){return Ce==null?n:Ce[Ve]}function um(Ce){return Qce.test(Ce)}function Sue(Ce){return Jce.test(Ce)}function Cue(Ce){for(var Ve,ke=[];!(Ve=Ce.next()).done;)ke.push(Ve.value);return ke}function CM(Ce){var Ve=-1,ke=Array(Ce.size);return Ce.forEach(function(St,Kt){ke[++Ve]=[Kt,St]}),ke}function hV(Ce,Ve){return function(ke){return Ce(Ve(ke))}}function cd(Ce,Ve){for(var ke=-1,St=Ce.length,Kt=0,Un=[];++ke-1}function ude(h,b){var M=this.__data__,U=T1(M,h);return U<0?(++this.size,M.push([h,b])):M[U][1]=b,this}Yc.prototype.clear=ade,Yc.prototype.delete=sde,Yc.prototype.get=lde,Yc.prototype.has=cde,Yc.prototype.set=ude;function Xc(h){var b=-1,M=h==null?0:h.length;for(this.clear();++b=b?h:b)),h}function hs(h,b,M,U,q,te){var he,ye=b&d,Pe=b&f,Ye=b&p;if(M&&(he=q?M(h,U,q,te):M(h)),he!==n)return he;if(!Dr(h))return h;var Xe=en(h);if(Xe){if(he=hfe(h),!ye)return Qi(h,he)}else{var nt=ai(h),ht=nt==Z||nt==ue;if(md(h))return XV(h,ye);if(nt==be||nt==ie||ht&&!q){if(he=Pe||ht?{}:m5(h),!ye)return Pe?rfe(h,Ede(he,h)):nfe(h,EV(he,h))}else{if(!hr[nt])return q?h:{};he=mfe(h,nt,ye)}}te||(te=new yl);var $t=te.get(h);if($t)return $t;te.set(h,he),U5(h)?h.forEach(function(Bt){he.add(hs(Bt,b,M,Bt,h,te))}):V5(h)&&h.forEach(function(Bt,Pn){he.set(Pn,hs(Bt,b,M,Pn,h,te))});var jt=Ye?Pe?YM:KM:Pe?Zi:Ro,un=Xe?n:jt(h);return ds(un||h,function(Bt,Pn){un&&(Pn=Bt,Bt=h[Pn]),Sb(he,Pn,hs(Bt,b,M,Pn,h,te))}),he}function Ode(h){var b=Ro(h);return function(M){return OV(M,h,b)}}function OV(h,b,M){var U=M.length;if(h==null)return!U;for(h=cr(h);U--;){var q=M[U],te=b[q],he=h[q];if(he===n&&!(q in h)||!te(he))return!1}return!0}function IV(h,b,M){if(typeof h!="function")throw new fs(a);return kb(function(){h.apply(n,M)},b)}function Cb(h,b,M,U){var q=-1,te=l1,he=!0,ye=h.length,Pe=[],Ye=b.length;if(!ye)return Pe;M&&(b=Mr(b,Pa(M))),U?(te=mM,he=!1):b.length>=o&&(te=gb,he=!1,b=new np(b));e:for(;++qq?0:q+M),U=U===n||U>q?q:ln(U),U<0&&(U+=q),U=M>U?0:G5(U);M0&&M(ye)?b>1?qo(ye,b-1,M,U,q):ld(q,ye):U||(q[q.length]=ye)}return q}var MM=n5(),AV=n5(!0);function oc(h,b){return h&&MM(h,b,Ro)}function AM(h,b){return h&&AV(h,b,Ro)}function O1(h,b){return sd(b,function(M){return tu(h[M])})}function op(h,b){b=pd(b,h);for(var M=0,U=b.length;h!=null&&Mb}function Mde(h,b){return h!=null&&tr.call(h,b)}function Ade(h,b){return h!=null&&b in cr(h)}function $de(h,b,M){return h>=ii(b,M)&&h=120&&Xe.length>=120)?new np(he&&Xe):n}Xe=h[0];var nt=-1,ht=ye[0];e:for(;++nt-1;)ye!==h&&v1.call(ye,Pe,1),v1.call(h,Pe,1);return h}function VV(h,b){for(var M=h?b.length:0,U=M-1;M--;){var q=b[M];if(M==U||q!==te){var te=q;eu(q)?v1.call(h,q,1):zM(h,q)}}return h}function FM(h,b){return h+x1(SV()*(b-h+1))}function Wde(h,b,M,U){for(var q=-1,te=Co(w1((b-h)/(M||1)),0),he=ke(te);te--;)he[U?te:++q]=h,h+=M;return he}function jM(h,b){var M="";if(!h||b<1||b>B)return M;do b%2&&(M+=h),b=x1(b/2),b&&(h+=h);while(b);return M}function vn(h,b){return nA(v5(h,b,ea),h+"")}function Gde(h){return TV(xm(h))}function qde(h,b){var M=xm(h);return F1(M,rp(b,0,M.length))}function Eb(h,b,M,U){if(!Dr(h))return h;b=pd(b,h);for(var q=-1,te=b.length,he=te-1,ye=h;ye!=null&&++qq?0:q+b),M=M>q?q:M,M<0&&(M+=q),q=b>M?0:M-b>>>0,b>>>=0;for(var te=ke(q);++U>>1,he=h[te];he!==null&&!Ea(he)&&(M?he<=b:he=o){var Ye=b?null:sfe(h);if(Ye)return u1(Ye);he=!1,q=gb,Pe=new np}else Pe=b?[]:ye;e:for(;++U=U?h:ms(h,b,M)}var YV=Fue||function(h){return Go.clearTimeout(h)};function XV(h,b){if(b)return h.slice();var M=h.length,U=yV?yV(M):new h.constructor(M);return h.copy(U),U}function WM(h){var b=new h.constructor(h.byteLength);return new g1(b).set(new g1(h)),b}function Jde(h,b){var M=b?WM(h.buffer):h.buffer;return new h.constructor(M,h.byteOffset,h.byteLength)}function Zde(h){var b=new h.constructor(h.source,Fe.exec(h));return b.lastIndex=h.lastIndex,b}function efe(h){return xb?cr(xb.call(h)):{}}function QV(h,b){var M=b?WM(h.buffer):h.buffer;return new h.constructor(M,h.byteOffset,h.length)}function JV(h,b){if(h!==b){var M=h!==n,U=h===null,q=h===h,te=Ea(h),he=b!==n,ye=b===null,Pe=b===b,Ye=Ea(b);if(!ye&&!Ye&&!te&&h>b||te&&he&&Pe&&!ye&&!Ye||U&&he&&Pe||!M&&Pe||!q)return 1;if(!U&&!te&&!Ye&&h=ye)return Pe;var Ye=M[U];return Pe*(Ye=="desc"?-1:1)}}return h.index-b.index}function ZV(h,b,M,U){for(var q=-1,te=h.length,he=M.length,ye=-1,Pe=b.length,Ye=Co(te-he,0),Xe=ke(Pe+Ye),nt=!U;++ye1?M[q-1]:n,he=q>2?M[2]:n;for(te=h.length>3&&typeof te=="function"?(q--,te):n,he&&Ti(M[0],M[1],he)&&(te=q<3?n:te,q=1),b=cr(b);++U-1?q[te?b[he]:he]:n}}function i5(h){return Zc(function(b){var M=b.length,U=M,q=ps.prototype.thru;for(h&&b.reverse();U--;){var te=b[U];if(typeof te!="function")throw new fs(a);if(q&&!he&&N1(te)=="wrapper")var he=new ps([],!0)}for(U=he?U:M;++U1&&Mn.reverse(),Xe&&Peye))return!1;var Ye=te.get(h),Xe=te.get(b);if(Ye&&Xe)return Ye==b&&Xe==h;var nt=-1,ht=!0,$t=M&g?new np:n;for(te.set(h,b),te.set(b,h);++nt1?"& ":"")+b[U],b=b.join(M>2?", ":" "),h.replace(rm,`{ -/* [wrapped with `+b+`] */ -`)}function yfe(h){return en(h)||sp(h)||!!(wV&&h&&h[wV])}function eu(h,b){var M=typeof h;return b=b??B,!!b&&(M=="number"||M!="symbol"&&Hn.test(h))&&h>-1&&h%1==0&&h0){if(++b>=L)return arguments[0]}else b=0;return h.apply(n,arguments)}}function F1(h,b){var M=-1,U=h.length,q=U-1;for(b=b===n?U:b;++M1?h[b-1]:n;return M=typeof M=="function"?(h.pop(),M):n,M5(h,M)});function A5(h){var b=J(h);return b.__chain__=!0,b}function Ipe(h,b){return b(h),h}function j1(h,b){return b(h)}var kpe=Zc(function(h){var b=h.length,M=b?h[0]:0,U=this.__wrapped__,q=function(te){return kM(te,h)};return b>1||this.__actions__.length||!(U instanceof In)||!eu(M)?this.thru(q):(U=U.slice(M,+M+(b?1:0)),U.__actions__.push({func:j1,args:[q],thisArg:n}),new ps(U,this.__chain__).thru(function(te){return b&&!te.length&&te.push(n),te}))});function Mpe(){return A5(this)}function Ape(){return new ps(this.value(),this.__chain__)}function $pe(){this.__values__===n&&(this.__values__=W5(this.value()));var h=this.__index__>=this.__values__.length,b=h?n:this.__values__[this.__index__++];return{done:h,value:b}}function Rpe(){return this}function _pe(h){for(var b,M=this;M instanceof P1;){var U=P5(M);U.__index__=0,U.__values__=n,b?q.__wrapped__=U:b=U;var q=U;M=M.__wrapped__}return q.__wrapped__=h,b}function Dpe(){var h=this.__wrapped__;if(h instanceof In){var b=h;return this.__actions__.length&&(b=new In(this)),b=b.reverse(),b.__actions__.push({func:j1,args:[rA],thisArg:n}),new ps(b,this.__chain__)}return this.thru(rA)}function Npe(){return qV(this.__wrapped__,this.__actions__)}var Lpe=A1(function(h,b,M){tr.call(h,M)?++h[M]:Qc(h,M,1)});function Fpe(h,b,M){var U=en(h)?aV:Ide;return M&&Ti(h,b,M)&&(b=n),U(h,Nt(b,3))}function jpe(h,b){var M=en(h)?sd:MV;return M(h,Nt(b,3))}var Bpe=o5(T5),zpe=o5(E5);function Vpe(h,b){return qo(B1(h,b),1)}function Hpe(h,b){return qo(B1(h,b),H)}function Upe(h,b,M){return M=M===n?1:ln(M),qo(B1(h,b),M)}function $5(h,b){var M=en(h)?ds:dd;return M(h,Nt(b,3))}function R5(h,b){var M=en(h)?cue:kV;return M(h,Nt(b,3))}var Wpe=A1(function(h,b,M){tr.call(h,M)?h[M].push(b):Qc(h,M,[b])});function Gpe(h,b,M,U){h=Ji(h)?h:xm(h),M=M&&!U?ln(M):0;var q=h.length;return M<0&&(M=Co(q+M,0)),W1(h)?M<=q&&h.indexOf(b,M)>-1:!!q&&cm(h,b,M)>-1}var qpe=vn(function(h,b,M){var U=-1,q=typeof b=="function",te=Ji(h)?ke(h.length):[];return dd(h,function(he){te[++U]=q?Ca(b,he,M):Pb(he,b,M)}),te}),Kpe=A1(function(h,b,M){Qc(h,M,b)});function B1(h,b){var M=en(h)?Mr:NV;return M(h,Nt(b,3))}function Ype(h,b,M,U){return h==null?[]:(en(b)||(b=b==null?[]:[b]),M=U?n:M,en(M)||(M=M==null?[]:[M]),BV(h,b,M))}var Xpe=A1(function(h,b,M){h[M?0:1].push(b)},function(){return[[],[]]});function Qpe(h,b,M){var U=en(h)?gM:uV,q=arguments.length<3;return U(h,Nt(b,4),M,q,dd)}function Jpe(h,b,M){var U=en(h)?uue:uV,q=arguments.length<3;return U(h,Nt(b,4),M,q,kV)}function Zpe(h,b){var M=en(h)?sd:MV;return M(h,H1(Nt(b,3)))}function ehe(h){var b=en(h)?TV:Gde;return b(h)}function the(h,b,M){(M?Ti(h,b,M):b===n)?b=1:b=ln(b);var U=en(h)?Cde:qde;return U(h,b)}function nhe(h){var b=en(h)?Pde:Yde;return b(h)}function rhe(h){if(h==null)return 0;if(Ji(h))return W1(h)?dm(h):h.length;var b=ai(h);return b==ge||b==_e?h.size:DM(h).length}function ohe(h,b,M){var U=en(h)?yM:Xde;return M&&Ti(h,b,M)&&(b=n),U(h,Nt(b,3))}var ihe=vn(function(h,b){if(h==null)return[];var M=b.length;return M>1&&Ti(h,b[0],b[1])?b=[]:M>2&&Ti(b[0],b[1],b[2])&&(b=[b[0]]),BV(h,qo(b,1),[])}),z1=jue||function(){return Go.Date.now()};function ahe(h,b){if(typeof b!="function")throw new fs(a);return h=ln(h),function(){if(--h<1)return b.apply(this,arguments)}}function _5(h,b,M){return b=M?n:b,b=h&&b==null?h.length:b,Jc(h,O,n,n,n,n,b)}function D5(h,b){var M;if(typeof b!="function")throw new fs(a);return h=ln(h),function(){return--h>0&&(M=b.apply(this,arguments)),h<=1&&(b=n),M}}var iA=vn(function(h,b,M){var U=v;if(M.length){var q=cd(M,bm(iA));U|=T}return Jc(h,U,b,M,q)}),N5=vn(function(h,b,M){var U=v|w;if(M.length){var q=cd(M,bm(N5));U|=T}return Jc(b,U,h,M,q)});function L5(h,b,M){b=M?n:b;var U=Jc(h,S,n,n,n,n,n,b);return U.placeholder=L5.placeholder,U}function F5(h,b,M){b=M?n:b;var U=Jc(h,P,n,n,n,n,n,b);return U.placeholder=F5.placeholder,U}function j5(h,b,M){var U,q,te,he,ye,Pe,Ye=0,Xe=!1,nt=!1,ht=!0;if(typeof h!="function")throw new fs(a);b=ys(b)||0,Dr(M)&&(Xe=!!M.leading,nt="maxWait"in M,te=nt?Co(ys(M.maxWait)||0,b):te,ht="trailing"in M?!!M.trailing:ht);function $t(Zr){var bl=U,ru=q;return U=q=n,Ye=Zr,he=h.apply(ru,bl),he}function jt(Zr){return Ye=Zr,ye=kb(Pn,b),Xe?$t(Zr):he}function un(Zr){var bl=Zr-Pe,ru=Zr-Ye,oH=b-bl;return nt?ii(oH,te-ru):oH}function Bt(Zr){var bl=Zr-Pe,ru=Zr-Ye;return Pe===n||bl>=b||bl<0||nt&&ru>=te}function Pn(){var Zr=z1();if(Bt(Zr))return Mn(Zr);ye=kb(Pn,un(Zr))}function Mn(Zr){return ye=n,ht&&U?$t(Zr):(U=q=n,he)}function Oa(){ye!==n&&YV(ye),Ye=0,U=Pe=q=ye=n}function Ei(){return ye===n?he:Mn(z1())}function Ia(){var Zr=z1(),bl=Bt(Zr);if(U=arguments,q=this,Pe=Zr,bl){if(ye===n)return jt(Pe);if(nt)return YV(ye),ye=kb(Pn,b),$t(Pe)}return ye===n&&(ye=kb(Pn,b)),he}return Ia.cancel=Oa,Ia.flush=Ei,Ia}var she=vn(function(h,b){return IV(h,1,b)}),lhe=vn(function(h,b,M){return IV(h,ys(b)||0,M)});function che(h){return Jc(h,A)}function V1(h,b){if(typeof h!="function"||b!=null&&typeof b!="function")throw new fs(a);var M=function(){var U=arguments,q=b?b.apply(this,U):U[0],te=M.cache;if(te.has(q))return te.get(q);var he=h.apply(this,U);return M.cache=te.set(q,he)||te,he};return M.cache=new(V1.Cache||Xc),M}V1.Cache=Xc;function H1(h){if(typeof h!="function")throw new fs(a);return function(){var b=arguments;switch(b.length){case 0:return!h.call(this);case 1:return!h.call(this,b[0]);case 2:return!h.call(this,b[0],b[1]);case 3:return!h.call(this,b[0],b[1],b[2])}return!h.apply(this,b)}}function uhe(h){return D5(2,h)}var dhe=Qde(function(h,b){b=b.length==1&&en(b[0])?Mr(b[0],Pa(Nt())):Mr(qo(b,1),Pa(Nt()));var M=b.length;return vn(function(U){for(var q=-1,te=ii(U.length,M);++q=b}),sp=RV(function(){return arguments}())?RV:function(h){return Ur(h)&&tr.call(h,"callee")&&!bV.call(h,"callee")},en=ke.isArray,Ehe=eV?Pa(eV):_de;function Ji(h){return h!=null&&U1(h.length)&&!tu(h)}function Jr(h){return Ur(h)&&Ji(h)}function Ohe(h){return h===!0||h===!1||Ur(h)&&Pi(h)==le}var md=zue||yA,Ihe=tV?Pa(tV):Dde;function khe(h){return Ur(h)&&h.nodeType===1&&!Mb(h)}function Mhe(h){if(h==null)return!0;if(Ji(h)&&(en(h)||typeof h=="string"||typeof h.splice=="function"||md(h)||wm(h)||sp(h)))return!h.length;var b=ai(h);if(b==ge||b==_e)return!h.size;if(Ib(h))return!DM(h).length;for(var M in h)if(tr.call(h,M))return!1;return!0}function Ahe(h,b){return Tb(h,b)}function $he(h,b,M){M=typeof M=="function"?M:n;var U=M?M(h,b):n;return U===n?Tb(h,b,n,M):!!U}function sA(h){if(!Ur(h))return!1;var b=Pi(h);return b==se||b==ce||typeof h.message=="string"&&typeof h.name=="string"&&!Mb(h)}function Rhe(h){return typeof h=="number"&&xV(h)}function tu(h){if(!Dr(h))return!1;var b=Pi(h);return b==Z||b==ue||b==pe||b==Ee}function z5(h){return typeof h=="number"&&h==ln(h)}function U1(h){return typeof h=="number"&&h>-1&&h%1==0&&h<=B}function Dr(h){var b=typeof h;return h!=null&&(b=="object"||b=="function")}function Ur(h){return h!=null&&typeof h=="object"}var V5=nV?Pa(nV):Lde;function _he(h,b){return h===b||_M(h,b,QM(b))}function Dhe(h,b,M){return M=typeof M=="function"?M:n,_M(h,b,QM(b),M)}function Nhe(h){return H5(h)&&h!=+h}function Lhe(h){if(wfe(h))throw new Kt(i);return _V(h)}function Fhe(h){return h===null}function jhe(h){return h==null}function H5(h){return typeof h=="number"||Ur(h)&&Pi(h)==we}function Mb(h){if(!Ur(h)||Pi(h)!=be)return!1;var b=y1(h);if(b===null)return!0;var M=tr.call(b,"constructor")&&b.constructor;return typeof M=="function"&&M instanceof M&&p1.call(M)==Due}var lA=rV?Pa(rV):Fde;function Bhe(h){return z5(h)&&h>=-B&&h<=B}var U5=oV?Pa(oV):jde;function W1(h){return typeof h=="string"||!en(h)&&Ur(h)&&Pi(h)==de}function Ea(h){return typeof h=="symbol"||Ur(h)&&Pi(h)==Ae}var wm=iV?Pa(iV):Bde;function zhe(h){return h===n}function Vhe(h){return Ur(h)&&ai(h)==$e}function Hhe(h){return Ur(h)&&Pi(h)==Be}var Uhe=D1(NM),Whe=D1(function(h,b){return h<=b});function W5(h){if(!h)return[];if(Ji(h))return W1(h)?gl(h):Qi(h);if(yb&&h[yb])return Cue(h[yb]());var b=ai(h),M=b==ge?CM:b==_e?u1:xm;return M(h)}function nu(h){if(!h)return h===0?h:0;if(h=ys(h),h===H||h===-H){var b=h<0?-1:1;return b*V}return h===h?h:0}function ln(h){var b=nu(h),M=b%1;return b===b?M?b-M:b:0}function G5(h){return h?rp(ln(h),0,G):0}function ys(h){if(typeof h=="number")return h;if(Ea(h))return W;if(Dr(h)){var b=typeof h.valueOf=="function"?h.valueOf():h;h=Dr(b)?b+"":b}if(typeof h!="string")return h===0?h:+h;h=dV(h);var M=Zt.test(h);return M||kr.test(h)?aue(h.slice(2),M?2:8):wt.test(h)?W:+h}function q5(h){return ic(h,Zi(h))}function Ghe(h){return h?rp(ln(h),-B,B):h===0?h:0}function Xn(h){return h==null?"":Ta(h)}var qhe=ym(function(h,b){if(Ib(b)||Ji(b)){ic(b,Ro(b),h);return}for(var M in b)tr.call(b,M)&&Sb(h,M,b[M])}),K5=ym(function(h,b){ic(b,Zi(b),h)}),G1=ym(function(h,b,M,U){ic(b,Zi(b),h,U)}),Khe=ym(function(h,b,M,U){ic(b,Ro(b),h,U)}),Yhe=Zc(kM);function Xhe(h,b){var M=gm(h);return b==null?M:EV(M,b)}var Qhe=vn(function(h,b){h=cr(h);var M=-1,U=b.length,q=U>2?b[2]:n;for(q&&Ti(b[0],b[1],q)&&(U=1);++M1),te}),ic(h,YM(h),M),U&&(M=hs(M,d|f|p,lfe));for(var q=b.length;q--;)zM(M,b[q]);return M});function mme(h,b){return X5(h,H1(Nt(b)))}var gme=Zc(function(h,b){return h==null?{}:Hde(h,b)});function X5(h,b){if(h==null)return{};var M=Mr(YM(h),function(U){return[U]});return b=Nt(b),zV(h,M,function(U,q){return b(U,q[0])})}function yme(h,b,M){b=pd(b,h);var U=-1,q=b.length;for(q||(q=1,h=n);++Ub){var U=h;h=b,b=U}if(M||h%1||b%1){var q=SV();return ii(h+q*(b-h+iue("1e-"+((q+"").length-1))),b)}return FM(h,b)}var Ime=vm(function(h,b,M){return b=b.toLowerCase(),h+(M?Z5(b):b)});function Z5(h){return dA(Xn(h).toLowerCase())}function eH(h){return h=Xn(h),h&&h.replace(Sa,vue).replace(Yce,"")}function kme(h,b,M){h=Xn(h),b=Ta(b);var U=h.length;M=M===n?U:rp(ln(M),0,U);var q=M;return M-=b.length,M>=0&&h.slice(M,q)==b}function Mme(h){return h=Xn(h),h&&xo.test(h)?h.replace(Vn,bue):h}function Ame(h){return h=Xn(h),h&&Kf.test(h)?h.replace(qc,"\\$&"):h}var $me=vm(function(h,b,M){return h+(M?"-":"")+b.toLowerCase()}),Rme=vm(function(h,b,M){return h+(M?" ":"")+b.toLowerCase()}),_me=r5("toLowerCase");function Dme(h,b,M){h=Xn(h),b=ln(b);var U=b?dm(h):0;if(!b||U>=b)return h;var q=(b-U)/2;return _1(x1(q),M)+h+_1(w1(q),M)}function Nme(h,b,M){h=Xn(h),b=ln(b);var U=b?dm(h):0;return b&&U>>0,M?(h=Xn(h),h&&(typeof b=="string"||b!=null&&!lA(b))&&(b=Ta(b),!b&&um(h))?hd(gl(h),0,M):h.split(b,M)):[]}var Hme=vm(function(h,b,M){return h+(M?" ":"")+dA(b)});function Ume(h,b,M){return h=Xn(h),M=M==null?0:rp(ln(M),0,h.length),b=Ta(b),h.slice(M,M+b.length)==b}function Wme(h,b,M){var U=J.templateSettings;M&&Ti(h,b,M)&&(b=n),h=Xn(h),b=G1({},b,U,u5);var q=G1({},b.imports,U.imports,u5),te=Ro(q),he=SM(q,te),ye,Pe,Ye=0,Xe=b.interpolate||Kc,nt="__p += '",ht=PM((b.escape||Kc).source+"|"+Xe.source+"|"+(Xe===zt?Ke:Kc).source+"|"+(b.evaluate||Kc).source+"|$","g"),$t="//# sourceURL="+(tr.call(b,"sourceURL")?(b.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++eue+"]")+` -`;h.replace(ht,function(Bt,Pn,Mn,Oa,Ei,Ia){return Mn||(Mn=Oa),nt+=h.slice(Ye,Ia).replace(Nz,wue),Pn&&(ye=!0,nt+=`' + -__e(`+Pn+`) + -'`),Ei&&(Pe=!0,nt+=`'; -`+Ei+`; -__p += '`),Mn&&(nt+=`' + -((__t = (`+Mn+`)) == null ? '' : __t) + -'`),Ye=Ia+Bt.length,Bt}),nt+=`'; -`;var jt=tr.call(b,"variable")&&b.variable;if(!jt)nt=`with (obj) { -`+nt+` + */YT.exports;(function(e,t){(function(){var n,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,u="__lodash_placeholder__",d=1,f=2,p=4,m=1,g=2,y=1,b=2,x=4,S=8,P=16,E=32,T=64,O=128,k=256,M=512,I=30,R="...",_=800,N=16,B=1,L=2,F=3,U=1/0,V=9007199254740991,z=17976931348623157e292,W=NaN,G=4294967295,J=G-1,K=G>>>1,ne=[["ary",O],["bind",y],["bindKey",b],["curry",S],["curryRight",P],["flip",M],["partial",E],["partialRight",T],["rearg",k]],re="[object Arguments]",oe="[object Array]",fe="[object AsyncFunction]",se="[object Boolean]",ee="[object Date]",ce="[object DOMException]",le="[object Error]",Q="[object Function]",ue="[object GeneratorFunction]",ge="[object Map]",xe="[object Number]",me="[object Null]",be="[object Object]",we="[object Promise]",Oe="[object Proxy]",ke="[object RegExp]",je="[object Set]",de="[object String]",Re="[object Symbol]",Me="[object Undefined]",Ae="[object WeakMap]",Ne="[object WeakSet]",Je="[object ArrayBuffer]",nt="[object DataView]",st="[object Float32Array]",$t="[object Float64Array]",ct="[object Int8Array]",_t="[object Int16Array]",pt="[object Int32Array]",ot="[object Uint8Array]",Pe="[object Uint8ClampedArray]",We="[object Uint16Array]",ft="[object Uint32Array]",Ot=/\b__p \+= '';/g,xt=/\b(__p \+=) '' \+/g,vn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,zn=/&(?:amp|lt|gt|quot|#39);/g,Wn=/[&<>"']/g,xo=RegExp(zn.source),So=RegExp(Wn.source),ai=/<%-([\s\S]+?)%>/g,Sa=/<%([\s\S]+?)%>/g,Nt=/<%=([\s\S]+?)%>/g,Co=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ss=/^\w*$/,ad=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gc=/[\\^$.*+?()[\]{}|]/g,Kf=RegExp(Gc.source),Yf=/^\s+/,mb=/\s/,rm=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,o1=/\{\n\/\* \[wrapped with (.+)\] \*/,Xf=/,? & /,Do=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Wr=/[()=,{}\[\]\/\s]/,hl=/\\(\\)?/g,Ke=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Be=/\w*$/,St=/^[-+]0x[0-9a-f]+$/i,Zt=/^0b[01]+$/i,ln=/^\[object .+?Constructor\]$/,Rr=/^0o[0-7]+$/i,Gn=/^(?:0|[1-9]\d*)$/,Ca=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,qc=/($^)/,Lz=/['\n\r\u2028\u2029\\]/g,om="\\ud800-\\udfff",i1="\\u0300-\\u036f",im="\\ufe20-\\ufe2f",am="\\u20d0-\\u20ff",sm=i1+im+am,Qf="\\u2700-\\u27bf",kn="a-z\\xdf-\\xf6\\xf8-\\xff",ls="\\xac\\xb1\\xd7\\xf7",nc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Jf="\\u2000-\\u206f",oM=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Nz="A-Z\\xc0-\\xd6\\xd8-\\xde",Fz="\\ufe0e\\ufe0f",jz=ls+nc+Jf+oM,iM="['’]",_ce="["+om+"]",Bz="["+jz+"]",a1="["+sm+"]",zz="\\d+",Lce="["+Qf+"]",Vz="["+kn+"]",Hz="[^"+om+jz+zz+Qf+kn+Nz+"]",aM="\\ud83c[\\udffb-\\udfff]",Nce="(?:"+a1+"|"+aM+")",Uz="[^"+om+"]",sM="(?:\\ud83c[\\udde6-\\uddff]){2}",lM="[\\ud800-\\udbff][\\udc00-\\udfff]",lm="["+Nz+"]",Wz="\\u200d",Gz="(?:"+Vz+"|"+Hz+")",Fce="(?:"+lm+"|"+Hz+")",qz="(?:"+iM+"(?:d|ll|m|re|s|t|ve))?",Kz="(?:"+iM+"(?:D|LL|M|RE|S|T|VE))?",Yz=Nce+"?",Xz="["+Fz+"]?",jce="(?:"+Wz+"(?:"+[Uz,sM,lM].join("|")+")"+Xz+Yz+")*",Bce="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",zce="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Qz=Xz+Yz+jce,Vce="(?:"+[Lce,sM,lM].join("|")+")"+Qz,Hce="(?:"+[Uz+a1+"?",a1,sM,lM,_ce].join("|")+")",Uce=RegExp(iM,"g"),Wce=RegExp(a1,"g"),cM=RegExp(aM+"(?="+aM+")|"+Hce+Qz,"g"),Gce=RegExp([lm+"?"+Vz+"+"+qz+"(?="+[Bz,lm,"$"].join("|")+")",Fce+"+"+Kz+"(?="+[Bz,lm+Gz,"$"].join("|")+")",lm+"?"+Gz+"+"+qz,lm+"+"+Kz,zce,Bce,zz,Vce].join("|"),"g"),qce=RegExp("["+Wz+om+sm+Fz+"]"),Kce=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yce=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Xce=-1,Cr={};Cr[st]=Cr[$t]=Cr[ct]=Cr[_t]=Cr[pt]=Cr[ot]=Cr[Pe]=Cr[We]=Cr[ft]=!0,Cr[re]=Cr[oe]=Cr[Je]=Cr[se]=Cr[nt]=Cr[ee]=Cr[le]=Cr[Q]=Cr[ge]=Cr[xe]=Cr[be]=Cr[ke]=Cr[je]=Cr[de]=Cr[Ae]=!1;var yr={};yr[re]=yr[oe]=yr[Je]=yr[nt]=yr[se]=yr[ee]=yr[st]=yr[$t]=yr[ct]=yr[_t]=yr[pt]=yr[ge]=yr[xe]=yr[be]=yr[ke]=yr[je]=yr[de]=yr[Re]=yr[ot]=yr[Pe]=yr[We]=yr[ft]=!0,yr[le]=yr[Q]=yr[Ae]=!1;var Qce={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Jce={"&":"&","<":"<",">":">",'"':""","'":"'"},Zce={"&":"&","<":"<",">":">",""":'"',"'":"'"},eue={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tue=parseFloat,nue=parseInt,Jz=typeof yc=="object"&&yc&&yc.Object===Object&&yc,rue=typeof self=="object"&&self&&self.Object===Object&&self,qo=Jz||rue||Function("return this")(),uM=t&&!t.nodeType&&t,Zf=uM&&!0&&e&&!e.nodeType&&e,Zz=Zf&&Zf.exports===uM,dM=Zz&&Jz.process,cs=function(){try{var Ce=Zf&&Zf.require&&Zf.require("util").types;return Ce||dM&&dM.binding&&dM.binding("util")}catch{}}(),eV=cs&&cs.isArrayBuffer,tV=cs&&cs.isDate,nV=cs&&cs.isMap,rV=cs&&cs.isRegExp,oV=cs&&cs.isSet,iV=cs&&cs.isTypedArray;function Pa(Ce,He,$e){switch($e.length){case 0:return Ce.call(He);case 1:return Ce.call(He,$e[0]);case 2:return Ce.call(He,$e[0],$e[1]);case 3:return Ce.call(He,$e[0],$e[1],$e[2])}return Ce.apply(He,$e)}function oue(Ce,He,$e,Ct){for(var Kt=-1,qn=Ce==null?0:Ce.length;++Kt-1}function fM(Ce,He,$e){for(var Ct=-1,Kt=Ce==null?0:Ce.length;++Ct-1;);return $e}function pV(Ce,He){for(var $e=Ce.length;$e--&&cm(He,Ce[$e],0)>-1;);return $e}function pue(Ce,He){for(var $e=Ce.length,Ct=0;$e--;)Ce[$e]===He&&++Ct;return Ct}var hue=gM(Qce),mue=gM(Jce);function gue(Ce){return"\\"+eue[Ce]}function yue(Ce,He){return Ce==null?n:Ce[He]}function um(Ce){return qce.test(Ce)}function vue(Ce){return Kce.test(Ce)}function bue(Ce){for(var He,$e=[];!(He=Ce.next()).done;)$e.push(He.value);return $e}function wM(Ce){var He=-1,$e=Array(Ce.size);return Ce.forEach(function(Ct,Kt){$e[++He]=[Kt,Ct]}),$e}function hV(Ce,He){return function($e){return Ce(He($e))}}function cd(Ce,He){for(var $e=-1,Ct=Ce.length,Kt=0,qn=[];++$e-1}function ade(h,w){var A=this.__data__,H=P1(A,h);return H<0?(++this.size,A.push([h,w])):A[H][1]=w,this}Kc.prototype.clear=nde,Kc.prototype.delete=rde,Kc.prototype.get=ode,Kc.prototype.has=ide,Kc.prototype.set=ade;function Yc(h){var w=-1,A=h==null?0:h.length;for(this.clear();++w=w?h:w)),h}function ps(h,w,A,H,q,te){var he,ye=w&d,Ee=w&f,Xe=w&p;if(A&&(he=q?A(h,H,q,te):A(h)),he!==n)return he;if(!Fr(h))return h;var Qe=en(h);if(Qe){if(he=ufe(h),!ye)return Xi(h,he)}else{var et=li(h),ht=et==Q||et==ue;if(md(h))return XV(h,ye);if(et==be||et==re||ht&&!q){if(he=Ee||ht?{}:m5(h),!ye)return Ee?Zde(h,Sde(he,h)):Jde(h,TV(he,h))}else{if(!yr[et])return q?h:{};he=dfe(h,et,ye)}}te||(te=new gl);var Rt=te.get(h);if(Rt)return Rt;te.set(h,he),U5(h)?h.forEach(function(Vt){he.add(ps(Vt,w,A,Vt,h,te))}):V5(h)&&h.forEach(function(Vt,Tn){he.set(Tn,ps(Vt,w,A,Tn,h,te))});var zt=Xe?Ee?GM:WM:Ee?Ji:_o,fn=Qe?n:zt(h);return us(fn||h,function(Vt,Tn){fn&&(Tn=Vt,Vt=h[Tn]),Sb(he,Tn,ps(Vt,w,A,Tn,h,te))}),he}function Cde(h){var w=_o(h);return function(A){return OV(A,h,w)}}function OV(h,w,A){var H=A.length;if(h==null)return!H;for(h=dr(h);H--;){var q=A[H],te=w[q],he=h[q];if(he===n&&!(q in h)||!te(he))return!1}return!0}function IV(h,w,A){if(typeof h!="function")throw new ds(a);return kb(function(){h.apply(n,A)},w)}function Cb(h,w,A,H){var q=-1,te=s1,he=!0,ye=h.length,Ee=[],Xe=w.length;if(!ye)return Ee;A&&(w=Dr(w,Ea(A))),H?(te=fM,he=!1):w.length>=o&&(te=gb,he=!1,w=new np(w));e:for(;++qq?0:q+A),H=H===n||H>q?q:cn(H),H<0&&(H+=q),H=A>H?0:G5(H);A0&&A(ye)?w>1?Ko(ye,w-1,A,H,q):ld(q,ye):H||(q[q.length]=ye)}return q}var OM=n5(),AV=n5(!0);function rc(h,w){return h&&OM(h,w,_o)}function IM(h,w){return h&&AV(h,w,_o)}function T1(h,w){return sd(w,function(A){return eu(h[A])})}function op(h,w){w=pd(w,h);for(var A=0,H=w.length;h!=null&&Aw}function Tde(h,w){return h!=null&&or.call(h,w)}function Ode(h,w){return h!=null&&w in dr(h)}function Ide(h,w,A){return h>=si(w,A)&&h=120&&Qe.length>=120)?new np(he&&Qe):n}Qe=h[0];var et=-1,ht=ye[0];e:for(;++et-1;)ye!==h&&y1.call(ye,Ee,1),y1.call(h,Ee,1);return h}function VV(h,w){for(var A=h?w.length:0,H=A-1;A--;){var q=w[A];if(A==H||q!==te){var te=q;Zc(q)?y1.call(h,q,1):FM(h,q)}}return h}function _M(h,w){return h+w1(SV()*(w-h+1))}function zde(h,w,A,H){for(var q=-1,te=Eo(b1((w-h)/(A||1)),0),he=$e(te);te--;)he[H?te:++q]=h,h+=A;return he}function LM(h,w){var A="";if(!h||w<1||w>V)return A;do w%2&&(A+=h),w=w1(w/2),w&&(h+=h);while(w);return A}function bn(h,w){return ZM(v5(h,w,Zi),h+"")}function Vde(h){return EV(xm(h))}function Hde(h,w){var A=xm(h);return N1(A,rp(w,0,A.length))}function Tb(h,w,A,H){if(!Fr(h))return h;w=pd(w,h);for(var q=-1,te=w.length,he=te-1,ye=h;ye!=null&&++qq?0:q+w),A=A>q?q:A,A<0&&(A+=q),q=w>A?0:A-w>>>0,w>>>=0;for(var te=$e(q);++H>>1,he=h[te];he!==null&&!Oa(he)&&(A?he<=w:he=o){var Xe=w?null:rfe(h);if(Xe)return c1(Xe);he=!1,q=gb,Ee=new np}else Ee=w?[]:ye;e:for(;++H=H?h:hs(h,w,A)}var YV=Due||function(h){return qo.clearTimeout(h)};function XV(h,w){if(w)return h.slice();var A=h.length,H=yV?yV(A):new h.constructor(A);return h.copy(H),H}function VM(h){var w=new h.constructor(h.byteLength);return new m1(w).set(new m1(h)),w}function Kde(h,w){var A=w?VM(h.buffer):h.buffer;return new h.constructor(A,h.byteOffset,h.byteLength)}function Yde(h){var w=new h.constructor(h.source,Be.exec(h));return w.lastIndex=h.lastIndex,w}function Xde(h){return xb?dr(xb.call(h)):{}}function QV(h,w){var A=w?VM(h.buffer):h.buffer;return new h.constructor(A,h.byteOffset,h.length)}function JV(h,w){if(h!==w){var A=h!==n,H=h===null,q=h===h,te=Oa(h),he=w!==n,ye=w===null,Ee=w===w,Xe=Oa(w);if(!ye&&!Xe&&!te&&h>w||te&&he&&Ee&&!ye&&!Xe||H&&he&&Ee||!A&&Ee||!q)return 1;if(!H&&!te&&!Xe&&h=ye)return Ee;var Xe=A[H];return Ee*(Xe=="desc"?-1:1)}}return h.index-w.index}function ZV(h,w,A,H){for(var q=-1,te=h.length,he=A.length,ye=-1,Ee=w.length,Xe=Eo(te-he,0),Qe=$e(Ee+Xe),et=!H;++ye1?A[q-1]:n,he=q>2?A[2]:n;for(te=h.length>3&&typeof te=="function"?(q--,te):n,he&&Ti(A[0],A[1],he)&&(te=q<3?n:te,q=1),w=dr(w);++H-1?q[te?w[he]:he]:n}}function i5(h){return Jc(function(w){var A=w.length,H=A,q=fs.prototype.thru;for(h&&w.reverse();H--;){var te=w[H];if(typeof te!="function")throw new ds(a);if(q&&!he&&_1(te)=="wrapper")var he=new fs([],!0)}for(H=he?H:A;++H1&&Rn.reverse(),Qe&&Eeye))return!1;var Xe=te.get(h),Qe=te.get(w);if(Xe&&Qe)return Xe==w&&Qe==h;var et=-1,ht=!0,Rt=A&g?new np:n;for(te.set(h,w),te.set(w,h);++et1?"& ":"")+w[H],w=w.join(A>2?", ":" "),h.replace(rm,`{ +/* [wrapped with `+w+`] */ +`)}function pfe(h){return en(h)||sp(h)||!!(wV&&h&&h[wV])}function Zc(h,w){var A=typeof h;return w=w??V,!!w&&(A=="number"||A!="symbol"&&Gn.test(h))&&h>-1&&h%1==0&&h0){if(++w>=_)return arguments[0]}else w=0;return h.apply(n,arguments)}}function N1(h,w){var A=-1,H=h.length,q=H-1;for(w=w===n?H:w;++A1?h[w-1]:n;return A=typeof A=="function"?(h.pop(),A):n,M5(h,A)});function A5(h){var w=Z(h);return w.__chain__=!0,w}function Ppe(h,w){return w(h),h}function F1(h,w){return w(h)}var Epe=Jc(function(h){var w=h.length,A=w?h[0]:0,H=this.__wrapped__,q=function(te){return TM(te,h)};return w>1||this.__actions__.length||!(H instanceof Mn)||!Zc(A)?this.thru(q):(H=H.slice(A,+A+(w?1:0)),H.__actions__.push({func:F1,args:[q],thisArg:n}),new fs(H,this.__chain__).thru(function(te){return w&&!te.length&&te.push(n),te}))});function Tpe(){return A5(this)}function Ope(){return new fs(this.value(),this.__chain__)}function Ipe(){this.__values__===n&&(this.__values__=W5(this.value()));var h=this.__index__>=this.__values__.length,w=h?n:this.__values__[this.__index__++];return{done:h,value:w}}function kpe(){return this}function Mpe(h){for(var w,A=this;A instanceof C1;){var H=P5(A);H.__index__=0,H.__values__=n,w?q.__wrapped__=H:w=H;var q=H;A=A.__wrapped__}return q.__wrapped__=h,w}function Ape(){var h=this.__wrapped__;if(h instanceof Mn){var w=h;return this.__actions__.length&&(w=new Mn(this)),w=w.reverse(),w.__actions__.push({func:F1,args:[eA],thisArg:n}),new fs(w,this.__chain__)}return this.thru(eA)}function $pe(){return qV(this.__wrapped__,this.__actions__)}var Rpe=M1(function(h,w,A){or.call(h,A)?++h[A]:Xc(h,A,1)});function Dpe(h,w,A){var H=en(h)?aV:Pde;return A&&Ti(h,w,A)&&(w=n),H(h,Ft(w,3))}function _pe(h,w){var A=en(h)?sd:MV;return A(h,Ft(w,3))}var Lpe=o5(E5),Npe=o5(T5);function Fpe(h,w){return Ko(j1(h,w),1)}function jpe(h,w){return Ko(j1(h,w),U)}function Bpe(h,w,A){return A=A===n?1:cn(A),Ko(j1(h,w),A)}function $5(h,w){var A=en(h)?us:dd;return A(h,Ft(w,3))}function R5(h,w){var A=en(h)?iue:kV;return A(h,Ft(w,3))}var zpe=M1(function(h,w,A){or.call(h,A)?h[A].push(w):Xc(h,A,[w])});function Vpe(h,w,A,H){h=Qi(h)?h:xm(h),A=A&&!H?cn(A):0;var q=h.length;return A<0&&(A=Eo(q+A,0)),U1(h)?A<=q&&h.indexOf(w,A)>-1:!!q&&cm(h,w,A)>-1}var Hpe=bn(function(h,w,A){var H=-1,q=typeof w=="function",te=Qi(h)?$e(h.length):[];return dd(h,function(he){te[++H]=q?Pa(w,he,A):Pb(he,w,A)}),te}),Upe=M1(function(h,w,A){Xc(h,A,w)});function j1(h,w){var A=en(h)?Dr:LV;return A(h,Ft(w,3))}function Wpe(h,w,A,H){return h==null?[]:(en(w)||(w=w==null?[]:[w]),A=H?n:A,en(A)||(A=A==null?[]:[A]),BV(h,w,A))}var Gpe=M1(function(h,w,A){h[A?0:1].push(w)},function(){return[[],[]]});function qpe(h,w,A){var H=en(h)?pM:uV,q=arguments.length<3;return H(h,Ft(w,4),A,q,dd)}function Kpe(h,w,A){var H=en(h)?aue:uV,q=arguments.length<3;return H(h,Ft(w,4),A,q,kV)}function Ype(h,w){var A=en(h)?sd:MV;return A(h,V1(Ft(w,3)))}function Xpe(h){var w=en(h)?EV:Vde;return w(h)}function Qpe(h,w,A){(A?Ti(h,w,A):w===n)?w=1:w=cn(w);var H=en(h)?bde:Hde;return H(h,w)}function Jpe(h){var w=en(h)?wde:Wde;return w(h)}function Zpe(h){if(h==null)return 0;if(Qi(h))return U1(h)?dm(h):h.length;var w=li(h);return w==ge||w==je?h.size:$M(h).length}function ehe(h,w,A){var H=en(h)?hM:Gde;return A&&Ti(h,w,A)&&(w=n),H(h,Ft(w,3))}var the=bn(function(h,w){if(h==null)return[];var A=w.length;return A>1&&Ti(h,w[0],w[1])?w=[]:A>2&&Ti(w[0],w[1],w[2])&&(w=[w[0]]),BV(h,Ko(w,1),[])}),B1=_ue||function(){return qo.Date.now()};function nhe(h,w){if(typeof w!="function")throw new ds(a);return h=cn(h),function(){if(--h<1)return w.apply(this,arguments)}}function D5(h,w,A){return w=A?n:w,w=h&&w==null?h.length:w,Qc(h,O,n,n,n,n,w)}function _5(h,w){var A;if(typeof w!="function")throw new ds(a);return h=cn(h),function(){return--h>0&&(A=w.apply(this,arguments)),h<=1&&(w=n),A}}var nA=bn(function(h,w,A){var H=y;if(A.length){var q=cd(A,bm(nA));H|=E}return Qc(h,H,w,A,q)}),L5=bn(function(h,w,A){var H=y|b;if(A.length){var q=cd(A,bm(L5));H|=E}return Qc(w,H,h,A,q)});function N5(h,w,A){w=A?n:w;var H=Qc(h,S,n,n,n,n,n,w);return H.placeholder=N5.placeholder,H}function F5(h,w,A){w=A?n:w;var H=Qc(h,P,n,n,n,n,n,w);return H.placeholder=F5.placeholder,H}function j5(h,w,A){var H,q,te,he,ye,Ee,Xe=0,Qe=!1,et=!1,ht=!0;if(typeof h!="function")throw new ds(a);w=gs(w)||0,Fr(A)&&(Qe=!!A.leading,et="maxWait"in A,te=et?Eo(gs(A.maxWait)||0,w):te,ht="trailing"in A?!!A.trailing:ht);function Rt(to){var vl=H,nu=q;return H=q=n,Xe=to,he=h.apply(nu,vl),he}function zt(to){return Xe=to,ye=kb(Tn,w),Qe?Rt(to):he}function fn(to){var vl=to-Ee,nu=to-Xe,oH=w-vl;return et?si(oH,te-nu):oH}function Vt(to){var vl=to-Ee,nu=to-Xe;return Ee===n||vl>=w||vl<0||et&&nu>=te}function Tn(){var to=B1();if(Vt(to))return Rn(to);ye=kb(Tn,fn(to))}function Rn(to){return ye=n,ht&&H?Rt(to):(H=q=n,he)}function Ia(){ye!==n&&YV(ye),Xe=0,H=Ee=q=ye=n}function Oi(){return ye===n?he:Rn(B1())}function ka(){var to=B1(),vl=Vt(to);if(H=arguments,q=this,Ee=to,vl){if(ye===n)return zt(Ee);if(et)return YV(ye),ye=kb(Tn,w),Rt(Ee)}return ye===n&&(ye=kb(Tn,w)),he}return ka.cancel=Ia,ka.flush=Oi,ka}var rhe=bn(function(h,w){return IV(h,1,w)}),ohe=bn(function(h,w,A){return IV(h,gs(w)||0,A)});function ihe(h){return Qc(h,M)}function z1(h,w){if(typeof h!="function"||w!=null&&typeof w!="function")throw new ds(a);var A=function(){var H=arguments,q=w?w.apply(this,H):H[0],te=A.cache;if(te.has(q))return te.get(q);var he=h.apply(this,H);return A.cache=te.set(q,he)||te,he};return A.cache=new(z1.Cache||Yc),A}z1.Cache=Yc;function V1(h){if(typeof h!="function")throw new ds(a);return function(){var w=arguments;switch(w.length){case 0:return!h.call(this);case 1:return!h.call(this,w[0]);case 2:return!h.call(this,w[0],w[1]);case 3:return!h.call(this,w[0],w[1],w[2])}return!h.apply(this,w)}}function ahe(h){return _5(2,h)}var she=qde(function(h,w){w=w.length==1&&en(w[0])?Dr(w[0],Ea(Ft())):Dr(Ko(w,1),Ea(Ft()));var A=w.length;return bn(function(H){for(var q=-1,te=si(H.length,A);++q=w}),sp=RV(function(){return arguments}())?RV:function(h){return Gr(h)&&or.call(h,"callee")&&!bV.call(h,"callee")},en=$e.isArray,She=eV?Ea(eV):Mde;function Qi(h){return h!=null&&H1(h.length)&&!eu(h)}function eo(h){return Gr(h)&&Qi(h)}function Che(h){return h===!0||h===!1||Gr(h)&&Ei(h)==se}var md=Nue||hA,Phe=tV?Ea(tV):Ade;function Ehe(h){return Gr(h)&&h.nodeType===1&&!Mb(h)}function The(h){if(h==null)return!0;if(Qi(h)&&(en(h)||typeof h=="string"||typeof h.splice=="function"||md(h)||wm(h)||sp(h)))return!h.length;var w=li(h);if(w==ge||w==je)return!h.size;if(Ib(h))return!$M(h).length;for(var A in h)if(or.call(h,A))return!1;return!0}function Ohe(h,w){return Eb(h,w)}function Ihe(h,w,A){A=typeof A=="function"?A:n;var H=A?A(h,w):n;return H===n?Eb(h,w,n,A):!!H}function oA(h){if(!Gr(h))return!1;var w=Ei(h);return w==le||w==ce||typeof h.message=="string"&&typeof h.name=="string"&&!Mb(h)}function khe(h){return typeof h=="number"&&xV(h)}function eu(h){if(!Fr(h))return!1;var w=Ei(h);return w==Q||w==ue||w==fe||w==Oe}function z5(h){return typeof h=="number"&&h==cn(h)}function H1(h){return typeof h=="number"&&h>-1&&h%1==0&&h<=V}function Fr(h){var w=typeof h;return h!=null&&(w=="object"||w=="function")}function Gr(h){return h!=null&&typeof h=="object"}var V5=nV?Ea(nV):Rde;function Mhe(h,w){return h===w||AM(h,w,KM(w))}function Ahe(h,w,A){return A=typeof A=="function"?A:n,AM(h,w,KM(w),A)}function $he(h){return H5(h)&&h!=+h}function Rhe(h){if(gfe(h))throw new Kt(i);return DV(h)}function Dhe(h){return h===null}function _he(h){return h==null}function H5(h){return typeof h=="number"||Gr(h)&&Ei(h)==xe}function Mb(h){if(!Gr(h)||Ei(h)!=be)return!1;var w=g1(h);if(w===null)return!0;var A=or.call(w,"constructor")&&w.constructor;return typeof A=="function"&&A instanceof A&&f1.call(A)==Aue}var iA=rV?Ea(rV):Dde;function Lhe(h){return z5(h)&&h>=-V&&h<=V}var U5=oV?Ea(oV):_de;function U1(h){return typeof h=="string"||!en(h)&&Gr(h)&&Ei(h)==de}function Oa(h){return typeof h=="symbol"||Gr(h)&&Ei(h)==Re}var wm=iV?Ea(iV):Lde;function Nhe(h){return h===n}function Fhe(h){return Gr(h)&&li(h)==Ae}function jhe(h){return Gr(h)&&Ei(h)==Ne}var Bhe=D1(RM),zhe=D1(function(h,w){return h<=w});function W5(h){if(!h)return[];if(Qi(h))return U1(h)?ml(h):Xi(h);if(yb&&h[yb])return bue(h[yb]());var w=li(h),A=w==ge?wM:w==je?c1:xm;return A(h)}function tu(h){if(!h)return h===0?h:0;if(h=gs(h),h===U||h===-U){var w=h<0?-1:1;return w*z}return h===h?h:0}function cn(h){var w=tu(h),A=w%1;return w===w?A?w-A:w:0}function G5(h){return h?rp(cn(h),0,G):0}function gs(h){if(typeof h=="number")return h;if(Oa(h))return W;if(Fr(h)){var w=typeof h.valueOf=="function"?h.valueOf():h;h=Fr(w)?w+"":w}if(typeof h!="string")return h===0?h:+h;h=dV(h);var A=Zt.test(h);return A||Rr.test(h)?nue(h.slice(2),A?2:8):St.test(h)?W:+h}function q5(h){return oc(h,Ji(h))}function Vhe(h){return h?rp(cn(h),-V,V):h===0?h:0}function Jn(h){return h==null?"":Ta(h)}var Hhe=ym(function(h,w){if(Ib(w)||Qi(w)){oc(w,_o(w),h);return}for(var A in w)or.call(w,A)&&Sb(h,A,w[A])}),K5=ym(function(h,w){oc(w,Ji(w),h)}),W1=ym(function(h,w,A,H){oc(w,Ji(w),h,H)}),Uhe=ym(function(h,w,A,H){oc(w,_o(w),h,H)}),Whe=Jc(TM);function Ghe(h,w){var A=gm(h);return w==null?A:TV(A,w)}var qhe=bn(function(h,w){h=dr(h);var A=-1,H=w.length,q=H>2?w[2]:n;for(q&&Ti(w[0],w[1],q)&&(H=1);++A1),te}),oc(h,GM(h),A),H&&(A=ps(A,d|f|p,ofe));for(var q=w.length;q--;)FM(A,w[q]);return A});function dme(h,w){return X5(h,V1(Ft(w)))}var fme=Jc(function(h,w){return h==null?{}:jde(h,w)});function X5(h,w){if(h==null)return{};var A=Dr(GM(h),function(H){return[H]});return w=Ft(w),zV(h,A,function(H,q){return w(H,q[0])})}function pme(h,w,A){w=pd(w,h);var H=-1,q=w.length;for(q||(q=1,h=n);++Hw){var H=h;h=w,w=H}if(A||h%1||w%1){var q=SV();return si(h+q*(w-h+tue("1e-"+((q+"").length-1))),w)}return _M(h,w)}var Pme=vm(function(h,w,A){return w=w.toLowerCase(),h+(A?Z5(w):w)});function Z5(h){return lA(Jn(h).toLowerCase())}function eH(h){return h=Jn(h),h&&h.replace(Ca,hue).replace(Wce,"")}function Eme(h,w,A){h=Jn(h),w=Ta(w);var H=h.length;A=A===n?H:rp(cn(A),0,H);var q=A;return A-=w.length,A>=0&&h.slice(A,q)==w}function Tme(h){return h=Jn(h),h&&So.test(h)?h.replace(Wn,mue):h}function Ome(h){return h=Jn(h),h&&Kf.test(h)?h.replace(Gc,"\\$&"):h}var Ime=vm(function(h,w,A){return h+(A?"-":"")+w.toLowerCase()}),kme=vm(function(h,w,A){return h+(A?" ":"")+w.toLowerCase()}),Mme=r5("toLowerCase");function Ame(h,w,A){h=Jn(h),w=cn(w);var H=w?dm(h):0;if(!w||H>=w)return h;var q=(w-H)/2;return R1(w1(q),A)+h+R1(b1(q),A)}function $me(h,w,A){h=Jn(h),w=cn(w);var H=w?dm(h):0;return w&&H>>0,A?(h=Jn(h),h&&(typeof w=="string"||w!=null&&!iA(w))&&(w=Ta(w),!w&&um(h))?hd(ml(h),0,A):h.split(w,A)):[]}var jme=vm(function(h,w,A){return h+(A?" ":"")+lA(w)});function Bme(h,w,A){return h=Jn(h),A=A==null?0:rp(cn(A),0,h.length),w=Ta(w),h.slice(A,A+w.length)==w}function zme(h,w,A){var H=Z.templateSettings;A&&Ti(h,w,A)&&(w=n),h=Jn(h),w=W1({},w,H,u5);var q=W1({},w.imports,H.imports,u5),te=_o(q),he=bM(q,te),ye,Ee,Xe=0,Qe=w.interpolate||qc,et="__p += '",ht=xM((w.escape||qc).source+"|"+Qe.source+"|"+(Qe===Nt?Ke:qc).source+"|"+(w.evaluate||qc).source+"|$","g"),Rt="//# sourceURL="+(or.call(w,"sourceURL")?(w.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xce+"]")+` +`;h.replace(ht,function(Vt,Tn,Rn,Ia,Oi,ka){return Rn||(Rn=Ia),et+=h.slice(Xe,ka).replace(Lz,gue),Tn&&(ye=!0,et+=`' + +__e(`+Tn+`) + +'`),Oi&&(Ee=!0,et+=`'; +`+Oi+`; +__p += '`),Rn&&(et+=`' + +((__t = (`+Rn+`)) == null ? '' : __t) + +'`),Xe=ka+Vt.length,Vt}),et+=`'; +`;var zt=or.call(w,"variable")&&w.variable;if(!zt)et=`with (obj) { +`+et+` } -`;else if(Hr.test(jt))throw new Kt(s);nt=(Pe?nt.replace(_t,""):nt).replace(kt,"$1").replace(yn,"$1;"),nt="function("+(jt||"obj")+`) { -`+(jt?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ye?", __e = _.escape":"")+(Pe?`, __j = Array.prototype.join; +`;else if(Wr.test(zt))throw new Kt(s);et=(Ee?et.replace(Ot,""):et).replace(xt,"$1").replace(vn,"$1;"),et="function("+(zt||"obj")+`) { +`+(zt?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(ye?", __e = _.escape":"")+(Ee?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; -`)+nt+`return __p -}`;var un=nH(function(){return Un(te,$t+"return "+nt).apply(n,he)});if(un.source=nt,sA(un))throw un;return un}function Gme(h){return Xn(h).toLowerCase()}function qme(h){return Xn(h).toUpperCase()}function Kme(h,b,M){if(h=Xn(h),h&&(M||b===n))return dV(h);if(!h||!(b=Ta(b)))return h;var U=gl(h),q=gl(b),te=fV(U,q),he=pV(U,q)+1;return hd(U,te,he).join("")}function Yme(h,b,M){if(h=Xn(h),h&&(M||b===n))return h.slice(0,mV(h)+1);if(!h||!(b=Ta(b)))return h;var U=gl(h),q=pV(U,gl(b))+1;return hd(U,0,q).join("")}function Xme(h,b,M){if(h=Xn(h),h&&(M||b===n))return h.replace(Yf,"");if(!h||!(b=Ta(b)))return h;var U=gl(h),q=fV(U,gl(b));return hd(U,q).join("")}function Qme(h,b){var M=I,U=R;if(Dr(b)){var q="separator"in b?b.separator:q;M="length"in b?ln(b.length):M,U="omission"in b?Ta(b.omission):U}h=Xn(h);var te=h.length;if(um(h)){var he=gl(h);te=he.length}if(M>=te)return h;var ye=M-dm(U);if(ye<1)return U;var Pe=he?hd(he,0,ye).join(""):h.slice(0,ye);if(q===n)return Pe+U;if(he&&(ye+=Pe.length-ye),lA(q)){if(h.slice(ye).search(q)){var Ye,Xe=Pe;for(q.global||(q=PM(q.source,Xn(Fe.exec(q))+"g")),q.lastIndex=0;Ye=q.exec(Xe);)var nt=Ye.index;Pe=Pe.slice(0,nt===n?ye:nt)}}else if(h.indexOf(Ta(q),ye)!=ye){var ht=Pe.lastIndexOf(q);ht>-1&&(Pe=Pe.slice(0,ht))}return Pe+U}function Jme(h){return h=Xn(h),h&&wo.test(h)?h.replace(Fn,Oue):h}var Zme=vm(function(h,b,M){return h+(M?" ":"")+b.toUpperCase()}),dA=r5("toUpperCase");function tH(h,b,M){return h=Xn(h),b=M?n:b,b===n?Sue(h)?Mue(h):pue(h):h.match(b)||[]}var nH=vn(function(h,b){try{return Ca(h,n,b)}catch(M){return sA(M)?M:new Kt(M)}}),ege=Zc(function(h,b){return ds(b,function(M){M=ac(M),Qc(h,M,iA(h[M],h))}),h});function tge(h){var b=h==null?0:h.length,M=Nt();return h=b?Mr(h,function(U){if(typeof U[1]!="function")throw new fs(a);return[M(U[0]),U[1]]}):[],vn(function(U){for(var q=-1;++qB)return[];var M=G,U=ii(h,G);b=Nt(b),h-=G;for(var q=xM(U,b);++M0||b<0)?new In(M):(h<0?M=M.takeRight(-h):h&&(M=M.drop(h)),b!==n&&(b=ln(b),M=b<0?M.dropRight(-b):M.take(b-h)),M)},In.prototype.takeRightWhile=function(h){return this.reverse().takeWhile(h).reverse()},In.prototype.toArray=function(){return this.take(G)},oc(In.prototype,function(h,b){var M=/^(?:filter|find|map|reject)|While$/.test(b),U=/^(?:head|last)$/.test(b),q=J[U?"take"+(b=="last"?"Right":""):b],te=U||/^find/.test(b);q&&(J.prototype[b]=function(){var he=this.__wrapped__,ye=U?[1]:arguments,Pe=he instanceof In,Ye=ye[0],Xe=Pe||en(he),nt=function(Pn){var Mn=q.apply(J,ld([Pn],ye));return U&&ht?Mn[0]:Mn};Xe&&M&&typeof Ye=="function"&&Ye.length!=1&&(Pe=Xe=!1);var ht=this.__chain__,$t=!!this.__actions__.length,jt=te&&!ht,un=Pe&&!$t;if(!te&&Xe){he=un?he:new In(this);var Bt=h.apply(he,ye);return Bt.__actions__.push({func:j1,args:[nt],thisArg:n}),new ps(Bt,ht)}return jt&&un?h.apply(this,ye):(Bt=this.thru(nt),jt?U?Bt.value()[0]:Bt.value():Bt)})}),ds(["pop","push","shift","sort","splice","unshift"],function(h){var b=d1[h],M=/^(?:push|sort|unshift)$/.test(h)?"tap":"thru",U=/^(?:pop|shift)$/.test(h);J.prototype[h]=function(){var q=arguments;if(U&&!this.__chain__){var te=this.value();return b.apply(en(te)?te:[],q)}return this[M](function(he){return b.apply(en(he)?he:[],q)})}}),oc(In.prototype,function(h,b){var M=J[b];if(M){var U=M.name+"";tr.call(mm,U)||(mm[U]=[]),mm[U].push({name:b,func:M})}}),mm[$1(n,w).name]=[{name:"wrapper",func:n}],In.prototype.clone=Jue,In.prototype.reverse=Zue,In.prototype.value=ede,J.prototype.at=kpe,J.prototype.chain=Mpe,J.prototype.commit=Ape,J.prototype.next=$pe,J.prototype.plant=_pe,J.prototype.reverse=Dpe,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=Npe,J.prototype.first=J.prototype.head,yb&&(J.prototype[yb]=Rpe),J},fm=Aue();Zf?((Zf.exports=fm)._=fm,pM._=fm):Go._=fm}).call(Di)})(ZE,ZE.exports);var Bwt=ZE.exports;function AN({callback:e}){const[t,n]=y.useState(null),[r,o]=y.useState(""),[i,a]=y.useState(!0),[s,l]=y.useState([]),[c,u]=Ge(),d=y.useMemo(()=>KI(f=>sDe(f,u.language,i).then(p=>l(p)),200),[u.language,i]);return y.useEffect(()=>{if(r===""){l(t?[t]:[]);return}return d(r),()=>{}},[t,r,d]),X(Mt,{children:[C(Yl,{id:"exercise-name-autocomplete",getOptionLabel:f=>f.value,"data-testid":"autocomplete",filterOptions:f=>f,options:s,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:t,noOptionsText:c("noResults"),isOptionEqualToValue:(f,p)=>f.value===p.value,onChange:(f,p)=>{l(p?[p,...s]:s),n(p),e(p)},onInputChange:(f,p)=>{o(p)},renderInput:f=>C(hn,{...f,label:c("exercises.searchExerciseName"),fullWidth:!0,InputProps:{...f.InputProps,startAdornment:X(Mt,{children:[C(so,{position:"start",children:C(AB,{})}),f.InputProps.startAdornment]})}}),renderOption:(f,p)=>sY("li",{...f,key:`exercise${p.data.id}`,"data-testid":`autocompleter-result-${p.data.id}`},X(es,{disablePadding:!0,component:"div",children:[C(zi,{children:p.data.image?C(Xl,{alt:"",src:`${HF}${p.data.image}`,variant:"rounded"}):C(Ju,{fontSize:"large"})}),C(ho,{primary:p.value,primaryTypographyProps:{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},secondary:p.data.category})]}))}),u.language!==Iy&&C(Hw,{children:C(mh,{control:C(Hu,{checked:i,onChange:(f,p)=>a(p)}),label:c("alsoSearchEnglish")})})]})}function zwt(e){var d,f;const[t,n]=K.useState(null),[r,o]=K.useState(null),[i]=Ge(),a=Qh(),s=()=>{o(null),n(null)},l=async()=>{var p;await cDe((p=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:p.id),e.onClose(),e.onChangeLanguage()},c=async(p=!1)=>{p?await SU(e.currentExercise.id,r==null?void 0:r.uuid):await SU(e.currentExercise.id),e.onClose(),a("../overview")},u=async p=>{const m=p!==void 0?p:t;if(m!==null)try{const g=await $I(m);o(g)}catch{o(null)}};return X(Mt,{children:[C(TOe,{id:"alert-dialog-title",children:i("delete")}),X($J,{children:[C("p",{children:i("exercises.deleteExerciseBody",{name:(d=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:d.name,language:(f=e.currentLanguage)==null?void 0:f.nameLong})}),C("p",{children:i("cannotBeUndone")}),C("p",{children:C("b",{children:i("exercises.replacements")})}),C("p",{children:i("exercises.replacementsInfoText")}),C("p",{children:i("exercises.replacementsSearch")}),C(AN,{callback:p=>{p!==null&&(n(p.data.base_id),u(p.data.base_id))}}),C(hn,{"data-testid":"exercise-id-field",id:"foo",label:"Exercise ID",onBlur:()=>u(),onChange:async p=>{n(p.target.value!==""?parseInt(p.target.value):null)},value:t??"",InputProps:{endAdornment:C(so,{position:"start",children:C(kn,{onClick:()=>u(),children:C(tyt,{})})})},fullWidth:!0,variant:"standard"}),r===null&&C(Mt,{children:C("p",{children:C("i",{children:i("exercises.noReplacementSelected")})})}),r!==null&&X(Mt,{children:[X("p",{children:["Selected exercise for replacement:",C(Ql,{title:i("copyToClipboard"),children:C(kn,{onClick:()=>navigator.clipboard.writeText(r.id.toString()),children:C(ayt,{})})})]}),X(es,{disablePadding:!0,children:[C(AF,{children:C(Xl,{children:r.mainImage?C(Xl,{alt:"",src:`${HF}${r.mainImage.url}`,variant:"rounded"}):C(Ju,{})})}),C(ho,{primary:r.getTranslation().name,secondary:`${r.id} (${r.uuid})`}),C(kn,{onClick:s,children:C(oyt,{})})]})]})]}),X(AJ,{children:[C(yt,{onClick:()=>e.onClose(),children:i("cancel")}),C(yt,{"data-testid":"button-delete-translation",size:"small",onClick:l,variant:"contained",children:i("exercises.deleteTranslation")}),C(yt,{"data-testid":"button-delete-all",size:"small",onClick:()=>c(),variant:"contained",children:i("exercises.deleteExerciseFull")}),C(yt,{"data-testid":"button-delete-and-replace",size:"small",disabled:r===null,onClick:()=>c(!0),variant:"contained",children:i("exercises.deleteExerciseReplace")})]})]})}const Vwt="_root_l288f_1",Hwt="_detail_language_l288f_4",Uwt="_detail_l288f_4",Wwt="_detail_arrow_l288f_18",Gwt="_languages_l288f_28",qwt="_language_l288f_28",Kwt="_language_menu_l288f_40",Ywt="_header_l288f_52",Xwt="_toolbar_l288f_55",Qwt="_dots_l288f_68",gp={root:Vwt,detail_language:Hwt,detail:Uwt,detail_arrow:Wwt,languages:Gwt,language:qwt,language_menu:Kwt,header:Ywt,toolbar:Xwt,dots:Qwt},Jwt=({exercise:e,languages:t,changeLanguage:n,language:r,setEditMode:o,editMode:i})=>{var T,E,O;const[a,s]=y.useState(null),[l,c]=K.useState(!1),u=!!a,[d]=Ge(),f=Qg(rh.DELETE_EXERCISE),p=Qg(rh.EDIT_EXERCISE),m=Uc(),g=m.isSuccess&&m.data===null;let v=!1;m.isSuccess&&p.isSuccess&&(v=p.data||m.data!==null&&m.data.isTrustworthy);const w=k=>{s(k.currentTarget)},x=()=>{s(null)},S=k=>{n(k),x()},P=t.map(k=>X(tn,{onClick:()=>S(k),selected:(r==null?void 0:r.id)===k.id,children:[C(ho,{children:k.nameLong}),C(zi,{children:e.availableLanguages.includes(k.id)?C(gyt,{}):C(Gi,{})})]},k.nameShort));return C(He,{container:!0,children:C(He,{size:12,children:X("div",{className:gp.root,children:[C(MJ,{open:l,onClose:()=>c(!1),children:C(zwt,{onClose:()=>c(!1),onChangeLanguage:()=>n(t[0]),currentExercise:e,currentLanguage:r})}),X("div",{className:gp.detail_language,children:[X("div",{className:gp.detail,children:[C(Vs,{to:"../overview",children:d("exercises.exercises")})," > ",(T=e.getTranslation(r))==null?void 0:T.name]}),C("div",{className:gp.languages,children:X("div",{className:gp.language,children:[C(yt,{size:"small",id:"basic-button",onClick:w,startIcon:C(GS,{}),children:r==null?void 0:r.nameLong}),X(ss,{id:"basic-menu",anchorEl:a,open:u,onClose:x,MenuListProps:{"aria-labelledby":"basic-button"},sx:{padding:20},children:[C(tn,{disabled:!0,children:d("exercises.changeExerciseLanguage")}),C(Za,{}),P]})]})})]}),X("div",{className:gp.header,children:[C(dt,{gutterBottom:!0,variant:"h2",margin:0,sx:{mt:2},children:(E=e.getTranslation(r))==null?void 0:E.name}),!g&&X("nav",{className:gp.toolbar,children:[f.isSuccess&&f.data&&(r==null?void 0:r.id)===((O=e.getTranslation(r))==null?void 0:O.language)&&C(yt,{onClick:()=>c(!0),children:d("delete")}),v&&C(yt,{onClick:()=>o(!0),disabled:i,children:"EDIT"}),C(yt,{onClick:()=>o(!1),disabled:!i,children:"VIEW"})]})]}),X(Ut,{direction:"row",spacing:1,mt:2,children:[C(hh,{label:d(Wi(e.category.name)),size:"small"}),e.equipment.map(k=>C(hh,{label:d(Wi(k.name)),variant:"outlined",size:"small"},k.id))]})]})})})},Qo=()=>C($n,{sx:{height:40}}),Zwt=()=>{var m;const[e,t]=y.useState(R2e),[n,r]=y.useState(!1),o=Jh(),i=o.baseID?Bwt.parseInt(o.baseID):0,{i18n:a}=Ge(),s=Qh(),l=Uk(),c=yo({queryKey:[B2e,i],queryFn:()=>$I(i),enabled:l.isSuccess}),u=yo({queryKey:[j2e,(m=c.data)==null?void 0:m.variationId],queryFn:()=>{var g;return oDe((g=c.data)==null?void 0:g.variationId)},enabled:c.isSuccess});if(K.useEffect(()=>{if(l.data===void 0)return;const g=g_(a.language,l.data);t(g)},[l.data]),c.isError||l.isError||u.isError)return s("/not-found"),null;const d=g=>{const v=g_(g.nameShort,l.data);v!==void 0&&t(v)},f=u.isSuccess?u.data.filter(g=>g.id!==i):[];let p;return c.isSuccess&&l.isSuccess&&(p=n?C(_wt,{exercise:c.data,language:e}):C(jwt,{exercise:c.data,language:e,variations:f,setEditMode:r})),X(Mt,{children:[c.isSuccess&&l.isSuccess&&C(Vu,{children:C(Jwt,{exercise:c.data,languages:l.data,changeLanguage:d,language:e,setEditMode:r,editMode:n})}),C(Qo,{}),X(Vu,{maxWidth:"lg",children:[c.isLoading&&l.isLoading&&C(qa,{}),p]})]})};function Yse(e){const[t]=Ge(),[n,r,o]=dl(e.fieldName),[i,a]=y.useState(""),s=u=>{o.setValue(n.value.filter((d,f)=>f!==u))},l=(u,d)=>{n.value[u]=d,o.setValue(n.value)},c=()=>{n.value.push(i),o.setValue(n.value),a("")};return X(Mt,{children:[C(He,{size:12,children:C(hn,{fullWidth:!0,label:t("exercises.newNote"),sx:{mb:3},variant:"standard",value:i,onChange:u=>a(u.target.value),error:r.touched&&!!r.error,helperText:r.touched&&r.error?r.error:t("exercises.notesHelpText"),InputProps:{endAdornment:C(so,{position:"end",children:C(kn,{onClick:c,children:C(Gi,{})})})}})}),n.value.map((u,d)=>C(hn,{fullWidth:!0,value:u,onChange:f=>l(d,f.target.value),sx:{mt:2},variant:"standard",error:r.touched&&!!r.error,InputProps:{endAdornment:C(so,{position:"end",children:C(kn,{onClick:()=>s(d),children:C(YB,{})})})}},d))]})}const ext=({onContinue:e,onBack:t})=>{const[n]=Ge(),[r,o]=lb(),i=fl({description:sz(n),notes:Ase(n)});return C(ul,{initialValues:{description:r.descriptionEn,notes:r.notesEn},validationSchema:i,onSubmit:a=>{o(z0t(a.description)),o(V0t(a.notes)),e()},children:C(ls,{children:X(Ut,{children:[C(lz,{fieldName:"description"}),C(Qo,{}),C(Yse,{fieldName:"notes"}),C(He,{container:!0,children:C(He,{display:"flex",justifyContent:"end",size:12,children:C($n,{sx:{mb:2},children:X("div",{children:[C(yt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(yt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})})},txt=({onContinue:e,onBack:t})=>{const[n]=Ge(),r=Uk(),[o,i]=lb(),[a,s]=y.useState(o.languageId!==null),l=fl(a?{description:sz(n),name:iz(n),alternativeNames:az(n),notes:Ase(n),language:la().required()}:{});return C(ul,{initialValues:{name:o.nameI18n,alternativeNames:o.alternativeNamesI18n,description:o.descriptionI18n,language:o.languageId===null?"":o.languageId,notes:o.notesI18n},validationSchema:l,onSubmit:c=>{i(U0t(c.name)),i(W0t(c.description)),i(q0t(c.alternativeNames)),i(ewt(c.language===""?null:c.language)),i(G0t(c.notes)),e()},children:c=>X(ls,{children:[X(Ut,{spacing:2,children:[C(Hw,{children:C(mh,{checked:a,onClick:()=>s(!a),control:C(Hu,{}),label:n("exercises.translateExerciseNow")})}),a&&X(Mt,{children:[r.isLoading?C($n,{children:C(qa,{})}):X(Tv,{fullWidth:!0,children:[C(Ev,{id:"label-language",children:n("language")}),C(_h,{labelId:"label-language",id:"language",value:c.getFieldProps("language").value,onChange:u=>{c.setFieldValue(c.getFieldProps("language").name,u.target.value)},label:n("language"),error:!!(c.touched.language&&c.errors.language),children:r.data.filter(u=>u.id!==vh).map(u=>X(tn,{value:u.id,children:[u.nameShort," - ",u.nameLong]},u.id))})]}),C(oz,{fieldName:"name"}),C(rz,{fieldName:"alternativeNames"}),C(lz,{fieldName:"description"}),C(Qo,{}),C(Yse,{fieldName:"notes"})]})]}),C(He,{container:!0,children:C(He,{display:"flex",justifyContent:"end",size:12,children:C($n,{sx:{mb:2},children:X("div",{children:[C(yt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(yt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})};function nxt(e){const[t]=Ge(),[n,r]=dl(e.fieldName);return C(hn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authors"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function rxt(e){const[t]=Ge(),[n,r]=dl(e.fieldName);return C(hn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authorProfile"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function oxt(e){const[t]=Ge(),[n,r]=dl(e.fieldName);return C(hn,{fullWidth:!0,id:e.fieldName,label:t("licenses.derivativeSourceUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:t("licenses.derivativeSourceUrlHelper")||r.touched&&r.error,...n})}function ixt(e){const[t]=Ge(),[n,r]=dl(e.fieldName);return C(hn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalObjectUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function axt(e){const[t]=Ge(),[n,r]=dl(e.fieldName);return C(hn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalTitle"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function sxt(e){const[t]=Ge(),[n,r]=y.useState(hu.PHOTO),[o,i,a]=dl(e.fieldName);return X(O$e,{value:n,exclusive:!0,fullWidth:!0,onChange:(l,c)=>{r(c),a.setValue(c)},"aria-label":"text alignment",children:[C(Gb,{value:hu.PHOTO,children:X(Ut,{justifyContent:"center",alignItems:"center",children:[C(myt,{}),C(dt,{variant:"caption",children:t("exercises.imageStylePhoto")})]})}),C(Gb,{value:hu.THREE_D,children:X(Ut,{justifyContent:"center",alignItems:"center",children:[C(uyt,{}),C(dt,{variant:"caption",children:t("exercises.imageStyle3D")})]})}),C(Gb,{value:hu.LINE_ART,children:X(Ut,{justifyContent:"center",alignItems:"center",children:[C(dyt,{}),C(dt,{variant:"caption",children:t("exercises.imageStyleLine")})]})}),C(Gb,{value:hu.LOW_POLY,children:X(Ut,{justifyContent:"center",alignItems:"center",children:[C(fyt,{}),C(dt,{variant:"caption",children:t("exercises.imageStyleLowPoly")})]})}),C(Gb,{value:hu.OTHER,children:X(Ut,{justifyContent:"center",alignItems:"center",children:[C(pyt,{}),C(dt,{variant:"caption",children:t("exercises.imageStyleOther")})]})})]})}const lxt=({onContinue:e,onBack:t})=>{const[n]=Ge(),r=Uc(),[o,i]=lb(),[a,s]=y.useState(o.images),[l,c]=y.useState(void 0),[u,d]=K.useState(!1),f=()=>d(!1);y.useEffect(()=>{i(twt(a))},[i,a]);const p=x=>{var T;if(!((T=x.target.files)!=null&&T.length))return;const[S]=x.target.files,P=URL.createObjectURL(S);d(!0),c({url:P,file:S,author:"",authorUrl:"",title:"",derivativeSourceUrl:"",objectUrl:"",style:hu.PHOTO.toString()})},m=x=>{s(a.concat({url:l==null?void 0:l.url,file:l==null?void 0:l.file,author:x.author,authorUrl:x.authorUrl,title:x.title,derivativeSourceUrl:x.derivativeSourceUrl,objectUrl:x.objectUrl,style:x.imageStyle.toString()})),f()},g=x=>{const S=a.filter(P=>P.url!==x);s(S)},v=()=>{e()};return X("div",{children:[C(Pv,{open:u,onClose:f,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:X($n,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:600,bgcolor:"background.paper",boxShadow:24,p:4},children:[C(dt,{id:"modal-modal-title",variant:"h6",component:"h2",children:n("exercises.imageDetails")}),X(He,{container:!0,spacing:2,children:[C(He,{size:4,children:l&&C("img",{style:{width:"100%"},src:l.url,alt:"",loading:"lazy"})}),C(He,{size:8,children:C(ul,{initialValues:{title:"",objectUrl:"",author:r.isSuccess?r.data.username:"",authorUrl:"",derivativeSourceUrl:"",imageStyle:hu.PHOTO},onSubmit:x=>{console.log(x),m(x)},children:x=>X(ls,{children:[X(Ut,{spacing:2,children:[C(axt,{fieldName:"title"}),C(ixt,{fieldName:"objectUrl"}),C(nxt,{fieldName:"author"}),C(rxt,{fieldName:"authorUrl"}),C(oxt,{fieldName:"derivativeSourceUrl"}),C(sxt,{fieldName:"imageStyle"}),X(Bu,{icon:C(qae,{fontSize:"inherit"}),severity:"info",children:["By submitting this image, you agree to release it under the ",C("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/",target:"_blank",rel:"noreferrer",children:"CC BY-SA 4.0"})," license. The image must be either your own work or the author must have released in under a license compatible with CC BY-SA 4.0."]})]}),C(Ut,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(yt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("add")})})]})})})]})]})}),C(dt,{children:n("exercises.compatibleImagesCC")}),X(Ut,{direction:"row",justifyContent:"center",children:[X("div",{children:[C("label",{htmlFor:"camera-input",children:C(ryt,{fontSize:"large",sx:{m:2}})}),C("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:p})]}),X("div",{children:[C("label",{htmlFor:"image-input",children:C(iyt,{fontSize:"large",sx:{m:2}})}),C("input",{type:"file",accept:"image/*",name:"image-file",id:"image-input",style:{display:"none"},onChange:p})]})]}),C(NJ,{cols:3,style:{maxHeight:"400px"},children:a.map(x=>X(LJ,{children:[C("img",{style:{maxHeight:"400px",maxWidth:"400px"},src:x.url,alt:"",loading:"lazy"}),C(PIe,{title:x.title,subtitle:x.author,actionIcon:C(kn,{onClick:()=>g(x.url),sx:{color:"white"},children:C(syt,{})})})]},x.url))}),C(dt,{children:n("forms.supportedImageFormats")}),C(He,{container:!0,children:C(He,{display:"flex",justifyContent:"end",size:12,children:C($n,{sx:{mb:2},children:X(Mt,{children:[C(yt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(yt,{variant:"contained",onClick:v,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})},cxt="exercisecomment",$7=async e=>{const t=new WZ,n=Ct(cxt),r=await ft.post(n,t.toJson(e),{headers:It()});return t.fromJson(r.data)},uxt="variation",dxt=async()=>{const e=Ct(uxt);return(await ft.post(e,{},{headers:It()})).data.id},fxt=({onBack:e})=>{const[t,n]=Ge(),[r]=lb(),o=Qh(),i=Vk(),a=Uk(),s=XS(),l=Hk(),c=Uc(),[u,d]=y.useState("initial"),f=async()=>{d("loading");let m;r.newVariationBaseId!==null?m=await dxt():m=r.variationId;const g=await iDe(r.category,r.equipment,r.muscles,r.musclesSecondary,m,c.data.username),v=await m_(g,vh,r.nameEn,r.descriptionEn,c.data.username);for(const w of r.alternativeNamesEn)await y_(v.id,w);for(const w of r.images)await QZ({exerciseId:g,image:w.file,imageData:w});for(const w of r.notesEn)await $7(new h_(null,v.id,w));if(r.languageId!==null){const w=await m_(g,r.languageId,r.nameI18n,r.descriptionI18n,c.data.username);for(const x of r.alternativeNamesI18n)await y_(w.id,x);for(const x of r.notesI18n)await $7(new h_(null,w.id,x))}console.log("Exercise created"),d("done")},p=()=>{o(Cn(bn.EXERCISE_OVERVIEW,n.language))};return l.isLoading||a.isLoading||s.isLoading||i.isLoading?C(vo,{}):X(Mt,{children:[C(dt,{variant:"h6",children:t("exercises.step1HeaderBasics")}),C(Gu,{children:C(Uu,{children:X(Wu,{children:[X(Yt,{children:[C(Ie,{children:t("name")}),C(Ie,{children:r.nameEn})]}),X(Yt,{children:[C(Ie,{children:t("exercises.alternativeNames")}),C(Ie,{children:r.alternativeNamesEn.join(", ")})]}),X(Yt,{children:[C(Ie,{children:t("description")}),C(Ie,{children:r.descriptionEn})]}),X(Yt,{children:[C(Ie,{children:t("exercises.notes")}),C(Ie,{children:r.notesEn.map(m=>X(Mt,{children:[m,C("br",{})]}))})]}),X(Yt,{children:[C(Ie,{children:t("category")}),C(Ie,{children:t(Wi(i.data.find(m=>m.id===r.category).name))})]}),X(Yt,{children:[C(Ie,{children:t("exercises.equipment")}),C(Ie,{children:r.equipment.map(m=>t(Wi(l.data.find(g=>g.id===m).name))).join(", ")})]}),X(Yt,{children:[C(Ie,{children:t("exercises.muscles")}),C(Ie,{children:r.muscles.map(m=>s.data.find(g=>g.id===m).getName(t)).join(", ")})]}),X(Yt,{children:[C(Ie,{children:t("exercises.secondaryMuscles")}),C(Ie,{children:r.musclesSecondary.map(m=>s.data.find(g=>g.id===m).getName(t)).join(", ")})]}),X(Yt,{children:[C(Ie,{children:t("exercises.variations")}),X(Ie,{children:[r.variationId," / ",r.newVariationBaseId]})]})]})})}),r.images.length>0&&C(NJ,{cols:3,style:{maxHeight:"200px"},children:r.images.map(m=>C(LJ,{children:C("img",{style:{maxHeight:"200px",maxWidth:"200px"},src:m.url,alt:"",loading:"lazy"})},m.url))}),r.languageId!==null&&X(Mt,{children:[C(dt,{variant:"h6",sx:{mt:3},children:a.data.find(m=>m.id===r.languageId).nameLong}),C(Gu,{children:C(Uu,{children:X(Wu,{children:[X(Yt,{children:[C(Ie,{children:t("name")}),C(Ie,{children:r.nameI18n})]}),X(Yt,{children:[C(Ie,{children:t("exercises.alternativeNames")}),C(Ie,{children:r.alternativeNamesI18n.join(", ")})]}),X(Yt,{children:[C(Ie,{children:t("description")}),C(Ie,{children:r.descriptionI18n})]}),X(Yt,{children:[C(Ie,{children:t("exercises.notes")}),C(Ie,{children:r.notesI18n.map(m=>X(Mt,{children:[m,C("br",{})]}))})]})]})})})]}),u!=="done"?C(Bu,{severity:"info",sx:{mt:2},children:t("exercises.checkInformationBeforeSubmitting")}):X(Bu,{severity:"success",sx:{mt:2},children:[C(PT,{children:t("success")}),t("exercises.cacheWarning")]}),C(He,{container:!0,children:C(He,{display:"flex",justifyContent:"end",size:12,children:C($n,{sx:{mb:2},children:X("div",{children:[u!=="done"&&C(yt,{onClick:e,sx:{mt:1,mr:1},children:t("goBack")}),u!=="done"&&C(yt,{variant:"contained",disabled:u!=="initial",onClick:f,sx:{mt:1,mr:1},color:"info",children:t("exercises.submitExercise")}),u==="done"&&X(yt,{variant:"contained",onClick:p,sx:{mt:1,mr:1},color:"success",children:[t("overview"),C(hyt,{})]})]})})})})]})},pxt=()=>{const[e]=Ge(),[t,n]=K.useState(0),r=()=>{n(i=>i+1)},o=()=>{n(i=>i-1)};return C(rwt,{children:X(Vu,{maxWidth:"md",children:[C(Ut,{direction:"row",children:C(dt,{gutterBottom:!0,variant:"h3",component:"div",children:e("exercises.contributeExercise")})}),C($n,{children:X(sAe,{activeStep:t,orientation:"vertical",children:[X(Mm,{children:[C(Id,{children:e("exercises.step1HeaderBasics")}),C(Am,{children:C(owt,{onContinue:r,onBack:o})})]},1),X(Mm,{children:[C(Id,{children:e("exercises.variations")}),C(Am,{children:C(awt,{onContinue:r,onBack:o})})]},2),X(Mm,{children:[C(Id,{children:e("description")}),C(Am,{children:C(ext,{onContinue:r,onBack:o})})]},3),X(Mm,{children:[C(Id,{children:e("translation")}),C(Am,{children:C(txt,{onContinue:r,onBack:o})})]},4),X(Mm,{children:[C(Id,{children:e("images")}),C(Am,{children:C(lxt,{onContinue:r,onBack:o})})]},5),X(Mm,{children:[C(Id,{children:e("overview")}),C(Am,{children:C(fxt,{onBack:o})})]},6)]})})]})})},hxt=()=>{const[e]=Ge(),t=cz();return X(Vu,{maxWidth:"md",children:[C(dt,{variant:"h3",children:e("exercises.notEnoughRightsHeader")}),X($n,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[C(dt,{mb:2,children:e("exercises.notEnoughRights",{days:_2e})}),!t.anonymous&&!t.emailVerified&&C(yt,{variant:"contained",href:"/user/preferences",endIcon:C(eyt,{}),children:e("preferences")})]})]})},mxt=()=>{const e=cz();return C(Mt,{children:e.canContribute?C(pxt,{}):C(hxt,{})})},gxt=()=>C("div",{children:"Add Weight Page"}),yxt=({currentMonth:e,currentYear:t,onPrevMonth:n,onNextMonth:r})=>{const{i18n:o}=Ge(),i=Array.from({length:12},(a,s)=>new Date(2024,s,1).toLocaleString(o.language,{month:"long"}));return X("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",paddingBottom:"3%"},children:[C(yt,{variant:"outlined",onClick:n,children:"<"}),X(dt,{variant:"h5",children:[i[e]," ",t]}),C(yt,{variant:"outlined",onClick:r,children:">"})]})},vxt=({day:e,currentMonth:t,currentDate:n,selectedDay:r,onClick:o})=>{const i=ko(),a=bf(i.breakpoints.down("sm")),s=bf(i.breakpoints.down("md")),l=cf(e.date,r.date),c=cf(e.date,n),u=e.date.getMonth()===t&&(e.date.getDate()<=n.getDate()||e.date.getMonth()l||c?"white":u?d?"#E53945":"black":"gray",p=()=>a?35:s?40:50,m=()=>a?8:s?9:10,g=()=>e.measurements.length>0||e.weightEntry!==void 0,v=()=>{u&&o(e)},w=p(),x=m();return X("div",{style:{position:"relative",width:`${w}px`,height:`${w+x/2}px`,display:"flex",flexDirection:"column",alignItems:"center"},children:[C("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:`${w}px`,height:`${w}px`,fontSize:a?"0.8rem":s?"0.9rem":"1rem",color:l||c?"white":f(),backgroundColor:l?"#E53945":c?"#FEC107":"transparent",borderRadius:"50%",fontWeight:"bold",cursor:u?"pointer":"default",opacity:e.date.getMonth()!==t?.25:1},"data-testid":`day-${ei(e.date)}`,onClick:v,children:e.date.getDate()}),g()&&C("div",{style:{width:`${x}px`,height:`${x}px`,backgroundColor:"black",borderRadius:"50%",position:"absolute",bottom:0,left:"50%",transform:"translateX(-50%)",zIndex:2}})]})},bxt=({days:e,currentMonth:t,currentDate:n,selectedDay:r,onDayClick:o})=>{const{i18n:i}=Ge(),a=Array.from({length:7},(s,l)=>new Date(1970,0,l+5).toLocaleString(i.language,{weekday:"short"}));return X(He,{container:!0,spacing:1,rowSpacing:2,children:[a.map((s,l)=>C(He,{size:12/7,children:C(dt,{variant:"body1",sx:{fontWeight:"bold",textAlign:"center"},children:s})},`weekday-${l}`)),e.map((s,l)=>C(He,{size:12/7,sx:{display:"flex",justifyContent:"center"},children:C(vxt,{day:s,currentMonth:t,currentDate:n,selectedDay:r,onClick:o})},`day-${l}`))]})},wxt=({selectedDay:e})=>{const[t]=Ge(),n=t("no_entries_for_day");return X(no,{sx:{width:{xs:"auto",md:"65%"},height:{xs:"60%",md:"100%"},m:{xs:0,sm:1,md:2},p:{xs:1,sm:1.5,md:2}},children:[C(ec,{title:X(dt,{variant:"h5",component:"div",sx:{fontWeight:"bold"},children:[t("entries")," - ",e.date.toLocaleDateString()]})}),X(bi,{sx:{flex:1,overflow:"auto",display:"flex",flexDirection:"column",gap:2},children:[X("div",{className:"flex items-center gap-2",children:[X("span",{className:"font-extrabold",children:[t("weight"),": "]}),C("span",{className:`${e.weightEntry?"text-xl font-semibold":"text-gray-500"}`,children:e.weightEntry?`${e.weightEntry.weight.toFixed(1)} kg`:n})]}),X("div",{className:"flex flex-col gap-1",children:[X("span",{className:"font-bold",children:[t("measurements.measurements"),": "]}),e.measurements.length===0?C("span",{className:"text-gray-500 mt-1",children:n}):C("div",{className:"flex flex-col gap-0.5",children:e.measurements.map(r=>X("div",{children:[r.name,": ",r.value," ",r.unit]},r.name))})]})]})]})};class xxt{constructor(t,n,r,o){this.name=t,this.unit=n,this.value=r,this.date=o}}function Xse(){return yo({queryKey:[Av],queryFn:HDe})}const Sxt=()=>{const e=Vr();return oo({mutationFn:t=>WDe(t),onSuccess:()=>e.invalidateQueries({queryKey:[Av]})})},Cxt=e=>{const t=Vr();return oo({mutationFn:n=>GDe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Mv,e]}),t.invalidateQueries({queryKey:[Av]})}})},Pxt=e=>{const t=Vr();return oo({mutationFn:n=>qDe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Mv,e]}),t.invalidateQueries({queryKey:[Av]})}})};function Qse(e){return yo({queryKey:[Mv,e],queryFn:()=>UDe(e)})}const Txt=()=>{const e=Vr();return oo({mutationFn:t=>XDe(t),onError:t=>{console.log(t)},onSuccess:()=>{e.invalidateQueries({queryKey:[Mv]}),e.invalidateQueries({queryKey:[Av]})}})},Jse=()=>{const e=Vr();return oo({mutationFn:t=>YDe(t),onSuccess:()=>{e.invalidateQueries({queryKey:[Mv]}),e.invalidateQueries({queryKey:[Av]})}})},Ext=()=>{const e=Vr();return oo({mutationFn:t=>KDe(t),onSuccess:()=>e.invalidateQueries({queryKey:[Mv]})})};function Oxt(){const t=Xse().data;return(t==null?void 0:t.flatMap(n=>n.entries.map(r=>new xxt(n.name,n.unit,r.value,r.date))))??[]}const Ixt=()=>{const[e]=Ge(),n=KS().data,r=Oxt(),o=(S,P)=>{const T=new Date(S,P,1),E=[];let k=new Date(S,P,1).getDay();k=k===0?6:k-1;for(let R=0;Rcf(R.date,T)),measurements:r.filter(R=>cf(R.date,T))}),T.setDate(T.getDate()+1);k=new Date(S,P+1,0).getDay();const I=k===0?0:7-k;for(let R=1;R<=I;R++)E.push({date:new Date(S,P+1,R),weightEntry:void 0,measurements:[]});return E},i=new Date,a={date:i,weightEntry:void 0,measurements:[]},[s,l]=y.useState(i.getMonth()),[c,u]=y.useState(i.getFullYear()),d=o(c,s),[f,p]=y.useState(d.find(S=>cf(S.date,i))||a),m=ko(),g=bf(m.breakpoints.down("sm"));y.useEffect(()=>{l(f.date.getMonth()),u(f.date.getFullYear())},[f]);const v=S=>{p(S)},w=()=>{s===0?(l(11),u(c-1)):l(s-1)},x=()=>{(sC("div",{children:C(Ixt,{})}),Mxt=()=>C("div",{children:"Calories Calculator Page"}),Axt=()=>C("div",{children:"Equipments Page"}),$xt=()=>C("div",{children:"Gallery Page"}),Rxt=()=>C("div",{children:"Ingredients Page"}),_xt=()=>C("div",{children:"Login Page"}),Dxt=()=>C("div",{children:"Preferences Page"}),Nxt=()=>C("div",{children:"Public Template"}),Lxt=()=>C("div",{children:"RestApi Page"}),Fxt=()=>C("div",{children:"Your Template"}),jxt=({weight:e})=>{const t=Cvt(),[n]=Ge(),[r,o]=K.useState(null),[i,a]=K.useState(!1),s=!!r,l=m=>{o(m.currentTarget)},c=()=>{u(),f()},u=()=>{o(null)},d=()=>{t.mutate(e.id),o(null)},f=()=>a(!0),p=()=>a(!1);return X("div",{children:[C(yt,{onClick:l,children:C(Zgt,{})}),X(ss,{anchorEl:r,open:s,onClose:u,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(tn,{onClick:c,children:n("edit")}),C(tn,{onClick:d,children:n("delete")})]}),C(Yi,{title:n("edit"),isOpen:i,closeFn:p,children:C(ab,{weightEntry:e,closeFn:p})})]})},Bxt=()=>{const[e]=Ge(),[t,n]=K.useState(!1),r=()=>n(!0),o=()=>n(!1);return X("div",{children:[C(Rh,{color:"primary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Gi,{})}),C(Yi,{title:e("add"),isOpen:t,closeFn:o,children:C(ab,{closeFn:o})})]})},zxt=e=>e.map((t,n)=>n===0?{entry:t,change:0,days:Math.abs(t.date.getTime()-t.date.getTime())/(1e3*60*60*24)}:{entry:t,change:e[n].weight-e[n-1].weight,days:Math.abs(t.date.getTime()-e[n-1].date.getTime())/(1e3*60*60*24)}),Vxt=Ese(e=>({table:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),Hxt=({weights:e})=>{const t=[10,50,100],[n]=Ge(),r=Vxt(),o=zxt(e),[i,a]=y.useState(t[0]),[s,l]=y.useState(0),c=(d,f)=>{l(f)},u=d=>{a(parseInt(d.target.value,10)),l(0)};return X("div",{className:r.table,children:[X(Gu,{children:[X(Uu,{sx:{minWidth:650},"aria-label":"simple table",children:[C(Dh,{children:X(Yt,{children:[C(Ie,{align:"center",children:n("date")}),C(Ie,{align:"center",children:n("weight")}),C(Ie,{align:"center",children:n("difference")}),C(Ie,{align:"center",children:n("days")}),C(Ie,{align:"center"})]})}),C(Wu,{children:o.slice(s*i,s*i+i).map(d=>X(Yt,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[C(Ie,{component:"th",scope:"row",align:"center",children:d.entry.date.toLocaleDateString()}),C(Ie,{align:"center",children:d.entry.weight}),C(Ie,{align:"center",children:+d.change.toFixed(2)}),C(Ie,{align:"center",children:d.days}),C(Ie,{align:"center",children:C(jxt,{weight:d.entry})})]},d.entry.date.toLocaleDateString()))})]}),C(_F,{rowsPerPageOptions:t,component:"div",count:o.length,rowsPerPage:i,page:s,onPageChange:c,onRowsPerPageChange:u})]}),C(Bxt,{})]})},Uxt=()=>{const[e]=Ge(),[t,n]=y.useState(!1),r=()=>n(!0),o=()=>n(!1);return X("div",{children:[C(Rh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Gi,{})}),C(Yi,{title:e("add"),isOpen:t,closeFn:o,children:C(ab,{closeFn:o})})]})},Wxt=({currentFilter:e,onFilterChange:t})=>{const[n]=Ge(),r=ko(),o=i=>{e!==i&&t(i)};return X(QTe,{variant:"outlined",sx:{mb:2},children:[C(yt,{onClick:()=>o(""),color:e===""?"primary":"inherit",variant:e===""?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("all")}),C(yt,{onClick:()=>o("lastYear"),color:e==="lastYear"?"primary":"inherit",variant:e==="lastYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastYear")}),C(yt,{onClick:()=>o("lastHalfYear"),color:e==="lastHalfYear"?"primary":"inherit",variant:e==="lastHalfYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastHalfYear")}),C(yt,{onClick:()=>o("lastMonth"),color:e==="lastMonth"?"primary":"inherit",variant:e==="lastMonth"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastMonth")}),C(yt,{onClick:()=>o("lastWeek"),color:e==="lastWeek"?"primary":"inherit",variant:e==="lastWeek"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastWeek")})]})},Zh=e=>X(Vu,{maxWidth:"lg",children:[X(He,{container:!0,spacing:2,children:[C(He,{sx:{mb:2},size:8,children:X(Ut,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[C(dt,{gutterBottom:!0,variant:"h3",children:e.title}),e.optionsMenu]})}),C(He,{size:{xs:12,sm:8},children:e.mainContent}),C(He,{size:{xs:12,sm:4},children:e.sideBar})]}),e.fab]}),Gxt=()=>{const[e]=Ge(),[t,n]=y.useState("lastYear"),r=KS(t),o=i=>{n(i)};return r.isLoading?C(vo,{}):C(Zh,{title:e("weight"),mainContent:X(Ut,{spacing:2,children:[C(Wxt,{currentFilter:t,onFilterChange:o}),r.data.length===0&&C(CI,{}),r.data.length!==0&&X(Mt,{children:[C(Ose,{weights:r.data}),C($n,{sx:{mt:4}}),C(Hxt,{weights:r.data})]})]}),fab:C(Uxt,{})})},qxt=()=>{const{i18n:e}=Ge(),[t,n]=K.useState(null);return X(Mt,{children:[C(yt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Weight"}),X(ss,{anchorEl:t,open:!!t,onClose:()=>n(null),children:[C(tn,{component:Vs,to:Cn(bn.WEIGHT_OVERVIEW,e.language),children:"Weight overview"}),C(tn,{component:Vs,to:Cn(bn.WEIGHT_ADD,e.language),children:"Add weight entry"})]})]})},Kxt=()=>{const{i18n:e}=Ge(),[t,n]=K.useState(null);return X(Mt,{children:[C(yt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Measurements"}),C(ss,{anchorEl:t,open:!!t,onClose:()=>n(null),children:C(tn,{component:Vs,to:Cn(bn.MEASUREMENT_OVERVIEW,e.language),children:"Overview"})})]})},Yxt=()=>{const{i18n:e}=Ge(),[t,n]=K.useState(null);return X(Mt,{children:[C(yt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Nutrition"}),C(ss,{anchorEl:t,open:!!t,onClose:()=>n(null),children:C(tn,{component:Vs,to:Cn(bn.NUTRITION_OVERVIEW,e.language),children:"Overview"})})]})},Xxt=()=>{const{i18n:e}=Ge(),[t,n]=K.useState(null);return X(Mt,{children:[C(yt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Routines"}),X(ss,{anchorEl:t,open:!!t,onClose:()=>n(null),children:[C(tn,{component:Vs,to:Cn(bn.ROUTINE_OVERVIEW,e.language),children:"Routine overview"}),C(tn,{component:Vs,to:Cn(bn.EXERCISE_OVERVIEW,e.language),children:"Exercise overview"}),C(tn,{component:Vs,to:Cn(bn.EXERCISE_CONTRIBUTE,e.language),children:"Contribute exercise"}),C(tn,{component:Vs,to:Cn(bn.CALENDAR,e.language),children:"Calendar"})]})]})},Qxt=()=>C(wCe,{position:"static",children:X(YJ,{children:[C(dt,{variant:"h6",component:"div",mr:3,children:"wger"}),C(Xxt,{}),C(qxt,{}),C(Kxt,{}),C(Yxt,{})]})}),Zse=()=>C(Gxt,{}),Jxt=()=>C("div",{children:"Workout Page"}),Zxt=()=>C("div",{children:"Workout Schedule"});var rd,R7=hI;rd=R7.createRoot,R7.hydrateRoot;const eSt=()=>X(He,{container:!0,spacing:2,children:[C(He,{size:4,children:C(cse,{})}),C(He,{size:4,children:C(Hae,{})}),C(He,{size:4,children:C(Ise,{})})]}),JS=y.createContext({}),ele=()=>{const{data:e,isLoading:t}=Vk(),{selectedCategories:n,setSelectedCategories:r}=y.useContext(JS),[o]=Ge(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?C(vo,{}):C(al,{children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return C(es,{disablePadding:!0,children:X(_f,{role:void 0,onClick:i(a),dense:!0,children:[C(zi,{children:C(Hu,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`category-${a.id}`)}),C(ho,{id:s,primary:o(Wi(a.name))})]})},a.id)})})},tSt=()=>{const[e]=Ge();return X(vF,{children:[C(wF,{expandIcon:C(Ov,{}),children:e("category")}),C(bF,{children:C(ele,{})})]})},nSt=()=>{const[e]=Ge();return C("div",{"data-testid":"categories",children:X(io,{children:[C(dt,{gutterBottom:!0,variant:"h6",m:2,children:e("category")}),C(ele,{})]})})},tle=()=>{const{data:e,isLoading:t}=Hk(),{selectedEquipment:n,setSelectedEquipment:r}=y.useContext(JS),[o]=Ge(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?C(vo,{}):C(al,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return C(es,{disablePadding:!0,children:X(_f,{role:void 0,onClick:i(a),dense:!0,children:[C(zi,{children:C(Hu,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),C(ho,{id:s,primary:o(Wi(a.name))})]})},a.id)})})},rSt=()=>{const[e]=Ge();return X(vF,{children:[C(wF,{expandIcon:C(Ov,{}),children:e("exercises.equipment")}),C(bF,{children:C(tle,{})})]})},oSt=()=>{const[e]=Ge();return C("div",{"data-testid":"equipment",children:X(io,{sx:{mt:2},children:[C(dt,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.equipment")}),C(tle,{})]})})},iSt=oe(({className:e,...t})=>C(Ql,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${Nr.tooltip}`]:{backgroundColor:"rgb(245, 245, 245)",color:"rgba(0, 0, 0, 0.87)",boxShadow:e.shadows[1],fontSize:11}})),nle=()=>{const{data:e,isLoading:t}=XS(),{selectedMuscles:n,setSelectedMuscles:r}=y.useContext(JS),[o]=Ge(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?C(vo,{}):C(al,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return C(es,{disablePadding:!0,secondaryAction:C(iSt,{title:C(Th,{primaryMuscles:[a],secondaryMuscles:[],isFront:a.isFront}),placement:"right",arrow:!0,children:C(kn,{edge:"end","aria-label":"comments",children:C(Kae,{})})}),children:X(_f,{role:void 0,onClick:i(a),dense:!0,children:[C(zi,{children:C(Hu,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),C(ho,{id:s,primary:a.name,secondary:a.nameEn!==""?o(Wi(a.nameEn)):""})]})},a.id)})})},aSt=()=>{const[e]=Ge();return X(vF,{children:[C(wF,{expandIcon:C(Ov,{}),children:e("exercises.muscles")}),C(bF,{children:C(nle,{})})]})},sSt=()=>{const[e]=Ge();return C("div",{"data-testid":"muscles",children:X(io,{sx:{mt:2},children:[C(dt,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.muscles")}),C(nle,{})]})})},lSt=({exercises:e})=>{const t=Uk(),[n,r]=Ge();let o;return t.isSuccess&&(o=g_(r.language,t.data)),C(He,{container:!0,spacing:1,children:e.map(i=>C(He,{sx:{display:"flex"},size:{xs:6,md:4},children:C(Kse,{exercise:i,language:o})},i.id))})},cSt=()=>C(He,{container:!0,spacing:1,children:Array.apply(null,Array(21)).map((e,t)=>C(He,{sx:{display:"flex"},size:4,children:X(no,{children:[C(Dc,{children:C(TP,{variant:"rectangular",width:250,height:150})}),C(bi,{children:X($n,{sx:{pt:.5},children:[C(TP,{width:"60%"}),C(TP,{})]})})]})},t))}),uSt=({children:e})=>{const[t]=Ge(),[n,r]=y.useState(!1),o=i=>()=>{r(i)};return X(Mt,{children:[C(yt,{onClick:o(!0),children:C(cyt,{})}),X(jOe,{open:n,onClose:o(!1),anchor:"right",children:[X(Ut,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[C(dt,{gutterBottom:!0,variant:"h6",m:2,children:t("filters")}),C(yt,{onClick:o(!1),children:C(gS,{})})]}),C(Za,{}),e]})]})},dSt=()=>{const[e,t]=Ge();return X($n,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[C(dt,{gutterBottom:!0,variant:"h4",component:"div",children:e("exercises.missingExercise")}),C(dt,{gutterBottom:!0,variant:"body1",component:"div",children:e("exercises.missingExerciseDescription")}),C(Vs,{to:Cn(bn.EXERCISE_CONTRIBUTE,t.language),children:e("exercises.contributeExercise")})]})},fSt=()=>{const e=$se(),[t,n]=Ge(),r=Qh(),{selectedCategories:o,selectedEquipment:i,selectedMuscles:a}=y.useContext(JS),s=bf("(max-width:600px)"),[l,c]=K.useState(1),u=(v,w)=>{c(w),window.scrollTo({top:0,behavior:"smooth"})};let d=y.useMemo(()=>{let v=e.data||[];return o.length>0&&(v=v.filter(w=>o.some(x=>w.category.id===x.id))),i.length>0&&(v=v.filter(w=>w.equipment.some(x=>i.some(S=>S.id===x.id)))),a.length>0&&(v=v.filter(w=>w.muscles.some(x=>a.some(S=>S.id===x.id)))),v},[e.data,o,i,a]);const f=21,p=Math.ceil(d.length/f),m=d.slice((l-1)*f,l*f),g=v=>{r(Cn(bn.EXERCISE_DETAIL,n.language,{id:v.data.base_id}))};return C(Vu,{maxWidth:"lg",children:X(He,{container:!0,spacing:2,mt:2,children:[C(He,{size:{xs:10,sm:6},children:C(dt,{gutterBottom:!0,variant:"h3",component:"div",children:t("exercises.exercises")})}),s?X(Mt,{children:[C(He,{size:{xs:2,sm:6},children:C(yt,{variant:"contained",onClick:()=>r(Cn(bn.EXERCISE_CONTRIBUTE,n.language)),children:C(Gi,{})})}),C(He,{flexGrow:1,size:{sm:6},children:C(AN,{callback:g})}),C(He,{display:"flex",justifyContent:"center",alignItems:"center",size:{xs:2,sm:6},children:X(uSt,{children:[C(tSt,{}),C(rSt,{}),C(aSt,{})]})})]}):X(Mt,{children:[C(He,{size:{xs:12,sm:3},children:C(AN,{callback:g})}),C(He,{size:{xs:12,sm:3},children:C(yt,{variant:"contained",startIcon:C(Gi,{}),onClick:()=>r(Cn(bn.EXERCISE_CONTRIBUTE,n.language)),children:t("exercises.contributeExercise")})})]}),!s&&C(He,{size:{xs:12,sm:3},children:X(He,{container:!0,spacing:1,children:[C(He,{size:{xs:6,sm:12},children:C(nSt,{})}),C(He,{size:{xs:6,sm:12},children:C(oSt,{})}),C(He,{size:12,children:C(sSt,{})})]})}),X(He,{size:{xs:12,sm:9},children:[e.isLoading?C(cSt,{}):X(Mt,{children:[C(lSt,{exercises:m}),C(Ut,{spacing:2,alignItems:"center",sx:{mt:2},children:C(tMe,{count:p,color:"primary",page:l,onChange:u})})]}),C(dSt,{})]})]})})},_7=()=>{const[e,t]=y.useState([]),[n,r]=y.useState([]),[o,i]=K.useState([]);return C(JS.Provider,{value:{selectedEquipment:e,setSelectedEquipment:t,selectedMuscles:n,setSelectedMuscles:r,selectedCategories:o,setSelectedCategories:i},children:C(fSt,{})})},QC=['"Open Sans Bold"',"sans-serif"].join(","),pSt=['"Open Sans Light"',"sans-serif"].join(","),rle={spacing:8,typography:{h3:{fontFamily:QC},h4:{fontFamily:QC},h5:{fontFamily:QC},h6:{fontFamily:QC},fontFamily:pSt},palette:{primary:{main:"#2A4C7D"},secondary:{main:"#e63946"},warning:{main:"#cba328"},info:{main:"#457b9d"},success:{main:"#307916"}}},Uf=rS(rle),hSt=e=>rS({...rle,components:{MuiPopover:{defaultProps:{container:e}},MuiPopper:{defaultProps:{container:e}},MuiModal:{defaultProps:{container:e}}}}),ole=e=>{const{i18n:t}=Ge(),n=30,r=[...e.category.entries].sort((o,i)=>o.date.getTime()-i.date.getTime()).map(o=>({date:o.date.getTime(),value:o.value,entry:o}));return C($n,{alignItems:"center",display:"flex",flexDirection:"column",children:C(Lf,{width:"90%",height:200,children:X(Kre,{data:r,children:[C(Yv,{type:"monotone",dataKey:"value",stroke:Uf.palette.secondary.main,strokeWidth:2,dot:r.length>n?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6}}),C(jh,{stroke:"#ccc",strokeDasharray:"5 5"}),C(ll,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:o=>new Date(o).toLocaleDateString(t.language),tickCount:10}),C(cl,{domain:["auto","auto"],unit:e.category.unit})]})})})},ile=({category:e,closeFn:t})=>{const[n]=Ge(),r=Sxt(),o=Cxt(e==null?void 0:e.id),i=fl({name:Lc().required(n("forms.fieldRequired")).max(20,n("forms.maxLength",{chars:"20"})).min(3,n("forms.minLength",{chars:"3"})),unit:Lc().required(n("forms.fieldRequired")).max(5,n("forms.maxLength",{chars:"5"}))});return C(ul,{initialValues:{name:e?e.name:"",unit:e?e.unit:""},validationSchema:i,onSubmit:async a=>{e?o.mutate({...a,id:e.id}):r.mutate(a),t&&t()},children:a=>C(ls,{children:X(Ut,{spacing:2,children:[C(hn,{fullWidth:!0,id:"name",label:n("name"),error:a.touched.name&&!!a.touched.name,helperText:a.touched.name&&a.errors.name,...a.getFieldProps("name")}),C(hn,{fullWidth:!0,id:"unit",label:n("unit"),error:a.touched.unit&&!!a.errors.unit,helperText:a.touched.unit&&a.errors.unit?a.errors.unit:n("measurements.unitFormHelpText"),...a.getFieldProps("unit")}),C(Ut,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(yt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})};Lr.defaultZone=e_e;const ale=({entry:e,closeFn:t,categoryId:n})=>{const[r,o]=Ge(),i=Txt(),a=Jse(),s=Qse(n),[l,c]=K.useState(e?Ot.fromJSDate(e.date):Ot.now()),u=fl({value:la().required(r("forms.fieldRequired")).min(0,r("forms.minValue",{value:"0"})).max(1e3,r("forms.maxValue",{value:"1000"})),date:US().required(r("forms.fieldRequired")),notes:Lc().max(500,r("forms.maxLength",{value:"500"}))});return C(ul,{initialValues:{value:e?e.value:0,date:e?e.date:new Date,notes:e?e.notes:""},validationSchema:u,onSubmit:async d=>{e?a.mutate({...d,id:e.id}):i.mutate({...d,categoryId:n}),t&&t()},children:d=>C(ls,{children:X(Ut,{spacing:2,children:[C(hn,{fullWidth:!0,id:"value",type:"number",label:r("value"),error:d.touched.value&&!!d.errors.value,helperText:d.touched.value&&d.errors.value,...d.getFieldProps("value")}),s.isLoading?C(vo,{}):C(RS,{dateAdapter:Ak,adapterLocale:o.language,children:C(zoe,{format:"yyyy-MM-dd",label:r("date"),value:l,disableFuture:!0,onChange:f=>{f&&d.setFieldValue("date",f.toJSDate()),c(f)},shouldDisableDate:f=>e&&ei(e.date)===ei(f.toJSDate())?!1:f?s.data.entries.some(p=>ei(p.date)===ei(f.toJSDate())):!1})}),C(hn,{fullWidth:!0,id:"notes",label:r("notes"),multiline:!0,error:d.touched.notes&&!!d.errors.notes,helperText:d.touched.notes&&d.errors.notes,...d.getFieldProps("notes")}),C(Ut,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(yt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:r("submit")})})]})})})},mSt=()=>{const[e]=Ge(),[t,n]=K.useState(!1),r=()=>n(!0),o=()=>n(!1);return X("div",{children:[C(Rh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Gi,{})}),C(Yi,{title:e("add"),isOpen:t,closeFn:o,children:C(ile,{closeFn:o})})]})},gSt=()=>{const[e]=Ge(),[t,n]=K.useState(!1),r=()=>n(!0),o=()=>n(!1),i=Jh(),a=parseInt(i.categoryId);return X(Mt,{children:[C(Rh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:s=>s.spacing(2),zIndex:9},children:C(Gi,{})}),C(Yi,{title:e("add"),isOpen:t,closeFn:o,children:C(ale,{closeFn:o,categoryId:a})})]})},sle=y.createContext(void 0);function gn(){const e=y.useContext(sle);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` -`));return e}const lle=y.createContext(void 0),xt=()=>{const e=y.useContext(lle);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e},ySt=Object.is;function cle(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const o in e)if(n+=1,!ySt(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}function Wf(e){return y.memo(e,cle)}const vSt={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",columnsManagementDeleteIconLabel:"Clear",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>e!==1?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"};function xn(e){return Ne("MuiDataGrid",e)}const ae=Le("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementSearchInput","columnsManagementFooter","container--top","container--bottom","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hasSkeletonLoadingOverlay","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"]),D7=1e3;class bSt{constructor(t=D7){this.timeouts=new Map,this.cleanupTimeout=D7,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class wSt{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}var Qs=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}(Qs||{});class xSt{}function SSt(e){let t=0;return function(r,o,i,a){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new wSt:new bSt);const[s]=y.useState(new xSt),l=y.useRef(null),c=y.useRef();c.current=i;const u=y.useRef(null);if(!l.current&&c.current){const d=(f,p,m)=>{var g;p.defaultMuiPrevented||(g=c.current)==null||g.call(c,f,p,m)};l.current=r.current.subscribeEvent(o,d,a),t+=1,u.current={cleanupToken:t},e.registry.register(s,()=>{var f;(f=l.current)==null||f.call(l),l.current=null,u.current=null},u.current)}else!c.current&&l.current&&(l.current(),l.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));y.useEffect(()=>{if(!l.current&&c.current){const d=(f,p,m)=>{var g;p.defaultMuiPrevented||(g=c.current)==null||g.call(c,f,p,m)};l.current=r.current.subscribeEvent(o,d,a)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var d;(d=l.current)==null||d.call(l),l.current=null}},[r,o,a])}}const CSt={registry:null},gt=SSt(CSt),PSt={isFirst:!0};function ar(e,t,n){gt(e,t,n,PSt)}function TSt(e){return e.acceptsApiRef}function N7(e,t){return TSt(t)?t(e):t(e.current.state)}const ESt=Object.is,ule=cle,OSt=()=>({state:null,equals:null,selector:null,args:null}),Qe=(e,t,n=ESt)=>{const r=Zl(OSt),o=r.current.selector!==null,[i,a]=y.useState(o?null:N7(e,t));return r.current.state=i,r.current.equals=n,r.current.selector=t,KO(()=>e.current.store.subscribe(()=>{const s=N7(e,r.current.selector);r.current.equals(r.current.state,s)||(r.current.state=s,a(s))})),i},Si=e=>e.dimensions;var eO=Symbol("NOT_FOUND");function ISt(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function kSt(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function MSt(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var L7=e=>Array.isArray(e)?e:[e];function ASt(e){const t=Array.isArray(e[0])?e[0]:e;return MSt(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $St(e,t){const n=[],{length:r}=e;for(let o=0;ot(s,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return eO}function o(s,l){r(s)===eO&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var DSt=(e,t)=>e===t;function NSt(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;ii(p.value,u));f&&(u=f.value,s!==0&&s--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}var LSt=class{constructor(e){this.value=e}deref(){return this.value}},FSt=typeof WeakRef<"u"?WeakRef:LSt,jSt=0,F7=1;function JC(){return{s:jSt,v:void 0,o:null,p:null}}function fle(e,t={}){let n=JC();const{resultEqualityCheck:r}=t;let o,i=0;function a(){var d;let s=n;const{length:l}=arguments;for(let f=0,p=l;f{n=JC(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function ple(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,a=0,s,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),ISt(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:p=fle,argsMemoizeOptions:m=[],devModeChecks:g={}}=u,v=L7(f),w=L7(m),x=ASt(o),S=d(function(){return i++,c.apply(null,arguments)},...v),P=p(function(){a++;const E=$St(x,arguments);return s=S.apply(null,E),s},...w);return Object.assign(P,{resultFunc:c,memoizedResultFunc:S,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var BSt=ple(fle),zSt=Object.assign((e,t=BSt)=>{kSt(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((a,s,l)=>(a[n[l]]=s,a),{}))},{withTypes:()=>zSt});const VSt=ple({memoize:dle,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),j7=new WeakMap;function eg(e){return"current"in e&&"instanceId"in e.current}const tg={id:"default"},Rt=(e,t,n,r,o,i,...a)=>{if(a.length>0)throw new Error("Unsupported number of selectors");let s;if(e&&t&&n&&r&&o&&i)s=(l,c)=>{const u=eg(l),d=c??(u?l.current.instanceId:tg),f=u?l.current.state:l,p=e(f,d),m=t(f,d),g=n(f,d),v=r(f,d),w=o(f,d);return i(p,m,g,v,w)};else if(e&&t&&n&&r&&o)s=(l,c)=>{const u=eg(l),d=c??(u?l.current.instanceId:tg),f=u?l.current.state:l,p=e(f,d),m=t(f,d),g=n(f,d),v=r(f,d);return o(p,m,g,v)};else if(e&&t&&n&&r)s=(l,c)=>{const u=eg(l),d=c??(u?l.current.instanceId:tg),f=u?l.current.state:l,p=e(f,d),m=t(f,d),g=n(f,d);return r(p,m,g)};else if(e&&t&&n)s=(l,c)=>{const u=eg(l),d=c??(u?l.current.instanceId:tg),f=u?l.current.state:l,p=e(f,d),m=t(f,d);return n(p,m)};else if(e&&t)s=(l,c)=>{const u=eg(l),d=c??(u?l.current.instanceId:tg),f=u?l.current.state:l,p=e(f,d);return t(p)};else throw new Error("Missing arguments");return s.acceptsApiRef=!0,s},ir=(...e)=>{const t=(n,r)=>{const o=eg(n),i=o?n.current.instanceId:r??tg,a=o?n.current.state:n,s=j7.get(i),l=s??new Map,c=l==null?void 0:l.get(e);if(l&&c)return c(a,i);const u=VSt(...e);return s||j7.set(i,l),l.set(e,u),u(a,i)};return t.acceptsApiRef=!0,t},HSt=.7,USt=1.3,WSt={compact:HSt,comfortable:USt,standard:1},Ig=e=>e.density,ZS=Rt(Ig,e=>WSt[e]);let lr=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const $N={left:[],right:[]},GSt=e=>e.isRtl,Ac=e=>e.columns,Iu=Rt(Ac,e=>e.orderedFields),od=Rt(Ac,e=>e.lookup),Wl=ir(Iu,od,(e,t)=>e.map(n=>t[n])),Hs=Rt(Ac,e=>e.columnVisibilityModel),fo=ir(Wl,Hs,(e,t)=>e.filter(n=>t[n.field]!==!1)),cb=ir(fo,e=>e.map(t=>t.field)),qSt=e=>e.pinnedColumns,e1=ir(Ac,qSt,cb,GSt,(e,t,n,r)=>{const o=KSt(t,n,r);return{left:o.left.map(a=>e.lookup[a]),right:o.right.map(a=>e.lookup[a])}});function KSt(e,t,n){var s,l;if(!Array.isArray(e.left)&&!Array.isArray(e.right)||((s=e.left)==null?void 0:s.length)===0&&((l=e.right)==null?void 0:l.length)===0)return $N;const r=(c,u)=>Array.isArray(c)?c.filter(d=>u.includes(d)):[],o=r(e.left,t),i=t.filter(c=>!o.includes(c)),a=r(e.right,i);return n?{left:a,right:o}:{left:o,right:a}}const Gf=ir(fo,e=>{const t=[];let n=0;for(let r=0;r{const n=e.length;return n===0?0:t[n-1]+e[n-1].computedWidth}),hle=ir(Wl,e=>e.filter(t=>t.filterable)),YSt=ir(Wl,e=>e.reduce((t,n)=>(n.filterable&&(t[n.field]=n),t),{})),XSt=ir(Wl,e=>e.some(t=>t.colSpan!==void 0)),QSt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],JSt=e=>{const{classes:t}=e;return Te({root:["editInputCell"]},xn,t)},ZSt=oe(Sv,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})(({theme:e})=>N({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})),e1t=y.forwardRef((e,t)=>{const n=xt(),{id:r,value:o,field:i,colDef:a,hasFocus:s,debounceMs:l=200,isProcessingProps:c,onValueChange:u}=e,d=Ue(e,QSt),f=gn(),p=y.useRef(),[m,g]=y.useState(o),v=JSt(n),w=y.useCallback(async S=>{const P=S.target.value;u&&await u(S,P);const T=f.current.getColumn(i);let E=P;T.valueParser&&(E=T.valueParser(P,f.current.getRow(r),T,f)),g(E),f.current.setEditCellValue({id:r,field:i,value:E,debounceMs:l,unstable_skipValueParser:!0},S)},[f,l,i,r,u]),x=f.current.unstable_getEditCellMeta(r,i);return y.useEffect(()=>{(x==null?void 0:x.changeReason)!=="debouncedSetEditCellValue"&&g(o)},[x,o]),wn(()=>{s&&p.current.focus()},[s]),$.jsx(ZSt,N({ref:t,inputRef:p,className:v.root,ownerState:n,fullWidth:!0,type:a.type==="number"?a.type:"text",value:m??"",onChange:w,endAdornment:c?$.jsx(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},d))}),t1t=e=>$.jsx(e1t,N({},e)),mle=(e,t)=>t&&e.length>1?[e[0]]:e,B7=(e,t)=>n=>N({},n,{sorting:N({},n.sorting,{sortModel:mle(e,t)})}),n1t=e=>e==="desc",r1t=(e,t)=>{const n=t.current.getColumn(e.field);if(!n||e.sort===null)return null;let r;return n.getSortComparator?r=n.getSortComparator(e.sort):r=n1t(e.sort)?(...i)=>-1*n.sortComparator(...i):n.sortComparator,r?{getSortCellParams:i=>({id:i,field:n.field,rowNode:t.current.getRowNode(i),value:t.current.getCellValue(i,n.field),api:t.current}),comparator:r}:null},o1t=(e,t,n)=>e.reduce((r,o,i)=>{if(r!==0)return r;const a=t.params[i],s=n.params[i];return r=o.comparator(a.value,s.value,a,s),r},0),i1t=(e,t)=>{const n=e.map(r=>r1t(r,t)).filter(r=>!!r);return n.length===0?null:r=>r.map(o=>({node:o,params:n.map(i=>i.getSortCellParams(o.id))})).sort((o,i)=>o1t(n,o,i)).map(o=>o.node.id)},z7=(e,t)=>{const n=e.indexOf(t);return!t||n===-1||n+1===e.length?e[0]:e[n+1]},dz=(e,t)=>e==null&&t!=null?-1:t==null&&e!=null?1:e==null&&t==null?0:null,a1t=new Intl.Collator,s1t=(e,t)=>{const n=dz(e,t);return n!==null?n:typeof e=="string"?a1t.compare(e.toString(),t.toString()):e-t},gle=(e,t)=>{const n=dz(e,t);return n!==null?n:Number(e)-Number(t)},yle=(e,t)=>{const n=dz(e,t);return n!==null?n:e>t?1:e{const{value:E}=T.target;m(String(E)),v(!0),f.start(x.filterDebounceMs,()=>{const O=N({},t,{value:r==="number"?Number(E):E,fromInput:w});n(O),v(!1)})},[f,x.filterDebounceMs,t,r,w,n]);return y.useEffect(()=>{(t.fromInput!==w||t.value===void 0)&&m(String(t.value??""))},[w,t]),$.jsx(x.slots.baseTextField,N({id:w,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:p,onChange:S,variant:u,type:r||"text",InputProps:N({},g||l?{endAdornment:g?$.jsx(x.slots.loadIcon,{fontSize:"small",color:"action"}):l}:{},{disabled:s},c,{inputProps:N({tabIndex:a},c==null?void 0:c.inputProps)}),InputLabelProps:{shrink:!0},inputRef:i},d,(P=x.slotProps)==null?void 0:P.baseTextField))}function c1t(e){return typeof e=="number"&&!Number.isNaN(e)}function vle(e){return typeof e=="function"}function fz(e){return typeof e=="object"&&e!==null}function u1t(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}function tO(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const $c=(e,t,n)=>Math.max(t,Math.min(n,e));function V7(e,t){return Array.from({length:t-e}).map((n,r)=>e+r)}function Jg(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function f1t(e){const t=d1t(e);return(n,r)=>n+(r-n)*t()}function ble(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}const p1t=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],h1t=["key"];function wle(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,color:a,error:s,helperText:l,size:c,variant:u="standard"}=e,d=Ue(e,p1t),f={color:a,error:s,helperText:l,size:c,variant:u},[p,m]=y.useState(t.value||[]),g=Ln(),v=xt();y.useEffect(()=>{const x=t.value??[];m(x.map(String))},[t.value]);const w=y.useCallback((x,S)=>{m(S.map(String)),n(N({},t,{value:[...S.map(P=>r==="number"?Number(P):P)]}))},[n,t,r]);return $.jsx(Yl,N({multiple:!0,freeSolo:!0,options:[],filterOptions:(x,S)=>{const{inputValue:P}=S;return P==null||P===""?[]:[P]},id:g,value:p,onChange:w,renderTags:(x,S)=>x.map((P,T)=>{const E=S({index:T}),{key:O}=E,k=Ue(E,h1t);return $.jsx(v.slots.baseChip,N({variant:"outlined",size:"small",label:P},k),O)}),renderInput:x=>{var S;return $.jsx(v.slots.baseTextField,N({},x,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:N({},x.InputLabelProps,{shrink:!0}),inputRef:i,type:r||"text"},f,(S=v.slotProps)==null?void 0:S.baseTextField))}},d))}var Fc=function(e){return e.Cell="cell",e.Row="row",e}(Fc||{}),Qn=function(e){return e.Edit="edit",e.View="view",e}(Qn||{}),jn=function(e){return e.Edit="edit",e.View="view",e}(jn||{}),_i=function(e){return e.And="and",e.Or="or",e}(_i||{}),cu=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(cu||{}),Ol=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Ol||{}),Td=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(Td||{}),Tl=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Tl||{});function xle(e){return e.field!==void 0}const Fx=()=>({items:[],logicOperator:_i.And,quickFilterValues:[],quickFilterLogicOperator:_i.And});function Sle(e){return{current:e.current.getPublicApi()}}let f0;function m1t(){if(f0!==void 0)return f0;try{f0=new Function("return true")()}catch{f0=!1}return f0}const RN=(e,t)=>{const n=N({},e);if(n.id==null&&(n.id=Math.round(Math.random()*1e5)),n.operator==null){const r=od(t)[n.field];n.operator=r&&r.filterOperators[0].value}return n},pz=(e,t,n)=>{const r=e.items.length>1;let o;r&&t?o=[e.items[0]]:o=e.items;const i=r&&o.some(s=>s.id==null);return o.some(s=>s.operator==null)||i?N({},e,{items:o.map(s=>RN(s,n))}):e.items!==o?N({},e,{items:o}):e},H7=(e,t,n)=>r=>N({},r,{filterModel:pz(e,t,n)}),jx=e=>typeof e=="string"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,Cle=(e,t)=>{var u;if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let r;if(n.valueParser){const d=n.valueParser;r=Array.isArray(e.value)?(u=e.value)==null?void 0:u.map(f=>d(f,void 0,n,t)):d(e.value,void 0,n,t)}else r=e.value;const{ignoreDiacritics:o}=t.current.rootProps;o&&(r=jx(r));const i=N({},e,{value:r}),a=n.filterOperators;if(!(a!=null&&a.length))throw new Error(`MUI X: No filter operators found for column '${n.field}'.`);const s=a.find(d=>d.value===i.operator);if(!s)throw new Error(`MUI X: No filter operator found for column '${n.field}' and operator value '${i.operator}'.`);const l=Sle(t),c=s.getApplyFilterFn(i,n);return typeof c!="function"?null:{item:i,fn:d=>{let f=t.current.getRowValue(d,n);return o&&(f=jx(f)),c(f,d,n,l)}}};let U7=1;const g1t=(e,t,n)=>{const{items:r}=e,o=r.map(s=>Cle(s,t)).filter(s=>!!s);if(o.length===0)return null;if(n||!m1t())return(s,l)=>{const c={};for(let u=0;u=te)return h;var ye=A-dm(H);if(ye<1)return H;var Ee=he?hd(he,0,ye).join(""):h.slice(0,ye);if(q===n)return Ee+H;if(he&&(ye+=Ee.length-ye),iA(q)){if(h.slice(ye).search(q)){var Xe,Qe=Ee;for(q.global||(q=xM(q.source,Jn(Be.exec(q))+"g")),q.lastIndex=0;Xe=q.exec(Qe);)var et=Xe.index;Ee=Ee.slice(0,et===n?ye:et)}}else if(h.indexOf(Ta(q),ye)!=ye){var ht=Ee.lastIndexOf(q);ht>-1&&(Ee=Ee.slice(0,ht))}return Ee+H}function Kme(h){return h=Jn(h),h&&xo.test(h)?h.replace(zn,Cue):h}var Yme=vm(function(h,w,A){return h+(A?" ":"")+w.toUpperCase()}),lA=r5("toUpperCase");function tH(h,w,A){return h=Jn(h),w=A?n:w,w===n?vue(h)?Tue(h):cue(h):h.match(w)||[]}var nH=bn(function(h,w){try{return Pa(h,n,w)}catch(A){return oA(A)?A:new Kt(A)}}),Xme=Jc(function(h,w){return us(w,function(A){A=ic(A),Xc(h,A,nA(h[A],h))}),h});function Qme(h){var w=h==null?0:h.length,A=Ft();return h=w?Dr(h,function(H){if(typeof H[1]!="function")throw new ds(a);return[A(H[0]),H[1]]}):[],bn(function(H){for(var q=-1;++qV)return[];var A=G,H=si(h,G);w=Ft(w),h-=G;for(var q=vM(H,w);++A0||w<0)?new Mn(A):(h<0?A=A.takeRight(-h):h&&(A=A.drop(h)),w!==n&&(w=cn(w),A=w<0?A.dropRight(-w):A.take(w-h)),A)},Mn.prototype.takeRightWhile=function(h){return this.reverse().takeWhile(h).reverse()},Mn.prototype.toArray=function(){return this.take(G)},rc(Mn.prototype,function(h,w){var A=/^(?:filter|find|map|reject)|While$/.test(w),H=/^(?:head|last)$/.test(w),q=Z[H?"take"+(w=="last"?"Right":""):w],te=H||/^find/.test(w);q&&(Z.prototype[w]=function(){var he=this.__wrapped__,ye=H?[1]:arguments,Ee=he instanceof Mn,Xe=ye[0],Qe=Ee||en(he),et=function(Tn){var Rn=q.apply(Z,ld([Tn],ye));return H&&ht?Rn[0]:Rn};Qe&&A&&typeof Xe=="function"&&Xe.length!=1&&(Ee=Qe=!1);var ht=this.__chain__,Rt=!!this.__actions__.length,zt=te&&!ht,fn=Ee&&!Rt;if(!te&&Qe){he=fn?he:new Mn(this);var Vt=h.apply(he,ye);return Vt.__actions__.push({func:F1,args:[et],thisArg:n}),new fs(Vt,ht)}return zt&&fn?h.apply(this,ye):(Vt=this.thru(et),zt?H?Vt.value()[0]:Vt.value():Vt)})}),us(["pop","push","shift","sort","splice","unshift"],function(h){var w=u1[h],A=/^(?:push|sort|unshift)$/.test(h)?"tap":"thru",H=/^(?:pop|shift)$/.test(h);Z.prototype[h]=function(){var q=arguments;if(H&&!this.__chain__){var te=this.value();return w.apply(en(te)?te:[],q)}return this[A](function(he){return w.apply(en(he)?he:[],q)})}}),rc(Mn.prototype,function(h,w){var A=Z[w];if(A){var H=A.name+"";or.call(mm,H)||(mm[H]=[]),mm[H].push({name:w,func:A})}}),mm[A1(n,b).name]=[{name:"wrapper",func:n}],Mn.prototype.clone=Kue,Mn.prototype.reverse=Yue,Mn.prototype.value=Xue,Z.prototype.at=Epe,Z.prototype.chain=Tpe,Z.prototype.commit=Ope,Z.prototype.next=Ipe,Z.prototype.plant=Mpe,Z.prototype.reverse=Ape,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=$pe,Z.prototype.first=Z.prototype.head,yb&&(Z.prototype[yb]=kpe),Z},fm=Oue();Zf?((Zf.exports=fm)._=fm,uM._=fm):qo._=fm}).call(yc)})(YT,YT.exports);var Fwt=YT.exports;function kL({callback:e}){const[t,n]=v.useState(null),[r,o]=v.useState(""),[i,a]=v.useState(!0),[s,l]=v.useState([]),[c,u]=qe(),d=v.useMemo(()=>UI(f=>QDe(f,u.language,i).then(p=>l(p)),200),[u.language,i]);return v.useEffect(()=>{if(r===""){l(t?[t]:[]);return}return d(r),()=>{}},[t,r,d]),X(Mt,{children:[C(Kl,{id:"exercise-name-autocomplete",getOptionLabel:f=>f.value,"data-testid":"autocomplete",filterOptions:f=>f,options:s,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:t,noOptionsText:c("noResults"),isOptionEqualToValue:(f,p)=>f.value===p.value,onChange:(f,p)=>{l(p?[p,...s]:s),n(p),e(p)},onInputChange:(f,p)=>{o(p)},renderInput:f=>C(gn,{...f,label:c("exercises.searchExerciseName"),fullWidth:!0,InputProps:{...f.InputProps,startAdornment:X(Mt,{children:[C(co,{position:"start",children:C(AB,{})}),f.InputProps.startAdornment]})}}),renderOption:(f,p)=>sN("li",{...f,key:`exercise${p.data.id}`,"data-testid":`autocompleter-result-${p.data.id}`},X(Ja,{disablePadding:!0,component:"div",children:[C(zi,{children:p.data.image?C(Yl,{alt:"",src:`${zF}${p.data.image}`,variant:"rounded"}):C(Ju,{fontSize:"large"})}),C(go,{primary:p.value,primaryTypographyProps:{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},secondary:p.data.category})]}))}),u.language!==Ty&&C(Hw,{children:C(mh,{control:C(Hu,{checked:i,onChange:(f,p)=>a(p)}),label:c("alsoSearchEnglish")})})]})}function jwt(e){var d,f;const[t,n]=Y.useState(null),[r,o]=Y.useState(null),[i]=qe(),a=Qh(),s=()=>{o(null),n(null)},l=async()=>{var p;await ZDe((p=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:p.id),e.onClose(),e.onChangeLanguage()},c=async(p=!1)=>{p?await CU(e.currentExercise.id,r==null?void 0:r.uuid):await CU(e.currentExercise.id),e.onClose(),a("../overview")},u=async p=>{const m=p!==void 0?p:t;if(m!==null)try{const g=await bS(m);o(g)}catch{o(null)}};return X(Mt,{children:[C(wOe,{id:"alert-dialog-title",children:i("delete")}),X(IJ,{children:[C("p",{children:i("exercises.deleteExerciseBody",{name:(d=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:d.name,language:(f=e.currentLanguage)==null?void 0:f.nameLong})}),C("p",{children:i("cannotBeUndone")}),C("p",{children:C("b",{children:i("exercises.replacements")})}),C("p",{children:i("exercises.replacementsInfoText")}),C("p",{children:i("exercises.replacementsSearch")}),C(kL,{callback:p=>{p!==null&&(n(p.data.base_id),u(p.data.base_id))}}),C(gn,{"data-testid":"exercise-id-field",id:"foo",label:"Exercise ID",onBlur:()=>u(),onChange:async p=>{n(p.target.value!==""?parseInt(p.target.value):null)},value:t??"",InputProps:{endAdornment:C(co,{position:"start",children:C(An,{onClick:()=>u(),children:C(Kgt,{})})})},fullWidth:!0,variant:"standard"}),r===null&&C(Mt,{children:C("p",{children:C("i",{children:i("exercises.noReplacementSelected")})})}),r!==null&&X(Mt,{children:[X("p",{children:["Selected exercise for replacement:",C(Xl,{title:i("copyToClipboard"),children:C(An,{onClick:()=>navigator.clipboard.writeText(r.id.toString()),children:C(Zgt,{})})})]}),X(Ja,{disablePadding:!0,children:[C(kF,{children:C(Yl,{children:r.mainImage?C(Yl,{alt:"",src:`${zF}${r.mainImage.url}`,variant:"rounded"}):C(Ju,{})})}),C(go,{primary:r.getTranslation().name,secondary:`${r.id} (${r.uuid})`}),C(An,{onClick:s,children:C(Qgt,{})})]})]})]}),X(OJ,{children:[C(yt,{onClick:()=>e.onClose(),children:i("cancel")}),C(yt,{"data-testid":"button-delete-translation",size:"small",onClick:l,variant:"contained",children:i("exercises.deleteTranslation")}),C(yt,{"data-testid":"button-delete-all",size:"small",onClick:()=>c(),variant:"contained",children:i("exercises.deleteExerciseFull")}),C(yt,{"data-testid":"button-delete-and-replace",size:"small",disabled:r===null,onClick:()=>c(!0),variant:"contained",children:i("exercises.deleteExerciseReplace")})]})]})}const Bwt="_root_l288f_1",zwt="_detail_language_l288f_4",Vwt="_detail_l288f_4",Hwt="_detail_arrow_l288f_18",Uwt="_languages_l288f_28",Wwt="_language_l288f_28",Gwt="_language_menu_l288f_40",qwt="_header_l288f_52",Kwt="_toolbar_l288f_55",Ywt="_dots_l288f_68",gp={root:Bwt,detail_language:zwt,detail:Vwt,detail_arrow:Hwt,languages:Uwt,language:Wwt,language_menu:Gwt,header:qwt,toolbar:Kwt,dots:Ywt},Xwt=({exercise:e,languages:t,changeLanguage:n,language:r,setEditMode:o,editMode:i})=>{var E,T,O;const[a,s]=v.useState(null),[l,c]=Y.useState(!1),u=!!a,[d]=qe(),f=Ld(gu.DELETE_EXERCISE),p=Ld(gu.EDIT_EXERCISE),m=Uc(),g=m.isSuccess&&m.data===null;let y=!1;m.isSuccess&&p.isSuccess&&(y=p.data||m.data!==null&&m.data.isTrustworthy);const b=k=>{s(k.currentTarget)},x=()=>{s(null)},S=k=>{n(k),x()},P=t.map(k=>X(tn,{onClick:()=>S(k),selected:(r==null?void 0:r.id)===k.id,children:[C(go,{children:k.nameLong}),C(zi,{children:e.availableLanguages.includes(k.id)?C(cyt,{}):C(Gi,{})})]},k.nameShort));return C(Fe,{container:!0,children:C(Fe,{size:12,children:X("div",{className:gp.root,children:[C(TJ,{open:l,onClose:()=>c(!1),children:C(jwt,{onClose:()=>c(!1),onChangeLanguage:()=>n(t[0]),currentExercise:e,currentLanguage:r})}),X("div",{className:gp.detail_language,children:[X("div",{className:gp.detail,children:[C(zs,{to:"../overview",children:d("exercises.exercises")})," > ",(E=e.getTranslation(r))==null?void 0:E.name]}),C("div",{className:gp.languages,children:X("div",{className:gp.language,children:[C(yt,{size:"small",id:"basic-button",onClick:b,startIcon:C(GS,{}),children:r==null?void 0:r.nameLong}),X(is,{id:"basic-menu",anchorEl:a,open:u,onClose:x,MenuListProps:{"aria-labelledby":"basic-button"},sx:{padding:20},children:[C(tn,{disabled:!0,children:d("exercises.changeExerciseLanguage")}),C(Qa,{}),P]})]})})]}),X("div",{className:gp.header,children:[C(ut,{gutterBottom:!0,variant:"h2",margin:0,sx:{mt:2},children:(T=e.getTranslation(r))==null?void 0:T.name}),!g&&X("nav",{className:gp.toolbar,children:[f.isSuccess&&f.data&&(r==null?void 0:r.id)===((O=e.getTranslation(r))==null?void 0:O.language)&&C(yt,{onClick:()=>c(!0),children:d("delete")}),y&&C(yt,{onClick:()=>o(!0),disabled:i,children:"EDIT"}),C(yt,{onClick:()=>o(!1),disabled:!i,children:"VIEW"})]})]}),X(Gt,{direction:"row",spacing:1,mt:2,children:[C(hh,{label:d(Wi(e.category.name)),size:"small"}),e.equipment.map(k=>C(hh,{label:d(Wi(k.name)),variant:"outlined",size:"small"},k.id))]})]})})})},Jo=()=>C(Ln,{sx:{height:20}}),Qwt=()=>{var m;const[e,t]=v.useState(I2e),[n,r]=v.useState(!1),o=Jh(),i=o.baseID?Fwt.parseInt(o.baseID):0,{i18n:a}=qe(),s=Qh(),l=Bk(),c=oo({queryKey:[D2e,i],queryFn:()=>bS(i),enabled:l.isSuccess}),u=oo({queryKey:[R2e,(m=c.data)==null?void 0:m.variationId],queryFn:()=>{var g;return KDe((g=c.data)==null?void 0:g.variationId)},enabled:c.isSuccess});if(Y.useEffect(()=>{if(l.data===void 0)return;const g=hD(a.language,l.data);t(g)},[l.data]),c.isError||l.isError||u.isError)return s("/not-found"),null;const d=g=>{const y=hD(g.nameShort,l.data);y!==void 0&&t(y)},f=u.isSuccess?u.data.filter(g=>g.id!==i):[];let p;return c.isSuccess&&l.isSuccess&&(p=n?C($wt,{exerciseId:c.data.id,language:e}):C(Nwt,{exercise:c.data,language:e,variations:f,setEditMode:r})),X(Mt,{children:[c.isSuccess&&l.isSuccess&&C(Vu,{children:C(Xwt,{exercise:c.data,languages:l.data,changeLanguage:d,language:e,setEditMode:r,editMode:n})}),C(Jo,{}),X(Vu,{maxWidth:"lg",children:[c.isLoading&&l.isLoading&&C(ga,{}),p]})]})};function qse(e){const[t]=qe(),[n,r,o]=ul(e.fieldName),[i,a]=v.useState(""),s=u=>{o.setValue(n.value.filter((d,f)=>f!==u))},l=(u,d)=>{n.value[u]=d,o.setValue(n.value)},c=()=>{n.value.push(i),o.setValue(n.value),a("")};return X(Mt,{children:[C(Fe,{size:12,children:C(gn,{fullWidth:!0,label:t("exercises.newNote"),sx:{mb:3},variant:"standard",value:i,onChange:u=>a(u.target.value),error:r.touched&&!!r.error,helperText:r.touched&&r.error?r.error:t("exercises.notesHelpText"),InputProps:{endAdornment:C(co,{position:"end",children:C(An,{onClick:c,children:C(Gi,{})})})}})}),n.value.map((u,d)=>C(gn,{fullWidth:!0,value:u,onChange:f=>l(d,f.target.value),sx:{mt:2},variant:"standard",error:r.touched&&!!r.error,InputProps:{endAdornment:C(co,{position:"end",children:C(An,{onClick:()=>s(d),children:C(YB,{})})})}},d))]})}const Jwt=({onContinue:e,onBack:t})=>{const[n]=qe(),[r,o]=sb(),i=dl({description:sz(n),notes:kse(n)});return C(cl,{initialValues:{description:r.descriptionEn,notes:r.notesEn},validationSchema:i,onSubmit:a=>{o(j0t(a.description)),o(B0t(a.notes)),e()},children:C(as,{children:X(Gt,{children:[C(lz,{fieldName:"description"}),C(Jo,{}),C(qse,{fieldName:"notes"}),C(Fe,{container:!0,children:C(Fe,{display:"flex",justifyContent:"end",size:12,children:C(Ln,{sx:{mb:2},children:X("div",{children:[C(yt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(yt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})})},Zwt=({onContinue:e,onBack:t})=>{const[n]=qe(),r=Bk(),[o,i]=sb(),[a,s]=v.useState(o.languageId!==null),l=dl(a?{description:sz(n),name:iz(n),alternativeNames:az(n),notes:kse(n),language:sa().required()}:{});return C(cl,{initialValues:{name:o.nameI18n,alternativeNames:o.alternativeNamesI18n,description:o.descriptionI18n,language:o.languageId===null?"":o.languageId,notes:o.notesI18n},validationSchema:l,onSubmit:c=>{i(V0t(c.name)),i(H0t(c.description)),i(W0t(c.alternativeNames)),i(J0t(c.language===""?null:c.language)),i(U0t(c.notes)),e()},children:c=>X(as,{children:[X(Gt,{spacing:2,children:[C(Hw,{children:C(mh,{checked:a,onClick:()=>s(!a),control:C(Hu,{}),label:n("exercises.translateExerciseNow")})}),a&&X(Mt,{children:[r.isLoading?C(Ln,{children:C(ga,{})}):X(Cv,{fullWidth:!0,children:[C(Pv,{id:"label-language",children:n("language")}),C(Dh,{labelId:"label-language",id:"language",value:c.getFieldProps("language").value,onChange:u=>{c.setFieldValue(c.getFieldProps("language").name,u.target.value)},label:n("language"),error:!!(c.touched.language&&c.errors.language),children:r.data.filter(u=>u.id!==vh).map(u=>X(tn,{value:u.id,children:[u.nameShort," - ",u.nameLong]},u.id))})]}),C(oz,{fieldName:"name"}),C(rz,{fieldName:"alternativeNames"}),C(lz,{fieldName:"description"}),C(Jo,{}),C(qse,{fieldName:"notes"})]})]}),C(Fe,{container:!0,children:C(Fe,{display:"flex",justifyContent:"end",size:12,children:C(Ln,{sx:{mb:2},children:X("div",{children:[C(yt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(yt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})};function ext(e){const[t]=qe(),[n,r]=ul(e.fieldName);return C(gn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authors"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function txt(e){const[t]=qe(),[n,r]=ul(e.fieldName);return C(gn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authorProfile"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function nxt(e){const[t]=qe(),[n,r]=ul(e.fieldName);return C(gn,{fullWidth:!0,id:e.fieldName,label:t("licenses.derivativeSourceUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:t("licenses.derivativeSourceUrlHelper")||r.touched&&r.error,...n})}function rxt(e){const[t]=qe(),[n,r]=ul(e.fieldName);return C(gn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalObjectUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function oxt(e){const[t]=qe(),[n,r]=ul(e.fieldName);return C(gn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalTitle"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function ixt(e){const[t]=qe(),[n,r]=v.useState(pu.PHOTO),[o,i,a]=ul(e.fieldName);return X(S$e,{value:n,exclusive:!0,fullWidth:!0,onChange:(l,c)=>{r(c),a.setValue(c)},"aria-label":"text alignment",children:[C(Gb,{value:pu.PHOTO,children:X(Gt,{justifyContent:"center",alignItems:"center",children:[C(lyt,{}),C(ut,{variant:"caption",children:t("exercises.imageStylePhoto")})]})}),C(Gb,{value:pu.THREE_D,children:X(Gt,{justifyContent:"center",alignItems:"center",children:[C(ryt,{}),C(ut,{variant:"caption",children:t("exercises.imageStyle3D")})]})}),C(Gb,{value:pu.LINE_ART,children:X(Gt,{justifyContent:"center",alignItems:"center",children:[C(oyt,{}),C(ut,{variant:"caption",children:t("exercises.imageStyleLine")})]})}),C(Gb,{value:pu.LOW_POLY,children:X(Gt,{justifyContent:"center",alignItems:"center",children:[C(iyt,{}),C(ut,{variant:"caption",children:t("exercises.imageStyleLowPoly")})]})}),C(Gb,{value:pu.OTHER,children:X(Gt,{justifyContent:"center",alignItems:"center",children:[C(ayt,{}),C(ut,{variant:"caption",children:t("exercises.imageStyleOther")})]})})]})}const axt=({onContinue:e,onBack:t})=>{const[n]=qe(),r=Uc(),[o,i]=sb(),[a,s]=v.useState(o.images),[l,c]=v.useState(void 0),[u,d]=Y.useState(!1),f=()=>d(!1);v.useEffect(()=>{i(Z0t(a))},[i,a]);const p=x=>{var E;if(!((E=x.target.files)!=null&&E.length))return;const[S]=x.target.files,P=URL.createObjectURL(S);d(!0),c({url:P,file:S,author:"",authorUrl:"",title:"",derivativeSourceUrl:"",objectUrl:"",style:pu.PHOTO.toString()})},m=x=>{s(a.concat({url:l==null?void 0:l.url,file:l==null?void 0:l.file,author:x.author,authorUrl:x.authorUrl,title:x.title,derivativeSourceUrl:x.derivativeSourceUrl,objectUrl:x.objectUrl,style:x.imageStyle.toString()})),f()},g=x=>{const S=a.filter(P=>P.url!==x);s(S)},y=()=>{e()};return X("div",{children:[C(Sv,{open:u,onClose:f,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:X(Ln,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:600,bgcolor:"background.paper",boxShadow:24,p:4},children:[C(ut,{id:"modal-modal-title",variant:"h6",component:"h2",children:n("exercises.imageDetails")}),X(Fe,{container:!0,spacing:2,children:[C(Fe,{size:4,children:l&&C("img",{style:{width:"100%"},src:l.url,alt:"",loading:"lazy"})}),C(Fe,{size:8,children:C(cl,{initialValues:{title:"",objectUrl:"",author:r.isSuccess?r.data.username:"",authorUrl:"",derivativeSourceUrl:"",imageStyle:pu.PHOTO},onSubmit:x=>{console.log(x),m(x)},children:x=>X(as,{children:[X(Gt,{spacing:2,children:[C(oxt,{fieldName:"title"}),C(rxt,{fieldName:"objectUrl"}),C(ext,{fieldName:"author"}),C(txt,{fieldName:"authorUrl"}),C(nxt,{fieldName:"derivativeSourceUrl"}),C(ixt,{fieldName:"imageStyle"}),X(Bu,{icon:C(Wae,{fontSize:"inherit"}),severity:"info",children:["By submitting this image, you agree to release it under the ",C("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/",target:"_blank",rel:"noreferrer",children:"CC BY-SA 4.0"})," license. The image must be either your own work or the author must have released in under a license compatible with CC BY-SA 4.0."]})]}),C(Gt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(yt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("add")})})]})})})]})]})}),C(ut,{children:n("exercises.compatibleImagesCC")}),X(Gt,{direction:"row",justifyContent:"center",children:[X("div",{children:[C("label",{htmlFor:"camera-input",children:C(Xgt,{fontSize:"large",sx:{m:2}})}),C("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:p})]}),X("div",{children:[C("label",{htmlFor:"image-input",children:C(Jgt,{fontSize:"large",sx:{m:2}})}),C("input",{type:"file",accept:"image/*",name:"image-file",id:"image-input",style:{display:"none"},onChange:p})]})]}),C($J,{cols:3,style:{maxHeight:"400px"},children:a.map(x=>X(RJ,{children:[C("img",{style:{maxHeight:"400px",maxWidth:"400px"},src:x.url,alt:"",loading:"lazy"}),C(bIe,{title:x.title,subtitle:x.author,actionIcon:C(An,{onClick:()=>g(x.url),sx:{color:"white"},children:C(eyt,{})})})]},x.url))}),C(ut,{children:n("forms.supportedImageFormats")}),C(Fe,{container:!0,children:C(Fe,{display:"flex",justifyContent:"end",size:12,children:C(Ln,{sx:{mb:2},children:X(Mt,{children:[C(yt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(yt,{variant:"contained",onClick:y,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})},sxt="exercisecomment",R7=async e=>{const t=new zZ,n=Pt(sxt),r=await dt.post(n,t.toJson(e),{headers:kt()});return t.fromJson(r.data)},lxt="variation",cxt=async()=>{const e=Pt(lxt);return(await dt.post(e,{},{headers:kt()})).data.id},uxt=({onBack:e})=>{const[t,n]=qe(),[r]=sb(),o=Qh(),i=Fk(),a=Bk(),s=XS(),l=jk(),c=Uc(),[u,d]=v.useState("initial"),f=async()=>{d("loading");let m;r.newVariationBaseId!==null?m=await cxt():m=r.variationId;const g=await YDe(r.category,r.equipment,r.muscles,r.musclesSecondary,m,c.data.username),y=await pD({exerciseId:g,languageId:vh,name:r.nameEn,description:r.descriptionEn,author:c.data.username});for(const b of r.alternativeNamesEn)await mD(y.id,b);for(const b of r.images)await qZ({exerciseId:g,image:b.file,imageData:b});for(const b of r.notesEn)await R7(new fD(null,y.id,b));if(r.languageId!==null){const b=await pD({exerciseId:g,languageId:r.languageId,name:r.nameI18n,description:r.descriptionI18n,author:c.data.username});for(const x of r.alternativeNamesI18n)await mD(b.id,x);for(const x of r.notesI18n)await R7(new fD(null,b.id,x))}console.log("Exercise created"),d("done")},p=()=>{o(Pn(wn.EXERCISE_OVERVIEW,n.language))};return l.isLoading||a.isLoading||s.isLoading||i.isLoading?C(bo,{}):X(Mt,{children:[C(ut,{variant:"h6",children:t("exercises.step1HeaderBasics")}),C(Gu,{children:C(Uu,{children:X(Wu,{children:[X(Yt,{children:[C(Ie,{children:t("name")}),C(Ie,{children:r.nameEn})]}),X(Yt,{children:[C(Ie,{children:t("exercises.alternativeNames")}),C(Ie,{children:r.alternativeNamesEn.join(", ")})]}),X(Yt,{children:[C(Ie,{children:t("description")}),C(Ie,{children:r.descriptionEn})]}),X(Yt,{children:[C(Ie,{children:t("exercises.notes")}),C(Ie,{children:r.notesEn.map(m=>X(Mt,{children:[m,C("br",{})]}))})]}),X(Yt,{children:[C(Ie,{children:t("category")}),C(Ie,{children:t(Wi(i.data.find(m=>m.id===r.category).name))})]}),X(Yt,{children:[C(Ie,{children:t("exercises.equipment")}),C(Ie,{children:r.equipment.map(m=>t(Wi(l.data.find(g=>g.id===m).name))).join(", ")})]}),X(Yt,{children:[C(Ie,{children:t("exercises.muscles")}),C(Ie,{children:r.muscles.map(m=>s.data.find(g=>g.id===m).getName(t)).join(", ")})]}),X(Yt,{children:[C(Ie,{children:t("exercises.secondaryMuscles")}),C(Ie,{children:r.musclesSecondary.map(m=>s.data.find(g=>g.id===m).getName(t)).join(", ")})]}),X(Yt,{children:[C(Ie,{children:t("exercises.variations")}),X(Ie,{children:[r.variationId," / ",r.newVariationBaseId]})]})]})})}),r.images.length>0&&C($J,{cols:3,style:{maxHeight:"200px"},children:r.images.map(m=>C(RJ,{children:C("img",{style:{maxHeight:"200px",maxWidth:"200px"},src:m.url,alt:"",loading:"lazy"})},m.url))}),r.languageId!==null&&X(Mt,{children:[C(ut,{variant:"h6",sx:{mt:3},children:a.data.find(m=>m.id===r.languageId).nameLong}),C(Gu,{children:C(Uu,{children:X(Wu,{children:[X(Yt,{children:[C(Ie,{children:t("name")}),C(Ie,{children:r.nameI18n})]}),X(Yt,{children:[C(Ie,{children:t("exercises.alternativeNames")}),C(Ie,{children:r.alternativeNamesI18n.join(", ")})]}),X(Yt,{children:[C(Ie,{children:t("description")}),C(Ie,{children:r.descriptionI18n})]}),X(Yt,{children:[C(Ie,{children:t("exercises.notes")}),C(Ie,{children:r.notesI18n.map(m=>X(Mt,{children:[m,C("br",{})]}))})]})]})})})]}),u!=="done"?C(Bu,{severity:"info",sx:{mt:2},children:t("exercises.checkInformationBeforeSubmitting")}):X(Bu,{severity:"success",sx:{mt:2},children:[C(CE,{children:t("success")}),t("exercises.cacheWarning")]}),C(Fe,{container:!0,children:C(Fe,{display:"flex",justifyContent:"end",size:12,children:C(Ln,{sx:{mb:2},children:X("div",{children:[u!=="done"&&C(yt,{onClick:e,sx:{mt:1,mr:1},children:t("goBack")}),u!=="done"&&C(yt,{variant:"contained",disabled:u!=="initial",onClick:f,sx:{mt:1,mr:1},color:"info",children:t("exercises.submitExercise")}),u==="done"&&X(yt,{variant:"contained",onClick:p,sx:{mt:1,mr:1},color:"success",children:[t("overview"),C(syt,{})]})]})})})})]})},dxt=()=>{const[e]=qe(),[t,n]=Y.useState(0),r=()=>{n(i=>i+1)},o=()=>{n(i=>i-1)};return C(twt,{children:X(Vu,{maxWidth:"md",children:[C(Gt,{direction:"row",children:C(ut,{gutterBottom:!0,variant:"h3",component:"div",children:e("exercises.contributeExercise")})}),C(Ln,{children:X(nAe,{activeStep:t,orientation:"vertical",children:[X(Mm,{children:[C(xp,{children:e("exercises.step1HeaderBasics")}),C(Am,{children:C(nwt,{onContinue:r,onBack:o})})]},1),X(Mm,{children:[C(xp,{children:e("exercises.variations")}),C(Am,{children:C(owt,{onContinue:r,onBack:o})})]},2),X(Mm,{children:[C(xp,{children:e("description")}),C(Am,{children:C(Jwt,{onContinue:r,onBack:o})})]},3),X(Mm,{children:[C(xp,{children:e("translation")}),C(Am,{children:C(Zwt,{onContinue:r,onBack:o})})]},4),X(Mm,{children:[C(xp,{children:e("images")}),C(Am,{children:C(axt,{onContinue:r,onBack:o})})]},5),X(Mm,{children:[C(xp,{children:e("overview")}),C(Am,{children:C(uxt,{onBack:o})})]},6)]})})]})})},fxt=()=>{const[e]=qe(),t=cz();return X(Vu,{maxWidth:"md",children:[C(ut,{variant:"h3",children:e("exercises.notEnoughRightsHeader")}),X(Ln,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[C(ut,{mb:2,children:e("exercises.notEnoughRights",{days:k2e})}),!t.anonymous&&!t.emailVerified&&C(yt,{variant:"contained",href:"/user/preferences",endIcon:C(qgt,{}),children:e("preferences")})]})]})},pxt=()=>{const e=cz();return C(Mt,{children:e.canContribute?C(dxt,{}):C(fxt,{})})},hxt=()=>C("div",{children:"Add Weight Page"}),mxt=({currentMonth:e,currentYear:t,onPrevMonth:n,onNextMonth:r})=>{const{i18n:o}=qe(),i=Array.from({length:12},(a,s)=>new Date(2024,s,1).toLocaleString(o.language,{month:"long"}));return X("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",paddingBottom:"3%"},children:[C(yt,{variant:"outlined",onClick:n,children:"<"}),X(ut,{variant:"h5",children:[i[e]," ",t]}),C(yt,{variant:"outlined",onClick:r,children:">"})]})},gxt=({day:e,currentMonth:t,currentDate:n,selectedDay:r,onClick:o})=>{const i=Ao(),a=bf(i.breakpoints.down("sm")),s=bf(i.breakpoints.down("md")),l=cf(e.date,r.date),c=cf(e.date,n),u=e.date.getMonth()===t&&(e.date.getDate()<=n.getDate()||e.date.getMonth()l||c?"white":u?d?"#E53945":"black":"gray",p=()=>a?35:s?40:50,m=()=>a?8:s?9:10,g=()=>e.measurements.length>0||e.weightEntry!==void 0,y=()=>{u&&o(e)},b=p(),x=m();return X("div",{style:{position:"relative",width:`${b}px`,height:`${b+x/2}px`,display:"flex",flexDirection:"column",alignItems:"center"},children:[C("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:`${b}px`,height:`${b}px`,fontSize:a?"0.8rem":s?"0.9rem":"1rem",color:l||c?"white":f(),backgroundColor:l?"#E53945":c?"#FEC107":"transparent",borderRadius:"50%",fontWeight:"bold",cursor:u?"pointer":"default",opacity:e.date.getMonth()!==t?.25:1},"data-testid":`day-${ni(e.date)}`,onClick:y,children:e.date.getDate()}),g()&&C("div",{style:{width:`${x}px`,height:`${x}px`,backgroundColor:"black",borderRadius:"50%",position:"absolute",bottom:0,left:"50%",transform:"translateX(-50%)",zIndex:2}})]})},yxt=({days:e,currentMonth:t,currentDate:n,selectedDay:r,onDayClick:o})=>{const{i18n:i}=qe(),a=Array.from({length:7},(s,l)=>new Date(1970,0,l+5).toLocaleString(i.language,{weekday:"short"}));return X(Fe,{container:!0,spacing:1,rowSpacing:2,children:[a.map((s,l)=>C(Fe,{size:12/7,children:C(ut,{variant:"body1",sx:{fontWeight:"bold",textAlign:"center"},children:s})},`weekday-${l}`)),e.map((s,l)=>C(Fe,{size:12/7,sx:{display:"flex",justifyContent:"center"},children:C(gxt,{day:s,currentMonth:t,currentDate:n,selectedDay:r,onClick:o})},`day-${l}`))]})},vxt=({selectedDay:e})=>{const[t]=qe(),n=t("no_entries_for_day");return X(io,{sx:{width:{xs:"auto",md:"65%"},height:{xs:"60%",md:"100%"},m:{xs:0,sm:1,md:2},p:{xs:1,sm:1.5,md:2}},children:[C(Zl,{title:X(ut,{variant:"h5",component:"div",sx:{fontWeight:"bold"},children:[t("entries")," - ",e.date.toLocaleDateString()]})}),X(wi,{sx:{flex:1,overflow:"auto",display:"flex",flexDirection:"column",gap:2},children:[X("div",{className:"flex items-center gap-2",children:[X("span",{className:"font-extrabold",children:[t("weight"),": "]}),C("span",{className:`${e.weightEntry?"text-xl font-semibold":"text-gray-500"}`,children:e.weightEntry?`${e.weightEntry.weight.toFixed(1)} kg`:n})]}),X("div",{className:"flex flex-col gap-1",children:[X("span",{className:"font-bold",children:[t("measurements.measurements"),": "]}),e.measurements.length===0?C("span",{className:"text-gray-500 mt-1",children:n}):C("div",{className:"flex flex-col gap-0.5",children:e.measurements.map(r=>X("div",{children:[r.name,": ",r.value," ",r.unit]},r.name))})]})]})]})};class bxt{constructor(t,n,r,o){this.name=t,this.unit=n,this.value=r,this.date=o}}function Kse(){return oo({queryKey:[Mv],queryFn:R_e})}const wxt=()=>{const e=gr();return $r({mutationFn:t=>__e(t),onSuccess:()=>e.invalidateQueries({queryKey:[Mv]})})},xxt=e=>{const t=gr();return $r({mutationFn:n=>L_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[kv,e]}),t.invalidateQueries({queryKey:[Mv]})}})},Sxt=e=>{const t=gr();return $r({mutationFn:n=>N_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[kv,e]}),t.invalidateQueries({queryKey:[Mv]})}})};function Yse(e){return oo({queryKey:[kv,e],queryFn:()=>D_e(e)})}const Cxt=()=>{const e=gr();return $r({mutationFn:t=>B_e(t),onError:t=>{console.log(t)},onSuccess:()=>{e.invalidateQueries({queryKey:[kv]}),e.invalidateQueries({queryKey:[Mv]})}})},Xse=()=>{const e=gr();return $r({mutationFn:t=>j_e(t),onSuccess:()=>{e.invalidateQueries({queryKey:[kv]}),e.invalidateQueries({queryKey:[Mv]})}})},Pxt=()=>{const e=gr();return $r({mutationFn:t=>F_e(t),onSuccess:()=>e.invalidateQueries({queryKey:[kv]})})};function Ext(){const t=Kse().data;return(t==null?void 0:t.flatMap(n=>n.entries.map(r=>new bxt(n.name,n.unit,r.value,r.date))))??[]}const Txt=()=>{const[e]=qe(),n=KS().data,r=Ext(),o=(S,P)=>{const E=new Date(S,P,1),T=[];let k=new Date(S,P,1).getDay();k=k===0?6:k-1;for(let R=0;Rcf(R.date,E)),measurements:r.filter(R=>cf(R.date,E))}),E.setDate(E.getDate()+1);k=new Date(S,P+1,0).getDay();const I=k===0?0:7-k;for(let R=1;R<=I;R++)T.push({date:new Date(S,P+1,R),weightEntry:void 0,measurements:[]});return T},i=new Date,a={date:i,weightEntry:void 0,measurements:[]},[s,l]=v.useState(i.getMonth()),[c,u]=v.useState(i.getFullYear()),d=o(c,s),[f,p]=v.useState(d.find(S=>cf(S.date,i))||a),m=Ao(),g=bf(m.breakpoints.down("sm"));v.useEffect(()=>{l(f.date.getMonth()),u(f.date.getFullYear())},[f]);const y=S=>{p(S)},b=()=>{s===0?(l(11),u(c-1)):l(s-1)},x=()=>{(sC("div",{children:C(Txt,{})}),Ixt=()=>C("div",{children:"Calories Calculator Page"}),kxt=()=>C("div",{children:"Equipments Page"}),Mxt=()=>C("div",{children:"Gallery Page"}),Axt=()=>C("div",{children:"Ingredients Page"}),$xt=()=>C("div",{children:"Login Page"}),Rxt=()=>C("div",{children:"Preferences Page"}),Dxt=()=>C("div",{children:"Public Template"}),_xt=()=>C("div",{children:"RestApi Page"}),Lxt=()=>C("div",{children:"Your Template"}),Nxt=({weight:e})=>{const t=gvt(),[n]=qe(),[r,o]=Y.useState(null),[i,a]=Y.useState(!1),s=!!r,l=m=>{o(m.currentTarget)},c=()=>{u(),f()},u=()=>{o(null)},d=()=>{t.mutate(e.id),o(null)},f=()=>a(!0),p=()=>a(!1);return X("div",{children:[C(yt,{onClick:l,children:C(Ggt,{})}),X(is,{anchorEl:r,open:s,onClose:u,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(tn,{onClick:c,children:n("edit")}),C(tn,{onClick:d,children:n("delete")})]}),C(Yi,{title:n("edit"),isOpen:i,closeFn:p,children:C(ib,{weightEntry:e,closeFn:p})})]})},Fxt=()=>{const[e]=qe(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1);return X("div",{children:[C(Rh,{color:"primary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Gi,{})}),C(Yi,{title:e("add"),isOpen:t,closeFn:o,children:C(ib,{closeFn:o})})]})},jxt=e=>e.map((t,n)=>n===0?{entry:t,change:0,days:Math.abs(t.date.getTime()-t.date.getTime())/(1e3*60*60*24)}:{entry:t,change:e[n].weight-e[n-1].weight,days:Math.abs(t.date.getTime()-e[n-1].date.getTime())/(1e3*60*60*24)}),Bxt=Pse(e=>({table:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),zxt=({weights:e})=>{const t=[10,50,100],[n]=qe(),r=Bxt(),o=jxt(e),[i,a]=v.useState(t[0]),[s,l]=v.useState(0),c=(d,f)=>{l(f)},u=d=>{a(parseInt(d.target.value,10)),l(0)};return X("div",{className:r.table,children:[X(Gu,{children:[X(Uu,{sx:{minWidth:650},"aria-label":"simple table",children:[C(_h,{children:X(Yt,{children:[C(Ie,{align:"center",children:n("date")}),C(Ie,{align:"center",children:n("weight")}),C(Ie,{align:"center",children:n("difference")}),C(Ie,{align:"center",children:n("days")}),C(Ie,{align:"center"})]})}),C(Wu,{children:o.slice(s*i,s*i+i).map(d=>X(Yt,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[C(Ie,{component:"th",scope:"row",align:"center",children:d.entry.date.toLocaleDateString()}),C(Ie,{align:"center",children:d.entry.weight}),C(Ie,{align:"center",children:+d.change.toFixed(2)}),C(Ie,{align:"center",children:d.days}),C(Ie,{align:"center",children:C(Nxt,{weight:d.entry})})]},d.entry.date.toLocaleDateString()))})]}),C(RF,{rowsPerPageOptions:t,component:"div",count:o.length,rowsPerPage:i,page:s,onPageChange:c,onRowsPerPageChange:u})]}),C(Fxt,{})]})},Vxt=()=>{const[e]=qe(),[t,n]=v.useState(!1),r=()=>n(!0),o=()=>n(!1);return X("div",{children:[C(Rh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Gi,{})}),C(Yi,{title:e("add"),isOpen:t,closeFn:o,children:C(ib,{closeFn:o})})]})},Hxt=({currentFilter:e,onFilterChange:t})=>{const[n]=qe(),r=Ao(),o=i=>{e!==i&&t(i)};return X(GEe,{variant:"outlined",sx:{mb:2},children:[C(yt,{onClick:()=>o(""),color:e===""?"primary":"inherit",variant:e===""?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("all")}),C(yt,{onClick:()=>o("lastYear"),color:e==="lastYear"?"primary":"inherit",variant:e==="lastYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastYear")}),C(yt,{onClick:()=>o("lastHalfYear"),color:e==="lastHalfYear"?"primary":"inherit",variant:e==="lastHalfYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastHalfYear")}),C(yt,{onClick:()=>o("lastMonth"),color:e==="lastMonth"?"primary":"inherit",variant:e==="lastMonth"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastMonth")}),C(yt,{onClick:()=>o("lastWeek"),color:e==="lastWeek"?"primary":"inherit",variant:e==="lastWeek"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastWeek")})]})},Zh=e=>X(Vu,{maxWidth:"lg",children:[X(Fe,{container:!0,spacing:2,children:[C(Fe,{sx:{mb:2},size:8,children:X(Gt,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[C(ut,{gutterBottom:!0,variant:"h3",children:e.title}),e.optionsMenu]})}),C(Fe,{size:{xs:12,sm:8},children:e.mainContent}),C(Fe,{size:{xs:12,sm:4},children:e.sideBar})]}),e.fab]}),Uxt=()=>{const[e]=qe(),[t,n]=v.useState("lastYear"),r=KS(t),o=i=>{n(i)};return r.isLoading?C(bo,{}):C(Zh,{title:e("weight"),mainContent:X(Gt,{spacing:2,children:[C(Hxt,{currentFilter:t,onFilterChange:o}),r.data.length===0&&C(cI,{}),r.data.length!==0&&X(Mt,{children:[C(Ese,{weights:r.data}),C(Ln,{sx:{mt:4}}),C(zxt,{weights:r.data})]})]}),fab:C(Vxt,{})})},Wxt=()=>{const{i18n:e}=qe(),[t,n]=Y.useState(null);return X(Mt,{children:[C(yt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Weight"}),X(is,{anchorEl:t,open:!!t,onClose:()=>n(null),children:[C(tn,{component:zs,to:Pn(wn.WEIGHT_OVERVIEW,e.language),children:"Weight overview"}),C(tn,{component:zs,to:Pn(wn.WEIGHT_ADD,e.language),children:"Add weight entry"})]})]})},Gxt=()=>{const{i18n:e}=qe(),[t,n]=Y.useState(null);return X(Mt,{children:[C(yt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Measurements"}),C(is,{anchorEl:t,open:!!t,onClose:()=>n(null),children:C(tn,{component:zs,to:Pn(wn.MEASUREMENT_OVERVIEW,e.language),children:"Overview"})})]})},qxt=()=>{const{i18n:e}=qe(),[t,n]=Y.useState(null);return X(Mt,{children:[C(yt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Nutrition"}),C(is,{anchorEl:t,open:!!t,onClose:()=>n(null),children:C(tn,{component:zs,to:Pn(wn.NUTRITION_OVERVIEW,e.language),children:"Overview"})})]})},Kxt=()=>{const{i18n:e}=qe(),[t,n]=Y.useState(null);return X(Mt,{children:[C(yt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Routines"}),X(is,{anchorEl:t,open:!!t,onClose:()=>n(null),children:[C(tn,{component:zs,to:Pn(wn.ROUTINE_OVERVIEW,e.language),children:"Routine overview"}),C(tn,{component:zs,to:Pn(wn.EXERCISE_OVERVIEW,e.language),children:"Exercise overview"}),C(tn,{component:zs,to:Pn(wn.EXERCISE_CONTRIBUTE,e.language),children:"Contribute exercise"}),C(tn,{component:zs,to:Pn(wn.CALENDAR,e.language),children:"Calendar"})]})]})},Yxt=()=>C(gCe,{position:"static",children:X(WJ,{children:[C(ut,{variant:"h6",component:"div",mr:3,children:"wger"}),C(Kxt,{}),C(Wxt,{}),C(Gxt,{}),C(qxt,{})]})}),Qse=()=>C(Uxt,{}),Xxt=()=>C("div",{children:"Workout Page"}),Qxt=()=>C("div",{children:"Workout Schedule"});var rd,D7=eI;rd=D7.createRoot,D7.hydrateRoot;const Jxt=()=>X(Fe,{container:!0,spacing:2,children:[C(Fe,{size:4,children:C(sse,{})}),C(Fe,{size:4,children:C(zae,{})}),C(Fe,{size:4,children:C(Tse,{})})]}),JS=v.createContext({}),Jse=()=>{const{data:e,isLoading:t}=Fk(),{selectedCategories:n,setSelectedCategories:r}=v.useContext(JS),[o]=qe(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?C(bo,{}):C(ol,{children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return C(Ja,{disablePadding:!0,children:X(Df,{role:void 0,onClick:i(a),dense:!0,children:[C(zi,{children:C(Hu,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`category-${a.id}`)}),C(go,{id:s,primary:o(Wi(a.name))})]})},a.id)})})},Zxt=()=>{const[e]=qe();return X(hF,{children:[C(gF,{expandIcon:C(Tv,{}),children:e("category")}),C(mF,{children:C(Jse,{})})]})},eSt=()=>{const[e]=qe();return C("div",{"data-testid":"categories",children:X(so,{children:[C(ut,{gutterBottom:!0,variant:"h6",m:2,children:e("category")}),C(Jse,{})]})})},Zse=()=>{const{data:e,isLoading:t}=jk(),{selectedEquipment:n,setSelectedEquipment:r}=v.useContext(JS),[o]=qe(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?C(bo,{}):C(ol,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return C(Ja,{disablePadding:!0,children:X(Df,{role:void 0,onClick:i(a),dense:!0,children:[C(zi,{children:C(Hu,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),C(go,{id:s,primary:o(Wi(a.name))})]})},a.id)})})},tSt=()=>{const[e]=qe();return X(hF,{children:[C(gF,{expandIcon:C(Tv,{}),children:e("exercises.equipment")}),C(mF,{children:C(Zse,{})})]})},nSt=()=>{const[e]=qe();return C("div",{"data-testid":"equipment",children:X(so,{sx:{mt:2},children:[C(ut,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.equipment")}),C(Zse,{})]})})},rSt=ie(({className:e,...t})=>C(Xl,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${jr.tooltip}`]:{backgroundColor:"rgb(245, 245, 245)",color:"rgba(0, 0, 0, 0.87)",boxShadow:e.shadows[1],fontSize:11}})),ele=()=>{const{data:e,isLoading:t}=XS(),{selectedMuscles:n,setSelectedMuscles:r}=v.useContext(JS),[o]=qe(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?C(bo,{}):C(ol,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return C(Ja,{disablePadding:!0,secondaryAction:C(rSt,{title:C(Eh,{primaryMuscles:[a],secondaryMuscles:[],isFront:a.isFront}),placement:"right",arrow:!0,children:C(An,{edge:"end","aria-label":"comments",children:C(Gae,{})})}),children:X(Df,{role:void 0,onClick:i(a),dense:!0,children:[C(zi,{children:C(Hu,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),C(go,{id:s,primary:a.name,secondary:a.nameEn!==""?o(Wi(a.nameEn)):""})]})},a.id)})})},oSt=()=>{const[e]=qe();return X(hF,{children:[C(gF,{expandIcon:C(Tv,{}),children:e("exercises.muscles")}),C(mF,{children:C(ele,{})})]})},iSt=()=>{const[e]=qe();return C("div",{"data-testid":"muscles",children:X(so,{sx:{mt:2},children:[C(ut,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.muscles")}),C(ele,{})]})})},aSt=({exercises:e})=>{const t=Bk(),[n,r]=qe();let o;return t.isSuccess&&(o=hD(r.language,t.data)),C(Fe,{container:!0,spacing:1,children:e.map(i=>C(Fe,{sx:{display:"flex"},size:{xs:6,md:4},children:C(Gse,{exercise:i,language:o})},i.id))})},sSt=()=>C(Fe,{container:!0,spacing:1,children:Array.apply(null,Array(21)).map((e,t)=>C(Fe,{sx:{display:"flex"},size:4,children:X(io,{children:[C(_c,{children:C(CP,{variant:"rectangular",width:250,height:150})}),C(wi,{children:X(Ln,{sx:{pt:.5},children:[C(CP,{width:"60%"}),C(CP,{})]})})]})},t))}),lSt=({children:e})=>{const[t]=qe(),[n,r]=v.useState(!1),o=i=>()=>{r(i)};return X(Mt,{children:[C(yt,{onClick:o(!0),children:C(nyt,{})}),X(DOe,{open:n,onClose:o(!1),anchor:"right",children:[X(Gt,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[C(ut,{gutterBottom:!0,variant:"h6",m:2,children:t("filters")}),C(yt,{onClick:o(!1),children:C(mS,{})})]}),C(Qa,{}),e]})]})},cSt=()=>{const[e,t]=qe();return X(Ln,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[C(ut,{gutterBottom:!0,variant:"h4",component:"div",children:e("exercises.missingExercise")}),C(ut,{gutterBottom:!0,variant:"body1",component:"div",children:e("exercises.missingExerciseDescription")}),C(zs,{to:Pn(wn.EXERCISE_CONTRIBUTE,t.language),children:e("exercises.contributeExercise")})]})},uSt=()=>{const e=Mse(),[t,n]=qe(),r=Qh(),{selectedCategories:o,selectedEquipment:i,selectedMuscles:a}=v.useContext(JS),s=bf("(max-width:600px)"),[l,c]=Y.useState(1),u=(y,b)=>{c(b),window.scrollTo({top:0,behavior:"smooth"})};let d=v.useMemo(()=>{let y=e.data||[];return o.length>0&&(y=y.filter(b=>o.some(x=>b.category.id===x.id))),i.length>0&&(y=y.filter(b=>b.equipment.some(x=>i.some(S=>S.id===x.id)))),a.length>0&&(y=y.filter(b=>b.muscles.some(x=>a.some(S=>S.id===x.id)))),y},[e.data,o,i,a]);const f=21,p=Math.ceil(d.length/f),m=d.slice((l-1)*f,l*f),g=y=>{r(Pn(wn.EXERCISE_DETAIL,n.language,{id:y.data.base_id}))};return C(Vu,{maxWidth:"lg",children:X(Fe,{container:!0,spacing:2,mt:2,children:[C(Fe,{size:{xs:10,sm:6},children:C(ut,{gutterBottom:!0,variant:"h3",component:"div",children:t("exercises.exercises")})}),s?X(Mt,{children:[C(Fe,{size:{xs:2,sm:6},children:C(yt,{variant:"contained",onClick:()=>r(Pn(wn.EXERCISE_CONTRIBUTE,n.language)),children:C(Gi,{})})}),C(Fe,{flexGrow:1,size:{sm:6},children:C(kL,{callback:g})}),C(Fe,{display:"flex",justifyContent:"center",alignItems:"center",size:{xs:2,sm:6},children:X(lSt,{children:[C(Zxt,{}),C(tSt,{}),C(oSt,{})]})})]}):X(Mt,{children:[C(Fe,{size:{xs:12,sm:3},children:C(kL,{callback:g})}),C(Fe,{size:{xs:12,sm:3},children:C(yt,{variant:"contained",startIcon:C(Gi,{}),onClick:()=>r(Pn(wn.EXERCISE_CONTRIBUTE,n.language)),children:t("exercises.contributeExercise")})})]}),!s&&C(Fe,{size:{xs:12,sm:3},children:X(Fe,{container:!0,spacing:1,children:[C(Fe,{size:{xs:6,sm:12},children:C(eSt,{})}),C(Fe,{size:{xs:6,sm:12},children:C(nSt,{})}),C(Fe,{size:12,children:C(iSt,{})})]})}),X(Fe,{size:{xs:12,sm:9},children:[e.isLoading?C(sSt,{}):X(Mt,{children:[C(aSt,{exercises:m}),C(Gt,{spacing:2,alignItems:"center",sx:{mt:2},children:C(Xke,{count:p,color:"primary",page:l,onChange:u})})]}),C(cSt,{})]})]})})},_7=()=>{const[e,t]=v.useState([]),[n,r]=v.useState([]),[o,i]=Y.useState([]);return C(JS.Provider,{value:{selectedEquipment:e,setSelectedEquipment:t,selectedMuscles:n,setSelectedMuscles:r,selectedCategories:o,setSelectedCategories:i},children:C(uSt,{})})},XC=['"Open Sans Bold"',"sans-serif"].join(","),dSt=['"Open Sans Light"',"sans-serif"].join(","),tle={spacing:8,typography:{h3:{fontFamily:XC},h4:{fontFamily:XC},h5:{fontFamily:XC},h6:{fontFamily:XC},fontFamily:dSt},palette:{primary:{main:"#2A4C7D"},secondary:{main:"#e63946"},warning:{main:"#cba328"},info:{main:"#457b9d"},success:{main:"#307916"}}},Uf=rS(tle),fSt=e=>rS({...tle,components:{MuiPopover:{defaultProps:{container:e}},MuiPopper:{defaultProps:{container:e}},MuiModal:{defaultProps:{container:e}}}}),nle=e=>{const{i18n:t}=qe(),n=30,r=[...e.category.entries].sort((o,i)=>o.date.getTime()-i.date.getTime()).map(o=>({date:o.date.getTime(),value:o.value,entry:o}));return C(Ln,{alignItems:"center",display:"flex",flexDirection:"column",children:C(Nf,{width:"90%",height:200,children:X(Gre,{data:r,children:[C(Kv,{type:"monotone",dataKey:"value",stroke:Uf.palette.secondary.main,strokeWidth:2,dot:r.length>n?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6}}),C(jh,{stroke:"#ccc",strokeDasharray:"5 5"}),C(sl,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:o=>new Date(o).toLocaleDateString(t.language),tickCount:10}),C(ll,{domain:["auto","auto"],unit:e.category.unit})]})})})},rle=({category:e,closeFn:t})=>{const[n]=qe(),r=wxt(),o=xxt(e==null?void 0:e.id),i=dl({name:Nc().required(n("forms.fieldRequired")).max(20,n("forms.maxLength",{chars:"20"})).min(3,n("forms.minLength",{chars:"3"})),unit:Nc().required(n("forms.fieldRequired")).max(5,n("forms.maxLength",{chars:"5"}))});return C(cl,{initialValues:{name:e?e.name:"",unit:e?e.unit:""},validationSchema:i,onSubmit:async a=>{e?o.mutate({...a,id:e.id}):r.mutate(a),t&&t()},children:a=>C(as,{children:X(Gt,{spacing:2,children:[C(gn,{fullWidth:!0,id:"name",label:n("name"),error:a.touched.name&&!!a.touched.name,helperText:a.touched.name&&a.errors.name,...a.getFieldProps("name")}),C(gn,{fullWidth:!0,id:"unit",label:n("unit"),error:a.touched.unit&&!!a.errors.unit,helperText:a.touched.unit&&a.errors.unit?a.errors.unit:n("measurements.unitFormHelpText"),...a.getFieldProps("unit")}),C(Gt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(yt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})};Br.defaultZone=U2e;const ole=({entry:e,closeFn:t,categoryId:n})=>{const[r,o]=qe(),i=Cxt(),a=Xse(),s=Yse(n),[l,c]=Y.useState(e?It.fromJSDate(e.date):It.now()),u=dl({value:sa().required(r("forms.fieldRequired")).min(0,r("forms.minValue",{value:"0"})).max(1e3,r("forms.maxValue",{value:"1000"})),date:US().required(r("forms.fieldRequired")),notes:Nc().max(500,r("forms.maxLength",{value:"500"}))});return C(cl,{initialValues:{value:e?e.value:0,date:e?e.date:new Date,notes:e?e.notes:""},validationSchema:u,onSubmit:async d=>{e?a.mutate({...d,id:e.id}):i.mutate({...d,categoryId:n}),t&&t()},children:d=>C(as,{children:X(Gt,{spacing:2,children:[C(gn,{fullWidth:!0,id:"value",type:"number",label:r("value"),error:d.touched.value&&!!d.errors.value,helperText:d.touched.value&&d.errors.value,...d.getFieldProps("value")}),s.isLoading?C(bo,{}):C(RS,{dateAdapter:Ok,adapterLocale:o.language,children:C(joe,{format:"yyyy-MM-dd",label:r("date"),value:l,disableFuture:!0,onChange:f=>{f&&d.setFieldValue("date",f.toJSDate()),c(f)},shouldDisableDate:f=>e&&ni(e.date)===ni(f.toJSDate())?!1:f?s.data.entries.some(p=>ni(p.date)===ni(f.toJSDate())):!1})}),C(gn,{fullWidth:!0,id:"notes",label:r("notes"),multiline:!0,error:d.touched.notes&&!!d.errors.notes,helperText:d.touched.notes&&d.errors.notes,...d.getFieldProps("notes")}),C(Gt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(yt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:r("submit")})})]})})})},pSt=()=>{const[e]=qe(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1);return X("div",{children:[C(Rh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Gi,{})}),C(Yi,{title:e("add"),isOpen:t,closeFn:o,children:C(rle,{closeFn:o})})]})},hSt=()=>{const[e]=qe(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1),i=Jh(),a=parseInt(i.categoryId);return X(Mt,{children:[C(Rh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:s=>s.spacing(2),zIndex:9},children:C(Gi,{})}),C(Yi,{title:e("add"),isOpen:t,closeFn:o,children:C(ole,{closeFn:o,categoryId:a})})]})},ile=v.createContext(void 0);function sn(){const e=v.useContext(ile);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` +`));return e}const ale=v.createContext(void 0),wt=()=>{const e=v.useContext(ale);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e},mSt=parseInt(v.version,10),$n=e=>{if(mSt>=19){const t=n=>e(n,n.ref??null);return t.displayName=e.displayName??e.name,t}return v.forwardRef(e)},gSt=Object.is;function sle(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const o in e)if(n+=1,!gSt(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}function Wf(e){return v.memo(e,sle)}const ySt={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",columnsManagementDeleteIconLabel:"Clear",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>e!==1?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"};function Sn(e){return _e("MuiDataGrid",e)}const ae=Le("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementSearchInput","columnsManagementFooter","container--top","container--bottom","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hasSkeletonLoadingOverlay","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"]),L7=1e3;class vSt{constructor(t=L7){this.timeouts=new Map,this.cleanupTimeout=L7,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class bSt{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}var Xs=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}(Xs||{});class wSt{}function xSt(e){let t=0;return function(r,o,i,a){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new bSt:new vSt);const[s]=v.useState(new wSt),l=v.useRef(null),c=v.useRef();c.current=i;const u=v.useRef(null);if(!l.current&&c.current){const d=(f,p,m)=>{var g;p.defaultMuiPrevented||(g=c.current)==null||g.call(c,f,p,m)};l.current=r.current.subscribeEvent(o,d,a),t+=1,u.current={cleanupToken:t},e.registry.register(s,()=>{var f;(f=l.current)==null||f.call(l),l.current=null,u.current=null},u.current)}else!c.current&&l.current&&(l.current(),l.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));v.useEffect(()=>{if(!l.current&&c.current){const d=(f,p,m)=>{var g;p.defaultMuiPrevented||(g=c.current)==null||g.call(c,f,p,m)};l.current=r.current.subscribeEvent(o,d,a)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var d;(d=l.current)==null||d.call(l),l.current=null}},[r,o,a])}}const SSt={registry:null},gt=xSt(SSt),CSt={isFirst:!0};function lr(e,t,n){gt(e,t,n,CSt)}function PSt(e){return e.acceptsApiRef}function N7(e,t){return PSt(t)?t(e):t(e.current.state)}const ESt=Object.is,lle=sle,TSt=()=>({state:null,equals:null,selector:null,args:null}),Ye=(e,t,n=ESt)=>{const r=Jl(TSt),o=r.current.selector!==null,[i,a]=v.useState(o?null:N7(e,t));return r.current.state=i,r.current.equals=n,r.current.selector=t,DO(()=>e.current.store.subscribe(()=>{const s=N7(e,r.current.selector);r.current.equals(r.current.state,s)||(r.current.state=s,a(s))})),i},Ci=e=>e.dimensions;var XT=Symbol("NOT_FOUND");function OSt(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function ISt(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function kSt(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var F7=e=>Array.isArray(e)?e:[e];function MSt(e){const t=Array.isArray(e[0])?e[0]:e;return kSt(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ASt(e,t){const n=[],{length:r}=e;for(let o=0;ot(s,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return XT}function o(s,l){r(s)===XT&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var DSt=(e,t)=>e===t;function _St(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;ii(p.value,u));f&&(u=f.value,s!==0&&s--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}var LSt=class{constructor(e){this.value=e}deref(){return this.value}},NSt=typeof WeakRef<"u"?WeakRef:LSt,FSt=0,j7=1;function QC(){return{s:FSt,v:void 0,o:null,p:null}}function ule(e,t={}){let n=QC();const{resultEqualityCheck:r}=t;let o,i=0;function a(){var d;let s=n;const{length:l}=arguments;for(let f=0,p=l;f{n=QC(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function dle(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,a=0,s,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),OSt(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:p=ule,argsMemoizeOptions:m=[],devModeChecks:g={}}=u,y=F7(f),b=F7(m),x=MSt(o),S=d(function(){return i++,c.apply(null,arguments)},...y),P=p(function(){a++;const T=ASt(x,arguments);return s=S.apply(null,T),s},...b);return Object.assign(P,{resultFunc:c,memoizedResultFunc:S,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var jSt=dle(ule),BSt=Object.assign((e,t=jSt)=>{ISt(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((a,s,l)=>(a[n[l]]=s,a),{}))},{withTypes:()=>BSt});const zSt=dle({memoize:cle,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),B7=new WeakMap;function eg(e){return"current"in e&&"instanceId"in e.current}const tg={id:"default"},Dt=(e,t,n,r,o,i,...a)=>{if(a.length>0)throw new Error("Unsupported number of selectors");let s;if(e&&t&&n&&r&&o&&i)s=(l,c)=>{const u=eg(l),d=c??(u?l.current.instanceId:tg),f=u?l.current.state:l,p=e(f,d),m=t(f,d),g=n(f,d),y=r(f,d),b=o(f,d);return i(p,m,g,y,b)};else if(e&&t&&n&&r&&o)s=(l,c)=>{const u=eg(l),d=c??(u?l.current.instanceId:tg),f=u?l.current.state:l,p=e(f,d),m=t(f,d),g=n(f,d),y=r(f,d);return o(p,m,g,y)};else if(e&&t&&n&&r)s=(l,c)=>{const u=eg(l),d=c??(u?l.current.instanceId:tg),f=u?l.current.state:l,p=e(f,d),m=t(f,d),g=n(f,d);return r(p,m,g)};else if(e&&t&&n)s=(l,c)=>{const u=eg(l),d=c??(u?l.current.instanceId:tg),f=u?l.current.state:l,p=e(f,d),m=t(f,d);return n(p,m)};else if(e&&t)s=(l,c)=>{const u=eg(l),d=c??(u?l.current.instanceId:tg),f=u?l.current.state:l,p=e(f,d);return t(p)};else throw new Error("Missing arguments");return s.acceptsApiRef=!0,s},rr=(...e)=>{const t=(n,r)=>{const o=eg(n),i=o?n.current.instanceId:r??tg,a=o?n.current.state:n,s=B7.get(i),l=s??new Map,c=l==null?void 0:l.get(e);if(l&&c)return c(a,i);const u=zSt(...e);return s||B7.set(i,l),l.set(e,u),u(a,i)};return t.acceptsApiRef=!0,t},VSt=.7,HSt=1.3,USt={compact:VSt,comfortable:HSt,standard:1},Ig=e=>e.density,ZS=Dt(Ig,e=>USt[e]);let ur=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const ML={left:[],right:[]},WSt=e=>e.isRtl,Ac=e=>e.columns,Iu=Dt(Ac,e=>e.orderedFields),od=Dt(Ac,e=>e.lookup),Ul=rr(Iu,od,(e,t)=>e.map(n=>t[n])),Vs=Dt(Ac,e=>e.columnVisibilityModel),ho=rr(Ul,Vs,(e,t)=>e.filter(n=>t[n.field]!==!1)),lb=rr(ho,e=>e.map(t=>t.field)),GSt=e=>e.pinnedColumns,e1=rr(Ac,GSt,lb,WSt,(e,t,n,r)=>{const o=qSt(t,n,r);return{left:o.left.map(a=>e.lookup[a]),right:o.right.map(a=>e.lookup[a])}});function qSt(e,t,n){var s,l;if(!Array.isArray(e.left)&&!Array.isArray(e.right)||((s=e.left)==null?void 0:s.length)===0&&((l=e.right)==null?void 0:l.length)===0)return ML;const r=(c,u)=>Array.isArray(c)?c.filter(d=>u.includes(d)):[],o=r(e.left,t),i=t.filter(c=>!o.includes(c)),a=r(e.right,i);return n?{left:a,right:o}:{left:o,right:a}}const Gf=rr(ho,e=>{const t=[];let n=0;for(let r=0;r{const n=e.length;return n===0?0:t[n-1]+e[n-1].computedWidth}),fle=rr(Ul,e=>e.filter(t=>t.filterable)),KSt=rr(Ul,e=>e.reduce((t,n)=>(n.filterable&&(t[n.field]=n),t),{})),YSt=rr(Ul,e=>e.some(t=>t.colSpan!==void 0)),XSt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],QSt=e=>{const{classes:t}=e;return Te({root:["editInputCell"]},Sn,t)},JSt=ie(wv,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})(({theme:e})=>D({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})),ZSt=$n((e,t)=>{const n=wt(),{id:r,value:o,field:i,colDef:a,hasFocus:s,debounceMs:l=200,isProcessingProps:c,onValueChange:u}=e,d=Ue(e,XSt),f=sn(),p=v.useRef(),[m,g]=v.useState(o),y=QSt(n),b=v.useCallback(async S=>{const P=S.target.value;u&&await u(S,P);const E=f.current.getColumn(i);let T=P;E.valueParser&&(T=E.valueParser(P,f.current.getRow(r),E,f)),g(T),f.current.setEditCellValue({id:r,field:i,value:T,debounceMs:l,unstable_skipValueParser:!0},S)},[f,l,i,r,u]),x=f.current.unstable_getEditCellMeta(r,i);return v.useEffect(()=>{(x==null?void 0:x.changeReason)!=="debouncedSetEditCellValue"&&g(o)},[x,o]),xn(()=>{s&&p.current.focus()},[s]),$.jsx(JSt,D({inputRef:p,className:y.root,ownerState:n,fullWidth:!0,type:a.type==="number"?a.type:"text",value:m??"",onChange:b,endAdornment:c?$.jsx(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},d,{ref:t}))}),e1t=e=>$.jsx(ZSt,D({},e)),ple=(e,t)=>t&&e.length>1?[e[0]]:e,z7=(e,t)=>n=>D({},n,{sorting:D({},n.sorting,{sortModel:ple(e,t)})}),t1t=e=>e==="desc",n1t=(e,t)=>{const n=t.current.getColumn(e.field);if(!n||e.sort===null)return null;let r;return n.getSortComparator?r=n.getSortComparator(e.sort):r=t1t(e.sort)?(...i)=>-1*n.sortComparator(...i):n.sortComparator,r?{getSortCellParams:i=>({id:i,field:n.field,rowNode:t.current.getRowNode(i),value:t.current.getCellValue(i,n.field),api:t.current}),comparator:r}:null},r1t=(e,t,n)=>e.reduce((r,o,i)=>{if(r!==0)return r;const a=t.params[i],s=n.params[i];return r=o.comparator(a.value,s.value,a,s),r},0),o1t=(e,t)=>{const n=e.map(r=>n1t(r,t)).filter(r=>!!r);return n.length===0?null:r=>r.map(o=>({node:o,params:n.map(i=>i.getSortCellParams(o.id))})).sort((o,i)=>r1t(n,o,i)).map(o=>o.node.id)},V7=(e,t)=>{const n=e.indexOf(t);return!t||n===-1||n+1===e.length?e[0]:e[n+1]},dz=(e,t)=>e==null&&t!=null?-1:t==null&&e!=null?1:e==null&&t==null?0:null,i1t=new Intl.Collator,a1t=(e,t)=>{const n=dz(e,t);return n!==null?n:typeof e=="string"?i1t.compare(e.toString(),t.toString()):e-t},hle=(e,t)=>{const n=dz(e,t);return n!==null?n:Number(e)-Number(t)},mle=(e,t)=>{const n=dz(e,t);return n!==null?n:e>t?1:e{const T=dR(E.target.value,r);m(T),y(!0),f.start(x.filterDebounceMs,()=>{const O=D({},t,{value:T,fromInput:b});n(O),y(!1)})},[f,x.filterDebounceMs,t,r,b,n]);return v.useEffect(()=>{(t.fromInput!==b||t.value==null)&&m(dR(t.value,r))},[b,t,r]),$.jsx(x.slots.baseTextField,D({id:b,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:p===void 0?"":String(p),onChange:S,variant:u,type:r||"text",InputProps:D({},g||l?{endAdornment:g?$.jsx(x.slots.loadIcon,{fontSize:"small",color:"action"}):l}:{},{disabled:s},c,{inputProps:D({tabIndex:a},c==null?void 0:c.inputProps)}),InputLabelProps:{shrink:!0},inputRef:i},d,(P=x.slotProps)==null?void 0:P.baseTextField))}function dR(e,t){if(!(e==null||e===""))return t==="number"?Number(e):String(e)}function l1t(e){return typeof e=="number"&&!Number.isNaN(e)}function gle(e){return typeof e=="function"}function fz(e){return typeof e=="object"&&e!==null}function c1t(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}function QT(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const $c=(e,t,n)=>Math.max(t,Math.min(n,e));function H7(e,t){return Array.from({length:t-e}).map((n,r)=>e+r)}function Qg(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function d1t(e){const t=u1t(e);return(n,r)=>n+(r-n)*t()}function yle(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}const f1t=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],p1t=["key"];function vle(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,color:a,error:s,helperText:l,size:c,variant:u="standard"}=e,d=Ue(e,f1t),f={color:a,error:s,helperText:l,size:c,variant:u},[p,m]=v.useState(t.value||[]),g=_n(),y=wt();v.useEffect(()=>{const x=t.value??[];m(x.map(String))},[t.value]);const b=v.useCallback((x,S)=>{m(S.map(String)),n(D({},t,{value:[...S.map(P=>r==="number"?Number(P):P)]}))},[n,t,r]);return $.jsx(Kl,D({multiple:!0,freeSolo:!0,options:[],filterOptions:(x,S)=>{const{inputValue:P}=S;return P==null||P===""?[]:[P]},id:g,value:p,onChange:b,renderTags:(x,S)=>x.map((P,E)=>{const T=S({index:E}),{key:O}=T,k=Ue(T,p1t);return $.jsx(y.slots.baseChip,D({variant:"outlined",size:"small",label:P},k),O)}),renderInput:x=>{var S;return $.jsx(y.slots.baseTextField,D({},x,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:D({},x.InputLabelProps,{shrink:!0}),inputRef:i,type:r||"text"},f,(S=y.slotProps)==null?void 0:S.baseTextField))}},d))}var Fc=function(e){return e.Cell="cell",e.Row="row",e}(Fc||{}),Zn=function(e){return e.Edit="edit",e.View="view",e}(Zn||{}),Vn=function(e){return e.Edit="edit",e.View="view",e}(Vn||{}),_i=function(e){return e.And="and",e.Or="or",e}(_i||{}),lu=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(lu||{}),Tl=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Tl||{}),Ed=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(Ed||{}),Pl=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Pl||{});function ble(e){return e.field!==void 0}const Fx=()=>({items:[],logicOperator:_i.And,quickFilterValues:[],quickFilterLogicOperator:_i.And});function wle(e){return{current:e.current.getPublicApi()}}let f0;function h1t(){if(f0!==void 0)return f0;try{f0=new Function("return true")()}catch{f0=!1}return f0}const AL=(e,t)=>{const n=D({},e);if(n.id==null&&(n.id=Math.round(Math.random()*1e5)),n.operator==null){const r=od(t)[n.field];n.operator=r&&r.filterOperators[0].value}return n},pz=(e,t,n)=>{const r=e.items.length>1;let o;r&&t?o=[e.items[0]]:o=e.items;const i=r&&o.some(s=>s.id==null);return o.some(s=>s.operator==null)||i?D({},e,{items:o.map(s=>AL(s,n))}):e.items!==o?D({},e,{items:o}):e},U7=(e,t,n)=>r=>D({},r,{filterModel:pz(e,t,n)}),jx=e=>typeof e=="string"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,xle=(e,t)=>{var u;if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let r;if(n.valueParser){const d=n.valueParser;r=Array.isArray(e.value)?(u=e.value)==null?void 0:u.map(f=>d(f,void 0,n,t)):d(e.value,void 0,n,t)}else r=e.value;const{ignoreDiacritics:o}=t.current.rootProps;o&&(r=jx(r));const i=D({},e,{value:r}),a=n.filterOperators;if(!(a!=null&&a.length))throw new Error(`MUI X: No filter operators found for column '${n.field}'.`);const s=a.find(d=>d.value===i.operator);if(!s)throw new Error(`MUI X: No filter operator found for column '${n.field}' and operator value '${i.operator}'.`);const l=wle(t),c=s.getApplyFilterFn(i,n);return typeof c!="function"?null:{item:i,fn:d=>{let f=t.current.getRowValue(d,n);return o&&(f=jx(f)),c(f,d,n,l)}}};let W7=1;const m1t=(e,t,n)=>{const{items:r}=e,o=r.map(s=>xle(s,t)).filter(s=>!!s);if(o.length===0)return null;if(n||!h1t())return(s,l)=>{const c={};for(let u=0;u`const shouldApply${l} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(s.item.field)});`).join(` `)} @@ -435,33 +435,32 @@ ${o.map((s,l)=>` ${JSON.stringify(String(s.item.id))}: !shouldApply${l} ? false `)} }; -return result$$;`.replaceAll("$$",String(U7)));return U7+=1,(s,l)=>i(o,s,l)},Ple=e=>e.quickFilterExcludeHiddenColumns??!0,y1t=(e,t)=>{var s;const n=((s=e.quickFilterValues)==null?void 0:s.filter(Boolean))??[];if(n.length===0)return null;const r=Ple(e)?cb(t):Iu(t),o=[],{ignoreDiacritics:i}=t.current.rootProps,a=Sle(t);return r.forEach(l=>{const c=t.current.getColumn(l),u=c==null?void 0:c.getApplyQuickFilterFn;u&&o.push({column:c,appliers:n.map(d=>{const f=i?jx(d):d;return{fn:u(f,c,a)}})})}),function(c,u){const d={};e:for(let f=0;f{const r=g1t(e,t,n),o=y1t(e,t);return function(a,s,l){l.passingFilterItems=(r==null?void 0:r(a,s))??null,l.passingQuickFilterValues=(o==null?void 0:o(a,s))??null}},W7=e=>e!=null,b1t=(e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter(r=>Cle(r,t)!==null)),e.cleanedFilterItems),w1t=(e,t,n,r,o)=>{const i=b1t(o,r,n.items),a=e.filter(W7),s=t.filter(W7);if(a.length>0){const l=u=>a.some(d=>d[u.id]);if((n.logicOperator??Fx().logicOperator)===_i.And){if(!i.every(l))return!1}else if(!i.some(l))return!1}if(s.length>0&&n.quickFilterValues!=null){const l=u=>s.some(d=>d[u]);if((n.quickFilterLogicOperator??Fx().quickFilterLogicOperator)===_i.And){if(!n.quickFilterValues.every(l))return!1}else if(!n.quickFilterValues.some(l))return!1}return!0},x1t=e=>{if(!e)return null;const t=new RegExp(tO(e),"i");return(n,r,o,i)=>{let a=i.current.getRowFormattedValue(r,o);return i.current.ignoreDiacritics&&(a=jx(a)),a!=null?t.test(a.toString()):!1}},G7=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new RegExp(tO(r),"i");return i=>{if(i==null)return t;const a=o.test(String(i));return t?!a:a}},q7=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return i=>{if(i==null)return t;const a=o.compare(r,i.toString())===0;return t?!a:a}},K7=e=>()=>t=>{const n=t===""||t==null;return e?!n:n},S1t=(e=!1)=>[{value:"contains",getApplyFilterFn:G7(e,!1),InputComponent:Ns},{value:"doesNotContain",getApplyFilterFn:G7(e,!0),InputComponent:Ns},{value:"equals",getApplyFilterFn:q7(e,!1),InputComponent:Ns},{value:"doesNotEqual",getApplyFilterFn:q7(e,!0),InputComponent:Ns},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${tO(n)}.*$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:Ns},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${tO(n)}$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:Ns},{value:"isEmpty",getApplyFilterFn:K7(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:K7(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;const n=e?t.value:t.value.map(o=>o.trim()),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?n.some(i=>r.compare(i,o.toString()||"")===0):!1},InputComponent:wle}],Gl={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:s1t,type:"string",align:"left",filterOperators:S1t(),renderEditCell:t1t,getApplyQuickFilterFn:x1t},C1t=["open","target","onClose","children","position","className","onExited"],P1t=e=>{const{classes:t}=e;return Te({root:["menu"]},xn,t)},T1t=oe($f,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})(({theme:e})=>({zIndex:e.zIndex.modal,[`& .${ae.menuList}`]:{outline:0}})),E1t={"bottom-start":"top left","bottom-end":"top right"};function Tle(e){var g;const{open:t,target:n,onClose:r,children:o,position:i,className:a,onExited:s}=e,l=Ue(e,C1t),c=gn(),u=xt(),d=P1t(u),f=y.useRef(null);wn(()=>{var v,w;t?f.current=document.activeElement instanceof HTMLElement?document.activeElement:null:((w=(v=f.current)==null?void 0:v.focus)==null||w.call(v),f.current=null)},[t]),y.useEffect(()=>{const v=t?"menuOpen":"menuClose";c.current.publishEvent(v,{target:n})},[c,t,n]);const p=v=>w=>{v&&v(),s&&s(w)},m=v=>{v.target&&(n===v.target||n!=null&&n.contains(v.target))||r(v)};return $.jsx(T1t,N({as:u.slots.basePopper,className:fe(d.root,a),ownerState:u,open:t,anchorEl:n,transition:!0,placement:i},l,(g=u.slotProps)==null?void 0:g.basePopper,{children:({TransitionProps:v,placement:w})=>$.jsx(IF,{onClickAway:m,mouseEvent:"onMouseDown",children:$.jsx(gh,N({},v,{style:{transformOrigin:E1t[w]},onExited:p(v==null?void 0:v.onExited),children:$.jsx(io,{children:o})}))})}))}const O1t=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"],I1t=e=>typeof e.getActions=="function";function k1t(e){var _;const{colDef:t,id:n,hasFocus:r,tabIndex:o,position:i="bottom-end",focusElementRef:a}=e,s=Ue(e,O1t),[l,c]=y.useState(-1),[u,d]=y.useState(!1),f=gn(),p=y.useRef(null),m=y.useRef(null),g=y.useRef(!1),v=y.useRef({}),w=er(),x=Ln(),S=Ln(),P=xt();if(!I1t(t))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const T=t.getActions(f.current.getRowParams(n)),E=T.filter(D=>!D.props.showInMenu),O=T.filter(D=>D.props.showInMenu),k=E.length+(O.length?1:0);y.useLayoutEffect(()=>{r||Object.entries(v.current).forEach(([D,H])=>{H==null||H.stop({},()=>{delete v.current[D]})})},[r]),y.useEffect(()=>{if(l<0||!p.current||l>=p.current.children.length)return;p.current.children[l].focus({preventScroll:!0})},[l]),y.useEffect(()=>{r||(c(-1),g.current=!1)},[r]),y.useImperativeHandle(a,()=>({focus(){if(!g.current){const D=T.findIndex(H=>!H.props.disabled);c(D)}}}),[T]),y.useEffect(()=>{l>=k&&c(k-1)},[l,k]);const A=()=>{d(!0),c(k-1),g.current=!0},I=()=>{d(!1)},R=D=>H=>{v.current[D]=H},L=(D,H)=>B=>{c(D),g.current=!0,H&&H(B)},F=D=>{if(k<=1)return;const H=(V,W)=>{var Y;if(V<0||V>T.length)return V;const Q=(W==="left"?-1:1)*(w?-1:1);return(Y=T[V+Q])!=null&&Y.props.disabled?H(V+Q,W):V+Q};let B=l;D.key==="ArrowRight"?B=H(l,"right"):D.key==="ArrowLeft"&&(B=H(l,"left")),!(B<0||B>=k)&&B!==l&&(D.preventDefault(),D.stopPropagation(),c(B))},z=D=>{D.key==="Tab"&&D.preventDefault(),["Tab","Escape"].includes(D.key)&&I()};return $.jsxs("div",N({role:"menu",ref:p,tabIndex:-1,className:ae.actionsCell,onKeyDown:F},s,{children:[E.map((D,H)=>y.cloneElement(D,{key:H,touchRippleRef:R(H),onClick:L(H,D.props.onClick),tabIndex:l===H?o:-1})),O.length>0&&S&&$.jsx(P.slots.baseIconButton,N({ref:m,id:S,"aria-label":f.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?x:void 0,role:"menuitem",size:"small",onClick:A,touchRippleRef:R(S),tabIndex:l===E.length?o:-1},(_=P.slotProps)==null?void 0:_.baseIconButton,{children:$.jsx(P.slots.moreActionsIcon,{fontSize:"small"})})),O.length>0&&$.jsx(Tle,{open:u,target:m.current,position:i,onClose:I,children:$.jsx(pS,{id:x,className:ae.menuList,onKeyDown:z,"aria-labelledby":S,variant:"menu",autoFocusItem:!0,children:O.map((D,H)=>y.cloneElement(D,{key:H,closeMenu:I}))})})]}))}const M1t=e=>$.jsx(k1t,N({},e)),Gk="actions",A1t=N({},Gl,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:M1t,getApplyQuickFilterFn:void 0}),pl=e=>e.rows,qk=Rt(pl,e=>e.totalRowCount),$1t=Rt(pl,e=>e.loading),R1t=Rt(pl,e=>e.totalTopLevelRowCount),Zd=Rt(pl,e=>e.dataRowIdToModelLookup),nO=Rt(pl,e=>e.dataRowIdToIdLookup),gi=Rt(pl,e=>e.tree),_1t=Rt(pl,e=>e.groupsToFetch),D1t=Rt(pl,e=>e.groupingName),Y7=Rt(pl,e=>e.treeDepths),ub=ir(pl,e=>{const t=Object.entries(e.treeDepths);return t.length===0?1:t.filter(([,n])=>n>0).map(([n])=>Number(n)).sort((n,r)=>r-n)[0]+1}),ZC=Rt(pl,e=>e.dataRowIds),N1t=Rt(pl,e=>e==null?void 0:e.additionalRowGroups),em=ir(N1t,e=>{var n,r;const t=e==null?void 0:e.pinnedRows;return{bottom:((n=t==null?void 0:t.bottom)==null?void 0:n.map(o=>({id:o.id,model:o.model??{}})))??[],top:((r=t==null?void 0:t.top)==null?void 0:r.map(o=>({id:o.id,model:o.model??{}})))??[]}}),L1t=Rt(em,e=>{var t,n;return(((t=e==null?void 0:e.top)==null?void 0:t.length)||0)+(((n=e==null?void 0:e.bottom)==null?void 0:n.length)||0)}),Zo="auto-generated-group-node-root",Zg=Symbol("mui.id_autogenerated"),F1t=()=>({type:"group",id:Zo,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function j1t(e,t,n="A row was provided without id in the rows prop:"){if(e==null)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(t)].join(` -`))}const Kk=(e,t,n)=>{const r=t?t(e):e.id;return j1t(r,e,n),r},FP=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={type:"full",rows:[]},i={},a={};for(let s=0;s{const n=e[Zo];return Math.max(t,n.children.length+(n.footerId==null?0:1))},Ole=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:r,previousTreeDepths:o,previousGroupsToFetch:i})=>{const a=e.current.caches.rows,{tree:s,treeDepths:l,dataRowIds:c,groupingName:u,groupsToFetch:d=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:r,previousTreeDepths:o,updates:a.updates,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIdToModelLookup:a.dataRowIdToModelLookup,previousGroupsToFetch:i}),f=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:l,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIds:c,dataRowIdToModelLookup:a.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},N({},f,{totalRowCount:Math.max(t,f.dataRowIds.length),totalTopLevelRowCount:Ele({tree:f.tree,rowCountProp:t}),groupingName:u,loading:n,groupsToFetch:d})},uv=e=>e.type==="skeletonRow"||e.type==="footer"||e.type==="group"&&e.isAutoGenerated||e.type==="pinnedRow"&&e.isAutoGenerated,hz=(e,t,n)=>{const r=e[t];if(r.type!=="group")return[];const o=[];for(let i=0;i{if(e.updates.type==="full")throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const o=new Map;n.forEach(u=>{const d=Kk(u,t,"A row was provided without id when calling updateRows():");o.has(d)?o.set(d,N({},o.get(d),u)):o.set(d,u)});const i={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:N({},e.updates.idToActionLookup),groupKeys:r},a=N({},e.dataRowIdToModelLookup),s=N({},e.dataRowIdToIdLookup),l={insert:{},modify:{},remove:{}};o.forEach((u,d)=>{const f=i.idToActionLookup[d];if(u._action==="delete"){if(f==="remove"||!a[d])return;f!=null&&(l[f][d]=!0),i.actions.remove.push(d),delete a[d],delete s[d];return}const p=a[d];if(p){f==="remove"?(l.remove[d]=!0,i.actions.modify.push(d)):f==null&&i.actions.modify.push(d),a[d]=N({},p,u);return}f==="remove"?(l.remove[d]=!0,i.actions.insert.push(d)):f==null&&i.actions.insert.push(d),a[d]=u,s[d]=d});const c=Object.keys(l);for(let u=0;u0&&(i.actions[d]=i.actions[d].filter(p=>!f[p]))}return{dataRowIdToModelLookup:a,dataRowIdToIdLookup:s,updates:i,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}};function B1t(e){var o,i;const t=em(e),n=((o=t==null?void 0:t.top)==null?void 0:o.reduce((a,s)=>(a+=e.current.unstable_getRowHeight(s.id),a),0))||0,r=((i=t==null?void 0:t.bottom)==null?void 0:i.reduce((a,s)=>(a+=e.current.unstable_getRowHeight(s.id),a),0))||0;return{top:n,bottom:r}}const Ile="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function Q7(e,t,n){const r=[];return t.forEach(o=>{const i=Kk(o,n,"A row was provided without id when calling updateRows():"),a=e.current.getRowNode(i);if((a==null?void 0:a.type)==="pinnedRow"){const s=e.current.caches.pinnedRows,l=s.idLookup[i];l&&(s.idLookup[i]=N({},l,o))}else r.push(o)}),r}const kle=(e,t,n)=>typeof e=="number"&&e>0?e:t,z1t="__tree_data_group__",Mle="__row_group_by_columns_group__",Yk="__detail_panel_toggle__",V1t=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"],H1t=e=>{const{classes:t}=e;return Te({root:["booleanCell"]},xn,t)};function U1t(e){const{value:t,rowNode:n}=e,r=Ue(e,V1t),o=gn(),i=xt(),a={classes:i.classes},s=H1t(a),c=Qe(o,ub)>0&&n.type==="group"&&i.treeData===!1,u=y.useMemo(()=>t?i.slots.booleanCellTrueIcon:i.slots.booleanCellFalseIcon,[i.slots.booleanCellFalseIcon,i.slots.booleanCellTrueIcon,t]);return c&&t===void 0?null:$.jsx(u,N({fontSize:"small",className:s.root,titleAccess:o.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!t},r))}const W1t=y.memo(U1t),G1t=e=>e.field!==Mle&&uv(e.rowNode)?"":$.jsx(W1t,N({},e)),q1t=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"],K1t=e=>{const{classes:t}=e;return Te({root:["editBooleanCell"]},xn,t)};function Y1t(e){var w;const{id:t,value:n,field:r,className:o,hasFocus:i,onValueChange:a}=e,s=Ue(e,q1t),l=gn(),c=y.useRef(null),u=Ln(),[d,f]=y.useState(n),p=xt(),m={classes:p.classes},g=K1t(m),v=y.useCallback(async x=>{const S=x.target.checked;a&&await a(x,S),f(S),await l.current.setEditCellValue({id:t,field:r,value:S},x)},[l,r,t,a]);return y.useEffect(()=>{f(n)},[n]),wn(()=>{i&&c.current.focus()},[i]),$.jsx("label",N({htmlFor:u,className:fe(g.root,o)},s,{children:$.jsx(p.slots.baseCheckbox,N({id:u,inputRef:c,checked:!!d,onChange:v,size:"small"},(w=p.slotProps)==null?void 0:w.baseCheckbox))}))}const X1t=e=>$.jsx(Y1t,N({},e)),Q1t=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","variant","InputLabelProps"],jP=e=>{if(String(e).toLowerCase()==="true")return!0;if(String(e).toLowerCase()==="false")return!1},J1t=oe("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function Z1t(e){var P,T,E;const{item:t,applyValue:n,apiRef:r,focusElementRef:o,clearButton:i,tabIndex:a,label:s,variant:l="standard"}=e,c=Ue(e,Q1t),[u,d]=y.useState(jP(t.value)),f=xt(),p=Ln(),m=Ln(),g=((P=f.slotProps)==null?void 0:P.baseSelect)||{},v=g.native??!1,w=((T=f.slotProps)==null?void 0:T.baseSelectOption)||{},x=y.useCallback(O=>{const k=jP(O.target.value);d(k),n(N({},t,{value:k}))},[n,t]);y.useEffect(()=>{d(jP(t.value))},[t.value]);const S=s??r.current.getLocaleText("filterPanelInputLabel");return $.jsxs(J1t,{children:[$.jsxs(f.slots.baseFormControl,{fullWidth:!0,children:[$.jsx(f.slots.baseInputLabel,N({},(E=f.slotProps)==null?void 0:E.baseInputLabel,{id:p,shrink:!0,variant:l,children:S})),$.jsxs(f.slots.baseSelect,N({labelId:p,id:m,label:S,value:u===void 0?"":String(u),onChange:x,variant:l,notched:l==="outlined"?!0:void 0,native:v,displayEmpty:!0,inputProps:{ref:o,tabIndex:a}},c,g,{children:[$.jsx(f.slots.baseSelectOption,N({},w,{native:v,value:"",children:r.current.getLocaleText("filterValueAny")})),$.jsx(f.slots.baseSelectOption,N({},w,{native:v,value:"true",children:r.current.getLocaleText("filterValueTrue")})),$.jsx(f.slots.baseSelectOption,N({},w,{native:v,value:"false",children:r.current.getLocaleText("filterValueFalse")}))]}))]}),i]})}const eCt=()=>[{value:"is",getApplyFilterFn:e=>{const t=jP(e.value);return t===void 0?null:n=>!!n===t},InputComponent:Z1t}],tCt=(e,t,n,r)=>e?r.current.getLocaleText("booleanCellTrueLabel"):r.current.getLocaleText("booleanCellFalseLabel"),nCt=e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}},Ale=N({},Gl,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:G1t,renderEditCell:X1t,sortComparator:gle,valueFormatter:tCt,filterOperators:eCt(),getApplyQuickFilterFn:void 0,aggregable:!1,pastedValueParser:e=>nCt(e)}),$le=e=>e.sorting,t1=Rt($le,e=>e.sortedRows),mz=ir(t1,Zd,gi,(e,t,n)=>e.reduce((r,o)=>{const i=t[o];i&&r.push({id:o,model:i});const a=n[o];return a&&uv(a)&&r.push({id:o,model:{[Zg]:o}}),r},[])),Ms=Rt($le,e=>e.sortModel),rCt=ir(Ms,e=>e.reduce((n,r,o)=>(n[r.field]={sortDirection:r.sort,sortIndex:e.length>1?o+1:void 0},n),{})),Xk=e=>e.filter,Xo=Rt(Xk,e=>e.filterModel);Rt(Xo,e=>e.quickFilterValues);const oCt=e=>e.visibleRowsLookup,db=Rt(Xk,e=>e.filteredRowsLookup);Rt(Xk,e=>e.filteredChildrenCountLookup);Rt(Xk,e=>e.filteredDescendantCountLookup);const qf=ir(oCt,mz,(e,t)=>t.filter(n=>e[n.id]!==!1)),ey=ir(qf,e=>e.map(t=>t.id)),Rle=ir(db,mz,(e,t)=>t.filter(n=>e[n.id]!==!1)),_le=ir(Rle,e=>e.map(t=>t.id));ir(ey,gi,(e,t)=>{const n={};let r=0;return e.reduce((o,i)=>{const a=t[i];return n[a.depth]||(n[a.depth]=0),a.depth>r&&(n[a.depth]=0),r=a.depth,n[a.depth]+=1,o[i]=n[a.depth],o},{})});const Dle=ir(qf,gi,ub,(e,t,n)=>n<2?e:e.filter(r=>{var o;return((o=t[r.id])==null?void 0:o.depth)===0})),gz=Rt(qf,e=>e.length),yz=Rt(Dle,e=>e.length),iCt=Rt(Rle,e=>e.length);Rt(iCt,yz,(e,t)=>e-t);const aCt=ir(Xo,od,(e,t)=>{var n;return(n=e.items)==null?void 0:n.filter(r=>{var a,s;if(!r.field)return!1;const o=t[r.field];if(!(o!=null&&o.filterOperators)||((a=o==null?void 0:o.filterOperators)==null?void 0:a.length)===0)return!1;const i=o.filterOperators.find(l=>l.value===r.operator);return i?!i.InputComponent||r.value!=null&&((s=r.value)==null?void 0:s.toString())!=="":!1})}),sCt=ir(aCt,e=>e.reduce((n,r)=>(n[r.field]?n[r.field].push(r):n[r.field]=[r],n),{})),As=e=>e.rowSelection,lCt=Rt(As,e=>e.length),cCt=ir(As,Zd,(e,t)=>new Map(e.map(n=>[n,t[n]]))),ku=ir(As,e=>e.reduce((t,n)=>(t[n]=n,t),{}));function Nle(e,t){var l;const n=gi(e),r=t1(e),o=db(e),i=n[t];if(!i||i.type!=="group")return[];const a=[],s=r.findIndex(c=>c===t)+1;for(let c=s;ci.depth;c+=1){const u=r[c];o[u]!==!1&&e.current.isRowSelectable(u)&&a.push(u)}return a}function uCt(e,t){return Rt(gi,t1,db,ku,(n,r,o,i)=>{var u;const a=n[e];if(!a||a.type!=="group")return{isIndeterminate:!1,isChecked:i[e]===e};if(i[e]===e)return{isIndeterminate:!1,isChecked:!0};let s=0,l=0;const c=r.findIndex(d=>d===e)+1;for(let d=c;da.depth;d+=1){const f=r[d];o[f]!==!1&&(s+=1,i[f]!==void 0&&(l+=1))}return{isIndeterminate:l>0&&(l0:i[e]===e}})}function vz(e){return e.signature===Qs.DataGrid?e.checkboxSelection&&e.disableMultipleRowSelection!==!0:!e.disableMultipleRowSelection}const dCt=(e,t)=>{const n=[];let r=t;for(;r!=null&&r!==Zo;){const o=e[r];if(!o)return n;n.push(r),r=o.parent}return n},fCt=(e,t,n)=>{const r=e[n];if(!r)return[];const o=r.parent;return o==null?[]:e[o].children.filter(a=>a!==n&&t[a])},eP=(e,t,n,r,o,i)=>{const a=db(e),s=ku(e),l=new Set([]);if(!(!r&&!o)){if(r){const c=t[n];(c==null?void 0:c.type)==="group"&&Nle(e,n).forEach(d=>{i(d),l.add(d)})}if(o){const c=d=>{if(s[d]!==d&&!l.has(d))return!1;const f=t[d];return(f==null?void 0:f.type)!=="group"?!0:f.children.every(c)},u=d=>{const f=fCt(t,a,d);if(f.length===0||f.every(c)){const m=t[d].parent;m!=null&&m!==Zo&&e.current.isRowSelectable(m)&&(i(m),l.add(m),u(m))}};u(n)}}},J7=(e,t,n,r,o,i)=>{const a=ku(e);if(!(!o&&!r)&&(o&&dCt(t,n).forEach(l=>{a[l]===l&&i(l)}),r)){const s=t[n];(s==null?void 0:s.type)==="group"&&Nle(e,n).forEach(c=>{i(c)})}},pCt=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],hCt=e=>{const{classes:t}=e;return Te({root:["checkboxInput"]},xn,t)},mCt=y.forwardRef(function(t,n){var k,A;const{field:r,id:o,rowNode:i,hasFocus:a,tabIndex:s}=t,l=Ue(t,pCt),c=gn(),u=xt(),d={classes:u.classes},f=hCt(d),p=y.useRef(null),m=y.useRef(null),g=Wt(p,n),v=I=>{const R={value:I.target.checked,id:o};c.current.publishEvent("rowSelectionCheckboxChange",R,I)};y.useLayoutEffect(()=>{if(s===0){const I=c.current.getCellElement(o,r);I&&(I.tabIndex=-1)}},[c,s,o,r]),y.useEffect(()=>{var I;if(a){const R=(I=p.current)==null?void 0:I.querySelector("input");R==null||R.focus({preventScroll:!0})}else m.current&&m.current.stop({})},[a]);const w=y.useCallback(I=>{I.key===" "&&I.stopPropagation()},[]),x=c.current.isRowSelectable(o),S=uCt(o,((k=u.rowSelectionPropagation)==null?void 0:k.parents)??!1),{isIndeterminate:P,isChecked:T}=Qe(c,S);if(i.type==="footer"||i.type==="pinnedRow")return null;const E=c.current.getLocaleText(T?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow"),O=u.indeterminateCheckboxAction==="select"?T&&!P:T;return $.jsx(u.slots.baseCheckbox,N({ref:g,tabIndex:s,checked:O,onChange:v,className:f.root,inputProps:{"aria-label":E},onKeyDown:w,indeterminate:P,disabled:!x,touchRippleRef:m},(A=u.slotProps)==null?void 0:A.baseCheckbox,l))}),gCt=mCt,Qk=e=>e.focus,Ra=Rt(Qk,e=>e.cell),yCt=Rt(Qk,e=>e.columnHeader);Rt(Qk,e=>e.columnHeaderFilter);const rO=Rt(Qk,e=>e.columnGroupHeader),Jk=e=>e.tabIndex,bz=Rt(Jk,e=>e.cell),Lle=Rt(Jk,e=>e.columnHeader);Rt(Jk,e=>e.columnHeaderFilter);const vCt=Rt(Jk,e=>e.columnGroupHeader);function Qt(e,t,n){const r=y.useRef(!0);wn(()=>{r.current=!1,e.current.register(n,t)},[e,n,t]),r.current&&e.current.register(n,t)}function Ao(e,t){const n=y.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}const Fle=(e,t,n,r,o)=>{const i=Ao(e,"useNativeEventListener"),[a,s]=y.useState(!1),l=y.useRef(r),c=vle(t)?t():(t==null?void 0:t.current)??null,u=y.useCallback(d=>l.current&&l.current(d),[]);y.useEffect(()=>{l.current=r},[r]),y.useEffect(()=>{if(c&&n&&!a){i.debug(`Binding native ${n} event`),c.addEventListener(n,u,o),s(!0);const d=()=>{i.debug(`Clearing native ${n} event`),c.removeEventListener(n,u,o)};e.current.subscribeEvent("unmount",d)}},[c,u,n,a,i,o,e])},n1=e=>{const t=y.useRef(!0);t.current&&(t.current=!1,e())},bCt=()=>{},wCt=(e,t)=>{const n=y.useRef(!1);wn(()=>n.current||!e?bCt:(n.current=!0,t()),[n.current||e])},xCt=100,SCt=e=>e?0:100,jle=(e,t,n)=>t>0&&e>0?Math.ceil(e/t):e===-1?n+2:0,Ble=e=>({page:0,pageSize:e?0:100}),CCt=(e,t=0)=>t===0?e:Math.max(Math.min(e,t-1),0),zle=(e,t)=>{if(t===Qs.DataGrid&&e>xCt)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` -`))},PCt=-1,Zk=e=>e.pagination,Ri=Rt(Zk,e=>e.paginationModel),kg=Rt(Zk,e=>e.rowCount),N0=Rt(Zk,e=>e.meta),TCt=Rt(Ri,e=>e.page),ECt=Rt(Ri,e=>e.pageSize),Vle=Rt(Ri,kg,(e,t)=>jle(t,e.pageSize,e.page)),wz=ir(Ri,gi,ub,qf,Dle,(e,t,n,r,o)=>{var p;const i=o.length,a=Math.min(e.pageSize*e.page,i-1),s=e.pageSize===PCt?i-1:Math.min(a+e.pageSize-1,i-1);if(a===-1||s===-1)return null;if(n<2)return{firstRowIndex:a,lastRowIndex:s};const l=o[a],c=s-a+1,u=r.findIndex(m=>m.id===l.id);let d=u,f=0;for(;d0)&&(d+=1),g===0&&(f+=1))}return{firstRowIndex:u,lastRowIndex:d-1}}),OCt=ir(qf,wz,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),Hle=ir(ey,wz,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),ICt=["field","colDef"],kCt=e=>{const{classes:t}=e;return Te({root:["checkboxInput"]},xn,t)},MCt=y.forwardRef(function(t,n){var k;const r=Ue(t,ICt),[,o]=y.useState(!1),i=gn(),a=xt(),s={classes:a.classes},l=kCt(s),c=Qe(i,Lle),u=Qe(i,As),d=Qe(i,ey),f=Qe(i,Hle),p=y.useMemo(()=>typeof a.isRowSelectable!="function"?u:u.filter(A=>i.current.getRow(A)?a.isRowSelectable(i.current.getRowParams(A)):!1),[i,a.isRowSelectable,u]),m=y.useMemo(()=>(!a.pagination||!a.checkboxSelectionVisibleOnly?d:f).reduce((I,R)=>(I[R]=!0,I),{}),[a.pagination,a.checkboxSelectionVisibleOnly,f,d]),g=y.useMemo(()=>p.filter(A=>m[A]).length,[p,m]),v=g>0&&g0,x=A=>{const I={value:A.target.checked};i.current.publishEvent("headerSelectionCheckboxChange",I)},S=c!==null&&c.field===t.field?0:-1;y.useLayoutEffect(()=>{const A=i.current.getColumnHeaderElement(t.field);S===0&&A&&(A.tabIndex=-1)},[S,i,t.field]);const P=y.useCallback(A=>{A.key===" "&&i.current.publishEvent("headerSelectionCheckboxChange",{value:!w})},[i,w]),T=y.useCallback(()=>{o(A=>!A)},[]);y.useEffect(()=>i.current.subscribeEvent("rowSelectionChange",T),[i,T]);const E=i.current.getLocaleText(w?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows"),O=a.indeterminateCheckboxAction==="select"?w&&!v:w;return $.jsx(a.slots.baseCheckbox,N({ref:n,indeterminate:v,checked:O,onChange:x,className:l.root,inputProps:{"aria-label":E},tabIndex:S,onKeyDown:P,disabled:!vz(a)},(k=a.slotProps)==null?void 0:k.baseCheckbox,r))}),fu="__check__",fb=N({},Ale,{type:"custom",field:fu,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,display:"flex",valueGetter:(e,t,n,r)=>{const o=ku(r),i=r.current.getRowId(t);return o[i]!==void 0},renderHeader:e=>$.jsx(MCt,N({},e)),renderCell:e=>$.jsx(gCt,N({},e))}),ACt=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function Z7(e,t){if(e==null)return"";const n=new Date(e);return Number.isNaN(n.getTime())?"":t==="date"?n.toISOString().substring(0,10):t==="datetime-local"?(n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n.toISOString().substring(0,19)):n.toISOString().substring(0,10)}function Hm(e){var S;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,InputProps:a,clearButton:s,tabIndex:l,disabled:c}=e,u=Ue(e,ACt),d=ca(),[f,p]=y.useState(()=>Z7(t.value,r)),[m,g]=y.useState(!1),v=Ln(),w=xt(),x=y.useCallback(P=>{d.clear();const T=P.target.value;p(T),g(!0),d.start(w.filterDebounceMs,()=>{const E=new Date(T);n(N({},t,{value:Number.isNaN(E.getTime())?void 0:E})),g(!1)})},[n,t,w.filterDebounceMs,d]);return y.useEffect(()=>{const P=Z7(t.value,r);p(P)},[t.value,r]),$.jsx(w.slots.baseTextField,N({fullWidth:!0,id:v,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:f,onChange:x,variant:"standard",type:r||"text",InputLabelProps:{shrink:!0},inputRef:i,InputProps:N({},m||s?{endAdornment:m?$.jsx(w.slots.loadIcon,{fontSize:"small",color:"action"}):s}:{},{disabled:c},a,{inputProps:N({max:r==="datetime-local"?"9999-12-31T23:59":"9999-12-31",tabIndex:l},a==null?void 0:a.inputProps)})},u,(S=w.slotProps)==null?void 0:S.baseTextField))}function Um(e,t,n,r){if(!e.value)return null;const o=new Date(e.value);n?o.setSeconds(0,0):(o.setMinutes(o.getMinutes()+o.getTimezoneOffset()),o.setHours(0,0,0,0));const i=o.getTime();return a=>{if(!a)return!1;if(r)return t(a.getTime(),i);const s=new Date(a);return n?s.setSeconds(0,0):s.setHours(0,0,0,0),t(s.getTime(),i)}}const Ule=e=>[{value:"is",getApplyFilterFn:t=>Um(t,(n,r)=>n===r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>Um(t,(n,r)=>n!==r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>Um(t,(n,r)=>n>r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>Um(t,(n,r)=>n>=r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>Um(t,(n,r)=>nUm(t,(n,r)=>n<=r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>t=>t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>t=>t!=null,requiresFilterValue:!1}],$Ct=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],RCt=oe(Sv)({fontSize:"inherit"}),_Ct=e=>{const{classes:t}=e;return Te({root:["editInputCell"]},xn,t)};function DCt(e){const{id:t,value:n,field:r,colDef:o,hasFocus:i,inputProps:a,onValueChange:s}=e,l=Ue(e,$Ct),c=o.type==="dateTime",u=gn(),d=y.useRef(),f=y.useMemo(()=>{let P;n==null?P=null:n instanceof Date?P=n:P=new Date((n??"").toString());let T;return P==null||Number.isNaN(P.getTime())?T="":T=new Date(P.getTime()-P.getTimezoneOffset()*60*1e3).toISOString().substr(0,c?16:10),{parsed:P,formatted:T}},[n,c]),[p,m]=y.useState(f),v={classes:xt().classes},w=_Ct(v),x=y.useCallback(P=>{if(P==="")return null;const[T,E]=P.split("T"),[O,k,A]=T.split("-"),I=new Date;if(I.setFullYear(Number(O),Number(k)-1,Number(A)),I.setHours(0,0,0,0),E){const[R,L]=E.split(":");I.setHours(Number(R),Number(L),0,0)}return I},[]),S=y.useCallback(async P=>{const T=P.target.value,E=x(T);s&&await s(P,E),m({parsed:E,formatted:T}),u.current.setEditCellValue({id:t,field:r,value:E},P)},[u,r,t,s,x]);return y.useEffect(()=>{m(P=>{var T,E;return f.parsed!==P.parsed&&((T=f.parsed)==null?void 0:T.getTime())!==((E=P.parsed)==null?void 0:E.getTime())?f:P})},[f]),wn(()=>{i&&d.current.focus()},[i]),$.jsx(RCt,N({inputRef:d,fullWidth:!0,className:w.root,type:c?"datetime-local":"date",inputProps:N({max:c?"9999-12-31T23:59":"9999-12-31"},a),value:p.formatted,onChange:S},l))}const Wle=e=>$.jsx(DCt,N({},e));function Gle({value:e,columnType:t,rowId:n,field:r}){if(!(e instanceof Date))throw new Error([`MUI X: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${r}".`].join(` -`))}const NCt=(e,t,n,r)=>{if(!e)return"";const o=r.current.getRowId(t);return Gle({value:e,columnType:"date",rowId:o,field:n.field}),e.toLocaleDateString()},LCt=(e,t,n,r)=>{if(!e)return"";const o=r.current.getRowId(t);return Gle({value:e,columnType:"dateTime",rowId:o,field:n.field}),e.toLocaleString()},FCt=N({},Gl,{type:"date",sortComparator:yle,valueFormatter:NCt,filterOperators:Ule(),renderEditCell:Wle,pastedValueParser:e=>new Date(e)}),jCt=N({},Gl,{type:"dateTime",sortComparator:yle,valueFormatter:LCt,filterOperators:Ule(!0),renderEditCell:Wle,pastedValueParser:e=>new Date(e)}),Ad=e=>e==null?null:Number(e),BCt=e=>e==null||Number.isNaN(e)||e===""?null:t=>Ad(t)===Ad(e),zCt=()=>[{value:"=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>Ad(t)===e.value,InputComponent:Ns,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>Ad(t)!==e.value,InputComponent:Ns,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Ad(t)>e.value,InputComponent:Ns,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Ad(t)>=e.value,InputComponent:Ns,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Ad(t)e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Ad(t)<=e.value,InputComponent:Ns,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>e!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>!Array.isArray(e.value)||e.value.length===0?null:t=>t!=null&&e.value.includes(Number(t)),InputComponent:wle,InputComponentProps:{type:"number"}}],VCt=N({},Gl,{type:"number",align:"right",headerAlign:"right",sortComparator:gle,valueParser:e=>e===""?null:Number(e),valueFormatter:e=>c1t(e)?e.toLocaleString():e||"",filterOperators:zCt(),getApplyQuickFilterFn:BCt});function dv(e){return(e==null?void 0:e.type)==="singleSelect"}function Eh(e,t){if(e)return typeof e.valueOptions=="function"?e.valueOptions(N({field:e.field},t)):e.valueOptions}function oO(e,t,n){if(t===void 0)return;const r=t.find(o=>{const i=n(o);return String(i)===String(e)});return n(r)}const HCt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen"],UCt=["MenuProps"];function WCt(e){return!!e.key}function GCt(e){var L,F;const t=xt(),{id:n,value:r,field:o,row:i,colDef:a,hasFocus:s,error:l,onValueChange:c,initialOpen:u=t.editMode===Fc.Cell}=e,d=Ue(e,HCt),f=gn(),p=y.useRef(),m=y.useRef(),[g,v]=y.useState(u),x=(((L=t.slotProps)==null?void 0:L.baseSelect)||{}).native??!1,S=((F=t.slotProps)==null?void 0:F.baseSelect)||{},{MenuProps:P}=S,T=Ue(S,UCt);if(wn(()=>{var z;s&&((z=m.current)==null||z.focus())},[s]),!dv(a))return null;const E=Eh(a,{id:n,row:i});if(!E)return null;const O=a.getOptionValue,k=a.getOptionLabel,A=async z=>{if(!dv(a)||!E)return;v(!1);const _=z.target,D=oO(_.value,E,O);c&&await c(z,D),await f.current.setEditCellValue({id:n,field:o,value:D},z)},I=(z,_)=>{if(t.editMode===Fc.Row){v(!1);return}if(_==="backdropClick"||z.key==="Escape"){const D=f.current.getCellParams(n,o);f.current.publishEvent("cellEditStop",N({},D,{reason:z.key==="Escape"?Ol.escapeKeyDown:Ol.cellFocusOut}))}},R=z=>{WCt(z)&&z.key==="Enter"||v(!0)};return!E||!a?null:$.jsx(t.slots.baseSelect,N({ref:p,inputRef:m,value:r,onChange:A,open:g,onOpen:R,MenuProps:N({onClose:I},P),error:l,native:x,fullWidth:!0},d,T,{children:E.map(z=>{var D;const _=O(z);return y.createElement(t.slots.baseSelectOption,N({},((D=t.slotProps)==null?void 0:D.baseSelectOption)||{},{native:x,key:_,value:_}),k(z))})}))}const qCt=e=>$.jsx(GCt,N({},e)),KCt=["item","applyValue","type","apiRef","focusElementRef","placeholder","tabIndex","label","variant","isFilterActive","clearButton","InputLabelProps"],YCt=({column:e,OptionComponent:t,getOptionLabel:n,getOptionValue:r,isSelectNative:o,baseSelectOptionProps:i})=>["",...Eh(e)||[]].map(s=>{const l=r(s);let c=n(s);return c===""&&(c=" "),y.createElement(t,N({},i,{native:o,key:l,value:l}),c)}),XCt=oe("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function eq(e){var O,k,A,I,R;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,placeholder:a,tabIndex:s,label:l,variant:c="standard",clearButton:u}=e,d=Ue(e,KCt),f=t.value??"",p=Ln(),m=Ln(),g=xt(),v=((k=(O=g.slotProps)==null?void 0:O.baseSelect)==null?void 0:k.native)??!1;let w=null;if(t.field){const L=o.current.getColumn(t.field);dv(L)&&(w=L)}const x=w==null?void 0:w.getOptionValue,S=w==null?void 0:w.getOptionLabel,P=y.useMemo(()=>Eh(w),[w]),T=y.useCallback(L=>{let F=L.target.value;F=oO(F,P,x),n(N({},t,{value:F}))},[P,x,n,t]);if(!dv(w))return null;const E=l??o.current.getLocaleText("filterPanelInputLabel");return $.jsxs(XCt,{children:[$.jsxs(g.slots.baseFormControl,{fullWidth:!0,children:[$.jsx(g.slots.baseInputLabel,N({},(A=g.slotProps)==null?void 0:A.baseInputLabel,{id:m,htmlFor:p,shrink:!0,variant:c,children:E})),$.jsx(g.slots.baseSelect,N({id:p,label:E,labelId:m,value:f,onChange:T,variant:c,type:r||"text",inputProps:{tabIndex:s,ref:i,placeholder:a??o.current.getLocaleText("filterPanelInputPlaceholder")},native:v,notched:c==="outlined"?!0:void 0},d,(I=g.slotProps)==null?void 0:I.baseSelect,{children:YCt({column:w,OptionComponent:g.slots.baseSelectOption,getOptionLabel:S,getOptionValue:x,isSelectNative:v,baseSelectOptionProps:(R=g.slotProps)==null?void 0:R.baseSelectOption})}))]}),u]})}const QCt=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],JCt=["key"],ZCt=dJ();function ePt(e){const{item:t,applyValue:n,apiRef:r,focusElementRef:o,color:i,error:a,helperText:s,size:l,variant:c="standard"}=e,u=Ue(e,QCt),d={color:i,error:a,helperText:s,size:l,variant:c},f=Ln(),p=xt();let m=null;if(t.field){const T=r.current.getColumn(t.field);dv(T)&&(m=T)}const g=m==null?void 0:m.getOptionValue,v=m==null?void 0:m.getOptionLabel,w=y.useCallback((T,E)=>g(T)===g(E),[g]),x=y.useMemo(()=>Eh(m)||[],[m]),S=y.useMemo(()=>Array.isArray(t.value)?t.value.reduce((T,E)=>{const O=x.find(k=>g(k)===E);return O!=null&&T.push(O),T},[]):[],[g,t.value,x]),P=y.useCallback((T,E)=>{n(N({},t,{value:E.map(g)}))},[n,t,g]);return $.jsx(Yl,N({multiple:!0,options:x,isOptionEqualToValue:w,filterOptions:ZCt,id:f,value:S,onChange:P,getOptionLabel:v,renderTags:(T,E)=>T.map((O,k)=>{const A=E({index:k}),{key:I}=A,R=Ue(A,JCt);return $.jsx(p.slots.baseChip,N({variant:"outlined",size:"small",label:v(O)},R),I)}),renderInput:T=>{var E;return $.jsx(p.slots.baseTextField,N({},T,{label:r.current.getLocaleText("filterPanelInputLabel"),placeholder:r.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:N({},T.InputLabelProps,{shrink:!0}),inputRef:o,type:"singleSelect"},d,(E=p.slotProps)==null?void 0:E.baseTextField))}},u))}const Wm=e=>e==null||!fz(e)?e:e.value,tPt=()=>[{value:"is",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>Wm(t)===Wm(e.value),InputComponent:eq},{value:"not",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>Wm(t)!==Wm(e.value),InputComponent:eq},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const t=e.value.map(Wm);return n=>t.includes(Wm(n))},InputComponent:ePt}],nPt=e=>typeof e[0]=="object",rPt=e=>fz(e)?e.value:e,oPt=e=>fz(e)?e.label:String(e),iPt=N({},Gl,{type:"singleSelect",getOptionLabel:oPt,getOptionValue:rPt,valueFormatter(e,t,n,r){const o=r.current.getRowId(t);if(!dv(n))return"";const i=Eh(n,{id:o,row:t});if(e==null)return"";if(!i)return e;if(!nPt(i))return n.getOptionLabel(e);const a=i.find(s=>n.getOptionValue(s)===e);return a?n.getOptionLabel(a):""},renderEditCell:qCt,filterOperators:tPt(),pastedValueParser:(e,t,n)=>{const r=n,o=Eh(r)||[],i=r.getOptionValue;if(o.find(s=>i(s)===e))return e}}),aPt="string",sPt=()=>({string:Gl,number:VCt,date:FCt,dateTime:jCt,boolean:Ale,singleSelect:iPt,[Gk]:A1t,custom:Gl}),xz=e=>e.headerFiltering,lPt=Rt(xz,e=>(e==null?void 0:e.enabled)??!1),cPt=Rt(xz,e=>e.editing),uPt=Rt(xz,e=>e.menuOpen),eM=e=>e.columnGrouping,qle=ir(eM,e=>(e==null?void 0:e.unwrappedGroupingModel)??{}),Kle=ir(eM,e=>(e==null?void 0:e.lookup)??{}),dPt=ir(eM,e=>(e==null?void 0:e.headerStructure)??[]),r1=Rt(eM,e=>(e==null?void 0:e.maxDepth)??0),Yle=["maxWidth","minWidth","width","flex"],hR=sPt();function fPt({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const r=new Set(n.map(a=>a.field)),o={all:{},frozenFields:[],freeze:a=>{const s=o.all[a];s&&s.frozen!==!0&&(o.all[a].frozen=!0,o.frozenFields.push(a))}};function i(){if(o.frozenFields.length===r.size)return;const a={min:{},max:{}};let s=e,l=t,c=0;o.frozenFields.forEach(u=>{s-=o.all[u].computedWidth,l-=o.all[u].flex});for(let u=0;ud.maxWidth&&(c+=d.maxWidth-p,p=d.maxWidth,a.max[d.field]=!0),o.all[d.field]={frozen:!1,computedWidth:p,flex:d.flex}}c<0?Object.keys(a.max).forEach(u=>{o.freeze(u)}):c>0?Object.keys(a.min).forEach(u=>{o.freeze(u)}):n.forEach(({field:u})=>{o.freeze(u)}),i()}return i(),o.all}const _N=(e,t)=>{const n={};let r=0,o=0;const i=[];e.orderedFields.forEach(l=>{let c=e.lookup[l],u=0,d=!1;e.columnVisibilityModel[l]!==!1&&(c.flex&&c.flex>0?(r+=c.flex,d=!0):u=$c(c.width||Gl.width,c.minWidth||Gl.minWidth,c.maxWidth||Gl.maxWidth),o+=u),c.computedWidth!==u&&(c=N({},c,{computedWidth:u})),d&&i.push(c),n[l]=c});const a=t===void 0?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),s=Math.max(a-o,0);if(r>0&&a>0){const l=fPt({initialFreeSpace:s,totalFlexUnits:r,flexColumns:i});Object.keys(l).forEach(c=>{n[c].computedWidth=l[c].computedWidth})}return N({},e,{lookup:n})},pPt=(e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:r={}}=t,o=Object.keys(r);if(o.length===0&&n.length===0)return e;const i={},a=[];for(let u=0;u!i[u])],l=N({},e.lookup);for(let u=0;u{f[p]=m===-1?1/0:m}),l[d]=f}return N({},e,{orderedFields:s,lookup:l})};function tq(e){let t=hR[aPt];return e&&hR[e]&&(t=hR[e]),t}const ng=({apiRef:e,columnsToUpsert:t,initialState:n,columnVisibilityModel:r=Hs(e),keepOnlyColumnsToUpsert:o=!1})=>{var u,d;const i=!e.current.state.columns;let a;if(i)a={orderedFields:[],lookup:{},columnVisibilityModel:r};else{const f=Ac(e.current.state);a={orderedFields:o?[]:[...f.orderedFields],lookup:N({},f.lookup),columnVisibilityModel:r}}let s={};o&&!i&&(s=Object.keys(a.lookup).reduce((f,p)=>N({},f,{[p]:!1}),{})),t.forEach(f=>{const{field:p}=f;s[p]=!0;let m=a.lookup[p];m==null?(m=N({},tq(f.type),{field:p,hasBeenResized:!1}),a.orderedFields.push(p)):o&&a.orderedFields.push(p),m&&m.type!==f.type&&(m=N({},tq(f.type),{field:p}));let g=m.hasBeenResized;Yle.forEach(v=>{f[v]!==void 0&&(g=!0,f[v]===-1&&(f[v]=1/0))}),a.lookup[p]=ih(m,N({},f,{hasBeenResized:g}))}),o&&!i&&Object.keys(a.lookup).forEach(f=>{s[f]||delete a.lookup[f]});const l=e.current.unstable_applyPipeProcessors("hydrateColumns",a),c=pPt(l,n);return _N(c,((d=(u=e.current).getRootDimensions)==null?void 0:d.call(u))??void 0)};function hPt({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let i=e;for(let a=n;a{const{scrollDirection:t,classes:n}=e,r={root:["scrollArea",`scrollArea--${t}`]};return Te(r,xn,n)},yPt=Yn("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${ae["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${ae["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})(()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${ae["scrollArea--left"]}`]:{left:0},[`&.${ae["scrollArea--right"]}`]:{right:0}}));function vPt(e){const{scrollDirection:t}=e,n=y.useRef(null),r=gn(),o=ca(),i=Qe(r,ZS),a=Qe(r,uz),s=Qe(r,Si),l=y.useRef({left:0,top:0}),c=()=>{if(t==="left")return l.current.left>0;if(t==="right"){const k=a-s.viewportInnerSize.width;return l.current.left{l.current=k,p(c)},T=et(k=>{let A;if(k.preventDefault(),t==="left")A=k.clientX-n.current.getBoundingClientRect().right;else if(t==="right")A=Math.max(1,k.clientX-n.current.getBoundingClientRect().left);else throw new Error("MUI X: Wrong drag direction");A=(A-nq)*mPt+nq,o.start(0,()=>{r.current.scroll({left:l.current.left+A,top:l.current.top})})}),E=et(()=>{d(!0)}),O=et(()=>{d(!1)});return gt(r,"scrollPositionChange",P),gt(r,"columnHeaderDragStart",E),gt(r,"columnHeaderDragEnd",O),!u||!f?null:$.jsx(yPt,{ref:n,className:fe(v.root),ownerState:g,onDragOver:T,style:S})}const rq=Wf(vPt);var Cz={},Xle={exports:{}},Qle={exports:{}};(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Qle);var bPt=Qle.exports;(function(e){var t=bPt.default;function n(o){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(n=function(l){return l?a:i})(o)}function r(o,i){if(!i&&o&&o.__esModule)return o;if(o===null||t(o)!="object"&&typeof o!="function")return{default:o};var a=n(i);if(a&&a.has(o))return a.get(o);var s={__proto__:null},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in o)if(c!=="default"&&{}.hasOwnProperty.call(o,c)){var u=l?Object.getOwnPropertyDescriptor(o,c):null;u&&(u.get||u.set)?Object.defineProperty(s,c,u):s[c]=o[c]}return s.default=o,a&&a.set(o,s),s}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Xle);var wPt=Xle.exports,xPt=wPt.default;Object.defineProperty(Cz,"__esModule",{value:!0});var Jle=Cz.default=void 0,SPt=xPt(y);Jle=Cz.default=parseInt(SPt.version,10);const Zle=y.createContext(void 0);function hl(){const e=y.useContext(Zle);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` -`));return e}const ty=(e,t)=>{let n,r;return t.pagination&&t.paginationMode==="client"?(r=wz(e),n=OCt(e)):(n=qf(e),n.length===0?r=null:r={firstRowIndex:0,lastRowIndex:n.length-1}),{rows:n,range:r}},tm=(e,t)=>{const n=ty(e,t);return y.useMemo(()=>({rows:n.rows,range:n.range}),[n.rows,n.range])},CPt=typeof navigator<"u"?navigator.userAgent.toLowerCase():"empty",PPt=CPt.includes("firefox"),pb=e=>e.rowsMeta,tM=e=>e.virtualization;Rt(tM,e=>e.enabled);const Pz=Rt(tM,e=>e.enabledForColumns),TPt=Rt(tM,e=>e.enabledForRows),nM=Rt(tM,e=>e.renderContext),EPt=ir(e=>e.virtualization.renderContext.firstColumnIndex,e=>e.virtualization.renderContext.lastColumnIndex,(e,t)=>({firstColumnIndex:e,lastColumnIndex:t})),ece={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},OPt=(e,t)=>{const{disableVirtualization:n,autoHeight:r}=t;return N({},e,{virtualization:{enabled:!n,enabledForColumns:!n,enabledForRows:!n&&!r,renderContext:ece}})};function IPt(e,t){const n=i=>{e.current.setState(a=>N({},a,{virtualization:N({},a.virtualization,{enabled:i,enabledForColumns:i,enabledForRows:i&&!t.autoHeight})}))};Qt(e,{unstable_setVirtualization:n,unstable_setColumnVirtualization:i=>{e.current.setState(a=>N({},a,{virtualization:N({},a.virtualization,{enabledForColumns:i})}))}},"public"),y.useEffect(()=>{n(!t.disableVirtualization)},[t.disableVirtualization,t.autoHeight])}const Tz=e=>e.rowSpanning,tce=Rt(Tz,e=>e.hiddenCells),kPt=Rt(Tz,e=>e.spannedCells),MPt=Rt(Tz,e=>e.hiddenCellOriginMap),fv=e=>e.listViewColumn,mR=50;var eo=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e}(eo||{});const oq={top:0,left:0},APt=Object.freeze(new Map),$Pt=(e,t,n,r,o)=>({direction:eo.NONE,buffer:rce(e,eo.NONE,t,n,r,o)});let DN=!1;try{typeof window<"u"&&(DN=/jsdom|HappyDOM/.test(window.navigator.userAgent))}catch{}const RPt=()=>{const e=hl(),t=xt(),{unstable_listView:n}=t,r=Qe(e,()=>n?[fv(e.current.state)]:fo(e)),o=Qe(e,TPt)&&!DN,i=Qe(e,Pz)&&!DN,a=Qe(e,Si),s=a.viewportOuterSize,l=Qe(e,em),c=Qe(e,e1),u=n?{left:[],right:[]}:c,d=l.bottom.length>0,[f,p]=y.useState(APt),m=er(),g=Qe(e,Ra),v=Qe(e,bz),w=Qe(e,pb),x=Qe(e,ku),S=tm(e,t),P=e.current.rootElementRef,T=e.current.mainElementRef,E=e.current.virtualScrollerRef,O=e.current.virtualScrollbarVerticalRef,k=e.current.virtualScrollbarHorizontalRef,A=a.contentSize.height,I=a.columnsTotalWidth,R=Qe(e,XSt),L=y.useCallback(se=>{if(T.current=se,!se)return;const Z=se.getBoundingClientRect();let ue={width:Z.width,height:Z.height};if(e.current.publishEvent("resize",ue),typeof ResizeObserver>"u")return;const ge=new ResizeObserver(we=>{const me=we[0];if(!me)return;const be={width:me.contentRect.width,height:me.contentRect.height};be.width===ue.width&&be.height===ue.height||(e.current.publishEvent("resize",be),ue=be)});if(ge.observe(se),Jle>=19)return()=>{T.current=null,ge.disconnect()}},[e,T]),F=y.useRef(oq),z=y.useRef(oq),_=y.useRef(ece),D=Qe(e,nM),H=ca(),B=y.useRef(void 0),V=Zl(()=>$Pt(m,t.rowBufferPx,t.columnBufferPx,a.rowHeight*15,mR*6)).current,W={rowIndex:y.useMemo(()=>g?S.rows.findIndex(se=>se.id===g.id):-1,[g,S.rows]),columnIndex:y.useMemo(()=>g?r.findIndex(se=>se.field===g.field):-1,[g,r])},G=y.useCallback(se=>{if(NPt(se,e.current.state.virtualization.renderContext))return;const Z=se.firstRowIndex!==_.current.firstRowIndex||se.lastRowIndex!==_.current.lastRowIndex;e.current.setState(ue=>N({},ue,{virtualization:N({},ue.virtualization,{renderContext:se})})),a.isReady&&Z&&(_.current=se,e.current.publishEvent("renderedRowsIntervalChange",se)),z.current=F.current},[e,a.isReady]),Q=et(()=>{const se=E.current;if(!se)return;const Z={top:se.scrollTop,left:se.scrollLeft},ue=Z.left-F.current.left,ge=Z.top-F.current.top,we=ue!==0||ge!==0;F.current=Z;const me=we?LPt(ue,ge):eo.NONE,be=Math.abs(F.current.top-z.current.top),xe=Math.abs(F.current.left-z.current.left),Ee=be>=a.rowHeight||xe>=mR,Me=V.direction!==me;if(!(Ee||Me))return D;if(Me)switch(me){case eo.NONE:case eo.LEFT:case eo.RIGHT:B.current=void 0;break;default:B.current=D;break}V.direction=me,V.buffer=rce(m,me,t.rowBufferPx,t.columnBufferPx,a.rowHeight*15,mR*6);const de=gR(e,t,o,i),Ae=yR(de,F.current,V);return hI.flushSync(()=>{G(Ae)}),H.start(1e3,Q),Ae}),Y=()=>{const se=gR(e,t,o,i),Z=yR(se,F.current,V);B.current=void 0,G(Z)},ne=et(se=>{const{scrollTop:Z,scrollLeft:ue}=se.currentTarget;if(Z<0||!m&&ue<0||m&&ue>0)return;const ge=Q();e.current.publishEvent("scrollPositionChange",{top:Z,left:ue,renderContext:ge})}),ie=et(se=>{e.current.publishEvent("virtualScrollerWheel",{},se)}),re=et(se=>{e.current.publishEvent("virtualScrollerTouchMove",{},se)}),pe=(se={})=>{var Oe;if(!se.rows&&!S.range)return[];const Z=se.renderContext??D,ue=!d&&se.position===void 0||d&&se.position==="bottom",ge=se.position!==void 0;let we;switch(se.position){case"top":we=0;break;case"bottom":we=l.top.length+S.rows.length;break;case void 0:we=l.top.length;break}const me=se.rows??S.rows,be=Z.firstRowIndex,xe=Math.min(Z.lastRowIndex,me.length),Ee=se.rows?V7(0,se.rows.length):V7(be,xe);let Me=-1;!ge&&W.rowIndex!==-1&&(W.rowIndex=xe&&(Me=W.rowIndex,Ee.push(Me)));const _e=[],de=(Oe=t.slotProps)==null?void 0:Oe.row,Ae=Gf(e);return Ee.forEach($e=>{var Vn,wo,xo;const{id:Be,model:Je}=me[$e],ot=(((Vn=S==null?void 0:S.range)==null?void 0:Vn.firstRowIndex)||0)+we+$e;if(R){const oi=u.left.length,Xi=r.length-u.right.length;e.current.calculateColSpan({rowId:Be,minFirstColumn:oi,maxLastColumn:Xi,columns:r}),u.left.length>0&&e.current.calculateColSpan({rowId:Be,minFirstColumn:0,maxLastColumn:u.left.length,columns:r}),u.right.length>0&&e.current.calculateColSpan({rowId:Be,minFirstColumn:r.length-u.right.length,maxLastColumn:r.length,columns:r})}const lt=(g==null?void 0:g.id)===Be,it=e.current.rowHasAutoHeight(Be)?"auto":e.current.unstable_getRowHeight(Be);let tt;x[Be]==null?tt=!1:tt=e.current.isRowSelectable(Be);let pt=!1;se.position===void 0&&(pt=$e===0);let qt=!1;const qe=$e===me.length-1;if(ue)if(ge)qt=qe;else{const oi=S.rows.length-1;$e===oi&&(qt=!0)}const Ze=$e===Me;let Pt=null;v!==null&&v.id===Be&&(Pt=e.current.getCellParams(Be,v.field).cellMode==="view"?v.field:null);let _t=Z;!ge&&B.current&&$e>=B.current.firstRowIndex&&$es.width,ee=y.useMemo(()=>({overflowX:!le||n?"hidden":void 0,overflowY:t.autoHeight?"hidden":void 0}),[le,t.autoHeight,n]),ce=y.useMemo(()=>{const se={width:le?I:"auto",flexBasis:A,flexShrink:0};return se.flexBasis===0&&(se.flexBasis=Ile),se},[I,A,le]);return y.useEffect(()=>{e.current.publishEvent("virtualScrollerContentSizeChange")},[e,ce]),wn(()=>{i&&(E.current.scrollLeft=0),o&&(E.current.scrollTop=0)},[i,o,P,E]),wn(()=>{n&&(E.current.scrollLeft=0)},[n,E]),wCt(s.width!==0,()=>{const se=gR(e,t,o,i),Z=yR(se,F.current,V);G(Z),e.current.publishEvent("scrollPositionChange",{top:F.current.top,left:F.current.left,renderContext:Z})}),e.current.register("private",{updateRenderContext:Y}),gt(e,"columnsChange",Y),gt(e,"filteredRowsSet",Y),gt(e,"rowExpansionChange",Y),{renderContext:D,setPanels:p,getRows:pe,getContainerProps:()=>({ref:L}),getScrollerProps:()=>({ref:E,onScroll:ne,onWheel:ie,onTouchMove:re,style:ee,role:"presentation",tabIndex:PPt?-1:void 0}),getContentProps:()=>({style:ce,role:"presentation"}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:O,role:"presentation"}),getScrollbarHorizontalProps:()=>({ref:k,role:"presentation"})}};function gR(e,t,n,r){const o=Si(e.current.state),i=ty(e,t),a=t.unstable_listView?[fv(e.current.state)]:fo(e),s=MPt(e),l=e.current.state.rows.dataRowIds.at(-1),c=a.at(-1);return{enabledForRows:n,enabledForColumns:r,apiRef:e,autoHeight:t.autoHeight,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx,leftPinnedWidth:o.leftPinnedWidth,columnsTotalWidth:o.columnsTotalWidth,viewportInnerWidth:o.viewportInnerSize.width,viewportInnerHeight:o.viewportInnerSize.height,lastRowHeight:l!==void 0?e.current.unstable_getRowHeight(l):0,lastColumnWidth:(c==null?void 0:c.computedWidth)??0,rowsMeta:pb(e.current.state),columnPositions:Gf(e),rows:i.rows,range:i.range,pinnedColumns:e1(e),visibleColumns:a,hiddenCellsOriginMap:s,listView:t.unstable_listView??!1,virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight}}function yR(e,t,n){const r={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.visibleColumns.length},{top:o,left:i}=t,a=Math.abs(i)+e.leftPinnedWidth;if(e.enabledForRows){let l=Math.min(iq(e,o,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const c=e.hiddenCellsOriginMap[l];if(c){const d=Math.min(...Object.values(c));l=Math.min(l,d)}const u=e.autoHeight?l+e.rows.length:iq(e,o+e.viewportInnerHeight);r.firstRowIndex=l,r.lastRowIndex=u}if(e.enabledForColumns){let l=0,c=e.columnPositions.length,u=!1;const[d,f]=NN({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});if(!e.virtualizeColumnsWithAutoRowHeight)for(let p=d;p=e.range.lastRowIndex);const i=$c(r-(((s=e.range)==null?void 0:s.firstRowIndex)||0),0,e.rowsMeta.positions.length);return o||e.rowsMeta.positions[i]>=t?Pf(t,e.rowsMeta.positions,n):DPt(t,e.rowsMeta.positions,i,n)}function _Pt(e,t,n){const[r,o]=NN({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[i,a]=NN({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:e.pinnedColumns.left.length,maxLastIndex:e.visibleColumns.length-e.pinnedColumns.right.length,bufferBefore:n.buffer.columnBefore,bufferAfter:n.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth}),s=hPt({firstColumnToRender:i,apiRef:e.apiRef,firstRowToRender:r,lastRowToRender:o,visibleRows:e.rows});return{firstRowIndex:r,lastRowIndex:o,firstColumnIndex:s,lastColumnIndex:a}}function Pf(e,t,n=void 0,r=0,o=t.length){if(t.length<=0)return-1;if(r>=o)return r;const i=r+Math.floor((o-r)/2),a=t[i];let s;if(n!=null&&n.atStart){const l=(i===t.length-1?n.lastPosition:t[i+1])-a;s=e-l=Math.abs(e)?t>0?eo.DOWN:eo.UP:e>0?eo.RIGHT:eo.LEFT}function rce(e,t,n,r,o,i){if(e)switch(t){case eo.LEFT:t=eo.RIGHT;break;case eo.RIGHT:t=eo.LEFT;break}switch(t){case eo.NONE:return{rowAfter:n,rowBefore:n,columnAfter:r,columnBefore:r};case eo.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:i};case eo.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:i,columnBefore:0};case eo.UP:return{rowAfter:0,rowBefore:o,columnAfter:0,columnBefore:0};case eo.DOWN:return{rowAfter:o,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}const FPt=()=>{var u,d;const e=gn(),t=xt(),n=Qe(e,qk),r=Qe(e,gz),o=n===0,i=Qe(e,$1t),a=!i&&o,s=!i&&n>0&&r===0;let l=null,c=null;return a&&(l="noRowsOverlay"),s&&(l="noResultsOverlay"),i&&(l="loadingOverlay",c=((d=(u=t.slotProps)==null?void 0:u.loadingOverlay)==null?void 0:d[o?"noRowsVariant":"variant"])||null),{overlayType:l,loadingOverlayVariant:c}},jPt=Yn("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant",overridesResolver:(e,t)=>t.overlayWrapper})(({overlayType:e,loadingOverlayVariant:t})=>t!=="skeleton"?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,width:0,height:0,zIndex:e==="loadingOverlay"?5:4}:{}),BPt=Yn("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant",overridesResolver:(e,t)=>t.overlayWrapperInner})({}),zPt=e=>{const{classes:t}=e;return Te({root:["overlayWrapper"],inner:["overlayWrapperInner"]},xn,t)};function VPt(e){const t=gn(),n=xt(),r=Qe(t,Si);let o=Math.max(r.viewportOuterSize.height-r.topContainerHeight-r.bottomContainerHeight-(r.hasScrollX?r.scrollbarSize:0),0);o===0&&(o=Ile);const i=zPt(N({},e,{classes:n.classes}));return $.jsx(jPt,N({className:fe(i.root)},e,{children:$.jsx(BPt,N({className:fe(i.inner),style:{height:o,width:r.viewportOuterSize.width}},e))}))}function HPt(e){var i,a;const{overlayType:t}=e,n=xt();if(!t)return null;const r=(i=n.slots)==null?void 0:i[t],o=(a=n.slotProps)==null?void 0:a[t];return $.jsx(VPt,N({},e,{children:$.jsx(r,N({},o))}))}const BP=e=>e.columnMenu;function UPt(){var v;const e=hl(),t=xt(),n=Qe(e,fo),r=Qe(e,sCt),o=Qe(e,rCt),i=Qe(e,Lle),a=Qe(e,bz),s=Qe(e,vCt),l=Qe(e,yCt),c=Qe(e,rO),u=Qe(e,r1),d=Qe(e,BP),f=Qe(e,Hs),p=Qe(e,dPt),m=!(s===null&&i===null&&a===null),g=e.current.columnHeadersContainerRef;return $.jsx(t.slots.columnHeaders,N({ref:g,visibleColumns:n,filterColumnLookup:r,sortColumnLookup:o,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:m},(v=t.slotProps)==null?void 0:v.columnHeaders))}const WPt=Wf(UPt),oce=y.createContext(void 0),ice=()=>{const e=y.useContext(oce);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` -`));return e},GPt=Yn("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),qPt=Yn("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),KPt=y.forwardRef((e,t)=>{const n=xt(),o=ice().hooks.useGridAriaAttributes();return $.jsxs(qPt,N({ref:t,ownerState:n,className:e.className,tabIndex:-1},o,{children:[$.jsx(GPt,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))}),YPt=()=>Te({root:["topContainer"]},xn,{}),XPt=Yn("div")({position:"sticky",zIndex:4,top:0});function QPt(e){const t=YPt();return $.jsx(XPt,N({},e,{className:fe(t.root,ae["container--top"]),role:"presentation"}))}const JPt=()=>Te({root:["bottomContainer"]},xn,{}),ZPt=Yn("div")({position:"sticky",zIndex:4,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});function eTt(e){const t=JPt();return $.jsx(ZPt,N({},e,{className:fe(t.root,ae["container--bottom"]),role:"presentation"}))}const tTt=(e,t)=>{const{classes:n}=e;return Te({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},xn,n)},nTt=Yn("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),rTt=y.forwardRef(function(t,n){var a;const r=xt(),o=!r.autoHeight&&((a=t.style)==null?void 0:a.minHeight)==="auto",i=tTt(r,o);return $.jsx(nTt,N({ref:n},t,{ownerState:r,className:fe(i.root,t.className)}))}),oTt=Yn("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),ace=Yn("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:"var(--DataGrid-pinnedBackground)"}),iTt=Yn(ace)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),aTt=Yn(ace)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),sTt=Yn("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});function lTt({rowsLength:e}){const t=gn(),{viewportOuterSize:n,minimumSize:r,hasScrollX:o,hasScrollY:i,scrollbarSize:a,leftPinnedWidth:s,rightPinnedWidth:l}=Qe(t,Si),c=o?a:0,u=n.height-r.height>0;return c===0&&!u?null:$.jsxs(oTt,{className:ae.filler,role:"presentation",style:{height:c,"--rowBorderColor":e===0?"transparent":"var(--DataGrid-rowBorderColor)"},children:[s>0&&$.jsx(iTt,{className:ae["filler--pinnedLeft"],style:{width:s}}),$.jsx(sTt,{}),l>0&&$.jsx(aTt,{className:ae["filler--pinnedRight"],style:{width:l+(i?a:0)}})]})}const cTt=Wf(lTt),uTt=["className"],dTt=e=>{const{classes:t}=e;return Te({root:["virtualScrollerRenderZone"]},xn,t)},fTt=Yn("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),pTt=y.forwardRef(function(t,n){const{className:r}=t,o=Ue(t,uTt),i=gn(),a=xt(),s=dTt(a),l=Qe(i,()=>{const c=nM(i);return pb(i.current.state).positions[c.firstRowIndex]??0});return $.jsx(fTt,N({ref:n,className:fe(s.root,r),ownerState:a,style:{transform:`translate3d(0, ${l}px, 0)`}},o))}),hTt={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1},Lo=e=>e.editRows,Bx=e=>e.preferencePanel;var Oh=function(e){return e.filters="filters",e.columns="columns",e}(Oh||{});const mTt=(e,t)=>{const{classes:n}=e,r={root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]};return Te(r,xn,n)},sce=Yn("div")({position:"absolute",display:"inline-block",zIndex:6,"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),gTt=Yn(sce)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),yTt=Yn(sce)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),aq=y.forwardRef(function(t,n){const r=hl(),o=xt(),i=y.useRef(!1),a=y.useRef(0),s=y.useRef(null),l=y.useRef(null),c=mTt(o,t.position),u=Qe(r,Si),d=t.position==="vertical"?"height":"width",f=t.position==="vertical"?"scrollTop":"scrollLeft",p=t.position==="vertical"?u.hasScrollX:u.hasScrollY,m=u.minimumSize[d]+(p?u.scrollbarSize:0),v=(t.position==="vertical"?u.viewportInnerSize.height:u.viewportOuterSize.width)*(m/u.viewportOuterSize[d]),w=et(()=>{const P=r.current.virtualScrollerRef.current,T=s.current;if(!T||P[f]===a.current)return;if(a.current=P[f],i.current){i.current=!1;return}i.current=!0;const E=P[f]/m;T[f]=E*v}),x=et(()=>{const P=r.current.virtualScrollerRef.current,T=s.current;if(!T)return;if(i.current){i.current=!1;return}i.current=!0;const E=T[f]/v;P[f]=E*m});KO(()=>{const P=r.current.virtualScrollerRef.current,T=s.current;return P.addEventListener("scroll",w,{capture:!0}),T.addEventListener("scroll",x,{capture:!0}),()=>{P.removeEventListener("scroll",w,{capture:!0}),T.removeEventListener("scroll",x,{capture:!0})}}),y.useEffect(()=>{l.current.style.setProperty(d,`${v}px`)},[v,d]);const S=t.position==="vertical"?gTt:yTt;return $.jsx(S,{ref:Wt(n,s),className:c.root,style:t.position==="vertical"&&o.unstable_listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",children:$.jsx("div",{ref:l,className:c.content})})}),vTt=(e,t,n)=>{const{classes:r}=e,o={root:["main",t.rightPinnedWidth>0&&"main--hasPinnedRight",n==="skeleton"&&"main--hasSkeletonLoadingOverlay"],scroller:["virtualScroller",t.hasScrollX&&"virtualScroller--hasScrollX"]};return Te(o,xn,r)},bTt=Yn("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0});function wTt(e){const t=gn(),n=xt(),r=Qe(t,Si),o=FPt(),i=vTt(n,r,o.loadingOverlayVariant),a=RPt(),{getContainerProps:s,getScrollerProps:l,getContentProps:c,getRenderZoneProps:u,getScrollbarVerticalProps:d,getScrollbarHorizontalProps:f,getRows:p}=a,m=p();return $.jsxs(KPt,N({className:i.root},s(),{children:[$.jsx(rq,{scrollDirection:"left"}),$.jsx(rq,{scrollDirection:"right"}),$.jsxs(bTt,N({className:i.scroller},l(),{ownerState:n,children:[$.jsxs(QPt,{children:[!n.unstable_listView&&$.jsx(WPt,{}),$.jsx(n.slots.pinnedRows,{position:"top",virtualScroller:a})]}),$.jsx(HPt,N({},o)),$.jsx(rTt,N({},c(),{children:$.jsxs(pTt,N({},u(),{children:[m,$.jsx(n.slots.detailPanels,{virtualScroller:a})]}))})),$.jsx(cTt,{rowsLength:m.length}),$.jsx(eTt,{children:$.jsx(n.slots.pinnedRows,{position:"bottom",virtualScroller:a})})]})),r.hasScrollY&&$.jsx(aq,N({position:"vertical"},d())),r.hasScrollX&&!n.unstable_listView&&$.jsx(aq,N({position:"horizontal"},f())),e.children]}))}function xTt(){var t;const e=xt();return e.hideFooter?null:$.jsx(e.slots.footer,N({},(t=e.slotProps)==null?void 0:t.footer))}let vR;function STt(){return vR===void 0&&document.createElement("div").focus({get preventScroll(){return vR=!0,!1}}),vR}const rM=(e,t,n,r,o)=>{const i=t===n-1;return e===lr.LEFT&&i?!0:r?e===lr.LEFT?!0:e===lr.RIGHT?!i:!i||o:!1},oM=(e,t)=>e===lr.RIGHT&&t===0,CTt=["column","rowId","editCellState","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","sectionIndex","sectionLength","gridHasFiller","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],PTt=["changeReason","unstable_updateValueOnRender"];let sa=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e}({});const lce={[sa.LEFT]:lr.LEFT,[sa.RIGHT]:lr.RIGHT,[sa.NONE]:void 0,[sa.VIRTUAL]:void 0},sq={id:-1,field:"__unset__",row:{},rowNode:{id:-1,depth:0,type:"leaf",parent:-1,groupingKey:null},colDef:{type:"string",field:"__unset__",computedWidth:0},cellMode:Qn.View,hasFocus:!1,tabIndex:-1,value:null,formattedValue:"__unset__",isEditable:!1,api:{}},TTt=e=>{const{align:t,showLeftBorder:n,showRightBorder:r,pinnedPosition:o,isEditable:i,isSelected:a,isSelectionMode:s,classes:l}=e,c={root:["cell",`cell--text${Se(t)}`,a&&"selected",i&&"cell--editable",n&&"cell--withLeftBorder",r&&"cell--withRightBorder",o===sa.LEFT&&"cell--pinnedLeft",o===sa.RIGHT&&"cell--pinnedRight",s&&!i&&"cell--selectionMode"]};return Te(c,xn,l)},ETt=y.forwardRef(function(t,n){var tt,pt,qt;const{column:r,rowId:o,editCellState:i,align:a,colIndex:s,width:l,className:c,style:u,colSpan:d,disableDragEvents:f,isNotVisible:p,pinnedOffset:m,pinnedPosition:g,sectionIndex:v,sectionLength:w,gridHasFiller:x,onClick:S,onDoubleClick:P,onMouseDown:T,onMouseUp:E,onMouseOver:O,onKeyDown:k,onKeyUp:A,onDragEnter:I,onDragOver:R}=t,L=Ue(t,CTt),F=gn(),z=xt(),_=er(),D=r.field,H=Qe(F,()=>{if(!F.current.getRow(o))return sq;const Re=F.current.getCellParams(o,D);return Re.api=F.current,Re},ule),B=Qe(F,()=>F.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:o,field:D})),V=Qe(F,tce),W=Qe(F,kPt),{cellMode:G,hasFocus:Q,isEditable:Y=!1,value:ne}=H,ie=r.type==="actions"&&((tt=r.getActions)==null?void 0:tt.call(r,F.current.getRowParams(o)).some(qe=>!qe.props.disabled)),re=(G==="view"||!Y)&&!ie?H.tabIndex:-1,{classes:pe,getCellClassName:le}=z,ce=[Qe(F,()=>F.current.unstable_applyPipeProcessors("cellClassName",[],{id:o,field:D}).filter(Boolean).join(" "))];r.cellClassName&&ce.push(typeof r.cellClassName=="function"?r.cellClassName(H):r.cellClassName),r.display==="flex"&&ce.push(ae["cell--flex"]),le&&ce.push(le(H));const se=H.formattedValue??ne,Z=y.useRef(null),ue=Wt(n,Z),ge=y.useRef(null),we=z.cellSelection??!1,me=lce[g],be=oM(me,v),xe=rM(me,v,w,z.showCellVerticalBorder,x),Ee={align:a,showLeftBorder:be,showRightBorder:xe,isEditable:Y,classes:z.classes,pinnedPosition:g,isSelected:B,isSelectionMode:we},Me=TTt(Ee),_e=y.useCallback(qe=>Re=>{const Ze=F.current.getCellParams(o,D||"");F.current.publishEvent(qe,Ze,Re),E&&E(Re)},[F,D,E,o]),de=y.useCallback(qe=>Re=>{const Ze=F.current.getCellParams(o,D||"");F.current.publishEvent(qe,Ze,Re),T&&T(Re)},[F,D,T,o]),Ae=y.useCallback((qe,Re)=>Ze=>{if(!F.current.getRow(o))return;const Pt=F.current.getCellParams(o,D||"");F.current.publishEvent(qe,Pt,Ze),Re&&Re(Ze)},[F,D,o]),Oe=((pt=V[o])==null?void 0:pt[D])??!1,$e=((qt=W[o])==null?void 0:qt[D])??1,Be=y.useMemo(()=>{if(p)return{padding:0,opacity:0,width:0,height:0,border:0};const qe=N({"--width":`${l}px`},u),Re=g===sa.LEFT,Ze=g===sa.RIGHT;if(Re||Ze){let Pt=Re?"left":"right";_&&(Pt=Re?"right":"left"),qe[Pt]=m}return $e>1&&(qe.height=`calc(var(--height) * ${$e})`,qe.zIndex=5,(Re||Ze)&&(qe.zIndex=6)),qe},[l,p,u,m,g,_,$e]);if(y.useEffect(()=>{if(!Q||G===Qn.Edit)return;const qe=pr(F.current.rootElementRef.current);if(Z.current&&!Z.current.contains(qe.activeElement)){const Re=Z.current.querySelector('[tabindex="0"]'),Ze=ge.current||Re||Z.current;if(STt())Ze.focus({preventScroll:!0});else{const Pt=F.current.getScrollPosition();Ze.focus(),F.current.scroll(Pt)}}},[Q,G,F]),Oe)return $.jsx("div",{"data-colindex":s,role:"presentation",style:N({width:"var(--width)"},Be)});if(H===sq)return null;let Je=L.onFocus,ot,lt;if(i===null&&r.renderCell&&(ot=r.renderCell(H)),i!==null&&r.renderEditCell){const qe=F.current.getRowWithUpdatedValues(o,r.field),Re=Ue(i,PTt),Ze=r.valueFormatter?r.valueFormatter(i.value,qe,r,F):H.formattedValue,Pt=N({},H,{row:qe,formattedValue:Ze},Re);ot=r.renderEditCell(Pt),ce.push(ae["cell--editing"]),ce.push(pe==null?void 0:pe["cell--editing"])}if(ot===void 0){const qe=se==null?void 0:se.toString();ot=qe,lt=qe}y.isValidElement(ot)&&ie&&(ot=y.cloneElement(ot,{focusElementRef:ge}));const it=f?null:{onDragEnter:Ae("cellDragEnter",I),onDragOver:Ae("cellDragOver",R)};return $.jsx("div",N({ref:ue,className:fe(Me.root,ce,c),role:"gridcell","data-field":D,"data-colindex":s,"aria-colindex":s+1,"aria-colspan":d,"aria-rowspan":$e,style:Be,title:lt,tabIndex:re,onClick:Ae("cellClick",S),onDoubleClick:Ae("cellDoubleClick",P),onMouseOver:Ae("cellMouseOver",O),onMouseDown:de("cellMouseDown"),onMouseUp:_e("cellMouseUp"),onKeyDown:Ae("cellKeyDown",k),onKeyUp:Ae("cellKeyUp",A)},it,L,{onFocus:Je,children:ot}))}),OTt=Wf(ETt),ITt=["label","icon","showInMenu","onClick"],kTt=["label","icon","showInMenu","onClick","closeMenuOnClick","closeMenu"],tP=y.forwardRef((e,t)=>{var u;const n=xt();if(!e.showInMenu){const{label:d,icon:f,onClick:p}=e,m=Ue(e,ITt),g=v=>{p==null||p(v)};return $.jsx(n.slots.baseIconButton,N({ref:t,size:"small",role:"menuitem","aria-label":d},m,{onClick:g},(u=n.slotProps)==null?void 0:u.baseIconButton,{children:y.cloneElement(f,{fontSize:"small"})}))}const{label:r,icon:o,onClick:i,closeMenuOnClick:a=!0,closeMenu:s}=e,l=Ue(e,kTt),c=d=>{i==null||i(d),a&&(s==null||s())};return $.jsxs(tn,N({ref:t},l,{onClick:c,children:[o&&$.jsx(zi,{children:o}),r]}))}),MTt=["field","type","align","width","height","empty","style","className"],lq="1.3em",ATt="1.2em",cq=[40,80],$Tt={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},RTt=e=>{const{align:t,classes:n,empty:r}=e,o={root:["cell","cellSkeleton",`cell--text${t?Se(t):"Left"}`,r&&"cellEmpty"]};return Te(o,xn,n)},_Tt=f1t(12345);function DTt(e){const{field:t,type:n,align:r,width:o,height:i,empty:a=!1,style:s,className:l}=e,c=Ue(e,MTt),d={classes:xt().classes,align:r,empty:a},f=RTt(d),p=y.useMemo(()=>{if(n==="boolean"||n==="actions")return{variant:"circular",width:lq,height:lq};const[g,v]=n?$Tt[n]??cq:cq;return{variant:"text",width:`${Math.round(_Tt(g,v))}%`,height:ATt}},[n]);return $.jsx("div",N({"data-field":t,className:fe(f.root,l),style:N({height:i,maxWidth:o,minWidth:o},s)},c,{children:!a&&$.jsx(TP,N({},p))}))}const NTt=Wf(DTt);function LTt(e){return e.vars?e.vars.palette.TableCell.border:e.palette.mode==="light"?_u(vt(e.palette.divider,1),.88):Ru(vt(e.palette.divider,1),.68)}const uq={[`& .${ae.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${ae.menuIcon}`]:{width:"auto",visibility:"visible"}},FTt=10,nP=-5,Gm=1,dq={width:3,rx:1.5,x:10.5},jTt="/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */",BTt=oe("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${ae.autoHeight}`]:t.autoHeight},{[`&.${ae.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${ae["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${ae["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${ae["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${ae.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`&.${ae["root--disableUserSelection"]} .${ae.cell}`]:t["root--disableUserSelection"]},{[`&.${ae.autosizing}`]:t.autosizing},{[`& .${ae.editBooleanCell}`]:t.editBooleanCell},{[`& .${ae.cell}`]:t.cell},{[`& .${ae["cell--editing"]}`]:t["cell--editing"]},{[`& .${ae["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${ae["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${ae["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${ae["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${ae["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${ae["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${ae["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${ae["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${ae.cellCheckbox}`]:t.cellCheckbox},{[`& .${ae.cellSkeleton}`]:t.cellSkeleton},{[`& .${ae.checkboxInput}`]:t.checkboxInput},{[`& .${ae["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${ae["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${ae["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${ae["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${ae["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${ae["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${ae["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${ae["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${ae["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${ae.columnHeader}`]:t.columnHeader},{[`& .${ae.headerFilterRow}`]:t.headerFilterRow},{[`& .${ae.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${ae.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${ae.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${ae["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${ae["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${ae.columnSeparator}`]:t.columnSeparator},{[`& .${ae.filterIcon}`]:t.filterIcon},{[`& .${ae.iconSeparator}`]:t.iconSeparator},{[`& .${ae.menuIcon}`]:t.menuIcon},{[`& .${ae.menuIconButton}`]:t.menuIconButton},{[`& .${ae.menuOpen}`]:t.menuOpen},{[`& .${ae.menuList}`]:t.menuList},{[`& .${ae["row--editable"]}`]:t["row--editable"]},{[`& .${ae["row--editing"]}`]:t["row--editing"]},{[`& .${ae["row--dragging"]}`]:t["row--dragging"]},{[`& .${ae.row}`]:t.row},{[`& .${ae.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${ae.rowReorderCell}`]:t.rowReorderCell},{[`& .${ae["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${ae.sortIcon}`]:t.sortIcon},{[`& .${ae.withBorderColor}`]:t.withBorderColor},{[`& .${ae.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${ae.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${ae.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${ae.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${ae.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${ae["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})(({theme:e})=>{var k,A;const t=hl(),n=Qe(t,Si),r=LTt(e),o=e.shape.borderRadius,i=e.vars?e.vars.palette.background.default:((k=e.mixins.MuiDataGrid)==null?void 0:k.containerBackground)??e.palette.background.default,a=((A=e.mixins.MuiDataGrid)==null?void 0:A.pinnedBackground)??i,s=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:vt(e.palette.background.default,e.palette.action.disabledOpacity),l=(e.vars||e).palette.action.hoverOpacity,c=(e.vars||e).palette.action.hover,u=(e.vars||e).palette.action.selectedOpacity,d=e.vars?`calc(${l} + ${u})`:l+u,f=e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${u})`:vt(e.palette.primary.main,u),p=e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${d})`:vt(e.palette.primary.main,d),m=e.vars?HTt:zTt,g=I=>({[`& .${ae["cell--pinnedLeft"]}, & .${ae["cell--pinnedRight"]}`]:{backgroundColor:I,"&.Mui-selected":{backgroundColor:m(I,f,u),"&:hover":{backgroundColor:m(I,f,d)}}}}),v=m(a,c,l),w=g(v),x=m(a,f,u),S=g(x),P=m(a,p,d),T=g(P),E={backgroundColor:f,"&:hover":{backgroundColor:p,"@media (hover: none)":{backgroundColor:f}}};return N({"--unstable_DataGrid-radius":typeof o=="number"?`${o}px`:o,"--unstable_DataGrid-headWeight":e.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":s,"--DataGrid-containerBackground":i,"--DataGrid-pinnedBackground":a,"--DataGrid-rowBorderColor":r,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:r,borderRadius:"var(--unstable_DataGrid-radius)",color:(e.vars||e).palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",[`.${ae.main} > *:first-child${jTt}`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${ae.autoHeight}`]:{height:"auto"},[`&.${ae.autosizing}`]:{[`& .${ae.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${ae.iconButtonContainer}`]:{width:"0 !important",visibility:"hidden !important"},[`& .${ae.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${ae.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${ae.groupingCriteriaCell}`]:{width:"unset"},[`& .${ae.treeDataGroupingCell}`]:{width:"unset"}},[`& .${ae.columnHeader}, & .${ae.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${ae.columnHeader}:focus-within, & .${ae.cell}:focus-within`]:{outline:`solid ${e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.5)`:vt(e.palette.primary.main,.5)} ${Gm}px`,outlineOffset:Gm*-1},[`& .${ae.columnHeader}:focus, & .${ae.cell}:focus`]:{outline:`solid ${e.palette.primary.main} ${Gm}px`,outlineOffset:Gm*-1},[`& .${ae.columnHeader}:focus, +return result$$;`.replaceAll("$$",String(W7)));return W7+=1,(s,l)=>i(o,s,l)},Sle=e=>e.quickFilterExcludeHiddenColumns??!0,g1t=(e,t)=>{var s;const n=((s=e.quickFilterValues)==null?void 0:s.filter(Boolean))??[];if(n.length===0)return null;const r=Sle(e)?lb(t):Iu(t),o=[],{ignoreDiacritics:i}=t.current.rootProps,a=wle(t);return r.forEach(l=>{const c=t.current.getColumn(l),u=c==null?void 0:c.getApplyQuickFilterFn;u&&o.push({column:c,appliers:n.map(d=>{const f=i?jx(d):d;return{fn:u(f,c,a)}})})}),function(c,u){const d={};e:for(let f=0;f{const r=m1t(e,t,n),o=g1t(e,t);return function(a,s,l){l.passingFilterItems=(r==null?void 0:r(a,s))??null,l.passingQuickFilterValues=(o==null?void 0:o(a,s))??null}},G7=e=>e!=null,v1t=(e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter(r=>xle(r,t)!==null)),e.cleanedFilterItems),b1t=(e,t,n,r,o)=>{const i=v1t(o,r,n.items),a=e.filter(G7),s=t.filter(G7);if(a.length>0){const l=u=>a.some(d=>d[u.id]);if((n.logicOperator??Fx().logicOperator)===_i.And){if(!i.every(l))return!1}else if(!i.some(l))return!1}if(s.length>0&&n.quickFilterValues!=null){const l=u=>s.some(d=>d[u]);if((n.quickFilterLogicOperator??Fx().quickFilterLogicOperator)===_i.And){if(!n.quickFilterValues.every(l))return!1}else if(!n.quickFilterValues.some(l))return!1}return!0},w1t=e=>{if(!e)return null;const t=new RegExp(QT(e),"i");return(n,r,o,i)=>{let a=i.current.getRowFormattedValue(r,o);return i.current.ignoreDiacritics&&(a=jx(a)),a!=null?t.test(a.toString()):!1}},q7=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new RegExp(QT(r),"i");return i=>{if(i==null)return t;const a=o.test(String(i));return t?!a:a}},K7=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return i=>{if(i==null)return t;const a=o.compare(r,i.toString())===0;return t?!a:a}},Y7=e=>()=>t=>{const n=t===""||t==null;return e?!n:n},x1t=(e=!1)=>[{value:"contains",getApplyFilterFn:q7(e,!1),InputComponent:_s},{value:"doesNotContain",getApplyFilterFn:q7(e,!0),InputComponent:_s},{value:"equals",getApplyFilterFn:K7(e,!1),InputComponent:_s},{value:"doesNotEqual",getApplyFilterFn:K7(e,!0),InputComponent:_s},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${QT(n)}.*$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:_s},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${QT(n)}$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:_s},{value:"isEmpty",getApplyFilterFn:Y7(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:Y7(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;const n=e?t.value:t.value.map(o=>o.trim()),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?n.some(i=>r.compare(i,o.toString()||"")===0):!1},InputComponent:vle}],Wl={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:a1t,type:"string",align:"left",filterOperators:x1t(),renderEditCell:e1t,getApplyQuickFilterFn:w1t},S1t=["open","target","onClose","children","position","className","onExited"],C1t=e=>{const{classes:t}=e;return Te({root:["menu"]},Sn,t)},P1t=ie($f,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})(({theme:e})=>({zIndex:e.zIndex.modal,[`& .${ae.menuList}`]:{outline:0}})),E1t={"bottom-start":"top left","bottom-end":"top right"};function hz(e){var g;const{open:t,target:n,onClose:r,children:o,position:i,className:a,onExited:s}=e,l=Ue(e,S1t),c=sn(),u=wt(),d=C1t(u),f=v.useRef(null);xn(()=>{var y,b;t?f.current=document.activeElement instanceof HTMLElement?document.activeElement:null:((b=(y=f.current)==null?void 0:y.focus)==null||b.call(y),f.current=null)},[t]),v.useEffect(()=>{const y=t?"menuOpen":"menuClose";c.current.publishEvent(y,{target:n})},[c,t,n]);const p=y=>b=>{y&&y(),s&&s(b)},m=y=>{y.target&&(n===y.target||n!=null&&n.contains(y.target))||r(y)};return $.jsx(P1t,D({as:u.slots.basePopper,className:pe(d.root,a),ownerState:u,open:t,anchorEl:n,transition:!0,placement:i},l,(g=u.slotProps)==null?void 0:g.basePopper,{children:({TransitionProps:y,placement:b})=>$.jsx(PF,{onClickAway:m,mouseEvent:"onMouseDown",children:$.jsx(gh,D({},y,{style:{transformOrigin:E1t[b]},onExited:p(y==null?void 0:y.onExited),children:$.jsx(so,{children:o})}))})}))}const T1t=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"],O1t=e=>typeof e.getActions=="function";function I1t(e){var F;const{colDef:t,id:n,hasFocus:r,tabIndex:o,position:i="bottom-end",focusElementRef:a}=e,s=Ue(e,T1t),[l,c]=v.useState(-1),[u,d]=v.useState(!1),f=sn(),p=v.useRef(null),m=v.useRef(null),g=v.useRef(!1),y=v.useRef({}),b=nr(),x=_n(),S=_n(),P=wt();if(!O1t(t))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const E=t.getActions(f.current.getRowParams(n)),T=E.filter(U=>!U.props.showInMenu),O=E.filter(U=>U.props.showInMenu),k=T.length+(O.length?1:0);v.useLayoutEffect(()=>{r||Object.entries(y.current).forEach(([U,V])=>{V==null||V.stop({},()=>{delete y.current[U]})})},[r]),v.useEffect(()=>{if(l<0||!p.current||l>=p.current.children.length)return;p.current.children[l].focus({preventScroll:!0})},[l]),v.useEffect(()=>{r||(c(-1),g.current=!1)},[r]),v.useImperativeHandle(a,()=>({focus(){if(!g.current){const U=E.findIndex(V=>!V.props.disabled);c(U)}}}),[E]),v.useEffect(()=>{l>=k&&c(k-1)},[l,k]);const M=()=>{d(!0),c(k-1),g.current=!0},I=()=>{d(!1)},R=()=>{u?I():M()},_=U=>V=>{y.current[U]=V},N=(U,V)=>z=>{c(U),g.current=!0,V&&V(z)},B=U=>{if(k<=1)return;const V=(W,G)=>{var ne;if(W<0||W>E.length)return W;const K=(G==="left"?-1:1)*(b?-1:1);return(ne=E[W+K])!=null&&ne.props.disabled?V(W+K,G):W+K};let z=l;U.key==="ArrowRight"?z=V(l,"right"):U.key==="ArrowLeft"&&(z=V(l,"left")),!(z<0||z>=k)&&z!==l&&(U.preventDefault(),U.stopPropagation(),c(z))},L=U=>{U.key==="Tab"&&U.preventDefault(),["Tab","Escape"].includes(U.key)&&I()};return $.jsxs("div",D({role:"menu",ref:p,tabIndex:-1,className:ae.actionsCell,onKeyDown:B},s,{children:[T.map((U,V)=>v.cloneElement(U,{key:V,touchRippleRef:_(V),onClick:N(V,U.props.onClick),tabIndex:l===V?o:-1})),O.length>0&&S&&$.jsx(P.slots.baseIconButton,D({ref:m,id:S,"aria-label":f.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?x:void 0,role:"menuitem",size:"small",onClick:R,touchRippleRef:_(S),tabIndex:l===T.length?o:-1},(F=P.slotProps)==null?void 0:F.baseIconButton,{children:$.jsx(P.slots.moreActionsIcon,{fontSize:"small"})})),O.length>0&&$.jsx(hz,{open:u,target:m.current,position:i,onClose:I,children:$.jsx(Ev,{id:x,className:ae.menuList,onKeyDown:L,"aria-labelledby":S,variant:"menu",autoFocusItem:!0,children:O.map((U,V)=>v.cloneElement(U,{key:V,closeMenu:I}))})})]}))}const k1t=e=>$.jsx(I1t,D({},e)),Vk="actions",M1t=D({},Wl,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:k1t,getApplyQuickFilterFn:void 0}),fl=e=>e.rows,Hk=Dt(fl,e=>e.totalRowCount),A1t=Dt(fl,e=>e.loading),$1t=Dt(fl,e=>e.totalTopLevelRowCount),Zd=Dt(fl,e=>e.dataRowIdToModelLookup),JT=Dt(fl,e=>e.dataRowIdToIdLookup),ei=Dt(fl,e=>e.tree),R1t=Dt(fl,e=>e.groupsToFetch),D1t=Dt(fl,e=>e.groupingName),X7=Dt(fl,e=>e.treeDepths),cb=rr(fl,e=>{const t=Object.entries(e.treeDepths);return t.length===0?1:t.filter(([,n])=>n>0).map(([n])=>Number(n)).sort((n,r)=>r-n)[0]+1}),JC=Dt(fl,e=>e.dataRowIds),_1t=Dt(fl,e=>e==null?void 0:e.additionalRowGroups),em=rr(_1t,e=>{var n,r;const t=e==null?void 0:e.pinnedRows;return{bottom:((n=t==null?void 0:t.bottom)==null?void 0:n.map(o=>({id:o.id,model:o.model??{}})))??[],top:((r=t==null?void 0:t.top)==null?void 0:r.map(o=>({id:o.id,model:o.model??{}})))??[]}}),Cle=Dt(em,e=>{var t,n;return(((t=e==null?void 0:e.top)==null?void 0:t.length)||0)+(((n=e==null?void 0:e.bottom)==null?void 0:n.length)||0)}),ti="auto-generated-group-node-root",Jg=Symbol("mui.id_autogenerated"),L1t=()=>({type:"group",id:ti,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function N1t(e,t,n="A row was provided without id in the rows prop:"){if(e==null)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(t)].join(` +`))}const Uk=(e,t,n)=>{const r=t?t(e):e.id;return N1t(r,e,n),r},LP=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={type:"full",rows:[]},i={},a={};for(let s=0;s{const n=e[ti];return Math.max(t,n.children.length+(n.footerId==null?0:1))},Ele=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:r,previousTreeDepths:o,previousGroupsToFetch:i})=>{const a=e.current.caches.rows,{tree:s,treeDepths:l,dataRowIds:c,groupingName:u,groupsToFetch:d=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:r,previousTreeDepths:o,updates:a.updates,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIdToModelLookup:a.dataRowIdToModelLookup,previousGroupsToFetch:i}),f=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:l,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIds:c,dataRowIdToModelLookup:a.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},D({},f,{totalRowCount:Math.max(t,f.dataRowIds.length),totalTopLevelRowCount:Ple({tree:f.tree,rowCountProp:t}),groupingName:u,loading:n,groupsToFetch:d})},lv=e=>e.type==="skeletonRow"||e.type==="footer"||e.type==="group"&&e.isAutoGenerated||e.type==="pinnedRow"&&e.isAutoGenerated,mz=(e,t,n)=>{const r=e[t];if(r.type!=="group")return[];const o=[];for(let i=0;i{if(e.updates.type==="full")throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const o=new Map;n.forEach(u=>{const d=Uk(u,t,"A row was provided without id when calling updateRows():");o.has(d)?o.set(d,D({},o.get(d),u)):o.set(d,u)});const i={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:D({},e.updates.idToActionLookup),groupKeys:r},a=D({},e.dataRowIdToModelLookup),s=D({},e.dataRowIdToIdLookup),l={insert:{},modify:{},remove:{}};o.forEach((u,d)=>{const f=i.idToActionLookup[d];if(u._action==="delete"){if(f==="remove"||!a[d])return;f!=null&&(l[f][d]=!0),i.actions.remove.push(d),delete a[d],delete s[d];return}const p=a[d];if(p){f==="remove"?(l.remove[d]=!0,i.actions.modify.push(d)):f==null&&i.actions.modify.push(d),a[d]=D({},p,u);return}f==="remove"?(l.remove[d]=!0,i.actions.insert.push(d)):f==null&&i.actions.insert.push(d),a[d]=u,s[d]=d});const c=Object.keys(l);for(let u=0;u0&&(i.actions[d]=i.actions[d].filter(p=>!f[p]))}return{dataRowIdToModelLookup:a,dataRowIdToIdLookup:s,updates:i,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}};function F1t(e){var o,i;const t=em(e),n=((o=t==null?void 0:t.top)==null?void 0:o.reduce((a,s)=>(a+=e.current.unstable_getRowHeight(s.id),a),0))||0,r=((i=t==null?void 0:t.bottom)==null?void 0:i.reduce((a,s)=>(a+=e.current.unstable_getRowHeight(s.id),a),0))||0;return{top:n,bottom:r}}const Tle="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function J7(e,t,n){const r=[];return t.forEach(o=>{const i=Uk(o,n,"A row was provided without id when calling updateRows():"),a=e.current.getRowNode(i);if((a==null?void 0:a.type)==="pinnedRow"){const s=e.current.caches.pinnedRows,l=s.idLookup[i];l&&(s.idLookup[i]=D({},l,o))}else r.push(o)}),r}const Ole=(e,t,n)=>typeof e=="number"&&e>0?e:t,j1t="__tree_data_group__",Ile="__row_group_by_columns_group__",Wk="__detail_panel_toggle__",B1t=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"],z1t=e=>{const{classes:t}=e;return Te({root:["booleanCell"]},Sn,t)};function V1t(e){const{value:t,rowNode:n}=e,r=Ue(e,B1t),o=sn(),i=wt(),a={classes:i.classes},s=z1t(a),c=Ye(o,cb)>0&&n.type==="group"&&i.treeData===!1,u=v.useMemo(()=>t?i.slots.booleanCellTrueIcon:i.slots.booleanCellFalseIcon,[i.slots.booleanCellFalseIcon,i.slots.booleanCellTrueIcon,t]);return c&&t===void 0?null:$.jsx(u,D({fontSize:"small",className:s.root,titleAccess:o.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!t},r))}const H1t=v.memo(V1t),U1t=e=>e.field!==Ile&&lv(e.rowNode)?"":$.jsx(H1t,D({},e)),W1t=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"],G1t=e=>{const{classes:t}=e;return Te({root:["editBooleanCell"]},Sn,t)};function q1t(e){var b;const{id:t,value:n,field:r,className:o,hasFocus:i,onValueChange:a}=e,s=Ue(e,W1t),l=sn(),c=v.useRef(null),u=_n(),[d,f]=v.useState(n),p=wt(),m={classes:p.classes},g=G1t(m),y=v.useCallback(async x=>{const S=x.target.checked;a&&await a(x,S),f(S),await l.current.setEditCellValue({id:t,field:r,value:S},x)},[l,r,t,a]);return v.useEffect(()=>{f(n)},[n]),xn(()=>{i&&c.current.focus()},[i]),$.jsx("label",D({htmlFor:u,className:pe(g.root,o)},s,{children:$.jsx(p.slots.baseCheckbox,D({id:u,inputRef:c,checked:!!d,onChange:y,size:"small"},(b=p.slotProps)==null?void 0:b.baseCheckbox))}))}const K1t=e=>$.jsx(q1t,D({},e)),Y1t=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","variant","InputLabelProps"],NP=e=>{if(String(e).toLowerCase()==="true")return!0;if(String(e).toLowerCase()==="false")return!1},X1t=ie("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function Q1t(e){var P,E,T;const{item:t,applyValue:n,apiRef:r,focusElementRef:o,clearButton:i,tabIndex:a,label:s,variant:l="standard"}=e,c=Ue(e,Y1t),[u,d]=v.useState(NP(t.value)),f=wt(),p=_n(),m=_n(),g=((P=f.slotProps)==null?void 0:P.baseSelect)||{},y=g.native??!1,b=((E=f.slotProps)==null?void 0:E.baseSelectOption)||{},x=v.useCallback(O=>{const k=NP(O.target.value);d(k),n(D({},t,{value:k}))},[n,t]);v.useEffect(()=>{d(NP(t.value))},[t.value]);const S=s??r.current.getLocaleText("filterPanelInputLabel");return $.jsxs(X1t,{children:[$.jsxs(f.slots.baseFormControl,{fullWidth:!0,children:[$.jsx(f.slots.baseInputLabel,D({},(T=f.slotProps)==null?void 0:T.baseInputLabel,{id:p,shrink:!0,variant:l,children:S})),$.jsxs(f.slots.baseSelect,D({labelId:p,id:m,label:S,value:u===void 0?"":String(u),onChange:x,variant:l,notched:l==="outlined"?!0:void 0,native:y,displayEmpty:!0,inputProps:{ref:o,tabIndex:a}},c,g,{children:[$.jsx(f.slots.baseSelectOption,D({},b,{native:y,value:"",children:r.current.getLocaleText("filterValueAny")})),$.jsx(f.slots.baseSelectOption,D({},b,{native:y,value:"true",children:r.current.getLocaleText("filterValueTrue")})),$.jsx(f.slots.baseSelectOption,D({},b,{native:y,value:"false",children:r.current.getLocaleText("filterValueFalse")}))]}))]}),i]})}const J1t=()=>[{value:"is",getApplyFilterFn:e=>{const t=NP(e.value);return t===void 0?null:n=>!!n===t},InputComponent:Q1t}],Z1t=(e,t,n,r)=>e?r.current.getLocaleText("booleanCellTrueLabel"):r.current.getLocaleText("booleanCellFalseLabel"),eCt=e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}},kle=D({},Wl,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:U1t,renderEditCell:K1t,sortComparator:hle,valueFormatter:Z1t,filterOperators:J1t(),getApplyQuickFilterFn:void 0,aggregable:!1,pastedValueParser:e=>eCt(e)}),Mle=e=>e.sorting,ub=Dt(Mle,e=>e.sortedRows),gz=rr(ub,Zd,ei,(e,t,n)=>e.reduce((r,o)=>{const i=t[o];i&&r.push({id:o,model:i});const a=n[o];return a&&lv(a)&&r.push({id:o,model:{[Jg]:o}}),r},[])),ks=Dt(Mle,e=>e.sortModel),tCt=rr(ks,e=>e.reduce((n,r,o)=>(n[r.field]={sortDirection:r.sort,sortIndex:e.length>1?o+1:void 0},n),{}));rr(ub,e=>e.reduce((t,n,r)=>(t[n]=r,t),Object.create(null)));const Gk=e=>e.filter,Qo=Dt(Gk,e=>e.filterModel);Dt(Qo,e=>e.quickFilterValues);const nCt=e=>e.visibleRowsLookup,db=Dt(Gk,e=>e.filteredRowsLookup);Dt(Gk,e=>e.filteredChildrenCountLookup);Dt(Gk,e=>e.filteredDescendantCountLookup);const qf=rr(nCt,gz,(e,t)=>t.filter(n=>e[n.id]!==!1)),Zg=rr(qf,e=>e.map(t=>t.id)),Ale=rr(db,gz,(e,t)=>t.filter(n=>e[n.id]!==!1)),$le=rr(Ale,e=>e.map(t=>t.id));rr(Zg,ei,(e,t)=>{const n={};let r=0;return e.reduce((o,i)=>{const a=t[i];return n[a.depth]||(n[a.depth]=0),a.depth>r&&(n[a.depth]=0),r=a.depth,n[a.depth]+=1,o[i]=n[a.depth],o},{})});const Rle=rr(qf,ei,cb,(e,t,n)=>n<2?e:e.filter(r=>{var o;return((o=t[r.id])==null?void 0:o.depth)===0})),yz=Dt(qf,e=>e.length),vz=Dt(Rle,e=>e.length),rCt=Dt(Ale,e=>e.length);Dt(rCt,vz,(e,t)=>e-t);const oCt=rr(Qo,od,(e,t)=>{var n;return(n=e.items)==null?void 0:n.filter(r=>{var a,s;if(!r.field)return!1;const o=t[r.field];if(!(o!=null&&o.filterOperators)||((a=o==null?void 0:o.filterOperators)==null?void 0:a.length)===0)return!1;const i=o.filterOperators.find(l=>l.value===r.operator);return i?!i.InputComponent||r.value!=null&&((s=r.value)==null?void 0:s.toString())!=="":!1})}),iCt=rr(oCt,e=>e.reduce((n,r)=>(n[r.field]?n[r.field].push(r):n[r.field]=[r],n),{})),Ms=e=>e.rowSelection,aCt=Dt(Ms,e=>e.length),sCt=rr(Ms,Zd,(e,t)=>new Map(e.map(n=>[n,t[n]]))),ku=rr(Ms,e=>e.reduce((t,n)=>(t[n]=n,t),{}));function Dle(e,t){var l;const n=ei(e),r=ub(e),o=db(e),i=n[t];if(!i||i.type!=="group")return[];const a=[],s=r.findIndex(c=>c===t)+1;for(let c=s;ci.depth;c+=1){const u=r[c];o[u]!==!1&&e.current.isRowSelectable(u)&&a.push(u)}return a}function lCt(e,t){return Dt(ei,ub,db,ku,(n,r,o,i)=>{var u;const a=n[e];if(!a||a.type!=="group")return{isIndeterminate:!1,isChecked:i[e]===e};if(i[e]===e)return{isIndeterminate:!1,isChecked:!0};let s=0,l=0;const c=r.findIndex(d=>d===e)+1;for(let d=c;da.depth;d+=1){const f=r[d];o[f]!==!1&&(s+=1,i[f]!==void 0&&(l+=1))}return{isIndeterminate:l>0&&(l0:i[e]===e}})}function bz(e){return e.signature===Xs.DataGrid?e.checkboxSelection&&e.disableMultipleRowSelection!==!0:!e.disableMultipleRowSelection}const cCt=(e,t)=>{const n=[];let r=t;for(;r!=null&&r!==ti;){const o=e[r];if(!o)return n;n.push(r),r=o.parent}return n},uCt=(e,t,n)=>{const r=e[n];if(!r)return[];const o=r.parent;return o==null?[]:e[o].children.filter(a=>a!==n&&t[a])},ZC=(e,t,n,r,o,i)=>{const a=db(e),s=ku(e),l=new Set([]);if(!(!r&&!o)){if(r){const c=t[n];(c==null?void 0:c.type)==="group"&&Dle(e,n).forEach(d=>{i(d),l.add(d)})}if(o){const c=d=>{if(s[d]!==d&&!l.has(d))return!1;const f=t[d];return(f==null?void 0:f.type)!=="group"?!0:f.children.every(c)},u=d=>{const f=uCt(t,a,d);if(f.length===0||f.every(c)){const m=t[d].parent;m!=null&&m!==ti&&e.current.isRowSelectable(m)&&(i(m),l.add(m),u(m))}};u(n)}}},Z7=(e,t,n,r,o,i)=>{const a=ku(e);if(!(!o&&!r)&&(o&&cCt(t,n).forEach(l=>{a[l]===l&&i(l)}),r)){const s=t[n];(s==null?void 0:s.type)==="group"&&Dle(e,n).forEach(c=>{i(c)})}},dCt=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],fCt=e=>{const{classes:t}=e;return Te({root:["checkboxInput"]},Sn,t)},pCt=$n(function(t,n){var k,M;const{field:r,id:o,rowNode:i,hasFocus:a,tabIndex:s}=t,l=Ue(t,dCt),c=sn(),u=wt(),d={classes:u.classes},f=fCt(d),p=v.useRef(null),m=v.useRef(null),g=Wt(p,n),y=I=>{const R={value:I.target.checked,id:o};c.current.publishEvent("rowSelectionCheckboxChange",R,I)};v.useLayoutEffect(()=>{if(s===0){const I=c.current.getCellElement(o,r);I&&(I.tabIndex=-1)}},[c,s,o,r]),v.useEffect(()=>{var I;if(a){const R=(I=p.current)==null?void 0:I.querySelector("input");R==null||R.focus({preventScroll:!0})}else m.current&&m.current.stop({})},[a]);const b=v.useCallback(I=>{I.key===" "&&I.stopPropagation()},[]),x=c.current.isRowSelectable(o),S=lCt(o,((k=u.rowSelectionPropagation)==null?void 0:k.parents)??!1),{isIndeterminate:P,isChecked:E}=Ye(c,S);if(i.type==="footer"||i.type==="pinnedRow")return null;const T=u.indeterminateCheckboxAction==="select"?E&&!P:E,O=c.current.getLocaleText(T?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return $.jsx(u.slots.baseCheckbox,D({tabIndex:s,checked:T,onChange:y,className:f.root,inputProps:{"aria-label":O},onKeyDown:b,indeterminate:P,disabled:!x,touchRippleRef:m},(M=u.slotProps)==null?void 0:M.baseCheckbox,l,{ref:g}))}),hCt=pCt,qk=e=>e.focus,Da=Dt(qk,e=>e.cell),mCt=Dt(qk,e=>e.columnHeader);Dt(qk,e=>e.columnHeaderFilter);const ZT=Dt(qk,e=>e.columnGroupHeader),Kk=e=>e.tabIndex,wz=Dt(Kk,e=>e.cell),_le=Dt(Kk,e=>e.columnHeader);Dt(Kk,e=>e.columnHeaderFilter);const gCt=Dt(Kk,e=>e.columnGroupHeader);function Qt(e,t,n){const r=v.useRef(!0);xn(()=>{r.current=!1,e.current.register(n,t)},[e,n,t]),r.current&&e.current.register(n,t)}function Ro(e,t){const n=v.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}const Lle=(e,t,n,r,o)=>{const i=Ro(e,"useNativeEventListener"),[a,s]=v.useState(!1),l=v.useRef(r),c=gle(t)?t():(t==null?void 0:t.current)??null,u=v.useCallback(d=>l.current&&l.current(d),[]);v.useEffect(()=>{l.current=r},[r]),v.useEffect(()=>{if(c&&n&&!a){i.debug(`Binding native ${n} event`),c.addEventListener(n,u,o),s(!0);const d=()=>{i.debug(`Clearing native ${n} event`),c.removeEventListener(n,u,o)};e.current.subscribeEvent("unmount",d)}},[c,u,n,a,i,o,e])},t1=e=>{const t=v.useRef(!0);t.current&&(t.current=!1,e())},yCt=()=>{},vCt=(e,t)=>{const n=v.useRef(!1);xn(()=>n.current||!e?yCt:(n.current=!0,t()),[n.current||e])},bCt=100,wCt=e=>e?0:100,Nle=(e,t,n)=>t>0&&e>0?Math.ceil(e/t):e===-1?n+2:0,Fle=e=>({page:0,pageSize:e?0:100}),xCt=(e,t=0)=>t===0?e:Math.max(Math.min(e,t-1),0),jle=(e,t)=>{if(t===Xs.DataGrid&&e>bCt)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` +`))},SCt=-1,Yk=e=>e.pagination,Di=Dt(Yk,e=>e.paginationModel),kg=Dt(Yk,e=>e.rowCount),L0=Dt(Yk,e=>e.meta),CCt=Dt(Di,e=>e.page),PCt=Dt(Di,e=>e.pageSize),Ble=Dt(Di,kg,(e,t)=>Nle(t,e.pageSize,e.page)),xz=rr(Di,ei,cb,qf,Rle,(e,t,n,r,o)=>{var p;const i=o.length,a=Math.min(e.pageSize*e.page,i-1),s=e.pageSize===SCt?i-1:Math.min(a+e.pageSize-1,i-1);if(a===-1||s===-1)return null;if(n<2)return{firstRowIndex:a,lastRowIndex:s};const l=o[a],c=s-a+1,u=r.findIndex(m=>m.id===l.id);let d=u,f=0;for(;d0)&&(d+=1),g===0&&(f+=1))}return{firstRowIndex:u,lastRowIndex:d-1}}),ECt=rr(qf,xz,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),zle=rr(Zg,xz,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),TCt=["field","colDef"],OCt=e=>{const{classes:t}=e;return Te({root:["checkboxInput"]},Sn,t)},ICt=$n(function(t,n){var k;const r=Ue(t,TCt),[,o]=v.useState(!1),i=sn(),a=wt(),s={classes:a.classes},l=OCt(s),c=Ye(i,_le),u=Ye(i,Ms),d=Ye(i,Zg),f=Ye(i,zle),p=v.useMemo(()=>typeof a.isRowSelectable!="function"?u:u.filter(M=>i.current.getRow(M)?a.isRowSelectable(i.current.getRowParams(M)):!1),[i,a.isRowSelectable,u]),m=v.useMemo(()=>(!a.pagination||!a.checkboxSelectionVisibleOnly?d:f).reduce((I,R)=>(I[R]=!0,I),{}),[a.pagination,a.checkboxSelectionVisibleOnly,f,d]),g=v.useMemo(()=>p.filter(M=>m[M]).length,[p,m]),y=g>0&&g0,x=M=>{const I={value:M.target.checked};i.current.publishEvent("headerSelectionCheckboxChange",I)},S=c!==null&&c.field===t.field?0:-1;v.useLayoutEffect(()=>{const M=i.current.getColumnHeaderElement(t.field);S===0&&M&&(M.tabIndex=-1)},[S,i,t.field]);const P=v.useCallback(M=>{M.key===" "&&i.current.publishEvent("headerSelectionCheckboxChange",{value:!b})},[i,b]),E=v.useCallback(()=>{o(M=>!M)},[]);v.useEffect(()=>i.current.subscribeEvent("rowSelectionChange",E),[i,E]);const T=a.indeterminateCheckboxAction==="select"?b&&!y:b,O=i.current.getLocaleText(T?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return $.jsx(a.slots.baseCheckbox,D({indeterminate:y,checked:T,onChange:x,className:l.root,inputProps:{"aria-label":O},tabIndex:S,onKeyDown:P,disabled:!bz(a)},(k=a.slotProps)==null?void 0:k.baseCheckbox,r,{ref:n}))}),du="__check__",fb=D({},kle,{type:"custom",field:du,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,display:"flex",valueGetter:(e,t,n,r)=>{const o=ku(r),i=r.current.getRowId(t);return o[i]!==void 0},renderHeader:e=>$.jsx(ICt,D({},e)),renderCell:e=>$.jsx(hCt,D({},e))}),kCt=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function eq(e,t){if(e==null)return"";const n=new Date(e);return Number.isNaN(n.getTime())?"":t==="date"?n.toISOString().substring(0,10):t==="datetime-local"?(n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n.toISOString().substring(0,19)):n.toISOString().substring(0,10)}function Hm(e){var S;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,InputProps:a,clearButton:s,tabIndex:l,disabled:c}=e,u=Ue(e,kCt),d=la(),[f,p]=v.useState(()=>eq(t.value,r)),[m,g]=v.useState(!1),y=_n(),b=wt(),x=v.useCallback(P=>{d.clear();const E=P.target.value;p(E),g(!0),d.start(b.filterDebounceMs,()=>{const T=new Date(E);n(D({},t,{value:Number.isNaN(T.getTime())?void 0:T})),g(!1)})},[n,t,b.filterDebounceMs,d]);return v.useEffect(()=>{const P=eq(t.value,r);p(P)},[t.value,r]),$.jsx(b.slots.baseTextField,D({fullWidth:!0,id:y,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:f,onChange:x,variant:"standard",type:r||"text",InputLabelProps:{shrink:!0},inputRef:i,InputProps:D({},m||s?{endAdornment:m?$.jsx(b.slots.loadIcon,{fontSize:"small",color:"action"}):s}:{},{disabled:c},a,{inputProps:D({max:r==="datetime-local"?"9999-12-31T23:59":"9999-12-31",tabIndex:l},a==null?void 0:a.inputProps)})},u,(S=b.slotProps)==null?void 0:S.baseTextField))}function Um(e,t,n,r){if(!e.value)return null;const o=new Date(e.value);n?o.setSeconds(0,0):(o.setMinutes(o.getMinutes()+o.getTimezoneOffset()),o.setHours(0,0,0,0));const i=o.getTime();return a=>{if(!a)return!1;if(r)return t(a.getTime(),i);const s=new Date(a);return n?s.setSeconds(0,0):s.setHours(0,0,0,0),t(s.getTime(),i)}}const Vle=e=>[{value:"is",getApplyFilterFn:t=>Um(t,(n,r)=>n===r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>Um(t,(n,r)=>n!==r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>Um(t,(n,r)=>n>r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>Um(t,(n,r)=>n>=r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>Um(t,(n,r)=>nUm(t,(n,r)=>n<=r,e),InputComponent:Hm,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>t=>t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>t=>t!=null,requiresFilterValue:!1}],MCt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],ACt=ie(wv)({fontSize:"inherit"}),$Ct=e=>{const{classes:t}=e;return Te({root:["editInputCell"]},Sn,t)};function RCt(e){const{id:t,value:n,field:r,colDef:o,hasFocus:i,inputProps:a,onValueChange:s}=e,l=Ue(e,MCt),c=o.type==="dateTime",u=sn(),d=v.useRef(),f=v.useMemo(()=>{let P;n==null?P=null:n instanceof Date?P=n:P=new Date((n??"").toString());let E;return P==null||Number.isNaN(P.getTime())?E="":E=new Date(P.getTime()-P.getTimezoneOffset()*60*1e3).toISOString().substr(0,c?16:10),{parsed:P,formatted:E}},[n,c]),[p,m]=v.useState(f),y={classes:wt().classes},b=$Ct(y),x=v.useCallback(P=>{if(P==="")return null;const[E,T]=P.split("T"),[O,k,M]=E.split("-"),I=new Date;if(I.setFullYear(Number(O),Number(k)-1,Number(M)),I.setHours(0,0,0,0),T){const[R,_]=T.split(":");I.setHours(Number(R),Number(_),0,0)}return I},[]),S=v.useCallback(async P=>{const E=P.target.value,T=x(E);s&&await s(P,T),m({parsed:T,formatted:E}),u.current.setEditCellValue({id:t,field:r,value:T},P)},[u,r,t,s,x]);return v.useEffect(()=>{m(P=>{var E,T;return f.parsed!==P.parsed&&((E=f.parsed)==null?void 0:E.getTime())!==((T=P.parsed)==null?void 0:T.getTime())?f:P})},[f]),xn(()=>{i&&d.current.focus()},[i]),$.jsx(ACt,D({inputRef:d,fullWidth:!0,className:b.root,type:c?"datetime-local":"date",inputProps:D({max:c?"9999-12-31T23:59":"9999-12-31"},a),value:p.formatted,onChange:S},l))}const Hle=e=>$.jsx(RCt,D({},e));function Ule({value:e,columnType:t,rowId:n,field:r}){if(!(e instanceof Date))throw new Error([`MUI X: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${r}".`].join(` +`))}const DCt=(e,t,n,r)=>{if(!e)return"";const o=r.current.getRowId(t);return Ule({value:e,columnType:"date",rowId:o,field:n.field}),e.toLocaleDateString()},_Ct=(e,t,n,r)=>{if(!e)return"";const o=r.current.getRowId(t);return Ule({value:e,columnType:"dateTime",rowId:o,field:n.field}),e.toLocaleString()},LCt=D({},Wl,{type:"date",sortComparator:mle,valueFormatter:DCt,filterOperators:Vle(),renderEditCell:Hle,pastedValueParser:e=>new Date(e)}),NCt=D({},Wl,{type:"dateTime",sortComparator:mle,valueFormatter:_Ct,filterOperators:Vle(!0),renderEditCell:Hle,pastedValueParser:e=>new Date(e)}),Md=e=>e==null?null:Number(e),FCt=e=>e==null||Number.isNaN(e)||e===""?null:t=>Md(t)===Md(e),jCt=()=>[{value:"=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>Md(t)===e.value,InputComponent:_s,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>Md(t)!==e.value,InputComponent:_s,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Md(t)>e.value,InputComponent:_s,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Md(t)>=e.value,InputComponent:_s,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Md(t)e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Md(t)<=e.value,InputComponent:_s,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>e!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>!Array.isArray(e.value)||e.value.length===0?null:t=>t!=null&&e.value.includes(Number(t)),InputComponent:vle,InputComponentProps:{type:"number"}}],BCt=D({},Wl,{type:"number",align:"right",headerAlign:"right",sortComparator:hle,valueParser:e=>e===""?null:Number(e),valueFormatter:e=>l1t(e)?e.toLocaleString():e||"",filterOperators:jCt(),getApplyQuickFilterFn:FCt});function cv(e){return(e==null?void 0:e.type)==="singleSelect"}function Th(e,t){if(e)return typeof e.valueOptions=="function"?e.valueOptions(D({field:e.field},t)):e.valueOptions}function eO(e,t,n){if(t===void 0)return;const r=t.find(o=>{const i=n(o);return String(i)===String(e)});return n(r)}const zCt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen"],VCt=["MenuProps"];function HCt(e){return!!e.key}function UCt(e){var _,N;const t=wt(),{id:n,value:r,field:o,row:i,colDef:a,hasFocus:s,error:l,onValueChange:c,initialOpen:u=t.editMode===Fc.Cell}=e,d=Ue(e,zCt),f=sn(),p=v.useRef(),m=v.useRef(),[g,y]=v.useState(u),x=(((_=t.slotProps)==null?void 0:_.baseSelect)||{}).native??!1,S=((N=t.slotProps)==null?void 0:N.baseSelect)||{},{MenuProps:P}=S,E=Ue(S,VCt);if(xn(()=>{var B;s&&((B=m.current)==null||B.focus())},[s]),!cv(a))return null;const T=Th(a,{id:n,row:i});if(!T)return null;const O=a.getOptionValue,k=a.getOptionLabel,M=async B=>{if(!cv(a)||!T)return;y(!1);const L=B.target,F=eO(L.value,T,O);c&&await c(B,F),await f.current.setEditCellValue({id:n,field:o,value:F},B)},I=(B,L)=>{if(t.editMode===Fc.Row){y(!1);return}if(L==="backdropClick"||B.key==="Escape"){const F=f.current.getCellParams(n,o);f.current.publishEvent("cellEditStop",D({},F,{reason:B.key==="Escape"?Tl.escapeKeyDown:Tl.cellFocusOut}))}},R=B=>{HCt(B)&&B.key==="Enter"||y(!0)};return!T||!a?null:$.jsx(t.slots.baseSelect,D({ref:p,inputRef:m,value:r,onChange:M,open:g,onOpen:R,MenuProps:D({onClose:I},P),error:l,native:x,fullWidth:!0},d,E,{children:T.map(B=>{var F;const L=O(B);return v.createElement(t.slots.baseSelectOption,D({},((F=t.slotProps)==null?void 0:F.baseSelectOption)||{},{native:x,key:L,value:L}),k(B))})}))}const WCt=e=>$.jsx(UCt,D({},e)),GCt=["item","applyValue","type","apiRef","focusElementRef","placeholder","tabIndex","label","variant","isFilterActive","clearButton","InputLabelProps"],qCt=({column:e,OptionComponent:t,getOptionLabel:n,getOptionValue:r,isSelectNative:o,baseSelectOptionProps:i})=>["",...Th(e)||[]].map(s=>{const l=r(s);let c=n(s);return c===""&&(c=" "),v.createElement(t,D({},i,{native:o,key:l,value:l}),c)}),KCt=ie("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function tq(e){var O,k,M,I,R;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,placeholder:a,tabIndex:s,label:l,variant:c="standard",clearButton:u}=e,d=Ue(e,GCt),f=t.value??"",p=_n(),m=_n(),g=wt(),y=((k=(O=g.slotProps)==null?void 0:O.baseSelect)==null?void 0:k.native)??!1;let b=null;if(t.field){const _=o.current.getColumn(t.field);cv(_)&&(b=_)}const x=b==null?void 0:b.getOptionValue,S=b==null?void 0:b.getOptionLabel,P=v.useMemo(()=>Th(b),[b]),E=v.useCallback(_=>{let N=_.target.value;N=eO(N,P,x),n(D({},t,{value:N}))},[P,x,n,t]);if(!cv(b))return null;const T=l??o.current.getLocaleText("filterPanelInputLabel");return $.jsxs(KCt,{children:[$.jsxs(g.slots.baseFormControl,{fullWidth:!0,children:[$.jsx(g.slots.baseInputLabel,D({},(M=g.slotProps)==null?void 0:M.baseInputLabel,{id:m,htmlFor:p,shrink:!0,variant:c,children:T})),$.jsx(g.slots.baseSelect,D({id:p,label:T,labelId:m,value:f,onChange:E,variant:c,type:r||"text",inputProps:{tabIndex:s,ref:i,placeholder:a??o.current.getLocaleText("filterPanelInputPlaceholder")},native:y,notched:c==="outlined"?!0:void 0},d,(I=g.slotProps)==null?void 0:I.baseSelect,{children:qCt({column:b,OptionComponent:g.slots.baseSelectOption,getOptionLabel:S,getOptionValue:x,isSelectNative:y,baseSelectOptionProps:(R=g.slotProps)==null?void 0:R.baseSelectOption})}))]}),u]})}const YCt=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],XCt=["key"],QCt=sJ();function JCt(e){const{item:t,applyValue:n,apiRef:r,focusElementRef:o,color:i,error:a,helperText:s,size:l,variant:c="standard"}=e,u=Ue(e,YCt),d={color:i,error:a,helperText:s,size:l,variant:c},f=_n(),p=wt();let m=null;if(t.field){const E=r.current.getColumn(t.field);cv(E)&&(m=E)}const g=m==null?void 0:m.getOptionValue,y=m==null?void 0:m.getOptionLabel,b=v.useCallback((E,T)=>g(E)===g(T),[g]),x=v.useMemo(()=>Th(m)||[],[m]),S=v.useMemo(()=>Array.isArray(t.value)?t.value.reduce((E,T)=>{const O=x.find(k=>g(k)===T);return O!=null&&E.push(O),E},[]):[],[g,t.value,x]),P=v.useCallback((E,T)=>{n(D({},t,{value:T.map(g)}))},[n,t,g]);return $.jsx(Kl,D({multiple:!0,options:x,isOptionEqualToValue:b,filterOptions:QCt,id:f,value:S,onChange:P,getOptionLabel:y,renderTags:(E,T)=>E.map((O,k)=>{const M=T({index:k}),{key:I}=M,R=Ue(M,XCt);return $.jsx(p.slots.baseChip,D({variant:"outlined",size:"small",label:y(O)},R),I)}),renderInput:E=>{var T;return $.jsx(p.slots.baseTextField,D({},E,{label:r.current.getLocaleText("filterPanelInputLabel"),placeholder:r.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:D({},E.InputLabelProps,{shrink:!0}),inputRef:o,type:"singleSelect"},d,(T=p.slotProps)==null?void 0:T.baseTextField))}},u))}const Wm=e=>e==null||!fz(e)?e:e.value,ZCt=()=>[{value:"is",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>Wm(t)===Wm(e.value),InputComponent:tq},{value:"not",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>Wm(t)!==Wm(e.value),InputComponent:tq},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const t=e.value.map(Wm);return n=>t.includes(Wm(n))},InputComponent:JCt}],ePt=e=>typeof e[0]=="object",tPt=e=>fz(e)?e.value:e,nPt=e=>fz(e)?e.label:String(e),rPt=D({},Wl,{type:"singleSelect",getOptionLabel:nPt,getOptionValue:tPt,valueFormatter(e,t,n,r){const o=r.current.getRowId(t);if(!cv(n))return"";const i=Th(n,{id:o,row:t});if(e==null)return"";if(!i)return e;if(!ePt(i))return n.getOptionLabel(e);const a=i.find(s=>n.getOptionValue(s)===e);return a?n.getOptionLabel(a):""},renderEditCell:WCt,filterOperators:ZCt(),pastedValueParser:(e,t,n)=>{const r=n,o=Th(r)||[],i=r.getOptionValue;if(o.find(s=>i(s)===e))return e}}),oPt="string",iPt=()=>({string:Wl,number:BCt,date:LCt,dateTime:NCt,boolean:kle,singleSelect:rPt,[Vk]:M1t,custom:Wl}),Sz=e=>e.headerFiltering,aPt=Dt(Sz,e=>(e==null?void 0:e.enabled)??!1),sPt=Dt(Sz,e=>e.editing),lPt=Dt(Sz,e=>e.menuOpen),Xk=e=>e.columnGrouping,Wle=rr(Xk,e=>(e==null?void 0:e.unwrappedGroupingModel)??{}),Gle=rr(Xk,e=>(e==null?void 0:e.lookup)??{}),cPt=rr(Xk,e=>(e==null?void 0:e.headerStructure)??[]),n1=Dt(Xk,e=>(e==null?void 0:e.maxDepth)??0),qle=["maxWidth","minWidth","width","flex"],fR=iPt();function uPt({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const r=new Set(n.map(a=>a.field)),o={all:{},frozenFields:[],freeze:a=>{const s=o.all[a];s&&s.frozen!==!0&&(o.all[a].frozen=!0,o.frozenFields.push(a))}};function i(){if(o.frozenFields.length===r.size)return;const a={min:{},max:{}};let s=e,l=t,c=0;o.frozenFields.forEach(u=>{s-=o.all[u].computedWidth,l-=o.all[u].flex});for(let u=0;ud.maxWidth&&(c+=d.maxWidth-p,p=d.maxWidth,a.max[d.field]=!0),o.all[d.field]={frozen:!1,computedWidth:p,flex:d.flex}}c<0?Object.keys(a.max).forEach(u=>{o.freeze(u)}):c>0?Object.keys(a.min).forEach(u=>{o.freeze(u)}):n.forEach(({field:u})=>{o.freeze(u)}),i()}return i(),o.all}const $L=(e,t)=>{const n={};let r=0,o=0;const i=[];e.orderedFields.forEach(l=>{let c=e.lookup[l],u=0,d=!1;e.columnVisibilityModel[l]!==!1&&(c.flex&&c.flex>0?(r+=c.flex,d=!0):u=$c(c.width||Wl.width,c.minWidth||Wl.minWidth,c.maxWidth||Wl.maxWidth),o+=u),c.computedWidth!==u&&(c=D({},c,{computedWidth:u})),d&&i.push(c),n[l]=c});const a=t===void 0?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),s=Math.max(a-o,0);if(r>0&&a>0){const l=uPt({initialFreeSpace:s,totalFlexUnits:r,flexColumns:i});Object.keys(l).forEach(c=>{n[c].computedWidth=l[c].computedWidth})}return D({},e,{lookup:n})},dPt=(e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:r={}}=t,o=Object.keys(r);if(o.length===0&&n.length===0)return e;const i={},a=[];for(let u=0;u!i[u])],l=D({},e.lookup);for(let u=0;u{f[p]=m===-1?1/0:m}),l[d]=f}return D({},e,{orderedFields:s,lookup:l})};function nq(e){let t=fR[oPt];return e&&fR[e]&&(t=fR[e]),t}const ng=({apiRef:e,columnsToUpsert:t,initialState:n,columnVisibilityModel:r=Vs(e),keepOnlyColumnsToUpsert:o=!1})=>{var u,d;const i=!e.current.state.columns;let a;if(i)a={orderedFields:[],lookup:{},columnVisibilityModel:r};else{const f=Ac(e.current.state);a={orderedFields:o?[]:[...f.orderedFields],lookup:D({},f.lookup),columnVisibilityModel:r}}let s={};o&&!i&&(s=Object.keys(a.lookup).reduce((f,p)=>D({},f,{[p]:!1}),{})),t.forEach(f=>{const{field:p}=f;s[p]=!0;let m=a.lookup[p];m==null?(m=D({},nq(f.type),{field:p,hasBeenResized:!1}),a.orderedFields.push(p)):o&&a.orderedFields.push(p),m&&m.type!==f.type&&(m=D({},nq(f.type),{field:p}));let g=m.hasBeenResized;qle.forEach(y=>{f[y]!==void 0&&(g=!0,f[y]===-1&&(f[y]=1/0))}),a.lookup[p]=ih(m,D({},f,{hasBeenResized:g}))}),o&&!i&&Object.keys(a.lookup).forEach(f=>{s[f]||delete a.lookup[f]});const l=e.current.unstable_applyPipeProcessors("hydrateColumns",a),c=dPt(l,n);return $L(c,((d=(u=e.current).getRootDimensions)==null?void 0:d.call(u))??void 0)};function fPt({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let i=e;for(let a=n;a{const{scrollDirection:t,classes:n}=e,r={root:["scrollArea",`scrollArea--${t}`]};return Te(r,Sn,n)},mPt=Qn("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${ae["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${ae["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})(()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${ae["scrollArea--left"]}`]:{left:0},[`&.${ae["scrollArea--right"]}`]:{right:0}}));function gPt(e){const{scrollDirection:t}=e,n=v.useRef(null),r=sn(),o=la(),i=Ye(r,ZS),a=Ye(r,uz),s=Ye(r,Ci),l=v.useRef({left:0,top:0}),c=()=>{if(t==="left")return l.current.left>0;if(t==="right"){const k=a-s.viewportInnerSize.width;return l.current.left{l.current=k,p(c)},E=Ze(k=>{let M;if(k.preventDefault(),t==="left")M=k.clientX-n.current.getBoundingClientRect().right;else if(t==="right")M=Math.max(1,k.clientX-n.current.getBoundingClientRect().left);else throw new Error("MUI X: Wrong drag direction");M=(M-rq)*pPt+rq,o.start(0,()=>{r.current.scroll({left:l.current.left+M,top:l.current.top})})}),T=Ze(()=>{d(!0)}),O=Ze(()=>{d(!1)});return gt(r,"scrollPositionChange",P),gt(r,"columnHeaderDragStart",T),gt(r,"columnHeaderDragEnd",O),!u||!f?null:$.jsx(mPt,{ref:n,className:pe(y.root),ownerState:g,onDragOver:E,style:S})}const oq=Wf(gPt);var Pz={},Kle={exports:{}},Yle={exports:{}};(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Yle);var yPt=Yle.exports;(function(e){var t=yPt.default;function n(o){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(n=function(l){return l?a:i})(o)}function r(o,i){if(!i&&o&&o.__esModule)return o;if(o===null||t(o)!="object"&&typeof o!="function")return{default:o};var a=n(i);if(a&&a.has(o))return a.get(o);var s={__proto__:null},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in o)if(c!=="default"&&{}.hasOwnProperty.call(o,c)){var u=l?Object.getOwnPropertyDescriptor(o,c):null;u&&(u.get||u.set)?Object.defineProperty(s,c,u):s[c]=o[c]}return s.default=o,a&&a.set(o,s),s}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Kle);var vPt=Kle.exports,bPt=vPt.default;Object.defineProperty(Pz,"__esModule",{value:!0});var Xle=Pz.default=void 0,wPt=bPt(v);Xle=Pz.default=parseInt(wPt.version,10);const Qle=v.createContext(void 0);function pl(){const e=v.useContext(Qle);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` +`));return e}const ey=(e,t)=>{let n,r;return t.pagination&&t.paginationMode==="client"?(r=xz(e),n=ECt(e)):(n=qf(e),n.length===0?r=null:r={firstRowIndex:0,lastRowIndex:n.length-1}),{rows:n,range:r}},tm=(e,t)=>{const n=ey(e,t);return v.useMemo(()=>({rows:n.rows,range:n.range}),[n.rows,n.range])},xPt=typeof navigator<"u"?navigator.userAgent.toLowerCase():"empty",SPt=xPt.includes("firefox"),pb=e=>e.rowsMeta,Qk=e=>e.virtualization;Dt(Qk,e=>e.enabled);const Jk=Dt(Qk,e=>e.enabledForColumns),CPt=Dt(Qk,e=>e.enabledForRows),Zk=Dt(Qk,e=>e.renderContext),PPt=rr(e=>e.virtualization.renderContext.firstColumnIndex,e=>e.virtualization.renderContext.lastColumnIndex,(e,t)=>({firstColumnIndex:e,lastColumnIndex:t})),Jle={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},EPt=(e,t)=>{const{disableVirtualization:n,autoHeight:r}=t;return D({},e,{virtualization:{enabled:!n,enabledForColumns:!n,enabledForRows:!n&&!r,renderContext:Jle}})};function TPt(e,t){const n=i=>{e.current.setState(a=>D({},a,{virtualization:D({},a.virtualization,{enabled:i,enabledForColumns:i,enabledForRows:i&&!t.autoHeight})}))};Qt(e,{unstable_setVirtualization:n,unstable_setColumnVirtualization:i=>{e.current.setState(a=>D({},a,{virtualization:D({},a.virtualization,{enabledForColumns:i})}))}},"public"),v.useEffect(()=>{n(!t.disableVirtualization)},[t.disableVirtualization,t.autoHeight])}const Ez=e=>e.rowSpanning,Zle=Dt(Ez,e=>e.hiddenCells),OPt=Dt(Ez,e=>e.spannedCells),IPt=Dt(Ez,e=>e.hiddenCellOriginMap),uv=e=>e.listViewColumn,pR=50;var no=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e}(no||{});const iq={top:0,left:0},kPt=Object.freeze(new Map),MPt=(e,t,n,r,o)=>({direction:no.NONE,buffer:tce(e,no.NONE,t,n,r,o)});let RL=!1;try{typeof window<"u"&&(RL=/jsdom|HappyDOM/.test(window.navigator.userAgent))}catch{}const APt=()=>{const e=pl(),t=wt(),{unstable_listView:n}=t,r=Ye(e,()=>n?[uv(e.current.state)]:ho(e)),o=Ye(e,CPt)&&!RL,i=Ye(e,Jk)&&!RL,a=Ye(e,Ci),s=a.viewportOuterSize,l=Ye(e,em),c=Ye(e,e1),u=n?{left:[],right:[]}:c,d=l.bottom.length>0,[f,p]=v.useState(kPt),m=nr(),g=Ye(e,Da),y=Ye(e,wz),b=Ye(e,pb),x=Ye(e,ku),S=tm(e,t),P=e.current.rootElementRef,E=e.current.mainElementRef,T=e.current.virtualScrollerRef,O=e.current.virtualScrollbarVerticalRef,k=e.current.virtualScrollbarHorizontalRef,M=a.contentSize.height,I=a.columnsTotalWidth,R=Ye(e,YSt),_=v.useCallback(le=>{if(E.current=le,!le)return;const Q=le.getBoundingClientRect();let ue=sq(Q);if(e.current.publishEvent("resize",ue),typeof ResizeObserver>"u")return;const ge=new ResizeObserver(xe=>{const me=xe[0];if(!me)return;const be=sq(me.contentRect);be.width===ue.width&&be.height===ue.height||(e.current.publishEvent("resize",be),ue=be)});if(ge.observe(le),Xle>=19)return()=>{E.current=null,ge.disconnect()}},[e,E]),N=v.useRef(iq),B=v.useRef(iq),L=v.useRef(Jle),F=Ye(e,Zk),U=la(),V=v.useRef(void 0),z=Jl(()=>MPt(m,t.rowBufferPx,t.columnBufferPx,a.rowHeight*15,pR*6)).current,W={rowIndex:v.useMemo(()=>g?S.rows.findIndex(le=>le.id===g.id):-1,[g,S.rows]),columnIndex:v.useMemo(()=>g?r.findIndex(le=>le.field===g.field):-1,[g,r])},G=v.useCallback(le=>{if(DPt(le,e.current.state.virtualization.renderContext))return;const Q=le.firstRowIndex!==L.current.firstRowIndex||le.lastRowIndex!==L.current.lastRowIndex;e.current.setState(ue=>D({},ue,{virtualization:D({},ue.virtualization,{renderContext:le})})),a.isReady&&Q&&(L.current=le,e.current.publishEvent("renderedRowsIntervalChange",le)),B.current=N.current},[e,a.isReady]),J=Ze(()=>{const le=T.current;if(!le)return;const Q={top:le.scrollTop,left:le.scrollLeft},ue=Q.left-N.current.left,ge=Q.top-N.current.top,xe=ue!==0||ge!==0;N.current=Q;const me=xe?_Pt(ue,ge):no.NONE,be=Math.abs(N.current.top-B.current.top),we=Math.abs(N.current.left-B.current.left),Oe=be>=a.rowHeight||we>=pR,ke=z.direction!==me;if(!(Oe||ke))return F;if(ke)switch(me){case no.NONE:case no.LEFT:case no.RIGHT:V.current=void 0;break;default:V.current=F;break}z.direction=me,z.buffer=tce(m,me,t.rowBufferPx,t.columnBufferPx,a.rowHeight*15,pR*6);const de=hR(e,t,o,i),Re=mR(de,N.current,z);return eI.flushSync(()=>{G(Re)}),U.start(1e3,J),Re}),K=()=>{const le=hR(e,t,o,i),Q=mR(le,N.current,z);V.current=void 0,G(Q)},ne=Ze(le=>{const{scrollTop:Q,scrollLeft:ue}=le.currentTarget;if(Q<0||!m&&ue<0||m&&ue>0)return;const ge=J();e.current.publishEvent("scrollPositionChange",{top:Q,left:ue,renderContext:ge})}),re=Ze(le=>{e.current.publishEvent("virtualScrollerWheel",{},le)}),oe=Ze(le=>{e.current.publishEvent("virtualScrollerTouchMove",{},le)}),fe=(le={})=>{var Me;if(!le.rows&&!S.range)return[];const Q=le.renderContext??F,ue=!d&&le.position===void 0||d&&le.position==="bottom",ge=le.position!==void 0;let xe;switch(le.position){case"top":xe=0;break;case"bottom":xe=l.top.length+S.rows.length;break;case void 0:xe=l.top.length;break}const me=le.rows??S.rows,be=Q.firstRowIndex,we=Math.min(Q.lastRowIndex,me.length),Oe=le.rows?H7(0,le.rows.length):H7(be,we);let ke=-1;!ge&&W.rowIndex!==-1&&(W.rowIndex=we&&(ke=W.rowIndex,Oe.push(ke)));const je=[],de=(Me=t.slotProps)==null?void 0:Me.row,Re=Gf(e);return Oe.forEach(Ae=>{var Wn,xo,So;const{id:Ne,model:Je}=me[Ae],nt=(((Wn=S==null?void 0:S.range)==null?void 0:Wn.firstRowIndex)||0)+xe+Ae;if(R){const ai=u.left.length,Sa=r.length-u.right.length;e.current.calculateColSpan({rowId:Ne,minFirstColumn:ai,maxLastColumn:Sa,columns:r}),u.left.length>0&&e.current.calculateColSpan({rowId:Ne,minFirstColumn:0,maxLastColumn:u.left.length,columns:r}),u.right.length>0&&e.current.calculateColSpan({rowId:Ne,minFirstColumn:r.length-u.right.length,maxLastColumn:r.length,columns:r})}const st=(g==null?void 0:g.id)===Ne,$t=e.current.rowHasAutoHeight(Ne)?"auto":e.current.unstable_getRowHeight(Ne);let ct;x[Ne]==null?ct=!1:ct=e.current.isRowSelectable(Ne);let _t=!1;le.position===void 0&&(_t=Ae===0);let pt=!1;const ot=Ae===me.length-1;if(ue)if(ge)pt=ot;else{const ai=S.rows.length-1;Ae===ai&&(pt=!0)}const We=Ae===ke;let ft=null;y!==null&&y.id===Ne&&(ft=e.current.getCellParams(Ne,y.field).cellMode==="view"?y.field:null);let Ot=Q;!ge&&V.current&&Ae>=V.current.firstRowIndex&&Aes.width,ee=v.useMemo(()=>({overflowX:!se||n?"hidden":void 0,overflowY:t.autoHeight?"hidden":void 0}),[se,t.autoHeight,n]),ce=v.useMemo(()=>{const le={width:se?I:"auto",flexBasis:M,flexShrink:0};return le.flexBasis===0&&(le.flexBasis=Tle),le},[I,M,se]);return v.useEffect(()=>{e.current.publishEvent("virtualScrollerContentSizeChange")},[e,ce]),xn(()=>{i&&(T.current.scrollLeft=0),o&&(T.current.scrollTop=0)},[i,o,P,T]),xn(()=>{n&&(T.current.scrollLeft=0)},[n,T]),vCt(s.width!==0,()=>{const le=hR(e,t,o,i),Q=mR(le,N.current,z);G(Q),e.current.publishEvent("scrollPositionChange",{top:N.current.top,left:N.current.left,renderContext:Q})}),e.current.register("private",{updateRenderContext:K}),gt(e,"columnsChange",K),gt(e,"filteredRowsSet",K),gt(e,"rowExpansionChange",K),{renderContext:F,setPanels:p,getRows:fe,getContainerProps:()=>({ref:_}),getScrollerProps:()=>({ref:T,onScroll:ne,onWheel:re,onTouchMove:oe,style:ee,role:"presentation",tabIndex:SPt?-1:void 0}),getContentProps:()=>({style:ce,role:"presentation"}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:O,role:"presentation"}),getScrollbarHorizontalProps:()=>({ref:k,role:"presentation"})}};function hR(e,t,n,r){const o=Ci(e.current.state),i=ey(e,t),a=t.unstable_listView?[uv(e.current.state)]:ho(e),s=IPt(e),l=e.current.state.rows.dataRowIds.at(-1),c=a.at(-1);return{enabledForRows:n,enabledForColumns:r,apiRef:e,autoHeight:t.autoHeight,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx,leftPinnedWidth:o.leftPinnedWidth,columnsTotalWidth:o.columnsTotalWidth,viewportInnerWidth:o.viewportInnerSize.width,viewportInnerHeight:o.viewportInnerSize.height,lastRowHeight:l!==void 0?e.current.unstable_getRowHeight(l):0,lastColumnWidth:(c==null?void 0:c.computedWidth)??0,rowsMeta:pb(e.current.state),columnPositions:Gf(e),rows:i.rows,range:i.range,pinnedColumns:e1(e),visibleColumns:a,hiddenCellsOriginMap:s,listView:t.unstable_listView??!1,virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight}}function mR(e,t,n){const r={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.visibleColumns.length},{top:o,left:i}=t,a=Math.abs(i)+e.leftPinnedWidth;if(e.enabledForRows){let l=Math.min(aq(e,o,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const c=e.hiddenCellsOriginMap[l];if(c){const d=Math.min(...Object.values(c));l=Math.min(l,d)}const u=e.autoHeight?l+e.rows.length:aq(e,o+e.viewportInnerHeight);r.firstRowIndex=l,r.lastRowIndex=u}if(e.enabledForColumns){let l=0,c=e.columnPositions.length,u=!1;const[d,f]=DL({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});if(!e.virtualizeColumnsWithAutoRowHeight)for(let p=d;p=e.range.lastRowIndex);const i=$c(r-(((s=e.range)==null?void 0:s.firstRowIndex)||0),0,e.rowsMeta.positions.length);return o||e.rowsMeta.positions[i]>=t?Pf(t,e.rowsMeta.positions,n):RPt(t,e.rowsMeta.positions,i,n)}function $Pt(e,t,n){const[r,o]=DL({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[i,a]=DL({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:e.pinnedColumns.left.length,maxLastIndex:e.visibleColumns.length-e.pinnedColumns.right.length,bufferBefore:n.buffer.columnBefore,bufferAfter:n.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth}),s=fPt({firstColumnToRender:i,apiRef:e.apiRef,firstRowToRender:r,lastRowToRender:o,visibleRows:e.rows});return{firstRowIndex:r,lastRowIndex:o,firstColumnIndex:s,lastColumnIndex:a}}function Pf(e,t,n=void 0,r=0,o=t.length){if(t.length<=0)return-1;if(r>=o)return r;const i=r+Math.floor((o-r)/2),a=t[i];let s;if(n!=null&&n.atStart){const l=(i===t.length-1?n.lastPosition:t[i+1])-a;s=e-l=Math.abs(e)?t>0?no.DOWN:no.UP:e>0?no.RIGHT:no.LEFT}function tce(e,t,n,r,o,i){if(e)switch(t){case no.LEFT:t=no.RIGHT;break;case no.RIGHT:t=no.LEFT;break}switch(t){case no.NONE:return{rowAfter:n,rowBefore:n,columnAfter:r,columnBefore:r};case no.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:i};case no.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:i,columnBefore:0};case no.UP:return{rowAfter:0,rowBefore:o,columnAfter:0,columnBefore:0};case no.DOWN:return{rowAfter:o,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}function sq(e){return{width:Math.round(e.width*10)/10,height:Math.round(e.height*10)/10}}const LPt=()=>{var d,f;const e=sn(),t=wt(),n=Ye(e,Hk),r=Ye(e,yz),o=Ye(e,Cle),i=n===0&&o===0,a=Ye(e,A1t),s=!a&&i,l=!a&&n>0&&r===0;let c=null,u=null;return s&&(c="noRowsOverlay"),l&&(c="noResultsOverlay"),a&&(c="loadingOverlay",u=((f=(d=t.slotProps)==null?void 0:d.loadingOverlay)==null?void 0:f[i?"noRowsVariant":"variant"])||null),{overlayType:c,loadingOverlayVariant:u}},NPt=Qn("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant",overridesResolver:(e,t)=>t.overlayWrapper})(({overlayType:e,loadingOverlayVariant:t})=>t!=="skeleton"?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,width:0,height:0,zIndex:e==="loadingOverlay"?5:4}:{}),FPt=Qn("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant",overridesResolver:(e,t)=>t.overlayWrapperInner})({}),jPt=e=>{const{classes:t}=e;return Te({root:["overlayWrapper"],inner:["overlayWrapperInner"]},Sn,t)};function BPt(e){const t=sn(),n=wt(),r=Ye(t,Ci);let o=Math.max(r.viewportOuterSize.height-r.topContainerHeight-r.bottomContainerHeight-(r.hasScrollX?r.scrollbarSize:0),0);o===0&&(o=Tle);const i=jPt(D({},e,{classes:n.classes}));return $.jsx(NPt,D({className:pe(i.root)},e,{children:$.jsx(FPt,D({className:pe(i.inner),style:{height:o,width:r.viewportOuterSize.width}},e))}))}function zPt(e){var i,a;const{overlayType:t}=e,n=wt();if(!t)return null;const r=(i=n.slots)==null?void 0:i[t],o=(a=n.slotProps)==null?void 0:a[t];return $.jsx(BPt,D({},e,{children:$.jsx(r,D({},o))}))}const FP=e=>e.columnMenu;function VPt(){var y;const e=pl(),t=wt(),n=Ye(e,ho),r=Ye(e,iCt),o=Ye(e,tCt),i=Ye(e,_le),a=Ye(e,wz),s=Ye(e,gCt),l=Ye(e,mCt),c=Ye(e,ZT),u=Ye(e,n1),d=Ye(e,FP),f=Ye(e,Vs),p=Ye(e,cPt),m=!(s===null&&i===null&&a===null),g=e.current.columnHeadersContainerRef;return $.jsx(t.slots.columnHeaders,D({ref:g,visibleColumns:n,filterColumnLookup:r,sortColumnLookup:o,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:m},(y=t.slotProps)==null?void 0:y.columnHeaders))}const HPt=Wf(VPt),nce=v.createContext(void 0),rce=()=>{const e=v.useContext(nce);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` +`));return e},UPt=Qn("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),WPt=Qn("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),GPt=$n((e,t)=>{var i;const n=wt(),o=rce().hooks.useGridAriaAttributes();return $.jsxs(WPt,D({ownerState:n,className:e.className,tabIndex:-1},o,(i=n.slotProps)==null?void 0:i.main,{ref:t,children:[$.jsx(UPt,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))}),qPt=()=>Te({root:["topContainer"]},Sn,{}),KPt=Qn("div")({position:"sticky",zIndex:4,top:0});function YPt(e){const t=qPt();return $.jsx(KPt,D({},e,{className:pe(t.root,ae["container--top"]),role:"presentation"}))}const XPt=()=>Te({root:["bottomContainer"]},Sn,{}),QPt=Qn("div")({position:"sticky",zIndex:4,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});function JPt(e){const t=XPt();return $.jsx(QPt,D({},e,{className:pe(t.root,ae["container--bottom"]),role:"presentation"}))}const ZPt=(e,t)=>{const{classes:n}=e;return Te({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},Sn,n)},eEt=Qn("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),tEt=$n(function(t,n){var a;const r=wt(),o=!r.autoHeight&&((a=t.style)==null?void 0:a.minHeight)==="auto",i=ZPt(r,o);return $.jsx(eEt,D({},t,{ownerState:r,className:pe(i.root,t.className),ref:n}))}),nEt=Qn("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),oce=Qn("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:"var(--DataGrid-pinnedBackground)"}),rEt=Qn(oce)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),oEt=Qn(oce)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),iEt=Qn("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});function aEt({rowsLength:e}){const t=sn(),{viewportOuterSize:n,minimumSize:r,hasScrollX:o,hasScrollY:i,scrollbarSize:a,leftPinnedWidth:s,rightPinnedWidth:l}=Ye(t,Ci),c=o?a:0,u=n.height-r.height>0;return c===0&&!u?null:$.jsxs(nEt,{className:ae.filler,role:"presentation",style:{height:c,"--rowBorderColor":e===0?"transparent":"var(--DataGrid-rowBorderColor)"},children:[s>0&&$.jsx(rEt,{className:ae["filler--pinnedLeft"],style:{width:s}}),$.jsx(iEt,{}),l>0&&$.jsx(oEt,{className:ae["filler--pinnedRight"],style:{width:l+(i?a:0)}})]})}const sEt=Wf(aEt),lEt=["className"],cEt=e=>{const{classes:t}=e;return Te({root:["virtualScrollerRenderZone"]},Sn,t)},uEt=Qn("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),dEt=$n(function(t,n){const{className:r}=t,o=Ue(t,lEt),i=sn(),a=wt(),s=cEt(a),l=Ye(i,()=>{const c=Zk(i);return pb(i.current.state).positions[c.firstRowIndex]??0});return $.jsx(uEt,D({className:pe(s.root,r),ownerState:a,style:{transform:`translate3d(0, ${l}px, 0)`}},o,{ref:n}))}),fEt={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1,disableColumnVirtualization:!0},jo=e=>e.editRows,Bx=e=>e.preferencePanel;var Oh=function(e){return e.filters="filters",e.columns="columns",e}(Oh||{});const pEt=(e,t)=>{const{classes:n}=e,r={root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]};return Te(r,Sn,n)},ice=Qn("div")({position:"absolute",display:"inline-block",zIndex:6,"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),hEt=Qn(ice)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),mEt=Qn(ice)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),lq=$n(function(t,n){const r=pl(),o=wt(),i=v.useRef(!1),a=v.useRef(0),s=v.useRef(null),l=v.useRef(null),c=pEt(o,t.position),u=Ye(r,Ci),d=t.position==="vertical"?"height":"width",f=t.position==="vertical"?"scrollTop":"scrollLeft",p=t.position==="vertical"?u.hasScrollX:u.hasScrollY,m=u.minimumSize[d]+(p?u.scrollbarSize:0),y=(t.position==="vertical"?u.viewportInnerSize.height:u.viewportOuterSize.width)*(m/u.viewportOuterSize[d]),b=Ze(()=>{const P=r.current.virtualScrollerRef.current,E=s.current;if(!E||P[f]===a.current)return;if(a.current=P[f],i.current){i.current=!1;return}i.current=!0;const T=P[f]/m;E[f]=T*y}),x=Ze(()=>{const P=r.current.virtualScrollerRef.current,E=s.current;if(!E)return;if(i.current){i.current=!1;return}i.current=!0;const T=E[f]/y;P[f]=T*m});DO(()=>{const P=r.current.virtualScrollerRef.current,E=s.current;return P.addEventListener("scroll",b,{capture:!0}),E.addEventListener("scroll",x,{capture:!0}),()=>{P.removeEventListener("scroll",b,{capture:!0}),E.removeEventListener("scroll",x,{capture:!0})}}),v.useEffect(()=>{l.current.style.setProperty(d,`${y}px`)},[y,d]);const S=t.position==="vertical"?hEt:mEt;return $.jsx(S,{ref:Wt(n,s),className:c.root,style:t.position==="vertical"&&o.unstable_listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",children:$.jsx("div",{ref:l,className:c.content})})}),gEt=(e,t,n)=>{const{classes:r}=e,o={root:["main",t.rightPinnedWidth>0&&"main--hasPinnedRight",n==="skeleton"&&"main--hasSkeletonLoadingOverlay"],scroller:["virtualScroller",t.hasScrollX&&"virtualScroller--hasScrollX"]};return Te(o,Sn,r)},yEt=Qn("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0});function vEt(e){const t=sn(),n=wt(),r=Ye(t,Ci),o=LPt(),i=gEt(n,r,o.loadingOverlayVariant),a=APt(),{getContainerProps:s,getScrollerProps:l,getContentProps:c,getRenderZoneProps:u,getScrollbarVerticalProps:d,getScrollbarHorizontalProps:f,getRows:p}=a,m=p();return $.jsxs(GPt,D({className:i.root},s(),{children:[$.jsx(oq,{scrollDirection:"left"}),$.jsx(oq,{scrollDirection:"right"}),$.jsxs(yEt,D({className:i.scroller},l(),{ownerState:n,children:[$.jsxs(YPt,{children:[!n.unstable_listView&&$.jsx(HPt,{}),$.jsx(n.slots.pinnedRows,{position:"top",virtualScroller:a})]}),$.jsx(zPt,D({},o)),$.jsx(tEt,D({},c(),{children:$.jsxs(dEt,D({},u(),{children:[m,$.jsx(n.slots.detailPanels,{virtualScroller:a})]}))})),$.jsx(sEt,{rowsLength:m.length}),$.jsx(JPt,{children:$.jsx(n.slots.pinnedRows,{position:"bottom",virtualScroller:a})})]})),r.hasScrollY&&$.jsx(lq,D({position:"vertical"},d())),r.hasScrollX&&!n.unstable_listView&&$.jsx(lq,D({position:"horizontal"},f())),e.children]}))}function bEt(){var t;const e=wt();return e.hideFooter?null:$.jsx(e.slots.footer,D({},(t=e.slotProps)==null?void 0:t.footer))}let gR;function wEt(){return gR===void 0&&document.createElement("div").focus({get preventScroll(){return gR=!0,!1}}),gR}const eM=(e,t,n,r,o)=>{const i=t===n-1;return e===ur.LEFT&&i?!0:r?e===ur.LEFT?!0:e===ur.RIGHT?!i:!i||o:!1},tM=(e,t)=>e===ur.RIGHT&&t===0,xEt=["column","rowId","editCellState","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","sectionIndex","sectionLength","gridHasFiller","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],SEt=["changeReason","unstable_updateValueOnRender"];let aa=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e}({});const ace={[aa.LEFT]:ur.LEFT,[aa.RIGHT]:ur.RIGHT,[aa.NONE]:void 0,[aa.VIRTUAL]:void 0},cq={id:-1,field:"__unset__",row:{},rowNode:{id:-1,depth:0,type:"leaf",parent:-1,groupingKey:null},colDef:{type:"string",field:"__unset__",computedWidth:0},cellMode:Zn.View,hasFocus:!1,tabIndex:-1,value:null,formattedValue:"__unset__",isEditable:!1,api:{}},CEt=e=>{const{align:t,showLeftBorder:n,showRightBorder:r,pinnedPosition:o,isEditable:i,isSelected:a,isSelectionMode:s,classes:l}=e,c={root:["cell",`cell--text${Se(t)}`,a&&"selected",i&&"cell--editable",n&&"cell--withLeftBorder",r&&"cell--withRightBorder",o===aa.LEFT&&"cell--pinnedLeft",o===aa.RIGHT&&"cell--pinnedRight",s&&!i&&"cell--selectionMode"]};return Te(c,Sn,l)},PEt=$n(function(t,n){var ct,_t,pt;const{column:r,rowId:o,editCellState:i,align:a,colIndex:s,width:l,className:c,style:u,colSpan:d,disableDragEvents:f,isNotVisible:p,pinnedOffset:m,pinnedPosition:g,sectionIndex:y,sectionLength:b,gridHasFiller:x,onClick:S,onDoubleClick:P,onMouseDown:E,onMouseUp:T,onMouseOver:O,onKeyDown:k,onKeyUp:M,onDragEnter:I,onDragOver:R}=t,_=Ue(t,xEt),N=sn(),B=wt(),L=nr(),F=r.field,U=Ye(N,()=>{if(!N.current.getRow(o))return cq;const Pe=N.current.getCellParams(o,F);return Pe.api=N.current,Pe},lle),V=Ye(N,()=>N.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:o,field:F})),z=Ye(N,Zle),W=Ye(N,OPt),{cellMode:G,hasFocus:J,isEditable:K=!1,value:ne}=U,re=r.type==="actions"&&((ct=r.getActions)==null?void 0:ct.call(r,N.current.getRowParams(o)).some(ot=>!ot.props.disabled)),oe=(G==="view"||!K)&&!re?U.tabIndex:-1,{classes:fe,getCellClassName:se}=B,ce=[Ye(N,()=>N.current.unstable_applyPipeProcessors("cellClassName",[],{id:o,field:F}).filter(Boolean).join(" "))];r.cellClassName&&ce.push(typeof r.cellClassName=="function"?r.cellClassName(U):r.cellClassName),r.display==="flex"&&ce.push(ae["cell--flex"]),se&&ce.push(se(U));const le=U.formattedValue??ne,Q=v.useRef(null),ue=Wt(n,Q),ge=v.useRef(null),xe=B.cellSelection??!1,me=ace[g],be=tM(me,y),we=eM(me,y,b,B.showCellVerticalBorder,x),Oe={align:a,showLeftBorder:be,showRightBorder:we,isEditable:K,classes:B.classes,pinnedPosition:g,isSelected:V,isSelectionMode:xe},ke=CEt(Oe),je=v.useCallback(ot=>Pe=>{const We=N.current.getCellParams(o,F||"");N.current.publishEvent(ot,We,Pe),T&&T(Pe)},[N,F,T,o]),de=v.useCallback(ot=>Pe=>{const We=N.current.getCellParams(o,F||"");N.current.publishEvent(ot,We,Pe),E&&E(Pe)},[N,F,E,o]),Re=v.useCallback((ot,Pe)=>We=>{if(!N.current.getRow(o))return;const ft=N.current.getCellParams(o,F||"");N.current.publishEvent(ot,ft,We),Pe&&Pe(We)},[N,F,o]),Me=((_t=z[o])==null?void 0:_t[F])??!1,Ae=((pt=W[o])==null?void 0:pt[F])??1,Ne=v.useMemo(()=>{if(p)return{padding:0,opacity:0,width:0,height:0,border:0};const ot=D({"--width":`${l}px`},u),Pe=g===aa.LEFT,We=g===aa.RIGHT;if(Pe||We){let ft=Pe?"left":"right";L&&(ft=Pe?"right":"left"),ot[ft]=m}return Ae>1&&(ot.height=`calc(var(--height) * ${Ae})`,ot.zIndex=5,(Pe||We)&&(ot.zIndex=6)),ot},[l,p,u,m,g,L,Ae]);if(v.useEffect(()=>{if(!J||G===Zn.Edit)return;const ot=mr(N.current.rootElementRef.current);if(Q.current&&!Q.current.contains(ot.activeElement)){const Pe=Q.current.querySelector('[tabindex="0"]'),We=ge.current||Pe||Q.current;if(wEt())We.focus({preventScroll:!0});else{const ft=N.current.getScrollPosition();We.focus(),N.current.scroll(ft)}}},[J,G,N]),Me)return $.jsx("div",{"data-colindex":s,role:"presentation",style:D({width:"var(--width)"},Ne)});if(U===cq)return null;let Je=_.onFocus,nt,st;if(i===null&&r.renderCell&&(nt=r.renderCell(U)),i!==null&&r.renderEditCell){const ot=N.current.getRowWithUpdatedValues(o,r.field),Pe=Ue(i,SEt),We=r.valueFormatter?r.valueFormatter(i.value,ot,r,N):U.formattedValue,ft=D({},U,{row:ot,formattedValue:We},Pe);nt=r.renderEditCell(ft),ce.push(ae["cell--editing"]),ce.push(fe==null?void 0:fe["cell--editing"])}if(nt===void 0){const ot=le==null?void 0:le.toString();nt=ot,st=ot}v.isValidElement(nt)&&re&&(nt=v.cloneElement(nt,{focusElementRef:ge}));const $t=f?null:{onDragEnter:Re("cellDragEnter",I),onDragOver:Re("cellDragOver",R)};return $.jsx("div",D({className:pe(ke.root,ce,c),role:"gridcell","data-field":F,"data-colindex":s,"aria-colindex":s+1,"aria-colspan":d,"aria-rowspan":Ae,style:Ne,title:st,tabIndex:oe,onClick:Re("cellClick",S),onDoubleClick:Re("cellDoubleClick",P),onMouseOver:Re("cellMouseOver",O),onMouseDown:de("cellMouseDown"),onMouseUp:je("cellMouseUp"),onKeyDown:Re("cellKeyDown",k),onKeyUp:Re("cellKeyUp",M)},$t,_,{onFocus:Je,ref:ue,children:nt}))}),EEt=Wf(PEt),TEt=["label","icon","showInMenu","onClick"],OEt=["label","icon","showInMenu","onClick","closeMenuOnClick","closeMenu"],eP=$n((e,t)=>{var u;const n=wt();if(!e.showInMenu){const{label:d,icon:f,onClick:p}=e,m=Ue(e,TEt),g=y=>{p==null||p(y)};return $.jsx(n.slots.baseIconButton,D({size:"small",role:"menuitem","aria-label":d},m,{onClick:g},(u=n.slotProps)==null?void 0:u.baseIconButton,{ref:t,children:v.cloneElement(f,{fontSize:"small"})}))}const{label:r,icon:o,onClick:i,closeMenuOnClick:a=!0,closeMenu:s}=e,l=Ue(e,OEt),c=d=>{i==null||i(d),a&&(s==null||s())};return $.jsxs(tn,D({ref:t},l,{onClick:c,children:[o&&$.jsx(zi,{children:o}),r]}))}),IEt=["field","type","align","width","height","empty","style","className"],uq="1.3em",kEt="1.2em",dq=[40,80],MEt={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},AEt=e=>{const{align:t,classes:n,empty:r}=e,o={root:["cell","cellSkeleton",`cell--text${t?Se(t):"Left"}`,r&&"cellEmpty"]};return Te(o,Sn,n)},$Et=d1t(12345);function REt(e){const{field:t,type:n,align:r,width:o,height:i,empty:a=!1,style:s,className:l}=e,c=Ue(e,IEt),d={classes:wt().classes,align:r,empty:a},f=AEt(d),p=v.useMemo(()=>{if(n==="boolean"||n==="actions")return{variant:"circular",width:uq,height:uq};const[g,y]=n?MEt[n]??dq:dq;return{variant:"text",width:`${Math.round($Et(g,y))}%`,height:kEt}},[n]);return $.jsx("div",D({"data-field":t,className:pe(f.root,l),style:D({height:i,maxWidth:o,minWidth:o},s)},c,{children:!a&&$.jsx(CP,D({},p))}))}const DEt=Wf(REt);function _Et(e){return e.vars?e.vars.palette.TableCell.border:e.palette.mode==="light"?Du(vt(e.palette.divider,1),.88):Ru(vt(e.palette.divider,1),.68)}const fq={[`& .${ae.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${ae.menuIcon}`]:{width:"auto",visibility:"visible"}},LEt=10,tP=-5,Gm=1,pq={width:3,rx:1.5,x:10.5},NEt="/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */",FEt=ie("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${ae.autoHeight}`]:t.autoHeight},{[`&.${ae.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${ae["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${ae["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${ae["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${ae.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`&.${ae["root--disableUserSelection"]} .${ae.cell}`]:t["root--disableUserSelection"]},{[`&.${ae.autosizing}`]:t.autosizing},{[`& .${ae.editBooleanCell}`]:t.editBooleanCell},{[`& .${ae.cell}`]:t.cell},{[`& .${ae["cell--editing"]}`]:t["cell--editing"]},{[`& .${ae["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${ae["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${ae["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${ae["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${ae["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${ae["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${ae["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${ae["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${ae.cellCheckbox}`]:t.cellCheckbox},{[`& .${ae.cellSkeleton}`]:t.cellSkeleton},{[`& .${ae.checkboxInput}`]:t.checkboxInput},{[`& .${ae["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${ae["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${ae["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${ae["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${ae["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${ae["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${ae["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${ae["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${ae["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${ae.columnHeader}`]:t.columnHeader},{[`& .${ae.headerFilterRow}`]:t.headerFilterRow},{[`& .${ae.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${ae.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${ae.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${ae["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${ae["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${ae.columnSeparator}`]:t.columnSeparator},{[`& .${ae.filterIcon}`]:t.filterIcon},{[`& .${ae.iconSeparator}`]:t.iconSeparator},{[`& .${ae.menuIcon}`]:t.menuIcon},{[`& .${ae.menuIconButton}`]:t.menuIconButton},{[`& .${ae.menuOpen}`]:t.menuOpen},{[`& .${ae.menuList}`]:t.menuList},{[`& .${ae["row--editable"]}`]:t["row--editable"]},{[`& .${ae["row--editing"]}`]:t["row--editing"]},{[`& .${ae["row--dragging"]}`]:t["row--dragging"]},{[`& .${ae.row}`]:t.row},{[`& .${ae.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${ae.rowReorderCell}`]:t.rowReorderCell},{[`& .${ae["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${ae.sortIcon}`]:t.sortIcon},{[`& .${ae.withBorderColor}`]:t.withBorderColor},{[`& .${ae.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${ae.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${ae.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${ae.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${ae.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${ae["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})(({theme:e})=>{var k,M;const t=pl(),n=Ye(t,Ci),r=_Et(e),o=e.shape.borderRadius,i=e.vars?e.vars.palette.background.default:((k=e.mixins.MuiDataGrid)==null?void 0:k.containerBackground)??e.palette.background.default,a=((M=e.mixins.MuiDataGrid)==null?void 0:M.pinnedBackground)??i,s=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:vt(e.palette.background.default,e.palette.action.disabledOpacity),l=(e.vars||e).palette.action.hoverOpacity,c=(e.vars||e).palette.action.hover,u=(e.vars||e).palette.action.selectedOpacity,d=e.vars?`calc(${l} + ${u})`:l+u,f=e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${u})`:vt(e.palette.primary.main,u),p=e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${d})`:vt(e.palette.primary.main,d),m=e.vars?zEt:jEt,g=I=>({[`& .${ae["cell--pinnedLeft"]}, & .${ae["cell--pinnedRight"]}`]:{backgroundColor:I,"&.Mui-selected":{backgroundColor:m(I,f,u),"&:hover":{backgroundColor:m(I,f,d)}}}}),y=m(a,c,l),b=g(y),x=m(a,f,u),S=g(x),P=m(a,p,d),E=g(P),T={backgroundColor:f,"&:hover":{backgroundColor:p,"@media (hover: none)":{backgroundColor:f}}};return D({"--unstable_DataGrid-radius":typeof o=="number"?`${o}px`:o,"--unstable_DataGrid-headWeight":e.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":s,"--DataGrid-containerBackground":i,"--DataGrid-pinnedBackground":a,"--DataGrid-rowBorderColor":r,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:r,borderRadius:"var(--unstable_DataGrid-radius)",color:(e.vars||e).palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",[`.${ae.main} > *:first-child${NEt}`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${ae.autoHeight}`]:{height:"auto"},[`&.${ae.autosizing}`]:{[`& .${ae.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${ae.iconButtonContainer}`]:{width:"0 !important",visibility:"hidden !important"},[`& .${ae.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${ae.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${ae.groupingCriteriaCell}`]:{width:"unset"},[`& .${ae.treeDataGroupingCell}`]:{width:"unset"}},[`& .${ae.columnHeader}, & .${ae.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${ae.columnHeader}:focus-within, & .${ae.cell}:focus-within`]:{outline:`solid ${e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.5)`:vt(e.palette.primary.main,.5)} ${Gm}px`,outlineOffset:Gm*-1},[`& .${ae.columnHeader}:focus, & .${ae.cell}:focus`]:{outline:`solid ${e.palette.primary.main} ${Gm}px`,outlineOffset:Gm*-1},[`& .${ae.columnHeader}:focus, & .${ae["columnHeader--withLeftBorder"]}, & .${ae["columnHeader--withRightBorder"]}, & .${ae["columnHeader--siblingFocused"]}, & .${ae["virtualScroller--hasScrollX"]} .${ae["columnHeader--lastUnpinned"]}, & .${ae["virtualScroller--hasScrollX"]} .${ae["columnHeader--last"]} - `]:{[`& .${ae.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${ae["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${ae["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${ae["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${ae["root--noToolbar"]} [aria-rowindex="1"] .${ae["columnHeader--last"]}`]:{borderTopRightRadius:n.hasScrollX&&(!n.hasScrollY||n.scrollbarSize===0)?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${ae.columnHeaderCheckbox}, & .${ae.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${ae.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${ae["virtualScroller--hasScrollX"]} .${ae["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${ae["columnHeader--sorted"]} .${ae.iconButtonContainer}, & .${ae["columnHeader--filtered"]} .${ae.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${ae.columnHeader}:not(.${ae["columnHeader--sorted"]}) .${ae.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${ae.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:e.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${ae.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${ae["columnHeader--filledGroup"]} .${ae.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${ae.sortIcon}, & .${ae.filterIcon}`]:{fontSize:"inherit"},[`& .${ae["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${ae["columnHeader--alignCenter"]} .${ae.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${ae["columnHeader--alignRight"]} .${ae.columnHeaderDraggableContainer}, & .${ae["columnHeader--alignRight"]} .${ae.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${ae["columnHeader--alignCenter"]} .${ae.menuIcon}`]:{marginLeft:"auto"},[`& .${ae["columnHeader--alignRight"]} .${ae.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${ae["columnHeader--moving"]}`]:{backgroundColor:(e.vars||e).palette.action.hover},[`& .${ae["columnHeader--pinnedLeft"]}, & .${ae["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:4,background:"var(--DataGrid-pinnedBackground)"},[`& .${ae.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:3,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:FTt,color:r},[`& .${ae.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)"},"@media (hover: hover)":{[`& .${ae.columnHeader}:hover`]:uq,[`& .${ae.columnHeader}:not(.${ae["columnHeader--sorted"]}):hover .${ae.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${ae.columnHeader}`]:uq,[`& .${ae.columnHeader}:focus, - & .${ae["columnHeader--siblingFocused"]}`]:{[`.${ae["columnSeparator--resizable"]}`]:{color:(e.vars||e).palette.primary.main}}},[`& .${ae["columnSeparator--sideLeft"]}`]:{left:nP},[`& .${ae["columnSeparator--sideRight"]}`]:{right:nP},[`& .${ae["columnHeader--withRightBorder"]} .${ae["columnSeparator--sideLeft"]}`]:{left:nP-.5},[`& .${ae["columnHeader--withRightBorder"]} .${ae["columnSeparator--sideRight"]}`]:{right:nP-.5},[`& .${ae["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${ae["columnSeparator--resizing"]}`]:{color:(e.vars||e).palette.primary.main},"@media (hover: none)":{[`& .${ae.iconSeparator} rect`]:dq},"@media (hover: hover)":{"&:hover":{color:(e.vars||e).palette.primary.main,[`& .${ae.iconSeparator} rect`]:dq}},"& svg":{pointerEvents:"none"}},[`& .${ae.iconSeparator}`]:{color:"inherit",transition:e.transitions.create(["color","width"],{duration:e.transitions.duration.shortest})},[`& .${ae.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${ae.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${ae.headerFilterRow}`]:{[`& .${ae.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${ae["row--borderBottom"]} .${ae.columnHeader}, + `]:{[`& .${ae.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${ae["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${ae["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${ae["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${ae["root--noToolbar"]} [aria-rowindex="1"] .${ae["columnHeader--last"]}`]:{borderTopRightRadius:n.hasScrollX&&(!n.hasScrollY||n.scrollbarSize===0)?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${ae.columnHeaderCheckbox}, & .${ae.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${ae.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${ae["virtualScroller--hasScrollX"]} .${ae["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${ae["columnHeader--sorted"]} .${ae.iconButtonContainer}, & .${ae["columnHeader--filtered"]} .${ae.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${ae.columnHeader}:not(.${ae["columnHeader--sorted"]}) .${ae.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${ae.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:e.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${ae.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${ae["columnHeader--filledGroup"]} .${ae.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${ae.sortIcon}, & .${ae.filterIcon}`]:{fontSize:"inherit"},[`& .${ae["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${ae["columnHeader--alignCenter"]} .${ae.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${ae["columnHeader--alignRight"]} .${ae.columnHeaderDraggableContainer}, & .${ae["columnHeader--alignRight"]} .${ae.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${ae["columnHeader--alignCenter"]} .${ae.menuIcon}`]:{marginLeft:"auto"},[`& .${ae["columnHeader--alignRight"]} .${ae.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${ae["columnHeader--moving"]}`]:{backgroundColor:(e.vars||e).palette.action.hover},[`& .${ae["columnHeader--pinnedLeft"]}, & .${ae["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:4,background:"var(--DataGrid-pinnedBackground)"},[`& .${ae.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:3,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:LEt,color:r},[`& .${ae.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)"},"@media (hover: hover)":{[`& .${ae.columnHeader}:hover`]:fq,[`& .${ae.columnHeader}:not(.${ae["columnHeader--sorted"]}):hover .${ae.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${ae.columnHeader}`]:fq,[`& .${ae.columnHeader}:focus, + & .${ae["columnHeader--siblingFocused"]}`]:{[`.${ae["columnSeparator--resizable"]}`]:{color:(e.vars||e).palette.primary.main}}},[`& .${ae["columnSeparator--sideLeft"]}`]:{left:tP},[`& .${ae["columnSeparator--sideRight"]}`]:{right:tP},[`& .${ae["columnHeader--withRightBorder"]} .${ae["columnSeparator--sideLeft"]}`]:{left:tP-.5},[`& .${ae["columnHeader--withRightBorder"]} .${ae["columnSeparator--sideRight"]}`]:{right:tP-.5},[`& .${ae["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${ae["columnSeparator--resizing"]}`]:{color:(e.vars||e).palette.primary.main},"@media (hover: none)":{[`& .${ae.iconSeparator} rect`]:pq},"@media (hover: hover)":{"&:hover":{color:(e.vars||e).palette.primary.main,[`& .${ae.iconSeparator} rect`]:pq}},"& svg":{pointerEvents:"none"}},[`& .${ae.iconSeparator}`]:{color:"inherit",transition:e.transitions.create(["color","width"],{duration:e.transitions.duration.shortest})},[`& .${ae.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${ae.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${ae.headerFilterRow}`]:{[`& .${ae.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${ae["row--borderBottom"]} .${ae.columnHeader}, & .${ae["row--borderBottom"]} .${ae.filler}, - & .${ae["row--borderBottom"]} .${ae.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${ae["row--borderBottom"]} .${ae.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${ae.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${ae["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ae.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":E},[`& .${ae["container--top"]}, & .${ae["container--bottom"]}`]:{"[role=row]":{background:"var(--DataGrid-containerBackground)"}},[`& .${ae.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":E},[`& .${ae["virtualScrollerContent--overflowed"]} .${ae["row--lastVisible"]} .${ae.cell}`]:{borderTopColor:"transparent"},[`& .${ae["pinnedRows--top"]} :first-of-type`]:{[`& .${ae.cell}, .${ae.scrollbarFiller}`]:{borderTop:"none"}},[`&.${ae["root--disableUserSelection"]} .${ae.cell}`]:{userSelect:"none"},[`& .${ae["row--dynamicHeight"]} > .${ae.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${ae.cellEmpty}`]:{padding:0,height:"unset"},[`& .${ae.cell}.${ae["cell--selectionMode"]}`]:{cursor:"default"},[`& .${ae.cell}.${ae["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.paper,"&:focus-within":{outline:`${Gm}px solid ${(e.vars||e).palette.primary.main}`,outlineOffset:Gm*-1}},[`& .${ae["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${ae["row--editing"]} .${ae.cell}`]:{boxShadow:e.shadows[0],backgroundColor:(e.vars||e).palette.background.paper},[`& .${ae.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${ae.booleanCell}[data-value="true"]`]:{color:(e.vars||e).palette.text.secondary},[`& .${ae.booleanCell}[data-value="false"]`]:{color:(e.vars||e).palette.text.disabled},[`& .${ae.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${ae.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${ae["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${ae.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${ae.withBorderColor}`]:{borderColor:r},[`& .${ae["cell--withLeftBorder"]}, & .${ae["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${ae["cell--withRightBorder"]}, & .${ae["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${ae["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${ae["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${ae["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${ae["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${ae["cell--pinnedLeft"]}, & .${ae["cell--pinnedRight"]}`]:{position:"sticky",zIndex:3,background:"var(--DataGrid-pinnedBackground)","&.Mui-selected":{backgroundColor:x}},[`& .${ae.virtualScrollerContent} .${ae.row}`]:{"&:hover":w,"&.Mui-selected":S,"&.Mui-selected:hover":T},[`& .${ae.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${ae.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${ae.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${ae.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${ae["columnHeader--dragging"]}, & .${ae["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${ae["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity,[`& .${ae.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${ae.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${ae.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${ae.treeDataGroupingCellLoadingContainer}, .${ae.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${ae.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${ae.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`.${ae.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${ae["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${ae["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${ae["scrollbarFiller--pinnedRight"]}`]:{backgroundColor:"var(--DataGrid-pinnedBackground)",position:"sticky",right:0}},[`& .${ae.filler}`]:{flex:"1 0 auto"},[`& .${ae["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${ae["main--hasSkeletonLoadingOverlay"]}`]:{[`& .${ae.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${ae["scrollbar--vertical"]}, & .${ae.pinnedRows}, & .${ae.virtualScroller} > .${ae.filler}`]:{display:"none"}}})});function zTt(e,t,n,r=1){const o=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),i=Rc(e),a=Rc(t),s=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return tS({type:"rgb",values:s})}const VTt=e=>`rgb(from ${e} r g b / 1)`;function HTt(e,t,n){return`color-mix(in srgb,${e}, ${VTt(t)} calc(${n} * 100%))`}const UTt=["className"],WTt=(e,t)=>{const{autoHeight:n,classes:r,showCellVerticalBorder:o}=e,i={root:["root",n&&"autoHeight",`root--density${Se(t)}`,e.slots.toolbar===null&&"root--noToolbar","withBorderColor",o&&"withVerticalBorder"]};return Te(i,xn,r)},GTt=y.forwardRef(function(t,n){const r=xt(),{className:o}=t,i=Ue(t,UTt),a=hl(),s=Qe(a,Ig),l=a.current.rootElementRef,c=Wt(l,n),u=r,d=WTt(u,s),[f,p]=y.useState(!1);return wn(()=>{p(!0)},[]),f?$.jsx(BTt,N({ref:c,className:fe(d.root,o),ownerState:u},i)):null}),qTt=["className"],KTt=e=>{const{classes:t}=e;return Te({root:["footerContainer","withBorderColor"]},xn,t)},YTt=Yn("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),XTt=y.forwardRef(function(t,n){const{className:r}=t,o=Ue(t,qTt),i=xt(),a=KTt(i);return $.jsx(YTt,N({ref:n,className:fe(a.root,r),ownerState:i},o))}),QTt=["className"],JTt=e=>{const{classes:t}=e;return Te({root:["overlay"]},xn,t)},ZTt=Yn("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),Ez=y.forwardRef(function(t,n){const{className:r}=t,o=Ue(t,QTt),i=xt(),a=JTt(i);return $.jsx(ZTt,N({ref:n,className:fe(a.root,r),ownerState:i},o))}),eEt=e=>{const{classes:t,open:n}=e;return Te({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},xn,t)},tEt=y.memo(e=>{var d,f;const{colDef:t,open:n,columnMenuId:r,columnMenuButtonId:o,iconButtonRef:i}=e,a=gn(),s=xt(),l=N({},e,{classes:s.classes}),c=eEt(l),u=y.useCallback(p=>{p.preventDefault(),p.stopPropagation(),a.current.toggleColumnMenu(t.field)},[a,t.field]);return $.jsx("div",{className:c.root,children:$.jsx(s.slots.baseTooltip,N({title:a.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},(d=s.slotProps)==null?void 0:d.baseTooltip,{children:$.jsx(s.slots.baseIconButton,N({ref:i,tabIndex:-1,className:c.button,"aria-label":a.current.getLocaleText("columnMenuLabel"),size:"small",onClick:u,"aria-haspopup":"menu","aria-expanded":n,"aria-controls":n?r:void 0,id:o},(f=s.slotProps)==null?void 0:f.baseIconButton,{children:$.jsx(s.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})});function nEt({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:o,open:i,target:a,onExited:s}){const l=gn(),c=l.current.getColumn(o),u=et(d=>{d&&(d.stopPropagation(),a!=null&&a.contains(d.target))||l.current.hideColumnMenu()});return!a||!c?null:$.jsx(Tle,{placement:`bottom-${c.align==="right"?"start":"end"}`,open:i,target:a,onClose:u,onExited:s,children:$.jsx(n,N({colDef:c,hideMenu:u,open:i,id:e,labelledby:t},r))})}function rEt(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function iO(e,t){return e.closest(`.${t}`)}function id(e){return e.replace(/["\\]/g,"\\$&")}function oEt(e,t){return e.querySelector(`[role="columnheader"][data-field="${id(t)}"]`)}function cce(e){return`.${ae.row}[data-id="${id(String(e))}"]`}function iEt(e,t){return e.querySelector(cce(t))}function aEt(e,{id:t,field:n}){const r=cce(t),o=`.${ae.cell}[data-field="${id(n)}"]`,i=`${r} ${o}`;return e.querySelector(i)}function o1(e){return e.target.nodeType===1&&!e.currentTarget.contains(e.target)}function sEt(e){return e.getAttribute("data-field")}function lEt(e,t){return e.querySelector(`[data-field="${id(t)}"]`)}function cEt(e){return e.getAttribute("data-fields").slice(2,-2).split("-|-")}function uEt(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${id(t)}-|"]`)??[])}function dEt(e,t){var a;if(!iO(e,ae.root))throw new Error("MUI X: The root element is not found.");const r=e.getAttribute("aria-colindex");if(!r)return[];const o=Number(r)-1,i=[];return(a=t.virtualScrollerRef)!=null&&a.current?(fce(t).forEach(s=>{const l=s.getAttribute("data-id");if(!l)return;let c=o;const u=t.unstable_getCellColSpanInfo(l,o);u&&u.spannedByColSpan&&(c=u.leftVisibleCellIndex);const d=s.querySelector(`[data-colindex="${c}"]`);d&&i.push(d)}),i):[]}function fq(e,t){return e.rootElementRef.current.querySelector(`.${ae[t]}`)}const uce=({api:e,colIndex:t,position:n,filterFn:r})=>{if(t===null)return[];const o=[];return fce(e).forEach(i=>{i.getAttribute("data-id")&&i.querySelectorAll(`.${ae[n==="left"?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(s=>{const l=hb(s);l!==null&&r(l)&&o.push(s)})}),o};function fEt(e,t,n){const r=hb(t);return uce({api:e,colIndex:r,position:n?"right":"left",filterFn:o=>n?or})}function pEt(e,t,n){const r=hb(t);return uce({api:e,colIndex:r,position:n?"left":"right",filterFn:o=>n?o>r:o{var i;if(!((i=e.columnHeadersContainerRef)!=null&&i.current))return[];if(t===null)return[];const o=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${ae[n==="left"?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(a=>{const s=hb(a);s!==null&&r(s)&&o.push(a)}),o};function hEt(e,t,n){const r=hb(t);return dce({api:e,position:n?"right":"left",colIndex:r,filterFn:o=>n?or})}function mEt(e,t,n){const r=hb(t);return dce({api:e,position:n?"left":"right",colIndex:r,filterFn:o=>n?o>r:o div > [data-field="${id(t)}"][role="columnheader"]`)}function yEt(e,t){const n=e.virtualScrollerRef.current;return Array.from(n.querySelectorAll(`:scope > div > div > div > [data-field="${id(t)}"][role="gridcell"]`))}function fce(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${ae.row}`)}function hb(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}const vEt=["className","aria-label"],bEt=e=>{const{classes:t}=e;return Te({root:["columnHeaderTitle"]},xn,t)},wEt=Yn("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),xEt=y.forwardRef(function(t,n){const{className:r}=t,o=Ue(t,vEt),i=xt(),a=bEt(i);return $.jsx(wEt,N({ref:n,className:fe(a.root,r),ownerState:i},o))});function SEt(e){var l;const{label:t,description:n}=e,r=xt(),o=y.useRef(null),[i,a]=y.useState(""),s=y.useCallback(()=>{if(!n&&(o!=null&&o.current)){const c=rEt(o.current);a(c?t:"")}},[n,t]);return $.jsx(r.slots.baseTooltip,N({title:n||i},(l=r.slotProps)==null?void 0:l.baseTooltip,{children:$.jsx(xEt,{onMouseOver:s,ref:o,children:t})}))}const CEt=["resizable","resizing","height","side"];var Oz=function(e){return e.Left="left",e.Right="right",e}(Oz||{});const PEt=e=>{const{resizable:t,resizing:n,classes:r,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${Se(o)}`],icon:["iconSeparator"]};return Te(i,xn,r)};function TEt(e){const{height:t,side:n=Oz.Right}=e,r=Ue(e,CEt),o=xt(),i=N({},e,{side:n,classes:o.classes}),a=PEt(i),s=y.useCallback(l=>{l.preventDefault(),l.stopPropagation()},[]);return $.jsx("div",N({className:a.root,style:{minHeight:t}},r,{onClick:s,children:$.jsx(o.slots.columnResizeIcon,{className:a.icon})}))}const EEt=y.memo(TEt),OEt=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],pce=y.forwardRef(function(t,n){const{classes:r,colIndex:o,height:i,isResizing:a,sortDirection:s,hasFocus:l,tabIndex:c,separatorSide:u,isDraggable:d,headerComponent:f,description:p,width:m,columnMenuIconButton:g=null,columnMenu:v=null,columnTitleIconButtons:w=null,headerClassName:x,label:S,resizable:P,draggableContainerProps:T,columnHeaderSeparatorProps:E,style:O}=t,k=Ue(t,OEt),A=hl(),I=xt(),R=y.useRef(null),L=Wt(R,n);let F="none";return s!=null&&(F=s==="asc"?"ascending":"descending"),y.useLayoutEffect(()=>{var _;const z=A.current.state.columnMenu;if(l&&!z.open){const H=R.current.querySelector('[tabindex="0"]')||R.current;H==null||H.focus(),(_=A.current.columnHeadersContainerRef)!=null&&_.current&&(A.current.columnHeadersContainerRef.current.scrollLeft=0)}},[A,l]),$.jsxs("div",N({ref:L,className:fe(r.root,x),style:N({},O,{height:i,width:m}),role:"columnheader",tabIndex:c,"aria-colindex":o+1,"aria-sort":F},k,{children:[$.jsxs("div",N({className:r.draggableContainer,draggable:d,role:"presentation"},T,{children:[$.jsxs("div",{className:r.titleContainer,role:"presentation",children:[$.jsx("div",{className:r.titleContainerContent,children:f!==void 0?f:$.jsx(SEt,{label:S,description:p,columnWidth:m})}),w]}),g]})),$.jsx(EEt,N({resizable:!I.disableColumnResize&&!!P,resizing:a,height:i,side:u},E)),v]}))}),IEt=e=>{const{colDef:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:i,showLeftBorder:a,filterItemsCounter:s,pinnedPosition:l,isLastUnpinned:c,isSiblingFocused:u}=e,d=o!=null,f=s!=null&&s>0,p=t.type==="number",m={root:["columnHeader",t.headerAlign==="left"&&"columnHeader--alignLeft",t.headerAlign==="center"&&"columnHeader--alignCenter",t.headerAlign==="right"&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",d&&"columnHeader--sorted",f&&"columnHeader--filtered",p&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder",l==="left"&&"columnHeader--pinnedLeft",l==="right"&&"columnHeader--pinnedRight",c&&"columnHeader--lastUnpinned",u&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return Te(m,xn,n)};function kEt(e){var ee,ce,se;const{colDef:t,columnMenuOpen:n,colIndex:r,headerHeight:o,isResizing:i,isLast:a,sortDirection:s,sortIndex:l,filterItemsCounter:c,hasFocus:u,tabIndex:d,disableReorder:f,separatorSide:p,style:m,pinnedPosition:g,indexInSection:v,sectionLength:w,gridHasFiller:x}=e,S=hl(),P=xt(),T=y.useRef(null),E=Ln(),O=Ln(),k=y.useRef(null),[A,I]=y.useState(n),R=y.useMemo(()=>!P.disableColumnReorder&&!f&&!t.disableReorder,[P.disableColumnReorder,f,t.disableReorder]);let L;t.renderHeader&&(L=t.renderHeader(S.current.getColumnHeaderParams(t.field)));const F=oM(g,v),z=rM(g,v,w,P.showColumnVerticalBorder,x),_=N({},e,{classes:P.classes,showRightBorder:z,showLeftBorder:F}),D=IEt(_),H=y.useCallback(Z=>ue=>{o1(ue)||S.current.publishEvent(Z,S.current.getColumnHeaderParams(t.field),ue)},[S,t.field]),B=y.useMemo(()=>({onClick:H("columnHeaderClick"),onContextMenu:H("columnHeaderContextMenu"),onDoubleClick:H("columnHeaderDoubleClick"),onMouseOver:H("columnHeaderOver"),onMouseOut:H("columnHeaderOut"),onMouseEnter:H("columnHeaderEnter"),onMouseLeave:H("columnHeaderLeave"),onKeyDown:H("columnHeaderKeyDown"),onFocus:H("columnHeaderFocus"),onBlur:H("columnHeaderBlur")}),[H]),V=y.useMemo(()=>R?{onDragStart:H("columnHeaderDragStart"),onDragEnter:H("columnHeaderDragEnter"),onDragOver:H("columnHeaderDragOver"),onDragEnd:H("columnHeaderDragEnd")}:{},[R,H]),W=y.useMemo(()=>({onMouseDown:H("columnSeparatorMouseDown"),onDoubleClick:H("columnSeparatorDoubleClick")}),[H]);y.useEffect(()=>{A||I(n)},[A,n]);const G=y.useCallback(()=>{I(!1)},[]),Q=!P.disableColumnMenu&&!t.disableColumnMenu&&$.jsx(tEt,{colDef:t,columnMenuId:E,columnMenuButtonId:O,open:A,iconButtonRef:k}),Y=$.jsx(nEt,{columnMenuId:E,columnMenuButtonId:O,field:t.field,open:n,target:k.current,ContentComponent:P.slots.columnMenu,contentComponentProps:(ee=P.slotProps)==null?void 0:ee.columnMenu,onExited:G}),ne=t.sortingOrder??P.sortingOrder,ie=(t.sortable||s!=null)&&!t.hideSortIcons&&!P.disableColumnSorting,re=$.jsxs(y.Fragment,{children:[!P.disableColumnFilter&&$.jsx(P.slots.columnHeaderFilterIconButton,N({field:t.field,counter:c},(ce=P.slotProps)==null?void 0:ce.columnHeaderFilterIconButton)),ie&&$.jsx(P.slots.columnHeaderSortIcon,N({field:t.field,direction:s,index:l,sortingOrder:ne,disabled:!t.sortable},(se=P.slotProps)==null?void 0:se.columnHeaderSortIcon))]});y.useLayoutEffect(()=>{var ue;const Z=S.current.state.columnMenu;if(u&&!Z.open){const we=T.current.querySelector('[tabindex="0"]')||T.current;we==null||we.focus(),(ue=S.current.columnHeadersContainerRef)!=null&&ue.current&&(S.current.columnHeadersContainerRef.current.scrollLeft=0)}},[S,u]);const pe=typeof t.headerClassName=="function"?t.headerClassName({field:t.field,colDef:t}):t.headerClassName,le=t.headerName??t.field;return $.jsx(pce,N({ref:T,classes:D,columnMenuOpen:n,colIndex:r,height:o,isResizing:i,sortDirection:s,hasFocus:u,tabIndex:d,separatorSide:p,isDraggable:R,headerComponent:L,description:t.description,elementId:t.field,width:t.computedWidth,columnMenuIconButton:Q,columnTitleIconButtons:re,headerClassName:fe(pe,a&&ae["columnHeader--last"]),label:le,resizable:!P.disableColumnResize&&!!t.resizable,"data-field":t.field,columnMenu:Y,draggableContainerProps:V,columnHeaderSeparatorProps:W,style:m},B))}const MEt=Wf(kEt),AEt=["className"],$Et=e=>{const{classes:t}=e;return Te({root:["iconButtonContainer"]},xn,t)},REt=Yn("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})(()=>({display:"flex",visibility:"hidden",width:0})),hce=y.forwardRef(function(t,n){const{className:r}=t,o=Ue(t,AEt),i=xt(),a=$Et(i);return $.jsx(REt,N({ref:n,className:fe(a.root,r),ownerState:i},o))}),_Et=["direction","index","sortingOrder","disabled"],DEt=e=>{const{classes:t}=e;return Te({icon:["sortIcon"]},xn,t)};function NEt(e,t,n,r){let o;const i={};return t==="asc"?o=e.columnSortedAscendingIcon:t==="desc"?o=e.columnSortedDescendingIcon:(o=e.columnUnsortedIcon,i.sortingOrder=r),o?$.jsx(o,N({fontSize:"small",className:n},i)):null}function LEt(e){var f;const{direction:t,index:n,sortingOrder:r,disabled:o}=e,i=Ue(e,_Et),a=gn(),s=xt(),l=N({},e,{classes:s.classes}),c=DEt(l),u=NEt(s.slots,t,c.icon,r);if(!u)return null;const d=$.jsx(s.slots.baseIconButton,N({tabIndex:-1,"aria-label":a.current.getLocaleText("columnHeaderSortIconLabel"),title:a.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:o},(f=s.slotProps)==null?void 0:f.baseIconButton,i,{children:u}));return $.jsxs(hce,{children:[n!=null&&$.jsx(s.slots.baseBadge,{badgeContent:n,color:"default",overlap:"circular",children:d}),n==null&&d]})}const FEt=y.memo(LEt),jEt=e=>{const{classes:t}=e;return Te({icon:["filterIcon"]},xn,t)};function BEt(e){var m,g;const{counter:t,field:n,onClick:r}=e,o=gn(),i=xt(),a=N({},e,{classes:i.classes}),s=jEt(a),l=Qe(o,Bx),c=Ln(),u=Ln(),d=y.useCallback(v=>{v.preventDefault(),v.stopPropagation();const{open:w,openedPanelValue:x}=Bx(o.current.state);w&&x===Oh.filters?o.current.hideFilterPanel():o.current.showFilterPanel(void 0,u,c),r&&r(o.current.getColumnHeaderParams(n),v)},[o,n,r,u,c]);if(!t)return null;const f=l.open&&l.labelId===c,p=$.jsx(i.slots.baseIconButton,N({id:c,onClick:d,color:"default","aria-label":o.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":f,"aria-controls":f?u:void 0},(m=i.slotProps)==null?void 0:m.baseIconButton,{children:$.jsx(i.slots.columnFilteredIcon,{className:s.icon,fontSize:"small"})}));return $.jsx(i.slots.baseTooltip,N({title:o.current.getLocaleText("columnHeaderFiltersTooltipActive")(t),enterDelay:1e3},(g=i.slotProps)==null?void 0:g.baseTooltip,{children:$.jsxs(hce,{children:[t>1&&$.jsx(i.slots.baseBadge,{badgeContent:t,color:"default",children:p}),t===1&&p]})}))}const pq=ut($.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),hq=ut($.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),mq=ut($.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),gq=ut($.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),zEt=ut($.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),yq=ut($.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),VEt=ut($.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");ut($.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");ut($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");const HEt=ut($.jsx("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon"),UEt=ut($.jsx("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"}),"Separator"),WEt=ut($.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),GEt=ut($.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),qEt=ut($.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),KEt=ut($.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),bR=ut($.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),vq=ut($.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),YEt=ut($.jsx("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),XEt=ut($.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),bq=ut($.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),QEt=ut($.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),JEt=ut($.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),ZEt=ut($.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),eOt=ut($.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),tOt=ut($.jsx("g",{children:$.jsx("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),nOt=ut($.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");ut($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");const rOt=ut($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");function mce(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}const aO=e=>e.indexOf("Arrow")===0||e.indexOf("Page")===0||e===" "||e==="Home"||e==="End",oOt=e=>!!e.key,iOt=e=>e==="Tab"||e==="Escape";function gce(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="V"&&!e.shiftKey&&!e.altKey}function aOt(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="C"&&!e.shiftKey&&!e.altKey}const sOt=["hideMenu","colDef","id","labelledby","className","children","open"],lOt=oe(pS)(()=>({minWidth:248})),cOt=y.forwardRef(function(t,n){const{hideMenu:r,id:o,labelledby:i,className:a,children:s,open:l}=t,c=Ue(t,sOt),u=y.useCallback(d=>{d.key==="Tab"&&d.preventDefault(),iOt(d.key)&&r(d)},[r]);return $.jsx(lOt,N({id:o,ref:n,className:fe(ae.menuList,a),"aria-labelledby":i,onKeyDown:u,autoFocus:l},c,{children:s}))}),uOt=["displayOrder"],dOt=e=>{const t=hl(),n=xt(),{defaultSlots:r,defaultSlotProps:o,slots:i={},slotProps:a={},hideMenu:s,colDef:l,addDividers:c=!0}=e,u=y.useMemo(()=>N({},r,i),[r,i]),d=y.useMemo(()=>{if(!a||Object.keys(a).length===0)return o;const m=N({},a);return Object.entries(o).forEach(([g,v])=>{m[g]=N({},v,a[g]||{})}),m},[o,a]),f=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),p=y.useMemo(()=>{const m=Object.keys(r);return Object.keys(i).filter(g=>!m.includes(g))},[i,r]);return y.useMemo(()=>{const v=Array.from(new Set([...f,...p])).filter(w=>u[w]!=null).sort((w,x)=>{const S=d[w],P=d[x],T=Number.isFinite(S==null?void 0:S.displayOrder)?S.displayOrder:100,E=Number.isFinite(P==null?void 0:P.displayOrder)?P.displayOrder:100;return T-E});return v.reduce((w,x,S)=>{let P={colDef:l,onClick:s};const T=d[x];if(T){const E=Ue(T,uOt);P=N({},P,E)}return c&&S!==v.length-1?[...w,[u[x],P],[n.slots.baseDivider,{}]]:[...w,[u[x],P]]},[])},[c,l,f,s,u,d,p,n.slots.baseDivider])};function fOt(e){const{colDef:t,onClick:n}=e,r=gn(),o=xt(),s=fo(r).filter(c=>c.disableColumnMenu!==!0).length===1,l=y.useCallback(c=>{s||(r.current.setColumnVisibility(t.field,!1),n(c))},[r,t.field,n,s]);return o.disableColumnSelector||t.hideable===!1?null:$.jsxs(tn,{onClick:l,disabled:s,children:[$.jsx(zi,{children:$.jsx(o.slots.columnMenuHideIcon,{fontSize:"small"})}),$.jsx(ho,{children:r.current.getLocaleText("columnMenuHideColumn")})]})}function pOt(e){const{onClick:t}=e,n=gn(),r=xt(),o=y.useCallback(i=>{t(i),n.current.showPreferences(Oh.columns)},[n,t]);return r.disableColumnSelector?null:$.jsxs(tn,{onClick:o,children:[$.jsx(zi,{children:$.jsx(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),$.jsx(ho,{children:n.current.getLocaleText("columnMenuManageColumns")})]})}function hOt(e){return $.jsxs(y.Fragment,{children:[$.jsx(fOt,N({},e)),$.jsx(pOt,N({},e))]})}function mOt(e){const{colDef:t,onClick:n}=e,r=gn(),o=xt(),i=y.useCallback(a=>{n(a),r.current.showFilterPanel(t.field)},[r,t.field,n]);return o.disableColumnFilter||!t.filterable?null:$.jsxs(tn,{onClick:i,children:[$.jsx(zi,{children:$.jsx(o.slots.columnMenuFilterIcon,{fontSize:"small"})}),$.jsx(ho,{children:r.current.getLocaleText("columnMenuFilter")})]})}function gOt(e){const{colDef:t,onClick:n}=e,r=gn(),o=Qe(r,Ms),i=xt(),a=y.useMemo(()=>{if(!t)return null;const u=o.find(d=>d.field===t.field);return u==null?void 0:u.sort},[t,o]),s=t.sortingOrder??i.sortingOrder,l=y.useCallback(u=>{n(u);const d=u.currentTarget.getAttribute("data-value")||null;r.current.sortColumn(t.field,d===a?null:d)},[r,t,n,a]);if(i.disableColumnSorting||!t||!t.sortable||!s.some(u=>!!u))return null;const c=u=>{const d=r.current.getLocaleText(u);return typeof d=="function"?d(t):d};return $.jsxs(y.Fragment,{children:[s.includes("asc")&&a!=="asc"?$.jsxs(tn,{onClick:l,"data-value":"asc",children:[$.jsx(zi,{children:$.jsx(i.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),$.jsx(ho,{children:c("columnMenuSortAsc")})]}):null,s.includes("desc")&&a!=="desc"?$.jsxs(tn,{onClick:l,"data-value":"desc",children:[$.jsx(zi,{children:$.jsx(i.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),$.jsx(ho,{children:c("columnMenuSortDesc")})]}):null,s.includes(null)&&a!=null?$.jsxs(tn,{onClick:l,children:[$.jsx(zi,{}),$.jsx(ho,{children:r.current.getLocaleText("columnMenuUnsort")})]}):null]})}const yOt=["defaultSlots","defaultSlotProps","slots","slotProps"],vOt={columnMenuSortItem:gOt,columnMenuFilterItem:mOt,columnMenuColumnsItem:hOt},bOt={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},wOt=y.forwardRef(function(t,n){const{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}=t,s=Ue(t,yOt),l=dOt(N({},s,{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}));return $.jsx(cOt,N({ref:n},s,{children:l.map(([c,u],d)=>$.jsx(c,N({},u),d))}))}),xOt=y.forwardRef(function(t,n){return $.jsx(wOt,N({},t,{ref:n,defaultSlots:vOt,defaultSlotProps:bOt}))}),SOt=["className","slotProps"],COt=e=>{const{classes:t}=e;return Te({root:["panelWrapper"]},xn,t)},POt=oe("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),TOt=()=>!0,yce=y.forwardRef(function(t,n){const{className:r,slotProps:o={}}=t,i=Ue(t,SOt),a=xt(),s=COt(a);return $.jsx(kF,N({open:!0,disableEnforceFocus:!0,isEnabled:TOt},o.TrapFocus,{children:$.jsx(POt,N({ref:n,tabIndex:-1,className:fe(s.root,r),ownerState:a},i))}))}),EOt=(e,t)=>{const n=new Set(Object.keys(e).filter(i=>e[i]===!1)),r=new Set(Object.keys(t).filter(i=>t[i]===!1));if(n.size!==r.size)return!1;let o=!0;return n.forEach(i=>{r.has(i)||(o=!1)}),o},OOt=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,IOt=e=>{const{classes:t}=e;return Te({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},xn,t)},wq=new Intl.Collator;function vce(e){var _,D,H,B;const t=gn(),n=y.useRef(null),r=Qe(t,Wl),o=Zl(()=>Hs(t)).current,i=Qe(t,Hs),a=xt(),[s,l]=y.useState(""),c=IOt(a),{sort:u,searchPredicate:d=OOt,autoFocusSearchField:f=!0,disableShowHideToggle:p=!1,disableResetButton:m=!1,toggleAllMode:g="all",getTogglableColumns:v,searchInputProps:w}=e,x=y.useMemo(()=>EOt(i,o),[i,o]),S=y.useMemo(()=>{switch(u){case"asc":return[...r].sort((V,W)=>wq.compare(V.headerName||V.field,W.headerName||W.field));case"desc":return[...r].sort((V,W)=>-wq.compare(V.headerName||V.field,W.headerName||W.field));default:return r}},[r,u]),P=V=>{const{name:W}=V.target;t.current.setColumnVisibility(W,i[W]===!1)},T=y.useMemo(()=>{const V=v?v(S):null,W=V?S.filter(({field:G})=>V.includes(G)):S;return s?W.filter(G=>d(G,s.toLowerCase())):W},[S,s,d,v]),E=y.useCallback(V=>{const W=Hs(t),G=N({},W),Q=v?v(r):null;return(g==="filteredOnly"?T:r).forEach(Y=>{Y.hideable&&(Q==null||Q.includes(Y.field))&&(V?delete G[Y.field]:G[Y.field]=!1)}),t.current.setColumnVisibilityModel(G)},[t,r,v,g,T]),O=y.useCallback(V=>{l(V.target.value)},[]),k=y.useMemo(()=>T.filter(V=>V.hideable),[T]),A=y.useMemo(()=>k.every(V=>i[V.field]==null||i[V.field]!==!1),[i,k]),I=y.useMemo(()=>k.every(V=>i[V.field]===!1),[i,k]),R=y.useRef(null);y.useEffect(()=>{f?n.current.focus():R.current&&typeof R.current.focus=="function"&&R.current.focus()},[f]);let L=!1;const F=V=>L===!1&&V.hideable!==!1?(L=!0,!0):!1,z=y.useCallback(()=>{l(""),n.current.focus()},[]);return $.jsxs(y.Fragment,{children:[$.jsx(MOt,{className:c.header,ownerState:a,children:$.jsx(AOt,N({as:a.slots.baseTextField,ownerState:a,placeholder:t.current.getLocaleText("columnsManagementSearchTitle"),inputRef:n,className:c.searchInput,value:s,onChange:O,variant:"outlined",size:"small",type:"search",InputProps:{startAdornment:$.jsx(a.slots.baseInputAdornment,{position:"start",children:$.jsx(a.slots.quickFilterIcon,{})}),endAdornment:$.jsx(a.slots.baseIconButton,N({"aria-label":t.current.getLocaleText("columnsManagementDeleteIconLabel"),size:"small",sx:[s?{visibility:"visible"}:{visibility:"hidden"}],tabIndex:-1,onClick:z},(_=a.slotProps)==null?void 0:_.baseIconButton,{children:$.jsx(a.slots.quickFilterClearIcon,{fontSize:"small"})}))},inputProps:{"aria-label":t.current.getLocaleText("columnsManagementSearchTitle")},autoComplete:"off",fullWidth:!0},(D=a.slotProps)==null?void 0:D.baseTextField,w))}),$.jsxs(kOt,{className:c.root,ownerState:a,children:[T.map(V=>{var W;return $.jsx(mh,{className:c.row,control:$.jsx(a.slots.baseCheckbox,N({disabled:V.hideable===!1,checked:i[V.field]!==!1,onClick:P,name:V.field,sx:{p:.5},inputRef:F(V)?R:void 0},(W=a.slotProps)==null?void 0:W.baseCheckbox)),label:V.headerName||V.field},V.field)}),T.length===0&&$.jsx(ROt,{ownerState:a,children:t.current.getLocaleText("columnsManagementNoColumns")})]}),(!p||!m)&&T.length>0?$.jsxs($Ot,{ownerState:a,className:c.footer,children:[p?$.jsx("span",{}):$.jsx(mh,{control:$.jsx(a.slots.baseCheckbox,N({disabled:k.length===0,checked:A,indeterminate:!A&&!I,onClick:()=>E(!A),name:t.current.getLocaleText("columnsManagementShowHideAllText"),sx:{p:.5}},(H=a.slotProps)==null?void 0:H.baseCheckbox)),label:t.current.getLocaleText("columnsManagementShowHideAllText")}),m?null:$.jsx(a.slots.baseButton,N({onClick:()=>t.current.setColumnVisibilityModel(o),disabled:x},(B=a.slotProps)==null?void 0:B.baseButton,{children:t.current.getLocaleText("columnsManagementReset")}))]}):null]})}const kOt=oe("div",{name:"MuiDataGrid",slot:"ColumnsManagement",overridesResolver:(e,t)=>t.columnsManagement})(({theme:e})=>({padding:e.spacing(0,3,1.5),display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,alignItems:"flex-start"})),MOt=oe("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader",overridesResolver:(e,t)=>t.columnsManagementHeader})(({theme:e})=>({padding:e.spacing(1.5,3)})),AOt=oe(hn,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput",overridesResolver:(e,t)=>t.columnsManagementSearchInput})(({theme:e})=>({[`& .${jo.root}`]:{padding:e.spacing(0,1.5,0,1.5)},[`& .${jo.input}::-webkit-search-decoration, - & .${jo.input}::-webkit-search-cancel-button, - & .${jo.input}::-webkit-search-results-button, - & .${jo.input}::-webkit-search-results-decoration`]:{display:"none"}})),$Ot=oe("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter",overridesResolver:(e,t)=>t.columnsManagementFooter})(({theme:e})=>({padding:e.spacing(.5,1,.5,3),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${e.palette.divider}`})),ROt=oe("div")(({theme:e})=>({padding:e.spacing(.5,0),color:e.palette.grey[500]}));function _Ot(e){var n;const t=xt();return $.jsx(yce,N({},e,{children:$.jsx(vce,N({},(n=t.slotProps)==null?void 0:n.columnsManagement))}))}const DOt=["children","className","classes"],NOt=Le("MuiDataGrid",["panel","paper"]),LOt=oe($f,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})(({theme:e})=>({zIndex:e.zIndex.modal})),FOt=oe(io,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,minWidth:300,maxHeight:450,display:"flex",maxWidth:`calc(100vw - ${e.spacing(.5)})`,overflow:"auto"})),jOt=y.forwardRef((e,t)=>{const{children:n,className:r}=e,o=Ue(e,DOt),i=gn(),a=xt(),s=NOt,[l,c]=y.useState(!1),u=y.useCallback(()=>{i.current.hidePreferences()},[i]),d=y.useCallback(g=>{g.key==="Escape"&&i.current.hidePreferences()},[i]),f=y.useMemo(()=>[{name:"flip",enabled:!0,options:{rootBoundary:"document"}},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{c(!0)},effect:()=>()=>{c(!1)}}],[]),[p,m]=y.useState(null);return y.useEffect(()=>{var v,w;const g=(w=(v=i.current.rootElementRef)==null?void 0:v.current)==null?void 0:w.querySelector('[data-id="gridPanelAnchor"]');g&&m(g)},[i]),p?$.jsx(LOt,N({ref:t,placement:"bottom-start",className:fe(s.panel,r),ownerState:a,anchorEl:p,modifiers:f},o,{children:$.jsx(IF,{mouseEvent:"onMouseUp",onClickAway:u,children:$.jsx(FOt,{className:s.paper,ownerState:a,elevation:8,onKeyDown:d,children:l&&n})})})):null}),BOt=["className"],zOt=e=>{const{classes:t}=e;return Te({root:["panelContent"]},xn,t)},VOt=Yn("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function HOt(e){const{className:t}=e,n=Ue(e,BOt),r=xt(),o=zOt(r);return $.jsx(VOt,N({className:fe(o.root,t),ownerState:r},n))}const UOt=["className"],WOt=e=>{const{classes:t}=e;return Te({root:["panelFooter"]},xn,t)},GOt=Yn("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})(({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"}));function qOt(e){const{className:t}=e,n=Ue(e,UOt),r=xt(),o=WOt(r);return $.jsx(GOt,N({className:fe(o.root,t),ownerState:r},n))}const KOt=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],YOt=["InputComponentProps"],XOt=e=>{const{classes:t}=e;return Te({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},xn,t)},QOt=oe("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})(({theme:e})=>({display:"flex",padding:e.spacing(1)})),JOt=oe("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})(({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)})),ZOt=oe("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),eIt=oe("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),tIt=oe("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:150}),nIt=oe("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),rIt=e=>{switch(e){case _i.And:return"filterPanelOperatorAnd";case _i.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}},p0=e=>e.headerName||e.field,xq=new Intl.Collator,Sq=y.forwardRef(function(t,n){var we,me,be,xe,Ee,Me,_e,de,Ae;const{item:r,hasMultipleFilters:o,deleteFilter:i,applyFilterChanges:a,showMultiFilterOperators:s,disableMultiFilterOperator:l,applyMultiFilterOperatorChanges:c,focusElementRef:u,logicOperators:d=[_i.And,_i.Or],columnsSort:f,filterColumns:p,deleteIconProps:m={},logicOperatorInputProps:g={},operatorInputProps:v={},columnInputProps:w={},valueInputProps:x={},readOnly:S}=t,P=Ue(t,KOt),T=gn(),E=Qe(T,od),O=Qe(T,hle),k=Qe(T,Xo),A=Ln(),I=Ln(),R=Ln(),L=Ln(),F=xt(),z=XOt(F),_=y.useRef(null),D=y.useRef(null),H=k.logicOperator??_i.And,B=o&&d.length>0,V=((we=F.slotProps)==null?void 0:we.baseFormControl)||{},G=(((me=F.slotProps)==null?void 0:me.baseSelect)||{}).native??!1,Q=((be=F.slotProps)==null?void 0:be.baseInputLabel)||{},Y=((xe=F.slotProps)==null?void 0:xe.baseSelectOption)||{},{InputComponentProps:ne}=x,ie=Ue(x,YOt),{filteredColumns:re,selectedField:pe}=y.useMemo(()=>{let Oe=r.field;const $e=E[r.field].filterable===!1?E[r.field]:null;if($e)return{filteredColumns:[$e],selectedField:Oe};if(p===void 0||typeof p!="function")return{filteredColumns:O,selectedField:Oe};const Be=p({field:r.field,columns:O,currentFilters:(k==null?void 0:k.items)||[]});return{filteredColumns:O.filter(Je=>{const ot=Be.includes(Je.field);return Je.field===r.field&&!ot&&(Oe=void 0),ot}),selectedField:Oe}},[p,k==null?void 0:k.items,O,r.field,E]),le=y.useMemo(()=>{switch(f){case"asc":return re.sort((Oe,$e)=>xq.compare(p0(Oe),p0($e)));case"desc":return re.sort((Oe,$e)=>-xq.compare(p0(Oe),p0($e)));default:return re}},[re,f]),ee=r.field?T.current.getColumn(r.field):null,ce=y.useMemo(()=>{var Oe;return!r.operator||!ee?null:(Oe=ee.filterOperators)==null?void 0:Oe.find($e=>$e.value===r.operator)},[r,ee]),se=y.useCallback(Oe=>{const $e=Oe.target.value,Be=T.current.getColumn($e);if(Be.field===ee.field)return;const Je=Be.filterOperators.find(it=>it.value===r.operator)||Be.filterOperators[0];let lt=!Je.InputComponent||Je.InputComponent!==(ce==null?void 0:ce.InputComponent)||Be.type!==ee.type?void 0:r.value;if(Be.type==="singleSelect"&<!==void 0){const it=Be,tt=Eh(it);Array.isArray(lt)?lt=lt.filter(pt=>oO(pt,tt,it==null?void 0:it.getOptionValue)!==void 0):oO(r.value,tt,it==null?void 0:it.getOptionValue)===void 0&&(lt=void 0)}a(N({},r,{field:$e,operator:Je.value,value:lt}))},[T,a,r,ee,ce]),Z=y.useCallback(Oe=>{const $e=Oe.target.value,Be=ee==null?void 0:ee.filterOperators.find(ot=>ot.value===$e),Je=!(Be!=null&&Be.InputComponent)||(Be==null?void 0:Be.InputComponent)!==(ce==null?void 0:ce.InputComponent);a(N({},r,{operator:$e,value:Je?void 0:r.value}))},[a,r,ee,ce]),ue=y.useCallback(Oe=>{const $e=Oe.target.value===_i.And.toString()?_i.And:_i.Or;c($e)},[c]),ge=()=>{i(r)};return y.useImperativeHandle(u,()=>({focus:()=>{var Oe;ce!=null&&ce.InputComponent?(Oe=_==null?void 0:_.current)==null||Oe.focus():D.current.focus()}}),[ce]),$.jsxs(QOt,N({ref:n,className:z.root,"data-id":r.id,ownerState:F},P,{children:[$.jsx(JOt,N({variant:"standard",as:F.slots.baseFormControl},V,m,{className:fe(z.deleteIcon,V.className,m.className),ownerState:F,children:$.jsx(F.slots.baseIconButton,N({"aria-label":T.current.getLocaleText("filterPanelDeleteIconLabel"),title:T.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:ge,size:"small",disabled:S},(Ee=F.slotProps)==null?void 0:Ee.baseIconButton,{children:$.jsx(F.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),$.jsx(ZOt,N({variant:"standard",as:F.slots.baseFormControl},V,g,{sx:[B?{display:"flex"}:{display:"none"},s?{visibility:"visible"}:{visibility:"hidden"},V.sx,g.sx],className:fe(z.logicOperatorInput,V.className,g.className),ownerState:F,children:$.jsx(F.slots.baseSelect,N({inputProps:{"aria-label":T.current.getLocaleText("filterPanelLogicOperator")},value:H??"",onChange:ue,disabled:!!l||d.length===1,native:G},(Me=F.slotProps)==null?void 0:Me.baseSelect,{children:d.map(Oe=>y.createElement(F.slots.baseSelectOption,N({},Y,{native:G,key:Oe.toString(),value:Oe.toString()}),T.current.getLocaleText(rIt(Oe))))}))})),$.jsxs(eIt,N({variant:"standard",as:F.slots.baseFormControl},V,w,{className:fe(z.columnInput,V.className,w.className),ownerState:F,children:[$.jsx(F.slots.baseInputLabel,N({},Q,{htmlFor:A,id:I,children:T.current.getLocaleText("filterPanelColumns")})),$.jsx(F.slots.baseSelect,N({labelId:I,id:A,label:T.current.getLocaleText("filterPanelColumns"),value:pe??"",onChange:se,native:G,disabled:S},(_e=F.slotProps)==null?void 0:_e.baseSelect,{children:le.map(Oe=>y.createElement(F.slots.baseSelectOption,N({},Y,{native:G,key:Oe.field,value:Oe.field}),p0(Oe)))}))]})),$.jsxs(tIt,N({variant:"standard",as:F.slots.baseFormControl},V,v,{className:fe(z.operatorInput,V.className,v.className),ownerState:F,children:[$.jsx(F.slots.baseInputLabel,N({},Q,{htmlFor:R,id:L,children:T.current.getLocaleText("filterPanelOperator")})),$.jsx(F.slots.baseSelect,N({labelId:L,label:T.current.getLocaleText("filterPanelOperator"),id:R,value:r.operator,onChange:Z,native:G,inputRef:D,disabled:S},(de=F.slotProps)==null?void 0:de.baseSelect,{children:(Ae=ee==null?void 0:ee.filterOperators)==null?void 0:Ae.map(Oe=>y.createElement(F.slots.baseSelectOption,N({},Y,{native:G,key:Oe.value,value:Oe.value}),Oe.label||T.current.getLocaleText(`filterOperator${Se(Oe.value)}`)))}))]})),$.jsx(nIt,N({variant:"standard",as:F.slots.baseFormControl},V,ie,{className:fe(z.valueInput,V.className,ie.className),ownerState:F,children:ce!=null&&ce.InputComponent?$.jsx(ce.InputComponent,N({apiRef:T,item:r,applyValue:a,focusElementRef:_,disabled:S},ce.InputComponentProps,ne),r.field):null}))]}))}),oIt=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],Cq=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),iIt=y.forwardRef(function(t,n){var L,F;const r=gn(),o=xt(),i=Qe(r,Xo),a=Qe(r,hle),s=Qe(r,YSt),l=y.useRef(null),c=y.useRef(null),{logicOperators:u=[_i.And,_i.Or],columnsSort:d,filterFormProps:f,getColumnForNewFilter:p,disableAddFilterButton:m=!1,disableRemoveAllButton:g=!1}=t,v=Ue(t,oIt),w=r.current.upsertFilterItem,x=y.useCallback(z=>{r.current.setFilterLogicOperator(z)},[r]),S=y.useCallback(()=>{let z;if(p&&typeof p=="function"){const _=p({currentFilters:(i==null?void 0:i.items)||[],columns:a});if(_===null)return null;z=a.find(({field:D})=>D===_)}else z=a.find(_=>{var D;return(D=_.filterOperators)==null?void 0:D.length});return z?Cq(z):null},[i==null?void 0:i.items,a,p]),P=y.useCallback(()=>{if(p===void 0||typeof p!="function")return S();const z=i.items.length?i.items:[S()].filter(Boolean),_=p({currentFilters:z,columns:a});if(_===null)return null;const D=a.find(({field:H})=>H===_);return D?Cq(D):null},[i.items,a,p,S]),T=y.useMemo(()=>i.items.length?i.items:(c.current||(c.current=S()),c.current?[c.current]:[]),[i.items,S]),E=T.length>1,{readOnlyFilters:O,validFilters:k}=y.useMemo(()=>T.reduce((z,_)=>(s[_.field]?z.validFilters.push(_):z.readOnlyFilters.push(_),z),{readOnlyFilters:[],validFilters:[]}),[T,s]),A=y.useCallback(()=>{const z=P();z&&r.current.upsertFilterItems([...T,z])},[r,P,T]),I=y.useCallback(z=>{const _=k.length===1;r.current.deleteFilterItem(z),_&&r.current.hideFilterPanel()},[r,k.length]),R=y.useCallback(()=>k.length===1&&k[0].value===void 0?(r.current.deleteFilterItem(k[0]),r.current.hideFilterPanel()):r.current.setFilterModel(N({},i,{items:O}),"removeAllFilterItems"),[r,O,i,k]);return y.useEffect(()=>{u.length>0&&i.logicOperator&&!u.includes(i.logicOperator)&&x(u[0])},[u,x,i.logicOperator]),y.useEffect(()=>{k.length>0&&l.current.focus()},[k.length]),$.jsxs(yce,N({ref:n},v,{children:[$.jsxs(HOt,{children:[O.map((z,_)=>$.jsx(Sq,N({item:z,applyFilterChanges:w,deleteFilter:I,hasMultipleFilters:E,showMultiFilterOperators:_>0,disableMultiFilterOperator:_!==1,applyMultiFilterOperatorChanges:x,focusElementRef:null,readOnly:!0,logicOperators:u,columnsSort:d},f),z.id==null?_:z.id)),k.map((z,_)=>$.jsx(Sq,N({item:z,applyFilterChanges:w,deleteFilter:I,hasMultipleFilters:E,showMultiFilterOperators:O.length+_>0,disableMultiFilterOperator:O.length+_!==1,applyMultiFilterOperatorChanges:x,focusElementRef:_===k.length-1?l:null,logicOperators:u,columnsSort:d},f),z.id==null?_+O.length:z.id))]}),!o.disableMultipleColumnsFiltering&&!(m&&g)?$.jsxs(qOt,{children:[m?$.jsx("span",{}):$.jsx(o.slots.baseButton,N({onClick:A,startIcon:$.jsx(o.slots.filterPanelAddIcon,{})},(L=o.slotProps)==null?void 0:L.baseButton,{children:r.current.getLocaleText("filterPanelAddFilter")})),!g&&k.length>0?$.jsx(o.slots.baseButton,N({onClick:R,startIcon:$.jsx(o.slots.filterPanelRemoveAllIcon,{})},(F=o.slotProps)==null?void 0:F.baseButton,{children:r.current.getLocaleText("filterPanelRemoveAll")})):null]}):null]}))}),aIt=["hideMenu","options"],sIt=["hideMenu","options"];function lIt(e){const t=gn(),{hideMenu:n,options:r}=e,o=Ue(e,aIt);return $.jsx(tn,N({onClick:()=>{t.current.exportDataAsCsv(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportCSV")}))}function cIt(e){const t=gn(),{hideMenu:n,options:r}=e,o=Ue(e,sIt);return $.jsx(tn,N({onClick:()=>{t.current.exportDataAsPrint(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportPrint")}))}const uIt=["className","selectedRowCount"],dIt=e=>{const{classes:t}=e;return Te({root:["selectedRowCount"]},xn,t)},fIt=Yn("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(e,t)=>t.selectedRowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2),visibility:"hidden",width:0,height:0,[e.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}})),pIt=y.forwardRef(function(t,n){const{className:r,selectedRowCount:o}=t,i=Ue(t,uIt),a=gn(),s=xt(),l=dIt(s),c=a.current.getLocaleText("footerRowSelected")(o);return $.jsx(fIt,N({ref:n,className:fe(l.root,r),ownerState:s},i,{children:c}))}),hIt=y.forwardRef(function(t,n){var d,f;const r=gn(),o=xt(),i=Qe(r,R1t),a=Qe(r,lCt),s=Qe(r,yz),l=!o.hideFooterSelectedRowCount&&a>0?$.jsx(pIt,{selectedRowCount:a}):$.jsx("div",{}),c=!o.hideFooterRowCount&&!o.pagination?$.jsx(o.slots.footerRowCount,N({},(d=o.slotProps)==null?void 0:d.footerRowCount,{rowCount:i,visibleRowCount:s})):null,u=o.pagination&&!o.hideFooterPagination&&o.slots.pagination&&$.jsx(o.slots.pagination,N({},(f=o.slotProps)==null?void 0:f.pagination));return $.jsxs(XTt,N({ref:n},t,{children:[l,c,u]}))});function mIt(){var i,a;const e=gn(),t=Qe(e,Wl),n=xt(),r=Qe(e,Bx),o=e.current.unstable_applyPipeProcessors("preferencePanel",null,r.openedPanelValue??Oh.filters);return $.jsx(n.slots.panel,N({as:n.slots.basePopper,open:t.length>0&&r.open,id:r.panelId,"aria-labelledby":r.labelId},(i=n.slotProps)==null?void 0:i.panel,(a=n.slotProps)==null?void 0:a.basePopper,{children:o}))}function gIt(){var t;const e=xt();return $.jsxs(y.Fragment,{children:[$.jsx(mIt,{}),e.slots.toolbar&&$.jsx(e.slots.toolbar,N({},(t=e.slotProps)==null?void 0:t.toolbar))]})}const Iz=(e,t,n,r,o)=>{const i=o.hasScrollY?o.scrollbarSize:0;let a;switch(e){case lr.LEFT:a=r[n];break;case lr.RIGHT:a=o.columnsTotalWidth-r[n]-t+i;break;default:a=0;break}return a},h0={root:ae.scrollbarFiller,header:ae["scrollbarFiller--header"],borderTop:ae["scrollbarFiller--borderTop"],borderBottom:ae["scrollbarFiller--borderBottom"],pinnedRight:ae["scrollbarFiller--pinnedRight"]};function kz({header:e,borderTop:t=!0,borderBottom:n,pinnedRight:r}){return $.jsx("div",{role:"presentation",className:fe(h0.root,e&&h0.header,t&&h0.borderTop,n&&h0.borderBottom,r&&h0.pinnedRight)})}const yIt=Yn("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay",overridesResolver:(e,t)=>t.skeletonLoadingOverlay})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),vIt=e=>{const{classes:t}=e;return Te({root:["skeletonLoadingOverlay"]},xn,t)},Pq=e=>parseInt(e.getAttribute("data-colindex"),10),bIt=y.forwardRef(function(t,n){const r=xt(),{slots:o}=r,i=vIt({classes:r.classes}),a=y.useRef(null),s=Wt(a,n),l=gn(),c=Qe(l,Si),u=(c==null?void 0:c.viewportInnerSize.height)??0,d=Math.ceil(u/c.rowHeight),f=Qe(l,uz),p=Qe(l,Gf),m=y.useMemo(()=>p.filter(E=>E<=f).length,[f,p]),g=Qe(l,fo),v=y.useMemo(()=>g.slice(0,m),[g,m]),w=Qe(l,e1),x=y.useCallback((E,O,k)=>{const A=Iz(k,E,O,p,c);return{[k]:A}},[c,p]),S=y.useCallback(E=>{if(w.left.findIndex(O=>O.field===E)!==-1)return lr.LEFT;if(w.right.findIndex(O=>O.field===E)!==-1)return lr.RIGHT},[w.left,w.right]),P=y.useMemo(()=>{const E=[];for(let O=0;Oee.field===I.field):A-w.left.length,D=R&&x(I.computedWidth,A,R),H=c.columnsTotalWidth0},`skeleton-scrollbar-filler-${O}`))}E.push($.jsx("div",{className:fe(ae.row,ae.rowSkeleton,O===0&&ae["row--firstVisible"]),children:k},`skeleton-row-${O}`))}return E},[o,v,w,d,r.showCellVerticalBorder,c.columnsTotalWidth,c.viewportOuterSize.width,c.rowHeight,c.hasScrollY,c.scrollbarSize,S,x]);return gt(l,"columnResize",E=>{var D,H,B;const{colDef:O,width:k}=E,A=(D=a.current)==null?void 0:D.querySelectorAll(`[data-field="${id(O.field)}"]`);if(!A)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const I=v.findIndex(V=>V.field===O.field),R=S(O.field),L=R===lr.LEFT,F=R===lr.RIGHT,z=getComputedStyle(A[0]).getPropertyValue("--width"),_=parseInt(z,10)-k;if(A&&A.forEach(V=>{V.style.setProperty("--width",`${k}px`)}),L){const V=(H=a.current)==null?void 0:H.querySelectorAll(`.${ae["cell--pinnedLeft"]}`);V==null||V.forEach(W=>{Pq(W)>I&&(W.style.left=`${parseInt(getComputedStyle(W).left,10)-_}px`)})}if(F){const V=(B=a.current)==null?void 0:B.querySelectorAll(`.${ae["cell--pinnedRight"]}`);V==null||V.forEach(W=>{Pq(W)({maxHeight:"calc(100% + 1px)",flexGrow:1,[`& .${Yp.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${Yp.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),TIt=(e,t)=>({from:n,to:r,count:o,page:i})=>e({from:n,to:r,count:o,page:i,estimated:t}),EIt=({from:e,to:t,count:n,estimated:r})=>r?`${e}–${t} of ${n!==-1?n:`more than ${r>t?r:t}`}`:`${e}–${t} of ${n!==-1?n:`more than ${t}`}`,OIt=y.forwardRef(function(t,n){const r=gn(),o=xt(),i=Qe(r,Ri),a=Qe(r,kg),s=Qe(r,Vle),{paginationMode:l,loading:c,estimatedRowCount:u}=o,d=y.useMemo(()=>a===-1&&l==="server"&&c?{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}:{},[c,l,a]),f=y.useMemo(()=>Math.max(0,s-1),[s]),p=y.useMemo(()=>a===-1||i.page<=f?i.page:f,[f,i.page,a]),m=y.useCallback(P=>{const T=Number(P.target.value);r.current.setPageSize(T)},[r]),g=y.useCallback((P,T)=>{r.current.setPage(T)},[r]),w=(P=>{for(let T=0;T{const{classes:t}=e;return Te({root:["rowCount"]},xn,t)},MIt=Yn("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)})),AIt=y.forwardRef(function(t,n){const{className:r,rowCount:o,visibleRowCount:i}=t,a=Ue(t,IIt),s=gn(),l=xt(),c=kIt(l);if(o===0)return null;const u=i=d.left.length&&g=m.lastColumnIndex,ee=$It(z.classes,{root:["row",r&&"selected",ie&&"row--editable",ne&&"row--editing",v&&"row--firstVisible",w&&"row--lastVisible",S&&"row--borderBottom",l==="auto"&&"row--dynamicHeight"]}),ce=L.hooks.useGridRowAriaAttributes();y.useLayoutEffect(()=>{if(_.range){const it=R.current.getRowIndexRelativeToVisibleRows(o);it!==void 0&&R.current.unstable_setLastMeasuredRowIndex(it)}if(F.current&&l==="auto")return R.current.observeRowHeight(F.current,o)},[R,_.range,l,o]);const se=y.useCallback((it,tt)=>pt=>{o1(pt)||R.current.getRow(o)&&(R.current.publishEvent(it,R.current.getRowParams(o),pt),tt&&tt(pt))},[R,o]),Z=y.useCallback(it=>{const tt=iO(it.target,ae.cell),pt=tt==null?void 0:tt.getAttribute("data-field");if(pt){if(pt===fb.field||pt===Yk||pt==="__reorder__"||R.current.getCellMode(o,pt)===Qn.Edit)return;const qt=R.current.getColumn(pt);if((qt==null?void 0:qt.type)===Gk)return}se("rowClick",P)(it)},[R,P,se,o]),{slots:ue,slotProps:ge,disableColumnReorder:we}=z,me=z.rowReordering,be=Qe(R,()=>N({},R.current.getRowHeightEntry(o)),ule),xe=y.useMemo(()=>{if(x)return{opacity:0,width:0,height:0};const it=N({},s,{maxHeight:l==="auto"?"none":l,minHeight:l,"--height":typeof l=="number"?`${l}px`:l});if(be.spacingTop){const tt=z.rowSpacingType==="border"?"borderTopWidth":"marginTop";it[tt]=be.spacingTop}if(be.spacingBottom){const tt=z.rowSpacingType==="border"?"borderBottomWidth":"marginBottom";let pt=it[tt];typeof pt!="number"&&(pt=parseInt(pt||"0",10)),pt+=be.spacingBottom,it[tt]=pt}return it},[x,l,s,be,z.rowSpacingType]),Ee=R.current.unstable_applyPipeProcessors("rowClassName",[],o),Me=G?ce(G,a):void 0;if(typeof z.getRowClassName=="function"){const it=a-(((lt=_.range)==null?void 0:lt.firstRowIndex)||0),tt=N({},R.current.getRowParams(o),{isFirstVisible:it===0,isLastVisible:it===_.rows.length-1,indexRelativeToCurrentPage:it});Ee.push(z.getRowClassName(tt))}const _e=(it,tt,pt,qt,qe=sa.NONE)=>{var Xi;const Re=R.current.unstable_getCellColSpanInfo(o,pt);if(Re!=null&&Re.spannedByColSpan)return null;const Ze=(Re==null?void 0:Re.cellProps.width)??it.computedWidth,Pt=(Re==null?void 0:Re.cellProps.colSpan)??1,_t=Iz(lce[qe],it.computedWidth,pt,B,p);if((G==null?void 0:G.type)==="skeletonRow")return $.jsx(ue.skeletonCell,{type:it.type,width:Ze,height:l,field:it.field,align:it.align},it.field);const kt=((Xi=V[o])==null?void 0:Xi[it.field])??null,yn=it.field==="__reorder__",Fn=Object.keys(V).length>0,Vn=!(we||it.disableReorder),wo=me&&!D.length&&H<=1&&!Fn,xo=!(Vn||yn&&wo),oi=qe===sa.VIRTUAL;return $.jsx(ue.cell,N({column:it,width:Ze,rowId:o,align:it.align||"left",colIndex:pt,colSpan:Pt,disableDragEvents:xo,editCellState:kt,isNotVisible:oi,pinnedOffset:_t,pinnedPosition:qe,sectionIndex:tt,sectionLength:qt,gridHasFiller:Y},ge==null?void 0:ge.cell),it.field)};if(!G)return null;const de=d.left.map((it,tt)=>_e(it,tt,tt,d.left.length,sa.LEFT)),Ae=d.right.map((it,tt)=>{const pt=u.length-d.right.length+tt;return _e(it,tt,pt,d.right.length,sa.RIGHT)}),Oe=u.length-d.left.length-d.right.length,$e=[];pe&&$e.push(_e(u[g],g-d.left.length,g,Oe,sa.VIRTUAL));for(let it=m.firstColumnIndex;it0&&$.jsx(_It,{width:ot}),Ae.length>0&&$.jsx("div",{role:"presentation",className:ae.filler}),Ae,Q!==0&&$.jsx(kz,{pinnedRight:d.right.length>0})]}))}),NIt=Wf(DIt),LIt=()=>{const e=hl(),t=xt(),n=Qe(e,fo),r=Qe(e,gz),o=Qe(e,r1),i=Qe(e,L1t);return{role:"grid","aria-colcount":n.length,"aria-rowcount":o+1+i+r,"aria-multiselectable":vz(t)}},FIt=()=>{const e=hl(),t=Qe(e,ku),n=Qe(e,r1);return y.useCallback((r,o)=>{const i={},a=o+n+2;return i["aria-rowindex"]=a,e.current.isRowSelectable(r.id)&&(i["aria-selected"]=t[r.id]!==void 0),i},[e,t,n])};function jIt({privateApiRef:e,configuration:t,props:n,children:r}){const o=y.useRef(e.current.getPublicApi());return $.jsx(oce.Provider,{value:t,children:$.jsx(lle.Provider,{value:n,children:$.jsx(Zle.Provider,{value:e,children:$.jsx(sle.Provider,{value:o,children:r})})})})}const BIt=e=>{const t=y.useRef(null),n=y.useRef(null),r=y.useRef(null),o=y.useRef(null),i=y.useRef(null),a=y.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:n,virtualScrollerRef:r,virtualScrollbarVerticalRef:o,virtualScrollbarHorizontalRef:i,columnHeadersContainerRef:a})},zIt=e=>{const t=er();e.current.state.isRtl===void 0&&(e.current.state.isRtl=t);const n=y.useRef(!0);y.useEffect(()=>{n.current?n.current=!1:e.current.setState(r=>N({},r,{isRtl:t}))},[e,t])},VIt=u1t()&&window.localStorage.getItem("DEBUG")!=null,L0=()=>{},HIt={debug:L0,info:L0,warn:L0,error:L0},Tq=["debug","info","warn","error"];function Eq(e,t,n=console){const r=Tq.indexOf(t);if(r===-1)throw new Error(`MUI X: Log level ${t} not recognized.`);return Tq.reduce((i,a,s)=>(s>=r?i[a]=(...l)=>{const[c,...u]=l;n[a](`MUI X: ${e} - ${c}`,...u)}:i[a]=L0,i),{})}const UIt=(e,t)=>{const n=y.useCallback(r=>VIt?Eq(r,"debug",t.logger):t.logLevel?Eq(r,t.logLevel.toString(),t.logger):HIt,[t.logLevel,t.logger]);Qt(e,{getLogger:n},"private")};class WIt{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let a=o.length-1;a>=0;a-=1){const s=o[a];r.highPriority.has(s)&&s.apply(this,n)}for(let a=0;a(this.listeners.add(n),()=>{this.listeners.delete(n)}),this.getSnapshot=()=>this.value,this.update=n=>{this.value=n,this.listeners.forEach(r=>r(n))},this.value=t,this.listeners=new Set}}const bce=Symbol("mui.api_private"),GIt=e=>e.isPropagationStopped!==void 0;let Oq=0;function qIt(e){var o;const t=(o=e.current)==null?void 0:o[bce];if(t)return t;const n={},r={state:n,store:Mz.create(n),instanceId:{id:Oq}};return Oq+=1,r.getPublicApi=()=>e.current,r.register=(i,a)=>{Object.keys(a).forEach(s=>{const l=a[s],c=r[s];if((c==null?void 0:c.spying)===!0?c.target=l:r[s]=l,i==="public"){const u=e.current,d=u[s];(d==null?void 0:d.spying)===!0?d.target=l:u[s]=l}})},r.register("private",{caches:{},eventManager:new WIt}),r}function KIt(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[bce]:e.current}}function YIt(e,t){var a;const n=y.useRef(),r=y.useRef();r.current||(r.current=qIt(n)),n.current||(n.current=KIt(r));const o=y.useCallback((...s)=>{const[l,c,u={}]=s;if(u.defaultMuiPrevented=!1,GIt(u)&&u.isPropagationStopped())return;const d=t.signature===Qs.DataGridPro||t.signature===Qs.DataGridPremium?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(l,c,u,d)},[r,t.signature]),i=y.useCallback((s,l,c)=>{r.current.eventManager.on(s,l,c);const u=r.current;return()=>{u.eventManager.removeListener(s,l)}},[r]);return Qt(r,{subscribeEvent:i,publishEvent:o},"public"),e&&!((a=e.current)!=null&&a.state)&&(e.current=n.current),y.useImperativeHandle(e,()=>n.current,[n]),y.useEffect(()=>{const s=r.current;return()=>{s.publishEvent("unmount")}},[r]),r}const XIt=(e,t)=>{const n=y.useCallback(r=>{if(t.localeText[r]==null)throw new Error(`Missing translation for key ${r}.`);return t.localeText[r]},[t.localeText]);e.current.register("public",{getLocaleText:n})},QIt=e=>{const t=y.useRef({}),n=y.useRef(!1),r=y.useCallback(u=>{n.current||!u||(n.current=!0,Object.values(u.appliers).forEach(d=>{d()}),n.current=!1)},[]),o=y.useCallback((u,d,f)=>{t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}});const p=t.current[u];return p.processors.get(d)!==f&&(p.processors.set(d,f),p.processorsAsArray=Array.from(t.current[u].processors.values()),r(p)),()=>{t.current[u].processors.delete(d),t.current[u].processorsAsArray=Array.from(t.current[u].processors.values())}},[r]),i=y.useCallback((u,d,f)=>(t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}}),t.current[u].appliers[d]=f,()=>{const p=t.current[u].appliers,m=Ue(p,[d].map(cv));t.current[u].appliers=m}),[]),a=y.useCallback(u=>{r(t.current[u])},[r]),s=y.useCallback((...u)=>{const[d,f,p]=u;if(!t.current[d])return f;const m=t.current[d].processorsAsArray;let g=f;for(let v=0;v{const r=y.useRef(),o=y.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=y.useCallback(()=>{r.current=e.current.registerPipeProcessor(t,o.current,n)},[e,n,t]);n1(()=>{i()});const a=y.useRef(!0);y.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},Az=(e,t,n)=>{const r=y.useRef(),o=y.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=y.useCallback(()=>{r.current=e.current.registerPipeApplier(t,o.current,n)},[e,n,t]);n1(()=>{i()});const a=y.useRef(!0);y.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},sO=(e,t,n,r)=>{const o=y.useCallback(()=>{e.current.registerStrategyProcessor(t,n,r)},[e,r,n,t]);n1(()=>{o()});const i=y.useRef(!0);y.useEffect(()=>{i.current?i.current=!1:o()},[o])},Ih="none",Iq={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},JIt=e=>{const t=y.useRef(new Map),n=y.useRef({}),r=y.useCallback((l,c,u)=>{const d=()=>{const m=n.current[c],g=Ue(m,[l].map(cv));n.current[c]=g};n.current[c]||(n.current[c]={});const f=n.current[c],p=f[l];return f[l]=u,!p||p===u||l===e.current.getActiveStrategy(Iq[c])&&e.current.publishEvent("activeStrategyProcessorChange",c),d},[e]),o=y.useCallback((l,c)=>{const u=e.current.getActiveStrategy(Iq[l]);if(u==null)throw new Error("Can't apply a strategy processor before defining an active strategy");const d=n.current[l];if(!d||!d[u])throw new Error(`No processor found for processor "${l}" on strategy "${u}"`);const f=d[u];return f(c)},[e]),i=y.useCallback(l=>{const u=Array.from(t.current.entries()).find(([,d])=>d.group!==l?!1:d.isAvailable());return(u==null?void 0:u[0])??Ih},[]),a=y.useCallback((l,c,u)=>{t.current.set(c,{group:l,isAvailable:u}),e.current.publishEvent("strategyAvailabilityChange")},[e]);Qt(e,{registerStrategyProcessor:r,applyStrategyProcessor:o,getActiveStrategy:i,setStrategyAvailability:a},"private")},ZIt=e=>{const t=y.useRef({}),[,n]=y.useState(),r=y.useCallback(c=>{t.current[c.stateId]=c},[]),o=y.useCallback((c,u)=>{let d;if(vle(c)?d=c(e.current.state):d=c,e.current.state===d)return!1;let f=!1;const p=[];if(Object.keys(t.current).forEach(m=>{const g=t.current[m],v=g.stateSelector(e.current.state,e.current.instanceId),w=g.stateSelector(d,e.current.instanceId);w!==v&&(p.push({stateId:g.stateId,hasPropChanged:w!==g.propModel}),g.propModel!==void 0&&w!==g.propModel&&(f=!0))}),p.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${p[0].stateId}, therefore, you're not allowed to update ${p.map(m=>m.stateId).join(", ")} in the same transaction.`);if(f||(e.current.state=d,e.current.publishEvent("stateChange",d),e.current.store.update(d)),p.length===1){const{stateId:m,hasPropChanged:g}=p[0],v=t.current[m],w=v.stateSelector(d,e.current.instanceId);v.propOnChange&&g&&v.propOnChange(w,{reason:u,api:e.current}),f||e.current.publishEvent(v.changeEvent,w,{reason:u})}return!f},[e]),i=y.useCallback((c,u,d)=>e.current.setState(f=>N({},f,{[c]:u(f[c])}),d),[e]),a=y.useCallback(()=>n(()=>e.current.state),[e]),s={setState:o,forceUpdate:a},l={updateControlState:i,registerControlState:r};Qt(e,s,"public"),Qt(e,l,"private")},ekt=(e,t)=>{const n=YIt(e,t);return BIt(n),zIt(n),UIt(n,t),ZIt(n),QIt(n),JIt(n),XIt(n,t),n.current.register("private",{rootProps:t}),n},_o=(e,t,n)=>{const r=y.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)};function LN(e,t){if(e==null)return"";const n=typeof e=="string"?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const r=n.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@"," ","\r"].includes(r[0])?`"'${r}"`:[t.delimiter,` -`,"\r",'"'].some(o=>n.includes(o))?`"${r}"`:r}return n}const wce=(e,t)=>{var i,a;const{csvOptions:n,ignoreValueFormatter:r}=t;let o;if(r){const s=e.colDef.type;s==="number"?o=String(e.value):s==="date"||s==="dateTime"?o=(i=e.value)==null?void 0:i.toISOString():typeof((a=e.value)==null?void 0:a.toString)=="function"?o=e.value.toString():o=e.value}else o=e.formattedValue;return LN(o,n)};class FN{constructor(t){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=t}addValue(t){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(t,this.options.csvOptions):this.rowString+=t,this.isEmpty=!1}getRowString(){return this.rowString}}const tkt=({id:e,columns:t,getCellParams:n,csvOptions:r,ignoreValueFormatter:o})=>{const i=new FN({csvOptions:r});return t.forEach(a=>{const s=n(e,a.field);i.addValue(wce(s,{ignoreValueFormatter:o,csvOptions:r}))}),i.getRowString()};function nkt(e){const{columns:t,rowIds:n,csvOptions:r,ignoreValueFormatter:o,apiRef:i}=e,a=n.reduce((d,f)=>`${d}${tkt({id:f,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:o,csvOptions:r})}\r -`,"").trim();if(!r.includeHeaders)return a;const s=t.filter(d=>d.field!==fb.field),l=[];if(r.includeColumnGroupsHeaders){const d=i.current.getAllGroupDetails();let f=0;const p=s.reduce((m,g)=>{const v=i.current.getColumnGroupPath(g.field);return m[g.field]=v,f=Math.max(f,v.length),m},{});for(let m=0;m{const w=(p[v.field]||[])[m],x=d[w];g.addValue(x?x.headerName||x.groupId:"")})}}const c=new FN({csvOptions:r,sanitizeCellValue:LN});return s.forEach(d=>{c.addValue(d.headerName||d.field)}),l.push(c),`${`${l.map(d=>d.getRowString()).join(`\r + & .${ae["row--borderBottom"]} .${ae.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${ae["row--borderBottom"]} .${ae.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${ae.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${ae["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ae.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":T},[`& .${ae["container--top"]}, & .${ae["container--bottom"]}`]:{"[role=row]":{background:"var(--DataGrid-containerBackground)"}},[`& .${ae.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":T},[`& .${ae["virtualScrollerContent--overflowed"]} .${ae["row--lastVisible"]} .${ae.cell}`]:{borderTopColor:"transparent"},[`& .${ae["pinnedRows--top"]} :first-of-type`]:{[`& .${ae.cell}, .${ae.scrollbarFiller}`]:{borderTop:"none"}},[`&.${ae["root--disableUserSelection"]} .${ae.cell}`]:{userSelect:"none"},[`& .${ae["row--dynamicHeight"]} > .${ae.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${ae.cellEmpty}`]:{padding:0,height:"unset"},[`& .${ae.cell}.${ae["cell--selectionMode"]}`]:{cursor:"default"},[`& .${ae.cell}.${ae["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.paper,"&:focus-within":{outline:`${Gm}px solid ${(e.vars||e).palette.primary.main}`,outlineOffset:Gm*-1}},[`& .${ae["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${ae["row--editing"]} .${ae.cell}`]:{boxShadow:e.shadows[0],backgroundColor:(e.vars||e).palette.background.paper},[`& .${ae.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${ae.booleanCell}[data-value="true"]`]:{color:(e.vars||e).palette.text.secondary},[`& .${ae.booleanCell}[data-value="false"]`]:{color:(e.vars||e).palette.text.disabled},[`& .${ae.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${ae.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${ae["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${ae.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${ae.withBorderColor}`]:{borderColor:r},[`& .${ae["cell--withLeftBorder"]}, & .${ae["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${ae["cell--withRightBorder"]}, & .${ae["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${ae["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${ae["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${ae["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${ae["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${ae["cell--pinnedLeft"]}, & .${ae["cell--pinnedRight"]}`]:{position:"sticky",zIndex:3,background:"var(--DataGrid-pinnedBackground)","&.Mui-selected":{backgroundColor:x}},[`& .${ae.virtualScrollerContent} .${ae.row}`]:{"&:hover":b,"&.Mui-selected":S,"&.Mui-selected:hover":E},[`& .${ae.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${ae.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${ae.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${ae.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${ae["columnHeader--dragging"]}, & .${ae["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${ae["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity,[`& .${ae.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${ae.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${ae.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${ae.treeDataGroupingCellLoadingContainer}, .${ae.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${ae.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${ae.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`.${ae.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${ae["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${ae["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${ae["scrollbarFiller--pinnedRight"]}`]:{backgroundColor:"var(--DataGrid-pinnedBackground)",position:"sticky",right:0}},[`& .${ae.filler}`]:{flex:"1 0 auto"},[`& .${ae["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${ae["main--hasSkeletonLoadingOverlay"]}`]:{[`& .${ae.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${ae["scrollbar--vertical"]}, & .${ae.pinnedRows}, & .${ae.virtualScroller} > .${ae.filler}`]:{display:"none"}}})});function jEt(e,t,n,r=1){const o=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),i=Rc(e),a=Rc(t),s=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return tS({type:"rgb",values:s})}const BEt=e=>`rgb(from ${e} r g b / 1)`;function zEt(e,t,n){return`color-mix(in srgb,${e}, ${BEt(t)} calc(${n} * 100%))`}const VEt=["className"],HEt=(e,t)=>{const{autoHeight:n,classes:r,showCellVerticalBorder:o}=e,i={root:["root",n&&"autoHeight",`root--density${Se(t)}`,e.slots.toolbar===null&&"root--noToolbar","withBorderColor",o&&"withVerticalBorder"]};return Te(i,Sn,r)},UEt=$n(function(t,n){const r=wt(),{className:o}=t,i=Ue(t,VEt),a=pl(),s=Ye(a,Ig),l=a.current.rootElementRef,c=Wt(l,n),u=r,d=HEt(u,s),[f,p]=v.useState(!1);return xn(()=>{p(!0)},[]),f?$.jsx(FEt,D({className:pe(d.root,o),ownerState:u},i,{ref:c})):null}),WEt=["className"],GEt=e=>{const{classes:t}=e;return Te({root:["footerContainer","withBorderColor"]},Sn,t)},qEt=Qn("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),KEt=$n(function(t,n){const{className:r}=t,o=Ue(t,WEt),i=wt(),a=GEt(i);return $.jsx(qEt,D({className:pe(a.root,r),ownerState:i},o,{ref:n}))}),YEt=["className"],XEt=e=>{const{classes:t}=e;return Te({root:["overlay"]},Sn,t)},QEt=Qn("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),Tz=$n(function(t,n){const{className:r}=t,o=Ue(t,YEt),i=wt(),a=XEt(i);return $.jsx(QEt,D({className:pe(a.root,r),ownerState:i},o,{ref:n}))}),JEt=e=>{const{classes:t,open:n}=e;return Te({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},Sn,t)},ZEt=v.memo(e=>{var d,f;const{colDef:t,open:n,columnMenuId:r,columnMenuButtonId:o,iconButtonRef:i}=e,a=sn(),s=wt(),l=D({},e,{classes:s.classes}),c=JEt(l),u=v.useCallback(p=>{p.preventDefault(),p.stopPropagation(),a.current.toggleColumnMenu(t.field)},[a,t.field]);return $.jsx("div",{className:c.root,children:$.jsx(s.slots.baseTooltip,D({title:a.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},(d=s.slotProps)==null?void 0:d.baseTooltip,{children:$.jsx(s.slots.baseIconButton,D({ref:i,tabIndex:-1,className:c.button,"aria-label":a.current.getLocaleText("columnMenuLabel"),size:"small",onClick:u,"aria-haspopup":"menu","aria-expanded":n,"aria-controls":n?r:void 0,id:o},(f=s.slotProps)==null?void 0:f.baseIconButton,{children:$.jsx(s.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})});function eTt({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:o,open:i,target:a,onExited:s}){const l=sn(),c=l.current.getColumn(o),u=Ze(d=>{d&&(d.stopPropagation(),a!=null&&a.contains(d.target))||l.current.hideColumnMenu()});return!a||!c?null:$.jsx(hz,{placement:`bottom-${c.align==="right"?"start":"end"}`,open:i,target:a,onClose:u,onExited:s,children:$.jsx(n,D({colDef:c,hideMenu:u,open:i,id:e,labelledby:t},r))})}function tTt(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function tO(e,t){return e.closest(`.${t}`)}function id(e){return e.replace(/["\\]/g,"\\$&")}function nTt(e,t){return e.querySelector(`[role="columnheader"][data-field="${id(t)}"]`)}function sce(e){return`.${ae.row}[data-id="${id(String(e))}"]`}function rTt(e,t){return e.querySelector(sce(t))}function oTt(e,{id:t,field:n}){const r=sce(t),o=`.${ae.cell}[data-field="${id(n)}"]`,i=`${r} ${o}`;return e.querySelector(i)}function r1(e){return e.target.nodeType===1&&!e.currentTarget.contains(e.target)}function iTt(e){return e.getAttribute("data-field")}function aTt(e,t){return e.querySelector(`[data-field="${id(t)}"]`)}function sTt(e){return e.getAttribute("data-fields").slice(2,-2).split("-|-")}function lTt(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${id(t)}-|"]`)??[])}function cTt(e,t){var a;if(!tO(e,ae.root))throw new Error("MUI X: The root element is not found.");const r=e.getAttribute("aria-colindex");if(!r)return[];const o=Number(r)-1,i=[];return(a=t.virtualScrollerRef)!=null&&a.current?(uce(t).forEach(s=>{const l=s.getAttribute("data-id");if(!l)return;let c=o;const u=t.unstable_getCellColSpanInfo(l,o);u&&u.spannedByColSpan&&(c=u.leftVisibleCellIndex);const d=s.querySelector(`[data-colindex="${c}"]`);d&&i.push(d)}),i):[]}function hq(e,t){return e.rootElementRef.current.querySelector(`.${ae[t]}`)}const lce=({api:e,colIndex:t,position:n,filterFn:r})=>{if(t===null)return[];const o=[];return uce(e).forEach(i=>{i.getAttribute("data-id")&&i.querySelectorAll(`.${ae[n==="left"?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(s=>{const l=hb(s);l!==null&&r(l)&&o.push(s)})}),o};function uTt(e,t,n){const r=hb(t);return lce({api:e,colIndex:r,position:n?"right":"left",filterFn:o=>n?or})}function dTt(e,t,n){const r=hb(t);return lce({api:e,colIndex:r,position:n?"left":"right",filterFn:o=>n?o>r:o{var i;if(!((i=e.columnHeadersContainerRef)!=null&&i.current))return[];if(t===null)return[];const o=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${ae[n==="left"?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(a=>{const s=hb(a);s!==null&&r(s)&&o.push(a)}),o};function fTt(e,t,n){const r=hb(t);return cce({api:e,position:n?"right":"left",colIndex:r,filterFn:o=>n?or})}function pTt(e,t,n){const r=hb(t);return cce({api:e,position:n?"left":"right",colIndex:r,filterFn:o=>n?o>r:o div > [data-field="${id(t)}"][role="columnheader"]`)}function mTt(e,t){const n=e.virtualScrollerRef.current;return Array.from(n.querySelectorAll(`:scope > div > div > div > [data-field="${id(t)}"][role="gridcell"]`))}function uce(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${ae.row}`)}function hb(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}const gTt=["className","aria-label"],yTt=e=>{const{classes:t}=e;return Te({root:["columnHeaderTitle"]},Sn,t)},vTt=Qn("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),bTt=$n(function(t,n){const{className:r}=t,o=Ue(t,gTt),i=wt(),a=yTt(i);return $.jsx(vTt,D({className:pe(a.root,r),ownerState:i},o,{ref:n}))});function wTt(e){var l;const{label:t,description:n}=e,r=wt(),o=v.useRef(null),[i,a]=v.useState(""),s=v.useCallback(()=>{if(!n&&(o!=null&&o.current)){const c=tTt(o.current);a(c?t:"")}},[n,t]);return $.jsx(r.slots.baseTooltip,D({title:n||i},(l=r.slotProps)==null?void 0:l.baseTooltip,{children:$.jsx(bTt,{onMouseOver:s,ref:o,children:t})}))}const xTt=["resizable","resizing","height","side"];var Oz=function(e){return e.Left="left",e.Right="right",e}(Oz||{});const STt=e=>{const{resizable:t,resizing:n,classes:r,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${Se(o)}`],icon:["iconSeparator"]};return Te(i,Sn,r)};function CTt(e){const{height:t,side:n=Oz.Right}=e,r=Ue(e,xTt),o=wt(),i=D({},e,{side:n,classes:o.classes}),a=STt(i),s=v.useCallback(l=>{l.preventDefault(),l.stopPropagation()},[]);return $.jsx("div",D({className:a.root,style:{minHeight:t}},r,{onClick:s,children:$.jsx(o.slots.columnResizeIcon,{className:a.icon})}))}const PTt=v.memo(CTt),ETt=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],dce=$n(function(t,n){const{classes:r,colIndex:o,height:i,isResizing:a,sortDirection:s,hasFocus:l,tabIndex:c,separatorSide:u,isDraggable:d,headerComponent:f,description:p,width:m,columnMenuIconButton:g=null,columnMenu:y=null,columnTitleIconButtons:b=null,headerClassName:x,label:S,resizable:P,draggableContainerProps:E,columnHeaderSeparatorProps:T,style:O}=t,k=Ue(t,ETt),M=pl(),I=wt(),R=v.useRef(null),_=Wt(R,n);let N="none";return s!=null&&(N=s==="asc"?"ascending":"descending"),v.useLayoutEffect(()=>{var L;const B=M.current.state.columnMenu;if(l&&!B.open){const U=R.current.querySelector('[tabindex="0"]')||R.current;U==null||U.focus(),(L=M.current.columnHeadersContainerRef)!=null&&L.current&&(M.current.columnHeadersContainerRef.current.scrollLeft=0)}},[M,l]),$.jsxs("div",D({className:pe(r.root,x),style:D({},O,{height:i,width:m}),role:"columnheader",tabIndex:c,"aria-colindex":o+1,"aria-sort":N},k,{ref:_,children:[$.jsxs("div",D({className:r.draggableContainer,draggable:d,role:"presentation"},E,{children:[$.jsxs("div",{className:r.titleContainer,role:"presentation",children:[$.jsx("div",{className:r.titleContainerContent,children:f!==void 0?f:$.jsx(wTt,{label:S,description:p,columnWidth:m})}),b]}),g]})),$.jsx(PTt,D({resizable:!I.disableColumnResize&&!!P,resizing:a,height:i,side:u},T)),y]}))}),TTt=e=>{const{colDef:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:i,showLeftBorder:a,filterItemsCounter:s,pinnedPosition:l,isLastUnpinned:c,isSiblingFocused:u}=e,d=o!=null,f=s!=null&&s>0,p=t.type==="number",m={root:["columnHeader",t.headerAlign==="left"&&"columnHeader--alignLeft",t.headerAlign==="center"&&"columnHeader--alignCenter",t.headerAlign==="right"&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",d&&"columnHeader--sorted",f&&"columnHeader--filtered",p&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder",l==="left"&&"columnHeader--pinnedLeft",l==="right"&&"columnHeader--pinnedRight",c&&"columnHeader--lastUnpinned",u&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return Te(m,Sn,n)};function OTt(e){var ee,ce,le;const{colDef:t,columnMenuOpen:n,colIndex:r,headerHeight:o,isResizing:i,isLast:a,sortDirection:s,sortIndex:l,filterItemsCounter:c,hasFocus:u,tabIndex:d,disableReorder:f,separatorSide:p,style:m,pinnedPosition:g,indexInSection:y,sectionLength:b,gridHasFiller:x}=e,S=pl(),P=wt(),E=v.useRef(null),T=_n(),O=_n(),k=v.useRef(null),[M,I]=v.useState(n),R=v.useMemo(()=>!P.disableColumnReorder&&!f&&!t.disableReorder,[P.disableColumnReorder,f,t.disableReorder]);let _;t.renderHeader&&(_=t.renderHeader(S.current.getColumnHeaderParams(t.field)));const N=tM(g,y),B=eM(g,y,b,P.showColumnVerticalBorder,x),L=D({},e,{classes:P.classes,showRightBorder:B,showLeftBorder:N}),F=TTt(L),U=v.useCallback(Q=>ue=>{r1(ue)||S.current.publishEvent(Q,S.current.getColumnHeaderParams(t.field),ue)},[S,t.field]),V=v.useMemo(()=>({onClick:U("columnHeaderClick"),onContextMenu:U("columnHeaderContextMenu"),onDoubleClick:U("columnHeaderDoubleClick"),onMouseOver:U("columnHeaderOver"),onMouseOut:U("columnHeaderOut"),onMouseEnter:U("columnHeaderEnter"),onMouseLeave:U("columnHeaderLeave"),onKeyDown:U("columnHeaderKeyDown"),onFocus:U("columnHeaderFocus"),onBlur:U("columnHeaderBlur")}),[U]),z=v.useMemo(()=>R?{onDragStart:U("columnHeaderDragStart"),onDragEnter:U("columnHeaderDragEnter"),onDragOver:U("columnHeaderDragOver"),onDragEnd:U("columnHeaderDragEnd")}:{},[R,U]),W=v.useMemo(()=>({onMouseDown:U("columnSeparatorMouseDown"),onDoubleClick:U("columnSeparatorDoubleClick")}),[U]);v.useEffect(()=>{M||I(n)},[M,n]);const G=v.useCallback(()=>{I(!1)},[]),J=!P.disableColumnMenu&&!t.disableColumnMenu&&$.jsx(ZEt,{colDef:t,columnMenuId:T,columnMenuButtonId:O,open:M,iconButtonRef:k}),K=$.jsx(eTt,{columnMenuId:T,columnMenuButtonId:O,field:t.field,open:n,target:k.current,ContentComponent:P.slots.columnMenu,contentComponentProps:(ee=P.slotProps)==null?void 0:ee.columnMenu,onExited:G}),ne=t.sortingOrder??P.sortingOrder,re=(t.sortable||s!=null)&&!t.hideSortIcons&&!P.disableColumnSorting,oe=$.jsxs(v.Fragment,{children:[!P.disableColumnFilter&&$.jsx(P.slots.columnHeaderFilterIconButton,D({field:t.field,counter:c},(ce=P.slotProps)==null?void 0:ce.columnHeaderFilterIconButton)),re&&$.jsx(P.slots.columnHeaderSortIcon,D({field:t.field,direction:s,index:l,sortingOrder:ne,disabled:!t.sortable},(le=P.slotProps)==null?void 0:le.columnHeaderSortIcon))]});v.useLayoutEffect(()=>{var ue;const Q=S.current.state.columnMenu;if(u&&!Q.open){const xe=E.current.querySelector('[tabindex="0"]')||E.current;xe==null||xe.focus(),(ue=S.current.columnHeadersContainerRef)!=null&&ue.current&&(S.current.columnHeadersContainerRef.current.scrollLeft=0)}},[S,u]);const fe=typeof t.headerClassName=="function"?t.headerClassName({field:t.field,colDef:t}):t.headerClassName,se=t.headerName??t.field;return $.jsx(dce,D({ref:E,classes:F,columnMenuOpen:n,colIndex:r,height:o,isResizing:i,sortDirection:s,hasFocus:u,tabIndex:d,separatorSide:p,isDraggable:R,headerComponent:_,description:t.description,elementId:t.field,width:t.computedWidth,columnMenuIconButton:J,columnTitleIconButtons:oe,headerClassName:pe(fe,a&&ae["columnHeader--last"]),label:se,resizable:!P.disableColumnResize&&!!t.resizable,"data-field":t.field,columnMenu:K,draggableContainerProps:z,columnHeaderSeparatorProps:W,style:m},V))}const ITt=Wf(OTt),kTt=["className"],MTt=e=>{const{classes:t}=e;return Te({root:["iconButtonContainer"]},Sn,t)},ATt=Qn("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})(()=>({display:"flex",visibility:"hidden",width:0})),fce=$n(function(t,n){const{className:r}=t,o=Ue(t,kTt),i=wt(),a=MTt(i);return $.jsx(ATt,D({className:pe(a.root,r),ownerState:i},o,{ref:n}))}),$Tt=["direction","index","sortingOrder","disabled"],RTt=e=>{const{classes:t}=e;return Te({icon:["sortIcon"]},Sn,t)};function DTt(e,t,n,r){let o;const i={};return t==="asc"?o=e.columnSortedAscendingIcon:t==="desc"?o=e.columnSortedDescendingIcon:(o=e.columnUnsortedIcon,i.sortingOrder=r),o?$.jsx(o,D({fontSize:"small",className:n},i)):null}function _Tt(e){var f;const{direction:t,index:n,sortingOrder:r,disabled:o}=e,i=Ue(e,$Tt),a=sn(),s=wt(),l=D({},e,{classes:s.classes}),c=RTt(l),u=DTt(s.slots,t,c.icon,r);if(!u)return null;const d=$.jsx(s.slots.baseIconButton,D({tabIndex:-1,"aria-label":a.current.getLocaleText("columnHeaderSortIconLabel"),title:a.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:o},(f=s.slotProps)==null?void 0:f.baseIconButton,i,{children:u}));return $.jsxs(fce,{children:[n!=null&&$.jsx(s.slots.baseBadge,{badgeContent:n,color:"default",overlap:"circular",children:d}),n==null&&d]})}const LTt=v.memo(_Tt),NTt=e=>{const{classes:t}=e;return Te({icon:["filterIcon"]},Sn,t)};function FTt(e){var m,g;const{counter:t,field:n,onClick:r}=e,o=sn(),i=wt(),a=D({},e,{classes:i.classes}),s=NTt(a),l=Ye(o,Bx),c=_n(),u=_n(),d=v.useCallback(y=>{y.preventDefault(),y.stopPropagation();const{open:b,openedPanelValue:x}=Bx(o.current.state);b&&x===Oh.filters?o.current.hideFilterPanel():o.current.showFilterPanel(void 0,u,c),r&&r(o.current.getColumnHeaderParams(n),y)},[o,n,r,u,c]);if(!t)return null;const f=l.open&&l.labelId===c,p=$.jsx(i.slots.baseIconButton,D({id:c,onClick:d,color:"default","aria-label":o.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":f,"aria-controls":f?u:void 0},(m=i.slotProps)==null?void 0:m.baseIconButton,{children:$.jsx(i.slots.columnFilteredIcon,{className:s.icon,fontSize:"small"})}));return $.jsx(i.slots.baseTooltip,D({title:o.current.getLocaleText("columnHeaderFiltersTooltipActive")(t),enterDelay:1e3},(g=i.slotProps)==null?void 0:g.baseTooltip,{children:$.jsxs(fce,{children:[t>1&&$.jsx(i.slots.baseBadge,{badgeContent:t,color:"default",children:p}),t===1&&p]})}))}const mq=lt($.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),gq=lt($.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),yq=lt($.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),vq=lt($.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),jTt=lt($.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),bq=lt($.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),BTt=lt($.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");lt($.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");lt($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");const zTt=lt($.jsx("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon"),VTt=lt($.jsx("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"}),"Separator"),HTt=lt($.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),UTt=lt($.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),WTt=lt($.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),GTt=lt($.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),yR=lt($.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),wq=lt($.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),qTt=lt($.jsx("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),KTt=lt($.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),xq=lt($.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),YTt=lt($.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),XTt=lt($.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),QTt=lt($.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),JTt=lt($.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),ZTt=lt($.jsx("g",{children:$.jsx("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),eOt=lt($.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");lt($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");const tOt=lt($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");function pce(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}const nO=e=>e.indexOf("Arrow")===0||e.indexOf("Page")===0||e===" "||e==="Home"||e==="End",nOt=e=>!!e.key,hce=e=>e==="Tab"||e==="Escape";function mce(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="V"&&!e.shiftKey&&!e.altKey}function rOt(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="C"&&!e.shiftKey&&!e.altKey}const oOt=["hideMenu","colDef","id","labelledby","className","children","open"],iOt=ie(Ev)(()=>({minWidth:248})),aOt=$n(function(t,n){const{hideMenu:r,id:o,labelledby:i,className:a,children:s,open:l}=t,c=Ue(t,oOt),u=v.useCallback(d=>{d.key==="Tab"&&d.preventDefault(),hce(d.key)&&r(d)},[r]);return $.jsx(iOt,D({id:o,className:pe(ae.menuList,a),"aria-labelledby":i,onKeyDown:u,autoFocus:l},c,{ref:n,children:s}))}),sOt=["displayOrder"],lOt=e=>{const t=pl(),n=wt(),{defaultSlots:r,defaultSlotProps:o,slots:i={},slotProps:a={},hideMenu:s,colDef:l,addDividers:c=!0}=e,u=v.useMemo(()=>D({},r,i),[r,i]),d=v.useMemo(()=>{if(!a||Object.keys(a).length===0)return o;const m=D({},a);return Object.entries(o).forEach(([g,y])=>{m[g]=D({},y,a[g]||{})}),m},[o,a]),f=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),p=v.useMemo(()=>{const m=Object.keys(r);return Object.keys(i).filter(g=>!m.includes(g))},[i,r]);return v.useMemo(()=>{const y=Array.from(new Set([...f,...p])).filter(b=>u[b]!=null).sort((b,x)=>{const S=d[b],P=d[x],E=Number.isFinite(S==null?void 0:S.displayOrder)?S.displayOrder:100,T=Number.isFinite(P==null?void 0:P.displayOrder)?P.displayOrder:100;return E-T});return y.reduce((b,x,S)=>{let P={colDef:l,onClick:s};const E=d[x];if(E){const T=Ue(E,sOt);P=D({},P,T)}return c&&S!==y.length-1?[...b,[u[x],P],[n.slots.baseDivider,{}]]:[...b,[u[x],P]]},[])},[c,l,f,s,u,d,p,n.slots.baseDivider])};function cOt(e){const{colDef:t,onClick:n}=e,r=sn(),o=wt(),s=ho(r).filter(c=>c.disableColumnMenu!==!0).length===1,l=v.useCallback(c=>{s||(r.current.setColumnVisibility(t.field,!1),n(c))},[r,t.field,n,s]);return o.disableColumnSelector||t.hideable===!1?null:$.jsxs(tn,{onClick:l,disabled:s,children:[$.jsx(zi,{children:$.jsx(o.slots.columnMenuHideIcon,{fontSize:"small"})}),$.jsx(go,{children:r.current.getLocaleText("columnMenuHideColumn")})]})}function uOt(e){const{onClick:t}=e,n=sn(),r=wt(),o=v.useCallback(i=>{t(i),n.current.showPreferences(Oh.columns)},[n,t]);return r.disableColumnSelector?null:$.jsxs(tn,{onClick:o,children:[$.jsx(zi,{children:$.jsx(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),$.jsx(go,{children:n.current.getLocaleText("columnMenuManageColumns")})]})}function dOt(e){return $.jsxs(v.Fragment,{children:[$.jsx(cOt,D({},e)),$.jsx(uOt,D({},e))]})}function fOt(e){const{colDef:t,onClick:n}=e,r=sn(),o=wt(),i=v.useCallback(a=>{n(a),r.current.showFilterPanel(t.field)},[r,t.field,n]);return o.disableColumnFilter||!t.filterable?null:$.jsxs(tn,{onClick:i,children:[$.jsx(zi,{children:$.jsx(o.slots.columnMenuFilterIcon,{fontSize:"small"})}),$.jsx(go,{children:r.current.getLocaleText("columnMenuFilter")})]})}function pOt(e){const{colDef:t,onClick:n}=e,r=sn(),o=Ye(r,ks),i=wt(),a=v.useMemo(()=>{if(!t)return null;const u=o.find(d=>d.field===t.field);return u==null?void 0:u.sort},[t,o]),s=t.sortingOrder??i.sortingOrder,l=v.useCallback(u=>{n(u);const d=u.currentTarget.getAttribute("data-value")||null;r.current.sortColumn(t.field,d===a?null:d)},[r,t,n,a]);if(i.disableColumnSorting||!t||!t.sortable||!s.some(u=>!!u))return null;const c=u=>{const d=r.current.getLocaleText(u);return typeof d=="function"?d(t):d};return $.jsxs(v.Fragment,{children:[s.includes("asc")&&a!=="asc"?$.jsxs(tn,{onClick:l,"data-value":"asc",children:[$.jsx(zi,{children:$.jsx(i.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),$.jsx(go,{children:c("columnMenuSortAsc")})]}):null,s.includes("desc")&&a!=="desc"?$.jsxs(tn,{onClick:l,"data-value":"desc",children:[$.jsx(zi,{children:$.jsx(i.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),$.jsx(go,{children:c("columnMenuSortDesc")})]}):null,s.includes(null)&&a!=null?$.jsxs(tn,{onClick:l,children:[$.jsx(zi,{}),$.jsx(go,{children:r.current.getLocaleText("columnMenuUnsort")})]}):null]})}const hOt=["defaultSlots","defaultSlotProps","slots","slotProps"],mOt={columnMenuSortItem:pOt,columnMenuFilterItem:fOt,columnMenuColumnsItem:dOt},gOt={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},yOt=$n(function(t,n){const{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}=t,s=Ue(t,hOt),l=lOt(D({},s,{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}));return $.jsx(aOt,D({},s,{ref:n,children:l.map(([c,u],d)=>$.jsx(c,D({},u),d))}))}),vOt=$n(function(t,n){return $.jsx(yOt,D({},t,{ref:n,defaultSlots:mOt,defaultSlotProps:gOt}))}),bOt=["className","slotProps"],wOt=e=>{const{classes:t}=e;return Te({root:["panelWrapper"]},Sn,t)},xOt=ie("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),SOt=()=>!0,gce=$n(function(t,n){const{className:r,slotProps:o={}}=t,i=Ue(t,bOt),a=wt(),s=wOt(a);return $.jsx(EF,D({open:!0,disableEnforceFocus:!0,isEnabled:SOt},o.TrapFocus,{children:$.jsx(xOt,D({tabIndex:-1,className:pe(s.root,r),ownerState:a},i,{ref:n}))}))});function COt(e){var n;const t=wt();return $.jsx(gce,D({},e,{children:$.jsx(t.slots.columnsManagement,D({},(n=t.slotProps)==null?void 0:n.columnsManagement))}))}const POt=["children","className","classes"],EOt=Le("MuiDataGrid",["panel","paper"]),TOt=ie($f,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})(({theme:e})=>({zIndex:e.zIndex.modal})),OOt=ie(so,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,minWidth:300,maxHeight:450,display:"flex",maxWidth:`calc(100vw - ${e.spacing(.5)})`,overflow:"auto"})),IOt=$n((e,t)=>{const{children:n,className:r}=e,o=Ue(e,POt),i=sn(),a=wt(),s=EOt,[l,c]=v.useState(!1),u=v.useCallback(()=>{i.current.hidePreferences()},[i]),d=v.useCallback(g=>{g.key==="Escape"&&i.current.hidePreferences()},[i]),f=v.useMemo(()=>[{name:"flip",enabled:!0,options:{rootBoundary:"document"}},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{c(!0)},effect:()=>()=>{c(!1)}}],[]),[p,m]=v.useState(null);return v.useEffect(()=>{var y,b;const g=(b=(y=i.current.rootElementRef)==null?void 0:y.current)==null?void 0:b.querySelector('[data-id="gridPanelAnchor"]');g&&m(g)},[i]),p?$.jsx(TOt,D({placement:"bottom-start",className:pe(s.panel,r),ownerState:a,anchorEl:p,modifiers:f},o,{ref:t,children:$.jsx(PF,{mouseEvent:"onMouseUp",onClickAway:u,children:$.jsx(OOt,{className:s.paper,ownerState:a,elevation:8,onKeyDown:d,children:l&&n})})})):null}),kOt=["className"],MOt=e=>{const{classes:t}=e;return Te({root:["panelContent"]},Sn,t)},AOt=Qn("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function $Ot(e){const{className:t}=e,n=Ue(e,kOt),r=wt(),o=MOt(r);return $.jsx(AOt,D({className:pe(o.root,t),ownerState:r},n))}const ROt=["className"],DOt=e=>{const{classes:t}=e;return Te({root:["panelFooter"]},Sn,t)},_Ot=Qn("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})(({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"}));function LOt(e){const{className:t}=e,n=Ue(e,ROt),r=wt(),o=DOt(r);return $.jsx(_Ot,D({className:pe(o.root,t),ownerState:r},n))}const NOt=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],FOt=["InputComponentProps"],jOt=e=>{const{classes:t}=e;return Te({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},Sn,t)},BOt=ie("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})(({theme:e})=>({display:"flex",padding:e.spacing(1)})),zOt=ie("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})(({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)})),VOt=ie("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),HOt=ie("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),UOt=ie("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:150}),WOt=ie("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),GOt=e=>{switch(e){case _i.And:return"filterPanelOperatorAnd";case _i.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}},p0=e=>e.headerName||e.field,Sq=new Intl.Collator,Cq=$n(function(t,n){var xe,me,be,we,Oe,ke,je,de,Re;const{item:r,hasMultipleFilters:o,deleteFilter:i,applyFilterChanges:a,showMultiFilterOperators:s,disableMultiFilterOperator:l,applyMultiFilterOperatorChanges:c,focusElementRef:u,logicOperators:d=[_i.And,_i.Or],columnsSort:f,filterColumns:p,deleteIconProps:m={},logicOperatorInputProps:g={},operatorInputProps:y={},columnInputProps:b={},valueInputProps:x={},readOnly:S}=t,P=Ue(t,NOt),E=sn(),T=Ye(E,od),O=Ye(E,fle),k=Ye(E,Qo),M=_n(),I=_n(),R=_n(),_=_n(),N=wt(),B=jOt(N),L=v.useRef(null),F=v.useRef(null),U=k.logicOperator??_i.And,V=o&&d.length>0,z=((xe=N.slotProps)==null?void 0:xe.baseFormControl)||{},G=(((me=N.slotProps)==null?void 0:me.baseSelect)||{}).native??!1,J=((be=N.slotProps)==null?void 0:be.baseInputLabel)||{},K=((we=N.slotProps)==null?void 0:we.baseSelectOption)||{},{InputComponentProps:ne}=x,re=Ue(x,FOt),{filteredColumns:oe,selectedField:fe}=v.useMemo(()=>{let Me=r.field;const Ae=T[r.field].filterable===!1?T[r.field]:null;if(Ae)return{filteredColumns:[Ae],selectedField:Me};if(p===void 0||typeof p!="function")return{filteredColumns:O,selectedField:Me};const Ne=p({field:r.field,columns:O,currentFilters:(k==null?void 0:k.items)||[]});return{filteredColumns:O.filter(Je=>{const nt=Ne.includes(Je.field);return Je.field===r.field&&!nt&&(Me=void 0),nt}),selectedField:Me}},[p,k==null?void 0:k.items,O,r.field,T]),se=v.useMemo(()=>{switch(f){case"asc":return oe.sort((Me,Ae)=>Sq.compare(p0(Me),p0(Ae)));case"desc":return oe.sort((Me,Ae)=>-Sq.compare(p0(Me),p0(Ae)));default:return oe}},[oe,f]),ee=r.field?E.current.getColumn(r.field):null,ce=v.useMemo(()=>{var Me;return!r.operator||!ee?null:(Me=ee.filterOperators)==null?void 0:Me.find(Ae=>Ae.value===r.operator)},[r,ee]),le=v.useCallback(Me=>{const Ae=Me.target.value,Ne=E.current.getColumn(Ae);if(Ne.field===ee.field)return;const Je=Ne.filterOperators.find($t=>$t.value===r.operator)||Ne.filterOperators[0];let st=!Je.InputComponent||Je.InputComponent!==(ce==null?void 0:ce.InputComponent)||Ne.type!==ee.type?void 0:r.value;if(Ne.type==="singleSelect"&&st!==void 0){const $t=Ne,ct=Th($t);Array.isArray(st)?st=st.filter(_t=>eO(_t,ct,$t==null?void 0:$t.getOptionValue)!==void 0):eO(r.value,ct,$t==null?void 0:$t.getOptionValue)===void 0&&(st=void 0)}a(D({},r,{field:Ae,operator:Je.value,value:st}))},[E,a,r,ee,ce]),Q=v.useCallback(Me=>{const Ae=Me.target.value,Ne=ee==null?void 0:ee.filterOperators.find(nt=>nt.value===Ae),Je=!(Ne!=null&&Ne.InputComponent)||(Ne==null?void 0:Ne.InputComponent)!==(ce==null?void 0:ce.InputComponent);a(D({},r,{operator:Ae,value:Je?void 0:r.value}))},[a,r,ee,ce]),ue=v.useCallback(Me=>{const Ae=Me.target.value===_i.And.toString()?_i.And:_i.Or;c(Ae)},[c]),ge=()=>{i(r)};return v.useImperativeHandle(u,()=>({focus:()=>{var Me;ce!=null&&ce.InputComponent?(Me=L==null?void 0:L.current)==null||Me.focus():F.current.focus()}}),[ce]),$.jsxs(BOt,D({className:B.root,"data-id":r.id,ownerState:N},P,{ref:n,children:[$.jsx(zOt,D({variant:"standard",as:N.slots.baseFormControl},z,m,{className:pe(B.deleteIcon,z.className,m.className),ownerState:N,children:$.jsx(N.slots.baseIconButton,D({"aria-label":E.current.getLocaleText("filterPanelDeleteIconLabel"),title:E.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:ge,size:"small",disabled:S},(Oe=N.slotProps)==null?void 0:Oe.baseIconButton,{children:$.jsx(N.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),$.jsx(VOt,D({variant:"standard",as:N.slots.baseFormControl},z,g,{sx:[V?{display:"flex"}:{display:"none"},s?{visibility:"visible"}:{visibility:"hidden"},z.sx,g.sx],className:pe(B.logicOperatorInput,z.className,g.className),ownerState:N,children:$.jsx(N.slots.baseSelect,D({inputProps:{"aria-label":E.current.getLocaleText("filterPanelLogicOperator")},value:U??"",onChange:ue,disabled:!!l||d.length===1,native:G},(ke=N.slotProps)==null?void 0:ke.baseSelect,{children:d.map(Me=>v.createElement(N.slots.baseSelectOption,D({},K,{native:G,key:Me.toString(),value:Me.toString()}),E.current.getLocaleText(GOt(Me))))}))})),$.jsxs(HOt,D({variant:"standard",as:N.slots.baseFormControl},z,b,{className:pe(B.columnInput,z.className,b.className),ownerState:N,children:[$.jsx(N.slots.baseInputLabel,D({},J,{htmlFor:M,id:I,children:E.current.getLocaleText("filterPanelColumns")})),$.jsx(N.slots.baseSelect,D({labelId:I,id:M,label:E.current.getLocaleText("filterPanelColumns"),value:fe??"",onChange:le,native:G,disabled:S},(je=N.slotProps)==null?void 0:je.baseSelect,{children:se.map(Me=>v.createElement(N.slots.baseSelectOption,D({},K,{native:G,key:Me.field,value:Me.field}),p0(Me)))}))]})),$.jsxs(UOt,D({variant:"standard",as:N.slots.baseFormControl},z,y,{className:pe(B.operatorInput,z.className,y.className),ownerState:N,children:[$.jsx(N.slots.baseInputLabel,D({},J,{htmlFor:R,id:_,children:E.current.getLocaleText("filterPanelOperator")})),$.jsx(N.slots.baseSelect,D({labelId:_,label:E.current.getLocaleText("filterPanelOperator"),id:R,value:r.operator,onChange:Q,native:G,inputRef:F,disabled:S},(de=N.slotProps)==null?void 0:de.baseSelect,{children:(Re=ee==null?void 0:ee.filterOperators)==null?void 0:Re.map(Me=>v.createElement(N.slots.baseSelectOption,D({},K,{native:G,key:Me.value,value:Me.value}),Me.label||E.current.getLocaleText(`filterOperator${Se(Me.value)}`)))}))]})),$.jsx(WOt,D({variant:"standard",as:N.slots.baseFormControl},z,re,{className:pe(B.valueInput,z.className,re.className),ownerState:N,children:ce!=null&&ce.InputComponent?$.jsx(ce.InputComponent,D({apiRef:E,item:r,applyValue:a,focusElementRef:L,disabled:S},ce.InputComponentProps,ne),r.field):null}))]}))}),qOt=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],Pq=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),KOt=$n(function(t,n){var _,N;const r=sn(),o=wt(),i=Ye(r,Qo),a=Ye(r,fle),s=Ye(r,KSt),l=v.useRef(null),c=v.useRef(null),{logicOperators:u=[_i.And,_i.Or],columnsSort:d,filterFormProps:f,getColumnForNewFilter:p,disableAddFilterButton:m=!1,disableRemoveAllButton:g=!1}=t,y=Ue(t,qOt),b=r.current.upsertFilterItem,x=v.useCallback(B=>{r.current.setFilterLogicOperator(B)},[r]),S=v.useCallback(()=>{let B;if(p&&typeof p=="function"){const L=p({currentFilters:(i==null?void 0:i.items)||[],columns:a});if(L===null)return null;B=a.find(({field:F})=>F===L)}else B=a.find(L=>{var F;return(F=L.filterOperators)==null?void 0:F.length});return B?Pq(B):null},[i==null?void 0:i.items,a,p]),P=v.useCallback(()=>{if(p===void 0||typeof p!="function")return S();const B=i.items.length?i.items:[S()].filter(Boolean),L=p({currentFilters:B,columns:a});if(L===null)return null;const F=a.find(({field:U})=>U===L);return F?Pq(F):null},[i.items,a,p,S]),E=v.useMemo(()=>i.items.length?i.items:(c.current||(c.current=S()),c.current?[c.current]:[]),[i.items,S]),T=E.length>1,{readOnlyFilters:O,validFilters:k}=v.useMemo(()=>E.reduce((B,L)=>(s[L.field]?B.validFilters.push(L):B.readOnlyFilters.push(L),B),{readOnlyFilters:[],validFilters:[]}),[E,s]),M=v.useCallback(()=>{const B=P();B&&r.current.upsertFilterItems([...E,B])},[r,P,E]),I=v.useCallback(B=>{const L=k.length===1;r.current.deleteFilterItem(B),L&&r.current.hideFilterPanel()},[r,k.length]),R=v.useCallback(()=>k.length===1&&k[0].value===void 0?(r.current.deleteFilterItem(k[0]),r.current.hideFilterPanel()):r.current.setFilterModel(D({},i,{items:O}),"removeAllFilterItems"),[r,O,i,k]);return v.useEffect(()=>{u.length>0&&i.logicOperator&&!u.includes(i.logicOperator)&&x(u[0])},[u,x,i.logicOperator]),v.useEffect(()=>{k.length>0&&l.current.focus()},[k.length]),$.jsxs(gce,D({},y,{ref:n,children:[$.jsxs($Ot,{children:[O.map((B,L)=>$.jsx(Cq,D({item:B,applyFilterChanges:b,deleteFilter:I,hasMultipleFilters:T,showMultiFilterOperators:L>0,disableMultiFilterOperator:L!==1,applyMultiFilterOperatorChanges:x,focusElementRef:null,readOnly:!0,logicOperators:u,columnsSort:d},f),B.id==null?L:B.id)),k.map((B,L)=>$.jsx(Cq,D({item:B,applyFilterChanges:b,deleteFilter:I,hasMultipleFilters:T,showMultiFilterOperators:O.length+L>0,disableMultiFilterOperator:O.length+L!==1,applyMultiFilterOperatorChanges:x,focusElementRef:L===k.length-1?l:null,logicOperators:u,columnsSort:d},f),B.id==null?L+O.length:B.id))]}),!o.disableMultipleColumnsFiltering&&!(m&&g)?$.jsxs(LOt,{children:[m?$.jsx("span",{}):$.jsx(o.slots.baseButton,D({onClick:M,startIcon:$.jsx(o.slots.filterPanelAddIcon,{})},(_=o.slotProps)==null?void 0:_.baseButton,{children:r.current.getLocaleText("filterPanelAddFilter")})),!g&&k.length>0?$.jsx(o.slots.baseButton,D({onClick:R,startIcon:$.jsx(o.slots.filterPanelRemoveAllIcon,{})},(N=o.slotProps)==null?void 0:N.baseButton,{children:r.current.getLocaleText("filterPanelRemoveAll")})):null]}):null]}))}),YOt=(e,t)=>{const n=new Set(Object.keys(e).filter(i=>e[i]===!1)),r=new Set(Object.keys(t).filter(i=>t[i]===!1));if(n.size!==r.size)return!1;let o=!0;return n.forEach(i=>{r.has(i)||(o=!1)}),o},XOt=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,QOt=e=>{const{classes:t}=e;return Te({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},Sn,t)},Eq=new Intl.Collator;function JOt(e){var L,F,U,V;const t=sn(),n=v.useRef(null),r=Ye(t,Ul),o=Jl(()=>Vs(t)).current,i=Ye(t,Vs),a=wt(),[s,l]=v.useState(""),c=QOt(a),{sort:u,searchPredicate:d=XOt,autoFocusSearchField:f=!0,disableShowHideToggle:p=!1,disableResetButton:m=!1,toggleAllMode:g="all",getTogglableColumns:y,searchInputProps:b}=e,x=v.useMemo(()=>YOt(i,o),[i,o]),S=v.useMemo(()=>{switch(u){case"asc":return[...r].sort((z,W)=>Eq.compare(z.headerName||z.field,W.headerName||W.field));case"desc":return[...r].sort((z,W)=>-Eq.compare(z.headerName||z.field,W.headerName||W.field));default:return r}},[r,u]),P=z=>{const{name:W}=z.target;t.current.setColumnVisibility(W,i[W]===!1)},E=v.useMemo(()=>{const z=y?y(S):null,W=z?S.filter(({field:G})=>z.includes(G)):S;return s?W.filter(G=>d(G,s.toLowerCase())):W},[S,s,d,y]),T=v.useCallback(z=>{const W=Vs(t),G=D({},W),J=y?y(r):null;return(g==="filteredOnly"?E:r).forEach(K=>{K.hideable&&(J==null||J.includes(K.field))&&(z?delete G[K.field]:G[K.field]=!1)}),t.current.setColumnVisibilityModel(G)},[t,r,y,g,E]),O=v.useCallback(z=>{l(z.target.value)},[]),k=v.useMemo(()=>E.filter(z=>z.hideable),[E]),M=v.useMemo(()=>k.every(z=>i[z.field]==null||i[z.field]!==!1),[i,k]),I=v.useMemo(()=>k.every(z=>i[z.field]===!1),[i,k]),R=v.useRef(null);v.useEffect(()=>{f?n.current.focus():R.current&&typeof R.current.focus=="function"&&R.current.focus()},[f]);let _=!1;const N=z=>_===!1&&z.hideable!==!1?(_=!0,!0):!1,B=v.useCallback(()=>{l(""),n.current.focus()},[]);return $.jsxs(v.Fragment,{children:[$.jsx(eIt,{className:c.header,ownerState:a,children:$.jsx(tIt,D({as:a.slots.baseTextField,ownerState:a,placeholder:t.current.getLocaleText("columnsManagementSearchTitle"),inputRef:n,className:c.searchInput,value:s,onChange:O,variant:"outlined",size:"small",type:"search",InputProps:{startAdornment:$.jsx(a.slots.baseInputAdornment,{position:"start",children:$.jsx(a.slots.quickFilterIcon,{})}),endAdornment:$.jsx(a.slots.baseIconButton,D({"aria-label":t.current.getLocaleText("columnsManagementDeleteIconLabel"),size:"small",sx:[s?{visibility:"visible"}:{visibility:"hidden"}],tabIndex:-1,onClick:B},(L=a.slotProps)==null?void 0:L.baseIconButton,{children:$.jsx(a.slots.quickFilterClearIcon,{fontSize:"small"})}))},inputProps:{"aria-label":t.current.getLocaleText("columnsManagementSearchTitle")},autoComplete:"off",fullWidth:!0},(F=a.slotProps)==null?void 0:F.baseTextField,b))}),$.jsxs(ZOt,{className:c.root,ownerState:a,children:[E.map(z=>{var W;return $.jsx(mh,{className:c.row,control:$.jsx(a.slots.baseCheckbox,D({disabled:z.hideable===!1,checked:i[z.field]!==!1,onClick:P,name:z.field,sx:{p:.5},inputRef:N(z)?R:void 0},(W=a.slotProps)==null?void 0:W.baseCheckbox)),label:z.headerName||z.field},z.field)}),E.length===0&&$.jsx(rIt,{ownerState:a,children:t.current.getLocaleText("columnsManagementNoColumns")})]}),(!p||!m)&&E.length>0?$.jsxs(nIt,{ownerState:a,className:c.footer,children:[p?$.jsx("span",{}):$.jsx(mh,{control:$.jsx(a.slots.baseCheckbox,D({disabled:k.length===0,checked:M,indeterminate:!M&&!I,onClick:()=>T(!M),name:t.current.getLocaleText("columnsManagementShowHideAllText"),sx:{p:.5}},(U=a.slotProps)==null?void 0:U.baseCheckbox)),label:t.current.getLocaleText("columnsManagementShowHideAllText")}),m?null:$.jsx(a.slots.baseButton,D({onClick:()=>t.current.setColumnVisibilityModel(o),disabled:x},(V=a.slotProps)==null?void 0:V.baseButton,{children:t.current.getLocaleText("columnsManagementReset")}))]}):null]})}const ZOt=ie("div",{name:"MuiDataGrid",slot:"ColumnsManagement",overridesResolver:(e,t)=>t.columnsManagement})(({theme:e})=>({padding:e.spacing(0,3,1.5),display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,alignItems:"flex-start"})),eIt=ie("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader",overridesResolver:(e,t)=>t.columnsManagementHeader})(({theme:e})=>({padding:e.spacing(1.5,3)})),tIt=ie(gn,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput",overridesResolver:(e,t)=>t.columnsManagementSearchInput})(({theme:e})=>({[`& .${zo.root}`]:{padding:e.spacing(0,1.5,0,1.5)},[`& .${zo.input}::-webkit-search-decoration, + & .${zo.input}::-webkit-search-cancel-button, + & .${zo.input}::-webkit-search-results-button, + & .${zo.input}::-webkit-search-results-decoration`]:{display:"none"}})),nIt=ie("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter",overridesResolver:(e,t)=>t.columnsManagementFooter})(({theme:e})=>({padding:e.spacing(.5,1,.5,3),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${e.palette.divider}`})),rIt=ie("div")(({theme:e})=>({padding:e.spacing(.5,0),color:e.palette.grey[500]})),oIt=$n(function(t,n){var x,S;const{children:r,slotProps:o={}}=t,i=o.button||{},a=o.tooltip||{},s=sn(),l=wt(),c=_n(),u=_n(),[d,f]=v.useState(!1),p=v.useRef(null),m=Wt(n,p),g=P=>{var E;f(T=>!T),(E=i.onClick)==null||E.call(i,P)},y=()=>f(!1),b=P=>{P.key==="Tab"&&P.preventDefault(),hce(P.key)&&y()};return r==null?null:$.jsxs(v.Fragment,{children:[$.jsx(l.slots.baseTooltip,D({title:s.current.getLocaleText("toolbarExportLabel"),enterDelay:1e3},(x=l.slotProps)==null?void 0:x.baseTooltip,a,{children:$.jsx(l.slots.baseButton,D({size:"small",startIcon:$.jsx(l.slots.exportIcon,{}),"aria-expanded":d,"aria-label":s.current.getLocaleText("toolbarExportLabel"),"aria-haspopup":"menu","aria-controls":d?u:void 0,id:c,onClick:g},(S=l.slotProps)==null?void 0:S.baseButton,i,{ref:m,children:s.current.getLocaleText("toolbarExport")}))})),$.jsx(hz,{open:d,target:p.current,onClose:y,position:"bottom-start",children:$.jsx(Ev,{id:u,className:ae.menuList,"aria-labelledby":c,onKeyDown:b,autoFocusItem:d,children:v.Children.map(r,P=>v.isValidElement(P)?v.cloneElement(P,{hideMenu:y}):P)})})]})}),iIt=["hideMenu","options"],aIt=["hideMenu","options"],sIt=["csvOptions","printOptions","excelOptions"];function lIt(e){const t=sn(),{hideMenu:n,options:r}=e,o=Ue(e,iIt);return $.jsx(tn,D({onClick:()=>{t.current.exportDataAsCsv(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportCSV")}))}function cIt(e){const t=sn(),{hideMenu:n,options:r}=e,o=Ue(e,aIt);return $.jsx(tn,D({onClick:()=>{t.current.exportDataAsPrint(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportPrint")}))}$n(function(t,n){const r=t,{csvOptions:o={},printOptions:i={},excelOptions:a}=r,s=Ue(r,sIt),c=sn().current.unstable_applyPipeProcessors("exportMenu",[],{excelOptions:a,csvOptions:o,printOptions:i}).sort((u,d)=>u.componentName>d.componentName?1:-1);return c.length===0?null:$.jsx(oIt,D({},s,{ref:n,children:c.map((u,d)=>v.cloneElement(u.component,{key:d}))}))});const uIt=["className","selectedRowCount"],dIt=e=>{const{classes:t}=e;return Te({root:["selectedRowCount"]},Sn,t)},fIt=Qn("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(e,t)=>t.selectedRowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2),visibility:"hidden",width:0,height:0,[e.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}})),pIt=$n(function(t,n){const{className:r,selectedRowCount:o}=t,i=Ue(t,uIt),a=sn(),s=wt(),l=dIt(s),c=a.current.getLocaleText("footerRowSelected")(o);return $.jsx(fIt,D({className:pe(l.root,r),ownerState:s},i,{ref:n,children:c}))}),hIt=$n(function(t,n){var d,f;const r=sn(),o=wt(),i=Ye(r,$1t),a=Ye(r,aCt),s=Ye(r,vz),l=!o.hideFooterSelectedRowCount&&a>0?$.jsx(pIt,{selectedRowCount:a}):$.jsx("div",{}),c=!o.hideFooterRowCount&&!o.pagination?$.jsx(o.slots.footerRowCount,D({},(d=o.slotProps)==null?void 0:d.footerRowCount,{rowCount:i,visibleRowCount:s})):null,u=o.pagination&&!o.hideFooterPagination&&o.slots.pagination&&$.jsx(o.slots.pagination,D({},(f=o.slotProps)==null?void 0:f.pagination));return $.jsxs(KEt,D({},t,{ref:n,children:[l,c,u]}))});function mIt(){var i,a;const e=sn(),t=Ye(e,Ul),n=wt(),r=Ye(e,Bx),o=e.current.unstable_applyPipeProcessors("preferencePanel",null,r.openedPanelValue??Oh.filters);return $.jsx(n.slots.panel,D({as:n.slots.basePopper,open:t.length>0&&r.open,id:r.panelId,"aria-labelledby":r.labelId},(i=n.slotProps)==null?void 0:i.panel,(a=n.slotProps)==null?void 0:a.basePopper,{children:o}))}function gIt(){var t;const e=wt();return $.jsxs(v.Fragment,{children:[$.jsx(mIt,{}),e.slots.toolbar&&$.jsx(e.slots.toolbar,D({},(t=e.slotProps)==null?void 0:t.toolbar))]})}const Iz=(e,t,n,r,o)=>{const i=o.hasScrollY?o.scrollbarSize:0;let a;switch(e){case ur.LEFT:a=r[n];break;case ur.RIGHT:a=o.columnsTotalWidth-r[n]-t+i;break;default:a=0;break}return a},h0={root:ae.scrollbarFiller,header:ae["scrollbarFiller--header"],borderTop:ae["scrollbarFiller--borderTop"],borderBottom:ae["scrollbarFiller--borderBottom"],pinnedRight:ae["scrollbarFiller--pinnedRight"]};function kz({header:e,borderTop:t=!0,borderBottom:n,pinnedRight:r}){return $.jsx("div",{role:"presentation",className:pe(h0.root,e&&h0.header,t&&h0.borderTop,n&&h0.borderBottom,r&&h0.pinnedRight)})}const yIt=Qn("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay",overridesResolver:(e,t)=>t.skeletonLoadingOverlay})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),vIt=e=>{const{classes:t}=e;return Te({root:["skeletonLoadingOverlay"]},Sn,t)},Tq=e=>parseInt(e.getAttribute("data-colindex"),10),bIt=$n(function(t,n){const r=wt(),{slots:o}=r,i=vIt({classes:r.classes}),a=v.useRef(null),s=Wt(a,n),l=sn(),c=Ye(l,Ci),u=(c==null?void 0:c.viewportInnerSize.height)??0,d=Math.ceil(u/c.rowHeight),f=Ye(l,uz),p=Ye(l,Gf),m=v.useMemo(()=>p.filter(T=>T<=f).length,[f,p]),g=Ye(l,ho),y=v.useMemo(()=>g.slice(0,m),[g,m]),b=Ye(l,e1),x=v.useCallback((T,O,k)=>{const M=Iz(k,T,O,p,c);return{[k]:M}},[c,p]),S=v.useCallback(T=>{if(b.left.findIndex(O=>O.field===T)!==-1)return ur.LEFT;if(b.right.findIndex(O=>O.field===T)!==-1)return ur.RIGHT},[b.left,b.right]),P=v.useMemo(()=>{const T=[];for(let O=0;Oee.field===I.field):M-b.left.length,F=R&&x(I.computedWidth,M,R),U=c.columnsTotalWidth0},`skeleton-scrollbar-filler-${O}`))}T.push($.jsx("div",{className:pe(ae.row,ae.rowSkeleton,O===0&&ae["row--firstVisible"]),children:k},`skeleton-row-${O}`))}return T},[o,y,b,d,r.showCellVerticalBorder,c.columnsTotalWidth,c.viewportOuterSize.width,c.rowHeight,c.hasScrollY,c.scrollbarSize,S,x]);return gt(l,"columnResize",T=>{var F,U,V;const{colDef:O,width:k}=T,M=(F=a.current)==null?void 0:F.querySelectorAll(`[data-field="${id(O.field)}"]`);if(!M)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const I=y.findIndex(z=>z.field===O.field),R=S(O.field),_=R===ur.LEFT,N=R===ur.RIGHT,B=getComputedStyle(M[0]).getPropertyValue("--width"),L=parseInt(B,10)-k;if(M&&M.forEach(z=>{z.style.setProperty("--width",`${k}px`)}),_){const z=(U=a.current)==null?void 0:U.querySelectorAll(`.${ae["cell--pinnedLeft"]}`);z==null||z.forEach(W=>{Tq(W)>I&&(W.style.left=`${parseInt(getComputedStyle(W).left,10)-L}px`)})}if(N){const z=(V=a.current)==null?void 0:V.querySelectorAll(`.${ae["cell--pinnedRight"]}`);z==null||z.forEach(W=>{Tq(W)({maxHeight:"calc(100% + 1px)",flexGrow:1,[`& .${Xp.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${Xp.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),EIt=(e,t)=>({from:n,to:r,count:o,page:i})=>e({from:n,to:r,count:o,page:i,estimated:t}),TIt=({from:e,to:t,count:n,estimated:r})=>r?`${e}–${t} of ${n!==-1?n:`more than ${r>t?r:t}`}`:`${e}–${t} of ${n!==-1?n:`more than ${t}`}`,OIt=$n(function(t,n){const r=sn(),o=wt(),i=Ye(r,Di),a=Ye(r,kg),s=Ye(r,Ble),{paginationMode:l,loading:c,estimatedRowCount:u}=o,d=v.useMemo(()=>a===-1&&l==="server"&&c?{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}:{},[c,l,a]),f=v.useMemo(()=>Math.max(0,s-1),[s]),p=v.useMemo(()=>a===-1||i.page<=f?i.page:f,[f,i.page,a]),m=v.useCallback(P=>{const E=Number(P.target.value);r.current.setPageSize(E)},[r]),g=v.useCallback((P,E)=>{r.current.setPage(E)},[r]),b=(P=>{for(let E=0;E{const{classes:t}=e;return Te({root:["rowCount"]},Sn,t)},MIt=Qn("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)})),AIt=$n(function(t,n){const{className:r,rowCount:o,visibleRowCount:i}=t,a=Ue(t,IIt),s=sn(),l=wt(),c=kIt(l);if(o===0)return null;const u=i=d.left.length&&g=m.lastColumnIndex,ce=$It(B.classes,{root:["row",r&&"selected",re&&"row--editable",ne&&"row--editing",y&&"row--firstVisible",b&&"row--lastVisible",S&&"row--borderBottom",l==="auto"&&"row--dynamicHeight"]}),le=_.hooks.useGridRowAriaAttributes();v.useLayoutEffect(()=>{if(L.range){const pt=R.current.getRowIndexRelativeToVisibleRows(o);pt!==void 0&&R.current.unstable_setLastMeasuredRowIndex(pt)}if(N.current&&l==="auto")return R.current.observeRowHeight(N.current,o)},[R,L.range,l,o]);const Q=v.useCallback((pt,ot)=>Pe=>{r1(Pe)||R.current.getRow(o)&&(R.current.publishEvent(pt,R.current.getRowParams(o),Pe),ot&&ot(Pe))},[R,o]),ue=v.useCallback(pt=>{const ot=tO(pt.target,ae.cell),Pe=ot==null?void 0:ot.getAttribute("data-field");if(Pe){if(Pe===fb.field||Pe===Wk||Pe==="__reorder__"||R.current.getCellMode(o,Pe)===Zn.Edit)return;const We=R.current.getColumn(Pe);if((We==null?void 0:We.type)===Vk)return}Q("rowClick",P)(pt)},[R,P,Q,o]),{slots:ge,slotProps:xe,disableColumnReorder:me}=B,be=B.rowReordering,we=Ye(R,()=>D({},R.current.getRowHeightEntry(o)),lle),Oe=v.useMemo(()=>{if(x)return{opacity:0,width:0,height:0};const pt=D({},s,{maxHeight:l==="auto"?"none":l,minHeight:l,"--height":typeof l=="number"?`${l}px`:l});if(we.spacingTop){const ot=B.rowSpacingType==="border"?"borderTopWidth":"marginTop";pt[ot]=we.spacingTop}if(we.spacingBottom){const ot=B.rowSpacingType==="border"?"borderBottomWidth":"marginBottom";let Pe=pt[ot];typeof Pe!="number"&&(Pe=parseInt(Pe||"0",10)),Pe+=we.spacingBottom,pt[ot]=Pe}return pt},[x,l,s,we,B.rowSpacingType]),ke=R.current.unstable_applyPipeProcessors("rowClassName",[],o),je=G?le(G,a):void 0;if(typeof B.getRowClassName=="function"){const pt=a-(((_t=L.range)==null?void 0:_t.firstRowIndex)||0),ot=D({},R.current.getRowParams(o),{isFirstVisible:pt===0,isLastVisible:pt===L.rows.length-1,indexRelativeToCurrentPage:pt});ke.push(B.getRowClassName(ot))}const de=(pt,ot,Pe,We,ft=aa.NONE)=>{var ss;const Ot=R.current.unstable_getCellColSpanInfo(o,Pe);if(Ot!=null&&Ot.spannedByColSpan)return null;const xt=(Ot==null?void 0:Ot.cellProps.width)??pt.computedWidth,vn=(Ot==null?void 0:Ot.cellProps.colSpan)??1,zn=Iz(ace[ft],pt.computedWidth,Pe,V,p);if((G==null?void 0:G.type)==="skeletonRow")return $.jsx(ge.skeletonCell,{type:pt.type,width:xt,height:l,field:pt.field,align:pt.align},pt.field);const Wn=((ss=z[o])==null?void 0:ss[pt.field])??null,xo=pt.field==="__reorder__",So=Object.keys(z).length>0,ai=!(me||pt.disableReorder),Sa=be&&!F.length&&U<=1&&!So,Nt=!(ai||xo&&Sa),Co=ft===aa.VIRTUAL;return $.jsx(ge.cell,D({column:pt,width:xt,rowId:o,align:pt.align||"left",colIndex:Pe,colSpan:vn,disableDragEvents:Nt,editCellState:Wn,isNotVisible:Co,pinnedOffset:zn,pinnedPosition:ft,sectionIndex:ot,sectionLength:We,gridHasFiller:K},xe==null?void 0:xe.cell),pt.field)};if(!G)return null;const Re=d.left.map((pt,ot)=>de(pt,ot,ot,d.left.length,aa.LEFT)),Me=d.right.map((pt,ot)=>{const Pe=u.length-d.right.length+ot;return de(pt,ot,Pe,d.right.length,aa.RIGHT)}),Ae=u.length-d.left.length-d.right.length,Ne=[];se&&Ne.push(de(u[g],g-d.left.length,g,Ae,aa.VIRTUAL));let Je,nt;!B.disableVirtualization&&!oe?(Je=0,nt=u.length):(Je=m.firstColumnIndex,nt=m.lastColumnIndex);for(let pt=Je;pt0&&$.jsx(DIt,{width:ct}),Me.length>0&&$.jsx("div",{role:"presentation",className:ae.filler}),Me,J!==0&&$.jsx(kz,{pinnedRight:d.right.length>0})]}))}),LIt=Wf(_It),NIt=()=>{const e=pl(),t=wt(),n=Ye(e,ho),r=Ye(e,yz),o=Ye(e,n1),i=Ye(e,Cle);return{role:"grid","aria-colcount":n.length,"aria-rowcount":o+1+i+r,"aria-multiselectable":bz(t)}},FIt=()=>{const e=pl(),t=Ye(e,ku),n=Ye(e,n1);return v.useCallback((r,o)=>{const i={},a=o+n+2;return i["aria-rowindex"]=a,e.current.isRowSelectable(r.id)&&(i["aria-selected"]=t[r.id]!==void 0),i},[e,t,n])};function jIt({privateApiRef:e,configuration:t,props:n,children:r}){const o=v.useRef(e.current.getPublicApi());return $.jsx(nce.Provider,{value:t,children:$.jsx(ale.Provider,{value:n,children:$.jsx(Qle.Provider,{value:e,children:$.jsx(ile.Provider,{value:o,children:r})})})})}const BIt=e=>{const t=v.useRef(null),n=v.useRef(null),r=v.useRef(null),o=v.useRef(null),i=v.useRef(null),a=v.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:n,virtualScrollerRef:r,virtualScrollbarVerticalRef:o,virtualScrollbarHorizontalRef:i,columnHeadersContainerRef:a})},zIt=e=>{const t=nr();e.current.state.isRtl===void 0&&(e.current.state.isRtl=t);const n=v.useRef(!0);v.useEffect(()=>{n.current?n.current=!1:e.current.setState(r=>D({},r,{isRtl:t}))},[e,t])},VIt=c1t()&&window.localStorage.getItem("DEBUG")!=null,N0=()=>{},HIt={debug:N0,info:N0,warn:N0,error:N0},Oq=["debug","info","warn","error"];function Iq(e,t,n=console){const r=Oq.indexOf(t);if(r===-1)throw new Error(`MUI X: Log level ${t} not recognized.`);return Oq.reduce((i,a,s)=>(s>=r?i[a]=(...l)=>{const[c,...u]=l;n[a](`MUI X: ${e} - ${c}`,...u)}:i[a]=N0,i),{})}const UIt=(e,t)=>{const n=v.useCallback(r=>VIt?Iq(r,"debug",t.logger):t.logLevel?Iq(r,t.logLevel.toString(),t.logger):HIt,[t.logLevel,t.logger]);Qt(e,{getLogger:n},"private")};class WIt{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let a=o.length-1;a>=0;a-=1){const s=o[a];r.highPriority.has(s)&&s.apply(this,n)}for(let a=0;a(this.listeners.add(n),()=>{this.listeners.delete(n)}),this.getSnapshot=()=>this.value,this.update=n=>{this.value=n,this.listeners.forEach(r=>r(n))},this.value=t,this.listeners=new Set}}const yce=Symbol("mui.api_private"),GIt=e=>e.isPropagationStopped!==void 0;let kq=0;function qIt(e){var o;const t=(o=e.current)==null?void 0:o[yce];if(t)return t;const n={},r={state:n,store:Mz.create(n),instanceId:{id:kq}};return kq+=1,r.getPublicApi=()=>e.current,r.register=(i,a)=>{Object.keys(a).forEach(s=>{const l=a[s],c=r[s];if((c==null?void 0:c.spying)===!0?c.target=l:r[s]=l,i==="public"){const u=e.current,d=u[s];(d==null?void 0:d.spying)===!0?d.target=l:u[s]=l}})},r.register("private",{caches:{},eventManager:new WIt}),r}function KIt(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[yce]:e.current}}function YIt(e,t){var a;const n=v.useRef(),r=v.useRef();r.current||(r.current=qIt(n)),n.current||(n.current=KIt(r));const o=v.useCallback((...s)=>{const[l,c,u={}]=s;if(u.defaultMuiPrevented=!1,GIt(u)&&u.isPropagationStopped())return;const d=t.signature===Xs.DataGridPro||t.signature===Xs.DataGridPremium?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(l,c,u,d)},[r,t.signature]),i=v.useCallback((s,l,c)=>{r.current.eventManager.on(s,l,c);const u=r.current;return()=>{u.eventManager.removeListener(s,l)}},[r]);return Qt(r,{subscribeEvent:i,publishEvent:o},"public"),e&&!((a=e.current)!=null&&a.state)&&(e.current=n.current),v.useImperativeHandle(e,()=>n.current,[n]),v.useEffect(()=>{const s=r.current;return()=>{s.publishEvent("unmount")}},[r]),r}const XIt=(e,t)=>{const n=v.useCallback(r=>{if(t.localeText[r]==null)throw new Error(`Missing translation for key ${r}.`);return t.localeText[r]},[t.localeText]);e.current.register("public",{getLocaleText:n})},QIt=e=>{const t=v.useRef({}),n=v.useRef(!1),r=v.useCallback(u=>{n.current||!u||(n.current=!0,Object.values(u.appliers).forEach(d=>{d()}),n.current=!1)},[]),o=v.useCallback((u,d,f)=>{t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}});const p=t.current[u];return p.processors.get(d)!==f&&(p.processors.set(d,f),p.processorsAsArray=Array.from(t.current[u].processors.values()),r(p)),()=>{t.current[u].processors.delete(d),t.current[u].processorsAsArray=Array.from(t.current[u].processors.values())}},[r]),i=v.useCallback((u,d,f)=>(t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}}),t.current[u].appliers[d]=f,()=>{const p=t.current[u].appliers,m=Ue(p,[d].map(sv));t.current[u].appliers=m}),[]),a=v.useCallback(u=>{r(t.current[u])},[r]),s=v.useCallback((...u)=>{const[d,f,p]=u;if(!t.current[d])return f;const m=t.current[d].processorsAsArray;let g=f;for(let y=0;y{const r=v.useRef(),o=v.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=v.useCallback(()=>{r.current=e.current.registerPipeProcessor(t,o.current,n)},[e,n,t]);t1(()=>{i()});const a=v.useRef(!0);v.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},Az=(e,t,n)=>{const r=v.useRef(),o=v.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=v.useCallback(()=>{r.current=e.current.registerPipeApplier(t,o.current,n)},[e,n,t]);t1(()=>{i()});const a=v.useRef(!0);v.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},rO=(e,t,n,r)=>{const o=v.useCallback(()=>{e.current.registerStrategyProcessor(t,n,r)},[e,r,n,t]);t1(()=>{o()});const i=v.useRef(!0);v.useEffect(()=>{i.current?i.current=!1:o()},[o])},Ih="none",Mq={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},JIt=e=>{const t=v.useRef(new Map),n=v.useRef({}),r=v.useCallback((l,c,u)=>{const d=()=>{const m=n.current[c],g=Ue(m,[l].map(sv));n.current[c]=g};n.current[c]||(n.current[c]={});const f=n.current[c],p=f[l];return f[l]=u,!p||p===u||l===e.current.getActiveStrategy(Mq[c])&&e.current.publishEvent("activeStrategyProcessorChange",c),d},[e]),o=v.useCallback((l,c)=>{const u=e.current.getActiveStrategy(Mq[l]);if(u==null)throw new Error("Can't apply a strategy processor before defining an active strategy");const d=n.current[l];if(!d||!d[u])throw new Error(`No processor found for processor "${l}" on strategy "${u}"`);const f=d[u];return f(c)},[e]),i=v.useCallback(l=>{const u=Array.from(t.current.entries()).find(([,d])=>d.group!==l?!1:d.isAvailable());return(u==null?void 0:u[0])??Ih},[]),a=v.useCallback((l,c,u)=>{t.current.set(c,{group:l,isAvailable:u}),e.current.publishEvent("strategyAvailabilityChange")},[e]);Qt(e,{registerStrategyProcessor:r,applyStrategyProcessor:o,getActiveStrategy:i,setStrategyAvailability:a},"private")},ZIt=e=>{const t=v.useRef({}),[,n]=v.useState(),r=v.useCallback(c=>{t.current[c.stateId]=c},[]),o=v.useCallback((c,u)=>{let d;if(gle(c)?d=c(e.current.state):d=c,e.current.state===d)return!1;let f=!1;const p=[];if(Object.keys(t.current).forEach(m=>{const g=t.current[m],y=g.stateSelector(e.current.state,e.current.instanceId),b=g.stateSelector(d,e.current.instanceId);b!==y&&(p.push({stateId:g.stateId,hasPropChanged:b!==g.propModel}),g.propModel!==void 0&&b!==g.propModel&&(f=!0))}),p.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${p[0].stateId}, therefore, you're not allowed to update ${p.map(m=>m.stateId).join(", ")} in the same transaction.`);if(f||(e.current.state=d,e.current.publishEvent("stateChange",d),e.current.store.update(d)),p.length===1){const{stateId:m,hasPropChanged:g}=p[0],y=t.current[m],b=y.stateSelector(d,e.current.instanceId);y.propOnChange&&g&&y.propOnChange(b,{reason:u,api:e.current}),f||e.current.publishEvent(y.changeEvent,b,{reason:u})}return!f},[e]),i=v.useCallback((c,u,d)=>e.current.setState(f=>D({},f,{[c]:u(f[c])}),d),[e]),a=v.useCallback(()=>n(()=>e.current.state),[e]),s={setState:o,forceUpdate:a},l={updateControlState:i,registerControlState:r};Qt(e,s,"public"),Qt(e,l,"private")},ekt=(e,t)=>{const n=YIt(e,t);return BIt(n),zIt(n),UIt(n,t),ZIt(n),QIt(n),JIt(n),XIt(n,t),n.current.register("private",{rootProps:t}),n},Lo=(e,t,n)=>{const r=v.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)};function _L(e,t){if(e==null)return"";const n=typeof e=="string"?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const r=n.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@"," ","\r"].includes(r[0])?`"'${r}"`:[t.delimiter,` +`,"\r",'"'].some(o=>n.includes(o))?`"${r}"`:r}return n}const vce=(e,t)=>{var i,a;const{csvOptions:n,ignoreValueFormatter:r}=t;let o;if(r){const s=e.colDef.type;s==="number"?o=String(e.value):s==="date"||s==="dateTime"?o=(i=e.value)==null?void 0:i.toISOString():typeof((a=e.value)==null?void 0:a.toString)=="function"?o=e.value.toString():o=e.value}else o=e.formattedValue;return _L(o,n)};class LL{constructor(t){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=t}addValue(t){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(t,this.options.csvOptions):this.rowString+=t,this.isEmpty=!1}getRowString(){return this.rowString}}const tkt=({id:e,columns:t,getCellParams:n,csvOptions:r,ignoreValueFormatter:o})=>{const i=new LL({csvOptions:r});return t.forEach(a=>{const s=n(e,a.field);i.addValue(vce(s,{ignoreValueFormatter:o,csvOptions:r}))}),i.getRowString()};function nkt(e){const{columns:t,rowIds:n,csvOptions:r,ignoreValueFormatter:o,apiRef:i}=e,a=n.reduce((d,f)=>`${d}${tkt({id:f,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:o,csvOptions:r})}\r +`,"").trim();if(!r.includeHeaders)return a;const s=t.filter(d=>d.field!==fb.field),l=[];if(r.includeColumnGroupsHeaders){const d=i.current.getAllGroupDetails();let f=0;const p=s.reduce((m,g)=>{const y=i.current.getColumnGroupPath(g.field);return m[g.field]=y,f=Math.max(f,y.length),m},{});for(let m=0;m{const b=(p[y.field]||[])[m],x=d[b];g.addValue(x?x.headerName||x.groupId:"")})}}const c=new LL({csvOptions:r,sanitizeCellValue:_L});return s.forEach(d=>{c.addValue(d.headerName||d.field)}),l.push(c),`${`${l.map(d=>d.getRowString()).join(`\r `)}\r -`}${a}`.trim()}function kq(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}function rkt(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{kq(e)}):kq(e)}function okt(e){var t;return!!((t=window.getSelection())!=null&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}const ikt=(e,t)=>{const n=t.ignoreValueFormatterDuringExport,r=(typeof n=="object"?n==null?void 0:n.clipboardExport:n)||!1,o=t.clipboardCopyCellDelimiter,i=y.useCallback(a=>{if(!aOt(a)||okt(a.target))return;let s="";if(e.current.getSelectedRows().size>0)s=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1});else{const c=Ra(e);if(c){const u=e.current.getCellParams(c.id,c.field);s=wce(u,{csvOptions:{delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:r})}}s=e.current.unstable_applyPipeProcessors("clipboardCopy",s),s&&(rkt(s),e.current.publishEvent("clipboardCopy",s))},[e,r,o]);Fle(e,e.current.rootElementRef,"keydown",i),ar(e,"clipboardCopy",t.onClipboardCopy)},akt=e=>N({},e,{columnMenu:{open:!1}}),skt=e=>{const t=Ao(e,"useGridColumnMenu"),n=y.useCallback(a=>{const s=BP(e.current.state),l={open:!0,field:a};(l.open!==s.open||l.field!==s.field)&&(e.current.setState(u=>u.columnMenu.open&&u.columnMenu.field===a?u:(t.debug("Opening Column Menu"),N({},u,{columnMenu:{open:!0,field:a}}))),e.current.hidePreferences(),e.current.forceUpdate())},[e,t]),r=y.useCallback(()=>{const a=BP(e.current.state);if(a.field){const c=od(e),u=Hs(e),d=Iu(e);let f=a.field;if(c[f]||(f=d[0]),u[f]===!1){const p=d.filter(g=>g===f?!0:u[g]!==!1),m=p.indexOf(f);f=p[m+1]||p[m-1]}e.current.setColumnHeaderFocus(f)}const s={open:!1,field:void 0};(s.open!==a.open||s.field!==a.field)&&(e.current.setState(c=>(t.debug("Hiding Column Menu"),N({},c,{columnMenu:s}))),e.current.forceUpdate())},[e,t]),o=y.useCallback(a=>{t.debug("Toggle Column Menu");const s=BP(e.current.state);!s.open||s.field!==a?n(a):r()},[e,t,n,r]);Qt(e,{showColumnMenu:n,hideColumnMenu:r,toggleColumnMenu:o},"public"),gt(e,"columnResizeStart",r),gt(e,"virtualScrollerWheel",e.current.hideColumnMenu),gt(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)},lkt=(e,t,n)=>{var o,i,a;const r=ng({apiRef:n,columnsToUpsert:t.columns,initialState:(o=t.initialState)==null?void 0:o.columns,columnVisibilityModel:t.columnVisibilityModel??((a=(i=t.initialState)==null?void 0:i.columns)==null?void 0:a.columnVisibilityModel)??{},keepOnlyColumnsToUpsert:!0});return N({},e,{columns:r,pinnedColumns:e.pinnedColumns??$N})};function ckt(e,t){var I,R;const n=Ao(e,"useGridColumns"),r=y.useRef(t.columns);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:Hs,changeEvent:"columnVisibilityModelChange"});const o=y.useCallback(L=>{var F,z;n.debug("Updating columns state."),e.current.setState(Mq(L)),e.current.publishEvent("columnsChange",L.orderedFields),(z=(F=e.current).updateRenderContext)==null||z.call(F),e.current.forceUpdate()},[n,e]),i=y.useCallback(L=>od(e)[L],[e]),a=y.useCallback(()=>Wl(e),[e]),s=y.useCallback(()=>fo(e),[e]),l=y.useCallback((L,F=!0)=>(F?fo(e):Wl(e)).findIndex(_=>_.field===L),[e]),c=y.useCallback(L=>{const F=l(L);return Gf(e)[F]},[e,l]),u=y.useCallback(L=>{var z,_;Hs(e)!==L&&(e.current.setState(D=>N({},D,{columns:ng({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:L,keepOnlyColumnsToUpsert:!1})})),(_=(z=e.current).updateRenderContext)==null||_.call(z),e.current.forceUpdate())},[e]),d=y.useCallback(L=>{const F=ng({apiRef:e,columnsToUpsert:L,initialState:void 0,keepOnlyColumnsToUpsert:!1});o(F)},[e,o]),f=y.useCallback((L,F)=>{const z=Hs(e),_=z[L]??!0;if(F!==_){const D=N({},z,{[L]:F});e.current.setColumnVisibilityModel(D)}},[e]),p=y.useCallback(L=>Iu(e).findIndex(z=>z===L),[e]),m=y.useCallback((L,F)=>{const z=Iu(e),_=p(L);if(_===F)return;n.debug(`Moving column ${L} to index ${F}`);const D=[...z],H=D.splice(_,1)[0];D.splice(F,0,H),o(N({},Ac(e.current.state),{orderedFields:D}));const B={column:e.current.getColumn(L),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(L),oldIndex:_};e.current.publishEvent("columnIndexChange",B)},[e,n,o,p]),g=y.useCallback((L,F)=>{n.debug(`Updating column ${L} width to ${F}`);const z=Ac(e.current.state),_=z.lookup[L],D=N({},_,{width:F,hasBeenResized:!0});o(_N(N({},z,{lookup:N({},z.lookup,{[L]:D})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(L),colDef:D,width:F})},[e,n,o]),v={getColumn:i,getAllColumns:a,getColumnIndex:l,getColumnPosition:c,getVisibleColumns:s,getColumnIndexRelativeToVisibleColumns:p,updateColumns:d,setColumnVisibilityModel:u,setColumnVisibility:f,setColumnWidth:g},w={setColumnIndex:m};Qt(e,v,"public"),Qt(e,w,t.signature===Qs.DataGrid?"private":"public");const x=y.useCallback((L,F)=>{var V,W;const z={},_=Hs(e);(!F.exportOnlyDirtyModels||t.columnVisibilityModel!=null||Object.keys(((W=(V=t.initialState)==null?void 0:V.columns)==null?void 0:W.columnVisibilityModel)??{}).length>0||Object.keys(_).length>0)&&(z.columnVisibilityModel=_),z.orderedFields=Iu(e);const H=Wl(e),B={};return H.forEach(G=>{if(G.hasBeenResized){const Q={};Yle.forEach(Y=>{let ne=G[Y];ne===1/0&&(ne=-1),Q[Y]=ne}),B[G.field]=Q}}),Object.keys(B).length>0&&(z.dimensions=B),N({},L,{columns:z})},[e,t.columnVisibilityModel,(I=t.initialState)==null?void 0:I.columns]),S=y.useCallback((L,F)=>{var H;const z=(H=F.stateToRestore.columns)==null?void 0:H.columnVisibilityModel,_=F.stateToRestore.columns;if(z==null&&_==null)return L;const D=ng({apiRef:e,columnsToUpsert:[],initialState:_,columnVisibilityModel:z,keepOnlyColumnsToUpsert:!1});return e.current.setState(Mq(D)),_!=null&&e.current.publishEvent("columnsChange",D.orderedFields),L},[e]),P=y.useCallback((L,F)=>{var z;if(F===Oh.columns){const _=t.slots.columnsPanel;return $.jsx(_,N({},(z=t.slotProps)==null?void 0:z.columnsPanel))}return L},[t.slots.columnsPanel,(R=t.slotProps)==null?void 0:R.columnsPanel]),T=y.useCallback(L=>t.disableColumnSelector?L:[...L,"columnMenuColumnsItem"],[t.disableColumnSelector]);Ir(e,"columnMenu",T),Ir(e,"exportState",x),Ir(e,"restoreState",S),Ir(e,"preferencePanel",P);const E=y.useRef(null);gt(e,"viewportInnerSizeChange",L=>{E.current!==L.width&&(E.current=L.width,o(_N(Ac(e.current.state),e.current.getRootDimensions())))});const k=y.useCallback(()=>{n.info("Columns pipe processing have changed, regenerating the columns");const L=ng({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});o(L)},[e,n,o]);Az(e,"hydrateColumns",k);const A=y.useRef(!0);y.useEffect(()=>{if(A.current){A.current=!1;return}if(n.info(`GridColumns have changed, new length ${t.columns.length}`),r.current===t.columns)return;const L=ng({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});r.current=t.columns,o(L)},[n,e,o,t.columns]),y.useEffect(()=>{t.columnVisibilityModel!==void 0&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,n,t.columnVisibilityModel])}function Mq(e){return t=>N({},t,{columns:e})}const ukt=(e,t)=>{var n;return N({},e,{density:((n=t.initialState)==null?void 0:n.density)??t.density??"standard"})},dkt=(e,t)=>{var s;const n=Ao(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:Ig,changeEvent:"densityChange"});const o={setDensity:et(l=>{Ig(e.current.state)!==l&&(n.debug(`Set grid density to ${l}`),e.current.setState(u=>N({},u,{density:l})))})};Qt(e,o,"public");const i=y.useCallback((l,c)=>{var f;const u=Ig(e.current.state);return!c.exportOnlyDirtyModels||t.density!=null||((f=t.initialState)==null?void 0:f.density)!=null?N({},l,{density:u}):l},[e,t.density,(s=t.initialState)==null?void 0:s.density]),a=y.useCallback((l,c)=>{var d;const u=(d=c.stateToRestore)!=null&&d.density?c.stateToRestore.density:Ig(e.current.state);return e.current.setState(f=>N({},f,{density:u})),l},[e]);Ir(e,"exportState",i),Ir(e,"restoreState",a),y.useEffect(()=>{t.density&&e.current.setDensity(t.density)},[e,t.density])};function fkt(e,t="csv",n=document.title||"untitled"){const r=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=r,i.click(),setTimeout(()=>{URL.revokeObjectURL(o)});return}throw new Error("MUI X: exportAs not supported.")}const xce=({apiRef:e,options:t})=>{const n=Wl(e);return t.fields?t.fields.reduce((o,i)=>{const a=n.find(s=>s.field===i);return a&&o.push(a),o},[]):(t.allColumns?n:fo(e)).filter(o=>!o.disableExport)},Sce=({apiRef:e})=>{var l,c;const t=_le(e),n=gi(e),r=e.current.getSelectedRows(),o=t.filter(u=>n[u].type!=="footer"),i=em(e),a=((l=i==null?void 0:i.top)==null?void 0:l.map(u=>u.id))||[],s=((c=i==null?void 0:i.bottom)==null?void 0:c.map(u=>u.id))||[];return o.unshift(...a),o.push(...s),r.size>0?o.filter(u=>r.has(u)):o},pkt=(e,t)=>{const n=Ao(e,"useGridCsvExport"),r=t.ignoreValueFormatterDuringExport,o=(typeof r=="object"?r==null?void 0:r.csvExport:r)||!1,i=y.useCallback((c={})=>{n.debug("Get data as CSV");const u=xce({apiRef:e,options:c}),f=(c.getRowsToExport??Sce)({apiRef:e});return nkt({columns:u,rowIds:f,csvOptions:{delimiter:c.delimiter||",",shouldAppendQuotes:c.shouldAppendQuotes??!0,includeHeaders:c.includeHeaders??!0,includeColumnGroupsHeaders:c.includeColumnGroupsHeaders??!0,escapeFormulas:c.escapeFormulas??!0},ignoreValueFormatter:o,apiRef:e})},[n,e,o]),a=y.useCallback(c=>{n.debug("Export data as CSV");const u=i(c),d=new Blob([c!=null&&c.utf8WithBom?new Uint8Array([239,187,191]):"",u],{type:"text/csv"});fkt(d,"csv",c==null?void 0:c.fileName)},[n,i]);Qt(e,{getDataAsCsv:i,exportDataAsCsv:a},"public");const l=y.useCallback((c,u)=>{var d;return(d=u.csvOptions)!=null&&d.disableToolbarButton?c:[...c,{component:$.jsx(lIt,{options:u.csvOptions}),componentName:"csvExport"}]},[]);Ir(e,"exportMenu",l)},zP=(e,t,n)=>{let r=e.paginationModel;const o=e.rowCount,i=(n==null?void 0:n.pageSize)??r.pageSize,a=(n==null?void 0:n.page)??r.page,s=jle(o,i,a);n&&((n==null?void 0:n.page)!==r.page||(n==null?void 0:n.pageSize)!==r.pageSize)&&(r=n);const l=CCt(r.page,s);return l!==r.page&&(r=N({},r,{page:l})),zle(r.pageSize,t),r},hkt=(e,t)=>{var m,g;const n=Ao(e,"useGridPaginationModel"),r=Qe(e,ZS),o=Math.floor(t.rowHeight*r);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:Ri,changeEvent:"paginationModelChange"});const i=y.useCallback(v=>{const w=Ri(e);v!==w.page&&(n.debug(`Setting page to ${v}`),e.current.setPaginationModel({page:v,pageSize:w.pageSize}))},[e,n]),a=y.useCallback(v=>{const w=Ri(e);v!==w.pageSize&&(n.debug(`Setting page size to ${v}`),e.current.setPaginationModel({pageSize:v,page:w.page}))},[e,n]),s=y.useCallback(v=>{const w=Ri(e);v!==w&&(n.debug("Setting 'paginationModel' to",v),e.current.setState(x=>N({},x,{pagination:N({},x.pagination,{paginationModel:zP(x.pagination,t.signature,v)})}),"setPaginationModel"))},[e,n,t.signature]);Qt(e,{setPage:i,setPageSize:a,setPaginationModel:s},"public");const c=y.useCallback((v,w)=>{var P,T;const x=Ri(e);return!w.exportOnlyDirtyModels||t.paginationModel!=null||((T=(P=t.initialState)==null?void 0:P.pagination)==null?void 0:T.paginationModel)!=null||x.page!==0&&x.pageSize!==SCt(t.autoPageSize)?N({},v,{pagination:N({},v.pagination,{paginationModel:x})}):v},[e,t.paginationModel,(g=(m=t.initialState)==null?void 0:m.pagination)==null?void 0:g.paginationModel,t.autoPageSize]),u=y.useCallback((v,w)=>{var S,P;const x=(S=w.stateToRestore.pagination)!=null&&S.paginationModel?N({},Ble(t.autoPageSize),(P=w.stateToRestore.pagination)==null?void 0:P.paginationModel):Ri(e);return e.current.setState(T=>N({},T,{pagination:N({},T.pagination,{paginationModel:zP(T.pagination,t.signature,x)})}),"stateRestorePreProcessing"),v},[e,t.autoPageSize,t.signature]);Ir(e,"exportState",c),Ir(e,"restoreState",u);const d=()=>{var w;const v=Ri(e);(w=e.current.virtualScrollerRef)!=null&&w.current&&e.current.scrollToIndexes({rowIndex:v.page*v.pageSize})},f=y.useCallback(()=>{if(!t.autoPageSize)return;const v=e.current.getRootDimensions(),w=Math.floor(v.viewportInnerSize.height/o);e.current.setPageSize(w)},[e,t.autoPageSize,o]),p=y.useCallback(v=>{if(v==null)return;const w=Ri(e),x=Vle(e);w.page>x-1&&e.current.setPage(Math.max(0,x-1))},[e]);gt(e,"viewportInnerSizeChange",f),gt(e,"paginationModelChange",d),gt(e,"rowCountChange",p),y.useEffect(()=>{e.current.setState(v=>N({},v,{pagination:N({},v.pagination,{paginationModel:zP(v.pagination,t.signature,t.paginationModel)})}))},[e,t.paginationModel,t.paginationMode,t.signature]),y.useEffect(f,[f])};function mkt(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}function gkt(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}const ykt=(e,t)=>{const n=e.current.rootElementRef.current!==null,r=Ao(e,"useGridPrintExport"),o=y.useRef(null),i=y.useRef(null),a=y.useRef({}),s=y.useRef([]),l=y.useRef();y.useEffect(()=>{o.current=pr(e.current.rootElementRef.current)},[e,n]);const c=y.useCallback((v,w,x)=>new Promise(S=>{const P=xce({apiRef:e,options:{fields:v,allColumns:w}}).map(O=>O.field),T=Wl(e),E={};T.forEach(O=>{E[O.field]=P.includes(O.field)}),x&&(E[fb.field]=!0),e.current.setColumnVisibilityModel(E),S()}),[e]),u=y.useCallback(v=>{const x=v({apiRef:e}).reduce((S,P)=>{const T=e.current.getRow(P);return T[Zg]||S.push(T),S},[]);e.current.setRows(x)},[e]),d=y.useCallback((v,w)=>{var z,_,D,H;const x=N({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},w),S=v.contentDocument;if(!S)return;const P=pb(e.current.state),T=e.current.rootElementRef.current,E=T.cloneNode(!0),O=E.querySelector(`.${ae.main}`);O.style.overflow="visible",E.style.contain="size";let k=((z=T.querySelector(`.${ae.toolbarContainer}`))==null?void 0:z.offsetHeight)||0,A=((_=T.querySelector(`.${ae.footerContainer}`))==null?void 0:_.offsetHeight)||0;x.hideToolbar&&((D=E.querySelector(`.${ae.toolbarContainer}`))==null||D.remove(),k=0),x.hideFooter&&((H=E.querySelector(`.${ae.footerContainer}`))==null||H.remove(),A=0);const I=P.currentPageTotalHeight+Sz(e,t)+k+A;if(E.style.height=`${I}px`,E.style.boxSizing="content-box",!x.hideFooter){const B=E.querySelector(`.${ae.footerContainer}`);B.style.position="absolute",B.style.width="100%",B.style.top=`${I-A}px`}const R=document.createElement("div");R.appendChild(E),S.body.style.marginTop="0px",S.body.innerHTML=R.innerHTML;const L=typeof x.pageStyle=="function"?x.pageStyle():x.pageStyle;if(typeof L=="string"){const B=S.createElement("style");B.appendChild(S.createTextNode(L)),S.head.appendChild(B)}x.bodyClassName&&S.body.classList.add(...x.bodyClassName.split(" "));const F=[];if(x.copyStyles){const B=T.getRootNode(),W=(B.constructor.name==="ShadowRoot"?B:o.current).querySelectorAll("style, link[rel='stylesheet']");for(let G=0;G{Y.addEventListener("load",()=>ne())})),S.head.appendChild(Y)}}}Promise.all(F).then(()=>{v.contentWindow.print()})},[e,o,t]),f=y.useCallback(v=>{var w,x;o.current.body.removeChild(v),e.current.restoreState(i.current||{}),(x=(w=i.current)==null?void 0:w.columns)!=null&&x.columnVisibilityModel||e.current.setColumnVisibilityModel(a.current),e.current.setState(S=>N({},S,{virtualization:l.current})),e.current.setRows(s.current),i.current=null,a.current={},s.current=[]},[e]),m={exportDataAsPrint:y.useCallback(async v=>{if(r.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(i.current=e.current.exportState(),a.current=Hs(e),s.current=e.current.getSortedRows().filter(x=>!x[Zg]),t.pagination){const S={page:0,pageSize:gz(e)};e.current.setState(P=>N({},P,{pagination:N({},P.pagination,{paginationModel:zP(P.pagination,"DataGridPro",S)})}))}l.current=e.current.state.virtualization,e.current.setState(x=>N({},x,{virtualization:N({},x.virtualization,{enabled:!1,enabledForColumns:!1})})),await c(v==null?void 0:v.fields,v==null?void 0:v.allColumns,v==null?void 0:v.includeCheckboxes),u((v==null?void 0:v.getRowsToExport)??Sce),await mkt();const w=gkt(v==null?void 0:v.fileName);w.onload=()=>{d(w,v),w.contentWindow.matchMedia("print").addEventListener("change",S=>{S.matches===!1&&f(w)})},o.current.body.appendChild(w)},[t,r,e,d,f,c,u])};Qt(e,m,"public");const g=y.useCallback((v,w)=>{var x;return(x=w.printOptions)!=null&&x.disableToolbarButton?v:[...v,{component:$.jsx(cIt,{options:w.printOptions}),componentName:"printExport"}]},[]);Ir(e,"exportMenu",g)},vkt=(e,t,n)=>{var o,i;const r=t.filterModel??((i=(o=t.initialState)==null?void 0:o.filter)==null?void 0:i.filterModel)??Fx();return N({},e,{filter:{filterModel:pz(r,t.disableMultipleColumnsFiltering,n),filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},bkt=e=>e.filteredRowsLookup;function Aq(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function wkt(){return dle(Object.values)}const xkt=(e,t)=>{var A,I,R;const n=Ao(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:Xo,changeEvent:"filterModelChange"});const r=y.useCallback(()=>{e.current.setState(L=>{const F=Xo(L,e.current.instanceId),z=e.current.getFilterState(F),_=N({},L,{filter:N({},L.filter,z)}),D=Aq(e,_);return N({},_,{visibleRowsLookup:D})}),e.current.publishEvent("filteredRowsSet")},[e]),o=y.useCallback((L,F)=>F==null||F.filterable===!1||t.disableColumnFilter?L:[...L,"columnMenuFilterItem"],[t.disableColumnFilter]),i=y.useCallback(()=>{r(),e.current.forceUpdate()},[e,r]),a=y.useCallback(L=>{const F=Xo(e),z=[...F.items],_=z.findIndex(D=>D.id===L.id);_===-1?z.push(L):z[_]=L,e.current.setFilterModel(N({},F,{items:z}),"upsertFilterItem")},[e]),s=y.useCallback(L=>{const F=Xo(e),z=[...F.items];L.forEach(_=>{const D=z.findIndex(H=>H.id===_.id);D===-1?z.push(_):z[D]=_}),e.current.setFilterModel(N({},F,{items:z}),"upsertFilterItems")},[e]),l=y.useCallback(L=>{const F=Xo(e),z=F.items.filter(_=>_.id!==L.id);z.length!==F.items.length&&e.current.setFilterModel(N({},F,{items:z}),"deleteFilterItem")},[e]),c=y.useCallback((L,F,z)=>{if(n.debug("Displaying filter panel"),L){const _=Xo(e),D=_.items.filter(W=>{var ne;if(W.value!==void 0)return!(Array.isArray(W.value)&&W.value.length===0);const Q=(ne=e.current.getColumn(W.field).filterOperators)==null?void 0:ne.find(ie=>ie.value===W.operator);return!(typeof(Q==null?void 0:Q.requiresFilterValue)>"u"?!0:Q==null?void 0:Q.requiresFilterValue)});let H;const B=D.find(W=>W.field===L),V=e.current.getColumn(L);B?H=D:t.disableMultipleColumnsFiltering?H=[RN({field:L,operator:V.filterOperators[0].value},e)]:H=[...D,RN({field:L,operator:V.filterOperators[0].value},e)],e.current.setFilterModel(N({},_,{items:H}))}e.current.showPreferences(Oh.filters,F,z)},[e,n,t.disableMultipleColumnsFiltering]),u=y.useCallback(()=>{n.debug("Hiding filter panel"),e.current.hidePreferences()},[e,n]),d=y.useCallback(L=>{const F=Xo(e);F.logicOperator!==L&&e.current.setFilterModel(N({},F,{logicOperator:L}),"changeLogicOperator")},[e]),f=y.useCallback(L=>{const F=Xo(e);Jg(F.quickFilterValues,L)||e.current.setFilterModel(N({},F,{quickFilterValues:[...L]}))},[e]),p=y.useCallback((L,F)=>{Xo(e)!==L&&(n.debug("Setting filter model"),e.current.updateControlState("filter",H7(L,t.disableMultipleColumnsFiltering,e),F),e.current.unstable_applyFilters())},[e,n,t.disableMultipleColumnsFiltering]),m=y.useCallback(L=>{const F=pz(L,t.disableMultipleColumnsFiltering,e),z=t.filterMode==="client"?v1t(F,e,t.disableEval):null,_=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:z,filterModel:F??Fx()});return N({},_,{filterModel:F})},[t.disableMultipleColumnsFiltering,t.filterMode,t.disableEval,e]),g={setFilterLogicOperator:d,unstable_applyFilters:i,deleteFilterItem:l,upsertFilterItem:a,upsertFilterItems:s,setFilterModel:p,showFilterPanel:c,hideFilterPanel:u,setQuickFilterValues:f,ignoreDiacritics:t.ignoreDiacritics,getFilterState:m};Qt(e,g,"public");const v=y.useCallback((L,F)=>{var D,H;const z=Xo(e);return!F.exportOnlyDirtyModels||t.filterModel!=null||((H=(D=t.initialState)==null?void 0:D.filter)==null?void 0:H.filterModel)!=null||!Jg(z,Fx())?N({},L,{filter:{filterModel:z}}):L},[e,t.filterModel,(I=(A=t.initialState)==null?void 0:A.filter)==null?void 0:I.filterModel]),w=y.useCallback((L,F)=>{var _;const z=(_=F.stateToRestore.filter)==null?void 0:_.filterModel;return z==null?L:(e.current.updateControlState("filter",H7(z,t.disableMultipleColumnsFiltering,e),"restoreState"),N({},L,{callbacks:[...L.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),x=y.useCallback((L,F)=>{var z;if(F===Oh.filters){const _=t.slots.filterPanel;return $.jsx(_,N({},(z=t.slotProps)==null?void 0:z.filterPanel))}return L},[t.slots.filterPanel,(R=t.slotProps)==null?void 0:R.filterPanel]),{getRowId:S}=t,P=Zl(wkt),T=y.useCallback(L=>{if(t.filterMode!=="client"||!L.isRowMatchingFilters)return{filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}};const F=Zd(e),z={},{isRowMatchingFilters:_}=L,D={},H={passingFilterItems:null,passingQuickFilterValues:null},B=P.current(e.current.state.rows.dataRowIdToModelLookup);for(let G=0;G{n.debug("onColUpdated - GridColumns changed, applying filters");const L=Xo(e),F=od(e),z=L.items.filter(_=>_.field&&F[_.field]);z.length{L==="filtering"&&e.current.unstable_applyFilters()},[e]),k=y.useCallback(()=>{e.current.setState(L=>N({},L,{visibleRowsLookup:Aq(e,L)})),e.current.forceUpdate()},[e]);gt(e,"rowsSet",r),gt(e,"columnsChange",E),gt(e,"activeStrategyProcessorChange",O),gt(e,"rowExpansionChange",k),gt(e,"columnVisibilityModelChange",()=>{const L=Xo(e);L.quickFilterValues&&Ple(L)&&e.current.unstable_applyFilters()}),n1(()=>{e.current.unstable_applyFilters()}),wn(()=>{t.filterModel!==void 0&&e.current.setFilterModel(t.filterModel)},[e,n,t.filterModel])},Skt=e=>N({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),Ckt=(e,t)=>{const n=Ao(e,"useGridFocus"),r=y.useRef(null),o=e.current.rootElementRef.current!==null,i=y.useCallback((k,A)=>{k&&e.current.getRow(k.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(k.id,k.field),A)},[e]),a=y.useCallback((k,A)=>{const I=Ra(e);(I==null?void 0:I.id)===k&&(I==null?void 0:I.field)===A||(e.current.setState(R=>(n.debug(`Focusing on cell with id=${k} and field=${A}`),N({},R,{tabIndex:{cell:{id:k,field:A},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:k,field:A},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.forceUpdate(),e.current.getRow(k)&&(I&&i(I,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(k,A))))},[e,n,i]),s=y.useCallback((k,A={})=>{const I=Ra(e);i(I,A),e.current.setState(R=>(n.debug(`Focusing on column header with colIndex=${k}`),N({},R,{tabIndex:{columnHeader:{field:k},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:k},columnHeaderFilter:null,cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,i]),l=y.useCallback((k,A={})=>{const I=Ra(e);i(I,A),e.current.setState(R=>(n.debug(`Focusing on column header filter with colIndex=${k}`),N({},R,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:k},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:k},cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,i]),c=y.useCallback((k,A,I={})=>{const R=Ra(e);R&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(R.id,R.field),I),e.current.setState(L=>N({},L,{tabIndex:{columnGroupHeader:{field:k,depth:A},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:k,depth:A},columnHeader:null,columnHeaderFilter:null,cell:null}})),e.current.forceUpdate()},[e]),u=y.useCallback(()=>rO(e),[e]),d=y.useCallback((k,A,I)=>{let R=e.current.getColumnIndex(A);const L=fo(e),F=ty(e,{pagination:t.pagination,paginationMode:t.paginationMode}),z=em(e),_=[].concat(z.top||[],F.rows,z.bottom||[]);let D=_.findIndex(W=>W.id===k);I==="right"?R+=1:I==="left"?R-=1:D+=1,R>=L.length?(D+=1,D<_.length&&(R=0)):R<0&&(D-=1,D>=0&&(R=L.length-1)),D=$c(D,0,_.length-1);const H=_[D];if(!H)return;const B=e.current.unstable_getCellColSpanInfo(H.id,R);B&&B.spannedByColSpan&&(I==="left"||I==="below"?R=B.leftVisibleCellIndex:I==="right"&&(R=B.rightVisibleCellIndex)),R=$c(R,0,L.length-1);const V=L[R];e.current.setCellFocus(H.id,V.field)},[e,t.pagination,t.paginationMode]),f=y.useCallback(({id:k,field:A})=>{e.current.setCellFocus(k,A)},[e]),p=y.useCallback((k,A)=>{A.key==="Enter"||A.key==="Tab"||A.key==="Shift"||aO(A.key)||e.current.setCellFocus(k.id,k.field)},[e]),m=y.useCallback(({field:k},A)=>{A.target===A.currentTarget&&e.current.setColumnHeaderFocus(k,A)},[e]),g=y.useCallback(({fields:k,depth:A},I)=>{if(I.target!==I.currentTarget)return;const R=rO(e);R!==null&&R.depth===A&&k.includes(R.field)||e.current.setColumnGroupHeaderFocus(k[0],A,I)},[e]),v=y.useCallback((k,A)=>{var I,R;(R=(I=A.relatedTarget)==null?void 0:I.getAttribute("class"))!=null&&R.includes(ae.columnHeader)||(n.debug("Clearing focus"),e.current.setState(L=>N({},L,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[n,e]),w=y.useCallback(k=>{r.current=k},[]),x=y.useCallback(k=>{const A=r.current;r.current=null;const I=Ra(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:k,cell:A}))return;if(!I){A&&e.current.setCellFocus(A.id,A.field);return}if((A==null?void 0:A.id)===I.id&&(A==null?void 0:A.field)===I.field)return;const L=e.current.getCellElement(I.id,I.field);L!=null&&L.contains(k.target)||(A?e.current.setCellFocus(A.id,A.field):(e.current.setState(F=>N({},F,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),e.current.forceUpdate(),i(I,k)))},[e,i]),S=y.useCallback(k=>{if(k.cellMode==="view")return;const A=Ra(e);((A==null?void 0:A.id)!==k.id||(A==null?void 0:A.field)!==k.field)&&e.current.setCellFocus(k.id,k.field)},[e]),P=y.useCallback(()=>{var A;const k=Ra(e);if(k&&!e.current.getRow(k.id)){const I=(A=Ra(e))==null?void 0:A.id;let R=null;if(typeof I<"u"){const L=e.current.getRowIndexRelativeToVisibleRows(I),F=ty(e,{pagination:t.pagination,paginationMode:t.paginationMode}),z=F.rows[$c(L,0,F.rows.length-1)];R=(z==null?void 0:z.id)??null}e.current.setState(L=>N({},L,{focus:{cell:R===null?null:{id:R,field:k.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[e,t.pagination,t.paginationMode]),T=et(()=>{const k=Ra(e);if(!k)return;const A=ty(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(A.rows.find(L=>L.id===k.id))return;const R=fo(e);e.current.setState(L=>N({},L,{tabIndex:{cell:{id:A.rows[0].id,field:R[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),E={setCellFocus:a,setColumnHeaderFocus:s,setColumnHeaderFilterFocus:l},O={moveFocusToRelativeCell:d,setColumnGroupHeaderFocus:c,getColumnGroupHeaderFocus:u};Qt(e,E,"public"),Qt(e,O,"private"),y.useEffect(()=>{const k=pr(e.current.rootElementRef.current);return k.addEventListener("mouseup",x),()=>{k.removeEventListener("mouseup",x)}},[e,o,x]),gt(e,"columnHeaderBlur",v),gt(e,"cellDoubleClick",f),gt(e,"cellMouseDown",w),gt(e,"cellKeyDown",p),gt(e,"cellModeChange",S),gt(e,"columnHeaderFocus",m),gt(e,"columnGroupHeaderFocus",g),gt(e,"rowsSet",P),gt(e,"paginationModelChange",T)},Pkt=e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null},Tkt=e=>e===Mle||Pkt(e)!==null;function Ekt(e,t){const n=em(e)||{};return[...n.top||[],...t,...n.bottom||[]]}const wR=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(et)return e-1;return null},xR=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(e>t)return e-1}else if(!r&&e=0&&a{const n=Ao(e,"useGridKeyboardNavigation"),r=tm(e,t).rows,o=er(),i=t.unstable_listView,a=y.useMemo(()=>Ekt(e,r),[e,r]),s=t.signature!=="DataGrid"&&t.headerFilters,l=y.useCallback((x,S,P="left",T="up")=>{const E=qf(e),O=e.current.unstable_getCellColSpanInfo(S,x);O&&O.spannedByColSpan&&(P==="left"?x=O.leftVisibleCellIndex:P==="right"&&(x=O.rightVisibleCellIndex));const k=i?fv(e.current.state).field:cb(e)[x],A=Okt(e,S,k,T),I=E.findIndex(R=>R.id===A);n.debug(`Navigating to cell row ${I}, col ${x}`),e.current.scrollToIndexes({colIndex:x,rowIndex:I}),e.current.setCellFocus(A,k)},[e,n,i]),c=y.useCallback((x,S)=>{n.debug(`Navigating to header col ${x}`),e.current.scrollToIndexes({colIndex:x});const P=e.current.getVisibleColumns()[x].field;e.current.setColumnHeaderFocus(P,S)},[e,n]),u=y.useCallback((x,S)=>{n.debug(`Navigating to header filter col ${x}`),e.current.scrollToIndexes({colIndex:x});const P=e.current.getVisibleColumns()[x].field;e.current.setColumnHeaderFilterFocus(P,S)},[e,n]),d=y.useCallback((x,S,P)=>{n.debug(`Navigating to header col ${x}`),e.current.scrollToIndexes({colIndex:x});const{field:T}=e.current.getVisibleColumns()[x];e.current.setColumnGroupHeaderFocus(T,S,P)},[e,n]),f=y.useCallback(x=>{var S;return(S=a[x])==null?void 0:S.id},[a]),p=y.useCallback((x,S)=>{const P=S.currentTarget.querySelector(`.${ae.columnHeaderTitleContainerContent}`);if(!!P&&P.contains(S.target)&&x.field!==fb.field)return;const E=e.current.getViewportPageSize(),O=x.field?e.current.getColumnIndex(x.field):0,k=a.length>0?0:null,A=a.length-1,I=0,R=fo(e).length-1,L=r1(e);let F=!0;switch(S.key){case"ArrowDown":{k!==null&&(s?u(O,S):l(O,f(k)));break}case"ArrowRight":{const z=xR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});z!==null&&c(z,S);break}case"ArrowLeft":{const z=wR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});z!==null&&c(z,S);break}case"ArrowUp":{L>0&&d(O,L-1,S);break}case"PageDown":{k!==null&&A!==null&&l(O,f(Math.min(k+E,A)));break}case"Home":{c(I,S);break}case"End":{c(R,S);break}case"Enter":{(S.ctrlKey||S.metaKey)&&e.current.toggleColumnMenu(x.field);break}case" ":break;default:F=!1}F&&S.preventDefault()},[e,a.length,s,u,l,f,o,c,d]),m=y.useCallback((x,S)=>{const P=cPt(e)===x.field,T=uPt(e)===x.field;if(P||T||!aO(S.key))return;const E=e.current.getViewportPageSize(),O=x.field?e.current.getColumnIndex(x.field):0,k=0,A=a.length-1,I=0,R=fo(e).length-1;let L=!0;switch(S.key){case"ArrowDown":{const F=f(k);F!=null&&l(O,F);break}case"ArrowRight":{const F=xR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});F!==null&&u(F,S);break}case"ArrowLeft":{const F=wR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});F!==null?u(F,S):e.current.setColumnHeaderFilterFocus(x.field,S);break}case"ArrowUp":{c(O,S);break}case"PageDown":{A!==null&&l(O,f(Math.min(k+E,A)));break}case"Home":{u(I,S);break}case"End":{u(R,S);break}case" ":break;default:L=!1}L&&S.preventDefault()},[e,a.length,u,o,c,l,f]),g=y.useCallback((x,S)=>{const P=rO(e);if(P===null)return;const{field:T,depth:E}=P,{fields:O,depth:k,maxDepth:A}=x,I=e.current.getViewportPageSize(),R=e.current.getColumnIndex(T),L=T?e.current.getColumnIndex(T):0,F=0,z=a.length-1,_=0,D=fo(e).length-1;let H=!0;switch(S.key){case"ArrowDown":{k===A-1?c(R,S):d(R,E+1,S);break}case"ArrowUp":{k>0&&d(R,E-1,S);break}case"ArrowRight":{const B=O.length-O.indexOf(T)-1;R+B+1<=D&&d(R+B+1,E,S);break}case"ArrowLeft":{const B=O.indexOf(T);R-B-1>=_&&d(R-B-1,E,S);break}case"PageDown":{z!==null&&l(L,f(Math.min(F+I,z)));break}case"Home":{d(_,E,S);break}case"End":{d(D,E,S);break}case" ":break;default:H=!1}H&&S.preventDefault()},[e,a.length,c,d,l,f]),v=y.useCallback((x,S)=>{if(o1(S))return;const P=e.current.getCellParams(x.id,x.field);if(P.cellMode===Qn.Edit||!aO(S.key)||!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:S,cell:P})||a.length===0)return;const E=e.current.getViewportPageSize(),O=i?()=>0:e.current.getColumnIndex,k=x.field?O(x.field):0,A=a.findIndex(D=>D.id===x.id),I=0,R=a.length-1,L=0,z=(i?[fv(e.current.state)]:fo(e)).length-1;let _=!0;switch(S.key){case"ArrowDown":{AI?l(k,f(A-1)):s?u(k,S):c(k,S);break}case"ArrowRight":{const D=xR({currentColIndex:k,firstColIndex:L,lastColIndex:z,isRtl:o});D!==null&&l(D,f(A),o?"left":"right");break}case"ArrowLeft":{const D=wR({currentColIndex:k,firstColIndex:L,lastColIndex:z,isRtl:o});D!==null&&l(D,f(A),o?"right":"left");break}case"Tab":{S.shiftKey&&k>L?l(k-1,f(A),"left"):!S.shiftKey&&k=I?l(k,f(D)):c(k,S);break}case"Home":{S.ctrlKey||S.metaKey||S.shiftKey?l(L,f(I)):l(L,f(A));break}case"End":{S.ctrlKey||S.metaKey||S.shiftKey?l(z,f(R)):l(z,f(A));break}default:_=!1}_&&S.preventDefault()},[e,a,o,l,f,s,u,c,i]),w=y.useCallback((x,{event:S})=>S.key===" "?!1:x,[]);Ir(e,"canStartEditing",w),gt(e,"columnHeaderKeyDown",p),gt(e,"headerFilterKeyDown",m),gt(e,"columnGroupHeaderKeyDown",g),gt(e,"cellKeyDown",v)},kkt=(e,t)=>{var m,g;const n=Ao(e,"useGridRowCount"),r=Qe(e,yz),o=Qe(e,kg),i=Qe(e,N0),a=Qe(e,Ri),s=Zl(()=>Ri(e).pageSize);e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:kg,changeEvent:"rowCountChange"});const c={setRowCount:y.useCallback(v=>{o!==v&&(n.debug("Setting 'rowCount' to",v),e.current.setState(w=>N({},w,{pagination:N({},w.pagination,{rowCount:v})})))},[e,n,o])};Qt(e,c,"public");const u=y.useCallback((v,w)=>{var P,T;const x=kg(e);return!w.exportOnlyDirtyModels||t.rowCount!=null||((T=(P=t.initialState)==null?void 0:P.pagination)==null?void 0:T.rowCount)!=null?N({},v,{pagination:N({},v.pagination,{rowCount:x})}):v},[e,t.rowCount,(g=(m=t.initialState)==null?void 0:m.pagination)==null?void 0:g.rowCount]),d=y.useCallback((v,w)=>{var S;const x=(S=w.stateToRestore.pagination)!=null&&S.rowCount?w.stateToRestore.pagination.rowCount:kg(e);return e.current.setState(P=>N({},P,{pagination:N({},P.pagination,{rowCount:x})})),v},[e]);Ir(e,"exportState",u),Ir(e,"restoreState",d);const f=y.useCallback(v=>{t.paginationMode==="client"||!s.current||v.pageSize!==s.current&&(s.current=v.pageSize,o===-1&&e.current.setPage(0))},[t.paginationMode,s,o,e]);gt(e,"paginationModelChange",f),y.useEffect(()=>{t.paginationMode==="client"?e.current.setRowCount(r):t.rowCount!=null&&e.current.setRowCount(t.rowCount)},[e,t.paginationMode,r,t.rowCount]);const p=i.hasNextPage===!1;y.useEffect(()=>{p&&o===-1&&e.current.setRowCount(a.pageSize*a.page+r)},[e,r,p,o,a])},Mkt=(e,t)=>{var l,c;const n=Ao(e,"useGridPaginationMeta"),r=Qe(e,N0);e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:N0,changeEvent:"paginationMetaChange"});const i={setPaginationMeta:y.useCallback(u=>{r!==u&&(n.debug("Setting 'paginationMeta' to",u),e.current.setState(d=>N({},d,{pagination:N({},d.pagination,{meta:u})})))},[e,n,r])};Qt(e,i,"public");const a=y.useCallback((u,d)=>{var m,g;const f=N0(e);return!d.exportOnlyDirtyModels||t.paginationMeta!=null||((g=(m=t.initialState)==null?void 0:m.pagination)==null?void 0:g.meta)!=null?N({},u,{pagination:N({},u.pagination,{meta:f})}):u},[e,t.paginationMeta,(c=(l=t.initialState)==null?void 0:l.pagination)==null?void 0:c.meta]),s=y.useCallback((u,d)=>{var p;const f=(p=d.stateToRestore.pagination)!=null&&p.meta?d.stateToRestore.pagination.meta:N0(e);return e.current.setState(m=>N({},m,{pagination:N({},m.pagination,{meta:f})})),u},[e]);Ir(e,"exportState",a),Ir(e,"restoreState",s),y.useEffect(()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)},[e,t.paginationMeta])},Akt=(e,t)=>{var i,a,s,l,c,u;const n=N({},Ble(t.autoPageSize),t.paginationModel??((a=(i=t.initialState)==null?void 0:i.pagination)==null?void 0:a.paginationModel));zle(n.pageSize,t.signature);const r=t.rowCount??((l=(s=t.initialState)==null?void 0:s.pagination)==null?void 0:l.rowCount),o=t.paginationMeta??((u=(c=t.initialState)==null?void 0:c.pagination)==null?void 0:u.meta)??{};return N({},e,{pagination:{paginationModel:n,rowCount:r,meta:o}})},$kt=(e,t)=>{Mkt(e,t),hkt(e,t),kkt(e,t)},Rkt=(e,t)=>{var n;return N({},e,{preferencePanel:((n=t.initialState)==null?void 0:n.preferencePanel)??{open:!1}})},_kt=(e,t)=>{var d;const n=Ao(e,"useGridPreferencesPanel"),r=y.useRef(),o=y.useRef(),i=y.useCallback(()=>{n.debug("Hiding Preferences Panel");const f=Bx(e.current.state);f.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:f.openedPanelValue}),e.current.setState(p=>N({},p,{preferencePanel:{open:!1}})),e.current.forceUpdate()},[e,n]),a=y.useCallback(()=>{o.current=setTimeout(()=>clearTimeout(r.current),0)},[]),s=y.useCallback(()=>{r.current=setTimeout(i,100)},[i]),l=y.useCallback((f,p,m)=>{n.debug("Opening Preferences Panel"),a(),e.current.setState(g=>N({},g,{preferencePanel:N({},g.preferencePanel,{open:!0,openedPanelValue:f,panelId:p,labelId:m})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:f}),e.current.forceUpdate()},[n,a,e]);Qt(e,{showPreferences:l,hidePreferences:s},"public");const c=y.useCallback((f,p)=>{var v;const m=Bx(e.current.state);return!p.exportOnlyDirtyModels||((v=t.initialState)==null?void 0:v.preferencePanel)!=null||m.open?N({},f,{preferencePanel:m}):f},[e,(d=t.initialState)==null?void 0:d.preferencePanel]),u=y.useCallback((f,p)=>{const m=p.stateToRestore.preferencePanel;return m!=null&&e.current.setState(g=>N({},g,{preferencePanel:m})),f},[e]);Ir(e,"exportState",c),Ir(e,"restoreState",u),y.useEffect(()=>()=>{clearTimeout(r.current),clearTimeout(o.current)},[])},jN=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;case"string":default:return""}},Dkt=["id","field"],Nkt=["id","field"],Lkt=(e,t)=>{const[n,r]=y.useState({}),o=y.useRef(n),i=y.useRef({}),{processRowUpdate:a,onProcessRowUpdateError:s,cellModesModel:l,onCellModesModelChange:c}=t,u=_=>(...D)=>{t.editMode===Fc.Cell&&_(...D)},d=y.useCallback((_,D)=>{const H=e.current.getCellParams(_,D);if(!e.current.isCellEditable(H))throw new Error(`MUI X: The cell with id=${_} and field=${D} is not editable.`)},[e]),f=y.useCallback((_,D,H)=>{if(e.current.getCellMode(_,D)!==H)throw new Error(`MUI X: The cell with id=${_} and field=${D} is not in ${H} mode.`)},[e]),p=y.useCallback((_,D)=>{if(!_.isEditable||_.cellMode===Qn.Edit)return;const H=N({},_,{reason:cu.cellDoubleClick});e.current.publishEvent("cellEditStart",H,D)},[e]),m=y.useCallback((_,D)=>{if(_.cellMode===Qn.View||e.current.getCellMode(_.id,_.field)===Qn.View)return;const H=N({},_,{reason:Ol.cellFocusOut});e.current.publishEvent("cellEditStop",H,D)},[e]),g=y.useCallback((_,D)=>{if(_.cellMode===Qn.Edit){if(D.which===229)return;let H;if(D.key==="Escape"?H=Ol.escapeKeyDown:D.key==="Enter"?H=Ol.enterKeyDown:D.key==="Tab"&&(H=D.shiftKey?Ol.shiftTabKeyDown:Ol.tabKeyDown,D.preventDefault()),H){const B=N({},_,{reason:H});e.current.publishEvent("cellEditStop",B,D)}}else if(_.isEditable){let H;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:D,cellParams:_,editMode:"cell"}))return;if(mce(D)?H=cu.printableKeyDown:gce(D)?H=cu.pasteKeyDown:D.key==="Enter"?H=cu.enterKeyDown:(D.key==="Backspace"||D.key==="Delete")&&(H=cu.deleteKeyDown),H){const V=N({},_,{reason:H,key:D.key});e.current.publishEvent("cellEditStart",V,D)}}},[e]),v=y.useCallback(_=>{const{id:D,field:H,reason:B}=_,V={id:D,field:H};(B===cu.printableKeyDown||B===cu.deleteKeyDown||B===cu.pasteKeyDown)&&(V.deleteValue=!0),e.current.startCellEditMode(V)},[e]),w=y.useCallback(_=>{const{id:D,field:H,reason:B}=_;e.current.runPendingEditCellValueMutation(D,H);let V;B===Ol.enterKeyDown?V="below":B===Ol.tabKeyDown?V="right":B===Ol.shiftTabKeyDown&&(V="left");const W=B==="escapeKeyDown";e.current.stopCellEditMode({id:D,field:H,ignoreModifications:W,cellToFocusAfter:V})},[e]),x=_=>async(...D)=>{var H;if(_){const{id:B,field:V}=D[0];((H=e.current.state.editRows[B][V])==null?void 0:H.error)||_(...D)}};gt(e,"cellDoubleClick",u(p)),gt(e,"cellFocusOut",u(m)),gt(e,"cellKeyDown",u(g)),gt(e,"cellEditStart",u(v)),gt(e,"cellEditStop",u(w)),ar(e,"cellEditStart",t.onCellEditStart),ar(e,"cellEditStop",x(t.onCellEditStop));const S=y.useCallback((_,D)=>{const H=Lo(e.current.state);return H[_]&&H[_][D]?Qn.Edit:Qn.View},[e]),P=et(_=>{const D=_!==t.cellModesModel;c&&D&&c(_,{api:e.current}),!(t.cellModesModel&&D)&&(r(_),o.current=_,e.current.publishEvent("cellModesModelChange",_))}),T=y.useCallback((_,D,H)=>{const B=N({},o.current);if(H!==null)B[_]=N({},B[_],{[D]:N({},H)});else{const V=B[_],W=Ue(V,[D].map(cv));B[_]=W,Object.keys(B[_]).length===0&&delete B[_]}P(B)},[P]),E=y.useCallback((_,D,H)=>{e.current.setState(B=>{const V=N({},B.editRows);return H!==null?V[_]=N({},V[_],{[D]:N({},H)}):(delete V[_][D],Object.keys(V[_]).length===0&&delete V[_]),N({},B,{editRows:V})}),e.current.forceUpdate()},[e]),O=y.useCallback(_=>{const{id:D,field:H}=_,B=Ue(_,Dkt);d(D,H),f(D,H,Qn.View),T(D,H,N({mode:Qn.Edit},B))},[d,f,T]),k=et(async _=>{const{id:D,field:H,deleteValue:B,initialValue:V}=_,W=e.current.getCellValue(D,H);let G=W;B?G=jN(e.current.getColumn(H)):V&&(G=V);const Q=e.current.getColumn(H),Y=!!Q.preProcessEditCellProps&&B;let ne={value:G,error:!1,isProcessingProps:Y};if(E(D,H,ne),e.current.setCellFocus(D,H),Y&&(ne=await Promise.resolve(Q.preProcessEditCellProps({id:D,row:e.current.getRow(D),props:ne,hasChanged:G!==W})),e.current.getCellMode(D,H)===Qn.Edit)){const ie=Lo(e.current.state);E(D,H,N({},ne,{value:ie[D][H].value,isProcessingProps:!1}))}}),A=y.useCallback(_=>{const{id:D,field:H}=_,B=Ue(_,Nkt);f(D,H,Qn.Edit),T(D,H,N({mode:Qn.View},B))},[f,T]),I=et(async _=>{const{id:D,field:H,ignoreModifications:B,cellToFocusAfter:V="none"}=_;f(D,H,Qn.Edit),e.current.runPendingEditCellValueMutation(D,H);const W=()=>{E(D,H,null),T(D,H,null),V!=="none"&&e.current.moveFocusToRelativeCell(D,H,V)};if(B){W();return}const G=Lo(e.current.state),{error:Q,isProcessingProps:Y}=G[D][H];if(Q||Y){i.current[D][H].mode=Qn.Edit,T(D,H,{mode:Qn.Edit});return}const ne=e.current.getRowWithUpdatedValuesFromCellEditing(D,H);if(a){const ie=re=>{i.current[D][H].mode=Qn.Edit,T(D,H,{mode:Qn.Edit}),s&&s(re)};try{const re=e.current.getRow(D);Promise.resolve(a(ne,re,{rowId:D})).then(pe=>{e.current.updateRows([pe]),W()}).catch(ie)}catch(re){ie(re)}}else e.current.updateRows([ne]),W()}),R=y.useCallback(async _=>{var re,pe;const{id:D,field:H,value:B,debounceMs:V,unstable_skipValueParser:W}=_;d(D,H),f(D,H,Qn.Edit);const G=e.current.getColumn(H),Q=e.current.getRow(D);let Y=B;G.valueParser&&!W&&(Y=G.valueParser(B,Q,G,e));let ne=Lo(e.current.state),ie=N({},ne[D][H],{value:Y,changeReason:V?"debouncedSetEditCellValue":"setEditCellValue"});if(G.preProcessEditCellProps){const le=B!==ne[D][H].value;ie=N({},ie,{isProcessingProps:!0}),E(D,H,ie),ie=await Promise.resolve(G.preProcessEditCellProps({id:D,row:Q,props:ie,hasChanged:le}))}return e.current.getCellMode(D,H)===Qn.View?!1:(ne=Lo(e.current.state),ie=N({},ie,{isProcessingProps:!1}),ie.value=G.preProcessEditCellProps?ne[D][H].value:Y,E(D,H,ie),ne=Lo(e.current.state),!((pe=(re=ne[D])==null?void 0:re[H])!=null&&pe.error))},[e,d,f,E]),L=y.useCallback((_,D)=>{const H=e.current.getColumn(D),B=Lo(e.current.state),V=e.current.getRow(_);if(!B[_]||!B[_][D])return e.current.getRow(_);const{value:W}=B[_][D];return H.valueSetter?H.valueSetter(W,V,H,e):N({},V,{[D]:W})},[e]),F={getCellMode:S,startCellEditMode:O,stopCellEditMode:A},z={setCellEditingEditCellValue:R,getRowWithUpdatedValuesFromCellEditing:L};Qt(e,F,"public"),Qt(e,z,"private"),y.useEffect(()=>{l&&P(l)},[l,P]),wn(()=>{const _=nO(e),D=i.current;i.current=ble(n),Object.entries(n).forEach(([H,B])=>{Object.entries(B).forEach(([V,W])=>{var Y,ne;const G=((ne=(Y=D[H])==null?void 0:Y[V])==null?void 0:ne.mode)||Qn.View,Q=_[H]??H;W.mode===Qn.Edit&&G===Qn.View?k(N({id:Q,field:V},W)):W.mode===Qn.View&&G===Qn.Edit&&I(N({id:Q,field:V},W))})})},[e,n,k,I])},Fkt=["id"],jkt=["id"],Bkt=(e,t)=>{const[n,r]=y.useState({}),o=y.useRef(n),i=y.useRef({}),a=y.useRef(),s=y.useRef(null),{processRowUpdate:l,onProcessRowUpdateError:c,rowModesModel:u,onRowModesModelChange:d}=t,f=V=>(...W)=>{t.editMode===Fc.Row&&V(...W)},p=y.useCallback((V,W)=>{const G=e.current.getCellParams(V,W);if(!e.current.isCellEditable(G))throw new Error(`MUI X: The cell with id=${V} and field=${W} is not editable.`)},[e]),m=y.useCallback((V,W)=>{if(e.current.getRowMode(V)!==W)throw new Error(`MUI X: The row with id=${V} is not in ${W} mode.`)},[e]),g=y.useCallback(V=>{const W=Lo(e.current.state);return Object.values(W[V]).some(G=>G.error)},[e]),v=y.useCallback((V,W)=>{if(!V.isEditable||e.current.getRowMode(V.id)===jn.Edit)return;const G=e.current.getRowParams(V.id),Q=N({},G,{field:V.field,reason:Td.cellDoubleClick});e.current.publishEvent("rowEditStart",Q,W)},[e]),w=y.useCallback(V=>{s.current=V},[]),x=y.useCallback((V,W)=>{V.isEditable&&e.current.getRowMode(V.id)!==jn.View&&(s.current=null,a.current=setTimeout(()=>{var G;if(((G=s.current)==null?void 0:G.id)!==V.id){if(!e.current.getRow(V.id)||e.current.getRowMode(V.id)===jn.View||g(V.id))return;const Q=e.current.getRowParams(V.id),Y=N({},Q,{field:V.field,reason:Tl.rowFocusOut});e.current.publishEvent("rowEditStop",Y,W)}}))},[e,g]);y.useEffect(()=>()=>{clearTimeout(a.current)},[]);const S=y.useCallback((V,W)=>{if(V.cellMode===jn.Edit){if(W.which===229)return;let G;if(W.key==="Escape")G=Tl.escapeKeyDown;else if(W.key==="Enter")G=Tl.enterKeyDown;else if(W.key==="Tab"){const Q=cb(e).filter(Y=>e.current.getColumn(Y).type===Gk?!0:e.current.isCellEditable(e.current.getCellParams(V.id,Y)));if(W.shiftKey?V.field===Q[0]&&(G=Tl.shiftTabKeyDown):V.field===Q[Q.length-1]&&(G=Tl.tabKeyDown),W.preventDefault(),!G){const Y=Q.findIndex(ie=>ie===V.field),ne=Q[W.shiftKey?Y-1:Y+1];e.current.setCellFocus(V.id,ne)}}if(G){if(G!==Tl.escapeKeyDown&&g(V.id))return;const Q=N({},e.current.getRowParams(V.id),{reason:G,field:V.field});e.current.publishEvent("rowEditStop",Q,W)}}else if(V.isEditable){let G;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:W,cellParams:V,editMode:"row"}))return;if(mce(W)||gce(W)?G=Td.printableKeyDown:W.key==="Enter"?G=Td.enterKeyDown:(W.key==="Backspace"||W.key==="Delete")&&(G=Td.deleteKeyDown),G){const Y=e.current.getRowParams(V.id),ne=N({},Y,{field:V.field,reason:G});e.current.publishEvent("rowEditStart",ne,W)}}},[e,g]),P=y.useCallback(V=>{const{id:W,field:G,reason:Q}=V,Y={id:W,fieldToFocus:G};(Q===Td.printableKeyDown||Q===Td.deleteKeyDown)&&(Y.deleteValue=!!G),e.current.startRowEditMode(Y)},[e]),T=y.useCallback(V=>{const{id:W,reason:G,field:Q}=V;e.current.runPendingEditCellValueMutation(W);let Y;G===Tl.enterKeyDown?Y="below":G===Tl.tabKeyDown?Y="right":G===Tl.shiftTabKeyDown&&(Y="left");const ne=G==="escapeKeyDown";e.current.stopRowEditMode({id:W,ignoreModifications:ne,field:Q,cellToFocusAfter:Y})},[e]);gt(e,"cellDoubleClick",f(v)),gt(e,"cellFocusIn",f(w)),gt(e,"cellFocusOut",f(x)),gt(e,"cellKeyDown",f(S)),gt(e,"rowEditStart",f(P)),gt(e,"rowEditStop",f(T)),ar(e,"rowEditStart",t.onRowEditStart),ar(e,"rowEditStop",t.onRowEditStop);const E=y.useCallback(V=>{if(t.editMode===Fc.Cell)return jn.View;const W=Lo(e.current.state);return W[V]&&Object.keys(W[V]).length>0?jn.Edit:jn.View},[e,t.editMode]),O=et(V=>{const W=V!==t.rowModesModel;d&&W&&d(V,{api:e.current}),!(t.rowModesModel&&W)&&(r(V),o.current=V,e.current.publishEvent("rowModesModelChange",V))}),k=y.useCallback((V,W)=>{const G=N({},o.current);W!==null?G[V]=N({},W):delete G[V],O(G)},[O]),A=y.useCallback((V,W)=>{e.current.setState(G=>{const Q=N({},G.editRows);return W!==null?Q[V]=W:delete Q[V],N({},G,{editRows:Q})}),e.current.forceUpdate()},[e]),I=y.useCallback((V,W,G)=>{e.current.setState(Q=>{const Y=N({},Q.editRows);return G!==null?Y[V]=N({},Y[V],{[W]:N({},G)}):(delete Y[V][W],Object.keys(Y[V]).length===0&&delete Y[V]),N({},Q,{editRows:Y})}),e.current.forceUpdate()},[e]),R=y.useCallback(V=>{const{id:W}=V,G=Ue(V,Fkt);m(W,jn.View),k(W,N({mode:jn.Edit},G))},[m,k]),L=et(V=>{const{id:W,fieldToFocus:G,deleteValue:Q,initialValue:Y}=V,ne=Iu(e),ie=ne.reduce((re,pe)=>{if(!e.current.getCellParams(W,pe).isEditable)return re;const ee=e.current.getColumn(pe);let ce=e.current.getCellValue(W,pe);return G===pe&&(Q||Y)&&(Q?ce=jN(ee):Y&&(ce=Y)),re[pe]={value:ce,error:!1,isProcessingProps:!!ee.preProcessEditCellProps&&Q},re},{});A(W,ie),G&&e.current.setCellFocus(W,G),ne.filter(re=>!!e.current.getColumn(re).preProcessEditCellProps&&Q).forEach(re=>{const pe=e.current.getColumn(re),le=e.current.getCellValue(W,re),ee=Q?jN(pe):Y??le;Promise.resolve(pe.preProcessEditCellProps({id:W,row:e.current.getRow(W),props:ie[re],hasChanged:ee!==le})).then(ce=>{if(e.current.getRowMode(W)===jn.Edit){const se=Lo(e.current.state);I(W,re,N({},ce,{value:se[W][re].value,isProcessingProps:!1}))}})})}),F=y.useCallback(V=>{const{id:W}=V,G=Ue(V,jkt);m(W,jn.Edit),k(W,N({mode:jn.View},G))},[m,k]),z=et(V=>{const{id:W,ignoreModifications:G,field:Q,cellToFocusAfter:Y="none"}=V;e.current.runPendingEditCellValueMutation(W);const ne=()=>{Y!=="none"&&Q&&e.current.moveFocusToRelativeCell(W,Q,Y),A(W,null),k(W,null)};if(G){ne();return}const ie=Lo(e.current.state),re=e.current.getRow(W);if(Object.values(ie[W]).some(ee=>ee.isProcessingProps)){i.current[W].mode=jn.Edit;return}if(g(W)){i.current[W].mode=jn.Edit,k(W,{mode:jn.Edit});return}const le=e.current.getRowWithUpdatedValuesFromRowEditing(W);if(l){const ee=ce=>{i.current[W].mode=jn.Edit,k(W,{mode:jn.Edit}),c&&c(ce)};try{Promise.resolve(l(le,re,{rowId:W})).then(ce=>{e.current.updateRows([ce]),ne()}).catch(ee)}catch(ce){ee(ce)}}else e.current.updateRows([le]),ne()}),_=y.useCallback(V=>{const{id:W,field:G,value:Q,debounceMs:Y,unstable_skipValueParser:ne}=V;p(W,G);const ie=e.current.getColumn(G),re=e.current.getRow(W);let pe=Q;ie.valueParser&&!ne&&(pe=ie.valueParser(Q,re,ie,e));let le=Lo(e.current.state),ee=N({},le[W][G],{value:pe,changeReason:Y?"debouncedSetEditCellValue":"setEditCellValue"});return ie.preProcessEditCellProps||I(W,G,ee),new Promise(ce=>{const se=[];if(ie.preProcessEditCellProps){const Z=ee.value!==le[W][G].value;ee=N({},ee,{isProcessingProps:!0}),I(W,G,ee);const ue=le[W],ge=Ue(ue,[G].map(cv)),we=Promise.resolve(ie.preProcessEditCellProps({id:W,row:re,props:ee,hasChanged:Z,otherFieldsProps:ge})).then(me=>{if(e.current.getRowMode(W)===jn.View){ce(!1);return}le=Lo(e.current.state),me=N({},me,{isProcessingProps:!1}),me.value=ie.preProcessEditCellProps?le[W][G].value:pe,I(W,G,me)});se.push(we)}Object.entries(le[W]).forEach(([Z,ue])=>{if(Z===G)return;const ge=e.current.getColumn(Z);if(!ge.preProcessEditCellProps)return;ue=N({},ue,{isProcessingProps:!0}),I(W,Z,ue),le=Lo(e.current.state);const we=le[W],me=Ue(we,[Z].map(cv)),be=Promise.resolve(ge.preProcessEditCellProps({id:W,row:re,props:ue,hasChanged:!1,otherFieldsProps:me})).then(xe=>{if(e.current.getRowMode(W)===jn.View){ce(!1);return}xe=N({},xe,{isProcessingProps:!1}),I(W,Z,xe)});se.push(be)}),Promise.all(se).then(()=>{e.current.getRowMode(W)===jn.Edit?(le=Lo(e.current.state),ce(!le[W][G].error)):ce(!1)})})},[e,p,I]),D=y.useCallback(V=>{const W=Lo(e.current.state),G=e.current.getRow(V);if(!W[V])return e.current.getRow(V);let Q=N({},G);return Object.entries(W[V]).forEach(([Y,ne])=>{const ie=e.current.getColumn(Y);ie.valueSetter?Q=ie.valueSetter(ne.value,Q,ie,e):Q[Y]=ne.value}),Q},[e]),H={getRowMode:E,startRowEditMode:R,stopRowEditMode:F},B={setRowEditingEditCellValue:_,getRowWithUpdatedValuesFromRowEditing:D};Qt(e,H,"public"),Qt(e,B,"private"),y.useEffect(()=>{u&&O(u)},[u,O]),wn(()=>{const V=nO(e),W=i.current;i.current=ble(n);const G=new Set([...Object.keys(n),...Object.keys(W)]);Array.from(G).forEach(Q=>{var re;const Y=n[Q]??{mode:jn.View},ne=((re=W[Q])==null?void 0:re.mode)||jn.View,ie=V[Q]??Q;Y.mode===jn.Edit&&ne===jn.View?L(N({id:ie},Y)):Y.mode===jn.View&&ne===jn.Edit&&z(N({id:ie},Y))})},[e,n,L,z])},zkt=e=>N({},e,{editRows:{}}),Vkt=(e,t)=>{Lkt(e,t),Bkt(e,t);const n=y.useRef({}),{isCellEditable:r}=t,o=y.useCallback(f=>uv(f.rowNode)||!f.colDef.editable||!f.colDef.renderEditCell?!1:r?r(f):!0,[r]),i=(f,p,m,g)=>{if(!m){g();return}if(n.current[f]||(n.current[f]={}),n.current[f][p]){const[x]=n.current[f][p];clearTimeout(x)}const v=()=>{const[x]=n.current[f][p];clearTimeout(x),g(),delete n.current[f][p]},w=setTimeout(()=>{g(),delete n.current[f][p]},m);n.current[f][p]=[w,v]};y.useEffect(()=>{const f=n.current;return()=>{Object.entries(f).forEach(([p,m])=>{Object.keys(m).forEach(g=>{const[v]=f[p][g];clearTimeout(v),delete f[p][g]})})}},[]);const a=y.useCallback((f,p)=>{if(n.current[f]){if(!p)Object.keys(n.current[f]).forEach(m=>{const[,g]=n.current[f][m];g()});else if(n.current[f][p]){const[,m]=n.current[f][p];m()}}},[]),s=y.useCallback(f=>{const{id:p,field:m,debounceMs:g}=f;return new Promise(v=>{i(p,m,g,async()=>{const w=t.editMode===Fc.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(p,m)===Qn.Edit){const x=await w(f);v(x)}})})},[e,t.editMode]),l=y.useCallback((f,p)=>t.editMode===Fc.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(f,p):e.current.getRowWithUpdatedValuesFromRowEditing(f),[e,t.editMode]),c=y.useCallback((f,p)=>{var g;return((g=Lo(e.current.state)[f])==null?void 0:g[p])??null},[e]),u={isCellEditable:o,setEditCellValue:s,getRowWithUpdatedValues:l,unstable_getEditCellMeta:c},d={runPendingEditCellValueMutation:a};Qt(e,u,"public"),Qt(e,d,"private")},Hkt=(e,t,n)=>{const r=!!t.unstable_dataSource;return n.current.caches.rows=FP({rows:r?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),N({},e,{rows:Ole({apiRef:n,rowCountProp:t.rowCount,loadingProp:r?!0:t.loading,previousTree:null,previousTreeDepths:null})})},Ukt=(e,t)=>{const n=Ao(e,"useGridRows"),r=tm(e,t),o=y.useRef(Date.now()),i=y.useRef(t.rowCount),a=ca(),s=y.useCallback(B=>{const V=Zd(e)[B];if(V)return V;const W=e.current.getRowNode(B);return W&&uv(W)?{[Zg]:B}:null},[e]),l=t.getRowId,c=y.useCallback(B=>Zg in B?B[Zg]:l?l(B):B.id,[l]),u=y.useMemo(()=>r.rows.reduce((B,{id:V},W)=>(B[V]=W,B),{}),[r.rows]),d=y.useCallback(({cache:B,throttle:V})=>{const W=()=>{o.current=Date.now(),e.current.setState(Q=>N({},Q,{rows:Ole({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:gi(e),previousTreeDepths:Y7(e),previousGroupsToFetch:_1t(e)})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(a.clear(),e.current.caches.rows=B,!V){W();return}const G=t.throttleRowsMs-(Date.now()-o.current);if(G>0){a.start(G,W);return}W()},[t.throttleRowsMs,t.rowCount,t.loading,e,a]),f=y.useCallback(B=>{n.debug(`Updating all rows, new length ${B.length}`);const V=FP({rows:B,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),W=e.current.caches.rows;V.rowsBeforePartialUpdates=W.rowsBeforePartialUpdates,d({cache:V,throttle:!0})},[n,t.getRowId,t.loading,t.rowCount,d,e]),p=y.useCallback(B=>{if(t.signature===Qs.DataGrid&&B.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` -`));const V=Q7(e,B,t.getRowId),W=X7({updates:V,getRowId:t.getRowId,previousCache:e.current.caches.rows});d({cache:W,throttle:!0})},[t.signature,t.getRowId,d,e]),m=y.useCallback((B,V)=>{const W=Q7(e,B,t.getRowId),G=X7({updates:W,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:V??[]});d({cache:G,throttle:!1})},[t.getRowId,d,e]),g=y.useCallback(B=>{B!==t.loading&&(n.debug(`Setting loading to ${B}`),e.current.setState(V=>N({},V,{rows:N({},V.rows,{loading:B})})),e.current.caches.rows.loadingPropBeforePartialUpdates=B)},[t.loading,e,n]),v=y.useCallback(()=>{const B=ZC(e),V=Zd(e);return new Map(B.map(W=>[W,V[W]??{}]))},[e]),w=y.useCallback(()=>qk(e),[e]),x=y.useCallback(()=>ZC(e),[e]),S=y.useCallback(B=>u[B],[u]),P=y.useCallback((B,V)=>{const W=e.current.getRowNode(B);if(!W)throw new Error(`MUI X: No row with id #${B} found.`);if(W.type!=="group")throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const G=N({},W,{childrenExpanded:V});e.current.setState(Q=>N({},Q,{rows:N({},Q.rows,{tree:N({},Q.rows.tree,{[B]:G})})})),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",G)},[e]),T=y.useCallback(B=>gi(e)[B]??null,[e]),E=y.useCallback(({skipAutoGeneratedRows:B=!0,groupId:V,applySorting:W,applyFiltering:G})=>{const Q=gi(e);let Y;if(W){const ne=Q[V];if(!ne)return[];const ie=t1(e);Y=[];const re=ie.findIndex(pe=>pe===V)+1;for(let pe=re;pene.depth;pe+=1){const le=ie[pe];(!B||!uv(Q[le]))&&Y.push(le)}}else Y=hz(Q,V,B);if(G){const ne=db(e);Y=Y.filter(ie=>ne[ie]!==!1)}return Y},[e]),O=y.useCallback((B,V)=>{const W=e.current.getRowNode(B);if(!W)throw new Error(`MUI X: No row with id #${B} found.`);if(W.parent!==Zo)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if(W.type!=="leaf")throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");e.current.setState(G=>{const Q=gi(G,e.current.instanceId)[Zo],Y=Q.children,ne=Y.findIndex(re=>re===B);if(ne===-1||ne===V)return G;n.debug(`Moving row ${B} to index ${V}`);const ie=[...Y];return ie.splice(V,0,ie.splice(ne,1)[0]),N({},G,{rows:N({},G.rows,{tree:N({},G.rows.tree,{[Zo]:N({},Q,{children:ie})})})})}),e.current.publishEvent("rowsSet")},[e,n]),k=y.useCallback((B,V)=>{if(t.signature===Qs.DataGrid&&V.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` -`));if(V.length===0)return;if(ub(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const G=N({},gi(e)),Q=N({},Zd(e)),Y=N({},nO(e)),ne=G[Zo],ie=[...ne.children],re=new Set;for(let le=0;le{var ee;return((ee=G[le])==null?void 0:ee.type)==="leaf"});e.current.caches.rows.dataRowIdToModelLookup=Q,e.current.caches.rows.dataRowIdToIdLookup=Y,e.current.setState(le=>N({},le,{rows:N({},le.rows,{dataRowIdToModelLookup:Q,dataRowIdToIdLookup:Y,dataRowIds:pe,tree:G})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId]),A={getRow:s,setLoading:g,getRowId:c,getRowModels:v,getRowsCount:w,getAllRowIds:x,setRows:f,updateRows:p,getRowNode:T,getRowIndexRelativeToVisibleRows:S,unstable_replaceRows:k},I={setRowIndex:O,setRowChildrenExpansion:P,getRowGroupChildren:E},R={updateServerRows:m},L=y.useCallback(()=>{n.info("Row grouping pre-processing have changed, regenerating the row tree");let B;e.current.caches.rows.rowsBeforePartialUpdates===t.rows?B=N({},e.current.caches.rows,{updates:{type:"full",rows:ZC(e)}}):B=FP({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),d({cache:B,throttle:!1})},[n,e,t.rows,t.getRowId,t.loading,t.rowCount,d]),F=Zl(()=>t.unstable_dataSource),z=y.useCallback(B=>{if(t.unstable_dataSource&&t.unstable_dataSource!==F.current){F.current=t.unstable_dataSource;return}B==="rowTreeCreation"&&L()},[L,F,t.unstable_dataSource]),_=y.useCallback(()=>{e.current.getActiveStrategy("rowTree")!==D1t(e)&&L()},[e,L]);gt(e,"activeStrategyProcessorChange",z),gt(e,"strategyAvailabilityChange",_);const D=y.useCallback(()=>{e.current.setState(B=>{const V=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:gi(B,e.current.instanceId),treeDepths:Y7(B,e.current.instanceId),dataRowIds:ZC(B,e.current.instanceId),dataRowIdToModelLookup:Zd(B,e.current.instanceId),dataRowIdToIdLookup:nO(B,e.current.instanceId)});return N({},B,{rows:N({},B.rows,V,{totalTopLevelRowCount:Ele({tree:V.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet"),e.current.forceUpdate()},[e,t.rowCount]);Az(e,"hydrateRows",D),Qt(e,A,"public"),Qt(e,I,t.signature===Qs.DataGrid?"private":"public"),Qt(e,R,"private");const H=y.useRef(!0);y.useEffect(()=>{var Q;if(H.current){H.current=!1;return}let B=!1;t.rowCount!==i.current&&(B=!0,i.current=t.rowCount);const V=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,W=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,G=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;V&&(W||(e.current.setState(Y=>N({},Y,{rows:N({},Y.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),G||(e.current.setState(Y=>N({},Y,{rows:N({},Y.rows,{totalRowCount:Math.max(t.rowCount||0,Y.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,Y.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate()),!B)||(n.debug(`Updating all rows, new length ${(Q=t.rows)==null?void 0:Q.length}`),d({cache:FP({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))},[t.rows,t.rowCount,t.getRowId,t.loading,n,d,e])},Wkt=e=>{const t={[Zo]:N({},F1t(),{children:e})};for(let n=0;n{const n=N({},e),r={};for(let a=0;a!r[a])),n[Zo]=N({},o,{children:i}),{groupingName:Ih,tree:n,treeDepths:{0:i.length},dataRowIds:i}},qkt=e=>e.updates.type==="full"?Wkt(e.updates.rows):Gkt({previousTree:e.previousTree,actions:e.updates.actions}),Kkt=e=>{sO(e,Ih,"rowTreeCreation",qkt)};class SR extends Error{}function Ykt(e,t){const n=y.useCallback(f=>({field:f,colDef:e.current.getColumn(f)}),[e]),r=y.useCallback(f=>{const p=e.current.getRow(f);if(!p)throw new SR(`No row with id #${f} found`);return{id:f,columns:e.current.getAllColumns(),row:p}},[e]),o=y.useCallback((f,p)=>{const m=t.unstable_listView?fv(e.current.state):e.current.getColumn(p),g=e.current.getRow(f),v=e.current.getRowNode(f);if(!g||!v)throw new SR(`No row with id #${f} found`);const w=g[p],x=m!=null&&m.valueGetter?m.valueGetter(w,g,m,e):w,S=Ra(e),P=bz(e),T={id:f,field:p,row:g,rowNode:v,colDef:m,cellMode:e.current.getCellMode(f,p),hasFocus:S!==null&&S.field===p&&S.id===f,tabIndex:P&&P.field===p&&P.id===f?0:-1,value:x,formattedValue:x,isEditable:!1,api:{}};return m&&m.valueFormatter&&(T.formattedValue=m.valueFormatter(x,g,m,e)),T.isEditable=m&&e.current.isCellEditable(T),T},[e,t.unstable_listView]),i=y.useCallback((f,p)=>{const m=e.current.getColumn(p),g=e.current.getRow(f);if(!g)throw new SR(`No row with id #${f} found`);return!m||!m.valueGetter?g[p]:m.valueGetter(g[m.field],g,m,e)},[e]),a=y.useCallback((f,p)=>{const m=p.field;if(!p||!p.valueGetter)return f[m];const g=f[p.field];return p.valueGetter(g,f,p,e)},[e]),s=y.useCallback((f,p)=>{const m=a(f,p);return!p||!p.valueFormatter?m:p.valueFormatter(m,f,p,e)},[e,a]),l=y.useCallback(f=>e.current.rootElementRef.current?oEt(e.current.rootElementRef.current,f):null,[e]),c=y.useCallback(f=>e.current.rootElementRef.current?iEt(e.current.rootElementRef.current,f):null,[e]),u=y.useCallback((f,p)=>e.current.rootElementRef.current?aEt(e.current.rootElementRef.current,{id:f,field:p}):null,[e]);Qt(e,{getCellValue:i,getCellParams:o,getCellElement:u,getRowValue:a,getRowFormattedValue:s,getRowParams:r,getRowElement:c,getColumnHeaderParams:n,getColumnHeaderElement:l},"public")}const Cce=(e,t)=>e==null||Array.isArray(e)?e:t&&t[0]===e?t:[e],Xkt=(e,t)=>N({},e,{rowSelection:t.rowSelection?Cce(t.rowSelectionModel)??[]:[]}),Qkt=(e,t)=>{var D,H,B,V,W,G,Q;const n=Ao(e,"useGridSelection"),r=y.useCallback(Y=>(...ne)=>{t.rowSelection&&Y(...ne)},[t.rowSelection]),o=t.signature!==Qs.DataGrid&&(((D=t.rowSelectionPropagation)==null?void 0:D.parents)||((H=t.rowSelectionPropagation)==null?void 0:H.descendants)),i=y.useMemo(()=>Cce(t.rowSelectionModel,As(e.current.state)),[e,t.rowSelectionModel]),a=y.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:i,propOnChange:t.onRowSelectionModelChange,stateSelector:As,changeEvent:"rowSelectionChange"});const{checkboxSelection:s,disableRowSelectionOnClick:l,isRowSelectable:c}=t,u=vz(t),d=tm(e,t),f=Qe(e,gi),p=Qe(e,ub)>1,m=y.useCallback(Y=>{let ne=Y;const ie=a.current??Y,re=e.current.isRowSelected(Y);if(re){const pe=ey(e),le=pe.findIndex(ce=>ce===ie),ee=pe.findIndex(ce=>ce===ne);if(le===ee)return;le>ee?ne=pe[ee+1]:ne=pe[ee-1]}a.current=Y,e.current.selectRowRange({startId:ie,endId:ne},!re)},[e]),g=y.useCallback(Y=>{if(t.signature===Qs.DataGrid&&!u&&Array.isArray(Y)&&Y.length>1)throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join(` -`));As(e.current.state)!==Y&&(n.debug("Setting selection model"),e.current.setState(ie=>N({},ie,{rowSelection:t.rowSelection?Y:[]})),e.current.forceUpdate())},[e,n,t.rowSelection,t.signature,u]),v=y.useCallback(Y=>As(e.current.state).includes(Y),[e]),w=y.useCallback(Y=>{if(t.rowSelection===!1||c&&!c(e.current.getRowParams(Y)))return!1;const ne=e.current.getRowNode(Y);return!((ne==null?void 0:ne.type)==="footer"||(ne==null?void 0:ne.type)==="pinnedRow")},[e,t.rowSelection,c]),x=y.useCallback(()=>cCt(e),[e]),S=y.useCallback((Y,ne=!0,ie=!1)=>{var re,pe,le,ee,ce,se;if(e.current.isRowSelectable(Y))if(a.current=Y,ie){n.debug(`Setting selection for row ${Y}`);const Z=[],ue=ge=>{Z.push(ge)};ne&&(ue(Y),o&&eP(e,f,Y,((re=t.rowSelectionPropagation)==null?void 0:re.descendants)??!1,((pe=t.rowSelectionPropagation)==null?void 0:pe.parents)??!1,ue)),e.current.setRowSelectionModel(Z)}else{n.debug(`Toggling selection for row ${Y}`);const Z=As(e.current.state),ue=new Set(Z);ue.delete(Y);const ge=be=>{ue.add(be)},we=be=>{ue.delete(be)};ne?(ge(Y),o&&eP(e,f,Y,((le=t.rowSelectionPropagation)==null?void 0:le.descendants)??!1,((ee=t.rowSelectionPropagation)==null?void 0:ee.parents)??!1,ge)):o&&J7(e,f,Y,((ce=t.rowSelectionPropagation)==null?void 0:ce.descendants)??!1,((se=t.rowSelectionPropagation)==null?void 0:se.parents)??!1,we),(ue.size<2||u)&&e.current.setRowSelectionModel(Array.from(ue))}},[e,n,o,f,(B=t.rowSelectionPropagation)==null?void 0:B.descendants,(V=t.rowSelectionPropagation)==null?void 0:V.parents,u]),P=y.useCallback((Y,ne=!0,ie=!1)=>{n.debug("Setting selection for several rows");const re=Y.filter(ee=>e.current.isRowSelectable(ee));let pe;if(ie){if(ne){if(pe=new Set(re),o){const ce=se=>{pe.add(se)};re.forEach(se=>{var Z,ue;eP(e,f,se,((Z=t.rowSelectionPropagation)==null?void 0:Z.descendants)??!1,((ue=t.rowSelectionPropagation)==null?void 0:ue.parents)??!1,ce)})}}else pe=new Set;const ee=ku(e);if(pe.size===Object.keys(ee).length&&Array.from(pe).every(ce=>ee[ce]===ce))return}else{pe=new Set(Object.values(ku(e)));const ee=se=>{pe.add(se)},ce=se=>{pe.delete(se)};re.forEach(se=>{var Z,ue,ge,we;ne?(pe.add(se),o&&eP(e,f,se,((Z=t.rowSelectionPropagation)==null?void 0:Z.descendants)??!1,((ue=t.rowSelectionPropagation)==null?void 0:ue.parents)??!1,ee)):(ce(se),o&&J7(e,f,se,((ge=t.rowSelectionPropagation)==null?void 0:ge.descendants)??!1,((we=t.rowSelectionPropagation)==null?void 0:we.parents)??!1,ce))})}(pe.size<2||u)&&e.current.setRowSelectionModel(Array.from(pe))},[n,o,u,e,f,(W=t.rowSelectionPropagation)==null?void 0:W.descendants,(G=t.rowSelectionPropagation)==null?void 0:G.parents]),T=y.useCallback(({startId:Y,endId:ne},ie=!0,re=!1)=>{if(!e.current.getRow(Y)||!e.current.getRow(ne))return;n.debug(`Expanding selection from row ${Y} to row ${ne}`);const pe=ey(e),le=pe.indexOf(Y),ee=pe.indexOf(ne),[ce,se]=le>ee?[ee,le]:[le,ee],Z=pe.slice(ce,se+1);e.current.selectRows(Z,ie,re)},[e,n]),E={selectRow:S,setRowSelectionModel:g,getSelectedRows:x,isRowSelected:v,isRowSelectable:w},O={selectRows:P,selectRowRange:T};Qt(e,E,"public"),Qt(e,O,t.signature===Qs.DataGrid?"private":"public");const k=y.useCallback((Y=!1)=>{var se;const ne=As(e.current.state),ie=Zd(e),re=db(e),pe=N({},ku(e)),le=Z=>t.filterMode==="server"?!ie[Z]:re[Z]!==!0;let ee=!1;ne.forEach(Z=>{var ge;if(le(Z)){if(t.keepNonExistentRowsSelected)return;delete pe[Z],ee=!0;return}if(!((ge=t.rowSelectionPropagation)!=null&&ge.parents))return;const ue=f[Z];if(ue.type==="group"){if(ue.isAutoGenerated){delete pe[Z],ee=!0;return}ue.children.every(me=>re[me]===!1)||(delete pe[Z],ee=!0)}});const ce=p&&((se=t.rowSelectionPropagation)==null?void 0:se.parents)&&Object.keys(pe).length>0;if(ee||ce&&!Y){const Z=Object.values(pe);ce?e.current.selectRows(Z,!0,!0):e.current.setRowSelectionModel(Z)}},[e,p,(Q=t.rowSelectionPropagation)==null?void 0:Q.parents,t.keepNonExistentRowsSelected,t.filterMode,f]),A=y.useCallback((Y,ne)=>{const ie=ne.metaKey||ne.ctrlKey,re=!s&&!ie&&!oOt(ne),pe=!u||re,le=e.current.isRowSelected(Y);pe?e.current.selectRow(Y,re?!0:!le,!0):e.current.selectRow(Y,!le,!1)},[e,u,s]),I=y.useCallback((Y,ne)=>{var pe;if(l)return;const ie=(pe=ne.target.closest(`.${ae.cell}`))==null?void 0:pe.getAttribute("data-field");if(ie===fb.field||ie===Yk)return;if(ie){const le=e.current.getColumn(ie);if((le==null?void 0:le.type)===Gk)return}e.current.getRowNode(Y.id).type!=="pinnedRow"&&(ne.shiftKey&&u?m(Y.id):A(Y.id,ne))},[l,u,e,m,A]),R=y.useCallback((Y,ne)=>{var ie;u&&ne.shiftKey&&((ie=window.getSelection())==null||ie.removeAllRanges())},[u]),L=y.useCallback((Y,ne)=>{u&&ne.nativeEvent.shiftKey?m(Y.id):e.current.selectRow(Y.id,Y.value,!u)},[e,m,u]),F=y.useCallback(Y=>{const ne=t.pagination&&t.checkboxSelectionVisibleOnly&&t.paginationMode==="client"?Hle(e):ey(e);e.current.selectRows(ne,Y.value)},[e,t.checkboxSelectionVisibleOnly,t.pagination,t.paginationMode]),z=y.useCallback((Y,ne)=>{if(e.current.getCellMode(Y.id,Y.field)!==Qn.Edit&&!o1(ne)){if(aO(ne.key)&&ne.shiftKey){const ie=Ra(e);if(ie&&ie.id!==Y.id){ne.preventDefault();const re=e.current.isRowSelected(ie.id);if(!u){e.current.selectRow(ie.id,!re,!0);return}const pe=e.current.getRowIndexRelativeToVisibleRows(ie.id),le=e.current.getRowIndexRelativeToVisibleRows(Y.id);let ee,ce;pe>le?re?(ee=le,ce=pe-1):(ee=le,ce=pe):re?(ee=pe+1,ce=le):(ee=pe,ce=le);const se=d.rows.slice(ee,ce+1).map(Z=>Z.id);e.current.selectRows(se,!re);return}}if(ne.key===" "&&ne.shiftKey){ne.preventDefault(),A(Y.id,ne);return}String.fromCharCode(ne.keyCode)==="A"&&(ne.ctrlKey||ne.metaKey)&&(ne.preventDefault(),P(e.current.getAllRowIds(),!0))}},[e,A,P,d.rows,u]);gt(e,"sortedRowsSet",r(()=>k(!0))),gt(e,"filteredRowsSet",r(k)),gt(e,"rowClick",r(I)),gt(e,"rowSelectionCheckboxChange",r(L)),gt(e,"headerSelectionCheckboxChange",F),gt(e,"cellMouseDown",r(R)),gt(e,"cellKeyDown",r(z)),y.useEffect(()=>{i!==void 0&&e.current.setRowSelectionModel(i)},[e,i,t.rowSelection]),y.useEffect(()=>{t.rowSelection||e.current.setRowSelectionModel([])},[e,t.rowSelection]);const _=i!=null;y.useEffect(()=>{if(_||!t.rowSelection)return;const Y=As(e.current.state);if(w){const ne=Y.filter(ie=>w(ie));ne.length{if(!t.rowSelection||_)return;const Y=As(e.current.state);!u&&Y.length>1&&e.current.setRowSelectionModel([])},[e,u,s,_,t.rowSelection]),y.useEffect(()=>{r(k)},[k,r])},Jkt=e=>{const{classes:t}=e;return y.useMemo(()=>Te({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},xn,t),[t])},Zkt=(e,t)=>{const n={classes:t.classes},r=Jkt(n),o=y.useCallback(i=>{const a=N({},fb,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),s=t.checkboxSelection,l=i.lookup[fu]!=null;return s&&!l?(i.lookup[fu]=a,i.orderedFields=[fu,...i.orderedFields]):!s&&l?(delete i.lookup[fu],i.orderedFields=i.orderedFields.filter(c=>c!==fu)):s&&l&&(i.lookup[fu]=N({},a,i.lookup[fu])),i},[e,r,t.checkboxSelection]);Ir(e,"hydrateColumns",o)},eMt=(e,t)=>{var r,o;const n=t.sortModel??((o=(r=t.initialState)==null?void 0:r.sorting)==null?void 0:o.sortModel)??[];return N({},e,{sorting:{sortModel:mle(n,t.disableMultipleColumnsSorting),sortedRows:[]}})},tMt=(e,t)=>{var T,E;const n=Ao(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:Ms,changeEvent:"sortModelChange"});const r=y.useCallback((O,k)=>{const A=Ms(e),I=A.findIndex(L=>L.field===O);let R=[...A];return I>-1?(k==null?void 0:k.sort)==null?R.splice(I,1):R.splice(I,1,k):R=[...A,k],R},[e]),o=y.useCallback((O,k)=>{const I=Ms(e).find(R=>R.field===O.field);if(I){const R=k===void 0?z7(O.sortingOrder??t.sortingOrder,I.sort):k;return R===void 0?void 0:N({},I,{sort:R})}return{field:O.field,sort:k===void 0?z7(O.sortingOrder??t.sortingOrder):k}},[e,t.sortingOrder]),i=y.useCallback((O,k)=>k==null||k.sortable===!1||t.disableColumnSorting?O:(k.sortingOrder||t.sortingOrder).some(I=>!!I)?[...O,"columnMenuSortItem"]:O,[t.sortingOrder,t.disableColumnSorting]),a=y.useCallback(()=>{e.current.setState(O=>{if(t.sortingMode==="server")return n.debug("Skipping sorting rows as sortingMode = server"),N({},O,{sorting:N({},O.sorting,{sortedRows:hz(gi(e),Zo,!1)})});const k=Ms(O,e.current.instanceId),A=i1t(k,e),I=e.current.applyStrategyProcessor("sorting",{sortRowList:A});return N({},O,{sorting:N({},O.sorting,{sortedRows:I})})}),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()},[e,n,t.sortingMode]),s=y.useCallback(O=>{Ms(e)!==O&&(n.debug("Setting sort model"),e.current.setState(B7(O,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())},[e,n,t.disableMultipleColumnsSorting]),l=y.useCallback((O,k,A)=>{const I=e.current.getColumn(O),R=o(I,k);let L;!A||t.disableMultipleColumnsSorting?L=(R==null?void 0:R.sort)==null?[]:[R]:L=r(I.field,R),e.current.setSortModel(L)},[e,r,o,t.disableMultipleColumnsSorting]),c=y.useCallback(()=>Ms(e),[e]),u=y.useCallback(()=>mz(e).map(k=>k.model),[e]),d=y.useCallback(()=>t1(e),[e]),f=y.useCallback(O=>e.current.getSortedRowIds()[O],[e]);Qt(e,{getSortModel:c,getSortedRows:u,getSortedRowIds:d,getRowIdFromRowIndex:f,setSortModel:s,sortColumn:l,applySorting:a},"public");const m=y.useCallback((O,k)=>{var R,L;const A=Ms(e);return!k.exportOnlyDirtyModels||t.sortModel!=null||((L=(R=t.initialState)==null?void 0:R.sorting)==null?void 0:L.sortModel)!=null||A.length>0?N({},O,{sorting:{sortModel:A}}):O},[e,t.sortModel,(E=(T=t.initialState)==null?void 0:T.sorting)==null?void 0:E.sortModel]),g=y.useCallback((O,k)=>{var I;const A=(I=k.stateToRestore.sorting)==null?void 0:I.sortModel;return A==null?O:(e.current.setState(B7(A,t.disableMultipleColumnsSorting)),N({},O,{callbacks:[...O.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),v=y.useCallback(O=>{const k=gi(e),A=k[Zo],I=O.sortRowList?O.sortRowList(A.children.map(R=>k[R])):[...A.children];return A.footerId!=null&&I.push(A.footerId),I},[e]);Ir(e,"exportState",m),Ir(e,"restoreState",g),sO(e,Ih,"sorting",v);const w=y.useCallback(({field:O,colDef:k},A)=>{if(!k.sortable||t.disableColumnSorting)return;const I=A.shiftKey||A.metaKey||A.ctrlKey;l(O,void 0,I)},[l,t.disableColumnSorting]),x=y.useCallback(({field:O,colDef:k},A)=>{!k.sortable||t.disableColumnSorting||A.key==="Enter"&&!A.ctrlKey&&!A.metaKey&&l(O,void 0,A.shiftKey)},[l,t.disableColumnSorting]),S=y.useCallback(()=>{const O=Ms(e),k=od(e);if(O.length>0){const A=O.filter(I=>k[I.field]);A.length{O==="sorting"&&e.current.applySorting()},[e]);Ir(e,"columnMenu",i),gt(e,"columnHeaderClick",w),gt(e,"columnHeaderKeyDown",x),gt(e,"rowsSet",e.current.applySorting),gt(e,"columnsChange",S),gt(e,"activeStrategyProcessorChange",P),n1(()=>{e.current.applySorting()}),wn(()=>{t.sortModel!==void 0&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])};function $q(e){const{containerSize:t,scrollPosition:n,elementSize:r,elementOffset:o}=e,i=o+r;if(r>t)return o;if(i-t>n)return i-t;if(o{const n=er(),r=Ao(e,"useGridScroll"),o=e.current.columnHeadersContainerRef,i=e.current.virtualScrollerRef,a=Qe(e,qf),s=y.useCallback(d=>{var w;const f=Si(e.current.state),p=qk(e),m=t.unstable_listView?[fv(e.current.state)]:fo(e);if(!(d.rowIndex==null)&&p===0||m.length===0)return!1;r.debug(`Scrolling to cell at row ${d.rowIndex}, col: ${d.colIndex} `);let v={};if(d.colIndex!==void 0){const x=Gf(e);let S;if(typeof d.rowIndex<"u"){const P=(w=a[d.rowIndex])==null?void 0:w.id,T=e.current.unstable_getCellColSpanInfo(P,d.colIndex);T&&!T.spannedByColSpan&&(S=T.cellProps.width)}typeof S>"u"&&(S=m[d.colIndex].computedWidth),v.left=$q({containerSize:f.viewportOuterSize.width,scrollPosition:Math.abs(i.current.scrollLeft),elementSize:S,elementOffset:x[d.colIndex]})}if(d.rowIndex!==void 0){const x=pb(e.current.state),S=TCt(e),P=ECt(e),T=t.pagination?d.rowIndex-S*P:d.rowIndex,E=x.positions[T+1]?x.positions[T+1]-x.positions[T]:x.currentPageTotalHeight-x.positions[T];v.top=$q({containerSize:f.viewportInnerSize.height,scrollPosition:i.current.scrollTop,elementSize:E,elementOffset:x.positions[T]})}return v=e.current.unstable_applyPipeProcessors("scrollToIndexes",v,d),typeof v.left!==void 0||typeof v.top!==void 0?(e.current.scroll(v),!0):!1},[r,e,i,t.pagination,a,t.unstable_listView]),l=y.useCallback(d=>{if(i.current&&d.left!==void 0&&o.current){const f=n?-1:1;o.current.scrollLeft=d.left,i.current.scrollLeft=f*d.left,r.debug(`Scrolling left: ${d.left}`)}i.current&&d.top!==void 0&&(i.current.scrollTop=d.top,r.debug(`Scrolling top: ${d.top}`)),r.debug("Scrolling, updating container, and viewport")},[i,n,o,r]),c=y.useCallback(()=>i!=null&&i.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0},[i]);Qt(e,{scroll:l,scrollToIndexes:s,getScrollPosition:c},"public")};function rMt(e,t){ar(e,"columnHeaderClick",t.onColumnHeaderClick),ar(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),ar(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),ar(e,"columnHeaderOver",t.onColumnHeaderOver),ar(e,"columnHeaderOut",t.onColumnHeaderOut),ar(e,"columnHeaderEnter",t.onColumnHeaderEnter),ar(e,"columnHeaderLeave",t.onColumnHeaderLeave),ar(e,"cellClick",t.onCellClick),ar(e,"cellDoubleClick",t.onCellDoubleClick),ar(e,"cellKeyDown",t.onCellKeyDown),ar(e,"preferencePanelClose",t.onPreferencePanelClose),ar(e,"preferencePanelOpen",t.onPreferencePanelOpen),ar(e,"menuOpen",t.onMenuOpen),ar(e,"menuClose",t.onMenuClose),ar(e,"rowDoubleClick",t.onRowDoubleClick),ar(e,"rowClick",t.onRowClick),ar(e,"stateChange",t.onStateChange)}function oMt(e,t=166){let n,r;const o=()=>{n=void 0,e(...r)};function i(...a){r=a,n===void 0&&(n=setTimeout(o,t))}return i.clear=()=>{clearTimeout(n),n=void 0},i}const BN={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:" ",columnBufferPx:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:Fc.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,indeterminateCheckboxAction:"deselect",keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"error",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rowPositionsDebounceMs:166,rows:[],rowSelection:!0,rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,unstable_rowSpanning:!1,virtualizeColumnsWithAutoRowHeight:!1},rg={width:0,height:0},iMt={isReady:!1,root:rg,viewportOuterSize:rg,viewportInnerSize:rg,contentSize:rg,minimumSize:rg,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0},aMt=e=>N({},e,{dimensions:iMt});function sMt(e,t){const n=Ao(e,"useResizeContainer"),r=y.useRef(!1),o=y.useRef(rg),i=Qe(e,Si),a=Qe(e,pb),s=Qe(e,e1),l=Qe(e,ZS),c=y.useMemo(()=>kle(t.rowHeight,BN.rowHeight),[t.rowHeight]),u=Math.floor(c*l),d=Math.floor(t.columnHeaderHeight*l),f=Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*l),p=Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*l),m=cMt(uz(e),6),g=Sz(e,t),v=s.left.reduce((D,H)=>D+H.computedWidth,0),w=s.right.reduce((D,H)=>D+H.computedWidth,0),[x,S]=y.useState(),P=y.useMemo(()=>oMt(S,t.resizeThrottleMs),[t.resizeThrottleMs]);y.useEffect(()=>P.clear,[P]);const T=y.useRef(),E=()=>e.current.state.dimensions,O=et(D=>{e.current.setState(H=>N({},H,{dimensions:D}))}),k=y.useCallback(()=>{const D=e.current.mainElementRef.current;if(!D)return;const H=ba(D).getComputedStyle(D),B={width:parseFloat(H.width)||0,height:parseFloat(H.height)||0};(!T.current||!Rq(T.current,B))&&(e.current.publishEvent("resize",B),T.current=B)},[e]),A=y.useCallback(()=>{const D=Si(e.current.state);if(!D.isReady)return 0;const H=ty(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const V=nM(e),W=V.lastRowIndex-V.firstRowIndex;return Math.min(W-1,H.rows.length)}const B=Math.floor(D.viewportInnerSize.height/u);return Math.min(B,H.rows.length)},[e,t.pagination,t.paginationMode,t.getRowHeight,u]),I=y.useCallback(()=>{var se,Z;const D=e.current.rootElementRef.current,H=B1t(e),B=lMt(D,m,t.scrollbarSize),V=g+H.top,W=H.bottom,Q={width:m-v-w,height:a.currentPageTotalHeight};let Y,ne,ie=!1,re=!1;if(t.autoHeight)re=!1,ie=Math.round(m)>Math.round(o.current.width),Y={width:o.current.width,height:V+W+Q.height},ne={width:Math.max(0,Y.width-(re?B:0)),height:Math.max(0,Y.height-(ie?B:0))};else{Y={width:o.current.width,height:o.current.height},ne={width:Math.max(0,Y.width-v-w),height:Math.max(0,Y.height-V-W)};const ue=Q,ge=ne,we=ue.width>ge.width,me=ue.height>ge.height;(we||me)&&(re=me,ie=ue.width+(re?B:0)>ge.width,ie&&(re=ue.height+B>ge.height)),re&&(ne.width-=B),ie&&(ne.height-=B)}const pe=Math.max(Y.width,m+(re?B:0)),le={width:m,height:V+Q.height+W},ee={isReady:!0,root:o.current,viewportOuterSize:Y,viewportInnerSize:ne,contentSize:Q,minimumSize:le,hasScrollX:ie,hasScrollY:re,scrollbarSize:B,headerHeight:d,groupHeaderHeight:f,headerFilterHeight:p,rowWidth:pe,rowHeight:u,columnsTotalWidth:m,leftPinnedWidth:v,rightPinnedWidth:w,headersTotalHeight:g,topContainerHeight:V,bottomContainerHeight:W},ce=e.current.state.dimensions;O(ee),Rq(ee.viewportInnerSize,ce.viewportInnerSize)||e.current.publishEvent("viewportInnerSizeChange",ee.viewportInnerSize),(Z=(se=e.current).updateRenderContext)==null||Z.call(se)},[e,O,t.scrollbarSize,t.autoHeight,a.currentPageTotalHeight,u,d,f,p,m,g,v,w]),R={resize:k,getRootDimensions:E},L={updateDimensions:I,getViewportPageSize:A};Qt(e,R,"public"),Qt(e,L,"private"),wn(()=>{x&&(I(),e.current.publishEvent("debouncedResize",o.current))},[e,x,I]);const F=e.current.rootElementRef.current;wn(()=>{if(!F)return;const D=(H,B)=>F.style.setProperty(H,B);D("--DataGrid-width",`${i.viewportOuterSize.width}px`),D("--DataGrid-hasScrollX",`${Number(i.hasScrollX)}`),D("--DataGrid-hasScrollY",`${Number(i.hasScrollY)}`),D("--DataGrid-scrollbarSize",`${i.scrollbarSize}px`),D("--DataGrid-rowWidth",`${i.rowWidth}px`),D("--DataGrid-columnsTotalWidth",`${i.columnsTotalWidth}px`),D("--DataGrid-leftPinnedWidth",`${i.leftPinnedWidth}px`),D("--DataGrid-rightPinnedWidth",`${i.rightPinnedWidth}px`),D("--DataGrid-headerHeight",`${i.headerHeight}px`),D("--DataGrid-headersTotalHeight",`${i.headersTotalHeight}px`),D("--DataGrid-topContainerHeight",`${i.topContainerHeight}px`),D("--DataGrid-bottomContainerHeight",`${i.bottomContainerHeight}px`),D("--height",`${i.rowHeight}px`)},[F,i]);const z=y.useRef(!0),_=y.useCallback(D=>{o.current=D;const H=/jsdom|HappyDOM/.test(window.navigator.userAgent);if(D.height===0&&!r.current&&!t.autoHeight&&!H&&(n.error(["The parent DOM element of the Data Grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(` -`)),r.current=!0),D.width===0&&!r.current&&!H&&(n.error(["The parent DOM element of the Data Grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(` -`)),r.current=!0),z.current){S(D),z.current=!1;return}P(D)},[t.autoHeight,P,n]);wn(I,[I]),ar(e,"sortedRowsSet",I),ar(e,"paginationModelChange",I),ar(e,"columnsChange",I),gt(e,"resize",_),ar(e,"debouncedResize",t.onResize)}function lMt(e,t,n){if(n!==void 0)return n;if(e===null||t===0)return 0;const o=pr(e).createElement("div");o.style.width="99px",o.style.height="99px",o.style.position="absolute",o.style.overflow="scroll",o.className="scrollDiv",e.appendChild(o);const i=o.offsetWidth-o.clientWidth;return e.removeChild(o),i}function cMt(e,t){return Math.round(e*10**t)/10**t}function Rq(e,t){return e.width===t.width&&e.height===t.height}const uMt=typeof globalThis.ResizeObserver<"u"?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},dMt=(e,t,n)=>(n.current.caches.rowsMeta={heights:new Map},N({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}})),fMt=(e,t)=>{const{getRowHeight:n,getRowSpacing:r,getEstimatedRowHeight:o}=t,i=e.current.caches.rowsMeta.heights,a=y.useRef(-1),s=y.useRef(!1),l=y.useRef(!1),c=Qe(e,ZS),u=Qe(e,Xo),d=Qe(e,Zk),f=Qe(e,Ms),p=tm(e,t),m=Qe(e,em),g=Qe(e,()=>Si(e.current.state).rowHeight),v=F=>{let z=i.get(F);return z===void 0&&(z={content:g,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},i.set(F,z)),z},w=y.useCallback(F=>{const z=Si(e.current.state).rowHeight,_=e.current.getRowHeightEntry(F.id);if(!n)_.content=z,_.needsFirstMeasurement=!1;else{const D=n(N({},F,{densityFactor:c}));if(D==="auto"){if(_.needsFirstMeasurement){const H=o?o(N({},F,{densityFactor:c})):z;_.content=H??z}s.current=!0,_.autoHeight=!0}else _.content=kle(D,z),_.needsFirstMeasurement=!1,_.autoHeight=!1}if(r){const D=e.current.getRowIndexRelativeToVisibleRows(F.id),H=r(N({},F,{isFirstVisible:D===0,isLastVisible:D===p.rows.length-1,indexRelativeToCurrentPage:D}));_.spacingTop=H.top??0,_.spacingBottom=H.bottom??0}else _.spacingTop=0,_.spacingBottom=0;return e.current.unstable_applyPipeProcessors("rowHeight",_,F),_},[e,p.rows.length,n,o,g,r,c]),x=y.useCallback(()=>{s.current=!1,m.top.forEach(w),m.bottom.forEach(w);const F=[],z=p.rows.reduce((_,D)=>{F.push(_);const H=w(D),B=H.content+H.spacingTop+H.spacingBottom+H.detail;return _+B},0);s.current||(a.current=1/0),e.current.setState(_=>N({},_,{rowsMeta:{currentPageTotalHeight:z,positions:F}})),l.current=!0},[e,m,p.rows,w]),S=F=>{var z;return((z=i.get(F))==null?void 0:z.content)??g},P=(F,z)=>{const _=e.current.getRowHeightEntry(F),D=_.content!==z;_.needsFirstMeasurement=!1,_.content=z,l.current&&(l.current=!D)},T=F=>{var z;return((z=i.get(F))==null?void 0:z.autoHeight)??!1},E=()=>a.current,O=F=>{s.current&&F>a.current&&(a.current=F)},k=()=>{i.clear(),x()},A=Zl(()=>new uMt(F=>{for(let z=0;z0?_.borderBoxSize[0].blockSize:_.contentRect.height,H=_.target.__mui_id;e.current.unstable_storeRowHeightMeasurement(H,D)}l.current||e.current.requestPipeProcessorsApplication("rowHeight")})).current,I=(F,z)=>(F.__mui_id=z,A.observe(F),()=>A.unobserve(F));Az(e,"rowHeight",x),y.useEffect(()=>{x()},[u,d,f,x]);const R={unstable_getRowHeight:S,unstable_setLastMeasuredRowIndex:O,unstable_storeRowHeightMeasurement:P,resetRowHeights:k},L={hydrateRowsMeta:x,observeRowHeight:I,rowHasAutoHeight:T,getRowHeightEntry:v,getLastMeasuredRowIndex:E};Qt(e,R,"public"),Qt(e,L,"private")},pMt=e=>{const t=y.useCallback((o={})=>e.current.unstable_applyPipeProcessors("exportState",{},o),[e]),n=y.useCallback(o=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:o}).callbacks.forEach(a=>{a()}),e.current.forceUpdate()},[e]);Qt(e,{exportState:t,restoreState:n},"public")},hMt=e=>{const t=y.useRef({}),n=(s,l)=>{var c;return(c=t.current[s])==null?void 0:c[l]},r=()=>{t.current={}},o=y.useCallback(({rowId:s,minFirstColumn:l,maxLastColumn:c,columns:u})=>{for(let d=l;d1&&(d+=f.colSpan-1)}},[e]),i={unstable_getCellColSpanInfo:n},a={resetColSpan:r,calculateColSpan:o};Qt(e,i,"public"),Qt(e,a,"private"),gt(e,"columnOrderChange",r)};function mMt(e){const{apiRef:t,lookup:n,columnIndex:r,rowId:o,minFirstColumnIndex:i,maxLastColumnIndex:a,columns:s}=e,l=s.length,c=s[r],u=t.current.getRow(o),d=t.current.getRowValue(u,c),f=typeof c.colSpan=="function"?c.colSpan(d,u,c,t):c.colSpan;if(!f||f===1)return CR(n,o,r,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let p=c.computedWidth;for(let m=1;m=i&&g{if(xle(e)){if(n[e.field]!==void 0)throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join(` -`));n[e.field]=t;return}const{groupId:r,children:o}=e;o.forEach(i=>{Pce(i,[...t,r],n)})},zN=e=>{if(!e)return{};const t={};return e.forEach(n=>{Pce(n,[],t)}),t},VN=(e,t,n)=>{const r=l=>t[l]??[],o=[],i=Math.max(...e.map(l=>r(l).length)),a=(l,c,u)=>Jg(r(l).slice(0,u+1),r(c).slice(0,u+1)),s=(l,c)=>!!(n!=null&&n.left&&n.left.includes(l)&&!n.left.includes(c)||n!=null&&n.right&&!n.right.includes(l)&&n.right.includes(c));for(let l=0;l{const f=r(d)[l]??null;if(u.length===0)return[{columnFields:[d],groupId:f}];const p=u[u.length-1],m=p.columnFields[p.columnFields.length-1];return p.groupId!==f||!a(m,d,l)||s(m,d)?[...u,{columnFields:[d],groupId:f}]:[...u.slice(0,u.length-1),{columnFields:[...p.columnFields,d],groupId:f}]},[]);o.push(c)}return o},gMt=["groupId","children"],$z=e=>{let t={};return e.forEach(n=>{if(xle(n))return;const{groupId:r,children:o}=n,i=Ue(n,gMt);if(!r)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");const a=N({},i,{groupId:r}),s=$z(o);if(s[r]!==void 0||t[r]!==void 0)throw new Error(`MUI X: The groupId ${r} is used multiple times in the columnGroupingModel.`);t=N({},t,s,{[r]:a})}),N({},t)},yMt=(e,t,n)=>{if(!t.columnGroupingModel)return e;const r=Iu(n),o=cb(n),i=$z(t.columnGroupingModel??[]),a=zN(t.columnGroupingModel??[]),s=VN(r,a,n.current.state.pinnedColumns??{}),l=o.length===0?0:Math.max(...o.map(c=>{var u;return((u=a[c])==null?void 0:u.length)??0}));return N({},e,{columnGrouping:{lookup:i,unwrappedGroupingModel:a,headerStructure:s,maxDepth:l}})},vMt=(e,t)=>{const n=y.useCallback(s=>qle(e)[s]??[],[e]),r=y.useCallback(()=>Kle(e),[e]);Qt(e,{getColumnGroupPath:n,getAllGroupDetails:r},"public");const i=y.useCallback(()=>{const s=zN(t.columnGroupingModel??[]);e.current.setState(l=>{var f;const c=((f=l.columns)==null?void 0:f.orderedFields)??[],u=l.pinnedColumns??{},d=VN(c,s,u);return N({},l,{columnGrouping:N({},l.columnGrouping,{headerStructure:d})})})},[e,t.columnGroupingModel]),a=y.useCallback(s=>{var g,v;const l=((v=(g=e.current).getPinnedColumns)==null?void 0:v.call(g))??{},c=Iu(e),u=cb(e),d=$z(s??[]),f=zN(s??[]),p=VN(c,f,l),m=u.length===0?0:Math.max(...u.map(w=>{var x;return((x=f[w])==null?void 0:x.length)??0}));e.current.setState(w=>N({},w,{columnGrouping:{lookup:d,unwrappedGroupingModel:f,headerStructure:p,maxDepth:m}}))},[e]);gt(e,"columnIndexChange",i),gt(e,"columnsChange",()=>{a(t.columnGroupingModel)}),gt(e,"columnVisibilityModelChange",()=>{a(t.columnGroupingModel)}),y.useEffect(()=>{a(t.columnGroupingModel)},[a,t.columnGroupingModel])};function bMt(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function _q(e,t){if(t!==void 0&&e.changedTouches){for(let n=0;nPz(e),r=Qe(e,n);return y.useEffect(()=>{t.current&&r===!1&&(t.current.resolve(),t.current=void 0)}),()=>{if(!t.current){if(n()===!1)return Promise.resolve();t.current=bMt()}return t.current}}function PMt(e,t){if(e.length<4)return e;const n=e.slice();n.sort((s,l)=>s-l);const r=n[Math.floor(n.length*.25)],o=n[Math.floor(n.length*.75)-1],i=o-r,a=i<5?5:i*t;return n.filter(s=>s>r-a&&s{const s=yEt(e.current,i.field).map(m=>m.getBoundingClientRect().width??0),l=t.includeOutliers?s:PMt(s,t.outliersFactor);if(t.includeHeaders){const m=gEt(e.current,i.field);if(m){const g=m.querySelector(`.${ae.columnHeaderTitle}`),v=m.querySelector(`.${ae.columnHeaderTitleContainerContent}`),w=m.querySelector(`.${ae.iconButtonContainer}`),x=m.querySelector(`.${ae.menuIcon}`),S=g??v,P=window.getComputedStyle(m,null),T=parseInt(P.paddingLeft,10)+parseInt(P.paddingRight,10),O=S.scrollWidth+1+T+((w==null?void 0:w.clientWidth)??0)+((x==null?void 0:x.clientWidth)??0);l.push(O)}}const c=i.minWidth!==-1/0&&i.minWidth!==void 0,u=i.maxWidth!==1/0&&i.maxWidth!==void 0,d=c?i.minWidth:0,f=u?i.maxWidth:1/0,p=l.length===0?0:Math.max(...l);r[i.field]=$c(p,d,f)}),o.classList.remove(ae.autosizing),r}const EMt=e=>N({},e,{columnResize:{resizingColumnField:""}});function OMt(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const IMt=(e,t)=>{const n=er(),r=Ao(e,"useGridColumnResize"),o=Zl(OMt).current,i=y.useRef(),a=y.useRef(),s=ca(),l=y.useRef(),c=A=>{var D,H;r.debug(`Updating width to ${A} for col ${o.colDef.field}`);const I=o.columnHeaderElement.offsetWidth,R=A-I,L=A-o.initialColWidth,F=o.initialTotalWidth+L;(H=(D=e.current.rootElementRef)==null?void 0:D.current)==null||H.style.setProperty("--DataGrid-rowWidth",`${F}px`),o.colDef.computedWidth=A,o.colDef.width=A,o.colDef.flex=0,o.columnHeaderElement.style.width=`${A}px`;const z=o.headerFilterElement;z&&(z.style.width=`${A}px`),o.groupHeaderElements.forEach(B=>{const V=B;let W;V.getAttribute("aria-colspan")==="1"?W=`${A}px`:W=`${V.offsetWidth+R}px`,V.style.width=W}),o.cellElements.forEach(B=>{const V=B;let W;V.getAttribute("aria-colspan")==="1"?W=`${A}px`:W=`${V.offsetWidth+R}px`,V.style.setProperty("--width",W)});const _=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);_===lr.LEFT&&(qm(o.fillerLeft,"width",R),o.leftPinnedCellsAfter.forEach(B=>{qm(B,"left",R)}),o.leftPinnedHeadersAfter.forEach(B=>{qm(B,"left",R)})),_===lr.RIGHT&&(qm(o.fillerRight,"width",R),o.rightPinnedCellsBefore.forEach(B=>{qm(B,"right",R)}),o.rightPinnedHeadersBefore.forEach(B=>{qm(B,"right",R)}))},u=A=>{if(w(),o.previousMouseClickEvent){const I=o.previousMouseClickEvent,R=I.timeStamp,L=I.clientX,F=I.clientY;if(A.timeStamp-R<300&&A.clientX===L&&A.clientY===F){o.previousMouseClickEvent=void 0,e.current.publishEvent("columnResizeStop",null,A);return}}if(o.colDef){e.current.setColumnWidth(o.colDef.field,o.colDef.width),r.debug(`Updating col ${o.colDef.field} with new width: ${o.colDef.width}`);const I=Ac(e.current.state);o.groupHeaderElements.forEach(R=>{const L=cEt(R),F=R,_=`${L.reduce((D,H)=>I.columnVisibilityModel[H]!==!1?D+I.lookup[H].computedWidth:D,0)}px`;F.style.width=_})}s.start(0,()=>{e.current.publishEvent("columnResizeStop",null,A)})},d=(A,I,R)=>{var _;const L=e.current.rootElementRef.current;o.initialColWidth=A.computedWidth,o.initialTotalWidth=e.current.getRootDimensions().rowWidth,o.colDef=A,o.columnHeaderElement=lEt(e.current.columnHeadersContainerRef.current,A.field);const F=L.querySelector(`.${ae.headerFilterRow} [data-field="${id(A.field)}"]`);F&&(o.headerFilterElement=F),o.groupHeaderElements=uEt((_=e.current.columnHeadersContainerRef)==null?void 0:_.current,A.field),o.cellElements=dEt(o.columnHeaderElement,e.current),o.fillerLeft=fq(e.current,n?"filler--pinnedRight":"filler--pinnedLeft"),o.fillerRight=fq(e.current,n?"filler--pinnedLeft":"filler--pinnedRight");const z=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);o.leftPinnedCellsAfter=z!==lr.LEFT?[]:fEt(e.current,o.columnHeaderElement,n),o.rightPinnedCellsBefore=z!==lr.RIGHT?[]:pEt(e.current,o.columnHeaderElement,n),o.leftPinnedHeadersAfter=z!==lr.LEFT?[]:hEt(e.current,o.columnHeaderElement,n),o.rightPinnedHeadersBefore=z!==lr.RIGHT?[]:mEt(e.current,o.columnHeaderElement,n),a.current=SMt(I,n),i.current=wMt(R,o.columnHeaderElement.getBoundingClientRect(),a.current)},f=et(u),p=et(A=>{if(A.buttons===0){f(A);return}let I=Dq(i.current,A.clientX,o.columnHeaderElement.getBoundingClientRect(),a.current);I=$c(I,o.colDef.minWidth,o.colDef.maxWidth),c(I);const R={element:o.columnHeaderElement,colDef:o.colDef,width:I};e.current.publishEvent("columnResize",R,A)}),m=et(A=>{_q(A,l.current)&&u(A)}),g=et(A=>{const I=_q(A,l.current);if(!I)return;if(A.type==="mousemove"&&A.buttons===0){m(A);return}let R=Dq(i.current,I.x,o.columnHeaderElement.getBoundingClientRect(),a.current);R=$c(R,o.colDef.minWidth,o.colDef.maxWidth),c(R);const L={element:o.columnHeaderElement,colDef:o.colDef,width:R};e.current.publishEvent("columnResize",L,A)}),v=et(A=>{const I=iO(A.target,ae["columnSeparator--resizable"]);if(!I)return;const R=A.changedTouches[0];R!=null&&(l.current=R.identifier);const L=iO(A.target,ae.columnHeader),F=sEt(L),z=e.current.getColumn(F);r.debug(`Start Resize on col ${z.field}`),e.current.publishEvent("columnResizeStart",{field:F},A),d(z,I,R.clientX);const _=pr(A.currentTarget);_.addEventListener("touchmove",g),_.addEventListener("touchend",m)}),w=y.useCallback(()=>{const A=pr(e.current.rootElementRef.current);A.body.style.removeProperty("cursor"),A.removeEventListener("mousemove",p),A.removeEventListener("mouseup",f),A.removeEventListener("touchmove",g),A.removeEventListener("touchend",m),setTimeout(()=>{A.removeEventListener("click",Nq,!0)},100),o.columnHeaderElement&&(o.columnHeaderElement.style.pointerEvents="unset")},[e,o,p,f,g,m]),x=y.useCallback(({field:A})=>{e.current.setState(I=>N({},I,{columnResize:N({},I.columnResize,{resizingColumnField:A})})),e.current.forceUpdate()},[e]),S=y.useCallback(()=>{e.current.setState(A=>N({},A,{columnResize:N({},A.columnResize,{resizingColumnField:""})})),e.current.forceUpdate()},[e]),P=et(({colDef:A},I)=>{if(I.button!==0||!I.currentTarget.classList.contains(ae["columnSeparator--resizable"]))return;I.preventDefault(),r.debug(`Start Resize on col ${A.field}`),e.current.publishEvent("columnResizeStart",{field:A.field},I),d(A,I.currentTarget,I.clientX);const R=pr(e.current.rootElementRef.current);R.body.style.cursor="col-resize",o.previousMouseClickEvent=I.nativeEvent,R.addEventListener("mousemove",p),R.addEventListener("mouseup",f),R.addEventListener("click",Nq,!0)}),T=et((A,I)=>{if(t.disableAutosize||I.button!==0)return;const R=e.current.state.columns.lookup[A.field];R.resizable!==!1&&e.current.autosizeColumns(N({},t.autosizeOptions,{columns:[R.field]}))}),E=CMt(e),O=y.useRef(!1),k=y.useCallback(async A=>{var z;if(!((z=e.current.rootElementRef)==null?void 0:z.current)||O.current)return;O.current=!0;const R=Ac(e.current.state),L=N({},hTt,A,{columns:(A==null?void 0:A.columns)??R.orderedFields});L.columns=L.columns.filter(_=>R.columnVisibilityModel[_]!==!1);const F=L.columns.map(_=>e.current.state.columns.lookup[_]);try{e.current.unstable_setColumnVirtualization(!1),await E();const _=TMt(e,L,F),D=F.map(H=>N({},H,{width:_[H.field],computedWidth:_[H.field]}));if(L.expand){const B=R.orderedFields.map(G=>R.lookup[G]).filter(G=>R.columnVisibilityModel[G.field]!==!1).reduce((G,Q)=>G+(_[Q.field]??Q.computedWidth??Q.width),0),W=e.current.getRootDimensions().viewportInnerSize.width-B;if(W>0){const G=W/(D.length||1);D.forEach(Q=>{Q.width+=G,Q.computedWidth+=G})}}e.current.updateColumns(D),D.forEach((H,B)=>{if(H.width!==F[B].width){const V=H.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(H.field),colDef:H,width:V})}})}finally{e.current.unstable_setColumnVirtualization(!0),O.current=!1}},[e,E]);y.useEffect(()=>w,[w]),KO(()=>{t.autosizeOnMount&&Promise.resolve().then(()=>{e.current.autosizeColumns(t.autosizeOptions)})}),Fle(e,()=>{var A;return(A=e.current.columnHeadersContainerRef)==null?void 0:A.current},"touchstart",v,{passive:!0}),Qt(e,{autosizeColumns:k},"public"),gt(e,"columnResizeStop",S),gt(e,"columnResizeStart",x),gt(e,"columnSeparatorMouseDown",P),gt(e,"columnSeparatorDoubleClick",T),ar(e,"columnResize",t.onColumnResize),ar(e,"columnWidthChange",t.onColumnWidthChange)};function qm(e,t,n){e&&(e.style[t]=`${parseInt(e.style[t],10)+n}px`)}function kMt(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex{if(!e)return null;let r=e[t.field];const o=t.rowSpanValueGetter??t.valueGetter;return o&&(r=o(r,e,t,n)),r},lO={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},mw={firstRowIndex:0,lastRowIndex:0},AMt=new Set([fu,"__reorder__",Yk]),Tce=20,Ece=(e,t,n,r,o,i,a)=>{const s=i?{}:N({},e.current.state.rowSpanning.spannedCells),l=i?{}:N({},e.current.state.rowSpanning.hiddenCells),c=i?{}:N({},e.current.state.rowSpanning.hiddenCellOriginMap);return i&&(a=mw),t.forEach(u=>{var d;if(!AMt.has(u.field)){for(let f=o.firstRowIndex;f<=o.lastRowIndex;f+=1){const p=n[f];if((d=l[p.id])!=null&&d[u.field])continue;const m=PR(p.model,u,e);if(m==null)continue;let g=p.id,v=f,w=0;const x=[];if(f===o.firstRowIndex){let P=f-1;const T=n[P];for(;P>=r.firstRowIndex&&PR(T.model,u,e)===m;){const E=n[P+1];l[E.id]?l[E.id][u.field]=!0:l[E.id]={[u.field]:!0},x.push(f),w+=1,g=T.id,v=P,P-=1}}x.forEach(P=>{c[P]?c[P][u.field]=v:c[P]={[u.field]:v}});let S=f+1;for(;S<=r.lastRowIndex&&n[S]&&PR(n[S].model,u,e)===m;){const P=n[S];l[P.id]?l[P.id][u.field]=!0:l[P.id]={[u.field]:!0},c[S]?c[S][u.field]=v:c[S]={[u.field]:v},S+=1,w+=1}w>0&&(s[g]?s[g][u.field]=w+1:s[g]={[u.field]:w+1})}a={firstRowIndex:Math.min(a.firstRowIndex,o.firstRowIndex),lastRowIndex:Math.max(a.lastRowIndex,o.lastRowIndex)}}}),{spannedCells:s,hiddenCells:l,hiddenCellOriginMap:c,processedRange:a}},$Mt=(e,t,n)=>{var r;if(t.unstable_rowSpanning){const o=e.rows.dataRowIds||[],i=e.columns.orderedFields||[],a=e.rows.dataRowIdToModelLookup,s=e.columns.lookup,l=!!e.filter.filterModel.items.length||!!((r=e.filter.filterModel.quickFilterValues)!=null&&r.length);if(!o.length||!i.length||!a||!s||l)return N({},e,{rowSpanning:lO});const c={firstRowIndex:0,lastRowIndex:Math.min(Tce-1,Math.max(o.length-1,0))},u=o.map(g=>({id:g,model:a[g]})),d=i.map(g=>s[g]),{spannedCells:f,hiddenCells:p,hiddenCellOriginMap:m}=Ece(n,d,u,c,c,!0,mw);return N({},e,{rowSpanning:{spannedCells:f,hiddenCells:p,hiddenCellOriginMap:m}})}return N({},e,{rowSpanning:lO})},RMt=(e,t)=>{const{range:n,rows:r}=tm(e,t),o=Qe(e,nM),i=Qe(e,fo),a=Zl(()=>Object.keys(e.current.state.rowSpanning.spannedCells).length>0?{firstRowIndex:0,lastRowIndex:Math.min(Tce-1,Math.max(e.current.state.rows.dataRowIds.length-1,0))}:mw),s=y.useRef(mw),l=y.useCallback((f=!0)=>{if(!t.unstable_rowSpanning){e.current.state.rowSpanning!==lO&&e.current.setState(O=>N({},O,{rowSpanning:lO}));return}if(n===null||!MMt(o))return;f&&(a.current=mw);const p=kMt({firstRowIndex:o.firstRowIndex,lastRowIndex:Math.min(o.lastRowIndex-1,n.lastRowIndex)},a.current);if(p===null)return;const{spannedCells:m,hiddenCells:g,hiddenCellOriginMap:v,processedRange:w}=Ece(e,i,r,n,p,f,a.current);a.current=w;const x=Object.keys(m).length,S=Object.keys(g).length,P=Object.keys(e.current.state.rowSpanning.spannedCells).length,T=Object.keys(e.current.state.rowSpanning.hiddenCells).length;(f||x!==P||S!==T)&&e.current.setState(O=>N({},O,{rowSpanning:{spannedCells:m,hiddenCells:g,hiddenCellOriginMap:v}}))},[e,t.unstable_rowSpanning,n,o,r,i,a]),c=y.useRef(o),u=y.useRef(!0),d=y.useRef(!1);y.useEffect(()=>{const f=u.current;if(u.current&&(u.current=!1),n&&s.current&&Lq(n,s.current)&&(s.current=n,d.current=!0),!f&&c.current!==o){Lq(c.current,o)&&(l(d.current),d.current=!1),c.current=o;return}l()},[l,o,n,s])},_Mt=(e,t,n)=>N({},e,{listViewColumn:t.unstable_listColumn?N({},t.unstable_listColumn,{computedWidth:HN(n)}):void 0});function DMt(e,t){const n=()=>{e.current.setState(i=>i.listViewColumn?N({},i,{listViewColumn:N({},i.listViewColumn,{computedWidth:HN(e)})}):i)},r=y.useRef(null);gt(e,"viewportInnerSizeChange",i=>{r.current!==i.width&&(r.current=i.width,n())}),gt(e,"columnVisibilityModelChange",n),y.useEffect(()=>{const i=t.unstable_listColumn;i&&e.current.setState(a=>N({},a,{listViewColumn:N({},i,{computedWidth:HN(e)})}))},[e,t.unstable_listColumn]),y.useEffect(()=>{t.unstable_listView&&t.unstable_listColumn},[t.unstable_listView,t.unstable_listColumn])}function HN(e){return Si(e.current.state).viewportInnerSize.width}const NMt=(e,t)=>{const n=ekt(e,t);return Zkt(n,t),Kkt(n),_o(aMt,n,t),_o(Xkt,n,t),_o(lkt,n,t),_o(Hkt,n,t),_o(zkt,n,t),_o(Skt,n,t),_o(eMt,n,t),_o(Rkt,n,t),_o(vkt,n,t),_o($Mt,n,t),_o(ukt,n,t),_o(EMt,n,t),_o(Akt,n,t),_o(dMt,n,t),_o(akt,n,t),_o(yMt,n,t),_o(OPt,n,t),_o(_Mt,n,t),Ikt(n,t),Qkt(n,t),ckt(n,t),Ukt(n,t),RMt(n,t),Ykt(n,t),hMt(n),vMt(n,t),Vkt(n,t),Ckt(n,t),_kt(n,t),xkt(n,t),tMt(n,t),dkt(n,t),IMt(n,t),$kt(n,t),fMt(n,t),nMt(n,t),skt(n),pkt(n,t),ykt(n,t),ikt(n,t),sMt(n,t),rMt(n,t),pMt(n),IPt(n,t),DMt(n,t),n},LMt=e=>{const{classes:t,headerAlign:n,isDragging:r,isLastColumn:o,showLeftBorder:i,showRightBorder:a,groupId:s,pinnedPosition:l}=e;return Te({root:["columnHeader",n==="left"&&"columnHeader--alignLeft",n==="center"&&"columnHeader--alignCenter",n==="right"&&"columnHeader--alignRight",r&&"columnHeader--moving",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",s===null?"columnHeader--emptyGroup":"columnHeader--filledGroup",l==="left"&&"columnHeader--pinnedLeft",l==="right"&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]},xn,t)};function FMt(e){var G;const{groupId:t,width:n,depth:r,maxDepth:o,fields:i,height:a,colIndex:s,hasFocus:l,tabIndex:c,isLastColumn:u,pinnedPosition:d,style:f,indexInSection:p,sectionLength:m,gridHasFiller:g}=e,v=xt(),w=y.useRef(null),x=gn(),S=Qe(x,Kle),P=t?S[t]:{},{headerName:T=t??"",description:E="",headerAlign:O=void 0}=P;let k;const A=t&&((G=S[t])==null?void 0:G.renderHeaderGroup),I=y.useMemo(()=>({groupId:t,headerName:T,description:E,depth:r,maxDepth:o,fields:i,colIndex:s,isLastColumn:u}),[t,T,E,r,o,i,s,u]);t&&A&&(k=A(I));const R=oM(d,p),L=rM(d,p,m,v.showColumnVerticalBorder,g),F=N({},e,{classes:v.classes,showLeftBorder:R,showRightBorder:L,headerAlign:O,depth:r,isDragging:!1}),z=T??t,_=Ln(),D=t===null?`empty-group-cell-${_}`:t,H=LMt(F);y.useLayoutEffect(()=>{if(l){const Y=w.current.querySelector('[tabindex="0"]')||w.current;Y==null||Y.focus()}},[x,l]);const B=y.useCallback(Q=>Y=>{o1(Y)||x.current.publishEvent(Q,I,Y)},[x,I]),V=y.useMemo(()=>({onKeyDown:B("columnGroupHeaderKeyDown"),onFocus:B("columnGroupHeaderFocus"),onBlur:B("columnGroupHeaderBlur")}),[B]),W=typeof P.headerClassName=="function"?P.headerClassName(I):P.headerClassName;return $.jsx(pce,N({ref:w,classes:H,columnMenuOpen:!1,colIndex:s,height:a,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:c,isDraggable:!1,headerComponent:k,headerClassName:W,description:E,elementId:D,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:z,"aria-colspan":i.length,"data-fields":`|-${i.join("-|-")}-|`,style:f},V))}const Fq=oe("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})({display:"flex"}),jMt=e=>{const{visibleColumns:t,sortColumnLookup:n,filterColumnLookup:r,columnHeaderTabIndexState:o,columnGroupHeaderTabIndexState:i,columnHeaderFocus:a,columnGroupHeaderFocus:s,headerGroupingMaxDepth:l,columnMenuState:c,columnVisibility:u,columnGroupsHeaderStructure:d,hasOtherElementInTabSequence:f}=e,[p,m]=y.useState(""),[g,v]=y.useState(""),w=hl(),x=er(),S=xt(),P=Qe(w,Si),T=Qe(w,Pz),E=Qe(w,qle),O=Qe(w,Gf),k=Qe(w,EPt),A=Qe(w,e1),I=Qe(w,od),R=nce(O,k,A.left.length),L=P.columnsTotalWidth{w.current.columnHeadersContainerRef.current&&(w.current.columnHeadersContainerRef.current.scrollLeft=0)},[w]);const F=y.useCallback(re=>v(re.field),[]),z=y.useCallback(()=>v(""),[]),_=y.useCallback(re=>m(re.field),[]),D=y.useCallback(()=>m(""),[]),H=y.useMemo(()=>A.left.length?{firstColumnIndex:0,lastColumnIndex:A.left.length}:null,[A.left.length]),B=y.useMemo(()=>A.right.length?{firstColumnIndex:t.length-A.right.length,lastColumnIndex:t.length}:null,[A.right.length,t.length]);gt(w,"columnResizeStart",F),gt(w,"columnResizeStop",z),gt(w,"columnHeaderDragStart",_),gt(w,"columnHeaderDragEnd",D);const V=re=>{const{renderContext:pe=k,maxLastColumn:le=t.length}=re||{},ee=pe.firstColumnIndex,ce=T?pe.lastColumnIndex:le;return{renderedColumns:t.slice(ee,ce),firstColumnToRender:ee,lastColumnToRender:ce}},W=(re,pe,le,ee=!1)=>{const ce=(re==null?void 0:re.position)===lr.RIGHT,se=(re==null?void 0:re.position)===void 0,Z=A.right.length>0&&ce||A.right.length===0&&se,ue=R-le;return $.jsxs(y.Fragment,{children:[se&&$.jsx("div",{role:"presentation",style:{width:ue}}),pe,se&&$.jsx("div",{role:"presentation",className:fe(ae.filler,ee&&ae["filler--borderBottom"])}),Z&&$.jsx(kz,{header:!0,pinnedRight:ce,borderBottom:ee,borderTop:!1})]})},G=({pinnedPosition:re,columnIndex:pe,computedWidth:le})=>{let ee;const ce=re===lr.LEFT,se=re===lr.RIGHT;if(ce||se){const Z=Iz(re,le,pe,O,P);let ue=ce?"left":"right";x&&(ue=ce?"right":"left"),re==="left"&&(ee={[ue]:Z}),re==="right"&&(ee={[ue]:Z})}return ee},Q=(re,pe={})=>{const{renderedColumns:le,firstColumnToRender:ee}=V(re),ce=[];for(let se=0;se$.jsxs(Fq,{role:"row","aria-rowindex":l+1,ownerState:S,className:ae["row--borderBottom"],children:[H&&Q({position:lr.LEFT,renderContext:H,maxLastColumn:H.lastColumnIndex},{disableReorder:!0}),Q({renderContext:k,maxLastColumn:t.length-A.right.length}),B&&Q({position:lr.RIGHT,renderContext:B,maxLastColumn:B.lastColumnIndex},{disableReorder:!0,separatorSide:Oz.Left})]}),ne=({depth:re,params:pe})=>{var Oe,$e;const le=V(pe);if(le.renderedColumns.length===0)return null;const{firstColumnToRender:ee,lastColumnToRender:ce}=le,se=d[re],Z=t[ee].field,ue=((Oe=E[Z])==null?void 0:Oe[re])??null,ge=se.findIndex(({groupId:Be,columnFields:Je})=>Be===ue&&Je.includes(Z)),we=t[ce-1].field,me=(($e=E[we])==null?void 0:$e[re])??null,be=se.findIndex(({groupId:Be,columnFields:Je})=>Be===me&&Je.includes(we)),xe=se.slice(ge,be+1).map(Be=>N({},Be,{columnFields:Be.columnFields.filter(Je=>u[Je]!==!1)})).filter(Be=>Be.columnFields.length>0),Ee=xe[0].columnFields.indexOf(Z),_e=xe[0].columnFields.slice(0,Ee).reduce((Be,Je)=>{const ot=I[Je];return Be+(ot.computedWidth??0)},0);let de=ee;const Ae=xe.map(({groupId:Be,columnFields:Je},ot)=>{const lt=s!==null&&s.depth===re&&Je.includes(s.field),it=i!==null&&i.depth===re&&Je.includes(i.field)?0:-1,tt={groupId:Be,width:Je.reduce((Re,Ze)=>Re+I[Ze].computedWidth,0),fields:Je,colIndex:de,hasFocus:lt,tabIndex:it},pt=pe.position,qt=G({pinnedPosition:pt,columnIndex:de,computedWidth:tt.width});de+=Je.length;let qe=ot;return pt==="left"&&(qe=de-1),$.jsx(FMt,{groupId:Be,width:tt.width,fields:tt.fields,colIndex:tt.colIndex,depth:re,isLastColumn:ot===xe.length-1,maxDepth:l,height:P.groupHeaderHeight,hasFocus:lt,tabIndex:it,pinnedPosition:pt,style:qt,indexInSection:qe,sectionLength:xe.length,gridHasFiller:L},ot)});return W(pe,Ae,_e)};return{renderContext:k,leftRenderContext:H,rightRenderContext:B,pinnedColumns:A,visibleColumns:t,getCellOffsetStyle:G,getFillers:W,getColumnHeadersRow:Y,getColumnsToRender:V,getColumnGroupHeadersRows:()=>{if(l===0)return null;const re=[];for(let pe=0;pe({role:"rowgroup"})}},BMt=["className"],zMt=e=>{const{classes:t}=e;return Te({root:["columnHeaders"]},xn,t)},VMt=Yn("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),HMt=y.forwardRef(function(t,n){const{className:r}=t,o=Ue(t,BMt),i=xt(),a=zMt(i);return $.jsx(VMt,N({ref:n,className:fe(a.root,r),ownerState:i},o,{role:"presentation"}))}),UMt=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],WMt=y.forwardRef(function(t,n){const{visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:m}=t,g=Ue(t,UMt),{getInnerProps:v,getColumnHeadersRow:w,getColumnGroupHeadersRows:x}=jMt({visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:m});return $.jsxs(HMt,N({ref:n},g,v(),{children:[x(),w()]}))}),GMt=Wf(WMt);function qMt(e){return null}function KMt(e){return null}const YMt=y.forwardRef(function(t,n){const o=gn().current.getLocaleText("noResultsOverlayLabel");return $.jsx(Ez,N({ref:n},t,{children:o}))}),XMt=["sortingOrder"],QMt=y.memo(function(t){const{sortingOrder:n}=t,r=Ue(t,XMt),o=xt(),[i]=n,a=i==="asc"?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?$.jsx(a,N({},r)):null}),JMt=["native"];function ZMt(e){let{native:t}=e,n=Ue(e,JMt);return t?$.jsx("option",N({},n)):$.jsx(tn,N({},n))}const eAt={booleanCellTrueIcon:JEt,booleanCellFalseIcon:bR,columnMenuIcon:KEt,openFilterButtonIcon:zEt,filterPanelDeleteIcon:bR,columnFilteredIcon:yq,columnSelectorIcon:HEt,columnUnsortedIcon:QMt,columnSortedAscendingIcon:pq,columnSortedDescendingIcon:hq,columnResizeIcon:UEt,densityCompactIcon:WEt,densityStandardIcon:GEt,densityComfortableIcon:qEt,exportIcon:QEt,moreActionsIcon:ZEt,treeDataCollapseIcon:gq,treeDataExpandIcon:mq,groupingCriteriaCollapseIcon:gq,groupingCriteriaExpandIcon:mq,detailPanelExpandIcon:vq,detailPanelCollapseIcon:YEt,rowReorderIcon:bq,quickFilterIcon:VEt,quickFilterClearIcon:bR,columnMenuHideIcon:eOt,columnMenuSortAscendingIcon:pq,columnMenuSortDescendingIcon:hq,columnMenuFilterIcon:yq,columnMenuManageColumnsIcon:tOt,columnMenuClearIcon:nOt,loadIcon:XEt,filterPanelAddIcon:vq,filterPanelRemoveAllIcon:rOt,columnReorderIcon:bq},tAt=N({},eAt,{baseBadge:jTe,baseCheckbox:NEe,baseDivider:Za,baseTextField:hn,baseFormControl:Tv,baseSelect:_h,baseButton:yt,baseIconButton:kn,baseInputAdornment:so,baseTooltip:Ql,basePopper:$f,baseInputLabel:Ev,baseSelectOption:ZMt,baseChip:hh}),nAt=N({},tAt,{cell:OTt,skeletonCell:NTt,columnHeaderFilterIconButton:BEt,columnHeaderSortIcon:FEt,columnMenu:xOt,columnHeaders:GMt,detailPanels:qMt,footer:hIt,footerRowCount:AIt,toolbar:null,pinnedRows:KMt,loadingOverlay:SIt,noResultsOverlay:YMt,noRowsOverlay:CIt,pagination:OIt,filterPanel:iIt,columnsPanel:_Ot,columnsManagement:vce,panel:jOt,row:NIt});function rAt({defaultSlots:e,slots:t}){const n=t;if(!n||Object.keys(n).length===0)return e;const r=N({},e);return Object.keys(n).forEach(o=>{const i=o;n[i]!==void 0&&(r[i]=n[i])}),r}function oAt(e){const t=Object.keys(e);if(!t.some(o=>o.startsWith("aria-")||o.startsWith("data-")))return e;const n={},r=e.forwardedProps??{};for(let o=0;ooAt(e),[e])}const aAt={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid",unstable_listView:!1},sAt=nAt,lAt=e=>{const t=iAt(Jt({props:e,name:"MuiDataGrid"})),n=y.useMemo(()=>N({},vSt,t.localeText),[t.localeText]),r=y.useMemo(()=>rAt({defaultSlots:sAt,slots:t.slots}),[t.slots]),o=y.useMemo(()=>Object.keys(BN).reduce((i,a)=>(i[a]=t[a]??BN[a],i),{}),[t]);return y.useMemo(()=>N({},t,o,{localeText:n,slots:r},aAt),[t,n,r,o])},cAt={hooks:{useGridAriaAttributes:LIt,useGridRowAriaAttributes:FIt}},Oce=y.forwardRef(function(t,n){const r=lAt(t),o=NMt(r.apiRef,r);return $.jsx(jIt,{privateApiRef:o,configuration:cAt,props:r,children:$.jsxs(GTt,N({className:r.className,style:r.style,sx:r.sx,ref:n},r.forwardedProps,{children:[$.jsx(gIt,{}),$.jsx(wTt,{}),$.jsx(xTt,{})]}))})}),uAt=y.memo(Oce);Oce.propTypes={apiRef:j.shape({current:j.object.isRequired}),"aria-label":j.string,"aria-labelledby":j.string,autoHeight:j.bool,autoPageSize:j.bool,autosizeOnMount:j.bool,autosizeOptions:j.shape({columns:j.arrayOf(j.string),expand:j.bool,includeHeaders:j.bool,includeOutliers:j.bool,outliersFactor:j.number}),cellModesModel:j.object,checkboxSelection:j.bool,classes:j.object,clipboardCopyCellDelimiter:j.string,columnBufferPx:j.number,columnGroupHeaderHeight:j.number,columnGroupingModel:j.arrayOf(j.object),columnHeaderHeight:j.number,columns:j.arrayOf(j.object).isRequired,columnVisibilityModel:j.object,density:j.oneOf(["comfortable","compact","standard"]),disableAutosize:j.bool,disableColumnFilter:j.bool,disableColumnMenu:j.bool,disableColumnResize:j.bool,disableColumnSelector:j.bool,disableColumnSorting:j.bool,disableDensitySelector:j.bool,disableEval:j.bool,disableMultipleRowSelection:j.bool,disableRowSelectionOnClick:j.bool,disableVirtualization:j.bool,editMode:j.oneOf(["cell","row"]),estimatedRowCount:j.number,experimentalFeatures:j.shape({warnIfFocusStateIsNotSynced:j.bool}),filterDebounceMs:j.number,filterMode:j.oneOf(["client","server"]),filterModel:j.shape({items:j.arrayOf(j.shape({field:j.string.isRequired,id:j.oneOfType([j.number,j.string]),operator:j.string.isRequired,value:j.any})).isRequired,logicOperator:j.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:j.bool,quickFilterLogicOperator:j.oneOf(["and","or"]),quickFilterValues:j.array}),forwardedProps:j.object,getCellClassName:j.func,getDetailPanelContent:j.func,getEstimatedRowHeight:j.func,getRowClassName:j.func,getRowHeight:j.func,getRowId:j.func,getRowSpacing:j.func,hideFooter:j.bool,hideFooterPagination:j.bool,hideFooterSelectedRowCount:j.bool,ignoreDiacritics:j.bool,ignoreValueFormatterDuringExport:j.oneOfType([j.shape({clipboardExport:j.bool,csvExport:j.bool}),j.bool]),indeterminateCheckboxAction:j.oneOf(["deselect","select"]),initialState:j.object,isCellEditable:j.func,isRowSelectable:j.func,keepNonExistentRowsSelected:j.bool,loading:j.bool,localeText:j.object,logger:j.shape({debug:j.func.isRequired,error:j.func.isRequired,info:j.func.isRequired,warn:j.func.isRequired}),logLevel:j.oneOf(["debug","error","info","warn",!1]),nonce:j.string,onCellClick:j.func,onCellDoubleClick:j.func,onCellEditStart:j.func,onCellEditStop:j.func,onCellKeyDown:j.func,onCellModesModelChange:j.func,onClipboardCopy:j.func,onColumnHeaderClick:j.func,onColumnHeaderContextMenu:j.func,onColumnHeaderDoubleClick:j.func,onColumnHeaderEnter:j.func,onColumnHeaderLeave:j.func,onColumnHeaderOut:j.func,onColumnHeaderOver:j.func,onColumnOrderChange:j.func,onColumnResize:j.func,onColumnVisibilityModelChange:j.func,onColumnWidthChange:j.func,onDensityChange:j.func,onFilterModelChange:j.func,onMenuClose:j.func,onMenuOpen:j.func,onPaginationMetaChange:j.func,onPaginationModelChange:j.func,onPreferencePanelClose:j.func,onPreferencePanelOpen:j.func,onProcessRowUpdateError:j.func,onResize:j.func,onRowClick:j.func,onRowCountChange:j.func,onRowDoubleClick:j.func,onRowEditStart:j.func,onRowEditStop:j.func,onRowModesModelChange:j.func,onRowSelectionModelChange:j.func,onSortModelChange:j.func,onStateChange:j.func,pageSizeOptions:j.arrayOf(j.oneOfType([j.number,j.shape({label:j.string.isRequired,value:j.number.isRequired})]).isRequired),pagination:j.oneOf([!0]),paginationMeta:j.shape({hasNextPage:j.bool}),paginationMode:j.oneOf(["client","server"]),paginationModel:j.shape({page:j.number.isRequired,pageSize:j.number.isRequired}),processRowUpdate:j.func,resizeThrottleMs:j.number,rowBufferPx:j.number,rowCount:j.number,rowHeight:j.number,rowModesModel:j.object,rowPositionsDebounceMs:j.number,rows:j.arrayOf(j.object),rowSelection:j.bool,rowSelectionModel:j.oneOfType([j.arrayOf(j.oneOfType([j.number,j.string]).isRequired),j.number,j.string]),rowSpacingType:j.oneOf(["border","margin"]),scrollbarSize:j.number,showCellVerticalBorder:j.bool,showColumnVerticalBorder:j.bool,slotProps:j.object,slots:j.object,sortingMode:j.oneOf(["client","server"]),sortingOrder:j.arrayOf(j.oneOf(["asc","desc"])),sortModel:j.arrayOf(j.shape({field:j.string.isRequired,sort:j.oneOf(["asc","desc"])})),sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),unstable_rowSpanning:j.bool,virtualizeColumnsWithAutoRowHeight:j.bool};const dAt=e=>e.map(t=>({id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes})),fAt=e=>{const[t]=Ge(),n=dAt(e.category.entries),r=Jse(),o=Ext(),[i,a]=y.useState(n),[s,l]=y.useState({}),c=(x,S)=>{x.reason===Tl.rowFocusOut&&(S.defaultMuiPrevented=!0)},u=x=>()=>{l({...s,[x]:{mode:jn.Edit}})},d=x=>()=>{l({...s,[x]:{mode:jn.View}})},f=x=>async()=>{console.log("deleting entry",x),o.mutate(parseInt(x.toString())),a(i.filter(S=>S.id!==x))},p=x=>()=>{l({...s,[x]:{mode:jn.View,ignoreModifications:!0}});const S=i.find(P=>P.id===x);(S==null?void 0:S.id)===null&&a(i.filter(P=>P.id!==x))},m=async x=>{r.mutate({id:x.id,categoryId:x.category,date:x.date,value:x.value,notes:x.notes});const S={...x,isNew:!1};return a(i.map(P=>P.id===x.id?S:P)),S},g=x=>{console.log(x)},v=x=>{l(x)},w=[{field:"value",headerName:t("value"),width:80,editable:!0,valueFormatter:x=>x==null?"":x+e.category.unit},{field:"date",headerName:t("date"),type:"date",width:120,editable:!0,valueFormatter:x=>x==null?"":Ot.fromJSDate(x).toLocaleString(Ot.DATE_MED)},{field:"notes",headerName:t("notes"),type:"string",flex:1,editable:!0},{field:"actions",type:"actions",headerName:t("actions"),width:100,cellClassName:"actions",getActions:({id:x})=>{var P;return((P=s[x])==null?void 0:P.mode)===jn.Edit?[C(tP,{icon:C(yyt,{}),label:"Save",sx:{color:"primary.main"},onClick:d(x)}),C(tP,{icon:C(gS,{}),label:"Cancel",className:"textPrimary",onClick:p(x),color:"inherit"})]:[C(tP,{icon:C(Gae,{}),label:"Edit",className:"textPrimary",onClick:u(x),color:"inherit"}),C(tP,{icon:C(lyt,{}),label:"Delete",onClick:f(x),color:"inherit"})]}}];return C($n,{sx:{width:"100%"},children:C(uAt,{editMode:"row",rows:n,columns:w,initialState:{pagination:{paginationModel:{pageSize:xU.pageSize}}},pageSizeOptions:xU.pageSizeOptions,disableRowSelectionOnClick:!0,rowModesModel:s,onRowModesModelChange:v,onRowEditStop:c,processRowUpdate:m,onProcessRowUpdateError:g})})},Rz=({title:e,subtitle:t,isOpen:n,message:r,deleteFn:o,closeFn:i})=>{const[a]=Ge();return C(Pv,{open:n,onClose:i,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:X(no,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:2,minWidth:"400px"},children:[C(ec,{title:e,titleTypographyProps:{variant:"h6"},subheader:t,action:C(gS,{onClick:i})}),C(bi,{children:C(dt,{variant:"body1",children:r})}),X(as,{children:[C(yt,{color:"error",variant:"contained",onClick:()=>{o(),i()},children:a("delete")}),C(yt,{color:"primary",onClick:i,children:a("cancel")})]})]})})},pAt=e=>{const t=Pxt(e.category.id),n=Qh(),[r]=Ge(),[o,i]=K.useState(null),[a,s]=K.useState(!1),[l,c]=K.useState(!1),u=!!o,d=P=>{i(P.currentTarget)},f=()=>{p(),v()},p=()=>{i(null)},m=()=>{x(),i(null)},g=()=>{t.mutate(e.category.id),n(Cn(bn.MEASUREMENT_OVERVIEW))},v=()=>s(!0),w=()=>s(!1),x=()=>c(!0),S=()=>c(!1);return X("div",{children:[C(yt,{onClick:d,children:C(Yae,{})}),X(ss,{anchorEl:o,open:u,onClose:p,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(tn,{onClick:f,children:r("edit")}),C(tn,{onClick:m,children:r("delete")})]}),C(Yi,{title:r("edit"),isOpen:a,closeFn:w,children:C(ile,{category:e.category,closeFn:w})}),C(Rz,{title:r("deleteConfirmation",{name:e.category.name}),message:r("measurements.deleteInfo"),isOpen:l,closeFn:S,deleteFn:g})]})},hAt=()=>{const e=Jh(),t=parseInt(e.categoryId),n=Qse(t);return n.isLoading?C(vo,{}):C(Zh,{title:n.data.name,optionsMenu:C(pAt,{category:n.data}),mainContent:X(Ut,{spacing:2,children:[C(ole,{category:n.data}),C(fAt,{category:n.data})]}),fab:C(gSt,{})})},mAt=e=>{const[t,n]=Ge(),[r,o]=K.useState(!1),i=()=>o(!0),a=()=>o(!1);return X(Mt,{children:[X(no,{children:[C(ec,{title:e.category.name,subheader:e.category.unit}),C(bi,{children:C(ole,{category:e.category})}),X(as,{disableSpacing:!0,sx:{justifyContent:"space-between"},children:[C(yt,{size:"small",children:C(Vs,{to:Cn(bn.MEASUREMENT_DETAIL,n.language,{id:e.category.id}),children:t("seeDetails")})}),C(kn,{onClick:i,children:C(Gi,{})})]})]}),C(Yi,{title:t("add"),isOpen:r,closeFn:a,children:C(ale,{closeFn:a,categoryId:e.category.id})})]})},jq=()=>{const e=Xse(),[t]=Ge();return e.isLoading?C(vo,{}):C(Zh,{title:t("measurements.measurements"),mainContent:X(Ut,{spacing:2,children:[e.data.length===0&&C(CI,{}),e.data.map(n=>C(mAt,{category:n},n.id))]}),fab:C(mSt,{})})},VP=[{range:"obese",color:"#FF5733",min:30,max:100},{range:"overweight",color:"#FFC107",min:25,max:30},{range:"normal",color:"#90EE90",min:18.5,max:25},{range:"underweight",color:"#FFC300",min:0,max:18.5}],rP=e=>{const t=VP.find(n=>n.range===e);return t?t.color:"gray"},gAt=()=>{const[e]=Ge(),t=KS(),n=Uc(),[r,o]=y.useState(),[i,a]=y.useState();y.useEffect(()=>{var u;if(t.data&&t.data.length>0){const d=t.data[0],f=(u=n.data)!=null&&u.useMetric?d.weight:d.weight*.453592;a(f)}},[t.data,n.data]),y.useEffect(()=>{var u;(u=n.data)!=null&&u.height&&o(n.data.height)},[n.data]);const l=(()=>{if(r&&i){const u=r/100;return i/(u*u)}return null})();if(t.isLoading||n.isLoading)return C(vo,{});const c=[];for(let u=140;u<=220;u+=10){const d=u/100,f={height:u};let p=0;VP.forEach((m,g)=>{const v=m.max>100?100:m.max;let w=v*d*d-p;w=Math.min(w,150-p),g===0?f[m.range]=w:f[m.range]=f[VP[g-1].range]+w,p=Math.min(v*d*d,150)}),c.push(f)}return C(Zh,{title:e("bmi.calculator"),mainContent:C(Mt,{children:X(Ut,{spacing:2,children:[X(He,{container:!0,spacing:2,children:[C(He,{size:{xs:12,sm:6},children:C(hn,{label:e("height"),fullWidth:!0,slotProps:{input:{endAdornment:C(dt,{children:e("cm")})}},type:"number",value:r??"",onChange:u=>o(parseFloat(u.target.value))})}),C(He,{size:{xs:12,sm:6},children:C(hn,{label:e("weight"),slotProps:{input:{endAdornment:C(dt,{children:e("server.kg")})}},fullWidth:!0,type:"number",value:i??"",onChange:u=>a(parseFloat(u.target.value))})})]}),l!==null&&C(dt,{variant:"h6",children:e("bmi.result",{value:l.toFixed(1)})}),C(Lf,{width:"100%",height:400,children:X(zrt,{data:c,children:[C(ll,{dataKey:"height",type:"number",domain:[140,220],unit:"cm"}),C(cl,{domain:[40,150],tickFormatter:u=>Math.round(u).toString(),unit:"kg"}),C(jh,{strokeDasharray:"3 3"}),C(Fa,{formatter:(u,d)=>[Math.round(u),e("bmi."+d)]}),VP.map(u=>C(zf,{type:"monotone",dataKey:u.range,stroke:"black",fill:u.color,fillOpacity:.8},u.range)),l!==null&&C(MS,{x:r,y:i,r:8,fill:"black",stroke:"none"})]})}),X(Ut,{direction:"row",justifyContent:"center",children:[C($n,{height:20,width:20,sx:{backgroundColor:rP("obese")}}),e("bmi.obese"),C($n,{height:20,width:20,sx:{backgroundColor:rP("overweight"),marginLeft:2}}),e("bmi.overweight"),C($n,{height:20,width:20,sx:{backgroundColor:rP("normal"),marginLeft:2}}),e("bmi.normal"),C($n,{height:20,width:20,sx:{backgroundColor:rP("underweight"),marginLeft:2}}),e("bmi.underweight")]})]})})})},yAt=e=>{var r,o,i,a;const[t,n]=Ge();return X(Yt,{children:[C(Ie,{sx:{paddingX:1},children:C(Xl,{alt:(r=e.item.ingredient)==null?void 0:r.name,src:(i=(o=e.item.ingredient)==null?void 0:o.image)==null?void 0:i.url,sx:{width:45,height:45},children:C(Ju,{})})}),X(Ie,{sx:{paddingX:1},children:[e.item.amountString," ",(a=e.item.ingredient)==null?void 0:a.name]}),C(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:hi(e.item.nutritionalValues.energy,n.language),kj:hi(e.item.nutritionalValues.energyKj,n.language)})}),C(Ie,{align:"right",sx:{paddingX:1},children:Sn(e.item.nutritionalValues.protein,n.language)}),C(Ie,{align:"right",sx:{paddingX:1},children:Sn(e.item.nutritionalValues.carbohydrates,n.language)}),C(Ie,{align:"right",sx:{paddingX:1},children:Sn(e.item.nutritionalValues.fat,n.language)})]},e.item.id)},UN=e=>{const[t,n]=Ge();return C(Gu,{children:X(Uu,{children:[C(Dh,{children:X(Yt,{children:[C(Ie,{}),C(Ie,{}),C(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.energy")}),C(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.protein")}),C(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.carbohydrates")}),C(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.fat")})]})}),X(Wu,{children:[e.items.map(r=>C(yAt,{item:r},r.id)),e.showSum&&X(Yt,{children:[C(Ie,{sx:{paddingX:1},children:" "}),C(Ie,{sx:{paddingX:1},children:t("total")}),C(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:hi(e.values.energy,n.language),kj:hi(e.values.energyKj,n.language)})}),C(Ie,{align:"right",sx:{paddingX:1},children:Sn(e.values.protein,n.language)}),C(Ie,{align:"right",sx:{paddingX:1},children:Sn(e.values.carbohydrates,n.language)}),C(Ie,{align:"right",sx:{paddingX:1},children:Sn(e.values.fat,n.language)})]})]})]})})},vAt=e=>{const[t,n]=Ge();return C(Gu,{children:X(Uu,{size:"small",children:[C(Dh,{children:X(Yt,{children:[C(Ie,{children:t("nutrition.macronutrient")}),C(Ie,{align:"right",children:t("nutrition.planned")}),C(Ie,{align:"right",children:t("nutrition.logged")}),C(Ie,{align:"right",children:t("nutrition.difference")})]})}),X(Wu,{children:[X(Yt,{children:[C(Ie,{children:t("nutrition.energy")}),C(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:hi(e.planned.energy,n.language),kj:hi(e.planned.energyKj,n.language)})}),C(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:hi(e.logged.energy,n.language),kj:hi(e.logged.energyKj,n.language)})}),C(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:hi(e.logged.energy-e.planned.energy,n.language),kj:hi(e.logged.energyKj-e.planned.energyKj,n.language)})})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.protein")}),C(Ie,{align:"right",children:Sn(e.planned.protein,n.language)}),C(Ie,{align:"right",children:Sn(e.logged.protein,n.language)}),C(Ie,{align:"right",children:Sn(e.logged.protein-e.planned.protein,n.language)})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.carbohydrates")}),C(Ie,{align:"right",children:Sn(e.planned.carbohydrates,n.language)}),C(Ie,{align:"right",children:Sn(e.logged.carbohydrates,n.language)}),C(Ie,{align:"right",children:Sn(e.logged.carbohydrates-e.planned.carbohydrates,n.language)})]}),X(Yt,{children:[C(Ie,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),C(Ie,{align:"right",children:Sn(e.planned.carbohydratesSugar,n.language)}),C(Ie,{align:"right",children:Sn(e.logged.carbohydratesSugar,n.language)}),C(Ie,{align:"right",children:Sn(e.logged.carbohydratesSugar-e.planned.carbohydratesSugar,n.language)})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.fat")}),C(Ie,{align:"right",children:Sn(e.planned.fat,n.language)}),C(Ie,{align:"right",children:Sn(e.logged.fat,n.language)}),C(Ie,{align:"right",children:Sn(e.logged.fat-e.planned.fat,n.language)})]}),X(Yt,{children:[C(Ie,{sx:{paddingLeft:5},children:t("nutrition.ofWhichSaturated")}),C(Ie,{align:"right",children:Sn(e.planned.fatSaturated,n.language)}),C(Ie,{align:"right",children:Sn(e.logged.fatSaturated,n.language)}),C(Ie,{align:"right",children:Sn(e.logged.fatSaturated-e.planned.fatSaturated,n.language)})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.others")}),C(Ie,{}),C(Ie,{}),C(Ie,{})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.fibres")}),C(Ie,{align:"right",children:Sn(e.planned.fiber,n.language)}),C(Ie,{align:"right",children:Sn(e.logged.fiber,n.language)}),C(Ie,{align:"right",children:Sn(e.logged.fiber-e.planned.fiber,n.language)})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.sodium")}),C(Ie,{align:"right",children:Sn(e.planned.sodium,n.language)}),C(Ie,{align:"right",children:Sn(e.logged.sodium,n.language)}),C(Ie,{align:"right",children:Sn(e.logged.sodium-e.planned.sodium,n.language)})]})]})]})})},Bq=()=>{const[e]=Ge(),t=Jh(),n=parseInt(t.planId),r=new Date(t.date),o=S_e(n,t.date);return o.isLoading?C(vo,{}):C(Zh,{title:e("nutrition.nutritionalDiary"),mainContent:C(Mt,{children:X(Ut,{spacing:2,children:[C(dt,{gutterBottom:!0,variant:"h4",children:r.toLocaleDateString()}),C(vAt,{logged:o.data.loggedNutritionalValuesDate(r),planned:o.data.plannedNutritionalValues}),C(UN,{values:o.data.loggedNutritionalValuesDate(r),items:o.data.loggedEntriesDate(r),showSum:!0})]})})})};function*iM(e){let t;e<=3?t=Z2e:e<=5?t=J2e:t=Q2e;for(const n of t)yield n}const bAt=e=>{const[t,n]=Ge(),r=iM(3),o=[{name:t("nutrition.carbohydrates"),value:e.data.carbohydrates},{name:t("nutrition.protein"),value:e.data.protein},{name:t("nutrition.fat"),value:e.data.fat}],i=Math.PI/180;return C(Lf,{width:"100%",height:300,children:X(Xre,{children:[C(Vc,{data:o,labelLine:!1,label:({cx:s,cy:l,midAngle:c,innerRadius:u,outerRadius:d,payload:f})=>{const p=u+(d-u)*.4,m=s+p*Math.cos(-c*i),g=l+p*Math.sin(-c*i);return C("text",{x:m,y:g,fill:"white",textAnchor:"middle",dominantBaseline:"central",children:Sn(f.value,n.language)})},fill:"#8884d8",dataKey:"value",children:o.map((s,l)=>C(Vv,{fill:r.next().value},`cell-${l}`))}),C(Pu,{})]})})},wAt=({showPlanned:e,planned:t,today:n,avg7Days:r})=>{const[o,i]=Ge(),a=iM(3),s=[{name:o("nutrition.protein"),planned:t.protein,today:n.protein,avg7Days:r.protein},{name:o("nutrition.carbohydrates"),planned:t.carbohydrates,today:n.carbohydrates,avg7Days:r.carbohydrates},{name:o("nutrition.sugar"),planned:t.carbohydratesSugar,today:n.carbohydratesSugar,avg7Days:r.carbohydratesSugar},{name:o("nutrition.fat"),planned:t.fat,today:n.fat,avg7Days:r.fat},{name:o("nutrition.saturatedFat"),planned:t.fatSaturated,today:n.fatSaturated,avg7Days:r.fatSaturated}];return C(Lf,{width:"100%",height:300,children:X(Yre,{data:s,margin:{top:20,right:30,left:20,bottom:5},children:[C(jh,{strokeDasharray:"3 4"}),C(ll,{dataKey:"name"}),C(cl,{type:"number",orientation:"left",unit:o("nutrition.gramShort")}),C(Fa,{formatter:l=>hi(l,i.language)}),C(Pu,{}),e&&C(Mc,{dataKey:"planned",unit:o("nutrition.gramShort"),name:o("nutrition.planned"),fill:a.next().value}),C(Mc,{dataKey:"today",unit:o("nutrition.gramShort"),name:o("nutrition.today"),fill:a.next().value}),C(Mc,{dataKey:"avg7Days",unit:o("nutrition.gramShort"),name:o("nutrition.7dayAvg"),fill:a.next().value})]})})},xAt=e=>{const[t,n]=Ge();return C(Gu,{children:X(Uu,{size:"small",children:[C(Dh,{children:X(Yt,{children:[C(Ie,{children:t("date")}),C(Ie,{align:"right",children:t("nutrition.logged")}),C(Ie,{align:"right",children:t("nutrition.difference")})]})}),C(Wu,{children:Array.from(e.logged).map(([r])=>{var o,i;return X(Yt,{children:[C(Ie,{children:C(Vs,{to:Cn(bn.NUTRITION_DIARY,n.language,{id:e.planId,date:r}),children:new Date(r).toLocaleDateString(n.language)})}),C(Ie,{align:"right",children:t("nutrition.valueEnergyKcal",{value:hi((o=e.logged.get(r))==null?void 0:o.nutritionalValues.energy,n.language)})}),C(Ie,{align:"right",children:hi(((i=e.logged.get(r))==null?void 0:i.nutritionalValues.energy)-e.planned.energy,n.language)})]},r)})})]})})},SAt=()=>{const[e]=Ge(),[t,n]=K.useState(!1),r=()=>n(!0),o=()=>n(!1);return X("div",{children:[C(Rh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Gi,{})}),C(Yi,{title:e("add"),isOpen:t,closeFn:o,children:C(KB,{closeFn:o})})]})},CAt=e=>{const[t]=Ge(),[n,r]=K.useState(!1),o=()=>r(!0),i=()=>r(!1);return X("div",{children:[C(Rh,{color:"secondary","aria-label":"add",onClick:o,sx:{position:"fixed",bottom:"5rem",right:a=>a.spacing(2),zIndex:9},children:C(mS,{})}),C(Yi,{title:t("nutrition.addNutritionalDiary"),isOpen:n,closeFn:i,children:C(qB,{closeFn:i,planId:e.plan.id,meals:e.plan.meals})})]})},Ice=({meal:e,planId:t,closeFn:n})=>{const[r,o]=Ge(),i=I_e(t),a=M_e(t),s=fl({name:Lc().required().max(25,r("forms.maxLength",{chars:"25"})).min(3,r("forms.minLength",{chars:"3"})),time:US().required()});return C(ul,{initialValues:{name:e?e.name:"",time:e?e.time:new Date},validationSchema:s,onSubmit:async l=>{l.time instanceof Date||(l.time=l.time.toJSDate());const c={...l,time:b2e(l.time)};e?a.mutate({...c,plan:t,id:e.id}):i.mutate({...c,plan:t}),n&&n()},children:l=>C(ls,{children:X(Ut,{spacing:2,children:[C(hn,{fullWidth:!0,id:"name",label:r("description"),error:l.touched.name&&!!l.errors.name,helperText:l.touched.name&&l.errors.name,...l.getFieldProps("name")}),C(RS,{dateAdapter:Ak,adapterLocale:o.language,children:C(Sct,{label:r("timeOfDay"),value:l.values.time!==null?Ot.fromJSDate(l.values.time):null,onChange:c=>l.setFieldValue("time",c)})}),X(Ut,{direction:"row",justifyContent:"end",spacing:2,children:[n!==void 0&&C(yt,{color:"primary",variant:"outlined",onClick:()=>n(),children:r("close")}),C(yt,{disabled:i.isPending||a.isPending,color:"primary",variant:"contained",type:"submit",children:r("submit")})]})]})})})},PAt=e=>{const[t]=Ge(),n=iM(3),r=[{name:t("nutrition.energy"),value:e.logged.energy/e.planned.energy*100},{name:t("nutrition.protein"),value:e.logged.protein/e.planned.protein*100},{name:t("nutrition.carbohydrates"),value:e.logged.carbohydrates/e.planned.carbohydrates*100},{name:t("nutrition.fat"),value:e.logged.fat/e.planned.fat*100}];return C(Lf,{width:"100%",height:150,children:X(Yre,{data:r,layout:"vertical",margin:{left:60},children:[C(jh,{strokeDasharray:"3 4"}),C(ll,{type:"number",unit:"%"}),C(cl,{type:"category",dataKey:"name"}),C(Mc,{dataKey:"value",unit:"%",fill:n.next().value})]})})},kce=({planId:e,item:t,mealId:n,closeFn:r})=>{const[o]=Ge(),i=__e(e),a=D_e(e),s=N_e(e),l=()=>{t&&s.mutate(t.id),r&&r()},c=fl({amount:la().required(o("forms.fieldRequired")).max(1e3,o("forms.maxValue",{value:"1000"})).min(1,o("forms.minValue",{value:"1"})),ingredient:la().required(o("forms.fieldRequired"))});return C(ul,{initialValues:{amount:t?t.amount:0,ingredient:t?t.ingredientId:0},validationSchema:c,onSubmit:async u=>{const d={...u,meal:n,weight_unit:null};t?a.mutate({...d,id:t.id}):i.mutate(d),r&&r()},children:u=>{var d;return C(ls,{children:X(Ut,{spacing:2,children:[C($B,{callback:f=>u.setFieldValue("ingredient",f?f.data.id:null),initialIngredient:t?(d=t.ingredient)==null?void 0:d.name:null}),C(hn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:C(so,{position:"end",children:o("nutrition.gramShort")})},error:u.touched.amount&&!!u.errors.amount,helperText:u.touched.amount&&u.errors.amount,...u.getFieldProps("amount")}),X(Ut,{direction:"row",justifyContent:"end",spacing:2,children:[r!==void 0&&t!==void 0&&C(yt,{color:"error",variant:"outlined",onClick:l,children:o("delete")}),r!==void 0&&C(yt,{color:"primary",variant:"outlined",onClick:()=>r(),children:o("close")}),C(yt,{color:"primary",variant:"contained",type:"submit",children:o("submit")})]})]})})}})},TAt=e=>{const t=jZ(e.planId),n=k_e(e.planId),[r]=Ge(),[o,i]=K.useState(!1),[a,s]=y.useState(null),[l,c]=y.useState(!1),[u,d]=y.useState(!1),f=!!a,p=k=>{s(k.currentTarget)},m=()=>{g(),x()},g=()=>{s(null)},v=()=>{P(),s(null)},w=()=>{n.mutate(e.meal.id)},x=()=>c(!0),S=()=>c(!1),P=()=>d(!0),T=()=>d(!1),E=(k,A)=>{A!=="clickaway"&&i(!1)},O=()=>{const k=e.meal.items.map(A=>({plan:e.planId,meal:e.meal.id,mealItem:A.id,ingredient:A.ingredientId,weight_unit:A.weightUnitId,datetime:new Date().toISOString(),amount:A.amount}));t.mutate(k),i(!0)};return X(Mt,{children:[!e.onlyLogging&&C(Ql,{title:r("nutrition.logThisMeal"),children:C(kn,{"aria-label":"settings",onClick:O,children:C(mS,{})})}),C(kn,{"aria-label":"settings",onClick:p,children:C(GS,{})}),C(kn,{"aria-label":"settings",onClick:e.handleExpanded,children:e.isExpanded?C(qae,{}):C(Kae,{})}),X(ss,{anchorEl:a,open:f,onClose:g,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(tn,{onClick:m,children:r("edit")}),C(tn,{onClick:v,children:r("delete")})]}),C(Yi,{title:r("edit"),isOpen:l,closeFn:S,children:C(Ice,{meal:e.meal,closeFn:S,planId:e.planId})}),C(Rz,{title:r("deleteConfirmation",{name:e.meal.name}),message:r("nutrition.mealDeleteInfo"),isOpen:u,closeFn:T,deleteFn:w}),C(qJ,{open:o,autoHideDuration:RZ,onClose:E,children:C(Bu,{onClose:E,severity:"success",sx:{width:"100%"},children:r("nutrition.diaryEntrySaved")})})]})},EAt=e=>{var o,i,a,s;const[t,n]=y.useState(!1),r=()=>n(!t);return X(Mt,{children:[X(es,{children:[C(AF,{onClick:r,sx:{"&:hover":{cursor:"pointer"}},children:C(Xl,{alt:(o=e.mealItem.ingredient)==null?void 0:o.name,src:(a=(i=e.mealItem.ingredient)==null?void 0:i.image)==null?void 0:a.url,sx:{width:45,height:45},children:C(Ju,{})})}),C(ho,{primary:`${e.mealItem.amountString} ${(s=e.mealItem.ingredient)==null?void 0:s.name}`})]}),C(Gs,{in:t,timeout:"auto",unmountOnExit:!0,sx:{width:"100%"},children:C(es,{children:C(ho,{children:C(kce,{planId:e.planId,mealId:e.mealId,item:e.mealItem,closeFn:r})})})})]})},zq=e=>{const t=ko(),n=e.meal.id!==MP,[r]=Ge(),[o,i]=y.useState(!1),a=()=>i(!o),[s,l]=y.useState(!1),c=()=>{l(!s),d(!1)},[u,d]=y.useState(!1),f=()=>{d(!u),l(!1)};return X(no,{children:[C(ec,{sx:{bgcolor:t.palette.grey[300]},action:e.meal.id!==MP&&C(TAt,{meal:e.meal,planId:e.planId,onlyLogging:e.onlyLogging,isExpanded:o,handleExpanded:a}),title:e.meal.name,subheader:e.meal.timeHHMMLocale}),X(bi,{sx:{paddingY:0},children:[X(Gs,{in:o,timeout:"auto",unmountOnExit:!0,children:[!e.onlyLogging&&C(UN,{showSum:n,items:e.meal.items,values:e.meal.plannedNutritionalValues}),C(dt,{gutterBottom:!0,variant:"h6",sx:{my:2},children:r("nutrition.loggedToday")}),!e.meal.plannedNutritionalValues.isEmpty&&C(PAt,{logged:e.meal.loggedNutritionalValuesToday,planned:e.meal.plannedNutritionalValues}),C(UN,{showSum:n,items:e.meal.diaryEntriesToday,values:e.meal.loggedNutritionalValuesToday})]}),!o&&C(al,{children:e.meal.items.map(p=>C(EAt,{mealItem:p,planId:e.planId,mealId:e.meal.id},p.id))})]}),X(as,{children:[!e.onlyLogging&&C(Ql,{title:r("nutrition.addMealItem"),children:C(kn,{onClick:c,children:C(Gi,{})})}),C(Ql,{title:r("nutrition.addNutritionalDiary"),children:C(kn,{onClick:f,children:C(mS,{})})})]}),C(Gs,{in:s,timeout:"auto",unmountOnExit:!0,children:X(bi,{sx:{paddingY:0},children:[C("p",{children:C("b",{children:r("nutrition.addMealItem")})}),C(kce,{planId:e.planId,mealId:e.meal.id,closeFn:c})]})}),C(Gs,{in:u,timeout:"auto",unmountOnExit:!0,children:X(bi,{sx:{paddingY:0},children:[C("p",{children:C("b",{children:r("nutrition.addNutritionalDiary")})}),C(qB,{closeFn:f,planId:e.planId,mealId:e.meal.id!==MP?e.meal.id:null})]})})]})},Vq=e=>{const[t,n]=Ge();return C(Gu,{children:X(Uu,{size:"small",children:[C(Dh,{children:X(Yt,{children:[C(Ie,{children:t("nutrition.macronutrient")}),C(Ie,{align:"right",children:t("total")}),C(Ie,{align:"right",children:t("nutrition.percentEnergy")})]})}),X(Wu,{children:[X(Yt,{children:[C(Ie,{children:t("nutrition.energy")}),C(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:hi(e.values.energy,n.language),kj:hi(e.values.energyKj,n.language)})}),C(Ie,{align:"right"})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.protein")}),C(Ie,{align:"right",children:Sn(e.values.protein,n.language)}),C(Ie,{align:"right",children:p$(e.values.percent.protein,n.language)})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.carbohydrates")}),C(Ie,{align:"right",children:Sn(e.values.carbohydrates,n.language)}),C(Ie,{align:"right",children:p$(e.values.percent.carbohydrates,n.language)})]}),X(Yt,{children:[C(Ie,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),C(Ie,{align:"right",children:Sn(e.values.carbohydratesSugar,n.language)}),C(Ie,{align:"right"})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.fat")}),C(Ie,{align:"right",children:Sn(e.values.fat,n.language)}),C(Ie,{align:"right",children:p$(e.values.percent.fat,n.language)})]}),X(Yt,{children:[C(Ie,{sx:{pl:5},children:t("nutrition.ofWhichSaturated")}),C(Ie,{align:"right",children:Sn(e.values.fatSaturated,n.language)}),C(Ie,{align:"right"})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.others")}),C(Ie,{children:" "}),C(Ie,{align:"right"})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.fibres")}),C(Ie,{align:"right",children:Sn(e.values.fiber,n.language)}),C(Ie,{align:"right"})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.sodium")}),C(Ie,{align:"right",children:Sn(e.values.sodium,n.language)}),C(Ie,{align:"right"})]})]})]})})},OAt=e=>{const t=P_e(e.plan.id),n=Qh(),[r,o]=Ge(),[i,a]=K.useState(null),[s,l]=K.useState(!1),[c,u]=K.useState(!1),d=!!i,f=O=>{a(O.currentTarget)},p=()=>{m(),S()},m=()=>{a(null)},g=()=>{T(),a(null)},v=()=>{t.mutate(e.plan.id),n(Cn(bn.NUTRITION_OVERVIEW))},w=()=>window.location.href=Cn(bn.NUTRITION_PLAN_PDF,o.language,{id:e.plan.id}),x=()=>window.location.href=Cn(bn.NUTRITION_PLAN_COPY,o.language,{id:e.plan.id}),S=()=>l(!0),P=()=>l(!1),T=()=>u(!0),E=()=>u(!1);return X(Mt,{children:[C(yt,{onClick:f,children:C(Yae,{})}),X(ss,{anchorEl:i,open:d,onClose:m,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(tn,{onClick:p,children:r("edit")}),C(tn,{onClick:w,children:r("downloadAsPdf")}),C(tn,{onClick:x,children:r("nutrition.copyPlan")}),C(tn,{onClick:g,children:r("delete")})]}),C(Yi,{title:r("edit"),isOpen:s,closeFn:P,children:C(KB,{plan:e.plan,closeFn:P})}),C(Rz,{title:r("deleteConfirmation",{name:e.plan.description}),message:r("nutrition.planDeleteInfo"),isOpen:c,closeFn:E,deleteFn:v})]})},IAt=e=>{const[t]=Ge(),n=e.plan.plannedNutritionalValues,r=e.plan.loggedNutritionalValuesToday,o=e.plan.percentageValuesLoggedToday;return C(Mt,{children:X(Ut,{direction:"column",spacing:1,children:[C(dt,{gutterBottom:!0,variant:"h6",children:t("nutrition.goalsTitle")}),C(Vg,{title:t("nutrition.protein"),percentage:o.protein,logged:r.protein,planned:n.protein}),C(Vg,{title:t("nutrition.carbohydrates"),percentage:o.carbohydrates,logged:r.carbohydrates,planned:n.carbohydrates}),C(Vg,{title:t("nutrition.fat"),percentage:o.fat,logged:r.fat,planned:n.fat})]})})},kAt=()=>{const[e]=Ge(),t=Jh(),n=parseInt(t.planId),r=x_e(n),[o,i]=y.useState(!1),a=()=>i(!o),s=r.data;return r.isLoading?C(vo,{}):C(Zh,{title:s.description,optionsMenu:C(OAt,{plan:s}),mainContent:C(Mt,{children:X(Ut,{spacing:2,children:[s.meals.map(l=>C(zq,{meal:l,planId:s.id,onlyLogging:s.onlyLogging},l.id)),C(zq,{meal:r.data.pseudoMealOthers(e("nutrition.pseudoMealTitle")),planId:s.id,onlyLogging:!0},-1),!s.onlyLogging&&X(Mt,{children:[C(Ql,{title:e("nutrition.addMeal"),children:C(kn,{onClick:a,children:C(Gi,{})})}),X(Gs,{in:o,timeout:"auto",unmountOnExit:!0,children:[C("p",{children:C("b",{children:e("nutrition.addMeal")})}),C(Ice,{planId:s.id,closeFn:a})]})]}),C(Vq,{values:s.plannedNutritionalValues}),s.hasAnyPlanned&&C(bAt,{data:s.plannedNutritionalValues}),C(dt,{gutterBottom:!0,variant:"h4",children:e("nutrition.logged")}),C(wAt,{showPlanned:s.hasAnyPlanned,planned:s.plannedNutritionalValues,today:s.loggedNutritionalValuesToday,avg7Days:s.loggedNutritionalValues7DayAvg}),C(Vq,{values:s.loggedNutritionalValuesToday}),C(xAt,{planId:s.id,logged:s.groupDiaryEntries,planned:s.plannedNutritionalValues})]})}),sideBar:C(IAt,{plan:s}),fab:C(CAt,{plan:s})})},MAt=()=>{var n;const e=b_e(),[t]=Ge();return e.isLoading?C(vo,{}):C(Zh,{title:t("nutrition.plans"),mainContent:X(Ut,{spacing:2,children:[((n=e.data)==null?void 0:n.length)===0&&C(CI,{}),C($At,{plans:e.data})]}),fab:C(SAt,{})})},AAt=e=>{const[t,n]=Ge(),r=Cn(bn.NUTRITION_DETAIL,n.language,{id:e.plan.id});return X(Mt,{children:[C(es,{sx:{p:0},children:X(_f,{component:"a",href:r,children:[C(ho,{primary:e.plan.description!==""?e.plan.description:t("routines.routine"),secondary:e.plan.creationDate.toLocaleDateString()}),C(Wae,{})]})}),C(Za,{component:"li"})]})},$At=e=>C(io,{children:C(al,{sx:{py:0},children:e.plans.map(t=>C(AAt,{plan:t},t.id))},"abc")}),RAt=e=>{var u;const[t,n]=Ge(),[r,o]=K.useState(null),i=!!r,a=d=>{o(d.currentTarget)},s=()=>{o(null)},l=()=>window.location.href=Cn(bn.ROUTINE_EDIT_LOG,n.language,{id:e.log.id}),c=()=>window.location.href=Cn(bn.ROUTINE_DELETE_LOG,n.language,{id:e.log.id});return X(Yt,{children:[C(Ie,{component:"th",scope:"row",children:Ot.fromJSDate(e.log.date).toLocaleString(Ot.DATE_MED)}),C(Ie,{children:e.log.reps}),X(Ie,{children:[e.log.weight,(u=e.log.weightUnitObj)==null?void 0:u.name]}),C(Ie,{children:e.log.rirString}),X(Ie,{children:[C(kn,{"aria-label":"settings",onClick:a,children:C(GS,{fontSize:"small"})}),X(ss,{id:"basic-menu",anchorEl:r,open:i,onClose:s,MenuListProps:{"aria-labelledby":"basic-button"},children:[X(tn,{onClick:l,children:[C(Gae,{}),t("edit")]}),X(tn,{onClick:c,children:[C(YB,{}),t("delete")]})]})]})]},e.log.id)},_At=e=>{let t=e.logEntries??[];const n=[5,10,20],[r,o]=K.useState(n[0]),[i,a]=K.useState(0),s=(c,u)=>{a(u)},l=c=>{o(parseInt(c.target.value,10)),a(0)};return X(Mt,{children:[C(dt,{variant:"h6",sx:{mt:4},children:e.exerciseId.getTranslation().name}),X(He,{container:!0,spacing:2,children:[C(He,{size:{xs:12,md:5},children:X(Gu,{children:[X(Uu,{"aria-label":"simple table",size:"small",children:[C(Dh,{children:X(Yt,{children:[C(Ie,{children:"Date"}),C(Ie,{children:"Reps"}),C(Ie,{children:"Weight"}),C(Ie,{children:"RiR"}),C(Ie,{})]})}),C(Wu,{children:t.slice(i*r,i*r+r).map(c=>C(RAt,{log:c},c.id))})]}),C(_F,{rowsPerPageOptions:n,component:"div",count:t.length,rowsPerPage:r,page:i,onPageChange:s,onRowsPerPageChange:l})]})}),C(He,{size:{xs:12,md:7},children:C(LAt,{data:t},e.exerciseId.id)})]})]})},Hq=()=>{const e=Jh(),t=e.routineId?parseInt(e.routineId):0,[n,r]=Ge(),o=byt(t,!1),i=Xae(t),a=l=>window.location.href=Cn(bn.ROUTINE_ADD_LOG,r.language,{id:l});let s=new Map;return o.isSuccess&&(s=o.data.reduce(function(l,c){return l.set(c.exerciseId,l.get(c.exerciseId)||[]),[N2e,L2e].includes(c.weightUnit)&&c.repetitionUnit===AZ&&l.get(c.exerciseId).push(c),l},new Map)),C(Mt,{children:X(Vu,{maxWidth:"lg",children:[C(dt,{variant:"h4",children:n("routines.logsHeader")}),C(dt,{variant:"body1",children:n("routines.logsFilterNote")}),o.isSuccess&&i.isSuccess?C(Mt,{children:i.data.days.map(l=>X("div",{children:[X(Ut,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:"center",sx:{mt:4},children:[C(dt,{variant:"h4",children:l.description}),C(yt,{variant:"contained",onClick:()=>a(l.id),children:n("routines.addLogToDay")})]}),l.sets.map(c=>c.exercises.map(u=>C(_At,{exerciseId:u,logEntries:s.get(u.id)},c.id+u.uuid)))]},l.id))}):C(vo,{})]})})},DAt=e=>e.map(t=>({id:t.id,value:t.weight,time:t.date.getTime(),entry:t})),NAt=({active:e,payload:t,label:n})=>{var r,o,i;if(e){let a="";return(r=t==null?void 0:t[1].payload)!=null&&r.entry.rir&&(a=`, ${(o=t==null?void 0:t[1].payload)==null?void 0:o.entry.rir} RiR`),C(no,{children:X(bi,{children:[C(dt,{variant:"body1",children:Ot.fromMillis(t==null?void 0:t[0].value).toLocaleString(Ot.DATE_MED)}),X(dt,{variant:"body2",children:[(i=t==null?void 0:t[1].payload)==null?void 0:i.entry.reps," × ",t==null?void 0:t[1].value,t==null?void 0:t[1].unit,a]})]})})}return null},LAt=e=>{let t;t=e.data.reduce(function(r,o){return r.set(o.reps,r.get(o.reps)||[]),r.get(o.reps).push(o),r},new Map);const n=iM(t.size);return C($n,{children:C(Lf,{width:"100%",height:250,children:X(Brt,{children:[C(ll,{dataKey:"time",domain:["auto","auto"],name:"Time",tickFormatter:r=>Ot.fromMillis(r).toLocaleString(Ot.DATE_MED),type:"number"}),C(cl,{domain:["auto","auto"],dataKey:"value",name:"Value",unit:"kg"}),Array.from(t).map(([r,o])=>{const i=n.next().value,a=DAt(o);return C(AS,{data:a,fill:i,line:{stroke:i},lineType:"joint",lineJointType:"monotoneX",name:r.toString()},r)}),C(Fa,{content:C(NAt,{})}),C(jh,{strokeDasharray:"3 3"}),C(Pu,{})]})})})},FAt=()=>C("div",{children:C(Rh,{color:"secondary","aria-label":"add",onClick:()=>window.location.href=Cn(bn.ROUTINE_ADD),sx:{position:"fixed",bottom:"5rem",right:t=>t.spacing(2),zIndex:9},children:C(Gi,{})})}),jAt=e=>{const[t,n]=Ge(),r=Cn(bn.ROUTINE_DETAIL,n.language,{id:e.routine.id});return X(Mt,{children:[C(es,{sx:{p:0},children:X(_f,{component:"a",href:r,children:[C(ho,{primary:e.routine.name!==""?e.routine.name:t("routines.routine"),secondary:e.routine.date.toLocaleDateString()}),C(Wae,{})]})}),C(Za,{component:"li"})]})},Uq=()=>{const e=wyt(),[t]=Ge();return X(Vu,{maxWidth:"lg",children:[X(He,{container:!0,children:[X(He,{size:{xs:12,sm:8},children:[C(dt,{gutterBottom:!0,variant:"h3",component:"div",children:t("routines.routines")}),e.isLoading?C(vo,{}):C(io,{children:C(al,{sx:{py:0},children:e.data.map(n=>C(jAt,{routine:n},n.id))},"abc")})]}),C(He,{size:{xs:12,sm:4}})]}),C(FAt,{})]})},TR=()=>C(Zwt,{}),_z=()=>X(cvt,{children:[X(Dt,{path:"/:lang",children:[X(Dt,{path:"workout",children:[C(Dt,{path:"overview",element:C(Jxt,{})}),C(Dt,{path:"schedule",element:C(Zxt,{})}),C(Dt,{path:"gallery",element:C($xt,{})}),X(Dt,{path:"template",children:[C(Dt,{path:"overview",element:C(Fxt,{})}),C(Dt,{path:"public",element:C(Nxt,{})})]})]}),X(Dt,{path:"routine",children:[C(Dt,{index:!0,element:C(Uq,{})}),C(Dt,{path:"overview",element:C(Uq,{})}),C(Dt,{path:"calendar",element:C(kxt,{})}),C(Dt,{path:":routineId",element:C(c7,{}),children:C(Dt,{path:"view",element:C(c7,{})})}),C(Dt,{path:"log",children:C(Dt,{path:":routineId",element:C(Hq,{}),children:C(Dt,{path:"view",element:C(Hq,{})})})})]}),X(Dt,{path:"measurement",children:[C(Dt,{index:!0,element:C(jq,{})}),C(Dt,{path:"overview",element:C(jq,{})}),C(Dt,{path:"category/:categoryId",element:C(hAt,{})})]}),X(Dt,{path:"exercise",children:[C(Dt,{index:!0,element:C(_7,{})}),C(Dt,{path:"overview",element:C(_7,{})}),C(Dt,{path:":baseID",element:C(TR,{}),children:C(Dt,{path:"view-base",element:C(TR,{}),children:C(Dt,{path:":slug",element:C(TR,{})})})}),C(Dt,{path:"contribute",element:C(mxt,{})})]}),X(Dt,{path:"weight",children:[C(Dt,{path:"overview",element:C(Zse,{})}),C(Dt,{path:"add",element:C(gxt,{})})]}),X(Dt,{path:"nutrition",children:[C(Dt,{path:"overview",element:C(MAt,{})}),X(Dt,{path:":planId",children:[C(Dt,{path:"view",element:C(kAt,{})}),C(Dt,{path:":date",element:C(Bq,{})}),C(Dt,{path:"diary",element:C(Bq,{})})]}),X(Dt,{path:"calculator",children:[C(Dt,{path:"bmi",element:C(gAt,{})}),C(Dt,{path:"calories",element:C(Mxt,{})})]}),C(Dt,{path:"ingredient",children:C(Dt,{path:"overview",element:C(Rxt,{})})})]}),X(Dt,{path:"software",children:[C(Dt,{path:"about-us",element:C(_0t,{})}),C(Dt,{path:"api",element:C(Lxt,{})}),C(Dt,{path:"equipment",element:C(Axt,{})})]}),C(Dt,{path:"login",element:C(_xt,{})}),C(Dt,{path:"user",children:C(Dt,{path:"preferences",element:C(Dxt,{})})})]}),C(Dt,{path:"/",element:C(eSt,{})}),C(Dt,{path:"*",element:C("main",{style:{padding:"1rem"},children:C("p",{children:"404, Page NOT FOUND"})})})]}),BAt="_notification_bbb61_1",Wq={notification:BAt},zAt=()=>{const[e,t]=j0t(),n=()=>{t(T7({notify:!1,message:"",severity:void 0,title:"",type:void 0}))},r=()=>{t(T7({notify:!1,message:"",severity:void 0,title:"",type:void 0,undo:!0}))};return e.notification.notify?e.notification.type==="delete"?X(Bu,{className:Wq.notification,severity:e.notification.severity,action:C(yt,{color:"inherit",size:"small",onClick:r,children:"UNDO"}),variant:"filled",children:[C(PT,{children:e.notification.title}),C("strong",{children:e.notification.message})]}):X(Bu,{className:Wq.notification,severity:e.notification.severity,onClose:()=>n(),variant:"filled",children:[C(PT,{children:e.notification.title}),C("strong",{children:e.notification.message})]}):null};function VAt(){return X(He,{container:!0,children:[C(He,{size:12,children:C(Qxt,{})}),C(He,{size:12,children:C(zAt,{})}),C(He,{size:12,children:C(_z,{})})]})}const Xt=e=>typeof e=="string",m0=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},Gq=e=>e==null?"":""+e,HAt=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},UAt=/###/g,qq=e=>e&&e.indexOf("###")>-1?e.replace(UAt,"."):e,Kq=e=>!e||Xt(e),gw=(e,t,n)=>{const r=Xt(t)?t.split("."):t;let o=0;for(;o{const{obj:r,k:o}=gw(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],a=t.slice(0,t.length-1),s=gw(e,a,Object);for(;s.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=gw(e,a,Object),s&&s.obj&&typeof s.obj[`${s.k}.${i}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},WAt=(e,t,n,r)=>{const{obj:o,k:i}=gw(e,t,Object);o[i]=o[i]||[],o[i].push(n)},cO=(e,t)=>{const{obj:n,k:r}=gw(e,t);if(n)return n[r]},GAt=(e,t,n)=>{const r=cO(e,n);return r!==void 0?r:cO(t,n)},Mce=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Xt(e[r])||e[r]instanceof String||Xt(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Mce(e[r],t[r],n):e[r]=t[r]);return e},Km=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var qAt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const KAt=e=>Xt(e)?e.replace(/[&<>"'\/]/g,t=>qAt[t]):e;class YAt{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const XAt=[" ",",","?","!",";"],QAt=new YAt(20),JAt=(e,t,n)=>{t=t||"",n=n||"";const r=XAt.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=QAt.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!o.test(e);if(!i){const a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i},WN=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;i-1&&le&&e.replace("_","-"),ZAt={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class dO{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||ZAt,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{let[s,l]=a;for(let c=0;c{let[s,l]=a;for(let c=0;c1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):Xt(r)&&i?s.push(...r.split(i)):s.push(r)));const l=cO(this.data,s);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),l||!a||!Xt(r)?l:WN(this.data&&this.data[t]&&this.data[t][n],r,i)}addResource(t,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),o=n,n=s[1]),this.addNamespaces(n),Yq(this.data,s,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(Xt(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=cO(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Mce(l,r,i):l={...l,...r},Yq(this.data,s,l),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Ace={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{this.processors[i]&&(t=this.processors[i].process(t,n,r,o))}),t}};const Qq={};class fO extends aM{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),HAt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Cc.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!JAt(t,r,o);if(a&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:i};const c=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),t=c.join(o)}return Xt(i)&&(i=[i]),{key:t,namespaces:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const P=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${P}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${P}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a}const d=this.resolve(t,n);let f=d&&d.res;const p=d&&d.usedKey||a,m=d&&d.exactUsedKey||a,g=Object.prototype.toString.apply(f),v=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!Xt(f)&&typeof f!="boolean"&&typeof f!="number";if(x&&f&&S&&v.indexOf(g)<0&&!(Xt(w)&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,f,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(d.res=P,d.usedParams=this.getUsedParamsDetails(n),d):P}if(i){const P=Array.isArray(f),T=P?[]:{},E=P?m:p;for(const O in f)if(Object.prototype.hasOwnProperty.call(f,O)){const k=`${E}${i}${O}`;T[O]=this.translate(k,{...n,joinArrays:!1,ns:s}),T[O]===k&&(T[O]=f[O])}f=T}}else if(x&&Xt(w)&&Array.isArray(f))f=f.join(w),f&&(f=this.extendTranslation(f,t,n,r));else{let P=!1,T=!1;const E=n.count!==void 0&&!Xt(n.count),O=fO.hasDefaultValue(n),k=E?this.pluralResolver.getSuffix(c,n.count,n):"",A=n.ordinal&&E?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",I=E&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),R=I&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${k}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(f)&&O&&(P=!0,f=R),this.isValidLookup(f)||(T=!0,f=a);const F=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:f,z=O&&R!==f&&this.options.updateMissing;if(T||P||z){if(this.logger.log(z?"updateKey":"missingKey",c,l,a,z?R:f),i){const B=this.resolve(a,{...n,keySeparator:!1});B&&B.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let _=[];const D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&D&&D[0])for(let B=0;B{const G=O&&W!==f?W:F;this.options.missingKeyHandler?this.options.missingKeyHandler(B,l,V,G,z,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(B,l,V,G,z,n),this.emit("missingKey",B,l,V,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?_.forEach(B=>{const V=this.pluralResolver.getSuffixes(B,n);I&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(W=>{H([B],a+W,n[`defaultValue${W}`]||R)})}):H(_,a,R))}f=this.extendTranslation(f,t,n,d,r),T&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(T||P)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,P?f:void 0):f=this.options.parseMissingKeyHandler(f))}return o?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,o,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=Xt(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const f=t.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&!Xt(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language||o.usedLng,r),c){const f=t.match(this.interpolator.nestingRegexp),p=f&&f.length;u1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,a,s;return Xt(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;o=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!Xt(n.count),p=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),m=n.context!==void 0&&(Xt(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(v=>{this.isValidLookup(r)||(s=v,!Qq[`${g[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(Qq[`${g[0]}-${v}`]=!0,this.logger.warn(`key "${o}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(x,u,w,v,n);else{let P;f&&(P=this.pluralResolver.getSuffix(w,n.count,n));const T=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(x.push(u+P),n.ordinal&&P.indexOf(E)===0&&x.push(u+P.replace(E,this.options.pluralSeparator)),p&&x.push(u+T)),m){const O=`${u}${this.options.contextSeparator}${n.context}`;x.push(O),f&&(x.push(O+P),n.ordinal&&P.indexOf(E)===0&&x.push(O+P.replace(E,this.options.pluralSeparator)),p&&x.push(O+T))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(i=S,r=this.getResource(w,v,S,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Xt(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const ER=e=>e.charAt(0).toUpperCase()+e.slice(1);class Jq{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Cc.create("languageUtils")}getScriptPartFromCode(t){if(t=uO(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=uO(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Xt(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let o=Intl.getCanonicalLocales(t)[0];if(o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o)return o}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=ER(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=ER(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=ER(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&(i.indexOf("-")>0&&o.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===o||i.indexOf(o)===0&&o.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Xt(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],i=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Xt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):Xt(t)&&i(this.formatLanguageCode(t)),r.forEach(a=>{o.indexOf(a)<0&&i(this.formatLanguageCode(a))}),o}}let e$t=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],t$t={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const n$t=["v1","v2","v3"],r$t=["v4"],Zq={zero:0,one:1,two:2,few:3,many:4,other:5},o$t=()=>{const e={};return e$t.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:t$t[t.fc]}})}),e};class i$t{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Cc.create("pluralResolver"),(!this.options.compatibilityJSON||r$t.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=o$t(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=uO(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];const a=new Intl.PluralRules(r,{type:o});return this.pluralRulesCache[i]=a,a}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,i)=>Zq[o]-Zq[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!n$t.includes(this.options.compatibilityJSON)}}const eK=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=GAt(e,t,n);return!i&&o&&Xt(n)&&(i=WN(e,n,r),i===void 0&&(i=WN(t,n,r))),i},OR=e=>e.replace(/\$/g,"$$$$");class a$t{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Cc.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:a,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:g,nestingOptionsSeparator:v,maxReplaces:w,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:KAt,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Km(i):a||"{{",this.suffix=s?Km(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?Km(f):p||Km("$t("),this.nestingSuffix=m?Km(m):g||Km(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(p.indexOf(this.formatSeparator)<0){const w=eK(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...o,...n,interpolationkey:p}):w}const m=p.split(this.formatSeparator),g=m.shift().trim(),v=m.join(this.formatSeparator).trim();return this.format(eK(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure),v,r,{...o,...n,interpolationkey:g})};this.resetRegExp();const u=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>OR(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?OR(this.escape(p)):OR(p)}].forEach(p=>{for(s=0;i=p.regex.exec(t);){const m=i[1].trim();if(a=c(m),a===void 0)if(typeof u=="function"){const v=u(t,i,o);a=Xt(v)?v:""}else if(o&&Object.prototype.hasOwnProperty.call(o,m))a="";else if(d){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),a="";else!Xt(a)&&!this.useRawValueToEscape&&(a=Gq(a));const g=p.safeValue(a);if(t=t.replace(i[0],g),d?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,a;const s=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${u}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);const p=f.match(/'/g),m=f.match(/"/g);(p&&p.length%2===0&&!m||m.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),c&&(a={...c,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${u}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;o=this.nestingRegexp.exec(t);){let l=[];a={...r},a=a.replace&&!Xt(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const u=o[1].split(this.formatSeparator).map(d=>d.trim());o[1]=u.shift(),l=u,c=!0}if(i=n(s.call(this,o[1].trim(),a),a),i&&o[0]===t&&!Xt(i))return i;Xt(i)||(i=Gq(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),c&&(i=l.reduce((u,d)=>this.format(u,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const s$t=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[s,...l]=a.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=s.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},Ym=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(uO(r),o),t[a]=s),s(n)}};class l$t{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Cc.create("formatter"),this.options=t,this.formats={number:Ym((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:Ym((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:Ym((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:Ym((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:Ym((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Ym(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(s=>s.indexOf(")")>-1)){const s=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,s)].join(this.formatSeparator)}return i.reduce((s,l)=>{const{formatName:c,formatOptions:u}=s$t(l);if(this.formats[c]){let d=s;try{const f=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},p=f.locale||f.lng||o.locale||o.lng||r;d=this.formats[c](s,p,{...u,...o,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return s},t)}}const c$t=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class u$t extends aM{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Cc.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const i={},a={},s={},l={};return t.forEach(c=>{let u=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,u=!1,a[f]===void 0&&(a[f]=!0),i[f]===void 0&&(i[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(s[c]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),i=o[0],a=o[1];n&&this.emit("failedLoading",i,a,n),!n&&r&&this.store.addResourceBundle(i,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(l=>{WAt(l.loaded,[i],a),c$t(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{s[c][d]===void 0&&(s[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:a});return}this.readingCalls++;const s=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&o{this.read.call(this,t,n,r,o+1,i*2,a)},i);return}a(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>s(null,u)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Xt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Xt(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,n,r,o,l):u=c(t,n,r,o),u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}else c(t,n,r,o,s,l)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const tK=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Xt(e[1])&&(t.defaultValue=e[1]),Xt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),nK=e=>(Xt(e.ns)&&(e.ns=[e.ns]),Xt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Xt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),oP=()=>{},d$t=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class zx extends aM{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=nK(t),this.services={},this.logger=Cc,this.modules={external:[]},d$t(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(Xt(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=tK();this.options={...o,...this.options,...nK(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Cc.init(i(this.modules.logger),this.options):Cc.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=l$t);const d=new Jq(this.options);this.store=new Xq(this.options.resources,this.options);const f=this.services;f.logger=Cc,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new i$t(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(f.formatter=i(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new a$t(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new u$t(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var m=arguments.length,g=new Array(m>1?m-1:0),v=1;v1?m-1:0),v=1;v{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=oP),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=m0(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oP;const o=Xt(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(c=>{c!=="cimode"&&i.indexOf(c)<0&&i.push(c)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(s=>a(s)),this.services.backendConnector.load(i,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const o=m0();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=oP),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Ace.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=m0();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,c)=>{c?(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=Xt(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{a(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),o}getFixedT(t,n,r){var o=this;const i=function(a,s){let l;if(typeof s!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d`${l.keyPrefix}${f}${m}`):p=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,o.t(p,l)};return Xt(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!o||a(i,t)))}loadNamespaces(t,n){const r=m0();return this.options.ns?(Xt(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=m0();Xt(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=o.concat(i),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Jq(tK());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new zx(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oP;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new zx(o);return(t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(s=>{i[s]=this[s]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new Xq(this.store.data,o),i.services.resourceStore=i.store),i.translator=new fO(i.services,o),i.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const rK=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,m$t=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!rK.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!rK.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},oK={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=m$t(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const a=o.substring(1).split("&");for(let s=0;s0&&a[s].substring(0,l)===t&&(n=a[s].substring(l+1))}}return n}};let g0=null;const iK=()=>{if(g0!==null)return g0;try{g0=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{g0=!1}return g0};var v$t={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&iK())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&iK()&&window.localStorage.setItem(n,e)}};let y0=null;const aK=()=>{if(y0!==null)return y0;try{y0=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{y0=!1}return y0};var b$t={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&aK())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&aK()&&window.sessionStorage.setItem(n,e)}},w$t={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i0?t:void 0}},x$t={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},S$t={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},C$t={name:"subdomain",lookup(e){var o,i;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((i=(o=window.location)==null?void 0:o.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function P$t(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class $ce{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=h$t(n,this.options||{},P$t()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(g$t),this.addDetector(y$t),this.addDetector(v$t),this.addDetector(b$t),this.addDetector(w$t),this.addDetector(x$t),this.addDetector(S$t),this.addDetector(C$t)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}$ce.type="languageDetector";function GN(e){"@babel/helpers - typeof";return GN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},GN(e)}function Rce(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":GN(XMLHttpRequest))==="object"}function T$t(e){return!!e&&typeof e.then=="function"}function E$t(e){return T$t(e)?e:Promise.resolve(e)}function O$t(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var qN={exports:{}},iP={exports:{}},sK;function I$t(){return sK||(sK=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Di<"u"&&Di,r=function(){function i(){this.fetch=!1,this.DOMException=n.DOMException}return i.prototype=n,new i}();(function(i){(function(a){var s=typeof i<"u"&&i||typeof self<"u"&&self||typeof s<"u"&&s,l={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function c(_){return _&&DataView.prototype.isPrototypeOf(_)}if(l.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(_){return _&&u.indexOf(Object.prototype.toString.call(_))>-1};function f(_){if(typeof _!="string"&&(_=String(_)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(_)||_==="")throw new TypeError('Invalid character in header field name: "'+_+'"');return _.toLowerCase()}function p(_){return typeof _!="string"&&(_=String(_)),_}function m(_){var D={next:function(){var H=_.shift();return{done:H===void 0,value:H}}};return l.iterable&&(D[Symbol.iterator]=function(){return D}),D}function g(_){this.map={},_ instanceof g?_.forEach(function(D,H){this.append(H,D)},this):Array.isArray(_)?_.forEach(function(D){this.append(D[0],D[1])},this):_&&Object.getOwnPropertyNames(_).forEach(function(D){this.append(D,_[D])},this)}g.prototype.append=function(_,D){_=f(_),D=p(D);var H=this.map[_];this.map[_]=H?H+", "+D:D},g.prototype.delete=function(_){delete this.map[f(_)]},g.prototype.get=function(_){return _=f(_),this.has(_)?this.map[_]:null},g.prototype.has=function(_){return this.map.hasOwnProperty(f(_))},g.prototype.set=function(_,D){this.map[f(_)]=p(D)},g.prototype.forEach=function(_,D){for(var H in this.map)this.map.hasOwnProperty(H)&&_.call(D,this.map[H],H,this)},g.prototype.keys=function(){var _=[];return this.forEach(function(D,H){_.push(H)}),m(_)},g.prototype.values=function(){var _=[];return this.forEach(function(D){_.push(D)}),m(_)},g.prototype.entries=function(){var _=[];return this.forEach(function(D,H){_.push([H,D])}),m(_)},l.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function v(_){if(_.bodyUsed)return Promise.reject(new TypeError("Already read"));_.bodyUsed=!0}function w(_){return new Promise(function(D,H){_.onload=function(){D(_.result)},_.onerror=function(){H(_.error)}})}function x(_){var D=new FileReader,H=w(D);return D.readAsArrayBuffer(_),H}function S(_){var D=new FileReader,H=w(D);return D.readAsText(_),H}function P(_){for(var D=new Uint8Array(_),H=new Array(D.length),B=0;B-1?D:_}function A(_,D){if(!(this instanceof A))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');D=D||{};var H=D.body;if(_ instanceof A){if(_.bodyUsed)throw new TypeError("Already read");this.url=_.url,this.credentials=_.credentials,D.headers||(this.headers=new g(_.headers)),this.method=_.method,this.mode=_.mode,this.signal=_.signal,!H&&_._bodyInit!=null&&(H=_._bodyInit,_.bodyUsed=!0)}else this.url=String(_);if(this.credentials=D.credentials||this.credentials||"same-origin",(D.headers||!this.headers)&&(this.headers=new g(D.headers)),this.method=k(D.method||this.method||"GET"),this.mode=D.mode||this.mode||null,this.signal=D.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&H)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(H),(this.method==="GET"||this.method==="HEAD")&&(D.cache==="no-store"||D.cache==="no-cache")){var B=/([?&])_=[^&]*/;if(B.test(this.url))this.url=this.url.replace(B,"$1_="+new Date().getTime());else{var V=/\?/;this.url+=(V.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})};function I(_){var D=new FormData;return _.trim().split("&").forEach(function(H){if(H){var B=H.split("="),V=B.shift().replace(/\+/g," "),W=B.join("=").replace(/\+/g," ");D.append(decodeURIComponent(V),decodeURIComponent(W))}}),D}function R(_){var D=new g,H=_.replace(/\r?\n[\t ]+/g," ");return H.split("\r").map(function(B){return B.indexOf(` -`)===0?B.substr(1,B.length):B}).forEach(function(B){var V=B.split(":"),W=V.shift().trim();if(W){var G=V.join(":").trim();D.append(W,G)}}),D}E.call(A.prototype);function L(_,D){if(!(this instanceof L))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');D||(D={}),this.type="default",this.status=D.status===void 0?200:D.status,this.ok=this.status>=200&&this.status<300,this.statusText=D.statusText===void 0?"":""+D.statusText,this.headers=new g(D.headers),this.url=D.url||"",this._initBody(_)}E.call(L.prototype),L.prototype.clone=function(){return new L(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},L.error=function(){var _=new L(null,{status:0,statusText:""});return _.type="error",_};var F=[301,302,303,307,308];L.redirect=function(_,D){if(F.indexOf(D)===-1)throw new RangeError("Invalid status code");return new L(null,{status:D,headers:{location:_}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(D,H){this.message=D,this.name=H;var B=Error(D);this.stack=B.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function z(_,D){return new Promise(function(H,B){var V=new A(_,D);if(V.signal&&V.signal.aborted)return B(new a.DOMException("Aborted","AbortError"));var W=new XMLHttpRequest;function G(){W.abort()}W.onload=function(){var Y={status:W.status,statusText:W.statusText,headers:R(W.getAllResponseHeaders()||"")};Y.url="responseURL"in W?W.responseURL:Y.headers.get("X-Request-URL");var ne="response"in W?W.response:W.responseText;setTimeout(function(){H(new L(ne,Y))},0)},W.onerror=function(){setTimeout(function(){B(new TypeError("Network request failed"))},0)},W.ontimeout=function(){setTimeout(function(){B(new TypeError("Network request failed"))},0)},W.onabort=function(){setTimeout(function(){B(new a.DOMException("Aborted","AbortError"))},0)};function Q(Y){try{return Y===""&&s.location.href?s.location.href:Y}catch{return Y}}W.open(V.method,Q(V.url),!0),V.credentials==="include"?W.withCredentials=!0:V.credentials==="omit"&&(W.withCredentials=!1),"responseType"in W&&(l.blob?W.responseType="blob":l.arrayBuffer&&V.headers.get("Content-Type")&&V.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(W.responseType="arraybuffer")),D&&typeof D.headers=="object"&&!(D.headers instanceof g)?Object.getOwnPropertyNames(D.headers).forEach(function(Y){W.setRequestHeader(Y,p(D.headers[Y]))}):V.headers.forEach(function(Y,ne){W.setRequestHeader(ne,Y)}),V.signal&&(V.signal.addEventListener("abort",G),W.onreadystatechange=function(){W.readyState===4&&V.signal.removeEventListener("abort",G)}),W.send(typeof V._bodyInit>"u"?null:V._bodyInit)})}return z.polyfill=!0,s.fetch||(s.fetch=z,s.Headers=g,s.Request=A,s.Response=L),a.Headers=g,a.Request=A,a.Response=L,a.fetch=z,a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(iP,iP.exports)),iP.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof Di<"u"&&Di.fetch?n=Di.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof O$t<"u"&&typeof window>"u"){var r=n||I$t();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(qN,qN.exports);var _ce=qN.exports;const Dce=_n(_ce),lK=AK({__proto__:null,default:Dce},[_ce]);function cK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function uK(e){for(var t=1;t"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(i["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=uK({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:i},fK?{}:a),l=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{dK(n,s,o,l)}catch(c){if(!a||Object.keys(a).length===0||!c.message||c.message.indexOf("not implemented")<0)return o(c);try{Object.keys(a).forEach(function(u){delete s[u]}),dK(n,s,o,l),fK=!0}catch(u){o(u)}}},R$t=function(t,n,r,o){r&&kh(r)==="object"&&(r=KN("",r).slice(1)),t.queryStringParams&&(n=KN(n,t.queryStringParams));try{var i;Vx?i=new Vx:i=new pO("MSXML2.XMLHTTP.3.0"),i.open(r?"POST":"GET",n,1),t.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!t.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)i.setRequestHeader(s,a[s]);i.onreadystatechange=function(){i.readyState>3&&o(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(l){console&&console.log(l)}},_$t=function(t,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},Mu&&n.indexOf("file:")!==0)return $$t(t,n,r,o);if(Rce()||typeof ActiveXObject=="function")return R$t(t,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function pv(e){"@babel/helpers - typeof";return pv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pv(e)}function pK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function IR(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};D$t(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return L$t(e,[{key:"init",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=IR(IR(IR({},j$t()),this.options||{}),o),this.allOptions=i,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);pv(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,o){this._readAny(n,n,r,r,o)}},{key:"read",value:function(n,r,o){this._readAny([n],n,[r],r,o)}},{key:"_readAny",value:function(n,r,o,i,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,o)),l=E$t(l),l.then(function(c){if(!c)return a(null,{});var u=s.services.interpolator.interpolate(c,{lng:n.join("+"),ns:o.join("+")});s.loadUrl(u,a,r,i)})}},{key:"loadUrl",value:function(n,r,o,i){var a=this,s=typeof o=="string"?[o]:o,l=typeof i=="string"?[i]:i,c=this.options.parseLoadPayload(s,l);this.options.request(this.options,n,c,function(u,d){if(d&&(d.status>=500&&d.status<600||!d.status))return r("failed loading "+n+"; status code: "+d.status,!0);if(d&&d.status>=400&&d.status<500)return r("failed loading "+n+"; status code: "+d.status,!1);if(!d&&u&&u.message){var f=u.message.toLowerCase(),p=["failed","fetch","network","load"].find(function(v){return f.indexOf(v)>-1});if(p)return r("failed loading "+n+": "+u.message,!0)}if(u)return r(u,!1);var m,g;try{typeof d.data=="string"?m=a.options.parse(d.data,o,i):m=d.data}catch{g="failed parsing "+n+" to json"}if(g)return r(g,!1);r(null,m)})}},{key:"create",value:function(n,r,o,i,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,o,i),c=0,u=[],d=[];n.forEach(function(f){var p=s.options.addPath;typeof s.options.addPath=="function"&&(p=s.options.addPath(f,r));var m=s.services.interpolator.interpolate(p,{lng:f,ns:r});s.options.request(s.options,m,l,function(g,v){c+=1,u.push(g),d.push(v),c===n.length&&typeof a=="function"&&a(u,d)})})}}},{key:"reload",value:function(){var n=this,r=this.services,o=r.backendConnector,i=r.languageUtils,a=r.logger,s=o.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],c=function(d){var f=i.toResolveHierarchy(d);f.forEach(function(p){l.indexOf(p)<0&&l.push(p)})};c(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(u){return c(u)}),l.forEach(function(u){n.allOptions.ns.forEach(function(d){o.read(u,d,"read",null,null,function(f,p){f&&a.warn("loading namespace ".concat(d," for language ").concat(u," failed"),f),!f&&p&&a.log("loaded namespace ".concat(d," for language ").concat(u),p),o.loaded("".concat(u,"|").concat(d),f,p)})})})}}}])}();Fce.type="backend";Ci.use(Fce).use($ce).use(j$e).init({load:"languageOnly",detection:{order:["path","navigator","htmlTag"]},fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"/static/react/locales/{{lng}}/{{ns}}.json"}});const nm=new $we({defaultOptions:{queries:{retry:3,staleTime:1e3*60*5,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:"always"}}}),Dz=e=>{const t=document.getElementById(e);if(t===null)return;const n=t.attachShadow({mode:"open"}),r=document.createElement("div"),o=document.createElement("style"),i=document.getElementById("react-css");if(i){const l=document.createElement("link");l.setAttribute("rel","stylesheet"),l.setAttribute("href",i.href),n.appendChild(i)}n.appendChild(r),n.appendChild(o);const a=QK({key:"css",prepend:!0,container:o});rd(r).render(C(nve,{value:a,children:C(y.Suspense,{fallback:C(qa,{}),children:C(JB,{children:C(Of,{theme:hSt(r),children:C(Mh,{client:nm,children:C(_z,{})})})})})}))},hK=document.getElementById("root");hK&&rd(hK).render(C(K.StrictMode,{children:C(y.Suspense,{fallback:C(qa,{}),children:C(JB,{children:C(Of,{theme:Uf,children:X(Mh,{client:nm,children:[C(VAt,{}),C(Kwe,{})]})})})})}));const mK=document.getElementById("react-weight-overview");mK&&rd(mK).render(C(y.Suspense,{fallback:C(qa,{}),children:C(Of,{theme:Uf,children:C(Mh,{client:nm,children:C(Zse,{})})})}));const gK=document.getElementById("react-weight-dashboard");gK&&rd(gK).render(C(y.Suspense,{fallback:C(qa,{}),children:C(Of,{theme:Uf,children:C(Mh,{client:nm,children:C(Ise,{})})})}));const yK=document.getElementById("react-nutrition-dashboard");yK&&rd(yK).render(C(y.Suspense,{fallback:C(qa,{}),children:C(Of,{theme:Uf,children:C(Mh,{client:nm,children:C(Hae,{})})})}));const vK=document.getElementById("react-routine-dashboard");vK&&rd(vK).render(C(y.Suspense,{fallback:C(qa,{}),children:C(Of,{theme:Uf,children:C(Mh,{client:nm,children:C(cse,{})})})}));Dz("react-exercise-overview");Dz("react-exercise-contribute");const bK=document.getElementById("react-exercise-detail");bK&&rd(bK).render(C(y.Suspense,{fallback:C(qa,{}),children:C(JB,{children:C(Of,{theme:Uf,children:C(Mh,{client:nm,children:C(_z,{})})})})}));Dz("react-page");const wK=document.getElementById("react-ingredient-search");wK&&rd(wK).render(C(y.Suspense,{fallback:C(qa,{}),children:C(Of,{theme:Uf,children:C(R0t,{})})}))});export default B$t(); +`}${a}`.trim()}function Aq(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}function rkt(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{Aq(e)}):Aq(e)}function okt(e){var t;return!!((t=window.getSelection())!=null&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}const ikt=(e,t)=>{const n=t.ignoreValueFormatterDuringExport,r=(typeof n=="object"?n==null?void 0:n.clipboardExport:n)||!1,o=t.clipboardCopyCellDelimiter,i=v.useCallback(a=>{if(!rOt(a)||okt(a.target))return;let s="";if(e.current.getSelectedRows().size>0)s=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1});else{const c=Da(e);if(c){const u=e.current.getCellParams(c.id,c.field);s=vce(u,{csvOptions:{delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:r})}}s=e.current.unstable_applyPipeProcessors("clipboardCopy",s),s&&(rkt(s),e.current.publishEvent("clipboardCopy",s))},[e,r,o]);Lle(e,e.current.rootElementRef,"keydown",i),lr(e,"clipboardCopy",t.onClipboardCopy)},akt=e=>D({},e,{columnMenu:{open:!1}}),skt=e=>{const t=Ro(e,"useGridColumnMenu"),n=v.useCallback(a=>{const s=FP(e.current.state),l={open:!0,field:a};(l.open!==s.open||l.field!==s.field)&&(e.current.setState(u=>u.columnMenu.open&&u.columnMenu.field===a?u:(t.debug("Opening Column Menu"),D({},u,{columnMenu:{open:!0,field:a}}))),e.current.hidePreferences(),e.current.forceUpdate())},[e,t]),r=v.useCallback(()=>{const a=FP(e.current.state);if(a.field){const c=od(e),u=Vs(e),d=Iu(e);let f=a.field;if(c[f]||(f=d[0]),u[f]===!1){const p=d.filter(g=>g===f?!0:u[g]!==!1),m=p.indexOf(f);f=p[m+1]||p[m-1]}e.current.setColumnHeaderFocus(f)}const s={open:!1,field:void 0};(s.open!==a.open||s.field!==a.field)&&(e.current.setState(c=>(t.debug("Hiding Column Menu"),D({},c,{columnMenu:s}))),e.current.forceUpdate())},[e,t]),o=v.useCallback(a=>{t.debug("Toggle Column Menu");const s=FP(e.current.state);!s.open||s.field!==a?n(a):r()},[e,t,n,r]);Qt(e,{showColumnMenu:n,hideColumnMenu:r,toggleColumnMenu:o},"public"),gt(e,"columnResizeStart",r),gt(e,"virtualScrollerWheel",e.current.hideColumnMenu),gt(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)},lkt=(e,t,n)=>{var o,i,a;const r=ng({apiRef:n,columnsToUpsert:t.columns,initialState:(o=t.initialState)==null?void 0:o.columns,columnVisibilityModel:t.columnVisibilityModel??((a=(i=t.initialState)==null?void 0:i.columns)==null?void 0:a.columnVisibilityModel)??{},keepOnlyColumnsToUpsert:!0});return D({},e,{columns:r,pinnedColumns:e.pinnedColumns??ML})};function ckt(e,t){var I,R;const n=Ro(e,"useGridColumns"),r=v.useRef(t.columns);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:Vs,changeEvent:"columnVisibilityModelChange"});const o=v.useCallback(_=>{var N,B;n.debug("Updating columns state."),e.current.setState($q(_)),e.current.publishEvent("columnsChange",_.orderedFields),(B=(N=e.current).updateRenderContext)==null||B.call(N),e.current.forceUpdate()},[n,e]),i=v.useCallback(_=>od(e)[_],[e]),a=v.useCallback(()=>Ul(e),[e]),s=v.useCallback(()=>ho(e),[e]),l=v.useCallback((_,N=!0)=>(N?ho(e):Ul(e)).findIndex(L=>L.field===_),[e]),c=v.useCallback(_=>{const N=l(_);return Gf(e)[N]},[e,l]),u=v.useCallback(_=>{var B,L;Vs(e)!==_&&(e.current.setState(F=>D({},F,{columns:ng({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:_,keepOnlyColumnsToUpsert:!1})})),(L=(B=e.current).updateRenderContext)==null||L.call(B),e.current.forceUpdate())},[e]),d=v.useCallback(_=>{const N=ng({apiRef:e,columnsToUpsert:_,initialState:void 0,keepOnlyColumnsToUpsert:!1});o(N)},[e,o]),f=v.useCallback((_,N)=>{const B=Vs(e),L=B[_]??!0;if(N!==L){const F=D({},B,{[_]:N});e.current.setColumnVisibilityModel(F)}},[e]),p=v.useCallback(_=>Iu(e).findIndex(B=>B===_),[e]),m=v.useCallback((_,N)=>{const B=Iu(e),L=p(_);if(L===N)return;n.debug(`Moving column ${_} to index ${N}`);const F=[...B],U=F.splice(L,1)[0];F.splice(N,0,U),o(D({},Ac(e.current.state),{orderedFields:F}));const V={column:e.current.getColumn(_),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(_),oldIndex:L};e.current.publishEvent("columnIndexChange",V)},[e,n,o,p]),g=v.useCallback((_,N)=>{n.debug(`Updating column ${_} width to ${N}`);const B=Ac(e.current.state),L=B.lookup[_],F=D({},L,{width:N,hasBeenResized:!0});o($L(D({},B,{lookup:D({},B.lookup,{[_]:F})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(_),colDef:F,width:N})},[e,n,o]),y={getColumn:i,getAllColumns:a,getColumnIndex:l,getColumnPosition:c,getVisibleColumns:s,getColumnIndexRelativeToVisibleColumns:p,updateColumns:d,setColumnVisibilityModel:u,setColumnVisibility:f,setColumnWidth:g},b={setColumnIndex:m};Qt(e,y,"public"),Qt(e,b,t.signature===Xs.DataGrid?"private":"public");const x=v.useCallback((_,N)=>{var z,W;const B={},L=Vs(e);(!N.exportOnlyDirtyModels||t.columnVisibilityModel!=null||Object.keys(((W=(z=t.initialState)==null?void 0:z.columns)==null?void 0:W.columnVisibilityModel)??{}).length>0||Object.keys(L).length>0)&&(B.columnVisibilityModel=L),B.orderedFields=Iu(e);const U=Ul(e),V={};return U.forEach(G=>{if(G.hasBeenResized){const J={};qle.forEach(K=>{let ne=G[K];ne===1/0&&(ne=-1),J[K]=ne}),V[G.field]=J}}),Object.keys(V).length>0&&(B.dimensions=V),D({},_,{columns:B})},[e,t.columnVisibilityModel,(I=t.initialState)==null?void 0:I.columns]),S=v.useCallback((_,N)=>{var U;const B=(U=N.stateToRestore.columns)==null?void 0:U.columnVisibilityModel,L=N.stateToRestore.columns;if(B==null&&L==null)return _;const F=ng({apiRef:e,columnsToUpsert:[],initialState:L,columnVisibilityModel:B,keepOnlyColumnsToUpsert:!1});return e.current.setState($q(F)),L!=null&&e.current.publishEvent("columnsChange",F.orderedFields),_},[e]),P=v.useCallback((_,N)=>{var B;if(N===Oh.columns){const L=t.slots.columnsPanel;return $.jsx(L,D({},(B=t.slotProps)==null?void 0:B.columnsPanel))}return _},[t.slots.columnsPanel,(R=t.slotProps)==null?void 0:R.columnsPanel]),E=v.useCallback(_=>t.disableColumnSelector?_:[..._,"columnMenuColumnsItem"],[t.disableColumnSelector]);Ar(e,"columnMenu",E),Ar(e,"exportState",x),Ar(e,"restoreState",S),Ar(e,"preferencePanel",P);const T=v.useRef(null);gt(e,"viewportInnerSizeChange",_=>{T.current!==_.width&&(T.current=_.width,o($L(Ac(e.current.state),e.current.getRootDimensions())))});const k=v.useCallback(()=>{n.info("Columns pipe processing have changed, regenerating the columns");const _=ng({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});o(_)},[e,n,o]);Az(e,"hydrateColumns",k);const M=v.useRef(!0);v.useEffect(()=>{if(M.current){M.current=!1;return}if(n.info(`GridColumns have changed, new length ${t.columns.length}`),r.current===t.columns)return;const _=ng({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});r.current=t.columns,o(_)},[n,e,o,t.columns]),v.useEffect(()=>{t.columnVisibilityModel!==void 0&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,n,t.columnVisibilityModel])}function $q(e){return t=>D({},t,{columns:e})}const ukt=(e,t)=>{var n;return D({},e,{density:((n=t.initialState)==null?void 0:n.density)??t.density??"standard"})},dkt=(e,t)=>{var s;const n=Ro(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:Ig,changeEvent:"densityChange"});const o={setDensity:Ze(l=>{Ig(e.current.state)!==l&&(n.debug(`Set grid density to ${l}`),e.current.setState(u=>D({},u,{density:l})))})};Qt(e,o,"public");const i=v.useCallback((l,c)=>{var f;const u=Ig(e.current.state);return!c.exportOnlyDirtyModels||t.density!=null||((f=t.initialState)==null?void 0:f.density)!=null?D({},l,{density:u}):l},[e,t.density,(s=t.initialState)==null?void 0:s.density]),a=v.useCallback((l,c)=>{var d;const u=(d=c.stateToRestore)!=null&&d.density?c.stateToRestore.density:Ig(e.current.state);return e.current.setState(f=>D({},f,{density:u})),l},[e]);Ar(e,"exportState",i),Ar(e,"restoreState",a),v.useEffect(()=>{t.density&&e.current.setDensity(t.density)},[e,t.density])};function fkt(e,t="csv",n=document.title||"untitled"){const r=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=r,i.click(),setTimeout(()=>{URL.revokeObjectURL(o)});return}throw new Error("MUI X: exportAs not supported.")}const bce=({apiRef:e,options:t})=>{const n=Ul(e);return t.fields?t.fields.reduce((o,i)=>{const a=n.find(s=>s.field===i);return a&&o.push(a),o},[]):(t.allColumns?n:ho(e)).filter(o=>!o.disableExport)},wce=({apiRef:e})=>{var l,c;const t=$le(e),n=ei(e),r=e.current.getSelectedRows(),o=t.filter(u=>n[u].type!=="footer"),i=em(e),a=((l=i==null?void 0:i.top)==null?void 0:l.map(u=>u.id))||[],s=((c=i==null?void 0:i.bottom)==null?void 0:c.map(u=>u.id))||[];return o.unshift(...a),o.push(...s),r.size>0?o.filter(u=>r.has(u)):o},pkt=(e,t)=>{const n=Ro(e,"useGridCsvExport"),r=t.ignoreValueFormatterDuringExport,o=(typeof r=="object"?r==null?void 0:r.csvExport:r)||!1,i=v.useCallback((c={})=>{n.debug("Get data as CSV");const u=bce({apiRef:e,options:c}),f=(c.getRowsToExport??wce)({apiRef:e});return nkt({columns:u,rowIds:f,csvOptions:{delimiter:c.delimiter||",",shouldAppendQuotes:c.shouldAppendQuotes??!0,includeHeaders:c.includeHeaders??!0,includeColumnGroupsHeaders:c.includeColumnGroupsHeaders??!0,escapeFormulas:c.escapeFormulas??!0},ignoreValueFormatter:o,apiRef:e})},[n,e,o]),a=v.useCallback(c=>{n.debug("Export data as CSV");const u=i(c),d=new Blob([c!=null&&c.utf8WithBom?new Uint8Array([239,187,191]):"",u],{type:"text/csv"});fkt(d,"csv",c==null?void 0:c.fileName)},[n,i]);Qt(e,{getDataAsCsv:i,exportDataAsCsv:a},"public");const l=v.useCallback((c,u)=>{var d;return(d=u.csvOptions)!=null&&d.disableToolbarButton?c:[...c,{component:$.jsx(lIt,{options:u.csvOptions}),componentName:"csvExport"}]},[]);Ar(e,"exportMenu",l)},jP=(e,t,n)=>{let r=e.paginationModel;const o=e.rowCount,i=(n==null?void 0:n.pageSize)??r.pageSize,a=(n==null?void 0:n.page)??r.page,s=Nle(o,i,a);n&&((n==null?void 0:n.page)!==r.page||(n==null?void 0:n.pageSize)!==r.pageSize)&&(r=n);const l=xCt(r.page,s);return l!==r.page&&(r=D({},r,{page:l})),jle(r.pageSize,t),r},hkt=(e,t)=>{var m,g;const n=Ro(e,"useGridPaginationModel"),r=Ye(e,ZS),o=Math.floor(t.rowHeight*r);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:Di,changeEvent:"paginationModelChange"});const i=v.useCallback(y=>{const b=Di(e);y!==b.page&&(n.debug(`Setting page to ${y}`),e.current.setPaginationModel({page:y,pageSize:b.pageSize}))},[e,n]),a=v.useCallback(y=>{const b=Di(e);y!==b.pageSize&&(n.debug(`Setting page size to ${y}`),e.current.setPaginationModel({pageSize:y,page:b.page}))},[e,n]),s=v.useCallback(y=>{const b=Di(e);y!==b&&(n.debug("Setting 'paginationModel' to",y),e.current.setState(x=>D({},x,{pagination:D({},x.pagination,{paginationModel:jP(x.pagination,t.signature,y)})}),"setPaginationModel"))},[e,n,t.signature]);Qt(e,{setPage:i,setPageSize:a,setPaginationModel:s},"public");const c=v.useCallback((y,b)=>{var P,E;const x=Di(e);return!b.exportOnlyDirtyModels||t.paginationModel!=null||((E=(P=t.initialState)==null?void 0:P.pagination)==null?void 0:E.paginationModel)!=null||x.page!==0&&x.pageSize!==wCt(t.autoPageSize)?D({},y,{pagination:D({},y.pagination,{paginationModel:x})}):y},[e,t.paginationModel,(g=(m=t.initialState)==null?void 0:m.pagination)==null?void 0:g.paginationModel,t.autoPageSize]),u=v.useCallback((y,b)=>{var S,P;const x=(S=b.stateToRestore.pagination)!=null&&S.paginationModel?D({},Fle(t.autoPageSize),(P=b.stateToRestore.pagination)==null?void 0:P.paginationModel):Di(e);return e.current.setState(E=>D({},E,{pagination:D({},E.pagination,{paginationModel:jP(E.pagination,t.signature,x)})}),"stateRestorePreProcessing"),y},[e,t.autoPageSize,t.signature]);Ar(e,"exportState",c),Ar(e,"restoreState",u);const d=()=>{var b;const y=Di(e);(b=e.current.virtualScrollerRef)!=null&&b.current&&e.current.scrollToIndexes({rowIndex:y.page*y.pageSize})},f=v.useCallback(()=>{if(!t.autoPageSize)return;const y=e.current.getRootDimensions(),b=Math.floor(y.viewportInnerSize.height/o);e.current.setPageSize(b)},[e,t.autoPageSize,o]),p=v.useCallback(y=>{if(y==null)return;const b=Di(e),x=Ble(e);b.page>x-1&&e.current.setPage(Math.max(0,x-1))},[e]);gt(e,"viewportInnerSizeChange",f),gt(e,"paginationModelChange",d),gt(e,"rowCountChange",p),v.useEffect(()=>{e.current.setState(y=>D({},y,{pagination:D({},y.pagination,{paginationModel:jP(y.pagination,t.signature,t.paginationModel)})}))},[e,t.paginationModel,t.paginationMode,t.signature]),v.useEffect(f,[f])};function mkt(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}function gkt(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}const ykt=(e,t)=>{const n=e.current.rootElementRef.current!==null,r=Ro(e,"useGridPrintExport"),o=v.useRef(null),i=v.useRef(null),a=v.useRef({}),s=v.useRef([]),l=v.useRef();v.useEffect(()=>{o.current=mr(e.current.rootElementRef.current)},[e,n]);const c=v.useCallback((y,b,x)=>new Promise(S=>{const P=bce({apiRef:e,options:{fields:y,allColumns:b}}).map(O=>O.field),E=Ul(e),T={};E.forEach(O=>{T[O.field]=P.includes(O.field)}),x&&(T[fb.field]=!0),e.current.setColumnVisibilityModel(T),S()}),[e]),u=v.useCallback(y=>{const x=y({apiRef:e}).reduce((S,P)=>{const E=e.current.getRow(P);return E[Jg]||S.push(E),S},[]);e.current.setRows(x)},[e]),d=v.useCallback((y,b)=>{var B,L,F,U;const x=D({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},b),S=y.contentDocument;if(!S)return;const P=pb(e.current.state),E=e.current.rootElementRef.current,T=E.cloneNode(!0),O=T.querySelector(`.${ae.main}`);O.style.overflow="visible",T.style.contain="size";let k=((B=E.querySelector(`.${ae.toolbarContainer}`))==null?void 0:B.offsetHeight)||0,M=((L=E.querySelector(`.${ae.footerContainer}`))==null?void 0:L.offsetHeight)||0;x.hideToolbar&&((F=T.querySelector(`.${ae.toolbarContainer}`))==null||F.remove(),k=0),x.hideFooter&&((U=T.querySelector(`.${ae.footerContainer}`))==null||U.remove(),M=0);const I=P.currentPageTotalHeight+Cz(e,t)+k+M;if(T.style.height=`${I}px`,T.style.boxSizing="content-box",!x.hideFooter){const V=T.querySelector(`.${ae.footerContainer}`);V.style.position="absolute",V.style.width="100%",V.style.top=`${I-M}px`}const R=document.createElement("div");R.appendChild(T),S.body.style.marginTop="0px",S.body.innerHTML=R.innerHTML;const _=typeof x.pageStyle=="function"?x.pageStyle():x.pageStyle;if(typeof _=="string"){const V=S.createElement("style");V.appendChild(S.createTextNode(_)),S.head.appendChild(V)}x.bodyClassName&&S.body.classList.add(...x.bodyClassName.split(" "));const N=[];if(x.copyStyles){const V=E.getRootNode(),W=(V.constructor.name==="ShadowRoot"?V:o.current).querySelectorAll("style, link[rel='stylesheet']");for(let G=0;G{K.addEventListener("load",()=>ne())})),S.head.appendChild(K)}}}Promise.all(N).then(()=>{y.contentWindow.print()})},[e,o,t]),f=v.useCallback(y=>{var b,x;o.current.body.removeChild(y),e.current.restoreState(i.current||{}),(x=(b=i.current)==null?void 0:b.columns)!=null&&x.columnVisibilityModel||e.current.setColumnVisibilityModel(a.current),e.current.setState(S=>D({},S,{virtualization:l.current})),e.current.setRows(s.current),i.current=null,a.current={},s.current=[]},[e]),m={exportDataAsPrint:v.useCallback(async y=>{if(r.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(i.current=e.current.exportState(),a.current=Vs(e),s.current=e.current.getSortedRows().filter(x=>!x[Jg]),t.pagination){const S={page:0,pageSize:yz(e)};e.current.setState(P=>D({},P,{pagination:D({},P.pagination,{paginationModel:jP(P.pagination,"DataGridPro",S)})}))}l.current=e.current.state.virtualization,e.current.setState(x=>D({},x,{virtualization:D({},x.virtualization,{enabled:!1,enabledForColumns:!1})})),await c(y==null?void 0:y.fields,y==null?void 0:y.allColumns,y==null?void 0:y.includeCheckboxes),u((y==null?void 0:y.getRowsToExport)??wce),await mkt();const b=gkt(y==null?void 0:y.fileName);b.onload=()=>{d(b,y),b.contentWindow.matchMedia("print").addEventListener("change",S=>{S.matches===!1&&f(b)})},o.current.body.appendChild(b)},[t,r,e,d,f,c,u])};Qt(e,m,"public");const g=v.useCallback((y,b)=>{var x;return(x=b.printOptions)!=null&&x.disableToolbarButton?y:[...y,{component:$.jsx(cIt,{options:b.printOptions}),componentName:"printExport"}]},[]);Ar(e,"exportMenu",g)},vkt=(e,t,n)=>{var o,i;const r=t.filterModel??((i=(o=t.initialState)==null?void 0:o.filter)==null?void 0:i.filterModel)??Fx();return D({},e,{filter:{filterModel:pz(r,t.disableMultipleColumnsFiltering,n),filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},bkt=e=>e.filteredRowsLookup;function Rq(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function wkt(){return cle(Object.values)}const xkt=(e,t)=>{var M,I,R;const n=Ro(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:Qo,changeEvent:"filterModelChange"});const r=v.useCallback(()=>{e.current.setState(_=>{const N=Qo(_,e.current.instanceId),B=e.current.getFilterState(N),L=D({},_,{filter:D({},_.filter,B)}),F=Rq(e,L);return D({},L,{visibleRowsLookup:F})}),e.current.publishEvent("filteredRowsSet")},[e]),o=v.useCallback((_,N)=>N==null||N.filterable===!1||t.disableColumnFilter?_:[..._,"columnMenuFilterItem"],[t.disableColumnFilter]),i=v.useCallback(()=>{r(),e.current.forceUpdate()},[e,r]),a=v.useCallback(_=>{const N=Qo(e),B=[...N.items],L=B.findIndex(F=>F.id===_.id);L===-1?B.push(_):B[L]=_,e.current.setFilterModel(D({},N,{items:B}),"upsertFilterItem")},[e]),s=v.useCallback(_=>{const N=Qo(e),B=[...N.items];_.forEach(L=>{const F=B.findIndex(U=>U.id===L.id);F===-1?B.push(L):B[F]=L}),e.current.setFilterModel(D({},N,{items:B}),"upsertFilterItems")},[e]),l=v.useCallback(_=>{const N=Qo(e),B=N.items.filter(L=>L.id!==_.id);B.length!==N.items.length&&e.current.setFilterModel(D({},N,{items:B}),"deleteFilterItem")},[e]),c=v.useCallback((_,N,B)=>{if(n.debug("Displaying filter panel"),_){const L=Qo(e),F=L.items.filter(W=>{var ne;if(W.value!==void 0)return!(Array.isArray(W.value)&&W.value.length===0);const J=(ne=e.current.getColumn(W.field).filterOperators)==null?void 0:ne.find(re=>re.value===W.operator);return!(typeof(J==null?void 0:J.requiresFilterValue)>"u"?!0:J==null?void 0:J.requiresFilterValue)});let U;const V=F.find(W=>W.field===_),z=e.current.getColumn(_);V?U=F:t.disableMultipleColumnsFiltering?U=[AL({field:_,operator:z.filterOperators[0].value},e)]:U=[...F,AL({field:_,operator:z.filterOperators[0].value},e)],e.current.setFilterModel(D({},L,{items:U}))}e.current.showPreferences(Oh.filters,N,B)},[e,n,t.disableMultipleColumnsFiltering]),u=v.useCallback(()=>{n.debug("Hiding filter panel"),e.current.hidePreferences()},[e,n]),d=v.useCallback(_=>{const N=Qo(e);N.logicOperator!==_&&e.current.setFilterModel(D({},N,{logicOperator:_}),"changeLogicOperator")},[e]),f=v.useCallback(_=>{const N=Qo(e);Qg(N.quickFilterValues,_)||e.current.setFilterModel(D({},N,{quickFilterValues:[..._]}))},[e]),p=v.useCallback((_,N)=>{Qo(e)!==_&&(n.debug("Setting filter model"),e.current.updateControlState("filter",U7(_,t.disableMultipleColumnsFiltering,e),N),e.current.unstable_applyFilters())},[e,n,t.disableMultipleColumnsFiltering]),m=v.useCallback(_=>{const N=pz(_,t.disableMultipleColumnsFiltering,e),B=t.filterMode==="client"?y1t(N,e,t.disableEval):null,L=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:B,filterModel:N??Fx()});return D({},L,{filterModel:N})},[t.disableMultipleColumnsFiltering,t.filterMode,t.disableEval,e]),g={setFilterLogicOperator:d,unstable_applyFilters:i,deleteFilterItem:l,upsertFilterItem:a,upsertFilterItems:s,setFilterModel:p,showFilterPanel:c,hideFilterPanel:u,setQuickFilterValues:f,ignoreDiacritics:t.ignoreDiacritics,getFilterState:m};Qt(e,g,"public");const y=v.useCallback((_,N)=>{var F,U;const B=Qo(e);return!N.exportOnlyDirtyModels||t.filterModel!=null||((U=(F=t.initialState)==null?void 0:F.filter)==null?void 0:U.filterModel)!=null||!Qg(B,Fx())?D({},_,{filter:{filterModel:B}}):_},[e,t.filterModel,(I=(M=t.initialState)==null?void 0:M.filter)==null?void 0:I.filterModel]),b=v.useCallback((_,N)=>{var L;const B=(L=N.stateToRestore.filter)==null?void 0:L.filterModel;return B==null?_:(e.current.updateControlState("filter",U7(B,t.disableMultipleColumnsFiltering,e),"restoreState"),D({},_,{callbacks:[..._.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),x=v.useCallback((_,N)=>{var B;if(N===Oh.filters){const L=t.slots.filterPanel;return $.jsx(L,D({},(B=t.slotProps)==null?void 0:B.filterPanel))}return _},[t.slots.filterPanel,(R=t.slotProps)==null?void 0:R.filterPanel]),{getRowId:S}=t,P=Jl(wkt),E=v.useCallback(_=>{if(t.filterMode!=="client"||!_.isRowMatchingFilters)return{filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}};const N=Zd(e),B={},{isRowMatchingFilters:L}=_,F={},U={passingFilterItems:null,passingQuickFilterValues:null},V=P.current(e.current.state.rows.dataRowIdToModelLookup);for(let G=0;G{n.debug("onColUpdated - GridColumns changed, applying filters");const _=Qo(e),N=od(e),B=_.items.filter(L=>L.field&&N[L.field]);B.length<_.items.length&&e.current.setFilterModel(D({},_,{items:B}))},[e,n]),O=v.useCallback(_=>{_==="filtering"&&e.current.unstable_applyFilters()},[e]),k=v.useCallback(()=>{e.current.setState(_=>D({},_,{visibleRowsLookup:Rq(e,_)})),e.current.forceUpdate()},[e]);gt(e,"rowsSet",r),gt(e,"columnsChange",T),gt(e,"activeStrategyProcessorChange",O),gt(e,"rowExpansionChange",k),gt(e,"columnVisibilityModelChange",()=>{const _=Qo(e);_.quickFilterValues&&Sle(_)&&e.current.unstable_applyFilters()}),t1(()=>{e.current.unstable_applyFilters()}),xn(()=>{t.filterModel!==void 0&&e.current.setFilterModel(t.filterModel)},[e,n,t.filterModel])},Skt=e=>D({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),Ckt=(e,t)=>{const n=Ro(e,"useGridFocus"),r=v.useRef(null),o=e.current.rootElementRef.current!==null,i=v.useCallback((k,M)=>{k&&e.current.getRow(k.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(k.id,k.field),M)},[e]),a=v.useCallback((k,M)=>{const I=Da(e);(I==null?void 0:I.id)===k&&(I==null?void 0:I.field)===M||(e.current.setState(R=>(n.debug(`Focusing on cell with id=${k} and field=${M}`),D({},R,{tabIndex:{cell:{id:k,field:M},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:k,field:M},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.forceUpdate(),e.current.getRow(k)&&(I&&i(I,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(k,M))))},[e,n,i]),s=v.useCallback((k,M={})=>{const I=Da(e);i(I,M),e.current.setState(R=>(n.debug(`Focusing on column header with colIndex=${k}`),D({},R,{tabIndex:{columnHeader:{field:k},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:k},columnHeaderFilter:null,cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,i]),l=v.useCallback((k,M={})=>{const I=Da(e);i(I,M),e.current.setState(R=>(n.debug(`Focusing on column header filter with colIndex=${k}`),D({},R,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:k},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:k},cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,i]),c=v.useCallback((k,M,I={})=>{const R=Da(e);R&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(R.id,R.field),I),e.current.setState(_=>D({},_,{tabIndex:{columnGroupHeader:{field:k,depth:M},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:k,depth:M},columnHeader:null,columnHeaderFilter:null,cell:null}})),e.current.forceUpdate()},[e]),u=v.useCallback(()=>ZT(e),[e]),d=v.useCallback((k,M,I)=>{let R=e.current.getColumnIndex(M);const _=ho(e),N=ey(e,{pagination:t.pagination,paginationMode:t.paginationMode}),B=em(e),L=[].concat(B.top||[],N.rows,B.bottom||[]);let F=L.findIndex(W=>W.id===k);I==="right"?R+=1:I==="left"?R-=1:F+=1,R>=_.length?(F+=1,F=0&&(R=_.length-1)),F=$c(F,0,L.length-1);const U=L[F];if(!U)return;const V=e.current.unstable_getCellColSpanInfo(U.id,R);V&&V.spannedByColSpan&&(I==="left"||I==="below"?R=V.leftVisibleCellIndex:I==="right"&&(R=V.rightVisibleCellIndex)),R=$c(R,0,_.length-1);const z=_[R];e.current.setCellFocus(U.id,z.field)},[e,t.pagination,t.paginationMode]),f=v.useCallback(({id:k,field:M})=>{e.current.setCellFocus(k,M)},[e]),p=v.useCallback((k,M)=>{M.key==="Enter"||M.key==="Tab"||M.key==="Shift"||nO(M.key)||e.current.setCellFocus(k.id,k.field)},[e]),m=v.useCallback(({field:k},M)=>{M.target===M.currentTarget&&e.current.setColumnHeaderFocus(k,M)},[e]),g=v.useCallback(({fields:k,depth:M},I)=>{if(I.target!==I.currentTarget)return;const R=ZT(e);R!==null&&R.depth===M&&k.includes(R.field)||e.current.setColumnGroupHeaderFocus(k[0],M,I)},[e]),y=v.useCallback((k,M)=>{var I,R;(R=(I=M.relatedTarget)==null?void 0:I.getAttribute("class"))!=null&&R.includes(ae.columnHeader)||(n.debug("Clearing focus"),e.current.setState(_=>D({},_,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[n,e]),b=v.useCallback(k=>{r.current=k},[]),x=v.useCallback(k=>{const M=r.current;r.current=null;const I=Da(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:k,cell:M}))return;if(!I){M&&e.current.setCellFocus(M.id,M.field);return}if((M==null?void 0:M.id)===I.id&&(M==null?void 0:M.field)===I.field)return;const _=e.current.getCellElement(I.id,I.field);_!=null&&_.contains(k.target)||(M?e.current.setCellFocus(M.id,M.field):(e.current.setState(N=>D({},N,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),e.current.forceUpdate(),i(I,k)))},[e,i]),S=v.useCallback(k=>{if(k.cellMode==="view")return;const M=Da(e);((M==null?void 0:M.id)!==k.id||(M==null?void 0:M.field)!==k.field)&&e.current.setCellFocus(k.id,k.field)},[e]),P=v.useCallback(()=>{var M;const k=Da(e);if(k&&!e.current.getRow(k.id)){const I=(M=Da(e))==null?void 0:M.id;let R=null;if(typeof I<"u"){const _=e.current.getRowIndexRelativeToVisibleRows(I),N=ey(e,{pagination:t.pagination,paginationMode:t.paginationMode}),B=N.rows[$c(_,0,N.rows.length-1)];R=(B==null?void 0:B.id)??null}e.current.setState(_=>D({},_,{focus:{cell:R===null?null:{id:R,field:k.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[e,t.pagination,t.paginationMode]),E=Ze(()=>{const k=Da(e);if(!k)return;const M=ey(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(M.rows.find(_=>_.id===k.id))return;const R=ho(e);e.current.setState(_=>D({},_,{tabIndex:{cell:{id:M.rows[0].id,field:R[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),T={setCellFocus:a,setColumnHeaderFocus:s,setColumnHeaderFilterFocus:l},O={moveFocusToRelativeCell:d,setColumnGroupHeaderFocus:c,getColumnGroupHeaderFocus:u};Qt(e,T,"public"),Qt(e,O,"private"),v.useEffect(()=>{const k=mr(e.current.rootElementRef.current);return k.addEventListener("mouseup",x),()=>{k.removeEventListener("mouseup",x)}},[e,o,x]),gt(e,"columnHeaderBlur",y),gt(e,"cellDoubleClick",f),gt(e,"cellMouseDown",b),gt(e,"cellKeyDown",p),gt(e,"cellModeChange",S),gt(e,"columnHeaderFocus",m),gt(e,"columnGroupHeaderFocus",g),gt(e,"rowsSet",P),gt(e,"paginationModelChange",E)},Pkt=e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null},Ekt=e=>e===Ile||Pkt(e)!==null;function Tkt(e,t){const n=em(e)||{};return[...n.top||[],...t,...n.bottom||[]]}const vR=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(et)return e-1;return null},bR=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(e>t)return e-1}else if(!r&&e=0&&a{const n=Ro(e,"useGridKeyboardNavigation"),r=tm(e,t).rows,o=nr(),i=t.unstable_listView,a=v.useMemo(()=>Tkt(e,r),[e,r]),s=t.signature!=="DataGrid"&&t.headerFilters,l=v.useCallback((x,S,P="left",E="up")=>{const T=qf(e),O=e.current.unstable_getCellColSpanInfo(S,x);O&&O.spannedByColSpan&&(P==="left"?x=O.leftVisibleCellIndex:P==="right"&&(x=O.rightVisibleCellIndex));const k=i?uv(e.current.state).field:lb(e)[x],M=Okt(e,S,k,E),I=T.findIndex(R=>R.id===M);n.debug(`Navigating to cell row ${I}, col ${x}`),e.current.scrollToIndexes({colIndex:x,rowIndex:I}),e.current.setCellFocus(M,k)},[e,n,i]),c=v.useCallback((x,S)=>{n.debug(`Navigating to header col ${x}`),e.current.scrollToIndexes({colIndex:x});const P=e.current.getVisibleColumns()[x].field;e.current.setColumnHeaderFocus(P,S)},[e,n]),u=v.useCallback((x,S)=>{n.debug(`Navigating to header filter col ${x}`),e.current.scrollToIndexes({colIndex:x});const P=e.current.getVisibleColumns()[x].field;e.current.setColumnHeaderFilterFocus(P,S)},[e,n]),d=v.useCallback((x,S,P)=>{n.debug(`Navigating to header col ${x}`),e.current.scrollToIndexes({colIndex:x});const{field:E}=e.current.getVisibleColumns()[x];e.current.setColumnGroupHeaderFocus(E,S,P)},[e,n]),f=v.useCallback(x=>{var S;return(S=a[x])==null?void 0:S.id},[a]),p=v.useCallback((x,S)=>{const P=S.currentTarget.querySelector(`.${ae.columnHeaderTitleContainerContent}`);if(!!P&&P.contains(S.target)&&x.field!==fb.field)return;const T=e.current.getViewportPageSize(),O=x.field?e.current.getColumnIndex(x.field):0,k=a.length>0?0:null,M=a.length-1,I=0,R=ho(e).length-1,_=n1(e);let N=!0;switch(S.key){case"ArrowDown":{k!==null&&(s?u(O,S):l(O,f(k)));break}case"ArrowRight":{const B=bR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});B!==null&&c(B,S);break}case"ArrowLeft":{const B=vR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});B!==null&&c(B,S);break}case"ArrowUp":{_>0&&d(O,_-1,S);break}case"PageDown":{k!==null&&M!==null&&l(O,f(Math.min(k+T,M)));break}case"Home":{c(I,S);break}case"End":{c(R,S);break}case"Enter":{(S.ctrlKey||S.metaKey)&&e.current.toggleColumnMenu(x.field);break}case" ":break;default:N=!1}N&&S.preventDefault()},[e,a.length,s,u,l,f,o,c,d]),m=v.useCallback((x,S)=>{const P=sPt(e)===x.field,E=lPt(e)===x.field;if(P||E||!nO(S.key))return;const T=e.current.getViewportPageSize(),O=x.field?e.current.getColumnIndex(x.field):0,k=0,M=a.length-1,I=0,R=ho(e).length-1;let _=!0;switch(S.key){case"ArrowDown":{const N=f(k);N!=null&&l(O,N);break}case"ArrowRight":{const N=bR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});N!==null&&u(N,S);break}case"ArrowLeft":{const N=vR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});N!==null?u(N,S):e.current.setColumnHeaderFilterFocus(x.field,S);break}case"ArrowUp":{c(O,S);break}case"PageDown":{M!==null&&l(O,f(Math.min(k+T,M)));break}case"Home":{u(I,S);break}case"End":{u(R,S);break}case" ":break;default:_=!1}_&&S.preventDefault()},[e,a.length,u,o,c,l,f]),g=v.useCallback((x,S)=>{const P=ZT(e);if(P===null)return;const{field:E,depth:T}=P,{fields:O,depth:k,maxDepth:M}=x,I=e.current.getViewportPageSize(),R=e.current.getColumnIndex(E),_=E?e.current.getColumnIndex(E):0,N=0,B=a.length-1,L=0,F=ho(e).length-1;let U=!0;switch(S.key){case"ArrowDown":{k===M-1?c(R,S):d(R,T+1,S);break}case"ArrowUp":{k>0&&d(R,T-1,S);break}case"ArrowRight":{const V=O.length-O.indexOf(E)-1;R+V+1<=F&&d(R+V+1,T,S);break}case"ArrowLeft":{const V=O.indexOf(E);R-V-1>=L&&d(R-V-1,T,S);break}case"PageDown":{B!==null&&l(_,f(Math.min(N+I,B)));break}case"Home":{d(L,T,S);break}case"End":{d(F,T,S);break}case" ":break;default:U=!1}U&&S.preventDefault()},[e,a.length,c,d,l,f]),y=v.useCallback((x,S)=>{if(r1(S))return;const P=e.current.getCellParams(x.id,x.field);if(P.cellMode===Zn.Edit||!nO(S.key)||!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:S,cell:P})||a.length===0)return;const T=e.current.getViewportPageSize(),O=i?()=>0:e.current.getColumnIndex,k=x.field?O(x.field):0,M=a.findIndex(F=>F.id===x.id),I=0,R=a.length-1,_=0,B=(i?[uv(e.current.state)]:ho(e)).length-1;let L=!0;switch(S.key){case"ArrowDown":{MI?l(k,f(M-1)):s?u(k,S):c(k,S);break}case"ArrowRight":{const F=bR({currentColIndex:k,firstColIndex:_,lastColIndex:B,isRtl:o});F!==null&&l(F,f(M),o?"left":"right");break}case"ArrowLeft":{const F=vR({currentColIndex:k,firstColIndex:_,lastColIndex:B,isRtl:o});F!==null&&l(F,f(M),o?"right":"left");break}case"Tab":{S.shiftKey&&k>_?l(k-1,f(M),"left"):!S.shiftKey&&k=I?l(k,f(F)):c(k,S);break}case"Home":{S.ctrlKey||S.metaKey||S.shiftKey?l(_,f(I)):l(_,f(M));break}case"End":{S.ctrlKey||S.metaKey||S.shiftKey?l(B,f(R)):l(B,f(M));break}default:L=!1}L&&S.preventDefault()},[e,a,o,l,f,s,u,c,i]),b=v.useCallback((x,{event:S})=>S.key===" "?!1:x,[]);Ar(e,"canStartEditing",b),gt(e,"columnHeaderKeyDown",p),gt(e,"headerFilterKeyDown",m),gt(e,"columnGroupHeaderKeyDown",g),gt(e,"cellKeyDown",y)},kkt=(e,t)=>{var m,g;const n=Ro(e,"useGridRowCount"),r=Ye(e,vz),o=Ye(e,kg),i=Ye(e,L0),a=Ye(e,Di),s=Jl(()=>Di(e).pageSize);e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:kg,changeEvent:"rowCountChange"});const c={setRowCount:v.useCallback(y=>{o!==y&&(n.debug("Setting 'rowCount' to",y),e.current.setState(b=>D({},b,{pagination:D({},b.pagination,{rowCount:y})})))},[e,n,o])};Qt(e,c,"public");const u=v.useCallback((y,b)=>{var P,E;const x=kg(e);return!b.exportOnlyDirtyModels||t.rowCount!=null||((E=(P=t.initialState)==null?void 0:P.pagination)==null?void 0:E.rowCount)!=null?D({},y,{pagination:D({},y.pagination,{rowCount:x})}):y},[e,t.rowCount,(g=(m=t.initialState)==null?void 0:m.pagination)==null?void 0:g.rowCount]),d=v.useCallback((y,b)=>{var S;const x=(S=b.stateToRestore.pagination)!=null&&S.rowCount?b.stateToRestore.pagination.rowCount:kg(e);return e.current.setState(P=>D({},P,{pagination:D({},P.pagination,{rowCount:x})})),y},[e]);Ar(e,"exportState",u),Ar(e,"restoreState",d);const f=v.useCallback(y=>{t.paginationMode==="client"||!s.current||y.pageSize!==s.current&&(s.current=y.pageSize,o===-1&&e.current.setPage(0))},[t.paginationMode,s,o,e]);gt(e,"paginationModelChange",f),v.useEffect(()=>{t.paginationMode==="client"?e.current.setRowCount(r):t.rowCount!=null&&e.current.setRowCount(t.rowCount)},[e,t.paginationMode,r,t.rowCount]);const p=i.hasNextPage===!1;v.useEffect(()=>{p&&o===-1&&e.current.setRowCount(a.pageSize*a.page+r)},[e,r,p,o,a])},Mkt=(e,t)=>{var l,c;const n=Ro(e,"useGridPaginationMeta"),r=Ye(e,L0);e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:L0,changeEvent:"paginationMetaChange"});const i={setPaginationMeta:v.useCallback(u=>{r!==u&&(n.debug("Setting 'paginationMeta' to",u),e.current.setState(d=>D({},d,{pagination:D({},d.pagination,{meta:u})})))},[e,n,r])};Qt(e,i,"public");const a=v.useCallback((u,d)=>{var m,g;const f=L0(e);return!d.exportOnlyDirtyModels||t.paginationMeta!=null||((g=(m=t.initialState)==null?void 0:m.pagination)==null?void 0:g.meta)!=null?D({},u,{pagination:D({},u.pagination,{meta:f})}):u},[e,t.paginationMeta,(c=(l=t.initialState)==null?void 0:l.pagination)==null?void 0:c.meta]),s=v.useCallback((u,d)=>{var p;const f=(p=d.stateToRestore.pagination)!=null&&p.meta?d.stateToRestore.pagination.meta:L0(e);return e.current.setState(m=>D({},m,{pagination:D({},m.pagination,{meta:f})})),u},[e]);Ar(e,"exportState",a),Ar(e,"restoreState",s),v.useEffect(()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)},[e,t.paginationMeta])},Akt=(e,t)=>{var i,a,s,l,c,u;const n=D({},Fle(t.autoPageSize),t.paginationModel??((a=(i=t.initialState)==null?void 0:i.pagination)==null?void 0:a.paginationModel));jle(n.pageSize,t.signature);const r=t.rowCount??((l=(s=t.initialState)==null?void 0:s.pagination)==null?void 0:l.rowCount),o=t.paginationMeta??((u=(c=t.initialState)==null?void 0:c.pagination)==null?void 0:u.meta)??{};return D({},e,{pagination:{paginationModel:n,rowCount:r,meta:o}})},$kt=(e,t)=>{Mkt(e,t),hkt(e,t),kkt(e,t)},Rkt=(e,t)=>{var n;return D({},e,{preferencePanel:((n=t.initialState)==null?void 0:n.preferencePanel)??{open:!1}})},Dkt=(e,t)=>{var d;const n=Ro(e,"useGridPreferencesPanel"),r=v.useRef(),o=v.useRef(),i=v.useCallback(()=>{n.debug("Hiding Preferences Panel");const f=Bx(e.current.state);f.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:f.openedPanelValue}),e.current.setState(p=>D({},p,{preferencePanel:{open:!1}})),e.current.forceUpdate()},[e,n]),a=v.useCallback(()=>{o.current=setTimeout(()=>clearTimeout(r.current),0)},[]),s=v.useCallback(()=>{r.current=setTimeout(i,100)},[i]),l=v.useCallback((f,p,m)=>{n.debug("Opening Preferences Panel"),a(),e.current.setState(g=>D({},g,{preferencePanel:D({},g.preferencePanel,{open:!0,openedPanelValue:f,panelId:p,labelId:m})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:f}),e.current.forceUpdate()},[n,a,e]);Qt(e,{showPreferences:l,hidePreferences:s},"public");const c=v.useCallback((f,p)=>{var y;const m=Bx(e.current.state);return!p.exportOnlyDirtyModels||((y=t.initialState)==null?void 0:y.preferencePanel)!=null||m.open?D({},f,{preferencePanel:m}):f},[e,(d=t.initialState)==null?void 0:d.preferencePanel]),u=v.useCallback((f,p)=>{const m=p.stateToRestore.preferencePanel;return m!=null&&e.current.setState(g=>D({},g,{preferencePanel:m})),f},[e]);Ar(e,"exportState",c),Ar(e,"restoreState",u),v.useEffect(()=>()=>{clearTimeout(r.current),clearTimeout(o.current)},[])},NL=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;case"string":default:return""}},_kt=["id","field"],Lkt=["id","field"],Nkt=(e,t)=>{const[n,r]=v.useState({}),o=v.useRef(n),i=v.useRef({}),{processRowUpdate:a,onProcessRowUpdateError:s,cellModesModel:l,onCellModesModelChange:c}=t,u=L=>(...F)=>{t.editMode===Fc.Cell&&L(...F)},d=v.useCallback((L,F)=>{const U=e.current.getCellParams(L,F);if(!e.current.isCellEditable(U))throw new Error(`MUI X: The cell with id=${L} and field=${F} is not editable.`)},[e]),f=v.useCallback((L,F,U)=>{if(e.current.getCellMode(L,F)!==U)throw new Error(`MUI X: The cell with id=${L} and field=${F} is not in ${U} mode.`)},[e]),p=v.useCallback((L,F)=>{if(!L.isEditable||L.cellMode===Zn.Edit)return;const U=D({},L,{reason:lu.cellDoubleClick});e.current.publishEvent("cellEditStart",U,F)},[e]),m=v.useCallback((L,F)=>{if(L.cellMode===Zn.View||e.current.getCellMode(L.id,L.field)===Zn.View)return;const U=D({},L,{reason:Tl.cellFocusOut});e.current.publishEvent("cellEditStop",U,F)},[e]),g=v.useCallback((L,F)=>{if(L.cellMode===Zn.Edit){if(F.which===229)return;let U;if(F.key==="Escape"?U=Tl.escapeKeyDown:F.key==="Enter"?U=Tl.enterKeyDown:F.key==="Tab"&&(U=F.shiftKey?Tl.shiftTabKeyDown:Tl.tabKeyDown,F.preventDefault()),U){const V=D({},L,{reason:U});e.current.publishEvent("cellEditStop",V,F)}}else if(L.isEditable){let U;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:F,cellParams:L,editMode:"cell"}))return;if(pce(F)?U=lu.printableKeyDown:mce(F)?U=lu.pasteKeyDown:F.key==="Enter"?U=lu.enterKeyDown:(F.key==="Backspace"||F.key==="Delete")&&(U=lu.deleteKeyDown),U){const z=D({},L,{reason:U,key:F.key});e.current.publishEvent("cellEditStart",z,F)}}},[e]),y=v.useCallback(L=>{const{id:F,field:U,reason:V}=L,z={id:F,field:U};(V===lu.printableKeyDown||V===lu.deleteKeyDown||V===lu.pasteKeyDown)&&(z.deleteValue=!0),e.current.startCellEditMode(z)},[e]),b=v.useCallback(L=>{const{id:F,field:U,reason:V}=L;e.current.runPendingEditCellValueMutation(F,U);let z;V===Tl.enterKeyDown?z="below":V===Tl.tabKeyDown?z="right":V===Tl.shiftTabKeyDown&&(z="left");const W=V==="escapeKeyDown";e.current.stopCellEditMode({id:F,field:U,ignoreModifications:W,cellToFocusAfter:z})},[e]),x=L=>async(...F)=>{var U;if(L){const{id:V,field:z}=F[0];((U=e.current.state.editRows[V][z])==null?void 0:U.error)||L(...F)}};gt(e,"cellDoubleClick",u(p)),gt(e,"cellFocusOut",u(m)),gt(e,"cellKeyDown",u(g)),gt(e,"cellEditStart",u(y)),gt(e,"cellEditStop",u(b)),lr(e,"cellEditStart",t.onCellEditStart),lr(e,"cellEditStop",x(t.onCellEditStop));const S=v.useCallback((L,F)=>{const U=jo(e.current.state);return U[L]&&U[L][F]?Zn.Edit:Zn.View},[e]),P=Ze(L=>{const F=L!==t.cellModesModel;c&&F&&c(L,{api:e.current}),!(t.cellModesModel&&F)&&(r(L),o.current=L,e.current.publishEvent("cellModesModelChange",L))}),E=v.useCallback((L,F,U)=>{const V=D({},o.current);if(U!==null)V[L]=D({},V[L],{[F]:D({},U)});else{const z=V[L],W=Ue(z,[F].map(sv));V[L]=W,Object.keys(V[L]).length===0&&delete V[L]}P(V)},[P]),T=v.useCallback((L,F,U)=>{e.current.setState(V=>{const z=D({},V.editRows);return U!==null?z[L]=D({},z[L],{[F]:D({},U)}):(delete z[L][F],Object.keys(z[L]).length===0&&delete z[L]),D({},V,{editRows:z})}),e.current.forceUpdate()},[e]),O=v.useCallback(L=>{const{id:F,field:U}=L,V=Ue(L,_kt);d(F,U),f(F,U,Zn.View),E(F,U,D({mode:Zn.Edit},V))},[d,f,E]),k=Ze(async L=>{const{id:F,field:U,deleteValue:V,initialValue:z}=L,W=e.current.getCellValue(F,U);let G=W;V?G=NL(e.current.getColumn(U)):z&&(G=z);const J=e.current.getColumn(U),K=!!J.preProcessEditCellProps&&V;let ne={value:G,error:!1,isProcessingProps:K};if(T(F,U,ne),e.current.setCellFocus(F,U),K&&(ne=await Promise.resolve(J.preProcessEditCellProps({id:F,row:e.current.getRow(F),props:ne,hasChanged:G!==W})),e.current.getCellMode(F,U)===Zn.Edit)){const re=jo(e.current.state);T(F,U,D({},ne,{value:re[F][U].value,isProcessingProps:!1}))}}),M=v.useCallback(L=>{const{id:F,field:U}=L,V=Ue(L,Lkt);f(F,U,Zn.Edit),E(F,U,D({mode:Zn.View},V))},[f,E]),I=Ze(async L=>{const{id:F,field:U,ignoreModifications:V,cellToFocusAfter:z="none"}=L;f(F,U,Zn.Edit),e.current.runPendingEditCellValueMutation(F,U);const W=()=>{T(F,U,null),E(F,U,null),z!=="none"&&e.current.moveFocusToRelativeCell(F,U,z)};if(V){W();return}const G=jo(e.current.state),{error:J,isProcessingProps:K}=G[F][U];if(J||K){i.current[F][U].mode=Zn.Edit,E(F,U,{mode:Zn.Edit});return}const ne=e.current.getRowWithUpdatedValuesFromCellEditing(F,U);if(a){const re=oe=>{i.current[F][U].mode=Zn.Edit,E(F,U,{mode:Zn.Edit}),s&&s(oe)};try{const oe=e.current.getRow(F);Promise.resolve(a(ne,oe,{rowId:F})).then(fe=>{e.current.updateRows([fe]),W()}).catch(re)}catch(oe){re(oe)}}else e.current.updateRows([ne]),W()}),R=v.useCallback(async L=>{var oe,fe;const{id:F,field:U,value:V,debounceMs:z,unstable_skipValueParser:W}=L;d(F,U),f(F,U,Zn.Edit);const G=e.current.getColumn(U),J=e.current.getRow(F);let K=V;G.valueParser&&!W&&(K=G.valueParser(V,J,G,e));let ne=jo(e.current.state),re=D({},ne[F][U],{value:K,changeReason:z?"debouncedSetEditCellValue":"setEditCellValue"});if(G.preProcessEditCellProps){const se=V!==ne[F][U].value;re=D({},re,{isProcessingProps:!0}),T(F,U,re),re=await Promise.resolve(G.preProcessEditCellProps({id:F,row:J,props:re,hasChanged:se}))}return e.current.getCellMode(F,U)===Zn.View?!1:(ne=jo(e.current.state),re=D({},re,{isProcessingProps:!1}),re.value=G.preProcessEditCellProps?ne[F][U].value:K,T(F,U,re),ne=jo(e.current.state),!((fe=(oe=ne[F])==null?void 0:oe[U])!=null&&fe.error))},[e,d,f,T]),_=v.useCallback((L,F)=>{const U=e.current.getColumn(F),V=jo(e.current.state),z=e.current.getRow(L);if(!V[L]||!V[L][F])return e.current.getRow(L);const{value:W}=V[L][F];return U.valueSetter?U.valueSetter(W,z,U,e):D({},z,{[F]:W})},[e]),N={getCellMode:S,startCellEditMode:O,stopCellEditMode:M},B={setCellEditingEditCellValue:R,getRowWithUpdatedValuesFromCellEditing:_};Qt(e,N,"public"),Qt(e,B,"private"),v.useEffect(()=>{l&&P(l)},[l,P]),xn(()=>{const L=JT(e),F=i.current;i.current=yle(n),Object.entries(n).forEach(([U,V])=>{Object.entries(V).forEach(([z,W])=>{var K,ne;const G=((ne=(K=F[U])==null?void 0:K[z])==null?void 0:ne.mode)||Zn.View,J=L[U]??U;W.mode===Zn.Edit&&G===Zn.View?k(D({id:J,field:z},W)):W.mode===Zn.View&&G===Zn.Edit&&I(D({id:J,field:z},W))})})},[e,n,k,I])},Fkt=["id"],jkt=["id"],Bkt=(e,t)=>{const[n,r]=v.useState({}),o=v.useRef(n),i=v.useRef({}),a=v.useRef(),s=v.useRef(null),{processRowUpdate:l,onProcessRowUpdateError:c,rowModesModel:u,onRowModesModelChange:d}=t,f=z=>(...W)=>{t.editMode===Fc.Row&&z(...W)},p=v.useCallback((z,W)=>{const G=e.current.getCellParams(z,W);if(!e.current.isCellEditable(G))throw new Error(`MUI X: The cell with id=${z} and field=${W} is not editable.`)},[e]),m=v.useCallback((z,W)=>{if(e.current.getRowMode(z)!==W)throw new Error(`MUI X: The row with id=${z} is not in ${W} mode.`)},[e]),g=v.useCallback(z=>{const W=jo(e.current.state);return Object.values(W[z]).some(G=>G.error)},[e]),y=v.useCallback((z,W)=>{if(!z.isEditable||e.current.getRowMode(z.id)===Vn.Edit)return;const G=e.current.getRowParams(z.id),J=D({},G,{field:z.field,reason:Ed.cellDoubleClick});e.current.publishEvent("rowEditStart",J,W)},[e]),b=v.useCallback(z=>{s.current=z},[]),x=v.useCallback((z,W)=>{z.isEditable&&e.current.getRowMode(z.id)!==Vn.View&&(s.current=null,a.current=setTimeout(()=>{var G;if(((G=s.current)==null?void 0:G.id)!==z.id){if(!e.current.getRow(z.id)||e.current.getRowMode(z.id)===Vn.View||g(z.id))return;const J=e.current.getRowParams(z.id),K=D({},J,{field:z.field,reason:Pl.rowFocusOut});e.current.publishEvent("rowEditStop",K,W)}}))},[e,g]);v.useEffect(()=>()=>{clearTimeout(a.current)},[]);const S=v.useCallback((z,W)=>{if(z.cellMode===Vn.Edit){if(W.which===229)return;let G;if(W.key==="Escape")G=Pl.escapeKeyDown;else if(W.key==="Enter")G=Pl.enterKeyDown;else if(W.key==="Tab"){const J=lb(e).filter(K=>e.current.getColumn(K).type===Vk?!0:e.current.isCellEditable(e.current.getCellParams(z.id,K)));if(W.shiftKey?z.field===J[0]&&(G=Pl.shiftTabKeyDown):z.field===J[J.length-1]&&(G=Pl.tabKeyDown),W.preventDefault(),!G){const K=J.findIndex(re=>re===z.field),ne=J[W.shiftKey?K-1:K+1];e.current.setCellFocus(z.id,ne)}}if(G){if(G!==Pl.escapeKeyDown&&g(z.id))return;const J=D({},e.current.getRowParams(z.id),{reason:G,field:z.field});e.current.publishEvent("rowEditStop",J,W)}}else if(z.isEditable){let G;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:W,cellParams:z,editMode:"row"}))return;if(pce(W)||mce(W)?G=Ed.printableKeyDown:W.key==="Enter"?G=Ed.enterKeyDown:(W.key==="Backspace"||W.key==="Delete")&&(G=Ed.deleteKeyDown),G){const K=e.current.getRowParams(z.id),ne=D({},K,{field:z.field,reason:G});e.current.publishEvent("rowEditStart",ne,W)}}},[e,g]),P=v.useCallback(z=>{const{id:W,field:G,reason:J}=z,K={id:W,fieldToFocus:G};(J===Ed.printableKeyDown||J===Ed.deleteKeyDown)&&(K.deleteValue=!!G),e.current.startRowEditMode(K)},[e]),E=v.useCallback(z=>{const{id:W,reason:G,field:J}=z;e.current.runPendingEditCellValueMutation(W);let K;G===Pl.enterKeyDown?K="below":G===Pl.tabKeyDown?K="right":G===Pl.shiftTabKeyDown&&(K="left");const ne=G==="escapeKeyDown";e.current.stopRowEditMode({id:W,ignoreModifications:ne,field:J,cellToFocusAfter:K})},[e]);gt(e,"cellDoubleClick",f(y)),gt(e,"cellFocusIn",f(b)),gt(e,"cellFocusOut",f(x)),gt(e,"cellKeyDown",f(S)),gt(e,"rowEditStart",f(P)),gt(e,"rowEditStop",f(E)),lr(e,"rowEditStart",t.onRowEditStart),lr(e,"rowEditStop",t.onRowEditStop);const T=v.useCallback(z=>{if(t.editMode===Fc.Cell)return Vn.View;const W=jo(e.current.state);return W[z]&&Object.keys(W[z]).length>0?Vn.Edit:Vn.View},[e,t.editMode]),O=Ze(z=>{const W=z!==t.rowModesModel;d&&W&&d(z,{api:e.current}),!(t.rowModesModel&&W)&&(r(z),o.current=z,e.current.publishEvent("rowModesModelChange",z))}),k=v.useCallback((z,W)=>{const G=D({},o.current);W!==null?G[z]=D({},W):delete G[z],O(G)},[O]),M=v.useCallback((z,W)=>{e.current.setState(G=>{const J=D({},G.editRows);return W!==null?J[z]=W:delete J[z],D({},G,{editRows:J})}),e.current.forceUpdate()},[e]),I=v.useCallback((z,W,G)=>{e.current.setState(J=>{const K=D({},J.editRows);return G!==null?K[z]=D({},K[z],{[W]:D({},G)}):(delete K[z][W],Object.keys(K[z]).length===0&&delete K[z]),D({},J,{editRows:K})}),e.current.forceUpdate()},[e]),R=v.useCallback(z=>{const{id:W}=z,G=Ue(z,Fkt);m(W,Vn.View),k(W,D({mode:Vn.Edit},G))},[m,k]),_=Ze(z=>{const{id:W,fieldToFocus:G,deleteValue:J,initialValue:K}=z,ne=Iu(e),re=ne.reduce((oe,fe)=>{if(!e.current.getCellParams(W,fe).isEditable)return oe;const ee=e.current.getColumn(fe);let ce=e.current.getCellValue(W,fe);return G===fe&&(J||K)&&(J?ce=NL(ee):K&&(ce=K)),oe[fe]={value:ce,error:!1,isProcessingProps:!!ee.preProcessEditCellProps&&J},oe},{});M(W,re),G&&e.current.setCellFocus(W,G),ne.filter(oe=>!!e.current.getColumn(oe).preProcessEditCellProps&&J).forEach(oe=>{const fe=e.current.getColumn(oe),se=e.current.getCellValue(W,oe),ee=J?NL(fe):K??se;Promise.resolve(fe.preProcessEditCellProps({id:W,row:e.current.getRow(W),props:re[oe],hasChanged:ee!==se})).then(ce=>{if(e.current.getRowMode(W)===Vn.Edit){const le=jo(e.current.state);I(W,oe,D({},ce,{value:le[W][oe].value,isProcessingProps:!1}))}})})}),N=v.useCallback(z=>{const{id:W}=z,G=Ue(z,jkt);m(W,Vn.Edit),k(W,D({mode:Vn.View},G))},[m,k]),B=Ze(z=>{const{id:W,ignoreModifications:G,field:J,cellToFocusAfter:K="none"}=z;e.current.runPendingEditCellValueMutation(W);const ne=()=>{K!=="none"&&J&&e.current.moveFocusToRelativeCell(W,J,K),M(W,null),k(W,null)};if(G){ne();return}const re=jo(e.current.state),oe=e.current.getRow(W);if(Object.values(re[W]).some(ee=>ee.isProcessingProps)){i.current[W].mode=Vn.Edit;return}if(g(W)){i.current[W].mode=Vn.Edit,k(W,{mode:Vn.Edit});return}const se=e.current.getRowWithUpdatedValuesFromRowEditing(W);if(l){const ee=ce=>{i.current[W].mode=Vn.Edit,k(W,{mode:Vn.Edit}),c&&c(ce)};try{Promise.resolve(l(se,oe,{rowId:W})).then(ce=>{e.current.updateRows([ce]),ne()}).catch(ee)}catch(ce){ee(ce)}}else e.current.updateRows([se]),ne()}),L=v.useCallback(z=>{const{id:W,field:G,value:J,debounceMs:K,unstable_skipValueParser:ne}=z;p(W,G);const re=e.current.getColumn(G),oe=e.current.getRow(W);let fe=J;re.valueParser&&!ne&&(fe=re.valueParser(J,oe,re,e));let se=jo(e.current.state),ee=D({},se[W][G],{value:fe,changeReason:K?"debouncedSetEditCellValue":"setEditCellValue"});return re.preProcessEditCellProps||I(W,G,ee),new Promise(ce=>{const le=[];if(re.preProcessEditCellProps){const Q=ee.value!==se[W][G].value;ee=D({},ee,{isProcessingProps:!0}),I(W,G,ee);const ue=se[W],ge=Ue(ue,[G].map(sv)),xe=Promise.resolve(re.preProcessEditCellProps({id:W,row:oe,props:ee,hasChanged:Q,otherFieldsProps:ge})).then(me=>{if(e.current.getRowMode(W)===Vn.View){ce(!1);return}se=jo(e.current.state),me=D({},me,{isProcessingProps:!1}),me.value=re.preProcessEditCellProps?se[W][G].value:fe,I(W,G,me)});le.push(xe)}Object.entries(se[W]).forEach(([Q,ue])=>{if(Q===G)return;const ge=e.current.getColumn(Q);if(!ge.preProcessEditCellProps)return;ue=D({},ue,{isProcessingProps:!0}),I(W,Q,ue),se=jo(e.current.state);const xe=se[W],me=Ue(xe,[Q].map(sv)),be=Promise.resolve(ge.preProcessEditCellProps({id:W,row:oe,props:ue,hasChanged:!1,otherFieldsProps:me})).then(we=>{if(e.current.getRowMode(W)===Vn.View){ce(!1);return}we=D({},we,{isProcessingProps:!1}),I(W,Q,we)});le.push(be)}),Promise.all(le).then(()=>{e.current.getRowMode(W)===Vn.Edit?(se=jo(e.current.state),ce(!se[W][G].error)):ce(!1)})})},[e,p,I]),F=v.useCallback(z=>{const W=jo(e.current.state),G=e.current.getRow(z);if(!W[z])return e.current.getRow(z);let J=D({},G);return Object.entries(W[z]).forEach(([K,ne])=>{const re=e.current.getColumn(K);re.valueSetter?J=re.valueSetter(ne.value,J,re,e):J[K]=ne.value}),J},[e]),U={getRowMode:T,startRowEditMode:R,stopRowEditMode:N},V={setRowEditingEditCellValue:L,getRowWithUpdatedValuesFromRowEditing:F};Qt(e,U,"public"),Qt(e,V,"private"),v.useEffect(()=>{u&&O(u)},[u,O]),xn(()=>{const z=JT(e),W=i.current;i.current=yle(n);const G=new Set([...Object.keys(n),...Object.keys(W)]);Array.from(G).forEach(J=>{var oe;const K=n[J]??{mode:Vn.View},ne=((oe=W[J])==null?void 0:oe.mode)||Vn.View,re=z[J]??J;K.mode===Vn.Edit&&ne===Vn.View?_(D({id:re},K)):K.mode===Vn.View&&ne===Vn.Edit&&B(D({id:re},K))})},[e,n,_,B])},zkt=e=>D({},e,{editRows:{}}),Vkt=(e,t)=>{Nkt(e,t),Bkt(e,t);const n=v.useRef({}),{isCellEditable:r}=t,o=v.useCallback(f=>lv(f.rowNode)||!f.colDef.editable||!f.colDef.renderEditCell?!1:r?r(f):!0,[r]),i=(f,p,m,g)=>{if(!m){g();return}if(n.current[f]||(n.current[f]={}),n.current[f][p]){const[x]=n.current[f][p];clearTimeout(x)}const y=()=>{const[x]=n.current[f][p];clearTimeout(x),g(),delete n.current[f][p]},b=setTimeout(()=>{g(),delete n.current[f][p]},m);n.current[f][p]=[b,y]};v.useEffect(()=>{const f=n.current;return()=>{Object.entries(f).forEach(([p,m])=>{Object.keys(m).forEach(g=>{const[y]=f[p][g];clearTimeout(y),delete f[p][g]})})}},[]);const a=v.useCallback((f,p)=>{if(n.current[f]){if(!p)Object.keys(n.current[f]).forEach(m=>{const[,g]=n.current[f][m];g()});else if(n.current[f][p]){const[,m]=n.current[f][p];m()}}},[]),s=v.useCallback(f=>{const{id:p,field:m,debounceMs:g}=f;return new Promise(y=>{i(p,m,g,async()=>{const b=t.editMode===Fc.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(p,m)===Zn.Edit){const x=await b(f);y(x)}})})},[e,t.editMode]),l=v.useCallback((f,p)=>t.editMode===Fc.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(f,p):e.current.getRowWithUpdatedValuesFromRowEditing(f),[e,t.editMode]),c=v.useCallback((f,p)=>{var g;return((g=jo(e.current.state)[f])==null?void 0:g[p])??null},[e]),u={isCellEditable:o,setEditCellValue:s,getRowWithUpdatedValues:l,unstable_getEditCellMeta:c},d={runPendingEditCellValueMutation:a};Qt(e,u,"public"),Qt(e,d,"private")},Hkt=(e,t,n)=>{const r=!!t.unstable_dataSource;return n.current.caches.rows=LP({rows:r?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),D({},e,{rows:Ele({apiRef:n,rowCountProp:t.rowCount,loadingProp:r?!0:t.loading,previousTree:null,previousTreeDepths:null})})},Ukt=(e,t)=>{const n=Ro(e,"useGridRows"),r=tm(e,t),o=v.useRef(Date.now()),i=v.useRef(t.rowCount),a=la(),s=v.useCallback(V=>{const z=Zd(e)[V];if(z)return z;const W=e.current.getRowNode(V);return W&&lv(W)?{[Jg]:V}:null},[e]),l=t.getRowId,c=v.useCallback(V=>Jg in V?V[Jg]:l?l(V):V.id,[l]),u=v.useMemo(()=>r.rows.reduce((V,{id:z},W)=>(V[z]=W,V),{}),[r.rows]),d=v.useCallback(({cache:V,throttle:z})=>{const W=()=>{o.current=Date.now(),e.current.setState(J=>D({},J,{rows:Ele({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:ei(e),previousTreeDepths:X7(e),previousGroupsToFetch:R1t(e)})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(a.clear(),e.current.caches.rows=V,!z){W();return}const G=t.throttleRowsMs-(Date.now()-o.current);if(G>0){a.start(G,W);return}W()},[t.throttleRowsMs,t.rowCount,t.loading,e,a]),f=v.useCallback(V=>{n.debug(`Updating all rows, new length ${V.length}`);const z=LP({rows:V,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),W=e.current.caches.rows;z.rowsBeforePartialUpdates=W.rowsBeforePartialUpdates,d({cache:z,throttle:!0})},[n,t.getRowId,t.loading,t.rowCount,d,e]),p=v.useCallback(V=>{if(t.signature===Xs.DataGrid&&V.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` +`));const z=J7(e,V,t.getRowId),W=Q7({updates:z,getRowId:t.getRowId,previousCache:e.current.caches.rows});d({cache:W,throttle:!0})},[t.signature,t.getRowId,d,e]),m=v.useCallback((V,z)=>{const W=J7(e,V,t.getRowId),G=Q7({updates:W,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:z??[]});d({cache:G,throttle:!1})},[t.getRowId,d,e]),g=v.useCallback(V=>{V!==t.loading&&(n.debug(`Setting loading to ${V}`),e.current.setState(z=>D({},z,{rows:D({},z.rows,{loading:V})})),e.current.caches.rows.loadingPropBeforePartialUpdates=V)},[t.loading,e,n]),y=v.useCallback(()=>{const V=JC(e),z=Zd(e);return new Map(V.map(W=>[W,z[W]??{}]))},[e]),b=v.useCallback(()=>Hk(e),[e]),x=v.useCallback(()=>JC(e),[e]),S=v.useCallback(V=>u[V],[u]),P=v.useCallback((V,z)=>{const W=e.current.getRowNode(V);if(!W)throw new Error(`MUI X: No row with id #${V} found.`);if(W.type!=="group")throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const G=D({},W,{childrenExpanded:z});e.current.setState(J=>D({},J,{rows:D({},J.rows,{tree:D({},J.rows.tree,{[V]:G})})})),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",G)},[e]),E=v.useCallback(V=>ei(e)[V]??null,[e]),T=v.useCallback(({skipAutoGeneratedRows:V=!0,groupId:z,applySorting:W,applyFiltering:G})=>{const J=ei(e);let K;if(W){const ne=J[z];if(!ne)return[];const re=ub(e);K=[];const oe=re.findIndex(fe=>fe===z)+1;for(let fe=oe;fene.depth;fe+=1){const se=re[fe];(!V||!lv(J[se]))&&K.push(se)}}else K=mz(J,z,V);if(G){const ne=db(e);K=K.filter(re=>ne[re]!==!1)}return K},[e]),O=v.useCallback((V,z)=>{const W=e.current.getRowNode(V);if(!W)throw new Error(`MUI X: No row with id #${V} found.`);if(W.parent!==ti)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if(W.type!=="leaf")throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");e.current.setState(G=>{const J=ei(G,e.current.instanceId)[ti],K=J.children,ne=K.findIndex(oe=>oe===V);if(ne===-1||ne===z)return G;n.debug(`Moving row ${V} to index ${z}`);const re=[...K];return re.splice(z,0,re.splice(ne,1)[0]),D({},G,{rows:D({},G.rows,{tree:D({},G.rows.tree,{[ti]:D({},J,{children:re})})})})}),e.current.publishEvent("rowsSet")},[e,n]),k=v.useCallback((V,z)=>{if(t.signature===Xs.DataGrid&&z.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` +`));if(z.length===0)return;if(cb(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const G=D({},ei(e)),J=D({},Zd(e)),K=D({},JT(e)),ne=G[ti],re=[...ne.children],oe=new Set;for(let se=0;se{var ee;return((ee=G[se])==null?void 0:ee.type)==="leaf"});e.current.caches.rows.dataRowIdToModelLookup=J,e.current.caches.rows.dataRowIdToIdLookup=K,e.current.setState(se=>D({},se,{rows:D({},se.rows,{dataRowIdToModelLookup:J,dataRowIdToIdLookup:K,dataRowIds:fe,tree:G})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId]),M={getRow:s,setLoading:g,getRowId:c,getRowModels:y,getRowsCount:b,getAllRowIds:x,setRows:f,updateRows:p,getRowNode:E,getRowIndexRelativeToVisibleRows:S,unstable_replaceRows:k},I={setRowIndex:O,setRowChildrenExpansion:P,getRowGroupChildren:T},R={updateServerRows:m},_=v.useCallback(()=>{n.info("Row grouping pre-processing have changed, regenerating the row tree");let V;e.current.caches.rows.rowsBeforePartialUpdates===t.rows?V=D({},e.current.caches.rows,{updates:{type:"full",rows:JC(e)}}):V=LP({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),d({cache:V,throttle:!1})},[n,e,t.rows,t.getRowId,t.loading,t.rowCount,d]),N=Jl(()=>t.unstable_dataSource),B=v.useCallback(V=>{if(t.unstable_dataSource&&t.unstable_dataSource!==N.current){N.current=t.unstable_dataSource;return}V==="rowTreeCreation"&&_()},[_,N,t.unstable_dataSource]),L=v.useCallback(()=>{e.current.getActiveStrategy("rowTree")!==D1t(e)&&_()},[e,_]);gt(e,"activeStrategyProcessorChange",B),gt(e,"strategyAvailabilityChange",L);const F=v.useCallback(()=>{e.current.setState(V=>{const z=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:ei(V,e.current.instanceId),treeDepths:X7(V,e.current.instanceId),dataRowIds:JC(V,e.current.instanceId),dataRowIdToModelLookup:Zd(V,e.current.instanceId),dataRowIdToIdLookup:JT(V,e.current.instanceId)});return D({},V,{rows:D({},V.rows,z,{totalTopLevelRowCount:Ple({tree:z.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet"),e.current.forceUpdate()},[e,t.rowCount]);Az(e,"hydrateRows",F),Qt(e,M,"public"),Qt(e,I,t.signature===Xs.DataGrid?"private":"public"),Qt(e,R,"private");const U=v.useRef(!0);v.useEffect(()=>{var J;if(U.current){U.current=!1;return}let V=!1;t.rowCount!==i.current&&(V=!0,i.current=t.rowCount);const z=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,W=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,G=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;z&&(W||(e.current.setState(K=>D({},K,{rows:D({},K.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),G||(e.current.setState(K=>D({},K,{rows:D({},K.rows,{totalRowCount:Math.max(t.rowCount||0,K.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,K.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate()),!V)||(n.debug(`Updating all rows, new length ${(J=t.rows)==null?void 0:J.length}`),d({cache:LP({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))},[t.rows,t.rowCount,t.getRowId,t.loading,n,d,e])},Wkt=e=>{const t={[ti]:D({},L1t(),{children:e})};for(let n=0;n{const n=D({},e),r={};for(let a=0;a!r[a])),n[ti]=D({},o,{children:i}),{groupingName:Ih,tree:n,treeDepths:{0:i.length},dataRowIds:i}},qkt=e=>e.updates.type==="full"?Wkt(e.updates.rows):Gkt({previousTree:e.previousTree,actions:e.updates.actions}),Kkt=e=>{rO(e,Ih,"rowTreeCreation",qkt)};class wR extends Error{}function Ykt(e,t){const n=v.useCallback(f=>({field:f,colDef:e.current.getColumn(f)}),[e]),r=v.useCallback(f=>{const p=e.current.getRow(f);if(!p)throw new wR(`No row with id #${f} found`);return{id:f,columns:e.current.getAllColumns(),row:p}},[e]),o=v.useCallback((f,p)=>{const m=t.unstable_listView?uv(e.current.state):e.current.getColumn(p),g=e.current.getRow(f),y=e.current.getRowNode(f);if(!g||!y)throw new wR(`No row with id #${f} found`);const b=g[p],x=m!=null&&m.valueGetter?m.valueGetter(b,g,m,e):b,S=Da(e),P=wz(e),E={id:f,field:p,row:g,rowNode:y,colDef:m,cellMode:e.current.getCellMode(f,p),hasFocus:S!==null&&S.field===p&&S.id===f,tabIndex:P&&P.field===p&&P.id===f?0:-1,value:x,formattedValue:x,isEditable:!1,api:{}};return m&&m.valueFormatter&&(E.formattedValue=m.valueFormatter(x,g,m,e)),E.isEditable=m&&e.current.isCellEditable(E),E},[e,t.unstable_listView]),i=v.useCallback((f,p)=>{const m=e.current.getColumn(p),g=e.current.getRow(f);if(!g)throw new wR(`No row with id #${f} found`);return!m||!m.valueGetter?g[p]:m.valueGetter(g[m.field],g,m,e)},[e]),a=v.useCallback((f,p)=>{const m=p.field;if(!p||!p.valueGetter)return f[m];const g=f[p.field];return p.valueGetter(g,f,p,e)},[e]),s=v.useCallback((f,p)=>{const m=a(f,p);return!p||!p.valueFormatter?m:p.valueFormatter(m,f,p,e)},[e,a]),l=v.useCallback(f=>e.current.rootElementRef.current?nTt(e.current.rootElementRef.current,f):null,[e]),c=v.useCallback(f=>e.current.rootElementRef.current?rTt(e.current.rootElementRef.current,f):null,[e]),u=v.useCallback((f,p)=>e.current.rootElementRef.current?oTt(e.current.rootElementRef.current,{id:f,field:p}):null,[e]);Qt(e,{getCellValue:i,getCellParams:o,getCellElement:u,getRowValue:a,getRowFormattedValue:s,getRowParams:r,getRowElement:c,getColumnHeaderParams:n,getColumnHeaderElement:l},"public")}const xce=(e,t)=>e==null||Array.isArray(e)?e:t&&t[0]===e?t:[e],Xkt=(e,t)=>D({},e,{rowSelection:t.rowSelection?xce(t.rowSelectionModel)??[]:[]}),Qkt=(e,t)=>{var F,U,V,z,W,G,J;const n=Ro(e,"useGridSelection"),r=v.useCallback(K=>(...ne)=>{t.rowSelection&&K(...ne)},[t.rowSelection]),o=t.signature!==Xs.DataGrid&&(((F=t.rowSelectionPropagation)==null?void 0:F.parents)||((U=t.rowSelectionPropagation)==null?void 0:U.descendants)),i=v.useMemo(()=>xce(t.rowSelectionModel,Ms(e.current.state)),[e,t.rowSelectionModel]),a=v.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:i,propOnChange:t.onRowSelectionModelChange,stateSelector:Ms,changeEvent:"rowSelectionChange"});const{checkboxSelection:s,disableRowSelectionOnClick:l,isRowSelectable:c}=t,u=bz(t),d=tm(e,t),f=Ye(e,ei),p=Ye(e,cb)>1,m=v.useCallback(K=>{let ne=K;const re=a.current??K,oe=e.current.isRowSelected(K);if(oe){const fe=Zg(e),se=fe.findIndex(ce=>ce===re),ee=fe.findIndex(ce=>ce===ne);if(se===ee)return;se>ee?ne=fe[ee+1]:ne=fe[ee-1]}a.current=K,e.current.selectRowRange({startId:re,endId:ne},!oe)},[e]),g=v.useCallback(K=>{if(t.signature===Xs.DataGrid&&!u&&Array.isArray(K)&&K.length>1)throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join(` +`));Ms(e.current.state)!==K&&(n.debug("Setting selection model"),e.current.setState(re=>D({},re,{rowSelection:t.rowSelection?K:[]})),e.current.forceUpdate())},[e,n,t.rowSelection,t.signature,u]),y=v.useCallback(K=>Ms(e.current.state).includes(K),[e]),b=v.useCallback(K=>{if(t.rowSelection===!1||c&&!c(e.current.getRowParams(K)))return!1;const ne=e.current.getRowNode(K);return!((ne==null?void 0:ne.type)==="footer"||(ne==null?void 0:ne.type)==="pinnedRow")},[e,t.rowSelection,c]),x=v.useCallback(()=>sCt(e),[e]),S=v.useCallback((K,ne=!0,re=!1)=>{var oe,fe,se,ee,ce,le;if(e.current.isRowSelectable(K))if(a.current=K,re){n.debug(`Setting selection for row ${K}`);const Q=[],ue=ge=>{Q.push(ge)};ne&&(ue(K),o&&ZC(e,f,K,((oe=t.rowSelectionPropagation)==null?void 0:oe.descendants)??!1,((fe=t.rowSelectionPropagation)==null?void 0:fe.parents)??!1,ue)),e.current.setRowSelectionModel(Q)}else{n.debug(`Toggling selection for row ${K}`);const Q=Ms(e.current.state),ue=new Set(Q);ue.delete(K);const ge=be=>{ue.add(be)},xe=be=>{ue.delete(be)};ne?(ge(K),o&&ZC(e,f,K,((se=t.rowSelectionPropagation)==null?void 0:se.descendants)??!1,((ee=t.rowSelectionPropagation)==null?void 0:ee.parents)??!1,ge)):o&&Z7(e,f,K,((ce=t.rowSelectionPropagation)==null?void 0:ce.descendants)??!1,((le=t.rowSelectionPropagation)==null?void 0:le.parents)??!1,xe),(ue.size<2||u)&&e.current.setRowSelectionModel(Array.from(ue))}},[e,n,o,f,(V=t.rowSelectionPropagation)==null?void 0:V.descendants,(z=t.rowSelectionPropagation)==null?void 0:z.parents,u]),P=v.useCallback((K,ne=!0,re=!1)=>{n.debug("Setting selection for several rows");const oe=K.filter(ee=>e.current.isRowSelectable(ee));let fe;if(re){if(ne){if(fe=new Set(oe),o){const ce=le=>{fe.add(le)};oe.forEach(le=>{var Q,ue;ZC(e,f,le,((Q=t.rowSelectionPropagation)==null?void 0:Q.descendants)??!1,((ue=t.rowSelectionPropagation)==null?void 0:ue.parents)??!1,ce)})}}else fe=new Set;const ee=ku(e);if(fe.size===Object.keys(ee).length&&Array.from(fe).every(ce=>ee[ce]===ce))return}else{fe=new Set(Object.values(ku(e)));const ee=le=>{fe.add(le)},ce=le=>{fe.delete(le)};oe.forEach(le=>{var Q,ue,ge,xe;ne?(fe.add(le),o&&ZC(e,f,le,((Q=t.rowSelectionPropagation)==null?void 0:Q.descendants)??!1,((ue=t.rowSelectionPropagation)==null?void 0:ue.parents)??!1,ee)):(ce(le),o&&Z7(e,f,le,((ge=t.rowSelectionPropagation)==null?void 0:ge.descendants)??!1,((xe=t.rowSelectionPropagation)==null?void 0:xe.parents)??!1,ce))})}(fe.size<2||u)&&e.current.setRowSelectionModel(Array.from(fe))},[n,o,u,e,f,(W=t.rowSelectionPropagation)==null?void 0:W.descendants,(G=t.rowSelectionPropagation)==null?void 0:G.parents]),E=v.useCallback(({startId:K,endId:ne},re=!0,oe=!1)=>{if(!e.current.getRow(K)||!e.current.getRow(ne))return;n.debug(`Expanding selection from row ${K} to row ${ne}`);const fe=Zg(e),se=fe.indexOf(K),ee=fe.indexOf(ne),[ce,le]=se>ee?[ee,se]:[se,ee],Q=fe.slice(ce,le+1);e.current.selectRows(Q,re,oe)},[e,n]),T={selectRow:S,setRowSelectionModel:g,getSelectedRows:x,isRowSelected:y,isRowSelectable:b},O={selectRows:P,selectRowRange:E};Qt(e,T,"public"),Qt(e,O,t.signature===Xs.DataGrid?"private":"public");const k=v.useCallback((K=!1)=>{var le;const ne=Ms(e.current.state),re=Zd(e),oe=db(e),fe=D({},ku(e)),se=Q=>t.filterMode==="server"?!re[Q]:oe[Q]!==!0;let ee=!1;ne.forEach(Q=>{var ge;if(se(Q)){if(t.keepNonExistentRowsSelected)return;delete fe[Q],ee=!0;return}if(!((ge=t.rowSelectionPropagation)!=null&&ge.parents))return;const ue=f[Q];if(ue.type==="group"){if(ue.isAutoGenerated){delete fe[Q],ee=!0;return}ue.children.every(me=>oe[me]===!1)||(delete fe[Q],ee=!0)}});const ce=p&&((le=t.rowSelectionPropagation)==null?void 0:le.parents)&&Object.keys(fe).length>0;if(ee||ce&&!K){const Q=Object.values(fe);ce?e.current.selectRows(Q,!0,!0):e.current.setRowSelectionModel(Q)}},[e,p,(J=t.rowSelectionPropagation)==null?void 0:J.parents,t.keepNonExistentRowsSelected,t.filterMode,f]),M=v.useCallback((K,ne)=>{const re=ne.metaKey||ne.ctrlKey,oe=!s&&!re&&!nOt(ne),fe=!u||oe,se=e.current.isRowSelected(K);fe?e.current.selectRow(K,oe?!0:!se,!0):e.current.selectRow(K,!se,!1)},[e,u,s]),I=v.useCallback((K,ne)=>{var fe;if(l)return;const re=(fe=ne.target.closest(`.${ae.cell}`))==null?void 0:fe.getAttribute("data-field");if(re===fb.field||re===Wk)return;if(re){const se=e.current.getColumn(re);if((se==null?void 0:se.type)===Vk)return}e.current.getRowNode(K.id).type!=="pinnedRow"&&(ne.shiftKey&&u?m(K.id):M(K.id,ne))},[l,u,e,m,M]),R=v.useCallback((K,ne)=>{var re;u&&ne.shiftKey&&((re=window.getSelection())==null||re.removeAllRanges())},[u]),_=v.useCallback((K,ne)=>{u&&ne.nativeEvent.shiftKey?m(K.id):e.current.selectRow(K.id,K.value,!u)},[e,m,u]),N=v.useCallback(K=>{const ne=t.pagination&&t.checkboxSelectionVisibleOnly&&t.paginationMode==="client"?zle(e):Zg(e);e.current.selectRows(ne,K.value)},[e,t.checkboxSelectionVisibleOnly,t.pagination,t.paginationMode]),B=v.useCallback((K,ne)=>{if(e.current.getCellMode(K.id,K.field)!==Zn.Edit&&!r1(ne)){if(nO(ne.key)&&ne.shiftKey){const re=Da(e);if(re&&re.id!==K.id){ne.preventDefault();const oe=e.current.isRowSelected(re.id);if(!u){e.current.selectRow(re.id,!oe,!0);return}const fe=e.current.getRowIndexRelativeToVisibleRows(re.id),se=e.current.getRowIndexRelativeToVisibleRows(K.id);let ee,ce;fe>se?oe?(ee=se,ce=fe-1):(ee=se,ce=fe):oe?(ee=fe+1,ce=se):(ee=fe,ce=se);const le=d.rows.slice(ee,ce+1).map(Q=>Q.id);e.current.selectRows(le,!oe);return}}if(ne.key===" "&&ne.shiftKey){ne.preventDefault(),M(K.id,ne);return}String.fromCharCode(ne.keyCode)==="A"&&(ne.ctrlKey||ne.metaKey)&&(ne.preventDefault(),P(e.current.getAllRowIds(),!0))}},[e,M,P,d.rows,u]);gt(e,"sortedRowsSet",r(()=>k(!0))),gt(e,"filteredRowsSet",r(k)),gt(e,"rowClick",r(I)),gt(e,"rowSelectionCheckboxChange",r(_)),gt(e,"headerSelectionCheckboxChange",N),gt(e,"cellMouseDown",r(R)),gt(e,"cellKeyDown",r(B)),v.useEffect(()=>{i!==void 0&&e.current.setRowSelectionModel(i)},[e,i,t.rowSelection]),v.useEffect(()=>{t.rowSelection||e.current.setRowSelectionModel([])},[e,t.rowSelection]);const L=i!=null;v.useEffect(()=>{if(L||!t.rowSelection)return;const K=Ms(e.current.state);if(b){const ne=K.filter(re=>b(re));ne.length{if(!t.rowSelection||L)return;const K=Ms(e.current.state);!u&&K.length>1&&e.current.setRowSelectionModel([])},[e,u,s,L,t.rowSelection]),v.useEffect(()=>{r(k)},[k,r])},Jkt=e=>{const{classes:t}=e;return v.useMemo(()=>Te({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},Sn,t),[t])},Zkt=(e,t)=>{const n={classes:t.classes},r=Jkt(n),o=v.useCallback(i=>{const a=D({},fb,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),s=t.checkboxSelection,l=i.lookup[du]!=null;return s&&!l?(i.lookup[du]=a,i.orderedFields=[du,...i.orderedFields]):!s&&l?(delete i.lookup[du],i.orderedFields=i.orderedFields.filter(c=>c!==du)):s&&l&&(i.lookup[du]=D({},a,i.lookup[du])),i},[e,r,t.checkboxSelection]);Ar(e,"hydrateColumns",o)},eMt=(e,t)=>{var r,o;const n=t.sortModel??((o=(r=t.initialState)==null?void 0:r.sorting)==null?void 0:o.sortModel)??[];return D({},e,{sorting:{sortModel:ple(n,t.disableMultipleColumnsSorting),sortedRows:[]}})},tMt=(e,t)=>{var E,T;const n=Ro(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:ks,changeEvent:"sortModelChange"});const r=v.useCallback((O,k)=>{const M=ks(e),I=M.findIndex(_=>_.field===O);let R=[...M];return I>-1?(k==null?void 0:k.sort)==null?R.splice(I,1):R.splice(I,1,k):R=[...M,k],R},[e]),o=v.useCallback((O,k)=>{const I=ks(e).find(R=>R.field===O.field);if(I){const R=k===void 0?V7(O.sortingOrder??t.sortingOrder,I.sort):k;return R===void 0?void 0:D({},I,{sort:R})}return{field:O.field,sort:k===void 0?V7(O.sortingOrder??t.sortingOrder):k}},[e,t.sortingOrder]),i=v.useCallback((O,k)=>k==null||k.sortable===!1||t.disableColumnSorting?O:(k.sortingOrder||t.sortingOrder).some(I=>!!I)?[...O,"columnMenuSortItem"]:O,[t.sortingOrder,t.disableColumnSorting]),a=v.useCallback(()=>{e.current.setState(O=>{if(t.sortingMode==="server")return n.debug("Skipping sorting rows as sortingMode = server"),D({},O,{sorting:D({},O.sorting,{sortedRows:mz(ei(e),ti,!1)})});const k=ks(O,e.current.instanceId),M=o1t(k,e),I=e.current.applyStrategyProcessor("sorting",{sortRowList:M});return D({},O,{sorting:D({},O.sorting,{sortedRows:I})})}),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()},[e,n,t.sortingMode]),s=v.useCallback(O=>{ks(e)!==O&&(n.debug("Setting sort model"),e.current.setState(z7(O,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())},[e,n,t.disableMultipleColumnsSorting]),l=v.useCallback((O,k,M)=>{const I=e.current.getColumn(O),R=o(I,k);let _;!M||t.disableMultipleColumnsSorting?_=(R==null?void 0:R.sort)==null?[]:[R]:_=r(I.field,R),e.current.setSortModel(_)},[e,r,o,t.disableMultipleColumnsSorting]),c=v.useCallback(()=>ks(e),[e]),u=v.useCallback(()=>gz(e).map(k=>k.model),[e]),d=v.useCallback(()=>ub(e),[e]),f=v.useCallback(O=>e.current.getSortedRowIds()[O],[e]);Qt(e,{getSortModel:c,getSortedRows:u,getSortedRowIds:d,getRowIdFromRowIndex:f,setSortModel:s,sortColumn:l,applySorting:a},"public");const m=v.useCallback((O,k)=>{var R,_;const M=ks(e);return!k.exportOnlyDirtyModels||t.sortModel!=null||((_=(R=t.initialState)==null?void 0:R.sorting)==null?void 0:_.sortModel)!=null||M.length>0?D({},O,{sorting:{sortModel:M}}):O},[e,t.sortModel,(T=(E=t.initialState)==null?void 0:E.sorting)==null?void 0:T.sortModel]),g=v.useCallback((O,k)=>{var I;const M=(I=k.stateToRestore.sorting)==null?void 0:I.sortModel;return M==null?O:(e.current.setState(z7(M,t.disableMultipleColumnsSorting)),D({},O,{callbacks:[...O.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),y=v.useCallback(O=>{const k=ei(e),M=k[ti],I=O.sortRowList?O.sortRowList(M.children.map(R=>k[R])):[...M.children];return M.footerId!=null&&I.push(M.footerId),I},[e]);Ar(e,"exportState",m),Ar(e,"restoreState",g),rO(e,Ih,"sorting",y);const b=v.useCallback(({field:O,colDef:k},M)=>{if(!k.sortable||t.disableColumnSorting)return;const I=M.shiftKey||M.metaKey||M.ctrlKey;l(O,void 0,I)},[l,t.disableColumnSorting]),x=v.useCallback(({field:O,colDef:k},M)=>{!k.sortable||t.disableColumnSorting||M.key==="Enter"&&!M.ctrlKey&&!M.metaKey&&l(O,void 0,M.shiftKey)},[l,t.disableColumnSorting]),S=v.useCallback(()=>{const O=ks(e),k=od(e);if(O.length>0){const M=O.filter(I=>k[I.field]);M.length{O==="sorting"&&e.current.applySorting()},[e]);Ar(e,"columnMenu",i),gt(e,"columnHeaderClick",b),gt(e,"columnHeaderKeyDown",x),gt(e,"rowsSet",e.current.applySorting),gt(e,"columnsChange",S),gt(e,"activeStrategyProcessorChange",P),t1(()=>{e.current.applySorting()}),xn(()=>{t.sortModel!==void 0&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])};function Dq(e){const{containerSize:t,scrollPosition:n,elementSize:r,elementOffset:o}=e,i=o+r;if(r>t)return o;if(i-t>n)return i-t;if(o{const n=nr(),r=Ro(e,"useGridScroll"),o=e.current.columnHeadersContainerRef,i=e.current.virtualScrollerRef,a=Ye(e,qf),s=v.useCallback(d=>{var b;const f=Ci(e.current.state),p=Hk(e),m=t.unstable_listView?[uv(e.current.state)]:ho(e);if(!(d.rowIndex==null)&&p===0||m.length===0)return!1;r.debug(`Scrolling to cell at row ${d.rowIndex}, col: ${d.colIndex} `);let y={};if(d.colIndex!==void 0){const x=Gf(e);let S;if(typeof d.rowIndex<"u"){const P=(b=a[d.rowIndex])==null?void 0:b.id,E=e.current.unstable_getCellColSpanInfo(P,d.colIndex);E&&!E.spannedByColSpan&&(S=E.cellProps.width)}typeof S>"u"&&(S=m[d.colIndex].computedWidth),y.left=Dq({containerSize:f.viewportOuterSize.width,scrollPosition:Math.abs(i.current.scrollLeft),elementSize:S,elementOffset:x[d.colIndex]})}if(d.rowIndex!==void 0){const x=pb(e.current.state),S=CCt(e),P=PCt(e),E=t.pagination?d.rowIndex-S*P:d.rowIndex,T=x.positions[E+1]?x.positions[E+1]-x.positions[E]:x.currentPageTotalHeight-x.positions[E];y.top=Dq({containerSize:f.viewportInnerSize.height,scrollPosition:i.current.scrollTop,elementSize:T,elementOffset:x.positions[E]})}return y=e.current.unstable_applyPipeProcessors("scrollToIndexes",y,d),typeof y.left!==void 0||typeof y.top!==void 0?(e.current.scroll(y),!0):!1},[r,e,i,t.pagination,a,t.unstable_listView]),l=v.useCallback(d=>{if(i.current&&d.left!==void 0&&o.current){const f=n?-1:1;o.current.scrollLeft=d.left,i.current.scrollLeft=f*d.left,r.debug(`Scrolling left: ${d.left}`)}i.current&&d.top!==void 0&&(i.current.scrollTop=d.top,r.debug(`Scrolling top: ${d.top}`)),r.debug("Scrolling, updating container, and viewport")},[i,n,o,r]),c=v.useCallback(()=>i!=null&&i.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0},[i]);Qt(e,{scroll:l,scrollToIndexes:s,getScrollPosition:c},"public")};function rMt(e,t){lr(e,"columnHeaderClick",t.onColumnHeaderClick),lr(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),lr(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),lr(e,"columnHeaderOver",t.onColumnHeaderOver),lr(e,"columnHeaderOut",t.onColumnHeaderOut),lr(e,"columnHeaderEnter",t.onColumnHeaderEnter),lr(e,"columnHeaderLeave",t.onColumnHeaderLeave),lr(e,"cellClick",t.onCellClick),lr(e,"cellDoubleClick",t.onCellDoubleClick),lr(e,"cellKeyDown",t.onCellKeyDown),lr(e,"preferencePanelClose",t.onPreferencePanelClose),lr(e,"preferencePanelOpen",t.onPreferencePanelOpen),lr(e,"menuOpen",t.onMenuOpen),lr(e,"menuClose",t.onMenuClose),lr(e,"rowDoubleClick",t.onRowDoubleClick),lr(e,"rowClick",t.onRowClick),lr(e,"stateChange",t.onStateChange)}function oMt(e,t=166){let n,r;const o=()=>{n=void 0,e(...r)};function i(...a){r=a,n===void 0&&(n=setTimeout(o,t))}return i.clear=()=>{clearTimeout(n),n=void 0},i}const FL={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:" ",columnBufferPx:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:Fc.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,indeterminateCheckboxAction:"deselect",keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"error",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rowPositionsDebounceMs:166,rows:[],rowSelection:!0,rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,unstable_rowSpanning:!1,virtualizeColumnsWithAutoRowHeight:!1},rg={width:0,height:0},iMt={isReady:!1,root:rg,viewportOuterSize:rg,viewportInnerSize:rg,contentSize:rg,minimumSize:rg,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0},aMt=e=>D({},e,{dimensions:iMt});function sMt(e,t){const n=Ro(e,"useResizeContainer"),r=v.useRef(!1),o=v.useRef(rg),i=Ye(e,Ci),a=Ye(e,pb),s=Ye(e,e1),l=Ye(e,ZS),c=v.useMemo(()=>Ole(t.rowHeight,FL.rowHeight),[t.rowHeight]),u=Math.floor(c*l),d=Math.floor(t.columnHeaderHeight*l),f=Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*l),p=Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*l),m=cMt(uz(e),6),g=Cz(e,t),y=s.left.reduce((F,U)=>F+U.computedWidth,0),b=s.right.reduce((F,U)=>F+U.computedWidth,0),[x,S]=v.useState(),P=v.useMemo(()=>oMt(S,t.resizeThrottleMs),[t.resizeThrottleMs]);v.useEffect(()=>P.clear,[P]);const E=v.useRef(),T=()=>e.current.state.dimensions,O=Ze(F=>{e.current.setState(U=>D({},U,{dimensions:F}))}),k=v.useCallback(()=>{const F=e.current.mainElementRef.current;if(!F)return;const U=ba(F).getComputedStyle(F),V={width:parseFloat(U.width)||0,height:parseFloat(U.height)||0};(!E.current||!_q(E.current,V))&&(e.current.publishEvent("resize",V),E.current=V)},[e]),M=v.useCallback(()=>{const F=Ci(e.current.state);if(!F.isReady)return 0;const U=ey(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const z=Zk(e),W=z.lastRowIndex-z.firstRowIndex;return Math.min(W-1,U.rows.length)}const V=Math.floor(F.viewportInnerSize.height/u);return Math.min(V,U.rows.length)},[e,t.pagination,t.paginationMode,t.getRowHeight,u]),I=v.useCallback(()=>{var le,Q;const F=e.current.rootElementRef.current,U=F1t(e),V=lMt(F,m,t.scrollbarSize),z=g+U.top,W=U.bottom,J={width:m-y-b,height:a.currentPageTotalHeight};let K,ne,re=!1,oe=!1;if(t.autoHeight)oe=!1,re=Math.round(m)>Math.round(o.current.width),K={width:o.current.width,height:z+W+J.height},ne={width:Math.max(0,K.width-(oe?V:0)),height:Math.max(0,K.height-(re?V:0))};else{K={width:o.current.width,height:o.current.height},ne={width:Math.max(0,K.width-y-b),height:Math.max(0,K.height-z-W)};const ue=J,ge=ne,xe=ue.width>ge.width,me=ue.height>ge.height;(xe||me)&&(oe=me,re=ue.width+(oe?V:0)>ge.width,re&&(oe=ue.height+V>ge.height)),oe&&(ne.width-=V),re&&(ne.height-=V)}const fe=Math.max(K.width,m+(oe?V:0)),se={width:m,height:z+J.height+W},ee={isReady:!0,root:o.current,viewportOuterSize:K,viewportInnerSize:ne,contentSize:J,minimumSize:se,hasScrollX:re,hasScrollY:oe,scrollbarSize:V,headerHeight:d,groupHeaderHeight:f,headerFilterHeight:p,rowWidth:fe,rowHeight:u,columnsTotalWidth:m,leftPinnedWidth:y,rightPinnedWidth:b,headersTotalHeight:g,topContainerHeight:z,bottomContainerHeight:W},ce=e.current.state.dimensions;O(ee),_q(ee.viewportInnerSize,ce.viewportInnerSize)||e.current.publishEvent("viewportInnerSizeChange",ee.viewportInnerSize),(Q=(le=e.current).updateRenderContext)==null||Q.call(le)},[e,O,t.scrollbarSize,t.autoHeight,a.currentPageTotalHeight,u,d,f,p,m,g,y,b]),R={resize:k,getRootDimensions:T},_={updateDimensions:I,getViewportPageSize:M};Qt(e,R,"public"),Qt(e,_,"private"),xn(()=>{x&&(I(),e.current.publishEvent("debouncedResize",o.current))},[e,x,I]);const N=e.current.rootElementRef.current;xn(()=>{if(!N)return;const F=(U,V)=>N.style.setProperty(U,V);F("--DataGrid-width",`${i.viewportOuterSize.width}px`),F("--DataGrid-hasScrollX",`${Number(i.hasScrollX)}`),F("--DataGrid-hasScrollY",`${Number(i.hasScrollY)}`),F("--DataGrid-scrollbarSize",`${i.scrollbarSize}px`),F("--DataGrid-rowWidth",`${i.rowWidth}px`),F("--DataGrid-columnsTotalWidth",`${i.columnsTotalWidth}px`),F("--DataGrid-leftPinnedWidth",`${i.leftPinnedWidth}px`),F("--DataGrid-rightPinnedWidth",`${i.rightPinnedWidth}px`),F("--DataGrid-headerHeight",`${i.headerHeight}px`),F("--DataGrid-headersTotalHeight",`${i.headersTotalHeight}px`),F("--DataGrid-topContainerHeight",`${i.topContainerHeight}px`),F("--DataGrid-bottomContainerHeight",`${i.bottomContainerHeight}px`),F("--height",`${i.rowHeight}px`)},[N,i]);const B=v.useRef(!0),L=v.useCallback(F=>{o.current=F;const U=/jsdom|HappyDOM/.test(window.navigator.userAgent);if(F.height===0&&!r.current&&!t.autoHeight&&!U&&(n.error(["The parent DOM element of the Data Grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(` +`)),r.current=!0),F.width===0&&!r.current&&!U&&(n.error(["The parent DOM element of the Data Grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(` +`)),r.current=!0),B.current){S(F),B.current=!1;return}P(F)},[t.autoHeight,P,n]);xn(I,[I]),lr(e,"sortedRowsSet",I),lr(e,"paginationModelChange",I),lr(e,"columnsChange",I),gt(e,"resize",L),lr(e,"debouncedResize",t.onResize)}function lMt(e,t,n){if(n!==void 0)return n;if(e===null||t===0)return 0;const o=mr(e).createElement("div");o.style.width="99px",o.style.height="99px",o.style.position="absolute",o.style.overflow="scroll",o.className="scrollDiv",e.appendChild(o);const i=o.offsetWidth-o.clientWidth;return e.removeChild(o),i}function cMt(e,t){return Math.round(e*10**t)/10**t}function _q(e,t){return e.width===t.width&&e.height===t.height}const uMt=typeof globalThis.ResizeObserver<"u"?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},dMt=(e,t,n)=>(n.current.caches.rowsMeta={heights:new Map},D({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}})),fMt=(e,t)=>{const{getRowHeight:n,getRowSpacing:r,getEstimatedRowHeight:o}=t,i=e.current.caches.rowsMeta.heights,a=v.useRef(-1),s=v.useRef(!1),l=v.useRef(!1),c=Ye(e,ZS),u=Ye(e,Qo),d=Ye(e,Yk),f=Ye(e,ks),p=tm(e,t),m=Ye(e,em),g=Ye(e,()=>Ci(e.current.state).rowHeight),y=N=>{let B=i.get(N);return B===void 0&&(B={content:g,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},i.set(N,B)),B},b=v.useCallback(N=>{const B=Ci(e.current.state).rowHeight,L=e.current.getRowHeightEntry(N.id);if(!n)L.content=B,L.needsFirstMeasurement=!1;else{const F=n(D({},N,{densityFactor:c}));if(F==="auto"){if(L.needsFirstMeasurement){const U=o?o(D({},N,{densityFactor:c})):B;L.content=U??B}s.current=!0,L.autoHeight=!0}else L.content=Ole(F,B),L.needsFirstMeasurement=!1,L.autoHeight=!1}if(r){const F=e.current.getRowIndexRelativeToVisibleRows(N.id),U=r(D({},N,{isFirstVisible:F===0,isLastVisible:F===p.rows.length-1,indexRelativeToCurrentPage:F}));L.spacingTop=U.top??0,L.spacingBottom=U.bottom??0}else L.spacingTop=0,L.spacingBottom=0;return e.current.unstable_applyPipeProcessors("rowHeight",L,N),L},[e,p.rows.length,n,o,g,r,c]),x=v.useCallback(()=>{s.current=!1,m.top.forEach(b),m.bottom.forEach(b);const N=[],B=p.rows.reduce((L,F)=>{N.push(L);const U=b(F),V=U.content+U.spacingTop+U.spacingBottom+U.detail;return L+V},0);s.current||(a.current=1/0),e.current.setState(L=>D({},L,{rowsMeta:{currentPageTotalHeight:B,positions:N}})),l.current=!0},[e,m,p.rows,b]),S=N=>{var B;return((B=i.get(N))==null?void 0:B.content)??g},P=(N,B)=>{const L=e.current.getRowHeightEntry(N),F=L.content!==B;L.needsFirstMeasurement=!1,L.content=B,l.current&&(l.current=!F)},E=N=>{var B;return((B=i.get(N))==null?void 0:B.autoHeight)??!1},T=()=>a.current,O=N=>{s.current&&N>a.current&&(a.current=N)},k=()=>{i.clear(),x()},M=Jl(()=>new uMt(N=>{for(let B=0;B0?L.borderBoxSize[0].blockSize:L.contentRect.height,U=L.target.__mui_id;e.current.unstable_storeRowHeightMeasurement(U,F)}l.current||e.current.requestPipeProcessorsApplication("rowHeight")})).current,I=(N,B)=>(N.__mui_id=B,M.observe(N),()=>M.unobserve(N));Az(e,"rowHeight",x),v.useEffect(()=>{x()},[u,d,f,x]);const R={unstable_getRowHeight:S,unstable_setLastMeasuredRowIndex:O,unstable_storeRowHeightMeasurement:P,resetRowHeights:k},_={hydrateRowsMeta:x,observeRowHeight:I,rowHasAutoHeight:E,getRowHeightEntry:y,getLastMeasuredRowIndex:T};Qt(e,R,"public"),Qt(e,_,"private")},pMt=e=>{const t=v.useCallback((o={})=>e.current.unstable_applyPipeProcessors("exportState",{},o),[e]),n=v.useCallback(o=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:o}).callbacks.forEach(a=>{a()}),e.current.forceUpdate()},[e]);Qt(e,{exportState:t,restoreState:n},"public")},hMt=e=>{const t=v.useRef({}),n=(s,l)=>{var c;return(c=t.current[s])==null?void 0:c[l]},r=()=>{t.current={}},o=v.useCallback(({rowId:s,minFirstColumn:l,maxLastColumn:c,columns:u})=>{for(let d=l;d1&&(d+=f.colSpan-1)}},[e]),i={unstable_getCellColSpanInfo:n},a={resetColSpan:r,calculateColSpan:o};Qt(e,i,"public"),Qt(e,a,"private"),gt(e,"columnOrderChange",r)};function mMt(e){const{apiRef:t,lookup:n,columnIndex:r,rowId:o,minFirstColumnIndex:i,maxLastColumnIndex:a,columns:s}=e,l=s.length,c=s[r],u=t.current.getRow(o),d=t.current.getRowValue(u,c),f=typeof c.colSpan=="function"?c.colSpan(d,u,c,t):c.colSpan;if(!f||f===1)return xR(n,o,r,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let p=c.computedWidth;for(let m=1;m=i&&g{if(ble(e)){if(n[e.field]!==void 0)throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join(` +`));n[e.field]=t;return}const{groupId:r,children:o}=e;o.forEach(i=>{Sce(i,[...t,r],n)})},jL=e=>{if(!e)return{};const t={};return e.forEach(n=>{Sce(n,[],t)}),t},BL=(e,t,n)=>{const r=l=>t[l]??[],o=[],i=Math.max(...e.map(l=>r(l).length)),a=(l,c,u)=>Qg(r(l).slice(0,u+1),r(c).slice(0,u+1)),s=(l,c)=>!!(n!=null&&n.left&&n.left.includes(l)&&!n.left.includes(c)||n!=null&&n.right&&!n.right.includes(l)&&n.right.includes(c));for(let l=0;l{const f=r(d)[l]??null;if(u.length===0)return[{columnFields:[d],groupId:f}];const p=u[u.length-1],m=p.columnFields[p.columnFields.length-1];return p.groupId!==f||!a(m,d,l)||s(m,d)?[...u,{columnFields:[d],groupId:f}]:[...u.slice(0,u.length-1),{columnFields:[...p.columnFields,d],groupId:f}]},[]);o.push(c)}return o},gMt=["groupId","children"],$z=e=>{let t={};return e.forEach(n=>{if(ble(n))return;const{groupId:r,children:o}=n,i=Ue(n,gMt);if(!r)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");const a=D({},i,{groupId:r}),s=$z(o);if(s[r]!==void 0||t[r]!==void 0)throw new Error(`MUI X: The groupId ${r} is used multiple times in the columnGroupingModel.`);t=D({},t,s,{[r]:a})}),D({},t)},yMt=(e,t,n)=>{if(!t.columnGroupingModel)return e;const r=Iu(n),o=lb(n),i=$z(t.columnGroupingModel??[]),a=jL(t.columnGroupingModel??[]),s=BL(r,a,n.current.state.pinnedColumns??{}),l=o.length===0?0:Math.max(...o.map(c=>{var u;return((u=a[c])==null?void 0:u.length)??0}));return D({},e,{columnGrouping:{lookup:i,unwrappedGroupingModel:a,headerStructure:s,maxDepth:l}})},vMt=(e,t)=>{const n=v.useCallback(s=>Wle(e)[s]??[],[e]),r=v.useCallback(()=>Gle(e),[e]);Qt(e,{getColumnGroupPath:n,getAllGroupDetails:r},"public");const i=v.useCallback(()=>{const s=jL(t.columnGroupingModel??[]);e.current.setState(l=>{var f;const c=((f=l.columns)==null?void 0:f.orderedFields)??[],u=l.pinnedColumns??{},d=BL(c,s,u);return D({},l,{columnGrouping:D({},l.columnGrouping,{headerStructure:d})})})},[e,t.columnGroupingModel]),a=v.useCallback(s=>{var g,y;const l=((y=(g=e.current).getPinnedColumns)==null?void 0:y.call(g))??{},c=Iu(e),u=lb(e),d=$z(s??[]),f=jL(s??[]),p=BL(c,f,l),m=u.length===0?0:Math.max(...u.map(b=>{var x;return((x=f[b])==null?void 0:x.length)??0}));e.current.setState(b=>D({},b,{columnGrouping:{lookup:d,unwrappedGroupingModel:f,headerStructure:p,maxDepth:m}}))},[e]);gt(e,"columnIndexChange",i),gt(e,"columnsChange",()=>{a(t.columnGroupingModel)}),gt(e,"columnVisibilityModelChange",()=>{a(t.columnGroupingModel)}),v.useEffect(()=>{a(t.columnGroupingModel)},[a,t.columnGroupingModel])};function bMt(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function Lq(e,t){if(t!==void 0&&e.changedTouches){for(let n=0;nJk(e),r=Ye(e,n);return v.useEffect(()=>{t.current&&r===!1&&(t.current.resolve(),t.current=void 0)}),()=>{if(!t.current){if(n()===!1)return Promise.resolve();t.current=bMt()}return t.current}}function PMt(e,t){if(e.length<4)return e;const n=e.slice();n.sort((s,l)=>s-l);const r=n[Math.floor(n.length*.25)],o=n[Math.floor(n.length*.75)-1],i=o-r,a=i<5?5:i*t;return n.filter(s=>s>r-a&&s{const s=mTt(e.current,i.field).map(m=>m.getBoundingClientRect().width??0),l=t.includeOutliers?s:PMt(s,t.outliersFactor);if(t.includeHeaders){const m=hTt(e.current,i.field);if(m){const g=m.querySelector(`.${ae.columnHeaderTitle}`),y=m.querySelector(`.${ae.columnHeaderTitleContainerContent}`),b=m.querySelector(`.${ae.iconButtonContainer}`),x=m.querySelector(`.${ae.menuIcon}`),S=g??y,P=window.getComputedStyle(m,null),E=parseInt(P.paddingLeft,10)+parseInt(P.paddingRight,10),O=S.scrollWidth+1+E+((b==null?void 0:b.clientWidth)??0)+((x==null?void 0:x.clientWidth)??0);l.push(O)}}const c=i.minWidth!==-1/0&&i.minWidth!==void 0,u=i.maxWidth!==1/0&&i.maxWidth!==void 0,d=c?i.minWidth:0,f=u?i.maxWidth:1/0,p=l.length===0?0:Math.max(...l);r[i.field]=$c(p,d,f)}),o.classList.remove(ae.autosizing),r}const TMt=e=>D({},e,{columnResize:{resizingColumnField:""}});function OMt(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const IMt=(e,t)=>{const n=nr(),r=Ro(e,"useGridColumnResize"),o=Jl(OMt).current,i=v.useRef(),a=v.useRef(),s=la(),l=v.useRef(),c=M=>{var F,U;r.debug(`Updating width to ${M} for col ${o.colDef.field}`);const I=o.columnHeaderElement.offsetWidth,R=M-I,_=M-o.initialColWidth,N=o.initialTotalWidth+_;(U=(F=e.current.rootElementRef)==null?void 0:F.current)==null||U.style.setProperty("--DataGrid-rowWidth",`${N}px`),o.colDef.computedWidth=M,o.colDef.width=M,o.colDef.flex=0,o.columnHeaderElement.style.width=`${M}px`;const B=o.headerFilterElement;B&&(B.style.width=`${M}px`),o.groupHeaderElements.forEach(V=>{const z=V;let W;z.getAttribute("aria-colspan")==="1"?W=`${M}px`:W=`${z.offsetWidth+R}px`,z.style.width=W}),o.cellElements.forEach(V=>{const z=V;let W;z.getAttribute("aria-colspan")==="1"?W=`${M}px`:W=`${z.offsetWidth+R}px`,z.style.setProperty("--width",W)});const L=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);L===ur.LEFT&&(qm(o.fillerLeft,"width",R),o.leftPinnedCellsAfter.forEach(V=>{qm(V,"left",R)}),o.leftPinnedHeadersAfter.forEach(V=>{qm(V,"left",R)})),L===ur.RIGHT&&(qm(o.fillerRight,"width",R),o.rightPinnedCellsBefore.forEach(V=>{qm(V,"right",R)}),o.rightPinnedHeadersBefore.forEach(V=>{qm(V,"right",R)}))},u=M=>{if(b(),o.previousMouseClickEvent){const I=o.previousMouseClickEvent,R=I.timeStamp,_=I.clientX,N=I.clientY;if(M.timeStamp-R<300&&M.clientX===_&&M.clientY===N){o.previousMouseClickEvent=void 0,e.current.publishEvent("columnResizeStop",null,M);return}}if(o.colDef){e.current.setColumnWidth(o.colDef.field,o.colDef.width),r.debug(`Updating col ${o.colDef.field} with new width: ${o.colDef.width}`);const I=Ac(e.current.state);o.groupHeaderElements.forEach(R=>{const _=sTt(R),N=R,L=`${_.reduce((F,U)=>I.columnVisibilityModel[U]!==!1?F+I.lookup[U].computedWidth:F,0)}px`;N.style.width=L})}s.start(0,()=>{e.current.publishEvent("columnResizeStop",null,M)})},d=(M,I,R)=>{var L;const _=e.current.rootElementRef.current;o.initialColWidth=M.computedWidth,o.initialTotalWidth=e.current.getRootDimensions().rowWidth,o.colDef=M,o.columnHeaderElement=aTt(e.current.columnHeadersContainerRef.current,M.field);const N=_.querySelector(`.${ae.headerFilterRow} [data-field="${id(M.field)}"]`);N&&(o.headerFilterElement=N),o.groupHeaderElements=lTt((L=e.current.columnHeadersContainerRef)==null?void 0:L.current,M.field),o.cellElements=cTt(o.columnHeaderElement,e.current),o.fillerLeft=hq(e.current,n?"filler--pinnedRight":"filler--pinnedLeft"),o.fillerRight=hq(e.current,n?"filler--pinnedLeft":"filler--pinnedRight");const B=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);o.leftPinnedCellsAfter=B!==ur.LEFT?[]:uTt(e.current,o.columnHeaderElement,n),o.rightPinnedCellsBefore=B!==ur.RIGHT?[]:dTt(e.current,o.columnHeaderElement,n),o.leftPinnedHeadersAfter=B!==ur.LEFT?[]:fTt(e.current,o.columnHeaderElement,n),o.rightPinnedHeadersBefore=B!==ur.RIGHT?[]:pTt(e.current,o.columnHeaderElement,n),a.current=SMt(I,n),i.current=wMt(R,o.columnHeaderElement.getBoundingClientRect(),a.current)},f=Ze(u),p=Ze(M=>{if(M.buttons===0){f(M);return}let I=Nq(i.current,M.clientX,o.columnHeaderElement.getBoundingClientRect(),a.current);I=$c(I,o.colDef.minWidth,o.colDef.maxWidth),c(I);const R={element:o.columnHeaderElement,colDef:o.colDef,width:I};e.current.publishEvent("columnResize",R,M)}),m=Ze(M=>{Lq(M,l.current)&&u(M)}),g=Ze(M=>{const I=Lq(M,l.current);if(!I)return;if(M.type==="mousemove"&&M.buttons===0){m(M);return}let R=Nq(i.current,I.x,o.columnHeaderElement.getBoundingClientRect(),a.current);R=$c(R,o.colDef.minWidth,o.colDef.maxWidth),c(R);const _={element:o.columnHeaderElement,colDef:o.colDef,width:R};e.current.publishEvent("columnResize",_,M)}),y=Ze(M=>{const I=tO(M.target,ae["columnSeparator--resizable"]);if(!I)return;const R=M.changedTouches[0];R!=null&&(l.current=R.identifier);const _=tO(M.target,ae.columnHeader),N=iTt(_),B=e.current.getColumn(N);r.debug(`Start Resize on col ${B.field}`),e.current.publishEvent("columnResizeStart",{field:N},M),d(B,I,R.clientX);const L=mr(M.currentTarget);L.addEventListener("touchmove",g),L.addEventListener("touchend",m)}),b=v.useCallback(()=>{const M=mr(e.current.rootElementRef.current);M.body.style.removeProperty("cursor"),M.removeEventListener("mousemove",p),M.removeEventListener("mouseup",f),M.removeEventListener("touchmove",g),M.removeEventListener("touchend",m),setTimeout(()=>{M.removeEventListener("click",Fq,!0)},100),o.columnHeaderElement&&(o.columnHeaderElement.style.pointerEvents="unset")},[e,o,p,f,g,m]),x=v.useCallback(({field:M})=>{e.current.setState(I=>D({},I,{columnResize:D({},I.columnResize,{resizingColumnField:M})})),e.current.forceUpdate()},[e]),S=v.useCallback(()=>{e.current.setState(M=>D({},M,{columnResize:D({},M.columnResize,{resizingColumnField:""})})),e.current.forceUpdate()},[e]),P=Ze(({colDef:M},I)=>{if(I.button!==0||!I.currentTarget.classList.contains(ae["columnSeparator--resizable"]))return;I.preventDefault(),r.debug(`Start Resize on col ${M.field}`),e.current.publishEvent("columnResizeStart",{field:M.field},I),d(M,I.currentTarget,I.clientX);const R=mr(e.current.rootElementRef.current);R.body.style.cursor="col-resize",o.previousMouseClickEvent=I.nativeEvent,R.addEventListener("mousemove",p),R.addEventListener("mouseup",f),R.addEventListener("click",Fq,!0)}),E=Ze((M,I)=>{if(t.disableAutosize||I.button!==0)return;const R=e.current.state.columns.lookup[M.field];R.resizable!==!1&&e.current.autosizeColumns(D({},t.autosizeOptions,{disableColumnVirtualization:!1,columns:[R.field]}))}),T=CMt(e),O=v.useRef(!1),k=v.useCallback(async M=>{var B;if(!((B=e.current.rootElementRef)==null?void 0:B.current)||O.current)return;O.current=!0;const R=Ac(e.current.state),_=D({},fEt,M,{columns:(M==null?void 0:M.columns)??R.orderedFields});_.columns=_.columns.filter(L=>R.columnVisibilityModel[L]!==!1);const N=_.columns.map(L=>e.current.state.columns.lookup[L]);try{!t.disableVirtualization&&_.disableColumnVirtualization&&(e.current.unstable_setColumnVirtualization(!1),await T());const L=EMt(e,_,N),F=N.map(U=>D({},U,{width:L[U.field],computedWidth:L[U.field],flex:0}));if(_.expand){const V=R.orderedFields.map(G=>R.lookup[G]).filter(G=>R.columnVisibilityModel[G.field]!==!1).reduce((G,J)=>G+(L[J.field]??J.computedWidth??J.width),0),W=e.current.getRootDimensions().viewportInnerSize.width-V;if(W>0){const G=W/(F.length||1);F.forEach(J=>{J.width+=G,J.computedWidth+=G})}}e.current.updateColumns(F),F.forEach((U,V)=>{if(U.width!==N[V].width){const z=U.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(U.field),colDef:U,width:z})}})}finally{t.disableVirtualization||e.current.unstable_setColumnVirtualization(!0),O.current=!1}},[e,T,t.disableVirtualization]);v.useEffect(()=>b,[b]),DO(()=>{t.autosizeOnMount&&Promise.resolve().then(()=>{e.current.autosizeColumns(t.autosizeOptions)})}),Lle(e,()=>{var M;return(M=e.current.columnHeadersContainerRef)==null?void 0:M.current},"touchstart",y,{passive:!0}),Qt(e,{autosizeColumns:k},"public"),gt(e,"columnResizeStop",S),gt(e,"columnResizeStart",x),gt(e,"columnSeparatorMouseDown",P),gt(e,"columnSeparatorDoubleClick",E),lr(e,"columnResize",t.onColumnResize),lr(e,"columnWidthChange",t.onColumnWidthChange)};function qm(e,t,n){e&&(e.style[t]=`${parseInt(e.style[t],10)+n}px`)}function kMt(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex{if(!e)return null;let r=e[t.field];const o=t.rowSpanValueGetter??t.valueGetter;return o&&(r=o(r,e,t,n)),r},oO={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},mw={firstRowIndex:0,lastRowIndex:0},AMt=new Set([du,"__reorder__",Wk]),Cce=20,Pce=(e,t,n,r,o,i,a)=>{const s=i?{}:D({},e.current.state.rowSpanning.spannedCells),l=i?{}:D({},e.current.state.rowSpanning.hiddenCells),c=i?{}:D({},e.current.state.rowSpanning.hiddenCellOriginMap);return i&&(a=mw),t.forEach(u=>{var d;if(!AMt.has(u.field)){for(let f=o.firstRowIndex;f=r.firstRowIndex&&SR(E.model,u,e)===m;){const T=n[P+1];l[T.id]?l[T.id][u.field]=!0:l[T.id]={[u.field]:!0},x.push(f),b+=1,g=E.id,y=P,P-=1}}x.forEach(P=>{c[P]?c[P][u.field]=y:c[P]={[u.field]:y}});let S=f+1;for(;S<=r.lastRowIndex&&n[S]&&SR(n[S].model,u,e)===m;){const P=n[S];l[P.id]?l[P.id][u.field]=!0:l[P.id]={[u.field]:!0},c[S]?c[S][u.field]=y:c[S]={[u.field]:y},S+=1,b+=1}b>0&&(s[g]?s[g][u.field]=b+1:s[g]={[u.field]:b+1})}a={firstRowIndex:Math.min(a.firstRowIndex,o.firstRowIndex),lastRowIndex:Math.max(a.lastRowIndex,o.lastRowIndex)}}}),{spannedCells:s,hiddenCells:l,hiddenCellOriginMap:c,processedRange:a}},$Mt=(e,t,n)=>{var r;if(t.unstable_rowSpanning){const o=e.rows.dataRowIds||[],i=e.columns.orderedFields||[],a=e.rows.dataRowIdToModelLookup,s=e.columns.lookup,l=!!e.filter.filterModel.items.length||!!((r=e.filter.filterModel.quickFilterValues)!=null&&r.length);if(!o.length||!i.length||!a||!s||l)return D({},e,{rowSpanning:oO});const c={firstRowIndex:0,lastRowIndex:Math.min(Cce,Math.max(o.length,0))},u=o.map(g=>({id:g,model:a[g]})),d=i.map(g=>s[g]),{spannedCells:f,hiddenCells:p,hiddenCellOriginMap:m}=Pce(n,d,u,c,c,!0,mw);return D({},e,{rowSpanning:{spannedCells:f,hiddenCells:p,hiddenCellOriginMap:m}})}return D({},e,{rowSpanning:oO})},RMt=(e,t)=>{const{range:n,rows:r}=tm(e,t),o=Ye(e,Zk),i=Ye(e,ho),a=Ye(e,ei),s=Jl(()=>Object.keys(e.current.state.rowSpanning.spannedCells).length>0?{firstRowIndex:0,lastRowIndex:Math.min(Cce,Math.max(e.current.state.rows.dataRowIds.length,0))}:mw),l=v.useRef(mw),c=v.useCallback((m=!0)=>{if(!t.unstable_rowSpanning){e.current.state.rowSpanning!==oO&&e.current.setState(M=>D({},M,{rowSpanning:oO}));return}if(n===null||!MMt(o))return;m&&(s.current=mw);const g=kMt({firstRowIndex:o.firstRowIndex,lastRowIndex:Math.min(o.lastRowIndex,n.lastRowIndex+1)},s.current);if(g===null)return;const{spannedCells:y,hiddenCells:b,hiddenCellOriginMap:x,processedRange:S}=Pce(e,i,r,n,g,m,s.current);s.current=S;const P=Object.keys(y).length,E=Object.keys(b).length,T=Object.keys(e.current.state.rowSpanning.spannedCells).length,O=Object.keys(e.current.state.rowSpanning.hiddenCells).length;(m||P!==T||E!==O)&&e.current.setState(M=>D({},M,{rowSpanning:{spannedCells:y,hiddenCells:b,hiddenCellOriginMap:x}}))},[e,t.unstable_rowSpanning,n,o,r,i,s]),u=v.useRef(o),d=v.useRef(!0),f=v.useRef(!1),p=v.useRef(a);v.useEffect(()=>{const m=d.current;if(d.current&&(d.current=!1),a!==p.current){p.current=a,c(!0);return}if(n&&l.current&&jq(n,l.current)&&(l.current=n,f.current=!0),!m&&u.current!==o){jq(u.current,o)&&(c(f.current),f.current=!1),u.current=o;return}c()},[c,o,n,l,a])},DMt=(e,t,n)=>D({},e,{listViewColumn:t.unstable_listColumn?D({},t.unstable_listColumn,{computedWidth:zL(n)}):void 0});function _Mt(e,t){const n=()=>{e.current.setState(i=>i.listViewColumn?D({},i,{listViewColumn:D({},i.listViewColumn,{computedWidth:zL(e)})}):i)},r=v.useRef(null);gt(e,"viewportInnerSizeChange",i=>{r.current!==i.width&&(r.current=i.width,n())}),gt(e,"columnVisibilityModelChange",n),v.useEffect(()=>{const i=t.unstable_listColumn;i&&e.current.setState(a=>D({},a,{listViewColumn:D({},i,{computedWidth:zL(e)})}))},[e,t.unstable_listColumn]),v.useEffect(()=>{t.unstable_listView&&t.unstable_listColumn},[t.unstable_listView,t.unstable_listColumn])}function zL(e){return Ci(e.current.state).viewportInnerSize.width}const LMt=(e,t)=>{const n=ekt(e,t);return Zkt(n,t),Kkt(n),Lo(aMt,n,t),Lo(Xkt,n,t),Lo(lkt,n,t),Lo(Hkt,n,t),Lo(zkt,n,t),Lo(Skt,n,t),Lo(eMt,n,t),Lo(Rkt,n,t),Lo(vkt,n,t),Lo($Mt,n,t),Lo(ukt,n,t),Lo(TMt,n,t),Lo(Akt,n,t),Lo(dMt,n,t),Lo(akt,n,t),Lo(yMt,n,t),Lo(EPt,n,t),Lo(DMt,n,t),Ikt(n,t),Qkt(n,t),ckt(n,t),Ukt(n,t),RMt(n,t),Ykt(n,t),hMt(n),vMt(n,t),Vkt(n,t),Ckt(n,t),Dkt(n,t),xkt(n,t),tMt(n,t),dkt(n,t),IMt(n,t),$kt(n,t),fMt(n,t),nMt(n,t),skt(n),pkt(n,t),ykt(n,t),ikt(n,t),sMt(n,t),rMt(n,t),pMt(n),TPt(n,t),_Mt(n,t),n},NMt=e=>{const{classes:t,headerAlign:n,isDragging:r,isLastColumn:o,showLeftBorder:i,showRightBorder:a,groupId:s,pinnedPosition:l}=e;return Te({root:["columnHeader",n==="left"&&"columnHeader--alignLeft",n==="center"&&"columnHeader--alignCenter",n==="right"&&"columnHeader--alignRight",r&&"columnHeader--moving",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",s===null?"columnHeader--emptyGroup":"columnHeader--filledGroup",l==="left"&&"columnHeader--pinnedLeft",l==="right"&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]},Sn,t)};function FMt(e){var G;const{groupId:t,width:n,depth:r,maxDepth:o,fields:i,height:a,colIndex:s,hasFocus:l,tabIndex:c,isLastColumn:u,pinnedPosition:d,style:f,indexInSection:p,sectionLength:m,gridHasFiller:g}=e,y=wt(),b=v.useRef(null),x=sn(),S=Ye(x,Gle),P=t?S[t]:{},{headerName:E=t??"",description:T="",headerAlign:O=void 0}=P;let k;const M=t&&((G=S[t])==null?void 0:G.renderHeaderGroup),I=v.useMemo(()=>({groupId:t,headerName:E,description:T,depth:r,maxDepth:o,fields:i,colIndex:s,isLastColumn:u}),[t,E,T,r,o,i,s,u]);t&&M&&(k=M(I));const R=tM(d,p),_=eM(d,p,m,y.showColumnVerticalBorder,g),N=D({},e,{classes:y.classes,showLeftBorder:R,showRightBorder:_,headerAlign:O,depth:r,isDragging:!1}),B=E??t,L=_n(),F=t===null?`empty-group-cell-${L}`:t,U=NMt(N);v.useLayoutEffect(()=>{if(l){const K=b.current.querySelector('[tabindex="0"]')||b.current;K==null||K.focus()}},[x,l]);const V=v.useCallback(J=>K=>{r1(K)||x.current.publishEvent(J,I,K)},[x,I]),z=v.useMemo(()=>({onKeyDown:V("columnGroupHeaderKeyDown"),onFocus:V("columnGroupHeaderFocus"),onBlur:V("columnGroupHeaderBlur")}),[V]),W=typeof P.headerClassName=="function"?P.headerClassName(I):P.headerClassName;return $.jsx(dce,D({ref:b,classes:U,columnMenuOpen:!1,colIndex:s,height:a,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:c,isDraggable:!1,headerComponent:k,headerClassName:W,description:T,elementId:F,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:B,"aria-colspan":i.length,"data-fields":`|-${i.join("-|-")}-|`,style:f},z))}const Bq=ie("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})({display:"flex"}),jMt=e=>{const{visibleColumns:t,sortColumnLookup:n,filterColumnLookup:r,columnHeaderTabIndexState:o,columnGroupHeaderTabIndexState:i,columnHeaderFocus:a,columnGroupHeaderFocus:s,headerGroupingMaxDepth:l,columnMenuState:c,columnVisibility:u,columnGroupsHeaderStructure:d,hasOtherElementInTabSequence:f}=e,[p,m]=v.useState(""),[g,y]=v.useState(""),b=pl(),x=nr(),S=wt(),P=Ye(b,Ci),E=Ye(b,Jk),T=Ye(b,Wle),O=Ye(b,Gf),k=Ye(b,PPt),M=Ye(b,e1),I=Ye(b,od),R=ece(O,k,M.left.length),_=P.columnsTotalWidth{b.current.columnHeadersContainerRef.current&&(b.current.columnHeadersContainerRef.current.scrollLeft=0)},[b]);const N=v.useCallback(oe=>y(oe.field),[]),B=v.useCallback(()=>y(""),[]),L=v.useCallback(oe=>m(oe.field),[]),F=v.useCallback(()=>m(""),[]),U=v.useMemo(()=>M.left.length?{firstColumnIndex:0,lastColumnIndex:M.left.length}:null,[M.left.length]),V=v.useMemo(()=>M.right.length?{firstColumnIndex:t.length-M.right.length,lastColumnIndex:t.length}:null,[M.right.length,t.length]);gt(b,"columnResizeStart",N),gt(b,"columnResizeStop",B),gt(b,"columnHeaderDragStart",L),gt(b,"columnHeaderDragEnd",F);const z=oe=>{const{renderContext:fe=k,maxLastColumn:se=t.length}=oe||{};let ee,ce;return!S.disableVirtualization&&!E?(ee=0,ce=se):(ee=fe.firstColumnIndex,ce=fe.lastColumnIndex),{renderedColumns:t.slice(ee,ce),firstColumnToRender:ee,lastColumnToRender:ce}},W=(oe,fe,se,ee=!1)=>{const ce=(oe==null?void 0:oe.position)===ur.RIGHT,le=(oe==null?void 0:oe.position)===void 0,Q=M.right.length>0&&ce||M.right.length===0&&le,ue=R-se;return $.jsxs(v.Fragment,{children:[le&&$.jsx("div",{role:"presentation",style:{width:ue}}),fe,le&&$.jsx("div",{role:"presentation",className:pe(ae.filler,ee&&ae["filler--borderBottom"])}),Q&&$.jsx(kz,{header:!0,pinnedRight:ce,borderBottom:ee,borderTop:!1})]})},G=({pinnedPosition:oe,columnIndex:fe,computedWidth:se})=>{let ee;const ce=oe===ur.LEFT,le=oe===ur.RIGHT;if(ce||le){const Q=Iz(oe,se,fe,O,P);let ue=ce?"left":"right";x&&(ue=ce?"right":"left"),oe==="left"&&(ee={[ue]:Q}),oe==="right"&&(ee={[ue]:Q})}return ee},J=(oe,fe={})=>{const{renderedColumns:se,firstColumnToRender:ee}=z(oe),ce=[];for(let le=0;le$.jsxs(Bq,{role:"row","aria-rowindex":l+1,ownerState:S,className:ae["row--borderBottom"],children:[U&&J({position:ur.LEFT,renderContext:U,maxLastColumn:U.lastColumnIndex},{disableReorder:!0}),J({renderContext:k,maxLastColumn:t.length-M.right.length}),V&&J({position:ur.RIGHT,renderContext:V,maxLastColumn:V.lastColumnIndex},{disableReorder:!0,separatorSide:Oz.Left})]}),ne=({depth:oe,params:fe})=>{var Me,Ae;const se=z(fe);if(se.renderedColumns.length===0)return null;const{firstColumnToRender:ee,lastColumnToRender:ce}=se,le=d[oe],Q=t[ee].field,ue=((Me=T[Q])==null?void 0:Me[oe])??null,ge=le.findIndex(({groupId:Ne,columnFields:Je})=>Ne===ue&&Je.includes(Q)),xe=t[ce-1].field,me=((Ae=T[xe])==null?void 0:Ae[oe])??null,be=le.findIndex(({groupId:Ne,columnFields:Je})=>Ne===me&&Je.includes(xe)),we=le.slice(ge,be+1).map(Ne=>D({},Ne,{columnFields:Ne.columnFields.filter(Je=>u[Je]!==!1)})).filter(Ne=>Ne.columnFields.length>0),Oe=we[0].columnFields.indexOf(Q),je=we[0].columnFields.slice(0,Oe).reduce((Ne,Je)=>{const nt=I[Je];return Ne+(nt.computedWidth??0)},0);let de=ee;const Re=we.map(({groupId:Ne,columnFields:Je},nt)=>{const st=s!==null&&s.depth===oe&&Je.includes(s.field),$t=i!==null&&i.depth===oe&&Je.includes(i.field)?0:-1,ct={groupId:Ne,width:Je.reduce((Pe,We)=>Pe+I[We].computedWidth,0),fields:Je,colIndex:de,hasFocus:st,tabIndex:$t},_t=fe.position,pt=G({pinnedPosition:_t,columnIndex:de,computedWidth:ct.width});de+=Je.length;let ot=nt;return _t==="left"&&(ot=de-1),$.jsx(FMt,{groupId:Ne,width:ct.width,fields:ct.fields,colIndex:ct.colIndex,depth:oe,isLastColumn:nt===we.length-1,maxDepth:l,height:P.groupHeaderHeight,hasFocus:st,tabIndex:$t,pinnedPosition:_t,style:pt,indexInSection:ot,sectionLength:we.length,gridHasFiller:_},nt)});return W(fe,Re,je)};return{renderContext:k,leftRenderContext:U,rightRenderContext:V,pinnedColumns:M,visibleColumns:t,getCellOffsetStyle:G,getFillers:W,getColumnHeadersRow:K,getColumnsToRender:z,getColumnGroupHeadersRows:()=>{if(l===0)return null;const oe=[];for(let fe=0;fe({role:"rowgroup"})}},BMt=["className"],zMt=e=>{const{classes:t}=e;return Te({root:["columnHeaders"]},Sn,t)},VMt=Qn("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),HMt=$n(function(t,n){const{className:r}=t,o=Ue(t,BMt),i=wt(),a=zMt(i);return $.jsx(VMt,D({className:pe(a.root,r),ownerState:i},o,{role:"presentation",ref:n}))}),UMt=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],WMt=$n(function(t,n){const{visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:m}=t,g=Ue(t,UMt),{getInnerProps:y,getColumnHeadersRow:b,getColumnGroupHeadersRows:x}=jMt({visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:m});return $.jsxs(HMt,D({},g,y(),{ref:n,children:[x(),b()]}))}),GMt=Wf(WMt);function qMt(e){return null}function KMt(e){return null}const YMt=$n(function(t,n){const o=sn().current.getLocaleText("noResultsOverlayLabel");return $.jsx(Tz,D({},t,{ref:n,children:o}))}),XMt=["sortingOrder"],QMt=v.memo(function(t){const{sortingOrder:n}=t,r=Ue(t,XMt),o=wt(),[i]=n,a=i==="asc"?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?$.jsx(a,D({},r)):null}),JMt=["native"];function ZMt(e){let{native:t}=e,n=Ue(e,JMt);return t?$.jsx("option",D({},n)):$.jsx(tn,D({},n))}const eAt={booleanCellTrueIcon:XTt,booleanCellFalseIcon:yR,columnMenuIcon:GTt,openFilterButtonIcon:jTt,filterPanelDeleteIcon:yR,columnFilteredIcon:bq,columnSelectorIcon:zTt,columnUnsortedIcon:QMt,columnSortedAscendingIcon:mq,columnSortedDescendingIcon:gq,columnResizeIcon:VTt,densityCompactIcon:HTt,densityStandardIcon:UTt,densityComfortableIcon:WTt,exportIcon:YTt,moreActionsIcon:QTt,treeDataCollapseIcon:vq,treeDataExpandIcon:yq,groupingCriteriaCollapseIcon:vq,groupingCriteriaExpandIcon:yq,detailPanelExpandIcon:wq,detailPanelCollapseIcon:qTt,rowReorderIcon:xq,quickFilterIcon:BTt,quickFilterClearIcon:yR,columnMenuHideIcon:JTt,columnMenuSortAscendingIcon:mq,columnMenuSortDescendingIcon:gq,columnMenuFilterIcon:bq,columnMenuManageColumnsIcon:ZTt,columnMenuClearIcon:eOt,loadIcon:KTt,filterPanelAddIcon:wq,filterPanelRemoveAllIcon:tOt,columnReorderIcon:xq},tAt=D({},eAt,{baseBadge:DEe,baseCheckbox:ATe,baseDivider:Qa,baseTextField:gn,baseFormControl:Cv,baseSelect:Dh,baseButton:yt,baseIconButton:An,baseInputAdornment:co,baseTooltip:Xl,basePopper:$f,baseInputLabel:Pv,baseSelectOption:ZMt,baseChip:hh}),nAt=D({},tAt,{cell:EEt,skeletonCell:DEt,columnHeaderFilterIconButton:FTt,columnHeaderSortIcon:LTt,columnMenu:vOt,columnHeaders:GMt,detailPanels:qMt,footer:hIt,footerRowCount:AIt,toolbar:null,pinnedRows:KMt,loadingOverlay:SIt,noResultsOverlay:YMt,noRowsOverlay:CIt,pagination:OIt,filterPanel:KOt,columnsPanel:COt,columnsManagement:JOt,panel:IOt,row:LIt});function rAt({defaultSlots:e,slots:t}){const n=t;if(!n||Object.keys(n).length===0)return e;const r=D({},e);return Object.keys(n).forEach(o=>{const i=o;n[i]!==void 0&&(r[i]=n[i])}),r}function oAt(e){var o;if((o=e.slotProps)!=null&&o.root)return e;const t=Object.keys(e);if(!t.some(i=>i.startsWith("aria-")||i.startsWith("data-")))return e;const n={},r=e.forwardedProps??{};for(let i=0;ioAt(e),[e])}const aAt={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid",unstable_listView:!1},sAt=nAt,lAt=e=>{const t=iAt(Jt({props:e,name:"MuiDataGrid"})),n=v.useMemo(()=>D({},ySt,t.localeText),[t.localeText]),r=v.useMemo(()=>rAt({defaultSlots:sAt,slots:t.slots}),[t.slots]),o=v.useMemo(()=>Object.keys(FL).reduce((i,a)=>(i[a]=t[a]??FL[a],i),{}),[t]);return v.useMemo(()=>D({},t,o,{localeText:n,slots:r},aAt),[t,n,r,o])},cAt={hooks:{useGridAriaAttributes:NIt,useGridRowAriaAttributes:FIt}},Ece=$n(function(t,n){var i;const r=lAt(t),o=LMt(r.apiRef,r);return $.jsx(jIt,{privateApiRef:o,configuration:cAt,props:r,children:$.jsxs(UEt,D({className:r.className,style:r.style,sx:r.sx},r.forwardedProps,(i=r.slotProps)==null?void 0:i.root,{ref:n,children:[$.jsx(gIt,{}),$.jsx(vEt,{}),$.jsx(bEt,{})]}))})}),uAt=v.memo(Ece);Ece.propTypes={apiRef:j.shape({current:j.object.isRequired}),"aria-label":j.string,"aria-labelledby":j.string,autoHeight:j.bool,autoPageSize:j.bool,autosizeOnMount:j.bool,autosizeOptions:j.shape({columns:j.arrayOf(j.string),disableColumnVirtualization:j.bool,expand:j.bool,includeHeaders:j.bool,includeOutliers:j.bool,outliersFactor:j.number}),cellModesModel:j.object,checkboxSelection:j.bool,classes:j.object,clipboardCopyCellDelimiter:j.string,columnBufferPx:j.number,columnGroupHeaderHeight:j.number,columnGroupingModel:j.arrayOf(j.object),columnHeaderHeight:j.number,columns:j.arrayOf(j.object).isRequired,columnVisibilityModel:j.object,density:j.oneOf(["comfortable","compact","standard"]),disableAutosize:j.bool,disableColumnFilter:j.bool,disableColumnMenu:j.bool,disableColumnResize:j.bool,disableColumnSelector:j.bool,disableColumnSorting:j.bool,disableDensitySelector:j.bool,disableEval:j.bool,disableMultipleRowSelection:j.bool,disableRowSelectionOnClick:j.bool,disableVirtualization:j.bool,editMode:j.oneOf(["cell","row"]),estimatedRowCount:j.number,experimentalFeatures:j.shape({warnIfFocusStateIsNotSynced:j.bool}),filterDebounceMs:j.number,filterMode:j.oneOf(["client","server"]),filterModel:j.shape({items:j.arrayOf(j.shape({field:j.string.isRequired,id:j.oneOfType([j.number,j.string]),operator:j.string.isRequired,value:j.any})).isRequired,logicOperator:j.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:j.bool,quickFilterLogicOperator:j.oneOf(["and","or"]),quickFilterValues:j.array}),forwardedProps:j.object,getCellClassName:j.func,getDetailPanelContent:j.func,getEstimatedRowHeight:j.func,getRowClassName:j.func,getRowHeight:j.func,getRowId:j.func,getRowSpacing:j.func,hideFooter:j.bool,hideFooterPagination:j.bool,hideFooterSelectedRowCount:j.bool,ignoreDiacritics:j.bool,ignoreValueFormatterDuringExport:j.oneOfType([j.shape({clipboardExport:j.bool,csvExport:j.bool}),j.bool]),indeterminateCheckboxAction:j.oneOf(["deselect","select"]),initialState:j.object,isCellEditable:j.func,isRowSelectable:j.func,keepNonExistentRowsSelected:j.bool,loading:j.bool,localeText:j.object,logger:j.shape({debug:j.func.isRequired,error:j.func.isRequired,info:j.func.isRequired,warn:j.func.isRequired}),logLevel:j.oneOf(["debug","error","info","warn",!1]),nonce:j.string,onCellClick:j.func,onCellDoubleClick:j.func,onCellEditStart:j.func,onCellEditStop:j.func,onCellKeyDown:j.func,onCellModesModelChange:j.func,onClipboardCopy:j.func,onColumnHeaderClick:j.func,onColumnHeaderContextMenu:j.func,onColumnHeaderDoubleClick:j.func,onColumnHeaderEnter:j.func,onColumnHeaderLeave:j.func,onColumnHeaderOut:j.func,onColumnHeaderOver:j.func,onColumnOrderChange:j.func,onColumnResize:j.func,onColumnVisibilityModelChange:j.func,onColumnWidthChange:j.func,onDensityChange:j.func,onFilterModelChange:j.func,onMenuClose:j.func,onMenuOpen:j.func,onPaginationMetaChange:j.func,onPaginationModelChange:j.func,onPreferencePanelClose:j.func,onPreferencePanelOpen:j.func,onProcessRowUpdateError:j.func,onResize:j.func,onRowClick:j.func,onRowCountChange:j.func,onRowDoubleClick:j.func,onRowEditStart:j.func,onRowEditStop:j.func,onRowModesModelChange:j.func,onRowSelectionModelChange:j.func,onSortModelChange:j.func,onStateChange:j.func,pageSizeOptions:j.arrayOf(j.oneOfType([j.number,j.shape({label:j.string.isRequired,value:j.number.isRequired})]).isRequired),pagination:j.oneOf([!0]),paginationMeta:j.shape({hasNextPage:j.bool}),paginationMode:j.oneOf(["client","server"]),paginationModel:j.shape({page:j.number.isRequired,pageSize:j.number.isRequired}),processRowUpdate:j.func,resizeThrottleMs:j.number,rowBufferPx:j.number,rowCount:j.number,rowHeight:j.number,rowModesModel:j.object,rowPositionsDebounceMs:j.number,rows:j.arrayOf(j.object),rowSelection:j.bool,rowSelectionModel:j.oneOfType([j.arrayOf(j.oneOfType([j.number,j.string]).isRequired),j.number,j.string]),rowSpacingType:j.oneOf(["border","margin"]),scrollbarSize:j.number,showCellVerticalBorder:j.bool,showColumnVerticalBorder:j.bool,slotProps:j.object,slots:j.object,sortingMode:j.oneOf(["client","server"]),sortingOrder:j.arrayOf(j.oneOf(["asc","desc"])),sortModel:j.arrayOf(j.shape({field:j.string.isRequired,sort:j.oneOf(["asc","desc"])})),sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),unstable_rowSpanning:j.bool,virtualizeColumnsWithAutoRowHeight:j.bool};const dAt=e=>e.map(t=>({id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes})),fAt=e=>{const[t]=qe(),n=dAt(e.category.entries),r=Xse(),o=Pxt(),[i,a]=v.useState(n),[s,l]=v.useState({}),c=(x,S)=>{x.reason===Pl.rowFocusOut&&(S.defaultMuiPrevented=!0)},u=x=>()=>{l({...s,[x]:{mode:Vn.Edit}})},d=x=>()=>{l({...s,[x]:{mode:Vn.View}})},f=x=>async()=>{console.log("deleting entry",x),o.mutate(parseInt(x.toString())),a(i.filter(S=>S.id!==x))},p=x=>()=>{l({...s,[x]:{mode:Vn.View,ignoreModifications:!0}});const S=i.find(P=>P.id===x);(S==null?void 0:S.id)===null&&a(i.filter(P=>P.id!==x))},m=async x=>{r.mutate({id:x.id,categoryId:x.category,date:x.date,value:x.value,notes:x.notes});const S={...x,isNew:!1};return a(i.map(P=>P.id===x.id?S:P)),S},g=x=>{console.log(x)},y=x=>{l(x)},b=[{field:"value",headerName:t("value"),width:80,editable:!0,valueFormatter:x=>x==null?"":x+e.category.unit},{field:"date",headerName:t("date"),type:"date",width:120,editable:!0,valueFormatter:x=>x==null?"":It.fromJSDate(x).toLocaleString(It.DATE_MED)},{field:"notes",headerName:t("notes"),type:"string",flex:1,editable:!0},{field:"actions",type:"actions",headerName:t("actions"),width:100,cellClassName:"actions",getActions:({id:x})=>{var P;return((P=s[x])==null?void 0:P.mode)===Vn.Edit?[C(eP,{icon:C(uyt,{}),label:"Save",sx:{color:"primary.main"},onClick:d(x)}),C(eP,{icon:C(mS,{}),label:"Cancel",className:"textPrimary",onClick:p(x),color:"inherit"})]:[C(eP,{icon:C(Uae,{}),label:"Edit",className:"textPrimary",onClick:u(x),color:"inherit"}),C(eP,{icon:C(tyt,{}),label:"Delete",onClick:f(x),color:"inherit"})]}}];return C(Ln,{sx:{width:"100%"},children:C(uAt,{editMode:"row",rows:n,columns:b,initialState:{pagination:{paginationModel:{pageSize:SU.pageSize}}},pageSizeOptions:SU.pageSizeOptions,disableRowSelectionOnClick:!0,rowModesModel:s,onRowModesModelChange:y,onRowEditStop:c,processRowUpdate:m,onProcessRowUpdateError:g})})},Rz=({title:e,subtitle:t,isOpen:n,message:r,deleteFn:o,closeFn:i})=>{const[a]=qe();return C(Sv,{open:n,onClose:i,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:X(io,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:2,minWidth:"400px"},children:[C(Zl,{title:e,titleTypographyProps:{variant:"h6"},subheader:t,action:C(mS,{onClick:i})}),C(wi,{children:C(ut,{variant:"body1",children:r})}),X(os,{children:[C(yt,{color:"error",variant:"contained",onClick:()=>{o(),i()},children:a("delete")}),C(yt,{color:"primary",onClick:i,children:a("cancel")})]})]})})},pAt=e=>{const t=Sxt(e.category.id),n=Qh(),[r]=qe(),[o,i]=Y.useState(null),[a,s]=Y.useState(!1),[l,c]=Y.useState(!1),u=!!o,d=P=>{i(P.currentTarget)},f=()=>{p(),y()},p=()=>{i(null)},m=()=>{x(),i(null)},g=()=>{t.mutate(e.category.id),n(Pn(wn.MEASUREMENT_OVERVIEW))},y=()=>s(!0),b=()=>s(!1),x=()=>c(!0),S=()=>c(!1);return X("div",{children:[C(yt,{onClick:d,children:C(qae,{})}),X(is,{anchorEl:o,open:u,onClose:p,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(tn,{onClick:f,children:r("edit")}),C(tn,{onClick:m,children:r("delete")})]}),C(Yi,{title:r("edit"),isOpen:a,closeFn:b,children:C(rle,{category:e.category,closeFn:b})}),C(Rz,{title:r("deleteConfirmation",{name:e.category.name}),message:r("measurements.deleteInfo"),isOpen:l,closeFn:S,deleteFn:g})]})},hAt=()=>{const e=Jh(),t=parseInt(e.categoryId),n=Yse(t);return n.isLoading?C(bo,{}):C(Zh,{title:n.data.name,optionsMenu:C(pAt,{category:n.data}),mainContent:X(Gt,{spacing:2,children:[C(nle,{category:n.data}),C(fAt,{category:n.data})]}),fab:C(hSt,{})})},mAt=e=>{const[t,n]=qe(),[r,o]=Y.useState(!1),i=()=>o(!0),a=()=>o(!1);return X(Mt,{children:[X(io,{children:[C(Zl,{title:e.category.name,subheader:e.category.unit}),C(wi,{children:C(nle,{category:e.category})}),X(os,{disableSpacing:!0,sx:{justifyContent:"space-between"},children:[C(yt,{size:"small",children:C(zs,{to:Pn(wn.MEASUREMENT_DETAIL,n.language,{id:e.category.id}),children:t("seeDetails")})}),C(An,{onClick:i,children:C(Gi,{})})]})]}),C(Yi,{title:t("add"),isOpen:r,closeFn:a,children:C(ole,{closeFn:a,categoryId:e.category.id})})]})},zq=()=>{const e=Kse(),[t]=qe();return e.isLoading?C(bo,{}):C(Zh,{title:t("measurements.measurements"),mainContent:X(Gt,{spacing:2,children:[e.data.length===0&&C(cI,{}),e.data.map(n=>C(mAt,{category:n},n.id))]}),fab:C(pSt,{})})},BP=[{range:"obese",color:"#FF5733",min:30,max:100},{range:"overweight",color:"#FFC107",min:25,max:30},{range:"normal",color:"#90EE90",min:18.5,max:25},{range:"underweight",color:"#FFC300",min:0,max:18.5}],nP=e=>{const t=BP.find(n=>n.range===e);return t?t.color:"gray"},gAt=()=>{const[e]=qe(),t=KS(),n=Uc(),[r,o]=v.useState(),[i,a]=v.useState();v.useEffect(()=>{var u;if(t.data&&t.data.length>0){const d=t.data[0],f=(u=n.data)!=null&&u.useMetric?d.weight:d.weight*.453592;a(f)}},[t.data,n.data]),v.useEffect(()=>{var u;(u=n.data)!=null&&u.height&&o(n.data.height)},[n.data]);const l=(()=>{if(r&&i){const u=r/100;return i/(u*u)}return null})();if(t.isLoading||n.isLoading)return C(bo,{});const c=[];for(let u=140;u<=220;u+=10){const d=u/100,f={height:u};let p=0;BP.forEach((m,g)=>{const y=m.max>100?100:m.max;let b=y*d*d-p;b=Math.min(b,150-p),g===0?f[m.range]=b:f[m.range]=f[BP[g-1].range]+b,p=Math.min(y*d*d,150)}),c.push(f)}return C(Zh,{title:e("bmi.calculator"),mainContent:C(Mt,{children:X(Gt,{spacing:2,children:[X(Fe,{container:!0,spacing:2,children:[C(Fe,{size:{xs:12,sm:6},children:C(gn,{label:e("height"),fullWidth:!0,slotProps:{input:{endAdornment:C(ut,{children:e("cm")})}},type:"number",value:r??"",onChange:u=>o(parseFloat(u.target.value))})}),C(Fe,{size:{xs:12,sm:6},children:C(gn,{label:e("weight"),slotProps:{input:{endAdornment:C(ut,{children:e("server.kg")})}},fullWidth:!0,type:"number",value:i??"",onChange:u=>a(parseFloat(u.target.value))})})]}),l!==null&&C(ut,{variant:"h6",children:e("bmi.result",{value:l.toFixed(1)})}),C(Nf,{width:"100%",height:400,children:X(Drt,{data:c,children:[C(sl,{dataKey:"height",type:"number",domain:[140,220],unit:"cm"}),C(ll,{domain:[40,150],tickFormatter:u=>Math.round(u).toString(),unit:"kg"}),C(jh,{strokeDasharray:"3 3"}),C(ja,{formatter:(u,d)=>[Math.round(u),e("bmi."+d)]}),BP.map(u=>C(zf,{type:"monotone",dataKey:u.range,stroke:"black",fill:u.color,fillOpacity:.8},u.range)),l!==null&&C(MS,{x:r,y:i,r:8,fill:"black",stroke:"none"})]})}),X(Gt,{direction:"row",justifyContent:"center",children:[C(Ln,{height:20,width:20,sx:{backgroundColor:nP("obese")}}),e("bmi.obese"),C(Ln,{height:20,width:20,sx:{backgroundColor:nP("overweight"),marginLeft:2}}),e("bmi.overweight"),C(Ln,{height:20,width:20,sx:{backgroundColor:nP("normal"),marginLeft:2}}),e("bmi.normal"),C(Ln,{height:20,width:20,sx:{backgroundColor:nP("underweight"),marginLeft:2}}),e("bmi.underweight")]})]})})})},yAt=e=>{var r,o,i,a;const[t,n]=qe();return X(Yt,{children:[C(Ie,{sx:{paddingX:1},children:C(Yl,{alt:(r=e.item.ingredient)==null?void 0:r.name,src:(i=(o=e.item.ingredient)==null?void 0:o.image)==null?void 0:i.url,sx:{width:45,height:45},children:C(Ju,{})})}),X(Ie,{sx:{paddingX:1},children:[e.item.amountString," ",(a=e.item.ingredient)==null?void 0:a.name]}),C(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:gi(e.item.nutritionalValues.energy,n.language),kj:gi(e.item.nutritionalValues.energyKj,n.language)})}),C(Ie,{align:"right",sx:{paddingX:1},children:Cn(e.item.nutritionalValues.protein,n.language)}),C(Ie,{align:"right",sx:{paddingX:1},children:Cn(e.item.nutritionalValues.carbohydrates,n.language)}),C(Ie,{align:"right",sx:{paddingX:1},children:Cn(e.item.nutritionalValues.fat,n.language)})]},e.item.id)},VL=e=>{const[t,n]=qe();return C(Gu,{children:X(Uu,{children:[C(_h,{children:X(Yt,{children:[C(Ie,{}),C(Ie,{}),C(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.energy")}),C(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.protein")}),C(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.carbohydrates")}),C(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.fat")})]})}),X(Wu,{children:[e.items.map(r=>C(yAt,{item:r},r.id)),e.showSum&&X(Yt,{children:[C(Ie,{sx:{paddingX:1},children:" "}),C(Ie,{sx:{paddingX:1},children:t("total")}),C(Ie,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:gi(e.values.energy,n.language),kj:gi(e.values.energyKj,n.language)})}),C(Ie,{align:"right",sx:{paddingX:1},children:Cn(e.values.protein,n.language)}),C(Ie,{align:"right",sx:{paddingX:1},children:Cn(e.values.carbohydrates,n.language)}),C(Ie,{align:"right",sx:{paddingX:1},children:Cn(e.values.fat,n.language)})]})]})]})})},vAt=e=>{const[t,n]=qe();return C(Gu,{children:X(Uu,{size:"small",children:[C(_h,{children:X(Yt,{children:[C(Ie,{children:t("nutrition.macronutrient")}),C(Ie,{align:"right",children:t("nutrition.planned")}),C(Ie,{align:"right",children:t("nutrition.logged")}),C(Ie,{align:"right",children:t("nutrition.difference")})]})}),X(Wu,{children:[X(Yt,{children:[C(Ie,{children:t("nutrition.energy")}),C(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:gi(e.planned.energy,n.language),kj:gi(e.planned.energyKj,n.language)})}),C(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:gi(e.logged.energy,n.language),kj:gi(e.logged.energyKj,n.language)})}),C(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:gi(e.logged.energy-e.planned.energy,n.language),kj:gi(e.logged.energyKj-e.planned.energyKj,n.language)})})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.protein")}),C(Ie,{align:"right",children:Cn(e.planned.protein,n.language)}),C(Ie,{align:"right",children:Cn(e.logged.protein,n.language)}),C(Ie,{align:"right",children:Cn(e.logged.protein-e.planned.protein,n.language)})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.carbohydrates")}),C(Ie,{align:"right",children:Cn(e.planned.carbohydrates,n.language)}),C(Ie,{align:"right",children:Cn(e.logged.carbohydrates,n.language)}),C(Ie,{align:"right",children:Cn(e.logged.carbohydrates-e.planned.carbohydrates,n.language)})]}),X(Yt,{children:[C(Ie,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),C(Ie,{align:"right",children:Cn(e.planned.carbohydratesSugar,n.language)}),C(Ie,{align:"right",children:Cn(e.logged.carbohydratesSugar,n.language)}),C(Ie,{align:"right",children:Cn(e.logged.carbohydratesSugar-e.planned.carbohydratesSugar,n.language)})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.fat")}),C(Ie,{align:"right",children:Cn(e.planned.fat,n.language)}),C(Ie,{align:"right",children:Cn(e.logged.fat,n.language)}),C(Ie,{align:"right",children:Cn(e.logged.fat-e.planned.fat,n.language)})]}),X(Yt,{children:[C(Ie,{sx:{paddingLeft:5},children:t("nutrition.ofWhichSaturated")}),C(Ie,{align:"right",children:Cn(e.planned.fatSaturated,n.language)}),C(Ie,{align:"right",children:Cn(e.logged.fatSaturated,n.language)}),C(Ie,{align:"right",children:Cn(e.logged.fatSaturated-e.planned.fatSaturated,n.language)})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.others")}),C(Ie,{}),C(Ie,{}),C(Ie,{})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.fibres")}),C(Ie,{align:"right",children:Cn(e.planned.fiber,n.language)}),C(Ie,{align:"right",children:Cn(e.logged.fiber,n.language)}),C(Ie,{align:"right",children:Cn(e.logged.fiber-e.planned.fiber,n.language)})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.sodium")}),C(Ie,{align:"right",children:Cn(e.planned.sodium,n.language)}),C(Ie,{align:"right",children:Cn(e.logged.sodium,n.language)}),C(Ie,{align:"right",children:Cn(e.logged.sodium-e.planned.sodium,n.language)})]})]})]})})},Vq=()=>{const[e]=qe(),t=Jh(),n=parseInt(t.planId),r=new Date(t.date),o=fDe(n,t.date);return o.isLoading?C(bo,{}):C(Zh,{title:e("nutrition.nutritionalDiary"),mainContent:C(Mt,{children:X(Gt,{spacing:2,children:[C(ut,{gutterBottom:!0,variant:"h4",children:r.toLocaleDateString()}),C(vAt,{logged:o.data.loggedNutritionalValuesDate(r),planned:o.data.plannedNutritionalValues}),C(VL,{values:o.data.loggedNutritionalValuesDate(r),items:o.data.loggedEntriesDate(r),showSum:!0})]})})})};function*nM(e){let t;e<=3?t=H2e:e<=5?t=V2e:t=z2e;for(const n of t)yield n}const bAt=e=>{const[t,n]=qe(),r=nM(3),o=[{name:t("nutrition.carbohydrates"),value:e.data.carbohydrates},{name:t("nutrition.protein"),value:e.data.protein},{name:t("nutrition.fat"),value:e.data.fat}],i=Math.PI/180;return C(Nf,{width:"100%",height:300,children:X(Kre,{children:[C(Vc,{data:o,labelLine:!1,label:({cx:s,cy:l,midAngle:c,innerRadius:u,outerRadius:d,payload:f})=>{const p=u+(d-u)*.4,m=s+p*Math.cos(-c*i),g=l+p*Math.sin(-c*i);return C("text",{x:m,y:g,fill:"white",textAnchor:"middle",dominantBaseline:"central",children:Cn(f.value,n.language)})},fill:"#8884d8",dataKey:"value",children:o.map((s,l)=>C(zv,{fill:r.next().value},`cell-${l}`))}),C(Pu,{})]})})},wAt=({showPlanned:e,planned:t,today:n,avg7Days:r})=>{const[o,i]=qe(),a=nM(3),s=[{name:o("nutrition.protein"),planned:t.protein,today:n.protein,avg7Days:r.protein},{name:o("nutrition.carbohydrates"),planned:t.carbohydrates,today:n.carbohydrates,avg7Days:r.carbohydrates},{name:o("nutrition.sugar"),planned:t.carbohydratesSugar,today:n.carbohydratesSugar,avg7Days:r.carbohydratesSugar},{name:o("nutrition.fat"),planned:t.fat,today:n.fat,avg7Days:r.fat},{name:o("nutrition.saturatedFat"),planned:t.fatSaturated,today:n.fatSaturated,avg7Days:r.fatSaturated}];return C(Nf,{width:"100%",height:300,children:X(qre,{data:s,margin:{top:20,right:30,left:20,bottom:5},children:[C(jh,{strokeDasharray:"3 4"}),C(sl,{dataKey:"name"}),C(ll,{type:"number",orientation:"left",unit:o("nutrition.gramShort")}),C(ja,{formatter:l=>gi(l,i.language)}),C(Pu,{}),e&&C(Mc,{dataKey:"planned",unit:o("nutrition.gramShort"),name:o("nutrition.planned"),fill:a.next().value}),C(Mc,{dataKey:"today",unit:o("nutrition.gramShort"),name:o("nutrition.today"),fill:a.next().value}),C(Mc,{dataKey:"avg7Days",unit:o("nutrition.gramShort"),name:o("nutrition.7dayAvg"),fill:a.next().value})]})})},xAt=e=>{const[t,n]=qe();return C(Gu,{children:X(Uu,{size:"small",children:[C(_h,{children:X(Yt,{children:[C(Ie,{children:t("date")}),C(Ie,{align:"right",children:t("nutrition.logged")}),C(Ie,{align:"right",children:t("nutrition.difference")})]})}),C(Wu,{children:Array.from(e.logged).map(([r])=>{var o,i;return X(Yt,{children:[C(Ie,{children:C(zs,{to:Pn(wn.NUTRITION_DIARY,n.language,{id:e.planId,date:r}),children:new Date(r).toLocaleDateString(n.language)})}),C(Ie,{align:"right",children:t("nutrition.valueEnergyKcal",{value:gi((o=e.logged.get(r))==null?void 0:o.nutritionalValues.energy,n.language)})}),C(Ie,{align:"right",children:gi(((i=e.logged.get(r))==null?void 0:i.nutritionalValues.energy)-e.planned.energy,n.language)})]},r)})})]})})},SAt=()=>{const[e]=qe(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1);return X("div",{children:[C(Rh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Gi,{})}),C(Yi,{title:e("add"),isOpen:t,closeFn:o,children:C(KB,{closeFn:o})})]})},CAt=e=>{const[t]=qe(),[n,r]=Y.useState(!1),o=()=>r(!0),i=()=>r(!1);return X("div",{children:[C(Rh,{color:"secondary","aria-label":"add",onClick:o,sx:{position:"fixed",bottom:"5rem",right:a=>a.spacing(2),zIndex:9},children:C(hS,{})}),C(Yi,{title:t("nutrition.addNutritionalDiary"),isOpen:n,closeFn:i,children:C(qB,{closeFn:i,planId:e.plan.id,meals:e.plan.meals})})]})},Tce=({meal:e,planId:t,closeFn:n})=>{const[r,o]=qe(),i=vDe(t),a=wDe(t),s=dl({name:Nc().required().max(25,r("forms.maxLength",{chars:"25"})).min(3,r("forms.minLength",{chars:"3"})),time:US().required()});return C(cl,{initialValues:{name:e?e.name:"",time:e?e.time:new Date},validationSchema:s,onSubmit:async l=>{l.time instanceof Date||(l.time=l.time.toJSDate());const c={...l,time:h2e(l.time)};e?a.mutate({...c,plan:t,id:e.id}):i.mutate({...c,plan:t}),n&&n()},children:l=>C(as,{children:X(Gt,{spacing:2,children:[C(gn,{fullWidth:!0,id:"name",label:r("description"),error:l.touched.name&&!!l.errors.name,helperText:l.touched.name&&l.errors.name,...l.getFieldProps("name")}),C(RS,{dateAdapter:Ok,adapterLocale:o.language,children:C(mct,{label:r("timeOfDay"),value:l.values.time!==null?It.fromJSDate(l.values.time):null,onChange:c=>l.setFieldValue("time",c)})}),X(Gt,{direction:"row",justifyContent:"end",spacing:2,children:[n!==void 0&&C(yt,{color:"primary",variant:"outlined",onClick:()=>n(),children:r("close")}),C(yt,{disabled:i.isPending||a.isPending,color:"primary",variant:"contained",type:"submit",children:r("submit")})]})]})})})},PAt=e=>{const[t]=qe(),n=nM(3),r=[{name:t("nutrition.energy"),value:e.logged.energy/e.planned.energy*100},{name:t("nutrition.protein"),value:e.logged.protein/e.planned.protein*100},{name:t("nutrition.carbohydrates"),value:e.logged.carbohydrates/e.planned.carbohydrates*100},{name:t("nutrition.fat"),value:e.logged.fat/e.planned.fat*100}];return C(Nf,{width:"100%",height:150,children:X(qre,{data:r,layout:"vertical",margin:{left:60},children:[C(jh,{strokeDasharray:"3 4"}),C(sl,{type:"number",unit:"%"}),C(ll,{type:"category",dataKey:"name"}),C(Mc,{dataKey:"value",unit:"%",fill:n.next().value})]})})},Oce=({planId:e,item:t,mealId:n,closeFn:r})=>{const[o]=qe(),i=PDe(e),a=EDe(e),s=TDe(e),l=()=>{t&&s.mutate(t.id),r&&r()},c=dl({amount:sa().required(o("forms.fieldRequired")).max(1e3,o("forms.maxValue",{value:"1000"})).min(1,o("forms.minValue",{value:"1"})),ingredient:sa().required(o("forms.fieldRequired"))});return C(cl,{initialValues:{amount:t?t.amount:0,ingredient:t?t.ingredientId:0},validationSchema:c,onSubmit:async u=>{const d={...u,meal:n,weight_unit:null};t?a.mutate({...d,id:t.id}):i.mutate(d),r&&r()},children:u=>{var d;return C(as,{children:X(Gt,{spacing:2,children:[C($B,{callback:f=>u.setFieldValue("ingredient",f?f.data.id:null),initialIngredient:t?(d=t.ingredient)==null?void 0:d.name:null}),C(gn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:C(co,{position:"end",children:o("nutrition.gramShort")})},error:u.touched.amount&&!!u.errors.amount,helperText:u.touched.amount&&u.errors.amount,...u.getFieldProps("amount")}),X(Gt,{direction:"row",justifyContent:"end",spacing:2,children:[r!==void 0&&t!==void 0&&C(yt,{color:"error",variant:"outlined",onClick:l,children:o("delete")}),r!==void 0&&C(yt,{color:"primary",variant:"outlined",onClick:()=>r(),children:o("close")}),C(yt,{color:"primary",variant:"contained",type:"submit",children:o("submit")})]})]})})}})},EAt=e=>{const t=_Z(e.planId),n=bDe(e.planId),[r]=qe(),[o,i]=Y.useState(!1),[a,s]=v.useState(null),[l,c]=v.useState(!1),[u,d]=v.useState(!1),f=!!a,p=k=>{s(k.currentTarget)},m=()=>{g(),x()},g=()=>{s(null)},y=()=>{P(),s(null)},b=()=>{n.mutate(e.meal.id)},x=()=>c(!0),S=()=>c(!1),P=()=>d(!0),E=()=>d(!1),T=(k,M)=>{M!=="clickaway"&&i(!1)},O=()=>{const k=e.meal.items.map(M=>({plan:e.planId,meal:e.meal.id,mealItem:M.id,ingredient:M.ingredientId,weight_unit:M.weightUnitId,datetime:new Date().toISOString(),amount:M.amount}));t.mutate(k),i(!0)};return X(Mt,{children:[!e.onlyLogging&&C(Xl,{title:r("nutrition.logThisMeal"),children:C(An,{"aria-label":"settings",onClick:O,children:C(hS,{})})}),C(An,{"aria-label":"settings",onClick:p,children:C(GS,{})}),C(An,{"aria-label":"settings",onClick:e.handleExpanded,children:e.isExpanded?C(Wae,{}):C(Gae,{})}),X(is,{anchorEl:a,open:f,onClose:g,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(tn,{onClick:m,children:r("edit")}),C(tn,{onClick:y,children:r("delete")})]}),C(Yi,{title:r("edit"),isOpen:l,closeFn:S,children:C(Tce,{meal:e.meal,closeFn:S,planId:e.planId})}),C(Rz,{title:r("deleteConfirmation",{name:e.meal.name}),message:r("nutrition.mealDeleteInfo"),isOpen:u,closeFn:E,deleteFn:b}),C(HJ,{open:o,autoHideDuration:kZ,onClose:T,children:C(Bu,{onClose:T,severity:"success",sx:{width:"100%"},children:r("nutrition.diaryEntrySaved")})})]})},TAt=e=>{var o,i,a,s;const[t,n]=v.useState(!1),r=()=>n(!t);return X(Mt,{children:[X(Ja,{children:[C(kF,{onClick:r,sx:{"&:hover":{cursor:"pointer"}},children:C(Yl,{alt:(o=e.mealItem.ingredient)==null?void 0:o.name,src:(a=(i=e.mealItem.ingredient)==null?void 0:i.image)==null?void 0:a.url,sx:{width:45,height:45},children:C(Ju,{})})}),C(go,{primary:`${e.mealItem.amountString} ${(s=e.mealItem.ingredient)==null?void 0:s.name}`})]}),C(Ws,{in:t,timeout:"auto",unmountOnExit:!0,sx:{width:"100%"},children:C(Ja,{children:C(go,{children:C(Oce,{planId:e.planId,mealId:e.mealId,item:e.mealItem,closeFn:r})})})})]})},Hq=e=>{const t=Ao(),n=e.meal.id!==IP,[r]=qe(),[o,i]=v.useState(!1),a=()=>i(!o),[s,l]=v.useState(!1),c=()=>{l(!s),d(!1)},[u,d]=v.useState(!1),f=()=>{d(!u),l(!1)};return X(io,{children:[C(Zl,{sx:{bgcolor:t.palette.grey[300]},action:e.meal.id!==IP&&C(EAt,{meal:e.meal,planId:e.planId,onlyLogging:e.onlyLogging,isExpanded:o,handleExpanded:a}),title:e.meal.name,subheader:e.meal.timeHHMMLocale}),X(wi,{sx:{paddingY:0},children:[X(Ws,{in:o,timeout:"auto",unmountOnExit:!0,children:[!e.onlyLogging&&C(VL,{showSum:n,items:e.meal.items,values:e.meal.plannedNutritionalValues}),C(ut,{gutterBottom:!0,variant:"h6",sx:{my:2},children:r("nutrition.loggedToday")}),!e.meal.plannedNutritionalValues.isEmpty&&C(PAt,{logged:e.meal.loggedNutritionalValuesToday,planned:e.meal.plannedNutritionalValues}),C(VL,{showSum:n,items:e.meal.diaryEntriesToday,values:e.meal.loggedNutritionalValuesToday})]}),!o&&C(ol,{children:e.meal.items.map(p=>C(TAt,{mealItem:p,planId:e.planId,mealId:e.meal.id},p.id))})]}),X(os,{children:[!e.onlyLogging&&C(Xl,{title:r("nutrition.addMealItem"),children:C(An,{onClick:c,children:C(Gi,{})})}),C(Xl,{title:r("nutrition.addNutritionalDiary"),children:C(An,{onClick:f,children:C(hS,{})})})]}),C(Ws,{in:s,timeout:"auto",unmountOnExit:!0,children:X(wi,{sx:{paddingY:0},children:[C("p",{children:C("b",{children:r("nutrition.addMealItem")})}),C(Oce,{planId:e.planId,mealId:e.meal.id,closeFn:c})]})}),C(Ws,{in:u,timeout:"auto",unmountOnExit:!0,children:X(wi,{sx:{paddingY:0},children:[C("p",{children:C("b",{children:r("nutrition.addNutritionalDiary")})}),C(qB,{closeFn:f,planId:e.planId,mealId:e.meal.id!==IP?e.meal.id:null})]})})]})},Uq=e=>{const[t,n]=qe();return C(Gu,{children:X(Uu,{size:"small",children:[C(_h,{children:X(Yt,{children:[C(Ie,{children:t("nutrition.macronutrient")}),C(Ie,{align:"right",children:t("total")}),C(Ie,{align:"right",children:t("nutrition.percentEnergy")})]})}),X(Wu,{children:[X(Yt,{children:[C(Ie,{children:t("nutrition.energy")}),C(Ie,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:gi(e.values.energy,n.language),kj:gi(e.values.energyKj,n.language)})}),C(Ie,{align:"right"})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.protein")}),C(Ie,{align:"right",children:Cn(e.values.protein,n.language)}),C(Ie,{align:"right",children:u$(e.values.percent.protein,n.language)})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.carbohydrates")}),C(Ie,{align:"right",children:Cn(e.values.carbohydrates,n.language)}),C(Ie,{align:"right",children:u$(e.values.percent.carbohydrates,n.language)})]}),X(Yt,{children:[C(Ie,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),C(Ie,{align:"right",children:Cn(e.values.carbohydratesSugar,n.language)}),C(Ie,{align:"right"})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.fat")}),C(Ie,{align:"right",children:Cn(e.values.fat,n.language)}),C(Ie,{align:"right",children:u$(e.values.percent.fat,n.language)})]}),X(Yt,{children:[C(Ie,{sx:{pl:5},children:t("nutrition.ofWhichSaturated")}),C(Ie,{align:"right",children:Cn(e.values.fatSaturated,n.language)}),C(Ie,{align:"right"})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.others")}),C(Ie,{children:" "}),C(Ie,{align:"right"})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.fibres")}),C(Ie,{align:"right",children:Cn(e.values.fiber,n.language)}),C(Ie,{align:"right"})]}),X(Yt,{children:[C(Ie,{children:t("nutrition.sodium")}),C(Ie,{align:"right",children:Cn(e.values.sodium,n.language)}),C(Ie,{align:"right"})]})]})]})})},OAt=e=>{const t=hDe(e.plan.id),n=Qh(),[r,o]=qe(),[i,a]=Y.useState(null),[s,l]=Y.useState(!1),[c,u]=Y.useState(!1),d=!!i,f=O=>{a(O.currentTarget)},p=()=>{m(),S()},m=()=>{a(null)},g=()=>{E(),a(null)},y=()=>{t.mutate(e.plan.id),n(Pn(wn.NUTRITION_OVERVIEW))},b=()=>window.location.href=Pn(wn.NUTRITION_PLAN_PDF,o.language,{id:e.plan.id}),x=()=>window.location.href=Pn(wn.NUTRITION_PLAN_COPY,o.language,{id:e.plan.id}),S=()=>l(!0),P=()=>l(!1),E=()=>u(!0),T=()=>u(!1);return X(Mt,{children:[C(yt,{onClick:f,children:C(qae,{})}),X(is,{anchorEl:i,open:d,onClose:m,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(tn,{onClick:p,children:r("edit")}),C(tn,{onClick:b,children:r("downloadAsPdf")}),C(tn,{onClick:x,children:r("nutrition.copyPlan")}),C(tn,{onClick:g,children:r("delete")})]}),C(Yi,{title:r("edit"),isOpen:s,closeFn:P,children:C(KB,{plan:e.plan,closeFn:P})}),C(Rz,{title:r("deleteConfirmation",{name:e.plan.description}),message:r("nutrition.planDeleteInfo"),isOpen:c,closeFn:T,deleteFn:y})]})},IAt=e=>{const[t]=qe(),n=e.plan.plannedNutritionalValues,r=e.plan.loggedNutritionalValuesToday,o=e.plan.percentageValuesLoggedToday;return C(Mt,{children:X(Gt,{direction:"column",spacing:1,children:[C(ut,{gutterBottom:!0,variant:"h6",children:t("nutrition.goalsTitle")}),C(Vg,{title:t("nutrition.protein"),percentage:o.protein,logged:r.protein,planned:n.protein}),C(Vg,{title:t("nutrition.carbohydrates"),percentage:o.carbohydrates,logged:r.carbohydrates,planned:n.carbohydrates}),C(Vg,{title:t("nutrition.fat"),percentage:o.fat,logged:r.fat,planned:n.fat})]})})},kAt=()=>{const[e]=qe(),t=Jh(),n=parseInt(t.planId),r=dDe(n),[o,i]=v.useState(!1),a=()=>i(!o),s=r.data;return r.isLoading?C(bo,{}):C(Zh,{title:s.description,optionsMenu:C(OAt,{plan:s}),mainContent:C(Mt,{children:X(Gt,{spacing:2,children:[s.meals.map(l=>C(Hq,{meal:l,planId:s.id,onlyLogging:s.onlyLogging},l.id)),C(Hq,{meal:r.data.pseudoMealOthers(e("nutrition.pseudoMealTitle")),planId:s.id,onlyLogging:!0},-1),!s.onlyLogging&&X(Mt,{children:[C(Xl,{title:e("nutrition.addMeal"),children:C(An,{onClick:a,children:C(Gi,{})})}),X(Ws,{in:o,timeout:"auto",unmountOnExit:!0,children:[C("p",{children:C("b",{children:e("nutrition.addMeal")})}),C(Tce,{planId:s.id,closeFn:a})]})]}),C(Uq,{values:s.plannedNutritionalValues}),s.hasAnyPlanned&&C(bAt,{data:s.plannedNutritionalValues}),C(ut,{gutterBottom:!0,variant:"h4",children:e("nutrition.logged")}),C(wAt,{showPlanned:s.hasAnyPlanned,planned:s.plannedNutritionalValues,today:s.loggedNutritionalValuesToday,avg7Days:s.loggedNutritionalValues7DayAvg}),C(Uq,{values:s.loggedNutritionalValuesToday}),C(xAt,{planId:s.id,logged:s.groupDiaryEntries,planned:s.plannedNutritionalValues})]})}),sideBar:C(IAt,{plan:s}),fab:C(CAt,{plan:s})})},MAt=()=>{var n;const e=cDe(),[t]=qe();return e.isLoading?C(bo,{}):C(Zh,{title:t("nutrition.plans"),mainContent:X(Gt,{spacing:2,children:[((n=e.data)==null?void 0:n.length)===0&&C(cI,{}),C($At,{plans:e.data})]}),fab:C(SAt,{})})},AAt=e=>{const[t,n]=qe(),r=Pn(wn.NUTRITION_DETAIL,n.language,{id:e.plan.id});return X(Mt,{children:[C(Ja,{sx:{p:0},children:X(Df,{component:"a",href:r,children:[C(go,{primary:e.plan.description!==""?e.plan.description:t("routines.routine"),secondary:e.plan.creationDate.toLocaleDateString()}),C(Hae,{})]})}),C(Qa,{component:"li"})]})},$At=e=>C(so,{children:C(ol,{sx:{py:0},children:e.plans.map(t=>C(AAt,{plan:t},t.id))},"abc")}),RAt=e=>{var u;const[t,n]=qe(),[r,o]=Y.useState(null),i=!!r,a=d=>{o(d.currentTarget)},s=()=>{o(null)},l=()=>window.location.href=Pn(wn.ROUTINE_EDIT_LOG,n.language,{id:e.log.id}),c=()=>window.location.href=Pn(wn.ROUTINE_DELETE_LOG,n.language,{id:e.log.id});return X(Yt,{children:[C(Ie,{component:"th",scope:"row",children:It.fromJSDate(e.log.date).toLocaleString(It.DATE_MED)}),C(Ie,{children:e.log.reps}),X(Ie,{children:[e.log.weight,(u=e.log.weightUnitObj)==null?void 0:u.name]}),C(Ie,{children:e.log.rirString}),X(Ie,{children:[C(An,{"aria-label":"settings",onClick:a,children:C(GS,{fontSize:"small"})}),X(is,{id:"basic-menu",anchorEl:r,open:i,onClose:s,MenuListProps:{"aria-labelledby":"basic-button"},children:[X(tn,{onClick:l,children:[C(Uae,{}),t("edit")]}),X(tn,{onClick:c,children:[C(YB,{}),t("delete")]})]})]})]},e.log.id)},DAt=e=>{let t=e.logEntries??[];const n=[5,10,20],[r,o]=Y.useState(n[0]),[i,a]=Y.useState(0),s=(c,u)=>{a(u)},l=c=>{o(parseInt(c.target.value,10)),a(0)};return X(Mt,{children:[C(ut,{variant:"h6",sx:{mt:4},children:e.exerciseId.getTranslation().name}),X(Fe,{container:!0,spacing:2,children:[C(Fe,{size:{xs:12,md:5},children:X(Gu,{children:[X(Uu,{"aria-label":"simple table",size:"small",children:[C(_h,{children:X(Yt,{children:[C(Ie,{children:"Date"}),C(Ie,{children:"Reps"}),C(Ie,{children:"Weight"}),C(Ie,{children:"RiR"}),C(Ie,{})]})}),C(Wu,{children:t.slice(i*r,i*r+r).map(c=>C(RAt,{log:c},c.id))})]}),C(RF,{rowsPerPageOptions:n,component:"div",count:t.length,rowsPerPage:r,page:i,onPageChange:s,onRowsPerPageChange:l})]})}),C(Fe,{size:{xs:12,md:7},children:C(NAt,{data:t},e.exerciseId.id)})]})]})},Wq=()=>{const e=Jh(),t=e.routineId?parseInt(e.routineId):0,[n,r]=qe(),o=fyt(t,!1),i=Kae(t),a=l=>window.location.href=Pn(wn.ROUTINE_ADD_LOG,r.language,{id:l});let s=new Map;return o.isSuccess&&(s=o.data.reduce(function(l,c){return l.set(c.exerciseId,l.get(c.exerciseId)||[]),[A2e,$2e].includes(c.weightUnit)&&c.repetitionUnit===OZ&&l.get(c.exerciseId).push(c),l},new Map)),C(Mt,{children:X(Vu,{maxWidth:"lg",children:[C(ut,{variant:"h4",children:n("routines.logsHeader")}),C(ut,{variant:"body1",children:n("routines.logsFilterNote")}),o.isSuccess&&i.isSuccess?C(Mt,{children:i.data.days.map(l=>X("div",{children:[X(Gt,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:"center",sx:{mt:4},children:[C(ut,{variant:"h4",children:l.description}),C(yt,{variant:"contained",onClick:()=>a(l.id),children:n("routines.addLogToDay")})]}),l.sets.map(c=>c.exercises.map(u=>C(DAt,{exerciseId:u,logEntries:s.get(u.id)},c.id+u.uuid)))]},l.id))}):C(bo,{})]})})},_At=e=>e.map(t=>({id:t.id,value:t.weight,time:t.date.getTime(),entry:t})),LAt=({active:e,payload:t,label:n})=>{var r,o,i;if(e){let a="";return(r=t==null?void 0:t[1].payload)!=null&&r.entry.rir&&(a=`, ${(o=t==null?void 0:t[1].payload)==null?void 0:o.entry.rir} RiR`),C(io,{children:X(wi,{children:[C(ut,{variant:"body1",children:It.fromMillis(t==null?void 0:t[0].value).toLocaleString(It.DATE_MED)}),X(ut,{variant:"body2",children:[(i=t==null?void 0:t[1].payload)==null?void 0:i.entry.reps," × ",t==null?void 0:t[1].value,t==null?void 0:t[1].unit,a]})]})})}return null},NAt=e=>{let t;t=e.data.reduce(function(r,o){return r.set(o.reps,r.get(o.reps)||[]),r.get(o.reps).push(o),r},new Map);const n=nM(t.size);return C(Ln,{children:C(Nf,{width:"100%",height:250,children:X(Rrt,{children:[C(sl,{dataKey:"time",domain:["auto","auto"],name:"Time",tickFormatter:r=>It.fromMillis(r).toLocaleString(It.DATE_MED),type:"number"}),C(ll,{domain:["auto","auto"],dataKey:"value",name:"Value",unit:"kg"}),Array.from(t).map(([r,o])=>{const i=n.next().value,a=_At(o);return C(AS,{data:a,fill:i,line:{stroke:i},lineType:"joint",lineJointType:"monotoneX",name:r.toString()},r)}),C(ja,{content:C(LAt,{})}),C(jh,{strokeDasharray:"3 3"}),C(Pu,{})]})})})},FAt=()=>C("div",{children:C(Rh,{color:"secondary","aria-label":"add",onClick:()=>window.location.href=Pn(wn.ROUTINE_ADD),sx:{position:"fixed",bottom:"5rem",right:t=>t.spacing(2),zIndex:9},children:C(Gi,{})})}),jAt=e=>{const[t,n]=qe(),r=Pn(wn.ROUTINE_DETAIL,n.language,{id:e.routine.id});return X(Mt,{children:[C(Ja,{sx:{p:0},children:X(Df,{component:"a",href:r,children:[C(go,{primary:e.routine.name!==""?e.routine.name:t("routines.routine"),secondary:e.routine.date.toLocaleDateString()}),C(Hae,{})]})}),C(Qa,{component:"li"})]})},Gq=()=>{const e=pyt(),[t]=qe();return X(Vu,{maxWidth:"lg",children:[X(Fe,{container:!0,children:[X(Fe,{size:{xs:12,sm:8},children:[C(ut,{gutterBottom:!0,variant:"h3",component:"div",children:t("routines.routines")}),e.isLoading?C(bo,{}):C(so,{children:C(ol,{sx:{py:0},children:e.data.map(n=>C(jAt,{routine:n},n.id))},"abc")})]}),C(Fe,{size:{xs:12,sm:4}})]}),C(FAt,{})]})},CR=()=>C(Qwt,{}),Dz=()=>X(nvt,{children:[X(Lt,{path:"/:lang",children:[X(Lt,{path:"workout",children:[C(Lt,{path:"overview",element:C(Xxt,{})}),C(Lt,{path:"schedule",element:C(Qxt,{})}),C(Lt,{path:"gallery",element:C(Mxt,{})}),X(Lt,{path:"template",children:[C(Lt,{path:"overview",element:C(Lxt,{})}),C(Lt,{path:"public",element:C(Dxt,{})})]})]}),X(Lt,{path:"routine",children:[C(Lt,{index:!0,element:C(Gq,{})}),C(Lt,{path:"overview",element:C(Gq,{})}),C(Lt,{path:"calendar",element:C(Oxt,{})}),C(Lt,{path:":routineId",element:C(u7,{}),children:C(Lt,{path:"view",element:C(u7,{})})}),C(Lt,{path:"log",children:C(Lt,{path:":routineId",element:C(Wq,{}),children:C(Lt,{path:"view",element:C(Wq,{})})})})]}),X(Lt,{path:"measurement",children:[C(Lt,{index:!0,element:C(zq,{})}),C(Lt,{path:"overview",element:C(zq,{})}),C(Lt,{path:"category/:categoryId",element:C(hAt,{})})]}),X(Lt,{path:"exercise",children:[C(Lt,{index:!0,element:C(_7,{})}),C(Lt,{path:"overview",element:C(_7,{})}),C(Lt,{path:":baseID",element:C(CR,{}),children:C(Lt,{path:"view-base",element:C(CR,{}),children:C(Lt,{path:":slug",element:C(CR,{})})})}),C(Lt,{path:"contribute",element:C(pxt,{})})]}),X(Lt,{path:"weight",children:[C(Lt,{path:"overview",element:C(Qse,{})}),C(Lt,{path:"add",element:C(hxt,{})})]}),X(Lt,{path:"nutrition",children:[C(Lt,{path:"overview",element:C(MAt,{})}),X(Lt,{path:":planId",children:[C(Lt,{path:"view",element:C(kAt,{})}),C(Lt,{path:":date",element:C(Vq,{})}),C(Lt,{path:"diary",element:C(Vq,{})})]}),X(Lt,{path:"calculator",children:[C(Lt,{path:"bmi",element:C(gAt,{})}),C(Lt,{path:"calories",element:C(Ixt,{})})]}),C(Lt,{path:"ingredient",children:C(Lt,{path:"overview",element:C(Axt,{})})})]}),X(Lt,{path:"software",children:[C(Lt,{path:"about-us",element:C(O0t,{})}),C(Lt,{path:"api",element:C(_xt,{})}),C(Lt,{path:"equipment",element:C(kxt,{})})]}),C(Lt,{path:"login",element:C($xt,{})}),C(Lt,{path:"user",children:C(Lt,{path:"preferences",element:C(Rxt,{})})})]}),C(Lt,{path:"/",element:C(Jxt,{})}),C(Lt,{path:"*",element:C("main",{style:{padding:"1rem"},children:C("p",{children:"404, Page NOT FOUND"})})})]}),BAt="_notification_bbb61_1",qq={notification:BAt},zAt=()=>{const[e,t]=N0t(),n=()=>{t(T7({notify:!1,message:"",severity:void 0,title:"",type:void 0}))},r=()=>{t(T7({notify:!1,message:"",severity:void 0,title:"",type:void 0,undo:!0}))};return e.notification.notify?e.notification.type==="delete"?X(Bu,{className:qq.notification,severity:e.notification.severity,action:C(yt,{color:"inherit",size:"small",onClick:r,children:"UNDO"}),variant:"filled",children:[C(CE,{children:e.notification.title}),C("strong",{children:e.notification.message})]}):X(Bu,{className:qq.notification,severity:e.notification.severity,onClose:()=>n(),variant:"filled",children:[C(CE,{children:e.notification.title}),C("strong",{children:e.notification.message})]}):null};function VAt(){return X(Fe,{container:!0,children:[C(Fe,{size:12,children:C(Yxt,{})}),C(Fe,{size:12,children:C(zAt,{})}),C(Fe,{size:12,children:C(Dz,{})})]})}const Xt=e=>typeof e=="string",m0=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},Kq=e=>e==null?"":""+e,HAt=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},UAt=/###/g,Yq=e=>e&&e.indexOf("###")>-1?e.replace(UAt,"."):e,Xq=e=>!e||Xt(e),gw=(e,t,n)=>{const r=Xt(t)?t.split("."):t;let o=0;for(;o{const{obj:r,k:o}=gw(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],a=t.slice(0,t.length-1),s=gw(e,a,Object);for(;s.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=gw(e,a,Object),s&&s.obj&&typeof s.obj[`${s.k}.${i}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},WAt=(e,t,n,r)=>{const{obj:o,k:i}=gw(e,t,Object);o[i]=o[i]||[],o[i].push(n)},iO=(e,t)=>{const{obj:n,k:r}=gw(e,t);if(n)return n[r]},GAt=(e,t,n)=>{const r=iO(e,n);return r!==void 0?r:iO(t,n)},Ice=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Xt(e[r])||e[r]instanceof String||Xt(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Ice(e[r],t[r],n):e[r]=t[r]);return e},Km=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var qAt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const KAt=e=>Xt(e)?e.replace(/[&<>"'\/]/g,t=>qAt[t]):e;class YAt{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const XAt=[" ",",","?","!",";"],QAt=new YAt(20),JAt=(e,t,n)=>{t=t||"",n=n||"";const r=XAt.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=QAt.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!o.test(e);if(!i){const a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i},HL=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;i-1&&le&&e.replace("_","-"),ZAt={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class sO{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||ZAt,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{let[s,l]=a;for(let c=0;c{let[s,l]=a;for(let c=0;c1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):Xt(r)&&i?s.push(...r.split(i)):s.push(r)));const l=iO(this.data,s);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),l||!a||!Xt(r)?l:HL(this.data&&this.data[t]&&this.data[t][n],r,i)}addResource(t,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),o=n,n=s[1]),this.addNamespaces(n),Qq(this.data,s,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(Xt(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=iO(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Ice(l,r,i):l={...l,...r},Qq(this.data,s,l),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var kce={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{this.processors[i]&&(t=this.processors[i].process(t,n,r,o))}),t}};const Zq={};class lO extends rM{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),HAt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Cc.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!JAt(t,r,o);if(a&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:i};const c=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),t=c.join(o)}return Xt(i)&&(i=[i]),{key:t,namespaces:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const P=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${P}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${P}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a}const d=this.resolve(t,n);let f=d&&d.res;const p=d&&d.usedKey||a,m=d&&d.exactUsedKey||a,g=Object.prototype.toString.apply(f),y=["[object Number]","[object Function]","[object RegExp]"],b=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!Xt(f)&&typeof f!="boolean"&&typeof f!="number";if(x&&f&&S&&y.indexOf(g)<0&&!(Xt(b)&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,f,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(d.res=P,d.usedParams=this.getUsedParamsDetails(n),d):P}if(i){const P=Array.isArray(f),E=P?[]:{},T=P?m:p;for(const O in f)if(Object.prototype.hasOwnProperty.call(f,O)){const k=`${T}${i}${O}`;E[O]=this.translate(k,{...n,joinArrays:!1,ns:s}),E[O]===k&&(E[O]=f[O])}f=E}}else if(x&&Xt(b)&&Array.isArray(f))f=f.join(b),f&&(f=this.extendTranslation(f,t,n,r));else{let P=!1,E=!1;const T=n.count!==void 0&&!Xt(n.count),O=lO.hasDefaultValue(n),k=T?this.pluralResolver.getSuffix(c,n.count,n):"",M=n.ordinal&&T?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",I=T&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),R=I&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${k}`]||n[`defaultValue${M}`]||n.defaultValue;!this.isValidLookup(f)&&O&&(P=!0,f=R),this.isValidLookup(f)||(E=!0,f=a);const N=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:f,B=O&&R!==f&&this.options.updateMissing;if(E||P||B){if(this.logger.log(B?"updateKey":"missingKey",c,l,a,B?R:f),i){const V=this.resolve(a,{...n,keySeparator:!1});V&&V.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let L=[];const F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&F&&F[0])for(let V=0;V{const G=O&&W!==f?W:N;this.options.missingKeyHandler?this.options.missingKeyHandler(V,l,z,G,B,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(V,l,z,G,B,n),this.emit("missingKey",V,l,z,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?L.forEach(V=>{const z=this.pluralResolver.getSuffixes(V,n);I&&n[`defaultValue${this.options.pluralSeparator}zero`]&&z.indexOf(`${this.options.pluralSeparator}zero`)<0&&z.push(`${this.options.pluralSeparator}zero`),z.forEach(W=>{U([V],a+W,n[`defaultValue${W}`]||R)})}):U(L,a,R))}f=this.extendTranslation(f,t,n,d,r),E&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(E||P)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,P?f:void 0):f=this.options.parseMissingKeyHandler(f))}return o?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,o,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=Xt(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const f=t.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&!Xt(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language||o.usedLng,r),c){const f=t.match(this.interpolator.nestingRegexp),p=f&&f.length;u1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,a,s;return Xt(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;o=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!Xt(n.count),p=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),m=n.context!==void 0&&(Xt(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(y=>{this.isValidLookup(r)||(s=y,!Zq[`${g[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(Zq[`${g[0]}-${y}`]=!0,this.logger.warn(`key "${o}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(b=>{if(this.isValidLookup(r))return;a=b;const x=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(x,u,b,y,n);else{let P;f&&(P=this.pluralResolver.getSuffix(b,n.count,n));const E=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(x.push(u+P),n.ordinal&&P.indexOf(T)===0&&x.push(u+P.replace(T,this.options.pluralSeparator)),p&&x.push(u+E)),m){const O=`${u}${this.options.contextSeparator}${n.context}`;x.push(O),f&&(x.push(O+P),n.ordinal&&P.indexOf(T)===0&&x.push(O+P.replace(T,this.options.pluralSeparator)),p&&x.push(O+E))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(i=S,r=this.getResource(b,y,S,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Xt(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const PR=e=>e.charAt(0).toUpperCase()+e.slice(1);class eK{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Cc.create("languageUtils")}getScriptPartFromCode(t){if(t=aO(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=aO(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Xt(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let o=Intl.getCanonicalLocales(t)[0];if(o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o)return o}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=PR(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=PR(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=PR(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&(i.indexOf("-")>0&&o.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===o||i.indexOf(o)===0&&o.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Xt(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],i=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Xt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):Xt(t)&&i(this.formatLanguageCode(t)),r.forEach(a=>{o.indexOf(a)<0&&i(this.formatLanguageCode(a))}),o}}let e$t=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],t$t={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const n$t=["v1","v2","v3"],r$t=["v4"],tK={zero:0,one:1,two:2,few:3,many:4,other:5},o$t=()=>{const e={};return e$t.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:t$t[t.fc]}})}),e};class i$t{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Cc.create("pluralResolver"),(!this.options.compatibilityJSON||r$t.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=o$t(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=aO(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];const a=new Intl.PluralRules(r,{type:o});return this.pluralRulesCache[i]=a,a}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,i)=>tK[o]-tK[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!n$t.includes(this.options.compatibilityJSON)}}const nK=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=GAt(e,t,n);return!i&&o&&Xt(n)&&(i=HL(e,n,r),i===void 0&&(i=HL(t,n,r))),i},ER=e=>e.replace(/\$/g,"$$$$");class a$t{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Cc.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:a,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:g,nestingOptionsSeparator:y,maxReplaces:b,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:KAt,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Km(i):a||"{{",this.suffix=s?Km(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?Km(f):p||Km("$t("),this.nestingSuffix=m?Km(m):g||Km(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=b||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(p.indexOf(this.formatSeparator)<0){const b=nK(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,r,{...o,...n,interpolationkey:p}):b}const m=p.split(this.formatSeparator),g=m.shift().trim(),y=m.join(this.formatSeparator).trim();return this.format(nK(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:g})};this.resetRegExp();const u=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>ER(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?ER(this.escape(p)):ER(p)}].forEach(p=>{for(s=0;i=p.regex.exec(t);){const m=i[1].trim();if(a=c(m),a===void 0)if(typeof u=="function"){const y=u(t,i,o);a=Xt(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,m))a="";else if(d){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),a="";else!Xt(a)&&!this.useRawValueToEscape&&(a=Kq(a));const g=p.safeValue(a);if(t=t.replace(i[0],g),d?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,a;const s=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${u}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);const p=f.match(/'/g),m=f.match(/"/g);(p&&p.length%2===0&&!m||m.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),c&&(a={...c,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${u}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;o=this.nestingRegexp.exec(t);){let l=[];a={...r},a=a.replace&&!Xt(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const u=o[1].split(this.formatSeparator).map(d=>d.trim());o[1]=u.shift(),l=u,c=!0}if(i=n(s.call(this,o[1].trim(),a),a),i&&o[0]===t&&!Xt(i))return i;Xt(i)||(i=Kq(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),c&&(i=l.reduce((u,d)=>this.format(u,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const s$t=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[s,...l]=a.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=s.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},Ym=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(aO(r),o),t[a]=s),s(n)}};class l$t{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Cc.create("formatter"),this.options=t,this.formats={number:Ym((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:Ym((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:Ym((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:Ym((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:Ym((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Ym(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(s=>s.indexOf(")")>-1)){const s=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,s)].join(this.formatSeparator)}return i.reduce((s,l)=>{const{formatName:c,formatOptions:u}=s$t(l);if(this.formats[c]){let d=s;try{const f=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},p=f.locale||f.lng||o.locale||o.lng||r;d=this.formats[c](s,p,{...u,...o,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return s},t)}}const c$t=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class u$t extends rM{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Cc.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const i={},a={},s={},l={};return t.forEach(c=>{let u=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,u=!1,a[f]===void 0&&(a[f]=!0),i[f]===void 0&&(i[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(s[c]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),i=o[0],a=o[1];n&&this.emit("failedLoading",i,a,n),!n&&r&&this.store.addResourceBundle(i,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(l=>{WAt(l.loaded,[i],a),c$t(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{s[c][d]===void 0&&(s[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:a});return}this.readingCalls++;const s=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&o{this.read.call(this,t,n,r,o+1,i*2,a)},i);return}a(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>s(null,u)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Xt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Xt(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,n,r,o,l):u=c(t,n,r,o),u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}else c(t,n,r,o,s,l)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const rK=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Xt(e[1])&&(t.defaultValue=e[1]),Xt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),oK=e=>(Xt(e.ns)&&(e.ns=[e.ns]),Xt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Xt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),rP=()=>{},d$t=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class zx extends rM{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=oK(t),this.services={},this.logger=Cc,this.modules={external:[]},d$t(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(Xt(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=rK();this.options={...o,...this.options,...oK(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Cc.init(i(this.modules.logger),this.options):Cc.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=l$t);const d=new eK(this.options);this.store=new Jq(this.options.resources,this.options);const f=this.services;f.logger=Cc,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new i$t(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(f.formatter=i(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new a$t(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new u$t(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var m=arguments.length,g=new Array(m>1?m-1:0),y=1;y1?m-1:0),y=1;y{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=rP),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=m0(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rP;const o=Xt(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(c=>{c!=="cimode"&&i.indexOf(c)<0&&i.push(c)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(s=>a(s)),this.services.backendConnector.load(i,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const o=m0();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=rP),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&kce.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=m0();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,c)=>{c?(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=Xt(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{a(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),o}getFixedT(t,n,r){var o=this;const i=function(a,s){let l;if(typeof s!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d`${l.keyPrefix}${f}${m}`):p=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,o.t(p,l)};return Xt(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!o||a(i,t)))}loadNamespaces(t,n){const r=m0();return this.options.ns?(Xt(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=m0();Xt(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=o.concat(i),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new eK(rK());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new zx(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rP;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new zx(o);return(t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(s=>{i[s]=this[s]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new Jq(this.store.data,o),i.services.resourceStore=i.store),i.translator=new lO(i.services,o),i.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const iK=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,m$t=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!iK.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!iK.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},aK={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=m$t(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const a=o.substring(1).split("&");for(let s=0;s0&&a[s].substring(0,l)===t&&(n=a[s].substring(l+1))}}return n}};let g0=null;const sK=()=>{if(g0!==null)return g0;try{g0=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{g0=!1}return g0};var v$t={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&sK())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&sK()&&window.localStorage.setItem(n,e)}};let y0=null;const lK=()=>{if(y0!==null)return y0;try{y0=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{y0=!1}return y0};var b$t={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&lK())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&lK()&&window.sessionStorage.setItem(n,e)}},w$t={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i0?t:void 0}},x$t={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},S$t={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},C$t={name:"subdomain",lookup(e){var o,i;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((i=(o=window.location)==null?void 0:o.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function P$t(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class Mce{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=h$t(n,this.options||{},P$t()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(g$t),this.addDetector(y$t),this.addDetector(v$t),this.addDetector(b$t),this.addDetector(w$t),this.addDetector(x$t),this.addDetector(S$t),this.addDetector(C$t)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Mce.type="languageDetector";function UL(e){"@babel/helpers - typeof";return UL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},UL(e)}function Ace(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":UL(XMLHttpRequest))==="object"}function E$t(e){return!!e&&typeof e.then=="function"}function T$t(e){return E$t(e)?e:Promise.resolve(e)}function cK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function uK(e){for(var t=1;timport("./browser-ponyfill-3pZDG15-.js").then(e=>e.b),[]).then(function(e){Mu=e.default}).catch(function(){})}catch{}var WL=function(t,n){if(n&&kh(n)==="object"){var r="";for(var o in n)r+="&"+encodeURIComponent(o)+"="+encodeURIComponent(n[o]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},dK=function(t,n,r,o){var i=function(l){if(!l.ok)return r(l.statusText||"Error",{status:l.status});l.text().then(function(c){r(null,{status:l.status,data:c})}).catch(r)};if(o){var a=o(t,n);if(a instanceof Promise){a.then(i).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(i).catch(r):Mu(t,n).then(i).catch(r)},fK=!1,M$t=function(t,n,r,o){t.queryStringParams&&(n=WL(n,t.queryStringParams));var i=uK({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(i["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=uK({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:i},fK?{}:a),l=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{dK(n,s,o,l)}catch(c){if(!a||Object.keys(a).length===0||!c.message||c.message.indexOf("not implemented")<0)return o(c);try{Object.keys(a).forEach(function(u){delete s[u]}),dK(n,s,o,l),fK=!0}catch(u){o(u)}}},A$t=function(t,n,r,o){r&&kh(r)==="object"&&(r=WL("",r).slice(1)),t.queryStringParams&&(n=WL(n,t.queryStringParams));try{var i=Vx?new Vx:new cO("MSXML2.XMLHTTP.3.0");i.open(r?"POST":"GET",n,1),t.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!t.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)i.setRequestHeader(s,a[s]);i.onreadystatechange=function(){i.readyState>3&&o(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(l){console&&console.log(l)}},$$t=function(t,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},Mu&&n.indexOf("file:")!==0)return M$t(t,n,r,o);if(Ace()||typeof ActiveXObject=="function")return A$t(t,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function dv(e){"@babel/helpers - typeof";return dv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dv(e)}function pK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function TR(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R$t(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return _$t(e,[{key:"init",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=TR(TR(TR({},N$t()),this.options||{}),o),this.allOptions=i,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);dv(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,o){this._readAny(n,n,r,r,o)}},{key:"read",value:function(n,r,o){this._readAny([n],n,[r],r,o)}},{key:"_readAny",value:function(n,r,o,i,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,o)),l=T$t(l),l.then(function(c){if(!c)return a(null,{});var u=s.services.interpolator.interpolate(c,{lng:n.join("+"),ns:o.join("+")});s.loadUrl(u,a,r,i)})}},{key:"loadUrl",value:function(n,r,o,i){var a=this,s=typeof o=="string"?[o]:o,l=typeof i=="string"?[i]:i,c=this.options.parseLoadPayload(s,l);this.options.request(this.options,n,c,function(u,d){if(d&&(d.status>=500&&d.status<600||!d.status))return r("failed loading "+n+"; status code: "+d.status,!0);if(d&&d.status>=400&&d.status<500)return r("failed loading "+n+"; status code: "+d.status,!1);if(!d&&u&&u.message){var f=u.message.toLowerCase(),p=["failed","fetch","network","load"].find(function(y){return f.indexOf(y)>-1});if(p)return r("failed loading "+n+": "+u.message,!0)}if(u)return r(u,!1);var m,g;try{typeof d.data=="string"?m=a.options.parse(d.data,o,i):m=d.data}catch{g="failed parsing "+n+" to json"}if(g)return r(g,!1);r(null,m)})}},{key:"create",value:function(n,r,o,i,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,o,i),c=0,u=[],d=[];n.forEach(function(f){var p=s.options.addPath;typeof s.options.addPath=="function"&&(p=s.options.addPath(f,r));var m=s.services.interpolator.interpolate(p,{lng:f,ns:r});s.options.request(s.options,m,l,function(g,y){c+=1,u.push(g),d.push(y),c===n.length&&typeof a=="function"&&a(u,d)})})}}},{key:"reload",value:function(){var n=this,r=this.services,o=r.backendConnector,i=r.languageUtils,a=r.logger,s=o.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],c=function(d){var f=i.toResolveHierarchy(d);f.forEach(function(p){l.indexOf(p)<0&&l.push(p)})};c(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(u){return c(u)}),l.forEach(function(u){n.allOptions.ns.forEach(function(d){o.read(u,d,"read",null,null,function(f,p){f&&a.warn("loading namespace ".concat(d," for language ").concat(u," failed"),f),!f&&p&&a.log("loaded namespace ".concat(d," for language ").concat(u),p),o.loaded("".concat(u,"|").concat(d),f,p)})})})}}}])}();Dce.type="backend";Pi.use(Dce).use(Mce).use(D$e).init({load:"languageOnly",detection:{order:["path","navigator","htmlTag"]},fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"/static/react/locales/{{lng}}/{{ns}}.json"}});const nm=new Ewe({defaultOptions:{queries:{retry:3,staleTime:1e3*60*5,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:"always"}}}),_z=e=>{const t=document.getElementById(e);if(t===null)return;const n=t.attachShadow({mode:"open"}),r=document.createElement("div"),o=document.createElement("style"),i=document.getElementById("react-css");if(i){const l=document.createElement("link");l.setAttribute("rel","stylesheet"),l.setAttribute("href",i.href),n.appendChild(i)}n.appendChild(r),n.appendChild(o);const a=XK({key:"css",prepend:!0,container:o});rd(r).render(C(Jye,{value:a,children:C(v.Suspense,{fallback:C(ga,{}),children:C(JB,{children:C(Of,{theme:fSt(r),children:C(Mh,{client:nm,children:C(Dz,{})})})})})}))},hK=document.getElementById("root");hK&&rd(hK).render(C(Y.StrictMode,{children:C(v.Suspense,{fallback:C(ga,{}),children:C(JB,{children:C(Of,{theme:Uf,children:X(Mh,{client:nm,children:[C(VAt,{}),C(Uwe,{})]})})})})}));const mK=document.getElementById("react-weight-overview");mK&&rd(mK).render(C(v.Suspense,{fallback:C(ga,{}),children:C(Of,{theme:Uf,children:C(Mh,{client:nm,children:C(Qse,{})})})}));const gK=document.getElementById("react-weight-dashboard");gK&&rd(gK).render(C(v.Suspense,{fallback:C(ga,{}),children:C(Of,{theme:Uf,children:C(Mh,{client:nm,children:C(Tse,{})})})}));const yK=document.getElementById("react-nutrition-dashboard");yK&&rd(yK).render(C(v.Suspense,{fallback:C(ga,{}),children:C(Of,{theme:Uf,children:C(Mh,{client:nm,children:C(zae,{})})})}));const vK=document.getElementById("react-routine-dashboard");vK&&rd(vK).render(C(v.Suspense,{fallback:C(ga,{}),children:C(Of,{theme:Uf,children:C(Mh,{client:nm,children:C(sse,{})})})}));_z("react-exercise-overview");_z("react-exercise-contribute");const bK=document.getElementById("react-exercise-detail");bK&&rd(bK).render(C(v.Suspense,{fallback:C(ga,{}),children:C(JB,{children:C(Of,{theme:Uf,children:C(Mh,{client:nm,children:C(Dz,{})})})})}));_z("react-page");const wK=document.getElementById("react-ingredient-search");wK&&rd(wK).render(C(v.Suspense,{fallback:C(ga,{}),children:C(Of,{theme:Uf,children:C(T0t,{})})}));export{yc as c,Bn as g};