@applica-software-guru/react-admin 1.5.254 → 1.5.255

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,9 +21,9 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var ce=Oe(we,xe,de,pe,me
21
21
  `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
22
22
  `))),s[a]):typeof s=="function"?s:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${s}) is invalid.`,"It should be a number, an array or a function."].join(`
23
23
  `)),()=>{})}function Jw(e){return vl(e,"spacing",8,"spacing")}function yl(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function M9(e,t){return n=>e.reduce((r,o)=>(r[o]=yl(t,n),r),{})}function k9(e,t,n,r){if(t.indexOf(n)===-1)return null;const o=j9(n),s=M9(o,r),a=e[n];return fo(e,a,s)}function eA(e,t){const n=Jw(e.theme);return Object.keys(e).map(r=>k9(e,t,r,n)).reduce(Wa,{})}function jt(e){return eA(e,ld)}jt.propTypes=process.env.NODE_ENV!=="production"?ld.reduce((e,t)=>(e[t]=Ho,e),{}):{};jt.filterProps=ld;function Rt(e){return eA(e,cd)}Rt.propTypes=process.env.NODE_ENV!=="production"?cd.reduce((e,t)=>(e[t]=Ho,e),{}):{};Rt.filterProps=cd;process.env.NODE_ENV!=="production"&&R9.reduce((e,t)=>(e[t]=Ho,e),{});function D9(e=8){if(e.mui)return e;const t=Jw({spacing:e}),n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(s=>{const a=t(s);return typeof a=="number"?`${a}px`:a}).join(" "));return n.mui=!0,n}function ud(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(s=>{r[s]=o}),r),{}),n=r=>Object.keys(r).reduce((o,s)=>t[s]?Wa(o,t[s](r)):o,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function or(e){return typeof e!="number"?e:`${e}px solid`}function dr(e,t){return Lt({prop:e,themeKey:"borders",transform:t})}const F9=dr("border",or),L9=dr("borderTop",or),_9=dr("borderRight",or),B9=dr("borderBottom",or),N9=dr("borderLeft",or),V9=dr("borderColor"),W9=dr("borderTopColor"),$9=dr("borderRightColor"),z9=dr("borderBottomColor"),U9=dr("borderLeftColor"),H9=dr("outline",or),G9=dr("outlineColor"),dd=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=vl(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:yl(t,r)});return fo(e,e.borderRadius,n)}return null};dd.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Ho}:{};dd.filterProps=["borderRadius"];ud(F9,L9,_9,B9,N9,V9,W9,$9,z9,U9,dd,H9,G9);const fd=e=>{if(e.gap!==void 0&&e.gap!==null){const t=vl(e.theme,"spacing",8,"gap"),n=r=>({gap:yl(t,r)});return fo(e,e.gap,n)}return null};fd.propTypes=process.env.NODE_ENV!=="production"?{gap:Ho}:{};fd.filterProps=["gap"];const pd=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=vl(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:yl(t,r)});return fo(e,e.columnGap,n)}return null};pd.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Ho}:{};pd.filterProps=["columnGap"];const hd=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=vl(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:yl(t,r)});return fo(e,e.rowGap,n)}return null};hd.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Ho}:{};hd.filterProps=["rowGap"];const Y9=Lt({prop:"gridColumn"}),q9=Lt({prop:"gridRow"}),K9=Lt({prop:"gridAutoFlow"}),X9=Lt({prop:"gridAutoColumns"}),Z9=Lt({prop:"gridAutoRows"}),Q9=Lt({prop:"gridTemplateColumns"}),J9=Lt({prop:"gridTemplateRows"}),eD=Lt({prop:"gridTemplateAreas"}),tD=Lt({prop:"gridArea"});ud(fd,pd,hd,Y9,q9,K9,X9,Z9,Q9,J9,eD,tD);function Is(e,t){return t==="grey"?t:e}const nD=Lt({prop:"color",themeKey:"palette",transform:Is}),rD=Lt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Is}),oD=Lt({prop:"backgroundColor",themeKey:"palette",transform:Is});ud(nD,rD,oD);function Bn(e){return e<=1&&e!==0?`${e*100}%`:e}const iD=Lt({prop:"width",transform:Bn}),Gg=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,o;const s=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||Hg[n];return s?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${s}${e.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:Bn(n)}};return fo(e,e.maxWidth,t)}return null};Gg.filterProps=["maxWidth"];const sD=Lt({prop:"minWidth",transform:Bn}),aD=Lt({prop:"height",transform:Bn}),lD=Lt({prop:"maxHeight",transform:Bn}),cD=Lt({prop:"minHeight",transform:Bn});Lt({prop:"size",cssProperty:"width",transform:Bn});Lt({prop:"size",cssProperty:"height",transform:Bn});const uD=Lt({prop:"boxSizing"});ud(iD,Gg,sD,aD,lD,cD,uD);const bl={border:{themeKey:"borders",transform:or},borderTop:{themeKey:"borders",transform:or},borderRight:{themeKey:"borders",transform:or},borderBottom:{themeKey:"borders",transform:or},borderLeft:{themeKey:"borders",transform:or},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:or},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:dd},color:{themeKey:"palette",transform:Is},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Is},backgroundColor:{themeKey:"palette",transform:Is},p:{style:Rt},pt:{style:Rt},pr:{style:Rt},pb:{style:Rt},pl:{style:Rt},px:{style:Rt},py:{style:Rt},padding:{style:Rt},paddingTop:{style:Rt},paddingRight:{style:Rt},paddingBottom:{style:Rt},paddingLeft:{style:Rt},paddingX:{style:Rt},paddingY:{style:Rt},paddingInline:{style:Rt},paddingInlineStart:{style:Rt},paddingInlineEnd:{style:Rt},paddingBlock:{style:Rt},paddingBlockStart:{style:Rt},paddingBlockEnd:{style:Rt},m:{style:jt},mt:{style:jt},mr:{style:jt},mb:{style:jt},ml:{style:jt},mx:{style:jt},my:{style:jt},margin:{style:jt},marginTop:{style:jt},marginRight:{style:jt},marginBottom:{style:jt},marginLeft:{style:jt},marginX:{style:jt},marginY:{style:jt},marginInline:{style:jt},marginInlineStart:{style:jt},marginInlineEnd:{style:jt},marginBlock:{style:jt},marginBlockStart:{style:jt},marginBlockEnd:{style:jt},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:fd},rowGap:{style:hd},columnGap:{style:pd},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Bn},maxWidth:{style:Gg},minWidth:{transform:Bn},height:{transform:Bn},maxHeight:{transform:Bn},minHeight:{transform:Bn},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function dD(...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 fD(e,t){return typeof e=="function"?e(t):e}function tA(){function e(n,r,o,s){const a={[n]:r,theme:o},c=s[n];if(!c)return{[n]:r};const{cssProperty:u=n,themeKey:d,transform:h,style:g}=c;if(r==null)return null;if(d==="typography"&&r==="inherit")return{[n]:r};const m=ad(o,d)||{};return g?g(a):fo(a,r,b=>{let x=wu(m,h,b);return b===x&&typeof b=="string"&&(x=wu(m,h,`${n}${b==="default"?"":Ue(b)}`,b)),u===!1?x:{[u]:x}})}function t(n){var r;const{sx:o,theme:s={}}=n||{};if(!o)return null;const a=(r=s.unstable_sxConfig)!=null?r:bl;function c(u){let d=u;if(typeof u=="function")d=u(s);else if(typeof u!="object")return u;if(!d)return null;const h=A9(s.breakpoints),g=Object.keys(h);let m=h;return Object.keys(d).forEach(v=>{const b=fD(d[v],s);if(b!=null)if(typeof b=="object")if(a[v])m=Wa(m,e(v,b,s,a));else{const x=fo({theme:s},b,w=>({[v]:w}));dD(x,b)?m[v]=t({sx:b,theme:s}):m=Wa(m,x)}else m=Wa(m,e(v,b,s,a))}),S9(g,m)}return Array.isArray(o)?o.map(c):c(o)}return t}const xl=tA();xl.filterProps=["sx"];function nA(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const pD=["breakpoints","palette","spacing","shape"];function gd(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:s={}}=e,a=Ge(e,pD),c=Qw(n),u=D9(o);let d=Lr({breakpoints:c,direction:"ltr",components:{},palette:q({mode:"light"},r),spacing:u,shape:q({},w9,s)},a);return d.applyStyles=nA,d=t.reduce((h,g)=>Lr(h,g),d),d.unstable_sxConfig=q({},bl,a==null?void 0:a.unstable_sxConfig),d.unstable_sx=function(g){return xl({sx:g,theme:this})},d}const hD=Object.freeze(Object.defineProperty({__proto__:null,default:gd,private_createBreakpoints:Qw,unstable_applyStyles:nA},Symbol.toStringTag,{value:"Module"}));function gD(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function mD(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var vD=function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?process.env.NODE_ENV==="production":n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(mD(this));var o=this.tags[this.tags.length-1];if(process.env.NODE_ENV!=="production"){var s=r.charCodeAt(0)===64&&r.charCodeAt(1)===105;s&&this._alreadyInsertedOrderInsensitiveRule&&console.error(`You're attempting to insert the following rule:
24
- `+r+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!s}if(this.isSpeedy){var a=gD(o);try{a.insertRule(r,a.cssRules.length)}catch(c){process.env.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(r)&&console.error('There was a problem inserting the following rule: "'+r+'"',c)}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0,process.env.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},e}(),nn="-ms-",Au="-moz-",Qe="-webkit-",Yg="comm",qg="rule",Kg="decl",yD="@import",rA="@keyframes",bD="@layer",xD=Math.abs,md=String.fromCharCode,CD=Object.assign;function wD(e,t){return Xt(e,0)^45?(((t<<2^Xt(e,0))<<2^Xt(e,1))<<2^Xt(e,2))<<2^Xt(e,3):0}function oA(e){return e.trim()}function AD(e,t){return(e=t.exec(e))?e[0]:e}function Je(e,t,n){return e.replace(t,n)}function fh(e,t){return e.indexOf(t)}function Xt(e,t){return e.charCodeAt(t)|0}function Qa(e,t,n){return e.slice(t,n)}function kr(e){return e.length}function Xg(e){return e.length}function Nc(e,t){return t.push(e),e}function SD(e,t){return e.map(t).join("")}var vd=1,Fs=1,iA=0,En=0,Wt=0,$s="";function yd(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:vd,column:Fs,length:a,return:""}}function Ta(e,t){return CD(yd("",null,null,"",null,null,0),e,{length:-e.length},t)}function TD(){return Wt}function ED(){return Wt=En>0?Xt($s,--En):0,Fs--,Wt===10&&(Fs=1,vd--),Wt}function Nn(){return Wt=En<iA?Xt($s,En++):0,Fs++,Wt===10&&(Fs=1,vd++),Wt}function _r(){return Xt($s,En)}function Jc(){return En}function Cl(e,t){return Qa($s,e,t)}function Ja(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function sA(e){return vd=Fs=1,iA=kr($s=e),En=0,[]}function aA(e){return $s="",e}function eu(e){return oA(Cl(En-1,ph(e===91?e+2:e===40?e+1:e)))}function ID(e){for(;(Wt=_r())&&Wt<33;)Nn();return Ja(e)>2||Ja(Wt)>3?"":" "}function OD(e,t){for(;--t&&Nn()&&!(Wt<48||Wt>102||Wt>57&&Wt<65||Wt>70&&Wt<97););return Cl(e,Jc()+(t<6&&_r()==32&&Nn()==32))}function ph(e){for(;Nn();)switch(Wt){case e:return En;case 34:case 39:e!==34&&e!==39&&ph(Wt);break;case 40:e===41&&ph(e);break;case 92:Nn();break}return En}function PD(e,t){for(;Nn()&&e+Wt!==57;)if(e+Wt===84&&_r()===47)break;return"/*"+Cl(t,En-1)+"*"+md(e===47?e:Nn())}function jD(e){for(;!Ja(_r());)Nn();return Cl(e,En)}function RD(e){return aA(tu("",null,null,null,[""],e=sA(e),0,[0],e))}function tu(e,t,n,r,o,s,a,c,u){for(var d=0,h=0,g=a,m=0,v=0,b=0,x=1,w=1,O=1,M=0,E="",R=o,P=s,k=r,D=E;w;)switch(b=M,M=Nn()){case 40:if(b!=108&&Xt(D,g-1)==58){fh(D+=Je(eu(M),"&","&\f"),"&\f")!=-1&&(O=-1);break}case 34:case 39:case 91:D+=eu(M);break;case 9:case 10:case 13:case 32:D+=ID(b);break;case 92:D+=OD(Jc()-1,7);continue;case 47:switch(_r()){case 42:case 47:Nc(MD(PD(Nn(),Jc()),t,n),u);break;default:D+="/"}break;case 123*x:c[d++]=kr(D)*O;case 125*x:case 59:case 0:switch(M){case 0:case 125:w=0;case 59+h:O==-1&&(D=Je(D,/\f/g,"")),v>0&&kr(D)-g&&Nc(v>32?g1(D+";",r,n,g-1):g1(Je(D," ","")+";",r,n,g-2),u);break;case 59:D+=";";default:if(Nc(k=h1(D,t,n,d,h,o,c,E,R=[],P=[],g),s),M===123)if(h===0)tu(D,t,k,k,R,s,g,c,P);else switch(m===99&&Xt(D,3)===110?100:m){case 100:case 108:case 109:case 115:tu(e,k,k,r&&Nc(h1(e,k,k,0,0,o,c,E,o,R=[],g),P),o,P,g,c,r?R:P);break;default:tu(D,k,k,k,[""],P,0,c,P)}}d=h=v=0,x=O=1,E=D="",g=a;break;case 58:g=1+kr(D),v=b;default:if(x<1){if(M==123)--x;else if(M==125&&x++==0&&ED()==125)continue}switch(D+=md(M),M*x){case 38:O=h>0?1:(D+="\f",-1);break;case 44:c[d++]=(kr(D)-1)*O,O=1;break;case 64:_r()===45&&(D+=eu(Nn())),m=_r(),h=g=kr(E=D+=jD(Jc())),M++;break;case 45:b===45&&kr(D)==2&&(x=0)}}return s}function h1(e,t,n,r,o,s,a,c,u,d,h){for(var g=o-1,m=o===0?s:[""],v=Xg(m),b=0,x=0,w=0;b<r;++b)for(var O=0,M=Qa(e,g+1,g=xD(x=a[b])),E=e;O<v;++O)(E=oA(x>0?m[O]+" "+M:Je(M,/&\f/g,m[O])))&&(u[w++]=E);return yd(e,t,n,o===0?qg:c,u,d,h)}function MD(e,t,n){return yd(e,t,n,Yg,md(TD()),Qa(e,2,-2),0)}function g1(e,t,n,r){return yd(e,t,n,Kg,Qa(e,0,r),Qa(e,r+1,-1),r)}function Os(e,t){for(var n="",r=Xg(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function kD(e,t,n,r){switch(e.type){case bD:if(e.children.length)break;case yD:case Kg:return e.return=e.return||e.value;case Yg:return"";case rA:return e.return=e.value+"{"+Os(e.children,r)+"}";case qg:e.value=e.props.join(",")}return kr(n=Os(e.children,r))?e.return=e.value+"{"+n+"}":""}function DD(e){var t=Xg(e);return function(n,r,o,s){for(var a="",c=0;c<t;c++)a+=e[c](n,r,o,s)||"";return a}}function FD(e){return function(t){t.root||(t=t.return)&&e(t)}}var LD=function(t,n,r){for(var o=0,s=0;o=s,s=_r(),o===38&&s===12&&(n[r]=1),!Ja(s);)Nn();return Cl(t,En)},_D=function(t,n){var r=-1,o=44;do switch(Ja(o)){case 0:o===38&&_r()===12&&(n[r]=1),t[r]+=LD(En-1,n,r);break;case 2:t[r]+=eu(o);break;case 4:if(o===44){t[++r]=_r()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=md(o)}while(o=Nn());return t},BD=function(t,n){return aA(_D(sA(t),n))},m1=new WeakMap,ND=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!m1.get(r))&&!o){m1.set(t,!0);for(var s=[],a=BD(n,s),c=r.props,u=0,d=0;u<a.length;u++)for(var h=0;h<c.length;h++,d++)t.props[d]=s[u]?a[u].replace(/&\f/g,c[h]):c[h]+" "+a[u]}}},VD=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}},WD="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",$D=function(t){return t.type==="comm"&&t.children.indexOf(WD)>-1},zD=function(t){return function(n,r,o){if(!(n.type!=="rule"||t.compat)){var s=n.value.match(/(:first|:nth|:nth-last)-child/g);if(s){for(var a=!!n.parent,c=a?n.parent.children:o,u=c.length-1;u>=0;u--){var d=c[u];if(d.line<n.line)break;if(d.column<n.column){if($D(d))return;break}}s.forEach(function(h){console.error('The pseudo class "'+h+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+h.split("-child")[0]+'-of-type".')})}}}},lA=function(t){return t.type.charCodeAt(1)===105&&t.type.charCodeAt(0)===64},UD=function(t,n){for(var r=t-1;r>=0;r--)if(!lA(n[r]))return!0;return!1},v1=function(t){t.type="",t.value="",t.return="",t.children="",t.props=""},HD=function(t,n,r){lA(t)&&(t.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),v1(t)):UD(n,r)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),v1(t)))};function cA(e,t){switch(wD(e,t)){case 5103:return Qe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Qe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Qe+e+Au+e+nn+e+e;case 6828:case 4268:return Qe+e+nn+e+e;case 6165:return Qe+e+nn+"flex-"+e+e;case 5187:return Qe+e+Je(e,/(\w+).+(:[^]+)/,Qe+"box-$1$2"+nn+"flex-$1$2")+e;case 5443:return Qe+e+nn+"flex-item-"+Je(e,/flex-|-self/,"")+e;case 4675:return Qe+e+nn+"flex-line-pack"+Je(e,/align-content|flex-|-self/,"")+e;case 5548:return Qe+e+nn+Je(e,"shrink","negative")+e;case 5292:return Qe+e+nn+Je(e,"basis","preferred-size")+e;case 6060:return Qe+"box-"+Je(e,"-grow","")+Qe+e+nn+Je(e,"grow","positive")+e;case 4554:return Qe+Je(e,/([^-])(transform)/g,"$1"+Qe+"$2")+e;case 6187:return Je(Je(Je(e,/(zoom-|grab)/,Qe+"$1"),/(image-set)/,Qe+"$1"),e,"")+e;case 5495:case 3959:return Je(e,/(image-set\([^]*)/,Qe+"$1$`$1");case 4968:return Je(Je(e,/(.+:)(flex-)?(.*)/,Qe+"box-pack:$3"+nn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Qe+e+e;case 4095:case 3583:case 4068:case 2532:return Je(e,/(.+)-inline(.+)/,Qe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(kr(e)-1-t>6)switch(Xt(e,t+1)){case 109:if(Xt(e,t+4)!==45)break;case 102:return Je(e,/(.+:)(.+)-([^]+)/,"$1"+Qe+"$2-$3$1"+Au+(Xt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~fh(e,"stretch")?cA(Je(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Xt(e,t+1)!==115)break;case 6444:switch(Xt(e,kr(e)-3-(~fh(e,"!important")&&10))){case 107:return Je(e,":",":"+Qe)+e;case 101:return Je(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Qe+(Xt(e,14)===45?"inline-":"")+"box$3$1"+Qe+"$2$3$1"+nn+"$2box$3")+e}break;case 5936:switch(Xt(e,t+11)){case 114:return Qe+e+nn+Je(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Qe+e+nn+Je(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Qe+e+nn+Je(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Qe+e+nn+e+e}return e}var GD=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Kg:t.return=cA(t.value,t.length);break;case rA:return Os([Ta(t,{value:Je(t.value,"@","@"+Qe)})],o);case qg:if(t.length)return SD(t.props,function(s){switch(AD(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Os([Ta(t,{props:[Je(s,/:(read-\w+)/,":"+Au+"$1")]})],o);case"::placeholder":return Os([Ta(t,{props:[Je(s,/:(plac\w+)/,":"+Qe+"input-$1")]}),Ta(t,{props:[Je(s,/:(plac\w+)/,":"+Au+"$1")]}),Ta(t,{props:[Je(s,/:(plac\w+)/,nn+"input-$1")]})],o)}return""})}},YD=[GD],qD=function(t){var n=t.key;if(process.env.NODE_ENV!=="production"&&!n)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
24
+ `+r+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!s}if(this.isSpeedy){var a=gD(o);try{a.insertRule(r,a.cssRules.length)}catch(c){process.env.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(r)&&console.error('There was a problem inserting the following rule: "'+r+'"',c)}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0,process.env.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},e}(),nn="-ms-",Au="-moz-",Qe="-webkit-",Yg="comm",qg="rule",Kg="decl",yD="@import",rA="@keyframes",bD="@layer",xD=Math.abs,md=String.fromCharCode,CD=Object.assign;function wD(e,t){return Xt(e,0)^45?(((t<<2^Xt(e,0))<<2^Xt(e,1))<<2^Xt(e,2))<<2^Xt(e,3):0}function oA(e){return e.trim()}function AD(e,t){return(e=t.exec(e))?e[0]:e}function Je(e,t,n){return e.replace(t,n)}function fh(e,t){return e.indexOf(t)}function Xt(e,t){return e.charCodeAt(t)|0}function Qa(e,t,n){return e.slice(t,n)}function kr(e){return e.length}function Xg(e){return e.length}function Nc(e,t){return t.push(e),e}function SD(e,t){return e.map(t).join("")}var vd=1,Fs=1,iA=0,En=0,Wt=0,$s="";function yd(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:vd,column:Fs,length:a,return:""}}function Ta(e,t){return CD(yd("",null,null,"",null,null,0),e,{length:-e.length},t)}function TD(){return Wt}function ED(){return Wt=En>0?Xt($s,--En):0,Fs--,Wt===10&&(Fs=1,vd--),Wt}function Nn(){return Wt=En<iA?Xt($s,En++):0,Fs++,Wt===10&&(Fs=1,vd++),Wt}function _r(){return Xt($s,En)}function Jc(){return En}function Cl(e,t){return Qa($s,e,t)}function Ja(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function sA(e){return vd=Fs=1,iA=kr($s=e),En=0,[]}function aA(e){return $s="",e}function eu(e){return oA(Cl(En-1,ph(e===91?e+2:e===40?e+1:e)))}function ID(e){for(;(Wt=_r())&&Wt<33;)Nn();return Ja(e)>2||Ja(Wt)>3?"":" "}function OD(e,t){for(;--t&&Nn()&&!(Wt<48||Wt>102||Wt>57&&Wt<65||Wt>70&&Wt<97););return Cl(e,Jc()+(t<6&&_r()==32&&Nn()==32))}function ph(e){for(;Nn();)switch(Wt){case e:return En;case 34:case 39:e!==34&&e!==39&&ph(Wt);break;case 40:e===41&&ph(e);break;case 92:Nn();break}return En}function PD(e,t){for(;Nn()&&e+Wt!==57;)if(e+Wt===84&&_r()===47)break;return"/*"+Cl(t,En-1)+"*"+md(e===47?e:Nn())}function jD(e){for(;!Ja(_r());)Nn();return Cl(e,En)}function RD(e){return aA(tu("",null,null,null,[""],e=sA(e),0,[0],e))}function tu(e,t,n,r,o,s,a,c,u){for(var d=0,h=0,g=a,m=0,v=0,b=0,x=1,w=1,O=1,M=0,E="",R=o,P=s,k=r,D=E;w;)switch(b=M,M=Nn()){case 40:if(b!=108&&Xt(D,g-1)==58){fh(D+=Je(eu(M),"&","&\f"),"&\f")!=-1&&(O=-1);break}case 34:case 39:case 91:D+=eu(M);break;case 9:case 10:case 13:case 32:D+=ID(b);break;case 92:D+=OD(Jc()-1,7);continue;case 47:switch(_r()){case 42:case 47:Nc(MD(PD(Nn(),Jc()),t,n),u);break;default:D+="/"}break;case 123*x:c[d++]=kr(D)*O;case 125*x:case 59:case 0:switch(M){case 0:case 125:w=0;case 59+h:O==-1&&(D=Je(D,/\f/g,"")),v>0&&kr(D)-g&&Nc(v>32?g1(D+";",r,n,g-1):g1(Je(D," ","")+";",r,n,g-2),u);break;case 59:D+=";";default:if(Nc(k=h1(D,t,n,d,h,o,c,E,R=[],P=[],g),s),M===123)if(h===0)tu(D,t,k,k,R,s,g,c,P);else switch(m===99&&Xt(D,3)===110?100:m){case 100:case 108:case 109:case 115:tu(e,k,k,r&&Nc(h1(e,k,k,0,0,o,c,E,o,R=[],g),P),o,P,g,c,r?R:P);break;default:tu(D,k,k,k,[""],P,0,c,P)}}d=h=v=0,x=O=1,E=D="",g=a;break;case 58:g=1+kr(D),v=b;default:if(x<1){if(M==123)--x;else if(M==125&&x++==0&&ED()==125)continue}switch(D+=md(M),M*x){case 38:O=h>0?1:(D+="\f",-1);break;case 44:c[d++]=(kr(D)-1)*O,O=1;break;case 64:_r()===45&&(D+=eu(Nn())),m=_r(),h=g=kr(E=D+=jD(Jc())),M++;break;case 45:b===45&&kr(D)==2&&(x=0)}}return s}function h1(e,t,n,r,o,s,a,c,u,d,h){for(var g=o-1,m=o===0?s:[""],v=Xg(m),b=0,x=0,w=0;b<r;++b)for(var O=0,M=Qa(e,g+1,g=xD(x=a[b])),E=e;O<v;++O)(E=oA(x>0?m[O]+" "+M:Je(M,/&\f/g,m[O])))&&(u[w++]=E);return yd(e,t,n,o===0?qg:c,u,d,h)}function MD(e,t,n){return yd(e,t,n,Yg,md(TD()),Qa(e,2,-2),0)}function g1(e,t,n,r){return yd(e,t,n,Kg,Qa(e,0,r),Qa(e,r+1,-1),r)}function Os(e,t){for(var n="",r=Xg(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function kD(e,t,n,r){switch(e.type){case bD:if(e.children.length)break;case yD:case Kg:return e.return=e.return||e.value;case Yg:return"";case rA:return e.return=e.value+"{"+Os(e.children,r)+"}";case qg:e.value=e.props.join(",")}return kr(n=Os(e.children,r))?e.return=e.value+"{"+n+"}":""}function DD(e){var t=Xg(e);return function(n,r,o,s){for(var a="",c=0;c<t;c++)a+=e[c](n,r,o,s)||"";return a}}function FD(e){return function(t){t.root||(t=t.return)&&e(t)}}var LD=function(t,n,r){for(var o=0,s=0;o=s,s=_r(),o===38&&s===12&&(n[r]=1),!Ja(s);)Nn();return Cl(t,En)},_D=function(t,n){var r=-1,o=44;do switch(Ja(o)){case 0:o===38&&_r()===12&&(n[r]=1),t[r]+=LD(En-1,n,r);break;case 2:t[r]+=eu(o);break;case 4:if(o===44){t[++r]=_r()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=md(o)}while(o=Nn());return t},BD=function(t,n){return aA(_D(sA(t),n))},m1=new WeakMap,ND=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!m1.get(r))&&!o){m1.set(t,!0);for(var s=[],a=BD(n,s),c=r.props,u=0,d=0;u<a.length;u++)for(var h=0;h<c.length;h++,d++)t.props[d]=s[u]?a[u].replace(/&\f/g,c[h]):c[h]+" "+a[u]}}},VD=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}},WD="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",$D=function(t){return t.type==="comm"&&t.children.indexOf(WD)>-1},zD=function(t){return function(n,r,o){if(!(n.type!=="rule"||t.compat)){var s=n.value.match(/(:first|:nth|:nth-last)-child/g);if(s){for(var a=!!n.parent,c=a?n.parent.children:o,u=c.length-1;u>=0;u--){var d=c[u];if(d.line<n.line)break;if(d.column<n.column){if($D(d))return;break}}s.forEach(function(h){console.error('The pseudo class "'+h+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+h.split("-child")[0]+'-of-type".')})}}}},lA=function(t){return t.type.charCodeAt(1)===105&&t.type.charCodeAt(0)===64},UD=function(t,n){for(var r=t-1;r>=0;r--)if(!lA(n[r]))return!0;return!1},v1=function(t){t.type="",t.value="",t.return="",t.children="",t.props=""},HD=function(t,n,r){lA(t)&&(t.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),v1(t)):UD(n,r)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),v1(t)))};function cA(e,t){switch(wD(e,t)){case 5103:return Qe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Qe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Qe+e+Au+e+nn+e+e;case 6828:case 4268:return Qe+e+nn+e+e;case 6165:return Qe+e+nn+"flex-"+e+e;case 5187:return Qe+e+Je(e,/(\w+).+(:[^]+)/,Qe+"box-$1$2"+nn+"flex-$1$2")+e;case 5443:return Qe+e+nn+"flex-item-"+Je(e,/flex-|-self/,"")+e;case 4675:return Qe+e+nn+"flex-line-pack"+Je(e,/align-content|flex-|-self/,"")+e;case 5548:return Qe+e+nn+Je(e,"shrink","negative")+e;case 5292:return Qe+e+nn+Je(e,"basis","preferred-size")+e;case 6060:return Qe+"box-"+Je(e,"-grow","")+Qe+e+nn+Je(e,"grow","positive")+e;case 4554:return Qe+Je(e,/([^-])(transform)/g,"$1"+Qe+"$2")+e;case 6187:return Je(Je(Je(e,/(zoom-|grab)/,Qe+"$1"),/(image-set)/,Qe+"$1"),e,"")+e;case 5495:case 3959:return Je(e,/(image-set\([^]*)/,Qe+"$1$`$1");case 4968:return Je(Je(e,/(.+:)(flex-)?(.*)/,Qe+"box-pack:$3"+nn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Qe+e+e;case 4095:case 3583:case 4068:case 2532:return Je(e,/(.+)-inline(.+)/,Qe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(kr(e)-1-t>6)switch(Xt(e,t+1)){case 109:if(Xt(e,t+4)!==45)break;case 102:return Je(e,/(.+:)(.+)-([^]+)/,"$1"+Qe+"$2-$3$1"+Au+(Xt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~fh(e,"stretch")?cA(Je(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Xt(e,t+1)!==115)break;case 6444:switch(Xt(e,kr(e)-3-(~fh(e,"!important")&&10))){case 107:return Je(e,":",":"+Qe)+e;case 101:return Je(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Qe+(Xt(e,14)===45?"inline-":"")+"box$3$1"+Qe+"$2$3$1"+nn+"$2box$3")+e}break;case 5936:switch(Xt(e,t+11)){case 114:return Qe+e+nn+Je(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Qe+e+nn+Je(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Qe+e+nn+Je(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Qe+e+nn+e+e}return e}var GD=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Kg:t.return=cA(t.value,t.length);break;case rA:return Os([Ta(t,{value:Je(t.value,"@","@"+Qe)})],o);case qg:if(t.length)return SD(t.props,function(s){switch(AD(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Os([Ta(t,{props:[Je(s,/:(read-\w+)/,":"+Au+"$1")]})],o);case"::placeholder":return Os([Ta(t,{props:[Je(s,/:(plac\w+)/,":"+Qe+"input-$1")]}),Ta(t,{props:[Je(s,/:(plac\w+)/,":"+Au+"$1")]}),Ta(t,{props:[Je(s,/:(plac\w+)/,nn+"input-$1")]})],o)}return""})}},YD=[GD],qD=function(t){var n=t.key;if(process.env.NODE_ENV!=="production"&&!n)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
25
25
  If multiple caches share the same key they might "fight" for each other's style elements.`);if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(x){var w=x.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var o=t.stylisPlugins||YD;if(process.env.NODE_ENV!=="production"&&/[^a-z-]/.test(n))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+n+'" was passed');var s={},a,c=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var w=x.getAttribute("data-emotion").split(" "),O=1;O<w.length;O++)s[w[O]]=!0;c.push(x)});var u,d=[ND,VD];process.env.NODE_ENV!=="production"&&d.push(zD({get compat(){return b.compat}}),HD);{var h,g=[kD,process.env.NODE_ENV!=="production"?function(x){x.root||(x.return?h.insert(x.return):x.value&&x.type!==Yg&&h.insert(x.value+"{}"))}:FD(function(x){h.insert(x)})],m=DD(d.concat(o,g)),v=function(w){return Os(RD(w),m)};u=function(w,O,M,E){h=M,process.env.NODE_ENV!=="production"&&O.map!==void 0&&(h={insert:function(P){M.insert(P+O.map)}}),v(w?w+"{"+O.styles+"}":O.styles),E&&(b.inserted[O.name]=!0)}}var b={key:n,sheet:new vD({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:u};return b.sheet.hydrate(c),b};let hh;typeof document=="object"&&(hh=qD({key:"css",prepend:!0}));function uA(e){const{injectFirst:t,children:n}=e;return t&&hh?p.jsx(Zt.CacheProvider,{value:hh,children:n}):n}process.env.NODE_ENV!=="production"&&(uA.propTypes={children:C.node,injectFirst:C.bool});function KD(e){return e==null||Object.keys(e).length===0}function dA(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(KD(o)?n:o):t;return p.jsx(Zt.Global,{styles:r})}process.env.NODE_ENV!=="production"&&(dA.propTypes={defaultTheme:C.object,styles:C.oneOfType([C.array,C.string,C.object,C.func])});/**
26
- * @mui/styled-engine v5.16.1
26
+ * @mui/styled-engine v5.16.4
27
27
  *
28
28
  * @license MIT
29
29
  * This source code is licensed under the MIT license found in the
@@ -214,6 +214,6 @@ function print() { __p += __j.call(arguments, '') }
214
214
  }`;var $e=Yy(function(){return Ze(j,Se+"return "+le).apply(n,F)});if($e.source=le,Jf($e))throw $e;return $e}function eR(i){return nt(i).toLowerCase()}function tR(i){return nt(i).toUpperCase()}function nR(i,l,f){if(i=nt(i),i&&(f||l===n))return nv(i);if(!i||!(l=Mn(l)))return i;var y=mr(i),S=mr(l),j=rv(y,S),F=ov(y,S)+1;return So(y,j,F).join("")}function rR(i,l,f){if(i=nt(i),i&&(f||l===n))return i.slice(0,sv(i)+1);if(!i||!(l=Mn(l)))return i;var y=mr(i),S=ov(y,mr(l))+1;return So(y,0,S).join("")}function oR(i,l,f){if(i=nt(i),i&&(f||l===n))return i.replace(Jt,"");if(!i||!(l=Mn(l)))return i;var y=mr(i),S=rv(y,mr(l));return So(y,S).join("")}function iR(i,l){var f=ee,y=z;if(It(l)){var S="separator"in l?l.separator:S;f="length"in l?Ne(l.length):f,y="omission"in l?Mn(l.omission):y}i=nt(i);var j=i.length;if(Hi(i)){var F=mr(i);j=F.length}if(f>=j)return i;var B=f-Gi(y);if(B<1)return y;var U=F?So(F,0,B).join(""):i.slice(0,B);if(S===n)return U+y;if(F&&(B+=U.length-B),ep(S)){if(i.slice(B).search(S)){var oe,ie=U;for(S.global||(S=mf(S.source,nt(zl.exec(S))+"g")),S.lastIndex=0;oe=S.exec(ie);)var le=oe.index;U=U.slice(0,le===n?B:le)}}else if(i.indexOf(Mn(S),B)!=B){var ve=U.lastIndexOf(S);ve>-1&&(U=U.slice(0,ve))}return U+y}function sR(i){return i=nt(i),i&&Fl.test(i)?i.replace(Dl,FO):i}var aR=Ji(function(i,l,f){return i+(f?" ":"")+l.toUpperCase()}),rp=qv("toUpperCase");function Gy(i,l,f){return i=nt(i),l=f?n:l,l===n?jO(i)?BO(i):CO(i):i.match(l)||[]}var Yy=ze(function(i,l){try{return jn(i,n,l)}catch(f){return Jf(f)?f:new Fe(f)}}),lR=Kr(function(i,l){return Yn(l,function(f){f=jr(f),Yr(i,f,Zf(i[f],i))}),i});function cR(i){var l=i==null?0:i.length,f=je();return i=l?At(i,function(y){if(typeof y[1]!="function")throw new qn(a);return[f(y[0]),y[1]]}):[],ze(function(y){for(var S=-1;++S<l;){var j=i[S];if(jn(j[0],this,y))return jn(j[1],this,y)}})}function uR(i){return FP(Xn(i,g))}function op(i){return function(){return i}}function dR(i,l){return i==null||i!==i?l:i}var fR=Xv(),pR=Xv(!0);function vn(i){return i}function ip(i){return Ev(typeof i=="function"?i:Xn(i,g))}function hR(i){return Ov(Xn(i,g))}function gR(i,l){return Pv(i,Xn(l,g))}var mR=ze(function(i,l){return function(f){return ha(f,i,l)}}),vR=ze(function(i,l){return function(f){return ha(i,f,l)}});function sp(i,l,f){var y=Yt(l),S=fc(l,y);f==null&&!(It(l)&&(S.length||!y.length))&&(f=l,l=i,i=this,S=fc(l,Yt(l)));var j=!(It(f)&&"chain"in f)||!!f.chain,F=Zr(i);return Yn(S,function(B){var U=l[B];i[B]=U,F&&(i.prototype[B]=function(){var oe=this.__chain__;if(j||oe){var ie=i(this.__wrapped__),le=ie.__actions__=hn(this.__actions__);return le.push({func:U,args:arguments,thisArg:i}),ie.__chain__=oe,ie}return U.apply(i,yo([this.value()],arguments))})}),i}function yR(){return qt._===this&&(qt._=UO),this}function ap(){}function bR(i){return i=Ne(i),ze(function(l){return jv(l,i)})}var xR=Bf(At),CR=Bf(Z0),wR=Bf(cf);function qy(i){return Hf(i)?uf(jr(i)):QP(i)}function AR(i){return function(l){return i==null?n:si(i,l)}}var SR=Qv(),TR=Qv(!0);function lp(){return[]}function cp(){return!1}function ER(){return{}}function IR(){return""}function OR(){return!0}function PR(i,l){if(i=Ne(i),i<1||i>N)return[];var f=G,y=en(i,G);l=je(l),i-=G;for(var S=pf(y,l);++f<i;)l(f);return S}function jR(i){return Le(i)?At(i,jr):kn(i)?[i]:hn(hy(nt(i)))}function RR(i){var l=++$O;return nt(i)+l}var MR=yc(function(i,l){return i+l},0),kR=Nf("ceil"),DR=yc(function(i,l){return i/l},1),FR=Nf("floor");function LR(i){return i&&i.length?dc(i,vn,Sf):n}function _R(i,l){return i&&i.length?dc(i,je(l,2),Sf):n}function BR(i){return ev(i,vn)}function NR(i,l){return ev(i,je(l,2))}function VR(i){return i&&i.length?dc(i,vn,Of):n}function WR(i,l){return i&&i.length?dc(i,je(l,2),Of):n}var $R=yc(function(i,l){return i*l},1),zR=Nf("round"),UR=yc(function(i,l){return i-l},0);function HR(i){return i&&i.length?ff(i,vn):0}function GR(i,l){return i&&i.length?ff(i,je(l,2)):0}return I.after=h5,I.ary=Ty,I.assign=tj,I.assignIn=Ny,I.assignInWith=Rc,I.assignWith=nj,I.at=rj,I.before=Ey,I.bind=Zf,I.bindAll=lR,I.bindKey=Iy,I.castArray=E5,I.chain=wy,I.chunk=F3,I.compact=L3,I.concat=_3,I.cond=cR,I.conforms=uR,I.constant=op,I.countBy=H4,I.create=oj,I.curry=Oy,I.curryRight=Py,I.debounce=jy,I.defaults=ij,I.defaultsDeep=sj,I.defer=g5,I.delay=m5,I.difference=B3,I.differenceBy=N3,I.differenceWith=V3,I.drop=W3,I.dropRight=$3,I.dropRightWhile=z3,I.dropWhile=U3,I.fill=H3,I.filter=Y4,I.flatMap=X4,I.flatMapDeep=Z4,I.flatMapDepth=Q4,I.flatten=yy,I.flattenDeep=G3,I.flattenDepth=Y3,I.flip=v5,I.flow=fR,I.flowRight=pR,I.fromPairs=q3,I.functions=pj,I.functionsIn=hj,I.groupBy=J4,I.initial=X3,I.intersection=Z3,I.intersectionBy=Q3,I.intersectionWith=J3,I.invert=mj,I.invertBy=vj,I.invokeMap=t5,I.iteratee=ip,I.keyBy=n5,I.keys=Yt,I.keysIn=mn,I.map=Tc,I.mapKeys=bj,I.mapValues=xj,I.matches=hR,I.matchesProperty=gR,I.memoize=Ic,I.merge=Cj,I.mergeWith=Vy,I.method=mR,I.methodOf=vR,I.mixin=sp,I.negate=Oc,I.nthArg=bR,I.omit=wj,I.omitBy=Aj,I.once=y5,I.orderBy=r5,I.over=xR,I.overArgs=b5,I.overEvery=CR,I.overSome=wR,I.partial=Qf,I.partialRight=Ry,I.partition=o5,I.pick=Sj,I.pickBy=Wy,I.property=qy,I.propertyOf=AR,I.pull=r4,I.pullAll=xy,I.pullAllBy=o4,I.pullAllWith=i4,I.pullAt=s4,I.range=SR,I.rangeRight=TR,I.rearg=x5,I.reject=a5,I.remove=a4,I.rest=C5,I.reverse=Kf,I.sampleSize=c5,I.set=Ej,I.setWith=Ij,I.shuffle=u5,I.slice=l4,I.sortBy=p5,I.sortedUniq=g4,I.sortedUniqBy=m4,I.split=Xj,I.spread=w5,I.tail=v4,I.take=y4,I.takeRight=b4,I.takeRightWhile=x4,I.takeWhile=C4,I.tap=L4,I.throttle=A5,I.thru=Sc,I.toArray=Ly,I.toPairs=$y,I.toPairsIn=zy,I.toPath=jR,I.toPlainObject=By,I.transform=Oj,I.unary=S5,I.union=w4,I.unionBy=A4,I.unionWith=S4,I.uniq=T4,I.uniqBy=E4,I.uniqWith=I4,I.unset=Pj,I.unzip=Xf,I.unzipWith=Cy,I.update=jj,I.updateWith=Rj,I.values=ns,I.valuesIn=Mj,I.without=O4,I.words=Gy,I.wrap=T5,I.xor=P4,I.xorBy=j4,I.xorWith=R4,I.zip=M4,I.zipObject=k4,I.zipObjectDeep=D4,I.zipWith=F4,I.entries=$y,I.entriesIn=zy,I.extend=Ny,I.extendWith=Rc,sp(I,I),I.add=MR,I.attempt=Yy,I.camelCase=Lj,I.capitalize=Uy,I.ceil=kR,I.clamp=kj,I.clone=I5,I.cloneDeep=P5,I.cloneDeepWith=j5,I.cloneWith=O5,I.conformsTo=R5,I.deburr=Hy,I.defaultTo=dR,I.divide=DR,I.endsWith=_j,I.eq=yr,I.escape=Bj,I.escapeRegExp=Nj,I.every=G4,I.find=q4,I.findIndex=my,I.findKey=aj,I.findLast=K4,I.findLastIndex=vy,I.findLastKey=lj,I.floor=FR,I.forEach=Ay,I.forEachRight=Sy,I.forIn=cj,I.forInRight=uj,I.forOwn=dj,I.forOwnRight=fj,I.get=tp,I.gt=M5,I.gte=k5,I.has=gj,I.hasIn=np,I.head=by,I.identity=vn,I.includes=e5,I.indexOf=K3,I.inRange=Dj,I.invoke=yj,I.isArguments=ci,I.isArray=Le,I.isArrayBuffer=D5,I.isArrayLike=gn,I.isArrayLikeObject=Dt,I.isBoolean=F5,I.isBuffer=To,I.isDate=L5,I.isElement=_5,I.isEmpty=B5,I.isEqual=N5,I.isEqualWith=V5,I.isError=Jf,I.isFinite=W5,I.isFunction=Zr,I.isInteger=My,I.isLength=Pc,I.isMap=ky,I.isMatch=$5,I.isMatchWith=z5,I.isNaN=U5,I.isNative=H5,I.isNil=Y5,I.isNull=G5,I.isNumber=Dy,I.isObject=It,I.isObjectLike=Pt,I.isPlainObject=xa,I.isRegExp=ep,I.isSafeInteger=q5,I.isSet=Fy,I.isString=jc,I.isSymbol=kn,I.isTypedArray=ts,I.isUndefined=K5,I.isWeakMap=X5,I.isWeakSet=Z5,I.join=e4,I.kebabCase=Vj,I.last=Qn,I.lastIndexOf=t4,I.lowerCase=Wj,I.lowerFirst=$j,I.lt=Q5,I.lte=J5,I.max=LR,I.maxBy=_R,I.mean=BR,I.meanBy=NR,I.min=VR,I.minBy=WR,I.stubArray=lp,I.stubFalse=cp,I.stubObject=ER,I.stubString=IR,I.stubTrue=OR,I.multiply=$R,I.nth=n4,I.noConflict=yR,I.noop=ap,I.now=Ec,I.pad=zj,I.padEnd=Uj,I.padStart=Hj,I.parseInt=Gj,I.random=Fj,I.reduce=i5,I.reduceRight=s5,I.repeat=Yj,I.replace=qj,I.result=Tj,I.round=zR,I.runInContext=$,I.sample=l5,I.size=d5,I.snakeCase=Kj,I.some=f5,I.sortedIndex=c4,I.sortedIndexBy=u4,I.sortedIndexOf=d4,I.sortedLastIndex=f4,I.sortedLastIndexBy=p4,I.sortedLastIndexOf=h4,I.startCase=Zj,I.startsWith=Qj,I.subtract=UR,I.sum=HR,I.sumBy=GR,I.template=Jj,I.times=PR,I.toFinite=Qr,I.toInteger=Ne,I.toLength=_y,I.toLower=eR,I.toNumber=Jn,I.toSafeInteger=ej,I.toString=nt,I.toUpper=tR,I.trim=nR,I.trimEnd=rR,I.trimStart=oR,I.truncate=iR,I.unescape=sR,I.uniqueId=RR,I.upperCase=aR,I.upperFirst=rp,I.each=Ay,I.eachRight=Sy,I.first=by,sp(I,function(){var i={};return Or(I,function(l,f){lt.call(I.prototype,f)||(i[f]=l)}),i}(),{chain:!1}),I.VERSION=r,Yn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){I[i].placeholder=I}),Yn(["drop","take"],function(i,l){Ye.prototype[i]=function(f){f=f===n?1:zt(Ne(f),0);var y=this.__filtered__&&!l?new Ye(this):this.clone();return y.__filtered__?y.__takeCount__=en(f,y.__takeCount__):y.__views__.push({size:en(f,G),type:i+(y.__dir__<0?"Right":"")}),y},Ye.prototype[i+"Right"]=function(f){return this.reverse()[i](f).reverse()}}),Yn(["filter","map","takeWhile"],function(i,l){var f=l+1,y=f==X||f==V;Ye.prototype[i]=function(S){var j=this.clone();return j.__iteratees__.push({iteratee:je(S,3),type:f}),j.__filtered__=j.__filtered__||y,j}}),Yn(["head","last"],function(i,l){var f="take"+(l?"Right":"");Ye.prototype[i]=function(){return this[f](1).value()[0]}}),Yn(["initial","tail"],function(i,l){var f="drop"+(l?"":"Right");Ye.prototype[i]=function(){return this.__filtered__?new Ye(this):this[f](1)}}),Ye.prototype.compact=function(){return this.filter(vn)},Ye.prototype.find=function(i){return this.filter(i).head()},Ye.prototype.findLast=function(i){return this.reverse().find(i)},Ye.prototype.invokeMap=ze(function(i,l){return typeof i=="function"?new Ye(this):this.map(function(f){return ha(f,i,l)})}),Ye.prototype.reject=function(i){return this.filter(Oc(je(i)))},Ye.prototype.slice=function(i,l){i=Ne(i);var f=this;return f.__filtered__&&(i>0||l<0)?new Ye(f):(i<0?f=f.takeRight(-i):i&&(f=f.drop(i)),l!==n&&(l=Ne(l),f=l<0?f.dropRight(-l):f.take(l-i)),f)},Ye.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Ye.prototype.toArray=function(){return this.take(G)},Or(Ye.prototype,function(i,l){var f=/^(?:filter|find|map|reject)|While$/.test(l),y=/^(?:head|last)$/.test(l),S=I[y?"take"+(l=="last"?"Right":""):l],j=y||/^find/.test(l);S&&(I.prototype[l]=function(){var F=this.__wrapped__,B=y?[1]:arguments,U=F instanceof Ye,oe=B[0],ie=U||Le(F),le=function(He){var Ke=S.apply(I,yo([He],B));return y&&ve?Ke[0]:Ke};ie&&f&&typeof oe=="function"&&oe.length!=1&&(U=ie=!1);var ve=this.__chain__,Se=!!this.__actions__.length,Re=j&&!ve,$e=U&&!Se;if(!j&&ie){F=$e?F:new Ye(this);var Me=i.apply(F,B);return Me.__actions__.push({func:Sc,args:[le],thisArg:n}),new Kn(Me,ve)}return Re&&$e?i.apply(this,B):(Me=this.thru(le),Re?y?Me.value()[0]:Me.value():Me)})}),Yn(["pop","push","shift","sort","splice","unshift"],function(i){var l=Xl[i],f=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",y=/^(?:pop|shift)$/.test(i);I.prototype[i]=function(){var S=arguments;if(y&&!this.__chain__){var j=this.value();return l.apply(Le(j)?j:[],S)}return this[f](function(F){return l.apply(Le(F)?F:[],S)})}}),Or(Ye.prototype,function(i,l){var f=I[l];if(f){var y=f.name+"";lt.call(Xi,y)||(Xi[y]=[]),Xi[y].push({name:l,func:f})}}),Xi[vc(n,O).name]=[{name:"wrapper",func:n}],Ye.prototype.clone=sP,Ye.prototype.reverse=aP,Ye.prototype.value=lP,I.prototype.at=_4,I.prototype.chain=B4,I.prototype.commit=N4,I.prototype.next=V4,I.prototype.plant=$4,I.prototype.reverse=z4,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=U4,I.prototype.first=I.prototype.head,aa&&(I.prototype[aa]=W4),I},Yi=NO();ti?((ti.exports=Yi)._=Yi,of._=Yi):qt._=Yi}).call(wn)})(Uu,Uu.exports);var ht=Uu.exports;const Z=$r(ht),VZ=["e-","entities/"];function WZ(e){let t=e;return VZ.forEach(n=>{t=t!=null&&t.startsWith(n)?t==null?void 0:t.substring(n.length):t}),t}function $Z(e,t){var n,r;return((n=t.options)==null?void 0:n.group)===e.id||!((r=t.options)!=null&&r.group)&&e.id==="admin"}function zZ(e,t){const n=WZ(e.name);return(t==null?void 0:t.includes(`${n}:list`))||(t==null?void 0:t.includes(`${n}:find`))}function Nh(e,t){let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const o=e[r];if(o.children&&(n=Nh(o.children,t),n))return n}return n}function y2(e,t,n){let r=e.find(o=>["group","collapse"].indexOf(o.type)!==-1&&$Z(o,t));if(!r)for(let o=0;o<e.length;o++){const s=e[o];if(s.children&&(r=y2(s.children,t),r))return r}return r}function b2(e,t){let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const o=e[r];if(o.children&&(n=b2(o.children,t),n))return n}return n}function x2(e){return e?e.type==="item"?!0:(e.children&&(e.children=e.children.filter(x2)),e.children&&e.children.length>0):!1}function C2(e){return e.children&&e.children.forEach(t=>{t.parent=e,C2(t)}),e}function UZ(e,t,n,r,o){function s(g){return g.title=r(g.title,{_:g.title}),g.children&&g.children.forEach(m=>s(m)),g}const a=Object.keys(t);function c(g,m){return g.children&&(g.children=g.children.filter(v=>{if(v.resource===!1){const b=v.roles||[];return!!(b.length===0||b.some(x=>o.includes(x)))}return v.type==="item"?m.includes(v.id):(c(v,m),v.children&&v.children.length>0)})),g}const u=Z.cloneDeep(e).map(g=>({children:[],...g,type:g.type||"group"})).map(s).map(g=>c(g,a)),d=Object.values(t).map(g=>{var m;return((m=g.options)==null?void 0:m.group)||"admin"}).filter((g,m,v)=>v.indexOf(g)===m).filter(g=>g!==void 0&&b2(e,g)===null).map(g=>({id:g,title:r(`ra.menu.group.${g}`),type:"group",icon:qe.AntDesignOutlined,children:[]})),h=[...u,...d];return Object.values(t).forEach(g=>{var M,E,R,P;const m=y2(h,g),v=(M=m==null?void 0:m.children)==null?void 0:M.find(k=>k.id===g.name),b=(E=m==null?void 0:m.children)==null?void 0:E.some(k=>k.id===g.name),x=(v==null?void 0:v.roles)||((R=g.options)==null?void 0:R.roles)||[],w=!x||x.length===0||x.some(k=>o.includes(k));if(!zZ(g,n)||g.list||!w){b&&m&&m.children&&((P=m==null?void 0:m.children)==null?void 0:P.length)>0&&(m.children=m.children.filter(k=>k.id!==g.name));return}m&&(m.children||(m.children=[]))}),h.filter(x2).map(C2)}function ja(){throw new Error("Not implemented")}const w2={openItem:[],openComponent:"buttons",selectedID:null,drawerOpen:!1,error:null,menu:[],activeItem:ja,openDrawer:ja,activeID:ja,hasError:ja,setMenu:ja},A2=T.createContext(w2);function S2({menu:e,children:t}){const[n,r]=T.useState({...w2,menu:e});function o(d){r(h=>({...h,menu:d}))}function s(d){r(h=>({...h,openItem:d}))}function a(d){r(h=>({...h,selectedID:d}))}function c(d){r(h=>({...h,drawerOpen:d}))}function u(d){r(h=>({...h,error:d}))}return T.useEffect(()=>{o(e)},[e]),p.jsx(A2.Provider,{value:{...n,setMenu:o,activeItem:s,openDrawer:c,activeID:a,hasError:u},children:t})}function Ld(){return T.useContext(A2)}function qm(){const e=re.useResourceDefinitions(),{isLoading:t,data:n}=re.useGetIdentity(),r=!!n&&!!n.id,{permissions:o}=re.usePermissions(r),{menu:s}=Ld(),a=re.useTranslate(),c=T.useMemo(()=>{if(t||!n)return null;const h=((n==null?void 0:n.roles)||[]).map(m=>m.id);return UZ(s,e,o,a,h)},[t,n,e,o,a,s]),u=T.useMemo(()=>t,[t]);function d(h){if(c)return Nh(c,h)}return{menu:c,isLoading:u,getItem:d,findInMenu:u?()=>{}:Nh}}function T2(){const e=re.useTranslate(),{isLoading:t,menu:n,findInMenu:r}=qm(),{pathname:o}=Pi.useLocation();return T.useMemo(()=>{var m;const s=o.split("/").filter(v=>v),a=Z.cloneDeep(n);let c=o,u=r(a,o);if((!u||u.type==="collapse"||u.type==="group")&&(u=r(a,s[s.length-1]),c=u?u.id:c),!u||u.type==="collapse"||u.type==="group")for(let v=s.length;v>=0;v--){const b=s.slice(0,v).join("/");if(u=r(a,b),u){c=u.id;break}}const d=(m=u==null?void 0:u.url)==null?void 0:m.split("/"),h=(d==null?void 0:d.length)||0;if(s.length>=h){const v=s[s.length-1];if(u){const b=v==="create"||o===u.url?"create":"edit",x=`resources.${c}.breadcrumbs.${b}`,w={id:`${c}-${b}`,type:"item",title:e(x,{_:e(x,{_:x})}),url:o,breadcrumbs:!0,parent:u};u.type="collapse",u.breadcrumbs=!0,u.children=u.children||[],u.children.push(w),u=w}}let g=[];if(u){let v={...u,last:!0};for(;v;)g.push(v),v=v.parent;g=g.reverse()}return{isLoading:t,navigation:{items:a},breadcrumbs:g}},[t,o,n,r,e])}function il(){return Ld()}function Tr(e,t,n){const r=Z.chain((e==null?void 0:e.sx)??{}).cloneDeepWith(a=>Z.isFunction(a)?a:void 0).value();n!=null&&n.defaults?Z.defaultsDeep(r,t):Z.merge(r,t);const[o,s]=T.useState(r);return T.useEffect(()=>{Z.isEqual(o,r)||s(r)},[o,r]),o}function HZ(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}function Ni(e){this._maxSize=e,this.clear()}Ni.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Ni.prototype.get=function(e){return this._values[e]};Ni.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var GZ=/[^.^\]^[]+|(?=\[\]|\.\.)/g,E2=/^\d+$/,YZ=/^\d/,qZ=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,KZ=/^\s*(['"]?)(.*?)(\1)\s*$/,Km=512,nC=new Ni(Km),rC=new Ni(Km),oC=new Ni(Km),Ii={Cache:Ni,split:Vh,normalizePath:zp,setter:function(e){var t=zp(e);return rC.get(e)||rC.set(e,function(r,o){for(var s=0,a=t.length,c=r;s<a-1;){var u=t[s];if(u==="__proto__"||u==="constructor"||u==="prototype")return r;c=c[t[s++]]}c[t[s]]=o})},getter:function(e,t){var n=zp(e);return oC.get(e)||oC.set(e,function(o){for(var s=0,a=n.length;s<a;)if(o!=null||!t)o=o[n[s++]];else return;return o})},join:function(e){return e.reduce(function(t,n){return t+(Xm(n)||E2.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){XZ(Array.isArray(e)?e:Vh(e),t,n)}};function zp(e){return nC.get(e)||nC.set(e,Vh(e).map(function(t){return t.replace(KZ,"$2")}))}function Vh(e){return e.match(GZ)||[""]}function XZ(e,t,n){var r=e.length,o,s,a,c;for(s=0;s<r;s++)o=e[s],o&&(JZ(o)&&(o='"'+o+'"'),c=Xm(o),a=!c&&/^\d+$/.test(o),t.call(n,o,c,a,s,e))}function Xm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function ZZ(e){return e.match(YZ)&&!e.match(E2)}function QZ(e){return qZ.test(e)}function JZ(e){return!Xm(e)&&(ZZ(e)||QZ(e))}const eQ=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,_d=e=>e.match(eQ)||[],Bd=e=>e[0].toUpperCase()+e.slice(1),Zm=(e,t)=>_d(e).join(t).toLowerCase(),I2=e=>_d(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),tQ=e=>Bd(I2(e)),nQ=e=>Zm(e,"_"),rQ=e=>Zm(e,"-"),oQ=e=>Bd(Zm(e," ")),iQ=e=>_d(e).map(Bd).join(" ");var Up={words:_d,upperFirst:Bd,camelCase:I2,pascalCase:tQ,snakeCase:nQ,kebabCase:rQ,sentenceCase:oQ,titleCase:iQ},Qm={exports:{}};Qm.exports=function(e){return O2(sQ(e),e)};Qm.exports.array=O2;function O2(e,t){var n=e.length,r=new Array(n),o={},s=n,a=aQ(t),c=lQ(e);for(t.forEach(function(d){if(!c.has(d[0])||!c.has(d[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)o[s]||u(e[s],s,new Set);return r;function u(d,h,g){if(g.has(d)){var m;try{m=", node was:"+JSON.stringify(d)}catch{m=""}throw new Error("Cyclic dependency"+m)}if(!c.has(d))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(d));if(!o[h]){o[h]=!0;var v=a.get(d)||new Set;if(v=Array.from(v),h=v.length){g.add(d);do{var b=v[--h];u(b,c.get(b),g)}while(h);g.delete(d)}r[--n]=d}}}function sQ(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var o=e[n];t.add(o[0]),t.add(o[1])}return Array.from(t)}function aQ(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var o=e[n];t.has(o[0])||t.set(o[0],new Set),t.has(o[1])||t.set(o[1],new Set),t.get(o[0]).add(o[1])}return t}function lQ(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var cQ=Qm.exports;const uQ=$r(cQ),dQ=Object.prototype.toString,fQ=Error.prototype.toString,pQ=RegExp.prototype.toString,hQ=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",gQ=/^Symbol\((.*)\)(.*)$/;function mQ(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function iC(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return mQ(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return hQ.call(e).replace(gQ,"Symbol($1)");const r=dQ.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+fQ.call(e)+"]":r==="RegExp"?pQ.call(e):null}function Vo(e,t){let n=iC(e,t);return n!==null?n:JSON.stringify(e,function(r,o){let s=iC(this[r],t);return s!==null?s:o},2)}function P2(e){return e==null?[]:[].concat(e)}let j2,R2,M2,vQ=/\$\{\s*(\w+)\s*\}/g;j2=Symbol.toStringTag;class sC{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[j2]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],P2(t).forEach(s=>{if(Cn.isError(s)){this.errors.push(...s.errors);const a=s.inner.length?s.inner:[s];this.inner.push(...a)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}R2=Symbol.hasInstance;M2=Symbol.toStringTag;class Cn 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(vQ,(o,s)=>Vo(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,o,s){const a=new sC(t,n,r,o);if(s)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[M2]="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,Cn)}static[R2](t){return sC[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Mr={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 \`${Vo(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Vo(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Vo(n,!0)}\``+o}},xn={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"},Mo={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"},Wh={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},yQ={isValue:"${path} field must be ${value}"},$h={noUnknown:"${path} field has unspecified keys: ${unknown}"},bQ={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"},xQ={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${Vo(n,!0)}\``;if(n.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${Vo(n,!0)}\``}return Cn.formatError(Mr.notType,e)}};Object.assign(Object.create(null),{mixed:Mr,string:xn,number:Mo,date:Wh,object:$h,array:bQ,boolean:yQ,tuple:xQ});const Jm=e=>e&&e.__isYupSchema__;class Hu{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:s}=n,a=typeof r=="function"?r:(...c)=>c.every(u=>u===r);return new Hu(t,(c,u)=>{var d;let h=a(...c)?o:s;return(d=h==null?void 0:h(u))!=null?d:u})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.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(!Jm(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const qc={context:"$",value:"."};class Vi{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]===qc.context,this.isValue=this.key[0]===qc.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?qc.context:this.isValue?qc.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Ii.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}}Vi.prototype.__isYupRef=!0;const so=e=>e==null;function cs(e){function t({value:n,path:r="",options:o,originalValue:s,schema:a},c,u){const{name:d,test:h,params:g,message:m,skipAbsent:v}=e;let{parent:b,context:x,abortEarly:w=a.spec.abortEarly,disableStackTrace:O=a.spec.disableStackTrace}=o;function M(z){return Vi.isRef(z)?z.getValue(n,b,x):z}function E(z={}){const se=Object.assign({value:n,originalValue:s,label:a.spec.label,path:z.path||r,spec:a.spec,disableStackTrace:z.disableStackTrace||O},g,z.params);for(const X of Object.keys(se))se[X]=M(se[X]);const ae=new Cn(Cn.formatError(z.message||m,se),n,se.path,z.type||d,se.disableStackTrace);return ae.params=se,ae}const R=w?c:u;let P={path:r,parent:b,type:d,from:o.from,createError:E,resolve:M,options:o,originalValue:s,schema:a};const k=z=>{Cn.isError(z)?R(z):z?u(null):R(E())},D=z=>{Cn.isError(z)?R(z):c(z)};if(v&&so(n))return k(!0);let Y;try{var ee;if(Y=h.call(P,n,P),typeof((ee=Y)==null?void 0:ee.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${P.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(Y).then(k,D)}}catch(z){D(z);return}k(Y)}return t.OPTIONS=e,t}function CQ(e,t,n,r=n){let o,s,a;return t?(Ii.forEach(t,(c,u,d)=>{let h=u?c.slice(1,c.length-1):c;e=e.resolve({context:r,parent:o,value:n});let g=e.type==="tuple",m=d?parseInt(h,10):0;if(e.innerType||g){if(g&&!d)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&&m>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${c}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[m],e=g?e.spec.types[m]:e.innerType}if(!d){if(!e.fields||!e.fields[h])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[h],e=e.fields[h]}s=h,a=u?"["+c+"]":"."+c}),{schema:e,parent:o,parentPath:s}):{parent:o,parentPath:t,schema:e}}class Gu extends Set{describe(){const t=[];for(const n of this.values())t.push(Vi.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 Gu(this.values())}merge(t,n){const r=this.clone();return t.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function Ss(e,t=new Map){if(Jm(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<e.length;r++)n[r]=Ss(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,o]of e.entries())n.set(r,Ss(o,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Ss(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,o]of Object.entries(e))n[r]=Ss(o,t)}else throw Error(`Unable to clone ${e}`);return n}class cr{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Gu,this._blacklist=new Gu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Mr.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=Ss(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(s=>{t.tests.forEach(a=>{s.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,s)=>s.resolve(o,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,o,s;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:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),o=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(o&&so(s))return s;let a=Vo(t),c=Vo(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
215
215
 
216
216
  attempted value: ${a}
217
- `+(c!==a?`result of cast: ${c}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,s)=>s.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:s,originalValue:a=t,strict:c=this.spec.strict}=n,u=t;c||(u=this._cast(u,Object.assign({assert:!1},n)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:s,value:u,originalValue:a,options:n,tests:d},r,h=>{if(h.length)return o(h,u);this.runTests({path:s,value:u,originalValue:a,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:s,value:a,originalValue:c,path:u,options:d}=t,h=x=>{o||(o=!0,n(x,a))},g=x=>{o||(o=!0,r(x,a))},m=s.length,v=[];if(!m)return g([]);let b={value:a,originalValue:c,path:u,options:d,schema:this};for(let x=0;x<s.length;x++){const w=s[x];w(b,h,function(M){M&&(Array.isArray(M)?v.push(...M):v.push(M)),--m<=0&&g(v)})}}asNestedTest({key:t,index:n,parent:r,parentPath:o,originalParent:s,options:a}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof c=="number";let d=r[c];const h=Object.assign({},a,{strict:!0,parent:r,value:d,originalValue:s[c],key:void 0,[u?"index":"key"]:c,path:u||c.includes(".")?`${o||""}[${u?c:`"${c}"`}]`:(o?`${o}.`:"")+t});return(g,m,v)=>this.resolve(h)._validate(d,h,m,v)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,c)=>o._validate(t,n,(u,d)=>{Cn.isError(u)&&(u.value=d),c(u)},(u,d)=>{u.length?c(new Cn(u,d,void 0,void 0,s)):a(d)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),s,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(c,u)=>{throw Cn.isError(c)&&(c.value=u),c},(c,u)=>{if(c.length)throw new Cn(c,t,void 0,void 0,a);s=u}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Cn.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Cn.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Ss(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=cs({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=cs({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Mr.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Mr.notNull){return this.nullability(!1,t)}required(t=Mr.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=Mr.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=cs(n),s=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&&(s||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=P2(t).map(s=>new Vi(s));return o.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Hu(o,n):Hu.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=cs({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=Mr.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=cs({message:n,name:"oneOf",skipAbsent:!0,test(o){let s=this.schema._whitelist,a=s.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:a}})}}),r}notOneOf(t,n=Mr.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=cs({message:n,name:"notOneOf",test(o){let s=this.schema._blacklist,a=s.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(s).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:s,nullable:a}=n.spec;return{meta:o,label:r,optional:s,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,d,h)=>h.findIndex(g=>g.name===u.name)===d)}}}cr.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])cr.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:s,schema:a}=CQ(this,t,n,r.context);return a[e](o&&o[s],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])cr.prototype[e]=cr.prototype.oneOf;for(const e of["not","nope"])cr.prototype[e]=cr.prototype.notOneOf;const wQ=()=>!0;function k2(e){return new D2(e)}class D2 extends cr{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:wQ},t))}}k2.prototype=D2.prototype;const AQ=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function SQ(e){const t=zh(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 zh(e){var t,n;const r=AQ.exec(e);return r?{year:no(r[1]),month:no(r[2],1)-1,day:no(r[3],1),hour:no(r[4]),minute:no(r[5]),second:no(r[6]),millisecond:r[7]?no(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:no(r[10]),minuteOffset:no(r[11])}:null}function no(e,t=0){return Number(e)||t}let TQ=/^[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])?)*$/,EQ=/^((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,IQ=/^(?:[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,OQ="^\\d{4}-\\d{2}-\\d{2}",PQ="\\d{2}:\\d{2}:\\d{2}",jQ="(([+-]\\d{2}(:?\\d{2})?)|Z)",RQ=new RegExp(`${OQ}T${PQ}(\\.\\d+)?${jQ}$`),MQ=e=>so(e)||e===e.trim(),kQ={}.toString();function ao(){return new F2}class F2 extends cr{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===kQ?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Mr.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=xn.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=xn.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=xn.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,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:s}=n:o=n),this.test({name:s||"matches",message:o||xn.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=xn.email){return this.matches(TQ,{name:"email",message:t,excludeEmptyString:!0})}url(t=xn.url){return this.matches(EQ,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=xn.uuid){return this.matches(IQ,{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(RQ,{name:"datetime",message:n||xn.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||xn.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const a=zh(s);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||xn.datetime_precision,params:{precision:o},skipAbsent:!0,test:s=>{if(!s||o==null)return!0;const a=zh(s);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=xn.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:MQ})}lowercase(t=xn.lowercase){return this.transform(n=>so(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>so(n)||n===n.toLowerCase()})}uppercase(t=xn.uppercase){return this.transform(n=>so(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>so(n)||n===n.toUpperCase()})}}ao.prototype=F2.prototype;let DQ=e=>e!=+e;function L2(){return new _2}class _2 extends cr{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!DQ(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=Mo.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=Mo.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=Mo.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=Mo.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=Mo.positive){return this.moreThan(0,t)}negative(t=Mo.negative){return this.lessThan(0,t)}integer(t=Mo.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>so(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=>so(o)?o:Math[t](o))}}L2.prototype=_2.prototype;let FQ=new Date(""),LQ=e=>Object.prototype.toString.call(e)==="[object Date]";class Nd extends cr{constructor(){super({type:"date",check(t){return LQ(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=SQ(t),isNaN(t)?Nd.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Vi.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=Wh.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=Wh.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)}})}}Nd.INVALID_DATE=FQ;Nd.prototype;function _Q(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([a,c])=>`${a}-${c}`));function s(a,c){let u=Ii.split(a)[0];r.add(u),o.has(`${c}-${u}`)||n.push([c,u])}for(const a of Object.keys(e)){let c=e[a];r.add(a),Vi.isRef(c)&&c.isSibling?s(c.path,a):Jm(c)&&"deps"in c&&c.deps.forEach(u=>s(u,a))}return uQ.array(Array.from(r),n).reverse()}function aC(e,t){let n=1/0;return e.some((r,o)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=o,!0}),n}function B2(e){return(t,n)=>aC(e,t)-aC(e,n)}const BQ=(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 uu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=uu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=uu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(uu)}):"optional"in e?e.optional():e}const NQ=(e,t)=>{const n=[...Ii.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=Ii.getter(Ii.join(n),!0)(e);return!!(o&&r in o)};let lC=e=>Object.prototype.toString.call(e)==="[object Object]";function VQ(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const WQ=B2([]);function e0(e){return new N2(e)}class N2 extends cr{constructor(t){super({type:"object",check(n){return lC(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=WQ,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 s=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(o).filter(g=>!this._nodes.includes(g))),u={},d=Object.assign({},n,{parent:u,__validating:n.__validating||!1}),h=!1;for(const g of c){let m=s[g],v=g in o;if(m){let b,x=o[g];d.path=(n.path?`${n.path}.`:"")+g,m=m.resolve({value:x,context:n.context,parent:u});let w=m instanceof cr?m.spec:void 0,O=w==null?void 0:w.strict;if(w!=null&&w.strip){h=h||g in o;continue}b=!n.__validating||!O?m.cast(o[g],d):o[g],b!==void 0&&(u[g]=b)}else v&&!a&&(u[g]=o[g]);(v!==g in u||u[g]!==o[g])&&(h=!0)}return h?u:o}_validate(t,n={},r,o){let{from:s=[],originalValue:a=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:a},...s],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(u,d)=>{if(!c||!lC(d)){o(u,d);return}a=a||d;let h=[];for(let g of this._nodes){let m=this.fields[g];!m||Vi.isRef(m)||h.push(m.asNestedTest({options:n,key:g,parent:d,parentPath:n.path,originalParent:a}))}this.runTests({tests:h,value:d,originalValue:a,options:n},r,g=>{o(g.sort(this._sortErrors).concat(u),d)})})}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,s]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?s: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 s=this.fields[r];let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=_Q(t,n),r._sortErrors=B2(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 uu(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=Ii.getter(t,!0);return this.transform(s=>{if(!s)return s;let a=s;return NQ(s,t)&&(a=Object.assign({},s),r||delete a[t],a[n]=o(s)),a})}json(){return this.transform(BQ)}noUnknown(t=!0,n=$h.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 s=VQ(this.schema,o);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=$h.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(Up.camelCase)}snakeCase(){return this.transformKeys(Up.snakeCase)}constantCase(){return this.transformKeys(t=>Up.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,a]of Object.entries(n.fields)){var o;let c=t;(o=c)!=null&&o.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[s]})),r.fields[s]=a.describe(c)}return r}}e0.prototype=N2.prototype;const cC=k2().test("function","Invalid function",e=>Z.isFunction(e));var Do,Si,Da;class V2{constructor(){eo(this,Si);eo(this,Do,[])}get(t){if(ao().required().validateSync(t),wa(this,Si,Da).call(this)){const n=localStorage.getItem(t);return Z.isNil(n)?null:JSON.parse(n)}else return null}set(t,n){return ao().required().validateSync(t),wa(this,Si,Da).call(this)?(localStorage.setItem(t,JSON.stringify(n)),n):null}watch(t,n){ao().required().validateSync(t),cC.validateSync(n),wa(this,Si,Da).call(this)&&(yn(this,Do).push({key:t,callback:n}),window.addEventListener("storage",r=>{r.storageArea===localStorage&&r.key===t&&n(this.get(t))}))}unwatch(t,n){ao().required().validateSync(t),cC.optional().default(Z.identity).validateSync(n),wa(this,Si,Da).call(this)&&(n!==void 0?Eo(this,Do,Z.reject(yn(this,Do),r=>r.key===t&&r.callback===n)):Eo(this,Do,Z.reject(yn(this,Do),r=>r.key===t)))}}Do=new WeakMap,Si=new WeakSet,Da=function(){return typeof window<"u"};function Yu(e={},t=[],n={}){const{isEmpty:r=Z.isEmpty}=n;return!Z.some(t,o=>r((e??{})[o.locale]))}function W2(e={},t=[],n={}){const{isEmpty:r=Z.isEmpty}=n;return Z.some(t,o=>!r((e??{})[o.locale]))}function t0(e,t,n){if(!Z.isPlainObject(e)||t===void 0)return;const r=Z.isPlainObject(n)?n:{},o=!!((r==null?void 0:r.fallback)??!0);let s=e[String(t)];if(s===void 0&&o){const a=Z.isArray(r.fallbackLocales)&&!Z.isEmpty(r.fallbackLocales)?r.fallbackLocales:["en"];s=Z.chain(a).map(c=>e[String(c)]).reject(Z.isUndefined).first().value(),s===void 0&&(s=Z.chain(e).values().first().value())}return s}var $2={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(wn,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",a="second",c="minute",u="hour",d="day",h="week",g="month",m="quarter",v="year",b="date",x="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(X){var K=["th","st","nd","rd"],V=X%100;return"["+X+(K[(V-20)%10]||K[V]||K[0])+"]"}},E=function(X,K,V){var te=String(X);return!te||te.length>=K?X:""+Array(K+1-te.length).join(V)+X},R={s:E,z:function(X){var K=-X.utcOffset(),V=Math.abs(K),te=Math.floor(V/60),N=V%60;return(K<=0?"+":"-")+E(te,2,"0")+":"+E(N,2,"0")},m:function X(K,V){if(K.date()<V.date())return-X(V,K);var te=12*(V.year()-K.year())+(V.month()-K.month()),N=K.clone().add(te,g),J=V-N<0,W=K.clone().add(te+(J?-1:1),g);return+(-(te+(V-N)/(J?N-W:W-N))||0)},a:function(X){return X<0?Math.ceil(X)||0:Math.floor(X)},p:function(X){return{M:g,y:v,w:h,d,D:b,h:u,m:c,s:a,ms:s,Q:m}[X]||String(X||"").toLowerCase().replace(/s$/,"")},u:function(X){return X===void 0}},P="en",k={};k[P]=M;var D="$isDayjsObject",H=function(X){return X instanceof se||!(!X||!X[D])},Y=function X(K,V,te){var N;if(!K)return P;if(typeof K=="string"){var J=K.toLowerCase();k[J]&&(N=J),V&&(k[J]=V,N=J);var W=K.split("-");if(!N&&W.length>1)return X(W[0])}else{var G=K.name;k[G]=K,N=G}return!te&&N&&(P=N),N||!te&&P},ee=function(X,K){if(H(X))return X.clone();var V=typeof K=="object"?K:{};return V.date=X,V.args=arguments,new se(V)},z=R;z.l=Y,z.i=H,z.w=function(X,K){return ee(X,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var se=function(){function X(V){this.$L=Y(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[D]=!0}var K=X.prototype;return K.parse=function(V){this.$d=function(te){var N=te.date,J=te.utc;if(N===null)return new Date(NaN);if(z.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var W=N.match(w);if(W){var G=W[2]-1||0,ue=(W[7]||"0").substring(0,3);return J?new Date(Date.UTC(W[1],G,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ue)):new Date(W[1],G,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ue)}}return new Date(N)}(V),this.init()},K.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},K.$utils=function(){return z},K.isValid=function(){return this.$d.toString()!==x},K.isSame=function(V,te){var N=ee(V);return this.startOf(te)<=N&&N<=this.endOf(te)},K.isAfter=function(V,te){return ee(V)<this.startOf(te)},K.isBefore=function(V,te){return this.endOf(te)<ee(V)},K.$g=function(V,te,N){return z.u(V)?this[te]:this.set(N,V)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(V,te){var N=this,J=!!z.u(te)||te,W=z.p(V),G=function(ye,xe){var Oe=z.w(N.$u?Date.UTC(N.$y,xe,ye):new Date(N.$y,xe,ye),N);return J?Oe:Oe.endOf(d)},ue=function(ye,xe){return z.w(N.toDate()[ye].apply(N.toDate("s"),(J?[0,0,0,0]:[23,59,59,999]).slice(xe)),N)},he=this.$W,de=this.$M,pe=this.$D,me="set"+(this.$u?"UTC":"");switch(W){case v:return J?G(1,0):G(31,11);case g:return J?G(1,de):G(0,de+1);case h:var we=this.$locale().weekStart||0,be=(he<we?he+7:he)-we;return G(J?pe-be:pe+(6-be),de);case d:case b:return ue(me+"Hours",0);case u:return ue(me+"Minutes",1);case c:return ue(me+"Seconds",2);case a:return ue(me+"Milliseconds",3);default:return this.clone()}},K.endOf=function(V){return this.startOf(V,!1)},K.$set=function(V,te){var N,J=z.p(V),W="set"+(this.$u?"UTC":""),G=(N={},N[d]=W+"Date",N[b]=W+"Date",N[g]=W+"Month",N[v]=W+"FullYear",N[u]=W+"Hours",N[c]=W+"Minutes",N[a]=W+"Seconds",N[s]=W+"Milliseconds",N)[J],ue=J===d?this.$D+(te-this.$W):te;if(J===g||J===v){var he=this.clone().set(b,1);he.$d[G](ue),he.init(),this.$d=he.set(b,Math.min(this.$D,he.daysInMonth())).$d}else G&&this.$d[G](ue);return this.init(),this},K.set=function(V,te){return this.clone().$set(V,te)},K.get=function(V){return this[z.p(V)]()},K.add=function(V,te){var N,J=this;V=Number(V);var W=z.p(te),G=function(de){var pe=ee(J);return z.w(pe.date(pe.date()+Math.round(de*V)),J)};if(W===g)return this.set(g,this.$M+V);if(W===v)return this.set(v,this.$y+V);if(W===d)return G(1);if(W===h)return G(7);var ue=(N={},N[c]=r,N[u]=o,N[a]=n,N)[W]||1,he=this.$d.getTime()+V*ue;return z.w(he,this)},K.subtract=function(V,te){return this.add(-1*V,te)},K.format=function(V){var te=this,N=this.$locale();if(!this.isValid())return N.invalidDate||x;var J=V||"YYYY-MM-DDTHH:mm:ssZ",W=z.z(this),G=this.$H,ue=this.$m,he=this.$M,de=N.weekdays,pe=N.months,me=N.meridiem,we=function(xe,Oe,ce,tt){return xe&&(xe[Oe]||xe(te,J))||ce[Oe].slice(0,tt)},be=function(xe){return z.s(G%12||12,xe,"0")},ye=me||function(xe,Oe,ce){var tt=xe<12?"AM":"PM";return ce?tt.toLowerCase():tt};return J.replace(O,function(xe,Oe){return Oe||function(ce){switch(ce){case"YY":return String(te.$y).slice(-2);case"YYYY":return z.s(te.$y,4,"0");case"M":return he+1;case"MM":return z.s(he+1,2,"0");case"MMM":return we(N.monthsShort,he,pe,3);case"MMMM":return we(pe,he);case"D":return te.$D;case"DD":return z.s(te.$D,2,"0");case"d":return String(te.$W);case"dd":return we(N.weekdaysMin,te.$W,de,2);case"ddd":return we(N.weekdaysShort,te.$W,de,3);case"dddd":return de[te.$W];case"H":return String(G);case"HH":return z.s(G,2,"0");case"h":return be(1);case"hh":return be(2);case"a":return ye(G,ue,!0);case"A":return ye(G,ue,!1);case"m":return String(ue);case"mm":return z.s(ue,2,"0");case"s":return String(te.$s);case"ss":return z.s(te.$s,2,"0");case"SSS":return z.s(te.$ms,3,"0");case"Z":return W}return null}(xe)||W.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(V,te,N){var J,W=this,G=z.p(te),ue=ee(V),he=(ue.utcOffset()-this.utcOffset())*r,de=this-ue,pe=function(){return z.m(W,ue)};switch(G){case v:J=pe()/12;break;case g:J=pe();break;case m:J=pe()/3;break;case h:J=(de-he)/6048e5;break;case d:J=(de-he)/864e5;break;case u:J=de/o;break;case c:J=de/r;break;case a:J=de/n;break;default:J=de}return N?J:z.a(J)},K.daysInMonth=function(){return this.endOf(g).$D},K.$locale=function(){return k[this.$L]},K.locale=function(V,te){if(!V)return this.$L;var N=this.clone(),J=Y(V,te,!0);return J&&(N.$L=J),N},K.clone=function(){return z.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},X}(),ae=se.prototype;return ee.prototype=ae,[["$ms",s],["$s",a],["$m",c],["$H",u],["$W",d],["$M",g],["$y",v],["$D",b]].forEach(function(X){ae[X[1]]=function(K){return this.$g(K,X[0],X[1])}}),ee.extend=function(X,K){return X.$i||(X(K,se,ee),X.$i=!0),ee},ee.locale=Y,ee.isDayjs=H,ee.unix=function(X){return ee(1e3*X)},ee.en=k[P],ee.Ls=k,ee.p={},ee})})($2);var z2=$2.exports;const Wr=$r(z2);function U2(e){const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return Wr().hour(n).minute(r)}const Fa=new V2;function $Q(e,t,n){return function(r){const o=Z.isFunction(r)?r(t):r;return Fa.set(e,o),n(o),o}}function n0(e,t){var u;ao().required().validateSync(e);const[n,r]=T.useState(Fa.get(e)??t),o=T.useRef(t),s=Z.isEqual(o.current,t)?o.current:t,a=T.useRef(),c=a.current;return T.useEffect(()=>{r(Fa.get(e)??s)},[e,s,r]),T.useEffect(()=>{function d(h){r(h)}return Fa.watch(e,d),()=>{Fa.unwatch(e,d)}},[e,r]),(e!==(c==null?void 0:c.key)||!Z.isEqual(n,c==null?void 0:c.value))&&(a.current={key:e,value:n,setter:$Q(e,n,r)}),[n,((u=a.current)==null?void 0:u.setter)??Z.noop]}function H2(e){const[t]=re.useLocaleState();return e!==void 0?String(e):t}function zQ(e,t){const n=H2(t==null?void 0:t.locale);return t0(e,n,t)}function UQ(e){const t=H2(e==null?void 0:e.locale);return T.useCallback(r=>t0(r,t,e),[t,e])}function G2(e){if(!Z.isPlainObject(e))throw new Error("[useMemoizedObject]: param must be a plain JS object");const[t,n]=T.useState(e);return T.useEffect(()=>{Z.isEqual(e,t)||n(e)},[e,t]),t}function Pl(){const[e,t]=T.useState(null),n=!!e,r=T.useCallback(a=>t((a==null?void 0:a.currentTarget)??null),[t]),o=T.useCallback(()=>t(null),[t]),s=T.useCallback(a=>{n?o():r(a)},[n,r,o]);return{anchorEl:e,open:n,handleClick:r,handleClose:o,handleToggle:s}}function HQ(e,t){const[n,r]=T.useState({width:1,height:1}),o=e.current;return T.useEffect(()=>{function s(){var d;let c=0,u=0;switch(t){case"client":c=(o==null?void 0:o.clientWidth)??0,u=(o==null?void 0:o.clientHeight)??0;break;case"offset":c=(o==null?void 0:o.offsetWidth)??0,u=(o==null?void 0:o.offsetHeight)??0;break;case"scroll":c=(o==null?void 0:o.scrollWidth)??0,u=(o==null?void 0:o.scrollHeight)??0;break;case"bounding":default:{const h=((d=e.current)==null?void 0:d.getBoundingClientRect())??{width:0,height:0};c=h.width,u=h.height;break}}r({width:c,height:u})}const a=new ResizeObserver(s);return Z.isEmpty(e==null?void 0:e.current)||(a.observe(e==null?void 0:e.current),s()),()=>{a.disconnect()}},[o,t,e]),n}function r0(e){const t=L.useRecordContext(),n=L.useTranslate(),r=L.useResourceContext(),o=t!=null&&t.id?"edit":"create";return T.useMemo(()=>{if(e===!1)return;const a=`resources.${r}.title`;return e||n(`resources.${r}.title.${o}`,{_:n(a,{_:a}),...t})},[o,t,r,n,e])}function Rr(){throw new Error("Method must be implemented")}const Y2={fontFamily:"'Inter', sans-serif",menuOrientation:"vertical",miniDrawer:!1,container:!1,mode:"light",presetColor:"theme4",themeDirection:"ltr",appDefaultPath:"/",drawerWidth:260,horizontalMaxItems:6,spacing:2,setFontFamily:Rr,setMenuOrientation:Rr,setMiniDrawer:Rr,setContainer:Rr,setMode:Rr,setPresetColor:Rr,setThemeDirection:Rr,setAppDefaultPath:Rr,setDrawerWidth:Rr,setHorizontalMaxItems:Rr,isVerticalLayout:e=>!1,isHorizontalLayout:e=>!1};function GQ(e){return e==="vertical"}function YQ(e){return e==="horizontal"}const o0=T.createContext(Y2);function Uh({initialConfig:e,children:t}){const[n,r]=n0("theme-config",{...Y2,...e});function o(b){r(x=>({...x,fontFamily:b}))}function s(b){r(x=>({...x,menuOrientation:b}))}function a(b){r(x=>({...x,miniDrawer:b}))}function c(b){r(x=>({...x,container:b}))}function u(b){r(x=>({...x,mode:b}))}function d(b){r(x=>({...x,presetColor:b}))}function h(b){r(x=>({...x,themeDirection:b}))}function g(b){r(x=>({...x,appDefaultPath:b}))}function m(b){r(x=>({...x,drawerWidth:b}))}function v(b){r(x=>({...x,horizontalMaxItems:b}))}return p.jsx(o0.Provider,{value:{...n,setFontFamily:o,setMenuOrientation:s,setMiniDrawer:a,setContainer:c,setMode:u,setPresetColor:d,setThemeDirection:h,setAppDefaultPath:g,setDrawerWidth:m,setHorizontalMaxItems:v,isVerticalLayout:GQ,isHorizontalLayout:YQ},children:t})}function i0(){return T.useContext(o0)}function Pn(){return i0()}const qQ=Sl(L.Toolbar,{slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end",position:"initial !important","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}}));function Wi(e){return p.jsx(qQ,{...e})}function q2({children:e,spacing:t,defaultValues:n,...r}){const{spacing:o}=Pn();return p.jsx(XQ,{defaultValues:n,spacing:t||o,children:p.jsx(A.Grid,{container:!0,...r,spacing:t||o,children:e})})}function KQ({children:e,content:t=!0,title:n,subheader:r=null,secondary:o=null,toolbar:s=!1,lg:a=12,md:c=12,sm:u=12,xs:d=12,...h}){const g=L.useTranslate(),m=L.useResourceContext(),{cardTitle:v,cardSubheader:b}=T.useMemo(()=>{const x=n||`resources.${m}.title`;return{cardTitle:g(x,{_:x}),cardSubheader:r!==null?g(r,{_:r}):null}},[m,r,n,g]);return p.jsx(A.Grid,{item:!0,...h,lg:a,md:c,sm:u,xs:d,children:p.jsx(Cr,{content:t,title:v,subheader:b,secondary:o,divider:!0,children:p.jsxs(p.Fragment,{children:[e,s===!0?p.jsx(Wi,{children:p.jsx(L.SaveButton,{})}):s]})})})}const XQ=fe(L.Form,{slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*1.25),padding:0,minHeight:"unset"},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingRight:"0 !important",paddingLeft:"0 !important",paddingBottom:"0 !important"}}));q2.Section=KQ;const ZQ=Sl(L.SimpleForm,{slot:"Root"})(({theme:e})=>({[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}}));function K2({title:e,modal:t=!1,content:n=!1,subheader:r=null,toolbar:o=p.jsx(Wi,{children:p.jsx(L.SaveButton,{type:"button"})}),secondary:s=p.jsx(Fi,{children:p.jsx(L.DeleteWithConfirmButton,{})}),sx:a,...c}){const u=r0(e),d=L.useRecordContext(),h=Zg();return p.jsx(Cr,{content:n,title:u,subheader:r,secondary:d!=null&&d.id?s:null,sx:{...a,"& .MuiToolbar-root":{paddingLeft:h.spacing(2.5),paddingRight:h.spacing(2.5),paddingBottom:h.spacing(2.5),paddingTop:t?h.spacing(2.5):0,borderTop:t?`1px solid ${h.palette.divider}`:void 0}},border:!t,divider:!0,children:p.jsx(ZQ,{toolbar:o,...c})})}const X2={openDialogs:[],getCurrentDialog:()=>null,openDialog:(e,t)=>{throw new Error(`openDialog not yet ready for: ${e}, ${t}`)},closeDialog:(e,t)=>{throw new Error(`closeDialog not yet ready for: ${e}, ${t}`)}},Z2=T.createContext(X2);function QQ(e){const[t,n]=T.useState(X2);function r(a,c){n(u=>({...u,openDialogs:[...u.openDialogs,a]})),c&&c()}function o(a,c){n(u=>({...u,openDialogs:u.openDialogs.filter(d=>d!==a)})),c&&c()}function s(){return t.openDialogs.length>0?t.openDialogs[t.openDialogs.length-1]:null}return p.jsx(Z2.Provider,{value:{...t,openDialog:r,closeDialog:o,getCurrentDialog:s},children:e.children})}function Q2(){const e=T.useContext(Z2);if(e===void 0)throw new Error("useAppState must be used within an AppStateProvider");return e}function s0(){return Q2()}function J2({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:s,divider:a=!1,fullWidth:c,...u}){const d=Zt.useTheme(),{getCurrentDialog:h}=s0(),{source:g,resource:m,isRequired:v}=u,{getFieldState:b,formState:x}=Ar.useFormContext(),{error:w}=b(g,x),O=h();return p.jsxs(A.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:w?d.palette.error.main:d.palette.text.secondary,"& span":{display:"none"}},width:c?"100%":"auto",...o},children:[n==="label"&&e!==!1&&s!==!1&&p.jsx(A.InputLabel,{error:!!w,sx:{borderBottom:a?`1px solid ${d.palette.divider}`:"none",pb:a?1:0,mt:a?1:0,pt:1},children:p.jsx(L.FieldTitle,{label:e,source:g,resource:O||m,isRequired:v})}),T.isValidElement(t)?T.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r?p.jsx(A.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!w,children:r}):null]})}const JQ=fe(L.ArrayInput,{slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}}));function eJ({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s}){return p.jsx(J2,{label:e,addLabel:t,source:n,helperText:r,divider:o,fullWidth:s==null?void 0:s.fullWidth,children:p.jsx(JQ,{source:n,label:!1,...s})})}function tJ({canEdit:e=!0,canDelete:t=!0,canClone:n=!1}){return!e&&!t&&!n?null:p.jsxs(Fi,{children:[e?p.jsx(L.EditButton,{}):null,t?p.jsx(L.DeleteWithConfirmButton,{}):null,n?p.jsx(L.CloneButton,{}):null]})}const uC=fe("div",{overridesResolver:(e,t)=>t.root})({display:"inline-block"}),nJ=fe("ul")({display:"inline-block"});function rJ(e){var h;const{className:t,emptyText:n,source:r,title:o,...s}=e,a=re.useRecordContext(e),c=ht.get(a,r),u=re.useTranslate();if(!c)return n?p.jsx(A.Typography,{component:"span",variant:"body2",className:t,...s,children:n?u(n,{_:n}):null}):p.jsx(uC,{className:t,...s});if(Array.isArray(c))return p.jsx(nJ,{className:t,...s,children:c.map((g,m)=>{var b;const v=o instanceof String?(b=ht.get(g,o))==null?void 0:b.toString():o;return p.jsx("li",{children:v},m)})});const d=o instanceof String?(h=ht.get(a,o))==null?void 0:h.toString():o;return p.jsx(uC,{className:t,...s,children:d})}function eT({entityId:e,property:t,disabled:n,showUser:r=!1,userResource:o="entities/user",...s}){const[a,c]=T.useState(null),u=L.useRecordContext(s),d=L.useDataProvider(),h=L.useResourceContext(),g=T.useCallback(async b=>{b.preventDefault(),b.stopPropagation();const x=ht.get(u,s==null?void 0:s.source),w=h.replace("entities/",""),O=await d.getFile(`/attachments/${w}/${e||(u==null?void 0:u.id)}/${t||(s==null?void 0:s.source)}/${(x==null?void 0:x.id)||(u==null?void 0:u.id)}`),M=document.createElement("a");M.href=O,M.download=ht.get(u,(s==null?void 0:s.title)||(s==null?void 0:s.source)),M.click()},[d,u,e,h,t,s==null?void 0:s.source,s==null?void 0:s.title]),m=T.useMemo(()=>({...u,[s==null?void 0:s.source]:(u==null?void 0:u.src)||ht.get(u,s==null?void 0:s.source),[s==null?void 0:s.title]:(u==null?void 0:u.title)||ht.get(u,(s==null?void 0:s.title)||(s==null?void 0:s.source))}),[u,s==null?void 0:s.source,s==null?void 0:s.title]),v=L.useTranslate();return T.useEffect(()=>{!u||!(u!=null&&u.userId)||r===!1||d.getOne(o,{id:u==null?void 0:u.userId}).then(({data:b})=>c(b)).catch(()=>c(null))},[u,d,o,r]),p.jsx(rJ,{...s,disabled:n,record:m,onClick:g,title:p.jsxs(A.Box,{sx:{cursor:"pointer"},children:[p.jsx(A.Typography,{variant:"subtitle1",children:ht.get(m,(s==null?void 0:s.title)||(s==null?void 0:s.source))}),p.jsxs(A.Typography,{variant:"caption",color:"secondary",children:[ht.get(m,"sizeDescription"),r&&a?" | ":null,r&&a?v("ra.attachment.info",{user:a==null?void 0:a.name,created:Wr(m==null?void 0:m.createdAt).format("DD/MM/YYYY HH:mm")}):null]})]})})}const oJ=fe(L.ImageField,{slot:"root"})(()=>({}));function tT(e){const t=`_${e==null?void 0:e.source}`;return p.jsx(oJ,{...e,source:t})}function nT({width:e=150,height:t=150,circle:n=!1,justify:r="flex-start",record:o,...s}){const a=T.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5}),[e,t,n]),c=L.useRecordContext(),u=o||c;return p.jsx(tT,{sx:d=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${d.palette.divider}`,objectFit:"cover !important",...a,minWidth:a.width,minHeight:a.height}}),...s,record:u})}var iJ={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(wn,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],o=n%100;return"["+n+(r[(o-20)%10]||r[o]||r[0])+"]"}}})})(iJ);var sJ={exports:{}};(function(e,t){(function(n,r){e.exports=r(z2)})(wn,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=r(n),s={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(a){return a+"º"}};return o.default.locale(s,null,!0),s})})(sJ);var rT={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(wn,function(){return function(n,r,o){n=n||{};var s=r.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function c(d,h,g,m){return s.fromToBase(d,h,g,m)}o.en.relativeTime=a,s.fromToBase=function(d,h,g,m,v){for(var b,x,w,O=g.$locale().relativeTime||a,M=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],E=M.length,R=0;R<E;R+=1){var P=M[R];P.d&&(b=m?o(d).diff(g,P.d,!0):g.diff(d,P.d,!0));var k=(n.rounding||Math.round)(Math.abs(b));if(w=b>0,k<=P.r||!P.r){k<=1&&R>0&&(P=M[R-1]);var D=O[P.l];v&&(k=v(""+k)),x=typeof D=="string"?D.replace("%d",k):D(k,h,P.l,w);break}}if(h)return x;var H=w?O.future:O.past;return typeof H=="function"?H(x):H.replace("%s",x)},s.to=function(d,h){return c(d,h,this,!0)},s.from=function(d,h){return c(d,h,this)};var u=function(d){return d.$u?o.utc():o()};s.toNow=function(d){return this.to(u(this),d)},s.fromNow=function(d){return this.from(u(this),d)}}})})(rT);var aJ=rT.exports;const lJ=$r(aJ);Wr.extend(lJ);function oT(e){const t=L.useRecordContext(e),[n]=L.useLocaleState(),r=T.useMemo(()=>Wr(ht.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return p.jsxs(p.Fragment,{children:[p.jsx(L.DateField,{record:t,source:e.source,showTime:!0}),p.jsx("br",{}),p.jsx(A.Typography,{variant:"caption",color:"textSecondary",children:r})]})}const cJ=fe(L.DateField,{slot:"Root"})(()=>({}));function uJ({variant:e="body1",...t}){return p.jsx(cJ,{...t,variant:e})}const dJ=fe(L.EmailField,{slot:"Root"})(()=>({}));function fJ({variant:e="body1",...t}){return p.jsx(dJ,{...t,variant:e})}const pJ=fe(L.FileField,{slot:"root"})(()=>({}));function iT({...e}){const t=L.useRecordContext(e),n=T.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=ht.get(t,`_${e==null?void 0:e.source}`,ht.get(t,e==null?void 0:e.source)),s=ht.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),a=document.createElement("a");a.href=o,a.download=s,a.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return p.jsx(pJ,{...e,record:t,onClick:n})}function hJ({variant:e="body1",...t}){return p.jsx(L.FunctionField,{...t,variant:e})}const gJ=fe(L.TextField,{slot:"Root"})(()=>({}));function sT({variant:e="body1",...t}){return p.jsx(gJ,{...t,variant:e})}function mJ(e){const t=A.useTheme(),n=re.useLocales(),{source:r=""}=e,s=re.useRecordContext(e)[r],a=!Yu(s,n),c=Tr(e,{flex:1}),[u]=re.useLocaleState(),d=T.useMemo(()=>a?p.jsx(qe.FlagFilled,{style:{color:t.palette.warning.main}}):p.jsx(qe.FlagOutlined,{}),[a,t.palette.warning.main]),h=T.useMemo(()=>p.jsx(A.Stack,{children:Z.map(n,(g,m)=>p.jsx(A.Typography,{children:`${g.locale.toUpperCase()}: ${(s??{})[g.locale]??""}`},m))}),[s,n]);return p.jsx(Cm,{title:h,arrow:!1,children:p.jsxs(A.Stack,{alignItems:"center",direction:"row",gap:1,children:[d,p.jsx(sT,{...e,source:`${r}.${u}`,sx:c})]})})}const vJ=fe("div")(({theme:e,fullWidth:t})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:t?"100%":"auto",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}}));function yJ({source:e,defaultValue:t="&nbsp;",...n}){const r=L.useRecordContext(n),o=ht.get(r,e,t);return p.jsx(A.Typography,{...n,dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})}function bJ({title:e,children:t}){return t==null?null:typeof e=="string"||e===!0?p.jsx(A.Tooltip,{title:e,placement:"top",children:t}):t}function xJ({label:e,source:t,defaultValue:n="&nbsp;",children:r=p.jsx(yJ,{source:"",defaultValue:void 0,record:void 0}),tooltip:o,...s}){const a=T.Children.only(r),{getCurrentDialog:c}=Q2(),u=L.useRecordContext(s),d=L.useResourceContext(s),h=c(),g=T.useMemo(()=>o===!1?!1:typeof o=="function"?o(u):typeof o=="string"?ht.get(u,o,o):o,[u,o]),m=Tr(s,{width:s!=null&&s.fullWidth?"100%":"auto"});return p.jsx(bJ,{title:g,children:p.jsxs(p.Fragment,{children:[p.jsx(A.InputLabel,{sx:{pt:1},children:p.jsx(L.FieldTitle,{label:e,source:t,resource:h||d})}),p.jsx(vJ,{...s,children:T.isValidElement(a)?T.cloneElement(a,{...a.props,source:t,record:u,defaultValue:n,resource:h||d,sx:m}):null})]})})}function CJ({children:e=null,className:t=""}){return p.jsx("div",{className:t,children:e})}const wJ=Sl(CJ,{slot:"root"})(({theme:e,bulkActionButtons:t})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,"&>div:first-of-type":{alignItems:"center","& form":{padding:e.spacing(2.5)},"& .MuiToolbar-root":{alignItems:"center",padding:"0 !important",marginTop:e.spacing(1),[e.breakpoints.up("sm")]:{marginLeft:e.spacing(2),marginRight:e.spacing(2),width:`calc(100% - ${e.spacing(4)})`},[e.breakpoints.down("md")]:{marginTop:0,display:"contents"}}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:t===!1?0:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 26px)"},"& .RaBulkActionsToolbar-toolbar":{borderRadius:0,"& > .RaBulkActionsToolbar-title":{alignItems:"center"},[e.breakpoints.down("sm")]:{paddingLeft:e.spacing(3)}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`}},"& .MuiTablePagination-toolbar":{marginTop:"0 !important",marginBottom:"0 !important"},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0}}));function aT(e){return p.jsx(wJ,{...e,children:p.jsx(L.ReferenceManyField,{pagination:p.jsx(L.Pagination,{}),...e})})}function AJ({source:e,...t}){const n=L.useRecordContext(t),r=ht.get(n,e,0),o=r/1024,s=o/1024,a=s/1024,c=a>1?`${a.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return p.jsx(A.Typography,{component:"span",variant:"body1",...t,children:c})}function pn({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:s,divider:a=!1,...c}){const u=Ut(),{getCurrentDialog:d}=s0(),{source:h,resource:g,isRequired:m}=c,{fieldState:{invalid:v}}=L.useInput(c),b=d();return p.jsxs(A.Stack,{spacing:1,sx:{width:c!=null&&c.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:v?u.palette.error.main:u.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&p.jsx(A.InputLabel,{error:v===!0,sx:{borderBottom:a?`1px solid ${u.palette.divider}`:"none",pt:.5,pb:a?1:0,mt:a?1:0},children:p.jsx(L.FieldTitle,{label:e,source:h,resource:b||g,isRequired:m})}),T.isValidElement(t)?T.cloneElement(t,{...t.props,...c,label:n==="legend"?e:!1}):t,n==="label"&&r?p.jsx(A.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:v===!0,children:r}):null]})}function SJ(e){return e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{}}const TJ=fe(L.FileInput,{slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...SJ(e)}));function EJ({children:e=p.jsx(eT,{title:"name",source:"path"}),multiple:t=!0,disabled:n=!1,type:r="attachment",...o}){const s=L.useRecordContext(o),a=o==null?void 0:o.source,c=s==null?void 0:s.id;return L.useInput({source:`__${r}__${o==null?void 0:o.source}`,defaultValue:o==null?void 0:o.source}),p.jsx(pn,{...o,disabled:n,children:p.jsx(TJ,{type:r,multiple:t,disabled:n,children:T.cloneElement(e,{...e.props,entityId:c,property:a})})})}const IJ=fe(L.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall:has(.MuiChip-root)":{paddingBottom:"4px"},"& .MuiAutocomplete-tag":{margin:"0px 4px 4px 0px"}}));function OJ({size:e="small",...t}){return p.jsx(pn,{...t,children:p.jsx(IJ,{size:e})})}const PJ=fe(L.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"}}));function jJ({size:e="small",...t}){const{perPage:n,...r}=t;return p.jsx(pn,{...r,children:p.jsx(PJ,{size:e})})}const RJ=fe(L.BooleanInput,{slot:"Root"})(()=>({marginTop:"0 !important"}));function MJ({...e}){const t=Zt.useTheme();return p.jsx(pn,{...e,children:p.jsx(RJ,{sx:{"& .MuiFormControlLabel-root":{marginLeft:"0 !important",marginRight:"0 !important"},"& .MuiSwitch-root":{margin:"0 !important",marginTop:e.display==="legend"?0:`${t.spacing(1)} !important`}}})})}const kJ=fe(L.DateInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function DJ(e){return p.jsx(pn,{...e,children:p.jsx(kJ,{})})}const FJ=fe(L.DateTimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function LJ(e){return p.jsx(pn,{...e,children:p.jsx(FJ,{})})}const _J=fe(L.FileInput,{slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}}));function BJ({children:e=p.jsx(iT,{source:"",title:""}),title:t,...n}){const r=Ar.useWatch({name:n.source}),o=L.useRecordContext(n),{source:s}=n,a=T.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const c=ht.get(o,s);if(c){const u=c.split("__");return u.length>0?u[u.length-1]:c}return c},[o,s,r]);return p.jsx(pn,{...n,children:p.jsx(_J,{children:T.cloneElement(e,{...e.props,title:t||s,source:s,record:{...o,[s]:(r==null?void 0:r.title)||ht.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||ht.get(o,`_${s}`),[t||s]:a}})})})}function NJ({children:e=p.jsx(nT,{}),title:t,multiple:n=!1,...r}){const o=Ar.useWatch({name:r.source}),s=L.useRecordContext(r),{source:a}=r;return L.useInput({source:`__image__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),p.jsx(pn,{...r,multiple:n,children:p.jsx(L.ImageInput,{accept:"image/*",children:T.cloneElement(e,{...e.props,title:t,source:a,record:{...s,[a]:(o==null?void 0:o.title)||ht.get(s,a),[`_${a}`]:(o==null?void 0:o.src)||ht.get(s,`_${a}`)}})})})}function wr(e){return p.jsx(pn,{...e,children:p.jsx(L.TextInput,{})})}const VJ={vertical:"bottom",horizontal:"right"},WJ={vertical:"top",horizontal:"right"};function $J({requiredAtLeastOneLocale:e,requiredLocale:t,validate:n,required:r,...o}){const{source:s}=o,a=re.useLocales(),c=T.useCallback((k="ra.validation.required",D="ra.validation.required_locale")=>H=>{if(e&&!t&&!W2(H,a))return k;if(t&&(!Z.has(H,t)||Z.isEmpty(Z.get(H,t))))return{message:D,args:{locale:t}};if(!e&&r&&!Yu(H,a))return k},[e,t,a,r]),u=T.useMemo(()=>re.composeValidators(n,c()),[n,c]),{fieldState:d}=re.useInput({...o,validate:u}),{error:h}=d,g=Ar.useWatch({name:s}),m=!Yu(g,a),[v]=re.useLocaleState(),[b,x]=T.useState(v),[w,O]=T.useState(null),M=!!w,E=T.useCallback(k=>O(M?null:k.currentTarget),[M,O]),R=T.useCallback(()=>O(null),[O]),P=T.useMemo(()=>Z.map(a,(k,D)=>p.jsx(A.MenuItem,{onClick:()=>{x(k.locale),R()},children:p.jsx(A.ListItemText,{primary:`${k.locale.toUpperCase()}: ${(g??{})[k.locale]??""}`})},D)),[a,x,R,g]);return p.jsx(pn,{...o,validate:u,helperText:h!=null&&h.message?p.jsx(re.ValidationError,{error:h==null?void 0:h.message}):o==null?void 0:o.helperText,children:p.jsx(p.Fragment,{children:p.jsxs(A.Box,{flex:1,children:[Z.map(a,(k,D)=>p.jsx(wr,{...o,source:`${s}.${k.locale}`,sx:{width:"100%",display:k.locale===b?"inline-flex":"none"},label:!1,helperText:!1,required:!1,InputProps:{endAdornment:p.jsx(A.Chip,{label:p.jsx(A.Typography,{variant:"button",children:b}),size:"small",onClick:E,color:m?"warning":void 0})}},D)),p.jsx(A.Menu,{anchorEl:w,open:M,anchorOrigin:VJ,transformOrigin:WJ,onClose:R,children:P})]})})})}const zJ=fe(L.NumberInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function UJ(e){return p.jsx(pn,{...e,children:p.jsx(zJ,{})})}function HJ({source:e,minWidth:t=300,children:n}){const r=L.useResourceContext(),o=L.useRecordContext(),[s,a]=T.useState(ht.get(o,e,"")),[c,u]=T.useState(!1),d=T.useCallback(b=>a(b.target.value),[]),h=L.useDataProvider(),g=T.useCallback(b=>{b.key==="Enter"&&(u(!0),h.update(r,{id:o.id,data:{...o,[e]:s,_changed:e},previousData:o}).then(()=>u(!1)))},[s,h,r,o,e]),m=T.useCallback(()=>{ht.get(o,e)!==s&&(u(!0),h.update(r,{id:o.id,data:{...o,[e]:s,_changed:e},previousData:o}).then(()=>u(!1)))},[s,h,r,e,o]),v=T.useCallback(b=>{u(!0),h.update(r,{id:o.id,data:{...o,[e]:b,_changed:e},previousData:o}).then(()=>u(!1))},[h,r,e,o]);return T.useEffect(()=>a(ht.get(o,e)),[o,e]),n?T.cloneElement(n,{...n.props,source:e,value:s,onChange:v}):p.jsx(A.TextField,{value:s,disabled:c,onChange:d,onKeyPress:g,onBlur:m,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})}function GJ({children:e,...t}){const n=T.Children.only(e);return p.jsx(L.ReferenceArrayInput,{...t,children:T.cloneElement(n,{...t,source:n.props.source||t.source})})}function YJ({children:e,...t}){const n=T.Children.only(e);return p.jsx(L.ReferenceInput,{...t,children:T.cloneElement(n,{...t,source:n.props.source||t.source})})}function qJ({reference:e,target:t,children:n,filters:r,actions:o,...s}){return p.jsx(L.ResourceContextProvider,{value:e,children:p.jsx(aT,{perPage:5,pagination:p.jsx(L.Pagination,{}),...s,reference:e,target:t,children:p.jsxs(p.Fragment,{children:[p.jsx(L.ListToolbar,{filters:r,actions:o}),n]})})})}const KJ=fe(L.SearchInput,{slot:"root"})(()=>({}));function XJ(e){return p.jsx(KJ,{...e})}const ZJ=fe(L.SelectArrayInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiFormLabel-root.MuiInputLabel-root":{marginTop:"-3px"},"& .MuiInputLabel-root.MuiInputLabel-shrink":{marginTop:0},"& .MuiOutlinedInput-input:has(.MuiChip-root)":{paddingTop:"4px",paddingBottom:"6px",paddingLeft:"6px"}}));function QJ({optionText:e="name",optionValue:t="id",...n}){return p.jsx(pn,{...n,children:p.jsx(ZJ,{optionText:e,optionValue:t,options:{autoWidth:!1}})})}const JJ=fe(L.SelectInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1||e===null?0:"auto"}}));function eee(e){return p.jsx(pn,{...e,children:p.jsx(JJ,{})})}function tee({multiline:e=!1,...t}){var u,d;const n=L.useTranslate(),r=L.maxLength(t==null?void 0:t.maxLength,"app.input.max_length_error"),o=(d=(u=Ar.useController({name:t==null?void 0:t.source}))==null?void 0:u.field)==null?void 0:d.value;let s=t.helperText,a=t.validate;a?Array.isArray(a)&&a.indexOf(r)===-1&&a.push(r):a=[r];const c=n("app.input.max_length_info",{count:(o==null?void 0:o.length)||0,max:t==null?void 0:t.maxLength});return t!=null&&t.maxLength&&(s=s&&s.length>0?`${c} - ${n(s)}`:c),p.jsx(wr,{...t,validate:a,helperText:s,multiline:e,inputProps:{maxLength:t==null?void 0:t.maxLength}})}function nee(e){if(!e)return"";const t=U2(e);return t?t.format("HH:mm"):""}function ree(e){return e}const oee=fe(L.TimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function iee({parse:e=ree,format:t=nee,...n}){return p.jsx(pn,{...n,children:p.jsx(oee,{parse:e,format:t,...n})})}function a0({onSuccess:e,firstAccess:t}){const{spacing:n}=Pn(),[r,o]=T.useState(!1),s=re.useAuthProvider(),a=re.useTranslate(),c=re.useNotify(),u=T.useCallback(d=>{const{oldPassword:h,newPassword:g}=d;o(!0),s==null||s.changePassword(h,g).then(()=>{c("ra.auth.password_changed"),e()}).catch(m=>{c((m==null?void 0:m.message)||(m==null?void 0:m.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e,c]);return p.jsx(re.ResourceContextProvider,{value:"user/change-password",children:p.jsx(re.EditContextProvider,{value:{record:{},resource:"user/change-password",save:u},children:p.jsx(K2,{onSubmit:u,toolbar:p.jsx(Wi,{children:p.jsx(L.SaveButton,{disabled:r})}),children:p.jsxs(A.Grid,{container:!0,spacing:n,children:[t===!0&&p.jsx(A.Grid,{item:!0,xs:12,children:p.jsxs(A.Alert,{severity:"warning",children:[p.jsx(A.AlertTitle,{children:a("ra.auth.first_access.change_password")}),a("ra.auth.first_access.change_password_helper")]})}),p.jsx(A.Grid,{item:!0,xs:12,children:p.jsx(wr,{source:"oldPassword",type:"password",validate:re.required()})}),p.jsx(A.Grid,{item:!0,xs:12,children:p.jsx(wr,{source:"newPassword",type:"password",validate:re.required()})})]})})})})}const lT=T.createContext({});function see(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=L.useResourceContext(),o=L.useDataProvider(),{search:s}=Pi.useLocation(),a=`${r}/new`,c=T.useCallback(()=>{if(!t||!Z.isFunction(o.get))return Promise.resolve({});const m={};return new URLSearchParams(s??"").forEach((v,b)=>{m[b]=v}),o.get(a,m).then(v=>v.data).then(v=>{const{responseCode:b,value:x}=v;return b==="ok"?x:Promise.reject(v)})},[t,s,o,a]),u=T.useMemo(()=>Z.chain(n).extend({queryKey:[r,s],queryFn:c}).value(),[r,s,c,n]),{data:d,isLoading:h}=Es.useQuery(u),g=Z.omit(e,["useDefaults"]);return h?p.jsx(A.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:p.jsx(A.CircularProgress,{})}):p.jsx(lT.Provider,{value:d??{},children:p.jsx(L.Create,{...g,children:e.children})})}const aee=fe(see,{slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main":{marginTop:0},"& .RaCreate-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaCreate-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaCreate-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}}));function lee(){return T.useContext(lT)}const cee=fe(L.Edit,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-card":{[e.breakpoints.down("sm")]:{marginBottom:e.spacing(6)}},"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaEdit-main":{marginTop:0},"& .RaEdit-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaEdit-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}}));function uee(e){return p.jsx(cee,{...e})}const dee=fe(A.CardHeader)(({theme:e})=>({marginTop:e.spacing(2.5),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),fee=fe(A.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`}));function pee({title:e,divider:t=!0,variant:n="h5"}){const r=L.useTranslate();return p.jsxs(p.Fragment,{children:[p.jsx(dee,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t?p.jsx(fee,{}):null]})}function Hh(e){return e.id??e.label}function cT(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function hee(e){return Z.map(e,"id")}function qu(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function uT(e,t){const n=e!==void 0?qu(e):0;return Z.chain(t).filter(o=>e!==void 0?cT(e,o.id):!0).filter(o=>qu(o.id)===n+1).value()}function gee(e,t){var s;const n=Z.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return Z.extend(n,{formRootPath:o});case"setSyncWithLocation":return Z.extend(n,{syncWithLocation:o});case"setErrorCount":return Z.extend(n,{errorCount:o});case"setActiveItem":return Z.includes(hee(e.items),o)?Z.extend(n,{activeItem:o}):n;case"addItem":{const{id:a}=o;return Z.extend(n,{items:Z.chain(n.items).clone().reject(c=>c.id===a).concat([o]).orderBy(c=>c.index).value()})}case"removeItem":{const a=Z.isString(o)?o:o.id,c=Z.chain(n.items).clone().reject(u=>u.id===a).value();return Z.extend(n,{items:c}),n.activeItem===a&&Z.extend(n,{activeItem:((s=Z.first(c))==null?void 0:s.id)??void 0}),n}default:return n}}const mee={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},dT=T.createContext(void 0);function fT(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=Pi.useLocation(),[s,a]=T.useReducer(gee,Z.cloneDeep(mee)),{formRootPath:c,items:u}=s,d=T.useMemo(()=>({state:s,dispatch:a}),[s,a]);return T.useEffect(()=>{const h=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&h.push(r);const g=Z.chain(h).map(v=>Pi.matchPath(v,o)).reject(v=>v===null).first().value(),m=g==null?void 0:g.pathnameBase;m!==void 0&&m!==c&&a({type:"setFormRootPath",payload:m})},[o,c,r]),T.useEffect(()=>{a({type:"setSyncWithLocation",payload:!!t})},[t,a]),T.useEffect(()=>{a({type:"setErrorCount",payload:!!n})},[n,a]),T.useEffect(()=>{var h;if(t&&c!==void 0){let g=o.replace(c,"").replace(new RegExp(/^\/?/),"");Z.isEmpty(g)&&(g=((h=Z.chain(u).filter(m=>uT(m.id,u).length===0).orderBy([m=>qu(m.id),m=>m.index]).first().value())==null?void 0:h.id)??void 0),a({type:"setActiveItem",payload:g})}},[a,c,o,u,t]),p.jsx(dT.Provider,{value:d,children:e.children})}function pT(){const e=T.useContext(dT);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function jl(){return pT().state}function l0(){return pT().dispatch}function hT(){return jl().formRootPath}function gT(){return jl().activeItem}function mT(){return jl().items}function vT(){return jl().syncWithLocation}function yT(){return jl().errorCount}function bT(){const e=l0();return T.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function xT(){const e=l0();return T.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function CT(){const e=l0();return T.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}const vee=fe(A.Grid,{name:"LongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root.RaToolbar-desktopToolbar":{marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,paddingTop:e.spacing(2.5),paddingBottom:e.spacing(2.5),[e.breakpoints.down("sm")]:{width:"auto !important",marginRight:0}},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingLeft:"0 !important",paddingRight:"0 !important",paddingBottom:"0 !important"},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function wT(e){const{spacing:t}=Pn(),{spacing:n=t}=e,r=Z.omit(e,["spacing"]);return p.jsx(L.Form,{...r,className:"LongFormView",children:p.jsx(vee,{container:!0,spacing:n*2,children:e.children})})}function AT(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=Z.omit(e,["disposition"]);return p.jsx(A.Grid,{...n,item:!0,...t,children:e.children})}function ST(e){const t=gT();return t===void 0?!1:e===t||cT(e,t)}function TT(e){const t=mT();return T.useMemo(()=>uT(e,t),[t,e])}function yee(){const e=hT(),{search:t}=Pi.useLocation(),n=Pi.useNavigate();return T.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n,t])}function ET(){const e=TT();return p.jsx(A.Card,{variant:"outlined",children:p.jsx(A.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:Z.map(e,(t,n)=>p.jsx(c0,{...t},n))})})}function c0(e){const t=re.useTranslate()??Z.identity,n=IT(e),{selected:r,label:o,icon:s,onClick:a,badge:c,items:u,isGroup:d,level:h,errors:g=0}=n,{spacing:m}=Pn(),[v,b]=T.useState(r),x=T.useCallback(M=>{b(!v),a(M)},[a,v]),w=s!==void 0,O=Z.omit(e,["label","icon","selected","badge"]);return T.useEffect(()=>{r&&!v&&b(r)},[r,v,b]),p.jsxs(p.Fragment,{children:[p.jsx(A.ListItem,{...O,disablePadding:!0,children:p.jsxs(A.ListItemButton,{selected:r?!d:null,onClick:x,sx:{pl:m*h},children:[w?p.jsx(A.ListItemIcon,{children:s}):null,p.jsx(A.ListItemText,{inset:!w,primary:g===0?t(o):p.jsx(A.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),c?p.jsx(A.ListItemAvatar,{children:p.jsx(Ou,{type:"filled",size:"xs",color:c.color??"default",children:c.content})}):null,d?v?p.jsx(Vn.ExpandLess,{}):p.jsx(Vn.ExpandMore,{}):null]})}),d?p.jsx(A.Collapse,{in:v,timeout:"auto",children:p.jsx(A.List,{children:Z.map(u,(M,E)=>p.jsx(c0,{...M},E))})}):null]})}function IT(e){const{id:t}=e,n=ST(t),r=qu(t),o=yee(),s=vT(),a=bT(),c=TT(t),u=!Z.isEmpty(c),d=T.useCallback(g=>{u||(s?o(e.id):a(e.id)),Z.isFunction(e.onClick)&&e.onClick(g)},[a,o,e,s,u]);return T.useMemo(()=>({...e,selected:n,onClick:d,items:c,isGroup:u,level:r}),[e,n,d,c,u,r])}var bee=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},OT=e=>e.firstChild?e.firstChild.offsetParent===e:!0,xee=(e,t)=>{let n=e,r=0;OT(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},Cee=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},sl=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?sl="sticky":CSS.supports("position","-webkit-sticky")&&(sl="-webkit-sticky"));var Ku=!1;try{const e=Object.defineProperty({},"passive",{get(){Ku={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var Hp=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),a=o(s()),c=()=>{Object.assign(a,o(s())),n()};return window.addEventListener("resize",c,Ku),r.push(()=>window.removeEventListener("resize",c)),a}else{const s=o(t.getBoundingClientRect()),a=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},c=new ResizeObserver(a);return c.observe(t),r.push(()=>c.disconnect()),s}},wee=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},Aee=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,a=bee(e);let c=!1;const u=()=>{c||requestAnimationFrame(()=>{const D=g();D!==E&&R(D),c=!1}),c=!0};let d=a===window?window.scrollY:a.scrollTop;const h=D=>{const{offsetTop:H,height:Y}=v,{naturalTop:ee}=w,{height:z}=O;return D+H+Y>=ee+z+M+o},g=()=>{const{height:D}=v,{height:H}=O;return H+s+o<=D?3:h(d)?1:2},m=a!==window&&OT(a),v=Hp({el:a,onChange:u,unsubs:t,measure:({height:D,top:H})=>({height:D,offsetTop:m?H:0})}),b=Cee(e),x=b===window?{top:0,bottom:0}:wee(b),w=Hp({el:b,onChange:u,unsubs:t,measure:({height:D})=>({height:D-x.top-x.bottom,naturalTop:b===window?0:xee(b,a)+x.top+v.offsetTop})}),O=Hp({el:e,onChange:u,unsubs:t,measure:({height:D})=>({height:D})});let M=0,E=g();const R=D=>{const H=E;if(E=D,H===2&&(M=-1),D===3){e.style.position=sl,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:Y,offsetTop:ee}=v,{height:z,naturalTop:se}=w,{height:ae}=O;if(D===2)if(e.style.position="relative",M=H===0?Math.max(0,ee+d-se+s):Math.max(0,ee+d+Y-(se+ae+o)),r){const X=Math.max(0,z-ae-M);e.style.bottom=`${X}px`}else e.style.top=`${M}px`;else e.style.position=sl,D===1?r?e.style.bottom=`${o}px`:e.style.top=`${Y-ae-o}px`:r?e.style.bottom=`${Y-ae-o}px`:e.style.top=`${s}px`};R(E);const P=D=>{if(D===d)return;const H=D-d;if(d=D,E===3)return;const{offsetTop:Y,height:ee}=v,{naturalTop:z,height:se}=w,{height:ae}=O;if(H>0)if(E===0){if(D+Y+s>z){const X=Math.max(0,Y+d-z+s);D+Y+ee<=z+ae+X+o?R(2):R(1)}}else E===2&&h(D)&&R(1);else if(E===1){if(Y+D+ee<z+se+o){const X=Math.max(0,Y+d+ee-(z+ae+o));Y+D+s>=z+X?R(2):R(0)}}else E===2&&Y+D+s<z+M&&R(0)},k=a===window?()=>P(window.scrollY):()=>P(a.scrollTop);a.addEventListener("scroll",k,Ku),a.addEventListener("mousewheel",k,Ku),t.push(()=>a.removeEventListener("scroll",k),()=>a.removeEventListener("mousewheel",k))},See=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=T.useState(null);return T.useEffect(()=>{if(!r||!sl)return;const s=[];return Aee(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(a=>a())}},[r,t,e,n]),o},Tee=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:a}=e,c=See({offsetTop:t,offsetBottom:n,bottom:r});return p.jsx("div",{className:s,style:a,ref:c,children:o})},Eee=Tee,PT=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(PT||{});function jT(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=Z.omit(e,["sticky","disposition","spacing"]),s=t?Eee:A.Box,a=T.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return p.jsx(A.Grid,{...o,item:!0,...n,children:p.jsx(s,{...a,children:p.jsx(A.Stack,{spacing:r,children:e.children})})})}function RT(e){return p.jsx(p.Fragment,{children:e.children})}function MT(e){const{children:t}=e;return T.useMemo(()=>{const r={top:[],bottom:[]};return T.Children.forEach(t,o=>{if(T.isValidElement(o)&&(o==null?void 0:o.type)===RT){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function kT(e=[],t){const n=Z.isArray(e)?e:[e],r=Z.filter(n,o=>T.isValidElement(o));Z.each(r,o=>{var s;t(o),kT(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}function DT(e){const{errors:t}=Ar.useFormState(),n=yT(),{label:r,icon:o,badge:s,index:a=0,children:c}=e,u=Hh(e),d=xT(),h=CT(),g=ST(u),m=[];n&&(e.sources!==void 0?m.push(...e.sources):kT(c,b=>{var x;((x=b==null?void 0:b.props)==null?void 0:x.source)!==void 0&&m.push(b.props.source)}));const v=Z.chain(m).uniq().map(b=>Z.get(t,b)).reject(b=>b===void 0).value().length;return T.useEffect(()=>{d({id:u,index:a,label:r,icon:o,badge:s,errors:v})},[d,h,r,o,u,s,a,v]),T.useEffect(()=>()=>{h(u)},[u,h]),p.jsx(A.Box,{display:g?"unset":"none",children:e.children})}function FT(e){const t=u0(e),n=Hh(e);return p.jsx(DT,{...e,id:n,children:T.Children.map(t,r=>{const o=Hh(r.props);return T.cloneElement(r,{id:`${n}.${o}`})})})}function LT(e){return p.jsx(DT,{...e})}function u0(e){const{children:t}=e;return T.useMemo(()=>Z.chain(T.Children.toArray(t)).filter(r=>T.isValidElement(r)&&((r==null?void 0:r.type)===LT||(r==null?void 0:r.type)===FT)).map((r,o)=>T.cloneElement(r,{index:o})).value(),[t])}function Iee(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=Z.pick(e,["syncWithLocation","errorCount"]),s=Z.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:a,bottom:c}=MT(e),u=u0(e);return p.jsx(fT,{...o,children:p.jsxs(wT,{...s,spacing:r,children:[p.jsxs(jT,{disposition:t,spacing:r,children:[a,p.jsx(ET,{}),c]}),p.jsx(AT,{disposition:n,children:u})]})})}const kt=Iee;kt.BaseForm=wT;kt.Content=AT;kt.Provider=fT;kt.useItems=mT;kt.useSyncWithLocation=vT;kt.useErrorCount=yT;kt.useFormRootPath=hT;kt.useActiveItem=gT;kt.useSetActiveItem=bT;kt.useAddItem=xT;kt.useRemoveItem=CT;kt.Sidebar=jT;kt.SidebarSection=RT;kt.SidebarSectionPosition=PT;kt.useSidebarChildren=MT;kt.NavMenu=ET;kt.NavMenuItem=c0;kt.useNavMenuItem=IT;kt.Tab=LT;kt.Group=FT;kt.useBaseItemChildren=u0;const Oee=fe(L.Show,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaShow-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaShow-main>.MuiPaper-root:first-of-type":{overflow:"visible"}}));function Pee(e){return p.jsx(Oee,{...e})}const jee=fe(L.SimpleFormIterator,{root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}}));function Ree(e){return p.jsx(jee,{...e})}const Mee=Sl(L.TabbedForm,{slot:"Root"})(({theme:e})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:0},[e.breakpoints.down("sm")]:{paddingBottom:0,"& .MuiTableContainer-root":{paddingBottom:e.spacing(1)}}}));function kee({children:e}){return p.jsx(p.Fragment,{children:e})}function d0(e){const{title:t,modal:n,content:r,subheader:o,secondary:s=p.jsx(Fi,{children:p.jsx(L.DeleteWithConfirmButton,{})}),sx:a,noPadding:c,toolbar:u=p.jsx(Wi,{children:p.jsx(L.SaveButton,{type:"button"})}),...d}=e,h=r0(t),g=A.useTheme();return p.jsx(Cr,{title:h,modal:n,content:r,subheader:o,secondary:s,sx:{...a,"& .MuiTabs-root":{m:2.5,mb:0},"& .tabbed-form > .MuiDivider-root":{ml:2.5,mr:2.5},"& .MuiToolbar-root.RaToolbar-desktopToolbar":{paddingTop:n?g.spacing(2.5):0},"& .MuiToolbar-root":{padding:g.spacing(2.5),borderTop:n?`1px solid ${g.palette.divider}`:void 0}},border:!n,divider:!0,children:p.jsx(Mee,{toolbar:u,component:c?kee:void 0,...d})})}function Dee({children:e,...t}){return p.jsx(L.TabbedForm.Tab,{...t,children:p.jsx(A.Box,{sx:{width:"100%",p:2.5},children:e})})}d0.Tab=L.TabbedForm.Tab;d0.TabStack=Dee;const f0=T.createContext(void 0);function _T(){return T.useContext(f0)}const p0=T.createContext(void 0);function Fee(){return T.useContext(p0)}const BT=_.forwardRef((e,t)=>{const{children:n,disabled:r,disableRemove:o=!1,index:s,member:a,resource:c}=e,u=L.useTranslate(),[d,h]=_.useState(!1),{total:g,remove:m}=_T(),v=_.useCallback(()=>{h(!1),m(s)},[s,m]),b=T.useMemo(()=>({index:s,total:g,remove:()=>m(s)}),[s,g,m]);return p.jsxs(p0.Provider,{value:b,children:[T.Children.map(n,(x,w)=>{if(!T.isValidElement(x))return null;const{source:O,...M}=x.props;return p.jsx(A.TableCell,{children:T.cloneElement(x,{source:O?`${a}.${O}`:a,index:O?void 0:w,resource:c,disabled:r,...M,label:""})})}),!o&&p.jsx(A.TableCell,{children:p.jsx(A.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:p.jsx(Fi,{horizontal:!0,children:p.jsx(A.Typography,{color:"error",onClick:()=>h(!0),children:u("ra.action.delete")})})})}),n.length>0&&p.jsx(L.Confirm,{isOpen:d,title:u("ra.action.remove_item"),content:u("ra.message.remove_item"),onConfirm:v,onClose:()=>h(!1)})]})});function Lee(e){var V,te;const{children:t,resource:n,source:r,label:o,disableAdd:s=!1,disableRemove:a=!1,enableClearAll:c=!1,className:u,empty:d,template:h={},inset:g}=e,[m,v]=T.useState(!1),{fields:b,remove:x,replace:w,append:O}=L.useArrayInput(e),{resetField:M}=Ar.useFormContext(),E=Ut(),R=re.useTranslate(),P=re.useRecordContext(e),k=T.useRef(h||{}),D=re.useTranslateLabel(),H=T.useCallback(N=>{x(N)},[x]);if(b.length>0){const{...N}=b[0];k.current=N;for(const J in k.current)k.current[J]=null}const Y=T.useCallback((N=void 0)=>{let J=N;N==null&&(J=k.current,T.Children.count(t)===1&&_.isValidElement(T.Children.only(t))&&!T.Children.only(t).props.source&&T.Children.map(t,G=>_.isValidElement(G)&&G.type!==re.FormDataConsumer).some(Boolean)?J="":(J=J||{},T.Children.forEach(t,G=>{_.isValidElement(G)&&G.type!==re.FormDataConsumer&&G.props.source&&(J[G.props.source]=G.props.defaultValue??null)})));const W={...J,...h};O(W),M(`${r}.${b.length}`,{defaultValue:J})},[O,t,M,r,b.length,h]);function ee(N){return J=>{Y(),N&&N(J)}}const z=T.useCallback(()=>{w([]),v(!1)},[w]),se=kK(P,r),ae=T.useMemo(()=>({total:b.length,remove:H,source:r}),[b.length,H,r]),X=E.palette.mode==="dark"?E.palette.grey.A400:E.palette.grey.A800,K=b.length>0&&c;return b?p.jsx(f0.Provider,{value:ae,children:p.jsxs("div",{className:u,children:[_.cloneElement(p.jsx(_ee,{}),{label:o,source:r,disableAdd:s,template:h,onClick:ee((te=(V=e==null?void 0:e.addButton)==null?void 0:V.props)==null?void 0:te.onClick),inset:g}),p.jsx(A.TableContainer,{component:A.Paper,sx:g===!0?{borderRadius:0}:{mt:2,border:`1px solid ${X}`},children:p.jsxs(A.Table,{size:"small",children:[p.jsx(A.TableHead,{sx:g===!0?{}:{borderTop:0,borderBottom:`1px solid ${X}`},children:p.jsxs(A.TableRow,{children:[T.Children.map(t,(N,J)=>_.isValidElement(N)?p.jsx(A.TableCell,{children:p.jsx(A.Typography,{display:"flex",variant:"subtitle1",color:"text.primary",textTransform:"none",children:D({...N.props,resource:n})})},J):null),!a&&(K?p.jsx(A.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:p.jsx(Fi,{horizontal:!0,children:p.jsx(A.Typography,{color:"error",onClick:()=>v(!0),children:R("ra.action.delete")})})},"actions"):p.jsx(A.TableCell,{},"empty_actions"))]})}),p.jsxs(A.TableBody,{children:[b.length===0&&p.jsx(A.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:p.jsx(A.TableCell,{colSpan:4+(a?0:1),align:"center",children:d||p.jsx(A.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),b.length>0&&b.map((N,J)=>p.jsx(A.TableRow,{sx:{borderBottom:`1px solid ${X}}`},children:p.jsx(BT,{disableRemove:a,index:J,member:`${r}.${J}`,onRemoveField:H,record:se&&se[J]||{},resource:n,source:r,children:t})},N.id))]})]})}),b.length>0&&p.jsx(L.Confirm,{isOpen:m,title:R("ra.action.clear_array_input"),content:R("ra.message.clear_array_input"),onConfirm:z,onClose:()=>v(!1)})]})}):null}function _ee(e){const{label:t,disableAdd:n,onClick:r,inset:o}=e,s=Ut(),a=s.palette.mode==="dark"?s.palette.grey.A400:s.palette.grey.A800,c=s.palette.mode==="light"?"#000000":"#FFFFFF";return p.jsxs(A.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",sx:o?{p:2.5}:{pt:2},children:[t!==!1&&p.jsx(A.Typography,{children:t}),!n&&(_.isValidElement(e==null?void 0:e.addButton)?_.cloneElement(e==null?void 0:e.addButton,{onClick:r}):p.jsx(A.IconButton,{color:"secondary",sx:{border:`1px solid ${a}`},onClick:r,children:p.jsx(qe.PlusCircleOutlined,{style:{color:c}})}))]})}const Bee=fe(Lee,{slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8.25)})`}},[e.breakpoints.down("sm")]:{"& .MuiTableRow-root:last-child":{borderBottom:0}}}));function Nee(e,t){const n=Z.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=Z.chain(n.media).clone().extend(o).value();return Z.extend(n,{media:s})}case"updateDrawer":{const s=Z.chain(n.drawer).clone().extend(o).value();return Z.extend(n,{drawer:s})}case"updateLogo":{const s=Z.chain(n.logo).clone().extend(o).value();return Z.extend(n,{logo:s})}case"updateNotifications":{const s=Z.chain(n.notifications).clone().extend(o).value();return Z.extend(n,{notifications:s})}case"updateTheme":{const s=Z.chain(n.theme).clone().extend(o).value();return Z.extend(n,{theme:s})}default:return n}}const Vee={drawer:{open:!0,width:260,handleDrawerToggle:()=>{}},media:{downMd:!1,downLg:!1,downXl:!1,horizontal:!1},logo:{},notifications:{enable:!0,resource:"entities/notification"},theme:{iconColor:"grey.300",iconColorOpen:"grey.100"}},NT=T.createContext(void 0);function VT(e){var Y;const t=re.useAuthProvider(),n=re.useGetIdentity(),r=A.useTheme(),o=A.useMediaQuery(r.breakpoints.down("md")),s=A.useMediaQuery(r.breakpoints.down("lg")),a=A.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:c,isHorizontalLayout:u,themeDirection:d,drawerWidth:h}=i0(),g=u(d)&&!s,{drawerOpen:m,openDrawer:v}=Ld(),b=T.useCallback(()=>{v(!m)},[m,v]),[x,w]=T.useState(!1),[O,M]=T.useReducer(Nee,Z.chain(Vee).clone().merge({drawer:{open:!c||m}}).value()),E=T.useCallback(()=>w(!1),[]),R=T.useMemo(()=>({state:O,dispatch:M}),[O,M]),{logoIcon:P,logoMain:k,enableNotification:D,notification:H}=e;return T.useEffect(()=>{M({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:a,horizontal:g}})},[o,s,a,g]),T.useEffect(()=>{M({type:"updateDrawer",payload:{open:m,width:h,handleDrawerToggle:b}})},[m,h,b]),T.useEffect(()=>{c||v(!a)},[a,c]),T.useEffect(()=>{M({type:"updateLogo",payload:{main:k,icon:P}})},[P,k]),T.useEffect(()=>{M({type:"updateNotifications",payload:{enable:D,resource:H??"entities/notification"}})},[D,H]),T.useEffect(()=>{M({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),T.useEffect(()=>{if(!t.isImpersonating){console.warn("authProvider does not contain a method called isImpersonating",t);return}t==null||t.isImpersonating().then(ee=>{var z;w(!ee&&((z=n==null?void 0:n.data)==null?void 0:z.needToChangePassword)===!0)})},[(Y=n==null?void 0:n.data)==null?void 0:Y.needToChangePassword,t]),p.jsxs(NT.Provider,{value:R,children:[p.jsx(A.Dialog,{open:x,maxWidth:"xs",fullWidth:!0,children:p.jsx(a0,{onSuccess:E,firstAccess:!0})}),e.children]})}function WT(e){return T.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s,notification:a}=t;return p.jsx(VT,{logoIcon:r,logoMain:o,enableNotification:s,notification:a,children:p.jsx(e,{ref:n,...t})})})}function h0(){const e=T.useContext(NT);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function Wee(){return h0().dispatch}function Js(){return h0().state}function Un(){return Js().media}function $i(){return Js().drawer}function $T(){return Js().logo}function Vd(){return Js().notifications}function $ee(){return Js().theme}function zT(e){const{width:t}=$i(),{horizontal:n}=Un(),{container:r}=Pn(),[o,s]=T.useState(null);function a(u,d){s(d)}const c=Ut();return p.jsx(Nq,{onError:a,fallbackRender:({error:u,resetErrorBoundary:d})=>p.jsx(Ym,{error:u,errorComponent:e.error,errorInfo:o,resetErrorBoundary:d}),children:p.jsx(T.Suspense,{fallback:p.jsx(e2,{}),children:p.jsxs(A.Box,{component:"main",sx:{width:`calc(100% - ${t}px)`,flexGrow:1,p:{xs:0,sm:2,lg:1},pt:{lg:2}},children:[p.jsx(A.Toolbar,{sx:{mt:n?8:"inherit"}})," ",p.jsx(A.Container,{maxWidth:r?"xl":!1,sx:{...r&&{px:{xs:0,sm:2}},position:"relative",minHeight:"calc(100vh - 110px)",display:"flex",flexDirection:"column",[c.breakpoints.down("sm")]:{px:"12px"}},children:e.children})]})})})}const UT=fe(A.Box,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>({...e.mixins.toolbar,display:"flex",alignItems:"center",justifyContent:t?"flex-start":"center",paddingLeft:e.spacing(t?3:0)}));function HT({isIcon:e,sx:t,to:n,logoIcon:r,logoMain:o}){const{appDefaultPath:s}=Pn();return p.jsx(A.ButtonBase,{disableRipple:!0,component:pt.Link,to:n||s,sx:t,children:e?r:o})}function GT(e){const t=A.useTheme(),{horizontal:n}=Un(),{open:r}=$i(),{icon:o,main:s}=$T(),a=Tr(e,{minHeight:n?"unset":"60px",width:n?{xs:"100%",lg:"424px"}:"inherit",paddingTop:n?{xs:"10px",lg:"0"}:"8px",paddingBottom:n?{xs:"18px",lg:"0"}:"8px",paddingLeft:n?{xs:"24px",lg:"0"}:r?"24px":0});return p.jsx(UT,{theme:t,open:r,sx:a,children:p.jsx(HT,{to:"/",isIcon:!r,sx:{width:r?"auto":35,height:35},logoMain:s,logoIcon:o})})}function dC(e,t){return{width:t,borderRight:`1px solid ${e.palette.divider}`,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden",boxShadow:e.palette.mode==="dark"?e.customShadows.z1:"none"}}function fC(e){return{transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:e.spacing(7.5),borderRight:"none",boxShadow:e.customShadows.z1}}const zee=fe(A.Drawer,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=Pn();return{width:n,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",...t&&{...dC(e,n),"& .MuiDrawer-paper":dC(e,n)},...!t&&{...fC(e),"& .MuiDrawer-paper":fC(e)}}});var Ae={},Gh={exports:{}};(function(e,t){(function(n,r){var o="1.0.38",s="",a="?",c="function",u="undefined",d="object",h="string",g="major",m="model",v="name",b="type",x="vendor",w="version",O="architecture",M="console",E="mobile",R="tablet",P="smarttv",k="wearable",D="embedded",H=500,Y="Amazon",ee="Apple",z="ASUS",se="BlackBerry",ae="Browser",X="Chrome",K="Edge",V="Firefox",te="Google",N="Huawei",J="LG",W="Microsoft",G="Motorola",ue="Opera",he="Samsung",de="Sharp",pe="Sony",me="Xiaomi",we="Zebra",be="Facebook",ye="Chromium OS",xe="Mac OS",Oe=function(Pe,_e){var Ee={};for(var Ve in Pe)_e[Ve]&&_e[Ve].length%2===0?Ee[Ve]=_e[Ve].concat(Pe[Ve]):Ee[Ve]=Pe[Ve];return Ee},ce=function(Pe){for(var _e={},Ee=0;Ee<Pe.length;Ee++)_e[Pe[Ee].toUpperCase()]=Pe[Ee];return _e},tt=function(Pe,_e){return typeof Pe===h?ge(_e).indexOf(ge(Pe))!==-1:!1},ge=function(Pe){return Pe.toLowerCase()},at=function(Pe){return typeof Pe===h?Pe.replace(/[^\d\.]/g,s).split(".")[0]:r},Ht=function(Pe,_e){if(typeof Pe===h)return Pe=Pe.replace(/^\s\s*/,s),typeof _e===u?Pe:Pe.substring(0,H)},vt=function(Pe,_e){for(var Ee=0,Ve,Ie,dt,We,Te,Nt;Ee<_e.length&&!Te;){var Ir=_e[Ee],gr=_e[Ee+1];for(Ve=Ie=0;Ve<Ir.length&&!Te&&Ir[Ve];)if(Te=Ir[Ve++].exec(Pe),Te)for(dt=0;dt<gr.length;dt++)Nt=Te[++Ie],We=gr[dt],typeof We===d&&We.length>0?We.length===2?typeof We[1]==c?this[We[0]]=We[1].call(this,Nt):this[We[0]]=We[1]:We.length===3?typeof We[1]===c&&!(We[1].exec&&We[1].test)?this[We[0]]=Nt?We[1].call(this,Nt,We[2]):r:this[We[0]]=Nt?Nt.replace(We[1],We[2]):r:We.length===4&&(this[We[0]]=Nt?We[3].call(this,Nt.replace(We[1],We[2])):r):this[We]=Nt||r;Ee+=2}},Et=function(Pe,_e){for(var Ee in _e)if(typeof _e[Ee]===d&&_e[Ee].length>0){for(var Ve=0;Ve<_e[Ee].length;Ve++)if(tt(_e[Ee][Ve],Pe))return Ee===a?r:Ee}else if(tt(_e[Ee],Pe))return Ee===a?r:Ee;return Pe},Er={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},wt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},yt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[w,[v,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[w,[v,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[v,w],[/opios[\/ ]+([\w\.]+)/i],[w,[v,ue+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[w,[v,ue+" GX"]],[/\bopr\/([\w\.]+)/i],[w,[v,ue]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[w,[v,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[v,w],[/\bddg\/([\w\.]+)/i],[w,[v,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[w,[v,"UC"+ae]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[w,[v,"WeChat"]],[/konqueror\/([\w\.]+)/i],[w,[v,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[w,[v,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[w,[v,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[w,[v,"Smart Lenovo "+ae]],[/(avast|avg)\/([\w\.]+)/i],[[v,/(.+)/,"$1 Secure "+ae],w],[/\bfocus\/([\w\.]+)/i],[w,[v,V+" Focus"]],[/\bopt\/([\w\.]+)/i],[w,[v,ue+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[w,[v,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[w,[v,"Dolphin"]],[/coast\/([\w\.]+)/i],[w,[v,ue+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[w,[v,"MIUI "+ae]],[/fxios\/([-\w\.]+)/i],[w,[v,V]],[/\bqihu|(qi?ho?o?|360)browser/i],[[v,"360 "+ae]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[v,/(.+)/,"$1 "+ae],w],[/samsungbrowser\/([\w\.]+)/i],[w,[v,he+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[v,/_/g," "],w],[/metasr[\/ ]?([\d\.]+)/i],[w,[v,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[v,"Sogou Mobile"],w],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[v,w],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[v],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[v,be],w],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[v,w],[/\bgsa\/([\w\.]+) .*safari\//i],[w,[v,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[w,[v,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[w,[v,X+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[v,X+" WebView"],w],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[w,[v,"Android "+ae]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[v,w],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[w,[v,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[w,v],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[v,[w,Et,Er]],[/(webkit|khtml)\/([\w\.]+)/i],[v,w],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[v,"Netscape"],w],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[w,[v,V+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[v,w],[/(cobalt)\/([\w\.]+)/i],[v,[w,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[O,"amd64"]],[/(ia32(?=;))/i],[[O,ge]],[/((?:i[346]|x)86)[;\)]/i],[[O,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[O,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[O,"armhf"]],[/windows (ce|mobile); ppc;/i],[[O,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[O,/ower/,s,ge]],[/(sun4\w)[;\)]/i],[[O,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[O,ge]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[m,[x,he],[b,R]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[m,[x,he],[b,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[m,[x,ee],[b,E]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[m,[x,ee],[b,R]],[/(macintosh);/i],[m,[x,ee]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[m,[x,de],[b,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[m,[x,N],[b,R]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[m,[x,N],[b,E]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[m,/_/g," "],[x,me],[b,E]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[m,/_/g," "],[x,me],[b,R]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[m,[x,"OPPO"],[b,E]],[/\b(opd2\d{3}a?) bui/i],[m,[x,"OPPO"],[b,R]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[m,[x,"Vivo"],[b,E]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[m,[x,"Realme"],[b,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[m,[x,G],[b,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[m,[x,G],[b,R]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[m,[x,J],[b,R]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[m,[x,J],[b,E]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[m,[x,"Lenovo"],[b,R]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[m,/_/g," "],[x,"Nokia"],[b,E]],[/(pixel c)\b/i],[m,[x,te],[b,R]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[m,[x,te],[b,E]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[m,[x,pe],[b,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[m,"Xperia Tablet"],[x,pe],[b,R]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[m,[x,"OnePlus"],[b,E]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[m,[x,Y],[b,R]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[m,/(.+)/g,"Fire Phone $1"],[x,Y],[b,E]],[/(playbook);[-\w\),; ]+(rim)/i],[m,x,[b,R]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[m,[x,se],[b,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[m,[x,z],[b,R]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[m,[x,z],[b,E]],[/(nexus 9)/i],[m,[x,"HTC"],[b,R]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[x,[m,/_/g," "],[b,E]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[m,[x,"Acer"],[b,R]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[m,[x,"Meizu"],[b,E]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[m,[x,"Ulefone"],[b,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[x,m,[b,E]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[x,m,[b,R]],[/(surface duo)/i],[m,[x,W],[b,R]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[m,[x,"Fairphone"],[b,E]],[/(u304aa)/i],[m,[x,"AT&T"],[b,E]],[/\bsie-(\w*)/i],[m,[x,"Siemens"],[b,E]],[/\b(rct\w+) b/i],[m,[x,"RCA"],[b,R]],[/\b(venue[\d ]{2,7}) b/i],[m,[x,"Dell"],[b,R]],[/\b(q(?:mv|ta)\w+) b/i],[m,[x,"Verizon"],[b,R]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[m,[x,"Barnes & Noble"],[b,R]],[/\b(tm\d{3}\w+) b/i],[m,[x,"NuVision"],[b,R]],[/\b(k88) b/i],[m,[x,"ZTE"],[b,R]],[/\b(nx\d{3}j) b/i],[m,[x,"ZTE"],[b,E]],[/\b(gen\d{3}) b.+49h/i],[m,[x,"Swiss"],[b,E]],[/\b(zur\d{3}) b/i],[m,[x,"Swiss"],[b,R]],[/\b((zeki)?tb.*\b) b/i],[m,[x,"Zeki"],[b,R]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[x,"Dragon Touch"],m,[b,R]],[/\b(ns-?\w{0,9}) b/i],[m,[x,"Insignia"],[b,R]],[/\b((nxa|next)-?\w{0,9}) b/i],[m,[x,"NextBook"],[b,R]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[x,"Voice"],m,[b,E]],[/\b(lvtel\-)?(v1[12]) b/i],[[x,"LvTel"],m,[b,E]],[/\b(ph-1) /i],[m,[x,"Essential"],[b,E]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[m,[x,"Envizen"],[b,R]],[/\b(trio[-\w\. ]+) b/i],[m,[x,"MachSpeed"],[b,R]],[/\btu_(1491) b/i],[m,[x,"Rotor"],[b,R]],[/(shield[\w ]+) b/i],[m,[x,"Nvidia"],[b,R]],[/(sprint) (\w+)/i],[x,m,[b,E]],[/(kin\.[onetw]{3})/i],[[m,/\./g," "],[x,W],[b,E]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[m,[x,we],[b,R]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[m,[x,we],[b,E]],[/smart-tv.+(samsung)/i],[x,[b,P]],[/hbbtv.+maple;(\d+)/i],[[m,/^/,"SmartTV"],[x,he],[b,P]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[x,J],[b,P]],[/(apple) ?tv/i],[x,[m,ee+" TV"],[b,P]],[/crkey/i],[[m,X+"cast"],[x,te],[b,P]],[/droid.+aft(\w+)( bui|\))/i],[m,[x,Y],[b,P]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[m,[x,de],[b,P]],[/(bravia[\w ]+)( bui|\))/i],[m,[x,pe],[b,P]],[/(mitv-\w{5}) bui/i],[m,[x,me],[b,P]],[/Hbbtv.*(technisat) (.*);/i],[x,m,[b,P]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[x,Ht],[m,Ht],[b,P]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[b,P]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[x,m,[b,M]],[/droid.+; (shield) bui/i],[m,[x,"Nvidia"],[b,M]],[/(playstation [345portablevi]+)/i],[m,[x,pe],[b,M]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[m,[x,W],[b,M]],[/((pebble))app/i],[x,m,[b,k]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[m,[x,ee],[b,k]],[/droid.+; (glass) \d/i],[m,[x,te],[b,k]],[/droid.+; (wt63?0{2,3})\)/i],[m,[x,we],[b,k]],[/(quest( \d| pro)?)/i],[m,[x,be],[b,k]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[x,[b,D]],[/(aeobc)\b/i],[m,[x,Y],[b,D]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[m,[b,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[m,[b,R]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,R]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,E]],[/(android[-\w\. ]{0,9});.+buil/i],[m,[x,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[w,[v,K+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[w,[v,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[v,w],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[w,v]],os:[[/microsoft (windows) (vista|xp)/i],[v,w],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[v,[w,Et,wt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[w,Et,wt],[v,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[w,/_/g,"."],[v,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[v,xe],[w,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[w,v],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[v,w],[/\(bb(10);/i],[w,[v,se]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[w,[v,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[w,[v,V+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[w,[v,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[w,[v,"watchOS"]],[/crkey\/([\d\.]+)/i],[w,[v,X+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[v,ye],w],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[v,w],[/(sunos) ?([\w\.\d]*)/i],[[v,"Solaris"],w],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[v,w]]},ut=function(Pe,_e){if(typeof Pe===d&&(_e=Pe,Pe=r),!(this instanceof ut))return new ut(Pe,_e).getResult();var Ee=typeof n!==u&&n.navigator?n.navigator:r,Ve=Pe||(Ee&&Ee.userAgent?Ee.userAgent:s),Ie=Ee&&Ee.userAgentData?Ee.userAgentData:r,dt=_e?Oe(yt,_e):yt,We=Ee&&Ee.userAgent==Ve;return this.getBrowser=function(){var Te={};return Te[v]=r,Te[w]=r,vt.call(Te,Ve,dt.browser),Te[g]=at(Te[w]),We&&Ee&&Ee.brave&&typeof Ee.brave.isBrave==c&&(Te[v]="Brave"),Te},this.getCPU=function(){var Te={};return Te[O]=r,vt.call(Te,Ve,dt.cpu),Te},this.getDevice=function(){var Te={};return Te[x]=r,Te[m]=r,Te[b]=r,vt.call(Te,Ve,dt.device),We&&!Te[b]&&Ie&&Ie.mobile&&(Te[b]=E),We&&Te[m]=="Macintosh"&&Ee&&typeof Ee.standalone!==u&&Ee.maxTouchPoints&&Ee.maxTouchPoints>2&&(Te[m]="iPad",Te[b]=R),Te},this.getEngine=function(){var Te={};return Te[v]=r,Te[w]=r,vt.call(Te,Ve,dt.engine),Te},this.getOS=function(){var Te={};return Te[v]=r,Te[w]=r,vt.call(Te,Ve,dt.os),We&&!Te[v]&&Ie&&Ie.platform&&Ie.platform!="Unknown"&&(Te[v]=Ie.platform.replace(/chrome os/i,ye).replace(/macos/i,xe)),Te},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ve},this.setUA=function(Te){return Ve=typeof Te===h&&Te.length>H?Ht(Te,H):Te,this},this.setUA(Ve),this};ut.VERSION=o,ut.BROWSER=ce([v,w,g]),ut.CPU=ce([O]),ut.DEVICE=ce([m,x,b,M,E,P,R,k,D]),ut.ENGINE=ut.OS=ce([v,w]),e.exports&&(t=e.exports=ut),t.UAParser=ut;var Bt=typeof n!==u&&(n.jQuery||n.Zepto);if(Bt&&!Bt.ua){var Gt=new ut;Bt.ua=Gt.getResult(),Bt.ua.get=function(){return Gt.getUA()},Bt.ua.set=function(Pe){Gt.setUA(Pe);var _e=Gt.getResult();for(var Ee in _e)Bt.ua[Ee]=_e[Ee]}}})(typeof window=="object"?window:wn)})(Gh,Gh.exports);var Uee=Gh.exports;Object.defineProperty(Ae,"__esModule",{value:!0});function Hee(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var sn=T,mt=Hee(sn),YT=Uee,Xo=new YT,an=Xo.getBrowser(),Gee=Xo.getCPU(),Hn=Xo.getDevice(),g0=Xo.getEngine(),Zo=Xo.getOS(),Rl=Xo.getUA(),qT=function(t){return Xo.setUA(t)},Ml=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new YT(t);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(o){return n.setUA(o)}}},KT=Object.freeze({ClientUAInstance:Xo,browser:an,cpu:Gee,device:Hn,engine:g0,os:Zo,ua:Rl,setUa:qT,parseUserAgent:Ml});function pC(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 Yee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pC(Object(n),!0).forEach(function(r){Zee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ga(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ga=function(t){return typeof t}:Ga=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ga(e)}function qee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xee(e,t,n){return t&&Kee(e.prototype,t),e}function Zee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yh(){return Yh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yh.apply(this,arguments)}function Qee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kh(e,t)}function qh(e){return qh=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},qh(e)}function Kh(e,t){return Kh=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},Kh(e,t)}function Jee(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function hr(e,t){if(e==null)return{};var n=Jee(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function du(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ete(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return du(e)}function tte(e,t){return nte(e)||rte(e,t)||ote(e,t)||ite()}function nte(e){if(Array.isArray(e))return e}function rte(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,a,c;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){s=!0,c=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw c}}return r}}function ote(e,t){if(e){if(typeof e=="string")return hC(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 hC(e,t)}}function hC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ite(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
217
+ `+(c!==a?`result of cast: ${c}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,s)=>s.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:s,originalValue:a=t,strict:c=this.spec.strict}=n,u=t;c||(u=this._cast(u,Object.assign({assert:!1},n)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:s,value:u,originalValue:a,options:n,tests:d},r,h=>{if(h.length)return o(h,u);this.runTests({path:s,value:u,originalValue:a,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:s,value:a,originalValue:c,path:u,options:d}=t,h=x=>{o||(o=!0,n(x,a))},g=x=>{o||(o=!0,r(x,a))},m=s.length,v=[];if(!m)return g([]);let b={value:a,originalValue:c,path:u,options:d,schema:this};for(let x=0;x<s.length;x++){const w=s[x];w(b,h,function(M){M&&(Array.isArray(M)?v.push(...M):v.push(M)),--m<=0&&g(v)})}}asNestedTest({key:t,index:n,parent:r,parentPath:o,originalParent:s,options:a}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof c=="number";let d=r[c];const h=Object.assign({},a,{strict:!0,parent:r,value:d,originalValue:s[c],key:void 0,[u?"index":"key"]:c,path:u||c.includes(".")?`${o||""}[${u?c:`"${c}"`}]`:(o?`${o}.`:"")+t});return(g,m,v)=>this.resolve(h)._validate(d,h,m,v)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,c)=>o._validate(t,n,(u,d)=>{Cn.isError(u)&&(u.value=d),c(u)},(u,d)=>{u.length?c(new Cn(u,d,void 0,void 0,s)):a(d)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),s,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(c,u)=>{throw Cn.isError(c)&&(c.value=u),c},(c,u)=>{if(c.length)throw new Cn(c,t,void 0,void 0,a);s=u}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Cn.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Cn.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Ss(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=cs({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=cs({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Mr.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Mr.notNull){return this.nullability(!1,t)}required(t=Mr.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=Mr.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=cs(n),s=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&&(s||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=P2(t).map(s=>new Vi(s));return o.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Hu(o,n):Hu.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=cs({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=Mr.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=cs({message:n,name:"oneOf",skipAbsent:!0,test(o){let s=this.schema._whitelist,a=s.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:a}})}}),r}notOneOf(t,n=Mr.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=cs({message:n,name:"notOneOf",test(o){let s=this.schema._blacklist,a=s.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(s).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:s,nullable:a}=n.spec;return{meta:o,label:r,optional:s,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,d,h)=>h.findIndex(g=>g.name===u.name)===d)}}}cr.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])cr.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:s,schema:a}=CQ(this,t,n,r.context);return a[e](o&&o[s],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])cr.prototype[e]=cr.prototype.oneOf;for(const e of["not","nope"])cr.prototype[e]=cr.prototype.notOneOf;const wQ=()=>!0;function k2(e){return new D2(e)}class D2 extends cr{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:wQ},t))}}k2.prototype=D2.prototype;const AQ=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function SQ(e){const t=zh(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 zh(e){var t,n;const r=AQ.exec(e);return r?{year:no(r[1]),month:no(r[2],1)-1,day:no(r[3],1),hour:no(r[4]),minute:no(r[5]),second:no(r[6]),millisecond:r[7]?no(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:no(r[10]),minuteOffset:no(r[11])}:null}function no(e,t=0){return Number(e)||t}let TQ=/^[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])?)*$/,EQ=/^((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,IQ=/^(?:[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,OQ="^\\d{4}-\\d{2}-\\d{2}",PQ="\\d{2}:\\d{2}:\\d{2}",jQ="(([+-]\\d{2}(:?\\d{2})?)|Z)",RQ=new RegExp(`${OQ}T${PQ}(\\.\\d+)?${jQ}$`),MQ=e=>so(e)||e===e.trim(),kQ={}.toString();function ao(){return new F2}class F2 extends cr{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===kQ?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Mr.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=xn.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=xn.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=xn.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,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:s}=n:o=n),this.test({name:s||"matches",message:o||xn.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=xn.email){return this.matches(TQ,{name:"email",message:t,excludeEmptyString:!0})}url(t=xn.url){return this.matches(EQ,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=xn.uuid){return this.matches(IQ,{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(RQ,{name:"datetime",message:n||xn.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||xn.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const a=zh(s);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||xn.datetime_precision,params:{precision:o},skipAbsent:!0,test:s=>{if(!s||o==null)return!0;const a=zh(s);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=xn.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:MQ})}lowercase(t=xn.lowercase){return this.transform(n=>so(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>so(n)||n===n.toLowerCase()})}uppercase(t=xn.uppercase){return this.transform(n=>so(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>so(n)||n===n.toUpperCase()})}}ao.prototype=F2.prototype;let DQ=e=>e!=+e;function L2(){return new _2}class _2 extends cr{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!DQ(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=Mo.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=Mo.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=Mo.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=Mo.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=Mo.positive){return this.moreThan(0,t)}negative(t=Mo.negative){return this.lessThan(0,t)}integer(t=Mo.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>so(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=>so(o)?o:Math[t](o))}}L2.prototype=_2.prototype;let FQ=new Date(""),LQ=e=>Object.prototype.toString.call(e)==="[object Date]";class Nd extends cr{constructor(){super({type:"date",check(t){return LQ(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=SQ(t),isNaN(t)?Nd.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Vi.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=Wh.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=Wh.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)}})}}Nd.INVALID_DATE=FQ;Nd.prototype;function _Q(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([a,c])=>`${a}-${c}`));function s(a,c){let u=Ii.split(a)[0];r.add(u),o.has(`${c}-${u}`)||n.push([c,u])}for(const a of Object.keys(e)){let c=e[a];r.add(a),Vi.isRef(c)&&c.isSibling?s(c.path,a):Jm(c)&&"deps"in c&&c.deps.forEach(u=>s(u,a))}return uQ.array(Array.from(r),n).reverse()}function aC(e,t){let n=1/0;return e.some((r,o)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=o,!0}),n}function B2(e){return(t,n)=>aC(e,t)-aC(e,n)}const BQ=(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 uu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=uu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=uu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(uu)}):"optional"in e?e.optional():e}const NQ=(e,t)=>{const n=[...Ii.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=Ii.getter(Ii.join(n),!0)(e);return!!(o&&r in o)};let lC=e=>Object.prototype.toString.call(e)==="[object Object]";function VQ(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const WQ=B2([]);function e0(e){return new N2(e)}class N2 extends cr{constructor(t){super({type:"object",check(n){return lC(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=WQ,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 s=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(o).filter(g=>!this._nodes.includes(g))),u={},d=Object.assign({},n,{parent:u,__validating:n.__validating||!1}),h=!1;for(const g of c){let m=s[g],v=g in o;if(m){let b,x=o[g];d.path=(n.path?`${n.path}.`:"")+g,m=m.resolve({value:x,context:n.context,parent:u});let w=m instanceof cr?m.spec:void 0,O=w==null?void 0:w.strict;if(w!=null&&w.strip){h=h||g in o;continue}b=!n.__validating||!O?m.cast(o[g],d):o[g],b!==void 0&&(u[g]=b)}else v&&!a&&(u[g]=o[g]);(v!==g in u||u[g]!==o[g])&&(h=!0)}return h?u:o}_validate(t,n={},r,o){let{from:s=[],originalValue:a=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:a},...s],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(u,d)=>{if(!c||!lC(d)){o(u,d);return}a=a||d;let h=[];for(let g of this._nodes){let m=this.fields[g];!m||Vi.isRef(m)||h.push(m.asNestedTest({options:n,key:g,parent:d,parentPath:n.path,originalParent:a}))}this.runTests({tests:h,value:d,originalValue:a,options:n},r,g=>{o(g.sort(this._sortErrors).concat(u),d)})})}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,s]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?s: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 s=this.fields[r];let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=_Q(t,n),r._sortErrors=B2(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 uu(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=Ii.getter(t,!0);return this.transform(s=>{if(!s)return s;let a=s;return NQ(s,t)&&(a=Object.assign({},s),r||delete a[t],a[n]=o(s)),a})}json(){return this.transform(BQ)}noUnknown(t=!0,n=$h.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 s=VQ(this.schema,o);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=$h.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(Up.camelCase)}snakeCase(){return this.transformKeys(Up.snakeCase)}constantCase(){return this.transformKeys(t=>Up.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,a]of Object.entries(n.fields)){var o;let c=t;(o=c)!=null&&o.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[s]})),r.fields[s]=a.describe(c)}return r}}e0.prototype=N2.prototype;const cC=k2().test("function","Invalid function",e=>Z.isFunction(e));var Do,Si,Da;class V2{constructor(){eo(this,Si);eo(this,Do,[])}get(t){if(ao().required().validateSync(t),wa(this,Si,Da).call(this)){const n=localStorage.getItem(t);return Z.isNil(n)?null:JSON.parse(n)}else return null}set(t,n){return ao().required().validateSync(t),wa(this,Si,Da).call(this)?(localStorage.setItem(t,JSON.stringify(n)),n):null}watch(t,n){ao().required().validateSync(t),cC.validateSync(n),wa(this,Si,Da).call(this)&&(yn(this,Do).push({key:t,callback:n}),window.addEventListener("storage",r=>{r.storageArea===localStorage&&r.key===t&&n(this.get(t))}))}unwatch(t,n){ao().required().validateSync(t),cC.optional().default(Z.identity).validateSync(n),wa(this,Si,Da).call(this)&&(n!==void 0?Eo(this,Do,Z.reject(yn(this,Do),r=>r.key===t&&r.callback===n)):Eo(this,Do,Z.reject(yn(this,Do),r=>r.key===t)))}}Do=new WeakMap,Si=new WeakSet,Da=function(){return typeof window<"u"};function Yu(e={},t=[],n={}){const{isEmpty:r=Z.isEmpty}=n;return!Z.some(t,o=>r((e??{})[o.locale]))}function W2(e={},t=[],n={}){const{isEmpty:r=Z.isEmpty}=n;return Z.some(t,o=>!r((e??{})[o.locale]))}function t0(e,t,n){if(!Z.isPlainObject(e)||t===void 0)return;const r=Z.isPlainObject(n)?n:{},o=!!((r==null?void 0:r.fallback)??!0);let s=e[String(t)];if(s===void 0&&o){const a=Z.isArray(r.fallbackLocales)&&!Z.isEmpty(r.fallbackLocales)?r.fallbackLocales:["en"];s=Z.chain(a).map(c=>e[String(c)]).reject(Z.isUndefined).first().value(),s===void 0&&(s=Z.chain(e).values().first().value())}return s}var $2={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(wn,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",a="second",c="minute",u="hour",d="day",h="week",g="month",m="quarter",v="year",b="date",x="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(X){var K=["th","st","nd","rd"],V=X%100;return"["+X+(K[(V-20)%10]||K[V]||K[0])+"]"}},E=function(X,K,V){var te=String(X);return!te||te.length>=K?X:""+Array(K+1-te.length).join(V)+X},R={s:E,z:function(X){var K=-X.utcOffset(),V=Math.abs(K),te=Math.floor(V/60),N=V%60;return(K<=0?"+":"-")+E(te,2,"0")+":"+E(N,2,"0")},m:function X(K,V){if(K.date()<V.date())return-X(V,K);var te=12*(V.year()-K.year())+(V.month()-K.month()),N=K.clone().add(te,g),J=V-N<0,W=K.clone().add(te+(J?-1:1),g);return+(-(te+(V-N)/(J?N-W:W-N))||0)},a:function(X){return X<0?Math.ceil(X)||0:Math.floor(X)},p:function(X){return{M:g,y:v,w:h,d,D:b,h:u,m:c,s:a,ms:s,Q:m}[X]||String(X||"").toLowerCase().replace(/s$/,"")},u:function(X){return X===void 0}},P="en",k={};k[P]=M;var D="$isDayjsObject",H=function(X){return X instanceof se||!(!X||!X[D])},Y=function X(K,V,te){var N;if(!K)return P;if(typeof K=="string"){var J=K.toLowerCase();k[J]&&(N=J),V&&(k[J]=V,N=J);var W=K.split("-");if(!N&&W.length>1)return X(W[0])}else{var G=K.name;k[G]=K,N=G}return!te&&N&&(P=N),N||!te&&P},ee=function(X,K){if(H(X))return X.clone();var V=typeof K=="object"?K:{};return V.date=X,V.args=arguments,new se(V)},z=R;z.l=Y,z.i=H,z.w=function(X,K){return ee(X,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var se=function(){function X(V){this.$L=Y(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[D]=!0}var K=X.prototype;return K.parse=function(V){this.$d=function(te){var N=te.date,J=te.utc;if(N===null)return new Date(NaN);if(z.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var W=N.match(w);if(W){var G=W[2]-1||0,ue=(W[7]||"0").substring(0,3);return J?new Date(Date.UTC(W[1],G,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ue)):new Date(W[1],G,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ue)}}return new Date(N)}(V),this.init()},K.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},K.$utils=function(){return z},K.isValid=function(){return this.$d.toString()!==x},K.isSame=function(V,te){var N=ee(V);return this.startOf(te)<=N&&N<=this.endOf(te)},K.isAfter=function(V,te){return ee(V)<this.startOf(te)},K.isBefore=function(V,te){return this.endOf(te)<ee(V)},K.$g=function(V,te,N){return z.u(V)?this[te]:this.set(N,V)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(V,te){var N=this,J=!!z.u(te)||te,W=z.p(V),G=function(ye,xe){var Oe=z.w(N.$u?Date.UTC(N.$y,xe,ye):new Date(N.$y,xe,ye),N);return J?Oe:Oe.endOf(d)},ue=function(ye,xe){return z.w(N.toDate()[ye].apply(N.toDate("s"),(J?[0,0,0,0]:[23,59,59,999]).slice(xe)),N)},he=this.$W,de=this.$M,pe=this.$D,me="set"+(this.$u?"UTC":"");switch(W){case v:return J?G(1,0):G(31,11);case g:return J?G(1,de):G(0,de+1);case h:var we=this.$locale().weekStart||0,be=(he<we?he+7:he)-we;return G(J?pe-be:pe+(6-be),de);case d:case b:return ue(me+"Hours",0);case u:return ue(me+"Minutes",1);case c:return ue(me+"Seconds",2);case a:return ue(me+"Milliseconds",3);default:return this.clone()}},K.endOf=function(V){return this.startOf(V,!1)},K.$set=function(V,te){var N,J=z.p(V),W="set"+(this.$u?"UTC":""),G=(N={},N[d]=W+"Date",N[b]=W+"Date",N[g]=W+"Month",N[v]=W+"FullYear",N[u]=W+"Hours",N[c]=W+"Minutes",N[a]=W+"Seconds",N[s]=W+"Milliseconds",N)[J],ue=J===d?this.$D+(te-this.$W):te;if(J===g||J===v){var he=this.clone().set(b,1);he.$d[G](ue),he.init(),this.$d=he.set(b,Math.min(this.$D,he.daysInMonth())).$d}else G&&this.$d[G](ue);return this.init(),this},K.set=function(V,te){return this.clone().$set(V,te)},K.get=function(V){return this[z.p(V)]()},K.add=function(V,te){var N,J=this;V=Number(V);var W=z.p(te),G=function(de){var pe=ee(J);return z.w(pe.date(pe.date()+Math.round(de*V)),J)};if(W===g)return this.set(g,this.$M+V);if(W===v)return this.set(v,this.$y+V);if(W===d)return G(1);if(W===h)return G(7);var ue=(N={},N[c]=r,N[u]=o,N[a]=n,N)[W]||1,he=this.$d.getTime()+V*ue;return z.w(he,this)},K.subtract=function(V,te){return this.add(-1*V,te)},K.format=function(V){var te=this,N=this.$locale();if(!this.isValid())return N.invalidDate||x;var J=V||"YYYY-MM-DDTHH:mm:ssZ",W=z.z(this),G=this.$H,ue=this.$m,he=this.$M,de=N.weekdays,pe=N.months,me=N.meridiem,we=function(xe,Oe,ce,tt){return xe&&(xe[Oe]||xe(te,J))||ce[Oe].slice(0,tt)},be=function(xe){return z.s(G%12||12,xe,"0")},ye=me||function(xe,Oe,ce){var tt=xe<12?"AM":"PM";return ce?tt.toLowerCase():tt};return J.replace(O,function(xe,Oe){return Oe||function(ce){switch(ce){case"YY":return String(te.$y).slice(-2);case"YYYY":return z.s(te.$y,4,"0");case"M":return he+1;case"MM":return z.s(he+1,2,"0");case"MMM":return we(N.monthsShort,he,pe,3);case"MMMM":return we(pe,he);case"D":return te.$D;case"DD":return z.s(te.$D,2,"0");case"d":return String(te.$W);case"dd":return we(N.weekdaysMin,te.$W,de,2);case"ddd":return we(N.weekdaysShort,te.$W,de,3);case"dddd":return de[te.$W];case"H":return String(G);case"HH":return z.s(G,2,"0");case"h":return be(1);case"hh":return be(2);case"a":return ye(G,ue,!0);case"A":return ye(G,ue,!1);case"m":return String(ue);case"mm":return z.s(ue,2,"0");case"s":return String(te.$s);case"ss":return z.s(te.$s,2,"0");case"SSS":return z.s(te.$ms,3,"0");case"Z":return W}return null}(xe)||W.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(V,te,N){var J,W=this,G=z.p(te),ue=ee(V),he=(ue.utcOffset()-this.utcOffset())*r,de=this-ue,pe=function(){return z.m(W,ue)};switch(G){case v:J=pe()/12;break;case g:J=pe();break;case m:J=pe()/3;break;case h:J=(de-he)/6048e5;break;case d:J=(de-he)/864e5;break;case u:J=de/o;break;case c:J=de/r;break;case a:J=de/n;break;default:J=de}return N?J:z.a(J)},K.daysInMonth=function(){return this.endOf(g).$D},K.$locale=function(){return k[this.$L]},K.locale=function(V,te){if(!V)return this.$L;var N=this.clone(),J=Y(V,te,!0);return J&&(N.$L=J),N},K.clone=function(){return z.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},X}(),ae=se.prototype;return ee.prototype=ae,[["$ms",s],["$s",a],["$m",c],["$H",u],["$W",d],["$M",g],["$y",v],["$D",b]].forEach(function(X){ae[X[1]]=function(K){return this.$g(K,X[0],X[1])}}),ee.extend=function(X,K){return X.$i||(X(K,se,ee),X.$i=!0),ee},ee.locale=Y,ee.isDayjs=H,ee.unix=function(X){return ee(1e3*X)},ee.en=k[P],ee.Ls=k,ee.p={},ee})})($2);var z2=$2.exports;const Wr=$r(z2);function U2(e){const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return Wr().hour(n).minute(r)}const Fa=new V2;function $Q(e,t,n){return function(r){const o=Z.isFunction(r)?r(t):r;return Fa.set(e,o),n(o),o}}function n0(e,t){var u;ao().required().validateSync(e);const[n,r]=T.useState(Fa.get(e)??t),o=T.useRef(t),s=Z.isEqual(o.current,t)?o.current:t,a=T.useRef(),c=a.current;return T.useEffect(()=>{r(Fa.get(e)??s)},[e,s,r]),T.useEffect(()=>{function d(h){r(h)}return Fa.watch(e,d),()=>{Fa.unwatch(e,d)}},[e,r]),(e!==(c==null?void 0:c.key)||!Z.isEqual(n,c==null?void 0:c.value))&&(a.current={key:e,value:n,setter:$Q(e,n,r)}),[n,((u=a.current)==null?void 0:u.setter)??Z.noop]}function H2(e){const[t]=re.useLocaleState();return e!==void 0?String(e):t}function zQ(e,t){const n=H2(t==null?void 0:t.locale);return t0(e,n,t)}function UQ(e){const t=H2(e==null?void 0:e.locale);return T.useCallback(r=>t0(r,t,e),[t,e])}function G2(e){if(!Z.isPlainObject(e))throw new Error("[useMemoizedObject]: param must be a plain JS object");const[t,n]=T.useState(e);return T.useEffect(()=>{Z.isEqual(e,t)||n(e)},[e,t]),t}function Pl(){const[e,t]=T.useState(null),n=!!e,r=T.useCallback(a=>t((a==null?void 0:a.currentTarget)??null),[t]),o=T.useCallback(()=>t(null),[t]),s=T.useCallback(a=>{n?o():r(a)},[n,r,o]);return{anchorEl:e,open:n,handleClick:r,handleClose:o,handleToggle:s}}function HQ(e,t){const[n,r]=T.useState({width:1,height:1}),o=e.current;return T.useEffect(()=>{function s(){var d;let c=0,u=0;switch(t){case"client":c=(o==null?void 0:o.clientWidth)??0,u=(o==null?void 0:o.clientHeight)??0;break;case"offset":c=(o==null?void 0:o.offsetWidth)??0,u=(o==null?void 0:o.offsetHeight)??0;break;case"scroll":c=(o==null?void 0:o.scrollWidth)??0,u=(o==null?void 0:o.scrollHeight)??0;break;case"bounding":default:{const h=((d=e.current)==null?void 0:d.getBoundingClientRect())??{width:0,height:0};c=h.width,u=h.height;break}}r({width:c,height:u})}const a=new ResizeObserver(s);return Z.isEmpty(e==null?void 0:e.current)||(a.observe(e==null?void 0:e.current),s()),()=>{a.disconnect()}},[o,t,e]),n}function r0(e){const t=L.useRecordContext(),n=L.useTranslate(),r=L.useResourceContext(),o=t!=null&&t.id?"edit":"create";return T.useMemo(()=>{if(e===!1)return;const a=`resources.${r}.title`;return e||n(`resources.${r}.title.${o}`,{_:n(a,{_:a}),...t})},[o,t,r,n,e])}function Rr(){throw new Error("Method must be implemented")}const Y2={fontFamily:"'Inter', sans-serif",menuOrientation:"vertical",miniDrawer:!1,container:!1,mode:"light",presetColor:"theme4",themeDirection:"ltr",appDefaultPath:"/",drawerWidth:260,horizontalMaxItems:6,spacing:2,setFontFamily:Rr,setMenuOrientation:Rr,setMiniDrawer:Rr,setContainer:Rr,setMode:Rr,setPresetColor:Rr,setThemeDirection:Rr,setAppDefaultPath:Rr,setDrawerWidth:Rr,setHorizontalMaxItems:Rr,isVerticalLayout:e=>!1,isHorizontalLayout:e=>!1};function GQ(e){return e==="vertical"}function YQ(e){return e==="horizontal"}const o0=T.createContext(Y2);function Uh({initialConfig:e,children:t}){const[n,r]=n0("theme-config",{...Y2,...e});function o(b){r(x=>({...x,fontFamily:b}))}function s(b){r(x=>({...x,menuOrientation:b}))}function a(b){r(x=>({...x,miniDrawer:b}))}function c(b){r(x=>({...x,container:b}))}function u(b){r(x=>({...x,mode:b}))}function d(b){r(x=>({...x,presetColor:b}))}function h(b){r(x=>({...x,themeDirection:b}))}function g(b){r(x=>({...x,appDefaultPath:b}))}function m(b){r(x=>({...x,drawerWidth:b}))}function v(b){r(x=>({...x,horizontalMaxItems:b}))}return p.jsx(o0.Provider,{value:{...n,setFontFamily:o,setMenuOrientation:s,setMiniDrawer:a,setContainer:c,setMode:u,setPresetColor:d,setThemeDirection:h,setAppDefaultPath:g,setDrawerWidth:m,setHorizontalMaxItems:v,isVerticalLayout:GQ,isHorizontalLayout:YQ},children:t})}function i0(){return T.useContext(o0)}function Pn(){return i0()}const qQ=Sl(L.Toolbar,{slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end",position:"initial !important","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}}));function Wi(e){return p.jsx(qQ,{...e})}function q2({children:e,spacing:t,defaultValues:n,...r}){const{spacing:o}=Pn();return p.jsx(XQ,{defaultValues:n,spacing:t||o,children:p.jsx(A.Grid,{container:!0,...r,spacing:t||o,children:e})})}function KQ({children:e,content:t=!0,title:n,subheader:r=null,secondary:o=null,toolbar:s=!1,lg:a=12,md:c=12,sm:u=12,xs:d=12,...h}){const g=L.useTranslate(),m=L.useResourceContext(),{cardTitle:v,cardSubheader:b}=T.useMemo(()=>{const x=n||`resources.${m}.title`;return{cardTitle:g(x,{_:x}),cardSubheader:r!==null?g(r,{_:r}):null}},[m,r,n,g]);return p.jsx(A.Grid,{item:!0,...h,lg:a,md:c,sm:u,xs:d,children:p.jsx(Cr,{content:t,title:v,subheader:b,secondary:o,divider:!0,children:p.jsxs(p.Fragment,{children:[e,s===!0?p.jsx(Wi,{children:p.jsx(L.SaveButton,{})}):s]})})})}const XQ=fe(L.Form,{slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*1.25),padding:0,minHeight:"unset"},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingRight:"0 !important",paddingLeft:"0 !important",paddingBottom:"0 !important"}}));q2.Section=KQ;const ZQ=Sl(L.SimpleForm,{slot:"Root"})(({theme:e})=>({[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}}));function K2({title:e,modal:t=!1,content:n=!1,subheader:r=null,toolbar:o=p.jsx(Wi,{children:p.jsx(L.SaveButton,{type:"button"})}),secondary:s=p.jsx(Fi,{children:p.jsx(L.DeleteWithConfirmButton,{})}),sx:a,...c}){const u=r0(e),d=L.useRecordContext(),h=Zg();return p.jsx(Cr,{content:n,title:u,subheader:r,secondary:d!=null&&d.id?s:null,sx:{...a,"& .MuiToolbar-root":{paddingLeft:h.spacing(2.5),paddingRight:h.spacing(2.5),paddingBottom:h.spacing(2.5),paddingTop:t?h.spacing(2.5):0,borderTop:t?`1px solid ${h.palette.divider}`:void 0}},border:!t,divider:!0,children:p.jsx(ZQ,{toolbar:o,...c})})}const X2={openDialogs:[],getCurrentDialog:()=>null,openDialog:(e,t)=>{throw new Error(`openDialog not yet ready for: ${e}, ${t}`)},closeDialog:(e,t)=>{throw new Error(`closeDialog not yet ready for: ${e}, ${t}`)}},Z2=T.createContext(X2);function QQ(e){const[t,n]=T.useState(X2);function r(a,c){n(u=>({...u,openDialogs:[...u.openDialogs,a]})),c&&c()}function o(a,c){n(u=>({...u,openDialogs:u.openDialogs.filter(d=>d!==a)})),c&&c()}function s(){return t.openDialogs.length>0?t.openDialogs[t.openDialogs.length-1]:null}return p.jsx(Z2.Provider,{value:{...t,openDialog:r,closeDialog:o,getCurrentDialog:s},children:e.children})}function Q2(){const e=T.useContext(Z2);if(e===void 0)throw new Error("useAppState must be used within an AppStateProvider");return e}function s0(){return Q2()}function J2({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:s,divider:a=!1,fullWidth:c,...u}){const d=Zt.useTheme(),{getCurrentDialog:h}=s0(),{source:g,resource:m,isRequired:v}=u,{getFieldState:b,formState:x}=Ar.useFormContext(),{error:w}=b(g,x),O=h();return p.jsxs(A.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:w?d.palette.error.main:d.palette.text.secondary,"& span":{display:"none"}},width:c?"100%":"auto",...o},children:[n==="label"&&e!==!1&&s!==!1&&p.jsx(A.InputLabel,{error:!!w,sx:{borderBottom:a?`1px solid ${d.palette.divider}`:"none",pb:a?1:0,mt:a?1:0,pt:1},children:p.jsx(L.FieldTitle,{label:e,source:g,resource:O||m,isRequired:v})}),T.isValidElement(t)?T.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r?p.jsx(A.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!w,children:r}):null]})}const JQ=fe(L.ArrayInput,{slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}}));function eJ({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s}){return p.jsx(J2,{label:e,addLabel:t,source:n,helperText:r,divider:o,fullWidth:s==null?void 0:s.fullWidth,children:p.jsx(JQ,{source:n,label:!1,...s})})}function tJ({canEdit:e=!0,canDelete:t=!0,canClone:n=!1}){return!e&&!t&&!n?null:p.jsxs(Fi,{children:[e?p.jsx(L.EditButton,{}):null,t?p.jsx(L.DeleteWithConfirmButton,{}):null,n?p.jsx(L.CloneButton,{}):null]})}const uC=fe("div",{overridesResolver:(e,t)=>t.root})({display:"inline-block"}),nJ=fe("ul")({display:"inline-block"});function rJ(e){var h;const{className:t,emptyText:n,source:r,title:o,...s}=e,a=re.useRecordContext(e),c=ht.get(a,r),u=re.useTranslate();if(!c)return n?p.jsx(A.Typography,{component:"span",variant:"body2",className:t,...s,children:n?u(n,{_:n}):null}):p.jsx(uC,{className:t,...s});if(Array.isArray(c))return p.jsx(nJ,{className:t,...s,children:c.map((g,m)=>{var b;const v=o instanceof String?(b=ht.get(g,o))==null?void 0:b.toString():o;return p.jsx("li",{children:v},m)})});const d=o instanceof String?(h=ht.get(a,o))==null?void 0:h.toString():o;return p.jsx(uC,{className:t,...s,children:d})}function eT({entityId:e,property:t,disabled:n,showUser:r=!1,userResource:o="entities/user",...s}){const[a,c]=T.useState(null),u=L.useRecordContext(s),d=L.useDataProvider(),h=L.useResourceContext(),g=T.useCallback(async b=>{b.preventDefault(),b.stopPropagation();const x=ht.get(u,s==null?void 0:s.source),w=h.replace("entities/",""),O=await d.getFile(`/attachments/${w}/${e||(u==null?void 0:u.id)}/${t||(s==null?void 0:s.source)}/${(x==null?void 0:x.id)||(u==null?void 0:u.id)}`),M=document.createElement("a");M.href=O,M.download=ht.get(u,(s==null?void 0:s.title)||(s==null?void 0:s.source)),M.click()},[d,u,e,h,t,s==null?void 0:s.source,s==null?void 0:s.title]),m=T.useMemo(()=>({...u,[s==null?void 0:s.source]:(u==null?void 0:u.src)||ht.get(u,s==null?void 0:s.source),[s==null?void 0:s.title]:(u==null?void 0:u.title)||ht.get(u,(s==null?void 0:s.title)||(s==null?void 0:s.source))}),[u,s==null?void 0:s.source,s==null?void 0:s.title]),v=L.useTranslate();return T.useEffect(()=>{!u||!(u!=null&&u.userId)||r===!1||d.getOne(o,{id:u==null?void 0:u.userId}).then(({data:b})=>c(b)).catch(()=>c(null))},[u,d,o,r]),p.jsx(rJ,{...s,disabled:n,record:m,onClick:g,title:p.jsxs(A.Box,{sx:{cursor:"pointer"},children:[p.jsx(A.Typography,{variant:"subtitle1",children:ht.get(m,(s==null?void 0:s.title)||(s==null?void 0:s.source))}),p.jsxs(A.Typography,{variant:"caption",color:"secondary",children:[ht.get(m,"sizeDescription"),r&&a?" | ":null,r&&a?v("ra.attachment.info",{user:a==null?void 0:a.name,created:Wr(m==null?void 0:m.createdAt).format("DD/MM/YYYY HH:mm")}):null]})]})})}const oJ=fe(L.ImageField,{slot:"root"})(()=>({}));function tT(e){const t=`_${e==null?void 0:e.source}`;return p.jsx(oJ,{...e,source:t})}function nT({width:e=150,height:t=150,circle:n=!1,justify:r="flex-start",record:o,sx:s,...a}){const c=T.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5,...s}),[e,t,n,s]),u=L.useRecordContext(),d=o||u;return p.jsx(tT,{sx:h=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${h.palette.divider}`,objectFit:"cover !important",...c,minWidth:c.width,minHeight:c.height}}),...a,record:d})}var iJ={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(wn,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],o=n%100;return"["+n+(r[(o-20)%10]||r[o]||r[0])+"]"}}})})(iJ);var sJ={exports:{}};(function(e,t){(function(n,r){e.exports=r(z2)})(wn,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=r(n),s={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(a){return a+"º"}};return o.default.locale(s,null,!0),s})})(sJ);var rT={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(wn,function(){return function(n,r,o){n=n||{};var s=r.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function c(d,h,g,m){return s.fromToBase(d,h,g,m)}o.en.relativeTime=a,s.fromToBase=function(d,h,g,m,v){for(var b,x,w,O=g.$locale().relativeTime||a,M=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],E=M.length,R=0;R<E;R+=1){var P=M[R];P.d&&(b=m?o(d).diff(g,P.d,!0):g.diff(d,P.d,!0));var k=(n.rounding||Math.round)(Math.abs(b));if(w=b>0,k<=P.r||!P.r){k<=1&&R>0&&(P=M[R-1]);var D=O[P.l];v&&(k=v(""+k)),x=typeof D=="string"?D.replace("%d",k):D(k,h,P.l,w);break}}if(h)return x;var H=w?O.future:O.past;return typeof H=="function"?H(x):H.replace("%s",x)},s.to=function(d,h){return c(d,h,this,!0)},s.from=function(d,h){return c(d,h,this)};var u=function(d){return d.$u?o.utc():o()};s.toNow=function(d){return this.to(u(this),d)},s.fromNow=function(d){return this.from(u(this),d)}}})})(rT);var aJ=rT.exports;const lJ=$r(aJ);Wr.extend(lJ);function oT(e){const t=L.useRecordContext(e),[n]=L.useLocaleState(),r=T.useMemo(()=>Wr(ht.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return p.jsxs(p.Fragment,{children:[p.jsx(L.DateField,{record:t,source:e.source,showTime:!0}),p.jsx("br",{}),p.jsx(A.Typography,{variant:"caption",color:"textSecondary",children:r})]})}const cJ=fe(L.DateField,{slot:"Root"})(()=>({}));function uJ({variant:e="body1",...t}){return p.jsx(cJ,{...t,variant:e})}const dJ=fe(L.EmailField,{slot:"Root"})(()=>({}));function fJ({variant:e="body1",...t}){return p.jsx(dJ,{...t,variant:e})}const pJ=fe(L.FileField,{slot:"root"})(()=>({}));function iT({...e}){const t=L.useRecordContext(e),n=T.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=ht.get(t,`_${e==null?void 0:e.source}`,ht.get(t,e==null?void 0:e.source)),s=ht.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),a=document.createElement("a");a.href=o,a.download=s,a.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return p.jsx(pJ,{...e,record:t,onClick:n})}function hJ({variant:e="body1",...t}){return p.jsx(L.FunctionField,{...t,variant:e})}const gJ=fe(L.TextField,{slot:"Root"})(()=>({}));function sT({variant:e="body1",...t}){return p.jsx(gJ,{...t,variant:e})}function mJ(e){const t=A.useTheme(),n=re.useLocales(),{source:r=""}=e,s=re.useRecordContext(e)[r],a=!Yu(s,n),c=Tr(e,{flex:1}),[u]=re.useLocaleState(),d=T.useMemo(()=>a?p.jsx(qe.FlagFilled,{style:{color:t.palette.warning.main}}):p.jsx(qe.FlagOutlined,{}),[a,t.palette.warning.main]),h=T.useMemo(()=>p.jsx(A.Stack,{children:Z.map(n,(g,m)=>p.jsx(A.Typography,{children:`${g.locale.toUpperCase()}: ${(s??{})[g.locale]??""}`},m))}),[s,n]);return p.jsx(Cm,{title:h,arrow:!1,children:p.jsxs(A.Stack,{alignItems:"center",direction:"row",gap:1,children:[d,p.jsx(sT,{...e,source:`${r}.${u}`,sx:c})]})})}const vJ=fe("div")(({theme:e,fullWidth:t})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:t?"100%":"auto",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}}));function yJ({source:e,defaultValue:t="&nbsp;",...n}){const r=L.useRecordContext(n),o=ht.get(r,e,t);return p.jsx(A.Typography,{...n,dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})}function bJ({title:e,children:t}){return t==null?null:typeof e=="string"||e===!0?p.jsx(A.Tooltip,{title:e,placement:"top",children:t}):t}function xJ({label:e,source:t,defaultValue:n="&nbsp;",children:r=p.jsx(yJ,{source:"",defaultValue:void 0,record:void 0}),tooltip:o,...s}){const a=T.Children.only(r),{getCurrentDialog:c}=Q2(),u=L.useRecordContext(s),d=L.useResourceContext(s),h=c(),g=T.useMemo(()=>o===!1?!1:typeof o=="function"?o(u):typeof o=="string"?ht.get(u,o,o):o,[u,o]),m=Tr(s,{width:s!=null&&s.fullWidth?"100%":"auto"});return p.jsx(bJ,{title:g,children:p.jsxs(p.Fragment,{children:[p.jsx(A.InputLabel,{sx:{pt:1},children:p.jsx(L.FieldTitle,{label:e,source:t,resource:h||d})}),p.jsx(vJ,{...s,children:T.isValidElement(a)?T.cloneElement(a,{...a.props,source:t,record:u,defaultValue:n,resource:h||d,sx:m}):null})]})})}function CJ({children:e=null,className:t=""}){return p.jsx("div",{className:t,children:e})}const wJ=Sl(CJ,{slot:"root"})(({theme:e,bulkActionButtons:t})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,"&>div:first-of-type":{alignItems:"center","& form":{padding:e.spacing(2.5)},"& .MuiToolbar-root":{alignItems:"center",padding:"0 !important",marginTop:e.spacing(1),[e.breakpoints.up("sm")]:{marginLeft:e.spacing(2),marginRight:e.spacing(2),width:`calc(100% - ${e.spacing(4)})`},[e.breakpoints.down("md")]:{marginTop:0,display:"contents"}}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:t===!1?0:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 26px)"},"& .RaBulkActionsToolbar-toolbar":{borderRadius:0,"& > .RaBulkActionsToolbar-title":{alignItems:"center"},[e.breakpoints.down("sm")]:{paddingLeft:e.spacing(3)}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`}},"& .MuiTablePagination-toolbar":{marginTop:"0 !important",marginBottom:"0 !important"},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0}}));function aT(e){return p.jsx(wJ,{...e,children:p.jsx(L.ReferenceManyField,{pagination:p.jsx(L.Pagination,{}),...e})})}function AJ({source:e,...t}){const n=L.useRecordContext(t),r=ht.get(n,e,0),o=r/1024,s=o/1024,a=s/1024,c=a>1?`${a.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return p.jsx(A.Typography,{component:"span",variant:"body1",...t,children:c})}function pn({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:s,divider:a=!1,...c}){const u=Ut(),{getCurrentDialog:d}=s0(),{source:h,resource:g,isRequired:m}=c,{fieldState:{invalid:v}}=L.useInput(c),b=d();return p.jsxs(A.Stack,{spacing:1,sx:{width:c!=null&&c.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:v?u.palette.error.main:u.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&p.jsx(A.InputLabel,{error:v===!0,sx:{borderBottom:a?`1px solid ${u.palette.divider}`:"none",pt:.5,pb:a?1:0,mt:a?1:0},children:p.jsx(L.FieldTitle,{label:e,source:h,resource:b||g,isRequired:m})}),T.isValidElement(t)?T.cloneElement(t,{...t.props,...c,label:n==="legend"?e:!1}):t,n==="label"&&r?p.jsx(A.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:v===!0,children:r}):null]})}function SJ(e){return e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{}}const TJ=fe(L.FileInput,{slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...SJ(e)}));function EJ({children:e=p.jsx(eT,{title:"name",source:"path"}),multiple:t=!0,disabled:n=!1,type:r="attachment",...o}){const s=L.useRecordContext(o),a=o==null?void 0:o.source,c=s==null?void 0:s.id;return L.useInput({source:`__${r}__${o==null?void 0:o.source}`,defaultValue:o==null?void 0:o.source}),p.jsx(pn,{...o,disabled:n,children:p.jsx(TJ,{type:r,multiple:t,disabled:n,children:T.cloneElement(e,{...e.props,entityId:c,property:a})})})}const IJ=fe(L.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall:has(.MuiChip-root)":{paddingBottom:"4px"},"& .MuiAutocomplete-tag":{margin:"0px 4px 4px 0px"}}));function OJ({size:e="small",...t}){return p.jsx(pn,{...t,children:p.jsx(IJ,{size:e})})}const PJ=fe(L.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"}}));function jJ({size:e="small",...t}){const{perPage:n,...r}=t;return p.jsx(pn,{...r,children:p.jsx(PJ,{size:e})})}const RJ=fe(L.BooleanInput,{slot:"Root"})(()=>({marginTop:"0 !important"}));function MJ({...e}){const t=Zt.useTheme();return p.jsx(pn,{...e,children:p.jsx(RJ,{sx:{"& .MuiFormControlLabel-root":{marginLeft:"0 !important",marginRight:"0 !important"},"& .MuiSwitch-root":{margin:"0 !important",marginTop:e.display==="legend"?0:`${t.spacing(1)} !important`}}})})}const kJ=fe(L.DateInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function DJ(e){return p.jsx(pn,{...e,children:p.jsx(kJ,{})})}const FJ=fe(L.DateTimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function LJ(e){return p.jsx(pn,{...e,children:p.jsx(FJ,{})})}const _J=fe(L.FileInput,{slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}}));function BJ({children:e=p.jsx(iT,{source:"",title:""}),title:t,...n}){const r=Ar.useWatch({name:n.source}),o=L.useRecordContext(n),{source:s}=n,a=T.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const c=ht.get(o,s);if(c){const u=c.split("__");return u.length>0?u[u.length-1]:c}return c},[o,s,r]);return p.jsx(pn,{...n,children:p.jsx(_J,{children:T.cloneElement(e,{...e.props,title:t||s,source:s,record:{...o,[s]:(r==null?void 0:r.title)||ht.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||ht.get(o,`_${s}`),[t||s]:a}})})})}function NJ({children:e=p.jsx(nT,{}),title:t,multiple:n=!1,...r}){const o=Ar.useWatch({name:r.source}),s=L.useRecordContext(r),{source:a}=r;return L.useInput({source:`__image__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),p.jsx(pn,{...r,multiple:n,children:p.jsx(L.ImageInput,{accept:"image/*",children:T.cloneElement(e,{...e.props,title:t,source:a,record:{...s,[a]:(o==null?void 0:o.title)||ht.get(s,a),[`_${a}`]:(o==null?void 0:o.src)||ht.get(s,`_${a}`)}})})})}function wr(e){return p.jsx(pn,{...e,children:p.jsx(L.TextInput,{})})}const VJ={vertical:"bottom",horizontal:"right"},WJ={vertical:"top",horizontal:"right"};function $J({requiredAtLeastOneLocale:e,requiredLocale:t,validate:n,required:r,...o}){const{source:s}=o,a=re.useLocales(),c=T.useCallback((k="ra.validation.required",D="ra.validation.required_locale")=>H=>{if(e&&!t&&!W2(H,a))return k;if(t&&(!Z.has(H,t)||Z.isEmpty(Z.get(H,t))))return{message:D,args:{locale:t}};if(!e&&r&&!Yu(H,a))return k},[e,t,a,r]),u=T.useMemo(()=>re.composeValidators(n,c()),[n,c]),{fieldState:d}=re.useInput({...o,validate:u}),{error:h}=d,g=Ar.useWatch({name:s}),m=!Yu(g,a),[v]=re.useLocaleState(),[b,x]=T.useState(v),[w,O]=T.useState(null),M=!!w,E=T.useCallback(k=>O(M?null:k.currentTarget),[M,O]),R=T.useCallback(()=>O(null),[O]),P=T.useMemo(()=>Z.map(a,(k,D)=>p.jsx(A.MenuItem,{onClick:()=>{x(k.locale),R()},children:p.jsx(A.ListItemText,{primary:`${k.locale.toUpperCase()}: ${(g??{})[k.locale]??""}`})},D)),[a,x,R,g]);return p.jsx(pn,{...o,validate:u,helperText:h!=null&&h.message?p.jsx(re.ValidationError,{error:h==null?void 0:h.message}):o==null?void 0:o.helperText,children:p.jsx(p.Fragment,{children:p.jsxs(A.Box,{flex:1,children:[Z.map(a,(k,D)=>p.jsx(wr,{...o,source:`${s}.${k.locale}`,sx:{width:"100%",display:k.locale===b?"inline-flex":"none"},label:!1,helperText:!1,required:!1,InputProps:{endAdornment:p.jsx(A.Chip,{label:p.jsx(A.Typography,{variant:"button",children:b}),size:"small",onClick:E,color:m?"warning":void 0})}},D)),p.jsx(A.Menu,{anchorEl:w,open:M,anchorOrigin:VJ,transformOrigin:WJ,onClose:R,children:P})]})})})}const zJ=fe(L.NumberInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function UJ(e){return p.jsx(pn,{...e,children:p.jsx(zJ,{})})}function HJ({source:e,minWidth:t=300,children:n}){const r=L.useResourceContext(),o=L.useRecordContext(),[s,a]=T.useState(ht.get(o,e,"")),[c,u]=T.useState(!1),d=T.useCallback(b=>a(b.target.value),[]),h=L.useDataProvider(),g=T.useCallback(b=>{b.key==="Enter"&&(u(!0),h.update(r,{id:o.id,data:{...o,[e]:s,_changed:e},previousData:o}).then(()=>u(!1)))},[s,h,r,o,e]),m=T.useCallback(()=>{ht.get(o,e)!==s&&(u(!0),h.update(r,{id:o.id,data:{...o,[e]:s,_changed:e},previousData:o}).then(()=>u(!1)))},[s,h,r,e,o]),v=T.useCallback(b=>{u(!0),h.update(r,{id:o.id,data:{...o,[e]:b,_changed:e},previousData:o}).then(()=>u(!1))},[h,r,e,o]);return T.useEffect(()=>a(ht.get(o,e)),[o,e]),n?T.cloneElement(n,{...n.props,source:e,value:s,onChange:v}):p.jsx(A.TextField,{value:s,disabled:c,onChange:d,onKeyPress:g,onBlur:m,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})}function GJ({children:e,...t}){const n=T.Children.only(e);return p.jsx(L.ReferenceArrayInput,{...t,children:T.cloneElement(n,{...t,source:n.props.source||t.source})})}function YJ({children:e,...t}){const n=T.Children.only(e);return p.jsx(L.ReferenceInput,{...t,children:T.cloneElement(n,{...t,source:n.props.source||t.source})})}function qJ({reference:e,target:t,children:n,filters:r,actions:o,...s}){return p.jsx(L.ResourceContextProvider,{value:e,children:p.jsx(aT,{perPage:5,pagination:p.jsx(L.Pagination,{}),...s,reference:e,target:t,children:p.jsxs(p.Fragment,{children:[p.jsx(L.ListToolbar,{filters:r,actions:o}),n]})})})}const KJ=fe(L.SearchInput,{slot:"root"})(()=>({}));function XJ(e){return p.jsx(KJ,{...e})}const ZJ=fe(L.SelectArrayInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiFormLabel-root.MuiInputLabel-root":{marginTop:"-3px"},"& .MuiInputLabel-root.MuiInputLabel-shrink":{marginTop:0},"& .MuiOutlinedInput-input:has(.MuiChip-root)":{paddingTop:"4px",paddingBottom:"6px",paddingLeft:"6px"}}));function QJ({optionText:e="name",optionValue:t="id",...n}){return p.jsx(pn,{...n,children:p.jsx(ZJ,{optionText:e,optionValue:t,options:{autoWidth:!1}})})}const JJ=fe(L.SelectInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1||e===null?0:"auto"}}));function eee(e){return p.jsx(pn,{...e,children:p.jsx(JJ,{})})}function tee({multiline:e=!1,...t}){var u,d;const n=L.useTranslate(),r=L.maxLength(t==null?void 0:t.maxLength,"app.input.max_length_error"),o=(d=(u=Ar.useController({name:t==null?void 0:t.source}))==null?void 0:u.field)==null?void 0:d.value;let s=t.helperText,a=t.validate;a?Array.isArray(a)&&a.indexOf(r)===-1&&a.push(r):a=[r];const c=n("app.input.max_length_info",{count:(o==null?void 0:o.length)||0,max:t==null?void 0:t.maxLength});return t!=null&&t.maxLength&&(s=s&&s.length>0?`${c} - ${n(s)}`:c),p.jsx(wr,{...t,validate:a,helperText:s,multiline:e,inputProps:{maxLength:t==null?void 0:t.maxLength}})}function nee(e){if(!e)return"";const t=U2(e);return t?t.format("HH:mm"):""}function ree(e){return e}const oee=fe(L.TimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function iee({parse:e=ree,format:t=nee,...n}){return p.jsx(pn,{...n,children:p.jsx(oee,{parse:e,format:t,...n})})}function a0({onSuccess:e,firstAccess:t}){const{spacing:n}=Pn(),[r,o]=T.useState(!1),s=re.useAuthProvider(),a=re.useTranslate(),c=re.useNotify(),u=T.useCallback(d=>{const{oldPassword:h,newPassword:g}=d;o(!0),s==null||s.changePassword(h,g).then(()=>{c("ra.auth.password_changed"),e()}).catch(m=>{c((m==null?void 0:m.message)||(m==null?void 0:m.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e,c]);return p.jsx(re.ResourceContextProvider,{value:"user/change-password",children:p.jsx(re.EditContextProvider,{value:{record:{},resource:"user/change-password",save:u},children:p.jsx(K2,{onSubmit:u,toolbar:p.jsx(Wi,{children:p.jsx(L.SaveButton,{disabled:r})}),children:p.jsxs(A.Grid,{container:!0,spacing:n,children:[t===!0&&p.jsx(A.Grid,{item:!0,xs:12,children:p.jsxs(A.Alert,{severity:"warning",children:[p.jsx(A.AlertTitle,{children:a("ra.auth.first_access.change_password")}),a("ra.auth.first_access.change_password_helper")]})}),p.jsx(A.Grid,{item:!0,xs:12,children:p.jsx(wr,{source:"oldPassword",type:"password",validate:re.required()})}),p.jsx(A.Grid,{item:!0,xs:12,children:p.jsx(wr,{source:"newPassword",type:"password",validate:re.required()})})]})})})})}const lT=T.createContext({});function see(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=L.useResourceContext(),o=L.useDataProvider(),{search:s}=Pi.useLocation(),a=`${r}/new`,c=T.useCallback(()=>{if(!t||!Z.isFunction(o.get))return Promise.resolve({});const m={};return new URLSearchParams(s??"").forEach((v,b)=>{m[b]=v}),o.get(a,m).then(v=>v.data).then(v=>{const{responseCode:b,value:x}=v;return b==="ok"?x:Promise.reject(v)})},[t,s,o,a]),u=T.useMemo(()=>Z.chain(n).extend({queryKey:[r,s],queryFn:c}).value(),[r,s,c,n]),{data:d,isLoading:h}=Es.useQuery(u),g=Z.omit(e,["useDefaults"]);return h?p.jsx(A.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:p.jsx(A.CircularProgress,{})}):p.jsx(lT.Provider,{value:d??{},children:p.jsx(L.Create,{...g,children:e.children})})}const aee=fe(see,{slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main":{marginTop:0},"& .RaCreate-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaCreate-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaCreate-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}}));function lee(){return T.useContext(lT)}const cee=fe(L.Edit,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-card":{[e.breakpoints.down("sm")]:{marginBottom:e.spacing(6)}},"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaEdit-main":{marginTop:0},"& .RaEdit-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaEdit-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}}));function uee(e){return p.jsx(cee,{...e})}const dee=fe(A.CardHeader)(({theme:e})=>({marginTop:e.spacing(2.5),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),fee=fe(A.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`}));function pee({title:e,divider:t=!0,variant:n="h5"}){const r=L.useTranslate();return p.jsxs(p.Fragment,{children:[p.jsx(dee,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t?p.jsx(fee,{}):null]})}function Hh(e){return e.id??e.label}function cT(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function hee(e){return Z.map(e,"id")}function qu(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function uT(e,t){const n=e!==void 0?qu(e):0;return Z.chain(t).filter(o=>e!==void 0?cT(e,o.id):!0).filter(o=>qu(o.id)===n+1).value()}function gee(e,t){var s;const n=Z.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return Z.extend(n,{formRootPath:o});case"setSyncWithLocation":return Z.extend(n,{syncWithLocation:o});case"setErrorCount":return Z.extend(n,{errorCount:o});case"setActiveItem":return Z.includes(hee(e.items),o)?Z.extend(n,{activeItem:o}):n;case"addItem":{const{id:a}=o;return Z.extend(n,{items:Z.chain(n.items).clone().reject(c=>c.id===a).concat([o]).orderBy(c=>c.index).value()})}case"removeItem":{const a=Z.isString(o)?o:o.id,c=Z.chain(n.items).clone().reject(u=>u.id===a).value();return Z.extend(n,{items:c}),n.activeItem===a&&Z.extend(n,{activeItem:((s=Z.first(c))==null?void 0:s.id)??void 0}),n}default:return n}}const mee={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},dT=T.createContext(void 0);function fT(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=Pi.useLocation(),[s,a]=T.useReducer(gee,Z.cloneDeep(mee)),{formRootPath:c,items:u}=s,d=T.useMemo(()=>({state:s,dispatch:a}),[s,a]);return T.useEffect(()=>{const h=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&h.push(r);const g=Z.chain(h).map(v=>Pi.matchPath(v,o)).reject(v=>v===null).first().value(),m=g==null?void 0:g.pathnameBase;m!==void 0&&m!==c&&a({type:"setFormRootPath",payload:m})},[o,c,r]),T.useEffect(()=>{a({type:"setSyncWithLocation",payload:!!t})},[t,a]),T.useEffect(()=>{a({type:"setErrorCount",payload:!!n})},[n,a]),T.useEffect(()=>{var h;if(t&&c!==void 0){let g=o.replace(c,"").replace(new RegExp(/^\/?/),"");Z.isEmpty(g)&&(g=((h=Z.chain(u).filter(m=>uT(m.id,u).length===0).orderBy([m=>qu(m.id),m=>m.index]).first().value())==null?void 0:h.id)??void 0),a({type:"setActiveItem",payload:g})}},[a,c,o,u,t]),p.jsx(dT.Provider,{value:d,children:e.children})}function pT(){const e=T.useContext(dT);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function jl(){return pT().state}function l0(){return pT().dispatch}function hT(){return jl().formRootPath}function gT(){return jl().activeItem}function mT(){return jl().items}function vT(){return jl().syncWithLocation}function yT(){return jl().errorCount}function bT(){const e=l0();return T.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function xT(){const e=l0();return T.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function CT(){const e=l0();return T.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}const vee=fe(A.Grid,{name:"LongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root.RaToolbar-desktopToolbar":{marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,paddingTop:e.spacing(2.5),paddingBottom:e.spacing(2.5),[e.breakpoints.down("sm")]:{width:"auto !important",marginRight:0}},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingLeft:"0 !important",paddingRight:"0 !important",paddingBottom:"0 !important"},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function wT(e){const{spacing:t}=Pn(),{spacing:n=t}=e,r=Z.omit(e,["spacing"]);return p.jsx(L.Form,{...r,className:"LongFormView",children:p.jsx(vee,{container:!0,spacing:n*2,children:e.children})})}function AT(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=Z.omit(e,["disposition"]);return p.jsx(A.Grid,{...n,item:!0,...t,children:e.children})}function ST(e){const t=gT();return t===void 0?!1:e===t||cT(e,t)}function TT(e){const t=mT();return T.useMemo(()=>uT(e,t),[t,e])}function yee(){const e=hT(),{search:t}=Pi.useLocation(),n=Pi.useNavigate();return T.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n,t])}function ET(){const e=TT();return p.jsx(A.Card,{variant:"outlined",children:p.jsx(A.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:Z.map(e,(t,n)=>p.jsx(c0,{...t},n))})})}function c0(e){const t=re.useTranslate()??Z.identity,n=IT(e),{selected:r,label:o,icon:s,onClick:a,badge:c,items:u,isGroup:d,level:h,errors:g=0}=n,{spacing:m}=Pn(),[v,b]=T.useState(r),x=T.useCallback(M=>{b(!v),a(M)},[a,v]),w=s!==void 0,O=Z.omit(e,["label","icon","selected","badge"]);return T.useEffect(()=>{r&&!v&&b(r)},[r,v,b]),p.jsxs(p.Fragment,{children:[p.jsx(A.ListItem,{...O,disablePadding:!0,children:p.jsxs(A.ListItemButton,{selected:r?!d:null,onClick:x,sx:{pl:m*h},children:[w?p.jsx(A.ListItemIcon,{children:s}):null,p.jsx(A.ListItemText,{inset:!w,primary:g===0?t(o):p.jsx(A.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),c?p.jsx(A.ListItemAvatar,{children:p.jsx(Ou,{type:"filled",size:"xs",color:c.color??"default",children:c.content})}):null,d?v?p.jsx(Vn.ExpandLess,{}):p.jsx(Vn.ExpandMore,{}):null]})}),d?p.jsx(A.Collapse,{in:v,timeout:"auto",children:p.jsx(A.List,{children:Z.map(u,(M,E)=>p.jsx(c0,{...M},E))})}):null]})}function IT(e){const{id:t}=e,n=ST(t),r=qu(t),o=yee(),s=vT(),a=bT(),c=TT(t),u=!Z.isEmpty(c),d=T.useCallback(g=>{u||(s?o(e.id):a(e.id)),Z.isFunction(e.onClick)&&e.onClick(g)},[a,o,e,s,u]);return T.useMemo(()=>({...e,selected:n,onClick:d,items:c,isGroup:u,level:r}),[e,n,d,c,u,r])}var bee=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},OT=e=>e.firstChild?e.firstChild.offsetParent===e:!0,xee=(e,t)=>{let n=e,r=0;OT(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},Cee=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},sl=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?sl="sticky":CSS.supports("position","-webkit-sticky")&&(sl="-webkit-sticky"));var Ku=!1;try{const e=Object.defineProperty({},"passive",{get(){Ku={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var Hp=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),a=o(s()),c=()=>{Object.assign(a,o(s())),n()};return window.addEventListener("resize",c,Ku),r.push(()=>window.removeEventListener("resize",c)),a}else{const s=o(t.getBoundingClientRect()),a=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},c=new ResizeObserver(a);return c.observe(t),r.push(()=>c.disconnect()),s}},wee=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},Aee=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,a=bee(e);let c=!1;const u=()=>{c||requestAnimationFrame(()=>{const D=g();D!==E&&R(D),c=!1}),c=!0};let d=a===window?window.scrollY:a.scrollTop;const h=D=>{const{offsetTop:H,height:Y}=v,{naturalTop:ee}=w,{height:z}=O;return D+H+Y>=ee+z+M+o},g=()=>{const{height:D}=v,{height:H}=O;return H+s+o<=D?3:h(d)?1:2},m=a!==window&&OT(a),v=Hp({el:a,onChange:u,unsubs:t,measure:({height:D,top:H})=>({height:D,offsetTop:m?H:0})}),b=Cee(e),x=b===window?{top:0,bottom:0}:wee(b),w=Hp({el:b,onChange:u,unsubs:t,measure:({height:D})=>({height:D-x.top-x.bottom,naturalTop:b===window?0:xee(b,a)+x.top+v.offsetTop})}),O=Hp({el:e,onChange:u,unsubs:t,measure:({height:D})=>({height:D})});let M=0,E=g();const R=D=>{const H=E;if(E=D,H===2&&(M=-1),D===3){e.style.position=sl,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:Y,offsetTop:ee}=v,{height:z,naturalTop:se}=w,{height:ae}=O;if(D===2)if(e.style.position="relative",M=H===0?Math.max(0,ee+d-se+s):Math.max(0,ee+d+Y-(se+ae+o)),r){const X=Math.max(0,z-ae-M);e.style.bottom=`${X}px`}else e.style.top=`${M}px`;else e.style.position=sl,D===1?r?e.style.bottom=`${o}px`:e.style.top=`${Y-ae-o}px`:r?e.style.bottom=`${Y-ae-o}px`:e.style.top=`${s}px`};R(E);const P=D=>{if(D===d)return;const H=D-d;if(d=D,E===3)return;const{offsetTop:Y,height:ee}=v,{naturalTop:z,height:se}=w,{height:ae}=O;if(H>0)if(E===0){if(D+Y+s>z){const X=Math.max(0,Y+d-z+s);D+Y+ee<=z+ae+X+o?R(2):R(1)}}else E===2&&h(D)&&R(1);else if(E===1){if(Y+D+ee<z+se+o){const X=Math.max(0,Y+d+ee-(z+ae+o));Y+D+s>=z+X?R(2):R(0)}}else E===2&&Y+D+s<z+M&&R(0)},k=a===window?()=>P(window.scrollY):()=>P(a.scrollTop);a.addEventListener("scroll",k,Ku),a.addEventListener("mousewheel",k,Ku),t.push(()=>a.removeEventListener("scroll",k),()=>a.removeEventListener("mousewheel",k))},See=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=T.useState(null);return T.useEffect(()=>{if(!r||!sl)return;const s=[];return Aee(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(a=>a())}},[r,t,e,n]),o},Tee=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:a}=e,c=See({offsetTop:t,offsetBottom:n,bottom:r});return p.jsx("div",{className:s,style:a,ref:c,children:o})},Eee=Tee,PT=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(PT||{});function jT(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=Z.omit(e,["sticky","disposition","spacing"]),s=t?Eee:A.Box,a=T.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return p.jsx(A.Grid,{...o,item:!0,...n,children:p.jsx(s,{...a,children:p.jsx(A.Stack,{spacing:r,children:e.children})})})}function RT(e){return p.jsx(p.Fragment,{children:e.children})}function MT(e){const{children:t}=e;return T.useMemo(()=>{const r={top:[],bottom:[]};return T.Children.forEach(t,o=>{if(T.isValidElement(o)&&(o==null?void 0:o.type)===RT){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function kT(e=[],t){const n=Z.isArray(e)?e:[e],r=Z.filter(n,o=>T.isValidElement(o));Z.each(r,o=>{var s;t(o),kT(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}function DT(e){const{errors:t}=Ar.useFormState(),n=yT(),{label:r,icon:o,badge:s,index:a=0,children:c}=e,u=Hh(e),d=xT(),h=CT(),g=ST(u),m=[];n&&(e.sources!==void 0?m.push(...e.sources):kT(c,b=>{var x;((x=b==null?void 0:b.props)==null?void 0:x.source)!==void 0&&m.push(b.props.source)}));const v=Z.chain(m).uniq().map(b=>Z.get(t,b)).reject(b=>b===void 0).value().length;return T.useEffect(()=>{d({id:u,index:a,label:r,icon:o,badge:s,errors:v})},[d,h,r,o,u,s,a,v]),T.useEffect(()=>()=>{h(u)},[u,h]),p.jsx(A.Box,{display:g?"unset":"none",children:e.children})}function FT(e){const t=u0(e),n=Hh(e);return p.jsx(DT,{...e,id:n,children:T.Children.map(t,r=>{const o=Hh(r.props);return T.cloneElement(r,{id:`${n}.${o}`})})})}function LT(e){return p.jsx(DT,{...e})}function u0(e){const{children:t}=e;return T.useMemo(()=>Z.chain(T.Children.toArray(t)).filter(r=>T.isValidElement(r)&&((r==null?void 0:r.type)===LT||(r==null?void 0:r.type)===FT)).map((r,o)=>T.cloneElement(r,{index:o})).value(),[t])}function Iee(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=Z.pick(e,["syncWithLocation","errorCount"]),s=Z.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:a,bottom:c}=MT(e),u=u0(e);return p.jsx(fT,{...o,children:p.jsxs(wT,{...s,spacing:r,children:[p.jsxs(jT,{disposition:t,spacing:r,children:[a,p.jsx(ET,{}),c]}),p.jsx(AT,{disposition:n,children:u})]})})}const kt=Iee;kt.BaseForm=wT;kt.Content=AT;kt.Provider=fT;kt.useItems=mT;kt.useSyncWithLocation=vT;kt.useErrorCount=yT;kt.useFormRootPath=hT;kt.useActiveItem=gT;kt.useSetActiveItem=bT;kt.useAddItem=xT;kt.useRemoveItem=CT;kt.Sidebar=jT;kt.SidebarSection=RT;kt.SidebarSectionPosition=PT;kt.useSidebarChildren=MT;kt.NavMenu=ET;kt.NavMenuItem=c0;kt.useNavMenuItem=IT;kt.Tab=LT;kt.Group=FT;kt.useBaseItemChildren=u0;const Oee=fe(L.Show,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaShow-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaShow-main>.MuiPaper-root:first-of-type":{overflow:"visible"}}));function Pee(e){return p.jsx(Oee,{...e})}const jee=fe(L.SimpleFormIterator,{root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}}));function Ree(e){return p.jsx(jee,{...e})}const Mee=Sl(L.TabbedForm,{slot:"Root"})(({theme:e})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:0},[e.breakpoints.down("sm")]:{paddingBottom:0,"& .MuiTableContainer-root":{paddingBottom:e.spacing(1)}}}));function kee({children:e}){return p.jsx(p.Fragment,{children:e})}function d0(e){const{title:t,modal:n,content:r,subheader:o,secondary:s=p.jsx(Fi,{children:p.jsx(L.DeleteWithConfirmButton,{})}),sx:a,noPadding:c,toolbar:u=p.jsx(Wi,{children:p.jsx(L.SaveButton,{type:"button"})}),...d}=e,h=r0(t),g=A.useTheme();return p.jsx(Cr,{title:h,modal:n,content:r,subheader:o,secondary:s,sx:{...a,"& .MuiTabs-root":{m:2.5,mb:0},"& .tabbed-form > .MuiDivider-root":{ml:2.5,mr:2.5},"& .MuiToolbar-root.RaToolbar-desktopToolbar":{paddingTop:n?g.spacing(2.5):0},"& .MuiToolbar-root":{padding:g.spacing(2.5),borderTop:n?`1px solid ${g.palette.divider}`:void 0}},border:!n,divider:!0,children:p.jsx(Mee,{toolbar:u,component:c?kee:void 0,...d})})}function Dee({children:e,...t}){return p.jsx(L.TabbedForm.Tab,{...t,children:p.jsx(A.Box,{sx:{width:"100%",p:2.5},children:e})})}d0.Tab=L.TabbedForm.Tab;d0.TabStack=Dee;const f0=T.createContext(void 0);function _T(){return T.useContext(f0)}const p0=T.createContext(void 0);function Fee(){return T.useContext(p0)}const BT=_.forwardRef((e,t)=>{const{children:n,disabled:r,disableRemove:o=!1,index:s,member:a,resource:c}=e,u=L.useTranslate(),[d,h]=_.useState(!1),{total:g,remove:m}=_T(),v=_.useCallback(()=>{h(!1),m(s)},[s,m]),b=T.useMemo(()=>({index:s,total:g,remove:()=>m(s)}),[s,g,m]);return p.jsxs(p0.Provider,{value:b,children:[T.Children.map(n,(x,w)=>{if(!T.isValidElement(x))return null;const{source:O,...M}=x.props;return p.jsx(A.TableCell,{children:T.cloneElement(x,{source:O?`${a}.${O}`:a,index:O?void 0:w,resource:c,disabled:r,...M,label:""})})}),!o&&p.jsx(A.TableCell,{children:p.jsx(A.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:p.jsx(Fi,{horizontal:!0,children:p.jsx(A.Typography,{color:"error",onClick:()=>h(!0),children:u("ra.action.delete")})})})}),n.length>0&&p.jsx(L.Confirm,{isOpen:d,title:u("ra.action.remove_item"),content:u("ra.message.remove_item"),onConfirm:v,onClose:()=>h(!1)})]})});function Lee(e){var V,te;const{children:t,resource:n,source:r,label:o,disableAdd:s=!1,disableRemove:a=!1,enableClearAll:c=!1,className:u,empty:d,template:h={},inset:g}=e,[m,v]=T.useState(!1),{fields:b,remove:x,replace:w,append:O}=L.useArrayInput(e),{resetField:M}=Ar.useFormContext(),E=Ut(),R=re.useTranslate(),P=re.useRecordContext(e),k=T.useRef(h||{}),D=re.useTranslateLabel(),H=T.useCallback(N=>{x(N)},[x]);if(b.length>0){const{...N}=b[0];k.current=N;for(const J in k.current)k.current[J]=null}const Y=T.useCallback((N=void 0)=>{let J=N;N==null&&(J=k.current,T.Children.count(t)===1&&_.isValidElement(T.Children.only(t))&&!T.Children.only(t).props.source&&T.Children.map(t,G=>_.isValidElement(G)&&G.type!==re.FormDataConsumer).some(Boolean)?J="":(J=J||{},T.Children.forEach(t,G=>{_.isValidElement(G)&&G.type!==re.FormDataConsumer&&G.props.source&&(J[G.props.source]=G.props.defaultValue??null)})));const W={...J,...h};O(W),M(`${r}.${b.length}`,{defaultValue:J})},[O,t,M,r,b.length,h]);function ee(N){return J=>{Y(),N&&N(J)}}const z=T.useCallback(()=>{w([]),v(!1)},[w]),se=kK(P,r),ae=T.useMemo(()=>({total:b.length,remove:H,source:r}),[b.length,H,r]),X=E.palette.mode==="dark"?E.palette.grey.A400:E.palette.grey.A800,K=b.length>0&&c;return b?p.jsx(f0.Provider,{value:ae,children:p.jsxs("div",{className:u,children:[_.cloneElement(p.jsx(_ee,{}),{label:o,source:r,disableAdd:s,template:h,onClick:ee((te=(V=e==null?void 0:e.addButton)==null?void 0:V.props)==null?void 0:te.onClick),inset:g}),p.jsx(A.TableContainer,{component:A.Paper,sx:g===!0?{borderRadius:0}:{mt:2,border:`1px solid ${X}`},children:p.jsxs(A.Table,{size:"small",children:[p.jsx(A.TableHead,{sx:g===!0?{}:{borderTop:0,borderBottom:`1px solid ${X}`},children:p.jsxs(A.TableRow,{children:[T.Children.map(t,(N,J)=>_.isValidElement(N)?p.jsx(A.TableCell,{children:p.jsx(A.Typography,{display:"flex",variant:"subtitle1",color:"text.primary",textTransform:"none",children:D({...N.props,resource:n})})},J):null),!a&&(K?p.jsx(A.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:p.jsx(Fi,{horizontal:!0,children:p.jsx(A.Typography,{color:"error",onClick:()=>v(!0),children:R("ra.action.delete")})})},"actions"):p.jsx(A.TableCell,{},"empty_actions"))]})}),p.jsxs(A.TableBody,{children:[b.length===0&&p.jsx(A.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:p.jsx(A.TableCell,{colSpan:4+(a?0:1),align:"center",children:d||p.jsx(A.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),b.length>0&&b.map((N,J)=>p.jsx(A.TableRow,{sx:{borderBottom:`1px solid ${X}}`},children:p.jsx(BT,{disableRemove:a,index:J,member:`${r}.${J}`,onRemoveField:H,record:se&&se[J]||{},resource:n,source:r,children:t})},N.id))]})]})}),b.length>0&&p.jsx(L.Confirm,{isOpen:m,title:R("ra.action.clear_array_input"),content:R("ra.message.clear_array_input"),onConfirm:z,onClose:()=>v(!1)})]})}):null}function _ee(e){const{label:t,disableAdd:n,onClick:r,inset:o}=e,s=Ut(),a=s.palette.mode==="dark"?s.palette.grey.A400:s.palette.grey.A800,c=s.palette.mode==="light"?"#000000":"#FFFFFF";return p.jsxs(A.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",sx:o?{p:2.5}:{pt:2},children:[t!==!1&&p.jsx(A.Typography,{children:t}),!n&&(_.isValidElement(e==null?void 0:e.addButton)?_.cloneElement(e==null?void 0:e.addButton,{onClick:r}):p.jsx(A.IconButton,{color:"secondary",sx:{border:`1px solid ${a}`},onClick:r,children:p.jsx(qe.PlusCircleOutlined,{style:{color:c}})}))]})}const Bee=fe(Lee,{slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8.25)})`}},[e.breakpoints.down("sm")]:{"& .MuiTableRow-root:last-child":{borderBottom:0}}}));function Nee(e,t){const n=Z.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=Z.chain(n.media).clone().extend(o).value();return Z.extend(n,{media:s})}case"updateDrawer":{const s=Z.chain(n.drawer).clone().extend(o).value();return Z.extend(n,{drawer:s})}case"updateLogo":{const s=Z.chain(n.logo).clone().extend(o).value();return Z.extend(n,{logo:s})}case"updateNotifications":{const s=Z.chain(n.notifications).clone().extend(o).value();return Z.extend(n,{notifications:s})}case"updateTheme":{const s=Z.chain(n.theme).clone().extend(o).value();return Z.extend(n,{theme:s})}default:return n}}const Vee={drawer:{open:!0,width:260,handleDrawerToggle:()=>{}},media:{downMd:!1,downLg:!1,downXl:!1,horizontal:!1},logo:{},notifications:{enable:!0,resource:"entities/notification"},theme:{iconColor:"grey.300",iconColorOpen:"grey.100"}},NT=T.createContext(void 0);function VT(e){var Y;const t=re.useAuthProvider(),n=re.useGetIdentity(),r=A.useTheme(),o=A.useMediaQuery(r.breakpoints.down("md")),s=A.useMediaQuery(r.breakpoints.down("lg")),a=A.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:c,isHorizontalLayout:u,themeDirection:d,drawerWidth:h}=i0(),g=u(d)&&!s,{drawerOpen:m,openDrawer:v}=Ld(),b=T.useCallback(()=>{v(!m)},[m,v]),[x,w]=T.useState(!1),[O,M]=T.useReducer(Nee,Z.chain(Vee).clone().merge({drawer:{open:!c||m}}).value()),E=T.useCallback(()=>w(!1),[]),R=T.useMemo(()=>({state:O,dispatch:M}),[O,M]),{logoIcon:P,logoMain:k,enableNotification:D,notification:H}=e;return T.useEffect(()=>{M({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:a,horizontal:g}})},[o,s,a,g]),T.useEffect(()=>{M({type:"updateDrawer",payload:{open:m,width:h,handleDrawerToggle:b}})},[m,h,b]),T.useEffect(()=>{c||v(!a)},[a,c]),T.useEffect(()=>{M({type:"updateLogo",payload:{main:k,icon:P}})},[P,k]),T.useEffect(()=>{M({type:"updateNotifications",payload:{enable:D,resource:H??"entities/notification"}})},[D,H]),T.useEffect(()=>{M({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),T.useEffect(()=>{if(!t.isImpersonating){console.warn("authProvider does not contain a method called isImpersonating",t);return}t==null||t.isImpersonating().then(ee=>{var z;w(!ee&&((z=n==null?void 0:n.data)==null?void 0:z.needToChangePassword)===!0)})},[(Y=n==null?void 0:n.data)==null?void 0:Y.needToChangePassword,t]),p.jsxs(NT.Provider,{value:R,children:[p.jsx(A.Dialog,{open:x,maxWidth:"xs",fullWidth:!0,children:p.jsx(a0,{onSuccess:E,firstAccess:!0})}),e.children]})}function WT(e){return T.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s,notification:a}=t;return p.jsx(VT,{logoIcon:r,logoMain:o,enableNotification:s,notification:a,children:p.jsx(e,{ref:n,...t})})})}function h0(){const e=T.useContext(NT);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function Wee(){return h0().dispatch}function Js(){return h0().state}function Un(){return Js().media}function $i(){return Js().drawer}function $T(){return Js().logo}function Vd(){return Js().notifications}function $ee(){return Js().theme}function zT(e){const{width:t}=$i(),{horizontal:n}=Un(),{container:r}=Pn(),[o,s]=T.useState(null);function a(u,d){s(d)}const c=Ut();return p.jsx(Nq,{onError:a,fallbackRender:({error:u,resetErrorBoundary:d})=>p.jsx(Ym,{error:u,errorComponent:e.error,errorInfo:o,resetErrorBoundary:d}),children:p.jsx(T.Suspense,{fallback:p.jsx(e2,{}),children:p.jsxs(A.Box,{component:"main",sx:{width:`calc(100% - ${t}px)`,flexGrow:1,p:{xs:0,sm:2,lg:1},pt:{lg:2}},children:[p.jsx(A.Toolbar,{sx:{mt:n?8:"inherit"}})," ",p.jsx(A.Container,{maxWidth:r?"xl":!1,sx:{...r&&{px:{xs:0,sm:2}},position:"relative",minHeight:"calc(100vh - 110px)",display:"flex",flexDirection:"column",[c.breakpoints.down("sm")]:{px:"12px"}},children:e.children})]})})})}const UT=fe(A.Box,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>({...e.mixins.toolbar,display:"flex",alignItems:"center",justifyContent:t?"flex-start":"center",paddingLeft:e.spacing(t?3:0)}));function HT({isIcon:e,sx:t,to:n,logoIcon:r,logoMain:o}){const{appDefaultPath:s}=Pn();return p.jsx(A.ButtonBase,{disableRipple:!0,component:pt.Link,to:n||s,sx:t,children:e?r:o})}function GT(e){const t=A.useTheme(),{horizontal:n}=Un(),{open:r}=$i(),{icon:o,main:s}=$T(),a=Tr(e,{minHeight:n?"unset":"60px",width:n?{xs:"100%",lg:"424px"}:"inherit",paddingTop:n?{xs:"10px",lg:"0"}:"8px",paddingBottom:n?{xs:"18px",lg:"0"}:"8px",paddingLeft:n?{xs:"24px",lg:"0"}:r?"24px":0});return p.jsx(UT,{theme:t,open:r,sx:a,children:p.jsx(HT,{to:"/",isIcon:!r,sx:{width:r?"auto":35,height:35},logoMain:s,logoIcon:o})})}function dC(e,t){return{width:t,borderRight:`1px solid ${e.palette.divider}`,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden",boxShadow:e.palette.mode==="dark"?e.customShadows.z1:"none"}}function fC(e){return{transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:e.spacing(7.5),borderRight:"none",boxShadow:e.customShadows.z1}}const zee=fe(A.Drawer,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=Pn();return{width:n,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",...t&&{...dC(e,n),"& .MuiDrawer-paper":dC(e,n)},...!t&&{...fC(e),"& .MuiDrawer-paper":fC(e)}}});var Ae={},Gh={exports:{}};(function(e,t){(function(n,r){var o="1.0.38",s="",a="?",c="function",u="undefined",d="object",h="string",g="major",m="model",v="name",b="type",x="vendor",w="version",O="architecture",M="console",E="mobile",R="tablet",P="smarttv",k="wearable",D="embedded",H=500,Y="Amazon",ee="Apple",z="ASUS",se="BlackBerry",ae="Browser",X="Chrome",K="Edge",V="Firefox",te="Google",N="Huawei",J="LG",W="Microsoft",G="Motorola",ue="Opera",he="Samsung",de="Sharp",pe="Sony",me="Xiaomi",we="Zebra",be="Facebook",ye="Chromium OS",xe="Mac OS",Oe=function(Pe,_e){var Ee={};for(var Ve in Pe)_e[Ve]&&_e[Ve].length%2===0?Ee[Ve]=_e[Ve].concat(Pe[Ve]):Ee[Ve]=Pe[Ve];return Ee},ce=function(Pe){for(var _e={},Ee=0;Ee<Pe.length;Ee++)_e[Pe[Ee].toUpperCase()]=Pe[Ee];return _e},tt=function(Pe,_e){return typeof Pe===h?ge(_e).indexOf(ge(Pe))!==-1:!1},ge=function(Pe){return Pe.toLowerCase()},at=function(Pe){return typeof Pe===h?Pe.replace(/[^\d\.]/g,s).split(".")[0]:r},Ht=function(Pe,_e){if(typeof Pe===h)return Pe=Pe.replace(/^\s\s*/,s),typeof _e===u?Pe:Pe.substring(0,H)},vt=function(Pe,_e){for(var Ee=0,Ve,Ie,dt,We,Te,Nt;Ee<_e.length&&!Te;){var Ir=_e[Ee],gr=_e[Ee+1];for(Ve=Ie=0;Ve<Ir.length&&!Te&&Ir[Ve];)if(Te=Ir[Ve++].exec(Pe),Te)for(dt=0;dt<gr.length;dt++)Nt=Te[++Ie],We=gr[dt],typeof We===d&&We.length>0?We.length===2?typeof We[1]==c?this[We[0]]=We[1].call(this,Nt):this[We[0]]=We[1]:We.length===3?typeof We[1]===c&&!(We[1].exec&&We[1].test)?this[We[0]]=Nt?We[1].call(this,Nt,We[2]):r:this[We[0]]=Nt?Nt.replace(We[1],We[2]):r:We.length===4&&(this[We[0]]=Nt?We[3].call(this,Nt.replace(We[1],We[2])):r):this[We]=Nt||r;Ee+=2}},Et=function(Pe,_e){for(var Ee in _e)if(typeof _e[Ee]===d&&_e[Ee].length>0){for(var Ve=0;Ve<_e[Ee].length;Ve++)if(tt(_e[Ee][Ve],Pe))return Ee===a?r:Ee}else if(tt(_e[Ee],Pe))return Ee===a?r:Ee;return Pe},Er={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},wt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},yt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[w,[v,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[w,[v,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[v,w],[/opios[\/ ]+([\w\.]+)/i],[w,[v,ue+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[w,[v,ue+" GX"]],[/\bopr\/([\w\.]+)/i],[w,[v,ue]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[w,[v,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[v,w],[/\bddg\/([\w\.]+)/i],[w,[v,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[w,[v,"UC"+ae]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[w,[v,"WeChat"]],[/konqueror\/([\w\.]+)/i],[w,[v,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[w,[v,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[w,[v,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[w,[v,"Smart Lenovo "+ae]],[/(avast|avg)\/([\w\.]+)/i],[[v,/(.+)/,"$1 Secure "+ae],w],[/\bfocus\/([\w\.]+)/i],[w,[v,V+" Focus"]],[/\bopt\/([\w\.]+)/i],[w,[v,ue+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[w,[v,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[w,[v,"Dolphin"]],[/coast\/([\w\.]+)/i],[w,[v,ue+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[w,[v,"MIUI "+ae]],[/fxios\/([-\w\.]+)/i],[w,[v,V]],[/\bqihu|(qi?ho?o?|360)browser/i],[[v,"360 "+ae]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[v,/(.+)/,"$1 "+ae],w],[/samsungbrowser\/([\w\.]+)/i],[w,[v,he+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[v,/_/g," "],w],[/metasr[\/ ]?([\d\.]+)/i],[w,[v,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[v,"Sogou Mobile"],w],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[v,w],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[v],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[v,be],w],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[v,w],[/\bgsa\/([\w\.]+) .*safari\//i],[w,[v,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[w,[v,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[w,[v,X+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[v,X+" WebView"],w],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[w,[v,"Android "+ae]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[v,w],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[w,[v,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[w,v],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[v,[w,Et,Er]],[/(webkit|khtml)\/([\w\.]+)/i],[v,w],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[v,"Netscape"],w],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[w,[v,V+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[v,w],[/(cobalt)\/([\w\.]+)/i],[v,[w,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[O,"amd64"]],[/(ia32(?=;))/i],[[O,ge]],[/((?:i[346]|x)86)[;\)]/i],[[O,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[O,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[O,"armhf"]],[/windows (ce|mobile); ppc;/i],[[O,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[O,/ower/,s,ge]],[/(sun4\w)[;\)]/i],[[O,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[O,ge]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[m,[x,he],[b,R]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[m,[x,he],[b,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[m,[x,ee],[b,E]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[m,[x,ee],[b,R]],[/(macintosh);/i],[m,[x,ee]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[m,[x,de],[b,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[m,[x,N],[b,R]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[m,[x,N],[b,E]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[m,/_/g," "],[x,me],[b,E]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[m,/_/g," "],[x,me],[b,R]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[m,[x,"OPPO"],[b,E]],[/\b(opd2\d{3}a?) bui/i],[m,[x,"OPPO"],[b,R]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[m,[x,"Vivo"],[b,E]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[m,[x,"Realme"],[b,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[m,[x,G],[b,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[m,[x,G],[b,R]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[m,[x,J],[b,R]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[m,[x,J],[b,E]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[m,[x,"Lenovo"],[b,R]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[m,/_/g," "],[x,"Nokia"],[b,E]],[/(pixel c)\b/i],[m,[x,te],[b,R]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[m,[x,te],[b,E]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[m,[x,pe],[b,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[m,"Xperia Tablet"],[x,pe],[b,R]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[m,[x,"OnePlus"],[b,E]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[m,[x,Y],[b,R]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[m,/(.+)/g,"Fire Phone $1"],[x,Y],[b,E]],[/(playbook);[-\w\),; ]+(rim)/i],[m,x,[b,R]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[m,[x,se],[b,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[m,[x,z],[b,R]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[m,[x,z],[b,E]],[/(nexus 9)/i],[m,[x,"HTC"],[b,R]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[x,[m,/_/g," "],[b,E]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[m,[x,"Acer"],[b,R]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[m,[x,"Meizu"],[b,E]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[m,[x,"Ulefone"],[b,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[x,m,[b,E]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[x,m,[b,R]],[/(surface duo)/i],[m,[x,W],[b,R]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[m,[x,"Fairphone"],[b,E]],[/(u304aa)/i],[m,[x,"AT&T"],[b,E]],[/\bsie-(\w*)/i],[m,[x,"Siemens"],[b,E]],[/\b(rct\w+) b/i],[m,[x,"RCA"],[b,R]],[/\b(venue[\d ]{2,7}) b/i],[m,[x,"Dell"],[b,R]],[/\b(q(?:mv|ta)\w+) b/i],[m,[x,"Verizon"],[b,R]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[m,[x,"Barnes & Noble"],[b,R]],[/\b(tm\d{3}\w+) b/i],[m,[x,"NuVision"],[b,R]],[/\b(k88) b/i],[m,[x,"ZTE"],[b,R]],[/\b(nx\d{3}j) b/i],[m,[x,"ZTE"],[b,E]],[/\b(gen\d{3}) b.+49h/i],[m,[x,"Swiss"],[b,E]],[/\b(zur\d{3}) b/i],[m,[x,"Swiss"],[b,R]],[/\b((zeki)?tb.*\b) b/i],[m,[x,"Zeki"],[b,R]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[x,"Dragon Touch"],m,[b,R]],[/\b(ns-?\w{0,9}) b/i],[m,[x,"Insignia"],[b,R]],[/\b((nxa|next)-?\w{0,9}) b/i],[m,[x,"NextBook"],[b,R]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[x,"Voice"],m,[b,E]],[/\b(lvtel\-)?(v1[12]) b/i],[[x,"LvTel"],m,[b,E]],[/\b(ph-1) /i],[m,[x,"Essential"],[b,E]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[m,[x,"Envizen"],[b,R]],[/\b(trio[-\w\. ]+) b/i],[m,[x,"MachSpeed"],[b,R]],[/\btu_(1491) b/i],[m,[x,"Rotor"],[b,R]],[/(shield[\w ]+) b/i],[m,[x,"Nvidia"],[b,R]],[/(sprint) (\w+)/i],[x,m,[b,E]],[/(kin\.[onetw]{3})/i],[[m,/\./g," "],[x,W],[b,E]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[m,[x,we],[b,R]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[m,[x,we],[b,E]],[/smart-tv.+(samsung)/i],[x,[b,P]],[/hbbtv.+maple;(\d+)/i],[[m,/^/,"SmartTV"],[x,he],[b,P]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[x,J],[b,P]],[/(apple) ?tv/i],[x,[m,ee+" TV"],[b,P]],[/crkey/i],[[m,X+"cast"],[x,te],[b,P]],[/droid.+aft(\w+)( bui|\))/i],[m,[x,Y],[b,P]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[m,[x,de],[b,P]],[/(bravia[\w ]+)( bui|\))/i],[m,[x,pe],[b,P]],[/(mitv-\w{5}) bui/i],[m,[x,me],[b,P]],[/Hbbtv.*(technisat) (.*);/i],[x,m,[b,P]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[x,Ht],[m,Ht],[b,P]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[b,P]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[x,m,[b,M]],[/droid.+; (shield) bui/i],[m,[x,"Nvidia"],[b,M]],[/(playstation [345portablevi]+)/i],[m,[x,pe],[b,M]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[m,[x,W],[b,M]],[/((pebble))app/i],[x,m,[b,k]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[m,[x,ee],[b,k]],[/droid.+; (glass) \d/i],[m,[x,te],[b,k]],[/droid.+; (wt63?0{2,3})\)/i],[m,[x,we],[b,k]],[/(quest( \d| pro)?)/i],[m,[x,be],[b,k]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[x,[b,D]],[/(aeobc)\b/i],[m,[x,Y],[b,D]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[m,[b,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[m,[b,R]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,R]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,E]],[/(android[-\w\. ]{0,9});.+buil/i],[m,[x,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[w,[v,K+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[w,[v,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[v,w],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[w,v]],os:[[/microsoft (windows) (vista|xp)/i],[v,w],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[v,[w,Et,wt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[w,Et,wt],[v,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[w,/_/g,"."],[v,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[v,xe],[w,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[w,v],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[v,w],[/\(bb(10);/i],[w,[v,se]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[w,[v,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[w,[v,V+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[w,[v,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[w,[v,"watchOS"]],[/crkey\/([\d\.]+)/i],[w,[v,X+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[v,ye],w],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[v,w],[/(sunos) ?([\w\.\d]*)/i],[[v,"Solaris"],w],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[v,w]]},ut=function(Pe,_e){if(typeof Pe===d&&(_e=Pe,Pe=r),!(this instanceof ut))return new ut(Pe,_e).getResult();var Ee=typeof n!==u&&n.navigator?n.navigator:r,Ve=Pe||(Ee&&Ee.userAgent?Ee.userAgent:s),Ie=Ee&&Ee.userAgentData?Ee.userAgentData:r,dt=_e?Oe(yt,_e):yt,We=Ee&&Ee.userAgent==Ve;return this.getBrowser=function(){var Te={};return Te[v]=r,Te[w]=r,vt.call(Te,Ve,dt.browser),Te[g]=at(Te[w]),We&&Ee&&Ee.brave&&typeof Ee.brave.isBrave==c&&(Te[v]="Brave"),Te},this.getCPU=function(){var Te={};return Te[O]=r,vt.call(Te,Ve,dt.cpu),Te},this.getDevice=function(){var Te={};return Te[x]=r,Te[m]=r,Te[b]=r,vt.call(Te,Ve,dt.device),We&&!Te[b]&&Ie&&Ie.mobile&&(Te[b]=E),We&&Te[m]=="Macintosh"&&Ee&&typeof Ee.standalone!==u&&Ee.maxTouchPoints&&Ee.maxTouchPoints>2&&(Te[m]="iPad",Te[b]=R),Te},this.getEngine=function(){var Te={};return Te[v]=r,Te[w]=r,vt.call(Te,Ve,dt.engine),Te},this.getOS=function(){var Te={};return Te[v]=r,Te[w]=r,vt.call(Te,Ve,dt.os),We&&!Te[v]&&Ie&&Ie.platform&&Ie.platform!="Unknown"&&(Te[v]=Ie.platform.replace(/chrome os/i,ye).replace(/macos/i,xe)),Te},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ve},this.setUA=function(Te){return Ve=typeof Te===h&&Te.length>H?Ht(Te,H):Te,this},this.setUA(Ve),this};ut.VERSION=o,ut.BROWSER=ce([v,w,g]),ut.CPU=ce([O]),ut.DEVICE=ce([m,x,b,M,E,P,R,k,D]),ut.ENGINE=ut.OS=ce([v,w]),e.exports&&(t=e.exports=ut),t.UAParser=ut;var Bt=typeof n!==u&&(n.jQuery||n.Zepto);if(Bt&&!Bt.ua){var Gt=new ut;Bt.ua=Gt.getResult(),Bt.ua.get=function(){return Gt.getUA()},Bt.ua.set=function(Pe){Gt.setUA(Pe);var _e=Gt.getResult();for(var Ee in _e)Bt.ua[Ee]=_e[Ee]}}})(typeof window=="object"?window:wn)})(Gh,Gh.exports);var Uee=Gh.exports;Object.defineProperty(Ae,"__esModule",{value:!0});function Hee(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var sn=T,mt=Hee(sn),YT=Uee,Xo=new YT,an=Xo.getBrowser(),Gee=Xo.getCPU(),Hn=Xo.getDevice(),g0=Xo.getEngine(),Zo=Xo.getOS(),Rl=Xo.getUA(),qT=function(t){return Xo.setUA(t)},Ml=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new YT(t);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(o){return n.setUA(o)}}},KT=Object.freeze({ClientUAInstance:Xo,browser:an,cpu:Gee,device:Hn,engine:g0,os:Zo,ua:Rl,setUa:qT,parseUserAgent:Ml});function pC(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 Yee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pC(Object(n),!0).forEach(function(r){Zee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ga(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ga=function(t){return typeof t}:Ga=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ga(e)}function qee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xee(e,t,n){return t&&Kee(e.prototype,t),e}function Zee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yh(){return Yh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yh.apply(this,arguments)}function Qee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kh(e,t)}function qh(e){return qh=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},qh(e)}function Kh(e,t){return Kh=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},Kh(e,t)}function Jee(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function hr(e,t){if(e==null)return{};var n=Jee(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function du(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ete(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return du(e)}function tte(e,t){return nte(e)||rte(e,t)||ote(e,t)||ite()}function nte(e){if(Array.isArray(e))return e}function rte(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,a,c;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){s=!0,c=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw c}}return r}}function ote(e,t){if(e){if(typeof e=="string")return hC(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 hC(e,t)}}function hC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ite(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
218
218
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var on={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},On={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},ea={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},ste={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},ate=function(t){switch(t){case on.Mobile:return{isMobile:!0};case on.Tablet:return{isTablet:!0};case on.SmartTv:return{isSmartTV:!0};case on.Console:return{isConsole:!0};case on.Wearable:return{isWearable:!0};case on.Browser:return{isBrowser:!0};case on.Embedded:return{isEmbedded:!0};default:return ste}},lte=function(t){return qT(t)},De=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},m0=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},v0=function(t){var n=m0();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},cte=function(t,n,r,o,s){return{isBrowser:t,browserMajorVersion:De(n.major),browserFullVersion:De(n.version),browserName:De(n.name),engineName:De(r.name),engineVersion:De(r.version),osName:De(o.name),osVersion:De(o.version),userAgent:De(s)}},gC=function(t,n,r,o){return Yee({},t,{vendor:De(n.vendor),model:De(n.model),os:De(r.name),osVersion:De(r.version),ua:De(o)})},ute=function(t,n,r,o){return{isSmartTV:t,engineName:De(n.name),engineVersion:De(n.version),osName:De(r.name),osVersion:De(r.version),userAgent:De(o)}},dte=function(t,n,r,o){return{isConsole:t,engineName:De(n.name),engineVersion:De(n.version),osName:De(r.name),osVersion:De(r.version),userAgent:De(o)}},fte=function(t,n,r,o){return{isWearable:t,engineName:De(n.name),engineVersion:De(n.version),osName:De(r.name),osVersion:De(r.version),userAgent:De(o)}},pte=function(t,n,r,o,s){return{isEmbedded:t,vendor:De(n.vendor),model:De(n.model),engineName:De(r.name),engineVersion:De(r.version),osName:De(o.name),osVersion:De(o.version),userAgent:De(s)}};function hte(e){var t=e?Ml(e):KT,n=t.device,r=t.browser,o=t.engine,s=t.os,a=t.ua,c=ate(n.type),u=c.isBrowser,d=c.isMobile,h=c.isTablet,g=c.isSmartTV,m=c.isConsole,v=c.isWearable,b=c.isEmbedded;if(u)return cte(u,r,o,s,a);if(g)return ute(g,o,s,a);if(m)return dte(m,o,s,a);if(d||h)return gC(c,n,s,a);if(v)return fte(v,o,s,a);if(b)return pte(b,n,o,s,a)}var XT=function(t){var n=t.type;return n===on.Mobile},ZT=function(t){var n=t.type;return n===on.Tablet},QT=function(t){var n=t.type;return n===on.Mobile||n===on.Tablet},JT=function(t){var n=t.type;return n===on.SmartTv},Xu=function(t){var n=t.type;return n===on.Browser},eE=function(t){var n=t.type;return n===on.Wearable},tE=function(t){var n=t.type;return n===on.Console},nE=function(t){var n=t.type;return n===on.Embedded},rE=function(t){var n=t.vendor;return De(n)},oE=function(t){var n=t.model;return De(n)},iE=function(t){var n=t.type;return De(n,"browser")},sE=function(t){var n=t.name;return n===ea.Android},aE=function(t){var n=t.name;return n===ea.Windows},lE=function(t){var n=t.name;return n===ea.MAC_OS},cE=function(t){var n=t.name;return n===ea.WindowsPhone},uE=function(t){var n=t.name;return n===ea.IOS},dE=function(t){var n=t.version;return De(n)},fE=function(t){var n=t.name;return De(n)},pE=function(t){var n=t.name;return n===On.Chrome},hE=function(t){var n=t.name;return n===On.Firefox},gE=function(t){var n=t.name;return n===On.Chromium},Zu=function(t){var n=t.name;return n===On.Edge},mE=function(t){var n=t.name;return n===On.Yandex},vE=function(t){var n=t.name;return n===On.Safari||n===On.MobileSafari},yE=function(t){var n=t.name;return n===On.MobileSafari},bE=function(t){var n=t.name;return n===On.Opera},xE=function(t){var n=t.name;return n===On.InternetExplorer||n===On.Ie},CE=function(t){var n=t.name;return n===On.MIUI},wE=function(t){var n=t.name;return n===On.SamsungBrowser},AE=function(t){var n=t.version;return De(n)},SE=function(t){var n=t.major;return De(n)},TE=function(t){var n=t.name;return De(n)},EE=function(t){var n=t.name;return De(n)},IE=function(t){var n=t.version;return De(n)},OE=function(){var t=m0(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},js=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},PE=function(){var t=m0();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},Dr=function(){return v0("iPad")},jE=function(){return v0("iPhone")},RE=function(){return v0("iPod")},ME=function(t){return De(t)};function kE(e){var t=e||KT,n=t.device,r=t.browser,o=t.os,s=t.engine,a=t.ua;return{isSmartTV:JT(n),isConsole:tE(n),isWearable:eE(n),isEmbedded:nE(n),isMobileSafari:yE(r)||Dr(),isChromium:gE(r),isMobile:QT(n)||Dr(),isMobileOnly:XT(n),isTablet:ZT(n)||Dr(),isBrowser:Xu(n),isDesktop:Xu(n),isAndroid:sE(o),isWinPhone:cE(o),isIOS:uE(o)||Dr(),isChrome:pE(r),isFirefox:hE(r),isSafari:vE(r),isOpera:bE(r),isIE:xE(r),osVersion:dE(o),osName:fE(o),fullBrowserVersion:AE(r),browserVersion:SE(r),browserName:TE(r),mobileVendor:rE(n),mobileModel:oE(n),engineName:EE(s),engineVersion:IE(s),getUA:ME(a),isEdge:Zu(r)||js(a),isYandex:mE(r),deviceType:iE(n),isIOS13:PE(),isIPad13:Dr(),isIPhone13:jE(),isIPod13:RE(),isElectron:OE(),isEdgeChromium:js(a),isLegacyEdge:Zu(r)&&!js(a),isWindows:aE(o),isMacOs:lE(o),isMIUI:CE(r),isSamsungBrowser:wE(r)}}var DE=JT(Hn),FE=tE(Hn),LE=eE(Hn),gte=nE(Hn),mte=yE(an)||Dr(),vte=gE(an),Wd=QT(Hn)||Dr(),_E=XT(Hn),BE=ZT(Hn)||Dr(),NE=Xu(Hn),yte=Xu(Hn),VE=sE(Zo),WE=cE(Zo),$E=uE(Zo)||Dr(),bte=pE(an),xte=hE(an),Cte=vE(an),wte=bE(an),zE=xE(an),Ate=dE(Zo),Ste=fE(Zo),Tte=AE(an),Ete=SE(an),Ite=TE(an),Ote=rE(Hn),Pte=oE(Hn),jte=EE(g0),Rte=IE(g0),Mte=ME(Rl),kte=Zu(an)||js(Rl),Dte=mE(an),Fte=iE(Hn),Lte=PE(),_te=Dr(),Bte=jE(),Nte=RE(),Vte=OE(),Wte=js(Rl),$te=Zu(an)&&!js(Rl),zte=aE(Zo),Ute=lE(Zo),Hte=CE(an),Gte=wE(an),Yte=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=Ml(t),r=n.device,o=n.browser,s=n.os,a=n.engine,c=n.ua;return kE({device:r,browser:o,os:s,engine:a,ua:c})},qte=function(t){var n=t.renderWithFragment,r=t.children,o=hr(t,["renderWithFragment","children"]);return VE?n?mt.createElement(sn.Fragment,null,r):mt.createElement("div",o,r):null},Kte=function(t){var n=t.renderWithFragment,r=t.children,o=hr(t,["renderWithFragment","children"]);return NE?n?mt.createElement(sn.Fragment,null,r):mt.createElement("div",o,r):null},Xte=function(t){var n=t.renderWithFragment,r=t.children,o=hr(t,["renderWithFragment","children"]);return zE?n?mt.createElement(sn.Fragment,null,r):mt.createElement("div",o,r):null},Zte=function(t){var n=t.renderWithFragment,r=t.children,o=hr(t,["renderWithFragment","children"]);return $E?n?mt.createElement(sn.Fragment,null,r):mt.createElement("div",o,r):null},Qte=function(t){var n=t.renderWithFragment,r=t.children,o=hr(t,["renderWithFragment","children"]);return Wd?n?mt.createElement(sn.Fragment,null,r):mt.createElement("div",o,r):null},Jte=function(t){var n=t.renderWithFragment,r=t.children,o=hr(t,["renderWithFragment","children"]);return BE?n?mt.createElement(sn.Fragment,null,r):mt.createElement("div",o,r):null},ene=function(t){var n=t.renderWithFragment,r=t.children,o=hr(t,["renderWithFragment","children"]);return WE?n?mt.createElement(sn.Fragment,null,r):mt.createElement("div",o,r):null},tne=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=hr(t,["renderWithFragment","children","viewClassName","style"]);return _E?n?mt.createElement(sn.Fragment,null,r):mt.createElement("div",o,r):null},nne=function(t){var n=t.renderWithFragment,r=t.children,o=hr(t,["renderWithFragment","children"]);return DE?n?mt.createElement(sn.Fragment,null,r):mt.createElement("div",o,r):null},rne=function(t){var n=t.renderWithFragment,r=t.children,o=hr(t,["renderWithFragment","children"]);return FE?n?mt.createElement(sn.Fragment,null,r):mt.createElement("div",o,r):null},one=function(t){var n=t.renderWithFragment,r=t.children,o=hr(t,["renderWithFragment","children"]);return LE?n?mt.createElement(sn.Fragment,null,r):mt.createElement("div",o,r):null},ine=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=t.condition,s=hr(t,["renderWithFragment","children","viewClassName","style","condition"]);return o?n?mt.createElement(sn.Fragment,null,r):mt.createElement("div",s,r):null};function sne(e){return function(t){Qee(n,t);function n(r){var o;return qee(this,n),o=ete(this,qh(n).call(this,r)),o.isEventListenerAdded=!1,o.handleOrientationChange=o.handleOrientationChange.bind(du(o)),o.onOrientationChange=o.onOrientationChange.bind(du(o)),o.onPageLoad=o.onPageLoad.bind(du(o)),o.state={isLandscape:!1,isPortrait:!1},o}return Xee(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var o=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:o===0,isLandscape:o===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":Ga(window))!==void 0&&Wd&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return mt.createElement(e,Yh({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(mt.Component)}function ane(){var e=sn.useState(function(){var s=window.innerWidth>window.innerHeight?90:0;return{isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"}}),t=tte(e,2),n=t[0],r=t[1],o=sn.useCallback(function(){var s=window.innerWidth>window.innerHeight?90:0,a={isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return sn.useEffect(function(){return(typeof window>"u"?"undefined":Ga(window))!==void 0&&Wd&&(o(),window.addEventListener("load",o,!1),window.addEventListener("resize",o,!1)),function(){window.removeEventListener("resize",o,!1),window.removeEventListener("load",o,!1)}},[o]),n}function UE(e){var t=e||window.navigator.userAgent;return Ml(t)}function lne(e){var t=e||window.navigator.userAgent,n=UE(t),r=kE(n);return[r,n]}Ae.AndroidView=qte;Ae.BrowserTypes=On;var cne=Ae.BrowserView=Kte;Ae.ConsoleView=rne;Ae.CustomView=ine;Ae.IEView=Xte;Ae.IOSView=Zte;Ae.MobileOnlyView=tne;var une=Ae.MobileView=Qte;Ae.OsTypes=ea;Ae.SmartTVView=nne;Ae.TabletView=Jte;Ae.WearableView=one;Ae.WinPhoneView=ene;Ae.browserName=Ite;Ae.browserVersion=Ete;Ae.deviceDetect=hte;Ae.deviceType=Fte;Ae.engineName=jte;Ae.engineVersion=Rte;Ae.fullBrowserVersion=Tte;Ae.getSelectorsByUserAgent=Yte;Ae.getUA=Mte;Ae.isAndroid=VE;Ae.isBrowser=NE;Ae.isChrome=bte;Ae.isChromium=vte;Ae.isConsole=FE;Ae.isDesktop=yte;Ae.isEdge=kte;Ae.isEdgeChromium=Wte;Ae.isElectron=Vte;Ae.isEmbedded=gte;Ae.isFirefox=xte;Ae.isIE=zE;Ae.isIOS=$E;Ae.isIOS13=Lte;Ae.isIPad13=_te;Ae.isIPhone13=Bte;Ae.isIPod13=Nte;Ae.isLegacyEdge=$te;Ae.isMIUI=Hte;Ae.isMacOs=Ute;Ae.isMobile=Wd;Ae.isMobileOnly=_E;Ae.isMobileSafari=mte;Ae.isOpera=wte;Ae.isSafari=Cte;Ae.isSamsungBrowser=Gte;Ae.isSmartTV=DE;Ae.isTablet=BE;Ae.isWearable=LE;Ae.isWinPhone=WE;Ae.isWindows=zte;Ae.isYandex=Dte;Ae.mobileModel=Pte;Ae.mobileVendor=Ote;Ae.osName=Ste;Ae.osVersion=Ate;Ae.parseUserAgent=Ml;Ae.setUserAgent=lte;Ae.useDeviceData=UE;Ae.useDeviceSelectors=lne;Ae.useMobileOrientation=ane;Ae.withOrientationChange=sne;var dne=typeof global=="object"&&global&&global.Object===Object&&global,fne=typeof self=="object"&&self&&self.Object===Object&&self,HE=dne||fne||Function("return this")(),Qu=HE.Symbol,GE=Object.prototype,pne=GE.hasOwnProperty,hne=GE.toString,Ra=Qu?Qu.toStringTag:void 0;function gne(e){var t=pne.call(e,Ra),n=e[Ra];try{e[Ra]=void 0;var r=!0}catch{}var o=hne.call(e);return r&&(t?e[Ra]=n:delete e[Ra]),o}var mne=Object.prototype,vne=mne.toString;function yne(e){return vne.call(e)}var bne="[object Null]",xne="[object Undefined]",mC=Qu?Qu.toStringTag:void 0;function Cne(e){return e==null?e===void 0?xne:bne:mC&&mC in Object(e)?gne(e):yne(e)}function wne(e){return e!=null&&typeof e=="object"}var Ane="[object Symbol]";function Sne(e){return typeof e=="symbol"||wne(e)&&Cne(e)==Ane}var Tne=/\s/;function Ene(e){for(var t=e.length;t--&&Tne.test(e.charAt(t)););return t}var Ine=/^\s+/;function One(e){return e&&e.slice(0,Ene(e)+1).replace(Ine,"")}function Ju(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var vC=NaN,Pne=/^[-+]0x[0-9a-f]+$/i,jne=/^0b[01]+$/i,Rne=/^0o[0-7]+$/i,Mne=parseInt;function yC(e){if(typeof e=="number")return e;if(Sne(e))return vC;if(Ju(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ju(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=One(e);var n=jne.test(e);return n||Rne.test(e)?Mne(e.slice(2),n?2:8):Pne.test(e)?vC:+e}var Gp=function(){return HE.Date.now()},kne="Expected a function",Dne=Math.max,Fne=Math.min;function fu(e,t,n){var r,o,s,a,c,u,d=0,h=!1,g=!1,m=!0;if(typeof e!="function")throw new TypeError(kne);t=yC(t)||0,Ju(n)&&(h=!!n.leading,g="maxWait"in n,s=g?Dne(yC(n.maxWait)||0,t):s,m="trailing"in n?!!n.trailing:m);function v(k){var D=r,H=o;return r=o=void 0,d=k,a=e.apply(H,D),a}function b(k){return d=k,c=setTimeout(O,t),h?v(k):a}function x(k){var D=k-u,H=k-d,Y=t-D;return g?Fne(Y,s-H):Y}function w(k){var D=k-u,H=k-d;return u===void 0||D>=t||D<0||g&&H>=s}function O(){var k=Gp();if(w(k))return M(k);c=setTimeout(O,x(k))}function M(k){return c=void 0,m&&r?v(k):(r=o=void 0,a)}function E(){c!==void 0&&clearTimeout(c),d=0,r=u=o=c=void 0}function R(){return c===void 0?a:M(Gp())}function P(){var k=Gp(),D=w(k);if(r=arguments,o=this,u=k,D){if(c===void 0)return b(u);if(g)return clearTimeout(c),c=setTimeout(O,t),v(u)}return c===void 0&&(c=setTimeout(O,t)),a}return P.cancel=E,P.flush=R,P}var Lne="Expected a function";function _ne(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(Lne);return Ju(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),fu(e,t,{leading:r,maxWait:t,trailing:o})}var Ts=function(){return Ts=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ts.apply(this,arguments)};function YE(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function qE(e){return!e||!e.ownerDocument?document:e.ownerDocument}var KE=function(e){var t={},n=Array.prototype.reduce.call(e,function(r,o){var s=o.name.match(/data-simplebar-(.+)/);if(s){var a=s[1].replace(/\W+(.)/g,function(c,u){return u.toUpperCase()});switch(o.value){case"true":r[a]=!0;break;case"false":r[a]=!1;break;case void 0:r[a]=!0;break;default:r[a]=o.value}}return r},t);return n};function XE(e,t){var n;e&&(n=e.classList).add.apply(n,t.split(" "))}function ZE(e,t){e&&t.split(" ").forEach(function(n){e.classList.remove(n)})}function QE(e){return".".concat(e.split(" ").join("."))}var y0=!!(typeof window<"u"&&window.document&&window.document.createElement),Bne=Object.freeze({__proto__:null,addClasses:XE,canUseDOM:y0,classNamesToQuery:QE,getElementDocument:qE,getElementWindow:YE,getOptions:KE,removeClasses:ZE}),ms=null,bC=null;y0&&window.addEventListener("resize",function(){bC!==window.devicePixelRatio&&(bC=window.devicePixelRatio,ms=null)});function xC(){if(ms===null){if(typeof document>"u")return ms=0,ms;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),ms=n}return ms}var Oo=YE,Yp=qE,Nne=KE,Po=XE,jo=ZE,bn=QE,Kc=function(){function e(t,n){n===void 0&&(n={});var r=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var o=Oo(r.el);r.scrollXTicking||(o.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(o.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0),r.isScrolling||(r.isScrolling=!0,Po(r.el,r.classNames.scrolling)),r.showScrollbar("x"),r.showScrollbar("y"),r.onStopScrolling()},this.scrollX=function(){r.axis.x.isOverflowing&&r.positionScrollbar("x"),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&r.positionScrollbar("y"),r.scrollYTicking=!1},this._onStopScrolling=function(){jo(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(Po(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){jo(r.el,r.classNames.mouseEntered),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isMouseEntering=!1},this._onMouseMove=function(o){r.mouseX=o.clientX,r.mouseY=o.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this._onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.onPointerEvent=function(o){if(!(!r.axis.x.track.el||!r.axis.y.track.el||!r.axis.x.scrollbar.el||!r.axis.y.scrollbar.el)){var s,a;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(s=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(a=r.isWithinBounds(r.axis.y.track.rect)),(s||a)&&(o.stopPropagation(),o.type==="pointerdown"&&o.pointerType!=="touch"&&(s&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(o,"x"):r.onTrackClick(o,"x")),a&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(o,"y"):r.onTrackClick(o,"y"))))}},this.drag=function(o){var s,a,c,u,d,h,g,m,v,b,x;if(!(!r.draggedAxis||!r.contentWrapperEl)){var w,O=r.axis[r.draggedAxis].track,M=(a=(s=O.rect)===null||s===void 0?void 0:s[r.axis[r.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,E=r.axis[r.draggedAxis].scrollbar,R=(u=(c=r.contentWrapperEl)===null||c===void 0?void 0:c[r.axis[r.draggedAxis].scrollSizeAttr])!==null&&u!==void 0?u:0,P=parseInt((h=(d=r.elStyles)===null||d===void 0?void 0:d[r.axis[r.draggedAxis].sizeAttr])!==null&&h!==void 0?h:"0px",10);o.preventDefault(),o.stopPropagation(),r.draggedAxis==="y"?w=o.pageY:w=o.pageX;var k=w-((m=(g=O.rect)===null||g===void 0?void 0:g[r.axis[r.draggedAxis].offsetAttr])!==null&&m!==void 0?m:0)-r.axis[r.draggedAxis].dragOffset;k=r.draggedAxis==="x"&&r.isRtl?((b=(v=O.rect)===null||v===void 0?void 0:v[r.axis[r.draggedAxis].sizeAttr])!==null&&b!==void 0?b:0)-E.size-k:k;var D=k/(M-E.size),H=D*(R-P);r.draggedAxis==="x"&&r.isRtl&&(H=!((x=e.getRtlHelpers())===null||x===void 0)&&x.isScrollingToNegative?-H:H),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=H}},this.onEndDrag=function(o){r.isDragging=!1;var s=Yp(r.el),a=Oo(r.el);o.preventDefault(),o.stopPropagation(),jo(r.el,r.classNames.dragging),r.onStopScrolling(),s.removeEventListener("mousemove",r.drag,!0),s.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=a.setTimeout(function(){s.removeEventListener("click",r.preventClick,!0),s.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=t,this.options=Ts(Ts({},e.defaultOptions),n),this.classNames=Ts(Ts({},e.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=_ne(this._onMouseMove,64),this.onWindowResize=fu(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=fu(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=fu(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=t.firstElementChild,r=n==null?void 0:n.firstElementChild;if(!r)return null;document.body.appendChild(n),n.scrollLeft=0;var o=e.getOffset(n),s=e.getOffset(r);n.scrollLeft=-999;var a=e.getOffset(r);return document.body.removeChild(n),e.rtlHelpers={isScrollOriginAtZero:o.left!==s.left,isScrollingToNegative:s.left!==a.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:xC()}catch{return xC()}},e.getOffset=function(t){var n=t.getBoundingClientRect(),r=Yp(t),o=Oo(t);return{top:n.top+(o.pageYOffset||r.documentElement.scrollTop),left:n.left+(o.pageXOffset||r.documentElement.scrollLeft)}},e.prototype.init=function(){y0&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,n;this.wrapperEl=this.el.querySelector(bn(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(bn(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(bn(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(bn(this.classNames.offset)),this.maskEl=this.el.querySelector(bn(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,bn(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(bn(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(bn(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(bn(this.classNames.track)).concat(bn(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(bn(this.classNames.track)).concat(bn(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(bn(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(bn(this.classNames.scrollbar)))||null,this.options.autoHide||(Po(this.axis.x.scrollbar.el,this.classNames.visible),Po(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,n,r=Oo(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),r.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var o=!1,s=r.ResizeObserver||ResizeObserver;this.resizeObserver=new s(function(){o&&r.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),r.requestAnimationFrame(function(){o=!0})}this.mutationObserver=new r.MutationObserver(function(){r.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=Oo(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,r=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1||n>0,s=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,c=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var u=this.contentEl.scrollHeight,d=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=r?"auto":"100%",this.placeholderEl.style.width=o?"".concat(n||d,"px"):"auto",this.placeholderEl.style.height="".concat(u,"px");var h=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&d>n,this.axis.y.isOverflowing=u>h,this.axis.x.isOverflowing=a==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=c==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var g=this.axis.x.isOverflowing?this.scrollbarWidth:0,m=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&d>s-m,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&u>h-g,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(t){var n,r;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var o=this.contentEl[this.axis[t].scrollSizeAttr],s=(r=(n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])!==null&&r!==void 0?r:0,a=s/o,c;return c=Math.max(~~(a*s),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(c=Math.min(c,this.options.scrollbarMaxSize)),c},e.prototype.positionScrollbar=function(t){var n,r,o;t===void 0&&(t="y");var s=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!s.el||!this.elStyles)){var a=this.contentWrapperEl[this.axis[t].scrollSizeAttr],c=((n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])||0,u=parseInt(this.elStyles[this.axis[t].sizeAttr],10),d=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];d=t==="x"&&this.isRtl&&(!((r=e.getRtlHelpers())===null||r===void 0)&&r.isScrollOriginAtZero)?-d:d,t==="x"&&this.isRtl&&(d=!((o=e.getRtlHelpers())===null||o===void 0)&&o.isScrollingToNegative?d:-d);var h=d/(a-u),g=~~((c-s.size)*h);g=t==="x"&&this.isRtl?-g+(c-s.size):g,s.el.style.transform=t==="x"?"translate3d(".concat(g,"px, 0, 0)"):"translate3d(0, ".concat(g,"px, 0)")}},e.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var n=this.axis[t].track.el,r=this.axis[t].scrollbar.el;!n||!r||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none")},e.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(Po(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(jo(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var n=this.axis[t];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(t),Po(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?Po(n.scrollbar.el,this.classNames.hover):jo(n.scrollbar.el,this.classNames.hover)):(jo(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),jo(this.axis[t].track.el,this.classNames.hover),jo(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},e.prototype.onDragStart=function(t,n){var r;n===void 0&&(n="y"),this.isDragging=!0;var o=Yp(this.el),s=Oo(this.el),a=this.axis[n].scrollbar,c=n==="y"?t.pageY:t.pageX;this.axis[n].dragOffset=c-(((r=a.rect)===null||r===void 0?void 0:r[this.axis[n].offsetAttr])||0),this.draggedAxis=n,Po(this.el,this.classNames.dragging),o.addEventListener("mousemove",this.drag,!0),o.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(o.addEventListener("click",this.preventClick,!0),o.addEventListener("dblclick",this.preventClick,!0)):(s.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,n){var r=this,o,s,a,c;n===void 0&&(n="y");var u=this.axis[n];if(!(!this.options.clickOnTrack||!u.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var d=Oo(this.el);this.axis[n].scrollbar.rect=u.scrollbar.el.getBoundingClientRect();var h=this.axis[n].scrollbar,g=(s=(o=h.rect)===null||o===void 0?void 0:o[this.axis[n].offsetAttr])!==null&&s!==void 0?s:0,m=parseInt((c=(a=this.elStyles)===null||a===void 0?void 0:a[this.axis[n].sizeAttr])!==null&&c!==void 0?c:"0px",10),v=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],b=n==="y"?this.mouseY-g:this.mouseX-g,x=b<0?-1:1,w=x===-1?v-m:v+m,O=40,M=function(){r.contentWrapperEl&&(x===-1?v>w&&(v-=O,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=v,d.requestAnimationFrame(M)):v<w&&(v+=O,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=v,d.requestAnimationFrame(M)))};M()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=Oo(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.prototype.findChild=function(t,n){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(o){return r.call(o,n)})[0]},e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=Nne,e.helpers=Bne,e}(),_n=function(){return _n=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},_n.apply(this,arguments)};function Vne(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}var JE=_.forwardRef(function(e,t){var n=e.children,r=e.scrollableNodeProps,o=r===void 0?{}:r,s=Vne(e,["children","scrollableNodeProps"]),a=_.useRef(),c=_.useRef(),u=_.useRef(),d={},h={};Object.keys(s).forEach(function(v){Object.prototype.hasOwnProperty.call(Kc.defaultOptions,v)?d[v]=s[v]:h[v]=s[v]});var g=_n(_n({},Kc.defaultOptions.classNames),d.classNames),m=_n(_n({},o),{className:"".concat(g.contentWrapper).concat(o.className?" ".concat(o.className):""),tabIndex:0,role:"region","aria-label":d.ariaLabel||Kc.defaultOptions.ariaLabel});return _.useEffect(function(){var v;return c.current=m.ref?m.ref.current:c.current,a.current&&(v=new Kc(a.current,_n(_n(_n({},d),c.current&&{scrollableNode:c.current}),u.current&&{contentNode:u.current})),typeof t=="function"?t(v):t&&(t.current=v)),function(){v==null||v.unMount(),v=null,typeof t=="function"&&t(null)}},[]),_.createElement("div",_n({"data-simplebar":"init",ref:a},h),_.createElement("div",{className:g.wrapper},_.createElement("div",{className:g.heightAutoObserverWrapperEl},_.createElement("div",{className:g.heightAutoObserverEl})),_.createElement("div",{className:g.mask},_.createElement("div",{className:g.offset},typeof n=="function"?n({scrollableNodeRef:c,scrollableNodeProps:_n(_n({},m),{ref:c}),contentNodeRef:u,contentNodeProps:{className:g.contentEl,ref:u}}):_.createElement("div",_n({},m),_.createElement("div",{className:g.contentEl},n)))),_.createElement("div",{className:g.placeholder})),_.createElement("div",{className:"".concat(g.track," simplebar-horizontal")},_.createElement("div",{className:g.scrollbar})),_.createElement("div",{className:"".concat(g.track," simplebar-vertical")},_.createElement("div",{className:g.scrollbar})))});JE.displayName="SimpleBar";const Wne=fe(cne)({flexGrow:1,height:"100%",overflow:"hidden"}),$ne=fe(JE)(({theme:e})=>({maxHeight:"100%","& .simplebar-scrollbar":{"&:before":{backgroundColor:et(e.palette.grey[500],.48)},"&.simplebar-visible:before":{opacity:1}},"& .simplebar-track.simplebar-vertical":{width:10},"& .simplebar-track.simplebar-horizontal .simplebar-scrollbar":{height:6},"& .simplebar-mask":{zIndex:"inherit"}}));function eI({children:e,sx:t,...n}){return p.jsxs(p.Fragment,{children:[p.jsx(Wne,{children:p.jsx($ne,{timeout:500,clickOnTrack:!1,sx:t,...n,children:e})}),p.jsx(une,{children:p.jsx(A.Box,{sx:{overflowX:"auto",...t},...n,children:e})})]})}function tI(e){const t=A.useTheme(),n=Tr(e,{flexShrink:{md:0},zIndex:1200}),{downLg:r}=Un(),{open:o,handleDrawerToggle:s,width:a}=$i(),c=r?A.Drawer:zee,u=document.body,d=T.useMemo(()=>r?{container:u,variant:"temporary",onClose:s,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",lg:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:a,borderRight:`1px solid ${t.palette.divider}`,backgroundImage:"none",boxShadow:"inherit",overflow:"auto"}}}:{variant:"permanent"},[r,u,s,a,t.palette.divider]);return p.jsx(A.Box,{component:"nav",sx:n,"aria-label":"mailbox folders",children:p.jsxs(c,{...d,open:o,children:[p.jsx(GT,{}),p.jsx(eI,{sx:{"& .simplebar-content":{display:"flex",flexDirection:"column"}},children:e.children})]})})}function b0(e){const{name:t,version:n,copy:r="&copy; Applica Software Guru for"}=e;return p.jsx(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-end",flexGrow:1,height:"auto",sx:{pt:1},children:p.jsxs(A.Typography,{variant:"caption",children:[p.jsx("span",{dangerouslySetInnerHTML:{__html:r||""}})," ",t," - ",n]})})}const nI=fe(A.AppBar,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=Pn();return{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),...!t&&{width:`calc(100% - ${e.spacing(7.5)})`},...t&&{marginLeft:n,width:`calc(100% - ${n}px)`,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})}}}),rI=T.forwardRef(function(t,n){const r=Tr(t,{color:"text.primary"},{defaults:!0});return p.jsx(A.Button,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),zne=T.forwardRef(function(t,n){const r=Tr(t,{color:"text.primary"},{defaults:!0});return p.jsx(Sd,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),ta=T.forwardRef(function(t,n){const r=Tr(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return p.jsx(A.ToggleButton,{ref:n,...t,color:"secondary",sx:r})});function oI(){const{open:e,anchorEl:t,handleClose:n,handleToggle:r}=Pl(),[o,s]=re.useLocaleState(),a=re.useLocales();if(a.length===0)return null;function c(u){s(u),n()}return p.jsxs(p.Fragment,{children:[p.jsx(rI,{value:"locale",onClick:r,sx:{minWidth:"auto"},children:p.jsxs(A.Stack,{direction:"row",spacing:.5,children:[p.jsx(A.Typography,{variant:"body1",children:o.toUpperCase()}),e?p.jsx(qe.CaretUpOutlined,{}):p.jsx(qe.CaretDownOutlined,{})]})}),p.jsx(A.Menu,{id:"menu-appbar",anchorEl:t,keepMounted:!0,open:e,onClose:n,children:a.map((u,d)=>p.jsx(A.MenuItem,{onClick:()=>c(u.locale),children:u.name},d))})]})}const Une={ml:{xs:0,lg:-2}};function iI(){const{open:e,handleDrawerToggle:t}=$i();return p.jsx(ta,{value:"drawer","aria-label":"open drawer",sx:Une,onChange:t,selected:e,children:e?p.jsx(qe.MenuFoldOutlined,{}):p.jsx(qe.MenuUnfoldOutlined,{})})}function sI(e){const t=T.useRef(),n=A.useTheme(),{downLg:r,horizontal:o}=Un(),{open:s,width:a}=$i(),c=r?A.AppBar:nI,d={position:"fixed",color:"inherit",elevation:0,sx:Tr(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":s?`calc(100% - ${a}px)`:{xs:"100%",lg:"calc(100% - 60px)"}})};return r||Z.extend(d,{open:s}),p.jsx(c,{ref:t,...d,children:p.jsxs(A.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&p.jsx(iI,{}),e.children]})})}function Hne(e){const t=A.useTheme(),{notification:n,onClick:r,selected:o,divider:s}=e,{resource:a}=Vd(),c=re.useNotify(),u=re.useRedirect(),[d]=re.useUpdate(a,{id:n==null?void 0:n.id,data:{...n,readed:Wr().toISOString()}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(u(n==null?void 0:n.resource),r()):(r(),document.location.href=n==null?void 0:n.resource):r()},onFailure:()=>{c("resources.notifications.messages.readed.error","warning")}}),h=T.useCallback(()=>d(),[d]),[g]=re.useLocaleState(),m=T.useMemo(()=>Wr(n.created).locale(g).fromNow(),[n,g]);return p.jsx(A.ListItem,{disablePadding:!0,divider:s,children:p.jsxs(A.ListItemButton,{selected:o,onClick:h,children:[p.jsx(A.ListItemAvatar,{children:p.jsx(A.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:p.jsx(qe.MessageOutlined,{})})}),p.jsx(A.ListItemText,{sx:{overflow:"hidden",wordBreak:"break-word",width:"90%"},primary:n.title,secondary:n.content}),p.jsx(A.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),p.jsx(A.ListItemText,{sx:{overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},primary:m,primaryTypographyProps:{variant:"caption"}})]})})}const Gne={width:36,height:36,fontSize:"1rem"},Yne={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function aI(){const{enable:e}=Vd();return e?p.jsx(qne,{}):null}function qne(){const e=re.useTranslate(),t=A.useTheme(),n=re.useRefresh(),r=re.useNotify(),{downMd:o}=Un(),{resource:s}=Vd(),[a,c]=T.useState([]),{data:u,isLoading:d}=re.useGetList(s,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),h=a.filter(M=>M.readed===null).length,{open:g,anchorEl:m,handleClose:v,handleToggle:b}=Pl();T.useEffect(()=>{!d&&u&&c(u??[])},[u,d]);const x=a.filter(M=>!M.readed).map(M=>M.id),[w]=re.useUpdateMany(s,{ids:x,data:{readed:Wr().toISOString()}},{onSuccess:()=>{n(),r("resources.notifications.messages.readed.done")},onError:()=>r("ra.notification.readed_error")}),O=T.useCallback(()=>{w()},[w]);return p.jsxs(p.Fragment,{children:[p.jsx(ta,{value:"notifications",selected:g,onChange:b,children:p.jsx(A.Badge,{badgeContent:h,color:"primary",children:p.jsx(qe.BellOutlined,{})})}),p.jsx(A.Popper,{placement:o?"bottom":"bottom-end",open:g,anchorEl:m,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:M})=>p.jsx(Mi,{type:"grow",position:o?"top":"top-right",in:g,...M,children:p.jsx(A.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:p.jsx(A.ClickAwayListener,{onClickAway:v,children:p.jsxs(Cr,{title:e("ra.notification.title"),elevation:0,border:!1,content:!1,secondary:p.jsx(p.Fragment,{children:h>0&&p.jsx(A.Tooltip,{title:e("ra.notification.mark-as-read"),onClick:O,children:p.jsx(Sd,{color:"success",size:"small",children:p.jsx(qe.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[p.jsx(A.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":Gne,"& .MuiListItemSecondaryAction-root":{...Yne,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:a.map((E,R)=>p.jsx(Hne,{selected:h>0,notification:E,onClick:v,divider:R<a.length-1},E.id))}),p.jsx(A.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${s}`,LinkComponent:pt.Link,onClick:v,children:p.jsx(A.ListItemText,{primary:p.jsx(A.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})}),p.jsx(A.Divider,{})]})})})})})]})}function Kne(){const[e,t]=T.useState(!1),n=T.useCallback(()=>t(!1),[t]),r=T.useCallback(()=>t(!0),[t]),o=re.useTranslate();return p.jsxs(p.Fragment,{children:[p.jsxs(A.ListItemButton,{onClick:r,children:[p.jsx(A.ListItemIcon,{children:p.jsx(Vn.Key,{})}),p.jsx(A.ListItemText,{primary:o("ra.auth.change_password")})]}),p.jsx(A.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:p.jsx(a0,{onSuccess:n})})]})}function Xne(){const e=re.useLogout(),t=re.useTranslate();return p.jsx(p.Fragment,{children:p.jsxs(A.ListItemButton,{onClick:e,children:[p.jsx(A.ListItemIcon,{children:p.jsx(Vn.LogoutOutlined,{})}),p.jsx(A.ListItemText,{primary:t("ra.auth.logout")})]})})}function Zne(){const e=re.useTranslate(),t=re.useAuthProvider(),n=T.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t]),[r,o]=T.useState(!1);return T.useEffect(()=>{if(!t.isImpersonating){console.warn("The authProvider does not support the isImpersonating feature",t);return}t.isImpersonating().then(s=>o(s))},[t,o]),r?p.jsx(p.Fragment,{children:p.jsxs(A.ListItemButton,{onClick:n,children:[p.jsx(A.ListItemIcon,{children:p.jsx(Vn.LogoutOutlined,{})}),p.jsx(A.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null}function lI(){var m;const e=A.useTheme(),t=re.useDataProvider(),{identity:n}=re.useGetIdentity(),r=n!==void 0&&n.image&&n.image!==null&&n.image!=="",[o,s]=T.useState(null),{open:a,anchorEl:c,handleToggle:u,handleClose:d}=Pl(),h=re.useLogout(),g=T.useCallback(()=>{h()},[h]);return T.useEffect(()=>{r&&t.getFile("/profile/me/image").then(v=>s(v))},[t,r]),p.jsxs(p.Fragment,{children:[p.jsx(ta,{sx:{p:.25,width:"auto"},onClick:u,value:"profile",selected:a,children:p.jsxs(A.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[p.jsx(Ou,{alt:(m=n==null?void 0:n.name)==null?void 0:m.toUpperCase(),src:o,size:"xs"}),p.jsx(A.Typography,{variant:"subtitle1",children:n==null?void 0:n.name})]})}),p.jsx(cS,{placement:"bottom-end",open:a,anchorEl:c,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:v})=>{var b;return p.jsx(Mi,{type:"grow",position:"top-right",in:a,...v,children:p.jsx(A.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:p.jsx(A.ClickAwayListener,{onClickAway:d,children:p.jsxs(Cr,{elevation:0,border:!1,content:!1,children:[p.jsx(A.CardContent,{sx:{px:2.5,pt:3},children:p.jsxs(A.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[p.jsx(A.Grid,{item:!0,children:p.jsxs(A.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[p.jsx(Ou,{alt:"profile user",src:o,sx:{width:32,height:32}}),p.jsxs(A.Stack,{children:[p.jsx(A.Typography,{variant:"h6",children:n==null?void 0:n.name}),p.jsx(A.Typography,{variant:"body2",color:"textSecondary",children:(b=n==null?void 0:n.roles)==null?void 0:b.map(x=>x.name.replace("ROLE_","")).join(",")})]})]})}),p.jsx(A.Grid,{item:!0,children:p.jsx(A.Tooltip,{title:"Logout",children:p.jsx(Sd,{size:"large",sx:{color:"text.primary"},onClick:g,children:p.jsx(qe.LogoutOutlined,{})})})})]})}),p.jsx(A.Grid,{container:!0,children:p.jsx(A.Grid,{item:!0,xs:12,children:p.jsxs(A.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[p.jsx(Kne,{}),p.jsx(Xne,{}),p.jsx(Zne,{})]})})})]})})})})}})]})}function cI(e){const t=Ut(),{downMd:n}=Un(),{open:r,anchorEl:o,handleToggle:s,handleClose:a}=Pl();return n?p.jsxs(p.Fragment,{children:[p.jsx(ta,{value:"drawer","aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:s,selected:r,children:p.jsx(qe.MoreOutlined,{})}),p.jsx(A.Popper,{placement:"bottom-end",open:r,anchorEl:o,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:c})=>p.jsx(Mi,{type:"fade",in:r,...c,children:p.jsx(A.Paper,{sx:{boxShadow:t.customShadows.z1},children:p.jsx(A.ClickAwayListener,{onClickAway:a,children:p.jsx(A.AppBar,{color:"inherit",children:p.jsx(A.Toolbar,{children:e.children})})})})})})]}):p.jsx(p.Fragment,{children:e.children})}function uI(e){return p.jsx(A.Box,{...e,flex:1})}function dI(e){const t=A.useTheme(),n=A.useScrollTrigger({disableHysteresis:!0,threshold:0}),{container:r}=Pn();return t.shadows[4]=t.customShadows.z1,p.jsx(A.AppBar,{elevation:n?4:0,sx:{top:60,bgcolor:t.palette.background.paper,width:"100%",height:62,justifyContent:"center",borderTop:`1px solid ${t.palette.divider}`,borderBottom:`1px solid ${t.palette.divider}`,zIndex:1098,color:t.palette.grey[500]},children:p.jsx(A.Container,{maxWidth:r?"xl":!1,children:p.jsx(A.Box,{sx:{display:"flex",alignItems:"center"},children:e.children})})})}function fI(e){const{horizontal:t}=Un();return t?p.jsx(dI,{children:e.children}):p.jsx(tI,{children:e.children})}function Ya({item:e,level:t}){const n=Ut(),{horizontal:r,downLg:o}=Un(),{drawerOpen:s,openItem:a,activeItem:c,openDrawer:u}=il();let d="_self";e.target&&(d="_blank");const h=(e==null?void 0:e.external)!==!1?{component:T.forwardRef((O,M)=>p.jsx(pt.Link,{...O,to:e.url,target:d,ref:M}))}:{component:"a",href:e.url,target:d},g=e.icon,m=e.icon?p.jsx(g,{style:{fontSize:s?"1rem":"1.25rem"}}):!1,v=a.findIndex(O=>O===e.id)>-1,{pathname:b}=pt.useLocation();T.useEffect(()=>{b.endsWith(e.url)&&c([e.id])},[b]);const x=n.palette.mode==="dark"?"grey.400":"text.primary",w=n.palette.mode==="dark"&&s?"text.primary":"primary.main";return p.jsx(p.Fragment,{children:r?p.jsxs(A.ListItemButton,{...h,disabled:e.disabled,selected:v,sx:{zIndex:1201,...s&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{bgcolor:"transparent",color:w,"&:hover":{color:w,bgcolor:"transparent"}}},...!s&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[m?p.jsx(A.ListItemIcon,{sx:{minWidth:36,...!s&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!s&&v&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:m}):null,!m&&p.jsx(A.ListItemIcon,{sx:{color:v?"primary.main":"secondary.main",...!s&&{borderRadius:1.5,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!s&&v&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:p.jsx(fm,{size:4,color:v?"primary":"secondary"})}),p.jsx(A.ListItemText,{primary:p.jsx(A.Typography,{variant:"h6",color:"inherit",children:e.title})}),(s||!s&&t!==1)&&e.chip?p.jsx(A.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?p.jsx(A.Avatar,{children:e.chip.avatar}):null}):null]}):p.jsxs(A.ListItemButton,{...h,disabled:e.disabled,selected:v,sx:{zIndex:1201,pl:s?`${t*28}px`:1.5,py:!s&&t===1?1.25:1,...s&&{"&:hover":{bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter"},"&.Mui-selected":{bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter",borderRight:`2px solid ${n.palette.primary.main}`,color:w,"&:hover":{color:w,bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter"}}},...!s&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},...o&&{onClick:()=>u(!1)},children:[m?p.jsx(A.ListItemIcon,{sx:{minWidth:28,color:v?w:x,...!s&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:n.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!s&&v&&{bgcolor:n.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:n.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:m}):null,s||!s&&t!==1?p.jsx(A.ListItemText,{primary:p.jsx(A.Typography,{variant:"h6",sx:{color:v?w:x},children:e.title})}):null,(s||!s&&t!==1)&&e.chip?p.jsx(A.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?p.jsx(A.Avatar,{children:e.chip.avatar}):null}):null]})})}const CC=fe(A.Popper)(({theme:e})=>({overflow:"visible",zIndex:1202,minWidth:180,"&:before":{content:'""',display:"block",position:"absolute",top:38,left:-5,width:10,height:10,backgroundColor:e.palette.background.paper,transform:"translateY(-50%) rotate(45deg)",zIndex:120,borderLeft:`1px solid ${e.palette.grey.A800}`,borderBottom:`1px solid ${e.palette.grey.A800}`}}));function qa({menu:e,level:t,parentId:n,setSelectedItems:r,selectedItems:o,setSelectedLevel:s,selectedLevel:a}){var N;const c=Ut(),{activeItem:u}=il(),{horizontal:d}=Un(),{drawerOpen:h}=il(),g=pt.useNavigate(),[m,v]=T.useState(!1),[b,x]=T.useState(null),[w,O]=T.useState(null);function M(J){O(null),s(t),h?(v(!m),x(b?null:e.id),r(b?"":e.id),e.url&&g(`${e.url}`)):O(J==null?void 0:J.currentTarget)}function E(){h||e.url&&g(`${e.url}`)}function R(J){O(J==null?void 0:J.currentTarget)}function P(){v(!1),x(null),O(null)}T.useMemo(()=>{b===o?t===1&&v(!0):t===a&&(v(!1),x(null))},[o,t,b,a]);const{pathname:k}=pt.useLocation(),D=!!w;function H(J,W){J.forEach(G=>{G.url===k&&(v(!0),x(W))})}T.useEffect(()=>{v(!1),x(null),D&&O(null),e.children&&e.children.forEach(J=>{var W;(W=J.children)!=null&&W.length&&H(J.children,e.id),J.url===k&&(x(e.id),v(!0)),k.includes(J.url)&&(x(e.id),v(!0))})},[k,e.children]),T.useEffect(()=>{e.url===k&&b!==e.id&&(u([e.id]),x(e.id),O(null),v(!0))},[k,e,b,u]);const Y=(N=e.children)==null?void 0:N.map(J=>{switch(J.type){case"collapse":return p.jsx(qa,{setSelectedItems:r,setSelectedLevel:s,selectedLevel:a,selectedItems:o,menu:J,level:t+1,parentId:n},J.id);case"item":return p.jsx(Ya,{item:J,level:t+1},J.id);default:return p.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Collapse or Item"},J.id)}}),ee=b===e.id,z=t===1?p.jsx(qe.BorderOutlined,{style:{fontSize:"1rem"}}):!1,se=e.icon,ae=e.icon?p.jsx(se,{style:{fontSize:h?"1rem":"1.25rem"}}):z,X=c.palette.mode==="dark"?"grey.400":"text.primary",K=c.palette.mode==="dark"&&h?c.palette.text.primary:c.palette.primary.main,V=D?`collapse-pop-${e.id}`:void 0,te={display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"};return p.jsx(p.Fragment,{children:d?p.jsx(p.Fragment,{children:p.jsxs(A.ListItemButton,{id:`boundary-${V}`,disableRipple:!0,selected:ee,onMouseEnter:R,onMouseLeave:P,onClick:R,"aria-describedby":V,sx:{"&.Mui-selected":{bgcolor:"transparent"}},children:[p.jsxs(A.Box,{onClick:E,sx:te,children:[ae?p.jsx(A.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,color:c.palette.secondary.dark},children:ae}):null,!ae&&t!==1&&p.jsx(A.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,bgcolor:"transparent","&:hover":{bgcolor:"transparent"}},children:p.jsx(fm,{size:4,color:ee?"primary":"secondary"})}),p.jsx(A.ListItemText,{primary:p.jsx(A.Typography,{variant:"body1",color:"inherit",sx:{my:"auto"},children:e.title})}),D?p.jsx(qe.RightOutlined,{}):p.jsx(qe.DownOutlined,{})]}),w?p.jsx(CC,{id:V,open:D,anchorEl:w,placement:"right-start",style:{zIndex:2001},modifiers:[{name:"offset",options:{offset:[-10,0]}}],children:({TransitionProps:J})=>p.jsx(Mi,{in:D,...J,children:p.jsx(A.Paper,{sx:{overflow:"hidden",mt:1.5,py:.5,boxShadow:c.shadows[8],backgroundImage:"none"},children:p.jsx(A.ClickAwayListener,{onClickAway:P,children:p.jsx(A.Box,{children:Y})})})})}):null]})}):p.jsxs(p.Fragment,{children:[p.jsxs(A.ListItemButton,{disableRipple:!0,selected:b===e.id,...!h&&{onMouseEnter:M,onMouseLeave:P},onClick:M,sx:{pl:h?`${t*28}px`:1.5,py:!h&&t===1?1.25:1,...h&&{"&:hover":{bgcolor:c.palette.mode==="dark"?"divider":"primary.lighter"},"&.Mui-selected":{bgcolor:"transparent",color:K,"&:hover":{color:K,bgcolor:c.palette.mode==="dark"?"divider":"transparent"}}},...!h&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[ae?p.jsx(A.ListItemIcon,{onClick:E,sx:{minWidth:28,color:b===e.id?"primary.main":X,...!h&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:c.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!h&&b===e.id&&{bgcolor:c.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:c.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:ae}):null,h||!h&&t!==1?p.jsx(A.ListItemText,{primary:p.jsx(A.Typography,{variant:"h6",color:b===e.id?"primary":X,children:e.title}),secondary:e.caption?p.jsx(A.Typography,{variant:"caption",color:"secondary",children:e.caption}):null}):null,h||!h&&t!==1?D||m?p.jsx(qe.UpOutlined,{style:{fontSize:"0.625rem",marginLeft:1,color:c.palette.primary.main}}):p.jsx(qe.DownOutlined,{style:{fontSize:"0.625rem",marginLeft:1}}):null,!h&&p.jsx(CC,{open:D,anchorEl:w,placement:"right-start",style:{zIndex:2001},popperOptions:{modifiers:[{name:"offset",options:{offset:[-12,1]}}]},children:({TransitionProps:J})=>p.jsx(Mi,{in:D,...J,children:p.jsx(A.Paper,{sx:{overflow:"hidden",mt:1.5,boxShadow:c.customShadows.z1,backgroundImage:"none",border:`1px solid ${c.palette.divider}`},children:p.jsx(A.ClickAwayListener,{onClickAway:P,children:p.jsx(A.Box,{children:Y})})})})})]}),h?p.jsx(A.Collapse,{in:m,timeout:"auto",unmountOnExit:!0,children:p.jsx(A.List,{sx:{p:0},children:Y})}):null]})})}const Qne=fe(A.Popper)(({theme:e})=>({overflow:"visible",zIndex:1202,minWidth:180,"&:before":{content:'""',display:"block",position:"absolute",top:5,left:32,width:12,height:12,transform:"translateY(-50%) rotate(45deg)",zIndex:120,borderWidth:"6px",borderStyle:"solid",borderColor:`${e.palette.background.paper} transparent transparent ${e.palette.background.paper}`}}));function pI({item:e,lastItem:t,remItems:n,lastItemId:r,setSelectedItems:o,selectedItems:s,setSelectedLevel:a,selectedLevel:c}){var V,te;const u=Ut(),d=L.useTranslate(),{pathname:h}={pathname:""},{horizontal:g,downLg:m}=Un(),v=il(),{drawerOpen:b,selectedID:x,activeID:w}=v,[O,M]=T.useState(null),[E,R]=T.useState(e),P=!!O;T.useEffect(()=>{if(t)if(e.id===r){const N={...e},J=n.map(W=>W.elements);N.children=J.flat(1),R(N)}else R(e)},[e,t,m]);function k(N,J){N.forEach(W=>{var G;(G=W.children)!=null&&G.length&&k(W.children,E.id),W.url===h&&w(J)})}function D(N){(N.children?N.children:[]).forEach(W=>{var G;(G=W.children)!=null&&G.length&&k(W.children,E.id),W.url===h&&w(E.id)})}T.useEffect(()=>{D(E),P&&M(null)},[h,E]);function H(N){P||M(N==null?void 0:N.currentTarget)}function Y(){M(null)}const ee=E==null?void 0:E.icon,z=E!=null&&E.icon?p.jsx(ee,{style:{fontSize:20,stroke:"1.5",color:x===E.id?u.palette.primary.main:u.palette.secondary.dark}}):null,se=(V=e.children)==null?void 0:V.map(N=>{switch(N.type){case"collapse":return p.jsx(qa,{menu:N,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:s,level:1,parentId:E.id},N.id);case"item":return p.jsx(Ya,{item:N,level:1},N.id);default:return p.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},N.id)}}),ae=n.map((N,J)=>{var W;return p.jsxs(T.Fragment,{children:[N.title?p.jsx(A.Typography,{variant:"caption",sx:{pl:2},children:N.title}):null,(W=N==null?void 0:N.elements)==null?void 0:W.map(G=>{switch(G.type){case"collapse":return p.jsx(qa,{menu:G,level:1,parentId:E.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:s},G.id);case"item":return p.jsx(Ya,{item:G,level:1},G.id);default:return p.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},G.id)}})]},J)}),X=(te=E.children)==null?void 0:te.map(N=>{switch(N.type){case"collapse":return p.jsx(qa,{menu:N,level:1,parentId:E.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:s},N.id);case"item":return p.jsx(Ya,{item:N,level:1},N.id);default:return p.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},N.id)}}),K=P?`group-pop-${e.id}`:void 0;return p.jsx(p.Fragment,{children:g?p.jsx(A.List,{children:p.jsxs(A.ListItemButton,{selected:x===E.id,sx:{p:1,my:.5,mr:1,display:"flex",alignItems:"center",backgroundColor:"inherit","&.Mui-selected":{bgcolor:"transparent"}},onMouseEnter:H,onClick:H,onMouseLeave:Y,"aria-describedby":K,children:[z?p.jsx(A.ListItemIcon,{sx:{minWidth:28},children:E.id===r?p.jsx(qe.DownOutlined,{style:{fontSize:20,stroke:"1.5"}}):z}):null,p.jsx(A.ListItemText,{sx:{mr:1},primary:p.jsx(A.Typography,{variant:"body1",color:x===E.id?u.palette.primary.main:u.palette.secondary.dark,children:E.id===r?d("ra.actions.more"):E.title})}),P?p.jsx(qe.DownOutlined,{style:{fontSize:16,stroke:"1.5"}}):p.jsx(qe.RightOutlined,{style:{fontSize:16,stroke:"1.5"}}),O?p.jsx(Qne,{id:K,open:P,anchorEl:O,placement:"bottom-start",style:{zIndex:2001},children:({TransitionProps:N})=>p.jsx(Mi,{in:P,...N,children:p.jsx(A.Paper,{sx:{mt:.5,py:1.25,boxShadow:u.shadows[8],backgroundImage:"none"},children:p.jsx(A.ClickAwayListener,{onClickAway:Y,children:p.jsx(A.Box,{sx:{maxHeight:"calc(100vh - 170px)",overflowY:"auto","&::-webkit-scrollbar":{opacity:0,width:4,"&:hover":{opacity:.7}},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:u.palette.divider,borderRadius:4}},children:E.id!==r?X:ae})})})})}):null]})}):p.jsx(A.List,{subheader:e.title&&b?p.jsxs(A.Box,{sx:{pl:3,mb:1.5},children:[p.jsx(A.Typography,{variant:"subtitle2",color:u.palette.mode==="dark"?"textSecondary":"text.secondary",children:e.title}),e.caption?p.jsx(A.Typography,{variant:"caption",color:"secondary",children:e.caption}):null]}):null,sx:{mt:b&&e.title?1.5:0,py:0,zIndex:0},children:se})})}function hI(e){const{horizontal:t}=Un(),{open:n}=$i(),r=Tr(e,{pt:n?t?0:2:0,"& > ul:first-of-type":{mt:0},display:t?{xs:"block",lg:"flex"}:"block"});return p.jsx(A.Box,{sx:r,children:e.children})}function gI(e){const{horizontal:t}=Un(),{menu:n,isLoading:r}=qm(),[o,s]=T.useState(""),[a,c]=T.useState(0),{horizontalMaxItems:u}=Pn(),d=t?u:void 0;let h=r?0:(n??[]).length-1,g=[],m;return!r&&d&&d<(n??[]).length&&(m=(n??[])[d-1].id,h=d-1,g=(n??[]).slice(d-1,(n??[]).length).map(v=>({title:v.title,elements:v.children,icon:v.icon}))),p.jsx(hI,{...e,children:!r&&Z.map((n??[]).slice(0,h+1),v=>{const{type:b}=v;switch(b){case"group":return p.jsx(pI,{item:v,setSelectedItems:s,setSelectedLevel:c,selectedLevel:a,selectedItems:o,lastItem:d,remItems:g,lastItemId:m},v.id);default:return p.jsx(A.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Navigation Group"},v.id)}})})}function mI(){const{mode:e,setMode:t}=Pn();return p.jsx(ta,{value:"theme-mode","aria-label":"toggle mode",onChange:()=>t(e==="dark"?"light":"dark"),selected:!1,children:e==="dark"?p.jsx(qe.SunOutlined,{}):p.jsx(qe.MoonOutlined,{})})}const vI=T.forwardRef((e,t)=>{const n=Tr(e,{display:"flex",width:"100%"});return p.jsx(A.Box,{ref:t,...e,sx:n,children:e.children})});function x0({source:e="paper"}){const{mode:t}=Pn(),n=A.useTheme();return T.useEffect(()=>{var o;const r=Z.get(n.palette.background,e);(o=document.querySelector('meta[name="theme-color"]'))==null||o.setAttribute("content",r)},[t,n,e]),null}const yI=WT(function(t){const{name:n,version:r,enableThemeToggler:o}=t,{isLoading:s,navigation:a,breadcrumbs:c}=T2();return p.jsxs(vI,{children:[p.jsxs(sI,{children:[p.jsx(uI,{}),p.jsx(oI,{}),o?p.jsx(mI,{}):null,p.jsx(x0,{}),p.jsx(qS,{}),p.jsx(aI,{}),p.jsx(cI,{children:p.jsx(lI,{})})]}),p.jsx(fI,{children:p.jsx(gI,{})}),p.jsxs(zT,{error:t.error,children:[!s&&p.jsx(QA,{titleBottom:!0,mode:"breadcrumbs",navigation:a,breadcrumbs:c,card:!1,divider:!1,icon:!0,icons:!0}),t.children,p.jsx(pt.Outlet,{}),p.jsx(b0,{name:n,version:r,copy:t==null?void 0:t.copy})]})]})}),Jne=fe("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}}));function bI(){return p.jsx(Jne,{children:p.jsx(A.LinearProgress,{color:"primary"})})}function ere(e){return t=>p.jsx(T.Suspense,{fallback:p.jsx(bI,{}),children:p.jsx(e,{...t})})}function C0({title:e}){return p.jsxs(A.Stack,{direction:"row",children:[p.jsx(A.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",p.jsx(A.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]})}const tre=fe(L.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}}));function xI(e){return p.jsx(tre,{...e})}var al=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(al||{});const CI=ao().required(),wI=ao().oneOf(Object.values(al));function nre(e){var O;const t=Es.useQueryClient(),[n,r]=T.useState(!1),[o,s]=T.useState(()=>()=>Promise.resolve()),a=re.useGetIdentity(),c=(O=a==null?void 0:a.data)==null?void 0:O.email,u=re.useDataProvider(),d=T.useCallback(()=>c?u.get("onboarding").then(M=>{var E;return(E=M==null?void 0:M.data)==null?void 0:E.value}):Promise.reject(),[u,c]),{data:h,isLoading:g,isError:m}=Es.useQuery({queryKey:["GET","onboarding",c],queryFn:d,staleTime:24*60*60*1e3,retry:c!==void 0}),[v,b]=T.useState(()=>()=>Promise.resolve()),w=Es.useMutation({mutationFn:v}).mutateAsync;return T.useEffect(()=>{function M(){const E=Z.chain(h??{}).clone().extend({[e]:Date.now()}).value();return u.post("onboarding",E).then(()=>{t.invalidateQueries(["GET","onboarding",c])})}b(()=>M)},[u,h,e,t,c]),T.useEffect(()=>{r(Z.isNil((h??{})[e]))},[h,e,r]),T.useEffect(()=>{s(()=>()=>w())},[w]),{loading:g,error:m,onboardingRequired:n,acknowledgeOnboarding:o}}function rre(e){const[t,n]=n0("onboarding",{}),[r,o]=T.useState(!1),[s,a]=T.useState(()=>()=>Promise.resolve());return T.useEffect(()=>{o(Z.isNil((t??{})[e]))},[t,e,o]),T.useEffect(()=>{a(()=>()=>(n(c=>Z.extend(c,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:s}}function ore(){return{onboardingRequired:!1,acknowledgeOnboarding:T.useRef(()=>Promise.resolve()).current}}function AI(e,t){e0({mode:wI,topic:CI}).validateSync({mode:e,topic:t});const n=nre(t),r=rre(t),o=ore();switch(e){case al.USER:return n.loading?o:n.error?r:Z.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case al.BROWSER:return r;default:return o}}var Rs=(e=>(e.RESTART="RESTART",e.SET_SHOW="SET_SHOW",e.REGISTER_TIP="REGISTER_TIP",e.UNREGISTER_TIP="UNREGISTER_TIP",e.DISMISS_TIP="DISMISS_TIP",e.SET_ON_COMPLETE="SET_ON_COMPLETE",e))(Rs||{});function ire(e,t){var o;const n=Z.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:s}=t;return Z.extend(n,{show:s})}case"REGISTER_TIP":{const{payload:s}=t,{id:a}=s,c=Z.chain(n.tips).clone().reject(h=>h.id===a).value(),u=Z.find(n.tips,{id:a}),d=Z.chain(u??{}).clone().extend(s).value();return c.push(d),Z.extend(n,{tips:Z.sortBy(c,["step"])})}case"UNREGISTER_TIP":{const{payload:s}=t,a=Z.isString(s)?s:s.id,c=Z.chain(n.tips).reject(u=>u.id===a).sortBy(["step"]).value();return Z.extend(n,{tips:c})}case"DISMISS_TIP":{const{payload:s}=t,a=Z.isString(s)?s:s.id,c=Z.chain(n.tips).reject(m=>m.id===a).value(),u=Z.find(n.tips,{id:a});if(Z.isNil(u))return n;const d=Z.chain(u).clone().extend({dismissed:!0}).value();c.push(d);const h=((o=Z.chain(c).reject(m=>m.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(d==null?void 0:d.completeOnboarding)&&Z.chain(c).reject(m=>m.step<h).reject(m=>m.dismissed??!1).isEmpty().value()&&e.onComplete(),Z.extend(n,{tips:Z.sortBy(c,["step"]),currentStep:h})}case"SET_ON_COMPLETE":{const{payload:s}=t;return Z.extend(n,{onComplete:s})}case"RESTART":{const s=Z.chain(n.tips).clone().map(a=>Z.omit(a,"dismissed")).value();return Z.extend(n,{tips:s,currentStep:0})}default:return n}}const w0=T.createContext(void 0);function sre(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=AI(t,n),[s,a]=T.useReducer(ire,{show:r,tips:[],currentStep:0,onComplete:()=>{}}),c=T.useMemo(()=>({state:s,dispatch:a}),[s,a]);return T.useEffect(()=>{a({type:"SET_SHOW",payload:r})},[r,a]),T.useEffect(()=>{function u(){o().then(()=>{a({type:"SET_SHOW",payload:!1})})}a({type:"SET_ON_COMPLETE",payload:u})},[o,a]),p.jsx(w0.Provider,{value:c,children:e.children})}function SI(){const e=T.useContext(w0);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function are(){return SI().state}function TI(){return SI().dispatch}function EI(e){e0({id:ao().required(),step:L2().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:s,currentStep:a}=are(),c=Z.find(s,{id:t}),{dismissed:u}=c??{},d=TI(),h=T.useCallback(()=>{d({type:Rs.DISMISS_TIP,payload:t})},[d,t]);return T.useEffect(()=>{(Z.isNil(c)||n!==(c==null?void 0:c.step))&&d({type:Rs.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,c,d]),T.useEffect(()=>()=>{d({type:Rs.UNREGISTER_TIP,payload:t})},[t,d]),{tip:Z.chain(c??e).clone().extend({open:o&&!Z.isNil(c)&&a===n&&!u}).value(),dismiss:h}}function lre(){const e=TI();return T.useCallback(()=>{e({type:Rs.RESTART})},[e])}function cre(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:s,dismiss:a}=EI({id:t,step:n,completeOnboarding:o}),{open:c}=s,u=Z.omit(e,["id","step","title","completeOnboarding"]);return p.jsx(Cm,{...u,arrow:!0,open:c,title:p.jsxs(A.Stack,{gap:1,children:[p.jsx(A.Typography,{children:r}),p.jsx(A.Button,{onClick:a,variant:"text",color:"primary",size:"small",children:"Got it!"})]}),children:e.children})}const ure=A.styled(cre)(({theme:e})=>{const{palette:t,spacing:n}=e,{primary:r,background:o}=t;return{[`& .${A.tooltipClasses.tooltip}`]:{padding:`${n(1)} ${n(1.5)}`,backgroundColor:r.main,color:r.contrastText,[`& .${A.buttonClasses.root}`]:{backgroundColor:o.paper}},[`& .${A.tooltipClasses.arrow}`]:{color:r.main}}});function II({children:e}){const t=pt.useLocation(),{pathname:n}=t;return T.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),p.jsx(p.Fragment,{children:e})}const dre=fe("div")({width:"100%",overflowX:"auto",display:"block"});function OI({title:e}){return p.jsx(A.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substring(0,1).toUpperCase()})}const fre="RaButton";function pre(e){if(e==null)return;if(typeof e=="string")return{to:e};const{redirect:t,replace:n,state:r,...o}=e;return{to:o,redirect:t,replace:n,state:r}}const hre=fe(A.Button,{name:fre,overridesResolver:(e,t)=>t.root})({"&.MuiButton-sizeSmall":{lineHeight:1.5}});function $d(e){const{disableIconOnly:t=!1,label:n,children:r,className:o,color:s,size:a,disabled:c,alignIcon:u,to:d,...h}=e,g=L.useTranslate(),m=pre(d);if(t){const v=n?g(n,{_:n}):void 0;return p.jsx(hre,{className:o,color:s,size:a,"aria-label":v,disabled:c,startIcon:u==="left"&&r?r:void 0,endIcon:u==="right"&&r?r:void 0,...m,...h,children:v})}return p.jsx(L.Button,{...e})}function A0(e,t){const n=t.id;if(!e)return[t];const r=e.findIndex(o=>o.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]}function gre(e,t){return e&&e.data?{data:A0(e.data,t),total:e.total+1}:e}function mre(e,t){return e&&e.length>0?A0(e,t):e}function vre(e,t){return e&&e.data?{...e,data:A0(e.data,t),total:e.total+1}:e}function yre(e){const{disableFloatingButton:t,label:n="ra.action.create",startIcon:r=p.jsx(qe.PlusCircleOutlined,{}),...o}=e,s=T.useCallback(a=>{var c;a.preventDefault(),a.stopPropagation(),(c=e==null?void 0:e.onClick)==null||c.call(e)},[e]);return t?p.jsx($d,{...o,onClick:s,label:n,children:r}):p.jsx(bq,{...e,onClick:s,label:n,children:r})}function bre(e){const{onSubmit:t,closeDialog:n}=e,{handleSubmit:r}=Ar.useFormContext(),o=re.useTranslate(),s=T.useCallback(a=>{a.preventDefault(),a.stopPropagation(),r(c=>t(c,n))()},[r,t,n]);return p.jsx(A.Button,{onClick:s,color:"primary",variant:"contained",size:"medium",children:o("ra.action.save")})}function xre(e){const{children:t,maxWidth:n="md",fullWidth:r=!0,fullScreen:o,onSubmit:s,mutationOptions:a,scroll:c,...u}=e,d=Es.useQueryClient(),h=re.useResourceContext(),g=re.useTranslate(),m=T.Children.only(t),[v,b]=T.useState(!1),x=T.useCallback(()=>b(!0),[]),w=T.useCallback(()=>b(!1),[]),O=T.useCallback((M,E,R)=>{var D,H;const k=Date.now();d.setQueryData([h,"getOne",{id:M.id}],M),d.setQueriesData([h,"getList"],Y=>vre(Y,M),{updatedAt:k}),d.setQueriesData([h,"getMany"],Y=>mre(Y,M),{updatedAt:k}),d.setQueriesData([h,"getManyReference"],Y=>gre(Y,M),{updatedAt:k}),w(),(H=(D=e==null?void 0:e.mutationOptions)==null?void 0:D.onSuccess)==null||H.call(D,M,E,R)},[w,e.mutationOptions,d,h]);return p.jsxs(p.Fragment,{children:[p.jsx(yre,{...u,onClick:x}),p.jsx(re.CreateBase,{...e,mutationOptions:{...a,onSuccess:O},children:p.jsx(A.Dialog,{open:v,scroll:c,onClose:w,maxWidth:n,fullWidth:r,fullScreen:o,children:T.isValidElement(m)?T.cloneElement(m,{...m.props,modal:!0,toolbar:p.jsxs(Wi,{children:[p.jsx(A.Button,{variant:"text",size:"medium",onClick:w,children:g("ra.action.cancel")}),s?p.jsx(bre,{onSubmit:s,closeDialog:w}):p.jsx(Hm,{type:"button"})]})}):null})})]})}function Cre(e){const t=T.useCallback(n=>{var r;n.preventDefault(),n.stopPropagation(),(r=e==null?void 0:e.onClick)==null||r.call(e)},[e]);return p.jsx(n2,{...e,onClick:t})}function wre(e){const{onSubmit:t,closeDialog:n}=e,{handleSubmit:r}=Ar.useFormContext(),o=T.useCallback(s=>{s.preventDefault(),s.stopPropagation(),r(a=>t(a,n))()},[r,t,n]);return p.jsx($d,{disableIconOnly:!0,onClick:o,color:"primary",variant:"contained",size:"medium",label:"ra.action.save"})}function Are(e){const{children:t,maxWidth:n="md",fullWidth:r=!0,fullScreen:o,mutationOptions:s,onSubmit:a,scroll:c,...u}=e,[d,h]=T.useState(!1),g=T.Children.only(t),m=T.useCallback(()=>h(!0),[]),v=T.useCallback(()=>h(!1),[]),b=T.useCallback((w,O,M)=>{var E,R;v(),(R=(E=e==null?void 0:e.mutationOptions)==null?void 0:E.onSuccess)==null||R.call(E,w,O,M)},[v,e.mutationOptions]),x=re.useRecordContext();return p.jsxs(p.Fragment,{children:[p.jsx(Cre,{...u,onClick:m}),p.jsx(re.EditBase,{...e,id:x.id,mutationMode:"pessimistic",mutationOptions:{...s,onSuccess:b},children:p.jsx(A.Dialog,{open:d,scroll:c,onClose:v,fullWidth:r,maxWidth:n,fullScreen:o,keepMounted:!1,children:T.isValidElement(g)?T.cloneElement(g,{...g.props,modal:!0,toolbar:p.jsxs(Wi,{children:[p.jsx($d,{disableIconOnly:!0,variant:"text",size:"medium",onClick:v,label:"ra.action.cancel"}),a?p.jsx(wre,{onSubmit:a,closeDialog:v}):p.jsx(Hm,{type:"button"})]})}):null})})]})}function Sre({label:e="ra.auth.sign_in",...t}){const n=L.useRecordContext(),[r,o]=T.useState(!1),s=L.useAuthProvider(),a=T.useCallback(c=>{c.stopPropagation(),c.preventDefault(),o(!0),s.impersonate(n==null?void 0:n.id).then(()=>{o(!1),document.location.href="/"})},[s,n==null?void 0:n.id]);return p.jsx(L.Button,{disabled:r||s.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:a,...t,children:p.jsx(Vn.VpnKey,{})})}function Tre({source:e,label:t,variant:n="body1",record:r,spaceBottom:o,spaceTop:s,component:a,leftIcon:c,rightIcon:u,button:d,buttonProps:h,...g}){const{getCurrentDialog:m}=s0(),v=re.useResourceContext(g),b=m(),x=re.useRecordContext(),w=r||x,O=ht.get(w,e||"");return p.jsxs(A.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:M=>({pt:1,pb:1,borderBottom:`1px solid ${M.palette.divider}`,...o&&{mb:2},...s&&{mt:2}}),children:[p.jsxs(A.Stack,{direction:"row",alignItems:"start",children:[c?T.isValidElement(c)?T.cloneElement(c,{style:Xc}):T.createElement(c,{style:Xc}):null,p.jsx(re.FieldTitle,{label:t,source:e,resource:b||v})]}),p.jsxs(A.Stack,{direction:"row",alignItems:"center",children:[a?T.isValidElement(a)?T.cloneElement(a,{record:w,resource:v,value:O}):T.createElement(a,{source:e,record:w,resource:v,value:O}):p.jsx(A.Typography,{variant:n,children:O}),u?T.isValidElement(u)?T.cloneElement(u,{style:Xc}):T.createElement(u,{style:Xc}):null,d?p.jsx(A.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...h,children:d}):null]})]})}const Xc={width:"1.5rem",alignSelf:"center"};function PI(e){const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:s,resource:a,selectedIds:c=[],onUnselectItems:u}=re.useListContext(e),d=re.useTranslate(),h=T.useCallback(()=>{u()},[u]);return p.jsx(Ere,{className:r,children:p.jsxs(A.Toolbar,{"data-test":"bulk-actions-toolbar",className:ct(xr.toolbar,{[xr.collapsed]:c.length===0}),...re.sanitizeListRestProps(o),children:[p.jsxs("div",{className:xr.title,children:[p.jsx(A.IconButton,{className:xr.icon,"aria-label":d("ra.action.unselect"),title:d("ra.action.unselect"),onClick:h,size:"small",children:p.jsx(Vn.Close,{fontSize:"small"})}),p.jsx(A.Typography,{color:"inherit",variant:"subtitle1",children:d(t,{_:t,smart_count:c.length})})]}),p.jsx(L.TopToolbar,{className:xr.topToolbar,children:T.Children.map(n,g=>T.isValidElement(g)?T.cloneElement(g,{filterValues:s,resource:a,selectedIds:c}):null)})]})})}const bi="RaBulkActionsToolbar",xr={toolbar:`${bi}-toolbar`,topToolbar:`${bi}-topToolbar`,buttons:`${bi}-buttons`,collapsed:`${bi}-collapsed`,title:`${bi}-title`,icon:`${bi}-icon`},Ere=fe("div",{name:bi,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${xr.toolbar}`]:{position:"absolute",left:0,right:0,zIndex:3,color:e.palette.mode==="light"?e.palette.primary.main:e.palette.text.primary,justifyContent:"space-between",backgroundColor:e.palette.mode==="light"?xh(e.palette.primary.light,.8):e.palette.primary.dark,minHeight:e.spacing(6),height:e.spacing(6),transform:`translateY(-${e.spacing(6)})`,transition:`${e.transitions.create("height")}, ${e.transitions.create("min-height")}, ${e.transitions.create("transform")}`,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},[`& .${xr.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${xr.buttons}`]:{},[`& .${xr.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${xr.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${xr.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),qp={p:0,m:0},wC={p:2,m:0,borderRadius:0,width:"100%"};function Ire(e){const{children:t}=e,[n,r]=_.useState(null);function o(b){r(b.currentTarget)}function s(){r(null)}const a=A.useMediaQuery(b=>b.breakpoints.down("md")),{filterValues:c,resource:u,selectedIds:d=[],onUnselectItems:h}=L.useListContext(e),g=!!n&&d!==void 0&&d.length>0,m=g?"simple-popover":void 0,v=_.useCallback(()=>{h(),r(null)},[h,r]);return p.jsx(A.Fade,{in:d!==void 0&&d.length>0,children:p.jsxs(A.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[p.jsx(A.Fab,{color:"primary","aria-label":"manage",onClick:o,children:d==null?void 0:d.length}),p.jsx(A.Popover,{id:m,open:g,anchorEl:n,onClose:s,anchorOrigin:{vertical:"top",horizontal:a?"center":"right"},transformOrigin:{vertical:"bottom",horizontal:a?"center":"right"},disableScrollLock:!0,elevation:10,children:p.jsxs(A.List,{sx:qp,children:[p.jsx(A.ListItem,{sx:qp,children:p.jsx(L.Button,{onClick:v,sx:wC,label:"ra.action.unselect",startIcon:p.jsx(Bh,{}),children:p.jsx(Bh,{})})}),_.Children.map(t,b=>{var x;return p.jsx(A.ListItem,{sx:qp,children:_.isValidElement(b)?_.cloneElement(b,{filterValues:c,resource:u,selectedIds:d,sx:wC,...(x=b.props)!=null&&x.popover?{closePopover:s}:{}}):null})})]})})]})})}const jI=T.createContext({});jI.displayName="DatagridContext";function Ore({children:e,value:t}){return p.jsx(jI.Provider,{value:t,children:e})}const AC=p.jsx(L.BulkDeleteButton,{}),RI=_.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?L.PureDatagridBody:L.DatagridBody,header:o=L.DatagridHeader,children:s,className:a,empty:c=Rre,expand:u,bulkActionsToolbar:d=!1,bulkActionButtons:h=AC,hover:g,isRowSelectable:m,isRowExpandable:v,resource:b,rowClick:x,rowSx:w,rowStyle:O,size:M="small",sx:E,expandSingle:R=!1,...P}=e,{sort:k,data:D,isLoading:H,onSelect:Y,onToggleItem:ee,selectedIds:z,setSort:se,total:ae}=re.useListContext(e),X=!!h,K=T.useMemo(()=>({isRowExpandable:v,expandSingle:R}),[v,R]),V=T.useRef(null);T.useEffect(()=>{(!z||z.length===0)&&(V.current=null)},[JSON.stringify(z)]);const te=T.useCallback((N,J)=>{const W=D.map(ue=>ue.id),G=W.indexOf(V.current);if(V.current=J.target.checked?N:null,J.shiftKey&&G!==-1){const ue=W.indexOf(N),he=W.slice(Math.min(G,ue),Math.max(G,ue)+1),de=J.target.checked?xZ(z,he):FZ(z,he);Y(m?de.filter(pe=>m(D.find(me=>me.id===pe))):de)}else ee(N)},[D,m,Y,ee,z]);return H===!0?p.jsx(L.DatagridLoading,{className:a,expand:u,hasBulkActions:X,nbChildren:_.Children.count(s),size:M}):D==null||D.length===0||ae===0?c||null:p.jsx(Ore,{value:K,children:p.jsxs(L.DatagridRoot,{sx:E,className:ct(L.DatagridClasses.root,a),children:[d!=null&&T.isValidElement(d)?T.cloneElement(d,{selectedIds:z,total:ae}):h!==!1?p.jsx(PI,{children:T.isValidElement(h)?h:AC}):null,p.jsx("div",{className:L.DatagridClasses.tableWrapper,children:p.jsxs(A.Table,{ref:t,className:L.DatagridClasses.table,size:M,...jre(P),children:[SC(o,{children:s,sort:k,data:D,hasExpand:!!u,hasBulkActions:X,isRowSelectable:m,onSelect:Y,resource:b,selectedIds:z,setSort:se},s),SC(r,{expand:u,rowClick:x,data:D,hasBulkActions:X,hover:g,onToggleItem:te,resource:b,rowSx:w,rowStyle:O,selectedIds:z,isRowSelectable:m},s)]})})]})})});function SC(e,t,n){return T.isValidElement(e)?T.cloneElement(e,t,n):T.createElement(e,t,n)}const Pre=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"];function jre(e){return Object.keys(re.sanitizeListRestProps(e)).filter(t=>!Pre.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{})}RI.displayName="Datagrid";const Rre=p.jsx(L.ListNoResults,{}),Mre=fe(RI,{slot:"root"})(({theme:e})=>({"& .RaBulkActionsToolbar-toolbar":{height:48},"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .RaBulkActionsToolbar-topToolbar":{backgroundColor:"transparent"},"& .icon span":{top:-1,left:-1},"& th":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",backgroundColor:"inherit !important",textTransform:"none",fontSize:e.typography.subtitle1.fontSize}}));function kre(e){return p.jsx(Mre,{...e})}const Dre=fe("div")(({theme:e})=>({padding:e.spacing(2)}));function Fre({actions:e,className:t,...n}){const{hasCreate:r}=re.useResourceDefinition(n),o=re.useResourceContext(n),s=re.useTranslate(),a=re.useGetResourceLabel(),c=s(`resources.${o}.forcedCaseName`,{smart_count:0,_:a(o,0)}),u=s("ra.page.empty",{name:c}),d=s("ra.page.invite");return p.jsxs(Lre,{className:t,children:[p.jsxs("div",{className:Oi.message,children:[p.jsx(Vn.Inbox,{className:Oi.icon}),p.jsx(A.Typography,{variant:"h4",paragraph:!0,children:s(`resources.${o}.empty`,{_:u})}),r?p.jsx(A.Typography,{variant:"body1",children:s(`resources.${o}.invite`,{_:d})}):null]}),p.jsx(Dre,{className:Oi.toolbar,children:e})]})}const pu="ApplicaEmpty",Oi={message:`${pu}-message`,icon:`${pu}-icon`,toolbar:`${pu}-toolbar`},Lre=fe("span",{name:pu,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${Oi.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${Oi.icon}`]:{width:"9em",height:"9em"},[`& .${Oi.toolbar}`]:{textAlign:"center",marginTop:"2em"}})),_re=p.jsx(L.ListActions,{}),Bre=p.jsx(L.Pagination,{}),Nre=p.jsx(L.Empty,{}),Vre=A.Card;function Wre(e){const{actions:t=_re,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:s,hasCreate:a,pagination:c=Bre,children:u,className:d,component:h=Vre,title:g,empty:m=Nre,...v}=e,{defaultTitle:b,data:x,error:w,isLoading:O,filterValues:M,resource:E}=re.useListContext(e);if(!u||!x&&O&&s)return null;function R(){return p.jsxs("div",{className:_o.main,children:[r||t?p.jsx(L.ListToolbar,{className:_o.actions,filters:r,actions:t,hasCreate:a}):null,!w&&p.jsx(h,{className:_o.content,children:o&&u&&_.isValidElement(u)?T.cloneElement(u,{bulkActionButtons:o}):u}),w?p.jsx(Ym,{error:w,resetErrorBoundary:null}):c!==!1&&c]})}function P(){return m!==!1&&T.cloneElement(m,{className:_o.noResults,hasCreate:a})}const k=!O&&(x==null?void 0:x.length)===0&&!Object.keys(M).length&&m!==!1;return p.jsxs($re,{className:ct("list-page",d),...v,children:[p.jsx(L.Title,{title:g,defaultTitle:b,preferenceKey:`${E}.list.title`}),k?P():R(),n]})}const La="RaList",_o={main:`${La}-main`,content:`${La}-content`,actions:`${La}-actions`,noResults:`${La}-noResults`},$re=fe("div",{name:La,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",[`& .${_o.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${_o.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${_o.actions}`]:{},[`& .${_o.noResults}`]:{}}));function zre({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=Ure,filterDefaultValues:s,perPage:a=10,queryOptions:c,resource:u,sort:d,storeKey:h,...g}){return p.jsx(re.ListBase,{debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o,filterDefaultValues:s,perPage:a,queryOptions:c,resource:u,sort:d,storeKey:h,children:p.jsx(Wre,{...g})})}const Ure={},Hre=Sl(zre,{slot:"root"})(({theme:e})=>({"& .RaList-main":{overflowX:"auto","& .RaBulkActionsToolbar-toolbar":{height:36,top:42,paddingTop:16,"& .RaBulkActionsToolbar-title":{alignItems:"end","& .MuiTypography-root":{alignSelf:"center"}}},"& .MuiToolbar-root":{"& form":{padding:e.spacing(2),paddingBottom:e.spacing(2),alignItems:"flex-start"}},"& .MuiButton-root":{margin:0},"& .RaList-actions":{minHeight:80,alignItems:"center",padding:e.spacing(2.5),"& form":{alignItems:"center",minHeight:"auto",paddingBottom:0,rowGap:e.spacing(2.5)},"& .RaFilterForm-filterFormInput":{margin:0,"& .MuiInputLabel-root":{paddingTop:0},"& .MuiFormControl-root":{marginTop:0},"& .ra-input":{alignSelf:"center",marginTop:0},[e.breakpoints.down("sm")]:{"&>.MuiStack-root":{width:"100%","&>div:not(.MuiStack-root)":{width:"100%"}}}},"& .RaFilterFormInput-hideButton":{margin:"0 !important",alignSelf:"center"},"& > .MuiToolbar-root":{flex:"unset",padding:0,alignSelf:"center",minHeight:"fit-content",[e.breakpoints.down("sm")]:{paddingBottom:e.spacing(2)}}},"& .RaList-content":{borderRadius:0,"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .icon span":{top:-1,left:-1}}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}}));function Gre(e){return p.jsx(Cr,{content:!1,children:p.jsx(Hre,{...e})})}function Yre(){const e=L.useRefresh(),t=L.useNotify(),n=L.useResourceContext(),r=L.useUnselectAll(n),{selectedIds:o,data:s}=L.useListContext(),a=L.useRecordContext(),c=o.map(g=>s.find(m=>m.id===g)),[u,{isLoading:d}]=L.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:Wr().toISOString()},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.readed.done"),r()},onError:()=>t("ra.notification.readed_error",{type:"warning"}),onFailure:()=>t("ra.notification.readed_error",{type:"warning"})}),h=T.useCallback(()=>{u()},[u]);return p.jsx(L.Button,{label:"ra.notification.mark_as_readed",disabled:d||(a==null?void 0:a.readed)!==null,onClick:h,children:p.jsx(Vn.Email,{})})}function qre(){const e=L.useRefresh(),t=L.useNotify(),n=L.useResourceContext(),r=L.useUnselectAll(n),{selectedIds:o,data:s}=L.useListContext(),a=L.useRecordContext(),c=o.map(g=>s.find(m=>m.id===g)).concat([a]),[u,{isLoading:d}]=L.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:null},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),r()},onFailure:()=>t("resources.notifications.messages.unreaded.error",{type:"warning"})}),h=T.useCallback(()=>{u()},[u]);return p.jsx(L.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||a&&!(a!=null&&a.readed),onClick:h,children:p.jsx(Vn.Drafts,{})})}function Kre(e){const t=L.useRecordContext(e),n=L.useResourceContext(e),r=L.useRedirect(),o=L.useNotify(),s=L.useTranslate(),[a]=L.useLocaleState(),c=T.useMemo(()=>t!=null&&t.readed?Wr(t==null?void 0:t.readed).locale(a).format("ddd, DD MMM YYYY HH:mm:ss"):!1,[t==null?void 0:t.readed,a]),[u]=L.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Wr().toISOString()}},{onSuccess:()=>{t!=null&&t.resource&&(t!=null&&t.resource.startsWith("/")?r(t==null?void 0:t.resource):document.location.href=t==null?void 0:t.resource)},onError:()=>{o("ra.notification.readed_error",{type:"warning"})}}),d=T.useCallback(()=>u(),[u]);return p.jsxs("div",{onClick:d,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[p.jsx(A.Typography,{variant:"subtitle1",children:p.jsxs(A.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),p.jsx(A.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:t==null?void 0:t.content}}),c?p.jsx(A.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:s("ra.notification.readed",{readed:c})}):null]})}function Xre({...e}){const t=A.useTheme(),{mode:n,colorize:r,density:o}=T.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?A.darken:A.lighten,density:t.palette.mode==="dark"?.5:.9}),[t.palette.mode]);function s(a){return{backgroundColor:a!=null&&a.readed?r(t.palette.secondary[n],o):r(t.palette.primary[n],o)}}return p.jsxs(L.Datagrid,{...e,rowSx:s,children:[p.jsx(Kre,{source:"notification",sortable:!1}),p.jsx(oT,{source:"created"}),p.jsxs(Fi,{children:[p.jsx(Yre,{}),p.jsx(qre,{})]})]})}const Zre=fe(L.SimpleList,{name:"ApplicaSimpleList",slot:"root"})(({theme:e})=>({padding:e.spacing(1),paddingTop:0,paddingBottom:0}));function Qre({children:e}){const t=Ut();return p.jsx(Cr,{sx:{maxWidth:{xs:400,lg:475},margin:{xs:2.5,md:3},"& > *":{flexGrow:1,flexBasis:"50%"}},content:!1,border:!1,boxShadow:!0,shadow:t.customShadows.z1,children:p.jsx(A.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})}function zd({version:e,name:t,copy:n,children:r,logo:o,background:s=Pd,footer:a=!0}){return p.jsxs(A.Box,{children:[p.jsx(x0,{source:"default"}),T.isValidElement(s)?s:T.createElement(s),p.jsxs(A.Grid,{container:!0,direction:"column",justifyContent:"flex-end",children:[p.jsx(A.Grid,{item:!0,xs:12,sx:{ml:3},children:o||p.jsx(C0,{title:t})}),p.jsxs(A.Grid,{item:!0,xs:12,children:[p.jsx(A.Grid,{item:!0,xs:12,container:!0,justifyContent:"center",alignItems:"center",sx:{minHeight:{xs:"calc(100vh - 210px)",sm:"calc(100vh - 134px)",md:"calc(100vh - 112px)"}},children:p.jsx(A.Grid,{item:!0,children:p.jsx(Qre,{children:r})})}),a?p.jsx(A.Grid,{item:!0,sx:{pb:1,position:"absolute",bottom:0,ml:2},children:p.jsx(b0,{name:t,copy:n,version:e})}):null]})]})]})}function Jre({name:e,copy:t,logo:n,version:r,background:o}){const s=re.useTranslate(),a=re.useAuthProvider(),c=re.useNotify(),u=pt.useNavigate(),{token:d}=pt.useParams();return T.useEffect(()=>{if(typeof a.activate!="function")throw new Error("The authProvider used for the ActivatePage must define an activate() method");a.activate(d).then(()=>{c("ra.auth.activate_success",{type:"info"}),Z.delay(()=>u("/login"),1e3)}).catch(h=>{c(h,{type:"error"}),Z.delay(()=>u("/login"),1e3)})},[d,a,c,u]),p.jsx(zd,{name:e,copy:t,logo:n,version:r,background:o,children:p.jsxs(A.Grid,{container:!0,spacing:3,children:[p.jsx(A.Grid,{item:!0,xs:12,children:p.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(A.Typography,{variant:"h3",children:s("ra.auth.activate")}),p.jsx(A.Typography,{component:pt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:s("ra.auth.back_to_login")})]})}),p.jsx(A.Grid,{item:!0,xs:12,children:s("ra.auth.activate_pending")})]})})}function MI(){const e=T.useCallback(()=>location.reload(),[]);return p.jsx(A.Container,{children:p.jsxs(A.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[p.jsx("img",{alt:"Error",src:yS,style:{width:"100%",maxWidth:450}}),p.jsx(A.Typography,{variant:"h2",children:"Ops! An error occurred..."}),p.jsx(A.Typography,{children:"We're fixing the problem. Please try again later."}),p.jsx(A.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}function kI({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o=!1,enableRegistration:s=!1,redirectTo:a,background:c=p.jsx(Pd,{})}){const[u,d]=re.useSafeSetState(!1),h=re.useLogin(),g=re.useTranslate(),m=re.useNotify(),v=re.useCheckAuth(),b=pt.useNavigate();T.useEffect(()=>{v({},!1).then(()=>{b("/")}).catch(()=>{})},[v,b]);function x(w){d(!0),h(w,a).then(()=>{d(!1)}).catch(O=>{d(!1),m(typeof O=="string"?O:typeof O>"u"||!O.message?"ra.auth.sign_in_error":O.message,{type:"error",messageArgs:{_:typeof O=="string"?O:O&&O.message?O.message:void 0}})})}return p.jsx(zd,{name:t,version:e,copy:n,logo:r,background:c,children:p.jsxs(A.Grid,{container:!0,spacing:3,children:[p.jsx(A.Grid,{item:!0,xs:12,children:p.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(A.Typography,{variant:"h3",children:"Login"}),s?p.jsx(A.Typography,{component:pt.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:g("ra.auth.register")}):null]})}),p.jsx(A.Grid,{item:!0,xs:12,children:p.jsxs(re.Form,{onSubmit:x,children:[p.jsxs(A.Grid,{container:!0,children:[p.jsx(A.Grid,{item:!0,xs:12,sx:{mb:2},children:p.jsx(wr,{autoFocus:!0,source:"username",label:g("ra.auth.username"),autoComplete:"username",validate:re.required(),placeholder:"user@company.name",fullWidth:!0})}),p.jsx(A.Grid,{item:!0,xs:12,sx:{mb:2},children:p.jsx(wr,{source:"password",label:g("ra.auth.password"),type:"password",autoComplete:"current-password",validate:re.required(),placeholder:g("ra.auth.password_placeholder"),fullWidth:!0})})]}),o?p.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(A.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:p.jsx(A.Link,{variant:"h6",component:pt.Link,to:"/recover",color:"text.primary",children:g("ra.auth.forgot_password")})})}):null,p.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(A.Button,{variant:"contained",type:"submit",color:"primary",disabled:u,fullWidth:!0,children:u?p.jsx(A.CircularProgress,{size:19,thickness:3}):g("ra.auth.sign_in")})})]})})]})})}function eoe({name:e,copy:t,logo:n,version:r,background:o}){const[s,a]=T.useState(!1),c=re.useTranslate(),u=re.useRedirect(),d=re.useNotify(),h=re.useAuthProvider();function g({email:m}){a(!0),h.recover(m).then(v=>{const b=`ra.auth.recover_${v.responseCode}`,x=v.responseCode==="ok"?"info":"error";d(b,{type:x}),u("/login")}).catch(v=>{d((v==null?void 0:v.message)||(v==null?void 0:v.toString()),{type:"error"})}).finally(()=>a(!1))}return p.jsx(zd,{name:e,copy:t,logo:n,version:r,background:o,children:p.jsxs(A.Grid,{container:!0,spacing:3,children:[p.jsx(A.Grid,{item:!0,xs:12,children:p.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(A.Typography,{variant:"h3",children:c("ra.auth.recover.title")}),p.jsx(A.Typography,{component:pt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.back_to_login")})]})}),p.jsx(A.Grid,{item:!0,xs:12,children:p.jsxs(L.Form,{onSubmit:g,children:[p.jsx(A.Grid,{container:!0,children:p.jsx(A.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(wr,{source:"email",validate:[re.required(),re.email()]})})}),p.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:p.jsx(A.Typography,{variant:"caption",children:c("ra.auth.recover.inbox_help")})}),p.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(A.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?p.jsx(A.CircularProgress,{size:19,thickness:3}):c("ra.auth.recover")})})]})})]})})}function toe({name:e,copy:t,version:n,logo:r,background:o}){const[s,a]=T.useState(!1),c=re.useTranslate(),u=re.useRedirect(),d=re.useNotify(),h=re.useAuthProvider();function g(m){a(!0),h.register(m).then(v=>{const b=`ra.auth.register_${v.responseCode}`,x=v.responseCode==="ok"?"info":"error";d(b,{type:x}),u("/login")}).catch(v=>{d(v,{type:"error"})}).finally(()=>a(!1))}return p.jsx(zd,{name:e,copy:t,logo:r,background:o,version:n,children:p.jsxs(A.Grid,{container:!0,spacing:3,children:[p.jsx(A.Grid,{item:!0,xs:12,children:p.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(A.Typography,{variant:"h3",children:c("ra.auth.register.title")}),p.jsx(A.Typography,{component:pt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.already_have_account")})]})}),p.jsx(A.Grid,{item:!0,xs:12,children:p.jsxs(L.Form,{onSubmit:g,children:[p.jsxs(A.Grid,{container:!0,children:[p.jsx(A.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(wr,{source:"name",label:c("ra.register.name"),validate:re.required()})}),p.jsx(A.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(wr,{source:"email",type:"email",validate:[re.required(),re.email()]})}),p.jsx(A.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(wr,{source:"password",type:"password",validate:re.required()})})]}),p.jsx(A.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(A.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?p.jsx(A.CircularProgress,{size:19,thickness:3}):c("ra.auth.create_account")})})]})})]})})}function noe(e){return{MuiAccordion:{defaultProps:{disableGutters:!0,square:!0,elevation:0},styleOverrides:{root:{border:`1px solid ${e.palette.secondary.light}`,"&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&.Mui-disabled":{backgroundColor:e.palette.secondary.lighter}}}}}}function roe(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function ooe(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:p.jsx(qe.RightOutlined,{style:{fontSize:"0.75rem"}})},styleOverrides:{root:{backgroundColor:t.secondary.lighter,flexDirection:"row-reverse",minHeight:46},expandIconWrapper:{"&.Mui-expanded":{transform:"rotate(90deg)"}},content:{marginTop:n(1.25),marginBottom:n(1.25),marginLeft:n(1)}}}}}function di({color:e,theme:t}){const n=Qt(t,e),{lighter:r,light:o,main:s}=n;return{borderColor:et(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:s}}}function ioe(e){const t=di({color:"primary",theme:e});return{MuiAlert:{styleOverrides:{root:{color:e.palette.text.primary,fontSize:"0.875rem"},icon:{fontSize:"1rem"},message:{padding:0,marginTop:3},filled:{color:e.palette.grey[0]},border:{padding:"10px 16px",border:"1px solid",...t,"&.MuiAlert-borderPrimary":di({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":di({color:"secondary",theme:e}),"&.MuiAlert-borderError":di({color:"error",theme:e}),"&.MuiAlert-borderSuccess":di({color:"success",theme:e}),"&.MuiAlert-borderInfo":di({color:"info",theme:e}),"&.MuiAlert-borderWarning":di({color:"warning",theme:e})},action:{"& .MuiButton-root":{padding:2,height:"auto",fontSize:"0.75rem",marginTop:-2},"& .MuiIconButton-root":{width:"auto",height:"auto",padding:2,marginRight:6,"& .MuiSvgIcon-root":{fontSize:"1rem"}}}}}}}function soe(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function aoe(e){var t;return{MuiAutocomplete:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{padding:"3px 9px"}},popupIndicator:{width:"auto",height:"auto"},popper:{border:`1px solid ${e.palette.mode==="dark"?(t=e.palette.dark)==null?void 0:t.main:e.palette.grey[100]}`},clearIndicator:{width:"auto",height:"auto"}}}}}function fi({color:e,theme:t}){const n=Qt(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function loe(e){const t=fi({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":fi({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":fi({color:"secondary",theme:e}),"&.MuiBadge-colorError":fi({color:"error",theme:e}),"&.MuiBadge-colorInfo":fi({color:"info",theme:e}),"&.MuiBadge-colorSuccess":fi({color:"success",theme:e}),"&.MuiBadge-colorWarning":fi({color:"warning",theme:e})}}}}}function Xe({variant:e,color:t,theme:n}){const r=Qt(n,t),{lighter:o,main:s,dark:a,contrastText:c}=r,u=`${t}Button`,d=Hs(n,u),h={"&::after":{boxShadow:`0 0 5px 5px ${et(s,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${et(s,.9)}`},"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:a},...h};case"shadow":return{color:c,backgroundColor:s,boxShadow:d,"&:hover":{boxShadow:"none",backgroundColor:a},...h};case"outlined":return{borderColor:s,"&:hover":{color:a,backgroundColor:"transparent",borderColor:a},...h};case"dashed":return{color:s,borderColor:s,backgroundColor:o,"&:hover":{color:a,borderColor:a},...h};case"text":default:return{"&:hover":{color:a,backgroundColor:o},...h}}}function coe(e){const t=Xe({variant:"dashed",color:"primary",theme:e}),n=Xe({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},o={"&>*:nth-of-type(1)":{fontSize:"inherit"}};return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{fontWeight:400,"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}},contained:{...r},outlined:{...r},text:{boxShadow:"none","&:hover":{boxShadow:"none"}},endIcon:{...o},startIcon:{...o},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":Xe({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":Xe({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":Xe({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":Xe({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":Xe({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":Xe({variant:"dashed",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},shadow:{...n,"&.MuiButton-shadowPrimary":Xe({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":Xe({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":Xe({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":Xe({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":Xe({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":Xe({variant:"shadow",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},containedPrimary:Xe({variant:"contained",color:"primary",theme:e}),containedSecondary:Xe({variant:"contained",color:"secondary",theme:e}),containedError:Xe({variant:"contained",color:"error",theme:e}),containedSuccess:Xe({variant:"contained",color:"success",theme:e}),containedInfo:Xe({variant:"contained",color:"info",theme:e}),containedWarning:Xe({variant:"contained",color:"warning",theme:e}),outlinedPrimary:Xe({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:Xe({variant:"outlined",color:"secondary",theme:e}),outlinedError:Xe({variant:"outlined",color:"error",theme:e}),outlinedSuccess:Xe({variant:"outlined",color:"success",theme:e}),outlinedInfo:Xe({variant:"outlined",color:"info",theme:e}),outlinedWarning:Xe({variant:"outlined",color:"warning",theme:e}),textPrimary:Xe({variant:"text",color:"primary",theme:e}),textSecondary:Xe({variant:"text",color:"secondary",theme:e}),textError:Xe({variant:"text",color:"error",theme:e}),textSuccess:Xe({variant:"text",color:"success",theme:e}),textInfo:Xe({variant:"text",color:"info",theme:e}),textWarning:Xe({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function uoe(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function doe(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function foe(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function us({color:e,theme:t}){const n=Qt(t,e),{lighter:r,main:o,dark:s}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:o}},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function poe(e){switch(e){case"small":return{size:16,fontSize:1,position:1};case"large":return{size:24,fontSize:1.6,position:2};case"medium":default:return{size:20,fontSize:1.35,position:2}}}function Kp(e){const t=poe(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function hoe(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:p.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:p.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:p.jsx(qe.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:p.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:p.jsx(qe.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...Kp("small")},"&.size-medium":{...Kp("medium")},"&.size-large":{...Kp("large")}},colorPrimary:us({color:"primary",theme:e}),colorSecondary:us({color:"secondary",theme:e}),colorSuccess:us({color:"success",theme:e}),colorWarning:us({color:"warning",theme:e}),colorInfo:us({color:"info",theme:e}),colorError:us({color:"error",theme:e})}}}}function ds({color:e,theme:t}){const n=Qt(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function Ln({color:e,theme:t}){const n=Qt(t,e),{light:r,lighter:o,main:s}=n;return{color:s,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:s,"&:hover":{color:r}}}}function goe(e){const t=Ln({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":ds({color:"primary",theme:e}),"&.MuiChip-colorSecondary":ds({color:"secondary",theme:e}),"&.MuiChip-colorError":ds({color:"error",theme:e}),"&.MuiChip-colorInfo":ds({color:"info",theme:e}),"&.MuiChip-colorSuccess":ds({color:"success",theme:e}),"&.MuiChip-colorWarning":ds({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":Ln({color:"primary",theme:e}),"&.MuiChip-lightSecondary":Ln({color:"secondary",theme:e}),"&.MuiChip-lightError":Ln({color:"error",theme:e}),"&.MuiChip-lightInfo":Ln({color:"info",theme:e}),"&.MuiChip-lightSuccess":Ln({color:"success",theme:e}),"&.MuiChip-lightWarning":Ln({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":Ln({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":Ln({color:"secondary",theme:e}),"&.MuiChip-combinedError":Ln({color:"error",theme:e}),"&.MuiChip-combinedInfo":Ln({color:"info",theme:e}),"&.MuiChip-combinedSuccess":Ln({color:"success",theme:e}),"&.MuiChip-combinedWarning":Ln({color:"warning",theme:e})}}}}}function moe(e){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:et("#000",.7)},"& .MuiCardContent-root":{[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}},"& .MuiPaper-root:has(.tabbed-form)":{overflowY:"unset",width:"100%"}}}}}}function voe(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function yoe(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function fs({color:e,theme:t}){const n=Qt(t,e),{main:r,dark:o,contrastText:s}=n,a=`${e}Button`,c=Hs(t,a);return{color:s,backgroundColor:r,boxShadow:c,"&:hover":{boxShadow:"none",backgroundColor:o},"&:focus-visible":{outline:`2px solid ${o}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${et(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${et(r,.9)}`}}}function boe(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":fs({color:"primary",theme:e}),"&.MuiFab-secondary":fs({color:"secondary",theme:e}),"&.Mui-error":fs({color:"error",theme:e}),"&.MuiFab-success":fs({color:"success",theme:e}),"&.MuiFab-info":fs({color:"info",theme:e}),"&.MuiFab-warning":fs({color:"warning",theme:e}),"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}}}}}}function xoe(e){return{MuiIconButton:{styleOverrides:{root:{borderRadius:4},sizeLarge:{width:e.spacing(5.5),height:e.spacing(5.5),fontSize:"1.25rem"},sizeMedium:{width:e.spacing(4.5),height:e.spacing(4.5),fontSize:"1rem"},sizeSmall:{width:e.spacing(3.75),height:e.spacing(3.75),fontSize:"0.75rem"},sizeExtraSmall:{width:e.spacing(2.6875),height:e.spacing(2.6875),fontSize:"0.625rem"}}}}}function Coe(e){return{MuiInputBase:{styleOverrides:{}}}}function woe(e){return{MuiInputLabel:{styleOverrides:{root:{color:e.palette.grey[600]},outlined:{lineHeight:"0.8em","&.MuiInputLabel-sizeSmall":{lineHeight:"1.3em"},"&.MuiInputLabel-shrink":{background:e.palette.background.paper,padding:"0 8px",marginLeft:-6,lineHeight:"1.4375em"}}}}}}function Aoe(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function Soe(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function Toe(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function Eoe(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function Ioe(e){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function Ooe(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function pi({variant:e,theme:t}){const n=Qt(t,e),{light:r}=n,o=Hs(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function Poe(e){return{MuiOutlinedInput:{styleOverrides:{input:{padding:"10.5px 14px 10.5px 12px"},notchedOutline:{borderColor:e.palette.mode==="dark"?e.palette.grey[200]:e.palette.grey[300]},root:{...pi({variant:"primary",theme:e}),"&.Mui-error":{...pi({variant:"error",theme:e})}},inputSizeSmall:{padding:"9px 8px 9px 12px"},inputMultiline:{padding:0},colorSecondary:pi({variant:"secondary",theme:e}),colorError:pi({variant:"error",theme:e}),colorWarning:pi({variant:"warning",theme:e}),colorInfo:pi({variant:"info",theme:e}),colorSuccess:pi({variant:"success",theme:e})}}}}function joe(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function Tt({variant:e,color:t,theme:n}){const r=Qt(n,t),{lighter:o,light:s,dark:a,main:c,contrastText:u}=r,d={"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2,...e==="text"&&{backgroundColor:n.palette.background.paper}}};switch(e){case"combined":case"contained":return{color:u,backgroundColor:c,"&:hover":{backgroundColor:s},...d};case"outlined":return{borderColor:c,"&:hover":{backgroundColor:o,borderColor:s},...d};case"text":default:return{color:c,"&:hover":{backgroundColor:c,color:o},...d}}}function Roe(e){return{MuiPaginationItem:{styleOverrides:{root:{"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}},text:{"&.Mui-selected":{backgroundColor:"transparent",fontSize:"1rem",fontWeight:500,"&.MuiPaginationItem-textPrimary":Tt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":Tt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":Tt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":Tt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":Tt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":Tt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":Tt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":Tt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":Tt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":Tt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":Tt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":Tt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":Tt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":Tt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":Tt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":Tt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":Tt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":Tt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":Tt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":Tt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":Tt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":Tt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":Tt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":Tt({variant:"outlined",color:"warning",theme:e})}}}}}}function Moe(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function ps({color:e,theme:t}){const n=Qt(t,e),{lighter:r,main:o,dark:s}=n;return{"& .dot":{backgroundColor:o},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function koe(e){switch(e){case"small":return{size:16,dotSize:8,position:3};case"large":return{size:24,dotSize:12,position:5};case"medium":default:return{size:20,dotSize:10,position:4}}}function Xp(e){const t=koe(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function Doe(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:p.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:p.jsx(A.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:p.jsx(A.Box,{className:"dot",sx:{width:8,height:8,backgroundColor:"inherit",borderRadius:"50%",position:"absolute",top:3,left:3}})})},styleOverrides:{root:{color:t.secondary[300],"&.size-small":{...Xp("small")},"&.size-medium":{...Xp("medium")},"&.size-large":{...Xp("large")}},colorPrimary:ps({color:"primary",theme:e}),colorSecondary:ps({color:"secondary",theme:e}),colorSuccess:ps({color:"success",theme:e}),colorWarning:ps({color:"warning",theme:e}),colorInfo:ps({color:"info",theme:e}),colorError:ps({color:"error",theme:e})}}}}function hs({color:e,theme:t}){const n=Qt(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function Foe(e){return{MuiSlider:{styleOverrides:{track:{height:"1px"},thumb:{width:14,height:14,border:`2px solid ${e.palette.primary.main}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-thumbColorPrimary":hs({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":hs({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":hs({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":hs({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":hs({color:"info",theme:e}),"&.MuiSlider-thumbColorError":hs({color:"error",theme:e})},mark:{width:4,height:4,borderRadius:"50%",border:`1px solid ${e.palette.secondary.light}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-markActive":{opacity:1,borderColor:"inherit",borderWidth:2}},rail:{color:e.palette.secondary.light},root:{"&.Mui-disabled":{".MuiSlider-rail":{opacity:.25},".MuiSlider-track":{color:e.palette.secondary.lighter},".MuiSlider-thumb":{border:`2px solid ${e.palette.secondary.lighter}`}}},valueLabel:{backgroundColor:e.palette.grey[600],color:e.palette.grey[0]}}}}}function Loe(e){switch(e){case"small":return{width:28,height:16,base:12,thumb:10,trackRadius:8};case"large":return{width:60,height:28,base:32,thumb:22,trackRadius:24};case"medium":default:return{width:44,height:22,base:22,thumb:16,trackRadius:16}}}function Zp(e,t){const n=Loe(t);return{width:n.width,height:n.height,"& .MuiSwitch-switchBase":{padding:3,"&.Mui-checked":{transform:`translateX(${n.base}px)`}},"& .MuiSwitch-thumb":{width:n.thumb,height:n.thumb},"& .MuiSwitch-track":{borderRadius:n.trackRadius}}}function _oe(e){return{MuiSwitch:{styleOverrides:{track:{opacity:1,backgroundColor:e.palette.secondary[400],boxSizing:"border-box"},thumb:{borderRadius:"50%",transition:e.transitions.create(["width"],{duration:200})},switchBase:{"&.Mui-checked":{color:"#fff","& + .MuiSwitch-track":{opacity:1},"&.Mui-disabled":{color:e.palette.background.paper}},"&.Mui-disabled":{color:e.palette.background.paper,"+.MuiSwitch-track":{opacity:.3}}},root:{color:e.palette.text.primary,padding:0,margin:8,display:"flex","& ~ .MuiFormControlLabel-label":{margin:6},...Zp(e,"medium")},sizeLarge:{...Zp(e,"large")},sizeSmall:{...Zp(e,"small")}}}}}function Boe(e){return{MuiTab:{styleOverrides:{root:{minHeight:46,color:e.palette.text.primary,borderRadius:4,"&:hover":{backgroundColor:e.palette.primary.lighter+60,color:e.palette.primary.main},"&:focus-visible":{borderRadius:4,outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:-3}}}}}}function Noe(e){const t={"&:hover":{backgroundColor:e.palette.secondary.lighter}};return{MuiTableBody:{styleOverrides:{root:{"&.striped .MuiTableRow-root":{"&:nth-of-type(even)":{backgroundColor:e.palette.grey[50]},...t},"& .MuiTableRow-root":{...t}}}}}}function Voe(e){const t={"&:not(:last-of-type)":{position:"relative","&:after":{position:"absolute",content:'""',backgroundColor:e.palette.divider,width:1,height:"calc(100% - 30px)",right:0,top:16}}};return{MuiTableCell:{styleOverrides:{root:{fontSize:"0.875rem",padding:12,borderColor:e.palette.divider},sizeSmall:{padding:8},head:{fontSize:"0.75rem",fontWeight:700,textTransform:"uppercase",...t},footer:{fontSize:"0.75rem",textTransform:"uppercase",...t}}}}}function Woe(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function $oe(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function zoe(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function Uoe(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function Hoe(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function Goe(e){return{MuiToggleButton:{styleOverrides:{root:{"&.Mui-disabled":{borderColor:e.palette.divider,color:e.palette.text.disabled},"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}}}}}}function Yoe(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function qoe(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function Koe(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function Xoe(e){return ht.merge(noe(e),roe(e),ooe(e),ioe(e),soe(),aoe(e),loe(e),coe(e),uoe(),doe(),foe(),hoe(e),goe(e),moe(e),voe(e),yoe(),boe(e),xoe(e),Coe(),woe(e),Aoe(),Soe(),Toe(e),Eoe(e),Ioe(),Ooe(),Poe(e),joe(),Roe(e),Moe(e),Doe(e),Foe(e),_oe(e),Boe(e),Noe(e),Voe(e),Woe(e),$oe(e),zoe(),Uoe(),Hoe(),Goe(e),Yoe(e),qoe(),Koe())}function Zoe(e){const{blue:t,red:n,gold:r,cyan:o,green:s,grey:a}=e,c={0:a[0],50:a[1],100:a[2],200:a[3],300:a[4],400:a[5],500:a[6],600:a[7],700:a[8],800:a[9],900:a[10],A50:a[15],A100:a[11],A200:a[12],A400:a[13],A700:a[14],A800:a[16]},u="#fff";return{primary:{lighter:t[0],100:t[1],200:t[2],light:t[3],400:t[4],main:t[5],dark:t[6],700:t[7],darker:t[8],900:t[9],contrastText:u},secondary:{lighter:c[100],100:c[100],200:c[200],light:c[300],400:c[400],main:c[500],600:c[600],dark:c[700],800:c[800],darker:c[900],A100:c[0],A200:c.A400,A300:c.A700,contrastText:c[0]},error:{lighter:n[0],light:n[2],main:n[4],dark:n[7],darker:n[9],contrastText:u},warning:{lighter:r[0],light:r[3],main:r[5],dark:r[7],darker:r[9],contrastText:c[100]},info:{lighter:o[0],light:o[3],main:o[5],dark:o[7],darker:o[9],contrastText:u},success:{lighter:s[0],light:s[3],main:s[5],dark:s[7],darker:s[9],contrastText:u},grey:c}}function Qoe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#D6E4FF","#D6E4FF","#ADC8FF","#84A9FF","#6690FF","#3366FF","#254EDB","#1939B7","#102693","#102693"],a=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],c=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],u=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],d=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(s=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],a=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],c=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],u=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],d=["#1f2e1c","#449626","#4fba28","#74cf4d","#e3fbd2"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Joe(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#EEEDFC","#D5D1F8","#B9B2F3","#9C93EE","#877CEA","#7265E6","#6A5DE3","#5F53DF","#5549DB","#4237D5"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function eie(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#E6F3EC","#84c297","#5eb57d","#3da866","#1f9c53","#068e44","#006933","#004222","#001c0f","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function tie(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#f0f6ff","#edf4ff","#bed3f7","#8faeeb","#6488de","#3c64d0","#2947ab","#192f85","#0d1b5e","#070e38"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function nie(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#fff4e6","#ffdfb8","#ffc98f","#ffb066","#ff943d","#f27013","#cc5206","#a63a00","#802800","#591900"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function rie(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#e1f0ef","#c8e3e2","#9ad6d6","#71c6c9","#4bb5bd","#2aa1af","#1a7b8a","#0e5563","#06323d","#021217"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function oie(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#d1e8d99c","#8cdba9","#63cf8e","#3ec277","#1db564","#00a854","#008245","#005c34","#003620","#000f0a"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function iie(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#c1d6d066","#81c9b9","#5bbda9","#38b09c","#1aa391","#009688","#007069","#004a47","#002424","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function sie(e,t,n){switch(t){case"theme1":return Qoe(e,n);case"theme2":return Joe(e,n);case"theme3":return eie(e,n);case"theme4":return tie(e,n);case"theme5":return nie(e,n);case"theme6":return rie(e,n);case"theme7":return oie(e,n);case"theme8":return iie(e,n);default:return Zoe(e)}}var Xh=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Xh.primary=Xh[5];var Zh=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Zh.primary=Zh[5];var Qh=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Qh.primary=Qh[5];var Jh=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Jh.primary=Jh[5];var eg=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];eg.primary=eg[5];var tg=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];tg.primary=tg[5];var ng=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];ng.primary=ng[5];var rg=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];rg.primary=rg[5];var og=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];og.primary=og[5];var ig=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];ig.primary=ig[5];var sg=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];sg.primary=sg[5];var ag=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];ag.primary=ag[5];var lg=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];lg.primary=lg[5];var aie={red:Xh,volcano:Zh,orange:Qh,gold:Jh,yellow:eg,lime:tg,green:ng,cyan:rg,blue:og,geekblue:ig,purple:sg,magenta:ag,grey:lg},cg=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];cg.primary=cg[5];var ug=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];ug.primary=ug[5];var dg=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];dg.primary=dg[5];var fg=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];fg.primary=fg[5];var pg=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];pg.primary=pg[5];var hg=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];hg.primary=hg[5];var gg=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];gg.primary=gg[5];var mg=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];mg.primary=mg[5];var vg=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];vg.primary=vg[5];var yg=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];yg.primary=yg[5];var bg=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];bg.primary=bg[5];var xg=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];xg.primary=xg[5];var Cg=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];Cg.primary=Cg[5];var lie={red:cg,volcano:ug,orange:dg,gold:fg,yellow:pg,lime:hg,green:gg,cyan:mg,blue:vg,geekblue:yg,purple:bg,magenta:xg,grey:Cg};function cie(e,t){const n=e==="dark"?lie:aie;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#121212","#d3d8db"]),n.grey=[...r,...o,...s];const a=sie(n,t,e);return tm({palette:{mode:e,common:{black:"#000",white:"#fff"},...a,text:{primary:e==="dark"?et(a.grey[900],.87):a.grey[700],secondary:e==="dark"?et(a.grey[900],.45):a.grey[500],disabled:e==="dark"?et(a.grey[900],.1):a.grey[400]},action:{disabled:a.grey[300]},divider:e==="dark"?et(a.grey[900],.05):a.grey[200],background:{paper:e==="dark"?a.grey[100]:a.grey[0],default:a.grey.A50}}})}function uie(e){return{button:e.palette.mode==="dark"?"0 2px 0 rgb(0 0 0 / 5%)":"0 2px #0000000b",text:"0 -1px 0 rgb(0 0 0 / 12%)",z1:e.palette.mode==="dark"?"0px 1px 1px rgb(0 0 0 / 14%), 0px 2px 1px rgb(0 0 0 / 12%), 0px 1px 3px rgb(0 0 0 / 20%)":`0px 1px 4px ${et(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${et(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${et(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${et(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${et(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${et(e.palette.info.main,.2)}`,success:`0 0 0 2px ${et(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${et(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${et(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${et(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${et(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${et(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${et(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${et(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${et(e.palette.grey[500],.2)}`}}function die(e){return{htmlFontSize:16,fontFamily:e,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:600,h1:{fontWeight:600,fontSize:"2.375rem",lineHeight:1.21},h2:{fontWeight:600,fontSize:"1.875rem",lineHeight:1.27},h3:{fontWeight:600,fontSize:"1.5rem",lineHeight:1.33},h4:{fontWeight:600,fontSize:"1.25rem",lineHeight:1.4},h5:{fontWeight:600,fontSize:"1rem",lineHeight:1.5},h6:{fontWeight:400,fontSize:"0.875rem",lineHeight:1.57},caption:{fontWeight:400,fontSize:"0.75rem",lineHeight:1.66},body1:{fontSize:"0.875rem",lineHeight:1.57},body2:{fontSize:"0.75rem",lineHeight:1.66},subtitle1:{fontSize:"0.875rem",fontWeight:600,lineHeight:1.57},subtitle2:{fontSize:"0.75rem",fontWeight:500,lineHeight:1.66},overline:{lineHeight:1.66},button:{textTransform:"capitalize"}}}function S0({themeOverrides:e,children:t}){const n=Pn(),{themeDirection:r,mode:o,presetColor:s,fontFamily:a}=n,c=T.useMemo(()=>cie(o,s),[o,s]),u=T.useMemo(()=>die(a),[a]),d=T.useMemo(()=>uie(c),[c]),h=T.useMemo(()=>Z.merge({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:r,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:c.palette,customShadows:d,typography:u,shadows:c.shadows.map(()=>"none"),components:{MuiIconButton:{styleOverrides:{sizeExtraSmall:{width:c.spacing(2.6875),height:c.spacing(2.6875),fontSize:"0.625rem"}}}}},typeof e=="function"?e(c):e),[r,c,u,d,e]),g=tm(h),m=Z.cloneDeep(g.components??{});return g.components=Z.merge(Xoe(g),m),p.jsx(A.StyledEngineProvider,{injectFirst:!0,children:p.jsxs(YA,{theme:g,children:[p.jsx(A.CssBaseline,{enableColorScheme:!0}),t]})})}function fie({children:e,theme:t,...n}){return p.jsx(L.CoreAdminContext,{...n,children:p.jsx(S0,{themeOverrides:t,children:p.jsx(II,{children:e})})})}function DI(e){const{authProvider:t,catchAll:n,children:r,dashboard:o,dataProvider:s,disableTelemetry:a,history:c,i18nProvider:u,layout:d,loading:h,loginPage:g,authCallbackPage:m,menu:v,notification:b,queryClient:x,requireAuth:w,store:O=L.localStorageStore(),ready:M,theme:E,title:R="React Admin"}=e;return p.jsx(fie,{authProvider:t,dataProvider:s,i18nProvider:u,store:O,history:c,queryClient:x,theme:E,children:p.jsx(L.AdminUI,{layout:d,dashboard:o,disableTelemetry:a,menu:v,catchAll:n,title:R,loading:h,loginPage:g,authCallbackPage:m,notification:b,requireAuth:w,ready:M,children:r})})}class FI{constructor({catch:t,display:n,log:r,error:o}){Ca(this,"catch");Ca(this,"display");Ca(this,"log");Ca(this,"error");this.catch=t,this.display=n,this.log=r,this.error=o}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}var ll,cl,Ms;class pie{constructor(t){eo(this,ll);eo(this,cl);eo(this,Ms,new Set);const{apiUrl:n}=t??{};if(!Z.isString(n)||Z.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");Eo(this,cl,n),Eo(this,ll,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handle(t){var c;const{message:n,filename:r,lineno:o,colno:s}=t,a=`${n}${r}${o}${s}`;yn(this,Ms).has(a)||(yn(this,Ms).add(a),fetch(`${yn(this,cl)}/ui/error-log`,{method:"PUT",headers:yn(this,ll),body:JSON.stringify({filename:t.filename,message:t.message,line:t.lineno,column:t.colno,stack:(c=t.error)==null?void 0:c.stack})}).catch(u=>{console.warn("Unable to send error to server",u),yn(this,Ms).delete(a)}))}}ll=new WeakMap,cl=new WeakMap,Ms=new WeakMap;function hie({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=s=>new FI({catch:s!=null,display:!1,log:s!=null,error:s}),...o}){const s=_.useMemo(()=>o.errorHandler?o.errorHandler:new pie({apiUrl:t}),[t,o.errorHandler]),a=console.error,c=_.useCallback(function(u,...d){var g;if(!u)return!1;const h=r(u instanceof ErrorEvent?u:(g=u==null?void 0:u.toString())==null?void 0:g.replace(/%s/g,()=>d.shift()));return h.isCatched()||(h.logError()&&(u instanceof ErrorEvent?s.handle(u):s.handle(new ErrorEvent("window.onerror",{error:u,message:u.toString()}))),h.displayError()&&a.apply(console,arguments)),!1},[r,s,a]);return _.useEffect(()=>(window.removeEventListener("error",c),window.addEventListener("error",c),console.error=c,()=>{window.removeEventListener("error",c),console.error=a}),[c,a]),!0}var ul,dl,Ti;class gie{constructor(t){eo(this,ul);eo(this,dl);eo(this,Ti,[]);const{apiUrl:n}=t??{};if(!Z.isString(n)||Z.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");Eo(this,dl,n),Eo(this,ul,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!Z.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!Z.isString(n)||Z.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!Z.isString(r)||Z.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!Z.some(yn(this,Ti),o=>Z.isEqual(o,{code:n,lang:r}))){yn(this,Ti).push({code:n,lang:r}),fetch(`${yn(this,dl)}/i18n/message`,{method:"put",headers:yn(this,ul),body:JSON.stringify({code:n,lang:r,text:n})}).then(o=>o.json()).then(()=>{console.log(`[MissingMessageHandler] handleMessage: created message for lang ${r} and code ${n}`)}).catch(o=>{console.error(o),Eo(this,Ti,Z.reject(yn(this,Ti),s=>Z.isEqual(s,{code:n,lang:r})))});return}}}ul=new WeakMap,dl=new WeakMap,Ti=new WeakMap;function LI(e){const{apiUrl:t,defaultLocale:n,allowMissing:r=!1,createMissing:o=!1}=e,s=[{locale:n,name:n}],a=new Headers({Accept:"application/json","Content-Type":"application/json"}),c=new gie({apiUrl:t});function u(){return fetch(`${t}/i18n/languages`,{headers:a,method:"get"}).then(g=>g.json()).catch(()=>Promise.resolve(s))}function d(){return fetch(`${t}/i18n/messages`,{headers:a,method:"get"}).then(g=>g.json()).then(g=>g.reduce((m,v)=>({...m,[v.lang]:{...m[v.lang]||{},[v.code]:v.text}}),{}))}function h(g,m,v){return r||console.error(`Warning: Missing translation for key: "${g}"`),o&&(Z.isString(g)?g.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${g}`):c.handleMessage({code:g,lang:v}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),g}return Promise.all([u(),d()]).then(g=>{const[m,v]=g;function b(x){return Z.get(v,x,{})}return XR(b,n,m,{allowMissing:r||o,onMissingKey:h})})}function mie({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})}){const[r,o]=T.useState({loading:!0,languages:null});return T.useEffect(()=>{const s=new Headers;s.append("Accept","application/json"),s.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:s}).then(a=>a.json()).then(a=>o({loading:!1,...n(a)}))},[e,t,n]),r}function _I(e){const[t,n]=T.useState(),r=G2(e);return T.useEffect(()=>{LI(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r]),t}const vie=new Es.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});function yie({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r="en",development:o=!1,logoMain:s,logoIcon:a,loginPage:c=p.jsx(kI,{version:"0.0.0",name:"Applica",redirectTo:"/",background:p.jsx(Pd,{})}),menu:u,name:d,copy:h,version:g="0.0.0",dataProvider:m,authProvider:v,errorHandler:b,error:x,enableNotification:w=!1,enableRegistration:O=!1,enablePasswordRecover:M=!1,enableThemeToggler:E=!1,queryClient:R=vie,background:P,notificationAPI:k="entities/notification",...D}){hie({apiUrl:n,errorHandler:b,catcherFn:z=>{const se=z==null?void 0:z.toString(),X=["Invalid prop `file` of type `string` supplied to `FileInputPreview`, expected `object`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(Switch)`, expected `boolean`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(SwitchBase)`, expected `boolean`.","Support for defaultProps will be removed from function components in a future major release.","validateDOMNesting(...): <form> cannot appear as a descendant of <form>.","Missing translation for key:","HttpError: "].some(V=>se==null?void 0:se.includes(V));return new FI({catch:X,display:!X,log:!X,error:se})}});const H=T.useMemo(()=>T.isValidElement(c)?T.cloneElement(c,{name:d,copy:h,logo:s,version:g,background:P,enableRegistration:O,enablePasswordRecover:M}):c,[c,d,g,h,P,s,O,M]),Y=T.useMemo(()=>z=>{const se=d?p.jsx(C0,{title:d}):s,ae=d?p.jsx(OI,{title:d}):a;return p.jsx(yI,{...z,name:d,copy:h,enableThemeToggler:E,version:g,logoMain:se,logoIcon:ae,notification:k,enableNotification:w,error:x})},[s,a,d,h,g,x,k,w,E]),ee=_I({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o});return ee===void 0?p.jsx(p.Fragment,{}):ee.error?p.jsx(Uh,{initialConfig:t,children:p.jsx(S0,{themeOverrides:e,children:p.jsx(MI,{})})}):p.jsx(QQ,{children:p.jsx(S2,{menu:u,children:p.jsx(Uh,{initialConfig:t,children:p.jsx(DI,{theme:e,layout:Y,notification:xI,queryClient:R,dataProvider:m,authProvider:v,i18nProvider:ee,loginPage:H,...D})})})})}Object.defineProperty(exports,"ArrayField",{enumerable:!0,get:()=>L.ArrayField});Object.defineProperty(exports,"ArrayInputContext",{enumerable:!0,get:()=>L.ArrayInputContext});Object.defineProperty(exports,"BooleanField",{enumerable:!0,get:()=>L.BooleanField});Object.defineProperty(exports,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>L.BulkDeleteWithConfirmButton});Object.defineProperty(exports,"ChipField",{enumerable:!0,get:()=>L.ChipField});Object.defineProperty(exports,"Confirm",{enumerable:!0,get:()=>L.Confirm});Object.defineProperty(exports,"CreateButton",{enumerable:!0,get:()=>L.CreateButton});Object.defineProperty(exports,"CreateContextProvider",{enumerable:!0,get:()=>L.CreateContextProvider});Object.defineProperty(exports,"CustomRoutes",{enumerable:!0,get:()=>L.CustomRoutes});Object.defineProperty(exports,"DeleteWithConfirmButton",{enumerable:!0,get:()=>L.DeleteWithConfirmButton});Object.defineProperty(exports,"DeleteWithUndoButton",{enumerable:!0,get:()=>L.DeleteWithUndoButton});Object.defineProperty(exports,"EditButton",{enumerable:!0,get:()=>L.EditButton});Object.defineProperty(exports,"EditContextProvider",{enumerable:!0,get:()=>L.EditContextProvider});Object.defineProperty(exports,"FieldTitle",{enumerable:!0,get:()=>L.FieldTitle});Object.defineProperty(exports,"FilterButton",{enumerable:!0,get:()=>L.FilterButton});Object.defineProperty(exports,"Form",{enumerable:!0,get:()=>L.Form});Object.defineProperty(exports,"FormDataConsumer",{enumerable:!0,get:()=>L.FormDataConsumer});Object.defineProperty(exports,"HttpError",{enumerable:!0,get:()=>L.HttpError});Object.defineProperty(exports,"I18nContextProvider",{enumerable:!0,get:()=>L.I18nContextProvider});Object.defineProperty(exports,"ListBase",{enumerable:!0,get:()=>L.ListBase});Object.defineProperty(exports,"ListToolbar",{enumerable:!0,get:()=>L.ListToolbar});Object.defineProperty(exports,"LoadingIndicator",{enumerable:!0,get:()=>L.LoadingIndicator});Object.defineProperty(exports,"Pagination",{enumerable:!0,get:()=>L.Pagination});Object.defineProperty(exports,"RaSimpleFormIterator",{enumerable:!0,get:()=>L.SimpleFormIterator});Object.defineProperty(exports,"RecordContextProvider",{enumerable:!0,get:()=>L.RecordContextProvider});Object.defineProperty(exports,"ReferenceArrayField",{enumerable:!0,get:()=>L.ReferenceArrayField});Object.defineProperty(exports,"ReferenceField",{enumerable:!0,get:()=>L.ReferenceField});Object.defineProperty(exports,"Resource",{enumerable:!0,get:()=>L.Resource});Object.defineProperty(exports,"ResourceContextProvider",{enumerable:!0,get:()=>L.ResourceContextProvider});Object.defineProperty(exports,"SaveButton",{enumerable:!0,get:()=>L.SaveButton});Object.defineProperty(exports,"SimpleFormIteratorContext",{enumerable:!0,get:()=>L.SimpleFormIteratorContext});Object.defineProperty(exports,"SimpleShowLayout",{enumerable:!0,get:()=>L.SimpleShowLayout});Object.defineProperty(exports,"SingleFieldList",{enumerable:!0,get:()=>L.SingleFieldList});Object.defineProperty(exports,"TabbedFormTabs",{enumerable:!0,get:()=>L.TabbedFormTabs});Object.defineProperty(exports,"TopToolbar",{enumerable:!0,get:()=>L.TopToolbar});Object.defineProperty(exports,"UrlField",{enumerable:!0,get:()=>L.UrlField});Object.defineProperty(exports,"ValidationError",{enumerable:!0,get:()=>L.ValidationError});Object.defineProperty(exports,"choices",{enumerable:!0,get:()=>L.choices});Object.defineProperty(exports,"email",{enumerable:!0,get:()=>L.email});Object.defineProperty(exports,"maxLength",{enumerable:!0,get:()=>L.maxLength});Object.defineProperty(exports,"maxValue",{enumerable:!0,get:()=>L.maxValue});Object.defineProperty(exports,"minLength",{enumerable:!0,get:()=>L.minLength});Object.defineProperty(exports,"minValue",{enumerable:!0,get:()=>L.minValue});Object.defineProperty(exports,"number",{enumerable:!0,get:()=>L.number});Object.defineProperty(exports,"regex",{enumerable:!0,get:()=>L.regex});Object.defineProperty(exports,"required",{enumerable:!0,get:()=>L.required});Object.defineProperty(exports,"useArrayInput",{enumerable:!0,get:()=>L.useArrayInput});Object.defineProperty(exports,"useAuthProvider",{enumerable:!0,get:()=>L.useAuthProvider});Object.defineProperty(exports,"useChoices",{enumerable:!0,get:()=>L.useChoices});Object.defineProperty(exports,"useChoicesContext",{enumerable:!0,get:()=>L.useChoicesContext});Object.defineProperty(exports,"useCreate",{enumerable:!0,get:()=>L.useCreate});Object.defineProperty(exports,"useCreateContext",{enumerable:!0,get:()=>L.useCreateContext});Object.defineProperty(exports,"useCreateController",{enumerable:!0,get:()=>L.useCreateController});Object.defineProperty(exports,"useCreateSuggestionContext",{enumerable:!0,get:()=>L.useCreateSuggestionContext});Object.defineProperty(exports,"useDataProvider",{enumerable:!0,get:()=>L.useDataProvider});Object.defineProperty(exports,"useEditContext",{enumerable:!0,get:()=>L.useEditContext});Object.defineProperty(exports,"useEditController",{enumerable:!0,get:()=>L.useEditController});Object.defineProperty(exports,"useGetIdentity",{enumerable:!0,get:()=>L.useGetIdentity});Object.defineProperty(exports,"useGetList",{enumerable:!0,get:()=>L.useGetList});Object.defineProperty(exports,"useGetMany",{enumerable:!0,get:()=>L.useGetMany});Object.defineProperty(exports,"useGetManyReference",{enumerable:!0,get:()=>L.useGetManyReference});Object.defineProperty(exports,"useGetOne",{enumerable:!0,get:()=>L.useGetOne});Object.defineProperty(exports,"useInput",{enumerable:!0,get:()=>L.useInput});Object.defineProperty(exports,"useListContext",{enumerable:!0,get:()=>L.useListContext});Object.defineProperty(exports,"useListController",{enumerable:!0,get:()=>L.useListController});Object.defineProperty(exports,"useLocaleState",{enumerable:!0,get:()=>L.useLocaleState});Object.defineProperty(exports,"useLocales",{enumerable:!0,get:()=>L.useLocales});Object.defineProperty(exports,"useNotify",{enumerable:!0,get:()=>L.useNotify});Object.defineProperty(exports,"usePermissions",{enumerable:!0,get:()=>L.usePermissions});Object.defineProperty(exports,"useRecordContext",{enumerable:!0,get:()=>L.useRecordContext});Object.defineProperty(exports,"useRefresh",{enumerable:!0,get:()=>L.useRefresh});Object.defineProperty(exports,"useRemoveFromStore",{enumerable:!0,get:()=>L.useRemoveFromStore});Object.defineProperty(exports,"useResetStore",{enumerable:!0,get:()=>L.useResetStore});Object.defineProperty(exports,"useResourceContext",{enumerable:!0,get:()=>L.useResourceContext});Object.defineProperty(exports,"useResourceDefinition",{enumerable:!0,get:()=>L.useResourceDefinition});Object.defineProperty(exports,"useResourceDefinitions",{enumerable:!0,get:()=>L.useResourceDefinitions});Object.defineProperty(exports,"useShowContext",{enumerable:!0,get:()=>L.useShowContext});Object.defineProperty(exports,"useShowController",{enumerable:!0,get:()=>L.useShowController});Object.defineProperty(exports,"useSimpleFormIterator",{enumerable:!0,get:()=>L.useSimpleFormIterator});Object.defineProperty(exports,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>L.useSimpleFormIteratorItem});Object.defineProperty(exports,"useStore",{enumerable:!0,get:()=>L.useStore});Object.defineProperty(exports,"useStoreContext",{enumerable:!0,get:()=>L.useStoreContext});Object.defineProperty(exports,"useTranslate",{enumerable:!0,get:()=>L.useTranslate});Object.defineProperty(exports,"useTranslateLabel",{enumerable:!0,get:()=>L.useTranslateLabel});Object.defineProperty(exports,"useUnselect",{enumerable:!0,get:()=>L.useUnselect});Object.defineProperty(exports,"useUnselectAll",{enumerable:!0,get:()=>L.useUnselectAll});Object.defineProperty(exports,"useUpdate",{enumerable:!0,get:()=>L.useUpdate});Object.defineProperty(exports,"useUpdateMany",{enumerable:!0,get:()=>L.useUpdateMany});Object.defineProperty(exports,"withLifecycleCallbacks",{enumerable:!0,get:()=>L.withLifecycleCallbacks});exports.ActionsField=tJ;exports.ActionsMenu=Fi;exports.ActivatePage=Jre;exports.Admin=DI;exports.AnimateButton=l9;exports.AppBarStyled=nI;exports.ApplicaAdmin=yie;exports.ArrayInput=eJ;exports.AttachmentField=eT;exports.AttachmentInput=EJ;exports.AuthBackground=Pd;exports.AutocompleteArrayInput=OJ;exports.AutocompleteInput=jJ;exports.Avatar=Ou;exports.BooleanInput=MJ;exports.Breadcrumbs=QA;exports.BulkActionsToolbar=PI;exports.BulkFloatingActionsToolbar=Ire;exports.Button=$d;exports.CardForm=q2;exports.ChangePasswordForm=a0;exports.CircularWithLabel=bN;exports.CircularWithPath=xN;exports.CoverField=nT;exports.Create=aee;exports.CreateInDialogButton=xre;exports.Datagrid=kre;exports.DateAgoField=oT;exports.DateField=uJ;exports.DateInput=DJ;exports.DateTimeInput=LJ;exports.Dot=fm;exports.Drawer=tI;exports.DrawerHeader=GT;exports.DrawerHeaderStyled=UT;exports.DrawerToggle=iI;exports.Edit=uee;exports.EditInDialogButton=Are;exports.EmailField=fJ;exports.Empty=Fre;exports.EmptyClasses=Oi;exports.Error=Ym;exports.FileField=iT;exports.FileInput=BJ;exports.Footer=b0;exports.FormHeader=pee;exports.FunctionField=hJ;exports.GenericErrorPage=MI;exports.Header=sI;exports.HeaderButton=rI;exports.HeaderIconButton=zne;exports.HeaderNotification=aI;exports.HeaderProfile=lI;exports.HeaderSpacer=uI;exports.HeaderToggleButton=ta;exports.HorizontalBar=dI;exports.IconButton=Sd;exports.ImageField=tT;exports.ImageInput=NJ;exports.ImpersonateUserButton=Sre;exports.LabeledArrayInput=J2;exports.LabeledInput=pn;exports.Layout=yI;exports.LayoutContent=zT;exports.LayoutProvider=VT;exports.LayoutWrapper=vI;exports.LinearWithIcon=CN;exports.LinearWithLabel=wN;exports.List=Gre;exports.ListItem=Tre;exports.Loadable=ere;exports.Loader=bI;exports.LoadingButton=gN;exports.LocalStorage=V2;exports.LocaleButton=oI;exports.LocalizedTextField=mJ;exports.LocalizedTextInput=$J;exports.LoginPage=kI;exports.Logo=HT;exports.LongForm=kt;exports.MainCard=Cr;exports.MainIcon=C0;exports.MenuConfigProvider=S2;exports.MenuPopover=vS;exports.NavCollapse=qa;exports.NavGroup=pI;exports.NavItem=Ya;exports.NavList=hI;exports.NavMenu=fI;exports.Navigation=gI;exports.Notification=xI;exports.NotificationList=Xre;exports.NumberInput=UJ;exports.OnboardingActionType=Rs;exports.OnboardingContext=w0;exports.OnboardingModes=al;exports.OnboardingProvider=sre;exports.OnboardingTip=ure;exports.PopupTransition=yN;exports.ReadonlyField=xJ;exports.RecordInput=HJ;exports.RecoverPage=eoe;exports.ReferenceArrayInput=GJ;exports.ReferenceInput=YJ;exports.ReferenceManyField=aT;exports.ReferenceManyInput=qJ;exports.RegisterPage=toe;exports.ResponsiveSection=cI;exports.ScrollTop=II;exports.ScrollX=dre;exports.SearchInput=XJ;exports.SelectArrayInput=QJ;exports.SelectInput=eee;exports.Show=Pee;exports.SimpleBar=eI;exports.SimpleForm=K2;exports.SimpleFormIterator=Ree;exports.SimpleList=Zre;exports.SizeField=AJ;exports.SmallIcon=OI;exports.SmartTextInput=tee;exports.StyledArrow=gS;exports.TabbedForm=d0;exports.TableFormIterator=Bee;exports.TableFormIteratorContext=f0;exports.TableFormIteratorItem=BT;exports.TableFormIteratorItemContext=p0;exports.TextField=sT;exports.TextInput=wr;exports.ThemeColor=x0;exports.ThemeContext=o0;exports.ThemeCustomizationProvider=S0;exports.ThemeProvider=Uh;exports.ThemeToggler=mI;exports.TimeInput=iee;exports.Toolbar=Wi;exports.Tooltip=Cm;exports.Transitions=Mi;exports.createI18nProvider=LI;exports.getLocalizedValue=t0;exports.getPosition=mS;exports.getThemeColor=Qt;exports.getThemeShadow=Hs;exports.localizedValueHasAllLocales=Yu;exports.localizedValueHasAtLeastOneLocale=W2;exports.onboardingModesSchema=wI;exports.onboardingTopicSchema=CI;exports.parseTime=U2;exports.useBreadcrumbs=T2;exports.useGetLocalizedValue=UQ;exports.useI18nLanguages=mie;exports.useI18nProvider=_I;exports.useLayoutContext=h0;exports.useLayoutDispatch=Wee;exports.useLayoutDrawerState=$i;exports.useLayoutLogoState=$T;exports.useLayoutMediaState=Un;exports.useLayoutNotificationsState=Vd;exports.useLayoutState=Js;exports.useLayoutThemeState=$ee;exports.useLocalStorage=n0;exports.useLocalizedValue=zQ;exports.useMemoizedObject=G2;exports.useMenu=qm;exports.useMenuConfig=il;exports.useMenuContext=Ld;exports.useOnboardingDataProvider=AI;exports.useOnboardingTip=EI;exports.usePopoverState=Pl;exports.useRefDimensions=HQ;exports.useResourceDefaultValues=lee;exports.useResourceTitle=r0;exports.useRestartOnboarding=lre;exports.useSx=Tr;exports.useTableFormIterator=_T;exports.useTableFormIteratorItem=Fee;exports.useThemeConfig=Pn;exports.useThemeContext=i0;exports.uuid=HZ;exports.withLayoutProvider=WT;
219
219
  //# sourceMappingURL=react-admin.cjs.js.map