@applica-software-guru/react-admin 1.0.32 → 1.0.33

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.
@@ -90,7 +90,7 @@ __p += '`),Ge&&(oe+=`' +
90
90
  function print() { __p += __j.call(arguments, '') }
91
91
  `:`;
92
92
  `)+oe+`return __p
93
- }`;var Re=VQ(function(){return Xe(v,Ie+"return "+oe).apply(n,S)});if(Re.source=oe,Wg(Re))throw Re;return Re}function Oj(o){return rt(o).toLowerCase()}function Dj(o){return rt(o).toUpperCase()}function Mj(o,i,c){if(o=rt(o),o&&(c||i===n))return JB(o);if(!o||!(i=Bn(i)))return o;var f=zn(o),Q=zn(i),v=XB(f,Q),S=ZB(f,Q)+1;return Jr(f,v,S).join("")}function kj(o,i,c){if(o=rt(o),o&&(c||i===n))return o.slice(0,e0(o)+1);if(!o||!(i=Bn(i)))return o;var f=zn(o),Q=ZB(f,zn(i))+1;return Jr(f,0,Q).join("")}function Fj(o,i,c){if(o=rt(o),o&&(c||i===n))return o.replace(Wu,"");if(!o||!(i=Bn(i)))return o;var f=zn(o),Q=XB(f,zn(i));return Jr(f,Q).join("")}function Lj(o,i){var c=J,f=fe;if(Bt(i)){var Q="separator"in i?i.separator:Q;c="length"in i?Ne(i.length):c,f="omission"in i?Bn(i.omission):f}o=rt(o);var v=o.length;if(li(o)){var S=zn(o);v=S.length}if(c>=v)return o;var M=c-Ai(f);if(M<1)return f;var N=S?Jr(S,0,M).join(""):o.slice(0,M);if(Q===n)return N+f;if(S&&(M+=N.length-M),Ug(Q)){if(o.slice(M).search(Q)){var $,ee=N;for(Q.global||(Q=sg(Q.source,rt(EB.exec(Q))+"g")),Q.lastIndex=0;$=Q.exec(ee);)var oe=$.index;N=N.slice(0,oe===n?M:oe)}}else if(o.indexOf(Bn(Q),M)!=M){var ge=N.lastIndexOf(Q);ge>-1&&(N=N.slice(0,ge))}return N+f}function Nj(o){return o=rt(o),o&&qL.test(o)?o.replace(pB,gR):o}var Rj=hi(function(o,i,c){return o+(c?" ":"")+i.toUpperCase()}),Kg=z0("toUpperCase");function HQ(o,i,c){return o=rt(o),i=c?n:i,i===n?aR(o)?pR(o):ZN(o):o.match(i)||[]}var VQ=He(function(o,i){try{return En(o,n,i)}catch(c){return Wg(c)?c:new ke(c)}}),jj=fr(function(o,i){return On(i,function(c){c=$n(c),gr(o,c,Vg(o[c],o))}),o});function Hj(o){var i=o==null?0:o.length,c=Te();return o=i?ht(o,function(f){if(typeof f[1]!="function")throw new Dn(l);return[c(f[0]),f[1]]}):[],He(function(f){for(var Q=-1;++Q<i;){var v=o[Q];if(En(v[0],this,f))return En(v[1],this,f)}})}function Vj(o){return g3(kn(o,E))}function qg(o){return function(){return o}}function zj(o,i){return o==null||o!==o?i:o}var Wj=U0(),Uj=U0(!0);function cn(o){return o}function _g(o){return B0(typeof o=="function"?o:kn(o,E))}function Yj(o){return m0(kn(o,E))}function Gj(o,i){return y0(o,kn(i,E))}var Kj=He(function(o,i){return function(c){return Es(c,o,i)}}),qj=He(function(o,i){return function(c){return Es(o,c,i)}});function Jg(o,i,c){var f=Ft(i),Q=Ql(i,f);c==null&&!(Bt(i)&&(Q.length||!f.length))&&(c=i,i=o,o=this,Q=Ql(i,Ft(i)));var v=!(Bt(c)&&"chain"in c)||!!c.chain,S=hr(o);return On(Q,function(M){var N=i[M];o[M]=N,S&&(o.prototype[M]=function(){var $=this.__chain__;if(v||$){var ee=o(this.__wrapped__),oe=ee.__actions__=an(this.__actions__);return oe.push({func:N,args:arguments,thisArg:o}),ee.__chain__=$,ee}return N.apply(o,Ur([this.value()],arguments))})}),o}function _j(){return jt._===this&&(jt._=QR),this}function Xg(){}function Jj(o){return o=Ne(o),He(function(i){return b0(i,o)})}var Xj=Tg(ht),Zj=Tg(YB),$j=Tg($u);function zQ(o){return Fg(o)?eg($n(o)):P3(o)}function eH(o){return function(i){return o==null?n:Io(o,i)}}var tH=G0(),nH=G0(!0);function Zg(){return[]}function $g(){return!1}function rH(){return{}}function oH(){return""}function iH(){return!0}function sH(o,i){if(o=Ne(o),o<1||o>Z)return[];var c=R,f=qt(o,R);i=Te(i),o-=R;for(var Q=rg(f,i);++c<o;)i(c);return Q}function aH(o){return Fe(o)?ht(o,$n):Qn(o)?[o]:an(lQ(rt(o)))}function lH(o){var i=++IR;return rt(o)+i}var AH=wl(function(o,i){return o+i},0),cH=Pg("ceil"),uH=wl(function(o,i){return o/i},1),gH=Pg("floor");function dH(o){return o&&o.length?Bl(o,cn,fg):n}function fH(o,i){return o&&o.length?Bl(o,Te(i,2),fg):n}function pH(o){return qB(o,cn)}function hH(o,i){return qB(o,Te(i,2))}function CH(o){return o&&o.length?Bl(o,cn,Eg):n}function EH(o,i){return o&&o.length?Bl(o,Te(i,2),Eg):n}var IH=wl(function(o,i){return o*i},1),BH=Pg("round"),QH=wl(function(o,i){return o-i},0);function mH(o){return o&&o.length?ng(o,cn):0}function yH(o,i){return o&&o.length?ng(o,Te(i,2)):0}return b.after=Y8,b.ary=IQ,b.assign=D6,b.assignIn=MQ,b.assignInWith=Hl,b.assignWith=M6,b.at=k6,b.before=BQ,b.bind=Vg,b.bindAll=jj,b.bindKey=QQ,b.castArray=r6,b.chain=hQ,b.chunk=g5,b.compact=d5,b.concat=f5,b.cond=Hj,b.conforms=Vj,b.constant=qg,b.countBy=m8,b.create=F6,b.curry=mQ,b.curryRight=yQ,b.debounce=bQ,b.defaults=L6,b.defaultsDeep=N6,b.defer=G8,b.delay=K8,b.difference=p5,b.differenceBy=h5,b.differenceWith=C5,b.drop=E5,b.dropRight=I5,b.dropRightWhile=B5,b.dropWhile=Q5,b.fill=m5,b.filter=b8,b.flatMap=w8,b.flatMapDeep=T8,b.flatMapDepth=P8,b.flatten=gQ,b.flattenDeep=y5,b.flattenDepth=b5,b.flip=q8,b.flow=Wj,b.flowRight=Uj,b.fromPairs=v5,b.functions=U6,b.functionsIn=Y6,b.groupBy=S8,b.initial=w5,b.intersection=T5,b.intersectionBy=P5,b.intersectionWith=S5,b.invert=K6,b.invertBy=q6,b.invokeMap=D8,b.iteratee=_g,b.keyBy=M8,b.keys=Ft,b.keysIn=An,b.map=kl,b.mapKeys=J6,b.mapValues=X6,b.matches=Yj,b.matchesProperty=Gj,b.memoize=Ll,b.merge=Z6,b.mergeWith=kQ,b.method=Kj,b.methodOf=qj,b.mixin=Jg,b.negate=Nl,b.nthArg=Jj,b.omit=$6,b.omitBy=ej,b.once=_8,b.orderBy=k8,b.over=Xj,b.overArgs=J8,b.overEvery=Zj,b.overSome=$j,b.partial=zg,b.partialRight=vQ,b.partition=F8,b.pick=tj,b.pickBy=FQ,b.property=zQ,b.propertyOf=eH,b.pull=k5,b.pullAll=fQ,b.pullAllBy=F5,b.pullAllWith=L5,b.pullAt=N5,b.range=tH,b.rangeRight=nH,b.rearg=X8,b.reject=R8,b.remove=R5,b.rest=Z8,b.reverse=jg,b.sampleSize=H8,b.set=rj,b.setWith=oj,b.shuffle=V8,b.slice=j5,b.sortBy=U8,b.sortedUniq=G5,b.sortedUniqBy=K5,b.split=wj,b.spread=$8,b.tail=q5,b.take=_5,b.takeRight=J5,b.takeRightWhile=X5,b.takeWhile=Z5,b.tap=d8,b.throttle=e6,b.thru=Ml,b.toArray=SQ,b.toPairs=LQ,b.toPairsIn=NQ,b.toPath=aH,b.toPlainObject=DQ,b.transform=ij,b.unary=t6,b.union=$5,b.unionBy=e8,b.unionWith=t8,b.uniq=n8,b.uniqBy=r8,b.uniqWith=o8,b.unset=sj,b.unzip=Hg,b.unzipWith=pQ,b.update=aj,b.updateWith=lj,b.values=Ii,b.valuesIn=Aj,b.without=i8,b.words=HQ,b.wrap=n6,b.xor=s8,b.xorBy=a8,b.xorWith=l8,b.zip=A8,b.zipObject=c8,b.zipObjectDeep=u8,b.zipWith=g8,b.entries=LQ,b.entriesIn=NQ,b.extend=MQ,b.extendWith=Hl,Jg(b,b),b.add=AH,b.attempt=VQ,b.camelCase=dj,b.capitalize=RQ,b.ceil=cH,b.clamp=cj,b.clone=o6,b.cloneDeep=s6,b.cloneDeepWith=a6,b.cloneWith=i6,b.conformsTo=l6,b.deburr=jQ,b.defaultTo=zj,b.divide=uH,b.endsWith=fj,b.eq=Un,b.escape=pj,b.escapeRegExp=hj,b.every=y8,b.find=v8,b.findIndex=cQ,b.findKey=R6,b.findLast=x8,b.findLastIndex=uQ,b.findLastKey=j6,b.floor=gH,b.forEach=CQ,b.forEachRight=EQ,b.forIn=H6,b.forInRight=V6,b.forOwn=z6,b.forOwnRight=W6,b.get=Yg,b.gt=A6,b.gte=c6,b.has=G6,b.hasIn=Gg,b.head=dQ,b.identity=cn,b.includes=O8,b.indexOf=x5,b.inRange=uj,b.invoke=_6,b.isArguments=mo,b.isArray=Fe,b.isArrayBuffer=u6,b.isArrayLike=ln,b.isArrayLikeObject=bt,b.isBoolean=g6,b.isBuffer=Xr,b.isDate=d6,b.isElement=f6,b.isEmpty=p6,b.isEqual=h6,b.isEqualWith=C6,b.isError=Wg,b.isFinite=E6,b.isFunction=hr,b.isInteger=xQ,b.isLength=Rl,b.isMap=wQ,b.isMatch=I6,b.isMatchWith=B6,b.isNaN=Q6,b.isNative=m6,b.isNil=b6,b.isNull=y6,b.isNumber=TQ,b.isObject=Bt,b.isObjectLike=yt,b.isPlainObject=bs,b.isRegExp=Ug,b.isSafeInteger=v6,b.isSet=PQ,b.isString=jl,b.isSymbol=Qn,b.isTypedArray=Ei,b.isUndefined=x6,b.isWeakMap=w6,b.isWeakSet=T6,b.join=O5,b.kebabCase=Cj,b.last=Ln,b.lastIndexOf=D5,b.lowerCase=Ej,b.lowerFirst=Ij,b.lt=P6,b.lte=S6,b.max=dH,b.maxBy=fH,b.mean=pH,b.meanBy=hH,b.min=CH,b.minBy=EH,b.stubArray=Zg,b.stubFalse=$g,b.stubObject=rH,b.stubString=oH,b.stubTrue=iH,b.multiply=IH,b.nth=M5,b.noConflict=_j,b.noop=Xg,b.now=Fl,b.pad=Bj,b.padEnd=Qj,b.padStart=mj,b.parseInt=yj,b.random=gj,b.reduce=L8,b.reduceRight=N8,b.repeat=bj,b.replace=vj,b.result=nj,b.round=BH,b.runInContext=L,b.sample=j8,b.size=z8,b.snakeCase=xj,b.some=W8,b.sortedIndex=H5,b.sortedIndexBy=V5,b.sortedIndexOf=z5,b.sortedLastIndex=W5,b.sortedLastIndexBy=U5,b.sortedLastIndexOf=Y5,b.startCase=Tj,b.startsWith=Pj,b.subtract=QH,b.sum=mH,b.sumBy=yH,b.template=Sj,b.times=sH,b.toFinite=Cr,b.toInteger=Ne,b.toLength=OQ,b.toLower=Oj,b.toNumber=Nn,b.toSafeInteger=O6,b.toString=rt,b.toUpper=Dj,b.trim=Mj,b.trimEnd=kj,b.trimStart=Fj,b.truncate=Lj,b.unescape=Nj,b.uniqueId=lH,b.upperCase=Rj,b.upperFirst=Kg,b.each=CQ,b.eachRight=EQ,b.first=dQ,Jg(b,function(){var o={};return Xn(b,function(i,c){it.call(b.prototype,c)||(o[c]=i)}),o}(),{chain:!1}),b.VERSION=r,On(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){b[o].placeholder=b}),On(["drop","take"],function(o,i){We.prototype[o]=function(c){c=c===n?1:Dt(Ne(c),0);var f=this.__filtered__&&!i?new We(this):this.clone();return f.__filtered__?f.__takeCount__=qt(c,f.__takeCount__):f.__views__.push({size:qt(c,R),type:o+(f.__dir__<0?"Right":"")}),f},We.prototype[o+"Right"]=function(c){return this.reverse()[o](c).reverse()}}),On(["filter","map","takeWhile"],function(o,i){var c=i+1,f=c==U||c==X;We.prototype[o]=function(Q){var v=this.clone();return v.__iteratees__.push({iteratee:Te(Q,3),type:c}),v.__filtered__=v.__filtered__||f,v}}),On(["head","last"],function(o,i){var c="take"+(i?"Right":"");We.prototype[o]=function(){return this[c](1).value()[0]}}),On(["initial","tail"],function(o,i){var c="drop"+(i?"":"Right");We.prototype[o]=function(){return this.__filtered__?new We(this):this[c](1)}}),We.prototype.compact=function(){return this.filter(cn)},We.prototype.find=function(o){return this.filter(o).head()},We.prototype.findLast=function(o){return this.reverse().find(o)},We.prototype.invokeMap=He(function(o,i){return typeof o=="function"?new We(this):this.map(function(c){return Es(c,o,i)})}),We.prototype.reject=function(o){return this.filter(Nl(Te(o)))},We.prototype.slice=function(o,i){o=Ne(o);var c=this;return c.__filtered__&&(o>0||i<0)?new We(c):(o<0?c=c.takeRight(-o):o&&(c=c.drop(o)),i!==n&&(i=Ne(i),c=i<0?c.dropRight(-i):c.take(i-o)),c)},We.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},We.prototype.toArray=function(){return this.take(R)},Xn(We.prototype,function(o,i){var c=/^(?:filter|find|map|reject)|While$/.test(i),f=/^(?:head|last)$/.test(i),Q=b[f?"take"+(i=="last"?"Right":""):i],v=f||/^find/.test(i);Q&&(b.prototype[i]=function(){var S=this.__wrapped__,M=f?[1]:arguments,N=S instanceof We,$=M[0],ee=N||Fe(S),oe=function(Ve){var Ge=Q.apply(b,Ur([Ve],M));return f&&ge?Ge[0]:Ge};ee&&c&&typeof $=="function"&&$.length!=1&&(N=ee=!1);var ge=this.__chain__,Ie=!!this.__actions__.length,Pe=v&&!ge,Re=N&&!Ie;if(!v&&ee){S=Re?S:new We(this);var Se=o.apply(S,M);return Se.__actions__.push({func:Ml,args:[oe],thisArg:n}),new Mn(Se,ge)}return Pe&&Re?o.apply(this,M):(Se=this.thru(oe),Pe?f?Se.value()[0]:Se.value():Se)})}),On(["pop","push","shift","sort","splice","unshift"],function(o){var i=il[o],c=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",f=/^(?:pop|shift)$/.test(o);b.prototype[o]=function(){var Q=arguments;if(f&&!this.__chain__){var v=this.value();return i.apply(Fe(v)?v:[],Q)}return this[c](function(S){return i.apply(Fe(S)?S:[],Q)})}}),Xn(We.prototype,function(o,i){var c=b[i];if(c){var f=c.name+"";it.call(di,f)||(di[f]=[]),di[f].push({name:i,func:c})}}),di[xl(n,D).name]=[{name:"wrapper",func:n}],We.prototype.clone=NR,We.prototype.reverse=RR,We.prototype.value=jR,b.prototype.at=f8,b.prototype.chain=p8,b.prototype.commit=h8,b.prototype.next=C8,b.prototype.plant=I8,b.prototype.reverse=B8,b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=Q8,b.prototype.first=b.prototype.head,us&&(b.prototype[us]=E8),b},ci=hR();fo?((fo.exports=ci)._=ci,_u._=ci):jt._=ci}).call(bn)}(Us,Us.exports);var gt=Us.exports;const $d=e=>function(){return e.apply(this,arguments)},Mo=A.shape({id:A.string,title:A.string,type:A.oneOf(["group","item","collapse"]),icon:A.elementType,url:A.string,parent:A.shape($d(()=>Mo)),children:A.arrayOf($d(()=>Mo))}),ef={fontFamily:"'Inter', sans-serif",menuOrientation:"vertical",miniDrawer:!1,container:!1,mode:"light",presetColor:"theme4",themeDirection:"ltr",appDefaultPath:"/",drawerWidth:260,horizontalMaxItems:6,spacing:2},EA=F.createContext(ef),Eb=e=>e==="vertical",Ib=e=>e==="horizontal",IA=({children:e})=>{const[t,n]=bA("theme-config",ef),r=I=>n(B=>({...B,fontFamily:I})),s=I=>n(B=>({...B,menuOrientation:I})),a=I=>n(B=>({...B,miniDrawer:I})),l=I=>n(B=>({...B,container:I})),u=I=>n(B=>({...B,mode:I})),g=I=>n(B=>({...B,presetColor:I})),d=I=>n(B=>({...B,themeDirection:I})),p=I=>n(B=>({...B,appDefaultPath:I})),E=I=>n(B=>({...B,drawerWidth:I})),C=I=>n(B=>({...B,horizontalMaxItems:I}));return h.jsx(EA.Provider,{value:{...t,setFontFamily:r,setMenuOrientation:s,setMiniDrawer:a,setContainer:l,setMode:u,setPresetColor:g,setThemeDirection:d,setAppDefaultPath:p,setDrawerWidth:E,setHorizontalMaxItems:C,isVerticalLayout:Eb,isHorizontalLayout:Ib},children:e})};IA.propTypes={children:A.node};const tf={openItem:["dashboard"],openComponent:"buttons",selectedID:null,drawerOpen:!1,componentDrawerOpen:!0,menuDashboard:{},error:null},BA=F.createContext(tf),QA=({menu:e,children:t})=>{const[n,r]=bA("menu-config",{...tf}),s=E=>{r(C=>({...C,openItem:E}))},a=E=>{r(C=>({...C,selectedID:E}))},l=E=>{r(C=>({...C,openComponent:E}))},u=E=>{r(C=>({...C,drawerOpen:E}))},g=E=>{r(C=>({...C,componentDrawerOpen:E}))},d=E=>{r(C=>({...C,menuDashboard:E}))},p=E=>{r(C=>({...C,error:E}))};return h.jsx(BA.Provider,{value:{...n,groups:e,activeItem:s,activeComponent:l,openDrawer:u,openComponentDrawer:g,activeID:a,getMenuSuccess:d,hasError:p},children:t})};QA.propTypes={children:A.node,menu:A.arrayOf(Mo)};const Rn=()=>F.useContext(BA),Bb=["e-","entities/"],Qb=e=>{let t=e;return Bb.forEach(n=>{t=t!=null&&t.startsWith(n)?t==null?void 0:t.substring(n.length):t}),t},mb=(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"},yb=(e,t)=>{const n=Qb(e.name);return t==null?void 0:t.includes(`${n}:list`)},mA=(e,t)=>{let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const s=e[r];if(s.children&&(n=mA(s.children,t),n))return n}return n},nf=(e,t,n)=>{let r=e.find(s=>["group","collapse"].indexOf(s.type)!==-1&&mb(s,t));if(!r)for(let s=0;s<e.length;s++){const a=e[s];if(a.children&&(r=nf(a.children,t),r))return r}return r},rf=(e,t)=>{let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const s=e[r];if(s.children&&(n=rf(s.children,t),n))return n}return n},of=e=>e?e.type==="item"?!0:(e.children&&(e.children=e.children.filter(of)),e.children&&e.children.length>0):!1,sf=e=>(e.children&&e.children.forEach(t=>{t.parent=e,sf(t)}),e),bb=({userGroups:e,resources:t,permissions:n,translate:r})=>{const s=p=>(p.title=r(p.title,{_:p.title}),p.children&&p.children.forEach(E=>s(E)),p),a=Object.keys(t),l=(p,E)=>(p.children&&(p.children=p.children.filter(C=>C.type==="item"?E.includes(C.id):(l(C,E),C.children&&C.children.length>0))),p),u=gt.cloneDeep(e).map(p=>({type:"group",icon:ot.AntDesignOutlined,children:[],...p})).map(s).map(p=>l(p,a)),g=Object.values(t).map(p=>{var E;return((E=p.options)==null?void 0:E.group)||"admin"}).filter((p,E,C)=>C.indexOf(p)===E).filter(p=>p!==void 0&&rf(e,p)===null).map(p=>({id:p,title:r(`ra.menu.group.${p}`),type:"group",icon:ot.AntDesignOutlined,children:[]})),d=[...u,...g];return Object.values(t).forEach(p=>{var I,B,m,y,D;if(!p.hasList)return;const E=nf(d,p),C=(I=E==null?void 0:E.children)==null?void 0:I.some(k=>k.id===p.name);if(!yb(p,n)){C&&((B=E==null?void 0:E.children)==null?void 0:B.length)>0&&(E.children=E.children.filter(k=>k.id!==p.name));return}if(E){if(E.children||(E.children=[]),C)return;E.children.push({id:p.name,type:"item",title:r(((m=p.options)==null?void 0:m.label)||`ra.menu.item.${p.name}`,{_:((y=p.options)==null?void 0:y.label)||p.name}),url:`/${p.name}`,icon:(D=p.options)==null?void 0:D.icon})}}),d.filter(of).map(sf)},yA=()=>{const e=x.useResourceDefinitions(),{isLoading:t,data:n}=x.useGetIdentity(),{permissions:r}=x.usePermissions(),{groups:s}=Rn(),a=x.useTranslate(),l=F.useMemo(()=>t||!n||n===null||(n==null?void 0:n.id)<=0?null:bb({resources:e,permissions:r,translate:a,userGroups:s}),[t,n,e,r,a,s]),u=F.useMemo(()=>t,[t]);return{menu:l,isLoading:u,getItem:g=>u?!1:mA(l,g),findInMenu:u?()=>{}:mA}},af=()=>{const e=x.useTranslate(),{isLoading:t,menu:n,findInMenu:r}=yA(),{pathname:s}=Tt.useLocation();return F.useMemo(()=>{var E;const a=s.split("/").filter(C=>C);let l=gt.cloneDeep(n),u=s,g=r(l,s);if(g||(g=r(l,a[a.length-1]),u=g?g.id:u),!g)for(let C=a.length;C>=0;C--){let I=a.slice(0,C).join("/");if(g=r(l,I),g){u=g.id;break}}const d=(E=g==null?void 0:g.url)==null?void 0:E.split("/");if(a.length>=(d==null?void 0:d.length)){const C=a[a.length-1];if(g){const I=C==="create"||s===g.url?"create":"edit",B=`resources.${u}.breadcrumbs.${I}`,m={id:`${u}-${I}`,type:"item",title:e(B,{_:e(B,{_:B})}),url:s,breadcrumbs:!0,parent:g};g.type="collapse",g.breadcrumbs=!0,g.children=g.children||[],g.children.push(m),g=m}}let p=[];if(g){let C={...g,last:!0};for(;C;)p.push(C),C=C.parent;p=p.reverse()}return{isLoading:t,navigation:{items:l},breadcrumbs:p}},[t,s,n,r,e])};function bA(e,t){const[n,r]=F.useState(()=>{const a=typeof window<"u"?localStorage.getItem(e):null;return a===null?t:JSON.parse(a)});return F.useEffect(()=>{const a=l=>{typeof window<"u"&&l.storageArea===localStorage&&l.key===e&&r(l.newValue?JSON.parse(l.newValue):l.newValue)};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}},[e,t]),[n,a=>{r(l=>{const u=typeof a=="function"?a(l):a;return typeof window<"u"&&localStorage.setItem(e,JSON.stringify(u)),u})}]}const lf=e=>{const t=x.useRecordContext(),n=x.useTranslate(),r=x.useResourceContext(),s=t!=null&&t.id?"edit":"create";return F.useMemo(()=>{const l=`resources.${r}.title`;return e||n(`resources.${r}.title.${s}`,{_:n(l,{_:l}),...t})},[s,t,r,n,e])},Nt=()=>F.useContext(EA),Af={p:2.5,"& .MuiCardHeader-action":{m:"0px auto",alignSelf:"center"}},jn=F.forwardRef(({border:e=!0,boxShadow:t,children:n,subheader:r,content:s=!0,contentSX:a={},darkTitle:l,divider:u=!0,elevation:g,secondary:d,shadow:p,sx:E={},title:C,modal:I=!1,...B},m)=>{const y=lt();return t=y.palette.mode==="dark"?t||!0:t,h.jsxs(w.Card,{elevation:g||0,ref:m,...B,sx:{position:"relative",border:e?"1px solid":"none",borderRadius:1,borderColor:y.palette.mode==="dark"?y.palette.divider:y.palette.grey.A800,boxShadow:t&&(!e||y.palette.mode==="dark")?p||y.customShadows.z1:"inherit",":hover":{boxShadow:t?p||y.customShadows.z1:"inherit"},...I&&{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:"calc( 100% - 50px)",sm:"auto"},"& .MuiCardContent-root":{overflowY:"auto",minHeight:"auto",maxHeight:"calc(100vh - 200px)"}},...E},children:[!l&&C&&h.jsx(w.CardHeader,{sx:Af,titleTypographyProps:{variant:"subtitle1"},title:C,action:d,subheader:r}),l&&C&&h.jsx(w.CardHeader,{sx:Af,title:h.jsx(w.Typography,{variant:"h4",children:C}),action:d}),C&&u&&h.jsx(w.Divider,{}),s&&h.jsx(w.CardContent,{sx:a,children:n}),!s&&n]})});jn.propTypes={border:A.bool,boxShadow:A.bool,children:A.oneOfType([A.node,A.arrayOf(A.node)]),subheader:A.oneOfType([A.node,A.string]),content:A.bool,contentClass:A.string,contentSX:A.object,darkTitle:A.bool,divider:A.bool,elevation:A.number,secondary:A.oneOfType([A.node,A.string,A.object]),shadow:A.string,sx:A.object,title:A.oneOfType([A.node,A.string,A.object]),modal:A.bool};function cf(e){return typeof e=="string"}function vb(e,t,n){return e===void 0||cf(e)?t:W({},t,{ownerState:W({},t.ownerState,n)})}const xb={disableDefaultClasses:!1},wb=G.createContext(xb);function Tb(e){const{disableDefaultClasses:t}=G.useContext(wb);return n=>t?"":e(n)}function Pb(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function vA(e,t,n){return typeof e=="function"?e(t,n):e}function uf(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Sb(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:s,className:a}=e;if(!t){const I=Je(s==null?void 0:s.className,r==null?void 0:r.className,a,n==null?void 0:n.className),B=W({},n==null?void 0:n.style,s==null?void 0:s.style,r==null?void 0:r.style),m=W({},n,s,r);return I.length>0&&(m.className=I),Object.keys(B).length>0&&(m.style=B),{props:m,internalRef:void 0}}const l=Pb(W({},s,r)),u=uf(r),g=uf(s),d=t(l),p=Je(d==null?void 0:d.className,n==null?void 0:n.className,a,s==null?void 0:s.className,r==null?void 0:r.className),E=W({},d==null?void 0:d.style,n==null?void 0:n.style,s==null?void 0:s.style,r==null?void 0:r.style),C=W({},d,n,g,u);return p.length>0&&(C.className=p),Object.keys(E).length>0&&(C.style=E),{props:C,internalRef:d.ref}}const Ob=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function xA(e){var t;const{elementType:n,externalSlotProps:r,ownerState:s,skipResolvingSlotProps:a=!1}=e,l=Ke(e,Ob),u=a?{}:vA(r,s),{props:g,internalRef:d}=Sb(W({},l,{externalSlotProps:u})),p=yr(d,u==null?void 0:u.ref,(t=e.additionalProps)==null?void 0:t.ref);return vb(n,W({},g,{ref:p}),s)}const Db=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Mb(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function kb(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function Fb(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||kb(e))}function Lb(e){const t=[],n=[];return Array.from(e.querySelectorAll(Db)).forEach((r,s)=>{const a=Mb(r);a===-1||!Fb(r)||(a===0?t.push(r):n.push({documentOrder:s,tabIndex:a,node:r}))}),n.sort((r,s)=>r.tabIndex===s.tabIndex?r.documentOrder-s.documentOrder:r.tabIndex-s.tabIndex).map(r=>r.node).concat(t)}function Nb(){return!0}function Ys(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:s=!1,getTabbable:a=Lb,isEnabled:l=Nb,open:u}=e,g=G.useRef(!1),d=G.useRef(null),p=G.useRef(null),E=G.useRef(null),C=G.useRef(null),I=G.useRef(!1),B=G.useRef(null),m=yr(t.ref,B),y=G.useRef(null);G.useEffect(()=>{!u||!B.current||(I.current=!n)},[n,u]),G.useEffect(()=>{if(!u||!B.current)return;const P=mr(B.current);return B.current.contains(P.activeElement)||(B.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
93
+ }`;var Re=VQ(function(){return Xe(v,Ie+"return "+oe).apply(n,S)});if(Re.source=oe,Wg(Re))throw Re;return Re}function Oj(o){return rt(o).toLowerCase()}function Dj(o){return rt(o).toUpperCase()}function Mj(o,i,c){if(o=rt(o),o&&(c||i===n))return JB(o);if(!o||!(i=Bn(i)))return o;var f=zn(o),Q=zn(i),v=XB(f,Q),S=ZB(f,Q)+1;return Jr(f,v,S).join("")}function kj(o,i,c){if(o=rt(o),o&&(c||i===n))return o.slice(0,e0(o)+1);if(!o||!(i=Bn(i)))return o;var f=zn(o),Q=ZB(f,zn(i))+1;return Jr(f,0,Q).join("")}function Fj(o,i,c){if(o=rt(o),o&&(c||i===n))return o.replace(Wu,"");if(!o||!(i=Bn(i)))return o;var f=zn(o),Q=XB(f,zn(i));return Jr(f,Q).join("")}function Lj(o,i){var c=J,f=fe;if(Bt(i)){var Q="separator"in i?i.separator:Q;c="length"in i?Ne(i.length):c,f="omission"in i?Bn(i.omission):f}o=rt(o);var v=o.length;if(li(o)){var S=zn(o);v=S.length}if(c>=v)return o;var M=c-Ai(f);if(M<1)return f;var N=S?Jr(S,0,M).join(""):o.slice(0,M);if(Q===n)return N+f;if(S&&(M+=N.length-M),Ug(Q)){if(o.slice(M).search(Q)){var $,ee=N;for(Q.global||(Q=sg(Q.source,rt(EB.exec(Q))+"g")),Q.lastIndex=0;$=Q.exec(ee);)var oe=$.index;N=N.slice(0,oe===n?M:oe)}}else if(o.indexOf(Bn(Q),M)!=M){var ge=N.lastIndexOf(Q);ge>-1&&(N=N.slice(0,ge))}return N+f}function Nj(o){return o=rt(o),o&&qL.test(o)?o.replace(pB,gR):o}var Rj=hi(function(o,i,c){return o+(c?" ":"")+i.toUpperCase()}),Kg=z0("toUpperCase");function HQ(o,i,c){return o=rt(o),i=c?n:i,i===n?aR(o)?pR(o):ZN(o):o.match(i)||[]}var VQ=He(function(o,i){try{return En(o,n,i)}catch(c){return Wg(c)?c:new ke(c)}}),jj=fr(function(o,i){return On(i,function(c){c=$n(c),gr(o,c,Vg(o[c],o))}),o});function Hj(o){var i=o==null?0:o.length,c=Te();return o=i?ht(o,function(f){if(typeof f[1]!="function")throw new Dn(l);return[c(f[0]),f[1]]}):[],He(function(f){for(var Q=-1;++Q<i;){var v=o[Q];if(En(v[0],this,f))return En(v[1],this,f)}})}function Vj(o){return g3(kn(o,E))}function qg(o){return function(){return o}}function zj(o,i){return o==null||o!==o?i:o}var Wj=U0(),Uj=U0(!0);function cn(o){return o}function _g(o){return B0(typeof o=="function"?o:kn(o,E))}function Yj(o){return m0(kn(o,E))}function Gj(o,i){return y0(o,kn(i,E))}var Kj=He(function(o,i){return function(c){return Es(c,o,i)}}),qj=He(function(o,i){return function(c){return Es(o,c,i)}});function Jg(o,i,c){var f=Ft(i),Q=Ql(i,f);c==null&&!(Bt(i)&&(Q.length||!f.length))&&(c=i,i=o,o=this,Q=Ql(i,Ft(i)));var v=!(Bt(c)&&"chain"in c)||!!c.chain,S=hr(o);return On(Q,function(M){var N=i[M];o[M]=N,S&&(o.prototype[M]=function(){var $=this.__chain__;if(v||$){var ee=o(this.__wrapped__),oe=ee.__actions__=an(this.__actions__);return oe.push({func:N,args:arguments,thisArg:o}),ee.__chain__=$,ee}return N.apply(o,Ur([this.value()],arguments))})}),o}function _j(){return jt._===this&&(jt._=QR),this}function Xg(){}function Jj(o){return o=Ne(o),He(function(i){return b0(i,o)})}var Xj=Tg(ht),Zj=Tg(YB),$j=Tg($u);function zQ(o){return Fg(o)?eg($n(o)):P3(o)}function eH(o){return function(i){return o==null?n:Io(o,i)}}var tH=G0(),nH=G0(!0);function Zg(){return[]}function $g(){return!1}function rH(){return{}}function oH(){return""}function iH(){return!0}function sH(o,i){if(o=Ne(o),o<1||o>Z)return[];var c=R,f=qt(o,R);i=Te(i),o-=R;for(var Q=rg(f,i);++c<o;)i(c);return Q}function aH(o){return Fe(o)?ht(o,$n):Qn(o)?[o]:an(lQ(rt(o)))}function lH(o){var i=++IR;return rt(o)+i}var AH=wl(function(o,i){return o+i},0),cH=Pg("ceil"),uH=wl(function(o,i){return o/i},1),gH=Pg("floor");function dH(o){return o&&o.length?Bl(o,cn,fg):n}function fH(o,i){return o&&o.length?Bl(o,Te(i,2),fg):n}function pH(o){return qB(o,cn)}function hH(o,i){return qB(o,Te(i,2))}function CH(o){return o&&o.length?Bl(o,cn,Eg):n}function EH(o,i){return o&&o.length?Bl(o,Te(i,2),Eg):n}var IH=wl(function(o,i){return o*i},1),BH=Pg("round"),QH=wl(function(o,i){return o-i},0);function mH(o){return o&&o.length?ng(o,cn):0}function yH(o,i){return o&&o.length?ng(o,Te(i,2)):0}return b.after=Y8,b.ary=IQ,b.assign=D6,b.assignIn=MQ,b.assignInWith=Hl,b.assignWith=M6,b.at=k6,b.before=BQ,b.bind=Vg,b.bindAll=jj,b.bindKey=QQ,b.castArray=r6,b.chain=hQ,b.chunk=g5,b.compact=d5,b.concat=f5,b.cond=Hj,b.conforms=Vj,b.constant=qg,b.countBy=m8,b.create=F6,b.curry=mQ,b.curryRight=yQ,b.debounce=bQ,b.defaults=L6,b.defaultsDeep=N6,b.defer=G8,b.delay=K8,b.difference=p5,b.differenceBy=h5,b.differenceWith=C5,b.drop=E5,b.dropRight=I5,b.dropRightWhile=B5,b.dropWhile=Q5,b.fill=m5,b.filter=b8,b.flatMap=w8,b.flatMapDeep=T8,b.flatMapDepth=P8,b.flatten=gQ,b.flattenDeep=y5,b.flattenDepth=b5,b.flip=q8,b.flow=Wj,b.flowRight=Uj,b.fromPairs=v5,b.functions=U6,b.functionsIn=Y6,b.groupBy=S8,b.initial=w5,b.intersection=T5,b.intersectionBy=P5,b.intersectionWith=S5,b.invert=K6,b.invertBy=q6,b.invokeMap=D8,b.iteratee=_g,b.keyBy=M8,b.keys=Ft,b.keysIn=An,b.map=kl,b.mapKeys=J6,b.mapValues=X6,b.matches=Yj,b.matchesProperty=Gj,b.memoize=Ll,b.merge=Z6,b.mergeWith=kQ,b.method=Kj,b.methodOf=qj,b.mixin=Jg,b.negate=Nl,b.nthArg=Jj,b.omit=$6,b.omitBy=ej,b.once=_8,b.orderBy=k8,b.over=Xj,b.overArgs=J8,b.overEvery=Zj,b.overSome=$j,b.partial=zg,b.partialRight=vQ,b.partition=F8,b.pick=tj,b.pickBy=FQ,b.property=zQ,b.propertyOf=eH,b.pull=k5,b.pullAll=fQ,b.pullAllBy=F5,b.pullAllWith=L5,b.pullAt=N5,b.range=tH,b.rangeRight=nH,b.rearg=X8,b.reject=R8,b.remove=R5,b.rest=Z8,b.reverse=jg,b.sampleSize=H8,b.set=rj,b.setWith=oj,b.shuffle=V8,b.slice=j5,b.sortBy=U8,b.sortedUniq=G5,b.sortedUniqBy=K5,b.split=wj,b.spread=$8,b.tail=q5,b.take=_5,b.takeRight=J5,b.takeRightWhile=X5,b.takeWhile=Z5,b.tap=d8,b.throttle=e6,b.thru=Ml,b.toArray=SQ,b.toPairs=LQ,b.toPairsIn=NQ,b.toPath=aH,b.toPlainObject=DQ,b.transform=ij,b.unary=t6,b.union=$5,b.unionBy=e8,b.unionWith=t8,b.uniq=n8,b.uniqBy=r8,b.uniqWith=o8,b.unset=sj,b.unzip=Hg,b.unzipWith=pQ,b.update=aj,b.updateWith=lj,b.values=Ii,b.valuesIn=Aj,b.without=i8,b.words=HQ,b.wrap=n6,b.xor=s8,b.xorBy=a8,b.xorWith=l8,b.zip=A8,b.zipObject=c8,b.zipObjectDeep=u8,b.zipWith=g8,b.entries=LQ,b.entriesIn=NQ,b.extend=MQ,b.extendWith=Hl,Jg(b,b),b.add=AH,b.attempt=VQ,b.camelCase=dj,b.capitalize=RQ,b.ceil=cH,b.clamp=cj,b.clone=o6,b.cloneDeep=s6,b.cloneDeepWith=a6,b.cloneWith=i6,b.conformsTo=l6,b.deburr=jQ,b.defaultTo=zj,b.divide=uH,b.endsWith=fj,b.eq=Un,b.escape=pj,b.escapeRegExp=hj,b.every=y8,b.find=v8,b.findIndex=cQ,b.findKey=R6,b.findLast=x8,b.findLastIndex=uQ,b.findLastKey=j6,b.floor=gH,b.forEach=CQ,b.forEachRight=EQ,b.forIn=H6,b.forInRight=V6,b.forOwn=z6,b.forOwnRight=W6,b.get=Yg,b.gt=A6,b.gte=c6,b.has=G6,b.hasIn=Gg,b.head=dQ,b.identity=cn,b.includes=O8,b.indexOf=x5,b.inRange=uj,b.invoke=_6,b.isArguments=mo,b.isArray=Fe,b.isArrayBuffer=u6,b.isArrayLike=ln,b.isArrayLikeObject=bt,b.isBoolean=g6,b.isBuffer=Xr,b.isDate=d6,b.isElement=f6,b.isEmpty=p6,b.isEqual=h6,b.isEqualWith=C6,b.isError=Wg,b.isFinite=E6,b.isFunction=hr,b.isInteger=xQ,b.isLength=Rl,b.isMap=wQ,b.isMatch=I6,b.isMatchWith=B6,b.isNaN=Q6,b.isNative=m6,b.isNil=b6,b.isNull=y6,b.isNumber=TQ,b.isObject=Bt,b.isObjectLike=yt,b.isPlainObject=bs,b.isRegExp=Ug,b.isSafeInteger=v6,b.isSet=PQ,b.isString=jl,b.isSymbol=Qn,b.isTypedArray=Ei,b.isUndefined=x6,b.isWeakMap=w6,b.isWeakSet=T6,b.join=O5,b.kebabCase=Cj,b.last=Ln,b.lastIndexOf=D5,b.lowerCase=Ej,b.lowerFirst=Ij,b.lt=P6,b.lte=S6,b.max=dH,b.maxBy=fH,b.mean=pH,b.meanBy=hH,b.min=CH,b.minBy=EH,b.stubArray=Zg,b.stubFalse=$g,b.stubObject=rH,b.stubString=oH,b.stubTrue=iH,b.multiply=IH,b.nth=M5,b.noConflict=_j,b.noop=Xg,b.now=Fl,b.pad=Bj,b.padEnd=Qj,b.padStart=mj,b.parseInt=yj,b.random=gj,b.reduce=L8,b.reduceRight=N8,b.repeat=bj,b.replace=vj,b.result=nj,b.round=BH,b.runInContext=L,b.sample=j8,b.size=z8,b.snakeCase=xj,b.some=W8,b.sortedIndex=H5,b.sortedIndexBy=V5,b.sortedIndexOf=z5,b.sortedLastIndex=W5,b.sortedLastIndexBy=U5,b.sortedLastIndexOf=Y5,b.startCase=Tj,b.startsWith=Pj,b.subtract=QH,b.sum=mH,b.sumBy=yH,b.template=Sj,b.times=sH,b.toFinite=Cr,b.toInteger=Ne,b.toLength=OQ,b.toLower=Oj,b.toNumber=Nn,b.toSafeInteger=O6,b.toString=rt,b.toUpper=Dj,b.trim=Mj,b.trimEnd=kj,b.trimStart=Fj,b.truncate=Lj,b.unescape=Nj,b.uniqueId=lH,b.upperCase=Rj,b.upperFirst=Kg,b.each=CQ,b.eachRight=EQ,b.first=dQ,Jg(b,function(){var o={};return Xn(b,function(i,c){it.call(b.prototype,c)||(o[c]=i)}),o}(),{chain:!1}),b.VERSION=r,On(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){b[o].placeholder=b}),On(["drop","take"],function(o,i){We.prototype[o]=function(c){c=c===n?1:Dt(Ne(c),0);var f=this.__filtered__&&!i?new We(this):this.clone();return f.__filtered__?f.__takeCount__=qt(c,f.__takeCount__):f.__views__.push({size:qt(c,R),type:o+(f.__dir__<0?"Right":"")}),f},We.prototype[o+"Right"]=function(c){return this.reverse()[o](c).reverse()}}),On(["filter","map","takeWhile"],function(o,i){var c=i+1,f=c==U||c==X;We.prototype[o]=function(Q){var v=this.clone();return v.__iteratees__.push({iteratee:Te(Q,3),type:c}),v.__filtered__=v.__filtered__||f,v}}),On(["head","last"],function(o,i){var c="take"+(i?"Right":"");We.prototype[o]=function(){return this[c](1).value()[0]}}),On(["initial","tail"],function(o,i){var c="drop"+(i?"":"Right");We.prototype[o]=function(){return this.__filtered__?new We(this):this[c](1)}}),We.prototype.compact=function(){return this.filter(cn)},We.prototype.find=function(o){return this.filter(o).head()},We.prototype.findLast=function(o){return this.reverse().find(o)},We.prototype.invokeMap=He(function(o,i){return typeof o=="function"?new We(this):this.map(function(c){return Es(c,o,i)})}),We.prototype.reject=function(o){return this.filter(Nl(Te(o)))},We.prototype.slice=function(o,i){o=Ne(o);var c=this;return c.__filtered__&&(o>0||i<0)?new We(c):(o<0?c=c.takeRight(-o):o&&(c=c.drop(o)),i!==n&&(i=Ne(i),c=i<0?c.dropRight(-i):c.take(i-o)),c)},We.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},We.prototype.toArray=function(){return this.take(R)},Xn(We.prototype,function(o,i){var c=/^(?:filter|find|map|reject)|While$/.test(i),f=/^(?:head|last)$/.test(i),Q=b[f?"take"+(i=="last"?"Right":""):i],v=f||/^find/.test(i);Q&&(b.prototype[i]=function(){var S=this.__wrapped__,M=f?[1]:arguments,N=S instanceof We,$=M[0],ee=N||Fe(S),oe=function(Ve){var Ge=Q.apply(b,Ur([Ve],M));return f&&ge?Ge[0]:Ge};ee&&c&&typeof $=="function"&&$.length!=1&&(N=ee=!1);var ge=this.__chain__,Ie=!!this.__actions__.length,Pe=v&&!ge,Re=N&&!Ie;if(!v&&ee){S=Re?S:new We(this);var Se=o.apply(S,M);return Se.__actions__.push({func:Ml,args:[oe],thisArg:n}),new Mn(Se,ge)}return Pe&&Re?o.apply(this,M):(Se=this.thru(oe),Pe?f?Se.value()[0]:Se.value():Se)})}),On(["pop","push","shift","sort","splice","unshift"],function(o){var i=il[o],c=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",f=/^(?:pop|shift)$/.test(o);b.prototype[o]=function(){var Q=arguments;if(f&&!this.__chain__){var v=this.value();return i.apply(Fe(v)?v:[],Q)}return this[c](function(S){return i.apply(Fe(S)?S:[],Q)})}}),Xn(We.prototype,function(o,i){var c=b[i];if(c){var f=c.name+"";it.call(di,f)||(di[f]=[]),di[f].push({name:i,func:c})}}),di[xl(n,D).name]=[{name:"wrapper",func:n}],We.prototype.clone=NR,We.prototype.reverse=RR,We.prototype.value=jR,b.prototype.at=f8,b.prototype.chain=p8,b.prototype.commit=h8,b.prototype.next=C8,b.prototype.plant=I8,b.prototype.reverse=B8,b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=Q8,b.prototype.first=b.prototype.head,us&&(b.prototype[us]=E8),b},ci=hR();fo?((fo.exports=ci)._=ci,_u._=ci):jt._=ci}).call(bn)}(Us,Us.exports);var gt=Us.exports;const $d=e=>function(){return e.apply(this,arguments)},Mo=A.shape({id:A.string,title:A.string,type:A.oneOf(["group","item","collapse"]),icon:A.elementType,url:A.string,parent:A.shape($d(()=>Mo)),children:A.arrayOf($d(()=>Mo))}),ef={fontFamily:"'Inter', sans-serif",menuOrientation:"vertical",miniDrawer:!1,container:!1,mode:"light",presetColor:"theme4",themeDirection:"ltr",appDefaultPath:"/",drawerWidth:260,horizontalMaxItems:6,spacing:2},EA=F.createContext(ef),Eb=e=>e==="vertical",Ib=e=>e==="horizontal",IA=({children:e})=>{const[t,n]=bA("theme-config",ef),r=I=>n(B=>({...B,fontFamily:I})),s=I=>n(B=>({...B,menuOrientation:I})),a=I=>n(B=>({...B,miniDrawer:I})),l=I=>n(B=>({...B,container:I})),u=I=>n(B=>({...B,mode:I})),g=I=>n(B=>({...B,presetColor:I})),d=I=>n(B=>({...B,themeDirection:I})),p=I=>n(B=>({...B,appDefaultPath:I})),E=I=>n(B=>({...B,drawerWidth:I})),C=I=>n(B=>({...B,horizontalMaxItems:I}));return h.jsx(EA.Provider,{value:{...t,setFontFamily:r,setMenuOrientation:s,setMiniDrawer:a,setContainer:l,setMode:u,setPresetColor:g,setThemeDirection:d,setAppDefaultPath:p,setDrawerWidth:E,setHorizontalMaxItems:C,isVerticalLayout:Eb,isHorizontalLayout:Ib},children:e})};IA.propTypes={children:A.node};const tf={openItem:["dashboard"],openComponent:"buttons",selectedID:null,drawerOpen:!1,componentDrawerOpen:!0,menuDashboard:{},error:null},BA=F.createContext(tf),QA=({menu:e,children:t})=>{const[n,r]=bA("menu-config",{...tf}),s=E=>{r(C=>({...C,openItem:E}))},a=E=>{r(C=>({...C,selectedID:E}))},l=E=>{r(C=>({...C,openComponent:E}))},u=E=>{r(C=>({...C,drawerOpen:E}))},g=E=>{r(C=>({...C,componentDrawerOpen:E}))},d=E=>{r(C=>({...C,menuDashboard:E}))},p=E=>{r(C=>({...C,error:E}))};return h.jsx(BA.Provider,{value:{...n,groups:e,activeItem:s,activeComponent:l,openDrawer:u,openComponentDrawer:g,activeID:a,getMenuSuccess:d,hasError:p},children:t})};QA.propTypes={children:A.node,menu:A.arrayOf(Mo)};const Rn=()=>F.useContext(BA),Bb=["e-","entities/"],Qb=e=>{let t=e;return Bb.forEach(n=>{t=t!=null&&t.startsWith(n)?t==null?void 0:t.substring(n.length):t}),t},mb=(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"},yb=(e,t)=>{const n=Qb(e.name);return t==null?void 0:t.includes(`${n}:list`)},mA=(e,t)=>{let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const s=e[r];if(s.children&&(n=mA(s.children,t),n))return n}return n},nf=(e,t,n)=>{let r=e.find(s=>["group","collapse"].indexOf(s.type)!==-1&&mb(s,t));if(!r)for(let s=0;s<e.length;s++){const a=e[s];if(a.children&&(r=nf(a.children,t),r))return r}return r},rf=(e,t)=>{let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const s=e[r];if(s.children&&(n=rf(s.children,t),n))return n}return n},of=e=>e?e.type==="item"?!0:(e.children&&(e.children=e.children.filter(of)),e.children&&e.children.length>0):!1,sf=e=>(e.children&&e.children.forEach(t=>{t.parent=e,sf(t)}),e),bb=({userGroups:e,resources:t,permissions:n,translate:r})=>{const s=p=>(p.title=r(p.title,{_:p.title}),p.children&&p.children.forEach(E=>s(E)),p),a=Object.keys(t),l=(p,E)=>(p.children&&(p.children=p.children.filter(C=>C.resource===!1?!0:C.type==="item"?E.includes(C.id):(l(C,E),C.children&&C.children.length>0))),p),u=gt.cloneDeep(e).map(p=>({type:"group",icon:ot.AntDesignOutlined,children:[],...p})).map(s).map(p=>l(p,a)),g=Object.values(t).map(p=>{var E;return((E=p.options)==null?void 0:E.group)||"admin"}).filter((p,E,C)=>C.indexOf(p)===E).filter(p=>p!==void 0&&rf(e,p)===null).map(p=>({id:p,title:r(`ra.menu.group.${p}`),type:"group",icon:ot.AntDesignOutlined,children:[]})),d=[...u,...g];return Object.values(t).forEach(p=>{var I,B,m,y,D;if(!p.hasList)return;const E=nf(d,p),C=(I=E==null?void 0:E.children)==null?void 0:I.some(k=>k.id===p.name);if(!yb(p,n)){C&&((B=E==null?void 0:E.children)==null?void 0:B.length)>0&&(E.children=E.children.filter(k=>k.id!==p.name));return}if(E){if(E.children||(E.children=[]),C)return;E.children.push({id:p.name,type:"item",title:r(((m=p.options)==null?void 0:m.label)||`ra.menu.item.${p.name}`,{_:((y=p.options)==null?void 0:y.label)||p.name}),url:`/${p.name}`,icon:(D=p.options)==null?void 0:D.icon})}}),d.filter(of).map(sf)},yA=()=>{const e=x.useResourceDefinitions(),{isLoading:t,data:n}=x.useGetIdentity(),{permissions:r}=x.usePermissions(),{groups:s}=Rn(),a=x.useTranslate(),l=F.useMemo(()=>t||!n||n===null||(n==null?void 0:n.id)<=0?null:bb({resources:e,permissions:r,translate:a,userGroups:s}),[t,n,e,r,a,s]),u=F.useMemo(()=>t,[t]);return{menu:l,isLoading:u,getItem:g=>u?!1:mA(l,g),findInMenu:u?()=>{}:mA}},af=()=>{const e=x.useTranslate(),{isLoading:t,menu:n,findInMenu:r}=yA(),{pathname:s}=Tt.useLocation();return F.useMemo(()=>{var E;const a=s.split("/").filter(C=>C);let l=gt.cloneDeep(n),u=s,g=r(l,s);if(g||(g=r(l,a[a.length-1]),u=g?g.id:u),!g)for(let C=a.length;C>=0;C--){let I=a.slice(0,C).join("/");if(g=r(l,I),g){u=g.id;break}}const d=(E=g==null?void 0:g.url)==null?void 0:E.split("/");if(a.length>=(d==null?void 0:d.length)){const C=a[a.length-1];if(g){const I=C==="create"||s===g.url?"create":"edit",B=`resources.${u}.breadcrumbs.${I}`,m={id:`${u}-${I}`,type:"item",title:e(B,{_:e(B,{_:B})}),url:s,breadcrumbs:!0,parent:g};g.type="collapse",g.breadcrumbs=!0,g.children=g.children||[],g.children.push(m),g=m}}let p=[];if(g){let C={...g,last:!0};for(;C;)p.push(C),C=C.parent;p=p.reverse()}return{isLoading:t,navigation:{items:l},breadcrumbs:p}},[t,s,n,r,e])};function bA(e,t){const[n,r]=F.useState(()=>{const a=typeof window<"u"?localStorage.getItem(e):null;return a===null?t:JSON.parse(a)});return F.useEffect(()=>{const a=l=>{typeof window<"u"&&l.storageArea===localStorage&&l.key===e&&r(l.newValue?JSON.parse(l.newValue):l.newValue)};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}},[e,t]),[n,a=>{r(l=>{const u=typeof a=="function"?a(l):a;return typeof window<"u"&&localStorage.setItem(e,JSON.stringify(u)),u})}]}const lf=e=>{const t=x.useRecordContext(),n=x.useTranslate(),r=x.useResourceContext(),s=t!=null&&t.id?"edit":"create";return F.useMemo(()=>{const l=`resources.${r}.title`;return e||n(`resources.${r}.title.${s}`,{_:n(l,{_:l}),...t})},[s,t,r,n,e])},Nt=()=>F.useContext(EA),Af={p:2.5,"& .MuiCardHeader-action":{m:"0px auto",alignSelf:"center"}},jn=F.forwardRef(({border:e=!0,boxShadow:t,children:n,subheader:r,content:s=!0,contentSX:a={},darkTitle:l,divider:u=!0,elevation:g,secondary:d,shadow:p,sx:E={},title:C,modal:I=!1,...B},m)=>{const y=lt();return t=y.palette.mode==="dark"?t||!0:t,h.jsxs(w.Card,{elevation:g||0,ref:m,...B,sx:{position:"relative",border:e?"1px solid":"none",borderRadius:1,borderColor:y.palette.mode==="dark"?y.palette.divider:y.palette.grey.A800,boxShadow:t&&(!e||y.palette.mode==="dark")?p||y.customShadows.z1:"inherit",":hover":{boxShadow:t?p||y.customShadows.z1:"inherit"},...I&&{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:"calc( 100% - 50px)",sm:"auto"},"& .MuiCardContent-root":{overflowY:"auto",minHeight:"auto",maxHeight:"calc(100vh - 200px)"}},...E},children:[!l&&C&&h.jsx(w.CardHeader,{sx:Af,titleTypographyProps:{variant:"subtitle1"},title:C,action:d,subheader:r}),l&&C&&h.jsx(w.CardHeader,{sx:Af,title:h.jsx(w.Typography,{variant:"h4",children:C}),action:d}),C&&u&&h.jsx(w.Divider,{}),s&&h.jsx(w.CardContent,{sx:a,children:n}),!s&&n]})});jn.propTypes={border:A.bool,boxShadow:A.bool,children:A.oneOfType([A.node,A.arrayOf(A.node)]),subheader:A.oneOfType([A.node,A.string]),content:A.bool,contentClass:A.string,contentSX:A.object,darkTitle:A.bool,divider:A.bool,elevation:A.number,secondary:A.oneOfType([A.node,A.string,A.object]),shadow:A.string,sx:A.object,title:A.oneOfType([A.node,A.string,A.object]),modal:A.bool};function cf(e){return typeof e=="string"}function vb(e,t,n){return e===void 0||cf(e)?t:W({},t,{ownerState:W({},t.ownerState,n)})}const xb={disableDefaultClasses:!1},wb=G.createContext(xb);function Tb(e){const{disableDefaultClasses:t}=G.useContext(wb);return n=>t?"":e(n)}function Pb(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function vA(e,t,n){return typeof e=="function"?e(t,n):e}function uf(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Sb(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:s,className:a}=e;if(!t){const I=Je(s==null?void 0:s.className,r==null?void 0:r.className,a,n==null?void 0:n.className),B=W({},n==null?void 0:n.style,s==null?void 0:s.style,r==null?void 0:r.style),m=W({},n,s,r);return I.length>0&&(m.className=I),Object.keys(B).length>0&&(m.style=B),{props:m,internalRef:void 0}}const l=Pb(W({},s,r)),u=uf(r),g=uf(s),d=t(l),p=Je(d==null?void 0:d.className,n==null?void 0:n.className,a,s==null?void 0:s.className,r==null?void 0:r.className),E=W({},d==null?void 0:d.style,n==null?void 0:n.style,s==null?void 0:s.style,r==null?void 0:r.style),C=W({},d,n,g,u);return p.length>0&&(C.className=p),Object.keys(E).length>0&&(C.style=E),{props:C,internalRef:d.ref}}const Ob=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function xA(e){var t;const{elementType:n,externalSlotProps:r,ownerState:s,skipResolvingSlotProps:a=!1}=e,l=Ke(e,Ob),u=a?{}:vA(r,s),{props:g,internalRef:d}=Sb(W({},l,{externalSlotProps:u})),p=yr(d,u==null?void 0:u.ref,(t=e.additionalProps)==null?void 0:t.ref);return vb(n,W({},g,{ref:p}),s)}const Db=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Mb(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function kb(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function Fb(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||kb(e))}function Lb(e){const t=[],n=[];return Array.from(e.querySelectorAll(Db)).forEach((r,s)=>{const a=Mb(r);a===-1||!Fb(r)||(a===0?t.push(r):n.push({documentOrder:s,tabIndex:a,node:r}))}),n.sort((r,s)=>r.tabIndex===s.tabIndex?r.documentOrder-s.documentOrder:r.tabIndex-s.tabIndex).map(r=>r.node).concat(t)}function Nb(){return!0}function Ys(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:s=!1,getTabbable:a=Lb,isEnabled:l=Nb,open:u}=e,g=G.useRef(!1),d=G.useRef(null),p=G.useRef(null),E=G.useRef(null),C=G.useRef(null),I=G.useRef(!1),B=G.useRef(null),m=yr(t.ref,B),y=G.useRef(null);G.useEffect(()=>{!u||!B.current||(I.current=!n)},[n,u]),G.useEffect(()=>{if(!u||!B.current)return;const P=mr(B.current);return B.current.contains(P.activeElement)||(B.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
94
94
  `)),B.current.setAttribute("tabIndex","-1")),I.current&&B.current.focus()),()=>{s||(E.current&&E.current.focus&&(g.current=!0,E.current.focus()),E.current=null)}},[u]),G.useEffect(()=>{if(!u||!B.current)return;const P=mr(B.current),T=q=>{const{current:ne}=B;if(ne!==null){if(!P.hasFocus()||r||!l()||g.current){g.current=!1;return}if(!ne.contains(P.activeElement)){if(q&&C.current!==q.target||P.activeElement!==C.current)C.current=null;else if(C.current!==null)return;if(!I.current)return;let fe=[];if((P.activeElement===d.current||P.activeElement===p.current)&&(fe=a(B.current)),fe.length>0){var re,J;const Be=!!((re=y.current)!=null&&re.shiftKey&&((J=y.current)==null?void 0:J.key)==="Tab"),ie=fe[0],U=fe[fe.length-1];typeof ie!="string"&&typeof U!="string"&&(Be?U.focus():ie.focus())}else ne.focus()}}},O=q=>{y.current=q,!(r||!l()||q.key!=="Tab")&&P.activeElement===B.current&&q.shiftKey&&(g.current=!0,p.current&&p.current.focus())};P.addEventListener("focusin",T),P.addEventListener("keydown",O,!0);const V=setInterval(()=>{P.activeElement&&P.activeElement.tagName==="BODY"&&T(null)},50);return()=>{clearInterval(V),P.removeEventListener("focusin",T),P.removeEventListener("keydown",O,!0)}},[n,r,s,l,u,a]);const D=P=>{E.current===null&&(E.current=P.relatedTarget),I.current=!0,C.current=P.target;const T=t.props.onFocus;T&&T(P)},k=P=>{E.current===null&&(E.current=P.relatedTarget),I.current=!0};return h.jsxs(G.Fragment,{children:[h.jsx("div",{tabIndex:u?0:-1,onFocus:k,ref:d,"data-testid":"sentinelStart"}),G.cloneElement(t,{ref:m,onFocus:D}),h.jsx("div",{tabIndex:u?0:-1,onFocus:k,ref:p,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(Ys.propTypes={children:mi,disableAutoFocus:A.bool,disableEnforceFocus:A.bool,disableRestoreFocus:A.bool,getTabbable:A.func,isEnabled:A.func,open:A.bool.isRequired}),process.env.NODE_ENV!=="production"&&(Ys["propTypes"]=xs(Ys.propTypes));function Rb(e){return typeof e=="function"?e():e}const Gs=G.forwardRef(function(t,n){const{children:r,container:s,disablePortal:a=!1}=t,[l,u]=G.useState(null),g=yr(G.isValidElement(r)?r.ref:null,n);if($l(()=>{a||u(Rb(s)||document.body)},[s,a]),$l(()=>{if(l&&!a)return Zl(n,l),()=>{Zl(n,null)}},[n,l,a]),a){if(G.isValidElement(r)){const d={ref:g};return G.cloneElement(r,d)}return h.jsx(G.Fragment,{children:r})}return h.jsx(G.Fragment,{children:l&&GQ.createPortal(r,l)})});process.env.NODE_ENV!=="production"&&(Gs.propTypes={children:A.node,container:A.oneOfType([ws,A.func]),disablePortal:A.bool}),process.env.NODE_ENV!=="production"&&(Gs["propTypes"]=xs(Gs.propTypes));const jb=Gs;function Hb(e){const t=mr(e);return t.body===e?yi(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ki(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function gf(e){return parseInt(yi(e).getComputedStyle(e).paddingRight,10)||0}function Vb(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function df(e,t,n,r,s){const a=[t,n,...r];[].forEach.call(e.children,l=>{const u=a.indexOf(l)===-1,g=!Vb(l);u&&g&&ki(l,s)})}function wA(e,t){let n=-1;return e.some((r,s)=>t(r)?(n=s,!0):!1),n}function zb(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Hb(r)){const l=ym(mr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${gf(r)+l}px`;const u=mr(r).querySelectorAll(".mui-fixed");[].forEach.call(u,g=>{n.push({value:g.style.paddingRight,property:"padding-right",el:g}),g.style.paddingRight=`${gf(g)+l}px`})}let a;if(r.parentNode instanceof DocumentFragment)a=mr(r).body;else{const l=r.parentElement,u=yi(r);a=(l==null?void 0:l.nodeName)==="HTML"&&u.getComputedStyle(l).overflowY==="scroll"?l:r}n.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{n.forEach(({value:a,el:l,property:u})=>{a?l.style.setProperty(u,a):l.style.removeProperty(u)})}}function Wb(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Ub{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&ki(t.modalRef,!1);const s=Wb(n);df(n,t.mount,t.modalRef,s,!0);const a=wA(this.containers,l=>l.container===n);return a!==-1?(this.containers[a].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:s}),r)}mount(t,n){const r=wA(this.containers,a=>a.modals.indexOf(t)!==-1),s=this.containers[r];s.restore||(s.restore=zb(s,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const s=wA(this.containers,l=>l.modals.indexOf(t)!==-1),a=this.containers[s];if(a.modals.splice(a.modals.indexOf(t),1),this.modals.splice(r,1),a.modals.length===0)a.restore&&a.restore(),t.modalRef&&ki(t.modalRef,n),df(a.container,t.mount,t.modalRef,a.hiddenSiblings,!1),this.containers.splice(s,1);else{const l=a.modals[a.modals.length-1];l.modalRef&&ki(l.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Yb(e){return Lt("MuiModal",e)}zt("MuiModal",["root","hidden","backdrop"]);const Gb=["children","closeAfterTransition","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited","slotProps","slots"],Kb=e=>{const{open:t,exited:n}=e;return Jt({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Tb(Yb))};function qb(e){return typeof e=="function"?e():e}function _b(e){return e?e.props.hasOwnProperty("in"):!1}const Jb=new Ub,ff=G.forwardRef(function(t,n){var r,s;const{children:a,closeAfterTransition:l=!1,container:u,disableAutoFocus:g=!1,disableEnforceFocus:d=!1,disableEscapeKeyDown:p=!1,disablePortal:E=!1,disableRestoreFocus:C=!1,disableScrollLock:I=!1,hideBackdrop:B=!1,keepMounted:m=!1,manager:y=Jb,onBackdropClick:D,onClose:k,onKeyDown:P,open:T,onTransitionEnter:O,onTransitionExited:V,slotProps:q={},slots:ne={}}=t,re=Ke(t,Gb),J=y,[fe,Be]=G.useState(!T),ie=G.useRef({}),U=G.useRef(null),z=G.useRef(null),X=yr(z,n),K=_b(a),Z=(r=t["aria-hidden"])!=null?r:!0,te=()=>mr(U.current),H=()=>(ie.current.modalRef=z.current,ie.current.mountNode=U.current,ie.current),R=()=>{J.mount(H(),{disableScrollLock:I}),z.current&&(z.current.scrollTop=0)},se=vo(()=>{const Ue=qb(u)||te().body;J.add(H(),Ue),z.current&&R()}),ce=G.useCallback(()=>J.isTopModal(H()),[J]),ue=vo(Ue=>{U.current=Ue,!(!Ue||!z.current)&&(T&&ce()?R():ki(z.current,Z))}),pe=G.useCallback(()=>{J.remove(H(),Z)},[J,Z]);G.useEffect(()=>()=>{pe()},[pe]),G.useEffect(()=>{T?se():(!K||!l)&&pe()},[T,pe,K,l,se]);const de=W({},t,{closeAfterTransition:l,disableAutoFocus:g,disableEnforceFocus:d,disableEscapeKeyDown:p,disablePortal:E,disableRestoreFocus:C,disableScrollLock:I,exited:fe,hideBackdrop:B,keepMounted:m}),me=Kb(de),Qe=()=>{Be(!1),O&&O()},he=()=>{Be(!0),V&&V(),l&&pe()},ye=Ue=>{Ue.target===Ue.currentTarget&&(D&&D(Ue),k&&k(Ue,"backdropClick"))},Le=Ue=>{P&&P(Ue),!(Ue.key!=="Escape"||!ce())&&(p||(Ue.stopPropagation(),k&&k(Ue,"escapeKeyDown")))},ae={};a.props.tabIndex===void 0&&(ae.tabIndex="-1"),K&&(ae.onEnter=Bd(Qe,a.props.onEnter),ae.onExited=Bd(he,a.props.onExited));const ct=(s=ne.root)!=null?s:"div",Ae=xA({elementType:ct,externalSlotProps:q.root,externalForwardedProps:re,additionalProps:{ref:X,role:"presentation",onKeyDown:Le},className:me.root,ownerState:de}),wt=ne.backdrop,sn=xA({elementType:wt,externalSlotProps:q.backdrop,additionalProps:{"aria-hidden":!0,onClick:ye,open:T},className:me.backdrop,ownerState:de});return!m&&!T&&(!K||fe)?null:h.jsx(jb,{ref:ue,container:u,disablePortal:E,children:h.jsxs(ct,W({},Ae,{children:[!B&&wt?h.jsx(wt,W({},sn)):null,h.jsx(Ys,{disableEnforceFocus:d,disableAutoFocus:g,disableRestoreFocus:C,isEnabled:ce,open:T,children:G.cloneElement(a,ae)})]}))})});process.env.NODE_ENV!=="production"&&(ff.propTypes={children:mi.isRequired,closeAfterTransition:A.bool,container:A.oneOfType([ws,A.func]),disableAutoFocus:A.bool,disableEnforceFocus:A.bool,disableEscapeKeyDown:A.bool,disablePortal:A.bool,disableRestoreFocus:A.bool,disableScrollLock:A.bool,hideBackdrop:A.bool,keepMounted:A.bool,onBackdropClick:A.func,onClose:A.func,onTransitionEnter:A.func,onTransitionExited:A.func,open:A.bool.isRequired,slotProps:A.shape({backdrop:A.oneOfType([A.func,A.object]),root:A.oneOfType([A.func,A.object])}),slots:A.shape({backdrop:A.elementType,root:A.elementType})});const Xb=ff;function Zb(e){return Lt("MuiTypography",e)}zt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const $b=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],ev=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:s,variant:a,classes:l}=e,u={root:["root",a,e.align!=="inherit"&&`align${ve(t)}`,n&&"gutterBottom",r&&"noWrap",s&&"paragraph"]};return Jt(u,Zb,l)},tv=le("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${ve(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>W({margin:0},t.variant&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),pf={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},nv={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},rv=e=>nv[e]||e,hf=G.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiTypography"}),s=rv(r.color),a=wy(W({},r,{color:s})),{align:l="inherit",className:u,component:g,gutterBottom:d=!1,noWrap:p=!1,paragraph:E=!1,variant:C="body1",variantMapping:I=pf}=a,B=Ke(a,$b),m=W({},a,{align:l,color:s,className:u,component:g,gutterBottom:d,noWrap:p,paragraph:E,variant:C,variantMapping:I}),y=g||(E?"p":I[C]||pf[C])||"span",D=ev(m);return h.jsx(tv,W({as:y,ref:n,ownerState:m,className:Je(D.root,u)},B))});process.env.NODE_ENV!=="production"&&(hf.propTypes={align:A.oneOf(["center","inherit","justify","left","right"]),children:A.node,classes:A.object,className:A.string,component:A.elementType,gutterBottom:A.bool,noWrap:A.bool,paragraph:A.bool,sx:A.oneOfType([A.arrayOf(A.oneOfType([A.func,A.object,A.bool])),A.func,A.object]),variant:A.oneOfType([A.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),A.string]),variantMapping:A.object});const Cf=hf;function ov(e){return Lt("MuiSvgIcon",e)}zt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const iv=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],sv=e=>{const{color:t,fontSize:n,classes:r}=e,s={root:["root",t!=="inherit"&&`color${ve(t)}`,`fontSize${ve(n)}`]};return Jt(s,ov,r)},av=le("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ve(n.color)}`],t[`fontSize${ve(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,s,a,l,u,g,d,p,E,C,I,B,m,y,D,k;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(s=e.transitions)==null||(a=s.duration)==null?void 0:a.shorter}),fontSize:{inherit:"inherit",small:((l=e.typography)==null||(u=l.pxToRem)==null?void 0:u.call(l,20))||"1.25rem",medium:((g=e.typography)==null||(d=g.pxToRem)==null?void 0:d.call(g,24))||"1.5rem",large:((p=e.typography)==null||(E=p.pxToRem)==null?void 0:E.call(p,35))||"2.1875rem"}[t.fontSize],color:(C=(I=(e.vars||e).palette)==null||(B=I[t.color])==null?void 0:B.main)!=null?C:{action:(m=(e.vars||e).palette)==null||(y=m.action)==null?void 0:y.active,disabled:(D=(e.vars||e).palette)==null||(k=D.action)==null?void 0:k.disabled,inherit:void 0}[t.color]}}),TA=G.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiSvgIcon"}),{children:s,className:a,color:l="inherit",component:u="svg",fontSize:g="medium",htmlColor:d,inheritViewBox:p=!1,titleAccess:E,viewBox:C="0 0 24 24"}=r,I=Ke(r,iv),B=G.isValidElement(s)&&s.type==="svg",m=W({},r,{color:l,component:u,fontSize:g,instanceFontSize:t.fontSize,inheritViewBox:p,viewBox:C,hasSvgAsChild:B}),y={};p||(y.viewBox=C);const D=sv(m);return h.jsxs(av,W({as:u,className:Je(D.root,a),focusable:"false",color:d,"aria-hidden":E?void 0:!0,role:E?"img":void 0,ref:n},y,I,B&&s.props,{ownerState:m,children:[B?s.props.children:s,E?h.jsx("title",{children:E}):null]}))});process.env.NODE_ENV!=="production"&&(TA.propTypes={children:A.node,classes:A.object,className:A.string,color:A.oneOfType([A.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),A.string]),component:A.elementType,fontSize:A.oneOfType([A.oneOf(["inherit","large","medium","small"]),A.string]),htmlColor:A.string,inheritViewBox:A.bool,shapeRendering:A.string,sx:A.oneOfType([A.arrayOf(A.oneOfType([A.func,A.object,A.bool])),A.func,A.object]),titleAccess:A.string,viewBox:A.string}),TA.muiName="SvgIcon";const Ef=TA;function If(e,t){function n(r,s){return h.jsx(Ef,W({"data-testid":`${t}Icon`,ref:s},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Ef.muiName,G.memo(G.forwardRef(n))}const lv=If(h.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz");function PA(e,t){return PA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},PA(e,t)}function Bf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,PA(e,t)}const Qf={disabled:!1};var Av=process.env.NODE_ENV!=="production"?A.oneOfType([A.number,A.shape({enter:A.number,exit:A.number,appear:A.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&A.oneOfType([A.string,A.shape({enter:A.string,exit:A.string,active:A.string}),A.shape({enter:A.string,enterDone:A.string,enterActive:A.string,exit:A.string,exitDone:A.string,exitActive:A.string})]);const Ks=F.createContext(null);var cv=function(t){return t.scrollTop},Fi="unmounted",eo="exited",to="entering",ko="entered",SA="exiting",nr=function(e){Bf(t,e);function t(r,s){var a;a=e.call(this,r,s)||this;var l=s,u=l&&!l.isMounting?r.enter:r.appear,g;return a.appearStatus=null,r.in?u?(g=eo,a.appearStatus=to):g=ko:r.unmountOnExit||r.mountOnEnter?g=Fi:g=eo,a.state={status:g},a.nextCallback=null,a}t.getDerivedStateFromProps=function(s,a){var l=s.in;return l&&a.status===Fi?{status:eo}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(s){var a=null;if(s!==this.props){var l=this.state.status;this.props.in?l!==to&&l!==ko&&(a=to):(l===to||l===ko)&&(a=SA)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var s=this.props.timeout,a,l,u;return a=l=u=s,s!=null&&typeof s!="number"&&(a=s.exit,l=s.enter,u=s.appear!==void 0?s.appear:l),{exit:a,enter:l,appear:u}},n.updateStatus=function(s,a){if(s===void 0&&(s=!1),a!==null)if(this.cancelNextCallback(),a===to){if(this.props.unmountOnExit||this.props.mountOnEnter){var l=this.props.nodeRef?this.props.nodeRef.current:Bi.findDOMNode(this);l&&cv(l)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===eo&&this.setState({status:Fi})},n.performEnter=function(s){var a=this,l=this.props.enter,u=this.context?this.context.isMounting:s,g=this.props.nodeRef?[u]:[Bi.findDOMNode(this),u],d=g[0],p=g[1],E=this.getTimeouts(),C=u?E.appear:E.enter;if(!s&&!l||Qf.disabled){this.safeSetState({status:ko},function(){a.props.onEntered(d)});return}this.props.onEnter(d,p),this.safeSetState({status:to},function(){a.props.onEntering(d,p),a.onTransitionEnd(C,function(){a.safeSetState({status:ko},function(){a.props.onEntered(d,p)})})})},n.performExit=function(){var s=this,a=this.props.exit,l=this.getTimeouts(),u=this.props.nodeRef?void 0:Bi.findDOMNode(this);if(!a||Qf.disabled){this.safeSetState({status:eo},function(){s.props.onExited(u)});return}this.props.onExit(u),this.safeSetState({status:SA},function(){s.props.onExiting(u),s.onTransitionEnd(l.exit,function(){s.safeSetState({status:eo},function(){s.props.onExited(u)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(s,a){a=this.setNextCallback(a),this.setState(s,a)},n.setNextCallback=function(s){var a=this,l=!0;return this.nextCallback=function(u){l&&(l=!1,a.nextCallback=null,s(u))},this.nextCallback.cancel=function(){l=!1},this.nextCallback},n.onTransitionEnd=function(s,a){this.setNextCallback(a);var l=this.props.nodeRef?this.props.nodeRef.current:Bi.findDOMNode(this),u=s==null&&!this.props.addEndListener;if(!l||u){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var g=this.props.nodeRef?[this.nextCallback]:[l,this.nextCallback],d=g[0],p=g[1];this.props.addEndListener(d,p)}s!=null&&setTimeout(this.nextCallback,s)},n.render=function(){var s=this.state.status;if(s===Fi)return null;var a=this.props,l=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var u=Ke(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return F.createElement(Ks.Provider,{value:null},typeof l=="function"?l(s,u):F.cloneElement(F.Children.only(l),u))},t}(F.Component);nr.contextType=Ks,nr.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:A.shape({current:typeof Element>"u"?A.any:function(e,t,n,r,s,a){var l=e[t];return A.instanceOf(l&&"ownerDocument"in l?l.ownerDocument.defaultView.Element:Element)(e,t,n,r,s,a)}}),children:A.oneOfType([A.func.isRequired,A.element.isRequired]).isRequired,in:A.bool,mountOnEnter:A.bool,unmountOnExit:A.bool,appear:A.bool,enter:A.bool,exit:A.bool,timeout:function(t){var n=Av;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,s=new Array(r>1?r-1:0),a=1;a<r;a++)s[a-1]=arguments[a];return n.apply(void 0,[t].concat(s))},addEndListener:A.func,onEnter:A.func,onEntering:A.func,onEntered:A.func,onExit:A.func,onExiting:A.func,onExited:A.func}:{};function Fo(){}nr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Fo,onEntering:Fo,onEntered:Fo,onExit:Fo,onExiting:Fo,onExited:Fo},nr.UNMOUNTED=Fi,nr.EXITED=eo,nr.ENTERING=to,nr.ENTERED=ko,nr.EXITING=SA;const mf=nr;function uv(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OA(e,t){var n=function(a){return t&&F.isValidElement(a)?t(a):a},r=Object.create(null);return e&&F.Children.map(e,function(s){return s}).forEach(function(s){r[s.key]=n(s)}),r}function gv(e,t){e=e||{},t=t||{};function n(p){return p in t?t[p]:e[p]}var r=Object.create(null),s=[];for(var a in e)a in t?s.length&&(r[a]=s,s=[]):s.push(a);var l,u={};for(var g in t){if(r[g])for(l=0;l<r[g].length;l++){var d=r[g][l];u[r[g][l]]=n(d)}u[g]=n(g)}for(l=0;l<s.length;l++)u[s[l]]=n(s[l]);return u}function no(e,t,n){return n[t]!=null?n[t]:e.props[t]}function dv(e,t){return OA(e.children,function(n){return F.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:no(n,"appear",e),enter:no(n,"enter",e),exit:no(n,"exit",e)})})}function fv(e,t,n){var r=OA(e.children),s=gv(t,r);return Object.keys(s).forEach(function(a){var l=s[a];if(F.isValidElement(l)){var u=a in t,g=a in r,d=t[a],p=F.isValidElement(d)&&!d.props.in;g&&(!u||p)?s[a]=F.cloneElement(l,{onExited:n.bind(null,l),in:!0,exit:no(l,"exit",e),enter:no(l,"enter",e)}):!g&&u&&!p?s[a]=F.cloneElement(l,{in:!1}):g&&u&&F.isValidElement(d)&&(s[a]=F.cloneElement(l,{onExited:n.bind(null,l),in:d.props.in,exit:no(l,"exit",e),enter:no(l,"enter",e)}))}}),s}var pv=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},hv={component:"div",childFactory:function(t){return t}},DA=function(e){Bf(t,e);function t(r,s){var a;a=e.call(this,r,s)||this;var l=a.handleExited.bind(uv(a));return a.state={contextValue:{isMounting:!0},handleExited:l,firstRender:!0},a}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(s,a){var l=a.children,u=a.handleExited,g=a.firstRender;return{children:g?dv(s,u):fv(s,l,u),firstRender:!1}},n.handleExited=function(s,a){var l=OA(this.props.children);s.key in l||(s.props.onExited&&s.props.onExited(a),this.mounted&&this.setState(function(u){var g=W({},u.children);return delete g[s.key],{children:g}}))},n.render=function(){var s=this.props,a=s.component,l=s.childFactory,u=Ke(s,["component","childFactory"]),g=this.state.contextValue,d=pv(this.state.children).map(l);return delete u.appear,delete u.enter,delete u.exit,a===null?F.createElement(Ks.Provider,{value:g},d):F.createElement(Ks.Provider,{value:g},F.createElement(a,u,d))},t}(F.Component);DA.propTypes=process.env.NODE_ENV!=="production"?{component:A.any,children:A.node,appear:A.bool,enter:A.bool,exit:A.bool,childFactory:A.func}:{},DA.defaultProps=hv;const Cv=DA;function yf(e){const{className:t,classes:n,pulsate:r=!1,rippleX:s,rippleY:a,rippleSize:l,in:u,onExited:g,timeout:d}=e,[p,E]=G.useState(!1),C=Je(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),I={width:l,height:l,top:-(l/2)+a,left:-(l/2)+s},B=Je(n.child,p&&n.childLeaving,r&&n.childPulsate);return!u&&!p&&E(!0),G.useEffect(()=>{if(!u&&g!=null){const m=setTimeout(g,d);return()=>{clearTimeout(m)}}},[g,u,d]),h.jsx("span",{className:C,style:I,children:h.jsx("span",{className:B})})}process.env.NODE_ENV!=="production"&&(yf.propTypes={classes:A.object.isRequired,className:A.string,in:A.bool,onExited:A.func,pulsate:A.bool,rippleSize:A.number,rippleX:A.number,rippleY:A.number,timeout:A.number.isRequired});const vn=zt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ev=["center","classes","className"];let qs=e=>e,bf,vf,xf,wf;const MA=550,Iv=80,Bv=Vt.keyframes(bf||(bf=qs`
95
95
  0% {
96
96
  transform: scale(0);
@@ -252,4 +252,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
252
252
  `),LD)),WD=le("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${ve(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(({ownerState:e,theme:t})=>W({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},e.variant!=="buffer"&&{backgroundColor:e.color==="inherit"?"currentColor":(t.vars||t).palette[e.color].main},e.color==="inherit"&&{opacity:.3},e.variant==="buffer"&&{backgroundColor:Yc(t,e.color),transition:`transform .${Uc}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Vt.css(pI||(pI=Ko`
253
253
  width: auto;
254
254
  animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
255
- `),ND)),hI=G.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiLinearProgress"}),{className:s,color:a="primary",value:l,valueBuffer:u,variant:g="indeterminate"}=r,d=Ke(r,FD),p=W({},r,{color:a,variant:g}),E=jD(p),C=lt(),I={},B={bar1:{},bar2:{}};if(g==="determinate"||g==="buffer")if(l!==void 0){I["aria-valuenow"]=Math.round(l),I["aria-valuemin"]=0,I["aria-valuemax"]=100;let m=l-100;C.direction==="rtl"&&(m=-m),B.bar1.transform=`translateX(${m}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress .");if(g==="buffer")if(u!==void 0){let m=(u||0)-100;C.direction==="rtl"&&(m=-m),B.bar2.transform=`translateX(${m}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");return h.jsxs(HD,W({className:Je(E.root,s),ownerState:p,role:"progressbar"},I,{ref:n},d,{children:[g==="buffer"?h.jsx(VD,{className:E.dashed,ownerState:p}):null,h.jsx(zD,{className:E.bar1,ownerState:p,style:B.bar1}),g==="determinate"?null:h.jsx(WD,{className:E.bar2,ownerState:p,style:B.bar2})]}))});process.env.NODE_ENV!=="production"&&(hI.propTypes={classes:A.object,className:A.string,color:A.oneOfType([A.oneOf(["inherit","primary","secondary"]),A.string]),sx:A.oneOfType([A.arrayOf(A.oneOfType([A.func,A.object,A.bool])),A.func,A.object]),value:A.number,valueBuffer:A.number,variant:A.oneOf(["buffer","determinate","indeterminate","query"])});const UD=hI,YD=le("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}})),CI=()=>h.jsx(YD,{children:h.jsx(UD,{color:"primary"})}),GD=e=>t=>h.jsx(F.Suspense,{fallback:h.jsx(CI,{}),children:h.jsx(e,{...t})}),Gc=({title:e})=>h.jsxs(h.Fragment,{children:[h.jsx(w.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",h.jsx(w.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]});Gc.propTypes={title:A.string.isRequired};const EI=le(x.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}})),Kc=({children:e})=>{const t=Tt.useLocation(),{pathname:n}=t;return F.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),e||null};Kc.propTypes={children:A.node};const KD=le("div")({width:"100%",overflowX:"auto",display:"block"}),qc=({title:e})=>h.jsx(w.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substr(0,1).toUpperCase()});qc.propTypes={title:A.string.isRequired};const qD=wo(x.Toolbar,{name:"RaApplicaToolbar",slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end",paddingRight:"20px !important","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}})),Hr=e=>h.jsx(qD,{...e});Hr.defaultProps={...x.Toolbar.defaultProps},Hr.propTypes={...x.Toolbar.propTypes};const _c=({children:e,content:t,title:n,subheader:r,secondary:s,toolbar:a,...l})=>{const u=x.useTranslate(),g=x.useResourceContext(),{cardTitle:d,cardSubheader:p}=F.useMemo(()=>{const E=n||`resources.${g}.title`;return{cardTitle:u(E,{_:E}),cardSubheader:r!==null?u(r,{_:r}):null}},[g,r,n,u]);return h.jsx(w.Grid,{item:!0,...l,children:h.jsx(jn,{content:t,title:d,subheader:p,secondary:s,divider:!0,children:h.jsxs(F.Fragment,{children:[e,a===!0?h.jsx(Hr,{children:h.jsx(x.SaveButton,{})}):a]})})})};_c.defaultProps={...w.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12},_c.propTypes={...w.Grid.propTypes,children:A.oneOfType([A.node,A.arrayOf(A.node)]),contained:A.bool,content:A.bool,subheader:A.oneOfType([A.string,A.node]),title:A.oneOfType([A.string,A.node]),secondary:A.oneOfType([A.node,A.string,A.object]),spacing:A.number,toolbar:A.oneOfType([A.node,A.bool])};const _D=le(x.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),La=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:s}=Nt();return h.jsx(_D,{defaultValues:n,spacing:t||s,children:h.jsx(w.Grid,{container:!0,...r,spacing:t||s,children:e})})};La.propTypes={...w.Grid.propTypes,...x.Form.propTypes,children:A.oneOfType([A.node,A.arrayOf(A.node)]),spacing:A.number,defaultValues:A.oneOfType([A.object,A.func]),record:A.object,validate:A.func},La.defaultProps={...w.Stack.defaultProps},La.Section=_c;const JD=le(x.Edit,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default}})),XD=le(w.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),ZD=le(w.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`})),Jc=({title:e,divider:t})=>{const n=x.useTranslate();return h.jsxs(F.Fragment,{children:[h.jsx(XD,{title:n(e,{_:e})}),t&&h.jsx(ZD,{})]})};Jc.propTypes={title:A.string.isRequired,divider:A.bool},Jc.defaultProps={divider:!0};const Na=A.shape({xl:A.number,lg:A.number,md:A.number,sm:A.number,xs:A.number}),$D={display:"none"},Ra=({intent:e,hidden:t,unmountOnExit:n,label:r,icon:s,value:a,syncWithLocation:l,selected:u,onChange:g,children:d,badgeColor:p,badgeContent:E,...C})=>{const I=x.useTranslate(),B=Br.useLocation(),m={component:Tt.Link,to:{...B,pathname:a}},y=F.isValidElement(r)?r:I(r,{_:r}),D=F.useCallback(()=>g(a),[g,a]);return e==="header"?(()=>h.jsxs(w.ListItemButton,{selected:u,...l?m:{},onClick:D,children:[s&&h.jsx(w.ListItemIcon,{children:s}),h.jsx(w.ListItemText,{primary:y}),E&&h.jsx(w.ListItemSecondaryAction,{children:h.jsx(w.Avatar,{sx:{width:24,height:24,fontSize:12,backgroundColor:T=>{var O;return(O=T.palette[p])==null?void 0:O.main},color:T=>{var O;return(O=T.palette[p])==null?void 0:O.contrastText}},children:E})})]}))():(()=>n&&t?null:h.jsx(x.FormGroupContextProvider,{name:a.toString(),children:h.jsx(w.Stack,{alignContent:"stretch",style:t?$D:null,id:`tabpanel-${a}`,"aria-labelledby":`tabheader-${a}`,"aria-hidden":t||void 0,...C,children:d})}))()};Ra.propTypes={intent:A.oneOf(["header","content","sidebar"]),className:A.string,contentClassName:A.string,url:A.string,icon:A.element,label:A.oneOfType([A.string,A.element]).isRequired,value:A.oneOfType([A.string,A.number]),syncWithLocation:A.bool,onChange:A.func,selected:A.bool,hidden:A.bool,unmountOnExit:A.bool,children:A.node,badgeColor:A.oneOf(["default","error","info","primary","secondary","success","warning"]),badgeContent:A.oneOfType([A.string,A.number])},Ra.defaultProps={badgeColor:"default",unmountOnExit:!1};const eM=le("div")(({theme:e})=>({marginBottom:e.spacing(2)})),ja=({children:e,visibility:t})=>w.useMediaQuery(r=>r.breakpoints.up(t))?h.jsx(eM,{children:e}):null;ja.propTypes={visibility:A.oneOf(["xl","lg","md","sm","xs"]),position:A.oneOf(["top","bottom"]).isRequired,children:A.node.isRequired},ja.defaultProps={position:"top",visibility:"md"};const tM=wo(w.List,{name:"RaLongFormTabs",slot:"Root"})(({theme:e})=>({p:0,"& .MuiListItemIcon-root":{minWidth:32,color:e.palette.grey[500]},"& .MuiListItemButton-root.Mui-selected":{borderRight:`2px solid ${e.palette.primary.main}`,marginRight:"-2px"}})),II=({children:e,syncWithLocation:t,value:n,url:r,onChange:s})=>{const a=Br.useLocation();return h.jsx(jn,{children:h.jsx(tM,{component:"nav",children:F.Children.map(e,(l,u)=>{if(!F.isValidElement(l))return null;const g=nM(l,u),d=t?!!Br.matchPath(`${r}/${g}`,a.pathname):u===n;return F.cloneElement(l,{intent:"header",value:t?g:u,syncWithLocation:t,onChange:s,url:r,selected:d})})})})},nM=(e,t)=>e.props.path!=null?e.props.path:t>0?t.toString():"";II.propTypes={children:A.node,url:A.string,tabsWithErrors:A.arrayOf(A.string),syncWithLocation:A.bool,onChange:A.func,value:A.oneOfType([A.string,A.number])};const rM=le(w.Grid,{name:"RaLongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root":{marginTop:e.spacing(2),marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,borderTop:`1px solid ${e.palette.divider}`}})),BI=(e,t)=>e&&e.type===ja&&e.props.position===t,oM=e=>e&&e.type===Ra,Xc=({children:e,formRootPathname:t,syncWithLocation:n,spacing:r,tabs:s,tabsDisposition:a,contentDisposition:l,...u})=>{const[g,d]=F.useState(0),p=Br.useResolvedPath(""),E=x.useResourceContext(u),C=Br.useLocation(),I=F.useMemo(()=>F.Children.toArray(e).find(k=>BI(k,"top")),[e]),B=F.useMemo(()=>F.Children.toArray(e).find(k=>BI(k,"bottom")),[e]),m=F.useMemo(()=>F.Children.toArray(e).filter(k=>oM(k)),[e]),y=k=>{n||d(k)},D=()=>F.cloneElement(s,{onChange:y,syncWithLocation:n,url:t,value:g,intent:"header"},m);return h.jsxs(rM,{container:!0,spacing:r*2,children:[h.jsxs(w.Grid,{item:!0,...a,children:[I,n?h.jsx(Br.Routes,{children:h.jsx(Br.Route,{path:"/*",element:D()})}):D(),B]}),h.jsx(w.Grid,{item:!0,...l,children:F.Children.map(m,(k,P)=>{if(!k)return null;const T=x.getTabbedFormTabFullPath(k,P),O=n?!Br.matchPath(`${p.pathname}/${T}`,C.pathname):g!==P;return F.isValidElement(k)?F.cloneElement(k,{intent:"content",resource:E,hidden:O,value:n?T:P}):null})})]})};Xc.propTypes={children:A.node,spacing:A.number,syncWithLocation:A.bool,tabs:A.element,formRootPathname:A.string,tabsDisposition:Na,contentDisposition:Na},Xc.defaultProps={tabs:h.jsx(II,{})};const iM=()=>{const e=Tt.useLocation(),t=Tt.matchPath(":resource/create/*",e.pathname),n=Tt.matchPath(":resource/:id/*",e.pathname);return t?t.pathnameBase:n?n.pathnameBase:""},os=({spacing:e,...t})=>{const n=iM(),{spacing:r}=Nt(),s=e||r;return h.jsx(x.Form,{formRootPathname:n,...t,children:h.jsx(Xc,{formRootPathname:n,...t,spacing:s})})};os.propTypes={syncWithLocation:A.bool,spacing:A.number,tabsDisposition:Na,contentDisposition:Na},os.defaultProps={syncWithLocation:!1,spacing:2,tabsDisposition:{xl:3,lg:3,md:4,sm:4,xs:12},contentDisposition:{xl:9,lg:9,md:8,sm:8,xs:12}},os.Tab=Ra,os.Header=ja;const sM=wo(x.SimpleForm,{name:"RaApplicaSimpleForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?2:1)}})),Zc=({title:e,modal:t,content:n,subheader:r,secondary:s,...a})=>{const l=lf(e),u=x.useRecordContext();return h.jsx(jn,{content:n,title:l,subheader:r,secondary:u!=null&&u.id?s:null,border:!t,divider:!0,children:h.jsx(sM,{toolbar:h.jsx(Hr,{}),...a})})};Zc.defaultProps={...x.SimpleForm.defaultProps,modal:!1,content:!1,subheader:null,title:null,toolbar:h.jsx(Hr,{children:h.jsx(x.SaveButton,{})}),secondary:h.jsx(Di,{children:h.jsx(x.DeleteWithConfirmButton,{})})},Zc.propTypes={...x.SimpleForm.propTypes,contained:A.bool,content:A.bool,subheader:A.oneOfType([A.string,A.node]),title:A.oneOfType([A.string,A.node]),secondary:A.oneOfType([A.node,A.string,A.object])};const Ha=wo(x.TabbedForm,{name:"RaApplicaTabbedForm",slot:"Root"})(()=>({}));Ha.propTypes={...x.TabbedForm.propTypes},Ha.defaultProps={...x.TabbedForm.defaultProps},Ha.Tab=x.TabbedForm.Tab;const $c=(e,t)=>{const n=t.id;if(!e)return[t];const r=e.findIndex(s=>s.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]},aM=(e,t)=>e&&e.data?{data:$c(e.data,t),total:e.total+1}:e,lM=(e,t)=>e&&e.length>0?$c(e,t):e,AM=(e,t)=>e&&e.data?{...e,data:$c(e.data,t),total:e.total+1}:e,eu=({onClose:e,record:t,children:n,redirect:r})=>{const s=ed.useQueryClient(),a=x.useResourceContext(),l=x.useRedirect(),u=x.useNotify(),g=F.useCallback(E=>{const I=Date.now();s.setQueryData([a,"getOne",{id:E.id}],E),s.setQueriesData([a,"getList"],B=>AM(B,E),{updatedAt:I}),s.setQueriesData([a,"getMany"],B=>lM(B,E),{updatedAt:I}),s.setQueriesData([a,"getManyReference"],B=>aM(B,E),{updatedAt:I}),e(),u("ra.notification.created"),r!==void 0&&l(r,a,E.id,E)},[e,s,a,u,l,r]),{save:d,isLoading:p}=x.useCreateController({mutationOptions:{onSuccess:g}});return h.jsx(x.CreateContextProvider,{value:{record:t,save:d,saving:p,redirect:r},children:F.cloneElement(n,{...n.props,toolbar:h.jsxs(Hr,{children:[h.jsx(x.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e}),h.jsx(x.SaveButton,{})]})})})};eu.propTypes={children:A.node,onClose:A.func,record:A.object,redirect:A.oneOf(["list","edit","show",!1])},eu.defaultProps={redirect:!1};const cM={true:{_scrollToTop:!0},false:{}},uM=le(w.Fab,{name:"RaApplicaCreateInDialogButton",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${x.CreateButtonClasses.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),tu=({fullWidth:e,maxWidth:t,label:n,record:r,redirect:s,scrollToTop:a,className:l,sx:u,...g})=>{const[d,p]=F.useState(!1),E=x.useTranslate(),C=x.useResourceContext(),{openDialog:I,closeDialog:B}=Mi(),m=F.useCallback(()=>I(C,()=>p(!0)),[I,C]),y=F.useCallback(()=>B(C,()=>p(!1)),[B,C]),D=w.useMediaQuery(k=>k.breakpoints.down("md"));return h.jsxs(h.Fragment,{children:[D?h.jsx(uM,{...g,state:cM[String(a)],color:"primary",className:Je(x.CreateButtonClasses.floating,l),"aria-label":n&&E(n),onClick:m,children:h.jsx(Ir.Add,{})}):h.jsx(x.Button,{...g,sx:u,label:n,onClick:m,children:h.jsx(Ir.Add,{})}),h.jsx(w.Dialog,{open:d,onClose:y,fullWidth:e,maxWidth:t,children:h.jsx(eu,{...g,redirect:s,record:r,onClose:y})})]})};tu.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.create",scrollToTop:!0},tu.propTypes={...x.Button.propTypes,redirect:A.oneOf(["list","edit","show",!1]),fullWidth:A.bool,maxWidth:A.oneOf(["xs","sm","md","lg","xl",!1]),label:A.string,record:A.object,scrollToTop:A.bool,className:A.string,sx:A.object};const QI=({onClose:e,children:t})=>{const n=x.useNotify(),r=x.useRecordContext(),s=x.useResourceContext(),{id:a}=r,{isLoading:l,data:u}=x.useGetOne(s,{id:a}),g=F.useCallback(()=>{n("ra.notification.updated",{type:"info",messageArgs:{smart_count:1}}),e()},[e,n]),{save:d,saving:p}=x.useEditController({resource:s,id:a,mutationMode:"pessimistic",mutationOptions:{onSuccess:g}});return h.jsx(x.EditContextProvider,{value:{record:u,isLoading:l,save:d,saving:p},children:F.cloneElement(t,{toolbar:h.jsxs(Hr,{children:[h.jsx(x.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e}),h.jsx(x.SaveButton,{})]})})})};QI.propTypes={children:A.node,onClose:A.func};const nu=({fullWidth:e,maxWidth:t,label:n,...r})=>{const[s,a]=F.useState(!1),{openDialog:l,closeDialog:u}=Mi(),g=x.useResourceContext(),d=F.useCallback(()=>l(g,()=>a(!0)),[l,g]),p=F.useCallback(()=>u(g,()=>a(!1)),[u,g]);return h.jsxs(h.Fragment,{children:[h.jsx(x.Button,{label:n,onClick:d,children:h.jsx(Ir.Edit,{})}),h.jsx(w.Dialog,{open:s,onClose:p,fullWidth:e,maxWidth:t,children:h.jsx(QI,{...r,onClose:p})})]})};nu.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.edit"},nu.propTypes={fullWidth:A.bool,maxWidth:A.oneOf(["xs","sm","md","lg","xl",!1]),label:A.string};const mI=({label:e="ra.auth.sign_in",...t})=>{const n=x.useRecordContext(),[r,s]=F.useState(!1),a=x.useAuthProvider(),l=F.useCallback(u=>{u.stopPropagation(),u.preventDefault(),s(!0),a.impersonate(n==null?void 0:n.id).then(()=>{s(!1),document.location.href="/"})},[a,n==null?void 0:n.id]);return h.jsx(x.Button,{disabled:r||a.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:l,...t,children:h.jsx(Ir.VpnKey,{})})};mI.propTypes={label:A.string};const ru=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:h.jsxs(Di,{children:[e&&h.jsx(x.EditButton,{}),t&&h.jsx(x.DeleteWithConfirmButton,{}),n&&h.jsx(x.CloneButton,{})]});ru.defaultProps={canEdit:!0,canDelete:!0,canClone:!1},ru.propTypes={canEdit:A.bool,canDelete:A.bool,canClone:A.bool};var gM=Array.isArray,ou=gM,dM=typeof bn=="object"&&bn&&bn.Object===Object&&bn,fM=dM,pM=fM,hM=typeof self=="object"&&self&&self.Object===Object&&self,CM=pM||hM||Function("return this")(),iu=CM,EM=iu,IM=EM.Symbol,su=IM,yI=su,bI=Object.prototype,BM=bI.hasOwnProperty,QM=bI.toString,is=yI?yI.toStringTag:void 0;function mM(e){var t=BM.call(e,is),n=e[is];try{e[is]=void 0;var r=!0}catch{}var s=QM.call(e);return r&&(t?e[is]=n:delete e[is]),s}var yM=mM,bM=Object.prototype,vM=bM.toString;function xM(e){return vM.call(e)}var wM=xM,vI=su,TM=yM,PM=wM,SM="[object Null]",OM="[object Undefined]",xI=vI?vI.toStringTag:void 0;function DM(e){return e==null?e===void 0?OM:SM:xI&&xI in Object(e)?TM(e):PM(e)}var wI=DM;function MM(e){return e!=null&&typeof e=="object"}var kM=MM,FM=wI,LM=kM,NM="[object Symbol]";function RM(e){return typeof e=="symbol"||LM(e)&&FM(e)==NM}var au=RM,jM=ou,HM=au,VM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zM=/^\w*$/;function WM(e,t){if(jM(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||HM(e)?!0:zM.test(e)||!VM.test(e)||t!=null&&e in Object(t)}var UM=WM;function YM(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var TI=YM,GM=wI,KM=TI,qM="[object AsyncFunction]",_M="[object Function]",JM="[object GeneratorFunction]",XM="[object Proxy]";function ZM(e){if(!KM(e))return!1;var t=GM(e);return t==_M||t==JM||t==qM||t==XM}var $M=ZM,e2=iu,t2=e2["__core-js_shared__"],n2=t2,lu=n2,PI=function(){var e=/[^.]+$/.exec(lu&&lu.keys&&lu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function r2(e){return!!PI&&PI in e}var o2=r2,i2=Function.prototype,s2=i2.toString;function a2(e){if(e!=null){try{return s2.call(e)}catch{}try{return e+""}catch{}}return""}var l2=a2,A2=$M,c2=o2,u2=TI,g2=l2,d2=/[\\^$.*+?()[\]{}|]/g,f2=/^\[object .+?Constructor\]$/,p2=Function.prototype,h2=Object.prototype,C2=p2.toString,E2=h2.hasOwnProperty,I2=RegExp("^"+C2.call(E2).replace(d2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function B2(e){if(!u2(e)||c2(e))return!1;var t=A2(e)?I2:f2;return t.test(g2(e))}var Q2=B2;function m2(e,t){return e==null?void 0:e[t]}var y2=m2,b2=Q2,v2=y2;function x2(e,t){var n=v2(e,t);return b2(n)?n:void 0}var SI=x2,w2=SI,T2=w2(Object,"create"),Va=T2,OI=Va;function P2(){this.__data__=OI?OI(null):{},this.size=0}var S2=P2;function O2(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var D2=O2,M2=Va,k2="__lodash_hash_undefined__",F2=Object.prototype,L2=F2.hasOwnProperty;function N2(e){var t=this.__data__;if(M2){var n=t[e];return n===k2?void 0:n}return L2.call(t,e)?t[e]:void 0}var R2=N2,j2=Va,H2=Object.prototype,V2=H2.hasOwnProperty;function z2(e){var t=this.__data__;return j2?t[e]!==void 0:V2.call(t,e)}var W2=z2,U2=Va,Y2="__lodash_hash_undefined__";function G2(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=U2&&t===void 0?Y2:t,this}var K2=G2,q2=S2,_2=D2,J2=R2,X2=W2,Z2=K2;function qo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}qo.prototype.clear=q2,qo.prototype.delete=_2,qo.prototype.get=J2,qo.prototype.has=X2,qo.prototype.set=Z2;var $2=qo;function ek(){this.__data__=[],this.size=0}var tk=ek;function nk(e,t){return e===t||e!==e&&t!==t}var rk=nk,ok=rk;function ik(e,t){for(var n=e.length;n--;)if(ok(e[n][0],t))return n;return-1}var za=ik,sk=za,ak=Array.prototype,lk=ak.splice;function Ak(e){var t=this.__data__,n=sk(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():lk.call(t,n,1),--this.size,!0}var ck=Ak,uk=za;function gk(e){var t=this.__data__,n=uk(t,e);return n<0?void 0:t[n][1]}var dk=gk,fk=za;function pk(e){return fk(this.__data__,e)>-1}var hk=pk,Ck=za;function Ek(e,t){var n=this.__data__,r=Ck(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Ik=Ek,Bk=tk,Qk=ck,mk=dk,yk=hk,bk=Ik;function _o(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_o.prototype.clear=Bk,_o.prototype.delete=Qk,_o.prototype.get=mk,_o.prototype.has=yk,_o.prototype.set=bk;var vk=_o,xk=SI,wk=iu,Tk=xk(wk,"Map"),Pk=Tk,DI=$2,Sk=vk,Ok=Pk;function Dk(){this.size=0,this.__data__={hash:new DI,map:new(Ok||Sk),string:new DI}}var Mk=Dk;function kk(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Fk=kk,Lk=Fk;function Nk(e,t){var n=e.__data__;return Lk(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Wa=Nk,Rk=Wa;function jk(e){var t=Rk(this,e).delete(e);return this.size-=t?1:0,t}var Hk=jk,Vk=Wa;function zk(e){return Vk(this,e).get(e)}var Wk=zk,Uk=Wa;function Yk(e){return Uk(this,e).has(e)}var Gk=Yk,Kk=Wa;function qk(e,t){var n=Kk(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var _k=qk,Jk=Mk,Xk=Hk,Zk=Wk,$k=Gk,eF=_k;function Jo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jo.prototype.clear=Jk,Jo.prototype.delete=Xk,Jo.prototype.get=Zk,Jo.prototype.has=$k,Jo.prototype.set=eF;var tF=Jo,MI=tF,nF="Expected a function";function Au(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(nF);var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var l=e.apply(this,r);return n.cache=a.set(s,l)||a,l};return n.cache=new(Au.Cache||MI),n}Au.Cache=MI;var rF=Au,oF=rF,iF=500;function sF(e){var t=oF(e,function(r){return n.size===iF&&n.clear(),r}),n=t.cache;return t}var aF=sF,lF=aF,AF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cF=/\\(\\)?/g,uF=lF(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(AF,function(n,r,s,a){t.push(s?a.replace(cF,"$1"):r||n)}),t}),gF=uF;function dF(e,t){for(var n=-1,r=e==null?0:e.length,s=Array(r);++n<r;)s[n]=t(e[n],n,e);return s}var fF=dF,kI=su,pF=fF,hF=ou,CF=au,EF=1/0,FI=kI?kI.prototype:void 0,LI=FI?FI.toString:void 0;function NI(e){if(typeof e=="string")return e;if(hF(e))return pF(e,NI)+"";if(CF(e))return LI?LI.call(e):"";var t=e+"";return t=="0"&&1/e==-EF?"-0":t}var IF=NI,BF=IF;function QF(e){return e==null?"":BF(e)}var mF=QF,yF=ou,bF=UM,vF=gF,xF=mF;function wF(e,t){return yF(e)?e:bF(e,t)?[e]:vF(xF(e))}var TF=wF,PF=au,SF=1/0;function OF(e){if(typeof e=="string"||PF(e))return e;var t=e+"";return t=="0"&&1/e==-SF?"-0":t}var DF=OF,MF=TF,kF=DF;function FF(e,t){t=MF(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[kF(t[n++])];return n&&n==r?e:void 0}var LF=FF,NF=LF;function RF(e,t,n){var r=e==null?void 0:NF(e,t);return r===void 0?n:r}var jF=RF;const cu=Qi(jF),RI=e=>{const{className:t,emptyText:n,source:r,title:s,...a}=e,l=yo.useRecordContext(e),u=cu(l,r),g=yo.useTranslate();if(!u)return n?h.jsx(Cf,{component:"span",variant:"body2",className:t,...a,children:n&&g(n,{_:n})}):h.jsx(jI,{className:t,...a});if(Array.isArray(u))return h.jsx(HF,{className:t,...a,children:u.map((p,E)=>{const C=cu(p,s)||s;return h.jsx("li",{children:C},E)})});const d=cu(l,s)||s;return h.jsx(jI,{className:t,...a,children:d})};RI.propTypes={src:A.string,title:A.oneOfType([A.string,A.func,A.element]),target:A.string,download:A.oneOfType([A.bool,A.string]),ping:A.string,rel:A.string,emptyText:A.string,source:A.string.isRequired,className:A.string};const jI=le("div",{name:"RaApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),HF=le("ul")({display:"inline-block"}),uu=({entityId:e,property:t,...n})=>{const[r,s]=F.useState(null),a=x.useRecordContext(n),l=x.useDataProvider(),u=x.useResourceContext(),g=F.useCallback(async E=>{E.preventDefault(),E.stopPropagation();const C=gt.get(a,n==null?void 0:n.source),I=u.replace("entities/",""),B=await l.getFile(`/attachments/${I}/${e||(a==null?void 0:a.id)}/${t||(n==null?void 0:n.source)}/${(C==null?void 0:C.id)||(a==null?void 0:a.id)}`),m=document.createElement("a");m.href=B,m.download=gt.get(a,(n==null?void 0:n.title)||(n==null?void 0:n.source)),m.click()},[l,a,e,u,t,n==null?void 0:n.source,n==null?void 0:n.title]),d=F.useMemo(()=>({...a,[n==null?void 0:n.source]:(a==null?void 0:a.src)||gt.get(a,n==null?void 0:n.source),[n==null?void 0:n.title]:(a==null?void 0:a.title)||gt.get(a,(n==null?void 0:n.title)||(n==null?void 0:n.source))}),[a,n==null?void 0:n.source,n==null?void 0:n.title]),p=x.useTranslate();return F.useEffect(()=>{!a||!(a!=null&&a.userId)||l.getOne("entities/user",{id:a==null?void 0:a.userId}).then(({data:E})=>s(E))},[a,l]),h.jsx(RI,{...n,record:d,onClick:g,title:h.jsxs(w.Box,{sx:{cursor:"pointer"},children:[h.jsx(w.Typography,{variant:"subtitle1",children:gt.get(d,(n==null?void 0:n.title)||(n==null?void 0:n.source))}),h.jsxs(w.Typography,{variant:"caption",color:"secondary",children:[gt.get(d,"sizeDescription"),r&&" | ",r&&p("ra.attachment.info",{user:r==null?void 0:r.name,created:lr(d==null?void 0:d.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};uu.propTypes={...x.FileField.propTypes,source:A.string,title:A.string};const VF=le(x.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),ss=e=>{const t=`_${e==null?void 0:e.source}`;return h.jsx(VF,{...e,source:t})};ss.propTypes={...x.ImageField.propTypes,source:A.string};const Ua=({width:e,height:t,circle:n,justify:r,record:s,...a})=>{const l=F.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]),u=x.useRecordContext(),g=s||u;return h.jsx(ss,{sx:d=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${d.palette.divider}`,objectFit:"cover !important",...l,minWidth:l.width,minHeight:l.height}}),...a,record:g})};Ua.defaultProps={...ss.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"},Ua.propTypes={...ss.propTypes,width:A.oneOfType([A.number,A.string]),height:A.oneOfType([A.number,A.string]),circle:A.bool,justify:A.oneOf(["flex-start","center","flex-end"])};var HI={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(bn,function(){return function(n,r,s){n=n||{};var a=r.prototype,l={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 u(d,p,E,C){return a.fromToBase(d,p,E,C)}s.en.relativeTime=l,a.fromToBase=function(d,p,E,C,I){for(var B,m,y,D=E.$locale().relativeTime||l,k=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"}],P=k.length,T=0;T<P;T+=1){var O=k[T];O.d&&(B=C?s(d).diff(E,O.d,!0):E.diff(d,O.d,!0));var V=(n.rounding||Math.round)(Math.abs(B));if(y=B>0,V<=O.r||!O.r){V<=1&&T>0&&(O=k[T-1]);var q=D[O.l];I&&(V=I(""+V)),m=typeof q=="string"?q.replace("%d",V):q(V,p,O.l,y);break}}if(p)return m;var ne=y?D.future:D.past;return typeof ne=="function"?ne(m):ne.replace("%s",m)},a.to=function(d,p){return u(d,p,this,!0)},a.from=function(d,p){return u(d,p,this)};var g=function(d){return d.$u?s.utc():s()};a.toNow=function(d){return this.to(g(this),d)},a.fromNow=function(d){return this.from(g(this),d)}}})})(HI);var zF=HI.exports;const WF=Qi(zF);lr.extend(WF);const Ya=e=>{const t=x.useRecordContext(e),[n]=x.useLocaleState(),r=F.useMemo(()=>lr(gt.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return h.jsxs(F.Fragment,{children:[h.jsx(x.DateField,{record:t,source:e.source,showTime:!0}),h.jsx("br",{}),h.jsx(w.Typography,{variant:"caption",color:"textSecondary",children:r})]})};Ya.displayName="DateAgoField",Ya.propTypes={source:A.string.isRequired};const VI=le(x.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));VI.propTypes={...x.DateField.propTypes};const gu=e=>h.jsx(VI,{...e});gu.defaultProps={...x.DateField.defaultProps,variant:"body1"},gu.propTypes={...x.DateField.propTypes};const zI=le(x.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));zI.propTypes={...x.EmailField.propTypes};const du=e=>h.jsx(zI,{...e});du.defaultProps={...x.EmailField.defaultProps,variant:"body1"},du.propTypes={...x.EmailField.propTypes};const UF=le(x.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),fu=({...e})=>{const t=x.useRecordContext(e),n=F.useCallback(r=>{r.preventDefault(),r.stopPropagation();const s=gt.get(t,`_${e==null?void 0:e.source}`,gt.get(t,e==null?void 0:e.source)),a=gt.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),l=document.createElement("a");l.href=s,l.download=a,l.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return h.jsx(UF,{...e,record:t,onClick:n})};fu.propTypes={...x.FileField.propTypes,source:A.string,title:A.string};const WI=e=>h.jsx(x.FunctionField,{...e});WI.defaultProps={variant:"body1"};const YF=le("div")(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),pu=({source:e,defaultValue:t,...n})=>{const r=x.useRecordContext(n),s=gt.get(r,e,t);return h.jsx("span",{dangerouslySetInnerHTML:{__html:s&&s!==null?s:t}})};pu.propTypes={defaultValue:A.any,source:A.string,record:A.object},pu.defaultProps={defaultValue:"&nbsp;"};const UI=({title:e,children:t})=>e&&e!==!1?h.jsx(w.Tooltip,{title:e,placement:"top",children:t}):t;UI.propTypes={title:A.oneOfType([A.string,A.bool]),children:A.oneOfType([A.element,A.arrayOf(A.element)])};const hu=({label:e,source:t,defaultValue:n,children:r,tooltip:s,...a})=>{const{getCurrentDialog:l}=Mi(),u=x.useRecordContext(a),g=x.useResourceContext(a),d=l(),p=F.useMemo(()=>!s||s===!1?!1:typeof s=="function"?s(u):typeof s=="string"?gt.get(u,s,s):s,[u,s]);return h.jsx(UI,{title:p,children:h.jsxs(F.Fragment,{children:[h.jsx(w.InputLabel,{children:h.jsx(x.FieldTitle,{label:e,source:t,resource:d||g})}),h.jsx(YF,{...a,children:F.cloneElement(r,{source:t,record:u,defaultValue:n,resource:d||g})})]})})};hu.propTypes={defaultValue:A.any,tooltip:A.oneOfType([A.string,A.bool,A.func]),source:A.string,label:A.string,name:A.string,children:A.element},hu.defaultProps={defaultValue:"&nbsp;",children:h.jsx(pu,{})};const GF=wo("div",{name:"RaApplicaReferenceManyField",slot:"root"})(({theme:e,margin:t,border:n})=>({marginLeft:t?0:`-${e.spacing(2.5)}`,marginRight:t?0:`-${e.spacing(2.5)}`,borderBottom:n?`1px solid ${e.palette.divider}`:"none","& .MuiCardContent-root":{borderTop:n?`1px solid ${e.palette.divider}`:"none"},"& .MuiToolbar-root":{marginTop:`-${e.spacing(2)}`,marginBottom:e.spacing(t?0:1),marginLeft:e.spacing(t?1:2.5),marginRight:e.spacing(t?1:2.5),width:t?"auto":`calc(100% - ${e.spacing(5)})`,[e.breakpoints.down("md")]:{marginTop:0}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`},"& .MuiTablePagination-toolbar":{marginTop:e.spacing(1),marginBottom:0},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0},"& .RaBulkActionsToolbar-toolbar":{minHeight:64,"& h6":{marginTop:e.spacing(.5)},"& .RaBulkActionsToolbar-topToolbar":{marginTop:e.spacing(1)}}})),Xo=e=>h.jsx(GF,{children:h.jsx(x.ReferenceManyField,{...e})});Xo.defaultProps={...x.ReferenceManyField.defaultProps,margin:!1,border:!1},Xo.propTypes={...x.ReferenceManyField.propTypes,margin:A.bool,border:A.bool};const YI=({source:e,...t})=>{const n=x.useRecordContext(t),r=gt.get(n,e,0),s=r/1024,a=s/1024,l=a/1024,u=l>1?`${l.toFixed(2)} GB`:a>1?`${a.toFixed(2)} MB`:s>1?`${s.toFixed(2)} KB`:`${r.toFixed(2)} B`;return h.jsx(w.Typography,{component:"span",variant:"body1",...t,children:u})};YI.propTypes={record:A.object,source:A.string};const GI=le(x.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));GI.propTypes={...x.TextField.propTypes};const Cu=e=>h.jsx(GI,{...e});Cu.defaultProps={...x.TextField.defaultProps,variant:"body1"},Cu.propTypes={...x.TextField.propTypes};const st=({label:e,children:t,display:n,helperText:r,sx:s,...a})=>{const l=Vt.useTheme(),{getCurrentDialog:u}=Mi(),{source:g,resource:d,isRequired:p}=a,{fieldState:{invalid:E}}=x.useInput(a),C=u();return h.jsxs(w.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:E?l.palette.error.main:l.palette.text.secondary,"& span":{display:"none"}},...s},children:[n==="label"&&e!==!1&&h.jsx(w.InputLabel,{error:E===!0,children:h.jsx(x.FieldTitle,{label:e,source:g,resource:C||d,isRequired:p})}),F.cloneElement(t,{...t.props,...a,label:n==="legend"?e:!1}),n==="label"&&r&&h.jsx(w.FormHelperText,{sx:{pl:2,pb:2,marginTop:"0 !important"},error:E===!0,children:r})]})};st.propTypes={sx:A.object,children:A.element,label:A.oneOfType([A.string,A.bool]),addLabel:A.bool,resource:A.string,isRequired:A.bool,source:A.string,display:A.oneOf(["legend","label"]),helperText:A.oneOfType([A.string,A.bool])},st.defaultProps={display:"label"},le(x.ArrayInput,{name:"RaApplicaArrayInput",slot:"root"})(({theme:e})=>({marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}})),{...x.ArrayInput.propTypes,...st.propTypes};const KF=le(x.FileInput,{name:"RaApplicaFileInput",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}}})),Eu=({children:e,...t})=>{const n=x.useRecordContext(t),r=t==null?void 0:t.source,s=n==null?void 0:n.id;return h.jsx(st,{...t,children:h.jsx(KF,{children:F.cloneElement(e,{...e.props,entityId:s,property:r})})})};Eu.propTypes={...x.FileInput.propTypes,children:A.node,multiple:A.bool},Eu.defaultProps={children:h.jsx(uu,{title:"name",source:"path"}),multiple:!0};const qF=le(x.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),KI=({perPage:e,...t})=>h.jsx(st,{...t,children:h.jsx(qF,{})});KI.propTypes={...x.AutocompleteArrayInput.propTypes,...st.propTypes};const _F=le(x.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),qI=({perPage:e,...t})=>h.jsx(st,{...t,children:h.jsx(_F,{})});qI.propTypes={...x.AutocompleteInput.propTypes,...st.propTypes};const JF=le(x.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({})),Iu=({horizontal:e,...t})=>{const n=lt();return h.jsx(st,{...t,sx:e?{flexDirection:e?"row":"column",alignItems:e?"center":"flex-start","& .MuiFormGroup-root":{margin:0},"& .MuiFormControlLabel-root":{margin:0,"& .MuiTypography-root":{display:"none",visibility:"hidden"},"& .MuiSwitch-root":{marginRight:`-${n.spacing(.5)}`}}}:{},children:h.jsx(JF,{})})};Iu.defaultProps={...x.BooleanInput.defaultProps,...st.defaultProps},Iu.propTypes={...x.BooleanInput.propTypes,...st.propTypes,horizontal:A.bool};const XF=le(x.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Bu=e=>h.jsx(st,{...e,children:h.jsx(XF,{})});Bu.propTypes={...x.DateInput.propTypes,...st.propTypes},Bu.defaultProps={...x.DateInput.defaultProps,...st.defaultProps};const ZF=le(x.FileInput,{name:"RaApplicaFileInput",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}}})),Qu=({children:e,title:t,...n})=>{const r=Vl.useWatch({name:n.source}),s=x.useRecordContext(n),{source:a}=n,l=F.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const u=gt.get(s,a);if(u){const g=u.split("__");return g.length>0?g[g.length-1]:u}return u},[s,a,r]);return h.jsx(st,{...n,children:h.jsx(ZF,{children:F.cloneElement(e,{...e.props,title:t||a,source:a,record:{...s,[a]:(r==null?void 0:r.title)||gt.get(s,a),[`_${a}`]:(r==null?void 0:r.src)||gt.get(s,`_${a}`),[t||a]:l}})})})};Qu.propTypes={...x.FileInput.propTypes,source:A.string,title:A.string,children:A.node},Qu.defaultProps={children:h.jsx(fu,{})};const mu=({children:e,title:t,...n})=>{const r=Vl.useWatch({name:n.source}),s=x.useRecordContext(n),{source:a}=n;return h.jsx(st,{...n,children:h.jsx(x.ImageInput,{accept:"image/*",children:F.cloneElement(e,{...e.props,title:t,source:a,record:{...s,[a]:(r==null?void 0:r.title)||gt.get(s,a),[`_${a}`]:(r==null?void 0:r.src)||gt.get(s,`_${a}`)}})})})};mu.defaultProps={children:h.jsx(Ua,{}),multiple:!1},mu.propTypes={...x.ImageInput.propTypes,source:A.string,title:A.string,children:A.node,multiple:A.bool};const $F=le(x.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),yu=e=>h.jsx(st,{...e,children:h.jsx($F,{})});yu.propTypes={...x.NumberInput.propTypes,...st.propTypes},yu.defaultProps={...x.NumberInput.defaultProps,...st.defaultProps};const _I=({source:e,minWidth:t=300,children:n})=>{const r=x.useResourceContext(),s=x.useRecordContext(),[a,l]=F.useState(gt.get(s,e,"")),[u,g]=F.useState(!1),d=F.useCallback(B=>l(B.target.value),[]),p=x.useDataProvider(),E=F.useCallback(B=>{B.key==="Enter"&&(g(!0),p.update(r,{id:s.id,data:{...s,[e]:a,_changed:e}}).then(()=>g(!1)))},[a,p,r,s,e]),C=F.useCallback(()=>{gt.get(s,e)!==a&&(g(!0),p.update(r,{id:s.id,data:{...s,[e]:a,_changed:e}}).then(()=>g(!1)))},[a,p,r,e,s]),I=F.useCallback(B=>{g(!0),p.update(r,{id:s.id,data:{...s,[e]:B,_changed:e}}).then(()=>g(!1))},[p,r,e,s]);return F.useEffect(()=>l(gt.get(s,e)),[s,e]),n?F.cloneElement(n,{...n.props,source:e,value:a,onChange:I}):h.jsx(w.TextField,{value:a,disabled:u,onChange:d,onKeyPress:E,onBlur:C,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})};_I.propTypes={source:A.string.isRequired,minWidth:A.number,children:A.element};const bu=({children:e,...t})=>h.jsx(x.ReferenceArrayInput,{...t,children:F.cloneElement(e,{...t,source:e.props.source||t.source})});bu.propTypes={...x.ReferenceArrayInput.propTypes,children:A.element},bu.defaultProps={...x.ReferenceArrayInput.defaultProps};const vu=({children:e,...t})=>h.jsx(x.ReferenceInput,{...t,children:F.cloneElement(e,{...t,source:e.props.source||t.source})});vu.propTypes={...x.ReferenceInput.propTypes,children:A.element},vu.defaultProps={...x.ReferenceInput.defaultProps};const xu=({reference:e,target:t,children:n,filters:r,actions:s,...a})=>h.jsx(x.ResourceContextProvider,{value:e,children:h.jsx(Xo,{perPage:5,pagination:h.jsx(x.Pagination,{}),...a,reference:e,target:t,children:h.jsxs(F.Fragment,{children:[h.jsx(x.ListToolbar,{filters:r,actions:s}),n]})})});xu.propTypes={...Xo.propTypes,children:A.node.isRequired,reference:A.string.isRequired,target:A.string.isRequired,filters:A.oneOfType([A.element,A.func,A.element,A.arrayOf(A.node)]),actions:A.oneOfType([A.element,A.func,A.element])},xu.defaultProps={...Xo.defaultProps};const e4=le(x.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),t4=e=>h.jsx(e4,{...e}),JI=le(x.SelectArrayInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .RaSelectArrayInput-chips":{"& .RaSelectArrayInput-chip":{marginTop:0}}}));JI.propTypes={...x.SelectArrayInput.propTypes};const wu=e=>h.jsx(st,{...e,children:h.jsx(JI,{options:{autoWidth:!1}})});wu.defaultProps={optionText:"name",optionValue:"id"},wu.propTypes={...x.SelectArrayInput.propTypes,...st.propTypes};const n4=le(x.SelectInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),XI=e=>h.jsx(st,{...e,children:h.jsx(n4,{})});XI.propTypes={...x.SelectInput.propTypes,...st.propTypes};const as=e=>h.jsx(st,{...e,children:h.jsx(x.TextInput,{})});as.defaultProps={...x.TextInput.defaultProps},as.propTypes={...x.TextInput.propTypes,...st.propTypes};const Ga=({...e})=>{var u,g;const t=x.useTranslate(),n=x.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(g=(u=Vl.useController({name:e==null?void 0:e.source}))==null?void 0:u.field)==null?void 0:g.value;let s=e.helperText,a=e.validate;a?Array.isArray(a)&&a.indexOf(n)===-1&&a.push(n):a=[n];const l=t("app.input.max_length_info",{count:(r==null?void 0:r.length)||0,max:e==null?void 0:e.maxLength});return e!=null&&e.maxLength&&(s=s&&s.length>0?`${l} - ${t(s)}`:l),h.jsx(as,{...e,validate:a,helperText:s})};Ga.displayName="SmartTextInput",Ga.defaultProps={multiline:!1},Ga.propTypes={...as.propTypes,maxLength:A.number,multiline:A.bool,rows:A.number};const ZI=e=>{const t=e.split(":");return t.length===1&&t.push("00"),lr().hour(t[0]).minute(t[1])};function r4(){var e=new Date().getTime();window.performance&&typeof window.performance.now=="function"&&(e+=performance.now());var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)});return t}const o4=e=>{if(!e)return"";const t=ZI(e);return t?t.format("HH:mm"):""},i4=e=>e,s4=le(x.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Tu=e=>h.jsx(st,{...e,children:h.jsx(s4,{})});Tu.defaultProps={...x.TimeInput.defaultProps,format:o4,parse:i4},Tu.propTypes={...x.TimeInput.propTypes,...st.propTypes};const a4=le(x.Datagrid,{name:"RaApplicaDatagrid",slot:"root"})(()=>({"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .RaBulkActionsToolbar-topToolbar":{backgroundColor:"transparent"},"& .icon span":{top:-1,left:-1},"& th":{backgroundColor:"yellow",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),Pu=e=>h.jsx(a4,{...e});Pu.propTypes={...x.Datagrid.propTypes},Pu.defaultProps={...x.Datagrid.defaultProps};const l4=le("div")(({theme:e})=>({padding:e.spacing(2)})),$I=({actions:e,className:t,...n})=>{const{hasCreate:r}=yo.useResourceDefinition(n),s=yo.useResourceContext(n),a=yo.useTranslate(),l=yo.useGetResourceLabel(),u=a(`resources.${s}.forcedCaseName`,{smart_count:0,_:l(s,0)}),g=a("ra.page.empty",{name:u}),d=a("ra.page.invite");return h.jsxs(A4,{className:t,children:[h.jsxs("div",{className:Zo.message,children:[h.jsx(Ir.Inbox,{className:Zo.icon}),h.jsx(w.Typography,{variant:"h4",paragraph:!0,children:a(`resources.${s}.empty`,{_:g})}),r&&h.jsx(w.Typography,{variant:"body1",children:a(`resources.${s}.invite`,{_:d})})]}),h.jsx(l4,{className:Zo.toolbar,children:e})]})},Ka="RaApplicaEmpty",Zo={message:`${Ka}-message`,icon:`${Ka}-icon`,toolbar:`${Ka}-toolbar`},A4=le("span",{name:Ka,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${Zo.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${Zo.icon}`]:{width:"9em",height:"9em"},[`& .${Zo.toolbar}`]:{textAlign:"center",marginTop:"2em"}}));$I.propTypes={actions:A.element,className:A.string};const c4=wo(x.List,{name:"RaApplicaList",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:e.spacing(2)},"& .RaFilterForm-filterFormInput > .ra-input":{alignSelf:"center"},"& .RaFilterFormInput-hideButton":{marginTop:e.spacing(1),marginBottom:e.spacing(.5),marginRight:e.spacing(1)}}},"& .RaList-content":{"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .icon span":{top:-1,left:-1}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}})),Su=e=>h.jsx(jn,{content:!1,children:h.jsx(c4,{...x.List.defaultProps,...e})});Su.defaultProps={...x.List.defaultProps},Su.propTypes={...x.List.propTypes};const u4=()=>{const e=x.useRefresh(),t=x.useNotify(),n=x.useUnselectAll(),r=x.useResourceContext(),{selectedIds:s,data:a}=x.useListContext(),l=x.useRecordContext(),u=s.map(E=>a.find(C=>C.id===E)),[g,{isLoading:d}]=x.useUpdateMany(r,{ids:s.length>0?s:[l==null?void 0:l.id],data:{readed:lr().format("YYYY-MM-DD HH:mm:ss")},rows:u},{onSuccess:()=>{e(),t("resources.notifications.messages.readed.done"),n(r)},onError:()=>t("ra.notification.readed_error","warning"),onFailure:()=>t("ra.notification.readed_error","warning")}),p=F.useCallback(()=>{g()},[g]);return h.jsx(x.Button,{label:"ra.notification.mark_as_readed",disabled:d||(l==null?void 0:l.readed)!==null,onClick:p,children:h.jsx(Ir.Email,{})})},g4=()=>{const e=x.useRefresh(),t=x.useNotify(),n=x.useUnselectAll(),{selectedIds:r,data:s}=x.useListContext(),a=x.useRecordContext(),l=x.useResourceContext(),u=r.map(E=>s.find(C=>C.id===E)).concat([a]),[g,{isLoading:d}]=x.useUpdateMany(l,{ids:r.length>0?r:[a==null?void 0:a.id],data:{readed:null},rows:u},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),n("notifications")},onFailure:()=>t("resources.notifications.messages.unreaded.error","warning")}),p=F.useCallback(()=>{g()},[g]);return h.jsx(x.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||a&&!(a!=null&&a.readed),onClick:p,children:h.jsx(Ir.Drafts,{})})},d4=e=>{const t=x.useRecordContext(e),n=x.useResourceContext(e),r=x.useRedirect(),s=x.useNotify(),a=x.useTranslate(),[l]=x.useLocaleState(),u=F.useMemo(()=>t!=null&&t.readed?lr(t==null?void 0:t.readed).locale(l).format("ddd, DD MMM YYYY HH:mm:ss"):!1,[t==null?void 0:t.readed,l]),[g]=x.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:lr().format("YYYY-MM-DD HH:mm:ss")}},{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)},onFailure:()=>{s("ra.notification.readed_error","warning")}}),d=F.useCallback(()=>g(),[g]);return h.jsxs("div",{onClick:d,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[h.jsx(w.Typography,{variant:"subtitle1",children:h.jsxs(w.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),h.jsx(w.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:t==null?void 0:t.content}}),u&&h.jsx(w.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:a("ra.notification.readed",{readed:u})})]})},f4=({...e})=>{const t=w.useTheme(),{mode:n,colorize:r,density:s}=F.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?w.darken:w.lighten,density:t.palette.mode==="dark"?.5:.9}),[t.palette.mode]),a=F.useCallback(l=>({backgroundColor:l!=null&&l.readed?r(t.palette.primary[n],s):r(t.palette.secondary[n],s)}),[t,n,r,s]);return h.jsxs(x.Datagrid,{...e,rowStyle:a,children:[h.jsx(d4,{source:"notification",sortable:!1,label:"ra.notification"}),h.jsx(Ya,{source:"created",label:"ra.notification.created"}),h.jsxs(Di,{children:[h.jsx(u4,{}),h.jsx(g4,{})]})]})},p4=e=>({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 ${je(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${je(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${je(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${je(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${je(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${je(e.palette.info.main,.2)}`,success:`0 0 0 2px ${je(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${je(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${je(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${je(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${je(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${je(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${je(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${je(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${je(e.palette.grey[500],.2)}`});function Tn(e,t){h4(e)&&(e="100%");var n=C4(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function h4(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function C4(e){return typeof e=="string"&&e.indexOf("%")!==-1}function E4(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function qa(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Ou(e){return e.length===1?"0"+e:String(e)}function I4(e,t,n){return{r:Tn(e,255)*255,g:Tn(t,255)*255,b:Tn(n,255)*255}}function Du(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function B4(e,t,n){var r,s,a;if(e=Tn(e,360),t=Tn(t,100),n=Tn(n,100),t===0)s=n,a=n,r=n;else{var l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;r=Du(u,l,e+1/3),s=Du(u,l,e),a=Du(u,l,e-1/3)}return{r:r*255,g:s*255,b:a*255}}function Q4(e,t,n){e=Tn(e,255),t=Tn(t,255),n=Tn(n,255);var r=Math.max(e,t,n),s=Math.min(e,t,n),a=0,l=r,u=r-s,g=r===0?0:u/r;if(r===s)a=0;else{switch(r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:g,v:l}}function m4(e,t,n){e=Tn(e,360)*6,t=Tn(t,100),n=Tn(n,100);var r=Math.floor(e),s=e-r,a=n*(1-t),l=n*(1-s*t),u=n*(1-(1-s)*t),g=r%6,d=[n,l,a,a,u,n][g],p=[u,n,n,l,a,a][g],E=[a,a,u,n,n,l][g];return{r:d*255,g:p*255,b:E*255}}function y4(e,t,n,r){var s=[Ou(Math.round(e).toString(16)),Ou(Math.round(t).toString(16)),Ou(Math.round(n).toString(16))];return r&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function eB(e){return pn(e)/255}function pn(e){return parseInt(e,16)}var tB={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ls(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,a=null,l=!1,u=!1;return typeof e=="string"&&(e=x4(e)),typeof e=="object"&&(Ar(e.r)&&Ar(e.g)&&Ar(e.b)?(t=I4(e.r,e.g,e.b),l=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ar(e.h)&&Ar(e.s)&&Ar(e.v)?(r=qa(e.s),s=qa(e.v),t=m4(e.h,r,s),l=!0,u="hsv"):Ar(e.h)&&Ar(e.s)&&Ar(e.l)&&(r=qa(e.s),a=qa(e.l),t=B4(e.h,r,a),l=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=E4(n),{ok:l,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var b4="[-\\+]?\\d+%?",v4="[-\\+]?\\d*\\.\\d+%?",Vr="(?:".concat(v4,")|(?:").concat(b4,")"),Mu="[\\s|\\(]+(".concat(Vr,")[,|\\s]+(").concat(Vr,")[,|\\s]+(").concat(Vr,")\\s*\\)?"),ku="[\\s|\\(]+(".concat(Vr,")[,|\\s]+(").concat(Vr,")[,|\\s]+(").concat(Vr,")[,|\\s]+(").concat(Vr,")\\s*\\)?"),Hn={CSS_UNIT:new RegExp(Vr),rgb:new RegExp("rgb"+Mu),rgba:new RegExp("rgba"+ku),hsl:new RegExp("hsl"+Mu),hsla:new RegExp("hsla"+ku),hsv:new RegExp("hsv"+Mu),hsva:new RegExp("hsva"+ku),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function x4(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(tB[e])e=tB[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Hn.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Hn.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Hn.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Hn.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Hn.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Hn.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Hn.hex8.exec(e),n?{r:pn(n[1]),g:pn(n[2]),b:pn(n[3]),a:eB(n[4]),format:t?"name":"hex8"}:(n=Hn.hex6.exec(e),n?{r:pn(n[1]),g:pn(n[2]),b:pn(n[3]),format:t?"name":"hex"}:(n=Hn.hex4.exec(e),n?{r:pn(n[1]+n[1]),g:pn(n[2]+n[2]),b:pn(n[3]+n[3]),a:eB(n[4]+n[4]),format:t?"name":"hex8"}:(n=Hn.hex3.exec(e),n?{r:pn(n[1]+n[1]),g:pn(n[2]+n[2]),b:pn(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Ar(e){return!!Hn.CSS_UNIT.exec(String(e))}var _a=2,nB=.16,w4=.05,T4=.05,P4=.15,rB=5,oB=4,S4=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function iB(e){var t=e.r,n=e.g,r=e.b,s=Q4(t,n,r);return{h:s.h*360,s:s.s,v:s.v}}function Ja(e){var t=e.r,n=e.g,r=e.b;return"#".concat(y4(t,n,r,!1))}function O4(e,t,n){var r=n/100,s={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return s}function sB(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-_a*t:Math.round(e.h)+_a*t:r=n?Math.round(e.h)+_a*t:Math.round(e.h)-_a*t,r<0?r+=360:r>=360&&(r-=360),r}function aB(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-nB*t:t===oB?r=e.s+nB:r=e.s+w4*t,r>1&&(r=1),n&&t===rB&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function lB(e,t,n){var r;return n?r=e.v+T4*t:r=e.v-P4*t,r>1&&(r=1),Number(r.toFixed(2))}function AB(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=ls(e),s=rB;s>0;s-=1){var a=iB(r),l=Ja(ls({h:sB(a,s,!0),s:aB(a,s,!0),v:lB(a,s,!0)}));n.push(l)}n.push(Ja(r));for(var u=1;u<=oB;u+=1){var g=iB(r),d=Ja(ls({h:sB(g,u),s:aB(g,u),v:lB(g,u)}));n.push(d)}return t.theme==="dark"?S4.map(function(p){var E=p.index,C=p.opacity,I=Ja(O4(ls(t.backgroundColor||"#141414"),ls(n[E]),C*100));return I}):n}var Fu={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Mt={},Xa={};Object.keys(Fu).forEach(function(e){Mt[e]=AB(Fu[e]),Mt[e].primary=Mt[e][5],Xa[e]=AB(Fu[e],{theme:"dark",backgroundColor:"#141414"}),Xa[e].primary=Xa[e][5]}),Mt.red,Mt.volcano,Mt.gold,Mt.orange,Mt.yellow,Mt.lime,Mt.green,Mt.cyan,Mt.blue,Mt.geekblue,Mt.purple,Mt.magenta,Mt.grey,Mt.grey;const cB=e=>{const{blue:t,red:n,gold:r,cyan:s,green:a,grey:l}=e,u={0:l[0],50:l[1],100:l[2],200:l[3],300:l[4],400:l[5],500:l[6],600:l[7],700:l[8],800:l[9],900:l[10],A50:l[15],A100:l[11],A200:l[12],A400:l[13],A700:l[14],A800:l[16]},g="#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:g},secondary:{lighter:u[100],100:u[100],200:u[200],light:u[300],400:u[400],main:u[500],600:u[600],dark:u[700],800:u[800],darker:u[900],A100:u[0],A200:u.A400,A300:u.A700,contrastText:u[0]},error:{lighter:n[0],light:n[2],main:n[4],dark:n[7],darker:n[9],contrastText:g},warning:{lighter:r[0],light:r[3],main:r[5],dark:r[7],darker:r[9],contrastText:u[100]},info:{lighter:s[0],light:s[3],main:s[5],dark:s[7],darker:s[9],contrastText:g},success:{lighter:a[0],light:a[3],main:a[5],dark:a[7],darker:a[9],contrastText:g},grey:u}};cB.propTypes={colors:A.object};const D4=(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]},s="#fff";let a=["#D6E4FF","#D6E4FF","#ADC8FF","#84A9FF","#6690FF","#3366FF","#254EDB","#1939B7","#102693","#102693"],l=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],u=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],g=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],d=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(a=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],l=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],u=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],g=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],d=["#1f2e1c","#449626","#4fba28","#74cf4d","#e3fbd2"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},M4=(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]},s="#fff";let a=["#EEEDFC","#D5D1F8","#B9B2F3","#9C93EE","#877CEA","#7265E6","#6A5DE3","#5F53DF","#5549DB","#4237D5"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],g=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(a=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],g=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},k4=(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]},s="#fff";let a=["#E6F3EC","#84c297","#5eb57d","#3da866","#1f9c53","#068e44","#006933","#004222","#001c0f","#000000"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],g=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(a=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],g=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},F4=(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]},s="#fff";let a=["#f0f6ff","#edf4ff","#bed3f7","#8faeeb","#6488de","#3c64d0","#2947ab","#192f85","#0d1b5e","#070e38"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],g=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(a=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],g=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},L4=(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]},s="#fff";let a=["#fff4e6","#ffdfb8","#ffc98f","#ffb066","#ff943d","#f27013","#cc5206","#a63a00","#802800","#591900"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],g=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(a=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],g=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},N4=(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]},s="#fff";let a=["#e1f0ef","#c8e3e2","#9ad6d6","#71c6c9","#4bb5bd","#2aa1af","#1a7b8a","#0e5563","#06323d","#021217"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],g=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(a=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],g=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},R4=(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]},s="#fff";let a=["#d1e8d99c","#8cdba9","#63cf8e","#3ec277","#1db564","#00a854","#008245","#005c34","#003620","#000f0a"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],g=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(a=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],g=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},j4=(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]},s="#fff";let a=["#c1d6d066","#81c9b9","#5bbda9","#38b09c","#1aa391","#009688","#007069","#004a47","#002424","#000000"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],g=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(a=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],g=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},uB=(e,t,n)=>{switch(t){case"theme1":return D4(e,n);case"theme2":return M4(e,n);case"theme3":return k4(e,n);case"theme4":return F4(e,n);case"theme5":return L4(e,n);case"theme6":return N4(e,n);case"theme7":return R4(e,n);case"theme8":return j4(e,n);default:return cB(e)}};uB.propTypes={colors:A.object,presetColor:A.any};const H4=(e,t)=>{const n=e==="dark"?Xa:Mt;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],s=["#fafafa","#bfbfbf","#434343","#1f1f1f"],a=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],s=["#fafafa","#bfbfbf","#434343","#1f1f1f"],a=["#121212","#d3d8db"]),n.grey=[...r,...s,...a];const l=uB(n,t,e);return dA({palette:{mode:e,common:{black:"#000",white:"#fff"},...l,text:{primary:e==="dark"?je(l.grey[900],.87):l.grey[700],secondary:e==="dark"?je(l.grey[900],.45):l.grey[500],disabled:e==="dark"?je(l.grey[900],.1):l.grey[400]},action:{disabled:l.grey[300]},divider:e==="dark"?je(l.grey[900],.05):l.grey[200],background:{paper:e==="dark"?l.grey[100]:l.grey[0],default:l.grey.A50}}})},V4=e=>({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 z4(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 W4(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function U4(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:h.jsx(ot.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 Ao({color:e,theme:t}){const n=Ut(t,e),{lighter:r,light:s,main:a}=n;return{borderColor:je(s,.5),backgroundColor:r,"& .MuiAlert-icon":{color:a}}}function Y4(e){const t=Ao({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":Ao({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":Ao({color:"secondary",theme:e}),"&.MuiAlert-borderError":Ao({color:"error",theme:e}),"&.MuiAlert-borderSuccess":Ao({color:"success",theme:e}),"&.MuiAlert-borderInfo":Ao({color:"info",theme:e}),"&.MuiAlert-borderWarning":Ao({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 G4(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function K4(){return{MuiAutocomplete:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{padding:"3px 9px"}},popupIndicator:{width:"auto",height:"auto"},clearIndicator:{width:"auto",height:"auto"}}}}}function co({color:e,theme:t}){const n=Ut(t,e),{lighter:r,main:s}=n;return{color:s,backgroundColor:r}}function q4(e){const t=co({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":co({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":co({color:"secondary",theme:e}),"&.MuiBadge-colorError":co({color:"error",theme:e}),"&.MuiBadge-colorInfo":co({color:"info",theme:e}),"&.MuiBadge-colorSuccess":co({color:"success",theme:e}),"&.MuiBadge-colorWarning":co({color:"warning",theme:e})}}}}}function _e({variant:e,color:t,theme:n}){const r=Ut(n,t),{lighter:s,main:a,dark:l,contrastText:u}=r,g=`${t}Button`,d=zo(n,g),p={"&::after":{boxShadow:`0 0 5px 5px ${je(a,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${je(a,.9)}`},"&:focus-visible":{outline:`2px solid ${l}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:l},...p};case"shadow":return{color:u,backgroundColor:a,boxShadow:d,"&:hover":{boxShadow:"none",backgroundColor:l},...p};case"outlined":return{borderColor:a,"&:hover":{color:l,backgroundColor:"transparent",borderColor:l},...p};case"dashed":return{color:a,borderColor:a,backgroundColor:s,"&:hover":{color:l,borderColor:l},...p};case"text":default:return{"&:hover":{color:l,backgroundColor:s},...p}}}function _4(e){const t=_e({variant:"dashed",color:"primary",theme:e}),n=_e({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},s={"&>*: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:{...s},startIcon:{...s},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":_e({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":_e({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":_e({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":_e({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":_e({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":_e({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":_e({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":_e({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":_e({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":_e({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":_e({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":_e({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:_e({variant:"contained",color:"primary",theme:e}),containedSecondary:_e({variant:"contained",color:"secondary",theme:e}),containedError:_e({variant:"contained",color:"error",theme:e}),containedSuccess:_e({variant:"contained",color:"success",theme:e}),containedInfo:_e({variant:"contained",color:"info",theme:e}),containedWarning:_e({variant:"contained",color:"warning",theme:e}),outlinedPrimary:_e({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:_e({variant:"outlined",color:"secondary",theme:e}),outlinedError:_e({variant:"outlined",color:"error",theme:e}),outlinedSuccess:_e({variant:"outlined",color:"success",theme:e}),outlinedInfo:_e({variant:"outlined",color:"info",theme:e}),outlinedWarning:_e({variant:"outlined",color:"warning",theme:e}),textPrimary:_e({variant:"text",color:"primary",theme:e}),textSecondary:_e({variant:"text",color:"secondary",theme:e}),textError:_e({variant:"text",color:"error",theme:e}),textSuccess:_e({variant:"text",color:"success",theme:e}),textInfo:_e({variant:"text",color:"info",theme:e}),textWarning:_e({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function J4(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function X4(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function Z4(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function $o({color:e,theme:t}){const n=Ut(t,e),{lighter:r,main:s,dark:a}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:s}},"&.Mui-focusVisible":{outline:`2px solid ${a}`,outlineOffset:-4}}}function $4(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 Lu(e){const t=$4(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function eL(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:h.jsx(w.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:h.jsx(w.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:h.jsx(ot.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:h.jsx(w.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:h.jsx(ot.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...Lu("small")},"&.size-medium":{...Lu("medium")},"&.size-large":{...Lu("large")}},colorPrimary:$o({color:"primary",theme:e}),colorSecondary:$o({color:"secondary",theme:e}),colorSuccess:$o({color:"success",theme:e}),colorWarning:$o({color:"warning",theme:e}),colorInfo:$o({color:"info",theme:e}),colorError:$o({color:"error",theme:e})}}}}function ei({color:e,theme:t}){const n=Ut(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function hn({color:e,theme:t}){const n=Ut(t,e),{light:r,lighter:s,main:a}=n;return{color:a,backgroundColor:s,borderColor:r,"& .MuiChip-deleteIcon":{color:a,"&:hover":{color:r}}}}function tL(e){const t=hn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":ei({color:"primary",theme:e}),"&.MuiChip-colorSecondary":ei({color:"secondary",theme:e}),"&.MuiChip-colorError":ei({color:"error",theme:e}),"&.MuiChip-colorInfo":ei({color:"info",theme:e}),"&.MuiChip-colorSuccess":ei({color:"success",theme:e}),"&.MuiChip-colorWarning":ei({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":hn({color:"primary",theme:e}),"&.MuiChip-lightSecondary":hn({color:"secondary",theme:e}),"&.MuiChip-lightError":hn({color:"error",theme:e}),"&.MuiChip-lightInfo":hn({color:"info",theme:e}),"&.MuiChip-lightSuccess":hn({color:"success",theme:e}),"&.MuiChip-lightWarning":hn({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":hn({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":hn({color:"secondary",theme:e}),"&.MuiChip-combinedError":hn({color:"error",theme:e}),"&.MuiChip-combinedInfo":hn({color:"info",theme:e}),"&.MuiChip-combinedSuccess":hn({color:"success",theme:e}),"&.MuiChip-combinedWarning":hn({color:"warning",theme:e})}}}}}function nL(){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:je("#000",.7)}}}}}}function rL(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function oL(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function ti({color:e,theme:t}){const n=Ut(t,e),{main:r,dark:s,contrastText:a}=n,l=`${e}Button`,u=zo(t,l);return{color:a,backgroundColor:r,boxShadow:u,"&:hover":{boxShadow:"none",backgroundColor:s},"&:focus-visible":{outline:`2px solid ${s}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${je(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${je(r,.9)}`}}}function iL(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":ti({color:"primary",theme:e}),"&.MuiFab-secondary":ti({color:"secondary",theme:e}),"&.Mui-error":ti({color:"error",theme:e}),"&.MuiFab-success":ti({color:"success",theme:e}),"&.MuiFab-info":ti({color:"info",theme:e}),"&.MuiFab-warning":ti({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 sL(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"}}}}}function aL(){return{MuiInputBase:{styleOverrides:{}}}}function lL(e){return{MuiInputLabel:{styleOverrides:{root:{color:e.palette.grey[600]},outlined:{lineHeight:"0.8em","&.MuiInputLabel-sizeSmall":{lineHeight:"1em"},"&.MuiInputLabel-shrink":{background:e.palette.background.paper,padding:"0 8px",marginLeft:-6,lineHeight:"1.4375em"}}}}}}function AL(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function cL(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function uL(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function gL(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function dL(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function uo({variant:e,theme:t}){const n=Ut(t,e),{light:r}=n,s=zo(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:s,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function fL(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:{...uo({variant:"primary",theme:e}),"&.Mui-error":{...uo({variant:"error",theme:e})}},inputSizeSmall:{padding:"7.5px 8px 7.5px 12px"},inputMultiline:{padding:0},colorSecondary:uo({variant:"secondary",theme:e}),colorError:uo({variant:"error",theme:e}),colorWarning:uo({variant:"warning",theme:e}),colorInfo:uo({variant:"info",theme:e}),colorSuccess:uo({variant:"success",theme:e})}}}}function pL(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function pt({variant:e,color:t,theme:n}){const r=Ut(n,t),{lighter:s,light:a,dark:l,main:u,contrastText:g}=r,d={"&:focus-visible":{outline:`2px solid ${l}`,outlineOffset:2,...e==="text"&&{backgroundColor:n.palette.background.paper}}};switch(e){case"combined":case"contained":return{color:g,backgroundColor:u,"&:hover":{backgroundColor:a},...d};case"outlined":return{borderColor:u,"&:hover":{backgroundColor:s,borderColor:a},...d};case"text":default:return{color:u,"&:hover":{backgroundColor:u,color:s},...d}}}function hL(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":pt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":pt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":pt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":pt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":pt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":pt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":pt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":pt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":pt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":pt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":pt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":pt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":pt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":pt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":pt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":pt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":pt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":pt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":pt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":pt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":pt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":pt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":pt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":pt({variant:"outlined",color:"warning",theme:e})}}}}}}function CL(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function ni({color:e,theme:t}){const n=Ut(t,e),{lighter:r,main:s,dark:a}=n;return{"& .dot":{backgroundColor:s},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${a}`,outlineOffset:-4}}}function EL(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 Nu(e){const t=EL(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function IL(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:h.jsx(w.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:h.jsx(w.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:h.jsx(w.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":{...Nu("small")},"&.size-medium":{...Nu("medium")},"&.size-large":{...Nu("large")}},colorPrimary:ni({color:"primary",theme:e}),colorSecondary:ni({color:"secondary",theme:e}),colorSuccess:ni({color:"success",theme:e}),colorWarning:ni({color:"warning",theme:e}),colorInfo:ni({color:"info",theme:e}),colorError:ni({color:"error",theme:e})}}}}function ri({color:e,theme:t}){const n=Ut(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function BL(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":ri({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":ri({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":ri({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":ri({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":ri({color:"info",theme:e}),"&.MuiSlider-thumbColorError":ri({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 QL(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 Ru(e,t){const n=QL(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 mL(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},...Ru(e,"medium")},sizeLarge:{...Ru(e,"large")},sizeSmall:{...Ru(e,"small")}}}}}function yL(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 bL(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 vL(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 xL(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function wL(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function TL(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function PL(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function SL(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function OL(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 DL(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function ML(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function kL(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function FL(e){return gt.merge(z4(e),W4(e),U4(e),Y4(e),G4(),K4(),q4(e),_4(e),J4(),X4(),Z4(),eL(e),tL(e),nL(),rL(e),oL(),iL(e),sL(e),aL(),lL(e),AL(),cL(),uL(e),gL(e),dL(),fL(e),pL(),hL(e),CL(e),IL(e),BL(e),mL(e),yL(e),bL(e),vL(e),xL(e),wL(e),TL(),PL(),SL(),OL(e),DL(e),ML(),kL())}const gB=({themeOverrides:e,children:t})=>{const{themeDirection:n,mode:r,presetColor:s,fontFamily:a}=Nt(),l=F.useMemo(()=>H4(r,s),[r,s]),u=F.useMemo(()=>V4(a),[a]),g=F.useMemo(()=>p4(l),[l]),d=F.useMemo(()=>({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:n,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:l.palette,customShadows:g,typography:u,shadows:l.shadows.map(()=>"none"),...typeof e=="function"?e(l):e}),[n,l,u,g,e]),p=dA(d);return p.components=FL(p),h.jsx(w.StyledEngineProvider,{injectFirst:!0,children:h.jsxs(Jd,{theme:p,children:[h.jsx(w.CssBaseline,{}),t]})})};gB.propTypes={children:A.node,themeOverrides:A.oneOfType([A.object,A.func])};const Za=({children:e,theme:t,...n})=>h.jsx(x.CoreAdminContext,{...n,children:h.jsx(gB,{themeOverrides:t,children:h.jsx(Kc,{children:e})})});Za.displayName="AdminContext",Za.defaultProps={...x.CoreAdminContext.defaultProps},Za.propTypes={...x.CoreAdminContext.propTypes,children:A.node.isRequired,theme:A.oneOfType([A.object,A.func])};const oi=e=>{const{authProvider:t,catchAll:n,children:r,dashboard:s,dataProvider:a,disableTelemetry:l,history:u,i18nProvider:g,layout:d,loading:p,loginPage:E,authCallbackPage:C,menu:I,notification:B,queryClient:m,requireAuth:y,store:D,ready:k,theme:P,title:T="React Admin"}=e;return h.jsx(Za,{authProvider:t,dataProvider:a,i18nProvider:g,store:D,history:u,queryClient:m,theme:P,children:h.jsx(x.AdminUI,{layout:d,dashboard:s,disableTelemetry:l,menu:I,catchAll:n,title:T,loading:p,loginPage:E,authCallbackPage:C,notification:B,requireAuth:y,ready:k,children:r})})};oi.defaultProps={store:x.localStorageStore(),title:"Applica Admin"},oi.propTypes={...x.AdminUI.propTypes};class dB{constructor({catch:t,display:n,log:r,error:s}){this.catch=t,this.display=n,this.log=r,this.error=s}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}const LL=({apiUrl:e,endpoint:t,locale:n,message:r,bodyBuilder:s})=>fetch(`${e}${t}`,{method:"PUT",headers:new Headers({Accept:"application/json","Content-Type":"application/json"}),body:JSON.stringify(s(n,r))}),NL=({enabled:e=!0,apiUrl:t,endpoint:n="/ui-errors/put",loading:r,catcherFn:s=l=>new dB({catch:l!=null,display:!1,log:!1}),bodyBuilder:a=(l,u)=>({code:l,message:{code:u,text:u}})})=>(G.useMemo(()=>{if(r||!e)return;const l=console.error;console.error=function(u,...g){if(!u||typeof u!="string"){l.apply(console,arguments);return}const d=u.replace(/%s/g,()=>g.shift()),p=s(d);if(!p.isCatched()){l.apply(console,arguments);return}p.logError()&&LL({apiUrl:t,endpoint:n,message:d,bodyBuilder:a}),p.displayError()?l.apply(console,arguments):console.debug.apply(console,arguments)}},[t,r,a,n,s,e]),!0),RL=({languages:e,defaultLocale:t,allowMissing:n=!1})=>YQ(r=>gt.get(e,r,{}),t,[{locale:t}],{allowMissing:n}),fB=[],jL=({apiUrl:e,endpoint:t,locale:n,message:r,bodyBuilder:s})=>r!=null&&r!=="undefined"&&r.indexOf("[")===-1&&r.indexOf("]")===-1&&fB.indexOf(`${n}-${r}`)===-1&&fB.push(`${n}-${r}`)&&fetch(`${e}${t}`,{method:"PUT",headers:new Headers({Accept:"application/json","Content-Type":"application/json"}),body:JSON.stringify(s(n,r))}),HL=({apiUrl:e,enabled:t=!0,endpoint:n="/languages/put-message",loading:r,bodyBuilder:s=(a,l)=>({code:a,message:{code:l,text:l}})})=>{const[a]=x.useLocaleState();return G.useMemo(()=>{if(r||!t)return;const l=console.error;console.error=function(u){if(!(typeof u=="string"&&u==="%c%s")){if(typeof u=="string"&&u.indexOf("Missing translation for key: ")>=0){if(u=u.replace("Warning: Missing translation for key: ",""),u=u.split('"').join("").trim(),u===null||u.indexOf(" ")!==-1||u.indexOf(".")===-1)return;const g=localStorage.getItem("locale")||a;jL({apiUrl:e,endpoint:n,locale:g,message:u,bodyBuilder:s});return}l.apply(console,arguments)}}},[e,a,r,s,n,t]),!0};window.React=F;const VL=({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})})=>{const[r,s]=F.useState({loading:!0,languages:null});return F.useEffect(()=>{let a=new Headers;a.append("Accept","application/json"),a.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:a}).then(l=>l.json()).then(l=>s({loading:!1,...n(l)}))},[e,t,n]),r},zL=e=>e.reduce((t,n)=>({...t,[n.lang]:{...t[n.lang]||{},[n.code]:n.text}}),{}),WL=(e,t)=>({lang:e,code:t,text:t}),UL=new ed.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),ju=({theme:e,apiUrl:t,defaultLocale:n,development:r,logoMain:s,logoIcon:a,menu:l,name:u,version:g,dataProvider:d,authProvider:p,notification:E,disableNotification:C,...I})=>{const B=VL({apiUrl:t,endpoint:"/i18n/messages",mapper:zL});HL({bodyBuilder:WL,apiUrl:t,endpoint:"/i18n/message",loading:B==null?void 0:B.loading,enabled:r}),NL({apiUrl:t,endpoint:"/cli/error",catcherFn:D=>{var k=D==null?void 0:D.toString(),P=["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`.","validateDOMNesting(...): <form> cannot appear as a descendant of <form>."];const T=P.some(V=>k==null?void 0:k.includes(V));return new dB({catch:T,display:!T,log:!T,error:D})}});const m=F.useMemo(()=>D=>{const k=u?h.jsx(Gc,{title:u}):s,P=u?h.jsx(qc,{title:u}):a;return h.jsx(Wc,{...D,name:u,version:g,logoMain:k,logoIcon:P,notification:E,disableNotification:C})},[s,a,u,g,E,C]);if(B!=null&&B.loading)return null;const y=RL({languages:B,defaultLocale:n,allowMissing:r});return h.jsx(CA,{children:h.jsx(QA,{menu:l,children:h.jsx(IA,{children:h.jsx(oi,{theme:e,layout:m,notification:EI,queryClient:UL,dataProvider:d,authProvider:p,i18nProvider:y,...I})})})})};ju.defaultProps={...oi.defaultProps,fileFields:[],defaultLocale:"en",development:!1,version:"0.0.0",notification:"entities/notification",disableNotification:!1},ju.propTypes={...oi.propTypes,theme:A.oneOfType([A.object,A.func]),apiUrl:A.string.isRequired,defaultLocale:A.string,development:A.bool,logoMain:A.node,logoIcon:A.node,menu:A.arrayOf(Mo),name:A.string,version:A.string,authProvider:A.oneOfType([A.func,A.object]),dataProvider:A.oneOfType([A.func,A.object]),notification:A.string,disableNotification:A.bool},Object.defineProperty(j,"ArrayInput",{enumerable:!0,get:()=>x.ArrayInput}),Object.defineProperty(j,"ArrayInputContext",{enumerable:!0,get:()=>x.ArrayInputContext}),Object.defineProperty(j,"BooleanField",{enumerable:!0,get:()=>x.BooleanField}),Object.defineProperty(j,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>x.BulkDeleteWithConfirmButton}),Object.defineProperty(j,"Button",{enumerable:!0,get:()=>x.Button}),Object.defineProperty(j,"ChipField",{enumerable:!0,get:()=>x.ChipField}),Object.defineProperty(j,"Confirm",{enumerable:!0,get:()=>x.Confirm}),Object.defineProperty(j,"Create",{enumerable:!0,get:()=>x.Create}),Object.defineProperty(j,"CreateButton",{enumerable:!0,get:()=>x.CreateButton}),Object.defineProperty(j,"CreateContextProvider",{enumerable:!0,get:()=>x.CreateContextProvider}),Object.defineProperty(j,"DeleteWithConfirmButton",{enumerable:!0,get:()=>x.DeleteWithConfirmButton}),Object.defineProperty(j,"DeleteWithUndoButton",{enumerable:!0,get:()=>x.DeleteWithUndoButton}),Object.defineProperty(j,"EditButton",{enumerable:!0,get:()=>x.EditButton}),Object.defineProperty(j,"Form",{enumerable:!0,get:()=>x.Form}),Object.defineProperty(j,"HttpError",{enumerable:!0,get:()=>x.HttpError}),Object.defineProperty(j,"ListToolbar",{enumerable:!0,get:()=>x.ListToolbar}),Object.defineProperty(j,"Pagination",{enumerable:!0,get:()=>x.Pagination}),Object.defineProperty(j,"RecordContextProvider",{enumerable:!0,get:()=>x.RecordContextProvider}),Object.defineProperty(j,"ReferenceArrayField",{enumerable:!0,get:()=>x.ReferenceArrayField}),Object.defineProperty(j,"ReferenceField",{enumerable:!0,get:()=>x.ReferenceField}),Object.defineProperty(j,"Resource",{enumerable:!0,get:()=>x.Resource}),Object.defineProperty(j,"ResourceContextProvider",{enumerable:!0,get:()=>x.ResourceContextProvider}),Object.defineProperty(j,"SaveButton",{enumerable:!0,get:()=>x.SaveButton}),Object.defineProperty(j,"SimpleFormIterator",{enumerable:!0,get:()=>x.SimpleFormIterator}),Object.defineProperty(j,"SimpleFormIteratorContext",{enumerable:!0,get:()=>x.SimpleFormIteratorContext}),Object.defineProperty(j,"SimpleList",{enumerable:!0,get:()=>x.SimpleList}),Object.defineProperty(j,"SingleFieldList",{enumerable:!0,get:()=>x.SingleFieldList}),Object.defineProperty(j,"TopToolbar",{enumerable:!0,get:()=>x.TopToolbar}),Object.defineProperty(j,"choices",{enumerable:!0,get:()=>x.choices}),Object.defineProperty(j,"email",{enumerable:!0,get:()=>x.email}),Object.defineProperty(j,"maxLength",{enumerable:!0,get:()=>x.maxLength}),Object.defineProperty(j,"maxValue",{enumerable:!0,get:()=>x.maxValue}),Object.defineProperty(j,"minLength",{enumerable:!0,get:()=>x.minLength}),Object.defineProperty(j,"minValue",{enumerable:!0,get:()=>x.minValue}),Object.defineProperty(j,"number",{enumerable:!0,get:()=>x.number}),Object.defineProperty(j,"regex",{enumerable:!0,get:()=>x.regex}),Object.defineProperty(j,"required",{enumerable:!0,get:()=>x.required}),Object.defineProperty(j,"useArrayInput",{enumerable:!0,get:()=>x.useArrayInput}),Object.defineProperty(j,"useAuthProvider",{enumerable:!0,get:()=>x.useAuthProvider}),Object.defineProperty(j,"useDataProvider",{enumerable:!0,get:()=>x.useDataProvider}),Object.defineProperty(j,"useGetIdentity",{enumerable:!0,get:()=>x.useGetIdentity}),Object.defineProperty(j,"useGetList",{enumerable:!0,get:()=>x.useGetList}),Object.defineProperty(j,"useGetMany",{enumerable:!0,get:()=>x.useGetMany}),Object.defineProperty(j,"useGetManyReference",{enumerable:!0,get:()=>x.useGetManyReference}),Object.defineProperty(j,"useGetOne",{enumerable:!0,get:()=>x.useGetOne}),Object.defineProperty(j,"useListContext",{enumerable:!0,get:()=>x.useListContext}),Object.defineProperty(j,"useNotify",{enumerable:!0,get:()=>x.useNotify}),Object.defineProperty(j,"usePermissions",{enumerable:!0,get:()=>x.usePermissions}),Object.defineProperty(j,"useRecordContext",{enumerable:!0,get:()=>x.useRecordContext}),Object.defineProperty(j,"useResourceContext",{enumerable:!0,get:()=>x.useResourceContext}),Object.defineProperty(j,"useResourceDefinition",{enumerable:!0,get:()=>x.useResourceDefinition}),Object.defineProperty(j,"useResourceDefinitions",{enumerable:!0,get:()=>x.useResourceDefinitions}),Object.defineProperty(j,"useTranslate",{enumerable:!0,get:()=>x.useTranslate}),Object.defineProperty(j,"useUnselect",{enumerable:!0,get:()=>x.useUnselect}),Object.defineProperty(j,"useUnselectAll",{enumerable:!0,get:()=>x.useUnselectAll}),Object.defineProperty(j,"useUpdateMany",{enumerable:!0,get:()=>x.useUpdateMany}),j.ActionsField=ru,j.ActionsMenu=Di,j.Admin=oi,j.AnimateButton=oC,j.AppConfigContext=hA,j.AppConfigProvider=CA,j.ApplicaAdmin=ju,j.AttachmentField=uu,j.AttachmentInput=Eu,j.AutocompleteArrayInput=KI,j.AutocompleteInput=qI,j.Avatar=Ia,j.BooleanInput=Iu,j.Breadcrumbs=_s,j.CardForm=La,j.CircularWithLabel=CC,j.CircularWithPath=EC,j.CoverField=Ua,j.CreateInDialogButton=tu,j.Datagrid=Pu,j.DateAgoField=Ya,j.DateField=gu,j.DateInput=Bu,j.Dot=Ba,j.Edit=JD,j.EditInDialogButton=nu,j.EmailField=du,j.Empty=$I,j.FileField=fu,j.FileInput=Qu,j.FormHeader=Jc,j.FunctionField=WI,j.IconButton=Dr,j.ImageField=ss,j.ImageInput=mu,j.ImpersonateUserButton=mI,j.LabeledInput=st,j.Layout=Wc,j.LinearWithIcon=IC,j.LinearWithLabel=BC,j.List=Su,j.Loadable=GD,j.Loader=CI,j.LoadingButton=Sc,j.Logo=Vc,j.LongForm=os,j.MainCard=jn,j.MainIcon=Gc,j.MenuConfigContext=BA,j.MenuConfigProvider=QA,j.MenuPopover=Ws,j.MenuPropTypes=Mo,j.Notification=EI,j.NotificationList=f4,j.NumberInput=yu,j.ReadonlyField=hu,j.RecordInput=_I,j.ReferenceArrayInput=bu,j.ReferenceInput=vu,j.ReferenceManyField=Xo,j.ReferenceManyInput=xu,j.ScrollTop=Kc,j.ScrollX=KD,j.SearchInput=t4,j.SelectArrayInput=wu,j.SelectInput=XI,j.SimpleBar=Hc,j.SimpleForm=Zc,j.SizeField=YI,j.SmallIcon=qc,j.SmartTextInput=Ga,j.TabbedForm=Ha,j.TextField=Cu,j.TextInput=as,j.ThemeConfigContext=EA,j.ThemeConfigProvider=IA,j.TimeInput=Tu,j.Toolbar=Hr,j.Tooltip=hC,j.Transitions=kr,j.parseTime=ZI,j.useAppConfig=Mi,j.useBreadcrumbs=af,j.useLocalStorage=bA,j.useMenu=yA,j.useMenuConfig=Rn,j.useResourceTitle=lf,j.useThemeConfig=Nt,j.uuid=r4,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
255
+ `),ND)),hI=G.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiLinearProgress"}),{className:s,color:a="primary",value:l,valueBuffer:u,variant:g="indeterminate"}=r,d=Ke(r,FD),p=W({},r,{color:a,variant:g}),E=jD(p),C=lt(),I={},B={bar1:{},bar2:{}};if(g==="determinate"||g==="buffer")if(l!==void 0){I["aria-valuenow"]=Math.round(l),I["aria-valuemin"]=0,I["aria-valuemax"]=100;let m=l-100;C.direction==="rtl"&&(m=-m),B.bar1.transform=`translateX(${m}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress .");if(g==="buffer")if(u!==void 0){let m=(u||0)-100;C.direction==="rtl"&&(m=-m),B.bar2.transform=`translateX(${m}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");return h.jsxs(HD,W({className:Je(E.root,s),ownerState:p,role:"progressbar"},I,{ref:n},d,{children:[g==="buffer"?h.jsx(VD,{className:E.dashed,ownerState:p}):null,h.jsx(zD,{className:E.bar1,ownerState:p,style:B.bar1}),g==="determinate"?null:h.jsx(WD,{className:E.bar2,ownerState:p,style:B.bar2})]}))});process.env.NODE_ENV!=="production"&&(hI.propTypes={classes:A.object,className:A.string,color:A.oneOfType([A.oneOf(["inherit","primary","secondary"]),A.string]),sx:A.oneOfType([A.arrayOf(A.oneOfType([A.func,A.object,A.bool])),A.func,A.object]),value:A.number,valueBuffer:A.number,variant:A.oneOf(["buffer","determinate","indeterminate","query"])});const UD=hI,YD=le("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}})),CI=()=>h.jsx(YD,{children:h.jsx(UD,{color:"primary"})}),GD=e=>t=>h.jsx(F.Suspense,{fallback:h.jsx(CI,{}),children:h.jsx(e,{...t})}),Gc=({title:e})=>h.jsxs(h.Fragment,{children:[h.jsx(w.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",h.jsx(w.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]});Gc.propTypes={title:A.string.isRequired};const EI=le(x.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}})),Kc=({children:e})=>{const t=Tt.useLocation(),{pathname:n}=t;return F.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),e||null};Kc.propTypes={children:A.node};const KD=le("div")({width:"100%",overflowX:"auto",display:"block"}),qc=({title:e})=>h.jsx(w.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substr(0,1).toUpperCase()});qc.propTypes={title:A.string.isRequired};const qD=wo(x.Toolbar,{name:"RaApplicaToolbar",slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end",paddingRight:"20px !important","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}})),Hr=e=>h.jsx(qD,{...e});Hr.defaultProps={...x.Toolbar.defaultProps},Hr.propTypes={...x.Toolbar.propTypes};const _c=({children:e,content:t,title:n,subheader:r,secondary:s,toolbar:a,...l})=>{const u=x.useTranslate(),g=x.useResourceContext(),{cardTitle:d,cardSubheader:p}=F.useMemo(()=>{const E=n||`resources.${g}.title`;return{cardTitle:u(E,{_:E}),cardSubheader:r!==null?u(r,{_:r}):null}},[g,r,n,u]);return h.jsx(w.Grid,{item:!0,...l,children:h.jsx(jn,{content:t,title:d,subheader:p,secondary:s,divider:!0,children:h.jsxs(F.Fragment,{children:[e,a===!0?h.jsx(Hr,{children:h.jsx(x.SaveButton,{})}):a]})})})};_c.defaultProps={...w.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12},_c.propTypes={...w.Grid.propTypes,children:A.oneOfType([A.node,A.arrayOf(A.node)]),contained:A.bool,content:A.bool,subheader:A.oneOfType([A.string,A.node]),title:A.oneOfType([A.string,A.node]),secondary:A.oneOfType([A.node,A.string,A.object]),spacing:A.number,toolbar:A.oneOfType([A.node,A.bool])};const _D=le(x.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),La=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:s}=Nt();return h.jsx(_D,{defaultValues:n,spacing:t||s,children:h.jsx(w.Grid,{container:!0,...r,spacing:t||s,children:e})})};La.propTypes={...w.Grid.propTypes,...x.Form.propTypes,children:A.oneOfType([A.node,A.arrayOf(A.node)]),spacing:A.number,defaultValues:A.oneOfType([A.object,A.func]),record:A.object,validate:A.func},La.defaultProps={...w.Stack.defaultProps},La.Section=_c;const JD=le(x.Edit,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default}})),XD=le(w.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),ZD=le(w.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`})),Jc=({title:e,divider:t})=>{const n=x.useTranslate();return h.jsxs(F.Fragment,{children:[h.jsx(XD,{title:n(e,{_:e})}),t&&h.jsx(ZD,{})]})};Jc.propTypes={title:A.string.isRequired,divider:A.bool},Jc.defaultProps={divider:!0};const Na=A.shape({xl:A.number,lg:A.number,md:A.number,sm:A.number,xs:A.number}),$D={display:"none"},Ra=({intent:e,hidden:t,unmountOnExit:n,label:r,icon:s,value:a,syncWithLocation:l,selected:u,onChange:g,children:d,badgeColor:p,badgeContent:E,...C})=>{const I=x.useTranslate(),B=Br.useLocation(),m={component:Tt.Link,to:{...B,pathname:a}},y=F.isValidElement(r)?r:I(r,{_:r}),D=F.useCallback(()=>g(a),[g,a]);return e==="header"?(()=>h.jsxs(w.ListItemButton,{selected:u,...l?m:{},onClick:D,children:[s&&h.jsx(w.ListItemIcon,{children:s}),h.jsx(w.ListItemText,{primary:y}),E&&h.jsx(w.ListItemSecondaryAction,{children:h.jsx(w.Avatar,{sx:{width:24,height:24,fontSize:12,backgroundColor:T=>{var O;return(O=T.palette[p])==null?void 0:O.main},color:T=>{var O;return(O=T.palette[p])==null?void 0:O.contrastText}},children:E})})]}))():(()=>n&&t?null:h.jsx(x.FormGroupContextProvider,{name:a.toString(),children:h.jsx(w.Stack,{alignContent:"stretch",style:t?$D:null,id:`tabpanel-${a}`,"aria-labelledby":`tabheader-${a}`,"aria-hidden":t||void 0,...C,children:d})}))()};Ra.propTypes={intent:A.oneOf(["header","content","sidebar"]),className:A.string,contentClassName:A.string,url:A.string,icon:A.element,label:A.oneOfType([A.string,A.element]).isRequired,value:A.oneOfType([A.string,A.number]),syncWithLocation:A.bool,onChange:A.func,selected:A.bool,hidden:A.bool,unmountOnExit:A.bool,children:A.node,badgeColor:A.oneOf(["default","error","info","primary","secondary","success","warning"]),badgeContent:A.oneOfType([A.string,A.number])},Ra.defaultProps={badgeColor:"default",unmountOnExit:!1};const eM=le("div")(({theme:e})=>({marginBottom:e.spacing(2)})),ja=({children:e,visibility:t})=>w.useMediaQuery(r=>r.breakpoints.up(t))?h.jsx(eM,{children:e}):null;ja.propTypes={visibility:A.oneOf(["xl","lg","md","sm","xs"]),position:A.oneOf(["top","bottom"]).isRequired,children:A.node.isRequired},ja.defaultProps={position:"top",visibility:"md"};const tM=wo(w.List,{name:"RaLongFormTabs",slot:"Root"})(({theme:e})=>({p:0,"& .MuiListItemIcon-root":{minWidth:32,color:e.palette.grey[500]},"& .MuiListItemButton-root.Mui-selected":{borderRight:`2px solid ${e.palette.primary.main}`,marginRight:"-2px"}})),II=({children:e,syncWithLocation:t,value:n,url:r,onChange:s})=>{const a=Br.useLocation();return h.jsx(jn,{children:h.jsx(tM,{component:"nav",children:F.Children.map(e,(l,u)=>{if(!F.isValidElement(l))return null;const g=nM(l,u),d=t?!!Br.matchPath(`${r}/${g}`,a.pathname):u===n;return F.cloneElement(l,{intent:"header",value:t?g:u,syncWithLocation:t,onChange:s,url:r,selected:d})})})})},nM=(e,t)=>e.props.path!=null?e.props.path:t>0?t.toString():"";II.propTypes={children:A.node,url:A.string,tabsWithErrors:A.arrayOf(A.string),syncWithLocation:A.bool,onChange:A.func,value:A.oneOfType([A.string,A.number])};const rM=le(w.Grid,{name:"RaLongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root":{marginTop:e.spacing(2),marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,borderTop:`1px solid ${e.palette.divider}`}})),BI=(e,t)=>e&&e.type===ja&&e.props.position===t,oM=e=>e&&e.type===Ra,Xc=({children:e,formRootPathname:t,syncWithLocation:n,spacing:r,tabs:s,tabsDisposition:a,contentDisposition:l,...u})=>{const[g,d]=F.useState(0),p=Br.useResolvedPath(""),E=x.useResourceContext(u),C=Br.useLocation(),I=F.useMemo(()=>F.Children.toArray(e).find(k=>BI(k,"top")),[e]),B=F.useMemo(()=>F.Children.toArray(e).find(k=>BI(k,"bottom")),[e]),m=F.useMemo(()=>F.Children.toArray(e).filter(k=>oM(k)),[e]),y=k=>{n||d(k)},D=()=>F.cloneElement(s,{onChange:y,syncWithLocation:n,url:t,value:g,intent:"header"},m);return h.jsxs(rM,{container:!0,spacing:r*2,children:[h.jsxs(w.Grid,{item:!0,...a,children:[I,n?h.jsx(Br.Routes,{children:h.jsx(Br.Route,{path:"/*",element:D()})}):D(),B]}),h.jsx(w.Grid,{item:!0,...l,children:F.Children.map(m,(k,P)=>{if(!k)return null;const T=x.getTabbedFormTabFullPath(k,P),O=n?!Br.matchPath(`${p.pathname}/${T}`,C.pathname):g!==P;return F.isValidElement(k)?F.cloneElement(k,{intent:"content",resource:E,hidden:O,value:n?T:P}):null})})]})};Xc.propTypes={children:A.node,spacing:A.number,syncWithLocation:A.bool,tabs:A.element,formRootPathname:A.string,tabsDisposition:Na,contentDisposition:Na},Xc.defaultProps={tabs:h.jsx(II,{})};const iM=()=>{const e=Tt.useLocation(),t=Tt.matchPath(":resource/create/*",e.pathname),n=Tt.matchPath(":resource/:id/*",e.pathname);return t?t.pathnameBase:n?n.pathnameBase:""},os=({spacing:e,...t})=>{const n=iM(),{spacing:r}=Nt(),s=e||r;return h.jsx(x.Form,{formRootPathname:n,...t,children:h.jsx(Xc,{formRootPathname:n,...t,spacing:s})})};os.propTypes={syncWithLocation:A.bool,spacing:A.number,tabsDisposition:Na,contentDisposition:Na},os.defaultProps={syncWithLocation:!1,spacing:2,tabsDisposition:{xl:3,lg:3,md:4,sm:4,xs:12},contentDisposition:{xl:9,lg:9,md:8,sm:8,xs:12}},os.Tab=Ra,os.Header=ja;const sM=wo(x.SimpleForm,{name:"RaApplicaSimpleForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?2:1)}})),Zc=({title:e,modal:t,content:n,subheader:r,secondary:s,...a})=>{const l=lf(e),u=x.useRecordContext();return h.jsx(jn,{content:n,title:l,subheader:r,secondary:u!=null&&u.id?s:null,border:!t,divider:!0,children:h.jsx(sM,{toolbar:h.jsx(Hr,{}),...a})})};Zc.defaultProps={...x.SimpleForm.defaultProps,modal:!1,content:!1,subheader:null,title:null,toolbar:h.jsx(Hr,{children:h.jsx(x.SaveButton,{})}),secondary:h.jsx(Di,{children:h.jsx(x.DeleteWithConfirmButton,{})})},Zc.propTypes={...x.SimpleForm.propTypes,contained:A.bool,content:A.bool,subheader:A.oneOfType([A.string,A.node]),title:A.oneOfType([A.string,A.node]),secondary:A.oneOfType([A.node,A.string,A.object])};const Ha=wo(x.TabbedForm,{name:"RaApplicaTabbedForm",slot:"Root"})(()=>({}));Ha.propTypes={...x.TabbedForm.propTypes},Ha.defaultProps={...x.TabbedForm.defaultProps},Ha.Tab=x.TabbedForm.Tab;const $c=(e,t)=>{const n=t.id;if(!e)return[t];const r=e.findIndex(s=>s.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]},aM=(e,t)=>e&&e.data?{data:$c(e.data,t),total:e.total+1}:e,lM=(e,t)=>e&&e.length>0?$c(e,t):e,AM=(e,t)=>e&&e.data?{...e,data:$c(e.data,t),total:e.total+1}:e,eu=({onClose:e,record:t,children:n,redirect:r})=>{const s=ed.useQueryClient(),a=x.useResourceContext(),l=x.useRedirect(),u=x.useNotify(),g=F.useCallback(E=>{const I=Date.now();s.setQueryData([a,"getOne",{id:E.id}],E),s.setQueriesData([a,"getList"],B=>AM(B,E),{updatedAt:I}),s.setQueriesData([a,"getMany"],B=>lM(B,E),{updatedAt:I}),s.setQueriesData([a,"getManyReference"],B=>aM(B,E),{updatedAt:I}),e(),u("ra.notification.created"),r!==void 0&&l(r,a,E.id,E)},[e,s,a,u,l,r]),{save:d,isLoading:p}=x.useCreateController({mutationOptions:{onSuccess:g}});return h.jsx(x.CreateContextProvider,{value:{record:t,save:d,saving:p,redirect:r},children:F.cloneElement(n,{...n.props,toolbar:h.jsxs(Hr,{children:[h.jsx(x.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e}),h.jsx(x.SaveButton,{})]})})})};eu.propTypes={children:A.node,onClose:A.func,record:A.object,redirect:A.oneOf(["list","edit","show",!1])},eu.defaultProps={redirect:!1};const cM={true:{_scrollToTop:!0},false:{}},uM=le(w.Fab,{name:"RaApplicaCreateInDialogButton",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${x.CreateButtonClasses.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),tu=({fullWidth:e,maxWidth:t,label:n,record:r,redirect:s,scrollToTop:a,className:l,sx:u,...g})=>{const[d,p]=F.useState(!1),E=x.useTranslate(),C=x.useResourceContext(),{openDialog:I,closeDialog:B}=Mi(),m=F.useCallback(()=>I(C,()=>p(!0)),[I,C]),y=F.useCallback(()=>B(C,()=>p(!1)),[B,C]),D=w.useMediaQuery(k=>k.breakpoints.down("md"));return h.jsxs(h.Fragment,{children:[D?h.jsx(uM,{...g,state:cM[String(a)],color:"primary",className:Je(x.CreateButtonClasses.floating,l),"aria-label":n&&E(n),onClick:m,children:h.jsx(Ir.Add,{})}):h.jsx(x.Button,{...g,sx:u,label:n,onClick:m,children:h.jsx(Ir.Add,{})}),h.jsx(w.Dialog,{open:d,onClose:y,fullWidth:e,maxWidth:t,children:h.jsx(eu,{...g,redirect:s,record:r,onClose:y})})]})};tu.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.create",scrollToTop:!0},tu.propTypes={...x.Button.propTypes,redirect:A.oneOf(["list","edit","show",!1]),fullWidth:A.bool,maxWidth:A.oneOf(["xs","sm","md","lg","xl",!1]),label:A.string,record:A.object,scrollToTop:A.bool,className:A.string,sx:A.object};const QI=({onClose:e,children:t})=>{const n=x.useNotify(),r=x.useRecordContext(),s=x.useResourceContext(),{id:a}=r,{isLoading:l,data:u}=x.useGetOne(s,{id:a}),g=F.useCallback(()=>{n("ra.notification.updated",{type:"info",messageArgs:{smart_count:1}}),e()},[e,n]),{save:d,saving:p}=x.useEditController({resource:s,id:a,mutationMode:"pessimistic",mutationOptions:{onSuccess:g}});return h.jsx(x.EditContextProvider,{value:{record:u,isLoading:l,save:d,saving:p},children:F.cloneElement(t,{toolbar:h.jsxs(Hr,{children:[h.jsx(x.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e}),h.jsx(x.SaveButton,{})]})})})};QI.propTypes={children:A.node,onClose:A.func};const nu=({fullWidth:e,maxWidth:t,label:n,...r})=>{const[s,a]=F.useState(!1),{openDialog:l,closeDialog:u}=Mi(),g=x.useResourceContext(),d=F.useCallback(()=>l(g,()=>a(!0)),[l,g]),p=F.useCallback(()=>u(g,()=>a(!1)),[u,g]);return h.jsxs(h.Fragment,{children:[h.jsx(x.Button,{label:n,onClick:d,children:h.jsx(Ir.Edit,{})}),h.jsx(w.Dialog,{open:s,onClose:p,fullWidth:e,maxWidth:t,children:h.jsx(QI,{...r,onClose:p})})]})};nu.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.edit"},nu.propTypes={fullWidth:A.bool,maxWidth:A.oneOf(["xs","sm","md","lg","xl",!1]),label:A.string};const mI=({label:e="ra.auth.sign_in",...t})=>{const n=x.useRecordContext(),[r,s]=F.useState(!1),a=x.useAuthProvider(),l=F.useCallback(u=>{u.stopPropagation(),u.preventDefault(),s(!0),a.impersonate(n==null?void 0:n.id).then(()=>{s(!1),document.location.href="/"})},[a,n==null?void 0:n.id]);return h.jsx(x.Button,{disabled:r||a.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:l,...t,children:h.jsx(Ir.VpnKey,{})})};mI.propTypes={label:A.string};const ru=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:h.jsxs(Di,{children:[e&&h.jsx(x.EditButton,{}),t&&h.jsx(x.DeleteWithConfirmButton,{}),n&&h.jsx(x.CloneButton,{})]});ru.defaultProps={canEdit:!0,canDelete:!0,canClone:!1},ru.propTypes={canEdit:A.bool,canDelete:A.bool,canClone:A.bool};var gM=Array.isArray,ou=gM,dM=typeof bn=="object"&&bn&&bn.Object===Object&&bn,fM=dM,pM=fM,hM=typeof self=="object"&&self&&self.Object===Object&&self,CM=pM||hM||Function("return this")(),iu=CM,EM=iu,IM=EM.Symbol,su=IM,yI=su,bI=Object.prototype,BM=bI.hasOwnProperty,QM=bI.toString,is=yI?yI.toStringTag:void 0;function mM(e){var t=BM.call(e,is),n=e[is];try{e[is]=void 0;var r=!0}catch{}var s=QM.call(e);return r&&(t?e[is]=n:delete e[is]),s}var yM=mM,bM=Object.prototype,vM=bM.toString;function xM(e){return vM.call(e)}var wM=xM,vI=su,TM=yM,PM=wM,SM="[object Null]",OM="[object Undefined]",xI=vI?vI.toStringTag:void 0;function DM(e){return e==null?e===void 0?OM:SM:xI&&xI in Object(e)?TM(e):PM(e)}var wI=DM;function MM(e){return e!=null&&typeof e=="object"}var kM=MM,FM=wI,LM=kM,NM="[object Symbol]";function RM(e){return typeof e=="symbol"||LM(e)&&FM(e)==NM}var au=RM,jM=ou,HM=au,VM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zM=/^\w*$/;function WM(e,t){if(jM(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||HM(e)?!0:zM.test(e)||!VM.test(e)||t!=null&&e in Object(t)}var UM=WM;function YM(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var TI=YM,GM=wI,KM=TI,qM="[object AsyncFunction]",_M="[object Function]",JM="[object GeneratorFunction]",XM="[object Proxy]";function ZM(e){if(!KM(e))return!1;var t=GM(e);return t==_M||t==JM||t==qM||t==XM}var $M=ZM,e2=iu,t2=e2["__core-js_shared__"],n2=t2,lu=n2,PI=function(){var e=/[^.]+$/.exec(lu&&lu.keys&&lu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function r2(e){return!!PI&&PI in e}var o2=r2,i2=Function.prototype,s2=i2.toString;function a2(e){if(e!=null){try{return s2.call(e)}catch{}try{return e+""}catch{}}return""}var l2=a2,A2=$M,c2=o2,u2=TI,g2=l2,d2=/[\\^$.*+?()[\]{}|]/g,f2=/^\[object .+?Constructor\]$/,p2=Function.prototype,h2=Object.prototype,C2=p2.toString,E2=h2.hasOwnProperty,I2=RegExp("^"+C2.call(E2).replace(d2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function B2(e){if(!u2(e)||c2(e))return!1;var t=A2(e)?I2:f2;return t.test(g2(e))}var Q2=B2;function m2(e,t){return e==null?void 0:e[t]}var y2=m2,b2=Q2,v2=y2;function x2(e,t){var n=v2(e,t);return b2(n)?n:void 0}var SI=x2,w2=SI,T2=w2(Object,"create"),Va=T2,OI=Va;function P2(){this.__data__=OI?OI(null):{},this.size=0}var S2=P2;function O2(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var D2=O2,M2=Va,k2="__lodash_hash_undefined__",F2=Object.prototype,L2=F2.hasOwnProperty;function N2(e){var t=this.__data__;if(M2){var n=t[e];return n===k2?void 0:n}return L2.call(t,e)?t[e]:void 0}var R2=N2,j2=Va,H2=Object.prototype,V2=H2.hasOwnProperty;function z2(e){var t=this.__data__;return j2?t[e]!==void 0:V2.call(t,e)}var W2=z2,U2=Va,Y2="__lodash_hash_undefined__";function G2(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=U2&&t===void 0?Y2:t,this}var K2=G2,q2=S2,_2=D2,J2=R2,X2=W2,Z2=K2;function qo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}qo.prototype.clear=q2,qo.prototype.delete=_2,qo.prototype.get=J2,qo.prototype.has=X2,qo.prototype.set=Z2;var $2=qo;function ek(){this.__data__=[],this.size=0}var tk=ek;function nk(e,t){return e===t||e!==e&&t!==t}var rk=nk,ok=rk;function ik(e,t){for(var n=e.length;n--;)if(ok(e[n][0],t))return n;return-1}var za=ik,sk=za,ak=Array.prototype,lk=ak.splice;function Ak(e){var t=this.__data__,n=sk(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():lk.call(t,n,1),--this.size,!0}var ck=Ak,uk=za;function gk(e){var t=this.__data__,n=uk(t,e);return n<0?void 0:t[n][1]}var dk=gk,fk=za;function pk(e){return fk(this.__data__,e)>-1}var hk=pk,Ck=za;function Ek(e,t){var n=this.__data__,r=Ck(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Ik=Ek,Bk=tk,Qk=ck,mk=dk,yk=hk,bk=Ik;function _o(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_o.prototype.clear=Bk,_o.prototype.delete=Qk,_o.prototype.get=mk,_o.prototype.has=yk,_o.prototype.set=bk;var vk=_o,xk=SI,wk=iu,Tk=xk(wk,"Map"),Pk=Tk,DI=$2,Sk=vk,Ok=Pk;function Dk(){this.size=0,this.__data__={hash:new DI,map:new(Ok||Sk),string:new DI}}var Mk=Dk;function kk(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Fk=kk,Lk=Fk;function Nk(e,t){var n=e.__data__;return Lk(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Wa=Nk,Rk=Wa;function jk(e){var t=Rk(this,e).delete(e);return this.size-=t?1:0,t}var Hk=jk,Vk=Wa;function zk(e){return Vk(this,e).get(e)}var Wk=zk,Uk=Wa;function Yk(e){return Uk(this,e).has(e)}var Gk=Yk,Kk=Wa;function qk(e,t){var n=Kk(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var _k=qk,Jk=Mk,Xk=Hk,Zk=Wk,$k=Gk,eF=_k;function Jo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jo.prototype.clear=Jk,Jo.prototype.delete=Xk,Jo.prototype.get=Zk,Jo.prototype.has=$k,Jo.prototype.set=eF;var tF=Jo,MI=tF,nF="Expected a function";function Au(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(nF);var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var l=e.apply(this,r);return n.cache=a.set(s,l)||a,l};return n.cache=new(Au.Cache||MI),n}Au.Cache=MI;var rF=Au,oF=rF,iF=500;function sF(e){var t=oF(e,function(r){return n.size===iF&&n.clear(),r}),n=t.cache;return t}var aF=sF,lF=aF,AF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cF=/\\(\\)?/g,uF=lF(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(AF,function(n,r,s,a){t.push(s?a.replace(cF,"$1"):r||n)}),t}),gF=uF;function dF(e,t){for(var n=-1,r=e==null?0:e.length,s=Array(r);++n<r;)s[n]=t(e[n],n,e);return s}var fF=dF,kI=su,pF=fF,hF=ou,CF=au,EF=1/0,FI=kI?kI.prototype:void 0,LI=FI?FI.toString:void 0;function NI(e){if(typeof e=="string")return e;if(hF(e))return pF(e,NI)+"";if(CF(e))return LI?LI.call(e):"";var t=e+"";return t=="0"&&1/e==-EF?"-0":t}var IF=NI,BF=IF;function QF(e){return e==null?"":BF(e)}var mF=QF,yF=ou,bF=UM,vF=gF,xF=mF;function wF(e,t){return yF(e)?e:bF(e,t)?[e]:vF(xF(e))}var TF=wF,PF=au,SF=1/0;function OF(e){if(typeof e=="string"||PF(e))return e;var t=e+"";return t=="0"&&1/e==-SF?"-0":t}var DF=OF,MF=TF,kF=DF;function FF(e,t){t=MF(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[kF(t[n++])];return n&&n==r?e:void 0}var LF=FF,NF=LF;function RF(e,t,n){var r=e==null?void 0:NF(e,t);return r===void 0?n:r}var jF=RF;const cu=Qi(jF),RI=e=>{const{className:t,emptyText:n,source:r,title:s,...a}=e,l=yo.useRecordContext(e),u=cu(l,r),g=yo.useTranslate();if(!u)return n?h.jsx(Cf,{component:"span",variant:"body2",className:t,...a,children:n&&g(n,{_:n})}):h.jsx(jI,{className:t,...a});if(Array.isArray(u))return h.jsx(HF,{className:t,...a,children:u.map((p,E)=>{const C=cu(p,s)||s;return h.jsx("li",{children:C},E)})});const d=cu(l,s)||s;return h.jsx(jI,{className:t,...a,children:d})};RI.propTypes={src:A.string,title:A.oneOfType([A.string,A.func,A.element]),target:A.string,download:A.oneOfType([A.bool,A.string]),ping:A.string,rel:A.string,emptyText:A.string,source:A.string.isRequired,className:A.string};const jI=le("div",{name:"RaApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),HF=le("ul")({display:"inline-block"}),uu=({entityId:e,property:t,...n})=>{const[r,s]=F.useState(null),a=x.useRecordContext(n),l=x.useDataProvider(),u=x.useResourceContext(),g=F.useCallback(async E=>{E.preventDefault(),E.stopPropagation();const C=gt.get(a,n==null?void 0:n.source),I=u.replace("entities/",""),B=await l.getFile(`/attachments/${I}/${e||(a==null?void 0:a.id)}/${t||(n==null?void 0:n.source)}/${(C==null?void 0:C.id)||(a==null?void 0:a.id)}`),m=document.createElement("a");m.href=B,m.download=gt.get(a,(n==null?void 0:n.title)||(n==null?void 0:n.source)),m.click()},[l,a,e,u,t,n==null?void 0:n.source,n==null?void 0:n.title]),d=F.useMemo(()=>({...a,[n==null?void 0:n.source]:(a==null?void 0:a.src)||gt.get(a,n==null?void 0:n.source),[n==null?void 0:n.title]:(a==null?void 0:a.title)||gt.get(a,(n==null?void 0:n.title)||(n==null?void 0:n.source))}),[a,n==null?void 0:n.source,n==null?void 0:n.title]),p=x.useTranslate();return F.useEffect(()=>{!a||!(a!=null&&a.userId)||l.getOne("entities/user",{id:a==null?void 0:a.userId}).then(({data:E})=>s(E))},[a,l]),h.jsx(RI,{...n,record:d,onClick:g,title:h.jsxs(w.Box,{sx:{cursor:"pointer"},children:[h.jsx(w.Typography,{variant:"subtitle1",children:gt.get(d,(n==null?void 0:n.title)||(n==null?void 0:n.source))}),h.jsxs(w.Typography,{variant:"caption",color:"secondary",children:[gt.get(d,"sizeDescription"),r&&" | ",r&&p("ra.attachment.info",{user:r==null?void 0:r.name,created:lr(d==null?void 0:d.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};uu.propTypes={...x.FileField.propTypes,source:A.string,title:A.string};const VF=le(x.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),ss=e=>{const t=`_${e==null?void 0:e.source}`;return h.jsx(VF,{...e,source:t})};ss.propTypes={...x.ImageField.propTypes,source:A.string};const Ua=({width:e,height:t,circle:n,justify:r,record:s,...a})=>{const l=F.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]),u=x.useRecordContext(),g=s||u;return h.jsx(ss,{sx:d=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${d.palette.divider}`,objectFit:"cover !important",...l,minWidth:l.width,minHeight:l.height}}),...a,record:g})};Ua.defaultProps={...ss.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"},Ua.propTypes={...ss.propTypes,width:A.oneOfType([A.number,A.string]),height:A.oneOfType([A.number,A.string]),circle:A.bool,justify:A.oneOf(["flex-start","center","flex-end"])};var HI={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(bn,function(){return function(n,r,s){n=n||{};var a=r.prototype,l={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 u(d,p,E,C){return a.fromToBase(d,p,E,C)}s.en.relativeTime=l,a.fromToBase=function(d,p,E,C,I){for(var B,m,y,D=E.$locale().relativeTime||l,k=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"}],P=k.length,T=0;T<P;T+=1){var O=k[T];O.d&&(B=C?s(d).diff(E,O.d,!0):E.diff(d,O.d,!0));var V=(n.rounding||Math.round)(Math.abs(B));if(y=B>0,V<=O.r||!O.r){V<=1&&T>0&&(O=k[T-1]);var q=D[O.l];I&&(V=I(""+V)),m=typeof q=="string"?q.replace("%d",V):q(V,p,O.l,y);break}}if(p)return m;var ne=y?D.future:D.past;return typeof ne=="function"?ne(m):ne.replace("%s",m)},a.to=function(d,p){return u(d,p,this,!0)},a.from=function(d,p){return u(d,p,this)};var g=function(d){return d.$u?s.utc():s()};a.toNow=function(d){return this.to(g(this),d)},a.fromNow=function(d){return this.from(g(this),d)}}})})(HI);var zF=HI.exports;const WF=Qi(zF);lr.extend(WF);const Ya=e=>{const t=x.useRecordContext(e),[n]=x.useLocaleState(),r=F.useMemo(()=>lr(gt.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return h.jsxs(F.Fragment,{children:[h.jsx(x.DateField,{record:t,source:e.source,showTime:!0}),h.jsx("br",{}),h.jsx(w.Typography,{variant:"caption",color:"textSecondary",children:r})]})};Ya.displayName="DateAgoField",Ya.propTypes={source:A.string.isRequired};const VI=le(x.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));VI.propTypes={...x.DateField.propTypes};const gu=e=>h.jsx(VI,{...e});gu.defaultProps={...x.DateField.defaultProps,variant:"body1"},gu.propTypes={...x.DateField.propTypes};const zI=le(x.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));zI.propTypes={...x.EmailField.propTypes};const du=e=>h.jsx(zI,{...e});du.defaultProps={...x.EmailField.defaultProps,variant:"body1"},du.propTypes={...x.EmailField.propTypes};const UF=le(x.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),fu=({...e})=>{const t=x.useRecordContext(e),n=F.useCallback(r=>{r.preventDefault(),r.stopPropagation();const s=gt.get(t,`_${e==null?void 0:e.source}`,gt.get(t,e==null?void 0:e.source)),a=gt.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),l=document.createElement("a");l.href=s,l.download=a,l.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return h.jsx(UF,{...e,record:t,onClick:n})};fu.propTypes={...x.FileField.propTypes,source:A.string,title:A.string};const WI=e=>h.jsx(x.FunctionField,{...e});WI.defaultProps={variant:"body1"};const YF=le("div")(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),pu=({source:e,defaultValue:t,...n})=>{const r=x.useRecordContext(n),s=gt.get(r,e,t);return h.jsx("span",{dangerouslySetInnerHTML:{__html:s&&s!==null?s:t}})};pu.propTypes={defaultValue:A.any,source:A.string,record:A.object},pu.defaultProps={defaultValue:"&nbsp;"};const UI=({title:e,children:t})=>e&&e!==!1?h.jsx(w.Tooltip,{title:e,placement:"top",children:t}):t;UI.propTypes={title:A.oneOfType([A.string,A.bool]),children:A.oneOfType([A.element,A.arrayOf(A.element)])};const hu=({label:e,source:t,defaultValue:n,children:r,tooltip:s,...a})=>{const{getCurrentDialog:l}=Mi(),u=x.useRecordContext(a),g=x.useResourceContext(a),d=l(),p=F.useMemo(()=>!s||s===!1?!1:typeof s=="function"?s(u):typeof s=="string"?gt.get(u,s,s):s,[u,s]);return h.jsx(UI,{title:p,children:h.jsxs(F.Fragment,{children:[h.jsx(w.InputLabel,{children:h.jsx(x.FieldTitle,{label:e,source:t,resource:d||g})}),h.jsx(YF,{...a,children:F.cloneElement(r,{source:t,record:u,defaultValue:n,resource:d||g})})]})})};hu.propTypes={defaultValue:A.any,tooltip:A.oneOfType([A.string,A.bool,A.func]),source:A.string,label:A.string,name:A.string,children:A.element},hu.defaultProps={defaultValue:"&nbsp;",children:h.jsx(pu,{})};const GF=wo("div",{name:"RaApplicaReferenceManyField",slot:"root"})(({theme:e,margin:t,border:n})=>({marginLeft:t?0:`-${e.spacing(2.5)}`,marginRight:t?0:`-${e.spacing(2.5)}`,borderBottom:n?`1px solid ${e.palette.divider}`:"none","& .MuiCardContent-root":{borderTop:n?`1px solid ${e.palette.divider}`:"none"},"& .MuiToolbar-root":{marginTop:`-${e.spacing(2)}`,marginBottom:e.spacing(t?0:1),marginLeft:e.spacing(t?1:2.5),marginRight:e.spacing(t?1:2.5),width:t?"auto":`calc(100% - ${e.spacing(5)})`,[e.breakpoints.down("md")]:{marginTop:0}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`},"& .MuiTablePagination-toolbar":{marginTop:e.spacing(1),marginBottom:0},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0},"& .RaBulkActionsToolbar-toolbar":{minHeight:64,"& h6":{marginTop:e.spacing(.5)},"& .RaBulkActionsToolbar-topToolbar":{marginTop:e.spacing(1)}}})),Xo=e=>h.jsx(GF,{children:h.jsx(x.ReferenceManyField,{...e})});Xo.defaultProps={...x.ReferenceManyField.defaultProps,margin:!1,border:!1},Xo.propTypes={...x.ReferenceManyField.propTypes,margin:A.bool,border:A.bool};const YI=({source:e,...t})=>{const n=x.useRecordContext(t),r=gt.get(n,e,0),s=r/1024,a=s/1024,l=a/1024,u=l>1?`${l.toFixed(2)} GB`:a>1?`${a.toFixed(2)} MB`:s>1?`${s.toFixed(2)} KB`:`${r.toFixed(2)} B`;return h.jsx(w.Typography,{component:"span",variant:"body1",...t,children:u})};YI.propTypes={record:A.object,source:A.string};const GI=le(x.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));GI.propTypes={...x.TextField.propTypes};const Cu=e=>h.jsx(GI,{...e});Cu.defaultProps={...x.TextField.defaultProps,variant:"body1"},Cu.propTypes={...x.TextField.propTypes};const st=({label:e,children:t,display:n,helperText:r,sx:s,...a})=>{const l=Vt.useTheme(),{getCurrentDialog:u}=Mi(),{source:g,resource:d,isRequired:p}=a,{fieldState:{invalid:E}}=x.useInput(a),C=u();return h.jsxs(w.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:E?l.palette.error.main:l.palette.text.secondary,"& span":{display:"none"}},...s},children:[n==="label"&&e!==!1&&h.jsx(w.InputLabel,{error:E===!0,children:h.jsx(x.FieldTitle,{label:e,source:g,resource:C||d,isRequired:p})}),F.cloneElement(t,{...t.props,...a,label:n==="legend"?e:!1}),n==="label"&&r&&h.jsx(w.FormHelperText,{sx:{pl:2,pb:2,marginTop:"0 !important"},error:E===!0,children:r})]})};st.propTypes={sx:A.object,children:A.element,label:A.oneOfType([A.string,A.bool]),addLabel:A.bool,resource:A.string,isRequired:A.bool,source:A.string,display:A.oneOf(["legend","label"]),helperText:A.oneOfType([A.string,A.bool])},st.defaultProps={display:"label"},le(x.ArrayInput,{name:"RaApplicaArrayInput",slot:"root"})(({theme:e})=>({marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}})),{...x.ArrayInput.propTypes,...st.propTypes};const KF=le(x.FileInput,{name:"RaApplicaFileInput",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}}})),Eu=({children:e,...t})=>{const n=x.useRecordContext(t),r=t==null?void 0:t.source,s=n==null?void 0:n.id;return h.jsx(st,{...t,children:h.jsx(KF,{children:F.cloneElement(e,{...e.props,entityId:s,property:r})})})};Eu.propTypes={...x.FileInput.propTypes,children:A.node,multiple:A.bool},Eu.defaultProps={children:h.jsx(uu,{title:"name",source:"path"}),multiple:!0};const qF=le(x.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),KI=({perPage:e,...t})=>h.jsx(st,{...t,children:h.jsx(qF,{})});KI.propTypes={...x.AutocompleteArrayInput.propTypes,...st.propTypes};const _F=le(x.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),qI=({perPage:e,...t})=>h.jsx(st,{...t,children:h.jsx(_F,{})});qI.propTypes={...x.AutocompleteInput.propTypes,...st.propTypes};const JF=le(x.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({})),Iu=({horizontal:e,...t})=>{const n=lt();return h.jsx(st,{...t,sx:e?{flexDirection:e?"row":"column",alignItems:e?"center":"flex-start","& .MuiFormGroup-root":{margin:0},"& .MuiFormControlLabel-root":{margin:0,"& .MuiTypography-root":{display:"none",visibility:"hidden"},"& .MuiSwitch-root":{marginRight:`-${n.spacing(.5)}`}}}:{},children:h.jsx(JF,{})})};Iu.defaultProps={...x.BooleanInput.defaultProps,...st.defaultProps},Iu.propTypes={...x.BooleanInput.propTypes,...st.propTypes,horizontal:A.bool};const XF=le(x.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Bu=e=>h.jsx(st,{...e,children:h.jsx(XF,{})});Bu.propTypes={...x.DateInput.propTypes,...st.propTypes},Bu.defaultProps={...x.DateInput.defaultProps,...st.defaultProps};const ZF=le(x.FileInput,{name:"RaApplicaFileInput",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}}})),Qu=({children:e,title:t,...n})=>{const r=Vl.useWatch({name:n.source}),s=x.useRecordContext(n),{source:a}=n,l=F.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const u=gt.get(s,a);if(u){const g=u.split("__");return g.length>0?g[g.length-1]:u}return u},[s,a,r]);return h.jsx(st,{...n,children:h.jsx(ZF,{children:F.cloneElement(e,{...e.props,title:t||a,source:a,record:{...s,[a]:(r==null?void 0:r.title)||gt.get(s,a),[`_${a}`]:(r==null?void 0:r.src)||gt.get(s,`_${a}`),[t||a]:l}})})})};Qu.propTypes={...x.FileInput.propTypes,source:A.string,title:A.string,children:A.node},Qu.defaultProps={children:h.jsx(fu,{})};const mu=({children:e,title:t,...n})=>{const r=Vl.useWatch({name:n.source}),s=x.useRecordContext(n),{source:a}=n;return h.jsx(st,{...n,children:h.jsx(x.ImageInput,{accept:"image/*",children:F.cloneElement(e,{...e.props,title:t,source:a,record:{...s,[a]:(r==null?void 0:r.title)||gt.get(s,a),[`_${a}`]:(r==null?void 0:r.src)||gt.get(s,`_${a}`)}})})})};mu.defaultProps={children:h.jsx(Ua,{}),multiple:!1},mu.propTypes={...x.ImageInput.propTypes,source:A.string,title:A.string,children:A.node,multiple:A.bool};const $F=le(x.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),yu=e=>h.jsx(st,{...e,children:h.jsx($F,{})});yu.propTypes={...x.NumberInput.propTypes,...st.propTypes},yu.defaultProps={...x.NumberInput.defaultProps,...st.defaultProps};const _I=({source:e,minWidth:t=300,children:n})=>{const r=x.useResourceContext(),s=x.useRecordContext(),[a,l]=F.useState(gt.get(s,e,"")),[u,g]=F.useState(!1),d=F.useCallback(B=>l(B.target.value),[]),p=x.useDataProvider(),E=F.useCallback(B=>{B.key==="Enter"&&(g(!0),p.update(r,{id:s.id,data:{...s,[e]:a,_changed:e}}).then(()=>g(!1)))},[a,p,r,s,e]),C=F.useCallback(()=>{gt.get(s,e)!==a&&(g(!0),p.update(r,{id:s.id,data:{...s,[e]:a,_changed:e}}).then(()=>g(!1)))},[a,p,r,e,s]),I=F.useCallback(B=>{g(!0),p.update(r,{id:s.id,data:{...s,[e]:B,_changed:e}}).then(()=>g(!1))},[p,r,e,s]);return F.useEffect(()=>l(gt.get(s,e)),[s,e]),n?F.cloneElement(n,{...n.props,source:e,value:a,onChange:I}):h.jsx(w.TextField,{value:a,disabled:u,onChange:d,onKeyPress:E,onBlur:C,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})};_I.propTypes={source:A.string.isRequired,minWidth:A.number,children:A.element};const bu=({children:e,...t})=>h.jsx(x.ReferenceArrayInput,{...t,children:F.cloneElement(e,{...t,source:e.props.source||t.source})});bu.propTypes={...x.ReferenceArrayInput.propTypes,children:A.element},bu.defaultProps={...x.ReferenceArrayInput.defaultProps};const vu=({children:e,...t})=>h.jsx(x.ReferenceInput,{...t,children:F.cloneElement(e,{...t,source:e.props.source||t.source})});vu.propTypes={...x.ReferenceInput.propTypes,children:A.element},vu.defaultProps={...x.ReferenceInput.defaultProps};const xu=({reference:e,target:t,children:n,filters:r,actions:s,...a})=>h.jsx(x.ResourceContextProvider,{value:e,children:h.jsx(Xo,{perPage:5,pagination:h.jsx(x.Pagination,{}),...a,reference:e,target:t,children:h.jsxs(F.Fragment,{children:[h.jsx(x.ListToolbar,{filters:r,actions:s}),n]})})});xu.propTypes={...Xo.propTypes,children:A.node.isRequired,reference:A.string.isRequired,target:A.string.isRequired,filters:A.oneOfType([A.element,A.func,A.element,A.arrayOf(A.node)]),actions:A.oneOfType([A.element,A.func,A.element])},xu.defaultProps={...Xo.defaultProps};const e4=le(x.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),t4=e=>h.jsx(e4,{...e}),JI=le(x.SelectArrayInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .RaSelectArrayInput-chips":{"& .RaSelectArrayInput-chip":{marginTop:0}}}));JI.propTypes={...x.SelectArrayInput.propTypes};const wu=e=>h.jsx(st,{...e,children:h.jsx(JI,{options:{autoWidth:!1}})});wu.defaultProps={optionText:"name",optionValue:"id"},wu.propTypes={...x.SelectArrayInput.propTypes,...st.propTypes};const n4=le(x.SelectInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),XI=e=>h.jsx(st,{...e,children:h.jsx(n4,{})});XI.propTypes={...x.SelectInput.propTypes,...st.propTypes};const as=e=>h.jsx(st,{...e,children:h.jsx(x.TextInput,{})});as.defaultProps={...x.TextInput.defaultProps},as.propTypes={...x.TextInput.propTypes,...st.propTypes};const Ga=({...e})=>{var u,g;const t=x.useTranslate(),n=x.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(g=(u=Vl.useController({name:e==null?void 0:e.source}))==null?void 0:u.field)==null?void 0:g.value;let s=e.helperText,a=e.validate;a?Array.isArray(a)&&a.indexOf(n)===-1&&a.push(n):a=[n];const l=t("app.input.max_length_info",{count:(r==null?void 0:r.length)||0,max:e==null?void 0:e.maxLength});return e!=null&&e.maxLength&&(s=s&&s.length>0?`${l} - ${t(s)}`:l),h.jsx(as,{...e,validate:a,helperText:s})};Ga.displayName="SmartTextInput",Ga.defaultProps={multiline:!1},Ga.propTypes={...as.propTypes,maxLength:A.number,multiline:A.bool,rows:A.number};const ZI=e=>{const t=e.split(":");return t.length===1&&t.push("00"),lr().hour(t[0]).minute(t[1])};function r4(){var e=new Date().getTime();window.performance&&typeof window.performance.now=="function"&&(e+=performance.now());var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)});return t}const o4=e=>{if(!e)return"";const t=ZI(e);return t?t.format("HH:mm"):""},i4=e=>e,s4=le(x.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Tu=e=>h.jsx(st,{...e,children:h.jsx(s4,{})});Tu.defaultProps={...x.TimeInput.defaultProps,format:o4,parse:i4},Tu.propTypes={...x.TimeInput.propTypes,...st.propTypes};const a4=le(x.Datagrid,{name:"RaApplicaDatagrid",slot:"root"})(()=>({"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .RaBulkActionsToolbar-topToolbar":{backgroundColor:"transparent"},"& .icon span":{top:-1,left:-1},"& th":{backgroundColor:"yellow",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),Pu=e=>h.jsx(a4,{...e});Pu.propTypes={...x.Datagrid.propTypes},Pu.defaultProps={...x.Datagrid.defaultProps};const l4=le("div")(({theme:e})=>({padding:e.spacing(2)})),$I=({actions:e,className:t,...n})=>{const{hasCreate:r}=yo.useResourceDefinition(n),s=yo.useResourceContext(n),a=yo.useTranslate(),l=yo.useGetResourceLabel(),u=a(`resources.${s}.forcedCaseName`,{smart_count:0,_:l(s,0)}),g=a("ra.page.empty",{name:u}),d=a("ra.page.invite");return h.jsxs(A4,{className:t,children:[h.jsxs("div",{className:Zo.message,children:[h.jsx(Ir.Inbox,{className:Zo.icon}),h.jsx(w.Typography,{variant:"h4",paragraph:!0,children:a(`resources.${s}.empty`,{_:g})}),r&&h.jsx(w.Typography,{variant:"body1",children:a(`resources.${s}.invite`,{_:d})})]}),h.jsx(l4,{className:Zo.toolbar,children:e})]})},Ka="RaApplicaEmpty",Zo={message:`${Ka}-message`,icon:`${Ka}-icon`,toolbar:`${Ka}-toolbar`},A4=le("span",{name:Ka,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${Zo.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${Zo.icon}`]:{width:"9em",height:"9em"},[`& .${Zo.toolbar}`]:{textAlign:"center",marginTop:"2em"}}));$I.propTypes={actions:A.element,className:A.string};const c4=wo(x.List,{name:"RaApplicaList",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:e.spacing(2)},"& .RaFilterForm-filterFormInput > .ra-input":{alignSelf:"center"},"& .RaFilterFormInput-hideButton":{marginTop:e.spacing(1),marginBottom:e.spacing(.5),marginRight:e.spacing(1)}}},"& .RaList-content":{"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .icon span":{top:-1,left:-1}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}})),Su=e=>h.jsx(jn,{content:!1,children:h.jsx(c4,{...x.List.defaultProps,...e})});Su.defaultProps={...x.List.defaultProps},Su.propTypes={...x.List.propTypes};const u4=()=>{const e=x.useRefresh(),t=x.useNotify(),n=x.useUnselectAll(),r=x.useResourceContext(),{selectedIds:s,data:a}=x.useListContext(),l=x.useRecordContext(),u=s.map(E=>a.find(C=>C.id===E)),[g,{isLoading:d}]=x.useUpdateMany(r,{ids:s.length>0?s:[l==null?void 0:l.id],data:{readed:lr().format("YYYY-MM-DD HH:mm:ss")},rows:u},{onSuccess:()=>{e(),t("resources.notifications.messages.readed.done"),n(r)},onError:()=>t("ra.notification.readed_error","warning"),onFailure:()=>t("ra.notification.readed_error","warning")}),p=F.useCallback(()=>{g()},[g]);return h.jsx(x.Button,{label:"ra.notification.mark_as_readed",disabled:d||(l==null?void 0:l.readed)!==null,onClick:p,children:h.jsx(Ir.Email,{})})},g4=()=>{const e=x.useRefresh(),t=x.useNotify(),n=x.useUnselectAll(),{selectedIds:r,data:s}=x.useListContext(),a=x.useRecordContext(),l=x.useResourceContext(),u=r.map(E=>s.find(C=>C.id===E)).concat([a]),[g,{isLoading:d}]=x.useUpdateMany(l,{ids:r.length>0?r:[a==null?void 0:a.id],data:{readed:null},rows:u},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),n("notifications")},onFailure:()=>t("resources.notifications.messages.unreaded.error","warning")}),p=F.useCallback(()=>{g()},[g]);return h.jsx(x.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||a&&!(a!=null&&a.readed),onClick:p,children:h.jsx(Ir.Drafts,{})})},d4=e=>{const t=x.useRecordContext(e),n=x.useResourceContext(e),r=x.useRedirect(),s=x.useNotify(),a=x.useTranslate(),[l]=x.useLocaleState(),u=F.useMemo(()=>t!=null&&t.readed?lr(t==null?void 0:t.readed).locale(l).format("ddd, DD MMM YYYY HH:mm:ss"):!1,[t==null?void 0:t.readed,l]),[g]=x.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:lr().format("YYYY-MM-DD HH:mm:ss")}},{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)},onFailure:()=>{s("ra.notification.readed_error","warning")}}),d=F.useCallback(()=>g(),[g]);return h.jsxs("div",{onClick:d,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[h.jsx(w.Typography,{variant:"subtitle1",children:h.jsxs(w.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),h.jsx(w.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:t==null?void 0:t.content}}),u&&h.jsx(w.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:a("ra.notification.readed",{readed:u})})]})},f4=({...e})=>{const t=w.useTheme(),{mode:n,colorize:r,density:s}=F.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?w.darken:w.lighten,density:t.palette.mode==="dark"?.5:.9}),[t.palette.mode]),a=F.useCallback(l=>({backgroundColor:l!=null&&l.readed?r(t.palette.primary[n],s):r(t.palette.secondary[n],s)}),[t,n,r,s]);return h.jsxs(x.Datagrid,{...e,rowStyle:a,children:[h.jsx(d4,{source:"notification",sortable:!1,label:"ra.notification"}),h.jsx(Ya,{source:"created",label:"ra.notification.created"}),h.jsxs(Di,{children:[h.jsx(u4,{}),h.jsx(g4,{})]})]})},p4=e=>({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 ${je(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${je(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${je(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${je(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${je(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${je(e.palette.info.main,.2)}`,success:`0 0 0 2px ${je(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${je(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${je(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${je(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${je(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${je(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${je(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${je(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${je(e.palette.grey[500],.2)}`});function Tn(e,t){h4(e)&&(e="100%");var n=C4(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function h4(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function C4(e){return typeof e=="string"&&e.indexOf("%")!==-1}function E4(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function qa(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Ou(e){return e.length===1?"0"+e:String(e)}function I4(e,t,n){return{r:Tn(e,255)*255,g:Tn(t,255)*255,b:Tn(n,255)*255}}function Du(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function B4(e,t,n){var r,s,a;if(e=Tn(e,360),t=Tn(t,100),n=Tn(n,100),t===0)s=n,a=n,r=n;else{var l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;r=Du(u,l,e+1/3),s=Du(u,l,e),a=Du(u,l,e-1/3)}return{r:r*255,g:s*255,b:a*255}}function Q4(e,t,n){e=Tn(e,255),t=Tn(t,255),n=Tn(n,255);var r=Math.max(e,t,n),s=Math.min(e,t,n),a=0,l=r,u=r-s,g=r===0?0:u/r;if(r===s)a=0;else{switch(r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:g,v:l}}function m4(e,t,n){e=Tn(e,360)*6,t=Tn(t,100),n=Tn(n,100);var r=Math.floor(e),s=e-r,a=n*(1-t),l=n*(1-s*t),u=n*(1-(1-s)*t),g=r%6,d=[n,l,a,a,u,n][g],p=[u,n,n,l,a,a][g],E=[a,a,u,n,n,l][g];return{r:d*255,g:p*255,b:E*255}}function y4(e,t,n,r){var s=[Ou(Math.round(e).toString(16)),Ou(Math.round(t).toString(16)),Ou(Math.round(n).toString(16))];return r&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function eB(e){return pn(e)/255}function pn(e){return parseInt(e,16)}var tB={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ls(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,a=null,l=!1,u=!1;return typeof e=="string"&&(e=x4(e)),typeof e=="object"&&(Ar(e.r)&&Ar(e.g)&&Ar(e.b)?(t=I4(e.r,e.g,e.b),l=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ar(e.h)&&Ar(e.s)&&Ar(e.v)?(r=qa(e.s),s=qa(e.v),t=m4(e.h,r,s),l=!0,u="hsv"):Ar(e.h)&&Ar(e.s)&&Ar(e.l)&&(r=qa(e.s),a=qa(e.l),t=B4(e.h,r,a),l=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=E4(n),{ok:l,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var b4="[-\\+]?\\d+%?",v4="[-\\+]?\\d*\\.\\d+%?",Vr="(?:".concat(v4,")|(?:").concat(b4,")"),Mu="[\\s|\\(]+(".concat(Vr,")[,|\\s]+(").concat(Vr,")[,|\\s]+(").concat(Vr,")\\s*\\)?"),ku="[\\s|\\(]+(".concat(Vr,")[,|\\s]+(").concat(Vr,")[,|\\s]+(").concat(Vr,")[,|\\s]+(").concat(Vr,")\\s*\\)?"),Hn={CSS_UNIT:new RegExp(Vr),rgb:new RegExp("rgb"+Mu),rgba:new RegExp("rgba"+ku),hsl:new RegExp("hsl"+Mu),hsla:new RegExp("hsla"+ku),hsv:new RegExp("hsv"+Mu),hsva:new RegExp("hsva"+ku),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function x4(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(tB[e])e=tB[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Hn.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Hn.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Hn.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Hn.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Hn.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Hn.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Hn.hex8.exec(e),n?{r:pn(n[1]),g:pn(n[2]),b:pn(n[3]),a:eB(n[4]),format:t?"name":"hex8"}:(n=Hn.hex6.exec(e),n?{r:pn(n[1]),g:pn(n[2]),b:pn(n[3]),format:t?"name":"hex"}:(n=Hn.hex4.exec(e),n?{r:pn(n[1]+n[1]),g:pn(n[2]+n[2]),b:pn(n[3]+n[3]),a:eB(n[4]+n[4]),format:t?"name":"hex8"}:(n=Hn.hex3.exec(e),n?{r:pn(n[1]+n[1]),g:pn(n[2]+n[2]),b:pn(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Ar(e){return!!Hn.CSS_UNIT.exec(String(e))}var _a=2,nB=.16,w4=.05,T4=.05,P4=.15,rB=5,oB=4,S4=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function iB(e){var t=e.r,n=e.g,r=e.b,s=Q4(t,n,r);return{h:s.h*360,s:s.s,v:s.v}}function Ja(e){var t=e.r,n=e.g,r=e.b;return"#".concat(y4(t,n,r,!1))}function O4(e,t,n){var r=n/100,s={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return s}function sB(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-_a*t:Math.round(e.h)+_a*t:r=n?Math.round(e.h)+_a*t:Math.round(e.h)-_a*t,r<0?r+=360:r>=360&&(r-=360),r}function aB(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-nB*t:t===oB?r=e.s+nB:r=e.s+w4*t,r>1&&(r=1),n&&t===rB&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function lB(e,t,n){var r;return n?r=e.v+T4*t:r=e.v-P4*t,r>1&&(r=1),Number(r.toFixed(2))}function AB(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=ls(e),s=rB;s>0;s-=1){var a=iB(r),l=Ja(ls({h:sB(a,s,!0),s:aB(a,s,!0),v:lB(a,s,!0)}));n.push(l)}n.push(Ja(r));for(var u=1;u<=oB;u+=1){var g=iB(r),d=Ja(ls({h:sB(g,u),s:aB(g,u),v:lB(g,u)}));n.push(d)}return t.theme==="dark"?S4.map(function(p){var E=p.index,C=p.opacity,I=Ja(O4(ls(t.backgroundColor||"#141414"),ls(n[E]),C*100));return I}):n}var Fu={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Mt={},Xa={};Object.keys(Fu).forEach(function(e){Mt[e]=AB(Fu[e]),Mt[e].primary=Mt[e][5],Xa[e]=AB(Fu[e],{theme:"dark",backgroundColor:"#141414"}),Xa[e].primary=Xa[e][5]}),Mt.red,Mt.volcano,Mt.gold,Mt.orange,Mt.yellow,Mt.lime,Mt.green,Mt.cyan,Mt.blue,Mt.geekblue,Mt.purple,Mt.magenta,Mt.grey,Mt.grey;const cB=e=>{const{blue:t,red:n,gold:r,cyan:s,green:a,grey:l}=e,u={0:l[0],50:l[1],100:l[2],200:l[3],300:l[4],400:l[5],500:l[6],600:l[7],700:l[8],800:l[9],900:l[10],A50:l[15],A100:l[11],A200:l[12],A400:l[13],A700:l[14],A800:l[16]},g="#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:g},secondary:{lighter:u[100],100:u[100],200:u[200],light:u[300],400:u[400],main:u[500],600:u[600],dark:u[700],800:u[800],darker:u[900],A100:u[0],A200:u.A400,A300:u.A700,contrastText:u[0]},error:{lighter:n[0],light:n[2],main:n[4],dark:n[7],darker:n[9],contrastText:g},warning:{lighter:r[0],light:r[3],main:r[5],dark:r[7],darker:r[9],contrastText:u[100]},info:{lighter:s[0],light:s[3],main:s[5],dark:s[7],darker:s[9],contrastText:g},success:{lighter:a[0],light:a[3],main:a[5],dark:a[7],darker:a[9],contrastText:g},grey:u}};cB.propTypes={colors:A.object};const D4=(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]},s="#fff";let a=["#D6E4FF","#D6E4FF","#ADC8FF","#84A9FF","#6690FF","#3366FF","#254EDB","#1939B7","#102693","#102693"],l=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],u=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],g=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],d=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(a=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],l=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],u=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],g=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],d=["#1f2e1c","#449626","#4fba28","#74cf4d","#e3fbd2"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},M4=(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]},s="#fff";let a=["#EEEDFC","#D5D1F8","#B9B2F3","#9C93EE","#877CEA","#7265E6","#6A5DE3","#5F53DF","#5549DB","#4237D5"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],g=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(a=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],g=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},k4=(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]},s="#fff";let a=["#E6F3EC","#84c297","#5eb57d","#3da866","#1f9c53","#068e44","#006933","#004222","#001c0f","#000000"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],g=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(a=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],g=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},F4=(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]},s="#fff";let a=["#f0f6ff","#edf4ff","#bed3f7","#8faeeb","#6488de","#3c64d0","#2947ab","#192f85","#0d1b5e","#070e38"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],g=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(a=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],g=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},L4=(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]},s="#fff";let a=["#fff4e6","#ffdfb8","#ffc98f","#ffb066","#ff943d","#f27013","#cc5206","#a63a00","#802800","#591900"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],g=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(a=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],g=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},N4=(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]},s="#fff";let a=["#e1f0ef","#c8e3e2","#9ad6d6","#71c6c9","#4bb5bd","#2aa1af","#1a7b8a","#0e5563","#06323d","#021217"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],g=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(a=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],g=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},R4=(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]},s="#fff";let a=["#d1e8d99c","#8cdba9","#63cf8e","#3ec277","#1db564","#00a854","#008245","#005c34","#003620","#000f0a"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],g=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(a=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],g=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},j4=(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]},s="#fff";let a=["#c1d6d066","#81c9b9","#5bbda9","#38b09c","#1aa391","#009688","#007069","#004a47","#002424","#000000"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],g=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(a=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],g=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:a[0],100:a[1],200:a[2],light:a[3],400:a[4],main:a[5],dark:a[6],700:a[7],darker:a[8],900:a[9],contrastText:s},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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:s},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:g[0],light:g[1],main:g[2],dark:g[3],darker:g[4],contrastText:s},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:s},grey:r}},uB=(e,t,n)=>{switch(t){case"theme1":return D4(e,n);case"theme2":return M4(e,n);case"theme3":return k4(e,n);case"theme4":return F4(e,n);case"theme5":return L4(e,n);case"theme6":return N4(e,n);case"theme7":return R4(e,n);case"theme8":return j4(e,n);default:return cB(e)}};uB.propTypes={colors:A.object,presetColor:A.any};const H4=(e,t)=>{const n=e==="dark"?Xa:Mt;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],s=["#fafafa","#bfbfbf","#434343","#1f1f1f"],a=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],s=["#fafafa","#bfbfbf","#434343","#1f1f1f"],a=["#121212","#d3d8db"]),n.grey=[...r,...s,...a];const l=uB(n,t,e);return dA({palette:{mode:e,common:{black:"#000",white:"#fff"},...l,text:{primary:e==="dark"?je(l.grey[900],.87):l.grey[700],secondary:e==="dark"?je(l.grey[900],.45):l.grey[500],disabled:e==="dark"?je(l.grey[900],.1):l.grey[400]},action:{disabled:l.grey[300]},divider:e==="dark"?je(l.grey[900],.05):l.grey[200],background:{paper:e==="dark"?l.grey[100]:l.grey[0],default:l.grey.A50}}})},V4=e=>({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 z4(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 W4(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function U4(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:h.jsx(ot.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 Ao({color:e,theme:t}){const n=Ut(t,e),{lighter:r,light:s,main:a}=n;return{borderColor:je(s,.5),backgroundColor:r,"& .MuiAlert-icon":{color:a}}}function Y4(e){const t=Ao({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":Ao({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":Ao({color:"secondary",theme:e}),"&.MuiAlert-borderError":Ao({color:"error",theme:e}),"&.MuiAlert-borderSuccess":Ao({color:"success",theme:e}),"&.MuiAlert-borderInfo":Ao({color:"info",theme:e}),"&.MuiAlert-borderWarning":Ao({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 G4(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function K4(){return{MuiAutocomplete:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{padding:"3px 9px"}},popupIndicator:{width:"auto",height:"auto"},clearIndicator:{width:"auto",height:"auto"}}}}}function co({color:e,theme:t}){const n=Ut(t,e),{lighter:r,main:s}=n;return{color:s,backgroundColor:r}}function q4(e){const t=co({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":co({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":co({color:"secondary",theme:e}),"&.MuiBadge-colorError":co({color:"error",theme:e}),"&.MuiBadge-colorInfo":co({color:"info",theme:e}),"&.MuiBadge-colorSuccess":co({color:"success",theme:e}),"&.MuiBadge-colorWarning":co({color:"warning",theme:e})}}}}}function _e({variant:e,color:t,theme:n}){const r=Ut(n,t),{lighter:s,main:a,dark:l,contrastText:u}=r,g=`${t}Button`,d=zo(n,g),p={"&::after":{boxShadow:`0 0 5px 5px ${je(a,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${je(a,.9)}`},"&:focus-visible":{outline:`2px solid ${l}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:l},...p};case"shadow":return{color:u,backgroundColor:a,boxShadow:d,"&:hover":{boxShadow:"none",backgroundColor:l},...p};case"outlined":return{borderColor:a,"&:hover":{color:l,backgroundColor:"transparent",borderColor:l},...p};case"dashed":return{color:a,borderColor:a,backgroundColor:s,"&:hover":{color:l,borderColor:l},...p};case"text":default:return{"&:hover":{color:l,backgroundColor:s},...p}}}function _4(e){const t=_e({variant:"dashed",color:"primary",theme:e}),n=_e({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},s={"&>*: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:{...s},startIcon:{...s},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":_e({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":_e({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":_e({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":_e({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":_e({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":_e({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":_e({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":_e({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":_e({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":_e({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":_e({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":_e({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:_e({variant:"contained",color:"primary",theme:e}),containedSecondary:_e({variant:"contained",color:"secondary",theme:e}),containedError:_e({variant:"contained",color:"error",theme:e}),containedSuccess:_e({variant:"contained",color:"success",theme:e}),containedInfo:_e({variant:"contained",color:"info",theme:e}),containedWarning:_e({variant:"contained",color:"warning",theme:e}),outlinedPrimary:_e({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:_e({variant:"outlined",color:"secondary",theme:e}),outlinedError:_e({variant:"outlined",color:"error",theme:e}),outlinedSuccess:_e({variant:"outlined",color:"success",theme:e}),outlinedInfo:_e({variant:"outlined",color:"info",theme:e}),outlinedWarning:_e({variant:"outlined",color:"warning",theme:e}),textPrimary:_e({variant:"text",color:"primary",theme:e}),textSecondary:_e({variant:"text",color:"secondary",theme:e}),textError:_e({variant:"text",color:"error",theme:e}),textSuccess:_e({variant:"text",color:"success",theme:e}),textInfo:_e({variant:"text",color:"info",theme:e}),textWarning:_e({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function J4(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function X4(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function Z4(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function $o({color:e,theme:t}){const n=Ut(t,e),{lighter:r,main:s,dark:a}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:s}},"&.Mui-focusVisible":{outline:`2px solid ${a}`,outlineOffset:-4}}}function $4(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 Lu(e){const t=$4(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function eL(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:h.jsx(w.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:h.jsx(w.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:h.jsx(ot.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:h.jsx(w.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:h.jsx(ot.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...Lu("small")},"&.size-medium":{...Lu("medium")},"&.size-large":{...Lu("large")}},colorPrimary:$o({color:"primary",theme:e}),colorSecondary:$o({color:"secondary",theme:e}),colorSuccess:$o({color:"success",theme:e}),colorWarning:$o({color:"warning",theme:e}),colorInfo:$o({color:"info",theme:e}),colorError:$o({color:"error",theme:e})}}}}function ei({color:e,theme:t}){const n=Ut(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function hn({color:e,theme:t}){const n=Ut(t,e),{light:r,lighter:s,main:a}=n;return{color:a,backgroundColor:s,borderColor:r,"& .MuiChip-deleteIcon":{color:a,"&:hover":{color:r}}}}function tL(e){const t=hn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":ei({color:"primary",theme:e}),"&.MuiChip-colorSecondary":ei({color:"secondary",theme:e}),"&.MuiChip-colorError":ei({color:"error",theme:e}),"&.MuiChip-colorInfo":ei({color:"info",theme:e}),"&.MuiChip-colorSuccess":ei({color:"success",theme:e}),"&.MuiChip-colorWarning":ei({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":hn({color:"primary",theme:e}),"&.MuiChip-lightSecondary":hn({color:"secondary",theme:e}),"&.MuiChip-lightError":hn({color:"error",theme:e}),"&.MuiChip-lightInfo":hn({color:"info",theme:e}),"&.MuiChip-lightSuccess":hn({color:"success",theme:e}),"&.MuiChip-lightWarning":hn({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":hn({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":hn({color:"secondary",theme:e}),"&.MuiChip-combinedError":hn({color:"error",theme:e}),"&.MuiChip-combinedInfo":hn({color:"info",theme:e}),"&.MuiChip-combinedSuccess":hn({color:"success",theme:e}),"&.MuiChip-combinedWarning":hn({color:"warning",theme:e})}}}}}function nL(){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:je("#000",.7)}}}}}}function rL(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function oL(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function ti({color:e,theme:t}){const n=Ut(t,e),{main:r,dark:s,contrastText:a}=n,l=`${e}Button`,u=zo(t,l);return{color:a,backgroundColor:r,boxShadow:u,"&:hover":{boxShadow:"none",backgroundColor:s},"&:focus-visible":{outline:`2px solid ${s}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${je(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${je(r,.9)}`}}}function iL(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":ti({color:"primary",theme:e}),"&.MuiFab-secondary":ti({color:"secondary",theme:e}),"&.Mui-error":ti({color:"error",theme:e}),"&.MuiFab-success":ti({color:"success",theme:e}),"&.MuiFab-info":ti({color:"info",theme:e}),"&.MuiFab-warning":ti({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 sL(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"}}}}}function aL(){return{MuiInputBase:{styleOverrides:{}}}}function lL(e){return{MuiInputLabel:{styleOverrides:{root:{color:e.palette.grey[600]},outlined:{lineHeight:"0.8em","&.MuiInputLabel-sizeSmall":{lineHeight:"1em"},"&.MuiInputLabel-shrink":{background:e.palette.background.paper,padding:"0 8px",marginLeft:-6,lineHeight:"1.4375em"}}}}}}function AL(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function cL(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function uL(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function gL(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function dL(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function uo({variant:e,theme:t}){const n=Ut(t,e),{light:r}=n,s=zo(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:s,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function fL(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:{...uo({variant:"primary",theme:e}),"&.Mui-error":{...uo({variant:"error",theme:e})}},inputSizeSmall:{padding:"7.5px 8px 7.5px 12px"},inputMultiline:{padding:0},colorSecondary:uo({variant:"secondary",theme:e}),colorError:uo({variant:"error",theme:e}),colorWarning:uo({variant:"warning",theme:e}),colorInfo:uo({variant:"info",theme:e}),colorSuccess:uo({variant:"success",theme:e})}}}}function pL(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function pt({variant:e,color:t,theme:n}){const r=Ut(n,t),{lighter:s,light:a,dark:l,main:u,contrastText:g}=r,d={"&:focus-visible":{outline:`2px solid ${l}`,outlineOffset:2,...e==="text"&&{backgroundColor:n.palette.background.paper}}};switch(e){case"combined":case"contained":return{color:g,backgroundColor:u,"&:hover":{backgroundColor:a},...d};case"outlined":return{borderColor:u,"&:hover":{backgroundColor:s,borderColor:a},...d};case"text":default:return{color:u,"&:hover":{backgroundColor:u,color:s},...d}}}function hL(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":pt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":pt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":pt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":pt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":pt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":pt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":pt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":pt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":pt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":pt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":pt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":pt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":pt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":pt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":pt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":pt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":pt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":pt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":pt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":pt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":pt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":pt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":pt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":pt({variant:"outlined",color:"warning",theme:e})}}}}}}function CL(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function ni({color:e,theme:t}){const n=Ut(t,e),{lighter:r,main:s,dark:a}=n;return{"& .dot":{backgroundColor:s},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${a}`,outlineOffset:-4}}}function EL(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 Nu(e){const t=EL(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function IL(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:h.jsx(w.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:h.jsx(w.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:h.jsx(w.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":{...Nu("small")},"&.size-medium":{...Nu("medium")},"&.size-large":{...Nu("large")}},colorPrimary:ni({color:"primary",theme:e}),colorSecondary:ni({color:"secondary",theme:e}),colorSuccess:ni({color:"success",theme:e}),colorWarning:ni({color:"warning",theme:e}),colorInfo:ni({color:"info",theme:e}),colorError:ni({color:"error",theme:e})}}}}function ri({color:e,theme:t}){const n=Ut(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function BL(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":ri({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":ri({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":ri({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":ri({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":ri({color:"info",theme:e}),"&.MuiSlider-thumbColorError":ri({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 QL(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 Ru(e,t){const n=QL(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 mL(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},...Ru(e,"medium")},sizeLarge:{...Ru(e,"large")},sizeSmall:{...Ru(e,"small")}}}}}function yL(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 bL(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 vL(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 xL(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function wL(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function TL(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function PL(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function SL(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function OL(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 DL(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function ML(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function kL(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function FL(e){return gt.merge(z4(e),W4(e),U4(e),Y4(e),G4(),K4(),q4(e),_4(e),J4(),X4(),Z4(),eL(e),tL(e),nL(),rL(e),oL(),iL(e),sL(e),aL(),lL(e),AL(),cL(),uL(e),gL(e),dL(),fL(e),pL(),hL(e),CL(e),IL(e),BL(e),mL(e),yL(e),bL(e),vL(e),xL(e),wL(e),TL(),PL(),SL(),OL(e),DL(e),ML(),kL())}const gB=({themeOverrides:e,children:t})=>{const{themeDirection:n,mode:r,presetColor:s,fontFamily:a}=Nt(),l=F.useMemo(()=>H4(r,s),[r,s]),u=F.useMemo(()=>V4(a),[a]),g=F.useMemo(()=>p4(l),[l]),d=F.useMemo(()=>({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:n,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:l.palette,customShadows:g,typography:u,shadows:l.shadows.map(()=>"none"),...typeof e=="function"?e(l):e}),[n,l,u,g,e]),p=dA(d);return p.components=FL(p),h.jsx(w.StyledEngineProvider,{injectFirst:!0,children:h.jsxs(Jd,{theme:p,children:[h.jsx(w.CssBaseline,{}),t]})})};gB.propTypes={children:A.node,themeOverrides:A.oneOfType([A.object,A.func])};const Za=({children:e,theme:t,...n})=>h.jsx(x.CoreAdminContext,{...n,children:h.jsx(gB,{themeOverrides:t,children:h.jsx(Kc,{children:e})})});Za.displayName="AdminContext",Za.defaultProps={...x.CoreAdminContext.defaultProps},Za.propTypes={...x.CoreAdminContext.propTypes,children:A.node.isRequired,theme:A.oneOfType([A.object,A.func])};const oi=e=>{const{authProvider:t,catchAll:n,children:r,dashboard:s,dataProvider:a,disableTelemetry:l,history:u,i18nProvider:g,layout:d,loading:p,loginPage:E,authCallbackPage:C,menu:I,notification:B,queryClient:m,requireAuth:y,store:D,ready:k,theme:P,title:T="React Admin"}=e;return h.jsx(Za,{authProvider:t,dataProvider:a,i18nProvider:g,store:D,history:u,queryClient:m,theme:P,children:h.jsx(x.AdminUI,{layout:d,dashboard:s,disableTelemetry:l,menu:I,catchAll:n,title:T,loading:p,loginPage:E,authCallbackPage:C,notification:B,requireAuth:y,ready:k,children:r})})};oi.defaultProps={store:x.localStorageStore(),title:"Applica Admin"},oi.propTypes={...x.AdminUI.propTypes};class dB{constructor({catch:t,display:n,log:r,error:s}){this.catch=t,this.display=n,this.log=r,this.error=s}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}const LL=({apiUrl:e,endpoint:t,locale:n,message:r,bodyBuilder:s})=>fetch(`${e}${t}`,{method:"PUT",headers:new Headers({Accept:"application/json","Content-Type":"application/json"}),body:JSON.stringify(s(n,r))}),NL=({enabled:e=!0,apiUrl:t,endpoint:n="/ui-errors/put",loading:r,catcherFn:s=l=>new dB({catch:l!=null,display:!1,log:!1}),bodyBuilder:a=(l,u)=>({code:l,message:{code:u,text:u}})})=>(G.useMemo(()=>{if(r||!e)return;const l=console.error;console.error=function(u,...g){if(!u||typeof u!="string"){l.apply(console,arguments);return}const d=u.replace(/%s/g,()=>g.shift()),p=s(d);if(!p.isCatched()){l.apply(console,arguments);return}p.logError()&&LL({apiUrl:t,endpoint:n,message:d,bodyBuilder:a}),p.displayError()?l.apply(console,arguments):console.debug.apply(console,arguments)}},[t,r,a,n,s,e]),!0),RL=({languages:e,defaultLocale:t,allowMissing:n=!1})=>YQ(r=>gt.get(e,r,{}),t,[{locale:t}],{allowMissing:n}),fB=[],jL=({apiUrl:e,endpoint:t,locale:n,message:r,bodyBuilder:s})=>r!=null&&r!=="undefined"&&r.indexOf("[")===-1&&r.indexOf("]")===-1&&fB.indexOf(`${n}-${r}`)===-1&&fB.push(`${n}-${r}`)&&fetch(`${e}${t}`,{method:"PUT",headers:new Headers({Accept:"application/json","Content-Type":"application/json"}),body:JSON.stringify(s(n,r))}),HL=({apiUrl:e,enabled:t=!0,endpoint:n="/languages/put-message",loading:r,bodyBuilder:s=(a,l)=>({code:a,message:{code:l,text:l}})})=>{const[a]=x.useLocaleState();return G.useMemo(()=>{if(r||!t)return;const l=console.error;console.error=function(u){if(!(typeof u=="string"&&u==="%c%s")){if(typeof u=="string"&&u.indexOf("Missing translation for key: ")>=0){if(u=u.replace("Warning: Missing translation for key: ",""),u=u.split('"').join("").trim(),u===null||u.indexOf(" ")!==-1||u.indexOf(".")===-1)return;const g=localStorage.getItem("locale")||a;jL({apiUrl:e,endpoint:n,locale:g,message:u,bodyBuilder:s});return}l.apply(console,arguments)}}},[e,a,r,s,n,t]),!0};window.React=F;const VL=({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})})=>{const[r,s]=F.useState({loading:!0,languages:null});return F.useEffect(()=>{let a=new Headers;a.append("Accept","application/json"),a.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:a}).then(l=>l.json()).then(l=>s({loading:!1,...n(l)}))},[e,t,n]),r},zL=e=>e.reduce((t,n)=>({...t,[n.lang]:{...t[n.lang]||{},[n.code]:n.text}}),{}),WL=(e,t)=>({lang:e,code:t,text:t}),UL=new ed.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),ju=({theme:e,apiUrl:t,defaultLocale:n,development:r,logoMain:s,logoIcon:a,menu:l,name:u,version:g,dataProvider:d,authProvider:p,notification:E,disableNotification:C,...I})=>{const B=VL({apiUrl:t,endpoint:"/i18n/messages",mapper:zL});HL({bodyBuilder:WL,apiUrl:t,endpoint:"/i18n/message",loading:B==null?void 0:B.loading,enabled:r}),NL({apiUrl:t,endpoint:"/cli/error",catcherFn:D=>{var k=D==null?void 0:D.toString(),P=["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`.","validateDOMNesting(...): <form> cannot appear as a descendant of <form>."];const T=P.some(V=>k==null?void 0:k.includes(V));return new dB({catch:T,display:!T,log:!T,error:D})}});const m=F.useMemo(()=>D=>{const k=u?h.jsx(Gc,{title:u}):s,P=u?h.jsx(qc,{title:u}):a;return h.jsx(Wc,{...D,name:u,version:g,logoMain:k,logoIcon:P,notification:E,disableNotification:C})},[s,a,u,g,E,C]);if(B!=null&&B.loading)return null;const y=RL({languages:B,defaultLocale:n,allowMissing:r});return h.jsx(CA,{children:h.jsx(QA,{menu:l,children:h.jsx(IA,{children:h.jsx(oi,{theme:e,layout:m,notification:EI,queryClient:UL,dataProvider:d,authProvider:p,i18nProvider:y,...I})})})})};ju.defaultProps={...oi.defaultProps,fileFields:[],defaultLocale:"en",development:!1,version:"0.0.0",notification:"entities/notification",disableNotification:!1},ju.propTypes={...oi.propTypes,theme:A.oneOfType([A.object,A.func]),apiUrl:A.string.isRequired,defaultLocale:A.string,development:A.bool,logoMain:A.node,logoIcon:A.node,menu:A.arrayOf(Mo),name:A.string,version:A.string,authProvider:A.oneOfType([A.func,A.object]),dataProvider:A.oneOfType([A.func,A.object]),notification:A.string,disableNotification:A.bool},Object.defineProperty(j,"ArrayInput",{enumerable:!0,get:()=>x.ArrayInput}),Object.defineProperty(j,"ArrayInputContext",{enumerable:!0,get:()=>x.ArrayInputContext}),Object.defineProperty(j,"BooleanField",{enumerable:!0,get:()=>x.BooleanField}),Object.defineProperty(j,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>x.BulkDeleteWithConfirmButton}),Object.defineProperty(j,"Button",{enumerable:!0,get:()=>x.Button}),Object.defineProperty(j,"ChipField",{enumerable:!0,get:()=>x.ChipField}),Object.defineProperty(j,"Confirm",{enumerable:!0,get:()=>x.Confirm}),Object.defineProperty(j,"Create",{enumerable:!0,get:()=>x.Create}),Object.defineProperty(j,"CreateButton",{enumerable:!0,get:()=>x.CreateButton}),Object.defineProperty(j,"CreateContextProvider",{enumerable:!0,get:()=>x.CreateContextProvider}),Object.defineProperty(j,"CustomRoutes",{enumerable:!0,get:()=>x.CustomRoutes}),Object.defineProperty(j,"DeleteWithConfirmButton",{enumerable:!0,get:()=>x.DeleteWithConfirmButton}),Object.defineProperty(j,"DeleteWithUndoButton",{enumerable:!0,get:()=>x.DeleteWithUndoButton}),Object.defineProperty(j,"EditButton",{enumerable:!0,get:()=>x.EditButton}),Object.defineProperty(j,"Form",{enumerable:!0,get:()=>x.Form}),Object.defineProperty(j,"HttpError",{enumerable:!0,get:()=>x.HttpError}),Object.defineProperty(j,"ListToolbar",{enumerable:!0,get:()=>x.ListToolbar}),Object.defineProperty(j,"Pagination",{enumerable:!0,get:()=>x.Pagination}),Object.defineProperty(j,"RecordContextProvider",{enumerable:!0,get:()=>x.RecordContextProvider}),Object.defineProperty(j,"ReferenceArrayField",{enumerable:!0,get:()=>x.ReferenceArrayField}),Object.defineProperty(j,"ReferenceField",{enumerable:!0,get:()=>x.ReferenceField}),Object.defineProperty(j,"Resource",{enumerable:!0,get:()=>x.Resource}),Object.defineProperty(j,"ResourceContextProvider",{enumerable:!0,get:()=>x.ResourceContextProvider}),Object.defineProperty(j,"SaveButton",{enumerable:!0,get:()=>x.SaveButton}),Object.defineProperty(j,"SimpleFormIterator",{enumerable:!0,get:()=>x.SimpleFormIterator}),Object.defineProperty(j,"SimpleFormIteratorContext",{enumerable:!0,get:()=>x.SimpleFormIteratorContext}),Object.defineProperty(j,"SimpleList",{enumerable:!0,get:()=>x.SimpleList}),Object.defineProperty(j,"SingleFieldList",{enumerable:!0,get:()=>x.SingleFieldList}),Object.defineProperty(j,"TopToolbar",{enumerable:!0,get:()=>x.TopToolbar}),Object.defineProperty(j,"choices",{enumerable:!0,get:()=>x.choices}),Object.defineProperty(j,"email",{enumerable:!0,get:()=>x.email}),Object.defineProperty(j,"maxLength",{enumerable:!0,get:()=>x.maxLength}),Object.defineProperty(j,"maxValue",{enumerable:!0,get:()=>x.maxValue}),Object.defineProperty(j,"minLength",{enumerable:!0,get:()=>x.minLength}),Object.defineProperty(j,"minValue",{enumerable:!0,get:()=>x.minValue}),Object.defineProperty(j,"number",{enumerable:!0,get:()=>x.number}),Object.defineProperty(j,"regex",{enumerable:!0,get:()=>x.regex}),Object.defineProperty(j,"required",{enumerable:!0,get:()=>x.required}),Object.defineProperty(j,"useArrayInput",{enumerable:!0,get:()=>x.useArrayInput}),Object.defineProperty(j,"useAuthProvider",{enumerable:!0,get:()=>x.useAuthProvider}),Object.defineProperty(j,"useDataProvider",{enumerable:!0,get:()=>x.useDataProvider}),Object.defineProperty(j,"useGetIdentity",{enumerable:!0,get:()=>x.useGetIdentity}),Object.defineProperty(j,"useGetList",{enumerable:!0,get:()=>x.useGetList}),Object.defineProperty(j,"useGetMany",{enumerable:!0,get:()=>x.useGetMany}),Object.defineProperty(j,"useGetManyReference",{enumerable:!0,get:()=>x.useGetManyReference}),Object.defineProperty(j,"useGetOne",{enumerable:!0,get:()=>x.useGetOne}),Object.defineProperty(j,"useListContext",{enumerable:!0,get:()=>x.useListContext}),Object.defineProperty(j,"useNotify",{enumerable:!0,get:()=>x.useNotify}),Object.defineProperty(j,"usePermissions",{enumerable:!0,get:()=>x.usePermissions}),Object.defineProperty(j,"useRecordContext",{enumerable:!0,get:()=>x.useRecordContext}),Object.defineProperty(j,"useResourceContext",{enumerable:!0,get:()=>x.useResourceContext}),Object.defineProperty(j,"useResourceDefinition",{enumerable:!0,get:()=>x.useResourceDefinition}),Object.defineProperty(j,"useResourceDefinitions",{enumerable:!0,get:()=>x.useResourceDefinitions}),Object.defineProperty(j,"useTranslate",{enumerable:!0,get:()=>x.useTranslate}),Object.defineProperty(j,"useUnselect",{enumerable:!0,get:()=>x.useUnselect}),Object.defineProperty(j,"useUnselectAll",{enumerable:!0,get:()=>x.useUnselectAll}),Object.defineProperty(j,"useUpdateMany",{enumerable:!0,get:()=>x.useUpdateMany}),j.ActionsField=ru,j.ActionsMenu=Di,j.Admin=oi,j.AnimateButton=oC,j.AppConfigContext=hA,j.AppConfigProvider=CA,j.ApplicaAdmin=ju,j.AttachmentField=uu,j.AttachmentInput=Eu,j.AutocompleteArrayInput=KI,j.AutocompleteInput=qI,j.Avatar=Ia,j.BooleanInput=Iu,j.Breadcrumbs=_s,j.CardForm=La,j.CircularWithLabel=CC,j.CircularWithPath=EC,j.CoverField=Ua,j.CreateInDialogButton=tu,j.Datagrid=Pu,j.DateAgoField=Ya,j.DateField=gu,j.DateInput=Bu,j.Dot=Ba,j.Edit=JD,j.EditInDialogButton=nu,j.EmailField=du,j.Empty=$I,j.FileField=fu,j.FileInput=Qu,j.FormHeader=Jc,j.FunctionField=WI,j.IconButton=Dr,j.ImageField=ss,j.ImageInput=mu,j.ImpersonateUserButton=mI,j.LabeledInput=st,j.Layout=Wc,j.LinearWithIcon=IC,j.LinearWithLabel=BC,j.List=Su,j.Loadable=GD,j.Loader=CI,j.LoadingButton=Sc,j.Logo=Vc,j.LongForm=os,j.MainCard=jn,j.MainIcon=Gc,j.MenuConfigContext=BA,j.MenuConfigProvider=QA,j.MenuPopover=Ws,j.MenuPropTypes=Mo,j.Notification=EI,j.NotificationList=f4,j.NumberInput=yu,j.ReadonlyField=hu,j.RecordInput=_I,j.ReferenceArrayInput=bu,j.ReferenceInput=vu,j.ReferenceManyField=Xo,j.ReferenceManyInput=xu,j.ScrollTop=Kc,j.ScrollX=KD,j.SearchInput=t4,j.SelectArrayInput=wu,j.SelectInput=XI,j.SimpleBar=Hc,j.SimpleForm=Zc,j.SizeField=YI,j.SmallIcon=qc,j.SmartTextInput=Ga,j.TabbedForm=Ha,j.TextField=Cu,j.TextInput=as,j.ThemeConfigContext=EA,j.ThemeConfigProvider=IA,j.TimeInput=Tu,j.Toolbar=Hr,j.Tooltip=hC,j.Transitions=kr,j.parseTime=ZI,j.useAppConfig=Mi,j.useBreadcrumbs=af,j.useLocalStorage=bA,j.useMenu=yA,j.useMenuConfig=Rn,j.useResourceTitle=lf,j.useThemeConfig=Nt,j.uuid=r4,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});